diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index de8b35d562..d9d773f155 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -108,8 +108,6 @@ jobs: - name: Build typescript run: pnpm run generate - - name: Bundle - run: pnpm run build:esbuild:prod - name: Create preload cache run: xvfb-run --auto-servernum pnpm run build:preload-cache @@ -121,7 +119,8 @@ jobs: - name: Run ${{ matrix.metric }} run: | set -o pipefail - xvfb-run --auto-servernum node ${{ matrix.script }} | tee benchmark.log + xvfb-run --auto-servernum ./node_modules/.bin/tsx \ + ${{ matrix.script }} | tee benchmark.log timeout-minutes: 10 env: NODE_ENV: production diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f7e916dcf..5e613be804 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,9 +114,8 @@ jobs: # CXX: sccache clang++ # SCCACHE_GHA_ENABLED: "true" NPM_CONFIG_LOGLEVEL: verbose - - - run: pnpm run generate - run: pnpm run prepare-beta-build + - run: pnpm run generate - run: pnpm run test-node - run: pnpm run test-electron env: @@ -135,9 +134,9 @@ jobs: - name: Upload installer size if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' && github.ref == 'refs/heads/main' }} run: | - node ts/scripts/publish-installer-size.node.js macos-arm64 - node ts/scripts/publish-installer-size.node.js macos-x64 - node ts/scripts/publish-installer-size.node.js macos-universal + ./node_modules/.bin/tsx ts/scripts/publish-installer-size.node.ts macos-arm64 + ./node_modules/.bin/tsx ts/scripts/publish-installer-size.node.ts macos-x64 + ./node_modules/.bin/tsx ts/scripts/publish-installer-size.node.ts macos-universal - run: pnpm run test-release env: NODE_ENV: production @@ -190,11 +189,9 @@ jobs: # SCCACHE_GHA_ENABLED: "true" NPM_CONFIG_LOGLEVEL: verbose - - run: pnpm run generate - run: pnpm run prepare-beta-build + - run: pnpm run generate - - name: Create bundle - run: pnpm run build:esbuild:prod - name: Create preload cache run: xvfb-run --auto-servernum pnpm run build:preload-cache env: @@ -219,7 +216,7 @@ jobs: - name: Upload installer size if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' && github.ref == 'refs/heads/main' }} - run: node ts/scripts/publish-installer-size.node.js linux + run: ./node_modules/.bin/tsx ts/scripts/publish-installer-size.node.ts linux - run: xvfb-run --auto-servernum pnpm run test-node @@ -272,15 +269,13 @@ jobs: env: NPM_CONFIG_LOGLEVEL: verbose - - run: pnpm run generate - - run: pnpm run test-node - run: copy package.json temp.json - run: del package.json - run: type temp.json | findstr /v certificateSubjectName | findstr /v certificateSha1 > package.json - run: pnpm run prepare-beta-build + - run: pnpm run generate + - run: pnpm run test-node - - name: Create bundle - run: pnpm run build:esbuild:prod - name: Create preload cache run: pnpm run build:preload-cache env: @@ -299,7 +294,7 @@ jobs: - name: Upload installer size if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' && github.ref == 'refs/heads/main' }} - run: node ts/scripts/publish-installer-size.node.js windows + run: ./node_modules/.bin/tsx ts/scripts/publish-installer-size.node.ts windows - run: pnpm run test-electron env: @@ -414,8 +409,6 @@ jobs: - name: Build typescript run: pnpm run generate - - name: Bundle - run: pnpm run build:esbuild:prod - name: Create preload cache run: xvfb-run --auto-servernum pnpm run build:preload-cache env: @@ -490,4 +483,4 @@ jobs: - run: pnpm generate:phase-0 - name: Run OS version check run: | - node ts/scripts/check-min-os-version.node.js + ./node_modules/.bin/tsx ts/scripts/check-min-os-version.node.ts diff --git a/.github/workflows/icu-book.yml b/.github/workflows/icu-book.yml index f38956049c..df1402d19e 100644 --- a/.github/workflows/icu-book.yml +++ b/.github/workflows/icu-book.yml @@ -50,8 +50,8 @@ jobs: - run: ./node_modules/.bin/run-p --race test:storybook:serve test:storybook:test env: ARTIFACTS_DIR: stories - - run: pnpm run build:esbuild - - run: node ts/scripts/compile-stories-icu-lookup.node.js stories + - run: pnpm run build:rolldown + - run: ./node_modules/.bin/tsx ts/scripts/compile-stories-icu-lookup.node.ts stories - name: Upload test artifacts if: github.event_name == 'workflow_dispatch' diff --git a/.gitignore b/.gitignore index 2ec2cae457..7b452f5bad 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ build/ICUMessageParams.d.ts build/**/*.js app/*.js ts/**/*.js +!ts/windows/main/tsx.js ts/protobuf/*.d.ts # CSS Modules diff --git a/.mocharc.json b/.mocharc.json index 34c571cd4f..6cade48cc6 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -1,3 +1,4 @@ { - "checkLeaks": true + "checkLeaks": true, + "node-option": ["import=tsx"] } diff --git a/.oxlint/rules/enforceFileSuffix.mjs b/.oxlint/rules/enforceFileSuffix.mjs index aae3ec46eb..dbe878a8c4 100644 --- a/.oxlint/rules/enforceFileSuffix.mjs +++ b/.oxlint/rules/enforceFileSuffix.mjs @@ -115,7 +115,6 @@ const NODE_PACKAGES = new Set([ 'endanger', 'enhanced-resolve', 'enquirer', - 'esbuild', 'execa', 'html-webpack-plugin', 'http-server', @@ -136,6 +135,7 @@ const NODE_PACKAGES = new Set([ 'react-devtools', 'react-devtools-core', 'resolve-url-loader', + 'rolldown', 'sass', 'sass-loader', 'style-loader', @@ -147,6 +147,7 @@ const NODE_PACKAGES = new Set([ 'synckit', 'tailwindcss', 'terser-webpack-plugin', + 'tsx', 'ts-node', 'typescript', 'wait-on', @@ -353,11 +354,11 @@ export const enforceFileSuffix = ESLintUtils.RuleCreator.withoutDocs({ * @param {string} source */ function trackLocalDep(node, source) { - if (!source.endsWith('.js')) { + if (!/\.tsx?/.test(source)) { return; } - const match = source.match(/\.([^.\/]+)(?:\.stories)?\.js$/); + const match = source.match(/\.([^.\/]+)(?:\.stories)?\.tsx?$/); if (match == null) { context.report({ node, diff --git a/.oxlint/rules/enforceFileSuffix.test.mjs b/.oxlint/rules/enforceFileSuffix.test.mjs index e387bafe65..a0814db31e 100644 --- a/.oxlint/rules/enforceFileSuffix.test.mjs +++ b/.oxlint/rules/enforceFileSuffix.test.mjs @@ -51,7 +51,7 @@ ruleTester.run('file-suffix', enforceFileSuffix, { name: `importing ${depSuffix} from ${fileSuffix}`, filename: `a.${fileSuffix}.ts`, code: ` - import { x } from './b.${depSuffix}.js'; + import { x } from './b.${depSuffix}.ts'; ${requiredLine} `, languageOptions: { @@ -66,7 +66,7 @@ ruleTester.run('file-suffix', enforceFileSuffix, { { name: 'type import should have no effect', filename: 'a.std.ts', - code: `import type { ReadonlyDeep } from './b.dom.js'`, + code: `import type { ReadonlyDeep } from './b.dom.ts'`, }, ], invalid: [ @@ -76,7 +76,7 @@ ruleTester.run('file-suffix', enforceFileSuffix, { return { name: `importing ${depSuffix} from ${fileSuffix}`, filename: `a.${fileSuffix}.ts`, - code: `import { x } from './b.${depSuffix}.js'`, + code: `import { x } from './b.${depSuffix}.ts'`, errors: [ { messageId: 'wrongFileSuffix', @@ -108,7 +108,7 @@ ruleTester.run('file-suffix', enforceFileSuffix, { filename: 'a.main.ts', code: ` import { autoUpdater } from 'electron'; - import './b.preload.js'; + import './b.preload.ts'; `, errors: [ { @@ -122,7 +122,7 @@ ruleTester.run('file-suffix', enforceFileSuffix, { filename: 'a.preload.ts', code: ` import { ipcRenderer } from 'electron'; - import './b.main.js'; + import './b.main.ts'; `, errors: [ { diff --git a/.oxlintrc.json b/.oxlintrc.json index 260695ef9f..c8504ad440 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -1650,7 +1650,8 @@ "dangerfile.js", "eslint-local-rules.js", "test/setup-test-node.js", - "preload.wrapper.ts" + "preload.wrapper.ts", + "rolldown.config.ts" ], "env": { "node": true } }, @@ -1695,7 +1696,8 @@ ".*rc.js", "ci.js", "dangerfile.js", - "preload.wrapper.ts" + "preload.wrapper.ts", + "rolldown.config.ts" ], "rules": { "signal-desktop/enforce-file-suffix": "off" @@ -1723,7 +1725,8 @@ "ts/util/lint/**", "ts/windows/main/*_test.*", "dangerfile.js", - "preload.wrapper.ts" + "preload.wrapper.ts", + "rolldown.config.ts" ], "rules": { "eslint/no-restricted-globals": [ diff --git a/.storybook/StorybookThemeContext.std.d.ts b/.storybook/StorybookThemeContext.std.d.ts index cc29918620..63863a6b81 100644 --- a/.storybook/StorybookThemeContext.std.d.ts +++ b/.storybook/StorybookThemeContext.std.d.ts @@ -2,6 +2,6 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { Context } from 'react'; -import type { ThemeType } from '../ts/types/Util.std.js'; +import type { ThemeType } from '../ts/types/Util.std.ts'; export const StorybookThemeContext: Context; diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 1773f9fc1c..d6e04c3427 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -5,6 +5,7 @@ import '../ts/window.d.ts'; import React, { StrictMode } from 'react'; +import '@signalapp/quill-cjs/dist/quill.core.css'; import '../stylesheets/manifest.scss'; import '../stylesheets/tailwind-config.css'; import * as styles from './styles.scss'; @@ -16,26 +17,26 @@ import { combineReducers, createStore } from 'redux'; import { Globals } from '@react-spring/web'; import { StorybookThemeContext } from './StorybookThemeContext.std.js'; -import { SystemThemeType, ThemeType } from '../ts/types/Util.std.js'; -import { setupI18n } from '../ts/util/setupI18n.dom.js'; -import { HourCyclePreference } from '../ts/types/I18N.std.js'; -import { AxoProvider } from '../ts/axo/AxoProvider.dom.js'; -import type { StateType } from '../ts/state/reducer.preload.js'; +import { SystemThemeType, ThemeType } from '../ts/types/Util.std.ts'; +import { setupI18n } from '../ts/util/setupI18n.dom.tsx'; +import { HourCyclePreference } from '../ts/types/I18N.std.ts'; +import { AxoProvider } from '../ts/axo/AxoProvider.dom.tsx'; +import type { StateType } from '../ts/state/reducer.preload.ts'; import { ScrollerLockContext, createScrollerLock, -} from '../ts/hooks/useScrollLock.dom.js'; -import { Environment, setEnvironment } from '../ts/environment.std.js'; -import { parseUnknown } from '../ts/util/schemas.std.js'; -import { LocaleEmojiListSchema } from '../ts/types/emoji.std.js'; -import { FunProvider } from '../ts/components/fun/FunProvider.dom.js'; -import { EmojiSkinTone } from '../ts/components/fun/data/emojis.std.js'; -import { MOCK_GIFS_PAGINATED_ONE_PAGE } from '../ts/components/fun/mocks.dom.js'; -import { NavTab } from '../ts/types/Nav.std.js'; +} from '../ts/hooks/useScrollLock.dom.tsx'; +import { Environment, setEnvironment } from '../ts/environment.std.ts'; +import { parseUnknown } from '../ts/util/schemas.std.ts'; +import { LocaleEmojiListSchema } from '../ts/types/emoji.std.ts'; +import { FunProvider } from '../ts/components/fun/FunProvider.dom.tsx'; +import { EmojiSkinTone } from '../ts/components/fun/data/emojis.std.ts'; +import { MOCK_GIFS_PAGINATED_ONE_PAGE } from '../ts/components/fun/mocks.dom.tsx'; +import { NavTab } from '../ts/types/Nav.std.ts'; -import type { FunEmojiSelection } from '../ts/components/fun/panels/FunPanelEmojis.dom.js'; -import type { FunGifSelection } from '../ts/components/fun/panels/FunPanelGifs.dom.js'; -import type { FunStickerSelection } from '../ts/components/fun/panels/FunPanelStickers.dom.js'; +import type { FunEmojiSelection } from '../ts/components/fun/panels/FunPanelEmojis.dom.tsx'; +import type { FunGifSelection } from '../ts/components/fun/panels/FunPanelGifs.dom.tsx'; +import type { FunStickerSelection } from '../ts/components/fun/panels/FunPanelStickers.dom.tsx'; setEnvironment(Environment.Development, true); diff --git a/ACKNOWLEDGMENTS.md b/ACKNOWLEDGMENTS.md index a9fc9142e8..19c5bdf085 100644 --- a/ACKNOWLEDGMENTS.md +++ b/ACKNOWLEDGMENTS.md @@ -5,6 +5,206 @@ Signal Desktop makes use of the following open source projects. +## @babel/core + + MIT License + + Copyright (c) 2014-present Sebastian McKenzie and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## @babel/plugin-proposal-class-properties + + MIT License + + Copyright (c) 2014-present Sebastian McKenzie and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## @babel/plugin-proposal-nullish-coalescing-operator + + MIT License + + Copyright (c) 2014-present Sebastian McKenzie and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## @babel/plugin-proposal-optional-chaining + + MIT License + + Copyright (c) 2014-present Sebastian McKenzie and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## @babel/plugin-transform-runtime + + MIT License + + Copyright (c) 2014-present Sebastian McKenzie and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## @babel/plugin-transform-typescript + + MIT License + + Copyright (c) 2014-present Sebastian McKenzie and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## @babel/preset-react + + MIT License + + Copyright (c) 2014-present Sebastian McKenzie and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## @babel/preset-typescript + + MIT License + + Copyright (c) 2014-present Sebastian McKenzie and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## @electron/asar Copyright (c) 2014 GitHub Inc. @@ -28,6 +228,57 @@ Signal Desktop makes use of the following open source projects. OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## @electron/fuses + + Copyright (c) 2020 Electron Maintainers. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## @electron/notarize + + Copyright 2018 Samuel Attard and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## @electron/symbolicate-mac + + ISC License + + Copyright (c) Contributors to the Electron project + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + ## @formatjs/fast-memoize MIT License @@ -52,6 +303,18 @@ Signal Desktop makes use of the following open source projects. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## @formatjs/intl + + MIT License + + Copyright (c) 2023 FormatJS + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## @formatjs/intl-localematcher MIT License @@ -108,6 +371,30 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## @indutny/parallel-prettier + + The MIT License (MIT) + + Copyright (c) Microsoft Corporation + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + ## @indutny/protopiler Copyright Fedor Indutny, 2026. @@ -152,6 +439,10 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## @indutny/rezip-electron + + License: MIT + ## @indutny/simple-windows-notifications Copyright Fedor Indutny, 2024. @@ -400,6 +691,30 @@ Signal Desktop makes use of the following open source projects. See the License for the specific language governing permissions and limitations under the License. +## @napi-rs/canvas + + MIT License + + Copyright (c) 2020 lynweklm@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + ## @popperjs/core The MIT License (MIT) @@ -1927,6 +2242,670 @@ Signal Desktop makes use of the following open source projects. For more information on this, and how to apply and follow the GNU AGPL, see . +## @signalapp/mock-server + + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for + software and other kinds of works, specifically designed to ensure + cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed + to take away your freedom to share and change the works. By contrast, + our General Public Licenses are intended to guarantee your freedom to + share and change all versions of a program--to make sure it remains free + software for all its users. + + When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that you + have the freedom to distribute copies of free software (and charge for + them if you wish), that you receive source code or can get it if you + want it, that you can change the software or use pieces of it in new + free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights + with two steps: (1) assert copyright on the software, and (2) offer + you this License which gives you legal permission to copy, distribute + and/or modify the software. + + A secondary benefit of defending all users' freedom is that + improvements made in alternate versions of the program, if they + receive widespread use, become available for other developers to + incorporate. Many developers of free software are heartened and + encouraged by the resulting cooperation. However, in the case of + software used on network servers, this result may fail to come about. + The GNU General Public License permits making a modified version and + letting the public access it on a server without ever releasing its + source code to the public. + + The GNU Affero General Public License is designed specifically to + ensure that, in such cases, the modified source code becomes available + to the community. It requires the operator of a network server to + provide the source code of the modified version running there to the + users of that server. Therefore, public use of a modified version, on + a publicly accessible server, gives the public access to the source + code of the modified version. + + An older license, called the Affero General Public License and + published by Affero, was designed to accomplish similar goals. This is + a different license, not a version of the Affero GPL, but Affero has + released a new version of the Affero GPL which permits relicensing under + this license. + + The precise terms and conditions for copying, distribution and + modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of + works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this + License. Each licensee is addressed as "you". "Licensees" and + "recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work + in a fashion requiring copyright permission, other than the making of an + exact copy. The resulting work is called a "modified version" of the + earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based + on the Program. + + To "propagate" a work means to do anything with it that, without + permission, would make you directly or secondarily liable for + infringement under applicable copyright law, except executing it on a + computer or modifying a private copy. Propagation includes copying, + distribution (with or without modification), making available to the + public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other + parties to make or receive copies. Mere interaction with a user through + a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" + to the extent that it includes a convenient and prominently visible + feature that (1) displays an appropriate copyright notice, and (2) + tells the user that there is no warranty for the work (except to the + extent that warranties are provided), that licensees may convey the + work under this License, and how to view a copy of this License. If + the interface presents a list of user commands or options, such as a + menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work + for making modifications to it. "Object code" means any non-source + form of a work. + + A "Standard Interface" means an interface that either is an official + standard defined by a recognized standards body, or, in the case of + interfaces specified for a particular programming language, one that + is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other + than the work as a whole, that (a) is included in the normal form of + packaging a Major Component, but which is not part of that Major + Component, and (b) serves only to enable use of the work with that + Major Component, or to implement a Standard Interface for which an + implementation is available to the public in source code form. A + "Major Component", in this context, means a major essential component + (kernel, window system, and so on) of the specific operating system + (if any) on which the executable work runs, or a compiler used to + produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all + the source code needed to generate, install, and (for an executable + work) run the object code and to modify the work, including scripts to + control those activities. However, it does not include the work's + System Libraries, or general-purpose tools or generally available free + programs which are used unmodified in performing those activities but + which are not part of the work. For example, Corresponding Source + includes interface definition files associated with source files for + the work, and the source code for shared libraries and dynamically + linked subprograms that the work is specifically designed to require, + such as by intimate data communication or control flow between those + subprograms and other parts of the work. + + The Corresponding Source need not include anything that users + can regenerate automatically from other parts of the Corresponding + Source. + + The Corresponding Source for a work in source code form is that + same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of + copyright on the Program, and are irrevocable provided the stated + conditions are met. This License explicitly affirms your unlimited + permission to run the unmodified Program. The output from running a + covered work is covered by this License only if the output, given its + content, constitutes a covered work. This License acknowledges your + rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not + convey, without conditions so long as your license otherwise remains + in force. You may convey covered works to others for the sole purpose + of having them make modifications exclusively for you, or provide you + with facilities for running those works, provided that you comply with + the terms of this License in conveying all material for which you do + not control copyright. Those thus making or running the covered works + for you must do so exclusively on your behalf, under your direction + and control, on terms that prohibit them from making any copies of + your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under + the conditions stated below. Sublicensing is not allowed; section 10 + makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological + measure under any applicable law fulfilling obligations under article + 11 of the WIPO copyright treaty adopted on 20 December 1996, or + similar laws prohibiting or restricting circumvention of such + measures. + + When you convey a covered work, you waive any legal power to forbid + circumvention of technological measures to the extent such circumvention + is effected by exercising rights under this License with respect to + the covered work, and you disclaim any intention to limit operation or + modification of the work as a means of enforcing, against the work's + users, your or third parties' legal rights to forbid circumvention of + technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you + receive it, in any medium, provided that you conspicuously and + appropriately publish on each copy an appropriate copyright notice; + keep intact all notices stating that this License and any + non-permissive terms added in accord with section 7 apply to the code; + keep intact all notices of the absence of any warranty; and give all + recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, + and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to + produce it from the Program, in the form of source code under the + terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent + works, which are not by their nature extensions of the covered work, + and which are not combined with it such as to form a larger program, + in or on a volume of a storage or distribution medium, is called an + "aggregate" if the compilation and its resulting copyright are not + used to limit the access or legal rights of the compilation's users + beyond what the individual works permit. Inclusion of a covered work + in an aggregate does not cause this License to apply to the other + parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms + of sections 4 and 5, provided that you also convey the + machine-readable Corresponding Source under the terms of this License, + in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded + from the Corresponding Source as a System Library, need not be + included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any + tangible personal property which is normally used for personal, family, + or household purposes, or (2) anything designed or sold for incorporation + into a dwelling. In determining whether a product is a consumer product, + doubtful cases shall be resolved in favor of coverage. For a particular + product received by a particular user, "normally used" refers to a + typical or common use of that class of product, regardless of the status + of the particular user or of the way in which the particular user + actually uses, or expects or is expected to use, the product. A product + is a consumer product regardless of whether the product has substantial + commercial, industrial or non-consumer uses, unless such uses represent + the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, + procedures, authorization keys, or other information required to install + and execute modified versions of a covered work in that User Product from + a modified version of its Corresponding Source. The information must + suffice to ensure that the continued functioning of the modified object + code is in no case prevented or interfered with solely because + modification has been made. + + If you convey an object code work under this section in, or with, or + specifically for use in, a User Product, and the conveying occurs as + part of a transaction in which the right of possession and use of the + User Product is transferred to the recipient in perpetuity or for a + fixed term (regardless of how the transaction is characterized), the + Corresponding Source conveyed under this section must be accompanied + by the Installation Information. But this requirement does not apply + if neither you nor any third party retains the ability to install + modified object code on the User Product (for example, the work has + been installed in ROM). + + The requirement to provide Installation Information does not include a + requirement to continue to provide support service, warranty, or updates + for a work that has been modified or installed by the recipient, or for + the User Product in which it has been modified or installed. Access to a + network may be denied when the modification itself materially and + adversely affects the operation of the network or violates the rules and + protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, + in accord with this section must be in a format that is publicly + documented (and with an implementation available to the public in + source code form), and must require no special password or key for + unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this + License by making exceptions from one or more of its conditions. + Additional permissions that are applicable to the entire Program shall + be treated as though they were included in this License, to the extent + that they are valid under applicable law. If additional permissions + apply only to part of the Program, that part may be used separately + under those permissions, but the entire Program remains governed by + this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option + remove any additional permissions from that copy, or from any part of + it. (Additional permissions may be written to require their own + removal in certain cases when you modify the work.) You may place + additional permissions on material, added by you to a covered work, + for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you + add to a covered work, you may (if authorized by the copyright holders of + that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further + restrictions" within the meaning of section 10. If the Program as you + received it, or any part of it, contains a notice stating that it is + governed by this License along with a term that is a further + restriction, you may remove that term. If a license document contains + a further restriction but permits relicensing or conveying under this + License, you may add to a covered work material governed by the terms + of that license document, provided that the further restriction does + not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you + must place, in the relevant source files, a statement of the + additional terms that apply to those files, or a notice indicating + where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the + form of a separately written license, or stated as exceptions; + the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly + provided under this License. Any attempt otherwise to propagate or + modify it is void, and will automatically terminate your rights under + this License (including any patent licenses granted under the third + paragraph of section 11). + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the copyright + holder fails to notify you of the violation by some reasonable means + prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from that + copyright holder, and you cure the violation prior to 30 days after + your receipt of the notice. + + Termination of your rights under this section does not terminate the + licenses of parties who have received copies or rights from you under + this License. If your rights have been terminated and not permanently + reinstated, you do not qualify to receive new licenses for the same + material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or + run a copy of the Program. Ancillary propagation of a covered work + occurring solely as a consequence of using peer-to-peer transmission + to receive a copy likewise does not require acceptance. However, + nothing other than this License grants you permission to propagate or + modify any covered work. These actions infringe copyright if you do + not accept this License. Therefore, by modifying or propagating a + covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically + receives a license from the original licensors, to run, modify and + propagate that work, subject to this License. You are not responsible + for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an + organization, or substantially all assets of one, or subdividing an + organization, or merging organizations. If propagation of a covered + work results from an entity transaction, each party to that + transaction who receives a copy of the work also receives whatever + licenses to the work the party's predecessor in interest had or could + give under the previous paragraph, plus a right to possession of the + Corresponding Source of the work from the predecessor in interest, if + the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the + rights granted or affirmed under this License. For example, you may + not impose a license fee, royalty, or other charge for exercise of + rights granted under this License, and you may not initiate litigation + (including a cross-claim or counterclaim in a lawsuit) alleging that + any patent claim is infringed by making, using, selling, offering for + sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this + License of the Program or a work on which the Program is based. The + work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims + owned or controlled by the contributor, whether already acquired or + hereafter acquired, that would be infringed by some manner, permitted + by this License, of making, using, or selling its contributor version, + but do not include claims that would be infringed only as a + consequence of further modification of the contributor version. For + purposes of this definition, "control" includes the right to grant + patent sublicenses in a manner consistent with the requirements of + this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free + patent license under the contributor's essential patent claims, to + make, use, sell, offer for sale, import and otherwise run, modify and + propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express + agreement or commitment, however denominated, not to enforce a patent + (such as an express permission to practice a patent or covenant not to + sue for patent infringement). To "grant" such a patent license to a + party means to make such an agreement or commitment not to enforce a + patent against the party. + + If you convey a covered work, knowingly relying on a patent license, + and the Corresponding Source of the work is not available for anyone + to copy, free of charge and under the terms of this License, through a + publicly available network server or other readily accessible means, + then you must either (1) cause the Corresponding Source to be so + available, or (2) arrange to deprive yourself of the benefit of the + patent license for this particular work, or (3) arrange, in a manner + consistent with the requirements of this License, to extend the patent + license to downstream recipients. "Knowingly relying" means you have + actual knowledge that, but for the patent license, your conveying the + covered work in a country, or your recipient's use of the covered work + in a country, would infringe one or more identifiable patents in that + country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or + arrangement, you convey, or propagate by procuring conveyance of, a + covered work, and grant a patent license to some of the parties + receiving the covered work authorizing them to use, propagate, modify + or convey a specific copy of the covered work, then the patent license + you grant is automatically extended to all recipients of the covered + work and works based on it. + + A patent license is "discriminatory" if it does not include within + the scope of its coverage, prohibits the exercise of, or is + conditioned on the non-exercise of one or more of the rights that are + specifically granted under this License. You may not convey a covered + work if you are a party to an arrangement with a third party that is + in the business of distributing software, under which you make payment + to the third party based on the extent of your activity of conveying + the work, and under which the third party grants, to any of the + parties who would receive the covered work from you, a discriminatory + patent license (a) in connection with copies of the covered work + conveyed by you (or copies made from those copies), or (b) primarily + for and in connection with specific products or compilations that + contain the covered work, unless you entered into that arrangement, + or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting + any implied license or other defenses to infringement that may + otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot convey a + covered work so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you may + not convey it at all. For example, if you agree to terms that obligate you + to collect a royalty for further conveying from those to whom you convey + the Program, the only way you could satisfy both those terms and this + License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the + Program, your modified version must prominently offer all users + interacting with it remotely through a computer network (if your version + supports such interaction) an opportunity to receive the Corresponding + Source of your version by providing access to the Corresponding Source + from a network server at no charge, through some standard or customary + means of facilitating copying of software. This Corresponding Source + shall include the Corresponding Source for any work covered by version 3 + of the GNU General Public License that is incorporated pursuant to the + following paragraph. + + Notwithstanding any other provision of this License, you have + permission to link or combine any covered work with a work licensed + under version 3 of the GNU General Public License into a single + combined work, and to convey the resulting work. The terms of this + License will continue to apply to the part which is the covered work, + but the work with which it is combined will remain governed by version + 3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of + the GNU Affero General Public License from time to time. Such new versions + will be similar in spirit to the present version, but may differ in detail to + address new problems or concerns. + + Each version is given a distinguishing version number. If the + Program specifies that a certain numbered version of the GNU Affero General + Public License "or any later version" applies to it, you have the + option of following the terms and conditions either of that numbered + version or of any later version published by the Free Software + Foundation. If the Program does not specify a version number of the + GNU Affero General Public License, you may choose any version ever published + by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future + versions of the GNU Affero General Public License can be used, that proxy's + public statement of acceptance of a version permanently authorizes you + to choose that version for the Program. + + Later license versions may give you additional or different + permissions. However, no additional obligations are imposed on any + author or copyright holder as a result of your choosing to follow a + later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY + APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY + OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM + IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF + ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS + THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY + GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE + USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD + PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), + EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF + SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided + above cannot be given local legal effect according to their terms, + reviewing courts shall apply local law that most closely approximates + an absolute waiver of all civil liability in connection with the + Program, unless a warranty or assumption of liability accompanies a + copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it + free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest + to attach them to the start of each source file to most effectively + state the exclusion of warranty; and each file should have at least + the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + + Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer + network, you should also make sure that it provides a way for users to + get its source. For example, if your program is a web application, its + interface could display a "Source" link that leads users to an archive + of the code. There are many ways you could offer source, and different + solutions will be better for different programs; see section 13 for the + specific requirements. + + You should also get your employer (if you work as a programmer) or school, + if any, to sign a "copyright disclaimer" for the program, if necessary. + For more information on this, and how to apply and follow the GNU AGPL, see + . + ## @signalapp/quill-cjs Copyright (c) 2017-2024, Slab @@ -3289,6 +4268,178 @@ Signal Desktop makes use of the following open source projects. For more information on this, and how to apply and follow the GNU AGPL, see . +## @storybook/addon-a11y + + License: MIT + +## @storybook/addon-actions + + License: MIT + +## @storybook/addon-controls + + License: MIT + +## @storybook/addon-interactions + + License: MIT + +## @storybook/addon-jest + + License: MIT + +## @storybook/addon-measure + + License: MIT + +## @storybook/addon-toolbars + + License: MIT + +## @storybook/addon-viewport + + License: MIT + +## @storybook/addon-webpack5-compiler-swc + + MIT License + + Copyright (c) 2023 Storybook contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## @storybook/csf + + MIT License + + Copyright (c) 2022 CSF contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## @storybook/preview-api + + License: MIT + +## @storybook/react + + License: MIT + +## @storybook/react-webpack5 + + License: MIT + +## @storybook/test + + License: MIT + +## @storybook/test-runner + + MIT License + + Copyright (c) 2022 Storybook contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## @storybook/types + + License: MIT + +## @tailwindcss/cli + + MIT License + + Copyright (c) Tailwind Labs, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## @tailwindcss/postcss + + MIT License + + Copyright (c) Tailwind Labs, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + ## @tanstack/react-virtual MIT License @@ -3313,6 +4464,174 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## @types/blueimp-load-image + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/chai + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/chai-as-promised + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/config + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/dashdash + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/debug + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/direction + + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + ## @types/dom-mediacapture-transform MIT License @@ -3361,6 +4680,822 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE +## @types/fs-extra + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/google-libphonenumber + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/humanize-duration + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/intl-tel-input + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/is-glob + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/js-yaml + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/json-to-ast + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/linkify-it + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/lodash + + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/memoizee + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/micromatch + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/mocha + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/node + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/node-fetch + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/normalize-path + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/parsecurrency + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/pify + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/pixelmatch + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/pngjs + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/react + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/react-dom + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/react-redux + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/react-virtualized + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/redux-logger + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/semver + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/sinon + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/split2 + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/uuid + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/write-file-atomic + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @types/yargs + + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +## @typescript-eslint/eslint-plugin + + MIT License + + Copyright (c) 2019 typescript-eslint and other contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## @typescript-eslint/parser + + MIT License + + Copyright (c) 2019 typescript-eslint and other contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## @typescript-eslint/rule-tester + + MIT License + + Copyright (c) 2023 typescript-eslint and other contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## @typescript-eslint/utils + + MIT License + + Copyright (c) 2019 typescript-eslint and other contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + ## @typescript/native-preview Apache License @@ -3419,6 +5554,451 @@ Signal Desktop makes use of the following open source projects. END OF TERMS AND CONDITIONS +## axe-core + + Mozilla Public License, version 2.0 + + 1. Definitions + + 1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + + 1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + + 1.3. "Contribution" + + means Covered Software of a particular Contributor. + + 1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + + 1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + + 1.6. "Executable Form" + + means any form of the work other than Source Code Form. + + 1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + + 1.8. "License" + + means this document. + + 1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + + 1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + + 1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + + 1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + + 1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + + 1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + + 2. License Grants and Conditions + + 2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + + 2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + + 2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + + 2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + + 2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + + 2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + + 2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + + 3. Responsibilities + + 3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + + 3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + + 3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + + 3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + + 3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + + 4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + + 5. Termination + + 5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + + 5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + + 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + + 6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + + 7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + + 8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + + 9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + + 10. Versions of the License + + 10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + + 10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + + 10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + + 10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + + Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + + If it is not possible or desirable to put the notice in a particular file, + then You may include the notice in a location (such as a LICENSE file in a + relevant directory) where a recipient would be likely to look for such a + notice. + + You may add additional accurate notices of copyright ownership. + + Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. + +## babel-core + + License: MIT + +## babel-loader + + Copyright (c) 2014-2019 Luís Couto + + MIT License + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## babel-plugin-lodash + + Copyright JS Foundation and other contributors + + This software consists of voluntary contributions made by many + individuals. For exact contribution history, see the revision history + available at https://github.com/lodash/lodash + + The following license applies to all parts of this software except as + documented below: + + ==== + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ==== + + Copyright and related rights for sample code are waived via CC0. Sample + code is defined as all source code displayed within the prose of the + documentation. + + CC0: http://creativecommons.org/publicdomain/zero/1.0/ + + ==== + + Files located in the node_modules and vendor directories are externally + maintained libraries used by this software which have their own + licenses; we recommend you read them, as their terms may differ from the + terms above. + +## better-blockmap + + License: MIT + ## blob-util Apache License @@ -3696,6 +6276,68 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## casual + + License: MIT + +## chai + + MIT License + + Copyright (c) 2017 Chai.js Assertion Library + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## chai-as-promised + + Copyright © 2012–2016 Domenic Denicola + + This work is free. You can redistribute it and/or modify it under the + terms of the Do What The Fuck You Want To Public License, Version 2, + as published by Sam Hocevar. See below for more details. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + +## chalk + + MIT License + + Copyright (c) Sindre Sorhus (sindresorhus.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## changedpi The MIT License (MIT) @@ -3720,6 +6362,30 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## chokidar-cli + + The MIT License (MIT) + + Copyright (c) 2015 Kimmo Brunfeldt + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + ## cirbuf MIT License @@ -3848,6 +6514,100 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## cross-env + + The MIT License (MIT) + Copyright (c) 2017 Kent C. Dodds + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## css-loader + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## csv-parse + + The MIT License (MIT) + + Copyright (c) 2010 Adaltas + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## danger + + MIT License + + Copyright (c) 2016-Present Orta Therox + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + ## dashdash # This is the MIT license @@ -3874,6 +6634,28 @@ Signal Desktop makes use of the following open source projects. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## debug + + (The MIT License) + + Copyright (c) 2014-2017 TJ Holowaychuk + Copyright (c) 2018-2021 Josh Junon + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the 'Software'), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## direction (The MIT License) @@ -3923,6 +6705,77 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## electron + + Copyright (c) Electron contributors + Copyright (c) 2013-2020 GitHub Inc. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## electron-builder + + The MIT License (MIT) + + Copyright (c) 2015 Loopline Systems + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## electron-mocha + + The MIT License (MIT) + + Copyright (c) 2016 JP Richardson + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## emoji-datasource The MIT License (MIT) @@ -4013,6 +6866,135 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## endanger + + MIT License + + Copyright (c) 2020 Jamie Kyle + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## enhanced-resolve + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## enquirer + + The MIT License (MIT) + + Copyright (c) 2016-present, Jon Schlinkert. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +## eslint + + Copyright OpenJS Foundation and other contributors, + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +## eslint-plugin-better-tailwindcss + + MIT License + + Copyright (c) 2023 Roger Schönbächler + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## execa + + MIT License + + Copyright (c) Sindre Sorhus (https://sindresorhus.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## fabric Copyright (c) 2008-2015 Printio (Juriy Zaytsev, Maxim Chernyak) @@ -4610,6 +7592,52 @@ Signal Desktop makes use of the following open source projects. License: ISC +## html-webpack-plugin + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## http-server + + Copyright (c) 2011-2022 Charlie Robbins, Marak Squires, Jade Michael Thornton and the Contributors. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## humanize-duration This is free and unencumbered software released into the public domain. @@ -4661,6 +7689,30 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## is-glob + + The MIT License (MIT) + + Copyright (c) 2014-2017, Jon Schlinkert. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ## js-yaml (The MIT License) @@ -4685,6 +7737,28 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## json-to-ast + + Copyright (C) 2016 by Vlad Trushin + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ## linkify-it Copyright (c) 2015 Vitaly Puzrin. @@ -4760,6 +7834,18 @@ Signal Desktop makes use of the following open source projects. licenses; we recommend you read them, as their terms may differ from the terms above. +## log-symbols + + MIT License + + Copyright (c) Sindre Sorhus (https://sindresorhus.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## lru-cache The ISC License @@ -4796,6 +7882,78 @@ Signal Desktop makes use of the following open source projects. OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +## micromatch + + The MIT License (MIT) + + Copyright (c) 2014-present, Jon Schlinkert. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +## mini-css-extract-plugin + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## mocha + + (The MIT License) + + Copyright (c) 2011-2024 OpenJS Foundation and contributors, https://openjsf.org + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## moment Copyright (c) JS Foundation and other contributors @@ -4896,6 +8054,57 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## node-gyp + + (The MIT License) + + Copyright (c) 2012 Nathan Rajlich + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + +## node-gyp-build + + The MIT License (MIT) + + Copyright (c) 2017 Mathias Buus + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ## nop Copyright (c) 2012 Ian Hansen (//github.com/supershabam) @@ -4930,6 +8139,92 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## npm-run-all + + The MIT License (MIT) + + Copyright (c) 2015 Toru Nagashima + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## oxlint + + MIT License + + Copyright (c) 2024-present VoidZero Inc. & Contributors + Copyright (c) 2023 Boshen + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## oxlint-tsgolint + + MIT License + + Copyright (c) 2025 July-present VoidZero Inc. & Contributors + Copyright (c) 2025 July typescript-eslint and other contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## p-limit + + MIT License + + Copyright (c) Sindre Sorhus (https://sindresorhus.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## p-map MIT License @@ -4970,6 +8265,30 @@ Signal Desktop makes use of the following open source projects. License: MIT +## pe-library + + MIT License + + Copyright (c) 2018 jet + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + ## pify MIT License @@ -5006,6 +8325,332 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## pixelmatch + + ISC License + + Copyright (c) 2019, Mapbox + + Permission to use, copy, modify, and/or distribute this software for any purpose + with or without fee is hereby granted, provided that the above copyright notice + and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + THIS SOFTWARE. + +## playwright + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Portions Copyright (c) Microsoft Corporation. + Portions Copyright 2017 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +## pngjs + + pngjs original work Copyright (c) 2015 Luke Page & Original Contributors + pngjs derived work Copyright (c) 2012 Kuba Niegowski + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +## postcss + + The MIT License (MIT) + + Copyright 2013 Andrey Sitnik + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## postcss-loader + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## prettier + + Copyright © James Long and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## prettier-plugin-tailwindcss + + MIT License + + Copyright (c) Tailwind Labs Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + ## proxy-agent (The MIT License) @@ -5495,6 +9140,14 @@ Signal Desktop makes use of the following open source projects. License: MIT +## react-devtools + + License: MIT + +## react-devtools-core + + License: MIT + ## react-dom MIT License @@ -5763,6 +9416,1810 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## resolve-url-loader + + The MIT License (MIT) + + Copyright (c) 2016 Ben Holloway + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## rolldown + + MIT License + + Copyright (c) 2024-present VoidZero Inc. & Contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + end of terms and conditions + + The licenses of externally maintained libraries from which parts of the Software is derived are listed [here](https://github.com/rolldown/rolldown/blob/main/THIRD-PARTY-LICENSE). + +## sass + + Dart Sass license: + + Copyright (c) 2016, Google Inc. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + -------------------------------------------------------------------------------- + + Dart SDK license: + + Copyright 2012, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + _fe_analyzer_shared license: + + Copyright 2019, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + _macros and macros license: + + Copyright 2024, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + analyzer, protobuf and protoc_plugin license: + + Copyright 2013, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + archive license: + + The MIT License + + Copyright (c) 2013-2021 Brendan Duncan. + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + -------------------------------------------------------------------------------- + + args, csslib and logging license: + + Copyright 2013, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + async, cli_util, collection, mime, stream_channel and typed_data license: + + Copyright 2015, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + boolean_selector, meta and shelf_packages_handler license: + + Copyright 2016, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + charcode license: + + Copyright 2014, the Dart project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + checked_yaml license: + + Copyright 2019, the Dart project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + cli_pkg license: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + -------------------------------------------------------------------------------- + + cli_repl license: + + Copyright (c) 2018, Jennifer Thakar. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the project nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + convert, crypto, shelf_static, source_map_stack_trace and vm_service license: + + Copyright 2015, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + coverage, dart_style, dartdoc, glob, http, http_parser, matcher, path, pool, + pub_semver, source_span, string_scanner, test and watcher license: + + Copyright 2014, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + dart_mappable and type_plus license: + + MIT License + + Copyright (c) 2021 Kilian Schulte + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + -------------------------------------------------------------------------------- + + ffi and package_config license: + + Copyright 2019, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + file license: + + Copyright 2017, the Dart project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + -------------------------------------------------------------------------------- + + fixnum, http_multi_server, oauth2, shelf, shelf_web_socket, source_maps and + stack_trace license: + + Copyright 2014, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + frontend_server_client license: + + Copyright 2020, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + grinder and webkit_inspection_protocol license: + + Copyright 2013, Google Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + html license: + + Copyright (c) 2006-2012 The Authors + + Contributors: + James Graham - jg307@cam.ac.uk + Anne van Kesteren - annevankesteren@gmail.com + Lachlan Hunt - lachlan.hunt@lachy.id.au + Matt McDonald - kanashii@kanashii.ca + Sam Ruby - rubys@intertwingly.net + Ian Hickson (Google) - ian@hixie.ch + Thomas Broyer - t.broyer@ltgt.net + Jacques Distler - distler@golem.ph.utexas.edu + Henri Sivonen - hsivonen@iki.fi + Adam Barth - abarth@webkit.org + Eric Seidel - eric@webkit.org + The Mozilla Foundation (contributions from Henri Sivonen since 2008) + David Flanagan (Mozilla) - dflanagan@mozilla.com + Google LLC (contributed the Dart port) - misc@dartlang.org + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + -------------------------------------------------------------------------------- + + io, stream_transform and term_glyph license: + + Copyright 2017, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + js license: + + Copyright 2012, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + json_annotation license: + + Copyright 2017, the Dart project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + lints license: + + Copyright 2021, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + markdown license: + + Copyright 2012, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + native_stack_traces license: + + Copyright 2020, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + native_synchronization license: + + Copyright 2023, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + node_interop license: + + Copyright (c) 2017, Anatoly Pulyaevskiy. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + node_preamble license: + + The MIT License (MIT) + + Copyright (c) 2015 Michael Bullington + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + === + + Copyright 2012, the Dart project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + petitparser and xml license: + + The MIT License + + Copyright (c) 2006-2023 Lukas Renggli. + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + -------------------------------------------------------------------------------- + + pub_api_client license: + + MIT License + + Copyright (c) 2020 Leo Farias + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + -------------------------------------------------------------------------------- + + pubspec license: + + Copyright (c) 2015, Anders Holmgren. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + pubspec_parse license: + + Copyright 2018, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + quiver and retry license: + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + -------------------------------------------------------------------------------- + + test_api and test_core license: + + Copyright 2018, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + test_descriptor and web_socket_channel license: + + Copyright 2016, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + test_process license: + + Copyright 2017, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + uri license: + + Copyright 2013, the Dart project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + web license: + + Copyright 2023, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + web_socket license: + + Copyright 2024, the Dart project authors. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + -------------------------------------------------------------------------------- + + yaml license: + + Copyright (c) 2014, the Dart project authors. + Copyright (c) 2006, Kirill Simonov. + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do + so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## sass-loader + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## semver The ISC License @@ -5781,6 +11238,36 @@ Signal Desktop makes use of the following open source projects. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +## sinon + + (The BSD License) + + Copyright (c) 2010-2017, Christian Johansen, christian@cjohansen.no + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of Christian Johansen nor the names of his contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ## split2 Copyright (c) 2014-2018, Matteo Collina @@ -5797,6 +11284,320 @@ Signal Desktop makes use of the following open source projects. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +## storybook + + License: MIT + +## style-loader + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## stylelint + + The MIT License (MIT) + + Copyright (c) 2015 - present Maxime Thirouin, David Clark & Richard Hallows + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## stylelint-config-css-modules + + License: Unlicense + +## stylelint-config-recommended-scss + + The MIT License (MIT) + + Copyright (c) 2016 Krister Kari + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## stylelint-use-logical-spec + + # CC0 1.0 Universal + + ## Statement of Purpose + + The laws of most jurisdictions throughout the world automatically confer + exclusive Copyright and Related Rights (defined below) upon the creator and + subsequent owner(s) (each and all, an “owner”) of an original work of + authorship and/or a database (each, a “Work”). + + Certain owners wish to permanently relinquish those rights to a Work for the + purpose of contributing to a commons of creative, cultural and scientific works + (“Commons”) that the public can reliably and without fear of later claims of + infringement build upon, modify, incorporate in other works, reuse and + redistribute as freely as possible in any form whatsoever and for any purposes, + including without limitation commercial purposes. These owners may contribute + to the Commons to promote the ideal of a free culture and the further + production of creative, cultural and scientific works, or to gain reputation or + greater distribution for their Work in part through the use and efforts of + others. + + For these and/or other purposes and motivations, and without any expectation of + additional consideration or compensation, the person associating CC0 with a + Work (the “Affirmer”), to the extent that he or she is an owner of Copyright + and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and + publicly distribute the Work under its terms, with knowledge of his or her + Copyright and Related Rights in the Work and the meaning and intended legal + effect of CC0 on those rights. + + 1. Copyright and Related Rights. A Work made available under CC0 may be + protected by copyright and related or neighboring rights (“Copyright and + Related Rights”). Copyright and Related Rights include, but are not limited + to, the following: + 1. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + 2. moral rights retained by the original author(s) and/or performer(s); + 3. publicity and privacy rights pertaining to a person’s image or likeness + depicted in a Work; + 4. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(i), below; + 5. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + 6. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + 7. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations + thereof. + + 2. Waiver. To the greatest extent permitted by, but not in contravention of, + applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and + unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright + and Related Rights and associated claims and causes of action, whether now + known or unknown (including existing as well as future claims and causes of + action), in the Work (i) in all territories worldwide, (ii) for the maximum + duration provided by applicable law or treaty (including future time + extensions), (iii) in any current or future medium and for any number of + copies, and (iv) for any purpose whatsoever, including without limitation + commercial, advertising or promotional purposes (the “Waiver”). Affirmer + makes the Waiver for the benefit of each member of the public at large and + to the detriment of Affirmer’s heirs and successors, fully intending that + such Waiver shall not be subject to revocation, rescission, cancellation, + termination, or any other legal or equitable action to disrupt the quiet + enjoyment of the Work by the public as contemplated by Affirmer’s express + Statement of Purpose. + + 3. Public License Fallback. Should any part of the Waiver for any reason be + judged legally invalid or ineffective under applicable law, then the Waiver + shall be preserved to the maximum extent permitted taking into account + Affirmer’s express Statement of Purpose. In addition, to the extent the + Waiver is so judged Affirmer hereby grants to each affected person a + royalty-free, non transferable, non sublicensable, non exclusive, + irrevocable and unconditional license to exercise Affirmer’s Copyright and + Related Rights in the Work (i) in all territories worldwide, (ii) for the + maximum duration provided by applicable law or treaty (including future time + extensions), (iii) in any current or future medium and for any number of + copies, and (iv) for any purpose whatsoever, including without limitation + commercial, advertising or promotional purposes (the “License”). The License + shall be deemed effective as of the date CC0 was applied by Affirmer to the + Work. Should any part of the License for any reason be judged legally + invalid or ineffective under applicable law, such partial invalidity or + ineffectiveness shall not invalidate the remainder of the License, and in + such case Affirmer hereby affirms that he or she will not (i) exercise any + of his or her remaining Copyright and Related Rights in the Work or (ii) + assert any associated claims and causes of action with respect to the Work, + in either case contrary to Affirmer’s express Statement of Purpose. + + 4. Limitations and Disclaimers. + 1. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + 2. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or + otherwise, including without limitation warranties of title, + merchantability, fitness for a particular purpose, non infringement, or + the absence of latent or other defects, accuracy, or the present or + absence of errors, whether or not discoverable, all to the greatest + extent permissible under applicable law. + 3. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person’s Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the Work. + 4. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + + For more information, please see + http://creativecommons.org/publicdomain/zero/1.0/. + +## svgo + + MIT License + + Copyright (c) Kir Belevich + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## synckit + + MIT License + + Copyright (c) 2021 UnTS + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## tailwindcss + + MIT License + + Copyright (c) Tailwind Labs, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +## terser + + Copyright 2012-2018 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +## terser-webpack-plugin + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## tinykeys MIT License @@ -5821,10 +11622,92 @@ Signal Desktop makes use of the following open source projects. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## tsx + + MIT License + + Copyright (c) Hiroki Osame + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + ## type-fest License: (MIT OR CC0-1.0) +## typescript + + Apache License + + Version 2.0, January 2004 + + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + You must give any other recipients of the Work or Derivative Works a copy of this License; and + + You must cause any modified files to carry prominent notices stating that You changed the files; and + + You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + ## url The MIT License (MIT) @@ -5883,6 +11766,87 @@ Signal Desktop makes use of the following open source projects. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## wait-on + + The MIT License (MIT) + + Copyright (c) 2015 Jeff Barczewski + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## webpack + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## webpack-cli + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## webpack-dev-server + + Copyright JS Foundation and other contributors + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + 'Software'), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ## write-file-atomic Copyright (c) 2015, Rebecca Turner diff --git a/about.html b/about.html index 6b8e354d41..9c5bb2bd50 100644 --- a/about.html +++ b/about.html @@ -20,6 +20,6 @@
- + diff --git a/app/EmojiService.main.ts b/app/EmojiService.main.ts index 98a2377337..3f3c02ef4c 100644 --- a/app/EmojiService.main.ts +++ b/app/EmojiService.main.ts @@ -7,11 +7,11 @@ import * as z from 'zod'; import { protocol } from 'electron'; import { LRUCache } from 'lru-cache'; -import type { OptionalResourceService } from './OptionalResourceService.main.js'; -import { SignalService as Proto } from '../ts/protobuf/index.std.js'; -import { parseUnknown } from '../ts/util/schemas.std.js'; -import { utf16ToEmoji } from '../ts/util/utf16ToEmoji.node.js'; -import { getAppRootDir } from '../ts/util/appRootDir.main.js'; +import type { OptionalResourceService } from './OptionalResourceService.main.ts'; +import { SignalService as Proto } from '../ts/protobuf/index.std.ts'; +import { parseUnknown } from '../ts/util/schemas.std.ts'; +import { utf16ToEmoji } from '../ts/util/utf16ToEmoji.node.ts'; +import { getAppRootDir } from '../ts/util/appRootDir.main.ts'; const MANIFEST_PATH = join(getAppRootDir(), 'build', 'jumbomoji.json'); diff --git a/app/OptionalResourceService.main.ts b/app/OptionalResourceService.main.ts index d8cce850ee..79cfcd71cd 100644 --- a/app/OptionalResourceService.main.ts +++ b/app/OptionalResourceService.main.ts @@ -12,13 +12,13 @@ import PQueue from 'p-queue'; import type { OptionalResourceType, OptionalResourcesDictType, -} from '../ts/types/OptionalResource.std.js'; -import { OptionalResourcesDictSchema } from '../ts/types/OptionalResource.std.js'; -import { createLogger } from '../ts/logging/log.std.js'; -import { getGotOptions } from '../ts/updater/got.main.js'; -import { drop } from '../ts/util/drop.std.js'; -import { parseUnknown } from '../ts/util/schemas.std.js'; -import { getAppRootDir } from '../ts/util/appRootDir.main.js'; +} from '../ts/types/OptionalResource.std.ts'; +import { OptionalResourcesDictSchema } from '../ts/types/OptionalResource.std.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; +import { getGotOptions } from '../ts/updater/got.main.ts'; +import { drop } from '../ts/util/drop.std.ts'; +import { parseUnknown } from '../ts/util/schemas.std.ts'; +import { getAppRootDir } from '../ts/util/appRootDir.main.ts'; const log = createLogger('OptionalResourceService'); diff --git a/app/PreventDisplaySleepService.std.ts b/app/PreventDisplaySleepService.std.ts index d4b07e4ac7..05d2698b97 100644 --- a/app/PreventDisplaySleepService.std.ts +++ b/app/PreventDisplaySleepService.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { PowerSaveBlocker } from 'electron'; -import { createLogger } from '../ts/logging/log.std.js'; +import { createLogger } from '../ts/logging/log.std.ts'; const log = createLogger('PreventDisplaySleepService'); diff --git a/app/SystemTrayService.main.ts b/app/SystemTrayService.main.ts index b290b8dea7..79f811cc59 100644 --- a/app/SystemTrayService.main.ts +++ b/app/SystemTrayService.main.ts @@ -6,9 +6,9 @@ import { Menu, Tray, app, nativeImage, nativeTheme, screen } from 'electron'; import os from 'node:os'; import { join } from 'node:path'; import { readFileSync } from 'node:fs'; -import { createLogger } from '../ts/logging/log.std.js'; -import type { LocalizerType } from '../ts/types/I18N.std.js'; -import { getAppRootDir } from '../ts/util/appRootDir.main.js'; +import { createLogger } from '../ts/logging/log.std.ts'; +import type { LocalizerType } from '../ts/types/I18N.std.ts'; +import { getAppRootDir } from '../ts/util/appRootDir.main.ts'; const log = createLogger('SystemTrayService'); diff --git a/app/SystemTraySettingCache.node.ts b/app/SystemTraySettingCache.node.ts index 6d37625a2a..915fa22721 100644 --- a/app/SystemTraySettingCache.node.ts +++ b/app/SystemTraySettingCache.node.ts @@ -1,14 +1,14 @@ // Copyright 2017 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../ts/logging/log.std.js'; -import OS from '../ts/util/os/osMain.node.js'; +import { createLogger } from '../ts/logging/log.std.ts'; +import OS from '../ts/util/os/osMain.node.ts'; import { parseSystemTraySetting, SystemTraySetting, -} from '../ts/types/SystemTraySetting.std.js'; -import { isSystemTraySupported } from '../ts/types/Settings.std.js'; -import type { ConfigType } from './base_config.node.js'; +} from '../ts/types/SystemTraySetting.std.ts'; +import { isSystemTraySupported } from '../ts/types/Settings.std.ts'; +import type { ConfigType } from './base_config.node.ts'; const log = createLogger('SystemTraySettingCache'); diff --git a/app/WindowsNotifications.main.ts b/app/WindowsNotifications.main.ts index cc4bc825c4..c582877e93 100644 --- a/app/WindowsNotifications.main.ts +++ b/app/WindowsNotifications.main.ts @@ -3,77 +3,53 @@ import { ipcMain as ipc } from 'electron'; import type { IpcMainInvokeEvent } from 'electron'; -import { join } from 'node:path'; -import { Worker } from 'node:worker_threads'; -import { AUMID } from './startup_config.main.js'; -import type { - WindowsNotificationWorkerDataType, - WindowsNotificationRequestType, - WindowsNotificationData, -} from '../ts/types/notifications.std.js'; -import { WindowsNotificationDataSchema } from '../ts/types/notifications.std.js'; -import OS from '../ts/util/os/osMain.node.js'; -import { createLogger } from '../ts/logging/log.std.js'; -import { getAppRootDir } from '../ts/util/appRootDir.main.js'; +import { + Notifier, + sendDummyKeystroke, +} from '@indutny/simple-windows-notifications'; + +import { createLogger } from '../ts/logging/log.std.ts'; +import { AUMID } from './startup_config.main.ts'; +import type { WindowsNotificationData } from '../ts/services/notifications.preload.ts'; +import OS from '../ts/util/os/osMain.node.ts'; +import { renderWindowsToast } from './renderWindowsToast.std.tsx'; + +export { sendDummyKeystroke }; const log = createLogger('WindowsNotifications'); -let worker: Worker | undefined; - if (OS.isWindows()) { - const scriptPath = join( - getAppRootDir(), - 'app', - 'WindowsNotificationsWorker.node.js' + const notifier = new Notifier(AUMID); + + const NOTIFICATION_ID = { + group: 'group', + tag: 'tag', + }; + + ipc.handle( + 'windows-notifications:show', + (_event: IpcMainInvokeEvent, data: WindowsNotificationData) => { + try { + // First, clear all previous notifications - we want just one + // notification at a time + notifier.remove(NOTIFICATION_ID); + notifier.show(renderWindowsToast(data), NOTIFICATION_ID); + } catch (error) { + log.error( + `Windows Notifications: Failed to show notification: ${error.stack}` + ); + } + } ); - worker = new Worker(scriptPath, { - workerData: { - AUMID, - } satisfies WindowsNotificationWorkerDataType, + ipc.handle('windows-notifications:clear-all', () => { + try { + notifier.remove(NOTIFICATION_ID); + } catch (error) { + log.error( + `Windows Notifications: Failed to clear notifications: ${error.stack}` + ); + } }); } - -export function sendDummyKeystroke(): void { - if (worker == null) { - log.warn('sendDummyKeystroke without worker'); - return; - } - worker.postMessage({ - command: 'sendDummyKeystroke', - } satisfies WindowsNotificationRequestType); -} - -export function show(notificationData: WindowsNotificationData): void { - if (worker == null) { - log.warn('show without worker'); - return; - } - worker.postMessage({ - command: 'show', - notificationData, - } satisfies WindowsNotificationRequestType); -} - -ipc.handle( - 'windows-notifications:show', - (_event: IpcMainInvokeEvent, data: unknown) => { - try { - const notificationData = WindowsNotificationDataSchema.parse(data); - show(notificationData); - } catch (error) { - log.error('failed to parse notification data', error.stack); - } - } -); - -ipc.handle('windows-notifications:clear-all', () => { - if (worker == null) { - log.warn('clear all without worker'); - return; - } - worker.postMessage({ - command: 'clearAll', - } satisfies WindowsNotificationRequestType); -}); diff --git a/app/WindowsNotificationsWorker.node.ts b/app/WindowsNotificationsWorker.node.ts deleted file mode 100644 index f3840bf8e5..0000000000 --- a/app/WindowsNotificationsWorker.node.ts +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2025 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -import { parentPort, workerData } from 'node:worker_threads'; - -import { - Notifier, - sendDummyKeystroke, -} from '@indutny/simple-windows-notifications'; - -import { createLogger } from '../ts/logging/log.std.js'; -import { - WindowsNotificationWorkerDataSchema, - WindowsNotificationRequestSchema, -} from '../ts/types/notifications.std.js'; -import OS from '../ts/util/os/osMain.node.js'; -import { missingCaseError } from '../ts/util/missingCaseError.std.js'; -import { renderWindowsToast } from './renderWindowsToast.std.js'; - -if (!parentPort) { - throw new Error('Must run as a worker thread'); -} - -if (!OS.isWindows()) { - throw new Error('Runs only on Windows'); -} - -const port = parentPort; - -const log = createLogger('WindowsNotificationsWorker'); - -const { AUMID } = WindowsNotificationWorkerDataSchema.parse(workerData); -const notifier = new Notifier(AUMID); - -const NOTIFICATION_ID = { - group: 'group', - tag: 'tag', -}; - -port.on('message', (message: unknown) => { - const request = WindowsNotificationRequestSchema.parse(message); - - if (request.command === 'show') { - try { - // First, clear all previous notifications - we want just one - // notification at a time - notifier.remove(NOTIFICATION_ID); - notifier.show( - renderWindowsToast(request.notificationData), - NOTIFICATION_ID - ); - } catch (error) { - log.error( - `Windows Notifications: Failed to show notification: ${error.stack}` - ); - } - return; - } - - if (request.command === 'clearAll') { - try { - notifier.remove(NOTIFICATION_ID); - } catch (error) { - log.error( - `Windows Notifications: Failed to clear notifications: ${error.stack}` - ); - } - return; - } - - if (request.command === 'sendDummyKeystroke') { - try { - sendDummyKeystroke(); - } catch (error) { - log.error( - `Windows Notifications: Failed to send dummy keystroke: ${error.stack}` - ); - } - return; - } - - throw missingCaseError(request); -}); diff --git a/app/attachment_channel.main.ts b/app/attachment_channel.main.ts index dd6fe68d01..24f584ec44 100644 --- a/app/attachment_channel.main.ts +++ b/app/attachment_channel.main.ts @@ -26,30 +26,30 @@ import { type DecryptAttachmentToSinkOptionsType, decryptAttachmentV2ToSink, type IntegrityCheckType, -} from '../ts/AttachmentCrypto.node.js'; -import * as Bytes from '../ts/Bytes.std.js'; -import type { MessageAttachmentsCursorType } from '../ts/sql/Interface.std.js'; -import type { MainSQL } from '../ts/sql/main.main.js'; +} from '../ts/AttachmentCrypto.node.ts'; +import * as Bytes from '../ts/Bytes.std.ts'; +import type { MessageAttachmentsCursorType } from '../ts/sql/Interface.std.ts'; +import type { MainSQL } from '../ts/sql/main.main.ts'; import { APPLICATION_OCTET_STREAM, MIMETypeToString, stringToMIMEType, -} from '../ts/types/MIME.std.js'; -import * as Errors from '../ts/types/errors.std.js'; +} from '../ts/types/MIME.std.ts'; +import * as Errors from '../ts/types/errors.std.ts'; import { isImageTypeSupported, isVideoTypeSupported, -} from '../ts/util/GoogleChrome.std.js'; -import { strictAssert } from '../ts/util/assert.std.js'; -import { drop } from '../ts/util/drop.std.js'; -import { SECOND } from '../ts/util/durations/index.std.js'; -import { isPathInside } from '../ts/util/isPathInside.node.js'; -import { missingCaseError } from '../ts/util/missingCaseError.std.js'; -import { safeParseInteger } from '../ts/util/numbers.std.js'; -import { parseLoose } from '../ts/util/schemas.std.js'; -import { sleep } from '../ts/util/sleep.std.js'; -import { toWebStream } from '../ts/util/toWebStream.node.js'; -import { createLogger } from '../ts/logging/log.std.js'; +} from '../ts/util/GoogleChrome.std.ts'; +import { strictAssert } from '../ts/util/assert.std.ts'; +import { drop } from '../ts/util/drop.std.ts'; +import { SECOND } from '../ts/util/durations/index.std.ts'; +import { isPathInside } from '../ts/util/isPathInside.node.ts'; +import { missingCaseError } from '../ts/util/missingCaseError.std.ts'; +import { safeParseInteger } from '../ts/util/numbers.std.ts'; +import { parseLoose } from '../ts/util/schemas.std.ts'; +import { sleep } from '../ts/util/sleep.std.ts'; +import { toWebStream } from '../ts/util/toWebStream.node.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; import { deleteAllAttachments, deleteAllBadges, @@ -68,8 +68,8 @@ import { getAttachmentsPath, getStickersPath, getTempPath, -} from './attachments.node.js'; -import { isValidDigest, isValidPlaintextHash } from '../ts/types/Crypto.std.js'; +} from './attachments.node.ts'; +import { isValidDigest, isValidPlaintextHash } from '../ts/types/Crypto.std.ts'; const { isNumber } = lodash; diff --git a/app/attachments.node.ts b/app/attachments.node.ts index 8ea0e742d5..30a0308450 100644 --- a/app/attachments.node.ts +++ b/app/attachments.node.ts @@ -9,18 +9,18 @@ import fastGlob from 'fast-glob'; import fse from 'fs-extra'; import lodash from 'lodash'; import normalizePath from 'normalize-path'; -import { isPathInside } from '../ts/util/isPathInside.node.js'; -import { DAY } from '../ts/util/durations/index.std.js'; -import { isOlderThan } from '../ts/util/timestamp.std.js'; -import { isNotNil } from '../ts/util/isNotNil.std.js'; +import { isPathInside } from '../ts/util/isPathInside.node.ts'; +import { DAY } from '../ts/util/durations/index.std.ts'; +import { isOlderThan } from '../ts/util/timestamp.std.ts'; +import { isNotNil } from '../ts/util/isNotNil.std.ts'; import { generateKeys, decryptAttachmentV2ToSink, encryptAttachmentV2ToDisk, -} from '../ts/AttachmentCrypto.node.js'; -import type { LocalAttachmentV2Type } from '../ts/types/Attachment.std.js'; -import * as Errors from '../ts/types/errors.std.js'; -import { createLogger } from '../ts/logging/log.std.js'; +} from '../ts/AttachmentCrypto.node.ts'; +import type { LocalAttachmentV2Type } from '../ts/types/Attachment.std.ts'; +import * as Errors from '../ts/types/errors.std.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; const { map, isString } = lodash; diff --git a/app/base_config.node.ts b/app/base_config.node.ts index 32db817e0f..64224623d0 100644 --- a/app/base_config.node.ts +++ b/app/base_config.node.ts @@ -6,8 +6,8 @@ import { sync as writeFileSync } from 'write-file-atomic'; import lodash from 'lodash'; import lodashFp from 'lodash/fp.js'; -import { strictAssert } from '../ts/util/assert.std.js'; -import { createLogger } from '../ts/logging/log.std.js'; +import { strictAssert } from '../ts/util/assert.std.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; const { set } = lodashFp; diff --git a/app/config.main.ts b/app/config.main.ts index a01d8a3d21..b3f99e709a 100644 --- a/app/config.main.ts +++ b/app/config.main.ts @@ -11,9 +11,9 @@ import { getEnvironment, setEnvironment, parseEnvironment, -} from '../ts/environment.std.js'; -import { createLogger } from '../ts/logging/log.std.js'; -import { getAppRootDir } from '../ts/util/appRootDir.main.js'; +} from '../ts/environment.std.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; +import { getAppRootDir } from '../ts/util/appRootDir.main.ts'; const log = createLogger('config'); diff --git a/app/crashReports.main.ts b/app/crashReports.main.ts index 194b086b69..c8ce9c6d44 100644 --- a/app/crashReports.main.ts +++ b/app/crashReports.main.ts @@ -7,12 +7,12 @@ import { basename, join } from 'node:path'; import { toJSONString as dumpToJSONString } from '@signalapp/libsignal-client/dist/Minidump.js'; import z from 'zod'; -import type { LoggerType } from '../ts/types/Logging.std.js'; -import * as Errors from '../ts/types/errors.std.js'; -import { isProduction } from '../ts/util/version.std.js'; -import { isNotNil } from '../ts/util/isNotNil.std.js'; -import OS from '../ts/util/os/osMain.node.js'; -import { parseUnknown } from '../ts/util/schemas.std.js'; +import type { LoggerType } from '../ts/types/Logging.std.ts'; +import * as Errors from '../ts/types/errors.std.ts'; +import { isProduction } from '../ts/util/version.std.ts'; +import { isNotNil } from '../ts/util/isNotNil.std.ts'; +import OS from '../ts/util/os/osMain.node.ts'; +import { parseUnknown } from '../ts/util/schemas.std.ts'; const { realpath, readdir, readFile, unlink, stat } = fsExtra; diff --git a/app/dns-fallback.main.ts b/app/dns-fallback.main.ts index 7c512b627b..740052182f 100644 --- a/app/dns-fallback.main.ts +++ b/app/dns-fallback.main.ts @@ -3,11 +3,11 @@ import { join } from 'node:path'; import { readFile } from 'node:fs/promises'; -import { DNSFallbackSchema } from '../ts/types/DNSFallback.std.js'; -import type { DNSFallbackType } from '../ts/types/DNSFallback.std.js'; -import { parseUnknown } from '../ts/util/schemas.std.js'; -import { getAppRootDir } from '../ts/util/appRootDir.main.js'; -import { createLogger } from '../ts/logging/log.std.js'; +import { DNSFallbackSchema } from '../ts/types/DNSFallback.std.ts'; +import type { DNSFallbackType } from '../ts/types/DNSFallback.std.ts'; +import { parseUnknown } from '../ts/util/schemas.std.ts'; +import { getAppRootDir } from '../ts/util/appRootDir.main.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; const log = createLogger('dns-fallback'); diff --git a/app/ephemeral_config.main.ts b/app/ephemeral_config.main.ts index 07d70b78ae..a3e840839a 100644 --- a/app/ephemeral_config.main.ts +++ b/app/ephemeral_config.main.ts @@ -5,7 +5,7 @@ import { join } from 'node:path'; import { app } from 'electron'; -import { start } from './base_config.node.js'; +import { start } from './base_config.node.ts'; const userDataPath = app.getPath('userData'); const targetPath = join(userDataPath, 'ephemeral.json'); diff --git a/app/global_errors.main.ts b/app/global_errors.main.ts index 5e4f020768..ac272ae5d6 100644 --- a/app/global_errors.main.ts +++ b/app/global_errors.main.ts @@ -4,11 +4,11 @@ import { app, dialog, clipboard } from 'electron'; import os from 'node:os'; -import * as Errors from '../ts/types/errors.std.js'; -import { redactAll } from '../ts/util/privacy.node.js'; -import { createLogger } from '../ts/logging/log.std.js'; -import { reallyJsonStringify } from '../ts/util/reallyJsonStringify.std.js'; -import type { LocaleType } from './locale.node.js'; +import * as Errors from '../ts/types/errors.std.ts'; +import { redactAll } from '../ts/util/privacy.node.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; +import { reallyJsonStringify } from '../ts/util/reallyJsonStringify.std.ts'; +import type { LocaleType } from './locale.node.ts'; const log = createLogger('global_errors'); diff --git a/app/locale.node.ts b/app/locale.node.ts index 061eb7c87f..833f5e5f08 100644 --- a/app/locale.node.ts +++ b/app/locale.node.ts @@ -5,15 +5,15 @@ import { join } from 'node:path'; import { readFileSync } from 'node:fs'; import lodash from 'lodash'; import * as LocaleMatcher from '@formatjs/intl-localematcher'; -import { setupI18n } from '../ts/util/setupI18nMain.std.js'; -import { shouldNeverBeCalled } from '../ts/util/shouldNeverBeCalled.std.js'; +import { setupI18n } from '../ts/util/setupI18nMain.std.ts'; +import { shouldNeverBeCalled } from '../ts/util/shouldNeverBeCalled.std.ts'; -import type { LoggerType } from '../ts/types/Logging.std.js'; +import type { LoggerType } from '../ts/types/Logging.std.ts'; import type { HourCyclePreference, LocaleMessagesType, -} from '../ts/types/I18N.std.js'; -import type { LocalizerType } from '../ts/types/Util.std.js'; +} from '../ts/types/I18N.std.ts'; +import type { LocalizerType } from '../ts/types/Util.std.ts'; const { merge } = lodash; diff --git a/app/main.main.ts b/app/main.main.ts index 9d31c04672..f32ba6b320 100644 --- a/app/main.main.ts +++ b/app/main.main.ts @@ -32,113 +32,109 @@ import { import type { MenuItemConstructorOptions, Settings } from 'electron'; import { z } from 'zod'; -import { packageJson } from '../ts/util/packageJson.main.js'; -import * as GlobalErrors from './global_errors.main.js'; -import { setup as setupCrashReports } from './crashReports.main.js'; -import { setup as setupSpellChecker } from './spell_check.main.js'; -import { getDNSFallback } from './dns-fallback.main.js'; -import { redactAll, addSensitivePath } from './privacy.main.js'; -import { createSupportUrl } from '../ts/util/createSupportUrl.std.js'; -import { missingCaseError } from '../ts/util/missingCaseError.std.js'; -import { strictAssert } from '../ts/util/assert.std.js'; -import { drop } from '../ts/util/drop.std.js'; -import type { ThemeSettingType } from '../ts/util/theme.std.js'; -import { ThemeType } from '../ts/types/Util.std.js'; -import { NotificationType } from '../ts/types/notifications.std.js'; -import * as Errors from '../ts/types/errors.std.js'; -import { resolveCanonicalLocales } from '../ts/util/resolveCanonicalLocales.std.js'; -import { createLogger } from '../ts/logging/log.std.js'; -import * as debugLog from '../ts/logging/debuglogs.node.js'; -import * as uploadDebugLog from '../ts/logging/uploadDebugLog.node.js'; -import { explodePromise } from '../ts/util/explodePromise.std.js'; +import { packageJson } from '../ts/util/packageJson.main.ts'; +import * as GlobalErrors from './global_errors.main.ts'; +import { setup as setupCrashReports } from './crashReports.main.ts'; +import { setup as setupSpellChecker } from './spell_check.main.ts'; +import { getDNSFallback } from './dns-fallback.main.ts'; +import { redactAll, addSensitivePath } from './privacy.main.ts'; +import { createSupportUrl } from '../ts/util/createSupportUrl.std.ts'; +import { missingCaseError } from '../ts/util/missingCaseError.std.ts'; +import { strictAssert } from '../ts/util/assert.std.ts'; +import { drop } from '../ts/util/drop.std.ts'; +import type { ThemeSettingType } from '../ts/util/theme.std.ts'; +import { ThemeType } from '../ts/types/Util.std.ts'; +import * as Errors from '../ts/types/errors.std.ts'; +import { resolveCanonicalLocales } from '../ts/util/resolveCanonicalLocales.std.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; +import * as debugLog from '../ts/logging/debuglogs.node.ts'; +import * as uploadDebugLog from '../ts/logging/uploadDebugLog.node.ts'; +import { explodePromise } from '../ts/util/explodePromise.std.ts'; -import './startup_config.main.js'; +import './startup_config.main.ts'; -import type { RendererConfigType } from '../ts/types/RendererConfig.std.js'; +import type { RendererConfigType } from '../ts/types/RendererConfig.std.ts'; import { directoryConfigSchema, rendererConfigSchema, -} from '../ts/types/RendererConfig.std.js'; -import config from './config.main.js'; +} from '../ts/types/RendererConfig.std.ts'; +import config from './config.main.ts'; import { Environment, getEnvironment, isTestEnvironment, -} from '../ts/environment.std.js'; +} from '../ts/environment.std.ts'; // Very important to put before the single instance check, since it is based on the // userData directory. (see requestSingleInstanceLock below) -import * as userConfig from './user_config.main.js'; +import * as userConfig from './user_config.main.ts'; // We generally want to pull in our own modules after this point, after the user // data directory has been set. -import * as attachments from './attachments.node.js'; -import * as attachmentChannel from './attachment_channel.main.js'; -import * as bounce from '../ts/services/bounce.main.js'; -import * as updater from '../ts/updater/index.main.js'; -import { updateDefaultSession } from './updateDefaultSession.main.js'; -import { PreventDisplaySleepService } from './PreventDisplaySleepService.std.js'; +import * as attachments from './attachments.node.ts'; +import * as attachmentChannel from './attachment_channel.main.ts'; +import * as bounce from '../ts/services/bounce.main.ts'; +import * as updater from '../ts/updater/index.main.ts'; +import { updateDefaultSession } from './updateDefaultSession.main.ts'; +import { PreventDisplaySleepService } from './PreventDisplaySleepService.std.ts'; import { SystemTrayService, focusAndForceToTop, -} from './SystemTrayService.main.js'; -import { SystemTraySettingCache } from './SystemTraySettingCache.node.js'; -import { OptionalResourceService } from './OptionalResourceService.main.js'; -import { EmojiService } from './EmojiService.main.js'; +} from './SystemTrayService.main.ts'; +import { SystemTraySettingCache } from './SystemTraySettingCache.node.ts'; +import { OptionalResourceService } from './OptionalResourceService.main.ts'; +import { EmojiService } from './EmojiService.main.ts'; import { SystemTraySetting, shouldMinimizeToSystemTray, parseSystemTraySetting, -} from '../ts/types/SystemTraySetting.std.js'; +} from '../ts/types/SystemTraySetting.std.ts'; import { getDefaultSystemTraySetting, isSystemTraySupported, isContentProtectionEnabledByDefault, -} from '../ts/types/Settings.std.js'; -import * as ephemeralConfig from './ephemeral_config.main.js'; -import * as mainProcessLogging from '../ts/logging/main_process_logging.main.js'; -import { MainSQL } from '../ts/sql/main.main.js'; -import * as sqlChannels from './sql_channel.main.js'; -import * as windowState from './window_state.std.js'; -import type { CreateTemplateOptionsType } from './menu.std.js'; -import { createTemplate } from './menu.std.js'; +} from '../ts/types/Settings.std.ts'; +import * as ephemeralConfig from './ephemeral_config.main.ts'; +import * as mainProcessLogging from '../ts/logging/main_process_logging.main.ts'; +import { MainSQL } from '../ts/sql/main.main.ts'; +import * as sqlChannels from './sql_channel.main.ts'; +import * as windowState from './window_state.std.ts'; +import type { CreateTemplateOptionsType } from './menu.std.ts'; +import { createTemplate } from './menu.std.ts'; import { installFileHandler, installWebHandler, -} from './protocol_filter.node.js'; -import OS from '../ts/util/os/osMain.node.js'; -import { isNightly, isProduction } from '../ts/util/version.std.js'; -import { clearTimeoutIfNecessary } from '../ts/util/clearTimeoutIfNecessary.std.js'; -import { toggleMaximizedBrowserWindow } from '../ts/util/toggleMaximizedBrowserWindow.std.js'; -import { ChallengeMainHandler } from '../ts/main/challengeMain.main.js'; -import { NativeThemeNotifier } from '../ts/main/NativeThemeNotifier.main.js'; -import { PowerChannel } from '../ts/main/powerChannel.main.js'; -import { SettingsChannel } from '../ts/main/settingsChannel.main.js'; -import { maybeParseUrl, setUrlSearchParams } from '../ts/util/url.std.js'; -import { getHeicConverter } from '../ts/workers/heicConverterMain.main.js'; +} from './protocol_filter.node.ts'; +import OS from '../ts/util/os/osMain.node.ts'; +import { isNightly, isProduction } from '../ts/util/version.std.ts'; +import { clearTimeoutIfNecessary } from '../ts/util/clearTimeoutIfNecessary.std.ts'; +import { toggleMaximizedBrowserWindow } from '../ts/util/toggleMaximizedBrowserWindow.std.ts'; +import { ChallengeMainHandler } from '../ts/main/challengeMain.main.ts'; +import { NativeThemeNotifier } from '../ts/main/NativeThemeNotifier.main.ts'; +import { PowerChannel } from '../ts/main/powerChannel.main.ts'; +import { SettingsChannel } from '../ts/main/settingsChannel.main.ts'; +import { maybeParseUrl, setUrlSearchParams } from '../ts/util/url.std.ts'; +import { getHeicConverter } from '../ts/workers/heicConverterMain.main.ts'; -import type { LocaleDirection, LocaleType } from './locale.node.js'; -import { load as loadLocale } from './locale.node.js'; +import type { LocaleDirection, LocaleType } from './locale.node.ts'; +import { load as loadLocale } from './locale.node.ts'; -import { HourCyclePreference } from '../ts/types/I18N.std.js'; -import { ScreenShareStatus } from '../ts/types/Calling.std.js'; -import type { ParsedSignalRoute } from '../ts/util/signalRoutes.std.js'; -import { parseSignalRoute } from '../ts/util/signalRoutes.std.js'; -import * as dns from '../ts/util/dns.node.js'; -import { ZoomFactorService } from '../ts/services/ZoomFactorService.main.js'; -import { SafeStorageBackendChangeError } from '../ts/types/SafeStorageBackendChangeError.std.js'; -import { SafeStorageDecryptionError } from '../ts/types/SafeStorageDecryptionError.std.js'; -import { LINUX_PASSWORD_STORE_FLAGS } from '../ts/util/linuxPasswordStoreFlags.std.js'; -import { getOwn } from '../ts/util/getOwn.std.js'; -import { safeParseLoose, safeParseUnknown } from '../ts/util/schemas.std.js'; -import { getAppErrorIcon } from '../ts/util/getAppErrorIcon.node.js'; -import { promptOSAuth } from '../ts/util/os/promptOSAuthMain.main.js'; -import { appRelaunch } from '../ts/util/relaunch.main.js'; -import { getAppRootDir } from '../ts/util/appRootDir.main.js'; -import { - sendDummyKeystroke, - show as showWindowsNotification, -} from './WindowsNotifications.main.js'; +import { HourCyclePreference } from '../ts/types/I18N.std.ts'; +import { ScreenShareStatus } from '../ts/types/Calling.std.ts'; +import type { ParsedSignalRoute } from '../ts/util/signalRoutes.std.ts'; +import { parseSignalRoute } from '../ts/util/signalRoutes.std.ts'; +import * as dns from '../ts/util/dns.node.ts'; +import { ZoomFactorService } from '../ts/services/ZoomFactorService.main.ts'; +import { SafeStorageBackendChangeError } from '../ts/types/SafeStorageBackendChangeError.std.ts'; +import { SafeStorageDecryptionError } from '../ts/types/SafeStorageDecryptionError.std.ts'; +import { LINUX_PASSWORD_STORE_FLAGS } from '../ts/util/linuxPasswordStoreFlags.std.ts'; +import { getOwn } from '../ts/util/getOwn.std.ts'; +import { safeParseLoose, safeParseUnknown } from '../ts/util/schemas.std.ts'; +import { getAppErrorIcon } from '../ts/util/getAppErrorIcon.node.ts'; +import { promptOSAuth } from '../ts/util/os/promptOSAuthMain.main.ts'; +import { appRelaunch } from '../ts/util/relaunch.main.ts'; +import { getAppRootDir } from '../ts/util/appRootDir.main.ts'; +import { sendDummyKeystroke } from './WindowsNotifications.main.ts'; const { chmod, realpath, writeFile } = fsExtra; const { get, pick, isNumber, isBoolean, some, debounce, noop } = lodash; @@ -180,7 +176,6 @@ const development = getEnvironment() === Environment.Staging; const ciMode = config.get<'full' | 'benchmark' | false>('ciMode'); -const forcePreloadBundle = config.get('forcePreloadBundle'); const localeDirectionTestingOverride = config.has( 'localeDirectionTestingOverride' ) @@ -678,9 +673,6 @@ async function safeLoadURL(window: BrowserWindow, url: string): Promise { } async function createWindow() { - const usePreloadBundle = - !isTestEnvironment(getEnvironment()) || forcePreloadBundle; - const primaryDisplay = screen.getPrimaryDisplay(); const { width: maxWidth, height: maxHeight } = primaryDisplay.workAreaSize; const width = windowConfig @@ -720,12 +712,9 @@ async function createWindow() { nodeIntegrationInWorker: false, sandbox: false, contextIsolation: !isTestEnvironment(getEnvironment()), - preload: join( - rootDir, - ...(usePreloadBundle - ? ['preload.wrapper.js'] - : ['ts', 'windows', 'main', 'preload.preload.js']) - ), + preload: isTestEnvironment(getEnvironment()) + ? join(rootDir, 'ts', 'windows', 'main', 'tsx.preload.js') + : join(rootDir, 'bundles', 'preload', 'wrapper.js'), spellcheck, }, icon: windowIcon, @@ -932,43 +921,27 @@ async function createWindow() { !windowState.shouldQuit() && (usingTrayIcon || OS.isMacOS()) ) { - if (!usingTrayIcon) { - return; - } + if (usingTrayIcon) { + const shownTrayNotice = ephemeralConfig.get('shown-tray-notice'); + if (shownTrayNotice) { + log.info('close: not showing tray notice'); + return; + } - const shownTrayNotice = ephemeralConfig.get('shown-tray-notice'); - if (shownTrayNotice) { - log.info('close: not showing tray notice'); - return; - } + ephemeralConfig.set('shown-tray-notice', true); + log.info('close: showing tray notice'); - ephemeralConfig.set('shown-tray-notice', true); - log.info('close: showing tray notice'); - - if (OS.isWindows()) { - showWindowsNotification({ - type: NotificationType.MinimizedToTray, - token: 'unused', - heading: getResolvedMessagesLocale().i18n( + const n = new Notification({ + title: getResolvedMessagesLocale().i18n( 'icu:minimizeToTrayNotification--title' ), body: getResolvedMessagesLocale().i18n( 'icu:minimizeToTrayNotification--body' ), }); - return; + + n.show(); } - - const n = new Notification({ - title: getResolvedMessagesLocale().i18n( - 'icu:minimizeToTrayNotification--title' - ), - body: getResolvedMessagesLocale().i18n( - 'icu:minimizeToTrayNotification--body' - ), - }); - - n.show(); return; } @@ -1303,7 +1276,7 @@ async function showScreenShareWindow(sourceName: string | undefined) { nodeIntegrationInWorker: false, sandbox: true, contextIsolation: true, - preload: join(rootDir, 'bundles', 'screenShare', 'preload.preload.js'), + preload: join(rootDir, 'bundles', 'preload', 'screenShare.js'), }, x: Math.floor(display.size.width / 2) - width / 2, y: 24, @@ -1351,7 +1324,7 @@ async function showAbout() { nodeIntegrationInWorker: false, sandbox: true, contextIsolation: true, - preload: join(rootDir, 'bundles', 'about', 'preload.preload.js'), + preload: join(rootDir, 'bundles', 'preload', 'about.js'), nativeWindowOpen: true, }, }; @@ -1453,7 +1426,7 @@ async function showDebugLogWindow(options: DebugLogWindowOptions = {}) { nodeIntegrationInWorker: false, sandbox: true, contextIsolation: true, - preload: join(rootDir, 'bundles', 'debuglog', 'preload.preload.js'), + preload: join(rootDir, 'bundles', 'preload', 'debuglog.js'), }, parent: mainWindow, }; @@ -1523,7 +1496,7 @@ async function showCallDiagnosticWindow() { nodeIntegrationInWorker: false, sandbox: true, contextIsolation: true, - preload: join(rootDir, 'bundles', 'calldiagnostic', 'preload.preload.js'), + preload: join(rootDir, 'bundles', 'preload', 'calldiagnostic.js'), }, parent: mainWindow, }; @@ -1582,7 +1555,7 @@ function showPermissionsPopupWindow(forCalling: boolean, forCamera: boolean) { nodeIntegrationInWorker: false, sandbox: true, contextIsolation: true, - preload: join(rootDir, 'bundles', 'permissions', 'preload.preload.js'), + preload: join(rootDir, 'bundles', 'preload', 'permissions.js'), nativeWindowOpen: true, }, parent: mainWindow, @@ -2290,7 +2263,7 @@ app.on('ready', async () => { nodeIntegration: false, sandbox: true, contextIsolation: true, - preload: join(rootDir, 'bundles', 'loading', 'preload.preload.js'), + preload: join(rootDir, 'bundles', 'preload', 'loading.js'), }, icon: windowIcon, }); @@ -3410,13 +3383,7 @@ async function showStickerCreatorWindow() { nodeIntegrationInWorker: false, sandbox: true, contextIsolation: true, - preload: join( - rootDir, - 'ts', - 'windows', - 'sticker-creator', - 'preload.preload.js' - ), + preload: join(rootDir, 'bundles', 'sticker-creator', 'preload.js'), nativeWindowOpen: true, }, }; diff --git a/app/menu.std.ts b/app/menu.std.ts index b854d59915..a8eb0ad120 100644 --- a/app/menu.std.ts +++ b/app/menu.std.ts @@ -3,13 +3,13 @@ import lodash from 'lodash'; -import type { LocalizerType } from '../ts/types/I18N.std.js'; +import type { LocalizerType } from '../ts/types/I18N.std.ts'; import type { MenuListType, MenuOptionsType, MenuActionsType, -} from '../ts/types/menu.std.js'; -import { strictAssert } from '../ts/util/assert.std.js'; +} from '../ts/types/menu.std.ts'; +import { strictAssert } from '../ts/util/assert.std.ts'; const { isString } = lodash; diff --git a/app/permissions.std.ts b/app/permissions.std.ts index af5831204f..6a8569c0da 100644 --- a/app/permissions.std.ts +++ b/app/permissions.std.ts @@ -6,8 +6,8 @@ import type { session as ElectronSession, Session } from 'electron'; -import type { ConfigType } from './base_config.node.js'; -import { createLogger } from '../ts/logging/log.std.js'; +import type { ConfigType } from './base_config.node.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; const log = createLogger('permissions'); diff --git a/app/privacy.main.ts b/app/privacy.main.ts index 479f13b024..c326bb649d 100644 --- a/app/privacy.main.ts +++ b/app/privacy.main.ts @@ -1,8 +1,8 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { redactAll, addSensitivePath } from '../ts/util/privacy.node.js'; -import { getAppRootDir } from '../ts/util/appRootDir.main.js'; +import { redactAll, addSensitivePath } from '../ts/util/privacy.node.ts'; +import { getAppRootDir } from '../ts/util/appRootDir.main.ts'; addSensitivePath(getAppRootDir()); diff --git a/app/protocol_filter.node.ts b/app/protocol_filter.node.ts index 9bcf6bd4a3..a84bae520e 100644 --- a/app/protocol_filter.node.ts +++ b/app/protocol_filter.node.ts @@ -14,8 +14,8 @@ import { getStickersPath, getTempPath, getUpdateCachePath, -} from './attachments.node.js'; -import { createLogger } from '../ts/logging/log.std.js'; +} from './attachments.node.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; const log = createLogger('protocol_filter'); diff --git a/app/renderWindowsToast.std.tsx b/app/renderWindowsToast.std.tsx index ae3383beb9..9089f658e1 100644 --- a/app/renderWindowsToast.std.tsx +++ b/app/renderWindowsToast.std.tsx @@ -4,17 +4,16 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; -import { - type WindowsNotificationData, - NotificationType, -} from '../ts/types/notifications.std.js'; -import { missingCaseError } from '../ts/util/missingCaseError.std.js'; +import type { WindowsNotificationData } from '../ts/services/notifications.preload.ts'; + +import { NotificationType } from '../ts/types/notifications.std.ts'; +import { missingCaseError } from '../ts/util/missingCaseError.std.ts'; import { cancelPresentingRoute, showConversationRoute, showWindowRoute, startCallLobbyRoute, -} from '../ts/util/signalRoutes.std.js'; +} from '../ts/util/signalRoutes.std.ts'; function pathToUri(path: string) { return `file:///${encodeURI(path.replace(/\\/g, '/'))}`; @@ -79,8 +78,6 @@ export function renderWindowsToast({ launch = showWindowRoute.toAppUrl({}); } else if (type === NotificationType.IsPresenting) { launch = cancelPresentingRoute.toAppUrl({}); - } else if (type === NotificationType.MinimizedToTray) { - launch = showWindowRoute.toAppUrl({}); } else { throw missingCaseError(type); } diff --git a/app/spell_check.main.ts b/app/spell_check.main.ts index c939e35e9e..eb17a257ec 100644 --- a/app/spell_check.main.ts +++ b/app/spell_check.main.ts @@ -5,14 +5,14 @@ import type { BrowserWindow } from 'electron'; import { Menu, clipboard, nativeImage } from 'electron'; import * as LocaleMatcher from '@formatjs/intl-localematcher'; -import { maybeParseUrl } from '../ts/util/url.std.js'; +import { maybeParseUrl } from '../ts/util/url.std.ts'; -import type { MenuListType } from '../ts/types/menu.std.js'; -import type { LocalizerType } from '../ts/types/Util.std.js'; -import { strictAssert } from '../ts/util/assert.std.js'; -import type { LoggerType } from '../ts/types/Logging.std.js'; -import { createLogger } from '../ts/logging/log.std.js'; -import { handleAttachmentRequest } from './attachment_channel.main.js'; +import type { MenuListType } from '../ts/types/menu.std.ts'; +import type { LocalizerType } from '../ts/types/Util.std.ts'; +import { strictAssert } from '../ts/util/assert.std.ts'; +import type { LoggerType } from '../ts/types/Logging.std.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; +import { handleAttachmentRequest } from './attachment_channel.main.ts'; const log = createLogger('spell_check'); diff --git a/app/sql_channel.main.ts b/app/sql_channel.main.ts index 44ed7bf4f0..0775ea6746 100644 --- a/app/sql_channel.main.ts +++ b/app/sql_channel.main.ts @@ -3,9 +3,9 @@ import { ipcMain } from 'electron'; -import type { MainSQL } from '../ts/sql/main.main.js'; -import { remove as removeUserConfig } from './user_config.main.js'; -import { remove as removeEphemeralConfig } from './ephemeral_config.main.js'; +import type { MainSQL } from '../ts/sql/main.main.ts'; +import { remove as removeUserConfig } from './user_config.main.ts'; +import { remove as removeEphemeralConfig } from './ephemeral_config.main.ts'; let sql: | Pick< diff --git a/app/startup_config.main.ts b/app/startup_config.main.ts index c01bd6d6b3..9bfb58eb4e 100644 --- a/app/startup_config.main.ts +++ b/app/startup_config.main.ts @@ -3,9 +3,9 @@ import { app } from 'electron'; -import { packageJson } from '../ts/util/packageJson.main.js'; -import { createLogger } from '../ts/logging/log.std.js'; -import * as GlobalErrors from './global_errors.main.js'; +import { packageJson } from '../ts/util/packageJson.main.ts'; +import { createLogger } from '../ts/logging/log.std.ts'; +import * as GlobalErrors from './global_errors.main.ts'; const log = createLogger('startup_config'); diff --git a/app/updateDefaultSession.main.ts b/app/updateDefaultSession.main.ts index c0980f6d76..00a6524dce 100644 --- a/app/updateDefaultSession.main.ts +++ b/app/updateDefaultSession.main.ts @@ -5,10 +5,10 @@ import type { Session, DesktopCapturerSource, IpcMainEvent } from 'electron'; import { desktopCapturer, ipcMain, systemPreferences } from 'electron'; import { v4 as generateUuid } from 'uuid'; -import OS from '../ts/util/os/osMain.node.js'; -import type { LoggerType } from '../ts/types/Logging.std.js'; -import { strictAssert } from '../ts/util/assert.std.js'; -import type { IpcResponseType } from '../ts/util/desktopCapturer.preload.js'; +import OS from '../ts/util/os/osMain.node.ts'; +import type { LoggerType } from '../ts/types/Logging.std.ts'; +import { strictAssert } from '../ts/util/assert.std.ts'; +import type { IpcResponseType } from '../ts/util/desktopCapturer.preload.ts'; const SPELL_CHECKER_DICTIONARY_DOWNLOAD_URL = `https://updates.signal.org/desktop/hunspell_dictionaries/${process.versions.electron}/`; diff --git a/app/user_config.main.ts b/app/user_config.main.ts index 070a9c95ae..0cbab49e6f 100644 --- a/app/user_config.main.ts +++ b/app/user_config.main.ts @@ -5,10 +5,10 @@ import { join } from 'node:path'; import { mkdirSync } from 'node:fs'; import { app } from 'electron'; -import { start } from './base_config.node.js'; -import config from './config.main.js'; -import * as Errors from '../ts/types/errors.std.js'; -import OS from '../ts/util/os/osMain.node.js'; +import { start } from './base_config.node.ts'; +import config from './config.main.ts'; +import * as Errors from '../ts/types/errors.std.ts'; +import OS from '../ts/util/os/osMain.node.ts'; let userData: string | undefined; // Use separate data directory for benchmarks & development diff --git a/background.html b/background.html index deddd89e6b..90442ef412 100644 --- a/background.html +++ b/background.html @@ -96,11 +96,7 @@ as="image" crossorigin /> - + diff --git a/build/intl-linter/linter.node.ts b/build/intl-linter/linter.node.ts index dc77674f11..f3de15d366 100644 --- a/build/intl-linter/linter.node.ts +++ b/build/intl-linter/linter.node.ts @@ -11,17 +11,17 @@ import { readFile } from 'node:fs/promises'; import { join as pathJoin, relative as pathRelative } from 'node:path'; import chalk from 'chalk'; import { deepEqual } from 'node:assert'; -import type { Rule } from './utils/rule.std.js'; +import type { Rule } from './utils/rule.std.ts'; -import icuPrefix from './rules/icuPrefix.std.js'; -import wrapEmoji from './rules/wrapEmoji.std.js'; -import onePlural from './rules/onePlural.std.js'; -import noLegacyVariables from './rules/noLegacyVariables.std.js'; -import noNestedChoice from './rules/noNestedChoice.std.js'; -import noOffset from './rules/noOffset.std.js'; -import noOneChoice from './rules/noOneChoice.std.js'; -import noOrdinal from './rules/noOrdinal.std.js'; -import pluralPound from './rules/pluralPound.std.js'; +import icuPrefix from './rules/icuPrefix.std.ts'; +import wrapEmoji from './rules/wrapEmoji.std.ts'; +import onePlural from './rules/onePlural.std.ts'; +import noLegacyVariables from './rules/noLegacyVariables.std.ts'; +import noNestedChoice from './rules/noNestedChoice.std.ts'; +import noOffset from './rules/noOffset.std.ts'; +import noOneChoice from './rules/noOneChoice.std.ts'; +import noOrdinal from './rules/noOrdinal.std.ts'; +import pluralPound from './rules/pluralPound.std.ts'; const RULES = [ icuPrefix, diff --git a/build/intl-linter/rules/icuPrefix.std.ts b/build/intl-linter/rules/icuPrefix.std.ts index acacec0b80..74d0217c58 100644 --- a/build/intl-linter/rules/icuPrefix.std.ts +++ b/build/intl-linter/rules/icuPrefix.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { rule } from '../utils/rule.std.js'; +import { rule } from '../utils/rule.std.ts'; export default rule('icuPrefix', context => { if (!context.messageId.startsWith('icu:')) { diff --git a/build/intl-linter/rules/noLegacyVariables.std.ts b/build/intl-linter/rules/noLegacyVariables.std.ts index 11b879e27c..e316469caf 100644 --- a/build/intl-linter/rules/noLegacyVariables.std.ts +++ b/build/intl-linter/rules/noLegacyVariables.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { rule } from '../utils/rule.std.js'; +import { rule } from '../utils/rule.std.ts'; export default rule('noLegacyVariables', context => { return { diff --git a/build/intl-linter/rules/noNestedChoice.std.ts b/build/intl-linter/rules/noNestedChoice.std.ts index 1cb54ef4b6..49db235dbe 100644 --- a/build/intl-linter/rules/noNestedChoice.std.ts +++ b/build/intl-linter/rules/noNestedChoice.std.ts @@ -1,8 +1,8 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { Element } from '../utils/rule.std.js'; -import { rule } from '../utils/rule.std.js'; +import type { Element } from '../utils/rule.std.ts'; +import { rule } from '../utils/rule.std.ts'; export default rule('noNestedChoice', context => { let insideChoice = false; diff --git a/build/intl-linter/rules/noOffset.std.ts b/build/intl-linter/rules/noOffset.std.ts index 40c77fd4d0..1a9d364cfb 100644 --- a/build/intl-linter/rules/noOffset.std.ts +++ b/build/intl-linter/rules/noOffset.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { rule } from '../utils/rule.std.js'; +import { rule } from '../utils/rule.std.ts'; export default rule('noOffset', context => { return { diff --git a/build/intl-linter/rules/noOneChoice.std.ts b/build/intl-linter/rules/noOneChoice.std.ts index 545adc4f80..b855d53c90 100644 --- a/build/intl-linter/rules/noOneChoice.std.ts +++ b/build/intl-linter/rules/noOneChoice.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { rule } from '../utils/rule.std.js'; +import { rule } from '../utils/rule.std.ts'; export default rule('noOneChoice', context => { return { diff --git a/build/intl-linter/rules/noOrdinal.std.ts b/build/intl-linter/rules/noOrdinal.std.ts index f906b2a081..56462d49d3 100644 --- a/build/intl-linter/rules/noOrdinal.std.ts +++ b/build/intl-linter/rules/noOrdinal.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { rule } from '../utils/rule.std.js'; +import { rule } from '../utils/rule.std.ts'; export default rule('noOrdinal', context => { return { diff --git a/build/intl-linter/rules/onePlural.std.ts b/build/intl-linter/rules/onePlural.std.ts index 51c62a3073..9171c462a3 100644 --- a/build/intl-linter/rules/onePlural.std.ts +++ b/build/intl-linter/rules/onePlural.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { rule } from '../utils/rule.std.js'; +import { rule } from '../utils/rule.std.ts'; export default rule('onePlural', context => { let plurals = 0; diff --git a/build/intl-linter/rules/pluralPound.std.ts b/build/intl-linter/rules/pluralPound.std.ts index 06a6e8a2fc..badbb5c19f 100644 --- a/build/intl-linter/rules/pluralPound.std.ts +++ b/build/intl-linter/rules/pluralPound.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { PluralElement } from '@formatjs/icu-messageformat-parser'; -import { rule } from '../utils/rule.std.js'; +import { rule } from '../utils/rule.std.ts'; export default rule('pluralPound', context => { const stack: Array = []; diff --git a/build/intl-linter/rules/wrapEmoji.std.ts b/build/intl-linter/rules/wrapEmoji.std.ts index 328edb7875..d74cc55557 100644 --- a/build/intl-linter/rules/wrapEmoji.std.ts +++ b/build/intl-linter/rules/wrapEmoji.std.ts @@ -10,7 +10,7 @@ import { isTagElement, isLiteralElement, } from '@formatjs/icu-messageformat-parser'; -import { rule } from '../utils/rule.std.js'; +import { rule } from '../utils/rule.std.ts'; function isEmojifyTag( element: MessageFormatElement | null diff --git a/build/intl-linter/utils/rule.std.ts b/build/intl-linter/utils/rule.std.ts index 33661b65cb..9975520172 100644 --- a/build/intl-linter/utils/rule.std.ts +++ b/build/intl-linter/utils/rule.std.ts @@ -5,8 +5,8 @@ import type { MessageFormatElement, Location, } from '@formatjs/icu-messageformat-parser'; -import type { Visitor } from './traverse.std.js'; -import { traverse } from './traverse.std.js'; +import type { Visitor } from './traverse.std.ts'; +import { traverse } from './traverse.std.ts'; export type Element = MessageFormatElement; export type { Location }; diff --git a/call_diagnostic.html b/call_diagnostic.html index fa9b2da47b..ec9b80b57c 100644 --- a/call_diagnostic.html +++ b/call_diagnostic.html @@ -20,6 +20,6 @@
- + diff --git a/ci.js b/ci.js index e6cf641f2e..2d4fc0fd7f 100644 --- a/ci.js +++ b/ci.js @@ -3,8 +3,8 @@ const CI_CONFIG = JSON.parse(process.env.SIGNAL_CI_CONFIG || ''); -const config = require('./app/config.main.js').default; +const config = require('./bundles/config.js').default; config.util.extendDeep(config, CI_CONFIG); -require('./app/main.main.js'); +require('./bundles/main.js'); diff --git a/codemods/rolldown/01-rename-imports.js b/codemods/rolldown/01-rename-imports.js new file mode 100644 index 0000000000..2c9d7a42a7 --- /dev/null +++ b/codemods/rolldown/01-rename-imports.js @@ -0,0 +1,46 @@ +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only +import { existsSync } from 'node:fs'; +import { join, dirname } from 'node:path'; + +export default function transform() { + function ImportOrExport({ node }, { filename }) { + if ( + !node.source || + !node.source.value.startsWith('.') || + !node.source.value.endsWith('.js') || + // js file with .d.ts file + node.source.value.endsWith('/StorybookThemeContext.std.js') || + // protobuf + node.source.value.endsWith('/compiled.std.js') + ) { + return; + } + + const ts = node.source.value.replace(/\.js$/, '.ts'); + const tsx = node.source.value.replace(/\.js$/, '.tsx'); + const dts = node.source.value.replace(/\.js$/, '.d.ts'); + const dir = dirname(filename); + + if (existsSync(join(dir, ts))) { + // oxlint-disable-next-line no-param-reassign + node.source.value = ts; + } else if (existsSync(join(dir, tsx))) { + // oxlint-disable-next-line no-param-reassign + node.source.value = tsx; + } else if (existsSync(join(dir, dts))) { + // oxlint-disable-next-line no-param-reassign + node.source.value = dts; + } else { + throw new Error(`File not found: ${join(dir, node.source.value)}`); + } + } + + return { + visitor: { + ImportDeclaration: ImportOrExport, + ExportAllDeclaration: ImportOrExport, + ExportNamedDeclaration: ImportOrExport, + }, + }; +} diff --git a/components/mp3lameencoder/lib/Mp3LameEncoder.js b/components/mp3lameencoder/lib/Mp3LameEncoder.js index 572ec8628d..60be18fadc 100644 --- a/components/mp3lameencoder/lib/Mp3LameEncoder.js +++ b/components/mp3lameencoder/lib/Mp3LameEncoder.js @@ -69,10 +69,6 @@ if (ENVIRONMENT_IS_NODE) { Module['readBinary'] = function readBinary(filename) { return Module['read'](filename, true) }; - Module['load'] = function load(f) { - globalEval(read(f)); - }; - if (!Module['thisProgram']) { if (process['argv'].length > 1) { Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); @@ -164,14 +160,6 @@ else { throw 'Unknown runtime environment. Where are we?'; } -function globalEval(x) { - eval.call(null, x); -} -if (!Module['load'] && Module['read']) { - Module['load'] = function load(f) { - globalEval(Module['read'](f)); - }; -} if (!Module['print']) { Module['print'] = function(){}; } diff --git a/components/webaudiorecorder/lib/WebAudioRecorderMp3.js b/components/webaudiorecorder/lib/WebAudioRecorderMp3.js index b6f73c22f7..4cb16b602d 100644 --- a/components/webaudiorecorder/lib/WebAudioRecorderMp3.js +++ b/components/webaudiorecorder/lib/WebAudioRecorderMp3.js @@ -1,5 +1,3 @@ -importScripts("Mp3LameEncoder.min.js"); - var NUM_CH = 2, // constant sampleRate = 44100, options = undefined, diff --git a/config/default.json b/config/default.json index 3b7c3a117f..e4cb43b0d3 100644 --- a/config/default.json +++ b/config/default.json @@ -19,7 +19,6 @@ "updatesEnabled": false, "ciMode": false, "ciForceUnprocessed": false, - "forcePreloadBundle": false, "openDevTools": false, "buildCreation": 0, "buildExpiration": 0, diff --git a/debug_log.html b/debug_log.html index 80792f6409..70a09c3fb2 100644 --- a/debug_log.html +++ b/debug_log.html @@ -20,6 +20,6 @@
- + diff --git a/js/Mp3LameEncoder.min.js b/js/Mp3LameEncoder.min.js deleted file mode 100644 index 572ec8628d..0000000000 --- a/js/Mp3LameEncoder.min.js +++ /dev/null @@ -1,46699 +0,0 @@ -(function(self) { - var Module = self.Mp3LameEncoderConfig; - -// The Module object: Our interface to the outside world. We import -// and export values on it, and do the work to get that through -// closure compiler if necessary. There are various ways Module can be used: -// 1. Not defined. We create it here -// 2. A function parameter, function(Module) { ..generated code.. } -// 3. pre-run appended it, var Module = {}; ..generated code.. -// 4. External script tag defines var Module. -// We need to do an eval in order to handle the closure compiler -// case, where this code here is minified but Module was defined -// elsewhere (e.g. case 4 above). We also need to check if Module -// already exists (e.g. case 3 above). -// Note that if you want to run closure, and also to use Module -// after the generated code, you will need to define var Module = {}; -// before the code. Then that object will be used in the code, and you -// can continue to use Module afterwards as well. -var Module; -if (!Module) Module = (typeof Module !== 'undefined' ? Module : null) || {}; - -// Sometimes an existing Module object exists with properties -// meant to overwrite the default module functionality. Here -// we collect those properties and reapply _after_ we configure -// the current environment's defaults to avoid having to be so -// defensive during initialization. -var moduleOverrides = {}; -for (var key in Module) { - if (Module.hasOwnProperty(key)) { - moduleOverrides[key] = Module[key]; - } -} - -// The environment setup code below is customized to use Module. -// *** Environment setup code *** -var ENVIRONMENT_IS_WEB = typeof window === 'object'; -var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function' && !ENVIRONMENT_IS_WEB; -// Three configurations we can be running in: -// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false) -// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false) -// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true) -var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; -var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; - -if (ENVIRONMENT_IS_NODE) { - // Expose functionality in the same simple way that the shells work - // Note that we pollute the global namespace here, otherwise we break in node - if (!Module['print']) Module['print'] = function print(x) { - process['stdout'].write(x + '\n'); - }; - if (!Module['printErr']) Module['printErr'] = function printErr(x) { - process['stderr'].write(x + '\n'); - }; - - var nodeFS = require('fs'); - var nodePath = require('path'); - - Module['read'] = function read(filename, binary) { - filename = nodePath['normalize'](filename); - var ret = nodeFS['readFileSync'](filename); - // The path is absolute if the normalized version is the same as the resolved. - if (!ret && filename != nodePath['resolve'](filename)) { - filename = path.join(__dirname, '..', 'src', filename); - ret = nodeFS['readFileSync'](filename); - } - if (ret && !binary) ret = ret.toString(); - return ret; - }; - - Module['readBinary'] = function readBinary(filename) { return Module['read'](filename, true) }; - - Module['load'] = function load(f) { - globalEval(read(f)); - }; - - if (!Module['thisProgram']) { - if (process['argv'].length > 1) { - Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/'); - } else { - Module['thisProgram'] = 'unknown-program'; - } - } - - Module['arguments'] = process['argv'].slice(2); - - if (typeof module !== 'undefined') { - module['exports'] = Module; - } - - process['on']('uncaughtException', function(ex) { - // suppress ExitStatus exceptions from showing an error - if (!(ex instanceof ExitStatus)) { - throw ex; - } - }); - - Module['inspect'] = function () { return '[Emscripten Module object]'; }; -} -else if (ENVIRONMENT_IS_SHELL) { - if (!Module['print']) Module['print'] = print; - if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm - - if (typeof read != 'undefined') { - Module['read'] = read; - } else { - Module['read'] = function read() { throw 'no read() available (jsc?)' }; - } - - Module['readBinary'] = function readBinary(f) { - if (typeof readbuffer === 'function') { - return new Uint8Array(readbuffer(f)); - } - var data = read(f, 'binary'); - assert(typeof data === 'object'); - return data; - }; - - if (typeof scriptArgs != 'undefined') { - Module['arguments'] = scriptArgs; - } else if (typeof arguments != 'undefined') { - Module['arguments'] = arguments; - } - -} -else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { - Module['read'] = function read(url) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, false); - xhr.send(null); - return xhr.responseText; - }; - - if (typeof arguments != 'undefined') { - Module['arguments'] = arguments; - } - - if (typeof console !== 'undefined') { - if (!Module['print']) Module['print'] = function print(x) { - console.log(x); - }; - if (!Module['printErr']) Module['printErr'] = function printErr(x) { - console.log(x); - }; - } else { - // Probably a worker, and without console.log. We can do very little here... - var TRY_USE_DUMP = false; - if (!Module['print']) Module['print'] = (TRY_USE_DUMP && (typeof(dump) !== "undefined") ? (function(x) { - dump(x); - }) : (function(x) { - // self.postMessage(x); // enable this if you want stdout to be sent as messages - })); - } - - if (ENVIRONMENT_IS_WORKER) { - Module['load'] = importScripts; - } - - if (typeof Module['setWindowTitle'] === 'undefined') { - Module['setWindowTitle'] = function(title) { document.title = title }; - } -} -else { - // Unreachable because SHELL is dependant on the others - throw 'Unknown runtime environment. Where are we?'; -} - -function globalEval(x) { - eval.call(null, x); -} -if (!Module['load'] && Module['read']) { - Module['load'] = function load(f) { - globalEval(Module['read'](f)); - }; -} -if (!Module['print']) { - Module['print'] = function(){}; -} -if (!Module['printErr']) { - Module['printErr'] = Module['print']; -} -if (!Module['arguments']) { - Module['arguments'] = []; -} -if (!Module['thisProgram']) { - Module['thisProgram'] = './this.program'; -} - -// *** Environment setup code *** - -// Closure helpers -Module.print = Module['print']; -Module.printErr = Module['printErr']; - -// Callbacks -Module['preRun'] = []; -Module['postRun'] = []; - -// Merge back in the overrides -for (var key in moduleOverrides) { - if (moduleOverrides.hasOwnProperty(key)) { - Module[key] = moduleOverrides[key]; - } -} - - - -// === Preamble library stuff === - -// Documentation for the public APIs defined in this file must be updated in: -// site/source/docs/api_reference/preamble.js.rst -// A prebuilt local version of the documentation is available at: -// site/build/text/docs/api_reference/preamble.js.txt -// You can also build docs locally as HTML or other formats in site/ -// An online HTML version (which may be of a different version of Emscripten) -// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html - -//======================================== -// Runtime code shared with compiler -//======================================== - -var Runtime = { - setTempRet0: function (value) { - tempRet0 = value; - }, - getTempRet0: function () { - return tempRet0; - }, - stackSave: function () { - return STACKTOP; - }, - stackRestore: function (stackTop) { - STACKTOP = stackTop; - }, - getNativeTypeSize: function (type) { - switch (type) { - case 'i1': case 'i8': return 1; - case 'i16': return 2; - case 'i32': return 4; - case 'i64': return 8; - case 'float': return 4; - case 'double': return 8; - default: { - if (type[type.length-1] === '*') { - return Runtime.QUANTUM_SIZE; // A pointer - } else if (type[0] === 'i') { - var bits = parseInt(type.substr(1)); - assert(bits % 8 === 0); - return bits/8; - } else { - return 0; - } - } - } - }, - getNativeFieldSize: function (type) { - return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE); - }, - STACK_ALIGN: 16, - prepVararg: function (ptr, type) { - if (type === 'double' || type === 'i64') { - // move so the load is aligned - if (ptr & 7) { - assert((ptr & 7) === 4); - ptr += 4; - } - } else { - assert((ptr & 3) === 0); - } - return ptr; - }, - getAlignSize: function (type, size, vararg) { - // we align i64s and doubles on 64-bit boundaries, unlike x86 - if (!vararg && (type == 'i64' || type == 'double')) return 8; - if (!type) return Math.min(size, 8); // align structures internally to 64 bits - return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE); - }, - dynCall: function (sig, ptr, args) { - if (args && args.length) { - if (!args.splice) args = Array.prototype.slice.call(args); - args.splice(0, 0, ptr); - return Module['dynCall_' + sig].apply(null, args); - } else { - return Module['dynCall_' + sig].call(null, ptr); - } - }, - functionPointers: [], - addFunction: function (func) { - for (var i = 0; i < Runtime.functionPointers.length; i++) { - if (!Runtime.functionPointers[i]) { - Runtime.functionPointers[i] = func; - return 2*(1 + i); - } - } - throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; - }, - removeFunction: function (index) { - Runtime.functionPointers[(index-2)/2] = null; - }, - warnOnce: function (text) { - if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {}; - if (!Runtime.warnOnce.shown[text]) { - Runtime.warnOnce.shown[text] = 1; - Module.printErr(text); - } - }, - funcWrappers: {}, - getFuncWrapper: function (func, sig) { - assert(sig); - if (!Runtime.funcWrappers[sig]) { - Runtime.funcWrappers[sig] = {}; - } - var sigCache = Runtime.funcWrappers[sig]; - if (!sigCache[func]) { - sigCache[func] = function dynCall_wrapper() { - return Runtime.dynCall(sig, func, arguments); - }; - } - return sigCache[func]; - }, - getCompilerSetting: function (name) { - throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work'; - }, - stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+15)&-16); return ret; }, - staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = (((STATICTOP)+15)&-16); return ret; }, - dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) { var success = enlargeMemory(); if (!success) { DYNAMICTOP = ret; return 0; } }; return ret; }, - alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 16))*(quantum ? quantum : 16); return ret; }, - makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0))); return ret; }, - GLOBAL_BASE: 8, - QUANTUM_SIZE: 4, - __dummy__: 0 -} - - -Module['Runtime'] = Runtime; - - - -//======================================== -// Runtime essentials -//======================================== - -var __THREW__ = 0; // Used in checking for thrown exceptions. - -var ABORT = false; // whether we are quitting the application. no code should run after this. set in exit() and abort() -var EXITSTATUS = 0; - -var undef = 0; -// tempInt is used for 32-bit signed values or smaller. tempBigInt is used -// for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt -var tempValue, tempInt, tempBigInt, tempInt2, tempBigInt2, tempPair, tempBigIntI, tempBigIntR, tempBigIntS, tempBigIntP, tempBigIntD, tempDouble, tempFloat; -var tempI64, tempI64b; -var tempRet0, tempRet1, tempRet2, tempRet3, tempRet4, tempRet5, tempRet6, tempRet7, tempRet8, tempRet9; - -function assert(condition, text) { - if (!condition) { - abort('Assertion failed: ' + text); - } -} - -var globalScope = this; - -// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) -function getCFunc(ident) { - var func = Module['_' + ident]; // closure exported function - if (!func) { - try { - func = eval('_' + ident); // explicit lookup - } catch(e) {} - } - assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)'); - return func; -} - -var cwrap, ccall; -(function(){ - var JSfuncs = { - // Helpers for cwrap -- it can't refer to Runtime directly because it might - // be renamed by closure, instead it calls JSfuncs['stackSave'].body to find - // out what the minified function name is. - 'stackSave': function() { - Runtime.stackSave() - }, - 'stackRestore': function() { - Runtime.stackRestore() - }, - // type conversion from js to c - 'arrayToC' : function(arr) { - var ret = Runtime.stackAlloc(arr.length); - writeArrayToMemory(arr, ret); - return ret; - }, - 'stringToC' : function(str) { - var ret = 0; - if (str !== null && str !== undefined && str !== 0) { // null string - // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' - ret = Runtime.stackAlloc((str.length << 2) + 1); - writeStringToMemory(str, ret); - } - return ret; - } - }; - // For fast lookup of conversion functions - var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']}; - - // C calling interface. - ccall = function ccallFunc(ident, returnType, argTypes, args, opts) { - var func = getCFunc(ident); - var cArgs = []; - var stack = 0; - if (args) { - for (var i = 0; i < args.length; i++) { - var converter = toC[argTypes[i]]; - if (converter) { - if (stack === 0) stack = Runtime.stackSave(); - cArgs[i] = converter(args[i]); - } else { - cArgs[i] = args[i]; - } - } - } - var ret = func.apply(null, cArgs); - if (returnType === 'string') ret = Pointer_stringify(ret); - if (stack !== 0) { - if (opts && opts.async) { - EmterpreterAsync.asyncFinalizers.push(function() { - Runtime.stackRestore(stack); - }); - return; - } - Runtime.stackRestore(stack); - } - return ret; - } - - var sourceRegex = /^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/; - function parseJSFunc(jsfunc) { - // Match the body and the return value of a javascript function source - var parsed = jsfunc.toString().match(sourceRegex).slice(1); - return {arguments : parsed[0], body : parsed[1], returnValue: parsed[2]} - } - var JSsource = {}; - for (var fun in JSfuncs) { - if (JSfuncs.hasOwnProperty(fun)) { - // Elements of toCsource are arrays of three items: - // the code, and the return value - JSsource[fun] = parseJSFunc(JSfuncs[fun]); - } - } - - - cwrap = function cwrap(ident, returnType, argTypes) { - argTypes = argTypes || []; - var cfunc = getCFunc(ident); - // When the function takes numbers and returns a number, we can just return - // the original function - var numericArgs = argTypes.every(function(type){ return type === 'number'}); - var numericRet = (returnType !== 'string'); - if ( numericRet && numericArgs) { - return cfunc; - } - // Creation of the arguments list (["$1","$2",...,"$nargs"]) - var argNames = argTypes.map(function(x,i){return '$'+i}); - var funcstr = "(function(" + argNames.join(',') + ") {"; - var nargs = argTypes.length; - if (!numericArgs) { - // Generate the code needed to convert the arguments from javascript - // values to pointers - funcstr += 'var stack = ' + JSsource['stackSave'].body + ';'; - for (var i = 0; i < nargs; i++) { - var arg = argNames[i], type = argTypes[i]; - if (type === 'number') continue; - var convertCode = JSsource[type + 'ToC']; // [code, return] - funcstr += 'var ' + convertCode.arguments + ' = ' + arg + ';'; - funcstr += convertCode.body + ';'; - funcstr += arg + '=' + convertCode.returnValue + ';'; - } - } - - // When the code is compressed, the name of cfunc is not literally 'cfunc' anymore - var cfuncname = parseJSFunc(function(){return cfunc}).returnValue; - // Call the function - funcstr += 'var ret = ' + cfuncname + '(' + argNames.join(',') + ');'; - if (!numericRet) { // Return type can only by 'string' or 'number' - // Convert the result to a string - var strgfy = parseJSFunc(function(){return Pointer_stringify}).returnValue; - funcstr += 'ret = ' + strgfy + '(ret);'; - } - if (!numericArgs) { - // If we had a stack, restore it - funcstr += JSsource['stackRestore'].body.replace('()', '(stack)') + ';'; - } - funcstr += 'return ret})'; - return eval(funcstr); - }; -})(); -Module["cwrap"] = cwrap; -Module["ccall"] = ccall; - - -function setValue(ptr, value, type, noSafe) { - type = type || 'i8'; - if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit - switch(type) { - case 'i1': HEAP8[((ptr)>>0)]=value; break; - case 'i8': HEAP8[((ptr)>>0)]=value; break; - case 'i16': HEAP16[((ptr)>>1)]=value; break; - case 'i32': HEAP32[((ptr)>>2)]=value; break; - case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break; - case 'float': HEAPF32[((ptr)>>2)]=value; break; - case 'double': HEAPF64[((ptr)>>3)]=value; break; - default: abort('invalid type for setValue: ' + type); - } -} -Module['setValue'] = setValue; - - -function getValue(ptr, type, noSafe) { - type = type || 'i8'; - if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit - switch(type) { - case 'i1': return HEAP8[((ptr)>>0)]; - case 'i8': return HEAP8[((ptr)>>0)]; - case 'i16': return HEAP16[((ptr)>>1)]; - case 'i32': return HEAP32[((ptr)>>2)]; - case 'i64': return HEAP32[((ptr)>>2)]; - case 'float': return HEAPF32[((ptr)>>2)]; - case 'double': return HEAPF64[((ptr)>>3)]; - default: abort('invalid type for setValue: ' + type); - } - return null; -} -Module['getValue'] = getValue; - -var ALLOC_NORMAL = 0; // Tries to use _malloc() -var ALLOC_STACK = 1; // Lives for the duration of the current function call -var ALLOC_STATIC = 2; // Cannot be freed -var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk -var ALLOC_NONE = 4; // Do not allocate -Module['ALLOC_NORMAL'] = ALLOC_NORMAL; -Module['ALLOC_STACK'] = ALLOC_STACK; -Module['ALLOC_STATIC'] = ALLOC_STATIC; -Module['ALLOC_DYNAMIC'] = ALLOC_DYNAMIC; -Module['ALLOC_NONE'] = ALLOC_NONE; - -// allocate(): This is for internal use. You can use it yourself as well, but the interface -// is a little tricky (see docs right below). The reason is that it is optimized -// for multiple syntaxes to save space in generated code. So you should -// normally not use allocate(), and instead allocate memory using _malloc(), -// initialize it with setValue(), and so forth. -// @slab: An array of data, or a number. If a number, then the size of the block to allocate, -// in *bytes* (note that this is sometimes confusing: the next parameter does not -// affect this!) -// @types: Either an array of types, one for each byte (or 0 if no type at that position), -// or a single type which is used for the entire block. This only matters if there -// is initial data - if @slab is a number, then this does not matter at all and is -// ignored. -// @allocator: How to allocate memory, see ALLOC_* -function allocate(slab, types, allocator, ptr) { - var zeroinit, size; - if (typeof slab === 'number') { - zeroinit = true; - size = slab; - } else { - zeroinit = false; - size = slab.length; - } - - var singleType = typeof types === 'string' ? types : null; - - var ret; - if (allocator == ALLOC_NONE) { - ret = ptr; - } else { - ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length)); - } - - if (zeroinit) { - var ptr = ret, stop; - assert((ret & 3) == 0); - stop = ret + (size & ~3); - for (; ptr < stop; ptr += 4) { - HEAP32[((ptr)>>2)]=0; - } - stop = ret + size; - while (ptr < stop) { - HEAP8[((ptr++)>>0)]=0; - } - return ret; - } - - if (singleType === 'i8') { - if (slab.subarray || slab.slice) { - HEAPU8.set(slab, ret); - } else { - HEAPU8.set(new Uint8Array(slab), ret); - } - return ret; - } - - var i = 0, type, typeSize, previousType; - while (i < size) { - var curr = slab[i]; - - if (typeof curr === 'function') { - curr = Runtime.getFunctionIndex(curr); - } - - type = singleType || types[i]; - if (type === 0) { - i++; - continue; - } - - if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later - - setValue(ret+i, curr, type); - - // no need to look up size unless type changes, so cache it - if (previousType !== type) { - typeSize = Runtime.getNativeTypeSize(type); - previousType = type; - } - i += typeSize; - } - - return ret; -} -Module['allocate'] = allocate; - -// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready -function getMemory(size) { - if (!staticSealed) return Runtime.staticAlloc(size); - if ((typeof _sbrk !== 'undefined' && !_sbrk.called) || !runtimeInitialized) return Runtime.dynamicAlloc(size); - return _malloc(size); -} -Module['getMemory'] = getMemory; - -function Pointer_stringify(ptr, /* optional */ length) { - if (length === 0 || !ptr) return ''; - // TODO: use TextDecoder - // Find the length, and check for UTF while doing so - var hasUtf = 0; - var t; - var i = 0; - while (1) { - t = HEAPU8[(((ptr)+(i))>>0)]; - hasUtf |= t; - if (t == 0 && !length) break; - i++; - if (length && i == length) break; - } - if (!length) length = i; - - var ret = ''; - - if (hasUtf < 128) { - var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack - var curr; - while (length > 0) { - curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK))); - ret = ret ? ret + curr : curr; - ptr += MAX_CHUNK; - length -= MAX_CHUNK; - } - return ret; - } - return Module['UTF8ToString'](ptr); -} -Module['Pointer_stringify'] = Pointer_stringify; - -// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns -// a copy of that string as a Javascript String object. - -function AsciiToString(ptr) { - var str = ''; - while (1) { - var ch = HEAP8[((ptr++)>>0)]; - if (!ch) return str; - str += String.fromCharCode(ch); - } -} -Module['AsciiToString'] = AsciiToString; - -// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', -// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP. - -function stringToAscii(str, outPtr) { - return writeAsciiToMemory(str, outPtr, false); -} -Module['stringToAscii'] = stringToAscii; - -// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns -// a copy of that string as a Javascript String object. - -function UTF8ArrayToString(u8Array, idx) { - var u0, u1, u2, u3, u4, u5; - - var str = ''; - while (1) { - // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 - u0 = u8Array[idx++]; - if (!u0) return str; - if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } - u1 = u8Array[idx++] & 63; - if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } - u2 = u8Array[idx++] & 63; - if ((u0 & 0xF0) == 0xE0) { - u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; - } else { - u3 = u8Array[idx++] & 63; - if ((u0 & 0xF8) == 0xF0) { - u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3; - } else { - u4 = u8Array[idx++] & 63; - if ((u0 & 0xFC) == 0xF8) { - u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4; - } else { - u5 = u8Array[idx++] & 63; - u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5; - } - } - } - if (u0 < 0x10000) { - str += String.fromCharCode(u0); - } else { - var ch = u0 - 0x10000; - str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); - } - } -} -Module['UTF8ArrayToString'] = UTF8ArrayToString; - -// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns -// a copy of that string as a Javascript String object. - -function UTF8ToString(ptr) { - return UTF8ArrayToString(HEAPU8, ptr); -} -Module['UTF8ToString'] = UTF8ToString; - -// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx', -// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP. -// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write. -// Parameters: -// str: the Javascript string to copy. -// outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element. -// outIdx: The starting offset in the array to begin the copying. -// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null -// terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else. -// maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator. -// Returns the number of bytes written, EXCLUDING the null terminator. - -function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) { - if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes. - return 0; - - var startIdx = outIdx; - var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. - for (var i = 0; i < str.length; ++i) { - // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. - // See http://unicode.org/faq/utf_bom.html#utf16-3 - // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629 - var u = str.charCodeAt(i); // possibly a lead surrogate - if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); - if (u <= 0x7F) { - if (outIdx >= endIdx) break; - outU8Array[outIdx++] = u; - } else if (u <= 0x7FF) { - if (outIdx + 1 >= endIdx) break; - outU8Array[outIdx++] = 0xC0 | (u >> 6); - outU8Array[outIdx++] = 0x80 | (u & 63); - } else if (u <= 0xFFFF) { - if (outIdx + 2 >= endIdx) break; - outU8Array[outIdx++] = 0xE0 | (u >> 12); - outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); - outU8Array[outIdx++] = 0x80 | (u & 63); - } else if (u <= 0x1FFFFF) { - if (outIdx + 3 >= endIdx) break; - outU8Array[outIdx++] = 0xF0 | (u >> 18); - outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); - outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); - outU8Array[outIdx++] = 0x80 | (u & 63); - } else if (u <= 0x3FFFFFF) { - if (outIdx + 4 >= endIdx) break; - outU8Array[outIdx++] = 0xF8 | (u >> 24); - outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); - outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); - outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); - outU8Array[outIdx++] = 0x80 | (u & 63); - } else { - if (outIdx + 5 >= endIdx) break; - outU8Array[outIdx++] = 0xFC | (u >> 30); - outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63); - outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63); - outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63); - outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63); - outU8Array[outIdx++] = 0x80 | (u & 63); - } - } - // Null-terminate the pointer to the buffer. - outU8Array[outIdx] = 0; - return outIdx - startIdx; -} -Module['stringToUTF8Array'] = stringToUTF8Array; - -// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', -// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP. -// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write. -// Returns the number of bytes written, EXCLUDING the null terminator. - -function stringToUTF8(str, outPtr, maxBytesToWrite) { - return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite); -} -Module['stringToUTF8'] = stringToUTF8; - -// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte. - -function lengthBytesUTF8(str) { - var len = 0; - for (var i = 0; i < str.length; ++i) { - // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8. - // See http://unicode.org/faq/utf_bom.html#utf16-3 - var u = str.charCodeAt(i); // possibly a lead surrogate - if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF); - if (u <= 0x7F) { - ++len; - } else if (u <= 0x7FF) { - len += 2; - } else if (u <= 0xFFFF) { - len += 3; - } else if (u <= 0x1FFFFF) { - len += 4; - } else if (u <= 0x3FFFFFF) { - len += 5; - } else { - len += 6; - } - } - return len; -} -Module['lengthBytesUTF8'] = lengthBytesUTF8; - -// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns -// a copy of that string as a Javascript String object. - -function UTF16ToString(ptr) { - var i = 0; - - var str = ''; - while (1) { - var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; - if (codeUnit == 0) - return str; - ++i; - // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. - str += String.fromCharCode(codeUnit); - } -} -Module['UTF16ToString'] = UTF16ToString; - -// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', -// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP. -// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write. -// Parameters: -// str: the Javascript string to copy. -// outPtr: Byte address in Emscripten HEAP where to write the string to. -// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null -// terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else. -// maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator. -// Returns the number of bytes written, EXCLUDING the null terminator. - -function stringToUTF16(str, outPtr, maxBytesToWrite) { - // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. - if (maxBytesToWrite === undefined) { - maxBytesToWrite = 0x7FFFFFFF; - } - if (maxBytesToWrite < 2) return 0; - maxBytesToWrite -= 2; // Null terminator. - var startPtr = outPtr; - var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length; - for (var i = 0; i < numCharsToWrite; ++i) { - // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. - var codeUnit = str.charCodeAt(i); // possibly a lead surrogate - HEAP16[((outPtr)>>1)]=codeUnit; - outPtr += 2; - } - // Null-terminate the pointer to the HEAP. - HEAP16[((outPtr)>>1)]=0; - return outPtr - startPtr; -} -Module['stringToUTF16'] = stringToUTF16; - -// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. - -function lengthBytesUTF16(str) { - return str.length*2; -} -Module['lengthBytesUTF16'] = lengthBytesUTF16; - -function UTF32ToString(ptr) { - var i = 0; - - var str = ''; - while (1) { - var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; - if (utf32 == 0) - return str; - ++i; - // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing. - // See http://unicode.org/faq/utf_bom.html#utf16-3 - if (utf32 >= 0x10000) { - var ch = utf32 - 0x10000; - str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); - } else { - str += String.fromCharCode(utf32); - } - } -} -Module['UTF32ToString'] = UTF32ToString; - -// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', -// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP. -// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write. -// Parameters: -// str: the Javascript string to copy. -// outPtr: Byte address in Emscripten HEAP where to write the string to. -// maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null -// terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else. -// maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator. -// Returns the number of bytes written, EXCLUDING the null terminator. - -function stringToUTF32(str, outPtr, maxBytesToWrite) { - // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed. - if (maxBytesToWrite === undefined) { - maxBytesToWrite = 0x7FFFFFFF; - } - if (maxBytesToWrite < 4) return 0; - var startPtr = outPtr; - var endPtr = startPtr + maxBytesToWrite - 4; - for (var i = 0; i < str.length; ++i) { - // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. - // See http://unicode.org/faq/utf_bom.html#utf16-3 - var codeUnit = str.charCodeAt(i); // possibly a lead surrogate - if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { - var trailSurrogate = str.charCodeAt(++i); - codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); - } - HEAP32[((outPtr)>>2)]=codeUnit; - outPtr += 4; - if (outPtr + 4 > endPtr) break; - } - // Null-terminate the pointer to the HEAP. - HEAP32[((outPtr)>>2)]=0; - return outPtr - startPtr; -} -Module['stringToUTF32'] = stringToUTF32; - -// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte. - -function lengthBytesUTF32(str) { - var len = 0; - for (var i = 0; i < str.length; ++i) { - // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. - // See http://unicode.org/faq/utf_bom.html#utf16-3 - var codeUnit = str.charCodeAt(i); - if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate. - len += 4; - } - - return len; -} -Module['lengthBytesUTF32'] = lengthBytesUTF32; - -function demangle(func) { - var hasLibcxxabi = !!Module['___cxa_demangle']; - if (hasLibcxxabi) { - try { - var buf = _malloc(func.length); - writeStringToMemory(func.substr(1), buf); - var status = _malloc(4); - var ret = Module['___cxa_demangle'](buf, 0, 0, status); - if (getValue(status, 'i32') === 0 && ret) { - return Pointer_stringify(ret); - } - // otherwise, libcxxabi failed, we can try ours which may return a partial result - } catch(e) { - // failure when using libcxxabi, we can try ours which may return a partial result - } finally { - if (buf) _free(buf); - if (status) _free(status); - if (ret) _free(ret); - } - } - var i = 3; - // params, etc. - var basicTypes = { - 'v': 'void', - 'b': 'bool', - 'c': 'char', - 's': 'short', - 'i': 'int', - 'l': 'long', - 'f': 'float', - 'd': 'double', - 'w': 'wchar_t', - 'a': 'signed char', - 'h': 'unsigned char', - 't': 'unsigned short', - 'j': 'unsigned int', - 'm': 'unsigned long', - 'x': 'long long', - 'y': 'unsigned long long', - 'z': '...' - }; - var subs = []; - var first = true; - function dump(x) { - //return; - if (x) Module.print(x); - Module.print(func); - var pre = ''; - for (var a = 0; a < i; a++) pre += ' '; - Module.print (pre + '^'); - } - function parseNested() { - i++; - if (func[i] === 'K') i++; // ignore const - var parts = []; - while (func[i] !== 'E') { - if (func[i] === 'S') { // substitution - i++; - var next = func.indexOf('_', i); - var num = func.substring(i, next) || 0; - parts.push(subs[num] || '?'); - i = next+1; - continue; - } - if (func[i] === 'C') { // constructor - parts.push(parts[parts.length-1]); - i += 2; - continue; - } - var size = parseInt(func.substr(i)); - var pre = size.toString().length; - if (!size || !pre) { i--; break; } // counter i++ below us - var curr = func.substr(i + pre, size); - parts.push(curr); - subs.push(curr); - i += pre + size; - } - i++; // skip E - return parts; - } - function parse(rawList, limit, allowVoid) { // main parser - limit = limit || Infinity; - var ret = '', list = []; - function flushList() { - return '(' + list.join(', ') + ')'; - } - var name; - if (func[i] === 'N') { - // namespaced N-E - name = parseNested().join('::'); - limit--; - if (limit === 0) return rawList ? [name] : name; - } else { - // not namespaced - if (func[i] === 'K' || (first && func[i] === 'L')) i++; // ignore const and first 'L' - var size = parseInt(func.substr(i)); - if (size) { - var pre = size.toString().length; - name = func.substr(i + pre, size); - i += pre + size; - } - } - first = false; - if (func[i] === 'I') { - i++; - var iList = parse(true); - var iRet = parse(true, 1, true); - ret += iRet[0] + ' ' + name + '<' + iList.join(', ') + '>'; - } else { - ret = name; - } - paramLoop: while (i < func.length && limit-- > 0) { - //dump('paramLoop'); - var c = func[i++]; - if (c in basicTypes) { - list.push(basicTypes[c]); - } else { - switch (c) { - case 'P': list.push(parse(true, 1, true)[0] + '*'); break; // pointer - case 'R': list.push(parse(true, 1, true)[0] + '&'); break; // reference - case 'L': { // literal - i++; // skip basic type - var end = func.indexOf('E', i); - var size = end - i; - list.push(func.substr(i, size)); - i += size + 2; // size + 'EE' - break; - } - case 'A': { // array - var size = parseInt(func.substr(i)); - i += size.toString().length; - if (func[i] !== '_') throw '?'; - i++; // skip _ - list.push(parse(true, 1, true)[0] + ' [' + size + ']'); - break; - } - case 'E': break paramLoop; - default: ret += '?' + c; break paramLoop; - } - } - } - if (!allowVoid && list.length === 1 && list[0] === 'void') list = []; // avoid (void) - if (rawList) { - if (ret) { - list.push(ret + '?'); - } - return list; - } else { - return ret + flushList(); - } - } - var parsed = func; - try { - // Special-case the entry point, since its name differs from other name mangling. - if (func == 'Object._main' || func == '_main') { - return 'main()'; - } - if (typeof func === 'number') func = Pointer_stringify(func); - if (func[0] !== '_') return func; - if (func[1] !== '_') return func; // C function - if (func[2] !== 'Z') return func; - switch (func[3]) { - case 'n': return 'operator new()'; - case 'd': return 'operator delete()'; - } - parsed = parse(); - } catch(e) { - parsed += '?'; - } - if (parsed.indexOf('?') >= 0 && !hasLibcxxabi) { - Runtime.warnOnce('warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling'); - } - return parsed; -} - -function demangleAll(text) { - return text.replace(/__Z[\w\d_]+/g, function(x) { var y = demangle(x); return x === y ? x : (x + ' [' + y + ']') }); -} - -function jsStackTrace() { - var err = new Error(); - if (!err.stack) { - // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown, - // so try that as a special-case. - try { - throw new Error(0); - } catch(e) { - err = e; - } - if (!err.stack) { - return '(no stack trace available)'; - } - } - return err.stack.toString(); -} - -function stackTrace() { - return demangleAll(jsStackTrace()); -} -Module['stackTrace'] = stackTrace; - -// Memory management - -var PAGE_SIZE = 4096; - -function alignMemoryPage(x) { - if (x % 4096 > 0) { - x += (4096 - (x % 4096)); - } - return x; -} - -var HEAP; -var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; - -var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area -var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area -var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk - - -function enlargeMemory() { - abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.'); -} - - -var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; -var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216; - -var totalMemory = 64*1024; -while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) { - if (totalMemory < 16*1024*1024) { - totalMemory *= 2; - } else { - totalMemory += 16*1024*1024 - } -} -if (totalMemory !== TOTAL_MEMORY) { - Module.printErr('increasing TOTAL_MEMORY to ' + totalMemory + ' to be compliant with the asm.js spec (and given that TOTAL_STACK=' + TOTAL_STACK + ')'); - TOTAL_MEMORY = totalMemory; -} - -// Initialize the runtime's memory -// check for full engine support (use string 'subarray' to avoid closure compiler confusion) -assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']), - 'JS engine does not provide full typed array support'); - -var buffer; -buffer = new ArrayBuffer(TOTAL_MEMORY); -HEAP8 = new Int8Array(buffer); -HEAP16 = new Int16Array(buffer); -HEAP32 = new Int32Array(buffer); -HEAPU8 = new Uint8Array(buffer); -HEAPU16 = new Uint16Array(buffer); -HEAPU32 = new Uint32Array(buffer); -HEAPF32 = new Float32Array(buffer); -HEAPF64 = new Float64Array(buffer); - -// Endianness check (note: assumes compiler arch was little-endian) -HEAP32[0] = 255; -assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system'); - -Module['HEAP'] = HEAP; -Module['buffer'] = buffer; -Module['HEAP8'] = HEAP8; -Module['HEAP16'] = HEAP16; -Module['HEAP32'] = HEAP32; -Module['HEAPU8'] = HEAPU8; -Module['HEAPU16'] = HEAPU16; -Module['HEAPU32'] = HEAPU32; -Module['HEAPF32'] = HEAPF32; -Module['HEAPF64'] = HEAPF64; - -function callRuntimeCallbacks(callbacks) { - while(callbacks.length > 0) { - var callback = callbacks.shift(); - if (typeof callback == 'function') { - callback(); - continue; - } - var func = callback.func; - if (typeof func === 'number') { - if (callback.arg === undefined) { - Runtime.dynCall('v', func); - } else { - Runtime.dynCall('vi', func, [callback.arg]); - } - } else { - func(callback.arg === undefined ? null : callback.arg); - } - } -} - -var __ATPRERUN__ = []; // functions called before the runtime is initialized -var __ATINIT__ = []; // functions called during startup -var __ATMAIN__ = []; // functions called when main() is to be run -var __ATEXIT__ = []; // functions called during shutdown -var __ATPOSTRUN__ = []; // functions called after the runtime has exited - -var runtimeInitialized = false; -var runtimeExited = false; - - -function preRun() { - // compatibility - merge in anything from Module['preRun'] at this time - if (Module['preRun']) { - if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; - while (Module['preRun'].length) { - addOnPreRun(Module['preRun'].shift()); - } - } - callRuntimeCallbacks(__ATPRERUN__); -} - -function ensureInitRuntime() { - if (runtimeInitialized) return; - runtimeInitialized = true; - callRuntimeCallbacks(__ATINIT__); -} - -function preMain() { - callRuntimeCallbacks(__ATMAIN__); -} - -function exitRuntime() { - callRuntimeCallbacks(__ATEXIT__); - runtimeExited = true; -} - -function postRun() { - // compatibility - merge in anything from Module['postRun'] at this time - if (Module['postRun']) { - if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; - while (Module['postRun'].length) { - addOnPostRun(Module['postRun'].shift()); - } - } - callRuntimeCallbacks(__ATPOSTRUN__); -} - -function addOnPreRun(cb) { - __ATPRERUN__.unshift(cb); -} -Module['addOnPreRun'] = Module.addOnPreRun = addOnPreRun; - -function addOnInit(cb) { - __ATINIT__.unshift(cb); -} -Module['addOnInit'] = Module.addOnInit = addOnInit; - -function addOnPreMain(cb) { - __ATMAIN__.unshift(cb); -} -Module['addOnPreMain'] = Module.addOnPreMain = addOnPreMain; - -function addOnExit(cb) { - __ATEXIT__.unshift(cb); -} -Module['addOnExit'] = Module.addOnExit = addOnExit; - -function addOnPostRun(cb) { - __ATPOSTRUN__.unshift(cb); -} -Module['addOnPostRun'] = Module.addOnPostRun = addOnPostRun; - -// Tools - - -function intArrayFromString(stringy, dontAddNull, length /* optional */) { - var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; - var u8array = new Array(len); - var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); - if (dontAddNull) u8array.length = numBytesWritten; - return u8array; -} -Module['intArrayFromString'] = intArrayFromString; - -function intArrayToString(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - var chr = array[i]; - if (chr > 0xFF) { - chr &= 0xFF; - } - ret.push(String.fromCharCode(chr)); - } - return ret.join(''); -} -Module['intArrayToString'] = intArrayToString; - -function writeStringToMemory(string, buffer, dontAddNull) { - var array = intArrayFromString(string, dontAddNull); - var i = 0; - while (i < array.length) { - var chr = array[i]; - HEAP8[(((buffer)+(i))>>0)]=chr; - i = i + 1; - } -} -Module['writeStringToMemory'] = writeStringToMemory; - -function writeArrayToMemory(array, buffer) { - for (var i = 0; i < array.length; i++) { - HEAP8[((buffer++)>>0)]=array[i]; - } -} -Module['writeArrayToMemory'] = writeArrayToMemory; - -function writeAsciiToMemory(str, buffer, dontAddNull) { - for (var i = 0; i < str.length; ++i) { - HEAP8[((buffer++)>>0)]=str.charCodeAt(i); - } - // Null-terminate the pointer to the HEAP. - if (!dontAddNull) HEAP8[((buffer)>>0)]=0; -} -Module['writeAsciiToMemory'] = writeAsciiToMemory; - -function unSign(value, bits, ignore) { - if (value >= 0) { - return value; - } - return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts - : Math.pow(2, bits) + value; -} -function reSign(value, bits, ignore) { - if (value <= 0) { - return value; - } - var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 - : Math.pow(2, bits-1); - if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that - // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors - // TODO: In i64 mode 1, resign the two parts separately and safely - value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts - } - return value; -} - - -// check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 ) -if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function imul(a, b) { - var ah = a >>> 16; - var al = a & 0xffff; - var bh = b >>> 16; - var bl = b & 0xffff; - return (al*bl + ((ah*bl + al*bh) << 16))|0; -}; -Math.imul = Math['imul']; - - -if (!Math['clz32']) Math['clz32'] = function(x) { - x = x >>> 0; - for (var i = 0; i < 32; i++) { - if (x & (1 << (31 - i))) return i; - } - return 32; -}; -Math.clz32 = Math['clz32'] - -var Math_abs = Math.abs; -var Math_cos = Math.cos; -var Math_sin = Math.sin; -var Math_tan = Math.tan; -var Math_acos = Math.acos; -var Math_asin = Math.asin; -var Math_atan = Math.atan; -var Math_atan2 = Math.atan2; -var Math_exp = Math.exp; -var Math_log = Math.log; -var Math_sqrt = Math.sqrt; -var Math_ceil = Math.ceil; -var Math_floor = Math.floor; -var Math_pow = Math.pow; -var Math_imul = Math.imul; -var Math_fround = Math.fround; -var Math_min = Math.min; -var Math_clz32 = Math.clz32; - -// A counter of dependencies for calling run(). If we need to -// do asynchronous work before running, increment this and -// decrement it. Incrementing must happen in a place like -// PRE_RUN_ADDITIONS (used by emcc to add file preloading). -// Note that you can add dependencies in preRun, even though -// it happens right before run - run will be postponed until -// the dependencies are met. -var runDependencies = 0; -var runDependencyWatcher = null; -var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled - -function getUniqueRunDependency(id) { - return id; -} - -function addRunDependency(id) { - runDependencies++; - if (Module['monitorRunDependencies']) { - Module['monitorRunDependencies'](runDependencies); - } -} -Module['addRunDependency'] = addRunDependency; -function removeRunDependency(id) { - runDependencies--; - if (Module['monitorRunDependencies']) { - Module['monitorRunDependencies'](runDependencies); - } - if (runDependencies == 0) { - if (runDependencyWatcher !== null) { - clearInterval(runDependencyWatcher); - runDependencyWatcher = null; - } - if (dependenciesFulfilled) { - var callback = dependenciesFulfilled; - dependenciesFulfilled = null; - callback(); // can add another dependenciesFulfilled - } - } -} -Module['removeRunDependency'] = removeRunDependency; - -Module["preloadedImages"] = {}; // maps url to image data -Module["preloadedAudios"] = {}; // maps url to audio data - - - -var memoryInitializer = null; - - - -// === Body === - -var ASM_CONSTS = []; - - - - -STATIC_BASE = 8; - -STATICTOP = STATIC_BASE + 96992; - /* global initializers */ __ATINIT__.push(); - - -/* memory initializer */ allocate([69,114,114,111,114,58,32,99,97,110,39,116,32,97,108,108,111,99,97,116,101,32,86,98,114,70,114,97,109,101,115,32,98,117,102,102,101,114,10,0,0,0,0,0,193,192,0,0,129,193,0,0,64,1,0,0,1,195,0,0,192,3,0,0,128,2,0,0,65,194,0,0,1,198,0,0,192,6,0,0,128,7,0,0,65,199,0,0,0,5,0,0,193,197,0,0,129,196,0,0,64,4,0,0,1,204,0,0,192,12,0,0,128,13,0,0,65,205,0,0,0,15,0,0,193,207,0,0,129,206,0,0,64,14,0,0,0,10,0,0,193,202,0,0,129,203,0,0,64,11,0,0,1,201,0,0,192,9,0,0,128,8,0,0,65,200,0,0,1,216,0,0,192,24,0,0,128,25,0,0,65,217,0,0,0,27,0,0,193,219,0,0,129,218,0,0,64,26,0,0,0,30,0,0,193,222,0,0,129,223,0,0,64,31,0,0,1,221,0,0,192,29,0,0,128,28,0,0,65,220,0,0,0,20,0,0,193,212,0,0,129,213,0,0,64,21,0,0,1,215,0,0,192,23,0,0,128,22,0,0,65,214,0,0,1,210,0,0,192,18,0,0,128,19,0,0,65,211,0,0,0,17,0,0,193,209,0,0,129,208,0,0,64,16,0,0,1,240,0,0,192,48,0,0,128,49,0,0,65,241,0,0,0,51,0,0,193,243,0,0,129,242,0,0,64,50,0,0,0,54,0,0,193,246,0,0,129,247,0,0,64,55,0,0,1,245,0,0,192,53,0,0,128,52,0,0,65,244,0,0,0,60,0,0,193,252,0,0,129,253,0,0,64,61,0,0,1,255,0,0,192,63,0,0,128,62,0,0,65,254,0,0,1,250,0,0,192,58,0,0,128,59,0,0,65,251,0,0,0,57,0,0,193,249,0,0,129,248,0,0,64,56,0,0,0,40,0,0,193,232,0,0,129,233,0,0,64,41,0,0,1,235,0,0,192,43,0,0,128,42,0,0,65,234,0,0,1,238,0,0,192,46,0,0,128,47,0,0,65,239,0,0,0,45,0,0,193,237,0,0,129,236,0,0,64,44,0,0,1,228,0,0,192,36,0,0,128,37,0,0,65,229,0,0,0,39,0,0,193,231,0,0,129,230,0,0,64,38,0,0,0,34,0,0,193,226,0,0,129,227,0,0,64,35,0,0,1,225,0,0,192,33,0,0,128,32,0,0,65,224,0,0,1,160,0,0,192,96,0,0,128,97,0,0,65,161,0,0,0,99,0,0,193,163,0,0,129,162,0,0,64,98,0,0,0,102,0,0,193,166,0,0,129,167,0,0,64,103,0,0,1,165,0,0,192,101,0,0,128,100,0,0,65,164,0,0,0,108,0,0,193,172,0,0,129,173,0,0,64,109,0,0,1,175,0,0,192,111,0,0,128,110,0,0,65,174,0,0,1,170,0,0,192,106,0,0,128,107,0,0,65,171,0,0,0,105,0,0,193,169,0,0,129,168,0,0,64,104,0,0,0,120,0,0,193,184,0,0,129,185,0,0,64,121,0,0,1,187,0,0,192,123,0,0,128,122,0,0,65,186,0,0,1,190,0,0,192,126,0,0,128,127,0,0,65,191,0,0,0,125,0,0,193,189,0,0,129,188,0,0,64,124,0,0,1,180,0,0,192,116,0,0,128,117,0,0,65,181,0,0,0,119,0,0,193,183,0,0,129,182,0,0,64,118,0,0,0,114,0,0,193,178,0,0,129,179,0,0,64,115,0,0,1,177,0,0,192,113,0,0,128,112,0,0,65,176,0,0,0,80,0,0,193,144,0,0,129,145,0,0,64,81,0,0,1,147,0,0,192,83,0,0,128,82,0,0,65,146,0,0,1,150,0,0,192,86,0,0,128,87,0,0,65,151,0,0,0,85,0,0,193,149,0,0,129,148,0,0,64,84,0,0,1,156,0,0,192,92,0,0,128,93,0,0,65,157,0,0,0,95,0,0,193,159,0,0,129,158,0,0,64,94,0,0,0,90,0,0,193,154,0,0,129,155,0,0,64,91,0,0,1,153,0,0,192,89,0,0,128,88,0,0,65,152,0,0,1,136,0,0,192,72,0,0,128,73,0,0,65,137,0,0,0,75,0,0,193,139,0,0,129,138,0,0,64,74,0,0,0,78,0,0,193,142,0,0,129,143,0,0,64,79,0,0,1,141,0,0,192,77,0,0,128,76,0,0,65,140,0,0,0,68,0,0,193,132,0,0,129,133,0,0,64,69,0,0,1,135,0,0,192,71,0,0,128,70,0,0,65,134,0,0,1,130,0,0,192,66,0,0,128,67,0,0,65,131,0,0,0,65,0,0,193,129,0,0,129,128,0,0,64,64,0,0,115,116,114,97,110,103,101,32,101,114,114,111,114,32,102,108,117,115,104,105,110,103,32,98,117,102,102,101,114,32,46,46,46,32,10,0,0,0,0,0,69,114,114,111,114,58,32,77,65,88,95,72,69,65,68,69,82,95,66,85,70,32,116,111,111,32,115,109,97,108,108,32,105,110,32,98,105,116,115,116,114,101,97,109,46,99,32,10,0,0,0,0,0,0,0,0,73,110,116,101,114,110,97,108,32,98,117,102,102,101,114,32,105,110,99,111,110,115,105,115,116,101,110,99,121,46,32,102,108,117,115,104,98,105,116,115,32,60,62,32,82,101,115,118,83,105,122,101,0,0,0,0,98,105,116,32,114,101,115,101,114,118,111,105,114,32,101,114,114,111,114,58,32,10,108,51,95,115,105,100,101,45,62,109,97,105,110,95,100,97,116,97,95,98,101,103,105,110,58,32,37,105,32,10,82,101,115,118,111,105,114,32,115,105,122,101,58,32,32,32,32,32,32,32,32,32,32,32,32,32,37,105,32,10,114,101,115,118,32,100,114,97,105,110,32,40,112,111,115,116,41,32,32,32,32,32,32,32,32,32,37,105,32,10,114,101,115,118,32,100,114,97,105,110,32,40,112,114,101,41,32,32,32,32,32,32,32,32,32,32,37,105,32,10,104,101,97,100,101,114,32,97,110,100,32,115,105,100,101,105,110,102,111,58,32,32,32,32,32,32,37,105,32,10,100,97,116,97,32,98,105,116,115,58,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,37,105,32,10,116,111,116,97,108,32,98,105,116,115,58,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,37,105,32,40,114,101,109,97,105,110,100,101,114,58,32,37,105,41,32,10,98,105,116,115,112,101,114,102,114,97,109,101,58,32,32,32,32,32,32,32,32,32,32,32,32,32,37,105,32,10,0,0,84,104,105,115,32,105,115,32,97,32,102,97,116,97,108,32,101,114,114,111,114,46,32,32,73,116,32,104,97,115,32,115,101,118,101,114,97,108,32,112,111,115,115,105,98,108,101,32,99,97,117,115,101,115,58,0,57,48,37,37,32,32,76,65,77,69,32,99,111,109,112,105,108,101,100,32,119,105,116,104,32,98,117,103,103,121,32,118,101,114,115,105,111,110,32,111,102,32,103,99,99,32,117,115,105,110,103,32,97,100,118,97,110,99,101,100,32,111,112,116,105,109,105,122,97,116,105,111,110,115,0,0,0,0,0,0,32,57,37,37,32,32,89,111,117,114,32,115,121,115,116,101,109,32,105,115,32,111,118,101,114,99,108,111,99,107,101,100,0,0,0,0,0,0,0,0,32,49,37,37,32,32,98,117,103,32,105,110,32,76,65,77,69,32,101,110,99,111,100,105,110,103,32,108,105,98,114,97,114,121,0,0,0,0,0,0,0,128,64,192,32,160,96,224,16,144,80,208,48,176,112,240,8,136,72,200,40,168,104,232,24,152,88,216,56,184,120,248,4,132,68,196,36,164,100,228,20,148,84,212,52,180,116,244,12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); -/* memory initializer */ allocate([94,131,108,63,21,239,195,62,109,196,126,63,54,189,200,61,67,236,127,63,176,10,201,60,196,254,127,63,136,15,201,59,88,88,88,0,0,0,0,0,37,108,117,0,0,0,0,0,105,109,97,103,101,47,112,110,103,0,0,0,0,0,0,0,105,109,97,103,101,47,103,105,102,0,0,0,0,0,0,0,105,109,97,103,101,47,106,112,101,103,0,0,0,0,0,0,37,100,0,0,0,0,0,0,128,187,0,0,0,0,0,0,0,0,208,64,0,0,0,0,0,0,208,64,148,92,0,0,68,172,0,0,0,0,0,0,0,0,208,64,0,0,0,0,0,0,208,64,20,85,0,0,0,125,0,0,0,0,208,64,0,0,0,65,102,102,166,64,0,0,208,64,184,61,0,0,192,93,0,0,0,0,0,65,0,0,8,65,102,102,166,64,0,0,192,64,74,46,0,0,34,86,0,0,0,0,8,65,246,40,16,65,102,102,166,64,0,0,208,64,140,42,0,0,128,62,0,0,246,40,16,65,102,102,22,65,205,204,156,64,0,0,208,64,223,30,0,0,224,46,0,0,102,102,22,65,154,153,25,65,0,0,144,64,0,0,192,64,40,23,0,0,17,43,0,0,154,153,25,65,102,102,30,65,51,51,163,64,0,0,208,64,70,21,0,0,64,31,0,0,102,102,30,65,0,0,32,65,205,204,156,64,0,0,208,64,112,15,0,0,8,0,0,0,208,7,0,0,16,0,0,0,116,14,0,0,24,0,0,0,60,15,0,0,32,0,0,0,124,21,0,0,40,0,0,0,88,27,0,0,48,0,0,0,76,29,0,0,56,0,0,0,16,39,0,0,64,0,0,0,248,42,0,0,80,0,0,0,188,52,0,0,96,0,0,0,252,58,0,0,112,0,0,0,240,60,0,0,128,0,0,0,104,66,0,0,160,0,0,0,92,68,0,0,192,0,0,0,168,72,0,0,224,0,0,0,200,75,0,0,0,1,0,0,244,76,0,0,64,1,0,0,20,80,0,0,44,76,0,0,56,74,0,0,168,72,0,0,80,70,0,0,92,68,0,0,128,62,0,0,240,60,0,0,52,58,0,0,212,48,0,0,16,39,0,0,110,15,0,0,0,0,0,0,192,93,0,0,44,76,0,0,68,72,0,0,80,70,0,0,92,68,0,0,104,66,0,0,116,64,0,0,240,60,0,0,96,59,0,0,62,28,0,0,110,15,0,0,0,0,0,0,44,76,0,0,56,74,0,0,68,72,0,0,80,70,0,0,92,68,0,0,116,64,0,0,140,60,0,0,164,56,0,0,212,48,0,0,28,37,0,0,110,15,0,0,0,0,0,0,102,102,182,64,0,0,208,64,154,153,233,64,51,51,3,65,0,0,32,65,102,102,62,65,0,0,80,65,0,0,96,65,0,0,112,65,0,0,132,65,87,97,114,110,105,110,103,58,32,104,105,103,104,112,97,115,115,32,102,105,108,116,101,114,32,100,105,115,97,98,108,101,100,46,32,32,104,105,103,104,112,97,115,115,32,102,114,101,113,117,101,110,99,121,32,116,111,111,32,115,109,97,108,108,10,0,0,0,0,0,0,0,69,114,114,111,114,58,32,99,97,110,39,116,32,97,108,108,111,99,97,116,101,32,105,110,95,98,117,102,102,101,114,32,98,117,102,102,101,114,10,0,0,0,0,0,1,0,0,0,16,0,0,0,17,0,0,0,8,0,0,0,9,0,0,0,24,0,0,0,25,0,0,0,4,0,0,0,5,0,0,0,20,0,0,0,21,0,0,0,12,0,0,0,13,0,0,0,28,0,0,0,29,0,0,0,2,0,0,0,3,0,0,0,18,0,0,0,19,0,0,0,10,0,0,0,11,0,0,0,26,0,0,0,27,0,0,0,6,0,0,0,7,0,0,0,22,0,0,0,23,0,0,0,14,0,0,0,15,0,0,0,30,0,0,0,31,0,0,0,0,27,134,42,204,204,52,43,33,78,132,43,252,247,157,43,88,156,166,43,252,247,157,43,33,78,132,43,204,204,52,43,0,27,134,42,83,248,191,44,254,169,171,44,146,50,149,44,159,129,122,44,239,29,73,44,62,186,23,44,116,173,207,43,133,159,107,43,183,89,146,42,83,248,191,172,254,169,171,172,146,50,149,172,159,129,122,172,239,29,73,172,62,186,23,172,116,173,207,171,133,159,107,171,183,89,146,170,0,27,134,170,204,204,52,171,33,78,132,171,252,247,157,171,88,156,166,171,252,247,157,171,33,78,132,171,204,204,52,171,0,27,134,170,0,27,134,42,204,204,52,43,33,78,132,43,252,247,157,43,88,156,166,43,252,247,157,43,33,78,132,43,204,204,52,43,0,27,134,42,83,248,191,44,254,169,171,44,146,50,149,44,159,129,122,44,239,29,73,44,62,186,23,44,116,173,207,43,133,159,107,43,183,89,146,42,37,39,192,172,51,37,173,172,234,209,152,172,227,84,131,172,249,175,89,172,11,14,43,172,102,34,244,171,201,49,137,171,74,123,157,170,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,144,128,170,174,79,227,170,5,174,113,170,234,207,6,62,205,19,212,62,139,111,68,63,255,175,139,63,23,208,166,63,117,235,200,63,190,226,245,63,122,130,26,64,105,251,74,64,185,87,144,64,107,16,243,64,233,58,183,65,92,28,124,63,187,141,36,63,68,29,175,62,178,143,112,63,212,208,49,190,125,27,68,191,215,179,93,63,0,0,0,63,254,181,3,191,218,134,241,190,2,115,160,190,116,71,58,190,29,176,193,189,135,203,39,189,29,161,104,188,70,123,114,187,168,132,91,63,216,185,97,63,221,26,115,63,129,186,123,63,65,218,126,63,253,200,127,63,101,249,127,63,141,255,127,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,144,128,42,174,79,227,42,5,174,113,42,37,39,192,44,51,37,173,44,234,209,152,44,227,84,131,44,249,175,89,44,11,14,43,44,102,34,244,43,201,49,137,43,74,123,157,42,83,248,191,172,254,169,171,172,146,50,149,172,159,129,122,172,239,29,73,172,62,186,23,172,116,173,207,171,133,159,107,171,183,89,146,170,0,27,134,170,204,204,52,171,33,78,132,171,252,247,157,171,88,156,166,171,252,247,157,171,33,78,132,171,204,204,52,171,0,27,134,170,121,207,23,190,138,59,1,66,164,51,148,67,155,200,92,68,202,167,45,70,175,40,132,68,192,222,152,67,129,155,246,65,199,156,118,64,77,183,109,66,194,101,49,68,74,15,165,69,82,45,182,197,71,104,76,196,73,213,153,194,66,4,147,192,94,6,104,63,54,189,72,62,3,97,30,190,44,76,9,66,68,231,150,67,96,102,76,68,47,215,52,70,17,168,147,68,117,204,160,67,46,219,249,65,68,124,109,64,146,154,86,66,183,10,43,68,136,68,163,69,35,243,198,197,129,62,99,196,80,169,179,194,43,42,173,192,1,24,82,63,194,197,199,62,223,144,36,190,144,150,16,66,32,15,152,67,140,47,55,68,113,86,59,70,101,128,162,68,120,164,167,67,193,231,251,65,149,237,87,64,209,237,60,66,46,47,35,68,80,99,160,69,178,232,215,197,240,127,122,196,100,62,207,194,121,91,195,192,207,220,61,63,49,160,20,63,61,91,42,190,177,1,23,66,106,129,151,67,98,254,28,68,14,27,65,70,229,136,176,68,246,95,173,67,75,201,252,65,52,59,74,64,173,80,34,66,178,10,26,68,170,126,156,69,83,240,232,197,121,249,136,196,253,124,236,194,231,48,218,192,193,13,43,63,21,239,67,63,139,188,47,190,75,118,28,66,177,43,149,67,81,195,251,67,92,30,70,70,161,146,189,68,23,254,177,67,116,41,251,65,165,166,58,64,77,48,7,66,62,185,15,68,225,169,151,69,144,236,249,197,102,184,148,196,253,164,5,195,130,12,247,192,196,112,25,63,234,90,113,63,120,177,52,190,11,224,32,66,197,255,144,67,75,169,179,67,9,89,74,70,63,131,201,68,227,108,181,67,12,94,248,65,73,159,52,64,49,233,215,65,148,121,4,68,250,250,145,69,153,95,5,198,224,82,160,196,230,149,21,195,193,75,10,193,185,213,8,63,218,57,142,63,244,54,185,190,93,45,36,66,238,197,138,67,123,163,67,67,193,197,77,70,150,52,212,68,118,180,183,67,208,116,244,65,169,3,34,64,173,143,160,65,68,192,240,67,195,135,139,69,122,165,13,198,28,180,171,196,130,42,38,195,136,83,25,193,112,40,242,62,153,103,162,63,55,74,189,190,167,146,37,66,148,165,130,67,182,247,78,65,135,96,80,70,71,144,221,68,247,225,184,67,182,2,238,65,153,191,25,64,113,224,84,65,226,71,215,67,116,104,132,69,186,183,21,198,32,182,182,196,153,32,55,195,248,124,43,193,205,19,212,62,243,4,181,63,187,232,192,190,91,122,38,66,227,13,113,67,88,242,59,195,65,40,82,70,237,132,229,68,213,190,184,67,201,3,232,65,16,147,4,64,105,242,216,64,110,227,188,67,47,102,121,69,214,134,29,198,81,62,193,196,85,96,72,195,235,212,61,193,80,50,183,62,3,228,197,63,71,16,196,190,73,155,36,66,18,122,88,67,23,20,203,195,140,28,83,70,216,249,235,68,185,166,183,67,247,22,225,65,11,250,244,63,71,16,196,62,69,237,161,67,91,2,105,69,239,4,37,198,124,38,203,196,16,160,89,195,54,63,80,193,66,80,155,62,49,219,212,63,46,15,21,191,242,108,33,66,98,51,60,67,83,17,32,196,220,60,83,70,70,243,240,68,238,104,181,67,38,192,215,65,112,137,223,63,88,12,180,192,157,166,134,67,47,214,87,69,149,32,44,198,6,85,212,196,16,196,106,195,193,157,98,193,212,63,128,62,152,197,225,63,57,182,22,191,234,239,28,66,206,194,27,67,244,79,94,196,226,141,82,70,182,97,244,68,249,56,178,67,221,40,207,65,124,229,200,63,57,233,50,193,16,207,86,67,160,18,70,69,73,205,50,198,21,165,220,196,104,176,123,195,1,246,119,193,175,175,75,62,94,131,236,63,230,143,74,191,36,147,21,66,35,102,239,66,16,227,143,196,201,17,81,70,166,76,246,68,130,2,174,67,22,218,197,65,28,72,177,63,12,95,131,193,224,12,33,67,81,229,51,69,247,251,56,198,140,255,227,196,139,36,134,195,184,137,134,193,100,229,23,62,11,250,244,63,223,202,75,191,201,237,12,66,223,9,160,66,174,0,178,196,45,207,78,70,187,185,246,68,213,254,168,67,51,80,186,65,197,91,178,63,32,204,168,193,139,247,216,66,54,123,33,69,232,158,62,198,230,72,234,196,148,31,142,195,218,232,144,193,220,181,201,61,190,20,251,63,15,177,127,191,152,64,2,66,94,213,19,66,106,66,213,196,38,205,75,70,66,172,245,68,70,55,163,67,112,102,177,65,251,108,153,63,81,248,202,193,231,35,102,66,180,6,15,69,179,170,67,198,226,90,239,196,151,161,149,195,66,6,155,193,60,57,73,61,109,196,254,63,54,211,37,70,68,177,165,69,175,113,104,68,69,51,54,68,128,12,144,67,180,213,129,66,2,0,241,65,34,63,131,64,49,19,72,70,167,49,243,68,86,182,156,67,170,105,166,65,251,100,249,68,112,3,16,65,17,158,233,193,0,0,0,0,0,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,102,102,166,64,0,0,250,66,102,102,134,192,154,153,201,192,154,153,153,64,0,0,128,63,0,0,0,0,0,0,0,0,2,0,0,0,21,0,0,0,236,81,120,63,0,0,160,64,0,0,200,66,1,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,154,153,169,64,0,0,250,66,102,102,102,192,51,51,179,192,0,0,144,64,0,0,192,63,0,0,0,0,0,0,0,0,2,0,0,0,21,0,0,0,205,204,172,63,0,0,160,64,0,0,200,66,2,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,51,51,179,64,0,0,250,66,205,204,12,192,0,0,96,192,51,51,51,64,0,0,0,64,0,0,0,0,0,0,0,0,2,0,0,0,21,0,0,0,82,184,190,63,0,0,160,64,0,0,200,66,3,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,154,153,185,64,0,0,2,67,102,102,230,191,51,51,51,192,102,102,38,64,0,0,64,64,0,0,128,192,0,0,0,0,2,0,0,0,20,0,0,0,133,235,209,63,0,0,160,64,0,0,200,66,4,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,0,0,192,64,0,0,7,67,51,51,51,191,205,204,140,191,205,204,140,63,0,0,96,64,0,0,0,193,0,0,0,0,2,0,0,0,0,0,0,0,184,30,229,63,0,0,160,64,0,0,200,66,5,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,205,204,204,64,0,0,12,67,0,0,0,63,205,204,204,62,0,0,240,192,0,0,128,64,0,0,64,193,23,183,81,57,0,0,0,0,0,0,0,0,154,153,249,63,0,0,160,64,0,0,200,66,6,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,31,133,43,63,102,102,38,63,51,51,107,193,0,0,208,64,0,0,152,193,23,183,209,57,0,0,0,0,0,0,0,0,51,51,19,64,0,0,160,64,0,0,200,66,7,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,205,204,76,63,0,0,64,63,154,153,157,193,0,0,0,65,0,0,176,193,82,73,29,58,0,0,0,0,0,0,0,0,205,204,44,64,0,0,160,64,0,0,200,66,8,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,154,153,153,63,51,51,147,63,0,0,220,193,0,0,32,65,0,0,184,193,52,128,55,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,64,0,0,200,66,9,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,205,204,204,63,205,204,204,63,0,0,16,194,0,0,48,65,0,0,200,193,23,183,81,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,64,0,0,200,66,10,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,0,0,0,64,0,0,0,64,0,0,16,194,0,0,64,65,0,0,200,193,23,183,81,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,64,0,0,200,66,0,0,0,0,0,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,102,102,134,64,0,0,200,65,154,153,217,192,154,153,217,192,51,51,227,64,0,0,128,63,0,0,0,0,0,0,0,0,2,0,0,0,31,0,0,0,0,0,128,63,0,0,160,64,0,0,200,66,1,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,102,102,134,64,0,0,200,65,154,153,153,192,154,153,153,192,205,204,172,64,51,51,179,63,0,0,128,191,0,0,0,0,2,0,0,0,27,0,0,0,178,157,143,63,0,0,160,64,0,0,196,66,2,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,102,102,134,64,0,0,200,65,102,102,38,192,102,102,38,192,205,204,108,64,0,0,0,64,0,0,64,192,0,0,0,0,2,0,0,0,23,0,0,0,47,221,164,63,0,0,160,64,0,0,194,66,3,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,102,102,134,64,0,0,200,65,205,204,204,191,205,204,204,191,0,0,0,64,0,0,0,64,0,0,160,192,0,0,0,0,2,0,0,0,18,0,0,0,223,79,189,63,0,0,160,64,0,0,192,66,4,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,102,102,134,64,0,0,200,65,0,0,0,128,0,0,0,128,0,0,0,0,0,0,0,64,0,0,0,193,0,0,0,0,2,0,0,0,12,0,0,0,16,88,217,63,0,0,160,64,0,0,190,66,5,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,102,102,134,64,0,0,200,65,102,102,166,63,102,102,166,63,0,0,192,192,0,0,96,64,0,0,48,193,0,0,0,0,2,0,0,0,8,0,0,0,154,153,249,63,0,0,160,64,102,102,188,66,6,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,0,0,144,64,0,0,200,66,205,204,12,64,51,51,19,64,0,0,64,193,0,0,192,64,0,0,96,193,0,0,0,0,2,0,0,0,4,0,0,0,199,75,15,64,0,0,64,64,205,204,187,66,7,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,154,153,153,64,0,0,72,67,205,204,44,64,205,204,44,64,0,0,144,193,0,0,16,65,0,0,136,193,0,0,0,0,2,0,0,0,0,0,0,0,225,122,36,64,0,0,128,63,51,51,187,66,8,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,154,153,169,64,0,0,150,67,51,51,51,64,51,51,51,64,0,0,168,193,0,0,32,65,0,0,184,193,23,183,81,57,0,0,0,0,0,0,0,0,47,221,60,64,0,0,0,0,154,153,186,66,9,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,150,67,51,51,51,64,51,51,51,64,0,0,184,193,0,0,48,65,0,0,200,193,82,73,29,58,0,0,0,0,0,0,0,0,254,212,88,64,0,0,0,0,154,153,186,66,10,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,0,0,200,65,0,0,150,67,51,51,51,64,51,51,51,64,0,0,200,193,0,0,64,65,0,0,216,193,10,215,35,59,0,0,0,0,0,0,0,0,0,0,96,64,0,0,0,0,154,153,186,66,0,0,0,0,8,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,240,193,0,0,48,65,82,73,157,58,1,0,0,0,16,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,200,193,0,0,48,65,111,18,131,58,1,0,0,0,24,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,160,193,0,0,48,65,111,18,131,58,1,0,0,0,32,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,112,193,0,0,48,65,111,18,131,58,1,0,0,0,40,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,32,193,0,0,48,65,250,237,107,58,1,0,0,0,48,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,32,193,0,0,48,65,250,237,107,58,1,0,0,0,56,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,192,192,0,0,48,65,23,183,81,58,1,0,0,0,64,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,0,192,0,0,48,65,23,183,81,58,1,0,0,0,80,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,0,0,0,0,0,65,52,128,55,58,1,0,0,0,96,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,32,64,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,128,63,0,0,176,64,82,73,29,58,1,0,0,0,112,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,16,64,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,0,64,0,0,144,64,111,18,3,58,1,0,0,0,128,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,154,153,249,63,205,204,204,64,0,0,12,67,51,51,115,63,0,0,0,0,0,0,64,64,0,0,128,64,23,183,81,57,1,0,0,0,160,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,184,30,229,63,0,0,192,64,0,0,7,67,51,51,115,63,0,0,0,192,0,0,160,64,0,0,96,64,0,0,0,0,1,0,0,0,192,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,82,184,190,63,51,51,179,64,0,0,250,66,236,81,120,63,0,0,128,192,0,0,224,64,0,0,64,64,0,0,0,0,0,0,0,0,224,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,0,0,160,63,102,102,166,64,0,0,250,66,72,225,122,63,0,0,192,192,0,0,16,65,0,0,0,64,0,0,0,0,0,0,0,0,0,1,0,0,9,0,0,0,9,0,0,0,1,0,0,0,236,81,120,63,102,102,166,64,0,0,250,66,0,0,128,63,0,0,0,193,0,0,32,65,0,0,128,63,0,0,0,0,0,0,0,0,64,1,0,0,9,0,0,0,9,0,0,0,1,0,0,0,102,102,102,63,102,102,166,64,0,0,250,66,0,0,128,63,0,0,32,193,0,0,64,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,128,63,54,89,75,63,152,134,33,63,152,134,33,63,152,134,33,63,152,134,33,63,152,134,33,63,250,155,128,62,153,158,240,61,0,0,0,0,0,0,0,0,0,0,0,0,137,158,227,63,229,83,236,63,167,94,245,63,155,20,249,63,14,217,252,63,123,143,234,63,218,151,217,63,226,132,191,63,124,145,168,63,0,0,128,63,0,0,0,0,0,0,0,0,205,204,60,65,154,153,89,65,154,153,137,65,0,0,0,66,0,0,58,66,51,51,77,66,0,0,102,66,51,51,134,66,0,0,143,66,51,51,169,66,51,51,195,66,0,0,2,67,154,153,217,64,154,153,185,64,154,153,185,64,205,204,204,64,0,0,208,64,102,102,30,65,154,153,65,65,102,102,102,65,0,0,112,65,51,51,151,65,205,204,172,65,51,51,215,65,205,204,8,66,205,204,32,66,51,51,59,66,0,0,98,66,205,204,114,66,205,204,147,66,102,102,171,66,205,204,186,66,51,51,252,66,0,0,0,0,205,204,236,192,205,204,236,192,205,204,236,192,0,0,24,193,205,204,236,192,51,51,195,192,0,0,176,192,102,102,150,192,102,102,150,192,102,102,150,192,102,102,150,192,0,0,0,0,73,78,84,69,82,78,65,76,32,69,82,82,79,82,32,73,78,32,86,66,82,32,78,69,87,32,67,79,68,69,44,32,112,108,101,97,115,101,32,115,101,110,100,32,98,117,103,32,114,101,112,111,114,116,10,0,6,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,9,0,0,0,9,0,0,0,9,0,0,0,9,0,0,0,6,0,0,0,9,0,0,0,9,0,0,0,9,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,3,0,0,0,9,0,0,0,9,0,0,0,12,0,0,0,6,0,0,0,6,0,0,0,9,0,0,0,12,0,0,0,6,0,0,0,11,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,12,0,0,0,12,0,0,0,12,0,0,0,0,0,0,0,6,0,0,0,15,0,0,0,12,0,0,0,0,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,12,0,0,0,9,0,0,0,9,0,0,0,6,0,0,0,6,0,0,0,12,0,0,0,9,0,0,0,6,0,0,0,8,0,0,0,8,0,0,0,5,0,0,0,0,0,0,0,15,0,0,0,12,0,0,0,9,0,0,0,0,0,0,0,6,0,0,0,18,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,116,0,0,0,140,0,0,0,168,0,0,0,200,0,0,0,238,0,0,0,28,1,0,0,80,1,0,0,140,1,0,0,208,1,0,0,10,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,32,0,0,0,42,0,0,0,56,0,0,0,74,0,0,0,100,0,0,0,132,0,0,0,174,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,114,0,0,0,136,0,0,0,162,0,0,0,194,0,0,0,232,0,0,0,22,1,0,0,76,1,0,0,138,1,0,0,208,1,0,0,28,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,26,0,0,0,36,0,0,0,48,0,0,0,62,0,0,0,80,0,0,0,104,0,0,0,136,0,0,0,180,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,116,0,0,0,140,0,0,0,168,0,0,0,200,0,0,0,238,0,0,0,28,1,0,0,80,1,0,0,140,1,0,0,208,1,0,0,10,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,26,0,0,0,36,0,0,0,48,0,0,0,62,0,0,0,80,0,0,0,104,0,0,0,134,0,0,0,174,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,20,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,52,0,0,0,62,0,0,0,74,0,0,0,90,0,0,0,110,0,0,0,134,0,0,0,162,0,0,0,196,0,0,0,238,0,0,0,32,1,0,0,86,1,0,0,162,1,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,22,0,0,0,30,0,0,0,40,0,0,0,52,0,0,0,66,0,0,0,84,0,0,0,106,0,0,0,136,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,20,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,42,0,0,0,50,0,0,0,60,0,0,0,72,0,0,0,88,0,0,0,106,0,0,0,128,0,0,0,156,0,0,0,190,0,0,0,230,0,0,0,20,1,0,0,74,1,0,0,128,1,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,22,0,0,0,28,0,0,0,38,0,0,0,50,0,0,0,64,0,0,0,80,0,0,0,100,0,0,0,126,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,20,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,82,0,0,0,102,0,0,0,126,0,0,0,156,0,0,0,194,0,0,0,240,0,0,0,40,1,0,0,108,1,0,0,192,1,0,0,38,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,22,0,0,0,30,0,0,0,42,0,0,0,58,0,0,0,78,0,0,0,104,0,0,0,138,0,0,0,180,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,116,0,0,0,140,0,0,0,168,0,0,0,200,0,0,0,238,0,0,0,28,1,0,0,80,1,0,0,140,1,0,0,208,1,0,0,10,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,26,0,0,0,36,0,0,0,48,0,0,0,62,0,0,0,80,0,0,0,104,0,0,0,134,0,0,0,174,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,116,0,0,0,140,0,0,0,168,0,0,0,200,0,0,0,238,0,0,0,28,1,0,0,80,1,0,0,140,1,0,0,208,1,0,0,10,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,26,0,0,0,36,0,0,0,48,0,0,0,62,0,0,0,80,0,0,0,104,0,0,0,134,0,0,0,174,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,24,0,0,0,36,0,0,0,48,0,0,0,60,0,0,0,72,0,0,0,88,0,0,0,108,0,0,0,132,0,0,0,160,0,0,0,192,0,0,0,232,0,0,0,24,1,0,0,80,1,0,0,144,1,0,0,220,1,0,0,54,2,0,0,56,2,0,0,58,2,0,0,60,2,0,0,62,2,0,0,64,2,0,0,0,0,0,0,8,0,0,0,16,0,0,0,24,0,0,0,36,0,0,0,52,0,0,0,72,0,0,0,96,0,0,0,124,0,0,0,160,0,0,0,162,0,0,0,164,0,0,0,166,0,0,0,192], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+6448); -/* memory initializer */ allocate([1,4,3,5,0,0,0,0,1,5,5,7,5,8,7,9,5,7,7,9,7,9,9,10,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,192,72,1,0,56,65,1,0,3,0,0,0,0,0,0,0,200,72,1,0,224,72,1,0,3,0,0,0,0,0,0,0,240,72,1,0,8,73,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,24,73,1,0,56,73,1,0,4,0,0,0,0,0,0,0,72,73,1,0,104,73,1,0,6,0,0,0,0,0,0,0,120,73,1,0,192,73,1,0,6,0,0,0,0,0,0,0,232,73,1,0,48,74,1,0,6,0,0,0,0,0,0,0,88,74,1,0,160,74,1,0,8,0,0,0,0,0,0,0,200,74,1,0,72,75,1,0,8,0,0,0,0,0,0,0,136,75,1,0,8,76,1,0,8,0,0,0,0,0,0,0,72,76,1,0,200,76,1,0,16,0,0,0,0,0,0,0,8,77,1,0,8,79,1,0,0,0,0,0,0,0,0,0,0,0,0,0,8,80,1,0,16,0,0,0,0,0,0,0,8,81,1,0,8,83,1,0,1,0,0,0,1,0,0,0,8,84,1,0,8,86,1,0,2,0,0,0,3,0,0,0,8,84,1,0,8,86,1,0,3,0,0,0,7,0,0,0,8,84,1,0,8,86,1,0,4,0,0,0,15,0,0,0,8,84,1,0,8,86,1,0,6,0,0,0,63,0,0,0,8,84,1,0,8,86,1,0,8,0,0,0,255,0,0,0,8,84,1,0,8,86,1,0,10,0,0,0,255,3,0,0,8,84,1,0,8,86,1,0,13,0,0,0,255,31,0,0,8,84,1,0,8,86,1,0,4,0,0,0,15,0,0,0,8,87,1,0,8,89,1,0,5,0,0,0,31,0,0,0,8,87,1,0,8,89,1,0,6,0,0,0,63,0,0,0,8,87,1,0,8,89,1,0,7,0,0,0,127,0,0,0,8,87,1,0,8,89,1,0,8,0,0,0,255,0,0,0,8,87,1,0,8,89,1,0,9,0,0,0,255,1,0,0,8,87,1,0,8,89,1,0,11,0,0,0,255,7,0,0,8,87,1,0,8,89,1,0,13,0,0,0,255,31,0,0,8,87,1,0,8,89,1,0,0,0,0,0,0,0,0,0,8,90,1,0,64,65,1,0,0,0,0,0,0,0,0,0,40,90,1,0,80,65,1,0,4,0,1,0,5,0,5,0,7,0,7,0,8,0,9,0,9,0,10,0,10,0,10,0,10,0,11,0,11,0,11,0,11,0,12,0,12,0,12,0,12,0,12,0,12,0,13,0,12,0,13,0,12,0,13,0,13,0,14,0,10,0,10,0,5,0,4,0,6,0,6,0,7,0,8,0,8,0,9,0,9,0,10,0,10,0,11,0,10,0,11,0,11,0,11,0,11,0,12,0,11,0,12,0,12,0,12,0,12,0,13,0,12,0,14,0,12,0,13,0,12,0,14,0,10,0,10,0,7,0,7,0,7,0,8,0,8,0,9,0,9,0,10,0,9,0,11,0,10,0,11,0,10,0,12,0,11,0,12,0,11,0,13,0,11,0,12,0,11,0,13,0,12,0,13,0,12,0,13,0,12,0,14,0,13,0,14,0,9,0,11,0,8,0,9,0,8,0,9,0,9,0,10,0,9,0,11,0,10,0,11,0,10,0,12,0,10,0,12,0,11,0,12,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,9,0,12,0,9,0,10,0,9,0,10,0,9,0,11,0,10,0,11,0,10,0,12,0,10,0,12,0,10,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,13,0,15,0,9,0,11,0,10,0,10,0,9,0,10,0,10,0,11,0,10,0,11,0,10,0,12,0,10,0,13,0,11,0,13,0,11,0,14,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,16,0,9,0,12,0,10,0,11,0,10,0,11,0,10,0,11,0,10,0,12,0,10,0,13,0,11,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,13,0,16,0,9,0,12,0,11,0,11,0,10,0,11,0,10,0,12,0,10,0,12,0,11,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,15,0,13,0,17,0,13,0,17,0,10,0,12,0,11,0,11,0,11,0,12,0,11,0,12,0,11,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,11,0,14,0,11,0,15,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,16,0,13,0,16,0,13,0,16,0,10,0,12,0,11,0,12,0,11,0,12,0,11,0,12,0,11,0,13,0,11,0,13,0,11,0,14,0,11,0,14,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,16,0,13,0,15,0,13,0,16,0,13,0,15,0,10,0,13,0,12,0,12,0,11,0,13,0,11,0,12,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,16,0,12,0,16,0,13,0,16,0,13,0,17,0,13,0,17,0,13,0,16,0,10,0,12,0,12,0,13,0,12,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,15,0,12,0,16,0,12,0,16,0,12,0,16,0,12,0,16,0,13,0,16,0,13,0,16,0,13,0,15,0,13,0,16,0,10,0,13,0,12,0,13,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,17,0,13,0,16,0,13,0,16,0,13,0,16,0,13,0,16,0,13,0,18,0,10,0,13,0,12,0,15,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,12,0,16,0,12,0,16,0,13,0,16,0,13,0,18,0,13,0,17,0,13,0,17,0,13,0,17,0,13,0,19,0,13,0,17,0,10,0,13,0,13,0,14,0,12,0,15,0,12,0,13,0,12,0,14,0,12,0,16,0,12,0,16,0,12,0,15,0,13,0,16,0,13,0,16,0,13,0,17,0,13,0,18,0,13,0,17,0,13,0,19,0,13,0,17,0,13,0,16,0,10,0,13,0,9,0,10,0,9,0,10,0,9,0,10,0,9,0,11,0,9,0,11,0,9,0,12,0,9,0,12,0,9,0,12,0,9,0,13,0,9,0,13,0,9,0,13,0,10,0,13,0,10,0,13,0,10,0,13,0,10,0,13,0,6,0,10,0,2,0,1,0,3,0,4,0,7,0,7,0,4,0,4,0,4,0,5,0,7,0,7,0,6,0,6,0,7,0,7,0,8,0,8,0,0,0,0,0,3,0,1,0,4,0,4,0,6,0,7,0,8,0,8,0,4,0,4,0,4,0,5,0,6,0,8,0,7,0,9,0,5,0,7,0,6,0,8,0,7,0,9,0,8,0,10,0,7,0,8,0,7,0,8,0,8,0,9,0,9,0,10,0,0,0,0,0,8,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,80,0,0,0,96,0,0,0,112,0,0,0,128,0,0,0,144,0,0,0,160,0,0,0,255,255,255,255,0,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,80,0,0,0,96,0,0,0,112,0,0,0,128,0,0,0,160,0,0,0,192,0,0,0,224,0,0,0,0,1,0,0,64,1,0,0,255,255,255,255,0,0,0,0,8,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,6,0,0,0,11,0,0,0,16,0,0,0,21,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,2,0,1,0,3,0,1,0,1,0,3,0,2,0,0,0,0,0,0,0,0,0,1,4,7,4,5,7,6,7,8,0,0,0,0,0,0,0,3,0,2,0,1,0,1,0,1,0,1,0,3,0,2,0,0,0,0,0,0,0,0,0,2,3,7,4,4,7,6,7,8,0,0,0,0,0,0,0,1,0,2,0,6,0,5,0,3,0,1,0,4,0,4,0,7,0,5,0,7,0,1,0,6,0,1,0,1,0,0,0,1,4,7,8,4,5,8,9,7,8,9,10,8,8,9,10,7,0,3,0,5,0,1,0,6,0,2,0,3,0,2,0,5,0,4,0,4,0,1,0,3,0,3,0,2,0,0,0,3,4,6,8,4,4,6,7,5,6,7,8,7,7,8,9,1,0,2,0,10,0,19,0,16,0,10,0,3,0,3,0,7,0,10,0,5,0,3,0,11,0,4,0,13,0,17,0,8,0,4,0,12,0,11,0,18,0,15,0,11,0,2,0,7,0,6,0,9,0,14,0,3,0,1,0,6,0,4,0,5,0,3,0,2,0,0,0,1,4,7,9,9,10,4,6,8,9,9,10,7,7,9,10,10,11,8,9,10,11,11,11,8,9,10,11,11,12,9,10,11,12,12,12,0,0,0,0,3,0,4,0,6,0,18,0,12,0,5,0,5,0,1,0,2,0,16,0,9,0,3,0,7,0,3,0,5,0,14,0,7,0,3,0,19,0,17,0,15,0,13,0,10,0,4,0,13,0,5,0,8,0,11,0,5,0,1,0,12,0,4,0,4,0,1,0,1,0,0,0,2,4,7,9,9,10,4,4,6,10,10,10,7,6,8,10,10,11,9,10,10,11,11,12,9,9,10,11,12,12,10,10,11,11,13,13,0,0,0,0,7,0,5,0,9,0,14,0,15,0,7,0,6,0,4,0,5,0,5,0,6,0,7,0,7,0,6,0,8,0,8,0,8,0,5,0,15,0,6,0,9,0,10,0,5,0,1,0,11,0,7,0,9,0,6,0,4,0,1,0,14,0,4,0,6,0,2,0,6,0,0,0,3,4,6,7,9,10,4,5,6,7,8,10,5,6,7,8,9,10,7,7,8,9,9,10,8,8,9,9,10,11,9,9,10,10,11,11,0,0,0,0,1,0,2,0,10,0,23,0,35,0,30,0,12,0,17,0,3,0,3,0,8,0,12,0,18,0,21,0,12,0,7,0,11,0,9,0,15,0,21,0,32,0,40,0,19,0,6,0,14,0,13,0,22,0,34,0,46,0,23,0,18,0,7,0,20,0,19,0,33,0,47,0,27,0,22,0,9,0,3,0,31,0,22,0,41,0,26,0,21,0,20,0,5,0,3,0,14,0,13,0,10,0,11,0,16,0,6,0,5,0,1,0,9,0,8,0,7,0,8,0,4,0,4,0,2,0,0,0,1,4,7,9,10,10,10,11,4,6,8,9,10,11,10,10,7,8,9,10,11,12,11,11,8,9,10,11,12,12,11,12,9,10,11,12,12,12,12,12,10,11,12,12,13,13,12,13,9,10,11,12,12,12,13,13,10,10,11,12,12,13,13,13,3,0,4,0,10,0,24,0,34,0,33,0,21,0,15,0,5,0,3,0,4,0,10,0,32,0,17,0,11,0,10,0,11,0,7,0,13,0,18,0,30,0,31,0,20,0,5,0,25,0,11,0,19,0,59,0,27,0,18,0,12,0,5,0,35,0,33,0,31,0,58,0,30,0,16,0,7,0,5,0,28,0,26,0,32,0,19,0,17,0,15,0,8,0,14,0,14,0,12,0,9,0,13,0,14,0,9,0,4,0,1,0,11,0,4,0,6,0,6,0,6,0,3,0,2,0,0,0,2,4,6,8,9,10,9,10,4,5,6,8,10,10,9,10,6,7,8,9,10,11,10,10,8,8,9,11,10,12,10,11,9,10,10,11,11,12,11,12,9,10,11,12,12,13,12,13,9,9,9,10,11,12,12,12,9,9,10,11,12,12,12,12,9,0,6,0,16,0,33,0,41,0,39,0,38,0,26,0,7,0,5,0,6,0,9,0,23,0,16,0,26,0,11,0,17,0,7,0,11,0,14,0,21,0,30,0,10,0,7,0,17,0,10,0,15,0,12,0,18,0,28,0,14,0,5,0,32,0,13,0,22,0,19,0,18,0,16,0,9,0,5,0,40,0,17,0,31,0,29,0,17,0,13,0,4,0,2,0,27,0,12,0,11,0,15,0,10,0,7,0,4,0,1,0,27,0,12,0,8,0,12,0,6,0,3,0,1,0,0,0,4,4,6,8,9,10,10,10,4,5,6,7,9,9,10,10,6,6,7,8,9,10,9,10,7,7,8,8,9,10,10,10,8,8,9,9,10,10,10,11,9,9,10,10,10,11,10,11,9,9,9,10,10,11,11,12,10,10,10,11,11,11,11,12,1,0,5,0,14,0,21,0,34,0,51,0,46,0,71,0,42,0,52,0,68,0,52,0,67,0,44,0,43,0,19,0,3,0,4,0,12,0,19,0,31,0,26,0,44,0,33,0,31,0,24,0,32,0,24,0,31,0,35,0,22,0,14,0,15,0,13,0,23,0,36,0,59,0,49,0,77,0,65,0,29,0,40,0,30,0,40,0,27,0,33,0,42,0,16,0,22,0,20,0,37,0,61,0,56,0,79,0,73,0,64,0,43,0,76,0,56,0,37,0,26,0,31,0,25,0,14,0,35,0,16,0,60,0,57,0,97,0,75,0,114,0,91,0,54,0,73,0,55,0,41,0,48,0,53,0,23,0,24,0,58,0,27,0,50,0,96,0,76,0,70,0,93,0,84,0,77,0,58,0,79,0,29,0,74,0,49,0,41,0,17,0,47,0,45,0,78,0,74,0,115,0,94,0,90,0,79,0,69,0,83,0,71,0,50,0,59,0,38,0,36,0,15,0,72,0,34,0,56,0,95,0,92,0,85,0,91,0,90,0,86,0,73,0,77,0,65,0,51,0,44,0,43,0,42,0,43,0,20,0,30,0,44,0,55,0,78,0,72,0,87,0,78,0,61,0,46,0,54,0,37,0,30,0,20,0,16,0,53,0,25,0,41,0,37,0,44,0,59,0,54,0,81,0,66,0,76,0,57,0,54,0,37,0,18,0,39,0,11,0,35,0,33,0,31,0,57,0,42,0,82,0,72,0,80,0,47,0,58,0,55,0,21,0,22,0,26,0,38,0,22,0,53,0,25,0,23,0,38,0,70,0,60,0,51,0,36,0,55,0,26,0,34,0,23,0,27,0,14,0,9,0,7,0,34,0,32,0,28,0,39,0,49,0,75,0,30,0,52,0,48,0,40,0,52,0,28,0,18,0,17,0,9,0,5,0,45,0,21,0,34,0,64,0,56,0,50,0,49,0,45,0,31,0,19,0,12,0,15,0,10,0,7,0,6,0,3,0,48,0,23,0,20,0,39,0,36,0,35,0,53,0,21,0,16,0,23,0,13,0,10,0,6,0,1,0,4,0,2,0,16,0,15,0,17,0,27,0,25,0,20,0,29,0,11,0,17,0,12,0,16,0,8,0,1,0,1,0,0,0,1,0,1,5,7,8,9,10,10,11,10,11,12,12,13,13,14,14,4,6,8,9,10,10,11,11,11,11,12,12,13,14,14,14,7,8,9,10,11,11,12,12,11,12,12,13,13,14,15,15,8,9,10,11,11,12,12,12,12,13,13,13,13,14,15,15,9,9,11,11,12,12,13,13,12,13,13,14,14,15,15,16,10,10,11,12,12,12,13,13,13,13,14,13,15,15,16,16,10,11,12,12,13,13,13,13,13,14,14,14,15,15,16,16,11,11,12,13,13,13,14,14,14,14,15,15,15,16,18,18,10,10,11,12,12,13,13,14,14,14,14,15,15,16,17,17,11,11,12,12,13,13,13,15,14,15,15,16,16,16,18,17,11,12,12,13,13,14,14,15,14,15,16,15,16,17,18,19,12,12,12,13,14,14,14,14,15,15,15,16,17,17,17,18,12,13,13,14,14,15,14,15,16,16,17,17,17,18,18,18,13,13,14,15,15,15,16,16,16,16,16,17,18,17,18,18,14,14,14,15,15,15,17,16,16,19,17,17,17,19,18,18,13,14,15,16,16,16,17,16,17,17,18,18,21,20,21,18,1,5,7,9,10,10,11,11,12,12,12,13,13,13,14,11,4,6,8,9,10,11,11,11,12,12,12,13,14,13,14,11,7,8,9,10,11,11,12,12,13,12,13,13,13,14,14,12,9,9,10,11,11,12,12,12,13,13,14,14,14,15,15,13,10,10,11,11,12,12,13,13,13,14,14,14,15,15,15,12,10,10,11,11,12,13,13,14,13,14,14,15,15,15,16,13,11,11,11,12,13,13,13,13,14,14,14,14,15,15,16,13,11,11,12,12,13,13,13,14,14,15,15,15,15,17,17,13,11,12,12,13,13,13,14,14,15,15,15,15,16,16,16,13,12,12,12,13,13,14,14,15,15,15,15,16,15,16,15,14,12,13,12,13,14,14,14,14,15,16,16,16,17,17,16,13,13,13,13,13,14,14,15,16,16,16,16,16,16,15,16,14,13,14,14,14,14,15,15,15,15,17,16,16,16,16,18,14,15,14,14,14,15,15,16,16,16,18,17,17,17,19,17,14,14,15,13,14,16,16,15,16,16,17,18,17,19,17,16,14,11,11,11,12,12,13,13,13,14,14,14,14,14,14,14,12,7,0,12,0,18,0,53,0,47,0,76,0,124,0,108,0,89,0,123,0,108,0,119,0,107,0,81,0,122,0,63,0,13,0,5,0,16,0,27,0,46,0,36,0,61,0,51,0,42,0,70,0,52,0,83,0,65,0,41,0,59,0,36,0,19,0,17,0,15,0,24,0,41,0,34,0,59,0,48,0,40,0,64,0,50,0,78,0,62,0,80,0,56,0,33,0,29,0,28,0,25,0,43,0,39,0,63,0,55,0,93,0,76,0,59,0,93,0,72,0,54,0,75,0,50,0,29,0,52,0,22,0,42,0,40,0,67,0,57,0,95,0,79,0,72,0,57,0,89,0,69,0,49,0,66,0,46,0,27,0,77,0,37,0,35,0,66,0,58,0,52,0,91,0,74,0,62,0,48,0,79,0,63,0,90,0,62,0,40,0,38,0,125,0,32,0,60,0,56,0,50,0,92,0,78,0,65,0,55,0,87,0,71,0,51,0,73,0,51,0,70,0,30,0,109,0,53,0,49,0,94,0,88,0,75,0,66,0,122,0,91,0,73,0,56,0,42,0,64,0,44,0,21,0,25,0,90,0,43,0,41,0,77,0,73,0,63,0,56,0,92,0,77,0,66,0,47,0,67,0,48,0,53,0,36,0,20,0,71,0,34,0,67,0,60,0,58,0,49,0,88,0,76,0,67,0,106,0,71,0,54,0,38,0,39,0,23,0,15,0,109,0,53,0,51,0,47,0,90,0,82,0,58,0,57,0,48,0,72,0,57,0,41,0,23,0,27,0,62,0,9,0,86,0,42,0,40,0,37,0,70,0,64,0,52,0,43,0,70,0,55,0,42,0,25,0,29,0,18,0,11,0,11,0,118,0,68,0,30,0,55,0,50,0,46,0,74,0,65,0,49,0,39,0,24,0,16,0,22,0,13,0,14,0,7,0,91,0,44,0,39,0,38,0,34,0,63,0,52,0,45,0,31,0,52,0,28,0,19,0,14,0,8,0,9,0,3,0,123,0,60,0,58,0,53,0,47,0,43,0,32,0,22,0,37,0,24,0,17,0,12,0,15,0,10,0,2,0,1,0,71,0,37,0,34,0,30,0,28,0,20,0,17,0,26,0,21,0,16,0,10,0,6,0,8,0,6,0,2,0,0,0,3,5,6,8,8,9,10,10,10,11,11,12,12,12,13,14,5,5,7,8,9,9,10,10,10,11,11,12,12,12,13,13,6,7,7,8,9,9,10,10,10,11,11,12,12,13,13,13,7,8,8,9,9,10,10,11,11,11,12,12,12,13,13,13,8,8,9,9,10,10,11,11,11,11,12,12,12,13,13,13,9,9,9,10,10,10,11,11,11,11,12,12,13,13,13,14,10,9,10,10,10,11,11,11,11,12,12,12,13,13,14,14,10,10,10,11,11,11,11,12,12,12,12,12,13,13,13,14,10,10,10,11,11,11,11,12,12,12,12,13,13,14,14,14,10,10,11,11,11,11,12,12,12,13,13,13,13,14,14,14,11,11,11,11,12,12,12,12,12,13,13,13,13,14,15,14,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,15,12,12,11,12,12,12,13,13,13,13,13,13,14,14,15,15,12,12,12,12,12,13,13,13,13,14,14,14,14,14,15,15,13,13,13,13,13,13,13,13,14,14,14,14,15,15,14,15,13,13,13,13,13,13,13,14,14,14,14,14,15,15,15,15,1,0,5,0,14,0,44,0,74,0,63,0,110,0,93,0,172,0,149,0,138,0,242,0,225,0,195,0,120,1,17,0,3,0,4,0,12,0,20,0,35,0,62,0,53,0,47,0,83,0,75,0,68,0,119,0,201,0,107,0,207,0,9,0,15,0,13,0,23,0,38,0,67,0,58,0,103,0,90,0,161,0,72,0,127,0,117,0,110,0,209,0,206,0,16,0,45,0,21,0,39,0,69,0,64,0,114,0,99,0,87,0,158,0,140,0,252,0,212,0,199,0,131,1,109,1,26,0,75,0,36,0,68,0,65,0,115,0,101,0,179,0,164,0,155,0,8,1,246,0,226,0,139,1,126,1,106,1,9,0,66,0,30,0,59,0,56,0,102,0,185,0,173,0,9,1,142,0,253,0,232,0,144,1,132,1,122,1,189,1,16,0,111,0,54,0,52,0,100,0,184,0,178,0,160,0,133,0,1,1,244,0,228,0,217,0,129,1,110,1,203,2,10,0,98,0,48,0,91,0,88,0,165,0,157,0,148,0,5,1,248,0,151,1,141,1,116,1,124,1,121,3,116,3,8,0,85,0,84,0,81,0,159,0,156,0,143,0,4,1,249,0,171,1,145,1,136,1,127,1,215,2,201,2,196,2,7,0,154,0,76,0,73,0,141,0,131,0,0,1,245,0,170,1,150,1,138,1,128,1,223,2,103,1,198,2,96,1,11,0,139,0,129,0,67,0,125,0,247,0,233,0,229,0,219,0,137,1,231,2,225,2,208,2,117,3,114,3,183,1,4,0,243,0,120,0,118,0,115,0,227,0,223,0,140,1,234,2,230,2,224,2,209,2,200,2,194,2,223,0,180,1,6,0,202,0,224,0,222,0,218,0,216,0,133,1,130,1,125,1,108,1,120,3,187,1,195,2,184,1,181,1,192,6,4,0,235,2,211,0,210,0,208,0,114,1,123,1,222,2,211,2,202,2,199,6,115,3,109,3,108,3,131,13,97,3,2,0,121,1,113,1,102,0,187,0,214,2,210,2,102,1,199,2,197,2,98,3,198,6,103,3,130,13,102,3,178,1,0,0,12,0,10,0,7,0,11,0,10,0,17,0,11,0,9,0,13,0,12,0,10,0,7,0,5,0,3,0,1,0,3,0,1,5,7,9,10,10,11,11,12,12,12,13,13,13,14,10,4,6,8,9,10,11,11,11,12,12,12,13,14,13,14,10,7,8,9,10,11,11,12,12,13,12,13,13,13,14,14,11,9,9,10,11,11,12,12,12,13,13,14,14,14,15,15,12,10,10,11,11,12,12,13,13,13,14,14,14,15,15,15,11,10,10,11,11,12,13,13,14,13,14,14,15,15,15,16,12,11,11,11,12,13,13,13,13,14,14,14,14,15,15,16,12,11,11,12,12,13,13,13,14,14,15,15,15,15,17,17,12,11,12,12,13,13,13,14,14,15,15,15,15,16,16,16,12,12,12,12,13,13,14,14,15,15,15,15,16,15,16,15,13,12,13,12,13,14,14,14,14,15,16,16,16,17,17,16,12,13,13,13,13,14,14,15,16,16,16,16,16,16,15,16,13,13,14,14,14,14,15,15,15,15,17,16,16,16,16,18,13,15,14,14,14,15,15,16,16,16,18,17,17,17,19,17,13,14,15,13,14,16,16,15,16,16,17,18,17,19,17,16,13,10,10,10,11,11,12,12,12,13,13,13,13,13,13,13,10,15,0,13,0,46,0,80,0,146,0,6,1,248,0,178,1,170,1,157,2,141,2,137,2,109,2,5,2,8,4,88,0,14,0,12,0,21,0,38,0,71,0,130,0,122,0,216,0,209,0,198,0,71,1,89,1,63,1,41,1,23,1,42,0,47,0,22,0,41,0,74,0,68,0,128,0,120,0,221,0,207,0,194,0,182,0,84,1,59,1,39,1,29,2,18,0,81,0,39,0,75,0,70,0,134,0,125,0,116,0,220,0,204,0,190,0,178,0,69,1,55,1,37,1,15,1,16,0,147,0,72,0,69,0,135,0,127,0,118,0,112,0,210,0,200,0,188,0,96,1,67,1,50,1,29,1,28,2,14,0,7,1,66,0,129,0,126,0,119,0,114,0,214,0,202,0,192,0,180,0,85,1,61,1,45,1,25,1,6,1,12,0,249,0,123,0,121,0,117,0,113,0,215,0,206,0,195,0,185,0,91,1,74,1,52,1,35,1,16,1,8,2,10,0,179,1,115,0,111,0,109,0,211,0,203,0,196,0,187,0,97,1,76,1,57,1,42,1,27,1,19,2,125,1,17,0,171,1,212,0,208,0,205,0,201,0,193,0,186,0,177,0,169,0,64,1,47,1,30,1,12,1,2,2,121,1,16,0,79,1,199,0,197,0,191,0,189,0,181,0,174,0,77,1,65,1,49,1,33,1,19,1,9,2,123,1,115,1,11,0,156,2,184,0,183,0,179,0,175,0,88,1,75,1,58,1,48,1,34,1,21,1,18,2,127,1,117,1,110,1,10,0,140,2,90,1,171,0,168,0,164,0,62,1,53,1,43,1,31,1,20,1,7,1,1,2,119,1,112,1,106,1,6,0,136,2,66,1,60,1,56,1,51,1,46,1,36,1,28,1,13,1,5,1,0,2,120,1,114,1,108,1,103,1,4,0,108,2,44,1,40,1,38,1,32,1,26,1,17,1,10,1,3,2,124,1,118,1,113,1,109,1,105,1,101,1,2,0,9,4,24,1,22,1,18,1,11,1,8,1,3,1,126,1,122,1,116,1,111,1,107,1,104,1,102,1,100,1,0,0,43,0,20,0,19,0,17,0,15,0,13,0,11,0,9,0,7,0,6,0,4,0,7,0,5,0,3,0,1,0,3,0,4,5,7,8,9,10,10,11,11,12,12,12,12,12,13,10,5,6,7,8,9,10,10,11,11,11,12,12,12,12,12,10,7,7,8,9,9,10,10,11,11,11,11,12,12,12,13,9,8,8,9,9,10,10,10,11,11,11,11,12,12,12,12,9,9,9,9,10,10,10,10,11,11,11,12,12,12,12,13,9,10,9,10,10,10,10,11,11,11,11,12,12,12,12,12,9,10,10,10,10,10,11,11,11,11,12,12,12,12,12,13,9,11,10,10,10,11,11,11,11,12,12,12,12,12,13,13,10,11,11,11,11,11,11,11,11,11,12,12,12,12,13,13,10,11,11,11,11,11,11,11,12,12,12,12,12,13,13,13,10,12,11,11,11,11,12,12,12,12,12,12,13,13,13,13,10,12,12,11,11,11,12,12,12,12,12,12,13,13,13,13,10,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,10,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,10,13,12,12,12,12,12,12,13,13,13,13,13,13,13,13,10,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,6,1,0,10,0,8,0,20,0,12,0,20,0,16,0,32,0,14,0,12,0,24,0,0,0,28,0,16,0,24,0,16,0,15,0,28,0,26,0,48,0,22,0,40,0,36,0,64,0,14,0,24,0,20,0,32,0,12,0,16,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,8,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,8,0,0,0,8,0,0,0,8,0,0,0,16,0,0,0,16,0,0,0,1,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,1,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,4,0,0,0,8,0,0,0,0,0,0,0,18,0,0,0,36,0,0,0,54,0,0,0,51,0,0,0,35,0,0,0,53,0,0,0,71,0,0,0,52,0,0,0,70,0,0,0,88,0,0,0,69,0,0,0,87,0,0,0,105,0,0,0,104,0,0,0,122,0,0,0,0,0,0,0,18,0,0,0,36,0,0,0,54,0,0,0,54,0,0,0,36,0,0,0,54,0,0,0,72,0,0,0,54,0,0,0,72,0,0,0,90,0,0,0,72,0,0,0,90,0,0,0,108,0,0,0,108,0,0,0,126,0,0,0,0,0,0,0,10,0,0,0,20,0,0,0,30,0,0,0,33,0,0,0,21,0,0,0,31,0,0,0,41,0,0,0,32,0,0,0,42,0,0,0,52,0,0,0,43,0,0,0,53,0,0,0,63,0,0,0,64,0,0,0,74,0,0,0,15,0,0,0,15,0,0,0,7,0,0,0,7,0,0,0,15,0,0,0,15,0,0,0,7,0,0,0,0,0,0,0,7,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,31,0,0,0,31,0,0,0,0,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,6,0,0,0,5,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,7,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,1,0,0,0,2,0,0,0,5,0,0,0,7,0,0,0,7,0,0,0,10,0,0,0,10,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,0,0,0,0,8,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,80,0,0,0,96,0,0,0,112,0,0,0,128,0,0,0,160,0,0,0,192,0,0,0,224,0,0,0,0,1,0,0,64,1], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+82224); -/* memory initializer */ allocate([51,46,57,57,46,53,0,0,93,61,127,102,158,160,230,63,0,0,0,0,0,136,57,61,68,23,117,250,82,176,230,63,0,0,0,0,0,0,216,60,254,217,11,117,18,192,230,63,0,0,0,0,0,120,40,189,191,118,212,221,220,207,230,63,0,0,0,0,0,192,30,61,41,26,101,60,178,223,230,63,0,0,0,0,0,0,216,188,227,58,89,152,146,239,230,63,0,0,0,0,0,0,188,188,134,147,81,249,125,255,230,63,0,0,0,0,0,216,47,189,163,45,244,102,116,15,231,63,0,0,0,0,0,136,44,189,195,95,236,232,117,31,231,63,0,0,0,0,0,192,19,61,5,207,234,134,130,47,231,63,0,0,0,0,0,48,56,189,82,129,165,72,154,63,231,63,0,0,0,0,0,192,0,189,252,204,215,53,189,79,231,63,0,0,0,0,0,136,47,61,241,103,66,86,235,95,231,63,0,0,0,0,0,224,3,61,72,109,171,177,36,112,231,63,0,0,0,0,0,208,39,189,56,93,222,79,105,128,231,63,0,0,0,0,0,0,221,188,0,29,172,56,185,144,231,63,0,0,0,0,0,0,227,60,120,1,235,115,20,161,231,63,0,0,0,0,0,0,237,188,96,208,118,9,123,177,231,63,0,0,0,0,0,64,32,61,51,193,48,1,237,193,231,63,0,0,0,0,0,0,160,60,54,134,255,98,106,210,231,63,0,0,0,0,0,144,38,189,59,78,207,54,243,226,231,63,0,0,0,0,0,224,2,189,232,195,145,132,135,243,231,63,0,0,0,0,0,88,36,189,78,27,62,84,39,4,232,63,0,0,0,0,0,0,51,61,26,7,209,173,210,20,232,63,0,0,0,0,0,0,15,61,126,205,76,153,137,37,232,63,0,0,0,0,0,192,33,189,208,66,185,30,76,54,232,63,0,0,0,0,0,208,41,61,181,202,35,70,26,71,232,63,0,0,0,0,0,16,71,61,188,91,159,23,244,87,232,63,0,0,0,0,0,96,34,61,175,145,68,155,217,104,232,63,0,0,0,0,0,196,50,189,149,163,49,217,202,121,232,63,0,0,0,0,0,0,35,189,184,101,138,217,199,138,232,63,0,0,0,0,0,128,42,189,0,88,120,164,208,155,232,63,0,0,0,0,0,0,237,188,35,162,42,66,229,172,232,63,0,0,0,0,0,40,51,61,250,25,214,186,5,190,232,63,0,0,0,0,0,180,66,61,131,67,181,22,50,207,232,63,0,0,0,0,0,208,46,189,76,102,8,94,106,224,232,63,0,0,0,0,0,80,32,189,7,120,21,153,174,241,232,63,0,0,0,0,0,40,40,61,14,44,40,208,254,2,233,63,0,0,0,0,0,176,28,189,150,255,145,11,91,20,233,63,0,0,0,0,0,224,5,189,249,47,170,83,195,37,233,63,0,0,0,0,0,64,245,60,74,198,205,176,55,55,233,63,0,0,0,0,0,32,23,61,174,152,95,43,184,72,233,63,0,0,0,0,0,0,9,189,203,82,200,203,68,90,233,63,0,0,0,0,0,104,37,61,33,111,118,154,221,107,233,63,0,0,0,0,0,208,54,189,42,78,222,159,130,125,233,63,0,0,0,0,0,0,1,189,163,35,122,228,51,143,233,63,0,0,0,0,0,0,45,61,4,6,202,112,241,160,233,63,0,0,0,0,0,164,56,189,137,255,83,77,187,178,233,63,0,0,0,0,0,92,53,61,91,241,163,130,145,196,233,63,0,0,0,0,0,184,38,61,197,184,75,25,116,214,233,63,0,0,0,0,0,0,236,188,142,35,227,25,99,232,233,63,0,0,0,0,0,208,23,61,2,243,7,141,94,250,233,63,0,0,0,0,0,64,22,61,77,229,93,123,102,12,234,63,0,0,0,0,0,0,245,188,246,184,142,237,122,30,234,63,0,0,0,0,0,224,9,61,39,46,74,236,155,48,234,63,0,0,0,0,0,216,42,61,93,10,70,128,201,66,234,63,0,0,0,0,0,240,26,189,155,37,62,178,3,85,234,63,0,0,0,0,0,96,11,61,19,98,244,138,74,103,234,63,0,0,0,0,0,136,56,61,167,179,48,19,158,121,234,63,0,0,0,0,0,32,17,61,141,46,193,83,254,139,234,63,0,0,0,0,0,192,6,61,210,252,121,85,107,158,234,63,0,0,0,0,0,184,41,189,184,111,53,33,229,176,234,63,0,0,0,0,0,112,43,61,129,243,211,191,107,195,234,63,0,0,0,0,0,0,217,60,128,39,60,58,255,213,234,63,0,0,0,0,0,0,228,60,163,210,90,153,159,232,234,63,0,0,0,0,0,144,44,189,103,243,34,230,76,251,234,63,0,0,0,0,0,80,22,61,144,183,141,41,7,14,235,63,0,0,0,0,0,212,47,61,169,137,154,108,206,32,235,63,0,0,0,0,0,112,18,61,75,26,79,184,162,51,235,63,0,0,0,0,0,71,77,61,231,71,183,21,132,70,235,63,0,0,0,0,0,56,56,189,58,89,229,141,114,89,235,63,0,0,0,0,0,0,152,60,106,197,241,41,110,108,235,63,0,0,0,0,0,208,10,61,80,94,251,242,118,127,235,63,0,0,0,0,0,128,222,60,178,73,39,242,140,146,235,63,0,0,0,0,0,192,4,189,3,6,161,48,176,165,235,63,0,0,0,0,0,112,13,189,102,111,154,183,224,184,235,63,0,0,0,0,0,144,13,61,255,193,75,144,30,204,235,63,0,0,0,0,0,160,2,61,111,161,243,195,105,223,235,63,0,0,0,0,0,120,31,189,184,29,215,91,194,242,235,63,0,0,0,0,0,160,16,189,233,178,65,97,40,6,236,63,0,0,0,0,0,64,17,189,224,82,133,221,155,25,236,63,0,0,0,0,0,224,11,61,238,100,250,217,28,45,236,63,0,0,0,0,0,64,9,189,47,208,255,95,171,64,236,63,0,0,0,0,0,208,14,189,21,253,250,120,71,84,236,63,0,0,0,0,0,102,57,61,203,208,87,46,241,103,236,63,0,0,0,0,0,16,26,189,182,193,136,137,168,123,236,63,0,0,0,0,128,69,88,189,51,231,6,148,109,143,236,63,0,0,0,0,0,72,26,189,223,196,81,87,64,163,236,63,0,0,0,0,0,0,203,60,148,144,239,220,32,183,236,63,0,0,0,0,0,64,1,61,137,22,109,46,15,203,236,63,0,0,0,0,0,32,240,60,18,196,93,85,11,223,236,63,0,0,0,0,0,96,243,60,59,171,91,91,21,243,236,63,0,0,0,0,0,144,6,189,188,137,7,74,45,7,237,63,0,0,0,0,0,160,9,61,250,200,8,43,83,27,237,63,0,0,0,0,0,224,21,189,133,138,13,8,135,47,237,63,0,0,0,0,0,40,29,61,3,162,202,234,200,67,237,63,0,0,0,0,0,160,1,61,145,164,251,220,24,88,237,63,0,0,0,0,0,0,223,60,161,230,98,232,118,108,237,63,0,0,0,0,0,160,3,189,78,131,201,22,227,128,237,63,0,0,0,0,0,216,12,189,144,96,255,113,93,149,237,63,0,0,0,0,0,192,244,60,174,50,219,3,230,169,237,63,0,0,0,0,0,144,255,60,37,131,58,214,124,190,237,63,0,0,0,0,0,128,233,60,69,180,1,243,33,211,237,63,0,0,0,0,0,32,245,188,191,5,28,100,213,231,237,63,0,0,0,0,0,112,29,189,236,154,123,51,151,252,237,63,0,0,0,0,0,20,22,189,94,125,25,107,103,17,238,63,0,0,0,0,0,72,11,61,231,163,245,20,70,38,238,63,0,0,0,0,0,206,64,61,92,238,22,59,51,59,238,63,0,0,0,0,0,104,12,61,180,63,139,231,46,80,238,63,0,0,0,0,0,48,9,189,104,109,103,36,57,101,238,63,0,0,0,0,0,0,229,188,68,76,199,251,81,122,238,63,0,0,0,0,0,248,7,189,38,183,205,119,121,143,238,63,0,0,0,0,0,112,243,188,232,144,164,162,175,164,238,63,0,0,0,0,0,208,229,60,228,202,124,134,244,185,238,63,0,0,0,0,0,26,22,61,13,104,142,45,72,207,238,63,0,0,0,0,0,80,245,60,20,133,24,162,170,228,238,63,0,0,0,0,0,64,198,60,19,90,97,238,27,250,238,63,0,0,0,0,0,128,238,188,6,65,182,28,156,15,239,63,0,0,0,0,0,136,250,188,99,185,107,55,43,37,239,63,0,0,0,0,0,144,44,189,117,114,221,72,201,58,239,63,0,0,0,0,0,0,170,60,36,69,110,91,118,80,239,63,0,0,0,0,0,240,244,188,253,68,136,121,50,102,239,63,0,0,0,0,0,128,202,60,56,190,156,173,253,123,239,63,0,0,0,0,0,188,250,60,130,60,36,2,216,145,239,63,0,0,0,0,0,96,212,188,142,144,158,129,193,167,239,63,0,0,0,0,0,12,11,189,17,213,146,54,186,189,239,63,0,0,0,0,0,224,192,188,148,113,143,43,194,211,239,63,0,0,0,0,128,222,16,189,238,35,42,107,217,233,239,63,0,0,0,0,0,67,238,60,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,190,188,90,250,26,11,240,63,0,0,0,0,0,64,179,188,3,51,251,169,61,22,240,63,0,0,0,0,0,23,18,189,130,2,59,20,104,33,240,63,0,0,0,0,0,64,186,60,108,128,119,62,154,44,240,63,0,0,0,0,0,152,239,60,202,187,17,46,212,55,240,63,0,0,0,0,0,64,199,188,137,127,110,232,21,67,240,63,0,0,0,0,0,48,216,60,103,84,246,114,95,78,240,63,0,0,0,0,0,63,26,189,90,133,21,211,176,89,240,63,0,0,0,0,0,132,2,189,149,31,60,14,10,101,240,63,0,0,0,0,0,96,241,60,26,247,221,41,107,112,240,63,0,0,0,0,0,36,21,61,45,168,114,43,212,123,240,63,0,0,0,0,0,160,233,188,208,155,117,24,69,135,240,63,0,0,0,0,0,64,230,60,200,7,102,246,189,146,240,63,0,0,0,0,0,120,0,189,131,243,198,202,62,158,240,63,0,0,0,0,0,0,152,188,48,57,31,155,199,169,240,63,0,0,0,0,0,160,255,60,252,136,249,108,88,181,240,63,0,0,0,0,0,200,250,188,138,108,228,69,241,192,240,63,0,0,0,0,0,192,217,60,22,72,114,43,146,204,240,63,0,0,0,0,0,32,5,61,216,93,57,35,59,216,240,63,0,0,0,0,0,208,250,188,243,209,211,50,236,227,240,63,0,0,0,0,0,172,27,61,166,169,223,95,165,239,240,63,0,0,0,0,0,232,4,189,240,210,254,175,102,251,240,63,0,0,0,0,0,48,13,189,75,35,215,40,48,7,241,63,0,0,0,0,0,80,241,60,91,91,18,208,1,19,241,63,0,0,0,0,0,0,236,60,249,42,94,171,219,30,241,63,0,0,0,0,0,188,22,61,213,49,108,192,189,42,241,63,0,0,0,0,0,64,232,60,125,4,242,20,168,54,241,63,0,0,0,0,0,208,14,189,233,45,169,174,154,66,241,63,0,0,0,0,0,224,232,60,56,49,79,147,149,78,241,63,0,0,0,0,0,64,235,60,113,142,165,200,152,90,241,63,0,0,0,0,0,48,5,61,223,195,113,84,164,102,241,63,0,0,0,0,0,56,3,61,17,82,125,60,184,114,241,63,0,0,0,0,0,212,40,61,159,187,149,134,212,126,241,63,0,0,0,0,0,208,5,189,147,141,140,56,249,138,241,63,0,0,0,0,0,136,28,189,102,93,55,88,38,151,241,63,0,0,0,0,0,240,17,61,167,203,111,235,91,163,241,63,0,0,0,0,0,72,16,61,227,135,19,248,153,175,241,63,0,0,0,0,0,57,71,189,84,93,4,132,224,187,241,63,0,0,0,0,0,228,36,61,67,28,40,149,47,200,241,63,0,0,0,0,0,32,10,189,178,185,104,49,135,212,241,63,0,0,0,0,0,128,227,60,49,64,180,94,231,224,241,63,0,0,0,0,0,192,234,60,56,217,252,34,80,237,241,63,0,0,0,0,0,144,1,61,247,205,56,132,193,249,241,63,0,0,0,0,0,120,27,189,143,141,98,136,59,6,242,63,0,0,0,0,0,148,45,61,30,168,120,53,190,18,242,63,0,0,0,0,0,0,216,60,65,221,125,145,73,31,242,63,0,0,0,0,0,52,43,61,35,19,121,162,221,43,242,63,0,0,0,0,0,248,25,61,231,97,117,110,122,56,242,63,0,0,0,0,0,200,25,189,39,20,130,251,31,69,242,63,0,0,0,0,0,48,2,61,2,166,178,79,206,81,242,63,0,0,0,0,0,72,19,189,176,206,30,113,133,94,242,63,0,0,0,0,0,112,18,61,22,125,226,101,69,107,242,63,0,0,0,0,0,208,17,61,15,224,29,52,14,120,242,63,0,0,0,0,0,238,49,61,62,99,245,225,223,132,242,63,0,0,0,0,0,192,20,189,48,187,145,117,186,145,242,63,0,0,0,0,0,216,19,189,9,223,31,245,157,158,242,63,0,0,0,0,0,176,8,61,155,14,209,102,138,171,242,63,0,0,0,0,0,124,34,189,58,218,218,208,127,184,242,63,0,0,0,0,0,52,42,61,249,26,119,57,126,197,242,63,0,0,0,0,0,128,16,189,217,2,228,166,133,210,242,63,0,0,0,0,0,208,14,189,121,21,100,31,150,223,242,63,0,0,0,0,0,32,244,188,207,46,62,169,175,236,242,63,0,0,0,0,0,152,36,189,34,136,189,74,210,249,242,63,0,0,0,0,0,48,22,189,37,182,49,10,254,6,243,63,0,0,0,0,0,54,50,189,11,165,238,237,50,20,243,63,0,0,0,0,128,223,112,189,184,215,76,252,112,33,243,63,0,0,0,0,0,72,34,189,162,233,168,59,184,46,243,63,0,0,0,0,0,152,37,189,102,23,100,178,8,60,243,63,0,0,0,0,0,208,30,61,39,250,227,102,98,73,243,63,0,0,0,0,0,0,220,188,15,159,146,95,197,86,243,63,0,0,0,0,0,216,48,189,185,136,222,162,49,100,243,63,0,0,0,0,0,200,34,61,57,170,58,55,167,113,243,63,0,0,0,0,0,96,32,61,254,116,30,35,38,127,243,63,0,0,0,0,0,96,22,189,56,216,5,109,174,140,243,63,0,0,0,0,0,224,10,189,195,62,113,27,64,154,243,63,0,0,0,0,0,114,68,189,32,160,229,52,219,167,243,63,0,0,0,0,0,32,8,61,149,110,236,191,127,181,243,63,0,0,0,0,0,128,62,61,242,168,19,195,45,195,243,63,0,0,0,0,0,128,239,60,34,225,237,68,229,208,243,63,0,0,0,0,0,160,23,189,187,52,18,76,166,222,243,63,0,0,0,0,0,48,38,61,204,78,28,223,112,236,243,63,0,0,0,0,0,166,72,189,140,126,172,4,69,250,243,63,0,0,0,0,0,220,60,189,187,160,103,195,34,8,244,63,0,0,0,0,0,184,37,61,149,46,247,33,10,22,244,63,0,0,0,0,0,192,30,61,70,70,9,39,251,35,244,63,0,0,0,0,0,96,19,189,32,169,80,217,245,49,244,63,0,0,0,0,0,152,35,61,235,185,132,63,250,63,244,63,0,0,0,0,0,0,250,60,25,137,97,96,8,78,244,63,0,0,0,0,0,192,246,188,1,210,167,66,32,92,244,63,0,0,0,0,0,192,11,189,22,0,29,237,65,106,244,63,0,0,0,0,0,128,18,189,38,51,139,102,109,120,244,63,0,0,0,0,0,224,48,61,0,60,193,181,162,134,244,63,0,0,0,0,0,64,45,189,4,175,146,225,225,148,244,63,0,0,0,0,0,32,12,61,114,211,215,240,42,163,244,63,0,0,0,0,0,80,30,189,1,184,109,234,125,177,244,63,0,0,0,0,0,128,7,61,225,41,54,213,218,191,244,63,0,0,0,0,0,128,19,189,50,193,23,184,65,206,244,63,0,0,0,0,0,128,0,61,219,221,253,153,178,220,244,63,0,0,0,0,0,112,44,61,150,171,216,129,45,235,244,63,0,0,0,0,0,224,28,189,2,45,157,118,178,249,244,63,0,0,0,0,0,32,25,61,193,49,69,127,65,8,245,63,0,0,0,0,0,192,8,189,42,102,207,162,218,22,245,63,0,0,0,0,0,0,250,188,234,81,63,232,125,37,245,63,0,0,0,0,0,8,74,61,218,78,157,86,43,52,245,63,0,0,0,0,0,216,38,189,26,172,246,244,226,66,245,63,0,0,0,0,0,68,50,189,219,148,93,202,164,81,245,63,0,0,0,0,0,60,72,61,107,17,233,221,112,96,245,63,0,0,0,0,0,176,36,61,222,41,181,54,71,111,245,63,0,0,0,0,0,90,65,61,14,196,226,219,39,126,245,63,0,0,0,0,0,224,41,189,111,199,151,212,18,141,245,63,0,0,0,0,0,8,35,189,76,11,255,39,8,156,245,63,0,0,0,0,0,236,77,61,39,84,72,221,7,171,245,63,0,0,0,0,0,0,196,188,244,122,168,251,17,186,245,63,0,0,0,0,0,8,48,61,11,70,89,138,38,201,245,63,0,0,0,0,0,200,38,189,63,142,153,144,69,216,245,63,0,0,0,0,0,154,70,61,225,32,173,21,111,231,245,63,0,0,0,0,0,64,27,189,202,235,220,32,163,246,245,63,0,0,0,0,0,112,23,61,184,220,118,185,225,5,246,63,0,0,0,0,0,248,38,61,21,247,205,230,42,21,246,63,0,0,0,0,0,0,1,61,49,85,58,176,126,36,246,63,0,0,0,0,0,208,21,189,181,41,25,29,221,51,246,63,0,0,0,0,0,208,18,189,19,195,204,52,70,67,246,63,0,0,0,0,0,128,234,188,250,142,188,254,185,82,246,63,0,0,0,0,0,96,40,189,151,51,85,130,56,98,246,63,0,0,0,0,0,254,113,61,142,50,8,199,193,113,246,63,0,0,0,0,0,32,55,189,126,169,76,212,85,129,246,63,0,0,0,0,0,128,230,60,113,148,158,177,244,144,246,63,0,0,0,0,0,120,41,189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,0,0,0,0,0,0,40,110,117,108,108,41,0,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,0,0,0,0,0,105,110,102,0,0,0,0,0,73,78,70,0,0,0,0,0,110,97,110,0,0,0,0,0,78,65,78,0,0,0,0,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+91696); - - - - - -/* no memory initializer */ -var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8); - -assert(tempDoublePtr % 8 == 0); - -function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much - - HEAP8[tempDoublePtr] = HEAP8[ptr]; - - HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; - - HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; - - HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; - -} - -function copyTempDouble(ptr) { - - HEAP8[tempDoublePtr] = HEAP8[ptr]; - - HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; - - HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; - - HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; - - HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; - - HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; - - HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; - - HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; - -} - -// {{PRE_LIBRARY}} - - - function _InitGainAnalysis() { - Module['printErr']('missing function: InitGainAnalysis'); abort(-1); - } - - function _AnalyzeSamples() { - Module['printErr']('missing function: AnalyzeSamples'); abort(-1); - } - - - Module["_i64Subtract"] = _i64Subtract; - - var _fabsf=Math_abs; - - var _floorf=Math_floor; - - - Module["_memset"] = _memset; - - var _BDtoILow=true; - - - - var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86}; - - var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; - - - var ___errno_state=0;function ___setErrNo(value) { - // For convenient setting and returning of errno. - HEAP32[((___errno_state)>>2)]=value; - return value; - }function _strerror_r(errnum, strerrbuf, buflen) { - if (errnum in ERRNO_MESSAGES) { - if (ERRNO_MESSAGES[errnum].length > buflen - 1) { - return ___setErrNo(ERRNO_CODES.ERANGE); - } else { - var msg = ERRNO_MESSAGES[errnum]; - writeAsciiToMemory(msg, strerrbuf); - return 0; - } - } else { - return ___setErrNo(ERRNO_CODES.EINVAL); - } - }function _strerror(errnum) { - if (!_strerror.buffer) _strerror.buffer = _malloc(256); - _strerror_r(errnum, _strerror.buffer, 256); - return _strerror.buffer; - } - - function _VBR_encode_frame() { - Module['printErr']('missing function: VBR_encode_frame'); abort(-1); - } - - function _abort() { - Module['abort'](); - } - - function _init_xrpow_core_sse() { - Module['printErr']('missing function: init_xrpow_core_sse'); abort(-1); - } - - - - var PATH={splitPath:function (filename) { - var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; - return splitPathRe.exec(filename).slice(1); - },normalizeArray:function (parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - return parts; - },normalize:function (path) { - var isAbsolute = path.charAt(0) === '/', - trailingSlash = path.substr(-1) === '/'; - // Normalize the path - path = PATH.normalizeArray(path.split('/').filter(function(p) { - return !!p; - }), !isAbsolute).join('/'); - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - return (isAbsolute ? '/' : '') + path; - },dirname:function (path) { - var result = PATH.splitPath(path), - root = result[0], - dir = result[1]; - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - return root + dir; - },basename:function (path) { - // EMSCRIPTEN return '/'' for '/', not an empty string - if (path === '/') return '/'; - var lastSlash = path.lastIndexOf('/'); - if (lastSlash === -1) return path; - return path.substr(lastSlash+1); - },extname:function (path) { - return PATH.splitPath(path)[3]; - },join:function () { - var paths = Array.prototype.slice.call(arguments, 0); - return PATH.normalize(paths.join('/')); - },join2:function (l, r) { - return PATH.normalize(l + '/' + r); - },resolve:function () { - var resolvedPath = '', - resolvedAbsolute = false; - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : FS.cwd(); - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - return ''; // an invalid portion invalidates the whole thing - } - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; - },relative:function (from, to) { - from = PATH.resolve(from).substr(1); - to = PATH.resolve(to).substr(1); - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - return outputParts.join('/'); - }}; - - var TTY={ttys:[],init:function () { - // https://github.com/kripken/emscripten/pull/1555 - // if (ENVIRONMENT_IS_NODE) { - // // currently, FS.init does not distinguish if process.stdin is a file or TTY - // // device, it always assumes it's a TTY device. because of this, we're forcing - // // process.stdin to UTF8 encoding to at least make stdin reading compatible - // // with text files until FS.init can be refactored. - // process['stdin']['setEncoding']('utf8'); - // } - },shutdown:function () { - // https://github.com/kripken/emscripten/pull/1555 - // if (ENVIRONMENT_IS_NODE) { - // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? - // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation - // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? - // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle - // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call - // process['stdin']['pause'](); - // } - },register:function (dev, ops) { - TTY.ttys[dev] = { input: [], output: [], ops: ops }; - FS.registerDevice(dev, TTY.stream_ops); - },stream_ops:{open:function (stream) { - var tty = TTY.ttys[stream.node.rdev]; - if (!tty) { - throw new FS.ErrnoError(ERRNO_CODES.ENODEV); - } - stream.tty = tty; - stream.seekable = false; - },close:function (stream) { - // flush any pending line data - stream.tty.ops.flush(stream.tty); - },flush:function (stream) { - stream.tty.ops.flush(stream.tty); - },read:function (stream, buffer, offset, length, pos /* ignored */) { - if (!stream.tty || !stream.tty.ops.get_char) { - throw new FS.ErrnoError(ERRNO_CODES.ENXIO); - } - var bytesRead = 0; - for (var i = 0; i < length; i++) { - var result; - try { - result = stream.tty.ops.get_char(stream.tty); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - if (result === undefined && bytesRead === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); - } - if (result === null || result === undefined) break; - bytesRead++; - buffer[offset+i] = result; - } - if (bytesRead) { - stream.node.timestamp = Date.now(); - } - return bytesRead; - },write:function (stream, buffer, offset, length, pos) { - if (!stream.tty || !stream.tty.ops.put_char) { - throw new FS.ErrnoError(ERRNO_CODES.ENXIO); - } - for (var i = 0; i < length; i++) { - try { - stream.tty.ops.put_char(stream.tty, buffer[offset+i]); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - } - if (length) { - stream.node.timestamp = Date.now(); - } - return i; - }},default_tty_ops:{get_char:function (tty) { - if (!tty.input.length) { - var result = null; - if (ENVIRONMENT_IS_NODE) { - // we will read data by chunks of BUFSIZE - var BUFSIZE = 256; - var buf = new Buffer(BUFSIZE); - var bytesRead = 0; - - var fd = process.stdin.fd; - // Linux and Mac cannot use process.stdin.fd (which isn't set up as sync) - var usingDevice = false; - try { - fd = fs.openSync('/dev/stdin', 'r'); - usingDevice = true; - } catch (e) {} - - bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null); - - if (usingDevice) { fs.closeSync(fd); } - if (bytesRead > 0) { - result = buf.slice(0, bytesRead).toString('utf-8'); - } else { - result = null; - } - - } else if (typeof window != 'undefined' && - typeof window.prompt == 'function') { - // Browser. - result = window.prompt('Input: '); // returns null on cancel - if (result !== null) { - result += '\n'; - } - } else if (typeof readline == 'function') { - // Command line. - result = readline(); - if (result !== null) { - result += '\n'; - } - } - if (!result) { - return null; - } - tty.input = intArrayFromString(result, true); - } - return tty.input.shift(); - },put_char:function (tty, val) { - if (val === null || val === 10) { - Module['print'](UTF8ArrayToString(tty.output, 0)); - tty.output = []; - } else { - if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. - } - },flush:function (tty) { - if (tty.output && tty.output.length > 0) { - Module['print'](UTF8ArrayToString(tty.output, 0)); - tty.output = []; - } - }},default_tty1_ops:{put_char:function (tty, val) { - if (val === null || val === 10) { - Module['printErr'](UTF8ArrayToString(tty.output, 0)); - tty.output = []; - } else { - if (val != 0) tty.output.push(val); - } - },flush:function (tty) { - if (tty.output && tty.output.length > 0) { - Module['printErr'](UTF8ArrayToString(tty.output, 0)); - tty.output = []; - } - }}}; - - var MEMFS={ops_table:null,mount:function (mount) { - return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); - },createNode:function (parent, name, mode, dev) { - if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { - // no supported - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (!MEMFS.ops_table) { - MEMFS.ops_table = { - dir: { - node: { - getattr: MEMFS.node_ops.getattr, - setattr: MEMFS.node_ops.setattr, - lookup: MEMFS.node_ops.lookup, - mknod: MEMFS.node_ops.mknod, - rename: MEMFS.node_ops.rename, - unlink: MEMFS.node_ops.unlink, - rmdir: MEMFS.node_ops.rmdir, - readdir: MEMFS.node_ops.readdir, - symlink: MEMFS.node_ops.symlink - }, - stream: { - llseek: MEMFS.stream_ops.llseek - } - }, - file: { - node: { - getattr: MEMFS.node_ops.getattr, - setattr: MEMFS.node_ops.setattr - }, - stream: { - llseek: MEMFS.stream_ops.llseek, - read: MEMFS.stream_ops.read, - write: MEMFS.stream_ops.write, - allocate: MEMFS.stream_ops.allocate, - mmap: MEMFS.stream_ops.mmap, - msync: MEMFS.stream_ops.msync - } - }, - link: { - node: { - getattr: MEMFS.node_ops.getattr, - setattr: MEMFS.node_ops.setattr, - readlink: MEMFS.node_ops.readlink - }, - stream: {} - }, - chrdev: { - node: { - getattr: MEMFS.node_ops.getattr, - setattr: MEMFS.node_ops.setattr - }, - stream: FS.chrdev_stream_ops - } - }; - } - var node = FS.createNode(parent, name, mode, dev); - if (FS.isDir(node.mode)) { - node.node_ops = MEMFS.ops_table.dir.node; - node.stream_ops = MEMFS.ops_table.dir.stream; - node.contents = {}; - } else if (FS.isFile(node.mode)) { - node.node_ops = MEMFS.ops_table.file.node; - node.stream_ops = MEMFS.ops_table.file.stream; - node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.buffer.byteLength which gives the whole capacity. - // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred - // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size - // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. - node.contents = null; - } else if (FS.isLink(node.mode)) { - node.node_ops = MEMFS.ops_table.link.node; - node.stream_ops = MEMFS.ops_table.link.stream; - } else if (FS.isChrdev(node.mode)) { - node.node_ops = MEMFS.ops_table.chrdev.node; - node.stream_ops = MEMFS.ops_table.chrdev.stream; - } - node.timestamp = Date.now(); - // add the new node to the parent - if (parent) { - parent.contents[name] = node; - } - return node; - },getFileDataAsRegularArray:function (node) { - if (node.contents && node.contents.subarray) { - var arr = []; - for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]); - return arr; // Returns a copy of the original data. - } - return node.contents; // No-op, the file contents are already in a JS array. Return as-is. - },getFileDataAsTypedArray:function (node) { - if (!node.contents) return new Uint8Array; - if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. - return new Uint8Array(node.contents); - },expandFileStorage:function (node, newCapacity) { - // If we are asked to expand the size of a file that already exists, revert to using a standard JS array to store the file - // instead of a typed array. This makes resizing the array more flexible because we can just .push() elements at the back to - // increase the size. - if (node.contents && node.contents.subarray && newCapacity > node.contents.length) { - node.contents = MEMFS.getFileDataAsRegularArray(node); - node.usedBytes = node.contents.length; // We might be writing to a lazy-loaded file which had overridden this property, so force-reset it. - } - - if (!node.contents || node.contents.subarray) { // Keep using a typed array if creating a new storage, or if old one was a typed array as well. - var prevCapacity = node.contents ? node.contents.buffer.byteLength : 0; - if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. - // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. - // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to - // avoid overshooting the allocation cap by a very large margin. - var CAPACITY_DOUBLING_MAX = 1024 * 1024; - newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0); - if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. - var oldContents = node.contents; - node.contents = new Uint8Array(newCapacity); // Allocate new storage. - if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. - return; - } - // Not using a typed array to back the file storage. Use a standard JS array instead. - if (!node.contents && newCapacity > 0) node.contents = []; - while (node.contents.length < newCapacity) node.contents.push(0); - },resizeFileStorage:function (node, newSize) { - if (node.usedBytes == newSize) return; - if (newSize == 0) { - node.contents = null; // Fully decommit when requesting a resize to zero. - node.usedBytes = 0; - return; - } - if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store. - var oldContents = node.contents; - node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage. - if (oldContents) { - node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. - } - node.usedBytes = newSize; - return; - } - // Backing with a JS array. - if (!node.contents) node.contents = []; - if (node.contents.length > newSize) node.contents.length = newSize; - else while (node.contents.length < newSize) node.contents.push(0); - node.usedBytes = newSize; - },node_ops:{getattr:function (node) { - var attr = {}; - // device numbers reuse inode numbers. - attr.dev = FS.isChrdev(node.mode) ? node.id : 1; - attr.ino = node.id; - attr.mode = node.mode; - attr.nlink = 1; - attr.uid = 0; - attr.gid = 0; - attr.rdev = node.rdev; - if (FS.isDir(node.mode)) { - attr.size = 4096; - } else if (FS.isFile(node.mode)) { - attr.size = node.usedBytes; - } else if (FS.isLink(node.mode)) { - attr.size = node.link.length; - } else { - attr.size = 0; - } - attr.atime = new Date(node.timestamp); - attr.mtime = new Date(node.timestamp); - attr.ctime = new Date(node.timestamp); - // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), - // but this is not required by the standard. - attr.blksize = 4096; - attr.blocks = Math.ceil(attr.size / attr.blksize); - return attr; - },setattr:function (node, attr) { - if (attr.mode !== undefined) { - node.mode = attr.mode; - } - if (attr.timestamp !== undefined) { - node.timestamp = attr.timestamp; - } - if (attr.size !== undefined) { - MEMFS.resizeFileStorage(node, attr.size); - } - },lookup:function (parent, name) { - throw FS.genericErrors[ERRNO_CODES.ENOENT]; - },mknod:function (parent, name, mode, dev) { - return MEMFS.createNode(parent, name, mode, dev); - },rename:function (old_node, new_dir, new_name) { - // if we're overwriting a directory at new_name, make sure it's empty. - if (FS.isDir(old_node.mode)) { - var new_node; - try { - new_node = FS.lookupNode(new_dir, new_name); - } catch (e) { - } - if (new_node) { - for (var i in new_node.contents) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); - } - } - } - // do the internal rewiring - delete old_node.parent.contents[old_node.name]; - old_node.name = new_name; - new_dir.contents[new_name] = old_node; - old_node.parent = new_dir; - },unlink:function (parent, name) { - delete parent.contents[name]; - },rmdir:function (parent, name) { - var node = FS.lookupNode(parent, name); - for (var i in node.contents) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); - } - delete parent.contents[name]; - },readdir:function (node) { - var entries = ['.', '..'] - for (var key in node.contents) { - if (!node.contents.hasOwnProperty(key)) { - continue; - } - entries.push(key); - } - return entries; - },symlink:function (parent, newname, oldpath) { - var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); - node.link = oldpath; - return node; - },readlink:function (node) { - if (!FS.isLink(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - return node.link; - }},stream_ops:{read:function (stream, buffer, offset, length, position) { - var contents = stream.node.contents; - if (position >= stream.node.usedBytes) return 0; - var size = Math.min(stream.node.usedBytes - position, length); - assert(size >= 0); - if (size > 8 && contents.subarray) { // non-trivial, and typed array - buffer.set(contents.subarray(position, position + size), offset); - } else { - for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; - } - return size; - },write:function (stream, buffer, offset, length, position, canOwn) { - if (!length) return 0; - var node = stream.node; - node.timestamp = Date.now(); - - if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? - if (canOwn) { // Can we just reuse the buffer we are given? - node.contents = buffer.subarray(offset, offset + length); - node.usedBytes = length; - return length; - } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. - node.contents = new Uint8Array(buffer.subarray(offset, offset + length)); - node.usedBytes = length; - return length; - } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? - node.contents.set(buffer.subarray(offset, offset + length), position); - return length; - } - } - - // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. - MEMFS.expandFileStorage(node, position+length); - if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available. - else { - for (var i = 0; i < length; i++) { - node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. - } - } - node.usedBytes = Math.max(node.usedBytes, position+length); - return length; - },llseek:function (stream, offset, whence) { - var position = offset; - if (whence === 1) { // SEEK_CUR. - position += stream.position; - } else if (whence === 2) { // SEEK_END. - if (FS.isFile(stream.node.mode)) { - position += stream.node.usedBytes; - } - } - if (position < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - return position; - },allocate:function (stream, offset, length) { - MEMFS.expandFileStorage(stream.node, offset + length); - stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); - },mmap:function (stream, buffer, offset, length, position, prot, flags) { - if (!FS.isFile(stream.node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.ENODEV); - } - var ptr; - var allocated; - var contents = stream.node.contents; - // Only make a new copy when MAP_PRIVATE is specified. - if ( !(flags & 2) && - (contents.buffer === buffer || contents.buffer === buffer.buffer) ) { - // We can't emulate MAP_SHARED when the file is not backed by the buffer - // we're mapping to (e.g. the HEAP buffer). - allocated = false; - ptr = contents.byteOffset; - } else { - // Try to avoid unnecessary slices. - if (position > 0 || position + length < stream.node.usedBytes) { - if (contents.subarray) { - contents = contents.subarray(position, position + length); - } else { - contents = Array.prototype.slice.call(contents, position, position + length); - } - } - allocated = true; - ptr = _malloc(length); - if (!ptr) { - throw new FS.ErrnoError(ERRNO_CODES.ENOMEM); - } - buffer.set(contents, ptr); - } - return { ptr: ptr, allocated: allocated }; - },msync:function (stream, buffer, offset, length, mmapFlags) { - if (!FS.isFile(stream.node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.ENODEV); - } - if (mmapFlags & 2) { - // MAP_PRIVATE calls need not to be synced back to underlying fs - return 0; - } - - var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); - // should we check if bytesWritten and length are the same? - return 0; - }}}; - - var IDBFS={dbs:{},indexedDB:function () { - if (typeof indexedDB !== 'undefined') return indexedDB; - var ret = null; - if (typeof window === 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; - assert(ret, 'IDBFS used, but indexedDB not supported'); - return ret; - },DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function (mount) { - // reuse all of the core MEMFS functionality - return MEMFS.mount.apply(null, arguments); - },syncfs:function (mount, populate, callback) { - IDBFS.getLocalSet(mount, function(err, local) { - if (err) return callback(err); - - IDBFS.getRemoteSet(mount, function(err, remote) { - if (err) return callback(err); - - var src = populate ? remote : local; - var dst = populate ? local : remote; - - IDBFS.reconcile(src, dst, callback); - }); - }); - },getDB:function (name, callback) { - // check the cache first - var db = IDBFS.dbs[name]; - if (db) { - return callback(null, db); - } - - var req; - try { - req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); - } catch (e) { - return callback(e); - } - req.onupgradeneeded = function(e) { - var db = e.target.result; - var transaction = e.target.transaction; - - var fileStore; - - if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { - fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); - } else { - fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); - } - - if (!fileStore.indexNames.contains('timestamp')) { - fileStore.createIndex('timestamp', 'timestamp', { unique: false }); - } - }; - req.onsuccess = function() { - db = req.result; - - // add to the cache - IDBFS.dbs[name] = db; - callback(null, db); - }; - req.onerror = function(e) { - callback(this.error); - e.preventDefault(); - }; - },getLocalSet:function (mount, callback) { - var entries = {}; - - function isRealDir(p) { - return p !== '.' && p !== '..'; - }; - function toAbsolute(root) { - return function(p) { - return PATH.join2(root, p); - } - }; - - var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); - - while (check.length) { - var path = check.pop(); - var stat; - - try { - stat = FS.stat(path); - } catch (e) { - return callback(e); - } - - if (FS.isDir(stat.mode)) { - check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))); - } - - entries[path] = { timestamp: stat.mtime }; - } - - return callback(null, { type: 'local', entries: entries }); - },getRemoteSet:function (mount, callback) { - var entries = {}; - - IDBFS.getDB(mount.mountpoint, function(err, db) { - if (err) return callback(err); - - var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); - transaction.onerror = function(e) { - callback(this.error); - e.preventDefault(); - }; - - var store = transaction.objectStore(IDBFS.DB_STORE_NAME); - var index = store.index('timestamp'); - - index.openKeyCursor().onsuccess = function(event) { - var cursor = event.target.result; - - if (!cursor) { - return callback(null, { type: 'remote', db: db, entries: entries }); - } - - entries[cursor.primaryKey] = { timestamp: cursor.key }; - - cursor.continue(); - }; - }); - },loadLocalEntry:function (path, callback) { - var stat, node; - - try { - var lookup = FS.lookupPath(path); - node = lookup.node; - stat = FS.stat(path); - } catch (e) { - return callback(e); - } - - if (FS.isDir(stat.mode)) { - return callback(null, { timestamp: stat.mtime, mode: stat.mode }); - } else if (FS.isFile(stat.mode)) { - // Performance consideration: storing a normal JavaScript array to a IndexedDB is much slower than storing a typed array. - // Therefore always convert the file contents to a typed array first before writing the data to IndexedDB. - node.contents = MEMFS.getFileDataAsTypedArray(node); - return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents }); - } else { - return callback(new Error('node type not supported')); - } - },storeLocalEntry:function (path, entry, callback) { - try { - if (FS.isDir(entry.mode)) { - FS.mkdir(path, entry.mode); - } else if (FS.isFile(entry.mode)) { - FS.writeFile(path, entry.contents, { encoding: 'binary', canOwn: true }); - } else { - return callback(new Error('node type not supported')); - } - - FS.chmod(path, entry.mode); - FS.utime(path, entry.timestamp, entry.timestamp); - } catch (e) { - return callback(e); - } - - callback(null); - },removeLocalEntry:function (path, callback) { - try { - var lookup = FS.lookupPath(path); - var stat = FS.stat(path); - - if (FS.isDir(stat.mode)) { - FS.rmdir(path); - } else if (FS.isFile(stat.mode)) { - FS.unlink(path); - } - } catch (e) { - return callback(e); - } - - callback(null); - },loadRemoteEntry:function (store, path, callback) { - var req = store.get(path); - req.onsuccess = function(event) { callback(null, event.target.result); }; - req.onerror = function(e) { - callback(this.error); - e.preventDefault(); - }; - },storeRemoteEntry:function (store, path, entry, callback) { - var req = store.put(entry, path); - req.onsuccess = function() { callback(null); }; - req.onerror = function(e) { - callback(this.error); - e.preventDefault(); - }; - },removeRemoteEntry:function (store, path, callback) { - var req = store.delete(path); - req.onsuccess = function() { callback(null); }; - req.onerror = function(e) { - callback(this.error); - e.preventDefault(); - }; - },reconcile:function (src, dst, callback) { - var total = 0; - - var create = []; - Object.keys(src.entries).forEach(function (key) { - var e = src.entries[key]; - var e2 = dst.entries[key]; - if (!e2 || e.timestamp > e2.timestamp) { - create.push(key); - total++; - } - }); - - var remove = []; - Object.keys(dst.entries).forEach(function (key) { - var e = dst.entries[key]; - var e2 = src.entries[key]; - if (!e2) { - remove.push(key); - total++; - } - }); - - if (!total) { - return callback(null); - } - - var errored = false; - var completed = 0; - var db = src.type === 'remote' ? src.db : dst.db; - var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); - var store = transaction.objectStore(IDBFS.DB_STORE_NAME); - - function done(err) { - if (err) { - if (!done.errored) { - done.errored = true; - return callback(err); - } - return; - } - if (++completed >= total) { - return callback(null); - } - }; - - transaction.onerror = function(e) { - done(this.error); - e.preventDefault(); - }; - - // sort paths in ascending order so directory entries are created - // before the files inside them - create.sort().forEach(function (path) { - if (dst.type === 'local') { - IDBFS.loadRemoteEntry(store, path, function (err, entry) { - if (err) return done(err); - IDBFS.storeLocalEntry(path, entry, done); - }); - } else { - IDBFS.loadLocalEntry(path, function (err, entry) { - if (err) return done(err); - IDBFS.storeRemoteEntry(store, path, entry, done); - }); - } - }); - - // sort paths in descending order so files are deleted before their - // parent directories - remove.sort().reverse().forEach(function(path) { - if (dst.type === 'local') { - IDBFS.removeLocalEntry(path, done); - } else { - IDBFS.removeRemoteEntry(store, path, done); - } - }); - }}; - - var NODEFS={isWindows:false,staticInit:function () { - NODEFS.isWindows = !!process.platform.match(/^win/); - },mount:function (mount) { - assert(ENVIRONMENT_IS_NODE); - return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0); - },createNode:function (parent, name, mode, dev) { - if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var node = FS.createNode(parent, name, mode); - node.node_ops = NODEFS.node_ops; - node.stream_ops = NODEFS.stream_ops; - return node; - },getMode:function (path) { - var stat; - try { - stat = fs.lstatSync(path); - if (NODEFS.isWindows) { - // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so - // propagate write bits to execute bits. - stat.mode = stat.mode | ((stat.mode & 146) >> 1); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - return stat.mode; - },realPath:function (node) { - var parts = []; - while (node.parent !== node) { - parts.push(node.name); - node = node.parent; - } - parts.push(node.mount.opts.root); - parts.reverse(); - return PATH.join.apply(null, parts); - },flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function (flags) { - if (flags in NODEFS.flagsToPermissionStringMap) { - return NODEFS.flagsToPermissionStringMap[flags]; - } else { - return flags; - } - },node_ops:{getattr:function (node) { - var path = NODEFS.realPath(node); - var stat; - try { - stat = fs.lstatSync(path); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - // node.js v0.10.20 doesn't report blksize and blocks on Windows. Fake them with default blksize of 4096. - // See http://support.microsoft.com/kb/140365 - if (NODEFS.isWindows && !stat.blksize) { - stat.blksize = 4096; - } - if (NODEFS.isWindows && !stat.blocks) { - stat.blocks = (stat.size+stat.blksize-1)/stat.blksize|0; - } - return { - dev: stat.dev, - ino: stat.ino, - mode: stat.mode, - nlink: stat.nlink, - uid: stat.uid, - gid: stat.gid, - rdev: stat.rdev, - size: stat.size, - atime: stat.atime, - mtime: stat.mtime, - ctime: stat.ctime, - blksize: stat.blksize, - blocks: stat.blocks - }; - },setattr:function (node, attr) { - var path = NODEFS.realPath(node); - try { - if (attr.mode !== undefined) { - fs.chmodSync(path, attr.mode); - // update the common node structure mode as well - node.mode = attr.mode; - } - if (attr.timestamp !== undefined) { - var date = new Date(attr.timestamp); - fs.utimesSync(path, date, date); - } - if (attr.size !== undefined) { - fs.truncateSync(path, attr.size); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },lookup:function (parent, name) { - var path = PATH.join2(NODEFS.realPath(parent), name); - var mode = NODEFS.getMode(path); - return NODEFS.createNode(parent, name, mode); - },mknod:function (parent, name, mode, dev) { - var node = NODEFS.createNode(parent, name, mode, dev); - // create the backing node for this in the fs root as well - var path = NODEFS.realPath(node); - try { - if (FS.isDir(node.mode)) { - fs.mkdirSync(path, node.mode); - } else { - fs.writeFileSync(path, '', { mode: node.mode }); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - return node; - },rename:function (oldNode, newDir, newName) { - var oldPath = NODEFS.realPath(oldNode); - var newPath = PATH.join2(NODEFS.realPath(newDir), newName); - try { - fs.renameSync(oldPath, newPath); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },unlink:function (parent, name) { - var path = PATH.join2(NODEFS.realPath(parent), name); - try { - fs.unlinkSync(path); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },rmdir:function (parent, name) { - var path = PATH.join2(NODEFS.realPath(parent), name); - try { - fs.rmdirSync(path); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },readdir:function (node) { - var path = NODEFS.realPath(node); - try { - return fs.readdirSync(path); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },symlink:function (parent, newName, oldPath) { - var newPath = PATH.join2(NODEFS.realPath(parent), newName); - try { - fs.symlinkSync(oldPath, newPath); - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },readlink:function (node) { - var path = NODEFS.realPath(node); - try { - path = fs.readlinkSync(path); - path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); - return path; - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - }},stream_ops:{open:function (stream) { - var path = NODEFS.realPath(stream.node); - try { - if (FS.isFile(stream.node.mode)) { - stream.nfd = fs.openSync(path, NODEFS.flagsToPermissionString(stream.flags)); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },close:function (stream) { - try { - if (FS.isFile(stream.node.mode) && stream.nfd) { - fs.closeSync(stream.nfd); - } - } catch (e) { - if (!e.code) throw e; - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - },read:function (stream, buffer, offset, length, position) { - if (length === 0) return 0; // node errors on 0 length reads - // FIXME this is terrible. - var nbuffer = new Buffer(length); - var res; - try { - res = fs.readSync(stream.nfd, nbuffer, 0, length, position); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - if (res > 0) { - for (var i = 0; i < res; i++) { - buffer[offset + i] = nbuffer[i]; - } - } - return res; - },write:function (stream, buffer, offset, length, position) { - // FIXME this is terrible. - var nbuffer = new Buffer(buffer.subarray(offset, offset + length)); - var res; - try { - res = fs.writeSync(stream.nfd, nbuffer, 0, length, position); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - return res; - },llseek:function (stream, offset, whence) { - var position = offset; - if (whence === 1) { // SEEK_CUR. - position += stream.position; - } else if (whence === 2) { // SEEK_END. - if (FS.isFile(stream.node.mode)) { - try { - var stat = fs.fstatSync(stream.nfd); - position += stat.size; - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES[e.code]); - } - } - } - - if (position < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - - return position; - }}}; - - var _stdin=allocate(1, "i32*", ALLOC_STATIC); - - var _stdout=allocate(1, "i32*", ALLOC_STATIC); - - var _stderr=allocate(1, "i32*", ALLOC_STATIC);var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},handleFSError:function (e) { - if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); - return ___setErrNo(e.errno); - },lookupPath:function (path, opts) { - path = PATH.resolve(FS.cwd(), path); - opts = opts || {}; - - if (!path) return { path: '', node: null }; - - var defaults = { - follow_mount: true, - recurse_count: 0 - }; - for (var key in defaults) { - if (opts[key] === undefined) { - opts[key] = defaults[key]; - } - } - - if (opts.recurse_count > 8) { // max recursive lookup of 8 - throw new FS.ErrnoError(ERRNO_CODES.ELOOP); - } - - // split the path - var parts = PATH.normalizeArray(path.split('/').filter(function(p) { - return !!p; - }), false); - - // start at the root - var current = FS.root; - var current_path = '/'; - - for (var i = 0; i < parts.length; i++) { - var islast = (i === parts.length-1); - if (islast && opts.parent) { - // stop resolving - break; - } - - current = FS.lookupNode(current, parts[i]); - current_path = PATH.join2(current_path, parts[i]); - - // jump to the mount's root node if this is a mountpoint - if (FS.isMountpoint(current)) { - if (!islast || (islast && opts.follow_mount)) { - current = current.mounted.root; - } - } - - // by default, lookupPath will not follow a symlink if it is the final path component. - // setting opts.follow = true will override this behavior. - if (!islast || opts.follow) { - var count = 0; - while (FS.isLink(current.mode)) { - var link = FS.readlink(current_path); - current_path = PATH.resolve(PATH.dirname(current_path), link); - - var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); - current = lookup.node; - - if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). - throw new FS.ErrnoError(ERRNO_CODES.ELOOP); - } - } - } - } - - return { path: current_path, node: current }; - },getPath:function (node) { - var path; - while (true) { - if (FS.isRoot(node)) { - var mount = node.mount.mountpoint; - if (!path) return mount; - return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; - } - path = path ? node.name + '/' + path : node.name; - node = node.parent; - } - },hashName:function (parentid, name) { - var hash = 0; - - - for (var i = 0; i < name.length; i++) { - hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; - } - return ((parentid + hash) >>> 0) % FS.nameTable.length; - },hashAddNode:function (node) { - var hash = FS.hashName(node.parent.id, node.name); - node.name_next = FS.nameTable[hash]; - FS.nameTable[hash] = node; - },hashRemoveNode:function (node) { - var hash = FS.hashName(node.parent.id, node.name); - if (FS.nameTable[hash] === node) { - FS.nameTable[hash] = node.name_next; - } else { - var current = FS.nameTable[hash]; - while (current) { - if (current.name_next === node) { - current.name_next = node.name_next; - break; - } - current = current.name_next; - } - } - },lookupNode:function (parent, name) { - var err = FS.mayLookup(parent); - if (err) { - throw new FS.ErrnoError(err, parent); - } - var hash = FS.hashName(parent.id, name); - for (var node = FS.nameTable[hash]; node; node = node.name_next) { - var nodeName = node.name; - if (node.parent.id === parent.id && nodeName === name) { - return node; - } - } - // if we failed to find it in the cache, call into the VFS - return FS.lookup(parent, name); - },createNode:function (parent, name, mode, rdev) { - if (!FS.FSNode) { - FS.FSNode = function(parent, name, mode, rdev) { - if (!parent) { - parent = this; // root node sets parent to itself - } - this.parent = parent; - this.mount = parent.mount; - this.mounted = null; - this.id = FS.nextInode++; - this.name = name; - this.mode = mode; - this.node_ops = {}; - this.stream_ops = {}; - this.rdev = rdev; - }; - - FS.FSNode.prototype = {}; - - // compatibility - var readMode = 292 | 73; - var writeMode = 146; - - // NOTE we must use Object.defineProperties instead of individual calls to - // Object.defineProperty in order to make closure compiler happy - Object.defineProperties(FS.FSNode.prototype, { - read: { - get: function() { return (this.mode & readMode) === readMode; }, - set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; } - }, - write: { - get: function() { return (this.mode & writeMode) === writeMode; }, - set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } - }, - isFolder: { - get: function() { return FS.isDir(this.mode); } - }, - isDevice: { - get: function() { return FS.isChrdev(this.mode); } - } - }); - } - - var node = new FS.FSNode(parent, name, mode, rdev); - - FS.hashAddNode(node); - - return node; - },destroyNode:function (node) { - FS.hashRemoveNode(node); - },isRoot:function (node) { - return node === node.parent; - },isMountpoint:function (node) { - return !!node.mounted; - },isFile:function (mode) { - return (mode & 61440) === 32768; - },isDir:function (mode) { - return (mode & 61440) === 16384; - },isLink:function (mode) { - return (mode & 61440) === 40960; - },isChrdev:function (mode) { - return (mode & 61440) === 8192; - },isBlkdev:function (mode) { - return (mode & 61440) === 24576; - },isFIFO:function (mode) { - return (mode & 61440) === 4096; - },isSocket:function (mode) { - return (mode & 49152) === 49152; - },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function (str) { - var flags = FS.flagModes[str]; - if (typeof flags === 'undefined') { - throw new Error('Unknown file open mode: ' + str); - } - return flags; - },flagsToPermissionString:function (flag) { - var accmode = flag & 2097155; - var perms = ['r', 'w', 'rw'][accmode]; - if ((flag & 512)) { - perms += 'w'; - } - return perms; - },nodePermissions:function (node, perms) { - if (FS.ignorePermissions) { - return 0; - } - // return 0 if any user, group or owner bits are set. - if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { - return ERRNO_CODES.EACCES; - } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { - return ERRNO_CODES.EACCES; - } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { - return ERRNO_CODES.EACCES; - } - return 0; - },mayLookup:function (dir) { - var err = FS.nodePermissions(dir, 'x'); - if (err) return err; - if (!dir.node_ops.lookup) return ERRNO_CODES.EACCES; - return 0; - },mayCreate:function (dir, name) { - try { - var node = FS.lookupNode(dir, name); - return ERRNO_CODES.EEXIST; - } catch (e) { - } - return FS.nodePermissions(dir, 'wx'); - },mayDelete:function (dir, name, isdir) { - var node; - try { - node = FS.lookupNode(dir, name); - } catch (e) { - return e.errno; - } - var err = FS.nodePermissions(dir, 'wx'); - if (err) { - return err; - } - if (isdir) { - if (!FS.isDir(node.mode)) { - return ERRNO_CODES.ENOTDIR; - } - if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { - return ERRNO_CODES.EBUSY; - } - } else { - if (FS.isDir(node.mode)) { - return ERRNO_CODES.EISDIR; - } - } - return 0; - },mayOpen:function (node, flags) { - if (!node) { - return ERRNO_CODES.ENOENT; - } - if (FS.isLink(node.mode)) { - return ERRNO_CODES.ELOOP; - } else if (FS.isDir(node.mode)) { - if ((flags & 2097155) !== 0 || // opening for write - (flags & 512)) { - return ERRNO_CODES.EISDIR; - } - } - return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); - },MAX_OPEN_FDS:4096,nextfd:function (fd_start, fd_end) { - fd_start = fd_start || 0; - fd_end = fd_end || FS.MAX_OPEN_FDS; - for (var fd = fd_start; fd <= fd_end; fd++) { - if (!FS.streams[fd]) { - return fd; - } - } - throw new FS.ErrnoError(ERRNO_CODES.EMFILE); - },getStream:function (fd) { - return FS.streams[fd]; - },createStream:function (stream, fd_start, fd_end) { - if (!FS.FSStream) { - FS.FSStream = function(){}; - FS.FSStream.prototype = {}; - // compatibility - Object.defineProperties(FS.FSStream.prototype, { - object: { - get: function() { return this.node; }, - set: function(val) { this.node = val; } - }, - isRead: { - get: function() { return (this.flags & 2097155) !== 1; } - }, - isWrite: { - get: function() { return (this.flags & 2097155) !== 0; } - }, - isAppend: { - get: function() { return (this.flags & 1024); } - } - }); - } - // clone it, so we can return an instance of FSStream - var newStream = new FS.FSStream(); - for (var p in stream) { - newStream[p] = stream[p]; - } - stream = newStream; - var fd = FS.nextfd(fd_start, fd_end); - stream.fd = fd; - FS.streams[fd] = stream; - return stream; - },closeStream:function (fd) { - FS.streams[fd] = null; - },getStreamFromPtr:function (ptr) { - return FS.streams[ptr - 1]; - },getPtrForStream:function (stream) { - return stream ? stream.fd + 1 : 0; - },chrdev_stream_ops:{open:function (stream) { - var device = FS.getDevice(stream.node.rdev); - // override node's stream ops with the device's - stream.stream_ops = device.stream_ops; - // forward the open call - if (stream.stream_ops.open) { - stream.stream_ops.open(stream); - } - },llseek:function () { - throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); - }},major:function (dev) { - return ((dev) >> 8); - },minor:function (dev) { - return ((dev) & 0xff); - },makedev:function (ma, mi) { - return ((ma) << 8 | (mi)); - },registerDevice:function (dev, ops) { - FS.devices[dev] = { stream_ops: ops }; - },getDevice:function (dev) { - return FS.devices[dev]; - },getMounts:function (mount) { - var mounts = []; - var check = [mount]; - - while (check.length) { - var m = check.pop(); - - mounts.push(m); - - check.push.apply(check, m.mounts); - } - - return mounts; - },syncfs:function (populate, callback) { - if (typeof(populate) === 'function') { - callback = populate; - populate = false; - } - - var mounts = FS.getMounts(FS.root.mount); - var completed = 0; - - function done(err) { - if (err) { - if (!done.errored) { - done.errored = true; - return callback(err); - } - return; - } - if (++completed >= mounts.length) { - callback(null); - } - }; - - // sync all mounts - mounts.forEach(function (mount) { - if (!mount.type.syncfs) { - return done(null); - } - mount.type.syncfs(mount, populate, done); - }); - },mount:function (type, opts, mountpoint) { - var root = mountpoint === '/'; - var pseudo = !mountpoint; - var node; - - if (root && FS.root) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } else if (!root && !pseudo) { - var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); - - mountpoint = lookup.path; // use the absolute path - node = lookup.node; - - if (FS.isMountpoint(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - - if (!FS.isDir(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); - } - } - - var mount = { - type: type, - opts: opts, - mountpoint: mountpoint, - mounts: [] - }; - - // create a root node for the fs - var mountRoot = type.mount(mount); - mountRoot.mount = mount; - mount.root = mountRoot; - - if (root) { - FS.root = mountRoot; - } else if (node) { - // set as a mountpoint - node.mounted = mount; - - // add the new mount to the current mount's children - if (node.mount) { - node.mount.mounts.push(mount); - } - } - - return mountRoot; - },unmount:function (mountpoint) { - var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); - - if (!FS.isMountpoint(lookup.node)) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - - // destroy the nodes for this mount, and all its child mounts - var node = lookup.node; - var mount = node.mounted; - var mounts = FS.getMounts(mount); - - Object.keys(FS.nameTable).forEach(function (hash) { - var current = FS.nameTable[hash]; - - while (current) { - var next = current.name_next; - - if (mounts.indexOf(current.mount) !== -1) { - FS.destroyNode(current); - } - - current = next; - } - }); - - // no longer a mountpoint - node.mounted = null; - - // remove this mount from the child mounts - var idx = node.mount.mounts.indexOf(mount); - assert(idx !== -1); - node.mount.mounts.splice(idx, 1); - },lookup:function (parent, name) { - return parent.node_ops.lookup(parent, name); - },mknod:function (path, mode, dev) { - var lookup = FS.lookupPath(path, { parent: true }); - var parent = lookup.node; - var name = PATH.basename(path); - if (!name || name === '.' || name === '..') { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var err = FS.mayCreate(parent, name); - if (err) { - throw new FS.ErrnoError(err); - } - if (!parent.node_ops.mknod) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - return parent.node_ops.mknod(parent, name, mode, dev); - },create:function (path, mode) { - mode = mode !== undefined ? mode : 438 /* 0666 */; - mode &= 4095; - mode |= 32768; - return FS.mknod(path, mode, 0); - },mkdir:function (path, mode) { - mode = mode !== undefined ? mode : 511 /* 0777 */; - mode &= 511 | 512; - mode |= 16384; - return FS.mknod(path, mode, 0); - },mkdev:function (path, mode, dev) { - if (typeof(dev) === 'undefined') { - dev = mode; - mode = 438 /* 0666 */; - } - mode |= 8192; - return FS.mknod(path, mode, dev); - },symlink:function (oldpath, newpath) { - if (!PATH.resolve(oldpath)) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - var lookup = FS.lookupPath(newpath, { parent: true }); - var parent = lookup.node; - if (!parent) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - var newname = PATH.basename(newpath); - var err = FS.mayCreate(parent, newname); - if (err) { - throw new FS.ErrnoError(err); - } - if (!parent.node_ops.symlink) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - return parent.node_ops.symlink(parent, newname, oldpath); - },rename:function (old_path, new_path) { - var old_dirname = PATH.dirname(old_path); - var new_dirname = PATH.dirname(new_path); - var old_name = PATH.basename(old_path); - var new_name = PATH.basename(new_path); - // parents must exist - var lookup, old_dir, new_dir; - try { - lookup = FS.lookupPath(old_path, { parent: true }); - old_dir = lookup.node; - lookup = FS.lookupPath(new_path, { parent: true }); - new_dir = lookup.node; - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - if (!old_dir || !new_dir) throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - // need to be part of the same mount - if (old_dir.mount !== new_dir.mount) { - throw new FS.ErrnoError(ERRNO_CODES.EXDEV); - } - // source must exist - var old_node = FS.lookupNode(old_dir, old_name); - // old path should not be an ancestor of the new path - var relative = PATH.relative(old_path, new_dirname); - if (relative.charAt(0) !== '.') { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - // new path should not be an ancestor of the old path - relative = PATH.relative(new_path, old_dirname); - if (relative.charAt(0) !== '.') { - throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); - } - // see if the new path already exists - var new_node; - try { - new_node = FS.lookupNode(new_dir, new_name); - } catch (e) { - // not fatal - } - // early out if nothing needs to change - if (old_node === new_node) { - return; - } - // we'll need to delete the old entry - var isdir = FS.isDir(old_node.mode); - var err = FS.mayDelete(old_dir, old_name, isdir); - if (err) { - throw new FS.ErrnoError(err); - } - // need delete permissions if we'll be overwriting. - // need create permissions if new doesn't already exist. - err = new_node ? - FS.mayDelete(new_dir, new_name, isdir) : - FS.mayCreate(new_dir, new_name); - if (err) { - throw new FS.ErrnoError(err); - } - if (!old_dir.node_ops.rename) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - // if we are going to change the parent, check write permissions - if (new_dir !== old_dir) { - err = FS.nodePermissions(old_dir, 'w'); - if (err) { - throw new FS.ErrnoError(err); - } - } - try { - if (FS.trackingDelegate['willMovePath']) { - FS.trackingDelegate['willMovePath'](old_path, new_path); - } - } catch(e) { - console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); - } - // remove the node from the lookup hash - FS.hashRemoveNode(old_node); - // do the underlying fs rename - try { - old_dir.node_ops.rename(old_node, new_dir, new_name); - } catch (e) { - throw e; - } finally { - // add the node back to the hash (in case node_ops.rename - // changed its name) - FS.hashAddNode(old_node); - } - try { - if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path); - } catch(e) { - console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message); - } - },rmdir:function (path) { - var lookup = FS.lookupPath(path, { parent: true }); - var parent = lookup.node; - var name = PATH.basename(path); - var node = FS.lookupNode(parent, name); - var err = FS.mayDelete(parent, name, true); - if (err) { - throw new FS.ErrnoError(err); - } - if (!parent.node_ops.rmdir) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (FS.isMountpoint(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - try { - if (FS.trackingDelegate['willDeletePath']) { - FS.trackingDelegate['willDeletePath'](path); - } - } catch(e) { - console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); - } - parent.node_ops.rmdir(parent, name); - FS.destroyNode(node); - try { - if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); - } catch(e) { - console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); - } - },readdir:function (path) { - var lookup = FS.lookupPath(path, { follow: true }); - var node = lookup.node; - if (!node.node_ops.readdir) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); - } - return node.node_ops.readdir(node); - },unlink:function (path) { - var lookup = FS.lookupPath(path, { parent: true }); - var parent = lookup.node; - var name = PATH.basename(path); - var node = FS.lookupNode(parent, name); - var err = FS.mayDelete(parent, name, false); - if (err) { - // POSIX says unlink should set EPERM, not EISDIR - if (err === ERRNO_CODES.EISDIR) err = ERRNO_CODES.EPERM; - throw new FS.ErrnoError(err); - } - if (!parent.node_ops.unlink) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (FS.isMountpoint(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EBUSY); - } - try { - if (FS.trackingDelegate['willDeletePath']) { - FS.trackingDelegate['willDeletePath'](path); - } - } catch(e) { - console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message); - } - parent.node_ops.unlink(parent, name); - FS.destroyNode(node); - try { - if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path); - } catch(e) { - console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message); - } - },readlink:function (path) { - var lookup = FS.lookupPath(path); - var link = lookup.node; - if (!link) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - if (!link.node_ops.readlink) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - return PATH.resolve(FS.getPath(lookup.node.parent), link.node_ops.readlink(link)); - },stat:function (path, dontFollow) { - var lookup = FS.lookupPath(path, { follow: !dontFollow }); - var node = lookup.node; - if (!node) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - if (!node.node_ops.getattr) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - return node.node_ops.getattr(node); - },lstat:function (path) { - return FS.stat(path, true); - },chmod:function (path, mode, dontFollow) { - var node; - if (typeof path === 'string') { - var lookup = FS.lookupPath(path, { follow: !dontFollow }); - node = lookup.node; - } else { - node = path; - } - if (!node.node_ops.setattr) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - node.node_ops.setattr(node, { - mode: (mode & 4095) | (node.mode & ~4095), - timestamp: Date.now() - }); - },lchmod:function (path, mode) { - FS.chmod(path, mode, true); - },fchmod:function (fd, mode) { - var stream = FS.getStream(fd); - if (!stream) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - FS.chmod(stream.node, mode); - },chown:function (path, uid, gid, dontFollow) { - var node; - if (typeof path === 'string') { - var lookup = FS.lookupPath(path, { follow: !dontFollow }); - node = lookup.node; - } else { - node = path; - } - if (!node.node_ops.setattr) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - node.node_ops.setattr(node, { - timestamp: Date.now() - // we ignore the uid / gid for now - }); - },lchown:function (path, uid, gid) { - FS.chown(path, uid, gid, true); - },fchown:function (fd, uid, gid) { - var stream = FS.getStream(fd); - if (!stream) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - FS.chown(stream.node, uid, gid); - },truncate:function (path, len) { - if (len < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var node; - if (typeof path === 'string') { - var lookup = FS.lookupPath(path, { follow: true }); - node = lookup.node; - } else { - node = path; - } - if (!node.node_ops.setattr) { - throw new FS.ErrnoError(ERRNO_CODES.EPERM); - } - if (FS.isDir(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EISDIR); - } - if (!FS.isFile(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var err = FS.nodePermissions(node, 'w'); - if (err) { - throw new FS.ErrnoError(err); - } - node.node_ops.setattr(node, { - size: len, - timestamp: Date.now() - }); - },ftruncate:function (fd, len) { - var stream = FS.getStream(fd); - if (!stream) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - if ((stream.flags & 2097155) === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - FS.truncate(stream.node, len); - },utime:function (path, atime, mtime) { - var lookup = FS.lookupPath(path, { follow: true }); - var node = lookup.node; - node.node_ops.setattr(node, { - timestamp: Math.max(atime, mtime) - }); - },open:function (path, flags, mode, fd_start, fd_end) { - if (path === "") { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; - mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; - if ((flags & 64)) { - mode = (mode & 4095) | 32768; - } else { - mode = 0; - } - var node; - if (typeof path === 'object') { - node = path; - } else { - path = PATH.normalize(path); - try { - var lookup = FS.lookupPath(path, { - follow: !(flags & 131072) - }); - node = lookup.node; - } catch (e) { - // ignore - } - } - // perhaps we need to create the node - var created = false; - if ((flags & 64)) { - if (node) { - // if O_CREAT and O_EXCL are set, error out if the node already exists - if ((flags & 128)) { - throw new FS.ErrnoError(ERRNO_CODES.EEXIST); - } - } else { - // node doesn't exist, try to create it - node = FS.mknod(path, mode, 0); - created = true; - } - } - if (!node) { - throw new FS.ErrnoError(ERRNO_CODES.ENOENT); - } - // can't truncate a device - if (FS.isChrdev(node.mode)) { - flags &= ~512; - } - // check permissions, if this is not a file we just created now (it is ok to - // create and write to a file with read-only permissions; it is read-only - // for later use) - if (!created) { - var err = FS.mayOpen(node, flags); - if (err) { - throw new FS.ErrnoError(err); - } - } - // do truncation if necessary - if ((flags & 512)) { - FS.truncate(node, 0); - } - // we've already handled these, don't pass down to the underlying vfs - flags &= ~(128 | 512); - - // register the stream with the filesystem - var stream = FS.createStream({ - node: node, - path: FS.getPath(node), // we want the absolute path to the node - flags: flags, - seekable: true, - position: 0, - stream_ops: node.stream_ops, - // used by the file family libc calls (fopen, fwrite, ferror, etc.) - ungotten: [], - error: false - }, fd_start, fd_end); - // call the new stream's open function - if (stream.stream_ops.open) { - stream.stream_ops.open(stream); - } - if (Module['logReadFiles'] && !(flags & 1)) { - if (!FS.readFiles) FS.readFiles = {}; - if (!(path in FS.readFiles)) { - FS.readFiles[path] = 1; - Module['printErr']('read file: ' + path); - } - } - try { - if (FS.trackingDelegate['onOpenFile']) { - var trackingFlags = 0; - if ((flags & 2097155) !== 1) { - trackingFlags |= FS.tracking.openFlags.READ; - } - if ((flags & 2097155) !== 0) { - trackingFlags |= FS.tracking.openFlags.WRITE; - } - FS.trackingDelegate['onOpenFile'](path, trackingFlags); - } - } catch(e) { - console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message); - } - return stream; - },close:function (stream) { - try { - if (stream.stream_ops.close) { - stream.stream_ops.close(stream); - } - } catch (e) { - throw e; - } finally { - FS.closeStream(stream.fd); - } - },llseek:function (stream, offset, whence) { - if (!stream.seekable || !stream.stream_ops.llseek) { - throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); - } - stream.position = stream.stream_ops.llseek(stream, offset, whence); - stream.ungotten = []; - return stream.position; - },read:function (stream, buffer, offset, length, position) { - if (length < 0 || position < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - if ((stream.flags & 2097155) === 1) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - if (FS.isDir(stream.node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EISDIR); - } - if (!stream.stream_ops.read) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var seeking = true; - if (typeof position === 'undefined') { - position = stream.position; - seeking = false; - } else if (!stream.seekable) { - throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); - } - var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); - if (!seeking) stream.position += bytesRead; - return bytesRead; - },write:function (stream, buffer, offset, length, position, canOwn) { - if (length < 0 || position < 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - if ((stream.flags & 2097155) === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - if (FS.isDir(stream.node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.EISDIR); - } - if (!stream.stream_ops.write) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - if (stream.flags & 1024) { - // seek to the end before writing in append mode - FS.llseek(stream, 0, 2); - } - var seeking = true; - if (typeof position === 'undefined') { - position = stream.position; - seeking = false; - } else if (!stream.seekable) { - throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); - } - var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); - if (!seeking) stream.position += bytesWritten; - try { - if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path); - } catch(e) { - console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: " + e.message); - } - return bytesWritten; - },allocate:function (stream, offset, length) { - if (offset < 0 || length <= 0) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - if ((stream.flags & 2097155) === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EBADF); - } - if (!FS.isFile(stream.node.mode) && !FS.isDir(node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.ENODEV); - } - if (!stream.stream_ops.allocate) { - throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP); - } - stream.stream_ops.allocate(stream, offset, length); - },mmap:function (stream, buffer, offset, length, position, prot, flags) { - // TODO if PROT is PROT_WRITE, make sure we have write access - if ((stream.flags & 2097155) === 1) { - throw new FS.ErrnoError(ERRNO_CODES.EACCES); - } - if (!stream.stream_ops.mmap) { - throw new FS.ErrnoError(ERRNO_CODES.ENODEV); - } - return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); - },msync:function (stream, buffer, offset, length, mmapFlags) { - if (!stream || !stream.stream_ops.msync) { - return 0; - } - return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); - },munmap:function (stream) { - return 0; - },ioctl:function (stream, cmd, arg) { - if (!stream.stream_ops.ioctl) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTTY); - } - return stream.stream_ops.ioctl(stream, cmd, arg); - },readFile:function (path, opts) { - opts = opts || {}; - opts.flags = opts.flags || 'r'; - opts.encoding = opts.encoding || 'binary'; - if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { - throw new Error('Invalid encoding type "' + opts.encoding + '"'); - } - var ret; - var stream = FS.open(path, opts.flags); - var stat = FS.stat(path); - var length = stat.size; - var buf = new Uint8Array(length); - FS.read(stream, buf, 0, length, 0); - if (opts.encoding === 'utf8') { - ret = UTF8ArrayToString(buf, 0); - } else if (opts.encoding === 'binary') { - ret = buf; - } - FS.close(stream); - return ret; - },writeFile:function (path, data, opts) { - opts = opts || {}; - opts.flags = opts.flags || 'w'; - opts.encoding = opts.encoding || 'utf8'; - if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { - throw new Error('Invalid encoding type "' + opts.encoding + '"'); - } - var stream = FS.open(path, opts.flags, opts.mode); - if (opts.encoding === 'utf8') { - var buf = new Uint8Array(lengthBytesUTF8(data)+1); - var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); - FS.write(stream, buf, 0, actualNumBytes, 0, opts.canOwn); - } else if (opts.encoding === 'binary') { - FS.write(stream, data, 0, data.length, 0, opts.canOwn); - } - FS.close(stream); - },cwd:function () { - return FS.currentPath; - },chdir:function (path) { - var lookup = FS.lookupPath(path, { follow: true }); - if (!FS.isDir(lookup.node.mode)) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); - } - var err = FS.nodePermissions(lookup.node, 'x'); - if (err) { - throw new FS.ErrnoError(err); - } - FS.currentPath = lookup.path; - },createDefaultDirectories:function () { - FS.mkdir('/tmp'); - FS.mkdir('/home'); - FS.mkdir('/home/web_user'); - },createDefaultDevices:function () { - // create /dev - FS.mkdir('/dev'); - // setup /dev/null - FS.registerDevice(FS.makedev(1, 3), { - read: function() { return 0; }, - write: function(stream, buffer, offset, length, pos) { return length; } - }); - FS.mkdev('/dev/null', FS.makedev(1, 3)); - // setup /dev/tty and /dev/tty1 - // stderr needs to print output using Module['printErr'] - // so we register a second tty just for it. - TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); - TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); - FS.mkdev('/dev/tty', FS.makedev(5, 0)); - FS.mkdev('/dev/tty1', FS.makedev(6, 0)); - // setup /dev/[u]random - var random_device; - if (typeof crypto !== 'undefined') { - // for modern web browsers - var randomBuffer = new Uint8Array(1); - random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; - } else if (ENVIRONMENT_IS_NODE) { - // for nodejs - random_device = function() { return require('crypto').randomBytes(1)[0]; }; - } else { - // default for ES5 platforms - random_device = function() { return (Math.random()*256)|0; }; - } - FS.createDevice('/dev', 'random', random_device); - FS.createDevice('/dev', 'urandom', random_device); - // we're not going to emulate the actual shm device, - // just create the tmp dirs that reside in it commonly - FS.mkdir('/dev/shm'); - FS.mkdir('/dev/shm/tmp'); - },createStandardStreams:function () { - // TODO deprecate the old functionality of a single - // input / output callback and that utilizes FS.createDevice - // and instead require a unique set of stream ops - - // by default, we symlink the standard streams to the - // default tty devices. however, if the standard streams - // have been overwritten we create a unique device for - // them instead. - if (Module['stdin']) { - FS.createDevice('/dev', 'stdin', Module['stdin']); - } else { - FS.symlink('/dev/tty', '/dev/stdin'); - } - if (Module['stdout']) { - FS.createDevice('/dev', 'stdout', null, Module['stdout']); - } else { - FS.symlink('/dev/tty', '/dev/stdout'); - } - if (Module['stderr']) { - FS.createDevice('/dev', 'stderr', null, Module['stderr']); - } else { - FS.symlink('/dev/tty1', '/dev/stderr'); - } - - // open default streams for the stdin, stdout and stderr devices - var stdin = FS.open('/dev/stdin', 'r'); - HEAP32[((_stdin)>>2)]=FS.getPtrForStream(stdin); - assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); - - var stdout = FS.open('/dev/stdout', 'w'); - HEAP32[((_stdout)>>2)]=FS.getPtrForStream(stdout); - assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); - - var stderr = FS.open('/dev/stderr', 'w'); - HEAP32[((_stderr)>>2)]=FS.getPtrForStream(stderr); - assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); - },ensureErrnoError:function () { - if (FS.ErrnoError) return; - FS.ErrnoError = function ErrnoError(errno, node) { - this.node = node; - this.setErrno = function(errno) { - this.errno = errno; - for (var key in ERRNO_CODES) { - if (ERRNO_CODES[key] === errno) { - this.code = key; - break; - } - } - }; - this.setErrno(errno); - this.message = ERRNO_MESSAGES[errno]; - }; - FS.ErrnoError.prototype = new Error(); - FS.ErrnoError.prototype.constructor = FS.ErrnoError; - // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) - [ERRNO_CODES.ENOENT].forEach(function(code) { - FS.genericErrors[code] = new FS.ErrnoError(code); - FS.genericErrors[code].stack = ''; - }); - },staticInit:function () { - FS.ensureErrnoError(); - - FS.nameTable = new Array(4096); - - FS.mount(MEMFS, {}, '/'); - - FS.createDefaultDirectories(); - FS.createDefaultDevices(); - },init:function (input, output, error) { - assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); - FS.init.initialized = true; - - FS.ensureErrnoError(); - - // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here - Module['stdin'] = input || Module['stdin']; - Module['stdout'] = output || Module['stdout']; - Module['stderr'] = error || Module['stderr']; - - FS.createStandardStreams(); - },quit:function () { - FS.init.initialized = false; - for (var i = 0; i < FS.streams.length; i++) { - var stream = FS.streams[i]; - if (!stream) { - continue; - } - FS.close(stream); - } - },getMode:function (canRead, canWrite) { - var mode = 0; - if (canRead) mode |= 292 | 73; - if (canWrite) mode |= 146; - return mode; - },joinPath:function (parts, forceRelative) { - var path = PATH.join.apply(null, parts); - if (forceRelative && path[0] == '/') path = path.substr(1); - return path; - },absolutePath:function (relative, base) { - return PATH.resolve(base, relative); - },standardizePath:function (path) { - return PATH.normalize(path); - },findObject:function (path, dontResolveLastLink) { - var ret = FS.analyzePath(path, dontResolveLastLink); - if (ret.exists) { - return ret.object; - } else { - ___setErrNo(ret.error); - return null; - } - },analyzePath:function (path, dontResolveLastLink) { - // operate from within the context of the symlink's target - try { - var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); - path = lookup.path; - } catch (e) { - } - var ret = { - isRoot: false, exists: false, error: 0, name: null, path: null, object: null, - parentExists: false, parentPath: null, parentObject: null - }; - try { - var lookup = FS.lookupPath(path, { parent: true }); - ret.parentExists = true; - ret.parentPath = lookup.path; - ret.parentObject = lookup.node; - ret.name = PATH.basename(path); - lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); - ret.exists = true; - ret.path = lookup.path; - ret.object = lookup.node; - ret.name = lookup.node.name; - ret.isRoot = lookup.path === '/'; - } catch (e) { - ret.error = e.errno; - }; - return ret; - },createFolder:function (parent, name, canRead, canWrite) { - var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); - var mode = FS.getMode(canRead, canWrite); - return FS.mkdir(path, mode); - },createPath:function (parent, path, canRead, canWrite) { - parent = typeof parent === 'string' ? parent : FS.getPath(parent); - var parts = path.split('/').reverse(); - while (parts.length) { - var part = parts.pop(); - if (!part) continue; - var current = PATH.join2(parent, part); - try { - FS.mkdir(current); - } catch (e) { - // ignore EEXIST - } - parent = current; - } - return current; - },createFile:function (parent, name, properties, canRead, canWrite) { - var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); - var mode = FS.getMode(canRead, canWrite); - return FS.create(path, mode); - },createDataFile:function (parent, name, data, canRead, canWrite, canOwn) { - var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; - var mode = FS.getMode(canRead, canWrite); - var node = FS.create(path, mode); - if (data) { - if (typeof data === 'string') { - var arr = new Array(data.length); - for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); - data = arr; - } - // make sure we can write to the file - FS.chmod(node, mode | 146); - var stream = FS.open(node, 'w'); - FS.write(stream, data, 0, data.length, 0, canOwn); - FS.close(stream); - FS.chmod(node, mode); - } - return node; - },createDevice:function (parent, name, input, output) { - var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); - var mode = FS.getMode(!!input, !!output); - if (!FS.createDevice.major) FS.createDevice.major = 64; - var dev = FS.makedev(FS.createDevice.major++, 0); - // Create a fake device that a set of stream ops to emulate - // the old behavior. - FS.registerDevice(dev, { - open: function(stream) { - stream.seekable = false; - }, - close: function(stream) { - // flush any pending line data - if (output && output.buffer && output.buffer.length) { - output(10); - } - }, - read: function(stream, buffer, offset, length, pos /* ignored */) { - var bytesRead = 0; - for (var i = 0; i < length; i++) { - var result; - try { - result = input(); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - if (result === undefined && bytesRead === 0) { - throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); - } - if (result === null || result === undefined) break; - bytesRead++; - buffer[offset+i] = result; - } - if (bytesRead) { - stream.node.timestamp = Date.now(); - } - return bytesRead; - }, - write: function(stream, buffer, offset, length, pos) { - for (var i = 0; i < length; i++) { - try { - output(buffer[offset+i]); - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - } - if (length) { - stream.node.timestamp = Date.now(); - } - return i; - } - }); - return FS.mkdev(path, mode, dev); - },createLink:function (parent, name, target, canRead, canWrite) { - var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); - return FS.symlink(target, path); - },forceLoadFile:function (obj) { - if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; - var success = true; - if (typeof XMLHttpRequest !== 'undefined') { - throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); - } else if (Module['read']) { - // Command-line. - try { - // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as - // read() will try to parse UTF8. - obj.contents = intArrayFromString(Module['read'](obj.url), true); - obj.usedBytes = obj.contents.length; - } catch (e) { - success = false; - } - } else { - throw new Error('Cannot load without read() or XMLHttpRequest.'); - } - if (!success) ___setErrNo(ERRNO_CODES.EIO); - return success; - },createLazyFile:function (parent, name, url, canRead, canWrite) { - // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. - function LazyUint8Array() { - this.lengthKnown = false; - this.chunks = []; // Loaded chunks. Index is the chunk number - } - LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { - if (idx > this.length-1 || idx < 0) { - return undefined; - } - var chunkOffset = idx % this.chunkSize; - var chunkNum = (idx / this.chunkSize)|0; - return this.getter(chunkNum)[chunkOffset]; - } - LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { - this.getter = getter; - } - LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { - // Find length - var xhr = new XMLHttpRequest(); - xhr.open('HEAD', url, false); - xhr.send(null); - if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); - var datalength = Number(xhr.getResponseHeader("Content-length")); - var header; - var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; - var chunkSize = 1024*1024; // Chunk size in bytes - - if (!hasByteServing) chunkSize = datalength; - - // Function to get a range from the remote URL. - var doXHR = (function(from, to) { - if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); - if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); - - // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, false); - if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); - - // Some hints to the browser that we want binary data. - if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; - if (xhr.overrideMimeType) { - xhr.overrideMimeType('text/plain; charset=x-user-defined'); - } - - xhr.send(null); - if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); - if (xhr.response !== undefined) { - return new Uint8Array(xhr.response || []); - } else { - return intArrayFromString(xhr.responseText || '', true); - } - }); - var lazyArray = this; - lazyArray.setDataGetter(function(chunkNum) { - var start = chunkNum * chunkSize; - var end = (chunkNum+1) * chunkSize - 1; // including this byte - end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block - if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { - lazyArray.chunks[chunkNum] = doXHR(start, end); - } - if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); - return lazyArray.chunks[chunkNum]; - }); - - this._length = datalength; - this._chunkSize = chunkSize; - this.lengthKnown = true; - } - if (typeof XMLHttpRequest !== 'undefined') { - if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; - var lazyArray = new LazyUint8Array(); - Object.defineProperty(lazyArray, "length", { - get: function() { - if(!this.lengthKnown) { - this.cacheLength(); - } - return this._length; - } - }); - Object.defineProperty(lazyArray, "chunkSize", { - get: function() { - if(!this.lengthKnown) { - this.cacheLength(); - } - return this._chunkSize; - } - }); - - var properties = { isDevice: false, contents: lazyArray }; - } else { - var properties = { isDevice: false, url: url }; - } - - var node = FS.createFile(parent, name, properties, canRead, canWrite); - // This is a total hack, but I want to get this lazy file code out of the - // core of MEMFS. If we want to keep this lazy file concept I feel it should - // be its own thin LAZYFS proxying calls to MEMFS. - if (properties.contents) { - node.contents = properties.contents; - } else if (properties.url) { - node.contents = null; - node.url = properties.url; - } - // Add a function that defers querying the file size until it is asked the first time. - Object.defineProperty(node, "usedBytes", { - get: function() { return this.contents.length; } - }); - // override each stream op with one that tries to force load the lazy file first - var stream_ops = {}; - var keys = Object.keys(node.stream_ops); - keys.forEach(function(key) { - var fn = node.stream_ops[key]; - stream_ops[key] = function forceLoadLazyFile() { - if (!FS.forceLoadFile(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - return fn.apply(null, arguments); - }; - }); - // use a custom read function - stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { - if (!FS.forceLoadFile(node)) { - throw new FS.ErrnoError(ERRNO_CODES.EIO); - } - var contents = stream.node.contents; - if (position >= contents.length) - return 0; - var size = Math.min(contents.length - position, length); - assert(size >= 0); - if (contents.slice) { // normal array - for (var i = 0; i < size; i++) { - buffer[offset + i] = contents[position + i]; - } - } else { - for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR - buffer[offset + i] = contents.get(position + i); - } - } - return size; - }; - node.stream_ops = stream_ops; - return node; - },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { - Browser.init(); - // TODO we should allow people to just pass in a complete filename instead - // of parent and name being that we just join them anyways - var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent; - var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname - function processData(byteArray) { - function finish(byteArray) { - if (preFinish) preFinish(); - if (!dontCreateFile) { - FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); - } - if (onload) onload(); - removeRunDependency(dep); - } - var handled = false; - Module['preloadPlugins'].forEach(function(plugin) { - if (handled) return; - if (plugin['canHandle'](fullname)) { - plugin['handle'](byteArray, fullname, finish, function() { - if (onerror) onerror(); - removeRunDependency(dep); - }); - handled = true; - } - }); - if (!handled) finish(byteArray); - } - addRunDependency(dep); - if (typeof url == 'string') { - Browser.asyncLoad(url, function(byteArray) { - processData(byteArray); - }, onerror); - } else { - processData(url); - } - },indexedDB:function () { - return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; - },DB_NAME:function () { - return 'EM_FS_' + window.location.pathname; - },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function (paths, onload, onerror) { - onload = onload || function(){}; - onerror = onerror || function(){}; - var indexedDB = FS.indexedDB(); - try { - var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); - } catch (e) { - return onerror(e); - } - openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { - console.log('creating db'); - var db = openRequest.result; - db.createObjectStore(FS.DB_STORE_NAME); - }; - openRequest.onsuccess = function openRequest_onsuccess() { - var db = openRequest.result; - var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); - var files = transaction.objectStore(FS.DB_STORE_NAME); - var ok = 0, fail = 0, total = paths.length; - function finish() { - if (fail == 0) onload(); else onerror(); - } - paths.forEach(function(path) { - var putRequest = files.put(FS.analyzePath(path).object.contents, path); - putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; - putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; - }); - transaction.onerror = onerror; - }; - openRequest.onerror = onerror; - },loadFilesFromDB:function (paths, onload, onerror) { - onload = onload || function(){}; - onerror = onerror || function(){}; - var indexedDB = FS.indexedDB(); - try { - var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); - } catch (e) { - return onerror(e); - } - openRequest.onupgradeneeded = onerror; // no database to load from - openRequest.onsuccess = function openRequest_onsuccess() { - var db = openRequest.result; - try { - var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); - } catch(e) { - onerror(e); - return; - } - var files = transaction.objectStore(FS.DB_STORE_NAME); - var ok = 0, fail = 0, total = paths.length; - function finish() { - if (fail == 0) onload(); else onerror(); - } - paths.forEach(function(path) { - var getRequest = files.get(path); - getRequest.onsuccess = function getRequest_onsuccess() { - if (FS.analyzePath(path).exists) { - FS.unlink(path); - } - FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); - ok++; - if (ok + fail == total) finish(); - }; - getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; - }); - transaction.onerror = onerror; - }; - openRequest.onerror = onerror; - }};function _fflush(stream) { - // int fflush(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fflush.html - - /* - // Disabled, see https://github.com/kripken/emscripten/issues/2770 - stream = FS.getStreamFromPtr(stream); - if (stream.stream_ops.flush) { - stream.stream_ops.flush(stream); - } - */ - } - - - Module["_strlen"] = _strlen; - - function _GetTitleGain() { - Module['printErr']('missing function: GetTitleGain'); abort(-1); - } - - - Module["_i64Add"] = _i64Add; - - var _fabs=Math_abs; - - var _floor=Math_floor; - - var _sqrt=Math_sqrt; - - function _hip_set_errorf() { - Module['printErr']('missing function: hip_set_errorf'); abort(-1); - } - - var _llvm_pow_f32=Math_pow; - - - - function _emscripten_set_main_loop_timing(mode, value) { - Browser.mainLoop.timingMode = mode; - Browser.mainLoop.timingValue = value; - - if (!Browser.mainLoop.func) { - return 1; // Return non-zero on failure, can't set timing mode when there is no main loop. - } - - if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { - setTimeout(Browser.mainLoop.runner, value); // doing this each time means that on exception, we stop - }; - Browser.mainLoop.method = 'timeout'; - } else if (mode == 1 /*EM_TIMING_RAF*/) { - Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler() { - Browser.requestAnimationFrame(Browser.mainLoop.runner); - }; - Browser.mainLoop.method = 'rAF'; - } - return 0; - }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) { - Module['noExitRuntime'] = true; - - assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'); - - Browser.mainLoop.func = func; - Browser.mainLoop.arg = arg; - - var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; - - Browser.mainLoop.runner = function Browser_mainLoop_runner() { - if (ABORT) return; - if (Browser.mainLoop.queue.length > 0) { - var start = Date.now(); - var blocker = Browser.mainLoop.queue.shift(); - blocker.func(blocker.arg); - if (Browser.mainLoop.remainingBlockers) { - var remaining = Browser.mainLoop.remainingBlockers; - var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining); - if (blocker.counted) { - Browser.mainLoop.remainingBlockers = next; - } else { - // not counted, but move the progress along a tiny bit - next = next + 0.5; // do not steal all the next one's progress - Browser.mainLoop.remainingBlockers = (8*remaining + next)/9; - } - } - console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers); - Browser.mainLoop.updateStatus(); - setTimeout(Browser.mainLoop.runner, 0); - return; - } - - // catch pauses from non-main loop sources - if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; - - // Implement very basic swap interval control - Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; - if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { - // Not the scheduled time to render this frame - skip. - Browser.mainLoop.scheduler(); - return; - } - - // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize - // VBO double-buffering and reduce GPU stalls. - - if (Browser.mainLoop.method === 'timeout' && Module.ctx) { - Module.printErr('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!'); - Browser.mainLoop.method = ''; // just warn once per call to set main loop - } - - Browser.mainLoop.runIter(function() { - if (typeof arg !== 'undefined') { - Runtime.dynCall('vi', func, [arg]); - } else { - Runtime.dynCall('v', func); - } - }); - - // catch pauses from the main loop itself - if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return; - - // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able - // to queue the newest produced audio samples. - // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData() - // do not need to be hardcoded into this function, but can be more generic. - if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData(); - - Browser.mainLoop.scheduler(); - } - - if (!noSetTiming) { - if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps); - else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating) - - Browser.mainLoop.scheduler(); - } - - if (simulateInfiniteLoop) { - throw 'SimulateInfiniteLoop'; - } - }var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function () { - Browser.mainLoop.scheduler = null; - Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return. - },resume:function () { - Browser.mainLoop.currentlyRunningMainloop++; - var timingMode = Browser.mainLoop.timingMode; - var timingValue = Browser.mainLoop.timingValue; - var func = Browser.mainLoop.func; - Browser.mainLoop.func = null; - _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */); - _emscripten_set_main_loop_timing(timingMode, timingValue); - Browser.mainLoop.scheduler(); - },updateStatus:function () { - if (Module['setStatus']) { - var message = Module['statusMessage'] || 'Please wait...'; - var remaining = Browser.mainLoop.remainingBlockers; - var expected = Browser.mainLoop.expectedBlockers; - if (remaining) { - if (remaining < expected) { - Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); - } else { - Module['setStatus'](message); - } - } else { - Module['setStatus'](''); - } - } - },runIter:function (func) { - if (ABORT) return; - if (Module['preMainLoop']) { - var preRet = Module['preMainLoop'](); - if (preRet === false) { - return; // |return false| skips a frame - } - } - try { - func(); - } catch (e) { - if (e instanceof ExitStatus) { - return; - } else { - if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]); - throw e; - } - } - if (Module['postMainLoop']) Module['postMainLoop'](); - }},isFullScreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function () { - if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers - - if (Browser.initted) return; - Browser.initted = true; - - try { - new Blob(); - Browser.hasBlobConstructor = true; - } catch(e) { - Browser.hasBlobConstructor = false; - console.log("warning: no blob constructor, cannot create blobs with mimetypes"); - } - Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); - Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; - if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') { - console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); - Module.noImageDecoding = true; - } - - // Support for plugins that can process preloaded files. You can add more of these to - // your app by creating and appending to Module.preloadPlugins. - // - // Each plugin is asked if it can handle a file based on the file's name. If it can, - // it is given the file's raw data. When it is done, it calls a callback with the file's - // (possibly modified) data. For example, a plugin might decompress a file, or it - // might create some side data structure for use later (like an Image element, etc.). - - var imagePlugin = {}; - imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { - return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); - }; - imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { - var b = null; - if (Browser.hasBlobConstructor) { - try { - b = new Blob([byteArray], { type: Browser.getMimetype(name) }); - if (b.size !== byteArray.length) { // Safari bug #118630 - // Safari's Blob can only take an ArrayBuffer - b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); - } - } catch(e) { - Runtime.warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); - } - } - if (!b) { - var bb = new Browser.BlobBuilder(); - bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range - b = bb.getBlob(); - } - var url = Browser.URLObject.createObjectURL(b); - var img = new Image(); - img.onload = function img_onload() { - assert(img.complete, 'Image ' + name + ' could not be decoded'); - var canvas = document.createElement('canvas'); - canvas.width = img.width; - canvas.height = img.height; - var ctx = canvas.getContext('2d'); - ctx.drawImage(img, 0, 0); - Module["preloadedImages"][name] = canvas; - Browser.URLObject.revokeObjectURL(url); - if (onload) onload(byteArray); - }; - img.onerror = function img_onerror(event) { - console.log('Image ' + url + ' could not be decoded'); - if (onerror) onerror(); - }; - img.src = url; - }; - Module['preloadPlugins'].push(imagePlugin); - - var audioPlugin = {}; - audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { - return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; - }; - audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { - var done = false; - function finish(audio) { - if (done) return; - done = true; - Module["preloadedAudios"][name] = audio; - if (onload) onload(byteArray); - } - function fail() { - if (done) return; - done = true; - Module["preloadedAudios"][name] = new Audio(); // empty shim - if (onerror) onerror(); - } - if (Browser.hasBlobConstructor) { - try { - var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); - } catch(e) { - return fail(); - } - var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! - var audio = new Audio(); - audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 - audio.onerror = function audio_onerror(event) { - if (done) return; - console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); - function encode64(data) { - var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - var PAD = '='; - var ret = ''; - var leftchar = 0; - var leftbits = 0; - for (var i = 0; i < data.length; i++) { - leftchar = (leftchar << 8) | data[i]; - leftbits += 8; - while (leftbits >= 6) { - var curr = (leftchar >> (leftbits-6)) & 0x3f; - leftbits -= 6; - ret += BASE[curr]; - } - } - if (leftbits == 2) { - ret += BASE[(leftchar&3) << 4]; - ret += PAD + PAD; - } else if (leftbits == 4) { - ret += BASE[(leftchar&0xf) << 2]; - ret += PAD; - } - return ret; - } - audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); - finish(audio); // we don't wait for confirmation this worked - but it's worth trying - }; - audio.src = url; - // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror - Browser.safeSetTimeout(function() { - finish(audio); // try to use it even though it is not necessarily ready to play - }, 10000); - } else { - return fail(); - } - }; - Module['preloadPlugins'].push(audioPlugin); - - // Canvas event setup - - var canvas = Module['canvas']; - function pointerLockChange() { - Browser.pointerLock = document['pointerLockElement'] === canvas || - document['mozPointerLockElement'] === canvas || - document['webkitPointerLockElement'] === canvas || - document['msPointerLockElement'] === canvas; - } - if (canvas) { - // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module - // Module['forcedAspectRatio'] = 4 / 3; - - canvas.requestPointerLock = canvas['requestPointerLock'] || - canvas['mozRequestPointerLock'] || - canvas['webkitRequestPointerLock'] || - canvas['msRequestPointerLock'] || - function(){}; - canvas.exitPointerLock = document['exitPointerLock'] || - document['mozExitPointerLock'] || - document['webkitExitPointerLock'] || - document['msExitPointerLock'] || - function(){}; // no-op if function does not exist - canvas.exitPointerLock = canvas.exitPointerLock.bind(document); - - - document.addEventListener('pointerlockchange', pointerLockChange, false); - document.addEventListener('mozpointerlockchange', pointerLockChange, false); - document.addEventListener('webkitpointerlockchange', pointerLockChange, false); - document.addEventListener('mspointerlockchange', pointerLockChange, false); - - if (Module['elementPointerLock']) { - canvas.addEventListener("click", function(ev) { - if (!Browser.pointerLock && canvas.requestPointerLock) { - canvas.requestPointerLock(); - ev.preventDefault(); - } - }, false); - } - } - },createContext:function (canvas, useWebGL, setInModule, webGLContextAttributes) { - if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas. - - var ctx; - var contextHandle; - if (useWebGL) { - // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults. - var contextAttributes = { - antialias: false, - alpha: false - }; - - if (webGLContextAttributes) { - for (var attribute in webGLContextAttributes) { - contextAttributes[attribute] = webGLContextAttributes[attribute]; - } - } - - contextHandle = GL.createContext(canvas, contextAttributes); - if (contextHandle) { - ctx = GL.getContext(contextHandle).GLctx; - } - // Set the background of the WebGL canvas to black - canvas.style.backgroundColor = "black"; - } else { - ctx = canvas.getContext('2d'); - } - - if (!ctx) return null; - - if (setInModule) { - if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'); - - Module.ctx = ctx; - if (useWebGL) GL.makeContextCurrent(contextHandle); - Module.useWebGL = useWebGL; - Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); - Browser.init(); - } - return ctx; - },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas, vrDevice) { - Browser.lockPointer = lockPointer; - Browser.resizeCanvas = resizeCanvas; - Browser.vrDevice = vrDevice; - if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; - if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; - if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null; - - var canvas = Module['canvas']; - function fullScreenChange() { - Browser.isFullScreen = false; - var canvasContainer = canvas.parentNode; - if ((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] || - document['mozFullScreenElement'] || document['mozFullscreenElement'] || - document['fullScreenElement'] || document['fullscreenElement'] || - document['msFullScreenElement'] || document['msFullscreenElement'] || - document['webkitCurrentFullScreenElement']) === canvasContainer) { - canvas.cancelFullScreen = document['cancelFullScreen'] || - document['mozCancelFullScreen'] || - document['webkitCancelFullScreen'] || - document['msExitFullscreen'] || - document['exitFullscreen'] || - function() {}; - canvas.cancelFullScreen = canvas.cancelFullScreen.bind(document); - if (Browser.lockPointer) canvas.requestPointerLock(); - Browser.isFullScreen = true; - if (Browser.resizeCanvas) Browser.setFullScreenCanvasSize(); - } else { - - // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen - canvasContainer.parentNode.insertBefore(canvas, canvasContainer); - canvasContainer.parentNode.removeChild(canvasContainer); - - if (Browser.resizeCanvas) Browser.setWindowedCanvasSize(); - } - if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullScreen); - Browser.updateCanvasDimensions(canvas); - } - - if (!Browser.fullScreenHandlersInstalled) { - Browser.fullScreenHandlersInstalled = true; - document.addEventListener('fullscreenchange', fullScreenChange, false); - document.addEventListener('mozfullscreenchange', fullScreenChange, false); - document.addEventListener('webkitfullscreenchange', fullScreenChange, false); - document.addEventListener('MSFullscreenChange', fullScreenChange, false); - } - - // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root - var canvasContainer = document.createElement("div"); - canvas.parentNode.insertBefore(canvasContainer, canvas); - canvasContainer.appendChild(canvas); - - // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) - canvasContainer.requestFullScreen = canvasContainer['requestFullScreen'] || - canvasContainer['mozRequestFullScreen'] || - canvasContainer['msRequestFullscreen'] || - (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); - - if (vrDevice) { - canvasContainer.requestFullScreen({ vrDisplay: vrDevice }); - } else { - canvasContainer.requestFullScreen(); - } - },nextRAF:0,fakeRequestAnimationFrame:function (func) { - // try to keep 60fps between calls to here - var now = Date.now(); - if (Browser.nextRAF === 0) { - Browser.nextRAF = now + 1000/60; - } else { - while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0 - Browser.nextRAF += 1000/60; - } - } - var delay = Math.max(Browser.nextRAF - now, 0); - setTimeout(func, delay); - },requestAnimationFrame:function requestAnimationFrame(func) { - if (typeof window === 'undefined') { // Provide fallback to setTimeout if window is undefined (e.g. in Node.js) - Browser.fakeRequestAnimationFrame(func); - } else { - if (!window.requestAnimationFrame) { - window.requestAnimationFrame = window['requestAnimationFrame'] || - window['mozRequestAnimationFrame'] || - window['webkitRequestAnimationFrame'] || - window['msRequestAnimationFrame'] || - window['oRequestAnimationFrame'] || - Browser.fakeRequestAnimationFrame; - } - window.requestAnimationFrame(func); - } - },safeCallback:function (func) { - return function() { - if (!ABORT) return func.apply(null, arguments); - }; - },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function () { - Browser.allowAsyncCallbacks = false; - },resumeAsyncCallbacks:function () { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now - Browser.allowAsyncCallbacks = true; - if (Browser.queuedAsyncCallbacks.length > 0) { - var callbacks = Browser.queuedAsyncCallbacks; - Browser.queuedAsyncCallbacks = []; - callbacks.forEach(function(func) { - func(); - }); - } - },safeRequestAnimationFrame:function (func) { - return Browser.requestAnimationFrame(function() { - if (ABORT) return; - if (Browser.allowAsyncCallbacks) { - func(); - } else { - Browser.queuedAsyncCallbacks.push(func); - } - }); - },safeSetTimeout:function (func, timeout) { - Module['noExitRuntime'] = true; - return setTimeout(function() { - if (ABORT) return; - if (Browser.allowAsyncCallbacks) { - func(); - } else { - Browser.queuedAsyncCallbacks.push(func); - } - }, timeout); - },safeSetInterval:function (func, timeout) { - Module['noExitRuntime'] = true; - return setInterval(function() { - if (ABORT) return; - if (Browser.allowAsyncCallbacks) { - func(); - } // drop it on the floor otherwise, next interval will kick in - }, timeout); - },getMimetype:function (name) { - return { - 'jpg': 'image/jpeg', - 'jpeg': 'image/jpeg', - 'png': 'image/png', - 'bmp': 'image/bmp', - 'ogg': 'audio/ogg', - 'wav': 'audio/wav', - 'mp3': 'audio/mpeg' - }[name.substr(name.lastIndexOf('.')+1)]; - },getUserMedia:function (func) { - if(!window.getUserMedia) { - window.getUserMedia = navigator['getUserMedia'] || - navigator['mozGetUserMedia']; - } - window.getUserMedia(func); - },getMovementX:function (event) { - return event['movementX'] || - event['mozMovementX'] || - event['webkitMovementX'] || - 0; - },getMovementY:function (event) { - return event['movementY'] || - event['mozMovementY'] || - event['webkitMovementY'] || - 0; - },getMouseWheelDelta:function (event) { - var delta = 0; - switch (event.type) { - case 'DOMMouseScroll': - delta = event.detail; - break; - case 'mousewheel': - delta = event.wheelDelta; - break; - case 'wheel': - delta = event['deltaY']; - break; - default: - throw 'unrecognized mouse wheel event: ' + event.type; - } - return delta; - },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function (event) { // event should be mousemove, mousedown or mouseup - if (Browser.pointerLock) { - // When the pointer is locked, calculate the coordinates - // based on the movement of the mouse. - // Workaround for Firefox bug 764498 - if (event.type != 'mousemove' && - ('mozMovementX' in event)) { - Browser.mouseMovementX = Browser.mouseMovementY = 0; - } else { - Browser.mouseMovementX = Browser.getMovementX(event); - Browser.mouseMovementY = Browser.getMovementY(event); - } - - // check if SDL is available - if (typeof SDL != "undefined") { - Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; - Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; - } else { - // just add the mouse delta to the current absolut mouse position - // FIXME: ideally this should be clamped against the canvas size and zero - Browser.mouseX += Browser.mouseMovementX; - Browser.mouseY += Browser.mouseMovementY; - } - } else { - // Otherwise, calculate the movement based on the changes - // in the coordinates. - var rect = Module["canvas"].getBoundingClientRect(); - var cw = Module["canvas"].width; - var ch = Module["canvas"].height; - - // Neither .scrollX or .pageXOffset are defined in a spec, but - // we prefer .scrollX because it is currently in a spec draft. - // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) - var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); - var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); - - if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') { - var touch = event.touch; - if (touch === undefined) { - return; // the "touch" property is only defined in SDL - - } - var adjustedX = touch.pageX - (scrollX + rect.left); - var adjustedY = touch.pageY - (scrollY + rect.top); - - adjustedX = adjustedX * (cw / rect.width); - adjustedY = adjustedY * (ch / rect.height); - - var coords = { x: adjustedX, y: adjustedY }; - - if (event.type === 'touchstart') { - Browser.lastTouches[touch.identifier] = coords; - Browser.touches[touch.identifier] = coords; - } else if (event.type === 'touchend' || event.type === 'touchmove') { - var last = Browser.touches[touch.identifier]; - if (!last) last = coords; - Browser.lastTouches[touch.identifier] = last; - Browser.touches[touch.identifier] = coords; - } - return; - } - - var x = event.pageX - (scrollX + rect.left); - var y = event.pageY - (scrollY + rect.top); - - // the canvas might be CSS-scaled compared to its backbuffer; - // SDL-using content will want mouse coordinates in terms - // of backbuffer units. - x = x * (cw / rect.width); - y = y * (ch / rect.height); - - Browser.mouseMovementX = x - Browser.mouseX; - Browser.mouseMovementY = y - Browser.mouseY; - Browser.mouseX = x; - Browser.mouseY = y; - } - },xhrLoad:function (url, onload, onerror) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.responseType = 'arraybuffer'; - xhr.onload = function xhr_onload() { - if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 - onload(xhr.response); - } else { - onerror(); - } - }; - xhr.onerror = onerror; - xhr.send(null); - },asyncLoad:function (url, onload, onerror, noRunDep) { - Browser.xhrLoad(url, function(arrayBuffer) { - assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); - onload(new Uint8Array(arrayBuffer)); - if (!noRunDep) removeRunDependency('al ' + url); - }, function(event) { - if (onerror) { - onerror(); - } else { - throw 'Loading data file "' + url + '" failed.'; - } - }); - if (!noRunDep) addRunDependency('al ' + url); - },resizeListeners:[],updateResizeListeners:function () { - var canvas = Module['canvas']; - Browser.resizeListeners.forEach(function(listener) { - listener(canvas.width, canvas.height); - }); - },setCanvasSize:function (width, height, noUpdates) { - var canvas = Module['canvas']; - Browser.updateCanvasDimensions(canvas, width, height); - if (!noUpdates) Browser.updateResizeListeners(); - },windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function () { - // check if SDL is available - if (typeof SDL != "undefined") { - var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; - flags = flags | 0x00800000; // set SDL_FULLSCREEN flag - HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags - } - Browser.updateResizeListeners(); - },setWindowedCanvasSize:function () { - // check if SDL is available - if (typeof SDL != "undefined") { - var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; - flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag - HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags - } - Browser.updateResizeListeners(); - },updateCanvasDimensions:function (canvas, wNative, hNative) { - if (wNative && hNative) { - canvas.widthNative = wNative; - canvas.heightNative = hNative; - } else { - wNative = canvas.widthNative; - hNative = canvas.heightNative; - } - var w = wNative; - var h = hNative; - if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) { - if (w/h < Module['forcedAspectRatio']) { - w = Math.round(h * Module['forcedAspectRatio']); - } else { - h = Math.round(w / Module['forcedAspectRatio']); - } - } - if (((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] || - document['mozFullScreenElement'] || document['mozFullscreenElement'] || - document['fullScreenElement'] || document['fullscreenElement'] || - document['msFullScreenElement'] || document['msFullscreenElement'] || - document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { - var factor = Math.min(screen.width / w, screen.height / h); - w = Math.round(w * factor); - h = Math.round(h * factor); - } - if (Browser.resizeCanvas) { - if (canvas.width != w) canvas.width = w; - if (canvas.height != h) canvas.height = h; - if (typeof canvas.style != 'undefined') { - canvas.style.removeProperty( "width"); - canvas.style.removeProperty("height"); - } - } else { - if (canvas.width != wNative) canvas.width = wNative; - if (canvas.height != hNative) canvas.height = hNative; - if (typeof canvas.style != 'undefined') { - if (w != wNative || h != hNative) { - canvas.style.setProperty( "width", w + "px", "important"); - canvas.style.setProperty("height", h + "px", "important"); - } else { - canvas.style.removeProperty( "width"); - canvas.style.removeProperty("height"); - } - } - } - },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function () { - var handle = Browser.nextWgetRequestHandle; - Browser.nextWgetRequestHandle++; - return handle; - }}; - - var _llvm_sqrt_f64=Math_sqrt; - - - function __exit(status) { - // void _exit(int status); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html - Module['exit'](status); - }function _exit(status) { - __exit(status); - } - - function _hip_decode_init() { - Module['printErr']('missing function: hip_decode_init'); abort(-1); - } - - function _hip_set_msgf() { - Module['printErr']('missing function: hip_set_msgf'); abort(-1); - } - - var _sin=Math_sin; - - function _sysconf(name) { - // long sysconf(int name); - // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html - switch(name) { - case 30: return PAGE_SIZE; - case 85: return totalMemory / PAGE_SIZE; - case 132: - case 133: - case 12: - case 137: - case 138: - case 15: - case 235: - case 16: - case 17: - case 18: - case 19: - case 20: - case 149: - case 13: - case 10: - case 236: - case 153: - case 9: - case 21: - case 22: - case 159: - case 154: - case 14: - case 77: - case 78: - case 139: - case 80: - case 81: - case 82: - case 68: - case 67: - case 164: - case 11: - case 29: - case 47: - case 48: - case 95: - case 52: - case 51: - case 46: - return 200809; - case 79: - return 0; - case 27: - case 246: - case 127: - case 128: - case 23: - case 24: - case 160: - case 161: - case 181: - case 182: - case 242: - case 183: - case 184: - case 243: - case 244: - case 245: - case 165: - case 178: - case 179: - case 49: - case 50: - case 168: - case 169: - case 175: - case 170: - case 171: - case 172: - case 97: - case 76: - case 32: - case 173: - case 35: - return -1; - case 176: - case 177: - case 7: - case 155: - case 8: - case 157: - case 125: - case 126: - case 92: - case 93: - case 129: - case 130: - case 131: - case 94: - case 91: - return 1; - case 74: - case 60: - case 69: - case 70: - case 4: - return 1024; - case 31: - case 42: - case 72: - return 32; - case 87: - case 26: - case 33: - return 2147483647; - case 34: - case 1: - return 47839; - case 38: - case 36: - return 99; - case 43: - case 37: - return 2048; - case 0: return 2097152; - case 3: return 65536; - case 28: return 32768; - case 44: return 32767; - case 75: return 16384; - case 39: return 1000; - case 89: return 700; - case 71: return 256; - case 40: return 255; - case 2: return 100; - case 180: return 64; - case 25: return 20; - case 5: return 16; - case 6: return 6; - case 73: return 4; - case 84: { - if (typeof navigator === 'object') return navigator['hardwareConcurrency'] || 1; - return 1; - } - } - ___setErrNo(ERRNO_CODES.EINVAL); - return -1; - } - - - Module["_bitshift64Lshr"] = _bitshift64Lshr; - - function _hip_decode_exit() { - Module['printErr']('missing function: hip_decode_exit'); abort(-1); - } - - var _atan=Math_atan; - - var _BDtoIHigh=true; - - var _ceil=Math_ceil; - - - - - - - - function _mkport() { throw 'TODO' }var SOCKFS={mount:function (mount) { - // If Module['websocket'] has already been defined (e.g. for configuring - // the subprotocol/url) use that, if not initialise it to a new object. - Module['websocket'] = (Module['websocket'] && - ('object' === typeof Module['websocket'])) ? Module['websocket'] : {}; - - // Add the Event registration mechanism to the exported websocket configuration - // object so we can register network callbacks from native JavaScript too. - // For more documentation see system/include/emscripten/emscripten.h - Module['websocket']._callbacks = {}; - Module['websocket']['on'] = function(event, callback) { - if ('function' === typeof callback) { - this._callbacks[event] = callback; - } - return this; - }; - - Module['websocket'].emit = function(event, param) { - if ('function' === typeof this._callbacks[event]) { - this._callbacks[event].call(this, param); - } - }; - - // If debug is enabled register simple default logging callbacks for each Event. - - return FS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); - },createSocket:function (family, type, protocol) { - var streaming = type == 1; - if (protocol) { - assert(streaming == (protocol == 6)); // if SOCK_STREAM, must be tcp - } - - // create our internal socket structure - var sock = { - family: family, - type: type, - protocol: protocol, - server: null, - error: null, // Used in getsockopt for SOL_SOCKET/SO_ERROR test - peers: {}, - pending: [], - recv_queue: [], - sock_ops: SOCKFS.websocket_sock_ops - }; - - // create the filesystem node to store the socket structure - var name = SOCKFS.nextname(); - var node = FS.createNode(SOCKFS.root, name, 49152, 0); - node.sock = sock; - - // and the wrapping stream that enables library functions such - // as read and write to indirectly interact with the socket - var stream = FS.createStream({ - path: name, - node: node, - flags: FS.modeStringToFlags('r+'), - seekable: false, - stream_ops: SOCKFS.stream_ops - }); - - // map the new stream to the socket structure (sockets have a 1:1 - // relationship with a stream) - sock.stream = stream; - - return sock; - },getSocket:function (fd) { - var stream = FS.getStream(fd); - if (!stream || !FS.isSocket(stream.node.mode)) { - return null; - } - return stream.node.sock; - },stream_ops:{poll:function (stream) { - var sock = stream.node.sock; - return sock.sock_ops.poll(sock); - },ioctl:function (stream, request, varargs) { - var sock = stream.node.sock; - return sock.sock_ops.ioctl(sock, request, varargs); - },read:function (stream, buffer, offset, length, position /* ignored */) { - var sock = stream.node.sock; - var msg = sock.sock_ops.recvmsg(sock, length); - if (!msg) { - // socket is closed - return 0; - } - buffer.set(msg.buffer, offset); - return msg.buffer.length; - },write:function (stream, buffer, offset, length, position /* ignored */) { - var sock = stream.node.sock; - return sock.sock_ops.sendmsg(sock, buffer, offset, length); - },close:function (stream) { - var sock = stream.node.sock; - sock.sock_ops.close(sock); - }},nextname:function () { - if (!SOCKFS.nextname.current) { - SOCKFS.nextname.current = 0; - } - return 'socket[' + (SOCKFS.nextname.current++) + ']'; - },websocket_sock_ops:{createPeer:function (sock, addr, port) { - var ws; - - if (typeof addr === 'object') { - ws = addr; - addr = null; - port = null; - } - - if (ws) { - // for sockets that've already connected (e.g. we're the server) - // we can inspect the _socket property for the address - if (ws._socket) { - addr = ws._socket.remoteAddress; - port = ws._socket.remotePort; - } - // if we're just now initializing a connection to the remote, - // inspect the url property - else { - var result = /ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url); - if (!result) { - throw new Error('WebSocket URL must be in the format ws(s)://address:port'); - } - addr = result[1]; - port = parseInt(result[2], 10); - } - } else { - // create the actual websocket object and connect - try { - // runtimeConfig gets set to true if WebSocket runtime configuration is available. - var runtimeConfig = (Module['websocket'] && ('object' === typeof Module['websocket'])); - - // The default value is 'ws://' the replace is needed because the compiler replaces '//' comments with '#' - // comments without checking context, so we'd end up with ws:#, the replace swaps the '#' for '//' again. - var url = 'ws:#'.replace('#', '//'); - - if (runtimeConfig) { - if ('string' === typeof Module['websocket']['url']) { - url = Module['websocket']['url']; // Fetch runtime WebSocket URL config. - } - } - - if (url === 'ws://' || url === 'wss://') { // Is the supplied URL config just a prefix, if so complete it. - var parts = addr.split('/'); - url = url + parts[0] + ":" + port + "/" + parts.slice(1).join('/'); - } - - // Make the WebSocket subprotocol (Sec-WebSocket-Protocol) default to binary if no configuration is set. - var subProtocols = 'binary'; // The default value is 'binary' - - if (runtimeConfig) { - if ('string' === typeof Module['websocket']['subprotocol']) { - subProtocols = Module['websocket']['subprotocol']; // Fetch runtime WebSocket subprotocol config. - } - } - - // The regex trims the string (removes spaces at the beginning and end, then splits the string by - // , into an Array. Whitespace removal is important for Websockify and ws. - subProtocols = subProtocols.replace(/^ +| +$/g,"").split(/ *, */); - - // The node ws library API for specifying optional subprotocol is slightly different than the browser's. - var opts = ENVIRONMENT_IS_NODE ? {'protocol': subProtocols.toString()} : subProtocols; - - // If node we use the ws library. - var WebSocket = ENVIRONMENT_IS_NODE ? require('ws') : window['WebSocket']; - ws = new WebSocket(url, opts); - ws.binaryType = 'arraybuffer'; - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EHOSTUNREACH); - } - } - - - var peer = { - addr: addr, - port: port, - socket: ws, - dgram_send_queue: [] - }; - - SOCKFS.websocket_sock_ops.addPeer(sock, peer); - SOCKFS.websocket_sock_ops.handlePeerEvents(sock, peer); - - // if this is a bound dgram socket, send the port number first to allow - // us to override the ephemeral port reported to us by remotePort on the - // remote end. - if (sock.type === 2 && typeof sock.sport !== 'undefined') { - peer.dgram_send_queue.push(new Uint8Array([ - 255, 255, 255, 255, - 'p'.charCodeAt(0), 'o'.charCodeAt(0), 'r'.charCodeAt(0), 't'.charCodeAt(0), - ((sock.sport & 0xff00) >> 8) , (sock.sport & 0xff) - ])); - } - - return peer; - },getPeer:function (sock, addr, port) { - return sock.peers[addr + ':' + port]; - },addPeer:function (sock, peer) { - sock.peers[peer.addr + ':' + peer.port] = peer; - },removePeer:function (sock, peer) { - delete sock.peers[peer.addr + ':' + peer.port]; - },handlePeerEvents:function (sock, peer) { - var first = true; - - var handleOpen = function () { - - Module['websocket'].emit('open', sock.stream.fd); - - try { - var queued = peer.dgram_send_queue.shift(); - while (queued) { - peer.socket.send(queued); - queued = peer.dgram_send_queue.shift(); - } - } catch (e) { - // not much we can do here in the way of proper error handling as we've already - // lied and said this data was sent. shut it down. - peer.socket.close(); - } - }; - - function handleMessage(data) { - assert(typeof data !== 'string' && data.byteLength !== undefined); // must receive an ArrayBuffer - data = new Uint8Array(data); // make a typed array view on the array buffer - - - // if this is the port message, override the peer's port with it - var wasfirst = first; - first = false; - if (wasfirst && - data.length === 10 && - data[0] === 255 && data[1] === 255 && data[2] === 255 && data[3] === 255 && - data[4] === 'p'.charCodeAt(0) && data[5] === 'o'.charCodeAt(0) && data[6] === 'r'.charCodeAt(0) && data[7] === 't'.charCodeAt(0)) { - // update the peer's port and it's key in the peer map - var newport = ((data[8] << 8) | data[9]); - SOCKFS.websocket_sock_ops.removePeer(sock, peer); - peer.port = newport; - SOCKFS.websocket_sock_ops.addPeer(sock, peer); - return; - } - - sock.recv_queue.push({ addr: peer.addr, port: peer.port, data: data }); - Module['websocket'].emit('message', sock.stream.fd); - }; - - if (ENVIRONMENT_IS_NODE) { - peer.socket.on('open', handleOpen); - peer.socket.on('message', function(data, flags) { - if (!flags.binary) { - return; - } - handleMessage((new Uint8Array(data)).buffer); // copy from node Buffer -> ArrayBuffer - }); - peer.socket.on('close', function() { - Module['websocket'].emit('close', sock.stream.fd); - }); - peer.socket.on('error', function(error) { - // Although the ws library may pass errors that may be more descriptive than - // ECONNREFUSED they are not necessarily the expected error code e.g. - // ENOTFOUND on getaddrinfo seems to be node.js specific, so using ECONNREFUSED - // is still probably the most useful thing to do. - sock.error = ERRNO_CODES.ECONNREFUSED; // Used in getsockopt for SOL_SOCKET/SO_ERROR test. - Module['websocket'].emit('error', [sock.stream.fd, sock.error, 'ECONNREFUSED: Connection refused']); - // don't throw - }); - } else { - peer.socket.onopen = handleOpen; - peer.socket.onclose = function() { - Module['websocket'].emit('close', sock.stream.fd); - }; - peer.socket.onmessage = function peer_socket_onmessage(event) { - handleMessage(event.data); - }; - peer.socket.onerror = function(error) { - // The WebSocket spec only allows a 'simple event' to be thrown on error, - // so we only really know as much as ECONNREFUSED. - sock.error = ERRNO_CODES.ECONNREFUSED; // Used in getsockopt for SOL_SOCKET/SO_ERROR test. - Module['websocket'].emit('error', [sock.stream.fd, sock.error, 'ECONNREFUSED: Connection refused']); - }; - } - },poll:function (sock) { - if (sock.type === 1 && sock.server) { - // listen sockets should only say they're available for reading - // if there are pending clients. - return sock.pending.length ? (64 | 1) : 0; - } - - var mask = 0; - var dest = sock.type === 1 ? // we only care about the socket state for connection-based sockets - SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport) : - null; - - if (sock.recv_queue.length || - !dest || // connection-less sockets are always ready to read - (dest && dest.socket.readyState === dest.socket.CLOSING) || - (dest && dest.socket.readyState === dest.socket.CLOSED)) { // let recv return 0 once closed - mask |= (64 | 1); - } - - if (!dest || // connection-less sockets are always ready to write - (dest && dest.socket.readyState === dest.socket.OPEN)) { - mask |= 4; - } - - if ((dest && dest.socket.readyState === dest.socket.CLOSING) || - (dest && dest.socket.readyState === dest.socket.CLOSED)) { - mask |= 16; - } - - return mask; - },ioctl:function (sock, request, arg) { - switch (request) { - case 21531: - var bytes = 0; - if (sock.recv_queue.length) { - bytes = sock.recv_queue[0].data.length; - } - HEAP32[((arg)>>2)]=bytes; - return 0; - default: - return ERRNO_CODES.EINVAL; - } - },close:function (sock) { - // if we've spawned a listen server, close it - if (sock.server) { - try { - sock.server.close(); - } catch (e) { - } - sock.server = null; - } - // close any peer connections - var peers = Object.keys(sock.peers); - for (var i = 0; i < peers.length; i++) { - var peer = sock.peers[peers[i]]; - try { - peer.socket.close(); - } catch (e) { - } - SOCKFS.websocket_sock_ops.removePeer(sock, peer); - } - return 0; - },bind:function (sock, addr, port) { - if (typeof sock.saddr !== 'undefined' || typeof sock.sport !== 'undefined') { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); // already bound - } - sock.saddr = addr; - sock.sport = port || _mkport(); - // in order to emulate dgram sockets, we need to launch a listen server when - // binding on a connection-less socket - // note: this is only required on the server side - if (sock.type === 2) { - // close the existing server if it exists - if (sock.server) { - sock.server.close(); - sock.server = null; - } - // swallow error operation not supported error that occurs when binding in the - // browser where this isn't supported - try { - sock.sock_ops.listen(sock, 0); - } catch (e) { - if (!(e instanceof FS.ErrnoError)) throw e; - if (e.errno !== ERRNO_CODES.EOPNOTSUPP) throw e; - } - } - },connect:function (sock, addr, port) { - if (sock.server) { - throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP); - } - - // TODO autobind - // if (!sock.addr && sock.type == 2) { - // } - - // early out if we're already connected / in the middle of connecting - if (typeof sock.daddr !== 'undefined' && typeof sock.dport !== 'undefined') { - var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport); - if (dest) { - if (dest.socket.readyState === dest.socket.CONNECTING) { - throw new FS.ErrnoError(ERRNO_CODES.EALREADY); - } else { - throw new FS.ErrnoError(ERRNO_CODES.EISCONN); - } - } - } - - // add the socket to our peer list and set our - // destination address / port to match - var peer = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port); - sock.daddr = peer.addr; - sock.dport = peer.port; - - // always "fail" in non-blocking mode - throw new FS.ErrnoError(ERRNO_CODES.EINPROGRESS); - },listen:function (sock, backlog) { - if (!ENVIRONMENT_IS_NODE) { - throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP); - } - if (sock.server) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); // already listening - } - var WebSocketServer = require('ws').Server; - var host = sock.saddr; - sock.server = new WebSocketServer({ - host: host, - port: sock.sport - // TODO support backlog - }); - Module['websocket'].emit('listen', sock.stream.fd); // Send Event with listen fd. - - sock.server.on('connection', function(ws) { - if (sock.type === 1) { - var newsock = SOCKFS.createSocket(sock.family, sock.type, sock.protocol); - - // create a peer on the new socket - var peer = SOCKFS.websocket_sock_ops.createPeer(newsock, ws); - newsock.daddr = peer.addr; - newsock.dport = peer.port; - - // push to queue for accept to pick up - sock.pending.push(newsock); - Module['websocket'].emit('connection', newsock.stream.fd); - } else { - // create a peer on the listen socket so calling sendto - // with the listen socket and an address will resolve - // to the correct client - SOCKFS.websocket_sock_ops.createPeer(sock, ws); - Module['websocket'].emit('connection', sock.stream.fd); - } - }); - sock.server.on('closed', function() { - Module['websocket'].emit('close', sock.stream.fd); - sock.server = null; - }); - sock.server.on('error', function(error) { - // Although the ws library may pass errors that may be more descriptive than - // ECONNREFUSED they are not necessarily the expected error code e.g. - // ENOTFOUND on getaddrinfo seems to be node.js specific, so using EHOSTUNREACH - // is still probably the most useful thing to do. This error shouldn't - // occur in a well written app as errors should get trapped in the compiled - // app's own getaddrinfo call. - sock.error = ERRNO_CODES.EHOSTUNREACH; // Used in getsockopt for SOL_SOCKET/SO_ERROR test. - Module['websocket'].emit('error', [sock.stream.fd, sock.error, 'EHOSTUNREACH: Host is unreachable']); - // don't throw - }); - },accept:function (listensock) { - if (!listensock.server) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - var newsock = listensock.pending.shift(); - newsock.stream.flags = listensock.stream.flags; - return newsock; - },getname:function (sock, peer) { - var addr, port; - if (peer) { - if (sock.daddr === undefined || sock.dport === undefined) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN); - } - addr = sock.daddr; - port = sock.dport; - } else { - // TODO saddr and sport will be set for bind()'d UDP sockets, but what - // should we be returning for TCP sockets that've been connect()'d? - addr = sock.saddr || 0; - port = sock.sport || 0; - } - return { addr: addr, port: port }; - },sendmsg:function (sock, buffer, offset, length, addr, port) { - if (sock.type === 2) { - // connection-less sockets will honor the message address, - // and otherwise fall back to the bound destination address - if (addr === undefined || port === undefined) { - addr = sock.daddr; - port = sock.dport; - } - // if there was no address to fall back to, error out - if (addr === undefined || port === undefined) { - throw new FS.ErrnoError(ERRNO_CODES.EDESTADDRREQ); - } - } else { - // connection-based sockets will only use the bound - addr = sock.daddr; - port = sock.dport; - } - - // find the peer for the destination address - var dest = SOCKFS.websocket_sock_ops.getPeer(sock, addr, port); - - // early out if not connected with a connection-based socket - if (sock.type === 1) { - if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { - throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN); - } else if (dest.socket.readyState === dest.socket.CONNECTING) { - throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); - } - } - - // create a copy of the incoming data to send, as the WebSocket API - // doesn't work entirely with an ArrayBufferView, it'll just send - // the entire underlying buffer - var data; - if (buffer instanceof Array || buffer instanceof ArrayBuffer) { - data = buffer.slice(offset, offset + length); - } else { // ArrayBufferView - data = buffer.buffer.slice(buffer.byteOffset + offset, buffer.byteOffset + offset + length); - } - - // if we're emulating a connection-less dgram socket and don't have - // a cached connection, queue the buffer to send upon connect and - // lie, saying the data was sent now. - if (sock.type === 2) { - if (!dest || dest.socket.readyState !== dest.socket.OPEN) { - // if we're not connected, open a new connection - if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { - dest = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port); - } - dest.dgram_send_queue.push(data); - return length; - } - } - - try { - // send the actual data - dest.socket.send(data); - return length; - } catch (e) { - throw new FS.ErrnoError(ERRNO_CODES.EINVAL); - } - },recvmsg:function (sock, length) { - // http://pubs.opengroup.org/onlinepubs/7908799/xns/recvmsg.html - if (sock.type === 1 && sock.server) { - // tcp servers should not be recv()'ing on the listen socket - throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN); - } - - var queued = sock.recv_queue.shift(); - if (!queued) { - if (sock.type === 1) { - var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport); - - if (!dest) { - // if we have a destination address but are not connected, error out - throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN); - } - else if (dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { - // return null if the socket has closed - return null; - } - else { - // else, our socket is in a valid state but truly has nothing available - throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); - } - } else { - throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); - } - } - - // queued.data will be an ArrayBuffer if it's unadulterated, but if it's - // requeued TCP data it'll be an ArrayBufferView - var queuedLength = queued.data.byteLength || queued.data.length; - var queuedOffset = queued.data.byteOffset || 0; - var queuedBuffer = queued.data.buffer || queued.data; - var bytesRead = Math.min(length, queuedLength); - var res = { - buffer: new Uint8Array(queuedBuffer, queuedOffset, bytesRead), - addr: queued.addr, - port: queued.port - }; - - - // push back any unread data for TCP connections - if (sock.type === 1 && bytesRead < queuedLength) { - var bytesRemaining = queuedLength - bytesRead; - queued.data = new Uint8Array(queuedBuffer, queuedOffset + bytesRead, bytesRemaining); - sock.recv_queue.unshift(queued); - } - - return res; - }}};function _send(fd, buf, len, flags) { - var sock = SOCKFS.getSocket(fd); - if (!sock) { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } - // TODO honor flags - return _write(fd, buf, len); - } - - function _pwrite(fildes, buf, nbyte, offset) { - // ssize_t pwrite(int fildes, const void *buf, size_t nbyte, off_t offset); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html - var stream = FS.getStream(fildes); - if (!stream) { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } - try { - var slab = HEAP8; - return FS.write(stream, slab, buf, nbyte, offset); - } catch (e) { - FS.handleFSError(e); - return -1; - } - }function _write(fildes, buf, nbyte) { - // ssize_t write(int fildes, const void *buf, size_t nbyte); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html - var stream = FS.getStream(fildes); - if (!stream) { - ___setErrNo(ERRNO_CODES.EBADF); - return -1; - } - - - try { - var slab = HEAP8; - return FS.write(stream, slab, buf, nbyte); - } catch (e) { - FS.handleFSError(e); - return -1; - } - } - - function _fileno(stream) { - // int fileno(FILE *stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fileno.html - stream = FS.getStreamFromPtr(stream); - if (!stream) return -1; - return stream.fd; - }function _fwrite(ptr, size, nitems, stream) { - // size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/fwrite.html - var bytesToWrite = nitems * size; - if (bytesToWrite == 0) return 0; - var fd = _fileno(stream); - var bytesWritten = _write(fd, ptr, bytesToWrite); - if (bytesWritten == -1) { - var streamObj = FS.getStreamFromPtr(stream); - if (streamObj) streamObj.error = true; - return 0; - } else { - return (bytesWritten / size)|0; - } - } - - - function __reallyNegative(x) { - return x < 0 || (x === 0 && (1/x) === -Infinity); - }function __formatString(format, varargs) { - assert((varargs & 3) === 0); - var textIndex = format; - var argIndex = 0; - function getNextArg(type) { - // NOTE: Explicitly ignoring type safety. Otherwise this fails: - // int x = 4; printf("%c\n", (char)x); - var ret; - argIndex = Runtime.prepVararg(argIndex, type); - if (type === 'double') { - ret = (HEAP32[((tempDoublePtr)>>2)]=HEAP32[(((varargs)+(argIndex))>>2)],HEAP32[(((tempDoublePtr)+(4))>>2)]=HEAP32[(((varargs)+((argIndex)+(4)))>>2)],(+(HEAPF64[(tempDoublePtr)>>3]))); - argIndex += 8; - } else if (type == 'i64') { - ret = [HEAP32[(((varargs)+(argIndex))>>2)], - HEAP32[(((varargs)+(argIndex+4))>>2)]]; - - argIndex += 8; - } else { - assert((argIndex & 3) === 0); - type = 'i32'; // varargs are always i32, i64, or double - ret = HEAP32[(((varargs)+(argIndex))>>2)]; - argIndex += 4; - } - return ret; - } - - var ret = []; - var curr, next, currArg; - while(1) { - var startTextIndex = textIndex; - curr = HEAP8[((textIndex)>>0)]; - if (curr === 0) break; - next = HEAP8[((textIndex+1)>>0)]; - if (curr == 37) { - // Handle flags. - var flagAlwaysSigned = false; - var flagLeftAlign = false; - var flagAlternative = false; - var flagZeroPad = false; - var flagPadSign = false; - flagsLoop: while (1) { - switch (next) { - case 43: - flagAlwaysSigned = true; - break; - case 45: - flagLeftAlign = true; - break; - case 35: - flagAlternative = true; - break; - case 48: - if (flagZeroPad) { - break flagsLoop; - } else { - flagZeroPad = true; - break; - } - case 32: - flagPadSign = true; - break; - default: - break flagsLoop; - } - textIndex++; - next = HEAP8[((textIndex+1)>>0)]; - } - - // Handle width. - var width = 0; - if (next == 42) { - width = getNextArg('i32'); - textIndex++; - next = HEAP8[((textIndex+1)>>0)]; - } else { - while (next >= 48 && next <= 57) { - width = width * 10 + (next - 48); - textIndex++; - next = HEAP8[((textIndex+1)>>0)]; - } - } - - // Handle precision. - var precisionSet = false, precision = -1; - if (next == 46) { - precision = 0; - precisionSet = true; - textIndex++; - next = HEAP8[((textIndex+1)>>0)]; - if (next == 42) { - precision = getNextArg('i32'); - textIndex++; - } else { - while(1) { - var precisionChr = HEAP8[((textIndex+1)>>0)]; - if (precisionChr < 48 || - precisionChr > 57) break; - precision = precision * 10 + (precisionChr - 48); - textIndex++; - } - } - next = HEAP8[((textIndex+1)>>0)]; - } - if (precision < 0) { - precision = 6; // Standard default. - precisionSet = false; - } - - // Handle integer sizes. WARNING: These assume a 32-bit architecture! - var argSize; - switch (String.fromCharCode(next)) { - case 'h': - var nextNext = HEAP8[((textIndex+2)>>0)]; - if (nextNext == 104) { - textIndex++; - argSize = 1; // char (actually i32 in varargs) - } else { - argSize = 2; // short (actually i32 in varargs) - } - break; - case 'l': - var nextNext = HEAP8[((textIndex+2)>>0)]; - if (nextNext == 108) { - textIndex++; - argSize = 8; // long long - } else { - argSize = 4; // long - } - break; - case 'L': // long long - case 'q': // int64_t - case 'j': // intmax_t - argSize = 8; - break; - case 'z': // size_t - case 't': // ptrdiff_t - case 'I': // signed ptrdiff_t or unsigned size_t - argSize = 4; - break; - default: - argSize = null; - } - if (argSize) textIndex++; - next = HEAP8[((textIndex+1)>>0)]; - - // Handle type specifier. - switch (String.fromCharCode(next)) { - case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': { - // Integer. - var signed = next == 100 || next == 105; - argSize = argSize || 4; - var currArg = getNextArg('i' + (argSize * 8)); - var origArg = currArg; - var argText; - // Flatten i64-1 [low, high] into a (slightly rounded) double - if (argSize == 8) { - currArg = Runtime.makeBigInt(currArg[0], currArg[1], next == 117); - } - // Truncate to requested size. - if (argSize <= 4) { - var limit = Math.pow(256, argSize) - 1; - currArg = (signed ? reSign : unSign)(currArg & limit, argSize * 8); - } - // Format the number. - var currAbsArg = Math.abs(currArg); - var prefix = ''; - if (next == 100 || next == 105) { - if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1], null); else - argText = reSign(currArg, 8 * argSize, 1).toString(10); - } else if (next == 117) { - if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1], true); else - argText = unSign(currArg, 8 * argSize, 1).toString(10); - currArg = Math.abs(currArg); - } else if (next == 111) { - argText = (flagAlternative ? '0' : '') + currAbsArg.toString(8); - } else if (next == 120 || next == 88) { - prefix = (flagAlternative && currArg != 0) ? '0x' : ''; - if (argSize == 8 && i64Math) { - if (origArg[1]) { - argText = (origArg[1]>>>0).toString(16); - var lower = (origArg[0]>>>0).toString(16); - while (lower.length < 8) lower = '0' + lower; - argText += lower; - } else { - argText = (origArg[0]>>>0).toString(16); - } - } else - if (currArg < 0) { - // Represent negative numbers in hex as 2's complement. - currArg = -currArg; - argText = (currAbsArg - 1).toString(16); - var buffer = []; - for (var i = 0; i < argText.length; i++) { - buffer.push((0xF - parseInt(argText[i], 16)).toString(16)); - } - argText = buffer.join(''); - while (argText.length < argSize * 2) argText = 'f' + argText; - } else { - argText = currAbsArg.toString(16); - } - if (next == 88) { - prefix = prefix.toUpperCase(); - argText = argText.toUpperCase(); - } - } else if (next == 112) { - if (currAbsArg === 0) { - argText = '(nil)'; - } else { - prefix = '0x'; - argText = currAbsArg.toString(16); - } - } - if (precisionSet) { - while (argText.length < precision) { - argText = '0' + argText; - } - } - - // Add sign if needed - if (currArg >= 0) { - if (flagAlwaysSigned) { - prefix = '+' + prefix; - } else if (flagPadSign) { - prefix = ' ' + prefix; - } - } - - // Move sign to prefix so we zero-pad after the sign - if (argText.charAt(0) == '-') { - prefix = '-' + prefix; - argText = argText.substr(1); - } - - // Add padding. - while (prefix.length + argText.length < width) { - if (flagLeftAlign) { - argText += ' '; - } else { - if (flagZeroPad) { - argText = '0' + argText; - } else { - prefix = ' ' + prefix; - } - } - } - - // Insert the result into the buffer. - argText = prefix + argText; - argText.split('').forEach(function(chr) { - ret.push(chr.charCodeAt(0)); - }); - break; - } - case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': { - // Float. - var currArg = getNextArg('double'); - var argText; - if (isNaN(currArg)) { - argText = 'nan'; - flagZeroPad = false; - } else if (!isFinite(currArg)) { - argText = (currArg < 0 ? '-' : '') + 'inf'; - flagZeroPad = false; - } else { - var isGeneral = false; - var effectivePrecision = Math.min(precision, 20); - - // Convert g/G to f/F or e/E, as per: - // http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html - if (next == 103 || next == 71) { - isGeneral = true; - precision = precision || 1; - var exponent = parseInt(currArg.toExponential(effectivePrecision).split('e')[1], 10); - if (precision > exponent && exponent >= -4) { - next = ((next == 103) ? 'f' : 'F').charCodeAt(0); - precision -= exponent + 1; - } else { - next = ((next == 103) ? 'e' : 'E').charCodeAt(0); - precision--; - } - effectivePrecision = Math.min(precision, 20); - } - - if (next == 101 || next == 69) { - argText = currArg.toExponential(effectivePrecision); - // Make sure the exponent has at least 2 digits. - if (/[eE][-+]\d$/.test(argText)) { - argText = argText.slice(0, -1) + '0' + argText.slice(-1); - } - } else if (next == 102 || next == 70) { - argText = currArg.toFixed(effectivePrecision); - if (currArg === 0 && __reallyNegative(currArg)) { - argText = '-' + argText; - } - } - - var parts = argText.split('e'); - if (isGeneral && !flagAlternative) { - // Discard trailing zeros and periods. - while (parts[0].length > 1 && parts[0].indexOf('.') != -1 && - (parts[0].slice(-1) == '0' || parts[0].slice(-1) == '.')) { - parts[0] = parts[0].slice(0, -1); - } - } else { - // Make sure we have a period in alternative mode. - if (flagAlternative && argText.indexOf('.') == -1) parts[0] += '.'; - // Zero pad until required precision. - while (precision > effectivePrecision++) parts[0] += '0'; - } - argText = parts[0] + (parts.length > 1 ? 'e' + parts[1] : ''); - - // Capitalize 'E' if needed. - if (next == 69) argText = argText.toUpperCase(); - - // Add sign. - if (currArg >= 0) { - if (flagAlwaysSigned) { - argText = '+' + argText; - } else if (flagPadSign) { - argText = ' ' + argText; - } - } - } - - // Add padding. - while (argText.length < width) { - if (flagLeftAlign) { - argText += ' '; - } else { - if (flagZeroPad && (argText[0] == '-' || argText[0] == '+')) { - argText = argText[0] + '0' + argText.slice(1); - } else { - argText = (flagZeroPad ? '0' : ' ') + argText; - } - } - } - - // Adjust case. - if (next < 97) argText = argText.toUpperCase(); - - // Insert the result into the buffer. - argText.split('').forEach(function(chr) { - ret.push(chr.charCodeAt(0)); - }); - break; - } - case 's': { - // String. - var arg = getNextArg('i8*'); - var argLength = arg ? _strlen(arg) : '(null)'.length; - if (precisionSet) argLength = Math.min(argLength, precision); - if (!flagLeftAlign) { - while (argLength < width--) { - ret.push(32); - } - } - if (arg) { - for (var i = 0; i < argLength; i++) { - ret.push(HEAPU8[((arg++)>>0)]); - } - } else { - ret = ret.concat(intArrayFromString('(null)'.substr(0, argLength), true)); - } - if (flagLeftAlign) { - while (argLength < width--) { - ret.push(32); - } - } - break; - } - case 'c': { - // Character. - if (flagLeftAlign) ret.push(getNextArg('i8')); - while (--width > 0) { - ret.push(32); - } - if (!flagLeftAlign) ret.push(getNextArg('i8')); - break; - } - case 'n': { - // Write the length written so far to the next parameter. - var ptr = getNextArg('i32*'); - HEAP32[((ptr)>>2)]=ret.length; - break; - } - case '%': { - // Literal percent sign. - ret.push(curr); - break; - } - default: { - // Unknown specifiers remain untouched. - for (var i = startTextIndex; i < textIndex + 2; i++) { - ret.push(HEAP8[((i)>>0)]); - } - } - } - textIndex += 2; - // TODO: Support a/A (hex float) and m (last error) specifiers. - // TODO: Support %1${specifier} for arg selection. - } else { - ret.push(curr); - textIndex += 1; - } - } - return ret; - }function _fprintf(stream, format, varargs) { - // int fprintf(FILE *restrict stream, const char *restrict format, ...); - // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html - var result = __formatString(format, varargs); - var stack = Runtime.stackSave(); - var ret = _fwrite(allocate(result, 'i8', ALLOC_STACK), 1, result.length, stream); - Runtime.stackRestore(stack); - return ret; - }function _vfprintf(s, f, va_arg) { - return _fprintf(s, f, HEAP32[((va_arg)>>2)]); - } - - - function _emscripten_memcpy_big(dest, src, num) { - HEAPU8.set(HEAPU8.subarray(src, src+num), dest); - return dest; - } - Module["_memcpy"] = _memcpy; - - var _log=Math_log; - - var _cos=Math_cos; - - var _llvm_pow_f64=Math_pow; - - function _sbrk(bytes) { - // Implement a Linux-like 'memory area' for our 'process'. - // Changes the size of the memory area by |bytes|; returns the - // address of the previous top ('break') of the memory area - // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP - var self = _sbrk; - if (!self.called) { - DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned - self.called = true; - assert(Runtime.dynamicAlloc); - self.alloc = Runtime.dynamicAlloc; - Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; - } - var ret = DYNAMICTOP; - if (bytes != 0) { - var success = self.alloc(bytes); - if (!success) return -1 >>> 0; // sbrk failure code - } - return ret; // Previous break location. - } - - - Module["_bitshift64Shl"] = _bitshift64Shl; - - function ___errno_location() { - return ___errno_state; - } - - var _BItoD=true; - - function _hip_set_debugf() { - Module['printErr']('missing function: hip_set_debugf'); abort(-1); - } - - var _exp=Math_exp; - - function _time(ptr) { - var ret = (Date.now()/1000)|0; - if (ptr) { - HEAP32[((ptr)>>2)]=ret; - } - return ret; - } - - function _hip_decode1_unclipped() { - Module['printErr']('missing function: hip_decode1_unclipped'); abort(-1); - } - -___errno_state = Runtime.staticAlloc(4); HEAP32[((___errno_state)>>2)]=0; -FS.staticInit();__ATINIT__.unshift(function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() });__ATMAIN__.push(function() { FS.ignorePermissions = false });__ATEXIT__.push(function() { FS.quit() });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice; -__ATINIT__.unshift(function() { TTY.init() });__ATEXIT__.push(function() { TTY.shutdown() }); -if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); } -Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) }; - Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; - Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; - Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; - Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; - Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } - Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) } -__ATINIT__.push(function() { SOCKFS.root = FS.mount(SOCKFS, {}, null); }); -STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP); - -staticSealed = true; // seal the static portion of memory - -STACK_MAX = STACK_BASE + TOTAL_STACK; - -DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX); - -assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack"); - - var cttz_i8 = allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0], "i8", ALLOC_DYNAMIC); - - -function invoke_iiii(index,a1,a2,a3) { - try { - return Module["dynCall_iiii"](index,a1,a2,a3); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} - -function invoke_iiiii(index,a1,a2,a3,a4) { - try { - return Module["dynCall_iiiii"](index,a1,a2,a3,a4); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} - -function invoke_vii(index,a1,a2) { - try { - Module["dynCall_vii"](index,a1,a2); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} - -function invoke_iii(index,a1,a2) { - try { - return Module["dynCall_iii"](index,a1,a2); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} - -function invoke_viiii(index,a1,a2,a3,a4) { - try { - Module["dynCall_viiii"](index,a1,a2,a3,a4); - } catch(e) { - if (typeof e !== 'number' && e !== 'longjmp') throw e; - asm["setThrew"](1, 0); - } -} - -Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; -Module.asmLibraryArg = { "abort": abort, "assert": assert, "invoke_iiii": invoke_iiii, "invoke_iiiii": invoke_iiiii, "invoke_vii": invoke_vii, "invoke_iii": invoke_iii, "invoke_viiii": invoke_viiii, "_fabs": _fabs, "_sin": _sin, "_exp": _exp, "_llvm_pow_f64": _llvm_pow_f64, "_send": _send, "_VBR_encode_frame": _VBR_encode_frame, "_abort": _abort, "___setErrNo": ___setErrNo, "_vfprintf": _vfprintf, "_hip_set_debugf": _hip_set_debugf, "_floor": _floor, "_fflush": _fflush, "_pwrite": _pwrite, "_strerror_r": _strerror_r, "__exit": __exit, "_GetTitleGain": _GetTitleGain, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_fabsf": _fabsf, "_sbrk": _sbrk, "_atan": _atan, "_llvm_pow_f32": _llvm_pow_f32, "_InitGainAnalysis": _InitGainAnalysis, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_fileno": _fileno, "_hip_decode_exit": _hip_decode_exit, "_sysconf": _sysconf, "_cos": _cos, "_mkport": _mkport, "_floorf": _floorf, "_hip_set_errorf": _hip_set_errorf, "__reallyNegative": __reallyNegative, "_write": _write, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_AnalyzeSamples": _AnalyzeSamples, "___errno_location": ___errno_location, "_log": _log, "_init_xrpow_core_sse": _init_xrpow_core_sse, "_hip_decode1_unclipped": _hip_decode1_unclipped, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "_strerror": _strerror, "_ceil": _ceil, "__formatString": __formatString, "_sqrt": _sqrt, "_hip_set_msgf": _hip_set_msgf, "_exit": _exit, "_hip_decode_init": _hip_decode_init, "_llvm_sqrt_f64": _llvm_sqrt_f64, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8, "_stderr": _stderr }; -// EMSCRIPTEN_START_ASM -var asm = (function(global, env, buffer) { - 'use asm'; - - var HEAP8 = new global.Int8Array(buffer); - var HEAP16 = new global.Int16Array(buffer); - var HEAP32 = new global.Int32Array(buffer); - var HEAPU8 = new global.Uint8Array(buffer); - var HEAPU16 = new global.Uint16Array(buffer); - var HEAPU32 = new global.Uint32Array(buffer); - var HEAPF32 = new global.Float32Array(buffer); - var HEAPF64 = new global.Float64Array(buffer); - - - var STACKTOP=env.STACKTOP|0; - var STACK_MAX=env.STACK_MAX|0; - var tempDoublePtr=env.tempDoublePtr|0; - var ABORT=env.ABORT|0; - var cttz_i8=env.cttz_i8|0; - var _stderr=env._stderr|0; - - var __THREW__ = 0; - var threwValue = 0; - var setjmpId = 0; - var undef = 0; - var nan = global.NaN, inf = global.Infinity; - var tempInt = 0, tempBigInt = 0, tempBigIntP = 0, tempBigIntS = 0, tempBigIntR = 0.0, tempBigIntI = 0, tempBigIntD = 0, tempValue = 0, tempDouble = 0.0; - - var tempRet0 = 0; - var tempRet1 = 0; - var tempRet2 = 0; - var tempRet3 = 0; - var tempRet4 = 0; - var tempRet5 = 0; - var tempRet6 = 0; - var tempRet7 = 0; - var tempRet8 = 0; - var tempRet9 = 0; - var Math_floor=global.Math.floor; - var Math_abs=global.Math.abs; - var Math_sqrt=global.Math.sqrt; - var Math_pow=global.Math.pow; - var Math_cos=global.Math.cos; - var Math_sin=global.Math.sin; - var Math_tan=global.Math.tan; - var Math_acos=global.Math.acos; - var Math_asin=global.Math.asin; - var Math_atan=global.Math.atan; - var Math_atan2=global.Math.atan2; - var Math_exp=global.Math.exp; - var Math_log=global.Math.log; - var Math_ceil=global.Math.ceil; - var Math_imul=global.Math.imul; - var Math_min=global.Math.min; - var Math_clz32=global.Math.clz32; - var abort=env.abort; - var assert=env.assert; - var invoke_iiii=env.invoke_iiii; - var invoke_iiiii=env.invoke_iiiii; - var invoke_vii=env.invoke_vii; - var invoke_iii=env.invoke_iii; - var invoke_viiii=env.invoke_viiii; - var _fabs=env._fabs; - var _sin=env._sin; - var _exp=env._exp; - var _llvm_pow_f64=env._llvm_pow_f64; - var _send=env._send; - var _VBR_encode_frame=env._VBR_encode_frame; - var _abort=env._abort; - var ___setErrNo=env.___setErrNo; - var _vfprintf=env._vfprintf; - var _hip_set_debugf=env._hip_set_debugf; - var _floor=env._floor; - var _fflush=env._fflush; - var _pwrite=env._pwrite; - var _strerror_r=env._strerror_r; - var __exit=env.__exit; - var _GetTitleGain=env._GetTitleGain; - var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing; - var _fabsf=env._fabsf; - var _sbrk=env._sbrk; - var _atan=env._atan; - var _llvm_pow_f32=env._llvm_pow_f32; - var _InitGainAnalysis=env._InitGainAnalysis; - var _emscripten_memcpy_big=env._emscripten_memcpy_big; - var _fileno=env._fileno; - var _hip_decode_exit=env._hip_decode_exit; - var _sysconf=env._sysconf; - var _cos=env._cos; - var _mkport=env._mkport; - var _floorf=env._floorf; - var _hip_set_errorf=env._hip_set_errorf; - var __reallyNegative=env.__reallyNegative; - var _write=env._write; - var _emscripten_set_main_loop=env._emscripten_set_main_loop; - var _AnalyzeSamples=env._AnalyzeSamples; - var ___errno_location=env.___errno_location; - var _log=env._log; - var _init_xrpow_core_sse=env._init_xrpow_core_sse; - var _hip_decode1_unclipped=env._hip_decode1_unclipped; - var _fwrite=env._fwrite; - var _time=env._time; - var _fprintf=env._fprintf; - var _strerror=env._strerror; - var _ceil=env._ceil; - var __formatString=env.__formatString; - var _sqrt=env._sqrt; - var _hip_set_msgf=env._hip_set_msgf; - var _exit=env._exit; - var _hip_decode_init=env._hip_decode_init; - var _llvm_sqrt_f64=env._llvm_sqrt_f64; - var tempFloat = 0.0; - -// EMSCRIPTEN_START_FUNCS -function stackAlloc(size) { - size = size|0; - var ret = 0; - ret = STACKTOP; - STACKTOP = (STACKTOP + size)|0; - STACKTOP = (STACKTOP + 15)&-16; - - return ret|0; -} -function stackSave() { - return STACKTOP|0; -} -function stackRestore(top) { - top = top|0; - STACKTOP = top; -} -function establishStackSpace(stackBase, stackMax) { - stackBase = stackBase|0; - stackMax = stackMax|0; - STACKTOP = stackBase; - STACK_MAX = stackMax; -} - -function setThrew(threw, value) { - threw = threw|0; - value = value|0; - if ((__THREW__|0) == 0) { - __THREW__ = threw; - threwValue = value; - } -} -function copyTempFloat(ptr) { - ptr = ptr|0; - HEAP8[tempDoublePtr>>0] = HEAP8[ptr>>0]; - HEAP8[tempDoublePtr+1>>0] = HEAP8[ptr+1>>0]; - HEAP8[tempDoublePtr+2>>0] = HEAP8[ptr+2>>0]; - HEAP8[tempDoublePtr+3>>0] = HEAP8[ptr+3>>0]; -} -function copyTempDouble(ptr) { - ptr = ptr|0; - HEAP8[tempDoublePtr>>0] = HEAP8[ptr>>0]; - HEAP8[tempDoublePtr+1>>0] = HEAP8[ptr+1>>0]; - HEAP8[tempDoublePtr+2>>0] = HEAP8[ptr+2>>0]; - HEAP8[tempDoublePtr+3>>0] = HEAP8[ptr+3>>0]; - HEAP8[tempDoublePtr+4>>0] = HEAP8[ptr+4>>0]; - HEAP8[tempDoublePtr+5>>0] = HEAP8[ptr+5>>0]; - HEAP8[tempDoublePtr+6>>0] = HEAP8[ptr+6>>0]; - HEAP8[tempDoublePtr+7>>0] = HEAP8[ptr+7>>0]; -} - -function setTempRet0(value) { - value = value|0; - tempRet0 = value; -} -function getTempRet0() { - return tempRet0|0; -} - -function _AddVbrFrame($gfc) { - $gfc = $gfc|0; - var $$pre$i = 0, $$pre2$i = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; - var $43 = 0, $44 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i$01$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 84744|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($gfc)) + 16|0); - $3 = HEAP32[$2>>2]|0; - $4 = ((83944 + ($3<<6)|0) + ($1<<2)|0); - $5 = HEAP32[$4>>2]|0; - $6 = ((($gfc)) + 85784|0); - $7 = HEAP32[$6>>2]|0; - $8 = (($7) + 1)|0; - HEAP32[$6>>2] = $8; - $9 = ((($gfc)) + 85760|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($10) + ($5))|0; - HEAP32[$9>>2] = $11; - $12 = ((($gfc)) + 85764|0); - $13 = HEAP32[$12>>2]|0; - $14 = (($13) + 1)|0; - HEAP32[$12>>2] = $14; - $15 = ((($gfc)) + 85768|0); - $16 = HEAP32[$15>>2]|0; - $17 = ($14|0)<($16|0); - if ($17) { - return; - } - $18 = ((($gfc)) + 85772|0); - $19 = HEAP32[$18>>2]|0; - $20 = ((($gfc)) + 85776|0); - $21 = HEAP32[$20>>2]|0; - $22 = ($19|0)<($21|0); - if ($22) { - $23 = ((($gfc)) + 85780|0); - $24 = HEAP32[$23>>2]|0; - $25 = (($24) + ($19<<2)|0); - HEAP32[$25>>2] = $11; - $26 = HEAP32[$18>>2]|0; - $27 = (($26) + 1)|0; - HEAP32[$18>>2] = $27; - HEAP32[$12>>2] = 0; - $$pre$i = HEAP32[$20>>2]|0; - $28 = $27;$30 = $$pre$i; - } else { - $28 = $19;$30 = $21; - } - $29 = ($28|0)==($30|0); - if (!($29)) { - return; - } - $31 = ($30|0)>(1); - if ($31) { - $32 = ((($gfc)) + 85780|0); - $33 = HEAP32[$32>>2]|0; - $i$01$i = 1; - while(1) { - $34 = (($33) + ($i$01$i<<2)|0); - $35 = HEAP32[$34>>2]|0; - $36 = (($i$01$i|0) / 2)&-1; - $37 = (($33) + ($36<<2)|0); - HEAP32[$37>>2] = $35; - $38 = (($i$01$i) + 2)|0; - $39 = HEAP32[$20>>2]|0; - $40 = ($38|0)<($39|0); - if ($40) { - $i$01$i = $38; - } else { - break; - } - } - $$pre2$i = HEAP32[$18>>2]|0; - $44 = $$pre2$i; - } else { - $44 = $30; - } - $41 = HEAP32[$15>>2]|0; - $42 = $41 << 1; - HEAP32[$15>>2] = $42; - $43 = (($44|0) / 2)&-1; - HEAP32[$18>>2] = $43; - return; -} -function _InitVbrTag($gfp) { - $gfp = $gfp|0; - var $$ = 0, $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; - var $43 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $buffer = 0, $exitcond = 0, $i$02 = 0, $kbps_header$0 = 0, $kbps_header$1 = 0, $or$cond = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2896|0; - $vararg_buffer = sp; - $buffer = sp + 8|0; - $0 = ((($gfp)) + 288|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($1)) + 16|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3|0)==(1); - if ($4) { - $kbps_header$0 = 128; - } else { - $5 = ((($1)) + 64|0); - $6 = HEAP32[$5>>2]|0; - $7 = ($6|0)<(16000); - $$ = $7 ? 32 : 64; - $kbps_header$0 = $$; - } - $8 = ((($1)) + 104|0); - $9 = HEAP32[$8>>2]|0; - $10 = ($9|0)==(0); - if ($10) { - $11 = ((($1)) + 120|0); - $12 = HEAP32[$11>>2]|0; - $kbps_header$1 = $12; - } else { - $kbps_header$1 = $kbps_header$0; - } - $13 = ($3*72000)|0; - $14 = (($13) + 72000)|0; - $15 = Math_imul($14, $kbps_header$1)|0; - $16 = ((($1)) + 64|0); - $17 = HEAP32[$16>>2]|0; - $18 = (($15|0) / ($17|0))&-1; - $19 = ((($1)) + 24|0); - $20 = HEAP32[$19>>2]|0; - $21 = (($20) + 156)|0; - $22 = ((($1)) + 85792|0); - HEAP32[$22>>2] = $18; - $23 = ($18|0)<($21|0); - $24 = ($18|0)>(2880); - $or$cond = $24 | $23; - if ($or$cond) { - $25 = ((($1)) + 156|0); - HEAP32[$25>>2] = 0; - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $26 = ((($1)) + 85784|0); - HEAP32[$26>>2] = 0; - $27 = ((($1)) + 85788|0); - HEAP32[$27>>2] = 0; - $28 = ((($1)) + 85760|0); - HEAP32[$28>>2] = 0; - $29 = ((($1)) + 85764|0); - HEAP32[$29>>2] = 0; - $30 = ((($1)) + 85768|0); - HEAP32[$30>>2] = 1; - $31 = ((($1)) + 85772|0); - HEAP32[$31>>2] = 0; - $32 = ((($1)) + 85780|0); - $33 = HEAP32[$32>>2]|0; - $34 = ($33|0)==(0|0); - do { - if ($34) { - $35 = (_malloc(1600)|0); - HEAP32[$32>>2] = $35; - $36 = ($35|0)==(0|0); - $37 = ((($1)) + 85776|0); - if (!($36)) { - HEAP32[$37>>2] = 400; - break; - } - HEAP32[$37>>2] = 0; - _lame_errorf($1,8,$vararg_buffer); - $38 = ((($1)) + 156|0); - HEAP32[$38>>2] = 0; - $$0 = -1; - STACKTOP = sp;return ($$0|0); - } - } while(0); - _memset(($buffer|0),0,2880)|0; - _setLameTagFrameHeader($1,$buffer); - $39 = HEAP32[$22>>2]|0; - $40 = ($39|0)==(0); - if (!($40)) { - $i$02 = 0; - while(1) { - $41 = (($buffer) + ($i$02)|0); - $42 = HEAP8[$41>>0]|0; - _add_dummy_byte($1,$42,1); - $43 = (($i$02) + 1)|0; - $exitcond = ($43|0)==($39|0); - if ($exitcond) { - break; - } else { - $i$02 = $43; - } - } - } - $$0 = 0; - STACKTOP = sp;return ($$0|0); -} -function _UpdateMusicCRC($crc,$buffer,$size) { - $crc = $crc|0; - $buffer = $buffer|0; - $size = $size|0; - var $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $i$01 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($size|0)>(0); - if (!($0)) { - return; - } - $$pre = HEAP16[$crc>>1]|0; - $5 = $$pre;$i$01 = 0; - while(1) { - $1 = (($buffer) + ($i$01)|0); - $2 = HEAP8[$1>>0]|0; - $3 = $2&255; - $4 = $5&65535; - $6 = $5 ^ $3; - $7 = $4 >>> 8; - $8 = $6&65535; - $9 = $8 & 255; - $10 = (48 + ($9<<2)|0); - $11 = HEAP32[$10>>2]|0; - $12 = $7 ^ $11; - $13 = $12&65535; - HEAP16[$crc>>1] = $13; - $14 = (($i$01) + 1)|0; - $exitcond = ($14|0)==($size|0); - if ($exitcond) { - break; - } else { - $5 = $13;$i$01 = $14; - } - } - return; -} -function _setLameTagFrameHeader($gfc,$buffer) { - $gfc = $gfc|0; - $buffer = $buffer|0; - var $$ = 0, $$masked = 0, $$masked1 = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0; - var $112 = 0, $113 = 0, $114 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; - var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; - var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; - var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; - var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $bbyte$0 = 0; - var $bitrate$0 = 0, $bitrate$1 = 0, $not$ = 0, $sext = 0, $sext2 = 0, $storemerge = 0, $storemerge$in = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAP8[$buffer>>0] = -1; - $0 = ((($buffer)) + 1|0); - $1 = HEAP8[$0>>0]|0; - $2 = $1&255; - $3 = $2 << 3; - $4 = $3 | 7; - $5 = $4&255; - HEAP8[$0>>0] = $5; - $6 = $4 << 1; - $7 = ((($gfc)) + 64|0); - $8 = HEAP32[$7>>2]|0; - $not$ = ($8|0)>(15999); - $9 = $not$&1; - $10 = $6 | $9; - $11 = $10&255; - HEAP8[$0>>0] = $11; - $12 = $10 << 1; - $13 = ((($gfc)) + 16|0); - $14 = HEAP32[$13>>2]|0; - $15 = $14 & 1; - $$masked = $12 & 62; - $16 = $$masked | $15; - $17 = $16 << 2; - $18 = $17 | 1; - $19 = $18&255; - HEAP8[$0>>0] = $19; - $20 = $18 << 1; - $21 = ((($gfc)) + 160|0); - $22 = HEAP32[$21>>2]|0; - $23 = ($22|0)==(0); - $24 = $23&1; - $25 = $20 | $24; - $26 = $25&255; - HEAP8[$0>>0] = $26; - $27 = ((($buffer)) + 2|0); - $28 = HEAP8[$27>>0]|0; - $29 = $28&255; - $30 = $29 << 4; - $31 = ((($gfc)) + 84744|0); - $32 = HEAP32[$31>>2]|0; - $33 = $32 & 15; - $34 = $30 | $33; - $35 = $34&255; - HEAP8[$27>>0] = $35; - $36 = $34 << 2; - $37 = ((($gfc)) + 20|0); - $38 = HEAP32[$37>>2]|0; - $39 = $38 & 3; - $$masked1 = $36 & 124; - $40 = $$masked1 | $39; - $41 = $40 << 1; - $42 = $41&255; - HEAP8[$27>>0] = $42; - $43 = $40 << 2; - $44 = ((($gfc)) + 172|0); - $45 = HEAP32[$44>>2]|0; - $46 = $45 & 1; - $47 = $43 | $46; - $48 = $47&255; - HEAP8[$27>>0] = $48; - $49 = ((($buffer)) + 3|0); - $50 = HEAP8[$49>>0]|0; - $51 = $50&255; - $52 = $51 << 2; - $53 = ((($gfc)) + 180|0); - $54 = HEAP32[$53>>2]|0; - $55 = $54 & 3; - $56 = $52 | $55; - $57 = $56&255; - HEAP8[$49>>0] = $57; - $58 = $56 << 2; - $59 = ((($gfc)) + 84756|0); - $60 = HEAP32[$59>>2]|0; - $61 = $60 & 3; - $62 = $58 | $61; - $63 = $62&255; - HEAP8[$49>>0] = $63; - $64 = $62 << 1; - $65 = ((($gfc)) + 164|0); - $66 = HEAP32[$65>>2]|0; - $67 = $66 & 1; - $68 = $64 | $67; - $69 = $68&255; - HEAP8[$49>>0] = $69; - $70 = $68 << 1; - $71 = ((($gfc)) + 168|0); - $72 = HEAP32[$71>>2]|0; - $73 = $72 & 1; - $74 = $70 | $73; - $75 = $74&255; - HEAP8[$49>>0] = $75; - $76 = $74 << 2; - $77 = ((($gfc)) + 176|0); - $78 = HEAP32[$77>>2]|0; - $79 = $78 & 3; - $80 = $76 | $79; - $81 = $80&255; - HEAP8[$49>>0] = $81; - HEAP8[$buffer>>0] = -1; - $82 = HEAP32[$13>>2]|0; - $83 = ($82|0)==(1); - if ($83) { - $bitrate$0 = 128; - } else { - $84 = HEAP32[$7>>2]|0; - $85 = ($84|0)<(16000); - $$ = $85 ? 32 : 64; - $bitrate$0 = $$; - } - $86 = ((($gfc)) + 104|0); - $87 = HEAP32[$86>>2]|0; - $88 = ($87|0)==(0); - if ($88) { - $89 = ((($gfc)) + 120|0); - $90 = HEAP32[$89>>2]|0; - $bitrate$1 = $90; - } else { - $bitrate$1 = $bitrate$0; - } - $91 = ((($gfc)) + 152|0); - $92 = HEAP32[$91>>2]|0; - $93 = ($92|0)==(0); - if ($93) { - $94 = HEAP32[$7>>2]|0; - $95 = (_BitrateIndex($bitrate$1,$82,$94)|0); - $96 = $95 << 4; - $97 = $96&255; - $$pre = HEAP32[$13>>2]|0; - $98 = $$pre;$bbyte$0 = $97; - } else { - $98 = $82;$bbyte$0 = 0; - } - $99 = ($98|0)==(1); - $sext2 = $25 << 24; - $sext = $sext2 >> 24; - $100 = $sext & -15; - if ($99) { - $101 = $100 | 10; - $102 = $101&255; - HEAP8[$0>>0] = $102; - $103 = HEAP8[$27>>0]|0; - $104 = $103&255; - $105 = $104 & 13; - $106 = $bbyte$0 << 24 >> 24; - $107 = $105 | $106; - $storemerge$in = $107; - $storemerge = $storemerge$in&255; - HEAP8[$27>>0] = $storemerge; - return; - } else { - $108 = $100 | 2; - $109 = $108&255; - HEAP8[$0>>0] = $109; - $110 = HEAP8[$27>>0]|0; - $111 = $110&255; - $112 = $111 & 13; - $113 = $bbyte$0&255; - $114 = $112 | $113; - $storemerge$in = $114; - $storemerge = $storemerge$in&255; - HEAP8[$27>>0] = $storemerge; - return; - } -} -function _getframebits($gfc) { - $gfc = $gfc|0; - var $$idx$val = 0, $$idx$val$pre = 0, $$idx1 = 0, $$idx1$val = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $bit_rate$0 = 0; - var $bit_rate$0$in = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 16|0); - $1 = ((($gfc)) + 84744|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(0); - if ($3) { - $6 = ((($gfc)) + 120|0); - $$idx$val$pre = HEAP32[$0>>2]|0; - $$idx$val = $$idx$val$pre;$bit_rate$0$in = $6; - } else { - $4 = HEAP32[$0>>2]|0; - $5 = ((83944 + ($4<<6)|0) + ($2<<2)|0); - $$idx$val = $4;$bit_rate$0$in = $5; - } - $bit_rate$0 = HEAP32[$bit_rate$0$in>>2]|0; - $7 = ((($gfc)) + 84752|0); - $8 = HEAP32[$7>>2]|0; - $$idx1 = ((($gfc)) + 64|0); - $$idx1$val = HEAP32[$$idx1>>2]|0; - $9 = ($$idx$val*72000)|0; - $10 = (($9) + 72000)|0; - $11 = Math_imul($10, $bit_rate$0)|0; - $12 = (($11|0) / ($$idx1$val|0))&-1; - $13 = (($12) + ($8))|0; - $14 = $13 << 3; - return ($14|0); -} -function _get_max_frame_buffer_size_by_constraint($cfg,$constraint) { - $cfg = $cfg|0; - $constraint = $constraint|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0; - var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cfg$idx2$val = 0, $cfg$idx3 = 0, $cfg$idx3$val = 0, $max_kbps$0 = 0, $max_kbps$0$in = 0, $maxmp3buf$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($cfg)) + 104|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)>(320); - if ($2) { - $3 = ($constraint|0)==(1); - $cfg$idx2$val = HEAP32[$cfg>>2]|0; - if ($3) { - $cfg$idx3 = ((($cfg)) + 48|0); - $cfg$idx3$val = HEAP32[$cfg$idx3>>2]|0; - $4 = ($cfg$idx2$val*72000)|0; - $5 = (($4) + 72000)|0; - $6 = Math_imul($5, $1)|0; - $7 = (($6|0) / ($cfg$idx3$val|0))&-1; - $8 = $7 << 3; - $maxmp3buf$0 = $8; - return ($maxmp3buf$0|0); - } else { - $9 = ($cfg$idx2$val*7680)|0; - $10 = (($9) + 7680)|0; - $maxmp3buf$0 = $10; - return ($maxmp3buf$0|0); - } - } - $11 = HEAP32[$cfg>>2]|0; - if ((($constraint|0) == 2)) { - $22 = ($11*7680)|0; - $23 = (($22) + 7680)|0; - $maxmp3buf$0 = $23; - return ($maxmp3buf$0|0); - } else if ((($constraint|0) == 1)) { - $12 = ((($cfg)) + 48|0); - $13 = HEAP32[$12>>2]|0; - $14 = ($13|0)<(16000); - $15 = (((83944 + ($11<<6)|0)) + 32|0); - $16 = (((83944 + ($11<<6)|0)) + 56|0); - $max_kbps$0$in = $14 ? $15 : $16; - $max_kbps$0 = HEAP32[$max_kbps$0$in>>2]|0; - $17 = ($11*72000)|0; - $18 = (($17) + 72000)|0; - $19 = Math_imul($18, $max_kbps$0)|0; - $20 = (($19|0) / ($13|0))&-1; - $21 = $20 << 3; - $maxmp3buf$0 = $21; - return ($maxmp3buf$0|0); - } else { - $maxmp3buf$0 = 11520; - return ($maxmp3buf$0|0); - } - return (0)|0; -} -function _CRC_writeheader($gfc,$header) { - $gfc = $gfc|0; - $header = $header|0; - var $$$1$i = 0, $$$1$i10 = 0, $$$1$i2 = 0, $$$2$i = 0, $$$2$i11 = 0, $$$2$i3 = 0, $$$3$i = 0, $$$3$i12 = 0, $$$3$i4 = 0, $$$4$i = 0, $$$4$i13 = 0, $$$4$i5 = 0, $$$5$i = 0, $$$5$i14 = 0, $$$5$i6 = 0, $$$6$i = 0, $$$6$i15 = 0, $$$6$i7 = 0, $$$7$i = 0, $$$7$i16 = 0; - var $$$7$i8 = 0, $$$i = 0, $$$i1 = 0, $$$i9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0; - var $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0; - var $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0; - var $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; - var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; - var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; - var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; - var $98 = 0, $99 = 0, $crc$0$lcssa = 0, $crc$017 = 0, $i$018 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($header)) + 2|0); - $1 = HEAP8[$0>>0]|0; - $2 = $1&255; - $3 = $2 & 128; - $4 = ($3|0)!=(0); - $$$i = $4 ? 262140 : 196598; - $5 = $2 << 10; - $6 = $$$i ^ $5; - $7 = $6 & 65536; - $8 = ($7|0)==(0); - $9 = $$$i ^ 32773; - $$$1$i = $8 ? $$$i : $9; - $10 = $2 << 11; - $11 = $$$1$i << 1; - $12 = $11 ^ $10; - $13 = $12 & 65536; - $14 = ($13|0)==(0); - $15 = $11 ^ 32773; - $$$2$i = $14 ? $11 : $15; - $16 = $2 << 12; - $17 = $$$2$i << 1; - $18 = $17 ^ $16; - $19 = $18 & 65536; - $20 = ($19|0)==(0); - $21 = $17 ^ 32773; - $$$3$i = $20 ? $17 : $21; - $22 = $2 << 13; - $23 = $$$3$i << 1; - $24 = $23 ^ $22; - $25 = $24 & 65536; - $26 = ($25|0)==(0); - $27 = $23 ^ 32773; - $$$4$i = $26 ? $23 : $27; - $28 = $2 << 14; - $29 = $$$4$i << 1; - $30 = $29 ^ $28; - $31 = $30 & 65536; - $32 = ($31|0)==(0); - $33 = $29 ^ 32773; - $$$5$i = $32 ? $29 : $33; - $34 = $2 << 15; - $35 = $$$5$i << 1; - $36 = $35 ^ $34; - $37 = $36 & 65536; - $38 = ($37|0)==(0); - $39 = $35 ^ 32773; - $$$6$i = $38 ? $35 : $39; - $40 = $2 << 16; - $41 = $$$6$i << 1; - $42 = $41 ^ $40; - $43 = $42 & 65536; - $44 = ($43|0)==(0); - $45 = $41 ^ 32773; - $$$7$i = $44 ? $41 : $45; - $46 = ((($header)) + 3|0); - $47 = HEAP8[$46>>0]|0; - $48 = $47&255; - $49 = $48 << 9; - $50 = $$$7$i << 1; - $51 = $50 ^ $49; - $52 = $51 & 65536; - $53 = ($52|0)==(0); - $54 = $50 ^ 32773; - $$$i9 = $53 ? $50 : $54; - $55 = $48 << 10; - $56 = $$$i9 << 1; - $57 = $56 ^ $55; - $58 = $57 & 65536; - $59 = ($58|0)==(0); - $60 = $56 ^ 32773; - $$$1$i10 = $59 ? $56 : $60; - $61 = $48 << 11; - $62 = $$$1$i10 << 1; - $63 = $62 ^ $61; - $64 = $63 & 65536; - $65 = ($64|0)==(0); - $66 = $62 ^ 32773; - $$$2$i11 = $65 ? $62 : $66; - $67 = $48 << 12; - $68 = $$$2$i11 << 1; - $69 = $68 ^ $67; - $70 = $69 & 65536; - $71 = ($70|0)==(0); - $72 = $68 ^ 32773; - $$$3$i12 = $71 ? $68 : $72; - $73 = $48 << 13; - $74 = $$$3$i12 << 1; - $75 = $74 ^ $73; - $76 = $75 & 65536; - $77 = ($76|0)==(0); - $78 = $74 ^ 32773; - $$$4$i13 = $77 ? $74 : $78; - $79 = $48 << 14; - $80 = $$$4$i13 << 1; - $81 = $80 ^ $79; - $82 = $81 & 65536; - $83 = ($82|0)==(0); - $84 = $80 ^ 32773; - $$$5$i14 = $83 ? $80 : $84; - $85 = $48 << 15; - $86 = $$$5$i14 << 1; - $87 = $86 ^ $85; - $88 = $87 & 65536; - $89 = ($88|0)==(0); - $90 = $86 ^ 32773; - $$$6$i15 = $89 ? $86 : $90; - $91 = $48 << 16; - $92 = $$$6$i15 << 1; - $93 = $92 ^ $91; - $94 = $93 & 65536; - $95 = ($94|0)==(0); - $96 = $92 ^ 32773; - $$$7$i16 = $95 ? $92 : $96; - $97 = ((($gfc)) + 24|0); - $98 = HEAP32[$97>>2]|0; - $99 = ($98|0)>(6); - if ($99) { - $crc$017 = $$$7$i16;$i$018 = 6; - } else { - $crc$0$lcssa = $$$7$i16; - $153 = $crc$0$lcssa >>> 8; - $154 = $153&255; - $155 = ((($header)) + 4|0); - HEAP8[$155>>0] = $154; - $156 = $crc$0$lcssa&255; - $157 = ((($header)) + 5|0); - HEAP8[$157>>0] = $156; - return; - } - while(1) { - $100 = (($header) + ($i$018)|0); - $101 = HEAP8[$100>>0]|0; - $102 = $101&255; - $103 = $102 << 9; - $104 = $crc$017 << 1; - $105 = $103 ^ $104; - $106 = $105 & 65536; - $107 = ($106|0)==(0); - $108 = $104 ^ 32773; - $$$i1 = $107 ? $104 : $108; - $109 = $102 << 10; - $110 = $$$i1 << 1; - $111 = $110 ^ $109; - $112 = $111 & 65536; - $113 = ($112|0)==(0); - $114 = $110 ^ 32773; - $$$1$i2 = $113 ? $110 : $114; - $115 = $102 << 11; - $116 = $$$1$i2 << 1; - $117 = $116 ^ $115; - $118 = $117 & 65536; - $119 = ($118|0)==(0); - $120 = $116 ^ 32773; - $$$2$i3 = $119 ? $116 : $120; - $121 = $102 << 12; - $122 = $$$2$i3 << 1; - $123 = $122 ^ $121; - $124 = $123 & 65536; - $125 = ($124|0)==(0); - $126 = $122 ^ 32773; - $$$3$i4 = $125 ? $122 : $126; - $127 = $102 << 13; - $128 = $$$3$i4 << 1; - $129 = $128 ^ $127; - $130 = $129 & 65536; - $131 = ($130|0)==(0); - $132 = $128 ^ 32773; - $$$4$i5 = $131 ? $128 : $132; - $133 = $102 << 14; - $134 = $$$4$i5 << 1; - $135 = $134 ^ $133; - $136 = $135 & 65536; - $137 = ($136|0)==(0); - $138 = $134 ^ 32773; - $$$5$i6 = $137 ? $134 : $138; - $139 = $102 << 15; - $140 = $$$5$i6 << 1; - $141 = $140 ^ $139; - $142 = $141 & 65536; - $143 = ($142|0)==(0); - $144 = $140 ^ 32773; - $$$6$i7 = $143 ? $140 : $144; - $145 = $102 << 16; - $146 = $$$6$i7 << 1; - $147 = $146 ^ $145; - $148 = $147 & 65536; - $149 = ($148|0)==(0); - $150 = $146 ^ 32773; - $$$7$i8 = $149 ? $146 : $150; - $151 = (($i$018) + 1)|0; - $152 = ($151|0)<($98|0); - if ($152) { - $crc$017 = $$$7$i8;$i$018 = $151; - } else { - $crc$0$lcssa = $$$7$i8; - break; - } - } - $153 = $crc$0$lcssa >>> 8; - $154 = $153&255; - $155 = ((($header)) + 4|0); - HEAP8[$155>>0] = $154; - $156 = $crc$0$lcssa&255; - $157 = ((($header)) + 5|0); - HEAP8[$157>>0] = $156; - return; -} -function _flush_bitstream($gfc) { - $gfc = $gfc|0; - var $$$i = 0, $$1$i = 0, $$idx$val$i$i = 0, $$idx$val$pre$i$i = 0, $$idx1$i$i = 0, $$idx1$val$i$i = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; - var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; - var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $bit_rate$0$i$i = 0, $bit_rate$0$in$i$i = 0, $flushbits$0$i = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $vararg_buffer = sp; - $0 = ((($gfc)) + 52132|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($gfc)) + 52128|0); - $3 = HEAP32[$2>>2]|0; - $4 = (($3) + -1)|0; - $5 = ($3|0)==(0); - $$$i = $5 ? 255 : $4; - $6 = (((($gfc)) + 39840|0) + (($$$i*48)|0)|0); - $7 = HEAP32[$6>>2]|0; - $8 = ((($gfc)) + 292|0); - $9 = HEAP32[$8>>2]|0; - $10 = (($7) - ($9))|0; - $11 = ($10|0)>(-1); - if ($11) { - $12 = (1 - ($1))|0; - $13 = (($$$i) + ($12))|0; - $14 = ($$$i|0)<($1|0); - $15 = (($13) + 256)|0; - $$1$i = $14 ? $15 : $13; - $16 = $$1$i << 3; - $17 = ((($gfc)) + 24|0); - $18 = HEAP32[$17>>2]|0; - $19 = Math_imul($16, $18)|0; - $20 = (($10) - ($19))|0; - $flushbits$0$i = $20; - } else { - $flushbits$0$i = $10; - } - $21 = ((($gfc)) + 16|0); - $22 = ((($gfc)) + 84744|0); - $23 = HEAP32[$22>>2]|0; - $24 = ($23|0)==(0); - if ($24) { - $27 = ((($gfc)) + 120|0); - $$idx$val$pre$i$i = HEAP32[$21>>2]|0; - $$idx$val$i$i = $$idx$val$pre$i$i;$bit_rate$0$in$i$i = $27; - } else { - $25 = HEAP32[$21>>2]|0; - $26 = ((83944 + ($25<<6)|0) + ($23<<2)|0); - $$idx$val$i$i = $25;$bit_rate$0$in$i$i = $26; - } - $bit_rate$0$i$i = HEAP32[$bit_rate$0$in$i$i>>2]|0; - $28 = ((($gfc)) + 84752|0); - $29 = HEAP32[$28>>2]|0; - $$idx1$i$i = ((($gfc)) + 64|0); - $$idx1$val$i$i = HEAP32[$$idx1$i$i>>2]|0; - $30 = ($$idx$val$i$i*72000)|0; - $31 = (($30) + 72000)|0; - $32 = Math_imul($31, $bit_rate$0$i$i)|0; - $33 = (($32|0) / ($$idx1$val$i$i|0))&-1; - $34 = (($33) + ($29))|0; - $35 = $34 << 3; - $36 = (($35) + ($flushbits$0$i))|0; - $37 = ($36|0)<(0); - if ($37) { - _lame_errorf($gfc,1072,$vararg_buffer); - STACKTOP = sp;return; - } else { - _drain_into_ancillary($gfc,$36); - $38 = ((($gfc)) + 52140|0); - HEAP32[$38>>2] = 0; - $39 = ((($gfc)) + 21312|0); - HEAP32[$39>>2] = 0; - STACKTOP = sp;return; - } -} -function _add_dummy_byte($gfc,$val,$n) { - $gfc = $gfc|0; - $val = $val|0; - $n = $n|0; - var $$0$$i = 0, $$01$i = 0, $$in = 0, $$pre$i = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; - var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $i$01 = 0; - var label = 0, sp = 0; - sp = STACKTOP; - $0 = ($n|0)==(0); - if ($0) { - return; - } - $1 = $val&255; - $2 = ((($gfc)) + 300|0); - $3 = ((($gfc)) + 296|0); - $4 = ((($gfc)) + 284|0); - $5 = ((($gfc)) + 292|0); - $$in = $n; - while(1) { - $$01$i = 8; - while(1) { - $8 = HEAP32[$2>>2]|0; - $9 = ($8|0)==(0); - if ($9) { - HEAP32[$2>>2] = 8; - $10 = HEAP32[$3>>2]|0; - $11 = (($10) + 1)|0; - HEAP32[$3>>2] = $11; - $12 = HEAP32[$4>>2]|0; - $13 = (($12) + ($11)|0); - HEAP8[$13>>0] = 0; - $$pre$i = HEAP32[$2>>2]|0; - $15 = $$pre$i; - } else { - $15 = $8; - } - $14 = ($$01$i|0)<($15|0); - $$0$$i = $14 ? $$01$i : $15; - $16 = (($$01$i) - ($$0$$i))|0; - $17 = (($15) - ($$0$$i))|0; - HEAP32[$2>>2] = $17; - $18 = $1 >>> $16; - $19 = $18 << $17; - $20 = HEAP32[$3>>2]|0; - $21 = HEAP32[$4>>2]|0; - $22 = (($21) + ($20)|0); - $23 = HEAP8[$22>>0]|0; - $24 = $23&255; - $25 = $19 | $24; - $26 = $25&255; - HEAP8[$22>>0] = $26; - $27 = HEAP32[$5>>2]|0; - $28 = (($27) + ($$0$$i))|0; - HEAP32[$5>>2] = $28; - $29 = ($16|0)>(0); - if ($29) { - $$01$i = $16; - } else { - $i$01 = 0; - break; - } - } - while(1) { - $30 = (((($gfc)) + 39840|0) + (($i$01*48)|0)|0); - $31 = HEAP32[$30>>2]|0; - $32 = (($31) + 8)|0; - HEAP32[$30>>2] = $32; - $33 = (($i$01) + 1)|0; - $exitcond = ($33|0)==(256); - if ($exitcond) { - break; - } else { - $i$01 = $33; - } - } - $6 = (($$in) + -1)|0; - $7 = ($6|0)==(0); - if ($7) { - break; - } else { - $$in = $6; - } - } - return; -} -function _format_bitstream($gfc) { - $gfc = $gfc|0; - var $$$i = 0, $$$i$i = 0, $$$i26$i = 0, $$$i7 = 0, $$$i8$i = 0, $$$i9$i = 0, $$0$$i$i = 0, $$0$$i$us$i = 0, $$0$$i107$i = 0, $$0$$i11$i = 0, $$0$$i115$i = 0, $$0$$i123$i = 0, $$0$$i131$i = 0, $$0$$i139$i = 0, $$0$$i14$i = 0, $$0$$i147$i = 0, $$0$$i155$i = 0, $$0$$i163$i = 0, $$0$$i171$i = 0, $$0$$i179$i = 0; - var $$0$$i189$i = 0, $$0$$i19$i = 0, $$0$$i19$i9 = 0, $$0$$i199$i = 0, $$0$$i209$i = 0, $$0$$i219$i = 0, $$0$$i229$i = 0, $$0$$i239$i = 0, $$0$$i24$i = 0, $$0$$i249$i = 0, $$0$$i259$i = 0, $$0$$i269$i = 0, $$0$$i27$i = 0, $$0$$i279$i = 0, $$0$$i289$i = 0, $$0$$i299$i = 0, $$0$$i3$i = 0, $$0$$i30$us$i = 0, $$0$$i309$i = 0, $$0$$i319$i = 0; - var $$0$$i329$i = 0, $$0$$i339$i = 0, $$0$$i349$i = 0, $$0$$i35$i = 0, $$0$$i359$i = 0, $$0$$i369$i = 0, $$0$$i379$i = 0, $$0$$i389$i = 0, $$0$$i399$1$i = 0, $$0$$i399$2$i = 0, $$0$$i399$3$i = 0, $$0$$i399$i = 0, $$0$$i409$i = 0, $$0$$i419$i = 0, $$0$$i429$i = 0, $$0$$i43$i = 0, $$0$$i439$i = 0, $$0$$i449$i = 0, $$0$$i459$i = 0, $$0$$i469$i = 0; - var $$0$$i479$i = 0, $$0$$i489$i = 0, $$0$$i499$i = 0, $$0$$i509$i = 0, $$0$$i51$i = 0, $$0$$i519$i = 0, $$0$$i529$i = 0, $$0$$i539$i = 0, $$0$$i549$i = 0, $$0$$i559$i = 0, $$0$$i59$i = 0, $$0$$i6$i = 0, $$0$$i67$i = 0, $$0$$i75$i = 0, $$0$$i83$i = 0, $$0$$i91$i = 0, $$0$$i99$i = 0, $$01$i$us$i = 0, $$01$i12$i = 0, $$01$i17$i = 0; - var $$01$i22$i = 0, $$01$i28$us$i = 0, $$01$i4$i = 0, $$02$i$i = 0, $$02$i1$i = 0, $$02$i105$i = 0, $$02$i113$i = 0, $$02$i121$i = 0, $$02$i129$i = 0, $$02$i137$i = 0, $$02$i145$i = 0, $$02$i153$i = 0, $$02$i161$i = 0, $$02$i169$i = 0, $$02$i17$i = 0, $$02$i177$i = 0, $$02$i187$i = 0, $$02$i197$i = 0, $$02$i207$i = 0, $$02$i217$i = 0; - var $$02$i227$i = 0, $$02$i237$i = 0, $$02$i247$i = 0, $$02$i25$i = 0, $$02$i257$i = 0, $$02$i267$i = 0, $$02$i277$i = 0, $$02$i287$i = 0, $$02$i297$i = 0, $$02$i307$i = 0, $$02$i317$i = 0, $$02$i327$i = 0, $$02$i33$i = 0, $$02$i337$i = 0, $$02$i347$i = 0, $$02$i357$i = 0, $$02$i367$i = 0, $$02$i377$i = 0, $$02$i387$i = 0, $$02$i397$1$i = 0; - var $$02$i397$2$i = 0, $$02$i397$3$i = 0, $$02$i397$i = 0, $$02$i407$i = 0, $$02$i41$i = 0, $$02$i417$i = 0, $$02$i427$i = 0, $$02$i437$i = 0, $$02$i447$i = 0, $$02$i457$i = 0, $$02$i467$i = 0, $$02$i477$i = 0, $$02$i487$i = 0, $$02$i49$i = 0, $$02$i497$i = 0, $$02$i507$i = 0, $$02$i517$i = 0, $$02$i527$i = 0, $$02$i537$i = 0, $$02$i547$i = 0; - var $$02$i557$i = 0, $$02$i57$i = 0, $$02$i65$i = 0, $$02$i73$i = 0, $$02$i81$i = 0, $$02$i89$i = 0, $$02$i9$i = 0, $$02$i97$i = 0, $$1$i = 0, $$1$i10 = 0, $$2$us$i = 0, $$idx$val$i = 0, $$idx$val$i$i = 0, $$idx$val$pre$i = 0, $$idx$val$pre$i$i = 0, $$idx1$i = 0, $$idx1$val$i = 0, $$idx1$val$i$i = 0, $$lcssa401 = 0, $$lcssa402 = 0; - var $$lcssa404 = 0, $$lcssa405 = 0, $$lcssa406 = 0, $$lcssa407 = 0, $$lcssa408 = 0, $$lcssa409 = 0, $$lcssa410 = 0, $$lcssa411 = 0, $$lcssa412 = 0, $$lcssa413 = 0, $$lcssa414 = 0, $$lcssa415 = 0, $$lcssa416 = 0, $$lcssa417 = 0, $$lcssa418 = 0, $$lcssa419 = 0, $$lcssa420 = 0, $$lcssa421 = 0, $$lcssa422 = 0, $$lcssa423 = 0; - var $$lcssa424 = 0, $$lcssa427 = 0, $$lcssa428 = 0, $$lcssa429 = 0, $$lcssa430 = 0, $$lcssa432 = 0, $$lcssa433 = 0, $$lcssa434 = 0, $$lcssa435 = 0, $$lcssa436 = 0, $$lcssa437 = 0, $$lcssa438 = 0, $$lcssa439 = 0, $$lcssa440 = 0, $$lcssa441 = 0, $$lcssa442 = 0, $$lcssa443 = 0, $$lcssa444 = 0, $$lcssa445 = 0, $$lcssa446 = 0; - var $$lcssa447 = 0, $$lcssa448 = 0, $$lcssa449 = 0, $$lcssa450 = 0, $$lcssa451 = 0, $$lcssa452 = 0, $$lcssa453 = 0, $$lcssa454 = 0, $$lcssa455 = 0, $$lcssa456 = 0, $$lcssa457 = 0, $$lcssa458 = 0, $$lcssa459 = 0, $$lcssa460 = 0, $$lcssa461 = 0, $$lcssa462 = 0, $$lcssa463 = 0, $$lcssa464 = 0, $$lcssa465 = 0, $$lcssa466 = 0; - var $$lcssa467 = 0, $$lcssa468 = 0, $$lcssa469 = 0, $$lcssa470 = 0, $$lcssa471 = 0, $$phi$trans$insert705$i = 0, $$phi$trans$insert708$i = 0, $$phi$trans$insert711$i = 0, $$phi$trans$insert714$i = 0, $$phi$trans$insert717$i = 0, $$phi$trans$insert720$i = 0, $$phi$trans$insert723$i = 0, $$phi$trans$insert726$i = 0, $$phi$trans$insert729$i = 0, $$phi$trans$insert732$i = 0, $$phi$trans$insert736$i = 0, $$pn$i = 0, $$pn100$i = 0, $$pre = 0, $$pre$i = 0; - var $$pre$i$i = 0, $$pre$i$i$lcssa = 0, $$pre$i$us$i = 0, $$pre$i1 = 0, $$pre$i101$i = 0, $$pre$i101$i$lcssa = 0, $$pre$i109$i = 0, $$pre$i109$i$lcssa = 0, $$pre$i117$i = 0, $$pre$i117$i$lcssa = 0, $$pre$i125$i = 0, $$pre$i125$i$lcssa = 0, $$pre$i13$i = 0, $$pre$i13$i$lcssa = 0, $$pre$i13$i8 = 0, $$pre$i133$i = 0, $$pre$i133$i$lcssa = 0, $$pre$i141$i = 0, $$pre$i141$i$lcssa = 0, $$pre$i149$i = 0; - var $$pre$i149$i$lcssa = 0, $$pre$i157$i = 0, $$pre$i157$i$lcssa = 0, $$pre$i165$i = 0, $$pre$i165$i$lcssa = 0, $$pre$i173$i = 0, $$pre$i173$i$lcssa = 0, $$pre$i18$i = 0, $$pre$i181$i = 0, $$pre$i181$i$lcssa = 0, $$pre$i191$i = 0, $$pre$i191$i$lcssa = 0, $$pre$i201$i = 0, $$pre$i201$i$lcssa = 0, $$pre$i21$i = 0, $$pre$i21$i$lcssa = 0, $$pre$i211$i = 0, $$pre$i211$i$lcssa = 0, $$pre$i221$i = 0, $$pre$i221$i$lcssa = 0; - var $$pre$i23$i = 0, $$pre$i231$i = 0, $$pre$i231$i$lcssa = 0, $$pre$i241$i = 0, $$pre$i241$i$lcssa = 0, $$pre$i251$i = 0, $$pre$i251$i$lcssa = 0, $$pre$i261$i = 0, $$pre$i261$i$lcssa = 0, $$pre$i281$i = 0, $$pre$i281$i$lcssa = 0, $$pre$i29$i = 0, $$pre$i29$i$lcssa = 0, $$pre$i29$us$i = 0, $$pre$i291$i = 0, $$pre$i291$i$lcssa = 0, $$pre$i301$i = 0, $$pre$i301$i$lcssa = 0, $$pre$i311$i = 0, $$pre$i311$i$lcssa = 0; - var $$pre$i321$i = 0, $$pre$i321$i$lcssa = 0, $$pre$i331$i = 0, $$pre$i331$i$lcssa = 0, $$pre$i341$i = 0, $$pre$i341$i$lcssa = 0, $$pre$i351$i = 0, $$pre$i351$i$lcssa = 0, $$pre$i361$i = 0, $$pre$i361$i$lcssa = 0, $$pre$i37$i = 0, $$pre$i37$i$lcssa = 0, $$pre$i371$i = 0, $$pre$i371$i$lcssa = 0, $$pre$i381$i = 0, $$pre$i381$i$lcssa = 0, $$pre$i391$i = 0, $$pre$i391$i$lcssa = 0, $$pre$i401$1$i = 0, $$pre$i401$1$i$lcssa = 0; - var $$pre$i401$2$i = 0, $$pre$i401$2$i$lcssa = 0, $$pre$i401$3$i = 0, $$pre$i401$3$i$lcssa = 0, $$pre$i401$i = 0, $$pre$i401$i$lcssa = 0, $$pre$i411$i = 0, $$pre$i411$i$lcssa = 0, $$pre$i421$i = 0, $$pre$i421$i$lcssa = 0, $$pre$i431$i = 0, $$pre$i431$i$lcssa = 0, $$pre$i45$i = 0, $$pre$i45$i$lcssa = 0, $$pre$i451$i = 0, $$pre$i451$i$lcssa = 0, $$pre$i461$i = 0, $$pre$i461$i$lcssa = 0, $$pre$i471$i = 0, $$pre$i471$i$lcssa = 0; - var $$pre$i481$i = 0, $$pre$i481$i$lcssa = 0, $$pre$i491$i = 0, $$pre$i491$i$lcssa = 0, $$pre$i5$i = 0, $$pre$i5$i$lcssa = 0, $$pre$i5$i4 = 0, $$pre$i501$i = 0, $$pre$i501$i$lcssa = 0, $$pre$i511$i = 0, $$pre$i511$i$lcssa = 0, $$pre$i521$i = 0, $$pre$i521$i$lcssa = 0, $$pre$i53$i = 0, $$pre$i53$i$lcssa = 0, $$pre$i531$i = 0, $$pre$i531$i$lcssa = 0, $$pre$i541$i = 0, $$pre$i541$i$lcssa = 0, $$pre$i551$i = 0; - var $$pre$i551$i$lcssa = 0, $$pre$i561$i = 0, $$pre$i561$i$lcssa = 0, $$pre$i61$i = 0, $$pre$i61$i$lcssa = 0, $$pre$i77$i = 0, $$pre$i77$i$lcssa = 0, $$pre$i85$i = 0, $$pre$i85$i$lcssa = 0, $$pre$i93$i = 0, $$pre$i93$i$lcssa = 0, $$pre$phiZ2D = 0, $$pre167 = 0, $$pre704$i = 0, $$pre706$i = 0, $$pre707$i = 0, $$pre709$i = 0, $$pre710$i = 0, $$pre712$i = 0, $$pre713$i = 0; - var $$pre715$i = 0, $$pre716$i = 0, $$pre718$i = 0, $$pre719$i = 0, $$pre721$i = 0, $$pre722$i = 0, $$pre724$i = 0, $$pre725$i = 0, $$pre727$i = 0, $$pre728$i = 0, $$pre730$i = 0, $$pre731$i = 0, $$pre733$i = 0, $$pre734$i = 0, $$pre735$i = 0, $$pre737$i = 0, $$pre96$pre$i = 0, $$pre97$i = 0, $$pre97$pre$i = 0, $0 = 0; - var $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0; - var $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0; - var $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0; - var $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0; - var $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0, $1088 = 0; - var $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0, $1105 = 0; - var $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0, $1123 = 0; - var $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0, $1141 = 0; - var $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0, $116 = 0; - var $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0, $1178 = 0; - var $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0, $1196 = 0; - var $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0, $1213 = 0; - var $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0, $123 = 0, $1230 = 0, $1231 = 0; - var $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0, $1248 = 0, $1249 = 0, $125 = 0; - var $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0, $1266 = 0, $1267 = 0, $1268 = 0; - var $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $1274 = 0, $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0, $1283 = 0, $1284 = 0, $1285 = 0, $1286 = 0; - var $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0, $1291 = 0, $1292 = 0, $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0, $1300 = 0, $1301 = 0, $1302 = 0, $1303 = 0; - var $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0, $1309 = 0, $131 = 0, $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0, $1319 = 0, $132 = 0, $1320 = 0, $1321 = 0; - var $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0, $1327 = 0, $1328 = 0, $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0, $1337 = 0, $1338 = 0, $1339 = 0, $134 = 0; - var $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0, $1345 = 0, $1346 = 0, $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0, $1355 = 0, $1356 = 0, $1357 = 0, $1358 = 0; - var $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0, $1363 = 0, $1364 = 0, $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0, $1373 = 0, $1374 = 0, $1375 = 0, $1376 = 0; - var $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0, $1381 = 0, $1382 = 0, $1383 = 0, $1384 = 0, $1385 = 0, $1386 = 0, $1387 = 0, $1388 = 0, $1389 = 0, $139 = 0, $1390 = 0, $1391 = 0, $1392 = 0, $1393 = 0, $1394 = 0; - var $1395 = 0, $1396 = 0, $1397 = 0, $1398 = 0, $1399 = 0, $14 = 0, $140 = 0, $1400 = 0, $1401 = 0, $1402 = 0, $1403 = 0, $1404 = 0, $1405 = 0, $1406 = 0, $1407 = 0, $1408 = 0, $1409 = 0, $141 = 0, $1410 = 0, $1411 = 0; - var $1412 = 0, $1413 = 0, $1414 = 0, $1415 = 0, $1416 = 0, $1417 = 0, $1418 = 0, $1419 = 0, $142 = 0, $1420 = 0, $1421 = 0, $1422 = 0, $1423 = 0, $1424 = 0, $1425 = 0, $1426 = 0, $1427 = 0, $1428 = 0, $1429 = 0, $143 = 0; - var $1430 = 0, $1431 = 0, $1432 = 0, $1433 = 0, $1434 = 0, $1435 = 0, $1436 = 0, $1437 = 0, $1438 = 0, $1439 = 0, $144 = 0, $1440 = 0, $1441 = 0, $1442 = 0, $1443 = 0, $1444 = 0, $1445 = 0, $1446 = 0, $1447 = 0, $1448 = 0; - var $1449 = 0, $145 = 0, $1450 = 0, $1451 = 0, $1452 = 0, $1453 = 0, $1454 = 0, $1455 = 0, $1456 = 0, $1457 = 0, $1458 = 0, $1459 = 0, $146 = 0, $1460 = 0, $1461 = 0, $1462 = 0, $1463 = 0, $1464 = 0, $1465 = 0, $1466 = 0; - var $1467 = 0, $1468 = 0, $1469 = 0, $147 = 0, $1470 = 0, $1471 = 0, $1472 = 0, $1473 = 0, $1474 = 0, $1475 = 0, $1476 = 0, $1477 = 0, $1478 = 0, $1479 = 0, $148 = 0, $1480 = 0, $1481 = 0, $1482 = 0, $1483 = 0, $1484 = 0; - var $1485 = 0, $1486 = 0, $1487 = 0, $1488 = 0, $1489 = 0, $149 = 0, $1490 = 0, $1491 = 0, $1492 = 0, $1493 = 0, $1494 = 0, $1495 = 0, $1496 = 0, $1497 = 0, $1498 = 0, $1499 = 0, $15 = 0, $150 = 0, $1500 = 0, $1501 = 0; - var $1502 = 0, $1503 = 0, $1504 = 0, $1505 = 0, $1506 = 0, $1507 = 0, $1508 = 0, $1509 = 0, $151 = 0, $1510 = 0, $1511 = 0, $1512 = 0, $1513 = 0, $1514 = 0, $1515 = 0, $1516 = 0, $1517 = 0, $1518 = 0, $1519 = 0, $152 = 0; - var $1520 = 0, $1521 = 0, $1522 = 0, $1523 = 0, $1524 = 0, $1525 = 0, $1526 = 0, $1527 = 0, $1528 = 0, $1529 = 0, $153 = 0, $1530 = 0, $1531 = 0, $1532 = 0, $1533 = 0, $1534 = 0, $1535 = 0, $1536 = 0, $1537 = 0, $1538 = 0; - var $1539 = 0, $154 = 0, $1540 = 0, $1541 = 0, $1542 = 0, $1543 = 0, $1544 = 0, $1545 = 0, $1546 = 0, $1547 = 0, $1548 = 0, $1549 = 0, $155 = 0, $1550 = 0, $1551 = 0, $1552 = 0, $1553 = 0, $1554 = 0, $1555 = 0, $1556 = 0; - var $1557 = 0, $1558 = 0, $1559 = 0, $156 = 0, $1560 = 0, $1561 = 0, $1562 = 0, $1563 = 0, $1564 = 0, $1565 = 0, $1566 = 0, $1567 = 0, $1568 = 0, $1569 = 0, $157 = 0, $1570 = 0, $1571 = 0, $1572 = 0, $1573 = 0, $1574 = 0; - var $1575 = 0, $1576 = 0, $1577 = 0, $1578 = 0, $1579 = 0, $158 = 0, $1580 = 0, $1581 = 0, $1582 = 0, $1583 = 0, $1584 = 0, $1585 = 0, $1586 = 0, $1587 = 0, $1588 = 0, $1589 = 0, $159 = 0, $1590 = 0, $1591 = 0, $1592 = 0; - var $1593 = 0, $1594 = 0, $1595 = 0, $1596 = 0, $1597 = 0, $1598 = 0, $1599 = 0, $16 = 0, $160 = 0, $1600 = 0, $1601 = 0, $1602 = 0, $1603 = 0, $1604 = 0, $1605 = 0, $1606 = 0, $1607 = 0, $1608 = 0, $1609 = 0, $161 = 0; - var $1610 = 0, $1611 = 0, $1612 = 0, $1613 = 0, $1614 = 0, $1615 = 0, $1616 = 0, $1617 = 0, $1618 = 0, $1619 = 0, $162 = 0, $1620 = 0, $1621 = 0, $1622 = 0, $1623 = 0, $1624 = 0, $1625 = 0, $1626 = 0, $1627 = 0, $1628 = 0; - var $1629 = 0, $163 = 0, $1630 = 0, $1631 = 0, $1632 = 0, $1633 = 0, $1634 = 0, $1635 = 0, $1636 = 0, $1637 = 0, $1638 = 0, $1639 = 0, $164 = 0, $1640 = 0, $1641 = 0, $1642 = 0, $1643 = 0, $1644 = 0, $1645 = 0, $1646 = 0; - var $1647 = 0, $1648 = 0, $1649 = 0, $165 = 0, $1650 = 0, $1651 = 0, $1652 = 0, $1653 = 0, $1654 = 0, $1655 = 0, $1656 = 0, $1657 = 0, $1658 = 0, $1659 = 0, $166 = 0, $1660 = 0, $1661 = 0, $1662 = 0, $1663 = 0, $1664 = 0; - var $1665 = 0, $1666 = 0, $1667 = 0, $1668 = 0, $1669 = 0, $167 = 0, $1670 = 0, $1671 = 0, $1672 = 0, $1673 = 0, $1674 = 0, $1675 = 0, $1676 = 0, $1677 = 0, $1678 = 0, $1679 = 0, $168 = 0, $1680 = 0, $1681 = 0, $1682 = 0; - var $1683 = 0, $1684 = 0, $1685 = 0, $1686 = 0, $1687 = 0, $1688 = 0, $1689 = 0, $169 = 0, $1690 = 0, $1691 = 0, $1692 = 0, $1693 = 0, $1694 = 0, $1695 = 0, $1696 = 0, $1697 = 0, $1698 = 0, $1699 = 0, $17 = 0, $170 = 0; - var $1700 = 0, $1701 = 0, $1702 = 0, $1703 = 0, $1704 = 0, $1705 = 0, $1706 = 0, $1707 = 0, $1708 = 0, $1709 = 0, $171 = 0, $1710 = 0, $1711 = 0, $1712 = 0, $1713 = 0, $1714 = 0, $1715 = 0, $1716 = 0, $1717 = 0, $1718 = 0; - var $1719 = 0, $172 = 0, $1720 = 0, $1721 = 0, $1722 = 0, $1723 = 0, $1724 = 0, $1725 = 0, $1726 = 0, $1727 = 0, $1728 = 0, $1729 = 0, $173 = 0, $1730 = 0, $1731 = 0, $1732 = 0, $1733 = 0, $1734 = 0, $1735 = 0, $1736 = 0; - var $1737 = 0, $1738 = 0, $1739 = 0, $174 = 0, $1740 = 0, $1741 = 0, $1742 = 0, $1743 = 0, $1744 = 0, $1745 = 0, $1746 = 0, $1747 = 0, $1748 = 0, $1749 = 0, $175 = 0, $1750 = 0, $1751 = 0, $1752 = 0, $1753 = 0, $1754 = 0; - var $1755 = 0, $1756 = 0, $1757 = 0, $1758 = 0, $1759 = 0, $176 = 0, $1760 = 0, $1761 = 0, $1762 = 0, $1763 = 0, $1764 = 0, $1765 = 0, $1766 = 0, $1767 = 0, $1768 = 0, $1769 = 0, $177 = 0, $1770 = 0, $1771 = 0, $1772 = 0; - var $1773 = 0, $1774 = 0, $1775 = 0, $1776 = 0, $1777 = 0, $1778 = 0, $1779 = 0, $178 = 0, $1780 = 0, $1781 = 0, $1782 = 0, $1783 = 0, $1784 = 0, $1785 = 0, $1786 = 0, $1787 = 0, $1788 = 0, $1789 = 0, $179 = 0, $1790 = 0; - var $1791 = 0, $1792 = 0, $1793 = 0, $1794 = 0, $1795 = 0, $1796 = 0, $1797 = 0, $1798 = 0, $1799 = 0, $18 = 0, $180 = 0, $1800 = 0, $1801 = 0, $1802 = 0, $1803 = 0, $1804 = 0, $1805 = 0, $1806 = 0, $1807 = 0, $1808 = 0; - var $1809 = 0, $181 = 0, $1810 = 0, $1811 = 0, $1812 = 0, $1813 = 0, $1814 = 0, $1815 = 0, $1816 = 0, $1817 = 0, $1818 = 0, $1819 = 0, $182 = 0, $1820 = 0, $1821 = 0, $1822 = 0, $1823 = 0, $1824 = 0, $1825 = 0, $183 = 0; - var $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0; - var $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0; - var $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0; - var $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0; - var $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0; - var $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0; - var $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0; - var $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0; - var $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0; - var $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0; - var $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0; - var $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0; - var $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0; - var $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0; - var $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0; - var $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0; - var $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0; - var $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0; - var $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0; - var $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0; - var $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0; - var $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0; - var $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0; - var $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0; - var $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0; - var $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0; - var $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0; - var $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0; - var $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0; - var $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0; - var $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0; - var $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0; - var $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0; - var $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0; - var $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0; - var $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0; - var $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0; - var $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0; - var $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0; - var $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0; - var $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0; - var $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0; - var $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0; - var $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0; - var $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0; - var $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $bit_rate$0$i = 0, $bit_rate$0$i$i = 0, $bit_rate$0$in$i = 0, $bit_rate$0$in$i$i = 0, $ch$047$i = 0, $ch$0637$i = 0, $ch$1632$i = 0, $ch$179$i = 0, $ch$2638$i = 0, $data_bits$0$lcssa$i = 0, $data_bits$039$$i = 0, $data_bits$039$i = 0, $data_bits$039$us$i = 0, $data_bits$1$us$i = 0, $data_bits$2$lcssa$i = 0; - var $data_bits$242$i = 0, $data_bits$3$i = 0, $data_bits$4$i = 0, $data_bits$5$i = 0, $exitcond = 0, $exitcond$i = 0, $exitcond$i6 = 0, $exitcond166 = 0, $exitcond93$i = 0, $exitcond94$i = 0, $exitcond95$i = 0, $flushbits$0$i = 0, $gr$054$i = 0, $gr$0634$i = 0, $i$067$i = 0, $i$091 = 0, $i$156$us$i = 0, $ptr$01$i$i = 0, $ptr$01$i10$i = 0, $ptr$01$i106$i = 0; - var $ptr$01$i114$i = 0, $ptr$01$i122$i = 0, $ptr$01$i130$i = 0, $ptr$01$i138$i = 0, $ptr$01$i146$i = 0, $ptr$01$i154$i = 0, $ptr$01$i162$i = 0, $ptr$01$i170$i = 0, $ptr$01$i178$i = 0, $ptr$01$i18$i = 0, $ptr$01$i188$i = 0, $ptr$01$i198$i = 0, $ptr$01$i2$i = 0, $ptr$01$i208$i = 0, $ptr$01$i218$i = 0, $ptr$01$i228$i = 0, $ptr$01$i238$i = 0, $ptr$01$i248$i = 0, $ptr$01$i258$i = 0, $ptr$01$i26$i = 0; - var $ptr$01$i268$i = 0, $ptr$01$i278$i = 0, $ptr$01$i288$i = 0, $ptr$01$i298$i = 0, $ptr$01$i308$i = 0, $ptr$01$i318$i = 0, $ptr$01$i328$i = 0, $ptr$01$i338$i = 0, $ptr$01$i34$i = 0, $ptr$01$i348$i = 0, $ptr$01$i358$i = 0, $ptr$01$i368$i = 0, $ptr$01$i378$i = 0, $ptr$01$i388$i = 0, $ptr$01$i398$1$i = 0, $ptr$01$i398$2$i = 0, $ptr$01$i398$3$i = 0, $ptr$01$i398$i = 0, $ptr$01$i408$i = 0, $ptr$01$i418$i = 0; - var $ptr$01$i42$i = 0, $ptr$01$i428$i = 0, $ptr$01$i438$i = 0, $ptr$01$i448$i = 0, $ptr$01$i458$i = 0, $ptr$01$i468$i = 0, $ptr$01$i478$i = 0, $ptr$01$i488$i = 0, $ptr$01$i498$i = 0, $ptr$01$i50$i = 0, $ptr$01$i508$i = 0, $ptr$01$i518$i = 0, $ptr$01$i528$i = 0, $ptr$01$i538$i = 0, $ptr$01$i548$i = 0, $ptr$01$i558$i = 0, $ptr$01$i58$i = 0, $ptr$01$i66$i = 0, $ptr$01$i74$i = 0, $ptr$01$i82$i = 0; - var $ptr$01$i90$i = 0, $ptr$01$i98$i = 0, $region2Start$0$i$i = 0, $region2Start$0$i10$i = 0, $scale_bits$076$i = 0, $scale_bits$1$lcssa$i = 0, $scale_bits$1$lcssa$i$lcssa = 0, $scale_bits$265$i = 0, $scale_bits$3$lcssa$i = 0, $scale_bits$3$lcssa$i$lcssa = 0, $scale_bits$4$i = 0, $sfb$0$lcssa$i = 0, $sfb$040$i = 0, $sfb$040$us$i = 0, $sfb$143$i = 0, $sfb$277$i = 0, $sfb$3$lcssa$i = 0, $sfb$369$i = 0, $sfb$466$i = 0, $sfb$5$lcssa$i = 0; - var $sfb$558$us$i = 0, $sfb_partition$075$i = 0, $sfb_partition$164$i = 0, $smax$i = 0, $split62$i = 0, $split63$i = 0, $tot_bits$053$i = 0, $tot_bits$1$lcssa$i = 0, $tot_bits$146$i = 0, $tot_bits$278$i = 0, $tot_bits$3$i = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer15 = 0, $vararg_buffer17 = 0, $vararg_buffer19 = 0, $vararg_buffer21 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_ptr10 = 0; - var $vararg_ptr11 = 0, $vararg_ptr12 = 0, $vararg_ptr13 = 0, $vararg_ptr14 = 0, $vararg_ptr7 = 0, $vararg_ptr8 = 0, $vararg_ptr9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 96|0; - $vararg_buffer21 = sp + 88|0; - $vararg_buffer19 = sp + 80|0; - $vararg_buffer17 = sp + 72|0; - $vararg_buffer15 = sp + 64|0; - $vararg_buffer5 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $0 = ((($gfc)) + 16|0); - $1 = ((($gfc)) + 84744|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(0); - if ($3) { - $6 = ((($gfc)) + 120|0); - $$idx$val$pre$i = HEAP32[$0>>2]|0; - $$idx$val$i = $$idx$val$pre$i;$bit_rate$0$in$i = $6; - } else { - $4 = HEAP32[$0>>2]|0; - $5 = ((83944 + ($4<<6)|0) + ($2<<2)|0); - $$idx$val$i = $4;$bit_rate$0$in$i = $5; - } - $bit_rate$0$i = HEAP32[$bit_rate$0$in$i>>2]|0; - $7 = ((($gfc)) + 84752|0); - $8 = HEAP32[$7>>2]|0; - $$idx1$i = ((($gfc)) + 64|0); - $$idx1$val$i = HEAP32[$$idx1$i>>2]|0; - $9 = ($$idx$val$i*72000)|0; - $10 = (($9) + 72000)|0; - $11 = Math_imul($10, $bit_rate$0$i)|0; - $12 = (($11|0) / ($$idx1$val$i|0))&-1; - $13 = (($12) + ($8))|0; - $14 = $13 << 3; - $15 = ((($gfc)) + 21320|0); - $16 = HEAP32[$15>>2]|0; - _drain_into_ancillary($gfc,$16); - $17 = ((($gfc)) + 52128|0); - $18 = HEAP32[$17>>2]|0; - $19 = (((((($gfc)) + 39840|0) + (($18*48)|0)|0)) + 4|0); - HEAP32[$19>>2] = 0; - $20 = (((((($gfc)) + 39840|0) + (($18*48)|0)|0)) + 8|0); - $21 = ((($gfc)) + 24|0); - $22 = HEAP32[$21>>2]|0; - _memset(($20|0),0,($22|0))|0; - $23 = HEAP32[$$idx1$i>>2]|0; - $24 = ($23|0)<(16000); - $25 = HEAP32[$17>>2]|0; - $26 = (((((($gfc)) + 39840|0) + (($25*48)|0)|0)) + 4|0); - $27 = HEAP32[$26>>2]|0; - if ($24) { - $$02$i$i = 12;$37 = $25;$ptr$01$i$i = $27; - while(1) { - $28 = $ptr$01$i$i & 7; - $29 = (8 - ($28))|0; - $30 = ($$02$i$i|0)<($29|0); - $$0$$i$i = $30 ? $$02$i$i : $29; - $31 = (($$02$i$i) - ($$0$$i$i))|0; - $32 = 4094 >>> $31; - $33 = (($29) - ($$0$$i$i))|0; - $34 = $32 << $33; - $35 = $ptr$01$i$i >> 3; - $36 = ((((((($gfc)) + 39840|0) + (($37*48)|0)|0)) + 8|0) + ($35)|0); - $38 = HEAP8[$36>>0]|0; - $39 = $38&255; - $40 = $34 | $39; - $41 = $40&255; - HEAP8[$36>>0] = $41; - $42 = (($$0$$i$i) + ($ptr$01$i$i))|0; - $43 = ($31|0)>(0); - $$pre$i$i = HEAP32[$17>>2]|0; - if ($43) { - $$02$i$i = $31;$37 = $$pre$i$i;$ptr$01$i$i = $42; - } else { - $$lcssa470 = $42;$$pre$i$i$lcssa = $$pre$i$i; - break; - } - } - $44 = (((((($gfc)) + 39840|0) + (($$pre$i$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$44>>2] = $$lcssa470; - $1787 = $$lcssa470;$1788 = $$pre$i$i$lcssa; - } else { - $$02$i1$i = 12;$54 = $25;$ptr$01$i2$i = $27; - while(1) { - $45 = $ptr$01$i2$i & 7; - $46 = (8 - ($45))|0; - $47 = ($$02$i1$i|0)<($46|0); - $$0$$i3$i = $47 ? $$02$i1$i : $46; - $48 = (($$02$i1$i) - ($$0$$i3$i))|0; - $49 = 4095 >>> $48; - $50 = (($46) - ($$0$$i3$i))|0; - $51 = $49 << $50; - $52 = $ptr$01$i2$i >> 3; - $53 = ((((((($gfc)) + 39840|0) + (($54*48)|0)|0)) + 8|0) + ($52)|0); - $55 = HEAP8[$53>>0]|0; - $56 = $55&255; - $57 = $51 | $56; - $58 = $57&255; - HEAP8[$53>>0] = $58; - $59 = (($$0$$i3$i) + ($ptr$01$i2$i))|0; - $60 = ($48|0)>(0); - $$pre$i5$i = HEAP32[$17>>2]|0; - if ($60) { - $$02$i1$i = $48;$54 = $$pre$i5$i;$ptr$01$i2$i = $59; - } else { - $$lcssa471 = $59;$$pre$i5$i$lcssa = $$pre$i5$i; - break; - } - } - $61 = (((((($gfc)) + 39840|0) + (($$pre$i5$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$61>>2] = $$lcssa471; - $1787 = $$lcssa471;$1788 = $$pre$i5$i$lcssa; - } - $62 = ((($gfc)) + 16|0); - $63 = HEAP32[$62>>2]|0; - $$02$i557$i = 1;$73 = $1788;$ptr$01$i558$i = $1787; - while(1) { - $64 = $ptr$01$i558$i & 7; - $65 = (8 - ($64))|0; - $66 = ($$02$i557$i|0)<($65|0); - $$0$$i559$i = $66 ? $$02$i557$i : $65; - $67 = (($$02$i557$i) - ($$0$$i559$i))|0; - $68 = $63 >> $67; - $69 = (($65) - ($$0$$i559$i))|0; - $70 = $68 << $69; - $71 = $ptr$01$i558$i >> 3; - $72 = ((((((($gfc)) + 39840|0) + (($73*48)|0)|0)) + 8|0) + ($71)|0); - $74 = HEAP8[$72>>0]|0; - $75 = $74&255; - $76 = $70 | $75; - $77 = $76&255; - HEAP8[$72>>0] = $77; - $78 = (($$0$$i559$i) + ($ptr$01$i558$i))|0; - $79 = ($67|0)>(0); - $$pre$i561$i = HEAP32[$17>>2]|0; - if ($79) { - $$02$i557$i = $67;$73 = $$pre$i561$i;$ptr$01$i558$i = $78; - } else { - $$lcssa469 = $78;$$pre$i561$i$lcssa = $$pre$i561$i; - break; - } - } - $80 = (((((($gfc)) + 39840|0) + (($$pre$i561$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$80>>2] = $$lcssa469; - $$02$i547$i = 2;$90 = $$pre$i561$i$lcssa;$ptr$01$i548$i = $$lcssa469; - while(1) { - $81 = $ptr$01$i548$i & 7; - $82 = (8 - ($81))|0; - $83 = ($$02$i547$i|0)<($82|0); - $$0$$i549$i = $83 ? $$02$i547$i : $82; - $84 = (($$02$i547$i) - ($$0$$i549$i))|0; - $85 = 1 >>> $84; - $86 = (($82) - ($$0$$i549$i))|0; - $87 = $85 << $86; - $88 = $ptr$01$i548$i >> 3; - $89 = ((((((($gfc)) + 39840|0) + (($90*48)|0)|0)) + 8|0) + ($88)|0); - $91 = HEAP8[$89>>0]|0; - $92 = $91&255; - $93 = $87 | $92; - $94 = $93&255; - HEAP8[$89>>0] = $94; - $95 = (($$0$$i549$i) + ($ptr$01$i548$i))|0; - $96 = ($84|0)>(0); - $$pre$i551$i = HEAP32[$17>>2]|0; - if ($96) { - $$02$i547$i = $84;$90 = $$pre$i551$i;$ptr$01$i548$i = $95; - } else { - $$lcssa468 = $95;$$pre$i551$i$lcssa = $$pre$i551$i; - break; - } - } - $97 = (((((($gfc)) + 39840|0) + (($$pre$i551$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$97>>2] = $$lcssa468; - $98 = ((($gfc)) + 160|0); - $99 = HEAP32[$98>>2]|0; - $100 = ($99|0)==(0); - $101 = $100&1; - $$02$i537$i = 1;$111 = $$pre$i551$i$lcssa;$ptr$01$i538$i = $$lcssa468; - while(1) { - $102 = $ptr$01$i538$i & 7; - $103 = (8 - ($102))|0; - $104 = ($$02$i537$i|0)<($103|0); - $$0$$i539$i = $104 ? $$02$i537$i : $103; - $105 = (($$02$i537$i) - ($$0$$i539$i))|0; - $106 = $101 >>> $105; - $107 = (($103) - ($$0$$i539$i))|0; - $108 = $106 << $107; - $109 = $ptr$01$i538$i >> 3; - $110 = ((((((($gfc)) + 39840|0) + (($111*48)|0)|0)) + 8|0) + ($109)|0); - $112 = HEAP8[$110>>0]|0; - $113 = $112&255; - $114 = $108 | $113; - $115 = $114&255; - HEAP8[$110>>0] = $115; - $116 = (($$0$$i539$i) + ($ptr$01$i538$i))|0; - $117 = ($105|0)>(0); - $$pre$i541$i = HEAP32[$17>>2]|0; - if ($117) { - $$02$i537$i = $105;$111 = $$pre$i541$i;$ptr$01$i538$i = $116; - } else { - $$lcssa467 = $116;$$pre$i541$i$lcssa = $$pre$i541$i; - break; - } - } - $118 = (((((($gfc)) + 39840|0) + (($$pre$i541$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$118>>2] = $$lcssa467; - $119 = HEAP32[$1>>2]|0; - $$02$i527$i = 4;$129 = $$pre$i541$i$lcssa;$ptr$01$i528$i = $$lcssa467; - while(1) { - $120 = $ptr$01$i528$i & 7; - $121 = (8 - ($120))|0; - $122 = ($$02$i527$i|0)<($121|0); - $$0$$i529$i = $122 ? $$02$i527$i : $121; - $123 = (($$02$i527$i) - ($$0$$i529$i))|0; - $124 = $119 >> $123; - $125 = (($121) - ($$0$$i529$i))|0; - $126 = $124 << $125; - $127 = $ptr$01$i528$i >> 3; - $128 = ((((((($gfc)) + 39840|0) + (($129*48)|0)|0)) + 8|0) + ($127)|0); - $130 = HEAP8[$128>>0]|0; - $131 = $130&255; - $132 = $126 | $131; - $133 = $132&255; - HEAP8[$128>>0] = $133; - $134 = (($$0$$i529$i) + ($ptr$01$i528$i))|0; - $135 = ($123|0)>(0); - $$pre$i531$i = HEAP32[$17>>2]|0; - if ($135) { - $$02$i527$i = $123;$129 = $$pre$i531$i;$ptr$01$i528$i = $134; - } else { - $$lcssa466 = $134;$$pre$i531$i$lcssa = $$pre$i531$i; - break; - } - } - $136 = (((((($gfc)) + 39840|0) + (($$pre$i531$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$136>>2] = $$lcssa466; - $137 = ((($gfc)) + 20|0); - $138 = HEAP32[$137>>2]|0; - $$02$i517$i = 2;$148 = $$pre$i531$i$lcssa;$ptr$01$i518$i = $$lcssa466; - while(1) { - $139 = $ptr$01$i518$i & 7; - $140 = (8 - ($139))|0; - $141 = ($$02$i517$i|0)<($140|0); - $$0$$i519$i = $141 ? $$02$i517$i : $140; - $142 = (($$02$i517$i) - ($$0$$i519$i))|0; - $143 = $138 >> $142; - $144 = (($140) - ($$0$$i519$i))|0; - $145 = $143 << $144; - $146 = $ptr$01$i518$i >> 3; - $147 = ((((((($gfc)) + 39840|0) + (($148*48)|0)|0)) + 8|0) + ($146)|0); - $149 = HEAP8[$147>>0]|0; - $150 = $149&255; - $151 = $145 | $150; - $152 = $151&255; - HEAP8[$147>>0] = $152; - $153 = (($$0$$i519$i) + ($ptr$01$i518$i))|0; - $154 = ($142|0)>(0); - $$pre$i521$i = HEAP32[$17>>2]|0; - if ($154) { - $$02$i517$i = $142;$148 = $$pre$i521$i;$ptr$01$i518$i = $153; - } else { - $$lcssa465 = $153;$$pre$i521$i$lcssa = $$pre$i521$i; - break; - } - } - $155 = (((((($gfc)) + 39840|0) + (($$pre$i521$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$155>>2] = $$lcssa465; - $156 = HEAP32[$7>>2]|0; - $$02$i507$i = 1;$166 = $$pre$i521$i$lcssa;$ptr$01$i508$i = $$lcssa465; - while(1) { - $157 = $ptr$01$i508$i & 7; - $158 = (8 - ($157))|0; - $159 = ($$02$i507$i|0)<($158|0); - $$0$$i509$i = $159 ? $$02$i507$i : $158; - $160 = (($$02$i507$i) - ($$0$$i509$i))|0; - $161 = $156 >> $160; - $162 = (($158) - ($$0$$i509$i))|0; - $163 = $161 << $162; - $164 = $ptr$01$i508$i >> 3; - $165 = ((((((($gfc)) + 39840|0) + (($166*48)|0)|0)) + 8|0) + ($164)|0); - $167 = HEAP8[$165>>0]|0; - $168 = $167&255; - $169 = $163 | $168; - $170 = $169&255; - HEAP8[$165>>0] = $170; - $171 = (($$0$$i509$i) + ($ptr$01$i508$i))|0; - $172 = ($160|0)>(0); - $$pre$i511$i = HEAP32[$17>>2]|0; - if ($172) { - $$02$i507$i = $160;$166 = $$pre$i511$i;$ptr$01$i508$i = $171; - } else { - $$lcssa464 = $171;$$pre$i511$i$lcssa = $$pre$i511$i; - break; - } - } - $173 = (((((($gfc)) + 39840|0) + (($$pre$i511$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$173>>2] = $$lcssa464; - $174 = ((($gfc)) + 172|0); - $175 = HEAP32[$174>>2]|0; - $$02$i497$i = 1;$185 = $$pre$i511$i$lcssa;$ptr$01$i498$i = $$lcssa464; - while(1) { - $176 = $ptr$01$i498$i & 7; - $177 = (8 - ($176))|0; - $178 = ($$02$i497$i|0)<($177|0); - $$0$$i499$i = $178 ? $$02$i497$i : $177; - $179 = (($$02$i497$i) - ($$0$$i499$i))|0; - $180 = $175 >> $179; - $181 = (($177) - ($$0$$i499$i))|0; - $182 = $180 << $181; - $183 = $ptr$01$i498$i >> 3; - $184 = ((((((($gfc)) + 39840|0) + (($185*48)|0)|0)) + 8|0) + ($183)|0); - $186 = HEAP8[$184>>0]|0; - $187 = $186&255; - $188 = $182 | $187; - $189 = $188&255; - HEAP8[$184>>0] = $189; - $190 = (($$0$$i499$i) + ($ptr$01$i498$i))|0; - $191 = ($179|0)>(0); - $$pre$i501$i = HEAP32[$17>>2]|0; - if ($191) { - $$02$i497$i = $179;$185 = $$pre$i501$i;$ptr$01$i498$i = $190; - } else { - $$lcssa463 = $190;$$pre$i501$i$lcssa = $$pre$i501$i; - break; - } - } - $192 = (((((($gfc)) + 39840|0) + (($$pre$i501$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$192>>2] = $$lcssa463; - $193 = ((($gfc)) + 180|0); - $194 = HEAP32[$193>>2]|0; - $$02$i487$i = 2;$204 = $$pre$i501$i$lcssa;$ptr$01$i488$i = $$lcssa463; - while(1) { - $195 = $ptr$01$i488$i & 7; - $196 = (8 - ($195))|0; - $197 = ($$02$i487$i|0)<($196|0); - $$0$$i489$i = $197 ? $$02$i487$i : $196; - $198 = (($$02$i487$i) - ($$0$$i489$i))|0; - $199 = $194 >> $198; - $200 = (($196) - ($$0$$i489$i))|0; - $201 = $199 << $200; - $202 = $ptr$01$i488$i >> 3; - $203 = ((((((($gfc)) + 39840|0) + (($204*48)|0)|0)) + 8|0) + ($202)|0); - $205 = HEAP8[$203>>0]|0; - $206 = $205&255; - $207 = $201 | $206; - $208 = $207&255; - HEAP8[$203>>0] = $208; - $209 = (($$0$$i489$i) + ($ptr$01$i488$i))|0; - $210 = ($198|0)>(0); - $$pre$i491$i = HEAP32[$17>>2]|0; - if ($210) { - $$02$i487$i = $198;$204 = $$pre$i491$i;$ptr$01$i488$i = $209; - } else { - $$lcssa462 = $209;$$pre$i491$i$lcssa = $$pre$i491$i; - break; - } - } - $211 = (((((($gfc)) + 39840|0) + (($$pre$i491$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$211>>2] = $$lcssa462; - $212 = ((($gfc)) + 84756|0); - $213 = HEAP32[$212>>2]|0; - $$02$i477$i = 2;$223 = $$pre$i491$i$lcssa;$ptr$01$i478$i = $$lcssa462; - while(1) { - $214 = $ptr$01$i478$i & 7; - $215 = (8 - ($214))|0; - $216 = ($$02$i477$i|0)<($215|0); - $$0$$i479$i = $216 ? $$02$i477$i : $215; - $217 = (($$02$i477$i) - ($$0$$i479$i))|0; - $218 = $213 >> $217; - $219 = (($215) - ($$0$$i479$i))|0; - $220 = $218 << $219; - $221 = $ptr$01$i478$i >> 3; - $222 = ((((((($gfc)) + 39840|0) + (($223*48)|0)|0)) + 8|0) + ($221)|0); - $224 = HEAP8[$222>>0]|0; - $225 = $224&255; - $226 = $220 | $225; - $227 = $226&255; - HEAP8[$222>>0] = $227; - $228 = (($$0$$i479$i) + ($ptr$01$i478$i))|0; - $229 = ($217|0)>(0); - $$pre$i481$i = HEAP32[$17>>2]|0; - if ($229) { - $$02$i477$i = $217;$223 = $$pre$i481$i;$ptr$01$i478$i = $228; - } else { - $$lcssa461 = $228;$$pre$i481$i$lcssa = $$pre$i481$i; - break; - } - } - $230 = (((((($gfc)) + 39840|0) + (($$pre$i481$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$230>>2] = $$lcssa461; - $231 = ((($gfc)) + 164|0); - $232 = HEAP32[$231>>2]|0; - $$02$i467$i = 1;$242 = $$pre$i481$i$lcssa;$ptr$01$i468$i = $$lcssa461; - while(1) { - $233 = $ptr$01$i468$i & 7; - $234 = (8 - ($233))|0; - $235 = ($$02$i467$i|0)<($234|0); - $$0$$i469$i = $235 ? $$02$i467$i : $234; - $236 = (($$02$i467$i) - ($$0$$i469$i))|0; - $237 = $232 >> $236; - $238 = (($234) - ($$0$$i469$i))|0; - $239 = $237 << $238; - $240 = $ptr$01$i468$i >> 3; - $241 = ((((((($gfc)) + 39840|0) + (($242*48)|0)|0)) + 8|0) + ($240)|0); - $243 = HEAP8[$241>>0]|0; - $244 = $243&255; - $245 = $239 | $244; - $246 = $245&255; - HEAP8[$241>>0] = $246; - $247 = (($$0$$i469$i) + ($ptr$01$i468$i))|0; - $248 = ($236|0)>(0); - $$pre$i471$i = HEAP32[$17>>2]|0; - if ($248) { - $$02$i467$i = $236;$242 = $$pre$i471$i;$ptr$01$i468$i = $247; - } else { - $$lcssa460 = $247;$$pre$i471$i$lcssa = $$pre$i471$i; - break; - } - } - $249 = (((((($gfc)) + 39840|0) + (($$pre$i471$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$249>>2] = $$lcssa460; - $250 = ((($gfc)) + 168|0); - $251 = HEAP32[$250>>2]|0; - $$02$i457$i = 1;$261 = $$pre$i471$i$lcssa;$ptr$01$i458$i = $$lcssa460; - while(1) { - $252 = $ptr$01$i458$i & 7; - $253 = (8 - ($252))|0; - $254 = ($$02$i457$i|0)<($253|0); - $$0$$i459$i = $254 ? $$02$i457$i : $253; - $255 = (($$02$i457$i) - ($$0$$i459$i))|0; - $256 = $251 >> $255; - $257 = (($253) - ($$0$$i459$i))|0; - $258 = $256 << $257; - $259 = $ptr$01$i458$i >> 3; - $260 = ((((((($gfc)) + 39840|0) + (($261*48)|0)|0)) + 8|0) + ($259)|0); - $262 = HEAP8[$260>>0]|0; - $263 = $262&255; - $264 = $258 | $263; - $265 = $264&255; - HEAP8[$260>>0] = $265; - $266 = (($$0$$i459$i) + ($ptr$01$i458$i))|0; - $267 = ($255|0)>(0); - $$pre$i461$i = HEAP32[$17>>2]|0; - if ($267) { - $$02$i457$i = $255;$261 = $$pre$i461$i;$ptr$01$i458$i = $266; - } else { - $$lcssa459 = $266;$$pre$i461$i$lcssa = $$pre$i461$i; - break; - } - } - $268 = (((((($gfc)) + 39840|0) + (($$pre$i461$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$268>>2] = $$lcssa459; - $269 = ((($gfc)) + 176|0); - $270 = HEAP32[$269>>2]|0; - $$02$i447$i = 2;$280 = $$pre$i461$i$lcssa;$ptr$01$i448$i = $$lcssa459; - while(1) { - $271 = $ptr$01$i448$i & 7; - $272 = (8 - ($271))|0; - $273 = ($$02$i447$i|0)<($272|0); - $$0$$i449$i = $273 ? $$02$i447$i : $272; - $274 = (($$02$i447$i) - ($$0$$i449$i))|0; - $275 = $270 >> $274; - $276 = (($272) - ($$0$$i449$i))|0; - $277 = $275 << $276; - $278 = $ptr$01$i448$i >> 3; - $279 = ((((((($gfc)) + 39840|0) + (($280*48)|0)|0)) + 8|0) + ($278)|0); - $281 = HEAP8[$279>>0]|0; - $282 = $281&255; - $283 = $277 | $282; - $284 = $283&255; - HEAP8[$279>>0] = $284; - $285 = (($$0$$i449$i) + ($ptr$01$i448$i))|0; - $286 = ($274|0)>(0); - $$pre$i451$i = HEAP32[$17>>2]|0; - if ($286) { - $$02$i447$i = $274;$280 = $$pre$i451$i;$ptr$01$i448$i = $285; - } else { - $$lcssa458 = $285;$$pre$i451$i$lcssa = $$pre$i451$i; - break; - } - } - $287 = (((((($gfc)) + 39840|0) + (($$pre$i451$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$287>>2] = $$lcssa458; - $288 = HEAP32[$98>>2]|0; - $289 = ($288|0)==(0); - if ($289) { - $1789 = $$lcssa458; - } else { - $$02$i437$i = 16;$ptr$01$i438$i = $$lcssa458; - while(1) { - $290 = $ptr$01$i438$i & 7; - $291 = (8 - ($290))|0; - $292 = ($$02$i437$i|0)<($291|0); - $$0$$i439$i = $292 ? $$02$i437$i : $291; - $293 = (($$02$i437$i) - ($$0$$i439$i))|0; - $294 = (($$0$$i439$i) + ($ptr$01$i438$i))|0; - $295 = ($293|0)>(0); - if ($295) { - $$02$i437$i = $293;$ptr$01$i438$i = $294; - } else { - $$lcssa457 = $294; - break; - } - } - HEAP32[$287>>2] = $$lcssa457; - $1789 = $$lcssa457; - } - $296 = HEAP32[$62>>2]|0; - $297 = ($296|0)==(1); - $298 = ((($gfc)) + 21312|0); - $299 = HEAP32[$298>>2]|0; - do { - if ($297) { - $$02$i427$i = 9;$309 = $$pre$i451$i$lcssa;$ptr$01$i428$i = $1789; - while(1) { - $300 = $ptr$01$i428$i & 7; - $301 = (8 - ($300))|0; - $302 = ($$02$i427$i|0)<($301|0); - $$0$$i429$i = $302 ? $$02$i427$i : $301; - $303 = (($$02$i427$i) - ($$0$$i429$i))|0; - $304 = $299 >> $303; - $305 = (($301) - ($$0$$i429$i))|0; - $306 = $304 << $305; - $307 = $ptr$01$i428$i >> 3; - $308 = ((((((($gfc)) + 39840|0) + (($309*48)|0)|0)) + 8|0) + ($307)|0); - $310 = HEAP8[$308>>0]|0; - $311 = $310&255; - $312 = $306 | $311; - $313 = $312&255; - HEAP8[$308>>0] = $313; - $314 = (($$0$$i429$i) + ($ptr$01$i428$i))|0; - $315 = ($303|0)>(0); - $$pre$i431$i = HEAP32[$17>>2]|0; - if ($315) { - $$02$i427$i = $303;$309 = $$pre$i431$i;$ptr$01$i428$i = $314; - } else { - $$lcssa434 = $314;$$pre$i431$i$lcssa = $$pre$i431$i; - break; - } - } - $316 = (((((($gfc)) + 39840|0) + (($$pre$i431$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$316>>2] = $$lcssa434; - $317 = ((($gfc)) + 72|0); - $318 = HEAP32[$317>>2]|0; - $319 = ($318|0)==(2); - $320 = ((($gfc)) + 21316|0); - $321 = HEAP32[$320>>2]|0; - if ($319) { - $$02$i417$i = 3;$331 = $$pre$i431$i$lcssa;$ptr$01$i418$i = $$lcssa434; - while(1) { - $322 = $ptr$01$i418$i & 7; - $323 = (8 - ($322))|0; - $324 = ($$02$i417$i|0)<($323|0); - $$0$$i419$i = $324 ? $$02$i417$i : $323; - $325 = (($$02$i417$i) - ($$0$$i419$i))|0; - $326 = $321 >> $325; - $327 = (($323) - ($$0$$i419$i))|0; - $328 = $326 << $327; - $329 = $ptr$01$i418$i >> 3; - $330 = ((((((($gfc)) + 39840|0) + (($331*48)|0)|0)) + 8|0) + ($329)|0); - $332 = HEAP8[$330>>0]|0; - $333 = $332&255; - $334 = $328 | $333; - $335 = $334&255; - HEAP8[$330>>0] = $335; - $336 = (($$0$$i419$i) + ($ptr$01$i418$i))|0; - $337 = ($325|0)>(0); - $$pre$i421$i = HEAP32[$17>>2]|0; - if ($337) { - $$02$i417$i = $325;$331 = $$pre$i421$i;$ptr$01$i418$i = $336; - } else { - $$lcssa432 = $336;$$pre$i421$i$lcssa = $$pre$i421$i; - break; - } - } - $338 = (((((($gfc)) + 39840|0) + (($$pre$i421$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$338>>2] = $$lcssa432; - $$pre735$i = $$lcssa432;$1790 = $$pre$i421$i$lcssa; - } else { - $$02$i407$i = 5;$348 = $$pre$i431$i$lcssa;$ptr$01$i408$i = $$lcssa434; - while(1) { - $339 = $ptr$01$i408$i & 7; - $340 = (8 - ($339))|0; - $341 = ($$02$i407$i|0)<($340|0); - $$0$$i409$i = $341 ? $$02$i407$i : $340; - $342 = (($$02$i407$i) - ($$0$$i409$i))|0; - $343 = $321 >> $342; - $344 = (($340) - ($$0$$i409$i))|0; - $345 = $343 << $344; - $346 = $ptr$01$i408$i >> 3; - $347 = ((((((($gfc)) + 39840|0) + (($348*48)|0)|0)) + 8|0) + ($346)|0); - $349 = HEAP8[$347>>0]|0; - $350 = $349&255; - $351 = $345 | $350; - $352 = $351&255; - HEAP8[$347>>0] = $352; - $353 = (($$0$$i409$i) + ($ptr$01$i408$i))|0; - $354 = ($342|0)>(0); - $$pre$i411$i = HEAP32[$17>>2]|0; - if ($354) { - $$02$i407$i = $342;$348 = $$pre$i411$i;$ptr$01$i408$i = $353; - } else { - $$lcssa433 = $353;$$pre$i411$i$lcssa = $$pre$i411$i; - break; - } - } - $355 = (((((($gfc)) + 39840|0) + (($$pre$i411$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$355>>2] = $$lcssa433; - $$pre735$i = $$lcssa433;$1790 = $$pre$i411$i$lcssa; - } - $356 = HEAP32[$317>>2]|0; - $357 = ($356|0)>(0); - if ($357) { - $1791 = $$pre735$i;$1792 = $1790;$ch$0637$i = 0; - while(1) { - $358 = (((($gfc)) + 21328|0) + ($ch$0637$i<<4)|0); - $359 = HEAP32[$358>>2]|0; - $$02$i397$i = 1;$369 = $1792;$ptr$01$i398$i = $1791; - while(1) { - $360 = $ptr$01$i398$i & 7; - $361 = (8 - ($360))|0; - $362 = ($$02$i397$i|0)<($361|0); - $$0$$i399$i = $362 ? $$02$i397$i : $361; - $363 = (($$02$i397$i) - ($$0$$i399$i))|0; - $364 = $359 >> $363; - $365 = (($361) - ($$0$$i399$i))|0; - $366 = $364 << $365; - $367 = $ptr$01$i398$i >> 3; - $368 = ((((((($gfc)) + 39840|0) + (($369*48)|0)|0)) + 8|0) + ($367)|0); - $370 = HEAP8[$368>>0]|0; - $371 = $370&255; - $372 = $366 | $371; - $373 = $372&255; - HEAP8[$368>>0] = $373; - $374 = (($$0$$i399$i) + ($ptr$01$i398$i))|0; - $375 = ($363|0)>(0); - $$pre$i401$i = HEAP32[$17>>2]|0; - if ($375) { - $$02$i397$i = $363;$369 = $$pre$i401$i;$ptr$01$i398$i = $374; - } else { - $$lcssa427 = $374;$$pre$i401$i$lcssa = $$pre$i401$i; - break; - } - } - $376 = (((((($gfc)) + 39840|0) + (($$pre$i401$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$376>>2] = $$lcssa427; - $377 = (((((($gfc)) + 21328|0) + ($ch$0637$i<<4)|0)) + 4|0); - $378 = HEAP32[$377>>2]|0; - $$02$i397$1$i = 1;$1234 = $$pre$i401$i$lcssa;$ptr$01$i398$1$i = $$lcssa427; - while(1) { - $1225 = $ptr$01$i398$1$i & 7; - $1226 = (8 - ($1225))|0; - $1227 = ($$02$i397$1$i|0)<($1226|0); - $$0$$i399$1$i = $1227 ? $$02$i397$1$i : $1226; - $1228 = (($$02$i397$1$i) - ($$0$$i399$1$i))|0; - $1229 = $378 >> $1228; - $1230 = (($1226) - ($$0$$i399$1$i))|0; - $1231 = $1229 << $1230; - $1232 = $ptr$01$i398$1$i >> 3; - $1233 = ((((((($gfc)) + 39840|0) + (($1234*48)|0)|0)) + 8|0) + ($1232)|0); - $1235 = HEAP8[$1233>>0]|0; - $1236 = $1235&255; - $1237 = $1231 | $1236; - $1238 = $1237&255; - HEAP8[$1233>>0] = $1238; - $1239 = (($$0$$i399$1$i) + ($ptr$01$i398$1$i))|0; - $1240 = ($1228|0)>(0); - $$pre$i401$1$i = HEAP32[$17>>2]|0; - if ($1240) { - $$02$i397$1$i = $1228;$1234 = $$pre$i401$1$i;$ptr$01$i398$1$i = $1239; - } else { - $$lcssa428 = $1239;$$pre$i401$1$i$lcssa = $$pre$i401$1$i; - break; - } - } - $1241 = (((((($gfc)) + 39840|0) + (($$pre$i401$1$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1241>>2] = $$lcssa428; - $1242 = (((((($gfc)) + 21328|0) + ($ch$0637$i<<4)|0)) + 8|0); - $1243 = HEAP32[$1242>>2]|0; - $$02$i397$2$i = 1;$1253 = $$pre$i401$1$i$lcssa;$ptr$01$i398$2$i = $$lcssa428; - while(1) { - $1244 = $ptr$01$i398$2$i & 7; - $1245 = (8 - ($1244))|0; - $1246 = ($$02$i397$2$i|0)<($1245|0); - $$0$$i399$2$i = $1246 ? $$02$i397$2$i : $1245; - $1247 = (($$02$i397$2$i) - ($$0$$i399$2$i))|0; - $1248 = $1243 >> $1247; - $1249 = (($1245) - ($$0$$i399$2$i))|0; - $1250 = $1248 << $1249; - $1251 = $ptr$01$i398$2$i >> 3; - $1252 = ((((((($gfc)) + 39840|0) + (($1253*48)|0)|0)) + 8|0) + ($1251)|0); - $1254 = HEAP8[$1252>>0]|0; - $1255 = $1254&255; - $1256 = $1250 | $1255; - $1257 = $1256&255; - HEAP8[$1252>>0] = $1257; - $1258 = (($$0$$i399$2$i) + ($ptr$01$i398$2$i))|0; - $1259 = ($1247|0)>(0); - $$pre$i401$2$i = HEAP32[$17>>2]|0; - if ($1259) { - $$02$i397$2$i = $1247;$1253 = $$pre$i401$2$i;$ptr$01$i398$2$i = $1258; - } else { - $$lcssa429 = $1258;$$pre$i401$2$i$lcssa = $$pre$i401$2$i; - break; - } - } - $1260 = (((((($gfc)) + 39840|0) + (($$pre$i401$2$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1260>>2] = $$lcssa429; - $1261 = (((((($gfc)) + 21328|0) + ($ch$0637$i<<4)|0)) + 12|0); - $1262 = HEAP32[$1261>>2]|0; - $$02$i397$3$i = 1;$1272 = $$pre$i401$2$i$lcssa;$ptr$01$i398$3$i = $$lcssa429; - while(1) { - $1263 = $ptr$01$i398$3$i & 7; - $1264 = (8 - ($1263))|0; - $1265 = ($$02$i397$3$i|0)<($1264|0); - $$0$$i399$3$i = $1265 ? $$02$i397$3$i : $1264; - $1266 = (($$02$i397$3$i) - ($$0$$i399$3$i))|0; - $1267 = $1262 >> $1266; - $1268 = (($1264) - ($$0$$i399$3$i))|0; - $1269 = $1267 << $1268; - $1270 = $ptr$01$i398$3$i >> 3; - $1271 = ((((((($gfc)) + 39840|0) + (($1272*48)|0)|0)) + 8|0) + ($1270)|0); - $1273 = HEAP8[$1271>>0]|0; - $1274 = $1273&255; - $1275 = $1269 | $1274; - $1276 = $1275&255; - HEAP8[$1271>>0] = $1276; - $1277 = (($$0$$i399$3$i) + ($ptr$01$i398$3$i))|0; - $1278 = ($1266|0)>(0); - $$pre$i401$3$i = HEAP32[$17>>2]|0; - if ($1278) { - $$02$i397$3$i = $1266;$1272 = $$pre$i401$3$i;$ptr$01$i398$3$i = $1277; - } else { - $$lcssa430 = $1277;$$pre$i401$3$i$lcssa = $$pre$i401$3$i; - break; - } - } - $1279 = (((((($gfc)) + 39840|0) + (($$pre$i401$3$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1279>>2] = $$lcssa430; - $1280 = (($ch$0637$i) + 1)|0; - $1281 = HEAP32[$317>>2]|0; - $1282 = ($1280|0)<($1281|0); - if ($1282) { - $1791 = $$lcssa430;$1792 = $$pre$i401$3$i$lcssa;$ch$0637$i = $1280; - } else { - $379 = $1281;$381 = $$pre$i401$3$i$lcssa;$gr$0634$i = 0; - break; - } - } - } else { - $379 = $356;$381 = $1790;$gr$0634$i = 0; - } - while(1) { - $380 = ($379|0)>(0); - if ($380) { - $$phi$trans$insert736$i = (((((($gfc)) + 39840|0) + (($381*48)|0)|0)) + 4|0); - $$pre737$i = HEAP32[$$phi$trans$insert736$i>>2]|0; - $1795 = $$pre737$i;$1796 = $381;$ch$1632$i = 0; - while(1) { - $382 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4768|0); - $383 = HEAP32[$382>>2]|0; - $384 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4844|0); - $385 = HEAP32[$384>>2]|0; - $386 = (($385) + ($383))|0; - $$02$i387$i = 12;$396 = $1796;$ptr$01$i388$i = $1795; - while(1) { - $387 = $ptr$01$i388$i & 7; - $388 = (8 - ($387))|0; - $389 = ($$02$i387$i|0)<($388|0); - $$0$$i389$i = $389 ? $$02$i387$i : $388; - $390 = (($$02$i387$i) - ($$0$$i389$i))|0; - $391 = $386 >> $390; - $392 = (($388) - ($$0$$i389$i))|0; - $393 = $391 << $392; - $394 = $ptr$01$i388$i >> 3; - $395 = ((((((($gfc)) + 39840|0) + (($396*48)|0)|0)) + 8|0) + ($394)|0); - $397 = HEAP8[$395>>0]|0; - $398 = $397&255; - $399 = $393 | $398; - $400 = $399&255; - HEAP8[$395>>0] = $400; - $401 = (($$0$$i389$i) + ($ptr$01$i388$i))|0; - $402 = ($390|0)>(0); - $$pre$i391$i = HEAP32[$17>>2]|0; - if ($402) { - $$02$i387$i = $390;$396 = $$pre$i391$i;$ptr$01$i388$i = $401; - } else { - $$lcssa404 = $401;$$pre$i391$i$lcssa = $$pre$i391$i; - break; - } - } - $403 = (((((($gfc)) + 39840|0) + (($$pre$i391$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$403>>2] = $$lcssa404; - $404 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4772|0); - $405 = HEAP32[$404>>2]|0; - $406 = (($405|0) / 2)&-1; - $$02$i377$i = 9;$416 = $$pre$i391$i$lcssa;$ptr$01$i378$i = $$lcssa404; - while(1) { - $407 = $ptr$01$i378$i & 7; - $408 = (8 - ($407))|0; - $409 = ($$02$i377$i|0)<($408|0); - $$0$$i379$i = $409 ? $$02$i377$i : $408; - $410 = (($$02$i377$i) - ($$0$$i379$i))|0; - $411 = $406 >> $410; - $412 = (($408) - ($$0$$i379$i))|0; - $413 = $411 << $412; - $414 = $ptr$01$i378$i >> 3; - $415 = ((((((($gfc)) + 39840|0) + (($416*48)|0)|0)) + 8|0) + ($414)|0); - $417 = HEAP8[$415>>0]|0; - $418 = $417&255; - $419 = $413 | $418; - $420 = $419&255; - HEAP8[$415>>0] = $420; - $421 = (($$0$$i379$i) + ($ptr$01$i378$i))|0; - $422 = ($410|0)>(0); - $$pre$i381$i = HEAP32[$17>>2]|0; - if ($422) { - $$02$i377$i = $410;$416 = $$pre$i381$i;$ptr$01$i378$i = $421; - } else { - $$lcssa405 = $421;$$pre$i381$i$lcssa = $$pre$i381$i; - break; - } - } - $423 = (((((($gfc)) + 39840|0) + (($$pre$i381$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$423>>2] = $$lcssa405; - $424 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4780|0); - $425 = HEAP32[$424>>2]|0; - $$02$i367$i = 8;$435 = $$pre$i381$i$lcssa;$ptr$01$i368$i = $$lcssa405; - while(1) { - $426 = $ptr$01$i368$i & 7; - $427 = (8 - ($426))|0; - $428 = ($$02$i367$i|0)<($427|0); - $$0$$i369$i = $428 ? $$02$i367$i : $427; - $429 = (($$02$i367$i) - ($$0$$i369$i))|0; - $430 = $425 >> $429; - $431 = (($427) - ($$0$$i369$i))|0; - $432 = $430 << $431; - $433 = $ptr$01$i368$i >> 3; - $434 = ((((((($gfc)) + 39840|0) + (($435*48)|0)|0)) + 8|0) + ($433)|0); - $436 = HEAP8[$434>>0]|0; - $437 = $436&255; - $438 = $432 | $437; - $439 = $438&255; - HEAP8[$434>>0] = $439; - $440 = (($$0$$i369$i) + ($ptr$01$i368$i))|0; - $441 = ($429|0)>(0); - $$pre$i371$i = HEAP32[$17>>2]|0; - if ($441) { - $$02$i367$i = $429;$435 = $$pre$i371$i;$ptr$01$i368$i = $440; - } else { - $$lcssa406 = $440;$$pre$i371$i$lcssa = $$pre$i371$i; - break; - } - } - $442 = (((((($gfc)) + 39840|0) + (($$pre$i371$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$442>>2] = $$lcssa406; - $443 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4784|0); - $444 = HEAP32[$443>>2]|0; - $$02$i357$i = 4;$454 = $$pre$i371$i$lcssa;$ptr$01$i358$i = $$lcssa406; - while(1) { - $445 = $ptr$01$i358$i & 7; - $446 = (8 - ($445))|0; - $447 = ($$02$i357$i|0)<($446|0); - $$0$$i359$i = $447 ? $$02$i357$i : $446; - $448 = (($$02$i357$i) - ($$0$$i359$i))|0; - $449 = $444 >> $448; - $450 = (($446) - ($$0$$i359$i))|0; - $451 = $449 << $450; - $452 = $ptr$01$i358$i >> 3; - $453 = ((((((($gfc)) + 39840|0) + (($454*48)|0)|0)) + 8|0) + ($452)|0); - $455 = HEAP8[$453>>0]|0; - $456 = $455&255; - $457 = $451 | $456; - $458 = $457&255; - HEAP8[$453>>0] = $458; - $459 = (($$0$$i359$i) + ($ptr$01$i358$i))|0; - $460 = ($448|0)>(0); - $$pre$i361$i = HEAP32[$17>>2]|0; - if ($460) { - $$02$i357$i = $448;$454 = $$pre$i361$i;$ptr$01$i358$i = $459; - } else { - $$lcssa407 = $459;$$pre$i361$i$lcssa = $$pre$i361$i; - break; - } - } - $461 = (((((($gfc)) + 39840|0) + (($$pre$i361$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$461>>2] = $$lcssa407; - $462 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4788|0); - $463 = HEAP32[$462>>2]|0; - $464 = ($463|0)==(0); - if ($464) { - $$02$i267$i = 1;$ptr$01$i268$i = $$lcssa407; - while(1) { - $618 = $ptr$01$i268$i & 7; - $619 = (8 - ($618))|0; - $620 = ($$02$i267$i|0)<($619|0); - $$0$$i269$i = $620 ? $$02$i267$i : $619; - $621 = (($$02$i267$i) - ($$0$$i269$i))|0; - $622 = (($$0$$i269$i) + ($ptr$01$i268$i))|0; - $623 = ($621|0)>(0); - if ($623) { - $$02$i267$i = $621;$ptr$01$i268$i = $622; - } else { - $$lcssa416 = $622; - break; - } - } - HEAP32[$461>>2] = $$lcssa416; - $624 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4796|0); - $625 = HEAP32[$624>>2]|0; - $626 = ($625|0)==(14); - if ($626) { - HEAP32[$624>>2] = 16; - $$pre725$i = HEAP32[$17>>2]|0; - $$phi$trans$insert726$i = (((((($gfc)) + 39840|0) + (($$pre725$i*48)|0)|0)) + 4|0); - $$pre727$i = HEAP32[$$phi$trans$insert726$i>>2]|0; - $1803 = $$pre727$i;$1804 = $$pre725$i;$632 = 16; - } else { - $1803 = $$lcssa416;$1804 = $$pre$i361$i$lcssa;$632 = $625; - } - $$02$i257$i = 5;$637 = $1804;$ptr$01$i258$i = $1803; - while(1) { - $627 = $ptr$01$i258$i & 7; - $628 = (8 - ($627))|0; - $629 = ($$02$i257$i|0)<($628|0); - $$0$$i259$i = $629 ? $$02$i257$i : $628; - $630 = (($$02$i257$i) - ($$0$$i259$i))|0; - $631 = $632 >> $630; - $633 = (($628) - ($$0$$i259$i))|0; - $634 = $631 << $633; - $635 = $ptr$01$i258$i >> 3; - $636 = ((((((($gfc)) + 39840|0) + (($637*48)|0)|0)) + 8|0) + ($635)|0); - $638 = HEAP8[$636>>0]|0; - $639 = $638&255; - $640 = $634 | $639; - $641 = $640&255; - HEAP8[$636>>0] = $641; - $642 = (($$0$$i259$i) + ($ptr$01$i258$i))|0; - $643 = ($630|0)>(0); - $$pre$i261$i = HEAP32[$17>>2]|0; - if ($643) { - $$02$i257$i = $630;$637 = $$pre$i261$i;$ptr$01$i258$i = $642; - } else { - $$lcssa417 = $642;$$pre$i261$i$lcssa = $$pre$i261$i; - break; - } - } - $644 = (((((($gfc)) + 39840|0) + (($$pre$i261$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$644>>2] = $$lcssa417; - $645 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4800|0); - $646 = HEAP32[$645>>2]|0; - $647 = ($646|0)==(14); - if ($647) { - HEAP32[$645>>2] = 16; - $$pre728$i = HEAP32[$17>>2]|0; - $$phi$trans$insert729$i = (((((($gfc)) + 39840|0) + (($$pre728$i*48)|0)|0)) + 4|0); - $$pre730$i = HEAP32[$$phi$trans$insert729$i>>2]|0; - $1805 = $$pre730$i;$1806 = $$pre728$i;$653 = 16; - } else { - $1805 = $$lcssa417;$1806 = $$pre$i261$i$lcssa;$653 = $646; - } - $$02$i247$i = 5;$658 = $1806;$ptr$01$i248$i = $1805; - while(1) { - $648 = $ptr$01$i248$i & 7; - $649 = (8 - ($648))|0; - $650 = ($$02$i247$i|0)<($649|0); - $$0$$i249$i = $650 ? $$02$i247$i : $649; - $651 = (($$02$i247$i) - ($$0$$i249$i))|0; - $652 = $653 >> $651; - $654 = (($649) - ($$0$$i249$i))|0; - $655 = $652 << $654; - $656 = $ptr$01$i248$i >> 3; - $657 = ((((((($gfc)) + 39840|0) + (($658*48)|0)|0)) + 8|0) + ($656)|0); - $659 = HEAP8[$657>>0]|0; - $660 = $659&255; - $661 = $655 | $660; - $662 = $661&255; - HEAP8[$657>>0] = $662; - $663 = (($$0$$i249$i) + ($ptr$01$i248$i))|0; - $664 = ($651|0)>(0); - $$pre$i251$i = HEAP32[$17>>2]|0; - if ($664) { - $$02$i247$i = $651;$658 = $$pre$i251$i;$ptr$01$i248$i = $663; - } else { - $$lcssa418 = $663;$$pre$i251$i$lcssa = $$pre$i251$i; - break; - } - } - $665 = (((((($gfc)) + 39840|0) + (($$pre$i251$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$665>>2] = $$lcssa418; - $666 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4804|0); - $667 = HEAP32[$666>>2]|0; - $668 = ($667|0)==(14); - if ($668) { - HEAP32[$666>>2] = 16; - $$pre731$i = HEAP32[$17>>2]|0; - $$phi$trans$insert732$i = (((((($gfc)) + 39840|0) + (($$pre731$i*48)|0)|0)) + 4|0); - $$pre733$i = HEAP32[$$phi$trans$insert732$i>>2]|0; - $1807 = $$pre733$i;$1808 = $$pre731$i;$674 = 16; - } else { - $1807 = $$lcssa418;$1808 = $$pre$i251$i$lcssa;$674 = $667; - } - $$02$i237$i = 5;$679 = $1808;$ptr$01$i238$i = $1807; - while(1) { - $669 = $ptr$01$i238$i & 7; - $670 = (8 - ($669))|0; - $671 = ($$02$i237$i|0)<($670|0); - $$0$$i239$i = $671 ? $$02$i237$i : $670; - $672 = (($$02$i237$i) - ($$0$$i239$i))|0; - $673 = $674 >> $672; - $675 = (($670) - ($$0$$i239$i))|0; - $676 = $673 << $675; - $677 = $ptr$01$i238$i >> 3; - $678 = ((((((($gfc)) + 39840|0) + (($679*48)|0)|0)) + 8|0) + ($677)|0); - $680 = HEAP8[$678>>0]|0; - $681 = $680&255; - $682 = $676 | $681; - $683 = $682&255; - HEAP8[$678>>0] = $683; - $684 = (($$0$$i239$i) + ($ptr$01$i238$i))|0; - $685 = ($672|0)>(0); - $$pre$i241$i = HEAP32[$17>>2]|0; - if ($685) { - $$02$i237$i = $672;$679 = $$pre$i241$i;$ptr$01$i238$i = $684; - } else { - $$lcssa419 = $684;$$pre$i241$i$lcssa = $$pre$i241$i; - break; - } - } - $686 = (((((($gfc)) + 39840|0) + (($$pre$i241$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$686>>2] = $$lcssa419; - $687 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4824|0); - $688 = HEAP32[$687>>2]|0; - $$02$i227$i = 4;$698 = $$pre$i241$i$lcssa;$ptr$01$i228$i = $$lcssa419; - while(1) { - $689 = $ptr$01$i228$i & 7; - $690 = (8 - ($689))|0; - $691 = ($$02$i227$i|0)<($690|0); - $$0$$i229$i = $691 ? $$02$i227$i : $690; - $692 = (($$02$i227$i) - ($$0$$i229$i))|0; - $693 = $688 >> $692; - $694 = (($690) - ($$0$$i229$i))|0; - $695 = $693 << $694; - $696 = $ptr$01$i228$i >> 3; - $697 = ((((((($gfc)) + 39840|0) + (($698*48)|0)|0)) + 8|0) + ($696)|0); - $699 = HEAP8[$697>>0]|0; - $700 = $699&255; - $701 = $695 | $700; - $702 = $701&255; - HEAP8[$697>>0] = $702; - $703 = (($$0$$i229$i) + ($ptr$01$i228$i))|0; - $704 = ($692|0)>(0); - $$pre$i231$i = HEAP32[$17>>2]|0; - if ($704) { - $$02$i227$i = $692;$698 = $$pre$i231$i;$ptr$01$i228$i = $703; - } else { - $$lcssa420 = $703;$$pre$i231$i$lcssa = $$pre$i231$i; - break; - } - } - $705 = (((((($gfc)) + 39840|0) + (($$pre$i231$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$705>>2] = $$lcssa420; - $706 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4828|0); - $707 = HEAP32[$706>>2]|0; - $$02$i217$i = 3;$717 = $$pre$i231$i$lcssa;$ptr$01$i218$i = $$lcssa420; - while(1) { - $708 = $ptr$01$i218$i & 7; - $709 = (8 - ($708))|0; - $710 = ($$02$i217$i|0)<($709|0); - $$0$$i219$i = $710 ? $$02$i217$i : $709; - $711 = (($$02$i217$i) - ($$0$$i219$i))|0; - $712 = $707 >> $711; - $713 = (($709) - ($$0$$i219$i))|0; - $714 = $712 << $713; - $715 = $ptr$01$i218$i >> 3; - $716 = ((((((($gfc)) + 39840|0) + (($717*48)|0)|0)) + 8|0) + ($715)|0); - $718 = HEAP8[$716>>0]|0; - $719 = $718&255; - $720 = $714 | $719; - $721 = $720&255; - HEAP8[$716>>0] = $721; - $722 = (($$0$$i219$i) + ($ptr$01$i218$i))|0; - $723 = ($711|0)>(0); - $$pre$i221$i = HEAP32[$17>>2]|0; - if ($723) { - $$02$i217$i = $711;$717 = $$pre$i221$i;$ptr$01$i218$i = $722; - } else { - $$lcssa421 = $722;$$pre$i221$i$lcssa = $$pre$i221$i; - break; - } - } - $724 = (((((($gfc)) + 39840|0) + (($$pre$i221$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$724>>2] = $$lcssa421; - $1801 = $$lcssa421;$1802 = $$pre$i221$i$lcssa; - } else { - $$02$i347$i = 1;$474 = $$pre$i361$i$lcssa;$ptr$01$i348$i = $$lcssa407; - while(1) { - $465 = $ptr$01$i348$i & 7; - $466 = (8 - ($465))|0; - $467 = ($$02$i347$i|0)<($466|0); - $$0$$i349$i = $467 ? $$02$i347$i : $466; - $468 = (($$02$i347$i) - ($$0$$i349$i))|0; - $469 = 1 >>> $468; - $470 = (($466) - ($$0$$i349$i))|0; - $471 = $469 << $470; - $472 = $ptr$01$i348$i >> 3; - $473 = ((((((($gfc)) + 39840|0) + (($474*48)|0)|0)) + 8|0) + ($472)|0); - $475 = HEAP8[$473>>0]|0; - $476 = $475&255; - $477 = $471 | $476; - $478 = $477&255; - HEAP8[$473>>0] = $478; - $479 = (($$0$$i349$i) + ($ptr$01$i348$i))|0; - $480 = ($468|0)>(0); - $$pre$i351$i = HEAP32[$17>>2]|0; - if ($480) { - $$02$i347$i = $468;$474 = $$pre$i351$i;$ptr$01$i348$i = $479; - } else { - $$lcssa408 = $479;$$pre$i351$i$lcssa = $$pre$i351$i; - break; - } - } - $481 = (((((($gfc)) + 39840|0) + (($$pre$i351$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$481>>2] = $$lcssa408; - $482 = HEAP32[$462>>2]|0; - $$02$i337$i = 2;$492 = $$pre$i351$i$lcssa;$ptr$01$i338$i = $$lcssa408; - while(1) { - $483 = $ptr$01$i338$i & 7; - $484 = (8 - ($483))|0; - $485 = ($$02$i337$i|0)<($484|0); - $$0$$i339$i = $485 ? $$02$i337$i : $484; - $486 = (($$02$i337$i) - ($$0$$i339$i))|0; - $487 = $482 >> $486; - $488 = (($484) - ($$0$$i339$i))|0; - $489 = $487 << $488; - $490 = $ptr$01$i338$i >> 3; - $491 = ((((((($gfc)) + 39840|0) + (($492*48)|0)|0)) + 8|0) + ($490)|0); - $493 = HEAP8[$491>>0]|0; - $494 = $493&255; - $495 = $489 | $494; - $496 = $495&255; - HEAP8[$491>>0] = $496; - $497 = (($$0$$i339$i) + ($ptr$01$i338$i))|0; - $498 = ($486|0)>(0); - $$pre$i341$i = HEAP32[$17>>2]|0; - if ($498) { - $$02$i337$i = $486;$492 = $$pre$i341$i;$ptr$01$i338$i = $497; - } else { - $$lcssa409 = $497;$$pre$i341$i$lcssa = $$pre$i341$i; - break; - } - } - $499 = (((((($gfc)) + 39840|0) + (($$pre$i341$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$499>>2] = $$lcssa409; - $500 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4792|0); - $501 = HEAP32[$500>>2]|0; - $$02$i327$i = 1;$511 = $$pre$i341$i$lcssa;$ptr$01$i328$i = $$lcssa409; - while(1) { - $502 = $ptr$01$i328$i & 7; - $503 = (8 - ($502))|0; - $504 = ($$02$i327$i|0)<($503|0); - $$0$$i329$i = $504 ? $$02$i327$i : $503; - $505 = (($$02$i327$i) - ($$0$$i329$i))|0; - $506 = $501 >> $505; - $507 = (($503) - ($$0$$i329$i))|0; - $508 = $506 << $507; - $509 = $ptr$01$i328$i >> 3; - $510 = ((((((($gfc)) + 39840|0) + (($511*48)|0)|0)) + 8|0) + ($509)|0); - $512 = HEAP8[$510>>0]|0; - $513 = $512&255; - $514 = $508 | $513; - $515 = $514&255; - HEAP8[$510>>0] = $515; - $516 = (($$0$$i329$i) + ($ptr$01$i328$i))|0; - $517 = ($505|0)>(0); - $$pre$i331$i = HEAP32[$17>>2]|0; - if ($517) { - $$02$i327$i = $505;$511 = $$pre$i331$i;$ptr$01$i328$i = $516; - } else { - $$lcssa410 = $516;$$pre$i331$i$lcssa = $$pre$i331$i; - break; - } - } - $518 = (((((($gfc)) + 39840|0) + (($$pre$i331$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$518>>2] = $$lcssa410; - $519 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4796|0); - $520 = HEAP32[$519>>2]|0; - $521 = ($520|0)==(14); - if ($521) { - HEAP32[$519>>2] = 16; - $$pre719$i = HEAP32[$17>>2]|0; - $$phi$trans$insert720$i = (((((($gfc)) + 39840|0) + (($$pre719$i*48)|0)|0)) + 4|0); - $$pre721$i = HEAP32[$$phi$trans$insert720$i>>2]|0; - $1797 = $$pre721$i;$1798 = $$pre719$i;$527 = 16; - } else { - $1797 = $$lcssa410;$1798 = $$pre$i331$i$lcssa;$527 = $520; - } - $$02$i317$i = 5;$532 = $1798;$ptr$01$i318$i = $1797; - while(1) { - $522 = $ptr$01$i318$i & 7; - $523 = (8 - ($522))|0; - $524 = ($$02$i317$i|0)<($523|0); - $$0$$i319$i = $524 ? $$02$i317$i : $523; - $525 = (($$02$i317$i) - ($$0$$i319$i))|0; - $526 = $527 >> $525; - $528 = (($523) - ($$0$$i319$i))|0; - $529 = $526 << $528; - $530 = $ptr$01$i318$i >> 3; - $531 = ((((((($gfc)) + 39840|0) + (($532*48)|0)|0)) + 8|0) + ($530)|0); - $533 = HEAP8[$531>>0]|0; - $534 = $533&255; - $535 = $529 | $534; - $536 = $535&255; - HEAP8[$531>>0] = $536; - $537 = (($$0$$i319$i) + ($ptr$01$i318$i))|0; - $538 = ($525|0)>(0); - $$pre$i321$i = HEAP32[$17>>2]|0; - if ($538) { - $$02$i317$i = $525;$532 = $$pre$i321$i;$ptr$01$i318$i = $537; - } else { - $$lcssa411 = $537;$$pre$i321$i$lcssa = $$pre$i321$i; - break; - } - } - $539 = (((((($gfc)) + 39840|0) + (($$pre$i321$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$539>>2] = $$lcssa411; - $540 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4800|0); - $541 = HEAP32[$540>>2]|0; - $542 = ($541|0)==(14); - if ($542) { - HEAP32[$540>>2] = 16; - $$pre722$i = HEAP32[$17>>2]|0; - $$phi$trans$insert723$i = (((((($gfc)) + 39840|0) + (($$pre722$i*48)|0)|0)) + 4|0); - $$pre724$i = HEAP32[$$phi$trans$insert723$i>>2]|0; - $1799 = $$pre724$i;$1800 = $$pre722$i;$548 = 16; - } else { - $1799 = $$lcssa411;$1800 = $$pre$i321$i$lcssa;$548 = $541; - } - $$02$i307$i = 5;$553 = $1800;$ptr$01$i308$i = $1799; - while(1) { - $543 = $ptr$01$i308$i & 7; - $544 = (8 - ($543))|0; - $545 = ($$02$i307$i|0)<($544|0); - $$0$$i309$i = $545 ? $$02$i307$i : $544; - $546 = (($$02$i307$i) - ($$0$$i309$i))|0; - $547 = $548 >> $546; - $549 = (($544) - ($$0$$i309$i))|0; - $550 = $547 << $549; - $551 = $ptr$01$i308$i >> 3; - $552 = ((((((($gfc)) + 39840|0) + (($553*48)|0)|0)) + 8|0) + ($551)|0); - $554 = HEAP8[$552>>0]|0; - $555 = $554&255; - $556 = $550 | $555; - $557 = $556&255; - HEAP8[$552>>0] = $557; - $558 = (($$0$$i309$i) + ($ptr$01$i308$i))|0; - $559 = ($546|0)>(0); - $$pre$i311$i = HEAP32[$17>>2]|0; - if ($559) { - $$02$i307$i = $546;$553 = $$pre$i311$i;$ptr$01$i308$i = $558; - } else { - $$lcssa412 = $558;$$pre$i311$i$lcssa = $$pre$i311$i; - break; - } - } - $560 = (((((($gfc)) + 39840|0) + (($$pre$i311$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$560>>2] = $$lcssa412; - $561 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4808|0); - $562 = HEAP32[$561>>2]|0; - $$02$i297$i = 3;$572 = $$pre$i311$i$lcssa;$ptr$01$i298$i = $$lcssa412; - while(1) { - $563 = $ptr$01$i298$i & 7; - $564 = (8 - ($563))|0; - $565 = ($$02$i297$i|0)<($564|0); - $$0$$i299$i = $565 ? $$02$i297$i : $564; - $566 = (($$02$i297$i) - ($$0$$i299$i))|0; - $567 = $562 >> $566; - $568 = (($564) - ($$0$$i299$i))|0; - $569 = $567 << $568; - $570 = $ptr$01$i298$i >> 3; - $571 = ((((((($gfc)) + 39840|0) + (($572*48)|0)|0)) + 8|0) + ($570)|0); - $573 = HEAP8[$571>>0]|0; - $574 = $573&255; - $575 = $569 | $574; - $576 = $575&255; - HEAP8[$571>>0] = $576; - $577 = (($$0$$i299$i) + ($ptr$01$i298$i))|0; - $578 = ($566|0)>(0); - $$pre$i301$i = HEAP32[$17>>2]|0; - if ($578) { - $$02$i297$i = $566;$572 = $$pre$i301$i;$ptr$01$i298$i = $577; - } else { - $$lcssa413 = $577;$$pre$i301$i$lcssa = $$pre$i301$i; - break; - } - } - $579 = (((((($gfc)) + 39840|0) + (($$pre$i301$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$579>>2] = $$lcssa413; - $580 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4812|0); - $581 = HEAP32[$580>>2]|0; - $$02$i287$i = 3;$591 = $$pre$i301$i$lcssa;$ptr$01$i288$i = $$lcssa413; - while(1) { - $582 = $ptr$01$i288$i & 7; - $583 = (8 - ($582))|0; - $584 = ($$02$i287$i|0)<($583|0); - $$0$$i289$i = $584 ? $$02$i287$i : $583; - $585 = (($$02$i287$i) - ($$0$$i289$i))|0; - $586 = $581 >> $585; - $587 = (($583) - ($$0$$i289$i))|0; - $588 = $586 << $587; - $589 = $ptr$01$i288$i >> 3; - $590 = ((((((($gfc)) + 39840|0) + (($591*48)|0)|0)) + 8|0) + ($589)|0); - $592 = HEAP8[$590>>0]|0; - $593 = $592&255; - $594 = $588 | $593; - $595 = $594&255; - HEAP8[$590>>0] = $595; - $596 = (($$0$$i289$i) + ($ptr$01$i288$i))|0; - $597 = ($585|0)>(0); - $$pre$i291$i = HEAP32[$17>>2]|0; - if ($597) { - $$02$i287$i = $585;$591 = $$pre$i291$i;$ptr$01$i288$i = $596; - } else { - $$lcssa414 = $596;$$pre$i291$i$lcssa = $$pre$i291$i; - break; - } - } - $598 = (((((($gfc)) + 39840|0) + (($$pre$i291$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$598>>2] = $$lcssa414; - $599 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4816|0); - $600 = HEAP32[$599>>2]|0; - $$02$i277$i = 3;$610 = $$pre$i291$i$lcssa;$ptr$01$i278$i = $$lcssa414; - while(1) { - $601 = $ptr$01$i278$i & 7; - $602 = (8 - ($601))|0; - $603 = ($$02$i277$i|0)<($602|0); - $$0$$i279$i = $603 ? $$02$i277$i : $602; - $604 = (($$02$i277$i) - ($$0$$i279$i))|0; - $605 = $600 >> $604; - $606 = (($602) - ($$0$$i279$i))|0; - $607 = $605 << $606; - $608 = $ptr$01$i278$i >> 3; - $609 = ((((((($gfc)) + 39840|0) + (($610*48)|0)|0)) + 8|0) + ($608)|0); - $611 = HEAP8[$609>>0]|0; - $612 = $611&255; - $613 = $607 | $612; - $614 = $613&255; - HEAP8[$609>>0] = $614; - $615 = (($$0$$i279$i) + ($ptr$01$i278$i))|0; - $616 = ($604|0)>(0); - $$pre$i281$i = HEAP32[$17>>2]|0; - if ($616) { - $$02$i277$i = $604;$610 = $$pre$i281$i;$ptr$01$i278$i = $615; - } else { - $$lcssa415 = $615;$$pre$i281$i$lcssa = $$pre$i281$i; - break; - } - } - $617 = (((((($gfc)) + 39840|0) + (($$pre$i281$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$617>>2] = $$lcssa415; - $1801 = $$lcssa415;$1802 = $$pre$i281$i$lcssa; - } - $725 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4832|0); - $726 = HEAP32[$725>>2]|0; - $$02$i207$i = 1;$736 = $1802;$ptr$01$i208$i = $1801; - while(1) { - $727 = $ptr$01$i208$i & 7; - $728 = (8 - ($727))|0; - $729 = ($$02$i207$i|0)<($728|0); - $$0$$i209$i = $729 ? $$02$i207$i : $728; - $730 = (($$02$i207$i) - ($$0$$i209$i))|0; - $731 = $726 >> $730; - $732 = (($728) - ($$0$$i209$i))|0; - $733 = $731 << $732; - $734 = $ptr$01$i208$i >> 3; - $735 = ((((((($gfc)) + 39840|0) + (($736*48)|0)|0)) + 8|0) + ($734)|0); - $737 = HEAP8[$735>>0]|0; - $738 = $737&255; - $739 = $733 | $738; - $740 = $739&255; - HEAP8[$735>>0] = $740; - $741 = (($$0$$i209$i) + ($ptr$01$i208$i))|0; - $742 = ($730|0)>(0); - $$pre$i211$i = HEAP32[$17>>2]|0; - if ($742) { - $$02$i207$i = $730;$736 = $$pre$i211$i;$ptr$01$i208$i = $741; - } else { - $$lcssa422 = $741;$$pre$i211$i$lcssa = $$pre$i211$i; - break; - } - } - $743 = (((((($gfc)) + 39840|0) + (($$pre$i211$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$743>>2] = $$lcssa422; - $744 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4836|0); - $745 = HEAP32[$744>>2]|0; - $$02$i197$i = 1;$755 = $$pre$i211$i$lcssa;$ptr$01$i198$i = $$lcssa422; - while(1) { - $746 = $ptr$01$i198$i & 7; - $747 = (8 - ($746))|0; - $748 = ($$02$i197$i|0)<($747|0); - $$0$$i199$i = $748 ? $$02$i197$i : $747; - $749 = (($$02$i197$i) - ($$0$$i199$i))|0; - $750 = $745 >> $749; - $751 = (($747) - ($$0$$i199$i))|0; - $752 = $750 << $751; - $753 = $ptr$01$i198$i >> 3; - $754 = ((((((($gfc)) + 39840|0) + (($755*48)|0)|0)) + 8|0) + ($753)|0); - $756 = HEAP8[$754>>0]|0; - $757 = $756&255; - $758 = $752 | $757; - $759 = $758&255; - HEAP8[$754>>0] = $759; - $760 = (($$0$$i199$i) + ($ptr$01$i198$i))|0; - $761 = ($749|0)>(0); - $$pre$i201$i = HEAP32[$17>>2]|0; - if ($761) { - $$02$i197$i = $749;$755 = $$pre$i201$i;$ptr$01$i198$i = $760; - } else { - $$lcssa423 = $760;$$pre$i201$i$lcssa = $$pre$i201$i; - break; - } - } - $762 = (((((($gfc)) + 39840|0) + (($$pre$i201$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$762>>2] = $$lcssa423; - $763 = ((((((($gfc)) + 304|0) + (($gr$0634$i*10504)|0)|0) + (($ch$1632$i*5252)|0)|0)) + 4840|0); - $764 = HEAP32[$763>>2]|0; - $$02$i187$i = 1;$774 = $$pre$i201$i$lcssa;$ptr$01$i188$i = $$lcssa423; - while(1) { - $765 = $ptr$01$i188$i & 7; - $766 = (8 - ($765))|0; - $767 = ($$02$i187$i|0)<($766|0); - $$0$$i189$i = $767 ? $$02$i187$i : $766; - $768 = (($$02$i187$i) - ($$0$$i189$i))|0; - $769 = $764 >> $768; - $770 = (($766) - ($$0$$i189$i))|0; - $771 = $769 << $770; - $772 = $ptr$01$i188$i >> 3; - $773 = ((((((($gfc)) + 39840|0) + (($774*48)|0)|0)) + 8|0) + ($772)|0); - $775 = HEAP8[$773>>0]|0; - $776 = $775&255; - $777 = $771 | $776; - $778 = $777&255; - HEAP8[$773>>0] = $778; - $779 = (($$0$$i189$i) + ($ptr$01$i188$i))|0; - $780 = ($768|0)>(0); - $$pre$i191$i = HEAP32[$17>>2]|0; - if ($780) { - $$02$i187$i = $768;$774 = $$pre$i191$i;$ptr$01$i188$i = $779; - } else { - $$lcssa424 = $779;$$pre$i191$i$lcssa = $$pre$i191$i; - break; - } - } - $781 = (((((($gfc)) + 39840|0) + (($$pre$i191$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$781>>2] = $$lcssa424; - $782 = (($ch$1632$i) + 1)|0; - $783 = HEAP32[$317>>2]|0; - $784 = ($782|0)<($783|0); - if ($784) { - $1795 = $$lcssa424;$1796 = $$pre$i191$i$lcssa;$ch$1632$i = $782; - } else { - $1793 = $$pre$i191$i$lcssa;$1794 = $783; - break; - } - } - } else { - $1793 = $381;$1794 = $379; - } - $785 = (($gr$0634$i) + 1)|0; - $exitcond$i = ($785|0)==(2); - if ($exitcond$i) { - $1213 = $1793; - break; - } else { - $379 = $1794;$381 = $1793;$gr$0634$i = $785; - } - } - } else { - $$02$i177$i = 8;$795 = $$pre$i451$i$lcssa;$ptr$01$i178$i = $1789; - while(1) { - $786 = $ptr$01$i178$i & 7; - $787 = (8 - ($786))|0; - $788 = ($$02$i177$i|0)<($787|0); - $$0$$i179$i = $788 ? $$02$i177$i : $787; - $789 = (($$02$i177$i) - ($$0$$i179$i))|0; - $790 = $299 >> $789; - $791 = (($787) - ($$0$$i179$i))|0; - $792 = $790 << $791; - $793 = $ptr$01$i178$i >> 3; - $794 = ((((((($gfc)) + 39840|0) + (($795*48)|0)|0)) + 8|0) + ($793)|0); - $796 = HEAP8[$794>>0]|0; - $797 = $796&255; - $798 = $792 | $797; - $799 = $798&255; - HEAP8[$794>>0] = $799; - $800 = (($$0$$i179$i) + ($ptr$01$i178$i))|0; - $801 = ($789|0)>(0); - $$pre$i181$i = HEAP32[$17>>2]|0; - if ($801) { - $$02$i177$i = $789;$795 = $$pre$i181$i;$ptr$01$i178$i = $800; - } else { - $$lcssa456 = $800;$$pre$i181$i$lcssa = $$pre$i181$i; - break; - } - } - $802 = (((((($gfc)) + 39840|0) + (($$pre$i181$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$802>>2] = $$lcssa456; - $803 = ((($gfc)) + 21316|0); - $804 = HEAP32[$803>>2]|0; - $805 = ((($gfc)) + 72|0); - $806 = HEAP32[$805>>2]|0; - $807 = ($806|0)>(0); - if ($807) { - $$02$i169$i = $806;$817 = $$pre$i181$i$lcssa;$ptr$01$i170$i = $$lcssa456; - } else { - HEAP32[$802>>2] = $$lcssa456; - $1213 = $$pre$i181$i$lcssa; - break; - } - while(1) { - $808 = $ptr$01$i170$i & 7; - $809 = (8 - ($808))|0; - $810 = ($$02$i169$i|0)<($809|0); - $$0$$i171$i = $810 ? $$02$i169$i : $809; - $811 = (($$02$i169$i) - ($$0$$i171$i))|0; - $812 = $804 >> $811; - $813 = (($809) - ($$0$$i171$i))|0; - $814 = $812 << $813; - $815 = $ptr$01$i170$i >> 3; - $816 = ((((((($gfc)) + 39840|0) + (($817*48)|0)|0)) + 8|0) + ($815)|0); - $818 = HEAP8[$816>>0]|0; - $819 = $818&255; - $820 = $814 | $819; - $821 = $820&255; - HEAP8[$816>>0] = $821; - $822 = (($$0$$i171$i) + ($ptr$01$i170$i))|0; - $823 = ($811|0)>(0); - $$pre$i173$i = HEAP32[$17>>2]|0; - if ($823) { - $$02$i169$i = $811;$817 = $$pre$i173$i;$ptr$01$i170$i = $822; - } else { - $$lcssa455 = $822;$$pre$i173$i$lcssa = $$pre$i173$i; - break; - } - } - $$pre$i = HEAP32[$805>>2]|0; - $824 = (((((($gfc)) + 39840|0) + (($$pre$i173$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$824>>2] = $$lcssa455; - $825 = ($$pre$i|0)>(0); - if ($825) { - $1809 = $$lcssa455;$1810 = $$pre$i173$i$lcssa;$ch$2638$i = 0; - while(1) { - $826 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4768|0); - $827 = HEAP32[$826>>2]|0; - $828 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4844|0); - $829 = HEAP32[$828>>2]|0; - $830 = (($829) + ($827))|0; - $$02$i161$i = 12;$840 = $1810;$ptr$01$i162$i = $1809; - while(1) { - $831 = $ptr$01$i162$i & 7; - $832 = (8 - ($831))|0; - $833 = ($$02$i161$i|0)<($832|0); - $$0$$i163$i = $833 ? $$02$i161$i : $832; - $834 = (($$02$i161$i) - ($$0$$i163$i))|0; - $835 = $830 >> $834; - $836 = (($832) - ($$0$$i163$i))|0; - $837 = $835 << $836; - $838 = $ptr$01$i162$i >> 3; - $839 = ((((((($gfc)) + 39840|0) + (($840*48)|0)|0)) + 8|0) + ($838)|0); - $841 = HEAP8[$839>>0]|0; - $842 = $841&255; - $843 = $837 | $842; - $844 = $843&255; - HEAP8[$839>>0] = $844; - $845 = (($$0$$i163$i) + ($ptr$01$i162$i))|0; - $846 = ($834|0)>(0); - $$pre$i165$i = HEAP32[$17>>2]|0; - if ($846) { - $$02$i161$i = $834;$840 = $$pre$i165$i;$ptr$01$i162$i = $845; - } else { - $$lcssa435 = $845;$$pre$i165$i$lcssa = $$pre$i165$i; - break; - } - } - $847 = (((((($gfc)) + 39840|0) + (($$pre$i165$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$847>>2] = $$lcssa435; - $848 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4772|0); - $849 = HEAP32[$848>>2]|0; - $850 = (($849|0) / 2)&-1; - $$02$i153$i = 9;$860 = $$pre$i165$i$lcssa;$ptr$01$i154$i = $$lcssa435; - while(1) { - $851 = $ptr$01$i154$i & 7; - $852 = (8 - ($851))|0; - $853 = ($$02$i153$i|0)<($852|0); - $$0$$i155$i = $853 ? $$02$i153$i : $852; - $854 = (($$02$i153$i) - ($$0$$i155$i))|0; - $855 = $850 >> $854; - $856 = (($852) - ($$0$$i155$i))|0; - $857 = $855 << $856; - $858 = $ptr$01$i154$i >> 3; - $859 = ((((((($gfc)) + 39840|0) + (($860*48)|0)|0)) + 8|0) + ($858)|0); - $861 = HEAP8[$859>>0]|0; - $862 = $861&255; - $863 = $857 | $862; - $864 = $863&255; - HEAP8[$859>>0] = $864; - $865 = (($$0$$i155$i) + ($ptr$01$i154$i))|0; - $866 = ($854|0)>(0); - $$pre$i157$i = HEAP32[$17>>2]|0; - if ($866) { - $$02$i153$i = $854;$860 = $$pre$i157$i;$ptr$01$i154$i = $865; - } else { - $$lcssa436 = $865;$$pre$i157$i$lcssa = $$pre$i157$i; - break; - } - } - $867 = (((((($gfc)) + 39840|0) + (($$pre$i157$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$867>>2] = $$lcssa436; - $868 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4780|0); - $869 = HEAP32[$868>>2]|0; - $$02$i145$i = 8;$879 = $$pre$i157$i$lcssa;$ptr$01$i146$i = $$lcssa436; - while(1) { - $870 = $ptr$01$i146$i & 7; - $871 = (8 - ($870))|0; - $872 = ($$02$i145$i|0)<($871|0); - $$0$$i147$i = $872 ? $$02$i145$i : $871; - $873 = (($$02$i145$i) - ($$0$$i147$i))|0; - $874 = $869 >> $873; - $875 = (($871) - ($$0$$i147$i))|0; - $876 = $874 << $875; - $877 = $ptr$01$i146$i >> 3; - $878 = ((((((($gfc)) + 39840|0) + (($879*48)|0)|0)) + 8|0) + ($877)|0); - $880 = HEAP8[$878>>0]|0; - $881 = $880&255; - $882 = $876 | $881; - $883 = $882&255; - HEAP8[$878>>0] = $883; - $884 = (($$0$$i147$i) + ($ptr$01$i146$i))|0; - $885 = ($873|0)>(0); - $$pre$i149$i = HEAP32[$17>>2]|0; - if ($885) { - $$02$i145$i = $873;$879 = $$pre$i149$i;$ptr$01$i146$i = $884; - } else { - $$lcssa437 = $884;$$pre$i149$i$lcssa = $$pre$i149$i; - break; - } - } - $886 = (((((($gfc)) + 39840|0) + (($$pre$i149$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$886>>2] = $$lcssa437; - $887 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4784|0); - $888 = HEAP32[$887>>2]|0; - $$02$i137$i = 9;$898 = $$pre$i149$i$lcssa;$ptr$01$i138$i = $$lcssa437; - while(1) { - $889 = $ptr$01$i138$i & 7; - $890 = (8 - ($889))|0; - $891 = ($$02$i137$i|0)<($890|0); - $$0$$i139$i = $891 ? $$02$i137$i : $890; - $892 = (($$02$i137$i) - ($$0$$i139$i))|0; - $893 = $888 >> $892; - $894 = (($890) - ($$0$$i139$i))|0; - $895 = $893 << $894; - $896 = $ptr$01$i138$i >> 3; - $897 = ((((((($gfc)) + 39840|0) + (($898*48)|0)|0)) + 8|0) + ($896)|0); - $899 = HEAP8[$897>>0]|0; - $900 = $899&255; - $901 = $895 | $900; - $902 = $901&255; - HEAP8[$897>>0] = $902; - $903 = (($$0$$i139$i) + ($ptr$01$i138$i))|0; - $904 = ($892|0)>(0); - $$pre$i141$i = HEAP32[$17>>2]|0; - if ($904) { - $$02$i137$i = $892;$898 = $$pre$i141$i;$ptr$01$i138$i = $903; - } else { - $$lcssa438 = $903;$$pre$i141$i$lcssa = $$pre$i141$i; - break; - } - } - $905 = (((((($gfc)) + 39840|0) + (($$pre$i141$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$905>>2] = $$lcssa438; - $906 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4788|0); - $907 = HEAP32[$906>>2]|0; - $908 = ($907|0)==(0); - if ($908) { - $$02$i65$i = 1;$ptr$01$i66$i = $$lcssa438; - while(1) { - $1062 = $ptr$01$i66$i & 7; - $1063 = (8 - ($1062))|0; - $1064 = ($$02$i65$i|0)<($1063|0); - $$0$$i67$i = $1064 ? $$02$i65$i : $1063; - $1065 = (($$02$i65$i) - ($$0$$i67$i))|0; - $1066 = (($$0$$i67$i) + ($ptr$01$i66$i))|0; - $1067 = ($1065|0)>(0); - if ($1067) { - $$02$i65$i = $1065;$ptr$01$i66$i = $1066; - } else { - $$lcssa447 = $1066; - break; - } - } - HEAP32[$905>>2] = $$lcssa447; - $1068 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4796|0); - $1069 = HEAP32[$1068>>2]|0; - $1070 = ($1069|0)==(14); - if ($1070) { - HEAP32[$1068>>2] = 16; - $$pre710$i = HEAP32[$17>>2]|0; - $$phi$trans$insert711$i = (((((($gfc)) + 39840|0) + (($$pre710$i*48)|0)|0)) + 4|0); - $$pre712$i = HEAP32[$$phi$trans$insert711$i>>2]|0; - $1076 = 16;$1817 = $$pre712$i;$1818 = $$pre710$i; - } else { - $1076 = $1069;$1817 = $$lcssa447;$1818 = $$pre$i141$i$lcssa; - } - $$02$i57$i = 5;$1081 = $1818;$ptr$01$i58$i = $1817; - while(1) { - $1071 = $ptr$01$i58$i & 7; - $1072 = (8 - ($1071))|0; - $1073 = ($$02$i57$i|0)<($1072|0); - $$0$$i59$i = $1073 ? $$02$i57$i : $1072; - $1074 = (($$02$i57$i) - ($$0$$i59$i))|0; - $1075 = $1076 >> $1074; - $1077 = (($1072) - ($$0$$i59$i))|0; - $1078 = $1075 << $1077; - $1079 = $ptr$01$i58$i >> 3; - $1080 = ((((((($gfc)) + 39840|0) + (($1081*48)|0)|0)) + 8|0) + ($1079)|0); - $1082 = HEAP8[$1080>>0]|0; - $1083 = $1082&255; - $1084 = $1078 | $1083; - $1085 = $1084&255; - HEAP8[$1080>>0] = $1085; - $1086 = (($$0$$i59$i) + ($ptr$01$i58$i))|0; - $1087 = ($1074|0)>(0); - $$pre$i61$i = HEAP32[$17>>2]|0; - if ($1087) { - $$02$i57$i = $1074;$1081 = $$pre$i61$i;$ptr$01$i58$i = $1086; - } else { - $$lcssa448 = $1086;$$pre$i61$i$lcssa = $$pre$i61$i; - break; - } - } - $1088 = (((((($gfc)) + 39840|0) + (($$pre$i61$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1088>>2] = $$lcssa448; - $1089 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4800|0); - $1090 = HEAP32[$1089>>2]|0; - $1091 = ($1090|0)==(14); - if ($1091) { - HEAP32[$1089>>2] = 16; - $$pre713$i = HEAP32[$17>>2]|0; - $$phi$trans$insert714$i = (((((($gfc)) + 39840|0) + (($$pre713$i*48)|0)|0)) + 4|0); - $$pre715$i = HEAP32[$$phi$trans$insert714$i>>2]|0; - $1097 = 16;$1819 = $$pre715$i;$1820 = $$pre713$i; - } else { - $1097 = $1090;$1819 = $$lcssa448;$1820 = $$pre$i61$i$lcssa; - } - $$02$i49$i = 5;$1102 = $1820;$ptr$01$i50$i = $1819; - while(1) { - $1092 = $ptr$01$i50$i & 7; - $1093 = (8 - ($1092))|0; - $1094 = ($$02$i49$i|0)<($1093|0); - $$0$$i51$i = $1094 ? $$02$i49$i : $1093; - $1095 = (($$02$i49$i) - ($$0$$i51$i))|0; - $1096 = $1097 >> $1095; - $1098 = (($1093) - ($$0$$i51$i))|0; - $1099 = $1096 << $1098; - $1100 = $ptr$01$i50$i >> 3; - $1101 = ((((((($gfc)) + 39840|0) + (($1102*48)|0)|0)) + 8|0) + ($1100)|0); - $1103 = HEAP8[$1101>>0]|0; - $1104 = $1103&255; - $1105 = $1099 | $1104; - $1106 = $1105&255; - HEAP8[$1101>>0] = $1106; - $1107 = (($$0$$i51$i) + ($ptr$01$i50$i))|0; - $1108 = ($1095|0)>(0); - $$pre$i53$i = HEAP32[$17>>2]|0; - if ($1108) { - $$02$i49$i = $1095;$1102 = $$pre$i53$i;$ptr$01$i50$i = $1107; - } else { - $$lcssa449 = $1107;$$pre$i53$i$lcssa = $$pre$i53$i; - break; - } - } - $1109 = (((((($gfc)) + 39840|0) + (($$pre$i53$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1109>>2] = $$lcssa449; - $1110 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4804|0); - $1111 = HEAP32[$1110>>2]|0; - $1112 = ($1111|0)==(14); - if ($1112) { - HEAP32[$1110>>2] = 16; - $$pre716$i = HEAP32[$17>>2]|0; - $$phi$trans$insert717$i = (((((($gfc)) + 39840|0) + (($$pre716$i*48)|0)|0)) + 4|0); - $$pre718$i = HEAP32[$$phi$trans$insert717$i>>2]|0; - $1118 = 16;$1821 = $$pre718$i;$1822 = $$pre716$i; - } else { - $1118 = $1111;$1821 = $$lcssa449;$1822 = $$pre$i53$i$lcssa; - } - $$02$i41$i = 5;$1123 = $1822;$ptr$01$i42$i = $1821; - while(1) { - $1113 = $ptr$01$i42$i & 7; - $1114 = (8 - ($1113))|0; - $1115 = ($$02$i41$i|0)<($1114|0); - $$0$$i43$i = $1115 ? $$02$i41$i : $1114; - $1116 = (($$02$i41$i) - ($$0$$i43$i))|0; - $1117 = $1118 >> $1116; - $1119 = (($1114) - ($$0$$i43$i))|0; - $1120 = $1117 << $1119; - $1121 = $ptr$01$i42$i >> 3; - $1122 = ((((((($gfc)) + 39840|0) + (($1123*48)|0)|0)) + 8|0) + ($1121)|0); - $1124 = HEAP8[$1122>>0]|0; - $1125 = $1124&255; - $1126 = $1120 | $1125; - $1127 = $1126&255; - HEAP8[$1122>>0] = $1127; - $1128 = (($$0$$i43$i) + ($ptr$01$i42$i))|0; - $1129 = ($1116|0)>(0); - $$pre$i45$i = HEAP32[$17>>2]|0; - if ($1129) { - $$02$i41$i = $1116;$1123 = $$pre$i45$i;$ptr$01$i42$i = $1128; - } else { - $$lcssa450 = $1128;$$pre$i45$i$lcssa = $$pre$i45$i; - break; - } - } - $1130 = (((((($gfc)) + 39840|0) + (($$pre$i45$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1130>>2] = $$lcssa450; - $1131 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4824|0); - $1132 = HEAP32[$1131>>2]|0; - $$02$i33$i = 4;$1142 = $$pre$i45$i$lcssa;$ptr$01$i34$i = $$lcssa450; - while(1) { - $1133 = $ptr$01$i34$i & 7; - $1134 = (8 - ($1133))|0; - $1135 = ($$02$i33$i|0)<($1134|0); - $$0$$i35$i = $1135 ? $$02$i33$i : $1134; - $1136 = (($$02$i33$i) - ($$0$$i35$i))|0; - $1137 = $1132 >> $1136; - $1138 = (($1134) - ($$0$$i35$i))|0; - $1139 = $1137 << $1138; - $1140 = $ptr$01$i34$i >> 3; - $1141 = ((((((($gfc)) + 39840|0) + (($1142*48)|0)|0)) + 8|0) + ($1140)|0); - $1143 = HEAP8[$1141>>0]|0; - $1144 = $1143&255; - $1145 = $1139 | $1144; - $1146 = $1145&255; - HEAP8[$1141>>0] = $1146; - $1147 = (($$0$$i35$i) + ($ptr$01$i34$i))|0; - $1148 = ($1136|0)>(0); - $$pre$i37$i = HEAP32[$17>>2]|0; - if ($1148) { - $$02$i33$i = $1136;$1142 = $$pre$i37$i;$ptr$01$i34$i = $1147; - } else { - $$lcssa451 = $1147;$$pre$i37$i$lcssa = $$pre$i37$i; - break; - } - } - $1149 = (((((($gfc)) + 39840|0) + (($$pre$i37$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1149>>2] = $$lcssa451; - $1150 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4828|0); - $1151 = HEAP32[$1150>>2]|0; - $$02$i25$i = 3;$1161 = $$pre$i37$i$lcssa;$ptr$01$i26$i = $$lcssa451; - while(1) { - $1152 = $ptr$01$i26$i & 7; - $1153 = (8 - ($1152))|0; - $1154 = ($$02$i25$i|0)<($1153|0); - $$0$$i27$i = $1154 ? $$02$i25$i : $1153; - $1155 = (($$02$i25$i) - ($$0$$i27$i))|0; - $1156 = $1151 >> $1155; - $1157 = (($1153) - ($$0$$i27$i))|0; - $1158 = $1156 << $1157; - $1159 = $ptr$01$i26$i >> 3; - $1160 = ((((((($gfc)) + 39840|0) + (($1161*48)|0)|0)) + 8|0) + ($1159)|0); - $1162 = HEAP8[$1160>>0]|0; - $1163 = $1162&255; - $1164 = $1158 | $1163; - $1165 = $1164&255; - HEAP8[$1160>>0] = $1165; - $1166 = (($$0$$i27$i) + ($ptr$01$i26$i))|0; - $1167 = ($1155|0)>(0); - $$pre$i29$i = HEAP32[$17>>2]|0; - if ($1167) { - $$02$i25$i = $1155;$1161 = $$pre$i29$i;$ptr$01$i26$i = $1166; - } else { - $$lcssa452 = $1166;$$pre$i29$i$lcssa = $$pre$i29$i; - break; - } - } - $1168 = (((((($gfc)) + 39840|0) + (($$pre$i29$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1168>>2] = $$lcssa452; - $1815 = $$lcssa452;$1816 = $$pre$i29$i$lcssa; - } else { - $$02$i129$i = 1;$918 = $$pre$i141$i$lcssa;$ptr$01$i130$i = $$lcssa438; - while(1) { - $909 = $ptr$01$i130$i & 7; - $910 = (8 - ($909))|0; - $911 = ($$02$i129$i|0)<($910|0); - $$0$$i131$i = $911 ? $$02$i129$i : $910; - $912 = (($$02$i129$i) - ($$0$$i131$i))|0; - $913 = 1 >>> $912; - $914 = (($910) - ($$0$$i131$i))|0; - $915 = $913 << $914; - $916 = $ptr$01$i130$i >> 3; - $917 = ((((((($gfc)) + 39840|0) + (($918*48)|0)|0)) + 8|0) + ($916)|0); - $919 = HEAP8[$917>>0]|0; - $920 = $919&255; - $921 = $915 | $920; - $922 = $921&255; - HEAP8[$917>>0] = $922; - $923 = (($$0$$i131$i) + ($ptr$01$i130$i))|0; - $924 = ($912|0)>(0); - $$pre$i133$i = HEAP32[$17>>2]|0; - if ($924) { - $$02$i129$i = $912;$918 = $$pre$i133$i;$ptr$01$i130$i = $923; - } else { - $$lcssa439 = $923;$$pre$i133$i$lcssa = $$pre$i133$i; - break; - } - } - $925 = (((((($gfc)) + 39840|0) + (($$pre$i133$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$925>>2] = $$lcssa439; - $926 = HEAP32[$906>>2]|0; - $$02$i121$i = 2;$936 = $$pre$i133$i$lcssa;$ptr$01$i122$i = $$lcssa439; - while(1) { - $927 = $ptr$01$i122$i & 7; - $928 = (8 - ($927))|0; - $929 = ($$02$i121$i|0)<($928|0); - $$0$$i123$i = $929 ? $$02$i121$i : $928; - $930 = (($$02$i121$i) - ($$0$$i123$i))|0; - $931 = $926 >> $930; - $932 = (($928) - ($$0$$i123$i))|0; - $933 = $931 << $932; - $934 = $ptr$01$i122$i >> 3; - $935 = ((((((($gfc)) + 39840|0) + (($936*48)|0)|0)) + 8|0) + ($934)|0); - $937 = HEAP8[$935>>0]|0; - $938 = $937&255; - $939 = $933 | $938; - $940 = $939&255; - HEAP8[$935>>0] = $940; - $941 = (($$0$$i123$i) + ($ptr$01$i122$i))|0; - $942 = ($930|0)>(0); - $$pre$i125$i = HEAP32[$17>>2]|0; - if ($942) { - $$02$i121$i = $930;$936 = $$pre$i125$i;$ptr$01$i122$i = $941; - } else { - $$lcssa440 = $941;$$pre$i125$i$lcssa = $$pre$i125$i; - break; - } - } - $943 = (((((($gfc)) + 39840|0) + (($$pre$i125$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$943>>2] = $$lcssa440; - $944 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4792|0); - $945 = HEAP32[$944>>2]|0; - $$02$i113$i = 1;$955 = $$pre$i125$i$lcssa;$ptr$01$i114$i = $$lcssa440; - while(1) { - $946 = $ptr$01$i114$i & 7; - $947 = (8 - ($946))|0; - $948 = ($$02$i113$i|0)<($947|0); - $$0$$i115$i = $948 ? $$02$i113$i : $947; - $949 = (($$02$i113$i) - ($$0$$i115$i))|0; - $950 = $945 >> $949; - $951 = (($947) - ($$0$$i115$i))|0; - $952 = $950 << $951; - $953 = $ptr$01$i114$i >> 3; - $954 = ((((((($gfc)) + 39840|0) + (($955*48)|0)|0)) + 8|0) + ($953)|0); - $956 = HEAP8[$954>>0]|0; - $957 = $956&255; - $958 = $952 | $957; - $959 = $958&255; - HEAP8[$954>>0] = $959; - $960 = (($$0$$i115$i) + ($ptr$01$i114$i))|0; - $961 = ($949|0)>(0); - $$pre$i117$i = HEAP32[$17>>2]|0; - if ($961) { - $$02$i113$i = $949;$955 = $$pre$i117$i;$ptr$01$i114$i = $960; - } else { - $$lcssa441 = $960;$$pre$i117$i$lcssa = $$pre$i117$i; - break; - } - } - $962 = (((((($gfc)) + 39840|0) + (($$pre$i117$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$962>>2] = $$lcssa441; - $963 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4796|0); - $964 = HEAP32[$963>>2]|0; - $965 = ($964|0)==(14); - if ($965) { - HEAP32[$963>>2] = 16; - $$pre704$i = HEAP32[$17>>2]|0; - $$phi$trans$insert705$i = (((((($gfc)) + 39840|0) + (($$pre704$i*48)|0)|0)) + 4|0); - $$pre706$i = HEAP32[$$phi$trans$insert705$i>>2]|0; - $1811 = $$pre706$i;$1812 = $$pre704$i;$971 = 16; - } else { - $1811 = $$lcssa441;$1812 = $$pre$i117$i$lcssa;$971 = $964; - } - $$02$i105$i = 5;$976 = $1812;$ptr$01$i106$i = $1811; - while(1) { - $966 = $ptr$01$i106$i & 7; - $967 = (8 - ($966))|0; - $968 = ($$02$i105$i|0)<($967|0); - $$0$$i107$i = $968 ? $$02$i105$i : $967; - $969 = (($$02$i105$i) - ($$0$$i107$i))|0; - $970 = $971 >> $969; - $972 = (($967) - ($$0$$i107$i))|0; - $973 = $970 << $972; - $974 = $ptr$01$i106$i >> 3; - $975 = ((((((($gfc)) + 39840|0) + (($976*48)|0)|0)) + 8|0) + ($974)|0); - $977 = HEAP8[$975>>0]|0; - $978 = $977&255; - $979 = $973 | $978; - $980 = $979&255; - HEAP8[$975>>0] = $980; - $981 = (($$0$$i107$i) + ($ptr$01$i106$i))|0; - $982 = ($969|0)>(0); - $$pre$i109$i = HEAP32[$17>>2]|0; - if ($982) { - $$02$i105$i = $969;$976 = $$pre$i109$i;$ptr$01$i106$i = $981; - } else { - $$lcssa442 = $981;$$pre$i109$i$lcssa = $$pre$i109$i; - break; - } - } - $983 = (((((($gfc)) + 39840|0) + (($$pre$i109$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$983>>2] = $$lcssa442; - $984 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4800|0); - $985 = HEAP32[$984>>2]|0; - $986 = ($985|0)==(14); - if ($986) { - HEAP32[$984>>2] = 16; - $$pre707$i = HEAP32[$17>>2]|0; - $$phi$trans$insert708$i = (((((($gfc)) + 39840|0) + (($$pre707$i*48)|0)|0)) + 4|0); - $$pre709$i = HEAP32[$$phi$trans$insert708$i>>2]|0; - $1813 = $$pre709$i;$1814 = $$pre707$i;$992 = 16; - } else { - $1813 = $$lcssa442;$1814 = $$pre$i109$i$lcssa;$992 = $985; - } - $$02$i97$i = 5;$997 = $1814;$ptr$01$i98$i = $1813; - while(1) { - $987 = $ptr$01$i98$i & 7; - $988 = (8 - ($987))|0; - $989 = ($$02$i97$i|0)<($988|0); - $$0$$i99$i = $989 ? $$02$i97$i : $988; - $990 = (($$02$i97$i) - ($$0$$i99$i))|0; - $991 = $992 >> $990; - $993 = (($988) - ($$0$$i99$i))|0; - $994 = $991 << $993; - $995 = $ptr$01$i98$i >> 3; - $996 = ((((((($gfc)) + 39840|0) + (($997*48)|0)|0)) + 8|0) + ($995)|0); - $998 = HEAP8[$996>>0]|0; - $999 = $998&255; - $1000 = $994 | $999; - $1001 = $1000&255; - HEAP8[$996>>0] = $1001; - $1002 = (($$0$$i99$i) + ($ptr$01$i98$i))|0; - $1003 = ($990|0)>(0); - $$pre$i101$i = HEAP32[$17>>2]|0; - if ($1003) { - $$02$i97$i = $990;$997 = $$pre$i101$i;$ptr$01$i98$i = $1002; - } else { - $$lcssa443 = $1002;$$pre$i101$i$lcssa = $$pre$i101$i; - break; - } - } - $1004 = (((((($gfc)) + 39840|0) + (($$pre$i101$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1004>>2] = $$lcssa443; - $1005 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4808|0); - $1006 = HEAP32[$1005>>2]|0; - $$02$i89$i = 3;$1016 = $$pre$i101$i$lcssa;$ptr$01$i90$i = $$lcssa443; - while(1) { - $1007 = $ptr$01$i90$i & 7; - $1008 = (8 - ($1007))|0; - $1009 = ($$02$i89$i|0)<($1008|0); - $$0$$i91$i = $1009 ? $$02$i89$i : $1008; - $1010 = (($$02$i89$i) - ($$0$$i91$i))|0; - $1011 = $1006 >> $1010; - $1012 = (($1008) - ($$0$$i91$i))|0; - $1013 = $1011 << $1012; - $1014 = $ptr$01$i90$i >> 3; - $1015 = ((((((($gfc)) + 39840|0) + (($1016*48)|0)|0)) + 8|0) + ($1014)|0); - $1017 = HEAP8[$1015>>0]|0; - $1018 = $1017&255; - $1019 = $1013 | $1018; - $1020 = $1019&255; - HEAP8[$1015>>0] = $1020; - $1021 = (($$0$$i91$i) + ($ptr$01$i90$i))|0; - $1022 = ($1010|0)>(0); - $$pre$i93$i = HEAP32[$17>>2]|0; - if ($1022) { - $$02$i89$i = $1010;$1016 = $$pre$i93$i;$ptr$01$i90$i = $1021; - } else { - $$lcssa444 = $1021;$$pre$i93$i$lcssa = $$pre$i93$i; - break; - } - } - $1023 = (((((($gfc)) + 39840|0) + (($$pre$i93$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1023>>2] = $$lcssa444; - $1024 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4812|0); - $1025 = HEAP32[$1024>>2]|0; - $$02$i81$i = 3;$1035 = $$pre$i93$i$lcssa;$ptr$01$i82$i = $$lcssa444; - while(1) { - $1026 = $ptr$01$i82$i & 7; - $1027 = (8 - ($1026))|0; - $1028 = ($$02$i81$i|0)<($1027|0); - $$0$$i83$i = $1028 ? $$02$i81$i : $1027; - $1029 = (($$02$i81$i) - ($$0$$i83$i))|0; - $1030 = $1025 >> $1029; - $1031 = (($1027) - ($$0$$i83$i))|0; - $1032 = $1030 << $1031; - $1033 = $ptr$01$i82$i >> 3; - $1034 = ((((((($gfc)) + 39840|0) + (($1035*48)|0)|0)) + 8|0) + ($1033)|0); - $1036 = HEAP8[$1034>>0]|0; - $1037 = $1036&255; - $1038 = $1032 | $1037; - $1039 = $1038&255; - HEAP8[$1034>>0] = $1039; - $1040 = (($$0$$i83$i) + ($ptr$01$i82$i))|0; - $1041 = ($1029|0)>(0); - $$pre$i85$i = HEAP32[$17>>2]|0; - if ($1041) { - $$02$i81$i = $1029;$1035 = $$pre$i85$i;$ptr$01$i82$i = $1040; - } else { - $$lcssa445 = $1040;$$pre$i85$i$lcssa = $$pre$i85$i; - break; - } - } - $1042 = (((((($gfc)) + 39840|0) + (($$pre$i85$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1042>>2] = $$lcssa445; - $1043 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4816|0); - $1044 = HEAP32[$1043>>2]|0; - $$02$i73$i = 3;$1054 = $$pre$i85$i$lcssa;$ptr$01$i74$i = $$lcssa445; - while(1) { - $1045 = $ptr$01$i74$i & 7; - $1046 = (8 - ($1045))|0; - $1047 = ($$02$i73$i|0)<($1046|0); - $$0$$i75$i = $1047 ? $$02$i73$i : $1046; - $1048 = (($$02$i73$i) - ($$0$$i75$i))|0; - $1049 = $1044 >> $1048; - $1050 = (($1046) - ($$0$$i75$i))|0; - $1051 = $1049 << $1050; - $1052 = $ptr$01$i74$i >> 3; - $1053 = ((((((($gfc)) + 39840|0) + (($1054*48)|0)|0)) + 8|0) + ($1052)|0); - $1055 = HEAP8[$1053>>0]|0; - $1056 = $1055&255; - $1057 = $1051 | $1056; - $1058 = $1057&255; - HEAP8[$1053>>0] = $1058; - $1059 = (($$0$$i75$i) + ($ptr$01$i74$i))|0; - $1060 = ($1048|0)>(0); - $$pre$i77$i = HEAP32[$17>>2]|0; - if ($1060) { - $$02$i73$i = $1048;$1054 = $$pre$i77$i;$ptr$01$i74$i = $1059; - } else { - $$lcssa446 = $1059;$$pre$i77$i$lcssa = $$pre$i77$i; - break; - } - } - $1061 = (((((($gfc)) + 39840|0) + (($$pre$i77$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1061>>2] = $$lcssa446; - $1815 = $$lcssa446;$1816 = $$pre$i77$i$lcssa; - } - $1169 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4836|0); - $1170 = HEAP32[$1169>>2]|0; - $$02$i17$i = 1;$1180 = $1816;$ptr$01$i18$i = $1815; - while(1) { - $1171 = $ptr$01$i18$i & 7; - $1172 = (8 - ($1171))|0; - $1173 = ($$02$i17$i|0)<($1172|0); - $$0$$i19$i = $1173 ? $$02$i17$i : $1172; - $1174 = (($$02$i17$i) - ($$0$$i19$i))|0; - $1175 = $1170 >> $1174; - $1176 = (($1172) - ($$0$$i19$i))|0; - $1177 = $1175 << $1176; - $1178 = $ptr$01$i18$i >> 3; - $1179 = ((((((($gfc)) + 39840|0) + (($1180*48)|0)|0)) + 8|0) + ($1178)|0); - $1181 = HEAP8[$1179>>0]|0; - $1182 = $1181&255; - $1183 = $1177 | $1182; - $1184 = $1183&255; - HEAP8[$1179>>0] = $1184; - $1185 = (($$0$$i19$i) + ($ptr$01$i18$i))|0; - $1186 = ($1174|0)>(0); - $$pre$i21$i = HEAP32[$17>>2]|0; - if ($1186) { - $$02$i17$i = $1174;$1180 = $$pre$i21$i;$ptr$01$i18$i = $1185; - } else { - $$lcssa453 = $1185;$$pre$i21$i$lcssa = $$pre$i21$i; - break; - } - } - $1187 = (((((($gfc)) + 39840|0) + (($$pre$i21$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1187>>2] = $$lcssa453; - $1188 = (((((($gfc)) + 304|0) + (($ch$2638$i*5252)|0)|0)) + 4840|0); - $1189 = HEAP32[$1188>>2]|0; - $$02$i9$i = 1;$1199 = $$pre$i21$i$lcssa;$ptr$01$i10$i = $$lcssa453; - while(1) { - $1190 = $ptr$01$i10$i & 7; - $1191 = (8 - ($1190))|0; - $1192 = ($$02$i9$i|0)<($1191|0); - $$0$$i11$i = $1192 ? $$02$i9$i : $1191; - $1193 = (($$02$i9$i) - ($$0$$i11$i))|0; - $1194 = $1189 >> $1193; - $1195 = (($1191) - ($$0$$i11$i))|0; - $1196 = $1194 << $1195; - $1197 = $ptr$01$i10$i >> 3; - $1198 = ((((((($gfc)) + 39840|0) + (($1199*48)|0)|0)) + 8|0) + ($1197)|0); - $1200 = HEAP8[$1198>>0]|0; - $1201 = $1200&255; - $1202 = $1196 | $1201; - $1203 = $1202&255; - HEAP8[$1198>>0] = $1203; - $1204 = (($$0$$i11$i) + ($ptr$01$i10$i))|0; - $1205 = ($1193|0)>(0); - $$pre$i13$i = HEAP32[$17>>2]|0; - if ($1205) { - $$02$i9$i = $1193;$1199 = $$pre$i13$i;$ptr$01$i10$i = $1204; - } else { - $$lcssa454 = $1204;$$pre$i13$i$lcssa = $$pre$i13$i; - break; - } - } - $1206 = (((((($gfc)) + 39840|0) + (($$pre$i13$i$lcssa*48)|0)|0)) + 4|0); - HEAP32[$1206>>2] = $$lcssa454; - $1207 = (($ch$2638$i) + 1)|0; - $1208 = HEAP32[$805>>2]|0; - $1209 = ($1207|0)<($1208|0); - if ($1209) { - $1809 = $$lcssa454;$1810 = $$pre$i13$i$lcssa;$ch$2638$i = $1207; - } else { - $1213 = $$pre$i13$i$lcssa; - break; - } - } - } else { - $1213 = $$pre$i173$i$lcssa; - } - } - } while(0); - $1210 = HEAP32[$98>>2]|0; - $1211 = ($1210|0)==(0); - if ($1211) { - $1215 = $1213; - } else { - $1212 = (((((($gfc)) + 39840|0) + (($1213*48)|0)|0)) + 8|0); - _CRC_writeheader($gfc,$1212); - $$pre734$i = HEAP32[$17>>2]|0; - $1215 = $$pre734$i; - } - $1214 = (($1215) + 1)|0; - $1216 = $1214 & 255; - HEAP32[$17>>2] = $1216; - $1217 = (((($gfc)) + 39840|0) + (($1215*48)|0)|0); - $1218 = HEAP32[$1217>>2]|0; - $1219 = (($1218) + ($14))|0; - $1220 = (((($gfc)) + 39840|0) + (($1216*48)|0)|0); - HEAP32[$1220>>2] = $1219; - $1221 = HEAP32[$17>>2]|0; - $1222 = ((($gfc)) + 52132|0); - $1223 = HEAP32[$1222>>2]|0; - $1224 = ($1221|0)==($1223|0); - if ($1224) { - _lame_errorf($gfc,1112,$vararg_buffer); - } - $1283 = HEAP32[$21>>2]|0; - $1284 = $1283 << 3; - $1285 = HEAP32[$62>>2]|0; - $1286 = ($1285|0)==(1); - $1287 = ((($gfc)) + 72|0); - do { - if ($1286) { - $1295 = ((($gfc)) + 300|0); - $1296 = ((($gfc)) + 296|0); - $1297 = ((($gfc)) + 292|0); - $1298 = ((($gfc)) + 284|0); - $1299 = ((($gfc)) + 21464|0); - $$pre$i1 = HEAP32[$1287>>2]|0; - $1300 = $$pre$i1;$gr$054$i = 0;$tot_bits$053$i = 0; - while(1) { - $1301 = ($1300|0)>(0); - if ($1301) { - $ch$047$i = 0;$tot_bits$146$i = $tot_bits$053$i; - while(1) { - $1302 = ((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0); - $1303 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4784|0); - $1304 = HEAP32[$1303>>2]|0; - $1305 = (88648 + ($1304<<2)|0); - $1306 = HEAP32[$1305>>2]|0; - $1307 = (88712 + ($1304<<2)|0); - $1308 = HEAP32[$1307>>2]|0; - $1309 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4868|0); - $1310 = HEAP32[$1309>>2]|0; - $1311 = ($1310|0)>(0); - L269: do { - if ($1311) { - $1312 = ($1306|0)>(0); - if ($1312) { - $1824 = $1310;$data_bits$039$us$i = 0;$sfb$040$us$i = 0; - } else { - $data_bits$039$i = 0;$sfb$040$i = 0; - while(1) { - $1365 = (((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4608|0) + ($sfb$040$i<<2)|0); - $1366 = HEAP32[$1365>>2]|0; - $1367 = ($1366|0)==(-1); - $1368 = $1367 ? 0 : $1306; - $data_bits$039$$i = (($1368) + ($data_bits$039$i))|0; - $1369 = (($sfb$040$i) + 1)|0; - $exitcond166 = ($1369|0)==($1310|0); - if ($exitcond166) { - $data_bits$0$lcssa$i = $data_bits$039$$i;$sfb$0$lcssa$i = $1310; - break L269; - } else { - $data_bits$039$i = $data_bits$039$$i;$sfb$040$i = $1369; - } - } - } - while(1) { - $1313 = (((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4608|0) + ($sfb$040$us$i<<2)|0); - $1314 = HEAP32[$1313>>2]|0; - $1315 = ($1314|0)==(-1); - if ($1315) { - $1360 = $1824;$data_bits$1$us$i = $data_bits$039$us$i; - } else { - $$01$i$us$i = $1306; - while(1) { - $1316 = HEAP32[$1295>>2]|0; - $1317 = ($1316|0)==(0); - if ($1317) { - HEAP32[$1295>>2] = 8; - $1318 = HEAP32[$1296>>2]|0; - $1319 = (($1318) + 1)|0; - HEAP32[$1296>>2] = $1319; - $1320 = HEAP32[$1222>>2]|0; - $1321 = (((($gfc)) + 39840|0) + (($1320*48)|0)|0); - $1322 = HEAP32[$1321>>2]|0; - $1323 = HEAP32[$1297>>2]|0; - $1324 = ($1322|0)==($1323|0); - if ($1324) { - $1325 = HEAP32[$1298>>2]|0; - $1326 = (($1325) + ($1319)|0); - $1327 = (((((($gfc)) + 39840|0) + (($1320*48)|0)|0)) + 8|0); - $1328 = HEAP32[$21>>2]|0; - _memcpy(($1326|0),($1327|0),($1328|0))|0; - $1329 = HEAP32[$21>>2]|0; - $1330 = HEAP32[$1296>>2]|0; - $1331 = (($1330) + ($1329))|0; - HEAP32[$1296>>2] = $1331; - $1332 = $1329 << 3; - $1333 = HEAP32[$1297>>2]|0; - $1334 = (($1333) + ($1332))|0; - HEAP32[$1297>>2] = $1334; - $1335 = HEAP32[$1222>>2]|0; - $1336 = (($1335) + 1)|0; - $1337 = $1336 & 255; - HEAP32[$1222>>2] = $1337; - $1340 = $1331; - } else { - $1340 = $1319; - } - $1338 = HEAP32[$1298>>2]|0; - $1339 = (($1338) + ($1340)|0); - HEAP8[$1339>>0] = 0; - $$pre$i$us$i = HEAP32[$1295>>2]|0; - $1342 = $$pre$i$us$i; - } else { - $1342 = $1316; - } - $1341 = ($$01$i$us$i|0)<($1342|0); - $$0$$i$us$i = $1341 ? $$01$i$us$i : $1342; - $1343 = (($$01$i$us$i) - ($$0$$i$us$i))|0; - $1344 = (($1342) - ($$0$$i$us$i))|0; - HEAP32[$1295>>2] = $1344; - $1345 = $1314 >> $1343; - $1346 = $1345 << $1344; - $1347 = HEAP32[$1296>>2]|0; - $1348 = HEAP32[$1298>>2]|0; - $1349 = (($1348) + ($1347)|0); - $1350 = HEAP8[$1349>>0]|0; - $1351 = $1350&255; - $1352 = $1346 | $1351; - $1353 = $1352&255; - HEAP8[$1349>>0] = $1353; - $1354 = HEAP32[$1297>>2]|0; - $1355 = (($1354) + ($$0$$i$us$i))|0; - HEAP32[$1297>>2] = $1355; - $1356 = ($1343|0)>(0); - if ($1356) { - $$01$i$us$i = $1343; - } else { - break; - } - } - $$pre96$pre$i = HEAP32[$1309>>2]|0; - $1357 = (($data_bits$039$us$i) + ($1306))|0; - $1360 = $$pre96$pre$i;$data_bits$1$us$i = $1357; - } - $1358 = (($sfb$040$us$i) + 1)|0; - $1359 = ($1358|0)<($1360|0); - if ($1359) { - $1824 = $1360;$data_bits$039$us$i = $data_bits$1$us$i;$sfb$040$us$i = $1358; - } else { - $data_bits$0$lcssa$i = $data_bits$1$us$i;$sfb$0$lcssa$i = $1358; - break; - } - } - } else { - $data_bits$0$lcssa$i = 0;$sfb$0$lcssa$i = 0; - } - } while(0); - $1361 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4860|0); - $1362 = HEAP32[$1361>>2]|0; - $1363 = ($sfb$0$lcssa$i|0)<($1362|0); - if ($1363) { - $1364 = ($1308|0)>(0); - $1825 = $1362;$data_bits$242$i = $data_bits$0$lcssa$i;$sfb$143$i = $sfb$0$lcssa$i; - while(1) { - $1370 = (((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4608|0) + ($sfb$143$i<<2)|0); - $1371 = HEAP32[$1370>>2]|0; - $1372 = ($1371|0)==(-1); - if ($1372) { - $1417 = $1825;$data_bits$3$i = $data_bits$242$i; - } else { - if ($1364) { - $$01$i4$i = $1308; - while(1) { - $1373 = HEAP32[$1295>>2]|0; - $1374 = ($1373|0)==(0); - if ($1374) { - HEAP32[$1295>>2] = 8; - $1375 = HEAP32[$1296>>2]|0; - $1376 = (($1375) + 1)|0; - HEAP32[$1296>>2] = $1376; - $1377 = HEAP32[$1222>>2]|0; - $1378 = (((($gfc)) + 39840|0) + (($1377*48)|0)|0); - $1379 = HEAP32[$1378>>2]|0; - $1380 = HEAP32[$1297>>2]|0; - $1381 = ($1379|0)==($1380|0); - if ($1381) { - $1382 = HEAP32[$1298>>2]|0; - $1383 = (($1382) + ($1376)|0); - $1384 = (((((($gfc)) + 39840|0) + (($1377*48)|0)|0)) + 8|0); - $1385 = HEAP32[$21>>2]|0; - _memcpy(($1383|0),($1384|0),($1385|0))|0; - $1386 = HEAP32[$21>>2]|0; - $1387 = HEAP32[$1296>>2]|0; - $1388 = (($1387) + ($1386))|0; - HEAP32[$1296>>2] = $1388; - $1389 = $1386 << 3; - $1390 = HEAP32[$1297>>2]|0; - $1391 = (($1390) + ($1389))|0; - HEAP32[$1297>>2] = $1391; - $1392 = HEAP32[$1222>>2]|0; - $1393 = (($1392) + 1)|0; - $1394 = $1393 & 255; - HEAP32[$1222>>2] = $1394; - $1397 = $1388; - } else { - $1397 = $1376; - } - $1395 = HEAP32[$1298>>2]|0; - $1396 = (($1395) + ($1397)|0); - HEAP8[$1396>>0] = 0; - $$pre$i5$i4 = HEAP32[$1295>>2]|0; - $1399 = $$pre$i5$i4; - } else { - $1399 = $1373; - } - $1398 = ($$01$i4$i|0)<($1399|0); - $$0$$i6$i = $1398 ? $$01$i4$i : $1399; - $1400 = (($$01$i4$i) - ($$0$$i6$i))|0; - $1401 = (($1399) - ($$0$$i6$i))|0; - HEAP32[$1295>>2] = $1401; - $1402 = $1371 >> $1400; - $1403 = $1402 << $1401; - $1404 = HEAP32[$1296>>2]|0; - $1405 = HEAP32[$1298>>2]|0; - $1406 = (($1405) + ($1404)|0); - $1407 = HEAP8[$1406>>0]|0; - $1408 = $1407&255; - $1409 = $1403 | $1408; - $1410 = $1409&255; - HEAP8[$1406>>0] = $1410; - $1411 = HEAP32[$1297>>2]|0; - $1412 = (($1411) + ($$0$$i6$i))|0; - HEAP32[$1297>>2] = $1412; - $1413 = ($1400|0)>(0); - if ($1413) { - $$01$i4$i = $1400; - } else { - break; - } - } - $$pre97$pre$i = HEAP32[$1361>>2]|0; - $$pre97$i = $$pre97$pre$i; - } else { - $$pre97$i = $1825; - } - $1414 = (($data_bits$242$i) + ($1308))|0; - $1417 = $$pre97$i;$data_bits$3$i = $1414; - } - $1415 = (($sfb$143$i) + 1)|0; - $1416 = ($1415|0)<($1417|0); - if ($1416) { - $1825 = $1417;$data_bits$242$i = $data_bits$3$i;$sfb$143$i = $1415; - } else { - $data_bits$2$lcssa$i = $data_bits$3$i; - break; - } - } - } else { - $data_bits$2$lcssa$i = $data_bits$0$lcssa$i; - } - $1418 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4788|0); - $1419 = HEAP32[$1418>>2]|0; - $1420 = ($1419|0)==(2); - if ($1420) { - $1421 = HEAP32[$1299>>2]|0; - $1422 = ($1421*3)|0; - $1423 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4772|0); - $1424 = HEAP32[$1423>>2]|0; - $1425 = ($1422|0)>($1424|0); - $$$i8$i = $1425 ? $1424 : $1422; - $1426 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4796|0); - $1427 = HEAP32[$1426>>2]|0; - $1428 = (_Huffmancode($gfc,$1427,0,$$$i8$i,$1302)|0); - $1429 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4800|0); - $1430 = HEAP32[$1429>>2]|0; - $1431 = HEAP32[$1423>>2]|0; - $1432 = (_Huffmancode($gfc,$1430,$$$i8$i,$1431,$1302)|0); - $1433 = (($1432) + ($1428))|0; - $$pn$i = $1433; - } else { - $1434 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4772|0); - $1435 = HEAP32[$1434>>2]|0; - $1436 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4824|0); - $1437 = HEAP32[$1436>>2]|0; - $1438 = (($1437) + 1)|0; - $1439 = (((($gfc)) + 21360|0) + ($1438<<2)|0); - $1440 = HEAP32[$1439>>2]|0; - $1441 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4828|0); - $1442 = HEAP32[$1441>>2]|0; - $1443 = (($1437) + 2)|0; - $1444 = (($1443) + ($1442))|0; - $1445 = (((($gfc)) + 21360|0) + ($1444<<2)|0); - $1446 = HEAP32[$1445>>2]|0; - $1447 = ($1440|0)>($1435|0); - $$$i9$i = $1447 ? $1435 : $1440; - $1448 = ($1446|0)>($1435|0); - $region2Start$0$i10$i = $1448 ? $1435 : $1446; - $1449 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4796|0); - $1450 = HEAP32[$1449>>2]|0; - $1451 = (_Huffmancode($gfc,$1450,0,$$$i9$i,$1302)|0); - $1452 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4800|0); - $1453 = HEAP32[$1452>>2]|0; - $1454 = (_Huffmancode($gfc,$1453,$$$i9$i,$region2Start$0$i10$i,$1302)|0); - $1455 = (($1454) + ($1451))|0; - $1456 = ((((((($gfc)) + 304|0) + (($gr$054$i*10504)|0)|0) + (($ch$047$i*5252)|0)|0)) + 4804|0); - $1457 = HEAP32[$1456>>2]|0; - $1458 = (_Huffmancode($gfc,$1457,$region2Start$0$i10$i,$1435,$1302)|0); - $1459 = (($1455) + ($1458))|0; - $$pn$i = $1459; - } - $1460 = (_huffman_coder_count1($gfc,$1302)|0); - $data_bits$4$i = (($data_bits$2$lcssa$i) + ($tot_bits$146$i))|0; - $1461 = (($data_bits$4$i) + ($$pn$i))|0; - $1462 = (($1461) + ($1460))|0; - $1463 = (($ch$047$i) + 1)|0; - $1464 = HEAP32[$1287>>2]|0; - $1465 = ($1463|0)<($1464|0); - if ($1465) { - $ch$047$i = $1463;$tot_bits$146$i = $1462; - } else { - $1823 = $1464;$tot_bits$1$lcssa$i = $1462; - break; - } - } - } else { - $1823 = $1300;$tot_bits$1$lcssa$i = $tot_bits$053$i; - } - $1466 = (($gr$054$i) + 1)|0; - $exitcond$i6 = ($1466|0)==(2); - if ($exitcond$i6) { - $$pre$phiZ2D = $1297;$tot_bits$3$i = $tot_bits$1$lcssa$i; - break; - } else { - $1300 = $1823;$gr$054$i = $1466;$tot_bits$053$i = $tot_bits$1$lcssa$i; - } - } - } else { - $1288 = HEAP32[$1287>>2]|0; - $1289 = ($1288|0)>(0); - if (!($1289)) { - $$pre167 = ((($gfc)) + 292|0); - $$pre$phiZ2D = $$pre167;$tot_bits$3$i = 0; - break; - } - $1290 = ((($gfc)) + 300|0); - $1291 = ((($gfc)) + 296|0); - $1292 = ((($gfc)) + 292|0); - $1293 = ((($gfc)) + 284|0); - $1294 = ((($gfc)) + 21464|0); - $ch$179$i = 0;$tot_bits$278$i = 0; - while(1) { - $1467 = (((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0); - $1468 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4788|0); - $1469 = HEAP32[$1468>>2]|0; - $1470 = ($1469|0)==(2); - $1471 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 5188|0); - if ($1470) { - $scale_bits$076$i = 0;$sfb$277$i = 0;$sfb_partition$075$i = 0; - while(1) { - $1472 = HEAP32[$1471>>2]|0; - $1473 = (($1472) + ($sfb_partition$075$i<<2)|0); - $1474 = HEAP32[$1473>>2]|0; - $1475 = (($1474|0) / 3)&-1; - $1476 = ((((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 5192|0) + ($sfb_partition$075$i<<2)|0); - $1477 = HEAP32[$1476>>2]|0; - $1478 = ($1474|0)>(2); - if ($1478) { - $1479 = ($1477|0)>(0); - $1480 = ($1475|0)>(1); - $smax$i = $1480 ? $1475 : 1; - $i$067$i = 0;$sfb$369$i = $sfb$277$i; - while(1) { - $1481 = ($sfb$369$i*3)|0; - $1482 = ((((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4608|0) + ($1481<<2)|0); - $1483 = HEAP32[$1482>>2]|0; - $1484 = ($1483|0)>(0); - $$$i7 = $1484 ? $1483 : 0; - if ($1479) { - $$01$i12$i = $1477; - while(1) { - $1485 = HEAP32[$1290>>2]|0; - $1486 = ($1485|0)==(0); - if ($1486) { - HEAP32[$1290>>2] = 8; - $1487 = HEAP32[$1291>>2]|0; - $1488 = (($1487) + 1)|0; - HEAP32[$1291>>2] = $1488; - $1489 = HEAP32[$1222>>2]|0; - $1490 = (((($gfc)) + 39840|0) + (($1489*48)|0)|0); - $1491 = HEAP32[$1490>>2]|0; - $1492 = HEAP32[$1292>>2]|0; - $1493 = ($1491|0)==($1492|0); - if ($1493) { - $1494 = HEAP32[$1293>>2]|0; - $1495 = (($1494) + ($1488)|0); - $1496 = (((((($gfc)) + 39840|0) + (($1489*48)|0)|0)) + 8|0); - $1497 = HEAP32[$21>>2]|0; - _memcpy(($1495|0),($1496|0),($1497|0))|0; - $1498 = HEAP32[$21>>2]|0; - $1499 = HEAP32[$1291>>2]|0; - $1500 = (($1499) + ($1498))|0; - HEAP32[$1291>>2] = $1500; - $1501 = $1498 << 3; - $1502 = HEAP32[$1292>>2]|0; - $1503 = (($1502) + ($1501))|0; - HEAP32[$1292>>2] = $1503; - $1504 = HEAP32[$1222>>2]|0; - $1505 = (($1504) + 1)|0; - $1506 = $1505 & 255; - HEAP32[$1222>>2] = $1506; - $1509 = $1500; - } else { - $1509 = $1488; - } - $1507 = HEAP32[$1293>>2]|0; - $1508 = (($1507) + ($1509)|0); - HEAP8[$1508>>0] = 0; - $$pre$i13$i8 = HEAP32[$1290>>2]|0; - $1511 = $$pre$i13$i8; - } else { - $1511 = $1485; - } - $1510 = ($$01$i12$i|0)<($1511|0); - $$0$$i14$i = $1510 ? $$01$i12$i : $1511; - $1512 = (($$01$i12$i) - ($$0$$i14$i))|0; - $1513 = (($1511) - ($$0$$i14$i))|0; - HEAP32[$1290>>2] = $1513; - $1514 = $$$i7 >> $1512; - $1515 = $1514 << $1513; - $1516 = HEAP32[$1291>>2]|0; - $1517 = HEAP32[$1293>>2]|0; - $1518 = (($1517) + ($1516)|0); - $1519 = HEAP8[$1518>>0]|0; - $1520 = $1519&255; - $1521 = $1515 | $1520; - $1522 = $1521&255; - HEAP8[$1518>>0] = $1522; - $1523 = HEAP32[$1292>>2]|0; - $1524 = (($1523) + ($$0$$i14$i))|0; - HEAP32[$1292>>2] = $1524; - $1525 = ($1512|0)>(0); - if ($1525) { - $$01$i12$i = $1512; - } else { - $$lcssa401 = $1524; - break; - } - } - $1526 = (($1481) + 1)|0; - $1527 = ((((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4608|0) + ($1526<<2)|0); - $1528 = HEAP32[$1527>>2]|0; - $1529 = ($1528|0)>(0); - $1530 = $1529 ? $1528 : 0; - $$01$i17$i = $1477;$1539 = $$lcssa401; - while(1) { - $1531 = HEAP32[$1290>>2]|0; - $1532 = ($1531|0)==(0); - if ($1532) { - HEAP32[$1290>>2] = 8; - $1533 = HEAP32[$1291>>2]|0; - $1534 = (($1533) + 1)|0; - HEAP32[$1291>>2] = $1534; - $1535 = HEAP32[$1222>>2]|0; - $1536 = (((($gfc)) + 39840|0) + (($1535*48)|0)|0); - $1537 = HEAP32[$1536>>2]|0; - $1538 = ($1537|0)==($1539|0); - if ($1538) { - $1540 = HEAP32[$1293>>2]|0; - $1541 = (($1540) + ($1534)|0); - $1542 = (((((($gfc)) + 39840|0) + (($1535*48)|0)|0)) + 8|0); - $1543 = HEAP32[$21>>2]|0; - _memcpy(($1541|0),($1542|0),($1543|0))|0; - $1544 = HEAP32[$21>>2]|0; - $1545 = HEAP32[$1291>>2]|0; - $1546 = (($1545) + ($1544))|0; - HEAP32[$1291>>2] = $1546; - $1547 = $1544 << 3; - $1548 = HEAP32[$1292>>2]|0; - $1549 = (($1548) + ($1547))|0; - HEAP32[$1292>>2] = $1549; - $1550 = HEAP32[$1222>>2]|0; - $1551 = (($1550) + 1)|0; - $1552 = $1551 & 255; - HEAP32[$1222>>2] = $1552; - $1555 = $1546; - } else { - $1555 = $1534; - } - $1553 = HEAP32[$1293>>2]|0; - $1554 = (($1553) + ($1555)|0); - HEAP8[$1554>>0] = 0; - $$pre$i18$i = HEAP32[$1290>>2]|0; - $1557 = $$pre$i18$i; - } else { - $1557 = $1531; - } - $1556 = ($$01$i17$i|0)<($1557|0); - $$0$$i19$i9 = $1556 ? $$01$i17$i : $1557; - $1558 = (($$01$i17$i) - ($$0$$i19$i9))|0; - $1559 = (($1557) - ($$0$$i19$i9))|0; - HEAP32[$1290>>2] = $1559; - $1560 = $1530 >> $1558; - $1561 = $1560 << $1559; - $1562 = HEAP32[$1291>>2]|0; - $1563 = HEAP32[$1293>>2]|0; - $1564 = (($1563) + ($1562)|0); - $1565 = HEAP8[$1564>>0]|0; - $1566 = $1565&255; - $1567 = $1561 | $1566; - $1568 = $1567&255; - HEAP8[$1564>>0] = $1568; - $1569 = HEAP32[$1292>>2]|0; - $1570 = (($1569) + ($$0$$i19$i9))|0; - HEAP32[$1292>>2] = $1570; - $1571 = ($1558|0)>(0); - if ($1571) { - $$01$i17$i = $1558;$1539 = $1570; - } else { - $$lcssa402 = $1570; - break; - } - } - $1572 = (($1481) + 2)|0; - $1573 = ((((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4608|0) + ($1572<<2)|0); - $1574 = HEAP32[$1573>>2]|0; - $1575 = ($1574|0)>(0); - $$1$i10 = $1575 ? $1574 : 0; - $$01$i22$i = $1477;$1584 = $$lcssa402; - while(1) { - $1576 = HEAP32[$1290>>2]|0; - $1577 = ($1576|0)==(0); - if ($1577) { - HEAP32[$1290>>2] = 8; - $1578 = HEAP32[$1291>>2]|0; - $1579 = (($1578) + 1)|0; - HEAP32[$1291>>2] = $1579; - $1580 = HEAP32[$1222>>2]|0; - $1581 = (((($gfc)) + 39840|0) + (($1580*48)|0)|0); - $1582 = HEAP32[$1581>>2]|0; - $1583 = ($1582|0)==($1584|0); - if ($1583) { - $1585 = HEAP32[$1293>>2]|0; - $1586 = (($1585) + ($1579)|0); - $1587 = (((((($gfc)) + 39840|0) + (($1580*48)|0)|0)) + 8|0); - $1588 = HEAP32[$21>>2]|0; - _memcpy(($1586|0),($1587|0),($1588|0))|0; - $1589 = HEAP32[$21>>2]|0; - $1590 = HEAP32[$1291>>2]|0; - $1591 = (($1590) + ($1589))|0; - HEAP32[$1291>>2] = $1591; - $1592 = $1589 << 3; - $1593 = HEAP32[$1292>>2]|0; - $1594 = (($1593) + ($1592))|0; - HEAP32[$1292>>2] = $1594; - $1595 = HEAP32[$1222>>2]|0; - $1596 = (($1595) + 1)|0; - $1597 = $1596 & 255; - HEAP32[$1222>>2] = $1597; - $1600 = $1591; - } else { - $1600 = $1579; - } - $1598 = HEAP32[$1293>>2]|0; - $1599 = (($1598) + ($1600)|0); - HEAP8[$1599>>0] = 0; - $$pre$i23$i = HEAP32[$1290>>2]|0; - $1602 = $$pre$i23$i; - } else { - $1602 = $1576; - } - $1601 = ($$01$i22$i|0)<($1602|0); - $$0$$i24$i = $1601 ? $$01$i22$i : $1602; - $1603 = (($$01$i22$i) - ($$0$$i24$i))|0; - $1604 = (($1602) - ($$0$$i24$i))|0; - HEAP32[$1290>>2] = $1604; - $1605 = $$1$i10 >> $1603; - $1606 = $1605 << $1604; - $1607 = HEAP32[$1291>>2]|0; - $1608 = HEAP32[$1293>>2]|0; - $1609 = (($1608) + ($1607)|0); - $1610 = HEAP8[$1609>>0]|0; - $1611 = $1610&255; - $1612 = $1606 | $1611; - $1613 = $1612&255; - HEAP8[$1609>>0] = $1613; - $1614 = HEAP32[$1292>>2]|0; - $1615 = (($1614) + ($$0$$i24$i))|0; - HEAP32[$1292>>2] = $1615; - $1616 = ($1603|0)>(0); - if ($1616) { - $$01$i22$i = $1603;$1584 = $1615; - } else { - break; - } - } - } - $1617 = (($i$067$i) + 1)|0; - $1618 = (($sfb$369$i) + 1)|0; - $1619 = ($1617|0)<($1475|0); - if ($1619) { - $i$067$i = $1617;$sfb$369$i = $1618; - } else { - break; - } - } - $1620 = ($1477*3)|0; - $1621 = Math_imul($1620, $smax$i)|0; - $1622 = (($smax$i) + ($sfb$277$i))|0; - $1623 = (($1621) + ($scale_bits$076$i))|0; - $scale_bits$1$lcssa$i = $1623;$sfb$3$lcssa$i = $1622; - } else { - $scale_bits$1$lcssa$i = $scale_bits$076$i;$sfb$3$lcssa$i = $sfb$277$i; - } - $1624 = (($sfb_partition$075$i) + 1)|0; - $exitcond95$i = ($1624|0)==(4); - if ($exitcond95$i) { - $scale_bits$1$lcssa$i$lcssa = $scale_bits$1$lcssa$i; - break; - } else { - $scale_bits$076$i = $scale_bits$1$lcssa$i;$sfb$277$i = $sfb$3$lcssa$i;$sfb_partition$075$i = $1624; - } - } - $1625 = HEAP32[$1294>>2]|0; - $1626 = ($1625*3)|0; - $1627 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4772|0); - $1628 = HEAP32[$1627>>2]|0; - $1629 = ($1626|0)>($1628|0); - $$$i26$i = $1629 ? $1628 : $1626; - $1630 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4796|0); - $1631 = HEAP32[$1630>>2]|0; - $1632 = (_Huffmancode($gfc,$1631,0,$$$i26$i,$1467)|0); - $1633 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4800|0); - $1634 = HEAP32[$1633>>2]|0; - $1635 = HEAP32[$1627>>2]|0; - $1636 = (_Huffmancode($gfc,$1634,$$$i26$i,$1635,$1467)|0); - $1637 = (($1636) + ($1632))|0; - $data_bits$5$i = $1637;$scale_bits$4$i = $scale_bits$1$lcssa$i$lcssa; - } else { - $scale_bits$265$i = 0;$sfb$466$i = 0;$sfb_partition$164$i = 0; - while(1) { - $1638 = HEAP32[$1471>>2]|0; - $1639 = (($1638) + ($sfb_partition$164$i<<2)|0); - $1640 = HEAP32[$1639>>2]|0; - $1641 = ((((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 5192|0) + ($sfb_partition$164$i<<2)|0); - $1642 = HEAP32[$1641>>2]|0; - $1643 = ($1640|0)>(0); - if ($1643) { - $1644 = ($1642|0)>(0); - if ($1644) { - $i$156$us$i = 0;$sfb$558$us$i = $sfb$466$i; - while(1) { - $1645 = ((((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4608|0) + ($sfb$558$us$i<<2)|0); - $1646 = HEAP32[$1645>>2]|0; - $1647 = ($1646|0)>(0); - $$2$us$i = $1647 ? $1646 : 0; - $$01$i28$us$i = $1642; - while(1) { - $1648 = HEAP32[$1290>>2]|0; - $1649 = ($1648|0)==(0); - if ($1649) { - HEAP32[$1290>>2] = 8; - $1650 = HEAP32[$1291>>2]|0; - $1651 = (($1650) + 1)|0; - HEAP32[$1291>>2] = $1651; - $1652 = HEAP32[$1222>>2]|0; - $1653 = (((($gfc)) + 39840|0) + (($1652*48)|0)|0); - $1654 = HEAP32[$1653>>2]|0; - $1655 = HEAP32[$1292>>2]|0; - $1656 = ($1654|0)==($1655|0); - if ($1656) { - $1657 = HEAP32[$1293>>2]|0; - $1658 = (($1657) + ($1651)|0); - $1659 = (((((($gfc)) + 39840|0) + (($1652*48)|0)|0)) + 8|0); - $1660 = HEAP32[$21>>2]|0; - _memcpy(($1658|0),($1659|0),($1660|0))|0; - $1661 = HEAP32[$21>>2]|0; - $1662 = HEAP32[$1291>>2]|0; - $1663 = (($1662) + ($1661))|0; - HEAP32[$1291>>2] = $1663; - $1664 = $1661 << 3; - $1665 = HEAP32[$1292>>2]|0; - $1666 = (($1665) + ($1664))|0; - HEAP32[$1292>>2] = $1666; - $1667 = HEAP32[$1222>>2]|0; - $1668 = (($1667) + 1)|0; - $1669 = $1668 & 255; - HEAP32[$1222>>2] = $1669; - $1672 = $1663; - } else { - $1672 = $1651; - } - $1670 = HEAP32[$1293>>2]|0; - $1671 = (($1670) + ($1672)|0); - HEAP8[$1671>>0] = 0; - $$pre$i29$us$i = HEAP32[$1290>>2]|0; - $1674 = $$pre$i29$us$i; - } else { - $1674 = $1648; - } - $1673 = ($$01$i28$us$i|0)<($1674|0); - $$0$$i30$us$i = $1673 ? $$01$i28$us$i : $1674; - $1675 = (($$01$i28$us$i) - ($$0$$i30$us$i))|0; - $1676 = (($1674) - ($$0$$i30$us$i))|0; - HEAP32[$1290>>2] = $1676; - $1677 = $$2$us$i >> $1675; - $1678 = $1677 << $1676; - $1679 = HEAP32[$1291>>2]|0; - $1680 = HEAP32[$1293>>2]|0; - $1681 = (($1680) + ($1679)|0); - $1682 = HEAP8[$1681>>0]|0; - $1683 = $1682&255; - $1684 = $1678 | $1683; - $1685 = $1684&255; - HEAP8[$1681>>0] = $1685; - $1686 = HEAP32[$1292>>2]|0; - $1687 = (($1686) + ($$0$$i30$us$i))|0; - HEAP32[$1292>>2] = $1687; - $1688 = ($1675|0)>(0); - if ($1688) { - $$01$i28$us$i = $1675; - } else { - break; - } - } - $1689 = (($i$156$us$i) + 1)|0; - $1690 = (($sfb$558$us$i) + 1)|0; - $exitcond93$i = ($1689|0)==($1640|0); - if ($exitcond93$i) { - break; - } else { - $i$156$us$i = $1689;$sfb$558$us$i = $1690; - } - } - } - $$pn100$i = Math_imul($1642, $1640)|0; - $split63$i = (($$pn100$i) + ($scale_bits$265$i))|0; - $split62$i = (($1640) + ($sfb$466$i))|0; - $scale_bits$3$lcssa$i = $split63$i;$sfb$5$lcssa$i = $split62$i; - } else { - $scale_bits$3$lcssa$i = $scale_bits$265$i;$sfb$5$lcssa$i = $sfb$466$i; - } - $1691 = (($sfb_partition$164$i) + 1)|0; - $exitcond94$i = ($1691|0)==(4); - if ($exitcond94$i) { - $scale_bits$3$lcssa$i$lcssa = $scale_bits$3$lcssa$i; - break; - } else { - $scale_bits$265$i = $scale_bits$3$lcssa$i;$sfb$466$i = $sfb$5$lcssa$i;$sfb_partition$164$i = $1691; - } - } - $1692 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4772|0); - $1693 = HEAP32[$1692>>2]|0; - $1694 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4824|0); - $1695 = HEAP32[$1694>>2]|0; - $1696 = (($1695) + 1)|0; - $1697 = (((($gfc)) + 21360|0) + ($1696<<2)|0); - $1698 = HEAP32[$1697>>2]|0; - $1699 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4828|0); - $1700 = HEAP32[$1699>>2]|0; - $1701 = (($1695) + 2)|0; - $1702 = (($1701) + ($1700))|0; - $1703 = (((($gfc)) + 21360|0) + ($1702<<2)|0); - $1704 = HEAP32[$1703>>2]|0; - $1705 = ($1698|0)>($1693|0); - $$$i$i = $1705 ? $1693 : $1698; - $1706 = ($1704|0)>($1693|0); - $region2Start$0$i$i = $1706 ? $1693 : $1704; - $1707 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4796|0); - $1708 = HEAP32[$1707>>2]|0; - $1709 = (_Huffmancode($gfc,$1708,0,$$$i$i,$1467)|0); - $1710 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4800|0); - $1711 = HEAP32[$1710>>2]|0; - $1712 = (_Huffmancode($gfc,$1711,$$$i$i,$region2Start$0$i$i,$1467)|0); - $1713 = (($1712) + ($1709))|0; - $1714 = (((((($gfc)) + 304|0) + (($ch$179$i*5252)|0)|0)) + 4804|0); - $1715 = HEAP32[$1714>>2]|0; - $1716 = (_Huffmancode($gfc,$1715,$region2Start$0$i$i,$1693,$1467)|0); - $1717 = (($1713) + ($1716))|0; - $data_bits$5$i = $1717;$scale_bits$4$i = $scale_bits$3$lcssa$i$lcssa; - } - $1718 = (_huffman_coder_count1($gfc,$1467)|0); - $1719 = (($scale_bits$4$i) + ($tot_bits$278$i))|0; - $1720 = (($1719) + ($data_bits$5$i))|0; - $1721 = (($1720) + ($1718))|0; - $1722 = (($ch$179$i) + 1)|0; - $1723 = HEAP32[$1287>>2]|0; - $1724 = ($1722|0)<($1723|0); - if ($1724) { - $ch$179$i = $1722;$tot_bits$278$i = $1721; - } else { - $$pre$phiZ2D = $1292;$tot_bits$3$i = $1721; - break; - } - } - } - } while(0); - $1725 = (($tot_bits$3$i) + ($1284))|0; - $1726 = ((($gfc)) + 21324|0); - $1727 = HEAP32[$1726>>2]|0; - _drain_into_ancillary($gfc,$1727); - $1728 = HEAP32[$1726>>2]|0; - $1729 = (($1725) + ($1728))|0; - $1730 = (($14) - ($1729))|0; - $1731 = (($1730|0) / 8)&-1; - $1732 = HEAP32[$298>>2]|0; - $1733 = (($1732) + ($1731))|0; - HEAP32[$298>>2] = $1733; - $1734 = HEAP32[$1222>>2]|0; - $1735 = HEAP32[$17>>2]|0; - $1736 = (($1735) + -1)|0; - $1737 = ($1735|0)==(0); - $$$i = $1737 ? 255 : $1736; - $1738 = (((($gfc)) + 39840|0) + (($$$i*48)|0)|0); - $1739 = HEAP32[$1738>>2]|0; - $1740 = HEAP32[$$pre$phiZ2D>>2]|0; - $1741 = (($1739) - ($1740))|0; - $1742 = ($1741|0)>(-1); - if ($1742) { - $1743 = (1 - ($1734))|0; - $1744 = (($$$i) + ($1743))|0; - $1745 = ($$$i|0)<($1734|0); - $1746 = (($1744) + 256)|0; - $$1$i = $1745 ? $1746 : $1744; - $1747 = $$1$i << 3; - $1748 = HEAP32[$21>>2]|0; - $1749 = Math_imul($1747, $1748)|0; - $1750 = (($1741) - ($1749))|0; - $flushbits$0$i = $1750; - } else { - $flushbits$0$i = $1741; - } - $1751 = HEAP32[$1>>2]|0; - $1752 = ($1751|0)==(0); - if ($1752) { - $1755 = ((($gfc)) + 120|0); - $$idx$val$pre$i$i = HEAP32[$0>>2]|0; - $$idx$val$i$i = $$idx$val$pre$i$i;$bit_rate$0$in$i$i = $1755; - } else { - $1753 = HEAP32[$0>>2]|0; - $1754 = ((83944 + ($1753<<6)|0) + ($1751<<2)|0); - $$idx$val$i$i = $1753;$bit_rate$0$in$i$i = $1754; - } - $bit_rate$0$i$i = HEAP32[$bit_rate$0$in$i$i>>2]|0; - $1756 = HEAP32[$7>>2]|0; - $$idx1$val$i$i = HEAP32[$$idx1$i>>2]|0; - $1757 = ($$idx$val$i$i*72000)|0; - $1758 = (($1757) + 72000)|0; - $1759 = Math_imul($1758, $bit_rate$0$i$i)|0; - $1760 = (($1759|0) / ($$idx1$val$i$i|0))&-1; - $1761 = (($1760) + ($1756))|0; - $1762 = $1761 << 3; - $1763 = (($1762) + ($flushbits$0$i))|0; - $1764 = ($1763|0)<(0); - if ($1764) { - _lame_errorf($gfc,1072,$vararg_buffer1); - } - $1765 = ((($gfc)) + 52140|0); - $1766 = HEAP32[$1765>>2]|0; - $1767 = ($1763|0)==($1766|0); - if ($1767) { - $1771 = $1763; - } else { - _lame_errorf($gfc,1168,$vararg_buffer3); - $$pre = HEAP32[$1765>>2]|0; - $1771 = $$pre; - } - $1768 = HEAP32[$298>>2]|0; - $1769 = $1768 << 3; - $1770 = ($1769|0)==($1771|0); - if (!($1770)) { - $1772 = HEAP32[$1726>>2]|0; - $1773 = HEAP32[$15>>2]|0; - $1774 = HEAP32[$21>>2]|0; - $1775 = $1774 << 3; - $1776 = (($1729) - ($1772))|0; - $1777 = (($1776) - ($1775))|0; - $1778 = (($1729|0) % 8)&-1; - HEAP32[$vararg_buffer5>>2] = $1769; - $vararg_ptr7 = ((($vararg_buffer5)) + 4|0); - HEAP32[$vararg_ptr7>>2] = $1771; - $vararg_ptr8 = ((($vararg_buffer5)) + 8|0); - HEAP32[$vararg_ptr8>>2] = $1772; - $vararg_ptr9 = ((($vararg_buffer5)) + 12|0); - HEAP32[$vararg_ptr9>>2] = $1773; - $vararg_ptr10 = ((($vararg_buffer5)) + 16|0); - HEAP32[$vararg_ptr10>>2] = $1775; - $vararg_ptr11 = ((($vararg_buffer5)) + 20|0); - HEAP32[$vararg_ptr11>>2] = $1777; - $vararg_ptr12 = ((($vararg_buffer5)) + 24|0); - HEAP32[$vararg_ptr12>>2] = $1729; - $vararg_ptr13 = ((($vararg_buffer5)) + 28|0); - HEAP32[$vararg_ptr13>>2] = $1778; - $vararg_ptr14 = ((($vararg_buffer5)) + 32|0); - HEAP32[$vararg_ptr14>>2] = $14; - _lame_errorf($gfc,1224,$vararg_buffer5); - _lame_errorf($gfc,1504,$vararg_buffer15); - _lame_errorf($gfc,1560,$vararg_buffer17); - _lame_errorf($gfc,1640,$vararg_buffer19); - _lame_errorf($gfc,1680,$vararg_buffer21); - $1779 = HEAP32[$298>>2]|0; - $1780 = $1779 << 3; - HEAP32[$1765>>2] = $1780; - } - $1781 = HEAP32[$$pre$phiZ2D>>2]|0; - $1782 = ($1781|0)>(1000000000); - if ($1782) { - $i$091 = 0; - } else { - STACKTOP = sp;return 0; - } - while(1) { - $1783 = (((($gfc)) + 39840|0) + (($i$091*48)|0)|0); - $1784 = HEAP32[$1783>>2]|0; - $1785 = (($1784) - ($1781))|0; - HEAP32[$1783>>2] = $1785; - $1786 = (($i$091) + 1)|0; - $exitcond = ($1786|0)==(256); - if ($exitcond) { - break; - } else { - $i$091 = $1786; - } - } - HEAP32[$$pre$phiZ2D>>2] = 0; - STACKTOP = sp;return 0; -} -function _copy_buffer($gfc,$buffer,$size,$mp3data) { - $gfc = $gfc|0; - $buffer = $buffer|0; - $size = $size|0; - $mp3data = $mp3data|0; - var $$$i = 0, $$0 = 0, $$pre$i = 0.0, $$pre8$i = 0.0, $$pre8$i$lcssa = 0.0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; - var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; - var $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond$i = 0; - var $exitcond7$i = 0, $i$03$i = 0, $i$14$i = 0, $mp3_in$06$i = 0, $or$cond$i = 0, $pcm_buf$i = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 9216|0; - $pcm_buf$i = sp; - $0 = ((($gfc)) + 296|0); - $1 = HEAP32[$0>>2]|0; - $2 = (($1) + 1)|0; - $3 = ($1|0)<(0); - if ($3) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $4 = ($size|0)==(0); - $5 = ($1|0)<($size|0); - $or$cond$i = $4 | $5; - if (!($or$cond$i)) { - $$0 = -1; - STACKTOP = sp;return ($$0|0); - } - $6 = ((($gfc)) + 284|0); - $7 = HEAP32[$6>>2]|0; - _memcpy(($buffer|0),($7|0),($2|0))|0; - HEAP32[$0>>2] = -1; - $8 = ((($gfc)) + 300|0); - HEAP32[$8>>2] = 0; - $9 = ($mp3data|0)==(0); - if ($9) { - $$0 = $2; - STACKTOP = sp;return ($$0|0); - } - $10 = ((($gfc)) + 85752|0); - _UpdateMusicCRC($10,$buffer,$2); - $11 = ((($gfc)) + 85788|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($12) + ($2))|0; - HEAP32[$11>>2] = $13; - $14 = ((($gfc)) + 136|0); - $15 = HEAP32[$14>>2]|0; - $16 = ($15|0)==(0); - if ($16) { - $$0 = $2; - STACKTOP = sp;return ($$0|0); - } - $17 = ((($gfc)) + 85808|0); - $18 = ((($pcm_buf$i)) + 4608|0); - $19 = ((($gfc)) + 132|0); - $20 = ((($gfc)) + 128|0); - $21 = ((($gfc)) + 85676|0); - $22 = ((($gfc)) + 72|0); - $23 = ((($gfc)) + 85684|0); - $mp3_in$06$i = $2; - while(1) { - $24 = HEAP32[$17>>2]|0; - $25 = (_hip_decode1_unclipped(($24|0),($buffer|0),($mp3_in$06$i|0),($pcm_buf$i|0),($18|0))|0); - $26 = ($25|0)==(-1); - $$$i = $26 ? 0 : $25; - $27 = ($$$i|0)>(0); - if ($27) { - $28 = HEAP32[$19>>2]|0; - $29 = ($28|0)==(0); - if (!($29)) { - $$pre$i = +HEAPF32[$23>>2]; - $33 = $$pre$i;$i$03$i = 0; - while(1) { - $30 = (($pcm_buf$i) + ($i$03$i<<2)|0); - $31 = +HEAPF32[$30>>2]; - $32 = $31 > $33; - if ($32) { - HEAPF32[$23>>2] = $31; - $$pre8$i = $31; - } else { - $34 = -$31; - $35 = $33 < $34; - if ($35) { - HEAPF32[$23>>2] = $34; - $$pre8$i = $34; - } else { - $$pre8$i = $33; - } - } - $36 = (($i$03$i) + 1)|0; - $exitcond$i = ($36|0)==($$$i|0); - if ($exitcond$i) { - $$pre8$i$lcssa = $$pre8$i; - break; - } else { - $33 = $$pre8$i;$i$03$i = $36; - } - } - $37 = HEAP32[$22>>2]|0; - $38 = ($37|0)>(1); - if ($38) { - $42 = $$pre8$i$lcssa;$i$14$i = 0; - while(1) { - $39 = (((($pcm_buf$i)) + 4608|0) + ($i$14$i<<2)|0); - $40 = +HEAPF32[$39>>2]; - $41 = $40 > $42; - if ($41) { - HEAPF32[$23>>2] = $40; - $53 = $40; - } else { - $43 = -$40; - $44 = $42 < $43; - if ($44) { - HEAPF32[$23>>2] = $43; - $53 = $43; - } else { - $53 = $42; - } - } - $45 = (($i$14$i) + 1)|0; - $exitcond7$i = ($45|0)==($$$i|0); - if ($exitcond7$i) { - break; - } else { - $42 = $53;$i$14$i = $45; - } - } - } - } - $46 = HEAP32[$20>>2]|0; - $47 = ($46|0)==(0); - if (!($47)) { - $48 = HEAP32[$21>>2]|0; - $49 = HEAP32[$22>>2]|0; - $50 = (_AnalyzeSamples(($48|0),($pcm_buf$i|0),($18|0),($$$i|0),($49|0))|0); - $51 = ($50|0)==(0); - if ($51) { - label = 24; - break; - } - } - } - $52 = ($$$i|0)==(0); - if ($52) { - label = 23; - break; - } else { - $mp3_in$06$i = 0; - } - } - if ((label|0) == 23) { - $$0 = $2; - STACKTOP = sp;return ($$0|0); - } - else if ((label|0) == 24) { - $$0 = -6; - STACKTOP = sp;return ($$0|0); - } - return (0)|0; -} -function _init_bit_stream_w($gfc) { - $gfc = $gfc|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 52132|0); - HEAP32[$0>>2] = 0; - $1 = ((($gfc)) + 52128|0); - HEAP32[$1>>2] = 0; - $2 = ((($gfc)) + 39840|0); - HEAP32[$2>>2] = 0; - $3 = (_malloc(147456)|0); - $4 = ((($gfc)) + 284|0); - HEAP32[$4>>2] = $3; - $5 = ((($gfc)) + 288|0); - HEAP32[$5>>2] = 147456; - $6 = ((($gfc)) + 296|0); - HEAP32[$6>>2] = -1; - $7 = ((($gfc)) + 300|0); - HEAP32[$7>>2] = 0; - $8 = ((($gfc)) + 292|0); - HEAP32[$8>>2] = 0; - return; -} -function _drain_into_ancillary($gfc,$remainingBits) { - $gfc = $gfc|0; - $remainingBits = $remainingBits|0; - var $$0$$i = 0, $$0$$i11 = 0, $$0$$i15 = 0, $$0$$i19 = 0, $$0$$i3 = 0, $$0$$i7 = 0, $$01$i = 0, $$01$i1 = 0, $$01$i13 = 0, $$01$i17 = 0, $$01$i5 = 0, $$01$i9 = 0, $$428 = 0, $$5$ph = 0, $$5$ph30 = 0, $$526 = 0, $$lcssa42 = 0, $$lcssa43 = 0, $$lcssa44 = 0, $$pre = 0; - var $$pre$i = 0, $$pre$i10 = 0, $$pre$i14 = 0, $$pre$i18 = 0, $$pre$i2 = 0, $$pre$i6 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0; - var $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0; - var $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0; - var $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0; - var $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0; - var $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0; - var $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0; - var $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0; - var $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0; - var $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0; - var $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $3 = 0; - var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0; - var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0; - var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0; - var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i$027 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($remainingBits|0)>(7); - if ($0) { - $10 = ((($gfc)) + 300|0); - $11 = ((($gfc)) + 296|0); - $12 = ((($gfc)) + 52132|0); - $13 = ((($gfc)) + 292|0); - $14 = ((($gfc)) + 284|0); - $15 = ((($gfc)) + 24|0); - $$01$i = 8; - while(1) { - $16 = HEAP32[$10>>2]|0; - $17 = ($16|0)==(0); - if ($17) { - HEAP32[$10>>2] = 8; - $18 = HEAP32[$11>>2]|0; - $19 = (($18) + 1)|0; - HEAP32[$11>>2] = $19; - $20 = HEAP32[$12>>2]|0; - $21 = (((($gfc)) + 39840|0) + (($20*48)|0)|0); - $22 = HEAP32[$21>>2]|0; - $23 = HEAP32[$13>>2]|0; - $24 = ($22|0)==($23|0); - if ($24) { - $25 = HEAP32[$14>>2]|0; - $26 = (($25) + ($19)|0); - $27 = (((((($gfc)) + 39840|0) + (($20*48)|0)|0)) + 8|0); - $28 = HEAP32[$15>>2]|0; - _memcpy(($26|0),($27|0),($28|0))|0; - $29 = HEAP32[$15>>2]|0; - $30 = HEAP32[$11>>2]|0; - $31 = (($30) + ($29))|0; - HEAP32[$11>>2] = $31; - $32 = $29 << 3; - $33 = HEAP32[$13>>2]|0; - $34 = (($33) + ($32))|0; - HEAP32[$13>>2] = $34; - $35 = HEAP32[$12>>2]|0; - $36 = (($35) + 1)|0; - $37 = $36 & 255; - HEAP32[$12>>2] = $37; - $40 = $31; - } else { - $40 = $19; - } - $38 = HEAP32[$14>>2]|0; - $39 = (($38) + ($40)|0); - HEAP8[$39>>0] = 0; - $$pre$i = HEAP32[$10>>2]|0; - $42 = $$pre$i; - } else { - $42 = $16; - } - $41 = ($$01$i|0)<($42|0); - $$0$$i = $41 ? $$01$i : $42; - $43 = (($$01$i) - ($$0$$i))|0; - $44 = (($42) - ($$0$$i))|0; - HEAP32[$10>>2] = $44; - $45 = 76 >>> $43; - $46 = $45 << $44; - $47 = HEAP32[$11>>2]|0; - $48 = HEAP32[$14>>2]|0; - $49 = (($48) + ($47)|0); - $50 = HEAP8[$49>>0]|0; - $51 = $50&255; - $52 = $46 | $51; - $53 = $52&255; - HEAP8[$49>>0] = $53; - $54 = HEAP32[$13>>2]|0; - $55 = (($54) + ($$0$$i))|0; - HEAP32[$13>>2] = $55; - $56 = ($43|0)>(0); - if ($56) { - $$01$i = $43; - } else { - $$lcssa44 = $55; - break; - } - } - $57 = (($remainingBits) + -8)|0; - $58 = ($57|0)>(7); - if ($58) { - $$01$i17 = 8;$67 = $$lcssa44; - while(1) { - $59 = HEAP32[$10>>2]|0; - $60 = ($59|0)==(0); - if ($60) { - HEAP32[$10>>2] = 8; - $61 = HEAP32[$11>>2]|0; - $62 = (($61) + 1)|0; - HEAP32[$11>>2] = $62; - $63 = HEAP32[$12>>2]|0; - $64 = (((($gfc)) + 39840|0) + (($63*48)|0)|0); - $65 = HEAP32[$64>>2]|0; - $66 = ($65|0)==($67|0); - if ($66) { - $68 = HEAP32[$14>>2]|0; - $69 = (($68) + ($62)|0); - $70 = (((((($gfc)) + 39840|0) + (($63*48)|0)|0)) + 8|0); - $71 = HEAP32[$15>>2]|0; - _memcpy(($69|0),($70|0),($71|0))|0; - $72 = HEAP32[$15>>2]|0; - $73 = HEAP32[$11>>2]|0; - $74 = (($73) + ($72))|0; - HEAP32[$11>>2] = $74; - $75 = $72 << 3; - $76 = HEAP32[$13>>2]|0; - $77 = (($76) + ($75))|0; - HEAP32[$13>>2] = $77; - $78 = HEAP32[$12>>2]|0; - $79 = (($78) + 1)|0; - $80 = $79 & 255; - HEAP32[$12>>2] = $80; - $83 = $74; - } else { - $83 = $62; - } - $81 = HEAP32[$14>>2]|0; - $82 = (($81) + ($83)|0); - HEAP8[$82>>0] = 0; - $$pre$i18 = HEAP32[$10>>2]|0; - $85 = $$pre$i18; - } else { - $85 = $59; - } - $84 = ($$01$i17|0)<($85|0); - $$0$$i19 = $84 ? $$01$i17 : $85; - $86 = (($$01$i17) - ($$0$$i19))|0; - $87 = (($85) - ($$0$$i19))|0; - HEAP32[$10>>2] = $87; - $88 = 65 >>> $86; - $89 = $88 << $87; - $90 = HEAP32[$11>>2]|0; - $91 = HEAP32[$14>>2]|0; - $92 = (($91) + ($90)|0); - $93 = HEAP8[$92>>0]|0; - $94 = $93&255; - $95 = $89 | $94; - $96 = $95&255; - HEAP8[$92>>0] = $96; - $97 = HEAP32[$13>>2]|0; - $98 = (($97) + ($$0$$i19))|0; - HEAP32[$13>>2] = $98; - $99 = ($86|0)>(0); - if ($99) { - $$01$i17 = $86;$67 = $98; - } else { - $$lcssa43 = $98; - break; - } - } - $100 = (($remainingBits) + -16)|0; - $101 = ($100|0)>(7); - if ($101) { - $$01$i13 = 8;$110 = $$lcssa43; - while(1) { - $102 = HEAP32[$10>>2]|0; - $103 = ($102|0)==(0); - if ($103) { - HEAP32[$10>>2] = 8; - $104 = HEAP32[$11>>2]|0; - $105 = (($104) + 1)|0; - HEAP32[$11>>2] = $105; - $106 = HEAP32[$12>>2]|0; - $107 = (((($gfc)) + 39840|0) + (($106*48)|0)|0); - $108 = HEAP32[$107>>2]|0; - $109 = ($108|0)==($110|0); - if ($109) { - $111 = HEAP32[$14>>2]|0; - $112 = (($111) + ($105)|0); - $113 = (((((($gfc)) + 39840|0) + (($106*48)|0)|0)) + 8|0); - $114 = HEAP32[$15>>2]|0; - _memcpy(($112|0),($113|0),($114|0))|0; - $115 = HEAP32[$15>>2]|0; - $116 = HEAP32[$11>>2]|0; - $117 = (($116) + ($115))|0; - HEAP32[$11>>2] = $117; - $118 = $115 << 3; - $119 = HEAP32[$13>>2]|0; - $120 = (($119) + ($118))|0; - HEAP32[$13>>2] = $120; - $121 = HEAP32[$12>>2]|0; - $122 = (($121) + 1)|0; - $123 = $122 & 255; - HEAP32[$12>>2] = $123; - $126 = $117; - } else { - $126 = $105; - } - $124 = HEAP32[$14>>2]|0; - $125 = (($124) + ($126)|0); - HEAP8[$125>>0] = 0; - $$pre$i14 = HEAP32[$10>>2]|0; - $128 = $$pre$i14; - } else { - $128 = $102; - } - $127 = ($$01$i13|0)<($128|0); - $$0$$i15 = $127 ? $$01$i13 : $128; - $129 = (($$01$i13) - ($$0$$i15))|0; - $130 = (($128) - ($$0$$i15))|0; - HEAP32[$10>>2] = $130; - $131 = 77 >>> $129; - $132 = $131 << $130; - $133 = HEAP32[$11>>2]|0; - $134 = HEAP32[$14>>2]|0; - $135 = (($134) + ($133)|0); - $136 = HEAP8[$135>>0]|0; - $137 = $136&255; - $138 = $132 | $137; - $139 = $138&255; - HEAP8[$135>>0] = $139; - $140 = HEAP32[$13>>2]|0; - $141 = (($140) + ($$0$$i15))|0; - HEAP32[$13>>2] = $141; - $142 = ($129|0)>(0); - if ($142) { - $$01$i13 = $129;$110 = $141; - } else { - $$lcssa42 = $141; - break; - } - } - $143 = (($remainingBits) + -24)|0; - $144 = ($143|0)>(7); - if ($144) { - $$01$i9 = 8;$153 = $$lcssa42; - while(1) { - $145 = HEAP32[$10>>2]|0; - $146 = ($145|0)==(0); - if ($146) { - HEAP32[$10>>2] = 8; - $147 = HEAP32[$11>>2]|0; - $148 = (($147) + 1)|0; - HEAP32[$11>>2] = $148; - $149 = HEAP32[$12>>2]|0; - $150 = (((($gfc)) + 39840|0) + (($149*48)|0)|0); - $151 = HEAP32[$150>>2]|0; - $152 = ($151|0)==($153|0); - if ($152) { - $154 = HEAP32[$14>>2]|0; - $155 = (($154) + ($148)|0); - $156 = (((((($gfc)) + 39840|0) + (($149*48)|0)|0)) + 8|0); - $157 = HEAP32[$15>>2]|0; - _memcpy(($155|0),($156|0),($157|0))|0; - $158 = HEAP32[$15>>2]|0; - $159 = HEAP32[$11>>2]|0; - $160 = (($159) + ($158))|0; - HEAP32[$11>>2] = $160; - $161 = $158 << 3; - $162 = HEAP32[$13>>2]|0; - $163 = (($162) + ($161))|0; - HEAP32[$13>>2] = $163; - $164 = HEAP32[$12>>2]|0; - $165 = (($164) + 1)|0; - $166 = $165 & 255; - HEAP32[$12>>2] = $166; - $169 = $160; - } else { - $169 = $148; - } - $167 = HEAP32[$14>>2]|0; - $168 = (($167) + ($169)|0); - HEAP8[$168>>0] = 0; - $$pre$i10 = HEAP32[$10>>2]|0; - $171 = $$pre$i10; - } else { - $171 = $145; - } - $170 = ($$01$i9|0)<($171|0); - $$0$$i11 = $170 ? $$01$i9 : $171; - $172 = (($$01$i9) - ($$0$$i11))|0; - $173 = (($171) - ($$0$$i11))|0; - HEAP32[$10>>2] = $173; - $174 = 69 >>> $172; - $175 = $174 << $173; - $176 = HEAP32[$11>>2]|0; - $177 = HEAP32[$14>>2]|0; - $178 = (($177) + ($176)|0); - $179 = HEAP8[$178>>0]|0; - $180 = $179&255; - $181 = $175 | $180; - $182 = $181&255; - HEAP8[$178>>0] = $182; - $183 = HEAP32[$13>>2]|0; - $184 = (($183) + ($$0$$i11))|0; - HEAP32[$13>>2] = $184; - $185 = ($172|0)>(0); - if ($185) { - $$01$i9 = $172;$153 = $184; - } else { - break; - } - } - $186 = (($remainingBits) + -32)|0; - $187 = ($186|0)>(31); - if ($187) { - $188 = (_get_lame_short_version()|0); - $189 = (_strlen(($188|0))|0); - $190 = ($189|0)>(0); - if ($190) { - $$428 = $186;$i$027 = 0; - while(1) { - $191 = (($188) + ($i$027)|0); - $192 = HEAP8[$191>>0]|0; - $193 = $192 << 24 >> 24; - $$01$i5 = 8; - while(1) { - $194 = HEAP32[$10>>2]|0; - $195 = ($194|0)==(0); - if ($195) { - HEAP32[$10>>2] = 8; - $196 = HEAP32[$11>>2]|0; - $197 = (($196) + 1)|0; - HEAP32[$11>>2] = $197; - $198 = HEAP32[$12>>2]|0; - $199 = (((($gfc)) + 39840|0) + (($198*48)|0)|0); - $200 = HEAP32[$199>>2]|0; - $201 = HEAP32[$13>>2]|0; - $202 = ($200|0)==($201|0); - if ($202) { - $203 = HEAP32[$14>>2]|0; - $204 = (($203) + ($197)|0); - $205 = (((((($gfc)) + 39840|0) + (($198*48)|0)|0)) + 8|0); - $206 = HEAP32[$15>>2]|0; - _memcpy(($204|0),($205|0),($206|0))|0; - $207 = HEAP32[$15>>2]|0; - $208 = HEAP32[$11>>2]|0; - $209 = (($208) + ($207))|0; - HEAP32[$11>>2] = $209; - $210 = $207 << 3; - $211 = HEAP32[$13>>2]|0; - $212 = (($211) + ($210))|0; - HEAP32[$13>>2] = $212; - $213 = HEAP32[$12>>2]|0; - $214 = (($213) + 1)|0; - $215 = $214 & 255; - HEAP32[$12>>2] = $215; - $218 = $209; - } else { - $218 = $197; - } - $216 = HEAP32[$14>>2]|0; - $217 = (($216) + ($218)|0); - HEAP8[$217>>0] = 0; - $$pre$i6 = HEAP32[$10>>2]|0; - $220 = $$pre$i6; - } else { - $220 = $194; - } - $219 = ($$01$i5|0)<($220|0); - $$0$$i7 = $219 ? $$01$i5 : $220; - $221 = (($$01$i5) - ($$0$$i7))|0; - $222 = (($220) - ($$0$$i7))|0; - HEAP32[$10>>2] = $222; - $223 = $193 >> $221; - $224 = $223 << $222; - $225 = HEAP32[$11>>2]|0; - $226 = HEAP32[$14>>2]|0; - $227 = (($226) + ($225)|0); - $228 = HEAP8[$227>>0]|0; - $229 = $228&255; - $230 = $224 | $229; - $231 = $230&255; - HEAP8[$227>>0] = $231; - $232 = HEAP32[$13>>2]|0; - $233 = (($232) + ($$0$$i7))|0; - HEAP32[$13>>2] = $233; - $234 = ($221|0)>(0); - if ($234) { - $$01$i5 = $221; - } else { - break; - } - } - $235 = (($$428) + -8)|0; - $236 = (($i$027) + 1)|0; - $237 = (_strlen(($188|0))|0); - $238 = ($236|0)<($237|0); - $239 = ($235|0)>(7); - $240 = $239 & $238; - if ($240) { - $$428 = $235;$i$027 = $236; - } else { - $$5$ph = $235; - label = 2; - break; - } - } - } else { - $$5$ph30 = $186; - } - } else { - $$5$ph = $186; - label = 2; - } - } else { - $$5$ph = $143; - label = 2; - } - } else { - $$5$ph = $100; - label = 2; - } - } else { - $$5$ph = $57; - label = 2; - } - } else { - $$5$ph = $remainingBits; - label = 2; - } - if ((label|0) == 2) { - $1 = ($$5$ph|0)>(0); - if ($1) { - $$5$ph30 = $$5$ph; - } else { - return; - } - } - $2 = ((($gfc)) + 52136|0); - $3 = ((($gfc)) + 300|0); - $4 = ((($gfc)) + 296|0); - $5 = ((($gfc)) + 52132|0); - $6 = ((($gfc)) + 292|0); - $7 = ((($gfc)) + 284|0); - $8 = ((($gfc)) + 24|0); - $9 = ((($gfc)) + 144|0); - $$pre = HEAP32[$2>>2]|0; - $$526 = $$5$ph30;$271 = $$pre; - while(1) { - $$01$i1 = 1; - while(1) { - $241 = HEAP32[$3>>2]|0; - $242 = ($241|0)==(0); - if ($242) { - HEAP32[$3>>2] = 8; - $243 = HEAP32[$4>>2]|0; - $244 = (($243) + 1)|0; - HEAP32[$4>>2] = $244; - $245 = HEAP32[$5>>2]|0; - $246 = (((($gfc)) + 39840|0) + (($245*48)|0)|0); - $247 = HEAP32[$246>>2]|0; - $248 = HEAP32[$6>>2]|0; - $249 = ($247|0)==($248|0); - if ($249) { - $250 = HEAP32[$7>>2]|0; - $251 = (($250) + ($244)|0); - $252 = (((((($gfc)) + 39840|0) + (($245*48)|0)|0)) + 8|0); - $253 = HEAP32[$8>>2]|0; - _memcpy(($251|0),($252|0),($253|0))|0; - $254 = HEAP32[$8>>2]|0; - $255 = HEAP32[$4>>2]|0; - $256 = (($255) + ($254))|0; - HEAP32[$4>>2] = $256; - $257 = $254 << 3; - $258 = HEAP32[$6>>2]|0; - $259 = (($258) + ($257))|0; - HEAP32[$6>>2] = $259; - $260 = HEAP32[$5>>2]|0; - $261 = (($260) + 1)|0; - $262 = $261 & 255; - HEAP32[$5>>2] = $262; - $265 = $256; - } else { - $265 = $244; - } - $263 = HEAP32[$7>>2]|0; - $264 = (($263) + ($265)|0); - HEAP8[$264>>0] = 0; - $$pre$i2 = HEAP32[$3>>2]|0; - $267 = $$pre$i2; - } else { - $267 = $241; - } - $266 = ($$01$i1|0)<($267|0); - $$0$$i3 = $266 ? $$01$i1 : $267; - $268 = (($$01$i1) - ($$0$$i3))|0; - $269 = (($267) - ($$0$$i3))|0; - HEAP32[$3>>2] = $269; - $270 = $271 >> $268; - $272 = $270 << $269; - $273 = HEAP32[$4>>2]|0; - $274 = HEAP32[$7>>2]|0; - $275 = (($274) + ($273)|0); - $276 = HEAP8[$275>>0]|0; - $277 = $276&255; - $278 = $272 | $277; - $279 = $278&255; - HEAP8[$275>>0] = $279; - $280 = HEAP32[$6>>2]|0; - $281 = (($280) + ($$0$$i3))|0; - HEAP32[$6>>2] = $281; - $282 = ($268|0)>(0); - if ($282) { - $$01$i1 = $268; - } else { - break; - } - } - $283 = HEAP32[$9>>2]|0; - $284 = ($283|0)==(0); - $285 = $284&1; - $286 = HEAP32[$2>>2]|0; - $287 = $285 ^ $286; - HEAP32[$2>>2] = $287; - $288 = (($$526) + -1)|0; - $289 = ($$526|0)>(1); - if ($289) { - $$526 = $288;$271 = $287; - } else { - break; - } - } - return; -} -function _Huffmancode($gfc,$tableindex,$start,$end,$gi) { - $gfc = $gfc|0; - $tableindex = $tableindex|0; - $start = $start|0; - $end = $end|0; - $gi = $gi|0; - var $$0 = 0, $$0$$i = 0, $$0$$i4 = 0, $$01$i = 0, $$01$i2 = 0, $$pre$i = 0, $$pre$i3 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; - var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0; - var $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0; - var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0; - var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; - var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0; - var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0; - var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $bits$015 = 0, $cbits$0 = 0, $cbits$1 = 0, $ext$0 = 0, $ext$1 = 0, $ext$2 = 0, $ext$4 = 0; - var $ext$410 = 0, $ext$5 = 0, $ext$6 = 0, $i$016 = 0, $or$cond = 0, $x1$0 = 0, $x1$1 = 0, $x1$111 = 0, $x1$112 = 0, $x2$113 = 0, $x2$114 = 0, $xbits$0 = 0, $xbits$2 = 0, $xbits$26 = 0, $xbits$27 = 0, $xlen$0 = 0, $xlen$08 = 0, $xlen$09 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (82272 + ($tableindex<<4)|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($tableindex|0)!=(0); - $3 = ($start|0)<($end|0); - $or$cond = $2 & $3; - if (!($or$cond)) { - $$0 = 0; - return ($$0|0); - } - $4 = ($tableindex>>>0)>(15); - $5 = $1&65535; - $6 = (((82272 + ($tableindex<<4)|0)) + 12|0); - $7 = HEAP32[$6>>2]|0; - $8 = (((82272 + ($tableindex<<4)|0)) + 8|0); - $9 = HEAP32[$8>>2]|0; - $10 = ((($gfc)) + 300|0); - $11 = ((($gfc)) + 296|0); - $12 = ((($gfc)) + 52132|0); - $13 = ((($gfc)) + 292|0); - $14 = ((($gfc)) + 284|0); - $15 = ((($gfc)) + 24|0); - $bits$015 = 0;$i$016 = $start; - while(1) { - $16 = (((($gi)) + 2304|0) + ($i$016<<2)|0); - $17 = HEAP32[$16>>2]|0; - $18 = (($i$016) + 1)|0; - $19 = (((($gi)) + 2304|0) + ($18<<2)|0); - $20 = HEAP32[$19>>2]|0; - $21 = ($17|0)==(0); - if ($21) { - $cbits$0 = 0;$ext$1 = 0; - } else { - $22 = (($gi) + ($i$016<<2)|0); - $23 = +HEAPF32[$22>>2]; - $24 = $23 < 0.0; - $ext$0 = $24&1; - $cbits$0 = -1;$ext$1 = $ext$0; - } - if ($4) { - $25 = ($17>>>0)>(14); - if ($25) { - $26 = $17 << 1; - $27 = (($26) + 131042)|0; - $28 = $27 & 131070; - $29 = $ext$1 | $28; - $ext$2 = $29;$x1$0 = 15;$xbits$0 = $5; - } else { - $ext$2 = $ext$1;$x1$0 = $17;$xbits$0 = 0; - } - $30 = ($20>>>0)>(14); - if ($30) { - $31 = (($20) + 65521)|0; - $32 = $ext$2 << $1; - $33 = $31 & 65535; - $34 = $32 | $33; - $35 = $xbits$0&65535; - $36 = (($35) + ($1))|0; - $37 = $36&65535; - $ext$410 = $34;$x1$111 = $x1$0;$x2$113 = 15;$xbits$26 = $37;$xlen$08 = 16; - label = 11; - } else { - $ext$4 = $ext$2;$x1$1 = $x1$0;$xbits$2 = $xbits$0;$xlen$0 = 16; - label = 10; - } - } else { - $ext$4 = $ext$1;$x1$1 = $17;$xbits$2 = 0;$xlen$0 = $1; - label = 10; - } - if ((label|0) == 10) { - label = 0; - $38 = ($20|0)==(0); - if ($38) { - $cbits$1 = $cbits$0;$ext$6 = $ext$4;$x1$112 = $x1$1;$x2$114 = 0;$xbits$27 = $xbits$2;$xlen$09 = $xlen$0; - } else { - $ext$410 = $ext$4;$x1$111 = $x1$1;$x2$113 = $20;$xbits$26 = $xbits$2;$xlen$08 = $xlen$0; - label = 11; - } - } - if ((label|0) == 11) { - label = 0; - $39 = $ext$410 << 1; - $40 = (($gi) + ($18<<2)|0); - $41 = +HEAPF32[$40>>2]; - $42 = $41 < 0.0; - $43 = $42&1; - $ext$5 = $43 | $39; - $44 = (($cbits$0) + -1)<<16>>16; - $cbits$1 = $44;$ext$6 = $ext$5;$x1$112 = $x1$111;$x2$114 = $x2$113;$xbits$27 = $xbits$26;$xlen$09 = $xlen$08; - } - $45 = Math_imul($xlen$09, $x1$112)|0; - $46 = (($45) + ($x2$114))|0; - $47 = $cbits$1 << 16 >> 16; - $48 = $xbits$27&65535; - $49 = (($48) - ($47))|0; - $50 = (($7) + ($46)|0); - $51 = HEAP8[$50>>0]|0; - $52 = $51&255; - $53 = (($52) + ($47))|0; - $54 = (($9) + ($46<<1)|0); - $55 = HEAP16[$54>>1]|0; - $56 = $55&65535; - $57 = ($53|0)>(0); - if ($57) { - $$01$i = $53; - while(1) { - $58 = HEAP32[$10>>2]|0; - $59 = ($58|0)==(0); - if ($59) { - HEAP32[$10>>2] = 8; - $60 = HEAP32[$11>>2]|0; - $61 = (($60) + 1)|0; - HEAP32[$11>>2] = $61; - $62 = HEAP32[$12>>2]|0; - $63 = (((($gfc)) + 39840|0) + (($62*48)|0)|0); - $64 = HEAP32[$63>>2]|0; - $65 = HEAP32[$13>>2]|0; - $66 = ($64|0)==($65|0); - if ($66) { - $67 = HEAP32[$14>>2]|0; - $68 = (($67) + ($61)|0); - $69 = (((((($gfc)) + 39840|0) + (($62*48)|0)|0)) + 8|0); - $70 = HEAP32[$15>>2]|0; - _memcpy(($68|0),($69|0),($70|0))|0; - $71 = HEAP32[$15>>2]|0; - $72 = HEAP32[$11>>2]|0; - $73 = (($72) + ($71))|0; - HEAP32[$11>>2] = $73; - $74 = $71 << 3; - $75 = HEAP32[$13>>2]|0; - $76 = (($75) + ($74))|0; - HEAP32[$13>>2] = $76; - $77 = HEAP32[$12>>2]|0; - $78 = (($77) + 1)|0; - $79 = $78 & 255; - HEAP32[$12>>2] = $79; - $82 = $73; - } else { - $82 = $61; - } - $80 = HEAP32[$14>>2]|0; - $81 = (($80) + ($82)|0); - HEAP8[$81>>0] = 0; - $$pre$i = HEAP32[$10>>2]|0; - $84 = $$pre$i; - } else { - $84 = $58; - } - $83 = ($$01$i|0)<($84|0); - $$0$$i = $83 ? $$01$i : $84; - $85 = (($$01$i) - ($$0$$i))|0; - $86 = (($84) - ($$0$$i))|0; - HEAP32[$10>>2] = $86; - $87 = $56 >>> $85; - $88 = $87 << $86; - $89 = HEAP32[$11>>2]|0; - $90 = HEAP32[$14>>2]|0; - $91 = (($90) + ($89)|0); - $92 = HEAP8[$91>>0]|0; - $93 = $92&255; - $94 = $88 | $93; - $95 = $94&255; - HEAP8[$91>>0] = $95; - $96 = HEAP32[$13>>2]|0; - $97 = (($96) + ($$0$$i))|0; - HEAP32[$13>>2] = $97; - $98 = ($85|0)>(0); - if ($98) { - $$01$i = $85; - } else { - break; - } - } - } - $99 = $49 & 65535; - $100 = ($99|0)==(0); - if (!($100)) { - $$01$i2 = $99; - while(1) { - $101 = HEAP32[$10>>2]|0; - $102 = ($101|0)==(0); - if ($102) { - HEAP32[$10>>2] = 8; - $103 = HEAP32[$11>>2]|0; - $104 = (($103) + 1)|0; - HEAP32[$11>>2] = $104; - $105 = HEAP32[$12>>2]|0; - $106 = (((($gfc)) + 39840|0) + (($105*48)|0)|0); - $107 = HEAP32[$106>>2]|0; - $108 = HEAP32[$13>>2]|0; - $109 = ($107|0)==($108|0); - if ($109) { - $110 = HEAP32[$14>>2]|0; - $111 = (($110) + ($104)|0); - $112 = (((((($gfc)) + 39840|0) + (($105*48)|0)|0)) + 8|0); - $113 = HEAP32[$15>>2]|0; - _memcpy(($111|0),($112|0),($113|0))|0; - $114 = HEAP32[$15>>2]|0; - $115 = HEAP32[$11>>2]|0; - $116 = (($115) + ($114))|0; - HEAP32[$11>>2] = $116; - $117 = $114 << 3; - $118 = HEAP32[$13>>2]|0; - $119 = (($118) + ($117))|0; - HEAP32[$13>>2] = $119; - $120 = HEAP32[$12>>2]|0; - $121 = (($120) + 1)|0; - $122 = $121 & 255; - HEAP32[$12>>2] = $122; - $125 = $116; - } else { - $125 = $104; - } - $123 = HEAP32[$14>>2]|0; - $124 = (($123) + ($125)|0); - HEAP8[$124>>0] = 0; - $$pre$i3 = HEAP32[$10>>2]|0; - $127 = $$pre$i3; - } else { - $127 = $101; - } - $126 = ($$01$i2|0)<($127|0); - $$0$$i4 = $126 ? $$01$i2 : $127; - $128 = (($$01$i2) - ($$0$$i4))|0; - $129 = (($127) - ($$0$$i4))|0; - HEAP32[$10>>2] = $129; - $130 = $ext$6 >> $128; - $131 = $130 << $129; - $132 = HEAP32[$11>>2]|0; - $133 = HEAP32[$14>>2]|0; - $134 = (($133) + ($132)|0); - $135 = HEAP8[$134>>0]|0; - $136 = $135&255; - $137 = $131 | $136; - $138 = $137&255; - HEAP8[$134>>0] = $138; - $139 = HEAP32[$13>>2]|0; - $140 = (($139) + ($$0$$i4))|0; - HEAP32[$13>>2] = $140; - $141 = ($128|0)>(0); - if ($141) { - $$01$i2 = $128; - } else { - break; - } - } - } - $142 = (($99) + ($bits$015))|0; - $143 = (($142) + ($53))|0; - $144 = (($i$016) + 2)|0; - $145 = ($144|0)<($end|0); - if ($145) { - $bits$015 = $143;$i$016 = $144; - } else { - $$0 = $143; - break; - } - } - return ($$0|0); -} -function _huffman_coder_count1($gfc,$gi) { - $gfc = $gfc|0; - $gi = $gi|0; - var $$0$$i = 0, $$01$i = 0, $$pre = 0, $$pre$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0; - var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0; - var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0; - var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0; - var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0; - var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $bits$0$lcssa = 0, $bits$02 = 0, $huffbits$0 = 0, $huffbits$1 = 0, $huffbits$2 = 0, $huffbits$3 = 0, $i$01 = 0; - var $ix$03 = 0, $p$0 = 0, $p$1 = 0, $p$2 = 0, $p$3 = 0, $xr$04 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gi)) + 4840|0); - $1 = HEAP32[$0>>2]|0; - $2 = (($1) + 32)|0; - $3 = ((($gi)) + 4772|0); - $4 = HEAP32[$3>>2]|0; - $5 = ((($gi)) + 4776|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($6) - ($4))|0; - $8 = ($7|0)>(3); - if (!($8)) { - $bits$0$lcssa = 0; - return ($bits$0$lcssa|0); - } - $9 = (($7|0) / 4)&-1; - $10 = (($gi) + ($4<<2)|0); - $11 = (((($gi)) + 2304|0) + ($4<<2)|0); - $12 = (((82272 + ($2<<4)|0)) + 8|0); - $13 = HEAP32[$12>>2]|0; - $14 = (((82272 + ($2<<4)|0)) + 12|0); - $15 = HEAP32[$14>>2]|0; - $16 = ((($gfc)) + 300|0); - $17 = ((($gfc)) + 296|0); - $18 = ((($gfc)) + 52132|0); - $19 = ((($gfc)) + 292|0); - $20 = ((($gfc)) + 284|0); - $21 = ((($gfc)) + 24|0); - $bits$02 = 0;$i$01 = $9;$ix$03 = $11;$xr$04 = $10; - while(1) { - $22 = HEAP32[$ix$03>>2]|0; - $23 = ($22|0)==(0); - if ($23) { - $huffbits$0 = 0;$p$0 = 0; - } else { - $24 = +HEAPF32[$xr$04>>2]; - $25 = $24 < 0.0; - if ($25) { - $huffbits$0 = 1;$p$0 = 8; - } else { - $huffbits$0 = 0;$p$0 = 8; - } - } - $26 = ((($ix$03)) + 4|0); - $27 = HEAP32[$26>>2]|0; - $28 = ($27|0)==(0); - if ($28) { - $huffbits$1 = $huffbits$0;$p$1 = $p$0; - } else { - $29 = $p$0 | 4; - $30 = $huffbits$0 << 1; - $31 = ((($xr$04)) + 4|0); - $32 = +HEAPF32[$31>>2]; - $33 = $32 < 0.0; - if ($33) { - $34 = $30 | 1; - $huffbits$1 = $34;$p$1 = $29; - } else { - $huffbits$1 = $30;$p$1 = $29; - } - } - $35 = ((($ix$03)) + 8|0); - $36 = HEAP32[$35>>2]|0; - $37 = ($36|0)==(0); - if ($37) { - $huffbits$2 = $huffbits$1;$p$2 = $p$1; - } else { - $38 = (($p$1) + 2)|0; - $39 = $huffbits$1 << 1; - $40 = ((($xr$04)) + 8|0); - $41 = +HEAPF32[$40>>2]; - $42 = $41 < 0.0; - if ($42) { - $43 = $39 | 1; - $huffbits$2 = $43;$p$2 = $38; - } else { - $huffbits$2 = $39;$p$2 = $38; - } - } - $44 = ((($ix$03)) + 12|0); - $45 = HEAP32[$44>>2]|0; - $46 = ($45|0)==(0); - if ($46) { - $huffbits$3 = $huffbits$2;$p$3 = $p$2; - } else { - $47 = (($p$2) + 1)|0; - $48 = $huffbits$2 << 1; - $49 = ((($xr$04)) + 12|0); - $50 = +HEAPF32[$49>>2]; - $51 = $50 < 0.0; - if ($51) { - $52 = $48 | 1; - $huffbits$3 = $52;$p$3 = $47; - } else { - $huffbits$3 = $48;$p$3 = $47; - } - } - $53 = ((($ix$03)) + 16|0); - $54 = ((($xr$04)) + 16|0); - $55 = (($13) + ($p$3<<1)|0); - $56 = HEAP16[$55>>1]|0; - $57 = $56&65535; - $58 = (($57) + ($huffbits$3))|0; - $59 = (($15) + ($p$3)|0); - $60 = HEAP8[$59>>0]|0; - $61 = ($60<<24>>24)==(0); - if ($61) { - $105 = 0; - } else { - $62 = $60&255; - $$01$i = $62; - while(1) { - $63 = HEAP32[$16>>2]|0; - $64 = ($63|0)==(0); - if ($64) { - HEAP32[$16>>2] = 8; - $65 = HEAP32[$17>>2]|0; - $66 = (($65) + 1)|0; - HEAP32[$17>>2] = $66; - $67 = HEAP32[$18>>2]|0; - $68 = (((($gfc)) + 39840|0) + (($67*48)|0)|0); - $69 = HEAP32[$68>>2]|0; - $70 = HEAP32[$19>>2]|0; - $71 = ($69|0)==($70|0); - if ($71) { - $72 = HEAP32[$20>>2]|0; - $73 = (($72) + ($66)|0); - $74 = (((((($gfc)) + 39840|0) + (($67*48)|0)|0)) + 8|0); - $75 = HEAP32[$21>>2]|0; - _memcpy(($73|0),($74|0),($75|0))|0; - $76 = HEAP32[$21>>2]|0; - $77 = HEAP32[$17>>2]|0; - $78 = (($77) + ($76))|0; - HEAP32[$17>>2] = $78; - $79 = $76 << 3; - $80 = HEAP32[$19>>2]|0; - $81 = (($80) + ($79))|0; - HEAP32[$19>>2] = $81; - $82 = HEAP32[$18>>2]|0; - $83 = (($82) + 1)|0; - $84 = $83 & 255; - HEAP32[$18>>2] = $84; - $87 = $78; - } else { - $87 = $66; - } - $85 = HEAP32[$20>>2]|0; - $86 = (($85) + ($87)|0); - HEAP8[$86>>0] = 0; - $$pre$i = HEAP32[$16>>2]|0; - $89 = $$pre$i; - } else { - $89 = $63; - } - $88 = ($$01$i|0)<($89|0); - $$0$$i = $88 ? $$01$i : $89; - $90 = (($$01$i) - ($$0$$i))|0; - $91 = (($89) - ($$0$$i))|0; - HEAP32[$16>>2] = $91; - $92 = $58 >> $90; - $93 = $92 << $91; - $94 = HEAP32[$17>>2]|0; - $95 = HEAP32[$20>>2]|0; - $96 = (($95) + ($94)|0); - $97 = HEAP8[$96>>0]|0; - $98 = $97&255; - $99 = $93 | $98; - $100 = $99&255; - HEAP8[$96>>0] = $100; - $101 = HEAP32[$19>>2]|0; - $102 = (($101) + ($$0$$i))|0; - HEAP32[$19>>2] = $102; - $103 = ($90|0)>(0); - if ($103) { - $$01$i = $90; - } else { - break; - } - } - $$pre = HEAP8[$59>>0]|0; - $105 = $$pre; - } - $104 = $105&255; - $106 = (($104) + ($bits$02))|0; - $107 = (($i$01) + -1)|0; - $108 = ($i$01|0)>(1); - if ($108) { - $bits$02 = $106;$i$01 = $107;$ix$03 = $53;$xr$04 = $54; - } else { - $bits$0$lcssa = $106; - break; - } - } - return ($bits$0$lcssa|0); -} -function _lame_encode_mp3_frame($gfc,$inbuf_l,$inbuf_r,$mp3buf,$mp3buf_size) { - $gfc = $gfc|0; - $inbuf_l = $inbuf_l|0; - $inbuf_r = $inbuf_r|0; - $mp3buf = $mp3buf|0; - $mp3buf_size = $mp3buf_size|0; - var $$$i = 0, $$0 = 0, $$lcssa = 0, $$lcssa116 = 0.0, $$lcssa117 = 0, $$lcssa118 = 0.0, $$lcssa118$lcssa = 0.0, $$lcssa119 = 0.0, $$lcssa119$lcssa = 0.0, $$lcssa121 = 0, $$pn$i = 0.0, $$pn1$i = 0.0, $$pre = 0, $$pre$i = 0, $$pre$i2 = 0, $$pre$i4 = 0, $$pre$phi$iZ2D = 0, $$pre10$i = 0, $$pre6$i = 0, $$pre92 = 0; - var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0, $103 = 0.0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0, $113 = 0, $114 = 0.0, $115 = 0; - var $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0, $12 = 0, $120 = 0, $121 = 0.0, $122 = 0, $123 = 0, $124 = 0.0, $125 = 0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0, $133 = 0.0; - var $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0, $14 = 0, $140 = 0, $141 = 0.0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0; - var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0.0, $162 = 0.0, $163 = 0, $164 = 0.0, $165 = 0.0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0; - var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0.0, $195 = 0.0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0.0, $204 = 0.0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0.0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0; - var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0; - var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0; - var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0.0, $265 = 0.0, $266 = 0.0, $267 = 0.0, $268 = 0.0, $269 = 0.0, $27 = 0, $270 = 0.0, $271 = 0.0, $272 = 0.0, $273 = 0.0, $274 = 0.0, $275 = 0.0, $276 = 0.0, $277 = 0.0, $278 = 0.0; - var $279 = 0.0, $28 = 0, $280 = 0.0, $281 = 0.0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0.0, $289 = 0.0, $29 = 0, $290 = 0, $291 = 0, $292 = 0.0, $293 = 0.0, $294 = 0.0, $295 = 0.0, $296 = 0.0; - var $297 = 0.0, $298 = 0.0, $299 = 0.0, $3 = 0, $30 = 0, $300 = 0.0, $301 = 0.0, $302 = 0.0, $303 = 0.0, $304 = 0.0, $305 = 0.0, $306 = 0.0, $307 = 0.0, $308 = 0.0, $309 = 0.0, $31 = 0, $310 = 0.0, $311 = 0.0, $312 = 0.0, $313 = 0.0; - var $314 = 0.0, $315 = 0.0, $316 = 0.0, $317 = 0.0, $318 = 0.0, $319 = 0, $32 = 0, $320 = 0, $321 = 0.0, $322 = 0.0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0.0, $328 = 0.0, $329 = 0, $33 = 0, $330 = 0, $331 = 0; - var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0; - var $350 = 0, $351 = 0.0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0.0, $357 = 0.0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0; - var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0; - var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0; - var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $43 = 0; - var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; - var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0.0, $8 = 0; - var $80 = 0.0, $81 = 0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0; - var $99 = 0, $blocktype = 0, $bufp = 0, $ch$02$i = 0, $ch$02$i8 = 0, $ch$069 = 0, $ch$173 = 0, $ch$254$us = 0, $ch$349 = 0, $ch$439$us = 0, $ch$533$us = 0, $ch$632 = 0, $exitcond = 0, $exitcond86 = 0, $exitcond91 = 0, $f$0$lcssa = 0.0, $f$045$us = 0.0, $f$140$us = 0.0, $gr$03$i = 0, $gr$03$i6 = 0; - var $gr$076 = 0, $gr$161$us = 0, $gr$252 = 0, $gr$343$us = 0, $gr$435$us = 0, $gr2_max$0$i = 0.0, $i$06$i = 0, $inbuf = 0, $j$030 = 0, $j$07$i = 0, $j$1$i = 0, $j$131 = 0, $masking_LR = 0, $masking_MS = 0, $masking_MS$sink = 0, $max_pow$0$i = 0.0, $max_pow$1$i = 0.0, $ms_ener_ratio = 0, $or$cond = 0, $or$cond101 = 0; - var $pe = 0, $pe_MS = 0, $primebuff0$i = 0, $primebuff1$i = 0, $sum_pe_LR$064$us = 0.0, $sum_pe_LR$156$us = 0.0, $sum_pe_MS$063$us = 0.0, $sum_pe_MS$155$us = 0.0, $tot_ener = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 20112|0; - $primebuff0$i = sp + 12056|0; - $primebuff1$i = sp + 4000|0; - $masking_LR = sp + 2048|0; - $masking_MS = sp + 96|0; - $inbuf = sp + 88|0; - $tot_ener = sp + 56|0; - $ms_ener_ratio = sp + 8|0; - $pe = sp + 40|0; - $pe_MS = sp + 24|0; - $bufp = sp; - $blocktype = sp + 16|0; - $0 = $ms_ener_ratio; - $1 = $0; - HEAP32[$1>>2] = 1056964608; - $2 = (($0) + 4)|0; - $3 = $2; - HEAP32[$3>>2] = 1056964608; - ;HEAP32[$pe>>2]=0|0;HEAP32[$pe+4>>2]=0|0;HEAP32[$pe+8>>2]=0|0;HEAP32[$pe+12>>2]=0|0; - ;HEAP32[$pe_MS>>2]=0|0;HEAP32[$pe_MS+4>>2]=0|0;HEAP32[$pe_MS+8>>2]=0|0;HEAP32[$pe_MS+12>>2]=0|0; - HEAP32[$inbuf>>2] = $inbuf_l; - $4 = ((($inbuf)) + 4|0); - HEAP32[$4>>2] = $inbuf_r; - $5 = ((($gfc)) + 4|0); - $6 = HEAP32[$5>>2]|0; - $7 = ($6|0)==(0); - if ($7) { - $8 = ((($gfc)) + 76|0); - $9 = HEAP32[$8>>2]|0; - $10 = ($9*576)|0; - HEAP32[$5>>2] = 1; - _memset(($primebuff0$i|0),0,8056)|0; - _memset(($primebuff1$i|0),0,8056)|0; - $11 = (($10) + 862)|0; - $12 = ($11|0)>(0); - if ($12) { - $13 = ((($gfc)) + 72|0); - $i$06$i = 0;$j$07$i = 0; - while(1) { - $16 = ($i$06$i|0)<($10|0); - if ($16) { - $17 = (($primebuff0$i) + ($i$06$i<<2)|0); - HEAPF32[$17>>2] = 0.0; - $18 = HEAP32[$13>>2]|0; - $19 = ($18|0)==(2); - if ($19) { - $20 = (($primebuff1$i) + ($i$06$i<<2)|0); - HEAPF32[$20>>2] = 0.0; - $j$1$i = $j$07$i; - } else { - $j$1$i = $j$07$i; - } - } else { - $21 = (($inbuf_l) + ($j$07$i<<2)|0); - $22 = HEAP32[$21>>2]|0; - $23 = (($primebuff0$i) + ($i$06$i<<2)|0); - HEAP32[$23>>2] = $22; - $24 = HEAP32[$13>>2]|0; - $25 = ($24|0)==(2); - if ($25) { - $26 = (($inbuf_r) + ($j$07$i<<2)|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($primebuff1$i) + ($i$06$i<<2)|0); - HEAP32[$28>>2] = $27; - } - $29 = (($j$07$i) + 1)|0; - $j$1$i = $29; - } - $30 = (($i$06$i) + 1)|0; - $exitcond91 = ($30|0)==($11|0); - if ($exitcond91) { - break; - } else { - $i$06$i = $30;$j$07$i = $j$1$i; - } - } - } - $14 = ($9|0)>(0); - if ($14) { - $15 = ((($gfc)) + 72|0); - $$pre$i = HEAP32[$15>>2]|0; - $31 = $$pre$i;$415 = $9;$gr$03$i = 0; - while(1) { - $32 = ($31|0)>(0); - if ($32) { - $ch$02$i = 0; - while(1) { - $33 = ((((((($gfc)) + 304|0) + (($gr$03$i*10504)|0)|0) + (($ch$02$i*5252)|0)|0)) + 4788|0); - HEAP32[$33>>2] = 2; - $34 = (($ch$02$i) + 1)|0; - $35 = HEAP32[$15>>2]|0; - $36 = ($34|0)<($35|0); - if ($36) { - $ch$02$i = $34; - } else { - $$lcssa121 = $35; - break; - } - } - $$pre10$i = HEAP32[$8>>2]|0; - $39 = $$pre10$i;$416 = $$lcssa121; - } else { - $39 = $415;$416 = $31; - } - $37 = (($gr$03$i) + 1)|0; - $38 = ($37|0)<($39|0); - if ($38) { - $31 = $416;$415 = $39;$gr$03$i = $37; - } else { - break; - } - } - } - _mdct_sub48($gfc,$primebuff0$i,$primebuff1$i); - } - $40 = ((($gfc)) + 84752|0); - HEAP32[$40>>2] = 0; - $41 = ((($gfc)) + 39832|0); - $42 = HEAP32[$41>>2]|0; - $43 = ((($gfc)) + 39836|0); - $44 = HEAP32[$43>>2]|0; - $45 = (($44) - ($42))|0; - HEAP32[$43>>2] = $45; - $46 = ($45|0)<(0); - if ($46) { - $47 = ((($gfc)) + 64|0); - $48 = HEAP32[$47>>2]|0; - $49 = (($48) + ($45))|0; - HEAP32[$43>>2] = $49; - HEAP32[$40>>2] = 1; - } - $50 = $bufp; - $51 = $50; - HEAP32[$51>>2] = 0; - $52 = (($50) + 4)|0; - $53 = $52; - HEAP32[$53>>2] = 0; - $54 = ((($gfc)) + 76|0); - $55 = HEAP32[$54>>2]|0; - $56 = ($55|0)>(0); - L30: do { - if ($56) { - $57 = ((($gfc)) + 72|0); - $58 = ((($gfc)) + 180|0); - $gr$076 = 0; - while(1) { - $59 = HEAP32[$57>>2]|0; - $60 = ($59|0)>(0); - if ($60) { - $61 = ($gr$076*576)|0; - $62 = (($61) + 304)|0; - $ch$069 = 0; - while(1) { - $63 = (($inbuf) + ($ch$069<<2)|0); - $64 = HEAP32[$63>>2]|0; - $65 = (($64) + ($62<<2)|0); - $66 = (($bufp) + ($ch$069<<2)|0); - HEAP32[$66>>2] = $65; - $67 = (($ch$069) + 1)|0; - $68 = ($67|0)<($59|0); - if ($68) { - $ch$069 = $67; - } else { - break; - } - } - } - $69 = (($pe) + ($gr$076<<3)|0); - $70 = (($pe_MS) + ($gr$076<<3)|0); - $71 = (($tot_ener) + ($gr$076<<4)|0); - $72 = (_L3psycho_anal_vbr($gfc,$bufp,$gr$076,$masking_LR,$masking_MS,$69,$70,$71,$blocktype)|0); - $73 = ($72|0)==(0); - if (!($73)) { - $$0 = -4; - break; - } - $74 = HEAP32[$58>>2]|0; - $75 = ($74|0)==(1); - if ($75) { - $76 = (((($tot_ener) + ($gr$076<<4)|0)) + 8|0); - $77 = +HEAPF32[$76>>2]; - $78 = (((($tot_ener) + ($gr$076<<4)|0)) + 12|0); - $79 = +HEAPF32[$78>>2]; - $80 = $79 + $77; - $81 = (($ms_ener_ratio) + ($gr$076<<2)|0); - HEAPF32[$81>>2] = $80; - $82 = $80 > 0.0; - if ($82) { - $83 = $79 / $80; - HEAPF32[$81>>2] = $83; - } - } - $84 = HEAP32[$57>>2]|0; - $85 = ($84|0)>(0); - if ($85) { - $ch$173 = 0; - while(1) { - $86 = (($blocktype) + ($ch$173<<2)|0); - $87 = HEAP32[$86>>2]|0; - $88 = ((((((($gfc)) + 304|0) + (($gr$076*10504)|0)|0) + (($ch$173*5252)|0)|0)) + 4788|0); - HEAP32[$88>>2] = $87; - $89 = ((((((($gfc)) + 304|0) + (($gr$076*10504)|0)|0) + (($ch$173*5252)|0)|0)) + 4792|0); - HEAP32[$89>>2] = 0; - $90 = (($ch$173) + 1)|0; - $91 = ($90|0)<($84|0); - if ($91) { - $ch$173 = $90; - } else { - break; - } - } - } - $92 = (($gr$076) + 1)|0; - $93 = HEAP32[$54>>2]|0; - $94 = ($92|0)<($93|0); - if ($94) { - $gr$076 = $92; - } else { - $111 = $93; - break L30; - } - } - STACKTOP = sp;return ($$0|0); - } else { - $111 = $55; - } - } while(0); - $95 = ((($gfc)) + 85796|0); - $96 = HEAP32[$95>>2]|0; - $97 = HEAP32[$96>>2]|0; - $98 = ($97|0)==(0); - do { - if ($98) { - $99 = ((($96)) + 8|0); - HEAPF32[$99>>2] = 1.0; - } else { - $100 = ((($gfc)) + 27804|0); - $101 = +HEAPF32[$100>>2]; - $102 = ((($gfc)) + 27812|0); - $103 = +HEAPF32[$102>>2]; - $104 = ((($gfc)) + 72|0); - $105 = HEAP32[$104>>2]|0; - $106 = ($105|0)==(2); - if ($106) { - $107 = ((($gfc)) + 27808|0); - $108 = +HEAPF32[$107>>2]; - $109 = ((($gfc)) + 27816|0); - $110 = +HEAPF32[$109>>2]; - $$pn$i = $108;$$pn1$i = $110; - } else { - $$pn$i = $101;$$pn1$i = $103; - } - $gr2_max$0$i = $103 + $$pn1$i; - $max_pow$0$i = $101 + $$pn$i; - $112 = ($111|0)==(2); - $113 = $max_pow$0$i > $gr2_max$0$i; - $114 = $113 ? $max_pow$0$i : $gr2_max$0$i; - $max_pow$1$i = $112 ? $114 : $max_pow$0$i; - $115 = ((($96)) + 4|0); - $116 = +HEAPF32[$115>>2]; - $117 = $116 * 0.5; - $118 = $117 * $max_pow$1$i; - $119 = $118 > 0.03125; - if ($119) { - $120 = ((($96)) + 8|0); - $121 = +HEAPF32[$120>>2]; - $122 = !($121 >= 1.0); - if ($122) { - $123 = ((($96)) + 12|0); - $124 = +HEAPF32[$123>>2]; - $125 = $121 < $124; - if ($125) { - HEAPF32[$120>>2] = $124; - $$pre$phi$iZ2D = $123; - } else { - $$pre$phi$iZ2D = $123; - } - } else { - HEAPF32[$120>>2] = 1.0; - $$pre$i2 = ((($96)) + 12|0); - $$pre$phi$iZ2D = $$pre$i2; - } - HEAPF32[$$pre$phi$iZ2D>>2] = 1.0; - break; - } - $126 = $118; - $127 = $126 * 31.98; - $128 = $127 + 6.2500000000000001E-4; - $129 = $128; - $130 = ((($96)) + 8|0); - $131 = +HEAPF32[$130>>2]; - $132 = !($131 >= $129); - do { - if ($132) { - $140 = ((($96)) + 12|0); - $141 = +HEAPF32[$140>>2]; - $142 = !($141 >= $129); - if (!($142)) { - HEAPF32[$130>>2] = $129; - break; - } - $143 = $131 < $141; - if ($143) { - HEAPF32[$130>>2] = $141; - } - } else { - $133 = $129; - $134 = $133 * 0.074999999999999997; - $135 = $134 + 0.92500000000000004; - $136 = $131; - $137 = $136 * $135; - $138 = $137; - HEAPF32[$130>>2] = $138; - $139 = $138 < $129; - if ($139) { - HEAPF32[$130>>2] = $129; - } - } - } while(0); - $144 = ((($96)) + 12|0); - HEAPF32[$144>>2] = $129; - } - } while(0); - $145 = HEAP32[$inbuf>>2]|0; - _mdct_sub48($gfc,$145,$inbuf_r); - $146 = ((($gfc)) + 84756|0); - HEAP32[$146>>2] = 0; - $147 = ((($gfc)) + 80|0); - $148 = HEAP32[$147>>2]|0; - $149 = ($148|0)==(0); - do { - if ($149) { - $150 = ((($gfc)) + 180|0); - $151 = HEAP32[$150>>2]|0; - $152 = ($151|0)==(1); - if ($152) { - $153 = HEAP32[$54>>2]|0; - $154 = ($153|0)>(0); - if ($154) { - $155 = ((($gfc)) + 72|0); - $156 = HEAP32[$155>>2]|0; - $157 = ($156|0)>(0); - if ($157) { - $gr$161$us = 0;$sum_pe_LR$064$us = 0.0;$sum_pe_MS$063$us = 0.0; - while(1) { - $ch$254$us = 0;$sum_pe_LR$156$us = $sum_pe_LR$064$us;$sum_pe_MS$155$us = $sum_pe_MS$063$us; - while(1) { - $160 = ((($pe_MS) + ($gr$161$us<<3)|0) + ($ch$254$us<<2)|0); - $161 = +HEAPF32[$160>>2]; - $162 = $161 + $sum_pe_MS$155$us; - $163 = ((($pe) + ($gr$161$us<<3)|0) + ($ch$254$us<<2)|0); - $164 = +HEAPF32[$163>>2]; - $165 = $164 + $sum_pe_LR$156$us; - $166 = (($ch$254$us) + 1)|0; - $167 = ($166|0)<($156|0); - if ($167) { - $ch$254$us = $166;$sum_pe_LR$156$us = $165;$sum_pe_MS$155$us = $162; - } else { - $$lcssa118 = $162;$$lcssa119 = $165; - break; - } - } - $158 = (($gr$161$us) + 1)|0; - $159 = ($158|0)<($153|0); - if ($159) { - $gr$161$us = $158;$sum_pe_LR$064$us = $$lcssa119;$sum_pe_MS$063$us = $$lcssa118; - } else { - $$lcssa118$lcssa = $$lcssa118;$$lcssa119$lcssa = $$lcssa119; - break; - } - } - $168 = !($$lcssa118$lcssa <= $$lcssa119$lcssa); - if ($168) { - $180 = 0; - break; - } - } - } - $169 = (($153) + -1)|0; - $170 = ((($gfc)) + 5092|0); - $171 = HEAP32[$170>>2]|0; - $172 = ((($gfc)) + 10344|0); - $173 = HEAP32[$172>>2]|0; - $174 = ($171|0)==($173|0); - if ($174) { - $175 = (((((($gfc)) + 304|0) + (($169*10504)|0)|0)) + 4788|0); - $176 = HEAP32[$175>>2]|0; - $177 = (((((($gfc)) + 304|0) + (($169*10504)|0)|0)) + 10040|0); - $178 = HEAP32[$177>>2]|0; - $179 = ($176|0)==($178|0); - if ($179) { - HEAP32[$146>>2] = 2; - $180 = 1; - } else { - $180 = 0; - } - } else { - $180 = 0; - } - } else { - $180 = 0; - } - } else { - HEAP32[$146>>2] = 2; - $180 = 1; - } - } while(0); - $masking_MS$sink = $180 ? $masking_MS : $masking_LR; - $181 = $180 ? $pe_MS : $pe; - $182 = ((($gfc)) + 140|0); - $183 = HEAP32[$182>>2]|0; - $184 = ($183|0)==(0); - if (!($184)) { - $185 = ((($gfc)) + 85804|0); - $186 = HEAP32[$185>>2]|0; - $187 = ($186|0)==(0|0); - if (!($187)) { - $188 = HEAP32[$54>>2]|0; - $189 = ($188|0)>(0); - if ($189) { - $190 = ((($gfc)) + 72|0); - $$pre = HEAP32[$190>>2]|0; - $191 = $$pre;$417 = $188;$gr$252 = 0; - while(1) { - $192 = ($191|0)>(0); - if ($192) { - $193 = (($ms_ener_ratio) + ($gr$252<<2)|0); - $194 = +HEAPF32[$193>>2]; - $195 = $194; - $ch$349 = 0; - while(1) { - $196 = HEAP32[$185>>2]|0; - $197 = (((($196)) + 90904|0) + ($gr$252<<3)|0); - HEAPF64[$197>>3] = 0.0; - $198 = (((($196)) + 90920|0) + ($gr$252<<3)|0); - HEAPF64[$198>>3] = $195; - $199 = ((((((($gfc)) + 304|0) + (($gr$252*10504)|0)|0) + (($ch$349*5252)|0)|0)) + 4788|0); - $200 = HEAP32[$199>>2]|0; - $201 = ((((($196)) + 203288|0) + ($gr$252<<3)|0) + ($ch$349<<2)|0); - HEAP32[$201>>2] = $200; - $202 = ((($181) + ($gr$252<<3)|0) + ($ch$349<<2)|0); - $203 = +HEAPF32[$202>>2]; - $204 = $203; - $205 = ((((($196)) + 189240|0) + ($gr$252<<5)|0) + ($ch$349<<3)|0); - HEAPF64[$205>>3] = $204; - $206 = ((((($196)) + 54040|0) + (($gr$252*9216)|0)|0) + (($ch$349*4608)|0)|0); - $207 = ((((($gfc)) + 304|0) + (($gr$252*10504)|0)|0) + (($ch$349*5252)|0)|0); - _memcpy(($206|0),($207|0),2304)|0; - $208 = HEAP32[$146>>2]|0; - $209 = ($208|0)==(2); - if ($209) { - $210 = (($ch$349) + 2)|0; - $211 = HEAP32[$185>>2]|0; - $212 = ((((($211)) + 197144|0) + ($gr$252<<5)|0) + ($210<<3)|0); - $213 = +HEAPF64[$212>>3]; - $214 = ((((($211)) + 197144|0) + ($gr$252<<5)|0) + ($ch$349<<3)|0); - HEAPF64[$214>>3] = $213; - $215 = ((((($211)) + 123704|0) + ($gr$252<<15)|0) + ($ch$349<<13)|0); - $216 = ((((($211)) + 123704|0) + ($gr$252<<15)|0) + ($210<<13)|0); - _memcpy(($215|0),($216|0),8192)|0; - } - $217 = (($ch$349) + 1)|0; - $218 = HEAP32[$190>>2]|0; - $219 = ($217|0)<($218|0); - if ($219) { - $ch$349 = $217; - } else { - $$lcssa117 = $218; - break; - } - } - $$pre92 = HEAP32[$54>>2]|0; - $222 = $$pre92;$418 = $$lcssa117; - } else { - $222 = $417;$418 = $191; - } - $220 = (($gr$252) + 1)|0; - $221 = ($220|0)<($222|0); - if ($221) { - $191 = $418;$417 = $222;$gr$252 = $220; - } else { - break; - } - } - } - } - } - $223 = ((($gfc)) + 104|0); - $224 = HEAP32[$223>>2]|0; - if ((($224|0) == 3) | (($224|0) == 0)) { - $225 = ((($gfc)) + 39760|0); - $226 = HEAP32[$225>>2]|0; - $227 = ((($gfc)) + 39756|0); - HEAP32[$227>>2] = $226; - $228 = ((($gfc)) + 39764|0); - $229 = HEAP32[$228>>2]|0; - HEAP32[$225>>2] = $229; - $230 = ((($gfc)) + 39768|0); - $231 = HEAP32[$230>>2]|0; - HEAP32[$228>>2] = $231; - $232 = ((($gfc)) + 39772|0); - $233 = HEAP32[$232>>2]|0; - HEAP32[$230>>2] = $233; - $234 = ((($gfc)) + 39776|0); - $235 = HEAP32[$234>>2]|0; - HEAP32[$232>>2] = $235; - $236 = ((($gfc)) + 39780|0); - $237 = HEAP32[$236>>2]|0; - HEAP32[$234>>2] = $237; - $238 = ((($gfc)) + 39784|0); - $239 = HEAP32[$238>>2]|0; - HEAP32[$236>>2] = $239; - $240 = ((($gfc)) + 39788|0); - $241 = HEAP32[$240>>2]|0; - HEAP32[$238>>2] = $241; - $242 = ((($gfc)) + 39792|0); - $243 = HEAP32[$242>>2]|0; - HEAP32[$240>>2] = $243; - $244 = ((($gfc)) + 39796|0); - $245 = HEAP32[$244>>2]|0; - HEAP32[$242>>2] = $245; - $246 = ((($gfc)) + 39800|0); - $247 = HEAP32[$246>>2]|0; - HEAP32[$244>>2] = $247; - $248 = ((($gfc)) + 39804|0); - $249 = HEAP32[$248>>2]|0; - HEAP32[$246>>2] = $249; - $250 = ((($gfc)) + 39808|0); - $251 = HEAP32[$250>>2]|0; - HEAP32[$248>>2] = $251; - $252 = ((($gfc)) + 39812|0); - $253 = HEAP32[$252>>2]|0; - HEAP32[$250>>2] = $253; - $254 = ((($gfc)) + 39816|0); - $255 = HEAP32[$254>>2]|0; - HEAP32[$252>>2] = $255; - $256 = ((($gfc)) + 39820|0); - $257 = HEAP32[$256>>2]|0; - HEAP32[$254>>2] = $257; - $258 = ((($gfc)) + 39824|0); - $259 = HEAP32[$258>>2]|0; - HEAP32[$256>>2] = $259; - $260 = ((($gfc)) + 39828|0); - $261 = HEAP32[$260>>2]|0; - HEAP32[$258>>2] = $261; - $262 = HEAP32[$54>>2]|0; - $263 = ($262|0)>(0); - $264 = (HEAP32[tempDoublePtr>>2]=$245,+HEAPF32[tempDoublePtr>>2]); - $265 = (HEAP32[tempDoublePtr>>2]=$226,+HEAPF32[tempDoublePtr>>2]); - $266 = (HEAP32[tempDoublePtr>>2]=$229,+HEAPF32[tempDoublePtr>>2]); - $267 = (HEAP32[tempDoublePtr>>2]=$261,+HEAPF32[tempDoublePtr>>2]); - $268 = (HEAP32[tempDoublePtr>>2]=$231,+HEAPF32[tempDoublePtr>>2]); - $269 = (HEAP32[tempDoublePtr>>2]=$259,+HEAPF32[tempDoublePtr>>2]); - $270 = (HEAP32[tempDoublePtr>>2]=$233,+HEAPF32[tempDoublePtr>>2]); - $271 = (HEAP32[tempDoublePtr>>2]=$257,+HEAPF32[tempDoublePtr>>2]); - $272 = (HEAP32[tempDoublePtr>>2]=$235,+HEAPF32[tempDoublePtr>>2]); - $273 = (HEAP32[tempDoublePtr>>2]=$255,+HEAPF32[tempDoublePtr>>2]); - $274 = (HEAP32[tempDoublePtr>>2]=$237,+HEAPF32[tempDoublePtr>>2]); - $275 = (HEAP32[tempDoublePtr>>2]=$253,+HEAPF32[tempDoublePtr>>2]); - $276 = (HEAP32[tempDoublePtr>>2]=$239,+HEAPF32[tempDoublePtr>>2]); - $277 = (HEAP32[tempDoublePtr>>2]=$251,+HEAPF32[tempDoublePtr>>2]); - $278 = (HEAP32[tempDoublePtr>>2]=$241,+HEAPF32[tempDoublePtr>>2]); - $279 = (HEAP32[tempDoublePtr>>2]=$249,+HEAPF32[tempDoublePtr>>2]); - $280 = (HEAP32[tempDoublePtr>>2]=$243,+HEAPF32[tempDoublePtr>>2]); - $281 = (HEAP32[tempDoublePtr>>2]=$247,+HEAPF32[tempDoublePtr>>2]); - $282 = ((($gfc)) + 72|0); - $283 = HEAP32[$282>>2]|0; - $284 = ($283|0)>(0); - $or$cond = $263 & $284; - if ($or$cond) { - $f$045$us = 0.0;$gr$343$us = 0; - while(1) { - $ch$439$us = 0;$f$140$us = $f$045$us; - while(1) { - $287 = ((($181) + ($gr$343$us<<3)|0) + ($ch$439$us<<2)|0); - $288 = +HEAPF32[$287>>2]; - $289 = $288 + $f$140$us; - $290 = (($ch$439$us) + 1)|0; - $291 = ($290|0)<($283|0); - if ($291) { - $ch$439$us = $290;$f$140$us = $289; - } else { - $$lcssa116 = $289; - break; - } - } - $285 = (($gr$343$us) + 1)|0; - $286 = ($285|0)<($262|0); - if ($286) { - $f$045$us = $$lcssa116;$gr$343$us = $285; - } else { - $f$0$lcssa = $$lcssa116; - break; - } - } - } else { - $f$0$lcssa = 0.0; - } - HEAPF32[$260>>2] = $f$0$lcssa; - $292 = $f$0$lcssa + $265; - $293 = $292 * -0.10394349694252014; - $294 = $293 + $264; - $295 = $267 + $266; - $296 = $295 * -0.18920649588108063; - $297 = $296 + $294; - $298 = $269 + $268; - $299 = $298 * -0.21623599529266357; - $300 = $299 + $297; - $301 = $271 + $270; - $302 = $301 * -0.15591500699520111; - $303 = $302 + $300; - $304 = $273 + $272; - $305 = $304 * 3.8980449615198001E-17; - $306 = $305 + $303; - $307 = $275 + $274; - $308 = $307 * 0.23387250304222107; - $309 = $308 + $306; - $310 = $277 + $276; - $311 = $310 * 0.50454998016357422; - $312 = $311 + $309; - $313 = $279 + $278; - $314 = $313 * 0.75682497024536133; - $315 = $314 + $312; - $316 = $281 + $280; - $317 = $316 * 0.93549001216888427; - $318 = $317 + $315; - $319 = ($262*3350)|0; - $320 = Math_imul($319, $283)|0; - $321 = (+($320|0)); - $322 = $321 / $318; - $323 = ($283|0)>(0); - $or$cond101 = $263 & $323; - if ($or$cond101) { - $gr$435$us = 0; - while(1) { - $ch$533$us = 0; - while(1) { - $326 = ((($181) + ($gr$435$us<<3)|0) + ($ch$533$us<<2)|0); - $327 = +HEAPF32[$326>>2]; - $328 = $327 * $322; - HEAPF32[$326>>2] = $328; - $329 = (($ch$533$us) + 1)|0; - $330 = ($329|0)<($283|0); - if ($330) { - $ch$533$us = $329; - } else { - break; - } - } - $324 = (($gr$435$us) + 1)|0; - $325 = ($324|0)<($262|0); - if ($325) { - $gr$435$us = $324; - } else { - break; - } - } - } - } - $331 = ((($gfc)) + 85812|0); - $332 = HEAP32[$331>>2]|0; - FUNCTION_TABLE_viiii[$332 & 7]($gfc,$181,$ms_ener_ratio,$masking_MS$sink); - (_format_bitstream($gfc)|0); - $333 = (_copy_buffer($gfc,$mp3buf,$mp3buf_size,1)|0); - $334 = ((($gfc)) + 156|0); - $335 = HEAP32[$334>>2]|0; - $336 = ($335|0)==(0); - if (!($336)) { - _AddVbrFrame($gfc); - } - $337 = HEAP32[$182>>2]|0; - $338 = ($337|0)==(0); - if (!($338)) { - $339 = ((($gfc)) + 85804|0); - $340 = HEAP32[$339>>2]|0; - $341 = ($340|0)==(0|0); - if (!($341)) { - $342 = HEAP32[$54>>2]|0; - $343 = ($342*576)|0; - $344 = ((($gfc)) + 72|0); - $345 = HEAP32[$344>>2]|0; - $346 = ($345|0)>(0); - if ($346) { - $ch$632 = 0; - while(1) { - $j$030 = 0; - while(1) { - $349 = (($j$030) + ($343))|0; - $350 = ((((($340)) + 24|0) + (($ch$632*12800)|0)|0) + ($349<<3)|0); - $351 = +HEAPF64[$350>>3]; - $352 = ((((($340)) + 24|0) + (($ch$632*12800)|0)|0) + ($j$030<<3)|0); - HEAPF64[$352>>3] = $351; - $353 = (($j$030) + 1)|0; - $exitcond = ($353|0)==(272); - if ($exitcond) { - break; - } else { - $j$030 = $353; - } - } - $347 = (($inbuf) + ($ch$632<<2)|0); - $348 = HEAP32[$347>>2]|0; - $j$131 = 272; - while(1) { - $354 = (($j$131) + -272)|0; - $355 = (($348) + ($354<<2)|0); - $356 = +HEAPF32[$355>>2]; - $357 = $356; - $358 = ((((($340)) + 24|0) + (($ch$632*12800)|0)|0) + ($j$131<<3)|0); - HEAPF64[$358>>3] = $357; - $359 = (($j$131) + 1)|0; - $exitcond86 = ($359|0)==(1600); - if ($exitcond86) { - break; - } else { - $j$131 = $359; - } - } - $360 = (($ch$632) + 1)|0; - $361 = ($360|0)<($345|0); - if ($361) { - $ch$632 = $360; - } else { - break; - } - } - } - $362 = ((($gfc)) + 84908|0); - HEAPF32[$362>>2] = 1.0; - _set_frame_pinfo($gfc,$masking_MS$sink); - } - } - $363 = ((($gfc)) + 84748|0); - $364 = HEAP32[$363>>2]|0; - $365 = (($364) + 1)|0; - HEAP32[$363>>2] = $365; - $366 = ((($gfc)) + 84744|0); - $367 = HEAP32[$366>>2]|0; - $368 = (((((($gfc)) + 84040|0) + (($367*20)|0)|0)) + 16|0); - $369 = HEAP32[$368>>2]|0; - $370 = (($369) + 1)|0; - HEAP32[$368>>2] = $370; - $371 = ((($gfc)) + 84356|0); - $372 = HEAP32[$371>>2]|0; - $373 = (($372) + 1)|0; - HEAP32[$371>>2] = $373; - $374 = ((($gfc)) + 72|0); - $375 = HEAP32[$374>>2]|0; - $376 = ($375|0)==(2); - if ($376) { - $377 = HEAP32[$146>>2]|0; - $378 = HEAP32[$366>>2]|0; - $379 = ((((($gfc)) + 84040|0) + (($378*20)|0)|0) + ($377<<2)|0); - $380 = HEAP32[$379>>2]|0; - $381 = (($380) + 1)|0; - HEAP32[$379>>2] = $381; - $382 = HEAP32[$146>>2]|0; - $383 = (((($gfc)) + 84340|0) + ($382<<2)|0); - $384 = HEAP32[$383>>2]|0; - $385 = (($384) + 1)|0; - HEAP32[$383>>2] = $385; - } - $386 = HEAP32[$54>>2]|0; - $387 = ($386|0)>(0); - if (!($387)) { - $$0 = $333; - STACKTOP = sp;return ($$0|0); - } - $388 = ((($gfc)) + 84740|0); - $$pre$i4 = HEAP32[$374>>2]|0; - $389 = $$pre$i4;$419 = $386;$gr$03$i6 = 0; - while(1) { - $390 = ($389|0)>(0); - if ($390) { - $ch$02$i8 = 0; - while(1) { - $391 = ((((((($gfc)) + 304|0) + (($gr$03$i6*10504)|0)|0) + (($ch$02$i8*5252)|0)|0)) + 4788|0); - $392 = HEAP32[$391>>2]|0; - $393 = ((((((($gfc)) + 304|0) + (($gr$03$i6*10504)|0)|0) + (($ch$02$i8*5252)|0)|0)) + 4792|0); - $394 = HEAP32[$393>>2]|0; - $395 = ($394|0)==(0); - $$$i = $395 ? $392 : 4; - $396 = HEAP32[$366>>2]|0; - $397 = ((((($gfc)) + 84360|0) + (($396*24)|0)|0) + ($$$i<<2)|0); - $398 = HEAP32[$397>>2]|0; - $399 = (($398) + 1)|0; - HEAP32[$397>>2] = $399; - $400 = HEAP32[$366>>2]|0; - $401 = (((((($gfc)) + 84360|0) + (($400*24)|0)|0)) + 20|0); - $402 = HEAP32[$401>>2]|0; - $403 = (($402) + 1)|0; - HEAP32[$401>>2] = $403; - $404 = (((($gfc)) + 84720|0) + ($$$i<<2)|0); - $405 = HEAP32[$404>>2]|0; - $406 = (($405) + 1)|0; - HEAP32[$404>>2] = $406; - $407 = HEAP32[$388>>2]|0; - $408 = (($407) + 1)|0; - HEAP32[$388>>2] = $408; - $409 = (($ch$02$i8) + 1)|0; - $410 = HEAP32[$374>>2]|0; - $411 = ($409|0)<($410|0); - if ($411) { - $ch$02$i8 = $409; - } else { - $$lcssa = $410; - break; - } - } - $$pre6$i = HEAP32[$54>>2]|0; - $414 = $$pre6$i;$420 = $$lcssa; - } else { - $414 = $419;$420 = $389; - } - $412 = (($gr$03$i6) + 1)|0; - $413 = ($412|0)<($414|0); - if ($413) { - $389 = $420;$419 = $414;$gr$03$i6 = $412; - } else { - $$0 = $333; - break; - } - } - STACKTOP = sp;return ($$0|0); -} -function _fft_short($gfc,$x_real,$chn,$buffer) { - $gfc = $gfc|0; - $x_real = $x_real|0; - $chn = $chn|0; - $buffer = $buffer|0; - var $$pre = 0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0; - var $26 = 0.0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0; - var $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0.0; - var $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0; - var $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0.0, $85 = 0, $86 = 0.0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $b$01 = 0, $exitcond = 0, $indvars$iv = 0, $j$0 = 0, $scevgep = 0, $sext = 0, $x$0 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = (($buffer) + ($chn<<2)|0); - $1 = ((($gfc)) + 85820|0); - $b$01 = 0;$indvars$iv = $x_real; - while(1) { - $2 = (((($x_real) + ($b$01<<10)|0)) + 512|0); - $3 = (($b$01) + 1)|0; - $sext = Math_imul($3, 12582912)|0; - $4 = $sext >> 16; - $$pre = HEAP32[$0>>2]|0; - $j$0 = 31;$x$0 = $2; - while(1) { - $5 = $j$0 << 2; - $6 = (1720 + ($5)|0); - $7 = HEAP8[$6>>0]|0; - $8 = $7&255; - $9 = (1848 + ($8<<2)|0); - $10 = +HEAPF32[$9>>2]; - $11 = (($8) + ($4))|0; - $12 = (($$pre) + ($11<<2)|0); - $13 = +HEAPF32[$12>>2]; - $14 = $13 * $10; - $15 = (127 - ($8))|0; - $16 = (1848 + ($15<<2)|0); - $17 = +HEAPF32[$16>>2]; - $18 = (($11) + 128)|0; - $19 = (($$pre) + ($18<<2)|0); - $20 = +HEAPF32[$19>>2]; - $21 = $20 * $17; - $22 = $14 - $21; - $23 = $21 + $14; - $24 = (($8) + 64)|0; - $25 = (1848 + ($24<<2)|0); - $26 = +HEAPF32[$25>>2]; - $27 = (($11) + 64)|0; - $28 = (($$pre) + ($27<<2)|0); - $29 = +HEAPF32[$28>>2]; - $30 = $29 * $26; - $31 = (63 - ($8))|0; - $32 = (1848 + ($31<<2)|0); - $33 = +HEAPF32[$32>>2]; - $34 = (($11) + 192)|0; - $35 = (($$pre) + ($34<<2)|0); - $36 = +HEAPF32[$35>>2]; - $37 = $36 * $33; - $38 = $30 - $37; - $39 = $37 + $30; - $40 = ((($x$0)) + -16|0); - $41 = $39 + $23; - HEAPF32[$40>>2] = $41; - $42 = $23 - $39; - $43 = ((($x$0)) + -8|0); - HEAPF32[$43>>2] = $42; - $44 = $38 + $22; - $45 = ((($x$0)) + -12|0); - HEAPF32[$45>>2] = $44; - $46 = $22 - $38; - $47 = ((($x$0)) + -4|0); - HEAPF32[$47>>2] = $46; - $48 = (($8) + 1)|0; - $49 = (1848 + ($48<<2)|0); - $50 = +HEAPF32[$49>>2]; - $51 = (($11) + 1)|0; - $52 = (($$pre) + ($51<<2)|0); - $53 = +HEAPF32[$52>>2]; - $54 = $53 * $50; - $55 = (126 - ($8))|0; - $56 = (1848 + ($55<<2)|0); - $57 = +HEAPF32[$56>>2]; - $58 = (($11) + 129)|0; - $59 = (($$pre) + ($58<<2)|0); - $60 = +HEAPF32[$59>>2]; - $61 = $60 * $57; - $62 = $54 - $61; - $63 = $61 + $54; - $64 = (($8) + 65)|0; - $65 = (1848 + ($64<<2)|0); - $66 = +HEAPF32[$65>>2]; - $67 = (($11) + 65)|0; - $68 = (($$pre) + ($67<<2)|0); - $69 = +HEAPF32[$68>>2]; - $70 = $69 * $66; - $71 = (62 - ($8))|0; - $72 = (1848 + ($71<<2)|0); - $73 = +HEAPF32[$72>>2]; - $74 = (($11) + 193)|0; - $75 = (($$pre) + ($74<<2)|0); - $76 = +HEAPF32[$75>>2]; - $77 = $76 * $73; - $78 = $70 - $77; - $79 = $77 + $70; - $80 = $79 + $63; - $81 = ((($x$0)) + 496|0); - HEAPF32[$81>>2] = $80; - $82 = $63 - $79; - $83 = ((($x$0)) + 504|0); - HEAPF32[$83>>2] = $82; - $84 = $78 + $62; - $85 = ((($x$0)) + 500|0); - HEAPF32[$85>>2] = $84; - $86 = $62 - $78; - $87 = ((($x$0)) + 508|0); - HEAPF32[$87>>2] = $86; - $88 = (($j$0) + -1)|0; - $89 = ($j$0|0)>(0); - if ($89) { - $j$0 = $88;$x$0 = $40; - } else { - break; - } - } - $90 = HEAP32[$1>>2]|0; - FUNCTION_TABLE_vii[$90 & 3]($indvars$iv,128); - $scevgep = ((($indvars$iv)) + 1024|0); - $exitcond = ($3|0)==(3); - if ($exitcond) { - break; - } else { - $b$01 = $3;$indvars$iv = $scevgep; - } - } - return; -} -function _fft_long($gfc,$x,$chn,$buffer) { - $gfc = $gfc|0; - $x = $x|0; - $chn = $chn|0; - $buffer = $buffer|0; - var $$0 = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0; - var $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0.0; - var $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0; - var $61 = 0, $62 = 0.0, $63 = 0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0, $74 = 0.0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; - var $8 = 0.0, $9 = 0.0, $jj$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($x)) + 2048|0); - $1 = (($buffer) + ($chn<<2)|0); - $$pre = HEAP32[$1>>2]|0; - $$0 = $0;$jj$0 = 127; - while(1) { - $2 = (1720 + ($jj$0)|0); - $3 = HEAP8[$2>>0]|0; - $4 = $3&255; - $5 = (2360 + ($4<<2)|0); - $6 = +HEAPF32[$5>>2]; - $7 = (($$pre) + ($4<<2)|0); - $8 = +HEAPF32[$7>>2]; - $9 = $8 * $6; - $10 = $4 | 512; - $11 = (2360 + ($10<<2)|0); - $12 = +HEAPF32[$11>>2]; - $13 = (($$pre) + ($10<<2)|0); - $14 = +HEAPF32[$13>>2]; - $15 = $14 * $12; - $16 = $9 - $15; - $17 = $15 + $9; - $18 = $4 | 256; - $19 = (2360 + ($18<<2)|0); - $20 = +HEAPF32[$19>>2]; - $21 = (($$pre) + ($18<<2)|0); - $22 = +HEAPF32[$21>>2]; - $23 = $22 * $20; - $24 = $4 | 768; - $25 = (2360 + ($24<<2)|0); - $26 = +HEAPF32[$25>>2]; - $27 = (($$pre) + ($24<<2)|0); - $28 = +HEAPF32[$27>>2]; - $29 = $28 * $26; - $30 = $23 - $29; - $31 = $29 + $23; - $32 = ((($$0)) + -16|0); - $33 = $31 + $17; - HEAPF32[$32>>2] = $33; - $34 = $17 - $31; - $35 = ((($$0)) + -8|0); - HEAPF32[$35>>2] = $34; - $36 = $30 + $16; - $37 = ((($$0)) + -12|0); - HEAPF32[$37>>2] = $36; - $38 = $16 - $30; - $39 = ((($$0)) + -4|0); - HEAPF32[$39>>2] = $38; - $40 = (($4) + 1)|0; - $41 = (2360 + ($40<<2)|0); - $42 = +HEAPF32[$41>>2]; - $43 = (($$pre) + ($40<<2)|0); - $44 = +HEAPF32[$43>>2]; - $45 = $44 * $42; - $46 = (($4) + 513)|0; - $47 = (2360 + ($46<<2)|0); - $48 = +HEAPF32[$47>>2]; - $49 = (($$pre) + ($46<<2)|0); - $50 = +HEAPF32[$49>>2]; - $51 = $50 * $48; - $52 = $45 - $51; - $53 = $51 + $45; - $54 = (($4) + 257)|0; - $55 = (2360 + ($54<<2)|0); - $56 = +HEAPF32[$55>>2]; - $57 = (($$pre) + ($54<<2)|0); - $58 = +HEAPF32[$57>>2]; - $59 = $58 * $56; - $60 = (($4) + 769)|0; - $61 = (2360 + ($60<<2)|0); - $62 = +HEAPF32[$61>>2]; - $63 = (($$pre) + ($60<<2)|0); - $64 = +HEAPF32[$63>>2]; - $65 = $64 * $62; - $66 = $59 - $65; - $67 = $65 + $59; - $68 = $67 + $53; - $69 = ((($$0)) + 2032|0); - HEAPF32[$69>>2] = $68; - $70 = $53 - $67; - $71 = ((($$0)) + 2040|0); - HEAPF32[$71>>2] = $70; - $72 = $66 + $52; - $73 = ((($$0)) + 2036|0); - HEAPF32[$73>>2] = $72; - $74 = $52 - $66; - $75 = ((($$0)) + 2044|0); - HEAPF32[$75>>2] = $74; - $76 = (($jj$0) + -1)|0; - $77 = ($jj$0|0)>(0); - if ($77) { - $$0 = $32;$jj$0 = $76; - } else { - break; - } - } - $78 = ((($gfc)) + 85820|0); - $79 = HEAP32[$78>>2]|0; - FUNCTION_TABLE_vii[$79 & 3]($x,512); - return; -} -function _init_fft($gfc) { - $gfc = $gfc|0; - var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0; - var $7 = 0.0, $8 = 0.0, $9 = 0.0, $exitcond = 0, $exitcond3 = 0, $i$02 = 0, $i$11 = 0, label = 0, sp = 0; - sp = STACKTOP; - $i$02 = 0; - while(1) { - $0 = (+($i$02|0)); - $1 = $0 + 0.5; - $2 = $1 * 0.0061359231515425647; - $3 = (+Math_cos((+$2))); - $4 = $3 * 0.5; - $5 = 0.41999999999999998 - $4; - $6 = $1 * 0.012271846303085129; - $7 = (+Math_cos((+$6))); - $8 = $7 * 0.080000000000000002; - $9 = $5 + $8; - $10 = $9; - $11 = (2360 + ($i$02<<2)|0); - HEAPF32[$11>>2] = $10; - $12 = (($i$02) + 1)|0; - $exitcond3 = ($12|0)==(1024); - if ($exitcond3) { - $i$11 = 0; - break; - } else { - $i$02 = $12; - } - } - while(1) { - $13 = (+($i$11|0)); - $14 = $13 + 0.5; - $15 = $14 * 0.024543692606170259; - $16 = (+Math_cos((+$15))); - $17 = 1.0 - $16; - $18 = $17 * 0.5; - $19 = $18; - $20 = (1848 + ($i$11<<2)|0); - HEAPF32[$20>>2] = $19; - $21 = (($i$11) + 1)|0; - $exitcond = ($21|0)==(128); - if ($exitcond) { - break; - } else { - $i$11 = $21; - } - } - $22 = ((($gfc)) + 85820|0); - HEAP32[$22>>2] = 1; - return; -} -function _fht($fz,$n) { - $fz = $fz|0; - $n = $n|0; - var $$sum = 0, $0 = 0, $1 = 0, $10 = 0.0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0, $11 = 0.0, $110 = 0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0; - var $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0; - var $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0; - var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0; - var $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0.0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0; - var $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0; - var $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $c1$02 = 0.0, $fi$0 = 0, $fi$1 = 0, $gi$0 = 0, $gi$1 = 0, $i$01 = 0, $k4$0 = 0, $s1$03 = 0.0, $tri$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $n << 1; - $1 = (($fz) + ($0<<2)|0); - $k4$0 = 4;$tri$0 = 6456; - while(1) { - $2 = $k4$0 >> 1; - $3 = $k4$0 << 1; - $4 = ($k4$0*3)|0; - $5 = $k4$0 << 2; - $6 = (($fz) + ($2<<2)|0); - $fi$0 = $fz;$gi$0 = $6; - while(1) { - $7 = +HEAPF32[$fi$0>>2]; - $8 = (($fi$0) + ($k4$0<<2)|0); - $9 = +HEAPF32[$8>>2]; - $10 = $7 - $9; - $11 = $9 + $7; - $12 = (($fi$0) + ($3<<2)|0); - $13 = +HEAPF32[$12>>2]; - $14 = (($fi$0) + ($4<<2)|0); - $15 = +HEAPF32[$14>>2]; - $16 = $13 - $15; - $17 = $15 + $13; - $18 = $11 - $17; - HEAPF32[$12>>2] = $18; - $19 = $17 + $11; - HEAPF32[$fi$0>>2] = $19; - $20 = $10 - $16; - HEAPF32[$14>>2] = $20; - $21 = $16 + $10; - HEAPF32[$8>>2] = $21; - $22 = +HEAPF32[$gi$0>>2]; - $23 = (($gi$0) + ($k4$0<<2)|0); - $24 = +HEAPF32[$23>>2]; - $25 = $22 - $24; - $26 = $24 + $22; - $27 = (($gi$0) + ($4<<2)|0); - $28 = +HEAPF32[$27>>2]; - $29 = $28; - $30 = $29 * 1.4142135623730951; - $31 = $30; - $32 = (($gi$0) + ($3<<2)|0); - $33 = +HEAPF32[$32>>2]; - $34 = $33; - $35 = $34 * 1.4142135623730951; - $36 = $35; - $37 = $26 - $36; - HEAPF32[$32>>2] = $37; - $38 = $36 + $26; - HEAPF32[$gi$0>>2] = $38; - $39 = $25 - $31; - HEAPF32[$27>>2] = $39; - $40 = $31 + $25; - HEAPF32[$23>>2] = $40; - $41 = (($gi$0) + ($5<<2)|0); - $42 = (($fi$0) + ($5<<2)|0); - $43 = ($42>>>0)<($1>>>0); - if ($43) { - $fi$0 = $42;$gi$0 = $41; - } else { - break; - } - } - $44 = ((($tri$0)) + 4|0); - $45 = ($k4$0|0)>(2); - if ($45) { - $46 = +HEAPF32[$44>>2]; - $47 = +HEAPF32[$tri$0>>2]; - $c1$02 = $47;$i$01 = 1;$s1$03 = $46; - while(1) { - $48 = $s1$03 * 2.0; - $49 = $48 * $s1$03; - $50 = 1.0 - $49; - $51 = $48 * $c1$02; - $52 = (($fz) + ($i$01<<2)|0); - $$sum = (($k4$0) - ($i$01))|0; - $53 = (($fz) + ($$sum<<2)|0); - $fi$1 = $52;$gi$1 = $53; - while(1) { - $54 = (($fi$1) + ($k4$0<<2)|0); - $55 = +HEAPF32[$54>>2]; - $56 = $55 * $51; - $57 = (($gi$1) + ($k4$0<<2)|0); - $58 = +HEAPF32[$57>>2]; - $59 = $58 * $50; - $60 = $56 - $59; - $61 = $55 * $50; - $62 = $58 * $51; - $63 = $62 + $61; - $64 = +HEAPF32[$fi$1>>2]; - $65 = $64 - $63; - $66 = $63 + $64; - $67 = +HEAPF32[$gi$1>>2]; - $68 = $67 - $60; - $69 = $67 + $60; - $70 = (($fi$1) + ($4<<2)|0); - $71 = +HEAPF32[$70>>2]; - $72 = $71 * $51; - $73 = (($gi$1) + ($4<<2)|0); - $74 = +HEAPF32[$73>>2]; - $75 = $74 * $50; - $76 = $72 - $75; - $77 = $71 * $50; - $78 = $74 * $51; - $79 = $78 + $77; - $80 = (($fi$1) + ($3<<2)|0); - $81 = +HEAPF32[$80>>2]; - $82 = $81 - $79; - $83 = $79 + $81; - $84 = (($gi$1) + ($3<<2)|0); - $85 = +HEAPF32[$84>>2]; - $86 = $85 - $76; - $87 = $85 + $76; - $88 = $83 * $s1$03; - $89 = $86 * $c1$02; - $90 = $88 - $89; - $91 = $83 * $c1$02; - $92 = $86 * $s1$03; - $93 = $91 + $92; - $94 = $66 - $93; - HEAPF32[$80>>2] = $94; - $95 = $93 + $66; - HEAPF32[$fi$1>>2] = $95; - $96 = $68 - $90; - HEAPF32[$73>>2] = $96; - $97 = $90 + $68; - HEAPF32[$57>>2] = $97; - $98 = $87 * $c1$02; - $99 = $82 * $s1$03; - $100 = $98 - $99; - $101 = $87 * $s1$03; - $102 = $82 * $c1$02; - $103 = $101 + $102; - $104 = $69 - $103; - HEAPF32[$84>>2] = $104; - $105 = $103 + $69; - HEAPF32[$gi$1>>2] = $105; - $106 = $65 - $100; - HEAPF32[$70>>2] = $106; - $107 = $100 + $65; - HEAPF32[$54>>2] = $107; - $108 = (($gi$1) + ($5<<2)|0); - $109 = (($fi$1) + ($5<<2)|0); - $110 = ($109>>>0)<($1>>>0); - if ($110) { - $fi$1 = $109;$gi$1 = $108; - } else { - break; - } - } - $111 = +HEAPF32[$tri$0>>2]; - $112 = $111 * $c1$02; - $113 = +HEAPF32[$44>>2]; - $114 = $113 * $s1$03; - $115 = $112 - $114; - $116 = $113 * $c1$02; - $117 = $111 * $s1$03; - $118 = $116 + $117; - $119 = (($i$01) + 1)|0; - $120 = ($119|0)<($2|0); - if ($120) { - $c1$02 = $115;$i$01 = $119;$s1$03 = $118; - } else { - break; - } - } - } - $121 = ((($tri$0)) + 8|0); - $122 = ($5|0)<($0|0); - if ($122) { - $k4$0 = $5;$tri$0 = $121; - } else { - break; - } - } - return; -} -function _lame_get_id3v2_tag($gfp,$buffer,$size) { - $gfp = $gfp|0; - $buffer = $buffer|0; - $size = $size|0; - var $$$i = 0, $$$i$i = 0, $$$i$i29 = 0, $$0 = 0, $$0$be$i$i = 0, $$0$i = 0, $$0$i$off0$i$i = 0, $$0$i$off0$i$i18 = 0, $$0$i$off0$i$i66 = 0, $$0$i$off0$i22$i = 0, $$0$i$off0$i30$i = 0, $$0$i$off0$i35$i = 0, $$0$i$off0$i8$i = 0, $$0$i$off0$i8$i47 = 0, $$0$i$off0$i836$i = 0, $$0$i$off0$i841$i = 0, $$0$i$off0$v$i$i = 0, $$0$i$off0$v$i$i17 = 0, $$0$i$off0$v$i$i65 = 0, $$0$i$off0$v$i21$i = 0; - var $$0$i$off0$v$i29$i = 0, $$0$i$off0$v$i34$i = 0, $$0$i$off0$v$i7$i = 0, $$0$i$off0$v$i7$i46 = 0, $$0$i$off0$v$i735$i = 0, $$0$i$off0$v$i740$i = 0, $$0$i$off8$i$i = 0, $$0$i$off8$i$i20 = 0, $$0$i$off8$i$i68 = 0, $$0$i$off8$i10$i = 0, $$0$i$off8$i10$i49 = 0, $$0$i$off8$i1038$i = 0, $$0$i$off8$i1043$i = 0, $$0$i$off8$i24$i = 0, $$0$i$off8$i32$i = 0, $$0$i$off8$i37$i = 0, $$0$i$off8$v$i$i = 0, $$0$i$off8$v$i$i19 = 0, $$0$i$off8$v$i$i67 = 0, $$0$i$off8$v$i9$i = 0; - var $$0$i$off8$v$i9$i48 = 0, $$0$i23 = 0, $$0$i3$i$i = 0, $$0$i3$off$i$i = 0, $$0$i53 = 0, $$0$sum$i = 0, $$0$sum30$i = 0, $$0$sum45$i = 0, $$01$ph8$i$i = 0, $$010$i25$i = 0, $$010$i33$i = 0, $$010$i339$i = 0, $$010$i344$i = 0, $$010$i38$i = 0, $$014$i$i = 0, $$014$i$i25 = 0, $$014$i$i56 = 0, $$014$i19$i = 0, $$014$i19$i36 = 0, $$014$i7$i = 0; - var $$015$i$i = 0, $$02$lcssa$i12$i = 0, $$02$lcssa$i24$i = 0, $$02$ph7$i$i = 0, $$023$i$i = 0, $$023$i$i26 = 0, $$023$i$i57 = 0, $$023$i20$i = 0, $$023$i20$i37 = 0, $$023$i8$i = 0, $$048$i = 0, $$05$i$i = 0, $$05$i$i24 = 0, $$05$i$i55 = 0, $$05$i18$i = 0, $$05$i18$i35 = 0, $$05$i6$i = 0, $$0511$i = 0, $$06$i$i = 0, $$06$lcssa$i = 0; - var $$0610$i = 0, $$09$i = 0, $$1$i16$i = 0, $$1$i5$i = 0, $$17$i = 0, $$idx$val = 0, $$idx9 = 0, $$idx9$val = 0, $$in$i$i = 0, $$lobit = 0, $$lobit85 = 0, $$pn = 0, $$pn$i = 0, $$pn$i14 = 0, $$pn$i62 = 0, $$pn40$i = 0, $$pn46$i = 0, $$pre$i$i = 0, $$pre$i$i15 = 0, $$pre$i$i63 = 0; - var $$pre$i12$i = 0, $$pre$i12$i44 = 0, $$sink$i = 0, $$sum$i = 0, $$sum$i12 = 0, $$sum$i39 = 0, $$sum15$i = 0, $$sum26$i = 0, $$sum26$pn$i = 0, $$sum27$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0; - var $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0; - var $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0; - var $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0; - var $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0; - var $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0; - var $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0; - var $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0; - var $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0; - var $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0; - var $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0; - var $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0; - var $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0; - var $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0; - var $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0; - var $36 = 0.0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0.0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0; - var $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0; - var $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0.0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0.0, $410 = 0, $411 = 0, $412 = 0; - var $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0; - var $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0; - var $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0; - var $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0; - var $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0; - var $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; - var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; - var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0; - var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $albumart_mime$0$ph = 0, $albumart_mime$1 = 0, $buffer$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i$i10 = 0, $cond$i$i32 = 0, $cond$i73 = 0, $cond$i75 = 0, $cond1$i = 0, $cond1$i$i = 0, $cond1$i$i34 = 0, $cond1$i77 = 0, $extract5$i$i = 0, $extract5$i$i16 = 0; - var $extract5$i$i64 = 0, $extract5$i20$i = 0, $extract5$i28$i = 0, $extract5$i33$i = 0, $extract5$i6$i = 0, $extract5$i6$i45 = 0, $extract5$i634$i = 0, $extract5$i639$i = 0, $n$0$i = 0, $n$0$i$i = 0, $n$0$i$i33 = 0, $n$0$i76 = 0, $n$1$i = 0, $n$1$i$i = 0, $n$1$i$i11 = 0, $n$2$i$i = 0, $node$096 = 0, $node2$093 = 0, $notlhs = 0, $notrhs = 0; - var $or$cond = 0, $or$cond3 = 0, $or$cond3$i = 0, $or$cond5 = 0, $or$cond7$not = 0, $or$cond82 = 0, $p$091 = 0, $p$1 = 0, $p$2 = 0, $p$3 = 0, $phitmp$i = 0, $phitmp$i41 = 0, $phitmp18$i = 0, $phitmp19$i = 0, $phitmp31$i = 0, $phitmp32$i = 0, $playlength_ms$0$i = 0, $scevgep$i = 0, $scevgep$i$i = 0, $scevgep$i$i30 = 0; - var $scevgep$i$i70 = 0, $scevgep$i1$i = 0, $scevgep$i1$i59 = 0, $scevgep$i10$i = 0, $scevgep$i14$i = 0, $scevgep$i14$i51 = 0, $scevgep$i14$sum$i = 0, $scevgep$i14$sum27$i = 0, $scevgep$i2$i = 0, $scevgep$i22$i = 0, $scevgep$i22$i40 = 0, $scevgep$i22$sum$i = 0, $scevgep$i4$i = 0, $tag_size$0 = 0, $tag_size$195 = 0, $tag_size$2 = 0, $tag_size$3 = 0, $tag_size$4 = 0, $vararg_buffer = 0, label = 0; - var sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 1040|0; - $vararg_buffer = sp; - $buffer$i = sp + 8|0; - $0 = ($gfp|0)==(0|0); - if ($0) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $1 = ((($gfp)) + 288|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(0|0); - if ($3) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $$idx9 = ((($2)) + 85696|0); - $$idx9$val = HEAP32[$$idx9>>2]|0; - $$lobit = $$idx9$val & 4; - $4 = ($$lobit|0)==(0); - if (!($4)) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $5 = $$idx9$val & 10; - $6 = ((($2)) + 85704|0); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)==(0|0); - if ($8) { - $22 = 0; - } else { - $9 = (_strlen(($7|0))|0); - $22 = $9; - } - $10 = ((($2)) + 85708|0); - $11 = HEAP32[$10>>2]|0; - $12 = ($11|0)==(0|0); - if ($12) { - $24 = 0; - } else { - $13 = (_strlen(($11|0))|0); - $24 = $13; - } - $14 = ((($2)) + 85712|0); - $15 = HEAP32[$14>>2]|0; - $16 = ($15|0)==(0|0); - if ($16) { - $26 = 0; - } else { - $17 = (_strlen(($15|0))|0); - $26 = $17; - } - $18 = ((($2)) + 85716|0); - $19 = HEAP32[$18>>2]|0; - $20 = ($19|0)==(0|0); - if ($20) { - $28 = 0; - } else { - $21 = (_strlen(($19|0))|0); - $28 = $21; - } - $23 = ($22>>>0)>(30); - $25 = ($24>>>0)>(30); - $or$cond = $23 | $25; - $27 = ($26>>>0)>(30); - $or$cond3 = $or$cond | $27; - $29 = ($28>>>0)>(30); - $or$cond5 = $or$cond3 | $29; - if (!($or$cond5)) { - $30 = ((($2)) + 85720|0); - $31 = HEAP32[$30>>2]|0; - $notlhs = ($31|0)==(0); - $notrhs = ($28>>>0)<(29); - $or$cond7$not = $notrhs | $notlhs; - $32 = ($5|0)==(0); - $or$cond82 = $32 & $or$cond7$not; - if ($or$cond82) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - } - $33 = ((($gfp)) + 4|0); - $34 = HEAP32[$33>>2]|0; - $35 = ($34|0)==(-1); - if (!($35)) { - $36 = (+($34>>>0)); - $37 = $36 * 1000.0; - $38 = ((($2)) + 60|0); - $39 = HEAP32[$38>>2]|0; - $40 = (+($39|0)); - $41 = $37 / $40; - $42 = $41 > 4294967295.0; - if ($42) { - $playlength_ms$0$i = -1; - } else { - $43 = $41 < 0.0; - if ($43) { - $playlength_ms$0$i = 0; - } else { - $44 = (~~(($41))>>>0); - $playlength_ms$0$i = $44; - } - } - HEAP32[$vararg_buffer>>2] = $playlength_ms$0$i; - (_sprintf($buffer$i,6496,$vararg_buffer)|0); - $45 = HEAP32[$1>>2]|0; - $46 = ($45|0)==(0|0); - if (!($46)) { - $47 = ((($45)) + 85696|0); - $48 = HEAP32[$47>>2]|0; - (_id3v2_add_latin1($gfp,1414284622,6488,0,$buffer$i)|0); - HEAP32[$47>>2] = $48; - } - } - $49 = ((($2)) + 85728|0); - $50 = HEAP32[$49>>2]|0; - $51 = ($50|0)==(0|0); - do { - if ($51) { - $albumart_mime$1 = 0;$tag_size$0 = 10; - } else { - $52 = ((($2)) + 85732|0); - $53 = HEAP32[$52>>2]|0; - $54 = ($53|0)==(0); - if ($54) { - $albumart_mime$1 = 0;$tag_size$0 = 10; - } else { - $55 = ((($2)) + 85740|0); - $56 = HEAP32[$55>>2]|0; - if ((($56|0) == 2)) { - $albumart_mime$0$ph = 6504; - } else if ((($56|0) == 3)) { - $albumart_mime$0$ph = 6520; - } else if ((($56|0) == 1)) { - $albumart_mime$0$ph = 6536; - } else { - $albumart_mime$1 = 0;$tag_size$0 = 10; - break; - } - $57 = (_strlen(($albumart_mime$0$ph|0))|0); - $58 = (($57) + 24)|0; - $59 = (($58) + ($53))|0; - $albumart_mime$1 = $albumart_mime$0$ph;$tag_size$0 = $59; - } - } - } while(0); - $60 = ((($2)) + 85744|0); - $61 = HEAP32[$60>>2]|0; - $62 = ($61|0)==(0|0); - if ($62) { - $tag_size$3 = $tag_size$0; - } else { - $node$096 = $61;$tag_size$195 = $tag_size$0; - while(1) { - $63 = ((($node$096)) + 4|0); - $64 = HEAP32[$63>>2]|0; - do { - if ((($64|0) == 1431520594) | (($64|0) == 1129270605)) { - $65 = ((($node$096)) + 20|0); - $66 = HEAP32[$65>>2]|0; - $cond$i75 = ($66|0)==(1); - $67 = ((($node$096)) + 16|0); - $68 = HEAP32[$67>>2]|0; - $69 = $68 << 1; - $70 = (($69) + 16)|0; - $71 = (($68) + 15)|0; - $n$0$i76 = $cond$i75 ? $70 : $71; - $72 = ((($node$096)) + 32|0); - $73 = HEAP32[$72>>2]|0; - $cond1$i77 = ($73|0)==(1); - $74 = ((($node$096)) + 28|0); - $75 = HEAP32[$74>>2]|0; - if ($cond1$i77) { - $77 = $75 << 1; - $78 = (($n$0$i76) + ($77))|0; - $$pn = $78; - break; - } else { - $76 = (($n$0$i76) + ($75))|0; - $$pn = $76; - break; - } - } else { - $79 = $64 & -16777216; - if (!((($79|0) == 0) | (($79|0) == 1459617792))) { - $96 = ((($node$096)) + 32|0); - $97 = HEAP32[$96>>2]|0; - $cond$i = ($97|0)==(1); - $98 = ((($node$096)) + 16|0); - $99 = HEAP32[$98>>2]|0; - $100 = ($99|0)!=(0); - $101 = ((($node$096)) + 28|0); - $102 = HEAP32[$101>>2]|0; - if ($cond$i) { - $105 = $99 << 1; - $106 = (($105) + 13)|0; - $n$1$i = $100 ? $106 : 11; - $107 = $102 << 1; - $108 = (($n$1$i) + ($107))|0; - $$pn = $108; - break; - } else { - $103 = (($99) + 12)|0; - $$$i = $100 ? $103 : 11; - $104 = (($$$i) + ($102))|0; - $$pn = $104; - break; - } - } - $80 = ((($node$096)) + 16|0); - $81 = HEAP32[$80>>2]|0; - $82 = ($81|0)==(0); - do { - if ($82) { - $n$0$i = 10; - } else { - $83 = ((($node$096)) + 20|0); - $84 = HEAP32[$83>>2]|0; - $cond$i73 = ($84|0)==(1); - if ($cond$i73) { - $86 = $81 << 1; - $87 = (($86) + 13)|0; - $n$0$i = $87; - break; - } else { - $85 = (($81) + 12)|0; - $n$0$i = $85; - break; - } - } - } while(0); - $88 = ((($node$096)) + 28|0); - $89 = HEAP32[$88>>2]|0; - $90 = ($89|0)==(0); - if ($90) { - $$pn = $n$0$i; - } else { - $91 = ((($node$096)) + 32|0); - $92 = HEAP32[$91>>2]|0; - $cond1$i = ($92|0)==(1); - if ($cond1$i) { - $94 = (($n$0$i) + -1)|0; - $95 = (($94) + ($89))|0; - $$pn = $95; - break; - } else { - $93 = (($89) + ($n$0$i))|0; - $$pn = $93; - break; - } - } - } - } while(0); - $tag_size$2 = (($$pn) + ($tag_size$195))|0; - $109 = HEAP32[$node$096>>2]|0; - $110 = ($109|0)==(0|0); - if ($110) { - $tag_size$3 = $tag_size$2; - break; - } else { - $node$096 = $109;$tag_size$195 = $tag_size$2; - } - } - } - $$idx$val = HEAP32[$$idx9>>2]|0; - $$lobit85 = $$idx$val & 32; - $111 = ($$lobit85|0)==(0); - if ($111) { - $tag_size$4 = $tag_size$3; - } else { - $112 = ((($2)) + 85736|0); - $113 = HEAP32[$112>>2]|0; - $114 = (($113) + ($tag_size$3))|0; - $tag_size$4 = $114; - } - $115 = ($tag_size$4>>>0)>($size>>>0); - if ($115) { - $$0 = $tag_size$4; - STACKTOP = sp;return ($$0|0); - } - $116 = ($buffer|0)==(0|0); - if ($116) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $117 = ((($buffer)) + 1|0); - HEAP8[$buffer>>0] = 73; - $118 = ((($buffer)) + 2|0); - HEAP8[$117>>0] = 68; - $119 = ((($buffer)) + 3|0); - HEAP8[$118>>0] = 51; - $120 = ((($buffer)) + 4|0); - HEAP8[$119>>0] = 3; - $121 = ((($buffer)) + 5|0); - HEAP8[$120>>0] = 0; - $122 = ((($buffer)) + 6|0); - HEAP8[$121>>0] = 0; - $123 = (($tag_size$4) + -10)|0; - $124 = $123 >>> 21; - $125 = $124 & 127; - $126 = $125&255; - $127 = ((($buffer)) + 7|0); - HEAP8[$122>>0] = $126; - $128 = $123 >>> 14; - $129 = $128 & 127; - $130 = $129&255; - $131 = ((($buffer)) + 8|0); - HEAP8[$127>>0] = $130; - $132 = $123 >>> 7; - $133 = $132 & 127; - $134 = $133&255; - $135 = ((($buffer)) + 9|0); - HEAP8[$131>>0] = $134; - $136 = $123 & 127; - $137 = $136&255; - $138 = ((($buffer)) + 10|0); - HEAP8[$135>>0] = $137; - $139 = HEAP32[$60>>2]|0; - $140 = ($139|0)==(0|0); - if ($140) { - $p$2 = $138; - } else { - $node2$093 = $139;$p$091 = $138; - while(1) { - $141 = ((($node2$093)) + 4|0); - $142 = HEAP32[$141>>2]|0; - do { - if ((($142|0) == 1431520594) | (($142|0) == 1129270605)) { - $143 = ((($node2$093)) + 20|0); - $144 = HEAP32[$143>>2]|0; - $cond$i$i32 = ($144|0)==(1); - $145 = ((($node2$093)) + 16|0); - $146 = HEAP32[$145>>2]|0; - $147 = $146 << 1; - $148 = (($147) + 16)|0; - $149 = (($146) + 15)|0; - $n$0$i$i33 = $cond$i$i32 ? $148 : $149; - $150 = ((($node2$093)) + 32|0); - $151 = HEAP32[$150>>2]|0; - $cond1$i$i34 = ($151|0)==(1); - $152 = ((($node2$093)) + 28|0); - $153 = HEAP32[$152>>2]|0; - $154 = $cond1$i$i34&1; - $$sink$i = $153 << $154; - $155 = (($$sink$i) + ($n$0$i$i33))|0; - $156 = ($155>>>0)>(10); - if ($156) { - $157 = $142&255; - $158 = ((($p$091)) + 3|0); - HEAP8[$158>>0] = $157; - $159 = $142 >>> 8; - $160 = $159&255; - $161 = ((($p$091)) + 2|0); - HEAP8[$161>>0] = $160; - $162 = $142 >>> 16; - $163 = $162&255; - $164 = ((($p$091)) + 1|0); - HEAP8[$164>>0] = $163; - $165 = $142 >>> 24; - $166 = $165&255; - HEAP8[$p$091>>0] = $166; - $167 = ((($p$091)) + 4|0); - $168 = (($155) + -10)|0; - $169 = $168&255; - $170 = ((($p$091)) + 7|0); - HEAP8[$170>>0] = $169; - $171 = $168 >>> 8; - $172 = $171&255; - $173 = ((($p$091)) + 6|0); - HEAP8[$173>>0] = $172; - $174 = $168 >>> 16; - $175 = $174&255; - $176 = ((($p$091)) + 5|0); - HEAP8[$176>>0] = $175; - $177 = $168 >>> 24; - $178 = $177&255; - HEAP8[$167>>0] = $178; - $179 = ((($p$091)) + 8|0); - $180 = ((($p$091)) + 9|0); - HEAP8[$179>>0] = 0; - $181 = ((($p$091)) + 10|0); - HEAP8[$180>>0] = 0; - $182 = ((($node2$093)) + 24|0); - $183 = HEAP32[$150>>2]|0; - $184 = ($183|0)==(1); - $185 = $184&1; - $186 = ((($p$091)) + 11|0); - HEAP8[$181>>0] = $185; - $187 = ((($node2$093)) + 8|0); - $188 = HEAP8[$187>>0]|0; - $189 = ((($p$091)) + 12|0); - HEAP8[$186>>0] = $188; - $190 = ((($node2$093)) + 9|0); - $191 = HEAP8[$190>>0]|0; - $192 = ((($p$091)) + 13|0); - HEAP8[$189>>0] = $191; - $193 = ((($node2$093)) + 10|0); - $194 = HEAP8[$193>>0]|0; - $195 = ((($p$091)) + 14|0); - HEAP8[$192>>0] = $194; - $196 = ((($node2$093)) + 12|0); - $197 = HEAP32[$143>>2]|0; - $198 = ($197|0)==(1); - if ($198) { - $207 = HEAP32[$196>>2]|0; - $208 = HEAP32[$145>>2]|0; - $209 = ($208|0)==(0); - if ($209) { - $$1$i16$i = $195;$224 = 15;$514 = 16; - } else { - $210 = HEAP16[$207>>1]|0; - $211 = ($210<<16>>16)==(-2); - $212 = $208 << 1; - $213 = (($208) + -1)|0; - $extract5$i639$i = ($210&65535) >>> 8; - $$0$i$off0$v$i740$i = $211 ? $extract5$i639$i : $210; - $$0$i$off0$i841$i = $$0$i$off0$v$i740$i&255; - $214 = $extract5$i639$i&255; - $$0$i$off8$i1043$i = $211 ? -2 : $214; - $215 = ((($p$091)) + 15|0); - HEAP8[$195>>0] = $$0$i$off0$i841$i; - HEAP8[$215>>0] = $$0$i$off8$i1043$i; - $216 = ($213|0)==(0); - if (!($216)) { - $$010$i344$i = $195;$$pn46$i = $207;$220 = $213; - while(1) { - $217 = ((($$pn46$i)) + 2|0); - $218 = ((($$010$i344$i)) + 2|0); - $$pre$i12$i44 = HEAP16[$217>>1]|0; - $219 = (($220) + -1)|0; - $extract5$i6$i45 = ($$pre$i12$i44&65535) >>> 8; - $$0$i$off0$v$i7$i46 = $211 ? $extract5$i6$i45 : $$pre$i12$i44; - $$0$i$off0$i8$i47 = $$0$i$off0$v$i7$i46&255; - $$0$i$off8$v$i9$i48 = $211 ? $$pre$i12$i44 : $extract5$i6$i45; - $$0$i$off8$i10$i49 = $$0$i$off8$v$i9$i48&255; - $221 = ((($$010$i344$i)) + 3|0); - HEAP8[$218>>0] = $$0$i$off0$i8$i47; - HEAP8[$221>>0] = $$0$i$off8$i10$i49; - $222 = ($219|0)==(0); - if ($222) { - break; - } else { - $$010$i344$i = $218;$$pn46$i = $217;$220 = $219; - } - } - } - $$sum27$i = (($212) + 14)|0; - $scevgep$i14$i51 = (($p$091) + ($$sum27$i)|0); - $phitmp31$i = (($212) + 15)|0; - $phitmp32$i = (($212) + 16)|0; - $$1$i16$i = $scevgep$i14$i51;$224 = $phitmp31$i;$514 = $phitmp32$i; - } - $223 = (($p$091) + ($224)|0); - HEAP8[$$1$i16$i>>0] = 0; - HEAP8[$223>>0] = 0; - $$sum26$pn$i = $514; - } else { - $199 = HEAP32[$145>>2]|0; - $200 = ($199|0)==(0); - if ($200) { - $$02$lcssa$i24$i = $195;$513 = 15; - } else { - $201 = HEAP32[$196>>2]|0; - $$014$i19$i36 = $201;$$023$i20$i37 = $195;$$05$i18$i35 = $199; - while(1) { - $202 = (($$05$i18$i35) + -1)|0; - $203 = ((($$014$i19$i36)) + 1|0); - $204 = HEAP8[$$014$i19$i36>>0]|0; - $205 = ((($$023$i20$i37)) + 1|0); - HEAP8[$$023$i20$i37>>0] = $204; - $206 = ($202|0)==(0); - if ($206) { - break; - } else { - $$014$i19$i36 = $203;$$023$i20$i37 = $205;$$05$i18$i35 = $202; - } - } - $$sum$i39 = (($199) + 14)|0; - $scevgep$i22$i40 = (($p$091) + ($$sum$i39)|0); - $phitmp$i41 = (($199) + 15)|0; - $$02$lcssa$i24$i = $scevgep$i22$i40;$513 = $phitmp$i41; - } - HEAP8[$$02$lcssa$i24$i>>0] = 0; - $$sum26$pn$i = $513; - } - $$0$i53 = (($p$091) + ($$sum26$pn$i)|0); - $225 = HEAP32[$150>>2]|0; - $226 = ($225|0)==(1); - if ($226) { - $235 = HEAP32[$182>>2]|0; - $236 = HEAP32[$152>>2]|0; - $237 = ($236|0)==(0); - if ($237) { - $p$1 = $$0$i53; - break; - } - $238 = HEAP16[$235>>1]|0; - $239 = ($238<<16>>16)==(-2); - $240 = $236 << 1; - $241 = (($236) + -1)|0; - $extract5$i33$i = ($238&65535) >>> 8; - $$0$i$off0$v$i34$i = $239 ? $extract5$i33$i : $238; - $$0$i$off0$i35$i = $$0$i$off0$v$i34$i&255; - $242 = $extract5$i33$i&255; - $$0$i$off8$i37$i = $239 ? -2 : $242; - $$0$sum45$i = (($$sum26$pn$i) + 1)|0; - $243 = (($p$091) + ($$0$sum45$i)|0); - HEAP8[$$0$i53>>0] = $$0$i$off0$i35$i; - HEAP8[$243>>0] = $$0$i$off8$i37$i; - $244 = ($241|0)==(0); - if (!($244)) { - $$010$i38$i = $$0$i53;$$pn$i62 = $235;$248 = $241; - while(1) { - $245 = ((($$pn$i62)) + 2|0); - $246 = ((($$010$i38$i)) + 2|0); - $$pre$i$i63 = HEAP16[$245>>1]|0; - $247 = (($248) + -1)|0; - $extract5$i$i64 = ($$pre$i$i63&65535) >>> 8; - $$0$i$off0$v$i$i65 = $239 ? $extract5$i$i64 : $$pre$i$i63; - $$0$i$off0$i$i66 = $$0$i$off0$v$i$i65&255; - $$0$i$off8$v$i$i67 = $239 ? $$pre$i$i63 : $extract5$i$i64; - $$0$i$off8$i$i68 = $$0$i$off8$v$i$i67&255; - $249 = ((($$010$i38$i)) + 3|0); - HEAP8[$246>>0] = $$0$i$off0$i$i66; - HEAP8[$249>>0] = $$0$i$off8$i$i68; - $250 = ($247|0)==(0); - if ($250) { - break; - } else { - $$010$i38$i = $246;$$pn$i62 = $245;$248 = $247; - } - } - } - $$0$sum30$i = (($240) + ($$sum26$pn$i))|0; - $scevgep$i$i70 = (($p$091) + ($$0$sum30$i)|0); - $p$1 = $scevgep$i$i70; - break; - } else { - $227 = HEAP32[$152>>2]|0; - $228 = ($227|0)==(0); - if ($228) { - $p$1 = $$0$i53; - break; - } - $229 = HEAP32[$182>>2]|0; - $$014$i$i56 = $229;$$023$i$i57 = $$0$i53;$$05$i$i55 = $227; - while(1) { - $230 = (($$05$i$i55) + -1)|0; - $231 = ((($$014$i$i56)) + 1|0); - $232 = HEAP8[$$014$i$i56>>0]|0; - $233 = ((($$023$i$i57)) + 1|0); - HEAP8[$$023$i$i57>>0] = $232; - $234 = ($230|0)==(0); - if ($234) { - break; - } else { - $$014$i$i56 = $231;$$023$i$i57 = $233;$$05$i$i55 = $230; - } - } - $$0$sum$i = (($227) + ($$sum26$pn$i))|0; - $scevgep$i1$i59 = (($p$091) + ($$0$sum$i)|0); - $p$1 = $scevgep$i1$i59; - break; - } - } else { - $p$1 = $p$091; - } - } else { - $251 = $142 & -16777216; - if (!((($251|0) == 0) | (($251|0) == 1459617792))) { - $365 = ((($node2$093)) + 32|0); - $366 = HEAP32[$365>>2]|0; - $cond$i$i = ($366|0)==(1); - $367 = ((($node2$093)) + 16|0); - $368 = HEAP32[$367>>2]|0; - $369 = ($368|0)!=(0); - $370 = ((($node2$093)) + 28|0); - $371 = HEAP32[$370>>2]|0; - if ($cond$i$i) { - $374 = $368 << 1; - $375 = (($374) + 13)|0; - $n$1$i$i = $369 ? $375 : 11; - $376 = $371 << 1; - $377 = (($n$1$i$i) + ($376))|0; - $n$2$i$i = $377; - } else { - $372 = (($368) + 12)|0; - $$$i$i = $369 ? $372 : 11; - $373 = (($$$i$i) + ($371))|0; - $n$2$i$i = $373; - } - $378 = ($n$2$i$i>>>0)>(10); - if (!($378)) { - $p$1 = $p$091; - break; - } - $379 = $142&255; - $380 = ((($p$091)) + 3|0); - HEAP8[$380>>0] = $379; - $381 = $142 >>> 8; - $382 = $381&255; - $383 = ((($p$091)) + 2|0); - HEAP8[$383>>0] = $382; - $384 = $142 >>> 16; - $385 = $384&255; - $386 = ((($p$091)) + 1|0); - HEAP8[$386>>0] = $385; - $387 = $142 >>> 24; - $388 = $387&255; - HEAP8[$p$091>>0] = $388; - $389 = ((($p$091)) + 4|0); - $390 = (($n$2$i$i) + -10)|0; - $391 = $390&255; - $392 = ((($p$091)) + 7|0); - HEAP8[$392>>0] = $391; - $393 = $390 >>> 8; - $394 = $393&255; - $395 = ((($p$091)) + 6|0); - HEAP8[$395>>0] = $394; - $396 = $390 >>> 16; - $397 = $396&255; - $398 = ((($p$091)) + 5|0); - HEAP8[$398>>0] = $397; - $399 = $390 >>> 24; - $400 = $399&255; - HEAP8[$389>>0] = $400; - $401 = ((($p$091)) + 8|0); - $402 = ((($p$091)) + 9|0); - HEAP8[$401>>0] = 0; - $403 = ((($p$091)) + 10|0); - HEAP8[$402>>0] = 0; - $404 = ((($node2$093)) + 24|0); - $405 = HEAP32[$365>>2]|0; - $406 = ($405|0)==(1); - $407 = $406&1; - $408 = ((($p$091)) + 11|0); - HEAP8[$403>>0] = $407; - $409 = HEAP32[$367>>2]|0; - $410 = ($409|0)==(0); - do { - if ($410) { - $$0$i = $408; - } else { - $411 = ((($node2$093)) + 20|0); - $412 = HEAP32[$411>>2]|0; - $413 = ($412|0)==(1); - $414 = ((($node2$093)) + 12|0); - if ($413) { - $422 = HEAP32[$414>>2]|0; - $423 = HEAP16[$422>>1]|0; - $424 = ($423<<16>>16)==(-2); - $425 = $409 << 1; - $426 = (($409) + -1)|0; - $extract5$i634$i = ($423&65535) >>> 8; - $$0$i$off0$v$i735$i = $424 ? $extract5$i634$i : $423; - $$0$i$off0$i836$i = $$0$i$off0$v$i735$i&255; - $427 = $extract5$i634$i&255; - $$0$i$off8$i1038$i = $424 ? -2 : $427; - $428 = ((($p$091)) + 12|0); - HEAP8[$408>>0] = $$0$i$off0$i836$i; - HEAP8[$428>>0] = $$0$i$off8$i1038$i; - $429 = ($426|0)==(0); - if (!($429)) { - $$010$i339$i = $408;$$pn40$i = $422;$433 = $426; - while(1) { - $430 = ((($$pn40$i)) + 2|0); - $431 = ((($$010$i339$i)) + 2|0); - $$pre$i12$i = HEAP16[$430>>1]|0; - $432 = (($433) + -1)|0; - $extract5$i6$i = ($$pre$i12$i&65535) >>> 8; - $$0$i$off0$v$i7$i = $424 ? $extract5$i6$i : $$pre$i12$i; - $$0$i$off0$i8$i = $$0$i$off0$v$i7$i&255; - $$0$i$off8$v$i9$i = $424 ? $$pre$i12$i : $extract5$i6$i; - $$0$i$off8$i10$i = $$0$i$off8$v$i9$i&255; - $434 = ((($$010$i339$i)) + 3|0); - HEAP8[$431>>0] = $$0$i$off0$i8$i; - HEAP8[$434>>0] = $$0$i$off8$i10$i; - $435 = ($432|0)==(0); - if ($435) { - break; - } else { - $$010$i339$i = $431;$$pn40$i = $430;$433 = $432; - } - } - } - $$sum26$i = (($425) + 11)|0; - $scevgep$i14$i = (($p$091) + ($$sum26$i)|0); - $scevgep$i14$sum$i = (($425) + 12)|0; - $436 = (($p$091) + ($scevgep$i14$sum$i)|0); - HEAP8[$scevgep$i14$i>>0] = 0; - $scevgep$i14$sum27$i = (($425) + 13)|0; - $437 = (($p$091) + ($scevgep$i14$sum27$i)|0); - HEAP8[$436>>0] = 0; - $$0$i = $437; - break; - } else { - $415 = HEAP32[$414>>2]|0; - $$014$i19$i = $415;$$023$i20$i = $408;$$05$i18$i = $409; - while(1) { - $416 = (($$05$i18$i) + -1)|0; - $417 = ((($$014$i19$i)) + 1|0); - $418 = HEAP8[$$014$i19$i>>0]|0; - $419 = ((($$023$i20$i)) + 1|0); - HEAP8[$$023$i20$i>>0] = $418; - $420 = ($416|0)==(0); - if ($420) { - break; - } else { - $$014$i19$i = $417;$$023$i20$i = $419;$$05$i18$i = $416; - } - } - $$sum$i = (($409) + 11)|0; - $scevgep$i22$i = (($p$091) + ($$sum$i)|0); - $scevgep$i22$sum$i = (($409) + 12)|0; - $421 = (($p$091) + ($scevgep$i22$sum$i)|0); - HEAP8[$scevgep$i22$i>>0] = 0; - $$0$i = $421; - break; - } - } - } while(0); - $438 = HEAP32[$365>>2]|0; - $439 = ($438|0)==(1); - if ($439) { - $448 = HEAP32[$404>>2]|0; - $449 = HEAP32[$370>>2]|0; - $450 = ($449|0)==(0); - if ($450) { - $p$1 = $$0$i; - break; - } - $451 = HEAP16[$448>>1]|0; - $452 = ($451<<16>>16)==(-2); - $453 = $449 << 1; - $454 = (($449) + -1)|0; - $extract5$i28$i = ($451&65535) >>> 8; - $$0$i$off0$v$i29$i = $452 ? $extract5$i28$i : $451; - $$0$i$off0$i30$i = $$0$i$off0$v$i29$i&255; - $455 = $extract5$i28$i&255; - $$0$i$off8$i32$i = $452 ? -2 : $455; - $456 = ((($$0$i)) + 1|0); - HEAP8[$$0$i>>0] = $$0$i$off0$i30$i; - HEAP8[$456>>0] = $$0$i$off8$i32$i; - $457 = ($454|0)==(0); - if (!($457)) { - $$010$i33$i = $$0$i;$$pn$i = $448;$461 = $454; - while(1) { - $458 = ((($$pn$i)) + 2|0); - $459 = ((($$010$i33$i)) + 2|0); - $$pre$i$i = HEAP16[$458>>1]|0; - $460 = (($461) + -1)|0; - $extract5$i$i = ($$pre$i$i&65535) >>> 8; - $$0$i$off0$v$i$i = $452 ? $extract5$i$i : $$pre$i$i; - $$0$i$off0$i$i = $$0$i$off0$v$i$i&255; - $$0$i$off8$v$i$i = $452 ? $$pre$i$i : $extract5$i$i; - $$0$i$off8$i$i = $$0$i$off8$v$i$i&255; - $462 = ((($$010$i33$i)) + 3|0); - HEAP8[$459>>0] = $$0$i$off0$i$i; - HEAP8[$462>>0] = $$0$i$off8$i$i; - $463 = ($460|0)==(0); - if ($463) { - break; - } else { - $$010$i33$i = $459;$$pn$i = $458;$461 = $460; - } - } - } - $scevgep$i$i = (($$0$i) + ($453)|0); - $p$1 = $scevgep$i$i; - break; - } else { - $440 = HEAP32[$370>>2]|0; - $441 = ($440|0)==(0); - if ($441) { - $p$1 = $$0$i; - break; - } - $442 = HEAP32[$404>>2]|0; - $$014$i$i = $442;$$023$i$i = $$0$i;$$05$i$i = $440; - while(1) { - $443 = (($$05$i$i) + -1)|0; - $444 = ((($$014$i$i)) + 1|0); - $445 = HEAP8[$$014$i$i>>0]|0; - $446 = ((($$023$i$i)) + 1|0); - HEAP8[$$023$i$i>>0] = $445; - $447 = ($443|0)==(0); - if ($447) { - break; - } else { - $$014$i$i = $444;$$023$i$i = $446;$$05$i$i = $443; - } - } - $scevgep$i1$i = (($$0$i) + ($440)|0); - $p$1 = $scevgep$i1$i; - break; - } - } - $252 = ((($node2$093)) + 16|0); - $253 = HEAP32[$252>>2]|0; - $254 = ($253|0)==(0); - do { - if ($254) { - $n$0$i$i = 10; - } else { - $255 = ((($node2$093)) + 20|0); - $256 = HEAP32[$255>>2]|0; - $cond$i$i10 = ($256|0)==(1); - if ($cond$i$i10) { - $258 = $253 << 1; - $259 = (($258) + 13)|0; - $n$0$i$i = $259; - break; - } else { - $257 = (($253) + 12)|0; - $n$0$i$i = $257; - break; - } - } - } while(0); - $260 = ((($node2$093)) + 28|0); - $261 = HEAP32[$260>>2]|0; - $262 = ($261|0)==(0); - do { - if ($262) { - $n$1$i$i11 = $n$0$i$i; - } else { - $263 = ((($node2$093)) + 32|0); - $264 = HEAP32[$263>>2]|0; - $cond1$i$i = ($264|0)==(1); - if ($cond1$i$i) { - $266 = (($n$0$i$i) + -1)|0; - $267 = (($266) + ($261))|0; - $n$1$i$i11 = $267; - break; - } else { - $265 = (($261) + ($n$0$i$i))|0; - $n$1$i$i11 = $265; - break; - } - } - } while(0); - $268 = ($n$1$i$i11>>>0)>(10); - if (!($268)) { - $p$1 = $p$091; - break; - } - $269 = $142&255; - $270 = ((($p$091)) + 3|0); - HEAP8[$270>>0] = $269; - $271 = $142 >>> 8; - $272 = $271&255; - $273 = ((($p$091)) + 2|0); - HEAP8[$273>>0] = $272; - $274 = $142 >>> 16; - $275 = $274&255; - $276 = ((($p$091)) + 1|0); - HEAP8[$276>>0] = $275; - $277 = $142 >>> 24; - $278 = $277&255; - HEAP8[$p$091>>0] = $278; - $279 = ((($p$091)) + 4|0); - $280 = (($n$1$i$i11) + -10)|0; - $281 = $280&255; - $282 = ((($p$091)) + 7|0); - HEAP8[$282>>0] = $281; - $283 = $280 >>> 8; - $284 = $283&255; - $285 = ((($p$091)) + 6|0); - HEAP8[$285>>0] = $284; - $286 = $280 >>> 16; - $287 = $286&255; - $288 = ((($p$091)) + 5|0); - HEAP8[$288>>0] = $287; - $289 = $280 >>> 24; - $290 = $289&255; - HEAP8[$279>>0] = $290; - $291 = ((($p$091)) + 8|0); - $292 = ((($p$091)) + 9|0); - HEAP8[$291>>0] = 0; - $293 = ((($p$091)) + 10|0); - HEAP8[$292>>0] = 0; - $294 = HEAP32[$252>>2]|0; - $295 = ($294|0)==(0); - do { - if ($295) { - $$0$i23 = $293; - } else { - $296 = ((($node2$093)) + 20|0); - $297 = HEAP32[$296>>2]|0; - $298 = ($297|0)==(1); - $299 = $298&1; - $300 = ((($p$091)) + 11|0); - HEAP8[$293>>0] = $299; - $301 = HEAP32[$296>>2]|0; - $302 = ($301|0)==(1); - $303 = ((($node2$093)) + 12|0); - if ($302) { - $314 = HEAP32[$303>>2]|0; - $315 = HEAP32[$252>>2]|0; - $316 = ($315|0)==(0); - if ($316) { - $$1$i5$i = $300;$331 = 12;$333 = 13; - } else { - $317 = HEAP16[$314>>1]|0; - $318 = ($317<<16>>16)==(-2); - $319 = $315 << 1; - $320 = (($315) + -1)|0; - $extract5$i20$i = ($317&65535) >>> 8; - $$0$i$off0$v$i21$i = $318 ? $extract5$i20$i : $317; - $$0$i$off0$i22$i = $$0$i$off0$v$i21$i&255; - $321 = $extract5$i20$i&255; - $$0$i$off8$i24$i = $318 ? -2 : $321; - $322 = ((($p$091)) + 12|0); - HEAP8[$300>>0] = $$0$i$off0$i22$i; - HEAP8[$322>>0] = $$0$i$off8$i24$i; - $323 = ($320|0)==(0); - if (!($323)) { - $$010$i25$i = $300;$$pn$i14 = $314;$327 = $320; - while(1) { - $324 = ((($$pn$i14)) + 2|0); - $325 = ((($$010$i25$i)) + 2|0); - $$pre$i$i15 = HEAP16[$324>>1]|0; - $326 = (($327) + -1)|0; - $extract5$i$i16 = ($$pre$i$i15&65535) >>> 8; - $$0$i$off0$v$i$i17 = $318 ? $extract5$i$i16 : $$pre$i$i15; - $$0$i$off0$i$i18 = $$0$i$off0$v$i$i17&255; - $$0$i$off8$v$i$i19 = $318 ? $$pre$i$i15 : $extract5$i$i16; - $$0$i$off8$i$i20 = $$0$i$off8$v$i$i19&255; - $328 = ((($$010$i25$i)) + 3|0); - HEAP8[$325>>0] = $$0$i$off0$i$i18; - HEAP8[$328>>0] = $$0$i$off8$i$i20; - $329 = ($326|0)==(0); - if ($329) { - break; - } else { - $$010$i25$i = $325;$$pn$i14 = $324;$327 = $326; - } - } - } - $$sum15$i = (($319) + 11)|0; - $scevgep$i4$i = (($p$091) + ($$sum15$i)|0); - $phitmp18$i = (($319) + 12)|0; - $phitmp19$i = (($319) + 13)|0; - $$1$i5$i = $scevgep$i4$i;$331 = $phitmp18$i;$333 = $phitmp19$i; - } - $330 = (($p$091) + ($331)|0); - HEAP8[$$1$i5$i>>0] = 0; - $332 = (($p$091) + ($333)|0); - HEAP8[$330>>0] = 0; - $$0$i23 = $332; - break; - } else { - $304 = HEAP32[$252>>2]|0; - $305 = ($304|0)==(0); - if ($305) { - $$02$lcssa$i12$i = $300;$313 = 12; - } else { - $306 = HEAP32[$303>>2]|0; - $$014$i7$i = $306;$$023$i8$i = $300;$$05$i6$i = $304; - while(1) { - $307 = (($$05$i6$i) + -1)|0; - $308 = ((($$014$i7$i)) + 1|0); - $309 = HEAP8[$$014$i7$i>>0]|0; - $310 = ((($$023$i8$i)) + 1|0); - HEAP8[$$023$i8$i>>0] = $309; - $311 = ($307|0)==(0); - if ($311) { - break; - } else { - $$014$i7$i = $308;$$023$i8$i = $310;$$05$i6$i = $307; - } - } - $$sum$i12 = (($304) + 11)|0; - $scevgep$i10$i = (($p$091) + ($$sum$i12)|0); - $phitmp$i = (($304) + 12)|0; - $$02$lcssa$i12$i = $scevgep$i10$i;$313 = $phitmp$i; - } - $312 = (($p$091) + ($313)|0); - HEAP8[$$02$lcssa$i12$i>>0] = 0; - $$0$i23 = $312; - break; - } - } - } while(0); - $334 = ((($node2$093)) + 24|0); - $335 = ((($node2$093)) + 32|0); - $336 = HEAP32[$335>>2]|0; - $337 = ($336|0)==(1); - if (!($337)) { - $338 = HEAP32[$260>>2]|0; - $339 = ($338|0)==(0); - if ($339) { - $p$1 = $$0$i23; - break; - } - $340 = HEAP32[$334>>2]|0; - $$014$i$i25 = $340;$$023$i$i26 = $$0$i23;$$05$i$i24 = $338; - while(1) { - $341 = (($$05$i$i24) + -1)|0; - $342 = ((($$014$i$i25)) + 1|0); - $343 = HEAP8[$$014$i$i25>>0]|0; - $344 = ((($$023$i$i26)) + 1|0); - HEAP8[$$023$i$i26>>0] = $343; - $345 = ($341|0)==(0); - if ($345) { - break; - } else { - $$014$i$i25 = $342;$$023$i$i26 = $344;$$05$i$i24 = $341; - } - } - $scevgep$i2$i = (($$0$i23) + ($338)|0); - $p$1 = $scevgep$i2$i; - break; - } - $346 = HEAP32[$334>>2]|0; - $347 = HEAP32[$260>>2]|0; - $348 = ($347|0)==(0); - if ($348) { - $p$1 = $$0$i23; - break; - } - $349 = HEAP16[$346>>1]|0; - if ((($349<<16>>16) == -257) | (($349<<16>>16) == -2)) { - $350 = ((($346)) + 2|0); - $351 = (($347) + -1)|0; - $352 = ($351|0)==(0); - if ($352) { - $p$1 = $$0$i23; - break; - } else { - $$01$ph8$i$i = $350;$$02$ph7$i$i = $351; - } - } else { - $$01$ph8$i$i = $346;$$02$ph7$i$i = $347; - } - $353 = ($349<<16>>16)==(-2); - $$015$i$i = $$01$ph8$i$i;$$06$i$i = $$0$i23;$$in$i$i = $$02$ph7$i$i; - while(1) { - $354 = (($$in$i$i) + -1)|0; - $355 = ((($$015$i$i)) + 2|0); - $356 = HEAP16[$$015$i$i>>1]|0; - if ($353) { - $357 = $356&65535; - $358 = $357 << 8; - $359 = $357 >>> 8; - $360 = $358 | $359; - $361 = $360&65535; - $$0$i3$i$i = $361; - } else { - $$0$i3$i$i = $356; - } - $$0$i3$off$i$i = (($$0$i3$i$i) + -32)<<16>>16; - $362 = ($$0$i3$off$i$i&65535)>(223); - $363 = $$0$i3$i$i&255; - $$$i$i29 = $362 ? 32 : $363; - $$0$be$i$i = ((($$06$i$i)) + 1|0); - HEAP8[$$06$i$i>>0] = $$$i$i29; - $364 = ($354|0)==(0); - if ($364) { - break; - } else { - $$015$i$i = $355;$$06$i$i = $$0$be$i$i;$$in$i$i = $354; - } - } - $scevgep$i$i30 = (($$0$i23) + ($$02$ph7$i$i)|0); - $p$1 = $scevgep$i$i30; - } - } while(0); - $464 = HEAP32[$node2$093>>2]|0; - $465 = ($464|0)==(0|0); - if ($465) { - $p$2 = $p$1; - break; - } else { - $node2$093 = $464;$p$091 = $p$1; - } - } - } - $466 = ($albumart_mime$1|0)==(0|0); - if ($466) { - $p$3 = $p$2; - } else { - $467 = HEAP32[$49>>2]|0; - $468 = ((($2)) + 85732|0); - $469 = HEAP32[$468>>2]|0; - $470 = ($467|0)!=(0|0); - $471 = ($469|0)!=(0); - $or$cond3$i = $470 & $471; - if ($or$cond3$i) { - $472 = ((($p$2)) + 3|0); - HEAP8[$472>>0] = 67; - $473 = ((($p$2)) + 2|0); - HEAP8[$473>>0] = 73; - $474 = ((($p$2)) + 1|0); - HEAP8[$474>>0] = 80; - HEAP8[$p$2>>0] = 65; - $475 = ((($p$2)) + 4|0); - $476 = (_strlen(($albumart_mime$1|0))|0); - $477 = (($469) + 4)|0; - $478 = (($477) + ($476))|0; - $479 = $478&255; - $480 = ((($p$2)) + 7|0); - HEAP8[$480>>0] = $479; - $481 = $478 >>> 8; - $482 = $481&255; - $483 = ((($p$2)) + 6|0); - HEAP8[$483>>0] = $482; - $484 = $478 >>> 16; - $485 = $484&255; - $486 = ((($p$2)) + 5|0); - HEAP8[$486>>0] = $485; - $487 = $478 >>> 24; - $488 = $487&255; - HEAP8[$475>>0] = $488; - $489 = ((($p$2)) + 8|0); - $490 = ((($p$2)) + 9|0); - HEAP8[$489>>0] = 0; - $491 = ((($p$2)) + 10|0); - HEAP8[$490>>0] = 0; - $492 = ((($p$2)) + 11|0); - HEAP8[$491>>0] = 0; - $493 = HEAP8[$albumart_mime$1>>0]|0; - $494 = ($493<<24>>24)==(0); - if ($494) { - $$06$lcssa$i = $492; - } else { - $$0511$i = $albumart_mime$1;$$0610$i = $492;$497 = $493; - while(1) { - $495 = ((($$0511$i)) + 1|0); - $496 = ((($$0610$i)) + 1|0); - HEAP8[$$0610$i>>0] = $497; - $498 = HEAP8[$495>>0]|0; - $499 = ($498<<24>>24)==(0); - if ($499) { - $$06$lcssa$i = $496; - break; - } else { - $$0511$i = $495;$$0610$i = $496;$497 = $498; - } - } - } - $500 = ((($$06$lcssa$i)) + 1|0); - HEAP8[$$06$lcssa$i>>0] = 0; - $501 = ((($$06$lcssa$i)) + 2|0); - HEAP8[$500>>0] = 0; - HEAP8[$501>>0] = 0; - $502 = ((($$06$lcssa$i)) + 3|0); - $$048$i = $467;$$09$i = $469;$$17$i = $502; - while(1) { - $503 = (($$09$i) + -1)|0; - $504 = ((($$048$i)) + 1|0); - $505 = HEAP8[$$048$i>>0]|0; - $506 = ((($$17$i)) + 1|0); - HEAP8[$$17$i>>0] = $505; - $507 = ($503|0)==(0); - if ($507) { - break; - } else { - $$048$i = $504;$$09$i = $503;$$17$i = $506; - } - } - $508 = (($469) + 3)|0; - $scevgep$i = (($$06$lcssa$i) + ($508)|0); - $p$3 = $scevgep$i; - } else { - $p$3 = $p$2; - } - } - $509 = $p$3; - $510 = $buffer; - $511 = (($tag_size$4) + ($510))|0; - $512 = (($511) - ($509))|0; - _memset(($p$3|0),0,($512|0))|0; - $$0 = $tag_size$4; - STACKTOP = sp;return ($$0|0); -} -function _id3tag_write_v2($gfp) { - $gfp = $gfp|0; - var $$0 = 0, $$idx1 = 0, $$idx1$val = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $i$03 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfp)) + 288|0); - $1 = HEAP32[$0>>2]|0; - $$idx1 = ((($1)) + 85696|0); - $$idx1$val = HEAP32[$$idx1>>2]|0; - $2 = $$idx1$val & 5; - $3 = ($2|0)==(1); - if (!($3)) { - $$0 = 0; - return ($$0|0); - } - $4 = (_lame_get_id3v2_tag($gfp,0,0)|0); - $5 = (_calloc($4,1)|0); - $6 = ($5|0)==(0|0); - if ($6) { - $$0 = -1; - return ($$0|0); - } - $7 = (_lame_get_id3v2_tag($gfp,$5,$4)|0); - $8 = ($7>>>0)>($4>>>0); - if ($8) { - _free($5); - $$0 = -1; - return ($$0|0); - } - $9 = ($7|0)==(0); - if (!($9)) { - $i$03 = 0; - while(1) { - $10 = (($5) + ($i$03)|0); - $11 = HEAP8[$10>>0]|0; - _add_dummy_byte($1,$11,1); - $12 = (($i$03) + 1)|0; - $exitcond = ($12|0)==($7|0); - if ($exitcond) { - break; - } else { - $i$03 = $12; - } - } - } - _free($5); - $$0 = $7; - return ($$0|0); -} -function _lame_get_id3v1_tag($gfp,$buffer,$size) { - $gfp = $gfp|0; - $buffer = $buffer|0; - $size = $size|0; - var $$0 = 0, $$0$lcssa$i = 0, $$0$lcssa$i10 = 0, $$0$lcssa$i19 = 0, $$0$lcssa$i28 = 0, $$0$lcssa$i37 = 0, $$0$ph8$i = 0, $$0$ph8$i13 = 0, $$0$ph8$i22 = 0, $$0$ph8$i31 = 0, $$0$ph8$i4 = 0, $$02$ph7$i = 0, $$02$ph7$i14 = 0, $$02$ph7$i23 = 0, $$02$ph7$i32 = 0, $$02$ph7$i5 = 0, $$05$i = 0, $$05$i$lcssa = 0, $$05$i17 = 0, $$05$i17$lcssa = 0; - var $$05$i212 = 0, $$05$i26 = 0, $$05$i26$lcssa = 0, $$05$i35 = 0, $$05$i35$lcssa = 0, $$05$i8 = 0, $$05$i8$lcssa = 0, $$idx2 = 0, $$idx2$val = 0, $$in$i = 0, $$in$i12 = 0, $$in$i21 = 0, $$in$i3 = 0, $$in$i30 = 0, $$in10$i = 0, $$in10$i16 = 0, $$in10$i25 = 0, $$in10$i34 = 0, $$in10$i7 = 0, $$lcssa = 0; - var $$lcssa214 = 0, $$lcssa218 = 0, $$lcssa220 = 0, $$lcssa224 = 0, $$lcssa226 = 0, $$lcssa230 = 0, $$lcssa232 = 0, $$lcssa236 = 0, $$lcssa238 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; - var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; - var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; - var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; - var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $9 = 0, $or$cond = 0, $p$0 = 0, $vararg_buffer = 0, $year = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $vararg_buffer = sp; - $year = sp + 4|0; - $0 = ($gfp|0)==(0|0); - if ($0) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $1 = ($size>>>0)<(128); - if ($1) { - $$0 = 128; - STACKTOP = sp;return ($$0|0); - } - $2 = ((($gfp)) + 288|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3|0)==(0|0); - $5 = ($buffer|0)==(0|0); - $or$cond = $5 | $4; - if ($or$cond) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $$idx2 = ((($3)) + 85696|0); - $$idx2$val = HEAP32[$$idx2>>2]|0; - $6 = $$idx2$val & 9; - $7 = ($6|0)==(1); - if (!($7)) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $8 = $$idx2$val << 1; - $9 = $8 & 32; - $10 = ((($buffer)) + 1|0); - HEAP8[$buffer>>0] = 84; - $11 = ((($buffer)) + 2|0); - HEAP8[$10>>0] = 65; - $12 = ((($buffer)) + 3|0); - HEAP8[$11>>0] = 71; - $13 = ((($3)) + 85704|0); - $14 = HEAP32[$13>>2]|0; - $15 = $9&255; - $$0$ph8$i31 = $12;$$02$ph7$i32 = $14;$$in$i30 = 30; - L13: while(1) { - $16 = ($$02$ph7$i32|0)==(0|0); - $$05$i35 = $$0$ph8$i31;$$in10$i34 = $$in$i30; - while(1) { - $17 = (($$in10$i34) + -1)|0; - if (!($16)) { - $18 = HEAP8[$$02$ph7$i32>>0]|0; - $19 = ($18<<24>>24)==(0); - if (!($19)) { - $$05$i35$lcssa = $$05$i35;$$lcssa236 = $17;$$lcssa238 = $18; - break; - } - } - $23 = ((($$05$i35)) + 1|0); - HEAP8[$$05$i35>>0] = $15; - $24 = ($17|0)==(0); - if ($24) { - $$0$lcssa$i37 = $23; - break L13; - } else { - $$05$i35 = $23;$$in10$i34 = $17; - } - } - $20 = ((($$02$ph7$i32)) + 1|0); - $21 = ((($$05$i35$lcssa)) + 1|0); - HEAP8[$$05$i35$lcssa>>0] = $$lcssa238; - $22 = ($$lcssa236|0)==(0); - if ($22) { - $$0$lcssa$i37 = $21; - break; - } else { - $$0$ph8$i31 = $21;$$02$ph7$i32 = $20;$$in$i30 = $$lcssa236; - } - } - $25 = ((($3)) + 85708|0); - $26 = HEAP32[$25>>2]|0; - $$0$ph8$i22 = $$0$lcssa$i37;$$02$ph7$i23 = $26;$$in$i21 = 30; - L22: while(1) { - $27 = ($$02$ph7$i23|0)==(0|0); - $$05$i26 = $$0$ph8$i22;$$in10$i25 = $$in$i21; - while(1) { - $28 = (($$in10$i25) + -1)|0; - if (!($27)) { - $29 = HEAP8[$$02$ph7$i23>>0]|0; - $30 = ($29<<24>>24)==(0); - if (!($30)) { - $$05$i26$lcssa = $$05$i26;$$lcssa230 = $28;$$lcssa232 = $29; - break; - } - } - $34 = ((($$05$i26)) + 1|0); - HEAP8[$$05$i26>>0] = $15; - $35 = ($28|0)==(0); - if ($35) { - $$0$lcssa$i28 = $34; - break L22; - } else { - $$05$i26 = $34;$$in10$i25 = $28; - } - } - $31 = ((($$02$ph7$i23)) + 1|0); - $32 = ((($$05$i26$lcssa)) + 1|0); - HEAP8[$$05$i26$lcssa>>0] = $$lcssa232; - $33 = ($$lcssa230|0)==(0); - if ($33) { - $$0$lcssa$i28 = $32; - break; - } else { - $$0$ph8$i22 = $32;$$02$ph7$i23 = $31;$$in$i21 = $$lcssa230; - } - } - $36 = ((($3)) + 85712|0); - $37 = HEAP32[$36>>2]|0; - $$0$ph8$i13 = $$0$lcssa$i28;$$02$ph7$i14 = $37;$$in$i12 = 30; - L31: while(1) { - $38 = ($$02$ph7$i14|0)==(0|0); - $$05$i17 = $$0$ph8$i13;$$in10$i16 = $$in$i12; - while(1) { - $39 = (($$in10$i16) + -1)|0; - if (!($38)) { - $40 = HEAP8[$$02$ph7$i14>>0]|0; - $41 = ($40<<24>>24)==(0); - if (!($41)) { - $$05$i17$lcssa = $$05$i17;$$lcssa224 = $39;$$lcssa226 = $40; - break; - } - } - $45 = ((($$05$i17)) + 1|0); - HEAP8[$$05$i17>>0] = $15; - $46 = ($39|0)==(0); - if ($46) { - $$0$lcssa$i19 = $45; - break L31; - } else { - $$05$i17 = $45;$$in10$i16 = $39; - } - } - $42 = ((($$02$ph7$i14)) + 1|0); - $43 = ((($$05$i17$lcssa)) + 1|0); - HEAP8[$$05$i17$lcssa>>0] = $$lcssa226; - $44 = ($$lcssa224|0)==(0); - if ($44) { - $$0$lcssa$i19 = $43; - break; - } else { - $$0$ph8$i13 = $43;$$02$ph7$i14 = $42;$$in$i12 = $$lcssa224; - } - } - $47 = ((($3)) + 85700|0); - $48 = HEAP32[$47>>2]|0; - HEAP32[$vararg_buffer>>2] = $48; - (_sprintf($year,6552,$vararg_buffer)|0); - $49 = HEAP32[$47>>2]|0; - $50 = ($49|0)!=(0); - $51 = $50 ? $year : 0; - $$0$ph8$i4 = $$0$lcssa$i19;$$02$ph7$i5 = $51;$$in$i3 = 4; - L40: while(1) { - $52 = ($$02$ph7$i5|0)==(0|0); - $$05$i8 = $$0$ph8$i4;$$in10$i7 = $$in$i3; - while(1) { - $53 = (($$in10$i7) + -1)|0; - if (!($52)) { - $54 = HEAP8[$$02$ph7$i5>>0]|0; - $55 = ($54<<24>>24)==(0); - if (!($55)) { - $$05$i8$lcssa = $$05$i8;$$lcssa218 = $53;$$lcssa220 = $54; - break; - } - } - $59 = ((($$05$i8)) + 1|0); - HEAP8[$$05$i8>>0] = $15; - $60 = ($53|0)==(0); - if ($60) { - $$0$lcssa$i10 = $59; - break L40; - } else { - $$05$i8 = $59;$$in10$i7 = $53; - } - } - $56 = ((($$02$ph7$i5)) + 1|0); - $57 = ((($$05$i8$lcssa)) + 1|0); - HEAP8[$$05$i8$lcssa>>0] = $$lcssa220; - $58 = ($$lcssa218|0)==(0); - if ($58) { - $$0$lcssa$i10 = $57; - break; - } else { - $$0$ph8$i4 = $57;$$02$ph7$i5 = $56;$$in$i3 = $$lcssa218; - } - } - $61 = ((($3)) + 85716|0); - $62 = HEAP32[$61>>2]|0; - $63 = ((($3)) + 85720|0); - $64 = HEAP32[$63>>2]|0; - $65 = ($64|0)!=(0); - $66 = $65 ? 28 : 30; - $$0$ph8$i = $$0$lcssa$i10;$$02$ph7$i = $62;$$in$i = $66; - L49: while(1) { - $67 = ($$02$ph7$i|0)==(0|0); - $$05$i = $$0$ph8$i;$$in10$i = $$in$i; - while(1) { - $68 = (($$in10$i) + -1)|0; - if (!($67)) { - $69 = HEAP8[$$02$ph7$i>>0]|0; - $70 = ($69<<24>>24)==(0); - if (!($70)) { - $$05$i$lcssa = $$05$i;$$lcssa = $68;$$lcssa214 = $69; - break; - } - } - $74 = ((($$05$i)) + 1|0); - HEAP8[$$05$i>>0] = $15; - $75 = ($68|0)==(0); - if ($75) { - $$0$lcssa$i = $74;$$05$i212 = $$05$i; - break L49; - } else { - $$05$i = $74;$$in10$i = $68; - } - } - $71 = ((($$02$ph7$i)) + 1|0); - $72 = ((($$05$i$lcssa)) + 1|0); - HEAP8[$$05$i$lcssa>>0] = $$lcssa214; - $73 = ($$lcssa|0)==(0); - if ($73) { - $$0$lcssa$i = $72;$$05$i212 = $$05$i$lcssa; - break; - } else { - $$0$ph8$i = $72;$$02$ph7$i = $71;$$in$i = $$lcssa; - } - } - $76 = HEAP32[$63>>2]|0; - $77 = ($76|0)==(0); - if ($77) { - $p$0 = $$0$lcssa$i; - } else { - $78 = ((($$05$i212)) + 2|0); - HEAP8[$$0$lcssa$i>>0] = 0; - $79 = HEAP32[$63>>2]|0; - $80 = $79&255; - $81 = ((($$05$i212)) + 3|0); - HEAP8[$78>>0] = $80; - $p$0 = $81; - } - $82 = ((($3)) + 85724|0); - $83 = HEAP32[$82>>2]|0; - $84 = $83&255; - HEAP8[$p$0>>0] = $84; - $$0 = 128; - STACKTOP = sp;return ($$0|0); -} -function _id3tag_write_v1($gfp) { - $gfp = $gfp|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $exitcond = 0, $i$01 = 0, $tag = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $tag = sp; - $0 = ((($gfp)) + 288|0); - $1 = HEAP32[$0>>2]|0; - $2 = (_lame_get_id3v1_tag($gfp,$tag,128)|0); - $3 = (($2) + -1)|0; - $4 = ($3>>>0)>(127); - if ($4) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } else { - $i$01 = 0; - } - while(1) { - $5 = (($tag) + ($i$01)|0); - $6 = HEAP8[$5>>0]|0; - _add_dummy_byte($1,$6,1); - $7 = (($i$01) + 1)|0; - $exitcond = ($7|0)==($2|0); - if ($exitcond) { - $$0 = $2; - break; - } else { - $i$01 = $7; - } - } - STACKTOP = sp;return ($$0|0); -} -function _id3v2_add_latin1($gfp,$frame_id,$lang,$desc,$text) { - $gfp = $gfp|0; - $frame_id = $frame_id|0; - $lang = $lang|0; - $desc = $desc|0; - $text = $text|0; - var $$0 = 0, $$0$i = 0, $$0$i2 = 0, $$0$i9 = 0, $$in$i = 0, $$lcssa = 0, $$lcssa84 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; - var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; - var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; - var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; - var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; - var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i$0$lcssa$ph$i = 0, $i$01$i = 0, $n$0$i = 0, $n$0$i$lcssa = 0, $n$0$i7 = 0, $n$0$i7$lcssa = 0, $node$0 = 0, $node$0$i = 0, $node$0$i14 = 0, $node$0$i14$us = 0, $node$0$us = 0; - var $node$01$i = 0, $node$01$i11 = 0, $node$01$i11$us = 0, $node$02$i = 0, $node$02$i12 = 0, $node$02$i12$us = 0, $node$1 = 0, $node$2 = 0, $scevgep$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($gfp|0)==(0|0); - if ($0) { - $$0 = -255; - return ($$0|0); - } - $1 = ((($gfp)) + 288|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(0|0); - if ($3) { - $$0 = -255; - return ($$0|0); - } - $4 = ((($2)) + 85744|0); - $node$01$i = HEAP32[$4>>2]|0; - $5 = ($node$01$i|0)==(0|0); - L7: do { - if ($5) { - $$0$i = 0; - } else { - $node$02$i = $node$01$i; - while(1) { - $6 = ((($node$02$i)) + 4|0); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)==($frame_id|0); - if ($8) { - $$0$i = $node$02$i; - break L7; - } - $node$0$i = HEAP32[$node$02$i>>2]|0; - $9 = ($node$0$i|0)==(0|0); - if ($9) { - $$0$i = 0; - break; - } else { - $node$02$i = $node$0$i; - } - } - } - } while(0); - L12: do { - if ((($frame_id|0) == 1347570006) | (($frame_id|0) == 1196575044) | (($frame_id|0) == 1162756946) | (($frame_id|0) == 1279872587) | (($frame_id|0) == 1095061059) | (($frame_id|0) == 1346588244) | (($frame_id|0) == 1195724610) | (($frame_id|0) == 1095780675) | (($frame_id|0) == 1398361172) | (($frame_id|0) == 1129270605) | (($frame_id|0) == 1465407576) | (($frame_id|0) == 1415075928)) { - $10 = ($$0$i|0)==(0|0); - if ($10) { - label = 25; - } else { - $11 = ($desc|0)==(0|0); - if ($11) { - $node$0$us = $$0$i; - L16: while(1) { - $12 = ((($node$0$us)) + 8|0); - $13 = (_isSameLang($12,$lang)|0); - $14 = ($13|0)==(0); - if (!($14)) { - $15 = ((($node$0$us)) + 16|0); - $16 = HEAP32[$15>>2]|0; - $17 = ($16|0)==(0); - if ($17) { - $node$2 = $node$0$us; - break L12; - } - } - $node$01$i11$us = HEAP32[$node$0$us>>2]|0; - $18 = ($node$01$i11$us|0)==(0|0); - if ($18) { - label = 25; - break L12; - } else { - $node$02$i12$us = $node$01$i11$us; - } - while(1) { - $19 = ((($node$02$i12$us)) + 4|0); - $20 = HEAP32[$19>>2]|0; - $21 = ($20|0)==($frame_id|0); - if ($21) { - $node$0$us = $node$02$i12$us; - continue L16; - } - $node$0$i14$us = HEAP32[$node$02$i12$us>>2]|0; - $22 = ($node$0$i14$us|0)==(0|0); - if ($22) { - label = 25; - break L12; - } else { - $node$02$i12$us = $node$0$i14$us; - } - } - } - } else { - $node$0 = $$0$i; - } - L24: while(1) { - $23 = ((($node$0)) + 8|0); - $24 = (_isSameLang($23,$lang)|0); - $25 = ($24|0)==(0); - L26: do { - if (!($25)) { - $26 = ((($node$0)) + 20|0); - $27 = HEAP32[$26>>2]|0; - $28 = ($27|0)==(1); - $29 = ((($node$0)) + 16|0); - $30 = HEAP32[$29>>2]|0; - $31 = ($30|0)==(0); - if ($28) { - if ($31) { - $node$2 = $node$0; - break L12; - } else { - break; - } - } - if ($31) { - $node$2 = $node$0; - break L12; - } - $32 = ((($node$0)) + 12|0); - $33 = HEAP32[$32>>2]|0; - $i$01$i = 0; - while(1) { - $36 = (($33) + ($i$01$i)|0); - $37 = HEAP8[$36>>0]|0; - $38 = (($desc) + ($i$01$i)|0); - $39 = HEAP8[$38>>0]|0; - $40 = ($37<<24>>24)==($39<<24>>24); - $34 = (($i$01$i) + 1)|0; - if (!($40)) { - break L26; - } - $35 = ($34>>>0)<($30>>>0); - if ($35) { - $i$01$i = $34; - } else { - $node$1 = $node$0; - label = 24; - break L12; - } - } - } - } while(0); - $41 = ($node$0|0)==(0|0); - $$in$i = $41 ? $4 : $node$0; - $node$01$i11 = HEAP32[$$in$i>>2]|0; - $42 = ($node$01$i11|0)==(0|0); - if ($42) { - label = 25; - break L12; - } else { - $node$02$i12 = $node$01$i11; - } - while(1) { - $43 = ((($node$02$i12)) + 4|0); - $44 = HEAP32[$43>>2]|0; - $45 = ($44|0)==($frame_id|0); - if ($45) { - $node$0 = $node$02$i12; - continue L24; - } - $node$0$i14 = HEAP32[$node$02$i12>>2]|0; - $46 = ($node$0$i14|0)==(0|0); - if ($46) { - label = 25; - break L12; - } else { - $node$02$i12 = $node$0$i14; - } - } - } - } - } else { - $node$1 = $$0$i; - label = 24; - } - } while(0); - if ((label|0) == 24) { - $47 = ($node$1|0)==(0|0); - if ($47) { - label = 25; - } else { - $node$2 = $node$1; - } - } - if ((label|0) == 25) { - $48 = (_calloc(1,36)|0); - $49 = ($48|0)==(0|0); - if ($49) { - $$0 = -254; - return ($$0|0); - } - $50 = ((($2)) + 85748|0); - $51 = HEAP32[$50>>2]|0; - $52 = ($51|0)==(0|0); - if ($52) { - label = 28; - } else { - $53 = HEAP32[$4>>2]|0; - $54 = ($53|0)==(0|0); - if ($54) { - label = 28; - } else { - HEAP32[$51>>2] = $48; - } - } - if ((label|0) == 28) { - HEAP32[$4>>2] = $48; - } - HEAP32[$50>>2] = $48; - $node$2 = $48; - } - $55 = ((($node$2)) + 4|0); - HEAP32[$55>>2] = $frame_id; - $56 = ((($node$2)) + 8|0); - $57 = ($lang|0)==(0|0); - do { - if ($57) { - label = 33; - } else { - $58 = HEAP8[$lang>>0]|0; - $59 = ($58<<24>>24)==(0); - if ($59) { - label = 33; - } else { - HEAP8[$56>>0] = $58; - $66 = HEAP8[$lang>>0]|0; - $67 = ($66<<24>>24)==(0); - if ($67) { - $i$0$lcssa$ph$i = 1; - } else { - $68 = ((($lang)) + 1|0); - $69 = HEAP8[$68>>0]|0; - $70 = ((($node$2)) + 9|0); - HEAP8[$70>>0] = $69; - $71 = HEAP8[$lang>>0]|0; - $72 = ($71<<24>>24)==(0); - if ($72) { - $i$0$lcssa$ph$i = 2; - } else { - $62 = ((($lang)) + 2|0); - $63 = HEAP8[$62>>0]|0; - $64 = ((($node$2)) + 10|0); - HEAP8[$64>>0] = $63; - break; - } - } - $scevgep$i = (((($node$2)) + 8|0) + ($i$0$lcssa$ph$i)|0); - $65 = $i$0$lcssa$ph$i ^ 3; - _memset(($scevgep$i|0),32,($65|0))|0; - } - } - } while(0); - if ((label|0) == 33) { - HEAP8[$56>>0] = 88; - $60 = ((($node$2)) + 9|0); - HEAP8[$60>>0] = 88; - $61 = ((($node$2)) + 10|0); - HEAP8[$61>>0] = 88; - } - $73 = ((($node$2)) + 12|0); - $74 = HEAP32[$73>>2]|0; - _free($74); - HEAP32[$73>>2] = 0; - $75 = ($desc|0)==(0|0); - if ($75) { - $$0$i9 = 0; - } else { - $n$0$i7 = 0; - while(1) { - $76 = (($desc) + ($n$0$i7)|0); - $77 = HEAP8[$76>>0]|0; - $78 = ($77<<24>>24)==(0); - $79 = (($n$0$i7) + 1)|0; - if ($78) { - $$lcssa84 = $79;$n$0$i7$lcssa = $n$0$i7; - break; - } else { - $n$0$i7 = $79; - } - } - $80 = ($n$0$i7$lcssa|0)==(0); - if ($80) { - $$0$i9 = 0; - } else { - $81 = (_calloc($$lcssa84,1)|0); - HEAP32[$73>>2] = $81; - $82 = ($81|0)==(0|0); - if ($82) { - $$0$i9 = 0; - } else { - _memcpy(($81|0),($desc|0),($n$0$i7$lcssa|0))|0; - $83 = (($81) + ($n$0$i7$lcssa)|0); - HEAP8[$83>>0] = 0; - $$0$i9 = $n$0$i7$lcssa; - } - } - } - $84 = ((($node$2)) + 16|0); - HEAP32[$84>>2] = $$0$i9; - $85 = ((($node$2)) + 20|0); - HEAP32[$85>>2] = 0; - $86 = ((($node$2)) + 24|0); - $87 = HEAP32[$86>>2]|0; - _free($87); - HEAP32[$86>>2] = 0; - $88 = ($text|0)==(0|0); - if ($88) { - $$0$i2 = 0; - } else { - $n$0$i = 0; - while(1) { - $89 = (($text) + ($n$0$i)|0); - $90 = HEAP8[$89>>0]|0; - $91 = ($90<<24>>24)==(0); - $92 = (($n$0$i) + 1)|0; - if ($91) { - $$lcssa = $92;$n$0$i$lcssa = $n$0$i; - break; - } else { - $n$0$i = $92; - } - } - $93 = ($n$0$i$lcssa|0)==(0); - if ($93) { - $$0$i2 = 0; - } else { - $94 = (_calloc($$lcssa,1)|0); - HEAP32[$86>>2] = $94; - $95 = ($94|0)==(0|0); - if ($95) { - $$0$i2 = 0; - } else { - _memcpy(($94|0),($text|0),($n$0$i$lcssa|0))|0; - $96 = (($94) + ($n$0$i$lcssa)|0); - HEAP8[$96>>0] = 0; - $$0$i2 = $n$0$i$lcssa; - } - } - } - $97 = ((($node$2)) + 28|0); - HEAP32[$97>>2] = $$0$i2; - $98 = ((($node$2)) + 32|0); - HEAP32[$98>>2] = 0; - $99 = ((($2)) + 85696|0); - $100 = HEAP32[$99>>2]|0; - $101 = $100 | 3; - HEAP32[$99>>2] = $101; - $$0 = 0; - return ($$0|0); -} -function _isSameLang($l1,$l2) { - $l1 = $l1|0; - $l2 = $l2|0; - var $$ = 0, $$$1 = 0, $$$2 = 0, $$5 = 0, $$mask = 0, $$mask$1 = 0, $$mask$2 = 0, $$unshifted = 0, $$unshifted$1 = 0, $$unshifted$2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0; - var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0; - var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$0 = 0, $b$0$1 = 0, $b$0$2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($l2|0)==(0|0); - if ($0) { - $11 = 88;$23 = 88;$35 = 88; - } else { - $1 = HEAP8[$l2>>0]|0; - $2 = ($1<<24>>24)==(0); - if ($2) { - $11 = 88;$23 = 88;$35 = 88; - } else { - $3 = ((($l2)) + 1|0); - $4 = HEAP8[$3>>0]|0; - $5 = ((($l2)) + 2|0); - $6 = HEAP8[$5>>0]|0; - $11 = $1;$23 = $4;$35 = $6; - } - } - $7 = HEAP8[$l1>>0]|0; - $8 = $7 << 24 >> 24; - $9 = (_tolower($8)|0); - $10 = $11 << 24 >> 24; - $12 = (_tolower($10)|0); - $13 = $9&255; - $14 = ($13<<24>>24)<(32); - $$ = $14 ? 32 : $9; - $15 = $12&255; - $16 = ($15<<24>>24)<(32); - $b$0 = $16 ? 32 : $12; - $$unshifted = $b$0 ^ $$; - $$mask = $$unshifted & 255; - $17 = ($$mask|0)==(0); - if (!($17)) { - return 0; - } - $18 = ((($l1)) + 1|0); - $19 = HEAP8[$18>>0]|0; - $20 = $19 << 24 >> 24; - $21 = (_tolower($20)|0); - $22 = $23 << 24 >> 24; - $24 = (_tolower($22)|0); - $25 = $21&255; - $26 = ($25<<24>>24)<(32); - $$$1 = $26 ? 32 : $21; - $27 = $24&255; - $28 = ($27<<24>>24)<(32); - $b$0$1 = $28 ? 32 : $24; - $$unshifted$1 = $b$0$1 ^ $$$1; - $$mask$1 = $$unshifted$1 & 255; - $29 = ($$mask$1|0)==(0); - if ($29) { - $30 = ((($l1)) + 2|0); - $31 = HEAP8[$30>>0]|0; - $32 = $31 << 24 >> 24; - $33 = (_tolower($32)|0); - $34 = $35 << 24 >> 24; - $36 = (_tolower($34)|0); - $37 = $33&255; - $38 = ($37<<24>>24)<(32); - $$$2 = $38 ? 32 : $33; - $39 = $36&255; - $40 = ($39<<24>>24)<(32); - $b$0$2 = $40 ? 32 : $36; - $$unshifted$2 = $b$0$2 ^ $$$2; - $$mask$2 = $$unshifted$2 & 255; - $41 = ($$mask$2|0)==(0); - $$5 = $41&1; - return ($$5|0); - } else { - return 0; - } - return (0)|0; -} -function _is_lame_global_flags_valid($gfp) { - $gfp = $gfp|0; - var $$ = 0, $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($gfp|0)==(0|0); - if ($0) { - $$0 = 0; - return ($$0|0); - } - $1 = HEAP32[$gfp>>2]|0; - $2 = ($1|0)==(-487877); - $$ = $2&1; - $$0 = $$; - return ($$0|0); -} -function _lame_init_params($gfp) { - $gfp = $gfp|0; - var $$ = 0, $$$i = 0, $$0 = 0, $$0$i13 = 0, $$1$i = 0, $$10 = 0, $$11 = 0, $$12 = 0, $$30 = 0, $$5 = 0, $$6 = 0, $$9 = 0, $$lcssa = 0, $$lcssa113 = 0.0, $$lcssa114 = 0.0, $$phi$trans$insert56 = 0, $$phi$trans$insert64 = 0, $$phi$trans$insert77 = 0, $$pr$i = 0.0, $$pre = 0; - var $$pre$i = 0.0, $$pre57 = 0, $$pre58 = 0, $$pre59 = 0.0, $$pre60 = 0, $$pre63 = 0, $$pre65 = 0, $$pre67 = 0, $$pre69 = 0, $$pre69$1 = 0, $$pre69$10 = 0, $$pre69$11 = 0, $$pre69$12 = 0, $$pre69$13 = 0, $$pre69$14 = 0, $$pre69$15 = 0, $$pre69$16 = 0, $$pre69$17 = 0, $$pre69$2 = 0, $$pre69$3 = 0; - var $$pre69$4 = 0, $$pre69$5 = 0, $$pre69$6 = 0, $$pre69$7 = 0, $$pre69$8 = 0, $$pre69$9 = 0, $$pre70 = 0, $$pre70$1 = 0, $$pre70$10 = 0, $$pre70$11 = 0, $$pre70$12 = 0, $$pre70$13 = 0, $$pre70$14 = 0, $$pre70$15 = 0, $$pre70$16 = 0, $$pre70$17 = 0, $$pre70$2 = 0, $$pre70$3 = 0, $$pre70$4 = 0, $$pre70$5 = 0; - var $$pre70$6 = 0, $$pre70$7 = 0, $$pre70$8 = 0, $$pre70$9 = 0, $$pre72 = 0, $$pre74 = 0, $$pre75 = 0, $$pre78 = 0, $$sink = 0.0, $$sink54 = 0, $$sink55 = 0, $$storemerge = 0, $$storemerge91 = 0, $$suggested_samplefreq$0$i = 0, $$suggested_samplefreq$2$i = 0, $$suggested_samplefreq$4$i = 0, $$suggested_samplefreq$6$i = 0, $0 = 0, $1 = 0, $10 = 0; - var $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0; - var $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0; - var $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0; - var $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0.0, $1062 = 0.0, $1063 = 0.0, $1064 = 0.0, $1065 = 0.0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0; - var $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0.0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0.0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0.0, $1088 = 0, $1089 = 0, $109 = 0; - var $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0.0, $11 = 0, $110 = 0, $1100 = 0.0, $1101 = 0, $1102 = 0.0, $1103 = 0.0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0; - var $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0, $1125 = 0; - var $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0.0, $1133 = 0, $1134 = 0, $1135 = 0.0, $1136 = 0.0, $1137 = 0, $1138 = 0, $1139 = 0.0, $114 = 0, $1140 = 0, $1141 = 0, $1142 = 0.0, $1143 = 0.0; - var $1144 = 0, $1145 = 0, $1146 = 0.0, $1147 = 0, $1148 = 0, $1149 = 0.0, $115 = 0, $1150 = 0.0, $1151 = 0, $1152 = 0, $1153 = 0.0, $1154 = 0, $1155 = 0, $1156 = 0.0, $1157 = 0.0, $1158 = 0.0, $1159 = 0, $116 = 0, $1160 = 0.0, $1161 = 0; - var $1162 = 0.0, $1163 = 0.0, $1164 = 0, $1165 = 0.0, $1166 = 0.0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0.0, $1172 = 0.0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0; - var $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0, $1196 = 0, $1197 = 0, $1198 = 0; - var $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $122 = 0, $123 = 0, $124 = 0.0, $125 = 0.0, $126 = 0; - var $127 = 0.0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0; - var $145 = 0, $146 = 0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0; - var $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0; - var $181 = 0, $182 = 0.0, $183 = 0, $184 = 0.0, $185 = 0.0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0.0, $193 = 0, $194 = 0.0, $195 = 0.0, $196 = 0, $197 = 0.0, $198 = 0.0, $199 = 0.0; - var $2 = 0, $20 = 0, $200 = 0, $201 = 0.0, $202 = 0.0, $203 = 0.0, $204 = 0, $205 = 0, $206 = 0.0, $207 = 0, $208 = 0, $209 = 0.0, $21 = 0, $210 = 0, $211 = 0.0, $212 = 0, $213 = 0.0, $214 = 0, $215 = 0.0, $216 = 0.0; - var $217 = 0.0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0.0, $221 = 0.0, $222 = 0, $223 = 0.0, $224 = 0.0, $225 = 0.0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0; - var $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0.0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0.0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0; - var $253 = 0, $254 = 0.0, $255 = 0, $256 = 0, $257 = 0, $258 = 0.0, $259 = 0, $26 = 0, $260 = 0.0, $261 = 0.0, $262 = 0.0, $263 = 0.0, $264 = 0.0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0.0; - var $271 = 0, $272 = 0, $273 = 0, $274 = 0.0, $275 = 0, $276 = 0.0, $277 = 0.0, $278 = 0.0, $279 = 0.0, $28 = 0, $280 = 0.0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0.0, $287 = 0, $288 = 0, $289 = 0; - var $29 = 0, $290 = 0.0, $291 = 0, $292 = 0.0, $293 = 0.0, $294 = 0.0, $295 = 0.0, $296 = 0.0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0.0, $301 = 0.0, $302 = 0, $303 = 0.0, $304 = 0, $305 = 0, $306 = 0; - var $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0; - var $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0; - var $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0.0, $354 = 0, $355 = 0, $356 = 0.0, $357 = 0.0, $358 = 0.0, $359 = 0.0, $36 = 0, $360 = 0; - var $361 = 0, $362 = 0, $363 = 0, $364 = 0.0, $365 = 0, $366 = 0, $367 = 0.0, $368 = 0.0, $369 = 0.0, $37 = 0, $370 = 0.0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0; - var $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0; - var $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0; - var $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0.0, $429 = 0, $43 = 0, $430 = 0, $431 = 0.0, $432 = 0.0; - var $433 = 0.0, $434 = 0.0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0.0, $44 = 0, $440 = 0, $441 = 0, $442 = 0.0, $443 = 0.0, $444 = 0.0, $445 = 0.0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0; - var $451 = 0, $452 = 0.0, $453 = 0.0, $454 = 0.0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0.0, $461 = 0.0, $462 = 0.0, $463 = 0, $464 = 0.0, $465 = 0.0, $466 = 0.0, $467 = 0, $468 = 0, $469 = 0; - var $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0.0, $475 = 0.0, $476 = 0.0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0.0, $482 = 0.0, $483 = 0.0, $484 = 0, $485 = 0.0, $486 = 0.0, $487 = 0.0; - var $488 = 0.0, $489 = 0, $49 = 0, $490 = 0.0, $491 = 0.0, $492 = 0.0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0.0, $503 = 0.0, $504 = 0.0; - var $505 = 0, $506 = 0, $507 = 0.0, $508 = 0.0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0.0, $513 = 0.0, $514 = 0.0, $515 = 0.0, $516 = 0.0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0; - var $523 = 0, $524 = 0, $525 = 0.0, $526 = 0.0, $527 = 0.0, $528 = 0, $529 = 0.0, $53 = 0, $530 = 0.0, $531 = 0.0, $532 = 0.0, $533 = 0.0, $534 = 0.0, $535 = 0.0, $536 = 0.0, $537 = 0.0, $538 = 0.0, $539 = 0, $54 = 0, $540 = 0.0; - var $541 = 0.0, $542 = 0.0, $543 = 0.0, $544 = 0.0, $545 = 0.0, $546 = 0.0, $547 = 0.0, $548 = 0.0, $549 = 0, $55 = 0, $550 = 0, $551 = 0.0, $552 = 0.0, $553 = 0.0, $554 = 0.0, $555 = 0.0, $556 = 0, $557 = 0.0, $558 = 0.0, $559 = 0.0; - var $56 = 0, $560 = 0.0, $561 = 0.0, $562 = 0.0, $563 = 0.0, $564 = 0.0, $565 = 0, $566 = 0, $567 = 0.0, $568 = 0.0, $569 = 0.0, $57 = 0, $570 = 0.0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0; - var $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0; - var $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0; - var $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0; - var $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0; - var $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0; - var $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0; - var $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0; - var $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0; - var $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0; - var $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0; - var $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0.0, $763 = 0, $764 = 0, $765 = 0, $766 = 0.0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0.0, $771 = 0, $772 = 0, $773 = 0, $774 = 0.0, $775 = 0; - var $776 = 0, $777 = 0, $778 = 0.0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0.0, $783 = 0, $784 = 0, $785 = 0, $786 = 0.0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0.0, $791 = 0, $792 = 0, $793 = 0; - var $794 = 0.0, $795 = 0, $796 = 0, $797 = 0, $798 = 0.0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0.0, $803 = 0, $804 = 0, $805 = 0, $806 = 0.0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0.0; - var $811 = 0, $812 = 0, $813 = 0, $814 = 0.0, $815 = 0, $816 = 0, $817 = 0, $818 = 0.0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0.0, $823 = 0, $824 = 0, $825 = 0, $826 = 0.0, $827 = 0, $828 = 0, $829 = 0; - var $83 = 0, $830 = 0.0, $831 = 0, $832 = 0, $833 = 0, $834 = 0.0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0; - var $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0; - var $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0; - var $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0.0, $899 = 0.0, $9 = 0, $90 = 0, $900 = 0; - var $901 = 0.0, $902 = 0.0, $903 = 0.0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0; - var $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0; - var $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0; - var $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0; - var $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0; - var $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $band$011$i = 0, $band$18$i = 0, $band$27$i = 0, $exitcond$i = 0, $exitcond14$i = 0, $exitcond15$i = 0, $fabsf = 0.0, $fc1$0$i = 0.0, $fc2$0$i = 0.0, $highpass_band$010$i = 0, $highpass_band$1$i = 0, $highpass_band$1$i$lcssa = 0; - var $i$040 = 0, $i$040$lcssa = 0, $lowpass_band$0$minband$0$i = 0, $lowpass_band$013$i = 0, $lowpass_band$1$i = 0, $lowpass_band$1$i$lcssa = 0, $m10$sroa$0$0 = 0.0, $m10$sroa$22$0 = 0.0, $m10$sroa$8$0 = 0.0, $maxband$09$i = 0, $maxband$1$i = 0, $maxband$1$i$lcssa = 0, $minband$012$i = 0, $minband$1$i = 0, $minband$1$i$lcssa = 0, $or$cond = 0, $or$cond$i = 0, $or$cond17$i = 0, $or$cond4$i = 0, $storemerge$i = 0.0; - var $storemerge$in$i = 0.0, $storemerge$in$in$i = 0.0, $storemerge$in$in$in$i = 0.0, $storemerge1 = 0.0, $storemerge2 = 0.0, $storemerge3 = 0.0, $storemerge4 = 0.0, $suggested_samplefreq$0$i = 0, $suggested_samplefreq$2$i = 0, $suggested_samplefreq$4$i = 0, $suggested_samplefreq$6$i = 0, $suggested_samplefreq$8$i = 0, $switch = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $vararg_buffer = sp; - $0 = ((($gfp)) + 288|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($1)) + 16|0); - HEAP32[$1>>2] = 0; - $3 = ((($gfp)) + 180|0); - $4 = HEAP32[$3>>2]|0; - $5 = ((($1)) + 124|0); - HEAP32[$5>>2] = $4; - $6 = ((($gfp)) + 32|0); - $7 = HEAP32[$6>>2]|0; - $8 = ((($1)) + 140|0); - HEAP32[$8>>2] = $7; - $9 = ($7|0)==(0); - if (!($9)) { - $10 = ((($gfp)) + 36|0); - HEAP32[$10>>2] = 0; - } - $11 = ((($1)) + 85804|0); - $12 = HEAP32[$11>>2]|0; - $13 = ($12|0)==(0|0); - if (!($13)) { - $14 = ((($gfp)) + 36|0); - HEAP32[$14>>2] = 0; - } - $15 = ((($gfp)) + 272|0); - $16 = HEAP32[$15>>2]|0; - $17 = ((($1)) + 85828|0); - HEAP32[$17>>2] = $16; - $18 = ((($gfp)) + 276|0); - $19 = HEAP32[$18>>2]|0; - $20 = ((($1)) + 85832|0); - HEAP32[$20>>2] = $19; - $21 = ((($gfp)) + 280|0); - $22 = HEAP32[$21>>2]|0; - $23 = ((($1)) + 85836|0); - HEAP32[$23>>2] = $22; - $24 = ((($gfp)) + 296|0); - $25 = HEAP32[$24>>2]|0; - $26 = ($25|0)==(0); - if ($26) { - $34 = ((($1)) + 85756|0); - $35 = HEAP32[$34>>2]|0; - $36 = $35 & -3; - HEAP32[$34>>2] = $36; - $48 = $36; - } else { - $27 = (_has_3DNow()|0); - $28 = ((($1)) + 85756|0); - $29 = HEAP32[$28>>2]|0; - $30 = $27 << 1; - $31 = $30 & 2; - $32 = $29 & -3; - $33 = $32 | $31; - HEAP32[$28>>2] = $33; - $48 = $33; - } - $37 = ((($gfp)) + 292|0); - $38 = HEAP32[$37>>2]|0; - $39 = ($38|0)==(0); - if ($39) { - $46 = ((($1)) + 85756|0); - $47 = $48 & -2; - HEAP32[$46>>2] = $47; - $67 = $47; - } else { - $40 = (_has_MMX()|0); - $41 = ((($1)) + 85756|0); - $42 = HEAP32[$41>>2]|0; - $43 = $40 & 1; - $44 = $42 & -2; - $45 = $44 | $43; - HEAP32[$41>>2] = $45; - $67 = $45; - } - $49 = ((($gfp)) + 300|0); - $50 = HEAP32[$49>>2]|0; - $51 = ($50|0)==(0); - if ($51) { - $65 = ((($1)) + 85756|0); - $66 = $67 & -13; - HEAP32[$65>>2] = $66; - } else { - $52 = (_has_SSE()|0); - $53 = ((($1)) + 85756|0); - $54 = HEAP32[$53>>2]|0; - $55 = $52 << 2; - $56 = $55 & 4; - $57 = $54 & -5; - $58 = $57 | $56; - HEAP32[$53>>2] = $58; - $59 = (_has_SSE2()|0); - $60 = HEAP32[$53>>2]|0; - $61 = $59 << 3; - $62 = $61 & 8; - $63 = $60 & -9; - $64 = $63 | $62; - HEAP32[$53>>2] = $64; - } - $68 = ((($1)) + 85796|0); - $69 = HEAP32[$68>>2]|0; - $70 = ($69|0)==(0|0); - if ($70) { - $71 = (_calloc(1,2772)|0); - HEAP32[$68>>2] = $71; - $72 = ($71|0)==(0|0); - if ($72) { - $$0 = -2; - STACKTOP = sp;return ($$0|0); - } - } - $73 = ((($1)) + 85676|0); - $74 = HEAP32[$73>>2]|0; - $75 = ($74|0)==(0|0); - if ($75) { - $76 = (_calloc(1,134792)|0); - HEAP32[$73>>2] = $76; - $77 = ($76|0)==(0|0); - if ($77) { - _freegfc($1); - HEAP32[$0>>2] = 0; - $$0 = -2; - STACKTOP = sp;return ($$0|0); - } - } - $78 = ((($gfp)) + 120|0); - $79 = HEAP32[$78>>2]|0; - $80 = ((($1)) + 160|0); - HEAP32[$80>>2] = $79; - $81 = ((($gfp)) + 104|0); - $82 = HEAP32[$81>>2]|0; - $83 = ((($1)) + 164|0); - HEAP32[$83>>2] = $82; - $84 = ((($gfp)) + 108|0); - $85 = HEAP32[$84>>2]|0; - $86 = ((($1)) + 168|0); - HEAP32[$86>>2] = $85; - $87 = ((($gfp)) + 112|0); - $88 = HEAP32[$87>>2]|0; - $89 = ((($1)) + 172|0); - HEAP32[$89>>2] = $88; - $90 = ((($gfp)) + 116|0); - $91 = HEAP32[$90>>2]|0; - $92 = ((($1)) + 176|0); - HEAP32[$92>>2] = $91; - $93 = ((($gfp)) + 8|0); - $94 = HEAP32[$93>>2]|0; - $95 = ((($1)) + 68|0); - HEAP32[$95>>2] = $94; - $96 = ($94|0)==(1); - $97 = ((($gfp)) + 48|0); - if ($96) { - HEAP32[$97>>2] = 3; - $98 = ((($1)) + 72|0); - HEAP32[$98>>2] = 1; - $1205 = $98;$1206 = 1; - label = 23; - } else { - $$pre = HEAP32[$97>>2]|0; - $99 = ($$pre|0)==(3); - $100 = $99 ? 1 : 2; - $101 = ((($1)) + 72|0); - HEAP32[$101>>2] = $100; - if ($99) { - $1205 = $101;$1206 = $100; - label = 23; - } else { - $$phi$trans$insert56 = ((($gfp)) + 52|0); - $$pre57 = HEAP32[$$phi$trans$insert56>>2]|0; - $104 = $$pre57;$1207 = $100;$142 = $101; - } - } - if ((label|0) == 23) { - $102 = ((($gfp)) + 52|0); - HEAP32[$102>>2] = 0; - $104 = 0;$1207 = $1206;$142 = $1205; - } - $103 = ((($1)) + 80|0); - HEAP32[$103>>2] = $104; - $105 = ((($gfp)) + 156|0); - $106 = HEAP32[$105>>2]|0; - if ((($106|0) == 4) | (($106|0) == 1)) { - label = 29; - } else if ((($106|0) == 0)) { - $107 = ((($gfp)) + 168|0); - $108 = HEAP32[$107>>2]|0; - $109 = ($108|0)==(128); - if (!($109)) { - $110 = ((($gfp)) + 96|0); - $111 = HEAP32[$110>>2]|0; - $112 = ($111|0)==(0); - if ($112) { - HEAP32[$110>>2] = $108; - } - } - $117 = ((($gfp)) + 56|0); - $118 = HEAP32[$117>>2]|0; - $119 = ((($1)) + 152|0); - HEAP32[$119>>2] = $118; - $120 = ((($gfp)) + 96|0); - $121 = HEAP32[$120>>2]|0; - $122 = ($121|0)==(0); - do { - if ($122) { - $123 = ((($gfp)) + 100|0); - $124 = +HEAPF32[$123>>2]; - $fabsf = (+Math_abs((+$124))); - $125 = $fabsf; - $126 = ($124 != $124) | (0.0 != 0.0) |($124 == 0.0); - if ($126) { - $129 = $124 == 0.0; - if (!($129)) { - break; - } - } else { - $127 = $125 * 9.9999999747524271E-7; - $128 = !($125 <= $127); - if ($128) { - break; - } - } - HEAPF32[$123>>2] = 11.024999618530273; - } - } while(0); - $130 = ((($gfp)) + 100|0); - $131 = +HEAPF32[$130>>2]; - $132 = $131 > 0.0; - if ($132) { - $133 = ((($gfp)) + 16|0); - $134 = HEAP32[$133>>2]|0; - $135 = ($134|0)==(0); - if ($135) { - $136 = ((($gfp)) + 12|0); - $137 = HEAP32[$136>>2]|0; - $138 = (+($137|0)); - $139 = $138 * 0.96999999999999997; - $140 = (~~(($139))); - $141 = (_map2MP3Frequency($140)|0); - HEAP32[$133>>2] = $141; - $$pre58 = HEAP32[$142>>2]|0; - $$pre59 = +HEAPF32[$130>>2]; - $144 = $141;$146 = $$pre58;$149 = $$pre59; - } else { - $144 = $134;$146 = $1207;$149 = $131; - } - $143 = $144 << 4; - $145 = Math_imul($143, $146)|0; - $147 = (+($145|0)); - $148 = $149; - $150 = $148 * 1000.0; - $151 = $147 / $150; - $152 = (~~(($151))); - HEAP32[$120>>2] = $152; - $153 = (_SmpFrqIndex($144,$2)|0); - $154 = ((($1)) + 20|0); - HEAP32[$154>>2] = $153; - $155 = HEAP32[$119>>2]|0; - $156 = ($155|0)==(0); - if ($156) { - $157 = HEAP32[$120>>2]|0; - $158 = HEAP32[$2>>2]|0; - $159 = HEAP32[$133>>2]|0; - $160 = (_FindNearestBitrate($157,$158,$159)|0); - HEAP32[$120>>2] = $160; - $580 = $119; - } else { - $580 = $119; - } - } else { - $580 = $119; - } - } else { - $113 = ((($gfp)) + 56|0); - HEAP32[$113>>2] = 0; - label = 29; - } - if ((label|0) == 29) { - $114 = ((($gfp)) + 56|0); - $115 = HEAP32[$114>>2]|0; - $116 = ((($1)) + 152|0); - HEAP32[$116>>2] = $115; - $580 = $116; - } - $161 = ((($gfp)) + 16|0); - $162 = HEAP32[$161>>2]|0; - $163 = ($162|0)==(0); - L57: do { - if ($163) { - $179 = HEAP32[$105>>2]|0; - if ((($179|0) == 4) | (($179|0) == 1)) { - $180 = ((($gfp)) + 164|0); - $181 = HEAP32[$180>>2]|0; - $182 = (+($181|0)); - $183 = ((($gfp)) + 160|0); - $184 = +HEAPF32[$183>>2]; - $185 = $182 + $184; - $186 = ((($gfp)) + 12|0); - $187 = HEAP32[$186>>2]|0; - $i$040 = 2; - while(1) { - $188 = (6560 + (($i$040*24)|0)|0); - $189 = HEAP32[$188>>2]|0; - $190 = ($187|0)==($189|0); - if ($190) { - $191 = (((6560 + (($i$040*24)|0)|0)) + 4|0); - $192 = +HEAPF32[$191>>2]; - $193 = $185 < $192; - if ($193) { - $194 = $185 / $192; - $195 = $194; - $196 = (((6560 + (($i$040*24)|0)|0)) + 12|0); - $197 = +HEAPF32[$196>>2]; - $198 = $197; - $199 = $198 * $195; - $200 = (~~(($199))); - HEAP32[$180>>2] = $200; - $201 = (+($200|0)); - $202 = $199 - $201; - $203 = $202; - HEAPF32[$183>>2] = $203; - } - } - $204 = ($187|0)<($189|0); - if (!($204)) { - $205 = (((6560 + (($i$040*24)|0)|0)) + 4|0); - $206 = +HEAPF32[$205>>2]; - $207 = !($206 <= $185); - if (!($207)) { - $208 = (((6560 + (($i$040*24)|0)|0)) + 8|0); - $209 = +HEAPF32[$208>>2]; - $210 = $185 < $209; - if ($210) { - $$lcssa = $189;$$lcssa113 = $206;$$lcssa114 = $209;$i$040$lcssa = $i$040; - break; - } - } - } - $229 = (($i$040) + 1)|0; - $230 = ($229|0)<(9); - if ($230) { - $i$040 = $229; - } else { - $1208 = $162; - break L57; - } - } - $211 = $$lcssa114 - $$lcssa113; - $212 = (((6560 + (($i$040$lcssa*24)|0)|0)) + 16|0); - $213 = +HEAPF32[$212>>2]; - $214 = (((6560 + (($i$040$lcssa*24)|0)|0)) + 12|0); - $215 = +HEAPF32[$214>>2]; - $216 = $213 - $215; - $217 = $185 - $$lcssa113; - $218 = $216 * $217; - $219 = $218 / $211; - $220 = $219 + $215; - $221 = $220; - $222 = (~~(($220))); - HEAP32[$180>>2] = $222; - $223 = (+($222|0)); - $224 = $221 - $223; - $225 = $224; - HEAPF32[$183>>2] = $225; - HEAP32[$161>>2] = $$lcssa; - $226 = ((($gfp)) + 184|0); - $227 = HEAP32[$226>>2]|0; - $228 = ($227|0)==(0); - if ($228) { - HEAP32[$226>>2] = -1; - $1208 = $$lcssa; - } else { - $1208 = $$lcssa; - } - } else { - $1208 = 0; - } - } else { - $164 = ($162|0)<(16000); - if ($164) { - $165 = ((($gfp)) + 168|0); - $166 = HEAP32[$165>>2]|0; - $167 = ($166|0)>(8); - $$ = $167 ? $166 : 8; - $168 = ($$|0)<(64); - $169 = $168 ? $$ : 64; - HEAP32[$165>>2] = $169; - $1208 = $162; - break; - } - $170 = ($162|0)<(32000); - $171 = ((($gfp)) + 168|0); - $172 = HEAP32[$171>>2]|0; - if ($170) { - $173 = ($172|0)>(8); - $$5 = $173 ? $172 : 8; - $174 = ($$5|0)<(160); - $175 = $174 ? $$5 : 160; - HEAP32[$171>>2] = $175; - $1208 = $162; - break; - } else { - $176 = ($172|0)>(32); - $$6 = $176 ? $172 : 32; - $177 = ($$6|0)<(320); - $178 = $177 ? $$6 : 320; - HEAP32[$171>>2] = $178; - $1208 = $162; - break; - } - } - } while(0); - $231 = ((($gfp)) + 184|0); - $232 = HEAP32[$231>>2]|0; - $233 = ($232|0)==(0); - if ($233) { - $234 = HEAP32[$105>>2]|0; - switch ($234|0) { - case 0: { - $235 = ((($gfp)) + 96|0); - $236 = HEAP32[$235>>2]|0; - $237 = $236&65535; - $238 = (_nearestBitrateFullIndex($237)|0); - $239 = (((6776 + ($238<<3)|0)) + 4|0); - $240 = HEAP32[$239>>2]|0; - $241 = (+($240|0)); - $301 = $241; - break; - } - case 3: { - $242 = ((($gfp)) + 168|0); - $243 = HEAP32[$242>>2]|0; - $244 = $243&65535; - $245 = (_nearestBitrateFullIndex($244)|0); - $246 = (((6776 + ($245<<3)|0)) + 4|0); - $247 = HEAP32[$246>>2]|0; - $248 = (+($247|0)); - $301 = $248; - break; - } - case 2: { - $249 = ((($gfp)) + 164|0); - $250 = HEAP32[$249>>2]|0; - $251 = ($250>>>0)<(10); - if ($251) { - $252 = (6912 + ($250<<2)|0); - $253 = HEAP32[$252>>2]|0; - $254 = (+($253|0)); - $255 = (($250) + 1)|0; - $256 = (6912 + ($255<<2)|0); - $257 = HEAP32[$256>>2]|0; - $258 = (+($257|0)); - $259 = ((($gfp)) + 160|0); - $260 = +HEAPF32[$259>>2]; - $261 = $260; - $262 = $258 - $254; - $263 = $262 * $261; - $264 = $263 + $254; - $301 = $264; - } else { - $301 = 19500.0; - } - break; - } - case 1: case 4: { - $265 = ((($gfp)) + 164|0); - $266 = HEAP32[$265>>2]|0; - $267 = ($266>>>0)<(10); - if ($267) { - $268 = (6960 + ($266<<2)|0); - $269 = HEAP32[$268>>2]|0; - $270 = (+($269|0)); - $271 = (($266) + 1)|0; - $272 = (6960 + ($271<<2)|0); - $273 = HEAP32[$272>>2]|0; - $274 = (+($273|0)); - $275 = ((($gfp)) + 160|0); - $276 = +HEAPF32[$275>>2]; - $277 = $276; - $278 = $274 - $270; - $279 = $278 * $277; - $280 = $279 + $270; - $301 = $280; - } else { - $301 = 21500.0; - } - break; - } - default: { - $281 = ((($gfp)) + 164|0); - $282 = HEAP32[$281>>2]|0; - $283 = ($282>>>0)<(10); - if ($283) { - $284 = (7008 + ($282<<2)|0); - $285 = HEAP32[$284>>2]|0; - $286 = (+($285|0)); - $287 = (($282) + 1)|0; - $288 = (7008 + ($287<<2)|0); - $289 = HEAP32[$288>>2]|0; - $290 = (+($289|0)); - $291 = ((($gfp)) + 160|0); - $292 = +HEAPF32[$291>>2]; - $293 = $292; - $294 = $290 - $286; - $295 = $294 * $293; - $296 = $295 + $286; - $301 = $296; - } else { - $301 = 19500.0; - } - } - } - $297 = HEAP32[$97>>2]|0; - $298 = ($297|0)==(3); - if ($298) { - $299 = HEAP32[$105>>2]|0; - if ((($299|0) == 3) | (($299|0) == 0)) { - $300 = $301 * 1.5; - $303 = $300; - } else { - $303 = $301; - } - } else { - $303 = $301; - } - $302 = (~~(($303))); - HEAP32[$231>>2] = $302; - $$pre60 = HEAP32[$161>>2]|0; - $304 = $$pre60;$307 = $302; - } else { - $304 = $1208;$307 = $232; - } - $305 = ($304|0)==(0); - if ($305) { - $306 = $307 << 1; - $308 = ((($gfp)) + 12|0); - $309 = HEAP32[$308>>2]|0; - $310 = ($306|0)>($309|0); - if ($310) { - $311 = (($309|0) / 2)&-1; - HEAP32[$231>>2] = $311; - $321 = $311; - } else { - $321 = $307; - } - $312 = ($309|0)>(47999); - do { - if ($312) { - $suggested_samplefreq$0$i = 48000; - } else { - $313 = ($309|0)>(44099); - if ($313) { - $suggested_samplefreq$0$i = 44100; - } else { - $314 = ($309|0)>(31999); - if ($314) { - $suggested_samplefreq$0$i = 32000; - } else { - $315 = ($309|0)>(23999); - if ($315) { - $suggested_samplefreq$0$i = 24000; - } else { - $316 = ($309|0)>(22049); - if ($316) { - $suggested_samplefreq$0$i = 22050; - } else { - $317 = ($309|0)>(15999); - if ($317) { - $suggested_samplefreq$0$i = 16000; - } else { - $318 = ($309|0)>(11999); - if ($318) { - $suggested_samplefreq$0$i = 12000; - break; - } - $319 = ($309|0)>(11024); - if ($319) { - $suggested_samplefreq$0$i = 11025; - break; - } - $320 = ($309|0)>(7999); - $$$i = $320 ? 8000 : 44100; - $suggested_samplefreq$0$i = $$$i; - } - } - } - } - } - } - } while(0); - $322 = ($321|0)==(-1); - do { - if ($322) { - $$0$i13 = $suggested_samplefreq$0$i; - } else { - $323 = ($321|0)<(15961); - $$suggested_samplefreq$0$i = $323 ? 44100 : $suggested_samplefreq$0$i; - $324 = ($321|0)<(15251); - $suggested_samplefreq$2$i = $324 ? 32000 : $$suggested_samplefreq$0$i; - $325 = ($321|0)<(11221); - $$suggested_samplefreq$2$i = $325 ? 24000 : $suggested_samplefreq$2$i; - $326 = ($321|0)<(9971); - $suggested_samplefreq$4$i = $326 ? 22050 : $$suggested_samplefreq$2$i; - $327 = ($321|0)<(7231); - $$suggested_samplefreq$4$i = $327 ? 16000 : $suggested_samplefreq$4$i; - $328 = ($321|0)<(5421); - $suggested_samplefreq$6$i = $328 ? 12000 : $$suggested_samplefreq$4$i; - $329 = ($321|0)<(4511); - $$suggested_samplefreq$6$i = $329 ? 11025 : $suggested_samplefreq$6$i; - $330 = ($321|0)<(3971); - $suggested_samplefreq$8$i = $330 ? 8000 : $$suggested_samplefreq$6$i; - $331 = ($suggested_samplefreq$8$i|0)>($309|0); - if ($331) { - $332 = ($309|0)>(44100); - if ($332) { - $$0$i13 = 48000; - } else { - $333 = ($309|0)>(32000); - if ($333) { - $$0$i13 = 44100; - } else { - $334 = ($309|0)>(24000); - if ($334) { - $$0$i13 = 32000; - } else { - $335 = ($309|0)>(22050); - if ($335) { - $$0$i13 = 24000; - break; - } - $336 = ($309|0)>(16000); - if ($336) { - $$0$i13 = 22050; - break; - } - $337 = ($309|0)>(12000); - if ($337) { - $$0$i13 = 16000; - break; - } - $338 = ($309|0)>(11025); - if ($338) { - $$0$i13 = 12000; - break; - } - $339 = ($309|0)>(8000); - $$1$i = $339 ? 11025 : 8000; - $$0$i13 = $$1$i; - } - } - } - } else { - $$0$i13 = $suggested_samplefreq$8$i; - } - } - } while(0); - HEAP32[$161>>2] = $$0$i13; - $341 = $321;$344 = $$0$i13; - } else { - $341 = $307;$344 = $304; - } - $340 = HEAP32[$105>>2]|0; - do { - if ((($340|0) == 4) | (($340|0) == 1)) { - $342 = ($341|0)>(24000); - $$9 = $342 ? 24000 : $341; - $343 = (($344|0) / 2)&-1; - $345 = ($343|0)<($$9|0); - $$storemerge91 = $345 ? $343 : $$9; - HEAP32[$231>>2] = $$storemerge91; - $346 = ($340|0)==(3); - if ($346) { - label = 98; - } - } else { - $347 = ($341|0)>(20500); - $$10 = $347 ? 20500 : $341; - $348 = (($344|0) / 2)&-1; - $349 = ($348|0)<($$10|0); - $$storemerge = $349 ? $348 : $$10; - HEAP32[$231>>2] = $$storemerge; - if ((($340|0) == 3)) { - label = 98; - break; - } else if (!((($340|0) == 0))) { - break; - } - $350 = $344 << 4; - $351 = HEAP32[$142>>2]|0; - $352 = Math_imul($350, $351)|0; - $353 = (+($352|0)); - $354 = ((($gfp)) + 96|0); - $355 = HEAP32[$354>>2]|0; - $356 = (+($355|0)); - $357 = $356 * 1000.0; - $358 = $353 / $357; - $359 = $358; - $360 = ((($gfp)) + 100|0); - HEAPF32[$360>>2] = $359; - } - } while(0); - if ((label|0) == 98) { - $361 = $344 << 4; - $362 = HEAP32[$142>>2]|0; - $363 = Math_imul($361, $362)|0; - $364 = (+($363|0)); - $365 = ((($gfp)) + 168|0); - $366 = HEAP32[$365>>2]|0; - $367 = (+($366|0)); - $368 = $367 * 1000.0; - $369 = $364 / $368; - $370 = $369; - $371 = ((($gfp)) + 100|0); - HEAPF32[$371>>2] = $370; - } - $372 = ((($gfp)) + 36|0); - $373 = HEAP32[$372>>2]|0; - $374 = ($373|0)==(0); - $375 = ((($gfp)) + 60|0); - if ($374) { - HEAP32[$375>>2] = 0; - $376 = ((($gfp)) + 64|0); - HEAP32[$376>>2] = 0; - $377 = ((($1)) + 132|0); - HEAP32[$377>>2] = 0; - $378 = ((($1)) + 128|0); - HEAP32[$378>>2] = 0; - $379 = ((($1)) + 136|0); - HEAP32[$379>>2] = 0; - } else { - $$pre63 = HEAP32[$375>>2]|0; - $$phi$trans$insert64 = ((($gfp)) + 64|0); - $$pre65 = HEAP32[$$phi$trans$insert64>>2]|0; - $380 = ((($1)) + 128|0); - HEAP32[$380>>2] = $$pre63; - $381 = ((($1)) + 136|0); - HEAP32[$381>>2] = $$pre65; - $382 = ($$pre65|0)==(0); - if ($382) { - $1209 = 0; - } else { - $383 = ((($1)) + 132|0); - HEAP32[$383>>2] = 1; - $1209 = $$pre65; - } - $384 = ($$pre63|0)==(0); - do { - if ($384) { - $388 = $1209; - } else { - $385 = HEAP32[$73>>2]|0; - $386 = (_InitGainAnalysis(($385|0),($344|0))|0); - $387 = ($386|0)==(0); - if (!($387)) { - $$pre67 = HEAP32[$381>>2]|0; - $388 = $$pre67; - break; - } - _freegfc($1); - HEAP32[$0>>2] = 0; - $$0 = -6; - STACKTOP = sp;return ($$0|0); - } - } while(0); - $389 = ($388|0)==(0); - if (!($389)) { - $390 = ((($gfp)) + 40|0); - $391 = HEAP32[$390>>2]|0; - $392 = ($391|0)==(0); - if ($392) { - $393 = ((($1)) + 85808|0); - $394 = HEAP32[$393>>2]|0; - $395 = ($394|0)==(0|0); - if (!($395)) { - (_hip_decode_exit(($394|0))|0); - } - $396 = (_hip_decode_init()|0); - HEAP32[$393>>2] = $396; - $397 = HEAP32[$21>>2]|0; - _hip_set_errorf(($396|0),($397|0)); - $398 = HEAP32[$393>>2]|0; - $399 = HEAP32[$18>>2]|0; - _hip_set_debugf(($398|0),($399|0)); - $400 = HEAP32[$393>>2]|0; - $401 = HEAP32[$15>>2]|0; - _hip_set_msgf(($400|0),($401|0)); - } - } - } - $402 = ((($gfp)) + 128|0); - $403 = HEAP32[$402>>2]|0; - $404 = ((($1)) + 144|0); - HEAP32[$404>>2] = $403; - $405 = HEAP32[$231>>2]|0; - $406 = ((($1)) + 52|0); - HEAP32[$406>>2] = $405; - $407 = ((($gfp)) + 188|0); - $408 = HEAP32[$407>>2]|0; - $409 = ((($1)) + 56|0); - HEAP32[$409>>2] = $408; - $410 = ((($gfp)) + 12|0); - $411 = HEAP32[$410>>2]|0; - $412 = ((($1)) + 60|0); - HEAP32[$412>>2] = $411; - $413 = HEAP32[$161>>2]|0; - $414 = ((($1)) + 64|0); - HEAP32[$414>>2] = $413; - $415 = ($413|0)<(24001); - $416 = $415 ? 1 : 2; - $417 = ((($1)) + 76|0); - HEAP32[$417>>2] = $416; - $418 = ((($1)) + 84760|0); - HEAP32[$418>>2] = 576; - $419 = HEAP32[$105>>2]|0; - if ((($419|0) == 4) | (($419|0) == 2) | (($419|0) == 1)) { - $420 = ((($gfp)) + 164|0); - $421 = HEAP32[$420>>2]|0; - $422 = (7056 + ($421<<2)|0); - $423 = HEAP32[$422>>2]|0; - $424 = ((($gfp)) + 100|0); - HEAP32[$424>>2] = $423; - } else if ((($419|0) == 3)) { - $425 = $413 << 4; - $426 = HEAP32[$142>>2]|0; - $427 = Math_imul($425, $426)|0; - $428 = (+($427|0)); - $429 = ((($gfp)) + 168|0); - $430 = HEAP32[$429>>2]|0; - $431 = (+($430|0)); - $432 = $431 * 1000.0; - $433 = $428 / $432; - $434 = $433; - $435 = ((($gfp)) + 100|0); - HEAPF32[$435>>2] = $434; - } else { - $436 = $413 << 4; - $437 = HEAP32[$142>>2]|0; - $438 = Math_imul($436, $437)|0; - $439 = (+($438|0)); - $440 = ((($gfp)) + 96|0); - $441 = HEAP32[$440>>2]|0; - $442 = (+($441|0)); - $443 = $442 * 1000.0; - $444 = $439 / $443; - $445 = $444; - $446 = ((($gfp)) + 100|0); - HEAPF32[$446>>2] = $445; - } - $447 = HEAP32[$97>>2]|0; - $448 = ($447|0)==(4); - if ($448) { - HEAP32[$97>>2] = 1; - $450 = 1; - } else { - $450 = $447; - } - $449 = ((($1)) + 180|0); - HEAP32[$449>>2] = $450; - $451 = ($408|0)>(0); - if ($451) { - $452 = (+($408|0)); - $453 = $452 * 2.0; - $454 = $453; - $455 = ((($1)) + 256|0); - HEAPF32[$455>>2] = $454; - $456 = ((($gfp)) + 196|0); - $457 = HEAP32[$456>>2]|0; - $458 = ($457|0)>(-1); - if ($458) { - $459 = (($408) + ($457))|0; - $460 = (+($459|0)); - $461 = $460 * 2.0; - $462 = $461; - $$sink = $462; - } else { - $$sink = $454; - } - $463 = ((($1)) + 260|0); - $464 = (+($413|0)); - $465 = $454 / $464; - HEAPF32[$455>>2] = $465; - $466 = $$sink / $464; - HEAPF32[$463>>2] = $466; - $507 = $466; - } else { - $467 = ((($1)) + 256|0); - HEAPF32[$467>>2] = 0.0; - $468 = ((($1)) + 260|0); - HEAPF32[$468>>2] = 0.0; - $507 = 0.0; - } - $469 = ((($1)) + 248|0); - HEAPF32[$469>>2] = 0.0; - $470 = ((($1)) + 252|0); - HEAPF32[$470>>2] = 0.0; - $471 = ($405|0)>(0); - $472 = (($413|0) / 2)&-1; - $473 = ($405|0)<($472|0); - $or$cond = $471 & $473; - if ($or$cond) { - $474 = (+($405|0)); - $475 = $474 * 2.0; - $476 = $475; - HEAPF32[$470>>2] = $476; - $477 = ((($gfp)) + 192|0); - $478 = HEAP32[$477>>2]|0; - $479 = ($478|0)>(-1); - if ($479) { - $480 = (($405) - ($478))|0; - $481 = (+($480|0)); - $482 = $481 * 2.0; - $483 = $482; - HEAPF32[$469>>2] = $483; - $484 = $483 < 0.0; - if ($484) { - HEAPF32[$469>>2] = 0.0; - $487 = 0.0; - } else { - $487 = $483; - } - } else { - HEAPF32[$469>>2] = $476; - $487 = $476; - } - $485 = (+($413|0)); - $486 = $487 / $485; - HEAPF32[$469>>2] = $486; - $488 = $476 / $485; - HEAPF32[$470>>2] = $488; - $489 = $486 > 0.0; - if ($489) { - $band$011$i = 0;$lowpass_band$013$i = 32;$minband$012$i = 999; - while(1) { - $490 = (+($band$011$i|0)); - $491 = $490 * 0.032258064516129031; - $492 = $491; - $493 = !($492 >= $488); - $494 = ($lowpass_band$013$i|0)<($band$011$i|0); - $495 = $494 | $493; - $lowpass_band$1$i = $495 ? $lowpass_band$013$i : $band$011$i; - $496 = $486 < $492; - $497 = $492 < $488; - $or$cond4$i = $497 & $496; - $498 = ($minband$012$i|0)<($band$011$i|0); - $499 = $498 ? $minband$012$i : $band$011$i; - $minband$1$i = $or$cond4$i ? $499 : $minband$012$i; - $500 = (($band$011$i) + 1)|0; - $exitcond15$i = ($500|0)==(32); - if ($exitcond15$i) { - $lowpass_band$1$i$lcssa = $lowpass_band$1$i;$minband$1$i$lcssa = $minband$1$i; - break; - } else { - $band$011$i = $500;$lowpass_band$013$i = $lowpass_band$1$i;$minband$012$i = $minband$1$i; - } - } - $501 = ($minband$1$i$lcssa|0)==(999); - $lowpass_band$0$minband$0$i = $501 ? $lowpass_band$1$i$lcssa : $minband$1$i$lcssa; - $storemerge$in$in$in$i = (+($lowpass_band$0$minband$0$i|0)); - $storemerge$in$in$i = $storemerge$in$in$in$i + -0.75; - $storemerge$in$i = $storemerge$in$in$i * 0.032258064516129031; - $storemerge$i = $storemerge$in$i; - HEAPF32[$469>>2] = $storemerge$i; - $502 = (+($lowpass_band$1$i$lcssa|0)); - $503 = $502 * 0.032258064516129031; - $504 = $503; - HEAPF32[$470>>2] = $504; - } - } - $505 = ((($1)) + 260|0); - $506 = $507 > 0.0; - $508 = $507; - $509 = $508 < 0.021774193548387097; - $or$cond$i = $506 & $509; - $510 = ((($1)) + 256|0); - if ($or$cond$i) { - HEAPF32[$510>>2] = 0.0; - HEAPF32[$505>>2] = 0.0; - _lame_msgf($1,7096,$vararg_buffer); - $$pr$i = +HEAPF32[$505>>2]; - $512 = $$pr$i; - } else { - $512 = $507; - } - $511 = $512 > 0.0; - do { - if ($511) { - $513 = +HEAPF32[$510>>2]; - $band$18$i = 0;$highpass_band$010$i = -1;$maxband$09$i = -1; - while(1) { - $514 = (+($band$18$i|0)); - $515 = $514 * 0.032258064516129031; - $516 = $515; - $517 = !($516 <= $513); - $518 = ($highpass_band$010$i|0)>($band$18$i|0); - $519 = $518 | $517; - $highpass_band$1$i = $519 ? $highpass_band$010$i : $band$18$i; - $520 = $513 < $516; - $521 = $516 < $512; - $or$cond17$i = $520 & $521; - $522 = ($maxband$09$i|0)>($band$18$i|0); - $523 = $522 ? $maxband$09$i : $band$18$i; - $maxband$1$i = $or$cond17$i ? $523 : $maxband$09$i; - $524 = (($band$18$i) + 1)|0; - $exitcond14$i = ($524|0)==(32); - if ($exitcond14$i) { - $highpass_band$1$i$lcssa = $highpass_band$1$i;$maxband$1$i$lcssa = $maxband$1$i; - break; - } else { - $band$18$i = $524;$highpass_band$010$i = $highpass_band$1$i;$maxband$09$i = $maxband$1$i; - } - } - $525 = (+($highpass_band$1$i$lcssa|0)); - $526 = $525 * 0.032258064516129031; - $527 = $526; - HEAPF32[$510>>2] = $527; - $528 = ($maxband$1$i$lcssa|0)==(-1); - if ($528) { - $529 = $525 + 0.75; - $530 = $529 * 0.032258064516129031; - $531 = $530; - HEAPF32[$505>>2] = $531; - $540 = $531;$band$27$i = 0; - break; - } else { - $532 = (+($maxband$1$i$lcssa|0)); - $533 = $532 + 0.75; - $534 = $533 * 0.032258064516129031; - $535 = $534; - HEAPF32[$505>>2] = $535; - $540 = $535;$band$27$i = 0; - break; - } - } else { - $540 = $512;$band$27$i = 0; - } - } while(0); - while(1) { - $536 = (+($band$27$i|0)); - $537 = $536 * 0.032258063554763794; - $538 = +HEAPF32[$510>>2]; - $539 = $540 > $538; - do { - if ($539) { - $541 = $540 - $537; - $542 = $541; - $543 = $540 - $538; - $544 = $543; - $545 = $544 + 9.9999999999999995E-21; - $546 = $542 / $545; - $547 = $546; - $548 = $547; - $549 = $547 > 1.0; - if ($549) { - $fc1$0$i = 0.0; - break; - } - $550 = !($547 <= 0.0); - if (!($550)) { - $fc1$0$i = 1.0; - break; - } - $551 = $548 * 1.5707963267948966; - $552 = (+Math_cos((+$551))); - $553 = $552; - $fc1$0$i = $553; - } else { - $fc1$0$i = 1.0; - } - } while(0); - $554 = +HEAPF32[$470>>2]; - $555 = +HEAPF32[$469>>2]; - $556 = $554 > $555; - do { - if ($556) { - $557 = $537 - $555; - $558 = $557; - $559 = $554 - $555; - $560 = $559; - $561 = $560 + 9.9999999999999995E-21; - $562 = $558 / $561; - $563 = $562; - $564 = $563; - $565 = $563 > 1.0; - if ($565) { - $fc2$0$i = 0.0; - break; - } - $566 = !($563 <= 0.0); - if (!($566)) { - $fc2$0$i = 1.0; - break; - } - $567 = $564 * 1.5707963267948966; - $568 = (+Math_cos((+$567))); - $569 = $568; - $fc2$0$i = $569; - } else { - $fc2$0$i = 1.0; - } - } while(0); - $570 = $fc2$0$i * $fc1$0$i; - $571 = (((($1)) + 37040|0) + ($band$27$i<<2)|0); - HEAPF32[$571>>2] = $570; - $572 = (($band$27$i) + 1)|0; - $exitcond$i = ($572|0)==(32); - if ($exitcond$i) { - break; - } - $$pre$i = +HEAPF32[$505>>2]; - $540 = $$pre$i;$band$27$i = $572; - } - $573 = HEAP32[$414>>2]|0; - $574 = (_SmpFrqIndex($573,$2)|0); - $575 = ((($1)) + 20|0); - HEAP32[$575>>2] = $574; - $576 = ($574|0)<(0); - if ($576) { - _freegfc($1); - HEAP32[$0>>2] = 0; - $$0 = -1; - STACKTOP = sp;return ($$0|0); - } - $577 = HEAP32[$105>>2]|0; - $578 = ($577|0)==(0); - do { - if ($578) { - $579 = HEAP32[$580>>2]|0; - $581 = ($579|0)==(0); - if (!($581)) { - $582 = ((($1)) + 84744|0); - HEAP32[$582>>2] = 0; - break; - } - $583 = ((($gfp)) + 96|0); - $584 = HEAP32[$583>>2]|0; - $585 = HEAP32[$2>>2]|0; - $586 = HEAP32[$414>>2]|0; - $587 = (_FindNearestBitrate($584,$585,$586)|0); - HEAP32[$583>>2] = $587; - $588 = HEAP32[$2>>2]|0; - $589 = HEAP32[$414>>2]|0; - $590 = (_BitrateIndex($587,$588,$589)|0); - $591 = ((($1)) + 84744|0); - HEAP32[$591>>2] = $590; - $592 = ($590|0)<(1); - if (!($592)) { - break; - } - _freegfc($1); - HEAP32[$0>>2] = 0; - $$0 = -1; - STACKTOP = sp;return ($$0|0); - } else { - $593 = ((($1)) + 84744|0); - HEAP32[$593>>2] = 1; - } - } while(0); - _init_bit_stream_w($1); - $594 = HEAP32[$575>>2]|0; - $595 = HEAP32[$2>>2]|0; - $596 = ($595*3)|0; - $597 = (($596) + ($594))|0; - $598 = HEAP32[$414>>2]|0; - $599 = ($598|0)<(16000); - $600 = $599 ? 6 : 0; - $601 = (($597) + ($600))|0; - $602 = (12200 + (($601*204)|0)|0); - $603 = HEAP32[$602>>2]|0; - $604 = ((($1)) + 21360|0); - HEAP32[$604>>2] = $603; - $605 = (((12200 + (($601*204)|0)|0)) + 4|0); - $606 = HEAP32[$605>>2]|0; - $607 = ((($1)) + 21364|0); - HEAP32[$607>>2] = $606; - $608 = (((12200 + (($601*204)|0)|0)) + 8|0); - $609 = HEAP32[$608>>2]|0; - $610 = ((($1)) + 21368|0); - HEAP32[$610>>2] = $609; - $611 = (((12200 + (($601*204)|0)|0)) + 12|0); - $612 = HEAP32[$611>>2]|0; - $613 = ((($1)) + 21372|0); - HEAP32[$613>>2] = $612; - $614 = (((12200 + (($601*204)|0)|0)) + 16|0); - $615 = HEAP32[$614>>2]|0; - $616 = ((($1)) + 21376|0); - HEAP32[$616>>2] = $615; - $617 = (((12200 + (($601*204)|0)|0)) + 20|0); - $618 = HEAP32[$617>>2]|0; - $619 = ((($1)) + 21380|0); - HEAP32[$619>>2] = $618; - $620 = (((12200 + (($601*204)|0)|0)) + 24|0); - $621 = HEAP32[$620>>2]|0; - $622 = ((($1)) + 21384|0); - HEAP32[$622>>2] = $621; - $623 = (((12200 + (($601*204)|0)|0)) + 28|0); - $624 = HEAP32[$623>>2]|0; - $625 = ((($1)) + 21388|0); - HEAP32[$625>>2] = $624; - $626 = (((12200 + (($601*204)|0)|0)) + 32|0); - $627 = HEAP32[$626>>2]|0; - $628 = ((($1)) + 21392|0); - HEAP32[$628>>2] = $627; - $629 = (((12200 + (($601*204)|0)|0)) + 36|0); - $630 = HEAP32[$629>>2]|0; - $631 = ((($1)) + 21396|0); - HEAP32[$631>>2] = $630; - $632 = (((12200 + (($601*204)|0)|0)) + 40|0); - $633 = HEAP32[$632>>2]|0; - $634 = ((($1)) + 21400|0); - HEAP32[$634>>2] = $633; - $635 = (((12200 + (($601*204)|0)|0)) + 44|0); - $636 = HEAP32[$635>>2]|0; - $637 = ((($1)) + 21404|0); - HEAP32[$637>>2] = $636; - $638 = (((12200 + (($601*204)|0)|0)) + 48|0); - $639 = HEAP32[$638>>2]|0; - $640 = ((($1)) + 21408|0); - HEAP32[$640>>2] = $639; - $641 = (((12200 + (($601*204)|0)|0)) + 52|0); - $642 = HEAP32[$641>>2]|0; - $643 = ((($1)) + 21412|0); - HEAP32[$643>>2] = $642; - $644 = (((12200 + (($601*204)|0)|0)) + 56|0); - $645 = HEAP32[$644>>2]|0; - $646 = ((($1)) + 21416|0); - HEAP32[$646>>2] = $645; - $647 = (((12200 + (($601*204)|0)|0)) + 60|0); - $648 = HEAP32[$647>>2]|0; - $649 = ((($1)) + 21420|0); - HEAP32[$649>>2] = $648; - $650 = (((12200 + (($601*204)|0)|0)) + 64|0); - $651 = HEAP32[$650>>2]|0; - $652 = ((($1)) + 21424|0); - HEAP32[$652>>2] = $651; - $653 = (((12200 + (($601*204)|0)|0)) + 68|0); - $654 = HEAP32[$653>>2]|0; - $655 = ((($1)) + 21428|0); - HEAP32[$655>>2] = $654; - $656 = (((12200 + (($601*204)|0)|0)) + 72|0); - $657 = HEAP32[$656>>2]|0; - $658 = ((($1)) + 21432|0); - HEAP32[$658>>2] = $657; - $659 = (((12200 + (($601*204)|0)|0)) + 76|0); - $660 = HEAP32[$659>>2]|0; - $661 = ((($1)) + 21436|0); - HEAP32[$661>>2] = $660; - $662 = (((12200 + (($601*204)|0)|0)) + 80|0); - $663 = HEAP32[$662>>2]|0; - $664 = ((($1)) + 21440|0); - HEAP32[$664>>2] = $663; - $665 = (((12200 + (($601*204)|0)|0)) + 84|0); - $666 = HEAP32[$665>>2]|0; - $667 = ((($1)) + 21444|0); - HEAP32[$667>>2] = $666; - $668 = (((12200 + (($601*204)|0)|0)) + 88|0); - $669 = HEAP32[$668>>2]|0; - $670 = ((($1)) + 21448|0); - HEAP32[$670>>2] = $669; - $671 = (($669) - ($666))|0; - $672 = (($671|0) / 6)&-1; - $673 = ((($1)) + 21508|0); - HEAP32[$673>>2] = $666; - $674 = (($672) + ($666))|0; - $675 = ((($1)) + 21512|0); - HEAP32[$675>>2] = $674; - $676 = $672 << 1; - $677 = (($676) + ($666))|0; - $678 = ((($1)) + 21516|0); - HEAP32[$678>>2] = $677; - $679 = ($672*3)|0; - $680 = (($679) + ($666))|0; - $681 = ((($1)) + 21520|0); - HEAP32[$681>>2] = $680; - $682 = $672 << 2; - $683 = (($682) + ($666))|0; - $684 = ((($1)) + 21524|0); - HEAP32[$684>>2] = $683; - $685 = ($672*5)|0; - $686 = (($685) + ($666))|0; - $687 = ((($1)) + 21528|0); - HEAP32[$687>>2] = $686; - $688 = ((($1)) + 21532|0); - HEAP32[$688>>2] = 576; - $689 = (((12200 + (($601*204)|0)|0)) + 92|0); - $690 = HEAP32[$689>>2]|0; - $691 = ((($1)) + 21452|0); - HEAP32[$691>>2] = $690; - $692 = (((12200 + (($601*204)|0)|0)) + 96|0); - $693 = HEAP32[$692>>2]|0; - $694 = ((($1)) + 21456|0); - HEAP32[$694>>2] = $693; - $695 = (((12200 + (($601*204)|0)|0)) + 100|0); - $696 = HEAP32[$695>>2]|0; - $697 = ((($1)) + 21460|0); - HEAP32[$697>>2] = $696; - $698 = (((12200 + (($601*204)|0)|0)) + 104|0); - $699 = HEAP32[$698>>2]|0; - $700 = ((($1)) + 21464|0); - HEAP32[$700>>2] = $699; - $701 = (((12200 + (($601*204)|0)|0)) + 108|0); - $702 = HEAP32[$701>>2]|0; - $703 = ((($1)) + 21468|0); - HEAP32[$703>>2] = $702; - $704 = (((12200 + (($601*204)|0)|0)) + 112|0); - $705 = HEAP32[$704>>2]|0; - $706 = ((($1)) + 21472|0); - HEAP32[$706>>2] = $705; - $707 = (((12200 + (($601*204)|0)|0)) + 116|0); - $708 = HEAP32[$707>>2]|0; - $709 = ((($1)) + 21476|0); - HEAP32[$709>>2] = $708; - $710 = (((12200 + (($601*204)|0)|0)) + 120|0); - $711 = HEAP32[$710>>2]|0; - $712 = ((($1)) + 21480|0); - HEAP32[$712>>2] = $711; - $713 = (((12200 + (($601*204)|0)|0)) + 124|0); - $714 = HEAP32[$713>>2]|0; - $715 = ((($1)) + 21484|0); - HEAP32[$715>>2] = $714; - $716 = (((12200 + (($601*204)|0)|0)) + 128|0); - $717 = HEAP32[$716>>2]|0; - $718 = ((($1)) + 21488|0); - HEAP32[$718>>2] = $717; - $719 = (((12200 + (($601*204)|0)|0)) + 132|0); - $720 = HEAP32[$719>>2]|0; - $721 = ((($1)) + 21492|0); - HEAP32[$721>>2] = $720; - $722 = (((12200 + (($601*204)|0)|0)) + 136|0); - $723 = HEAP32[$722>>2]|0; - $724 = ((($1)) + 21496|0); - HEAP32[$724>>2] = $723; - $725 = (((12200 + (($601*204)|0)|0)) + 140|0); - $726 = HEAP32[$725>>2]|0; - $727 = ((($1)) + 21500|0); - HEAP32[$727>>2] = $726; - $728 = (((12200 + (($601*204)|0)|0)) + 144|0); - $729 = HEAP32[$728>>2]|0; - $730 = ((($1)) + 21504|0); - HEAP32[$730>>2] = $729; - $731 = (($729) - ($726))|0; - $732 = (($731|0) / 6)&-1; - $733 = ((($1)) + 21536|0); - HEAP32[$733>>2] = $726; - $734 = (($732) + ($726))|0; - $735 = ((($1)) + 21540|0); - HEAP32[$735>>2] = $734; - $736 = $732 << 1; - $737 = (($736) + ($726))|0; - $738 = ((($1)) + 21544|0); - HEAP32[$738>>2] = $737; - $739 = ($732*3)|0; - $740 = (($739) + ($726))|0; - $741 = ((($1)) + 21548|0); - HEAP32[$741>>2] = $740; - $742 = $732 << 2; - $743 = (($742) + ($726))|0; - $744 = ((($1)) + 21552|0); - HEAP32[$744>>2] = $743; - $745 = ($732*5)|0; - $746 = (($745) + ($726))|0; - $747 = ((($1)) + 21556|0); - HEAP32[$747>>2] = $746; - $748 = ((($1)) + 21560|0); - HEAP32[$748>>2] = 192; - $749 = HEAP32[$417>>2]|0; - $750 = ($749|0)==(2); - $751 = HEAP32[$142>>2]|0; - $752 = ($751|0)==(1); - $753 = $752 ? 13 : 21; - $754 = $752 ? 21 : 36; - $755 = $750 ? $754 : $753; - $756 = ((($1)) + 24|0); - HEAP32[$756>>2] = $755; - $757 = HEAP32[$80>>2]|0; - $758 = ($757|0)==(0); - if (!($758)) { - $759 = $755 | 2; - HEAP32[$756>>2] = $759; - } - HEAP32[$1>>2] = -487877; - $760 = ($749*700)|0; - $761 = Math_imul($760, $751)|0; - $762 = (+($761|0)); - $763 = ((($1)) + 39756|0); - HEAPF32[$763>>2] = $762; - $$pre69 = HEAP32[$417>>2]|0; - $$pre70 = HEAP32[$142>>2]|0; - $764 = ($$pre69*700)|0; - $765 = Math_imul($764, $$pre70)|0; - $766 = (+($765|0)); - $767 = ((($1)) + 39760|0); - HEAPF32[$767>>2] = $766; - $$pre69$1 = HEAP32[$417>>2]|0; - $$pre70$1 = HEAP32[$142>>2]|0; - $768 = ($$pre69$1*700)|0; - $769 = Math_imul($768, $$pre70$1)|0; - $770 = (+($769|0)); - $771 = ((($1)) + 39764|0); - HEAPF32[$771>>2] = $770; - $$pre69$2 = HEAP32[$417>>2]|0; - $$pre70$2 = HEAP32[$142>>2]|0; - $772 = ($$pre69$2*700)|0; - $773 = Math_imul($772, $$pre70$2)|0; - $774 = (+($773|0)); - $775 = ((($1)) + 39768|0); - HEAPF32[$775>>2] = $774; - $$pre69$3 = HEAP32[$417>>2]|0; - $$pre70$3 = HEAP32[$142>>2]|0; - $776 = ($$pre69$3*700)|0; - $777 = Math_imul($776, $$pre70$3)|0; - $778 = (+($777|0)); - $779 = ((($1)) + 39772|0); - HEAPF32[$779>>2] = $778; - $$pre69$4 = HEAP32[$417>>2]|0; - $$pre70$4 = HEAP32[$142>>2]|0; - $780 = ($$pre69$4*700)|0; - $781 = Math_imul($780, $$pre70$4)|0; - $782 = (+($781|0)); - $783 = ((($1)) + 39776|0); - HEAPF32[$783>>2] = $782; - $$pre69$5 = HEAP32[$417>>2]|0; - $$pre70$5 = HEAP32[$142>>2]|0; - $784 = ($$pre69$5*700)|0; - $785 = Math_imul($784, $$pre70$5)|0; - $786 = (+($785|0)); - $787 = ((($1)) + 39780|0); - HEAPF32[$787>>2] = $786; - $$pre69$6 = HEAP32[$417>>2]|0; - $$pre70$6 = HEAP32[$142>>2]|0; - $788 = ($$pre69$6*700)|0; - $789 = Math_imul($788, $$pre70$6)|0; - $790 = (+($789|0)); - $791 = ((($1)) + 39784|0); - HEAPF32[$791>>2] = $790; - $$pre69$7 = HEAP32[$417>>2]|0; - $$pre70$7 = HEAP32[$142>>2]|0; - $792 = ($$pre69$7*700)|0; - $793 = Math_imul($792, $$pre70$7)|0; - $794 = (+($793|0)); - $795 = ((($1)) + 39788|0); - HEAPF32[$795>>2] = $794; - $$pre69$8 = HEAP32[$417>>2]|0; - $$pre70$8 = HEAP32[$142>>2]|0; - $796 = ($$pre69$8*700)|0; - $797 = Math_imul($796, $$pre70$8)|0; - $798 = (+($797|0)); - $799 = ((($1)) + 39792|0); - HEAPF32[$799>>2] = $798; - $$pre69$9 = HEAP32[$417>>2]|0; - $$pre70$9 = HEAP32[$142>>2]|0; - $800 = ($$pre69$9*700)|0; - $801 = Math_imul($800, $$pre70$9)|0; - $802 = (+($801|0)); - $803 = ((($1)) + 39796|0); - HEAPF32[$803>>2] = $802; - $$pre69$10 = HEAP32[$417>>2]|0; - $$pre70$10 = HEAP32[$142>>2]|0; - $804 = ($$pre69$10*700)|0; - $805 = Math_imul($804, $$pre70$10)|0; - $806 = (+($805|0)); - $807 = ((($1)) + 39800|0); - HEAPF32[$807>>2] = $806; - $$pre69$11 = HEAP32[$417>>2]|0; - $$pre70$11 = HEAP32[$142>>2]|0; - $808 = ($$pre69$11*700)|0; - $809 = Math_imul($808, $$pre70$11)|0; - $810 = (+($809|0)); - $811 = ((($1)) + 39804|0); - HEAPF32[$811>>2] = $810; - $$pre69$12 = HEAP32[$417>>2]|0; - $$pre70$12 = HEAP32[$142>>2]|0; - $812 = ($$pre69$12*700)|0; - $813 = Math_imul($812, $$pre70$12)|0; - $814 = (+($813|0)); - $815 = ((($1)) + 39808|0); - HEAPF32[$815>>2] = $814; - $$pre69$13 = HEAP32[$417>>2]|0; - $$pre70$13 = HEAP32[$142>>2]|0; - $816 = ($$pre69$13*700)|0; - $817 = Math_imul($816, $$pre70$13)|0; - $818 = (+($817|0)); - $819 = ((($1)) + 39812|0); - HEAPF32[$819>>2] = $818; - $$pre69$14 = HEAP32[$417>>2]|0; - $$pre70$14 = HEAP32[$142>>2]|0; - $820 = ($$pre69$14*700)|0; - $821 = Math_imul($820, $$pre70$14)|0; - $822 = (+($821|0)); - $823 = ((($1)) + 39816|0); - HEAPF32[$823>>2] = $822; - $$pre69$15 = HEAP32[$417>>2]|0; - $$pre70$15 = HEAP32[$142>>2]|0; - $824 = ($$pre69$15*700)|0; - $825 = Math_imul($824, $$pre70$15)|0; - $826 = (+($825|0)); - $827 = ((($1)) + 39820|0); - HEAPF32[$827>>2] = $826; - $$pre69$16 = HEAP32[$417>>2]|0; - $$pre70$16 = HEAP32[$142>>2]|0; - $828 = ($$pre69$16*700)|0; - $829 = Math_imul($828, $$pre70$16)|0; - $830 = (+($829|0)); - $831 = ((($1)) + 39824|0); - HEAPF32[$831>>2] = $830; - $$pre69$17 = HEAP32[$417>>2]|0; - $$pre70$17 = HEAP32[$142>>2]|0; - $832 = ($$pre69$17*700)|0; - $833 = Math_imul($832, $$pre70$17)|0; - $834 = (+($833|0)); - $835 = ((($1)) + 39828|0); - HEAPF32[$835>>2] = $834; - $836 = ((($gfp)) + 220|0); - $837 = HEAP32[$836>>2]|0; - $838 = ($837|0)==(-1); - if ($838) { - HEAP32[$836>>2] = 4; - } - $839 = HEAP32[$105>>2]|0; - do { - if ((($839|0) == 4) | (($839|0) == 1)) { - $840 = ((($gfp)) + 124|0); - $841 = HEAP32[$840>>2]|0; - $842 = ($841|0)<(0); - if ($842) { - HEAP32[$840>>2] = 2; - } - $843 = ((($gfp)) + 244|0); - $844 = HEAP32[$843>>2]|0; - $845 = ($844|0)<(0); - if ($845) { - HEAP32[$843>>2] = 0; - } - $846 = ((($gfp)) + 164|0); - $847 = HEAP32[$846>>2]|0; - $848 = Math_imul($847, -10)|0; - $849 = (($848) + 500)|0; - (_apply_preset($gfp,$849,0)|0); - $850 = ((($gfp)) + 44|0); - $851 = HEAP32[$850>>2]|0; - $852 = ($851|0)<(0); - do { - if ($852) { - HEAP32[$850>>2] = 3; - label = 169; - } else { - $853 = ($851|0)<(5); - if ($853) { - label = 169; - break; - } - $854 = ($851|0)>(7); - if (!($854)) { - break; - } - HEAP32[$850>>2] = 7; - } - } while(0); - if ((label|0) == 169) { - HEAP32[$850>>2] = 0; - } - $855 = ((($gfp)) + 140|0); - $856 = HEAP32[$855>>2]|0; - $857 = ($856|0)==(0); - if ($857) { - $858 = HEAP32[$414>>2]|0; - $859 = ($858|0)>(44000); - $860 = $859&1; - $$sink54 = $860; - } else { - $$sink54 = 0; - } - $861 = ((($1)) + 85092|0); - HEAP32[$861>>2] = $$sink54; - $862 = ((($1)) + 85812|0); - HEAP32[$862>>2] = 1; - } else if ((($839|0) == 2)) { - $863 = ((($gfp)) + 164|0); - $864 = HEAP32[$863>>2]|0; - $865 = Math_imul($864, -10)|0; - $866 = (($865) + 500)|0; - (_apply_preset($gfp,$866,0)|0); - $867 = ((($gfp)) + 140|0); - $868 = HEAP32[$867>>2]|0; - $869 = ($868|0)==(0); - if ($869) { - $870 = HEAP32[$414>>2]|0; - $871 = ($870|0)>(44000); - $872 = $871&1; - $$sink55 = $872; - } else { - $$sink55 = 0; - } - $873 = ((($1)) + 85092|0); - HEAP32[$873>>2] = $$sink55; - $874 = ((($gfp)) + 44|0); - $875 = HEAP32[$874>>2]|0; - $876 = ($875|0)>(6); - do { - if ($876) { - HEAP32[$874>>2] = 6; - } else { - $877 = ($875|0)<(0); - if (!($877)) { - break; - } - HEAP32[$874>>2] = 3; - } - } while(0); - $878 = ((($1)) + 85812|0); - HEAP32[$878>>2] = 2; - } else { - $879 = ((($1)) + 85092|0); - HEAP32[$879>>2] = 0; - $880 = ((($gfp)) + 44|0); - $881 = HEAP32[$880>>2]|0; - $882 = ($881|0)<(0); - if ($882) { - HEAP32[$880>>2] = 3; - } - $883 = ($839|0)==(0); - if ($883) { - $884 = ((($gfp)) + 96|0); - $885 = HEAP32[$884>>2]|0; - (_lame_set_VBR_mean_bitrate_kbps($gfp,$885)|0); - } - $886 = ((($gfp)) + 168|0); - $887 = HEAP32[$886>>2]|0; - (_apply_preset($gfp,$887,0)|0); - HEAP32[$105>>2] = $839; - $888 = ((($1)) + 85812|0); - if ($883) { - HEAP32[$888>>2] = 3; - break; - } else { - HEAP32[$888>>2] = 4; - break; - } - } - } while(0); - $889 = ((($gfp)) + 200|0); - $890 = HEAP32[$889>>2]|0; - $891 = ((($1)) + 84912|0); - HEAP32[$891>>2] = $890; - $892 = ((($gfp)) + 204|0); - $893 = HEAP32[$892>>2]|0; - $894 = ((($1)) + 84916|0); - HEAP32[$894>>2] = $893; - $895 = ((($gfp)) + 256|0); - $896 = HEAP32[$895>>2]|0; - $897 = ($896|0)==(0); - if (!($897)) { - $898 = (HEAP32[tempDoublePtr>>2]=$893,+HEAPF32[tempDoublePtr>>2]); - $899 = (HEAP32[tempDoublePtr>>2]=$890,+HEAPF32[tempDoublePtr>>2]); - $900 = ((($gfp)) + 260|0); - $901 = +HEAPF32[$900>>2]; - $902 = $899 + $901; - HEAPF32[$891>>2] = $902; - $903 = $898 + $901; - HEAPF32[$894>>2] = $903; - } - $904 = HEAP32[$105>>2]|0; - $905 = ($904|0)==(0); - if ($905) { - $$phi$trans$insert77 = ((($gfp)) + 168|0); - $$pre78 = HEAP32[$$phi$trans$insert77>>2]|0; - $947 = 0;$964 = $$pre78; - } else { - $906 = ((($1)) + 112|0); - HEAP32[$906>>2] = 1; - $907 = ((($1)) + 116|0); - $908 = HEAP32[$414>>2]|0; - $909 = ($908|0)<(16000); - $$11 = $909 ? 8 : 14; - HEAP32[$907>>2] = $$11; - $910 = ((($gfp)) + 172|0); - $911 = HEAP32[$910>>2]|0; - $912 = ($911|0)==(0); - do { - if ($912) { - $1210 = 1; - } else { - $913 = HEAP32[$2>>2]|0; - $914 = (_FindNearestBitrate($911,$913,$908)|0); - HEAP32[$910>>2] = $914; - $915 = HEAP32[$2>>2]|0; - $916 = HEAP32[$414>>2]|0; - $917 = (_BitrateIndex($914,$915,$916)|0); - HEAP32[$906>>2] = $917; - $918 = ($917|0)<(0); - if ($918) { - $$0 = -1; - } else { - $1210 = $917; - break; - } - STACKTOP = sp;return ($$0|0); - } - } while(0); - $919 = ((($gfp)) + 176|0); - $920 = HEAP32[$919>>2]|0; - $921 = ($920|0)==(0); - do { - if ($921) { - $$pre74 = HEAP32[$907>>2]|0; - $931 = $1210;$934 = $$pre74; - } else { - $922 = HEAP32[$2>>2]|0; - $923 = HEAP32[$414>>2]|0; - $924 = (_FindNearestBitrate($920,$922,$923)|0); - HEAP32[$919>>2] = $924; - $925 = HEAP32[$2>>2]|0; - $926 = HEAP32[$414>>2]|0; - $927 = (_BitrateIndex($924,$925,$926)|0); - HEAP32[$907>>2] = $927; - $928 = ($927|0)<(0); - if ($928) { - $$0 = -1; - STACKTOP = sp;return ($$0|0); - } else { - $$pre72 = HEAP32[$906>>2]|0; - $931 = $$pre72;$934 = $927; - break; - } - } - } while(0); - $929 = HEAP32[$2>>2]|0; - $930 = ((83944 + ($929<<6)|0) + ($931<<2)|0); - $932 = HEAP32[$930>>2]|0; - HEAP32[$910>>2] = $932; - $933 = ((83944 + ($929<<6)|0) + ($934<<2)|0); - $935 = HEAP32[$933>>2]|0; - HEAP32[$919>>2] = $935; - $936 = ((($gfp)) + 168|0); - $937 = HEAP32[$936>>2]|0; - $938 = ($935|0)<($937|0); - $$12 = $938 ? $935 : $937; - $939 = ($932|0)>($$12|0); - $940 = $939 ? $932 : $$12; - HEAP32[$936>>2] = $940; - $$pre75 = HEAP32[$105>>2]|0; - $947 = $$pre75;$964 = $940; - } - $941 = ((($gfp)) + 152|0); - $942 = HEAP32[$941>>2]|0; - $943 = ((($1)) + 100|0); - HEAP32[$943>>2] = $942; - $944 = HEAP32[$372>>2]|0; - $945 = ((($1)) + 156|0); - HEAP32[$945>>2] = $944; - $946 = ((($1)) + 104|0); - HEAP32[$946>>2] = $947; - $948 = ((($gfp)) + 80|0); - $949 = HEAP32[$948>>2]|0; - $950 = ((($1)) + 85096|0); - HEAP32[$950>>2] = $949; - $951 = ((($gfp)) + 84|0); - $952 = HEAP32[$951>>2]|0; - $953 = ((($1)) + 28|0); - HEAP32[$953>>2] = $952; - $954 = ((($gfp)) + 88|0); - $955 = HEAP32[$954>>2]|0; - $956 = ((($1)) + 32|0); - HEAP32[$956>>2] = $955; - $957 = ((($gfp)) + 92|0); - $958 = HEAP32[$957>>2]|0; - $959 = ((($1)) + 36|0); - HEAP32[$959>>2] = $958; - $960 = ((($gfp)) + 96|0); - $961 = HEAP32[$960>>2]|0; - $962 = ((($1)) + 120|0); - HEAP32[$962>>2] = $961; - $963 = ((($1)) + 108|0); - HEAP32[$963>>2] = $964; - $965 = ((($gfp)) + 100|0); - $966 = HEAP32[$965>>2]|0; - $967 = ((($1)) + 244|0); - HEAP32[$967>>2] = $966; - $968 = HEAP32[$0>>2]|0; - $969 = ((($gfp)) + 44|0); - $970 = HEAP32[$969>>2]|0; - switch ($970|0) { - case 6: { - $977 = ((($968)) + 28|0); - $978 = HEAP32[$977>>2]|0; - $979 = ($978|0)==(0); - if ($979) { - HEAP32[$977>>2] = 1; - } - $980 = ((($968)) + 40|0); - HEAP32[$980>>2] = 0; - $981 = ((($968)) + 44|0); - HEAP32[$981>>2] = 0; - $982 = ((($968)) + 32|0); - $983 = HEAP32[$982>>2]|0; - $984 = ($983|0)==(-1); - if ($984) { - HEAP32[$982>>2] = 1; - } - $985 = ((($968)) + 36|0); - HEAP32[$985>>2] = 0; - $986 = ((($968)) + 48|0); - HEAP32[$986>>2] = 0; - break; - } - case 5: { - $987 = ((($968)) + 28|0); - $988 = HEAP32[$987>>2]|0; - $989 = ($988|0)==(0); - if ($989) { - HEAP32[$987>>2] = 1; - } - $990 = ((($968)) + 40|0); - HEAP32[$990>>2] = 0; - $991 = ((($968)) + 44|0); - HEAP32[$991>>2] = 0; - $992 = ((($968)) + 32|0); - $993 = HEAP32[$992>>2]|0; - $994 = ($993|0)==(-1); - if ($994) { - HEAP32[$992>>2] = 1; - } - $995 = ((($968)) + 36|0); - HEAP32[$995>>2] = 0; - $996 = ((($968)) + 48|0); - HEAP32[$996>>2] = 0; - break; - } - case 8: { - HEAP32[$969>>2] = 7; - label = 203; - break; - } - case 7: { - label = 203; - break; - } - case 3: { - $1007 = ((($968)) + 28|0); - $1008 = HEAP32[$1007>>2]|0; - $1009 = ($1008|0)==(0); - if ($1009) { - HEAP32[$1007>>2] = 1; - } - $1010 = ((($968)) + 40|0); - HEAP32[$1010>>2] = 1; - $1011 = ((($968)) + 44|0); - HEAP32[$1011>>2] = 1; - $1012 = ((($968)) + 32|0); - $1013 = HEAP32[$1012>>2]|0; - $1014 = ($1013|0)==(-1); - if ($1014) { - HEAP32[$1012>>2] = 1; - } - $1015 = ((($968)) + 36|0); - HEAP32[$1015>>2] = 1; - $1016 = ((($968)) + 48|0); - HEAP32[$1016>>2] = 0; - break; - } - case 4: { - $997 = ((($968)) + 28|0); - $998 = HEAP32[$997>>2]|0; - $999 = ($998|0)==(0); - if ($999) { - HEAP32[$997>>2] = 1; - } - $1000 = ((($968)) + 40|0); - HEAP32[$1000>>2] = 0; - $1001 = ((($968)) + 44|0); - HEAP32[$1001>>2] = 0; - $1002 = ((($968)) + 32|0); - $1003 = HEAP32[$1002>>2]|0; - $1004 = ($1003|0)==(-1); - if ($1004) { - HEAP32[$1002>>2] = 1; - } - $1005 = ((($968)) + 36|0); - HEAP32[$1005>>2] = 1; - $1006 = ((($968)) + 48|0); - HEAP32[$1006>>2] = 0; - break; - } - case 1: { - $1030 = ((($968)) + 28|0); - $1031 = HEAP32[$1030>>2]|0; - $1032 = ($1031|0)==(0); - if ($1032) { - HEAP32[$1030>>2] = 1; - } - $1033 = ((($968)) + 85096|0); - $1034 = HEAP32[$1033>>2]|0; - $1035 = ($1034|0)==(0); - if ($1035) { - HEAP32[$1033>>2] = 2; - } - $1036 = ((($968)) + 40|0); - HEAP32[$1036>>2] = 2; - $1037 = ((($968)) + 44|0); - HEAP32[$1037>>2] = 1; - $1038 = ((($968)) + 32|0); - $1039 = HEAP32[$1038>>2]|0; - $1040 = ($1039|0)==(-1); - if ($1040) { - HEAP32[$1038>>2] = 1; - } - $1041 = ((($968)) + 36|0); - HEAP32[$1041>>2] = 1; - $1042 = ((($968)) + 48|0); - HEAP32[$1042>>2] = 0; - break; - } - case 2: { - $1017 = ((($968)) + 28|0); - $1018 = HEAP32[$1017>>2]|0; - $1019 = ($1018|0)==(0); - if ($1019) { - HEAP32[$1017>>2] = 1; - } - $1020 = ((($968)) + 85096|0); - $1021 = HEAP32[$1020>>2]|0; - $1022 = ($1021|0)==(0); - if ($1022) { - HEAP32[$1020>>2] = 2; - } - $1023 = ((($968)) + 40|0); - HEAP32[$1023>>2] = 1; - $1024 = ((($968)) + 44|0); - HEAP32[$1024>>2] = 1; - $1025 = ((($968)) + 32|0); - $1026 = HEAP32[$1025>>2]|0; - $1027 = ($1026|0)==(-1); - if ($1027) { - HEAP32[$1025>>2] = 1; - } - $1028 = ((($968)) + 36|0); - HEAP32[$1028>>2] = 1; - $1029 = ((($968)) + 48|0); - HEAP32[$1029>>2] = 0; - break; - } - case 0: { - $1043 = ((($968)) + 28|0); - $1044 = HEAP32[$1043>>2]|0; - $1045 = ($1044|0)==(0); - if ($1045) { - HEAP32[$1043>>2] = 1; - } - $1046 = ((($968)) + 85096|0); - $1047 = HEAP32[$1046>>2]|0; - $1048 = ($1047|0)==(0); - if ($1048) { - HEAP32[$1046>>2] = 2; - } - $1049 = ((($968)) + 40|0); - HEAP32[$1049>>2] = 2; - $1050 = ((($968)) + 44|0); - HEAP32[$1050>>2] = 1; - $1051 = ((($968)) + 32|0); - $1052 = HEAP32[$1051>>2]|0; - $1053 = ($1052|0)==(-1); - if ($1053) { - HEAP32[$1051>>2] = 1; - } - $1054 = ((($968)) + 36|0); - HEAP32[$1054>>2] = 1; - $1055 = ((($968)) + 48|0); - HEAP32[$1055>>2] = 1; - break; - } - default: { - $971 = ((($968)) + 28|0); - HEAP32[$971>>2] = 0; - $972 = ((($968)) + 36|0); - ;HEAP32[$972>>2]=0|0;HEAP32[$972+4>>2]=0|0;HEAP32[$972+8>>2]=0|0;HEAP32[$972+12>>2]=0|0; - } - } - do { - if ((label|0) == 203) { - $973 = ((($968)) + 28|0); - HEAP32[$973>>2] = 0; - $974 = ((($968)) + 36|0); - $975 = ((($968)) + 48|0); - ;HEAP32[$974>>2]=0|0;HEAP32[$974+4>>2]=0|0;HEAP32[$974+8>>2]=0|0;HEAP32[$974+12>>2]=0|0; - $976 = HEAP32[$105>>2]|0; - if (!((($976|0) == 4) | (($976|0) == 1))) { - break; - } - HEAP32[$975>>2] = -1; - } - } while(0); - $1056 = ((($gfp)) + 232|0); - $1057 = HEAP32[$1056>>2]|0; - $1058 = ($1057|0)<(0); - $1059 = HEAP32[$68>>2]|0; - $$30 = $1058 ? 3 : $1057; - HEAP32[$1059>>2] = $$30; - $1060 = ((($gfp)) + 236|0); - $1061 = +HEAPF32[$1060>>2]; - $1062 = $1061; - $1063 = $1062 * -0.10000000000000001; - $1064 = (+Math_pow(10.0,(+$1063))); - $1065 = $1064; - $1066 = ((($1059)) + 4|0); - HEAPF32[$1066>>2] = $1065; - $1067 = ((($gfp)) + 240|0); - $1068 = HEAP32[$1067>>2]|0; - if ((($1068|0) == -1)) { - HEAP32[$1067>>2] = 0; - label = 248; - } else if ((($1068|0) == 0)) { - label = 248; - } else { - $1071 = $1068; - } - do { - if ((label|0) == 248) { - $1069 = HEAP32[$449>>2]|0; - $switch = ($1069>>>0)<(2); - if (!($switch)) { - $1071 = 0; - break; - } - HEAP32[$1067>>2] = 1; - $1071 = 1; - } - } while(0); - $1070 = ((($1)) + 184|0); - HEAP32[$1070>>2] = $1071; - $1072 = (_lame_get_quant_comp($gfp)|0); - $1073 = ($1072|0)<(0); - if ($1073) { - (_lame_set_quant_comp($gfp,1)|0); - } - $1074 = (_lame_get_quant_comp_short($gfp)|0); - $1075 = ($1074|0)<(0); - if ($1075) { - (_lame_set_quant_comp_short($gfp,0)|0); - } - $1076 = (+_lame_get_msfix($gfp)); - $1077 = $1076 < 0.0; - if ($1077) { - _lame_set_msfix($gfp,0.0); - } - $1078 = (_lame_get_exp_nspsytune($gfp)|0); - $1079 = $1078 | 1; - (_lame_set_exp_nspsytune($gfp,$1079)|0); - $1080 = HEAP32[$836>>2]|0; - $1081 = ($1080|0)<(0); - if ($1081) { - HEAP32[$836>>2] = 4; - $1108 = 4; - } else { - $1108 = $1080; - } - $1082 = ((($gfp)) + 224|0); - $1083 = +HEAPF32[$1082>>2]; - $1084 = $1083 < 0.0; - $1085 = (HEAPF32[tempDoublePtr>>2]=$1083,HEAP32[tempDoublePtr>>2]|0); - if ($1084) { - HEAPF32[$1082>>2] = 4.0; - $1106 = 1082130432; - } else { - $1106 = $1085; - } - $1086 = ((($gfp)) + 248|0); - $1087 = +HEAPF32[$1086>>2]; - $1088 = $1087 < 0.0; - $1089 = (HEAPF32[tempDoublePtr>>2]=$1087,HEAP32[tempDoublePtr>>2]|0); - if ($1088) { - HEAPF32[$1086>>2] = 0.0; - $1094 = 0; - } else { - $1094 = $1089; - } - $1090 = ((($gfp)) + 244|0); - $1091 = HEAP32[$1090>>2]|0; - $1092 = ($1091|0)<(0); - if ($1092) { - HEAP32[$1090>>2] = 1; - $1125 = 1; - } else { - $1125 = $1091; - } - $1093 = ((($1)) + 188|0); - HEAP32[$1093>>2] = $1094; - $1095 = ((($gfp)) + 252|0); - $1096 = HEAP32[$1095>>2]|0; - $1097 = ((($1)) + 192|0); - HEAP32[$1097>>2] = $1096; - $1098 = ((($gfp)) + 228|0); - $1099 = +HEAPF32[$1098>>2]; - $1100 = -$1099; - $1101 = ((($1)) + 196|0); - HEAPF32[$1101>>2] = $1100; - $1102 = $1099 * -0.10000000149011612; - $1103 = (+Math_pow(10.0,(+$1102))); - $1104 = ((($1)) + 200|0); - HEAPF32[$1104>>2] = $1103; - $1105 = ((($1)) + 204|0); - HEAP32[$1105>>2] = $1106; - $1107 = ((($1)) + 208|0); - HEAP32[$1107>>2] = $1108; - $1109 = ((($gfp)) + 208|0); - $1110 = HEAP32[$1109>>2]|0; - $1111 = ((($1)) + 212|0); - HEAP32[$1111>>2] = $1110; - $1112 = ((($gfp)) + 212|0); - $1113 = HEAP32[$1112>>2]|0; - $1114 = ((($1)) + 216|0); - HEAP32[$1114>>2] = $1113; - $1115 = ((($gfp)) + 216|0); - $1116 = HEAP32[$1115>>2]|0; - $1117 = ((($1)) + 220|0); - HEAP32[$1117>>2] = $1116; - $1118 = ((($gfp)) + 132|0); - $1119 = HEAP32[$1118>>2]|0; - $1120 = ((($1)) + 84|0); - HEAP32[$1120>>2] = $1119; - $1121 = ((($gfp)) + 136|0); - $1122 = HEAP32[$1121>>2]|0; - $1123 = ((($1)) + 88|0); - HEAP32[$1123>>2] = $1122; - $1124 = ((($1)) + 92|0); - HEAP32[$1124>>2] = $1125; - $1126 = ((($gfp)) + 148|0); - $1127 = HEAP32[$1126>>2]|0; - $1128 = $1127 & 2; - $1129 = ((($1)) + 96|0); - HEAP32[$1129>>2] = $1128; - $1130 = $1127 >>> 2; - $1131 = $1130 & 63; - $1132 = (+($1131|0)); - $1133 = ((($1)) + 232|0); - $1134 = !($1132 >= 32.0); - $1135 = $1132 + -64.0; - $storemerge4 = $1134 ? $1132 : $1135; - $1136 = $storemerge4 * 0.25; - HEAPF32[$1133>>2] = $1136; - $1137 = $1127 >>> 8; - $1138 = $1137 & 63; - $1139 = (+($1138|0)); - $1140 = ((($1)) + 228|0); - $1141 = !($1139 >= 32.0); - $1142 = $1139 + -64.0; - $storemerge3 = $1141 ? $1139 : $1142; - $1143 = $storemerge3 * 0.25; - HEAPF32[$1140>>2] = $1143; - $1144 = $1127 >>> 14; - $1145 = $1144 & 63; - $1146 = (+($1145|0)); - $1147 = ((($1)) + 236|0); - $1148 = !($1146 >= 32.0); - $1149 = $1146 + -64.0; - $storemerge2 = $1148 ? $1146 : $1149; - $1150 = $storemerge2 * 0.25; - HEAPF32[$1147>>2] = $1150; - $1151 = $1127 >>> 20; - $1152 = $1151 & 63; - $1153 = (+($1152|0)); - $1154 = ((($1)) + 240|0); - $1155 = !($1153 >= 32.0); - $1156 = $1153 + -64.0; - $storemerge1 = $1155 ? $1153 : $1156; - $1157 = $storemerge1 + $storemerge2; - $1158 = $1157 * 0.25; - HEAPF32[$1154>>2] = $1158; - $1159 = ((($gfp)) + 20|0); - $1160 = +HEAPF32[$1159>>2]; - $1161 = ((($gfp)) + 24|0); - $1162 = +HEAPF32[$1161>>2]; - $1163 = $1162 * $1160; - $1164 = ((($gfp)) + 28|0); - $1165 = +HEAPF32[$1164>>2]; - $1166 = $1165 * $1160; - $1167 = HEAP32[$95>>2]|0; - $1168 = ($1167|0)==(2); - do { - if ($1168) { - $1169 = HEAP32[$142>>2]|0; - $1170 = ($1169|0)==(1); - if (!($1170)) { - $m10$sroa$0$0 = $1163;$m10$sroa$22$0 = $1166;$m10$sroa$8$0 = 0.0; - break; - } - $1171 = $1163 * 0.5; - $1172 = $1166 * 0.5; - $m10$sroa$0$0 = $1171;$m10$sroa$22$0 = 0.0;$m10$sroa$8$0 = $1172; - } else { - $m10$sroa$0$0 = $1163;$m10$sroa$22$0 = $1166;$m10$sroa$8$0 = 0.0; - } - } while(0); - $1173 = ((($1)) + 264|0); - HEAPF32[$1173>>2] = $m10$sroa$0$0; - $1174 = ((($1)) + 268|0); - HEAPF32[$1174>>2] = $m10$sroa$8$0; - $1175 = ((($1)) + 272|0); - HEAPF32[$1175>>2] = 0.0; - $1176 = ((($1)) + 276|0); - HEAPF32[$1176>>2] = $m10$sroa$22$0; - $1177 = ((($1)) + 39832|0); - HEAP32[$1177>>2] = 0; - $1178 = ((($1)) + 39836|0); - HEAP32[$1178>>2] = 0; - $1179 = HEAP32[$946>>2]|0; - $1180 = ($1179|0)==(0); - if ($1180) { - $1181 = HEAP32[$2>>2]|0; - $1182 = ($1181*72000)|0; - $1183 = (($1182) + 72000)|0; - $1184 = HEAP32[$962>>2]|0; - $1185 = Math_imul($1183, $1184)|0; - $1186 = HEAP32[$414>>2]|0; - $1187 = (($1185|0) % ($1186|0))&-1; - HEAP32[$1177>>2] = $1187; - HEAP32[$1178>>2] = $1187; - } - $1188 = HEAP32[$gfp>>2]|0; - $1189 = ($1188|0)==(-487877); - do { - if ($1189) { - $1190 = HEAP32[$0>>2]|0; - $1191 = ($1190|0)==(0|0); - if ($1191) { - break; - } - $1192 = ((($1190)) + 84040|0); - $1193 = ((($1190)) + 84748|0); - HEAP32[$1193>>2] = 0; - $1194 = ((($gfp)) + 68|0); - $1195 = HEAP32[$1194>>2]|0; - $1196 = ($1195|0)==(0); - if (!($1196)) { - (_id3tag_write_v2($gfp)|0); - } - $1197 = ((($1190)) + 85684|0); - HEAPF32[$1197>>2] = 0.0; - $1198 = ((($1190)) + 156|0); - _memset(($1192|0),0,704)|0; - $1199 = HEAP32[$1198>>2]|0; - $1200 = ($1199|0)==(0); - if ($1200) { - break; - } - (_InitVbrTag($gfp)|0); - } - } while(0); - _iteration_init($1); - (_psymodel_init($gfp)|0); - $1201 = ((($gfp)) + 124|0); - $1202 = HEAP32[$1201>>2]|0; - $1203 = (_get_max_frame_buffer_size_by_constraint($2,$1202)|0); - $1204 = ((($1)) + 148|0); - HEAP32[$1204>>2] = $1203; - $$0 = 0; - STACKTOP = sp;return ($$0|0); -} -function _lame_encode_buffer_ieee_float($gfp,$pcm_l,$pcm_r,$nsamples,$mp3buf,$mp3buf_size) { - $gfp = $gfp|0; - $pcm_l = $pcm_l|0; - $pcm_r = $pcm_r|0; - $nsamples = $nsamples|0; - $mp3buf = $mp3buf|0; - $mp3buf_size = $mp3buf_size|0; - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_lame_encode_buffer_template($gfp,$pcm_l,$pcm_r,$nsamples,$mp3buf,$mp3buf_size,3,1,32767.0)|0); - return ($0|0); -} -function _lame_encode_flush($gfp,$mp3buffer,$mp3buffer_size) { - $gfp = $gfp|0; - $mp3buffer = $mp3buffer|0; - $mp3buffer_size = $mp3buffer_size|0; - var $$ = 0, $$$ = 0, $$0 = 0, $$04$lcssa16 = 0, $$0411 = 0, $$1 = 0, $$2 = 0, $$3 = 0, $$5 = 0, $$6 = 0, $$lcssa = 0, $$lcssa24 = 0, $$lcssa25 = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0; - var $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0; - var $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0; - var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0; - var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $8 = 0, $9 = 0, $buffer = 0, $frames_left$09 = 0, $mp3count$0$lcssa17 = 0, $mp3count$010 = 0, $resample_ratio$0 = 0.0, $samples_to_encode$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 4608|0; - $buffer = sp; - $0 = ($gfp|0)==(0|0); - if ($0) { - $$0 = -3; - STACKTOP = sp;return ($$0|0); - } - $1 = HEAP32[$gfp>>2]|0; - $2 = ($1|0)==(-487877); - if (!($2)) { - $$0 = -3; - STACKTOP = sp;return ($$0|0); - } - $3 = ((($gfp)) + 288|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($4|0)==(0|0); - if ($5) { - $$0 = -3; - STACKTOP = sp;return ($$0|0); - } - $6 = HEAP32[$4>>2]|0; - $7 = ($6|0)==(-487877); - if (!($7)) { - $$0 = -3; - STACKTOP = sp;return ($$0|0); - } - $8 = ((($4)) + 84032|0); - $9 = HEAP32[$8>>2]|0; - $10 = ($9|0)<(1); - if ($10) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $11 = ((($4)) + 16|0); - $12 = ((($4)) + 76|0); - $13 = HEAP32[$12>>2]|0; - $14 = ($13*576)|0; - $15 = (($14) + 752)|0; - $16 = (($9) + -1152)|0; - _memset(($buffer|0),0,4608)|0; - $17 = (_isResamplingNecessary($11)|0); - $18 = ($17|0)==(0); - if ($18) { - $resample_ratio$0 = 1.0;$samples_to_encode$0 = $16; - } else { - $19 = ((($4)) + 60|0); - $20 = HEAP32[$19>>2]|0; - $21 = (+($20|0)); - $22 = ((($4)) + 64|0); - $23 = HEAP32[$22>>2]|0; - $24 = (+($23|0)); - $25 = $21 / $24; - $26 = 16.0 / $25; - $27 = (+($16|0)); - $28 = $26 + $27; - $29 = (~~(($28))); - $resample_ratio$0 = $25;$samples_to_encode$0 = $29; - } - $30 = (($samples_to_encode$0|0) % ($14|0))&-1; - $31 = (($14) - ($30))|0; - $32 = ($31|0)<(576); - $33 = $32 ? $14 : 0; - $$5 = (($33) + ($31))|0; - $34 = ((($4)) + 84764|0); - HEAP32[$34>>2] = $$5; - $35 = (($$5) + ($samples_to_encode$0))|0; - $36 = (($35|0) / ($14|0))&-1; - $37 = ($36|0)>(0); - if ($37) { - $38 = ((($4)) + 84748|0); - $39 = ((($4)) + 84036|0); - $40 = ($mp3buffer_size|0)==(0); - $41 = ((($buffer)) + 2304|0); - $$pre = HEAP32[$38>>2]|0; - $$0411 = $mp3buffer;$54 = $$pre;$frames_left$09 = $36;$mp3count$010 = 0; - while(1) { - $42 = HEAP32[$39>>2]|0; - $43 = (($15) - ($42))|0; - $44 = (+($43|0)); - $45 = $44 * $resample_ratio$0; - $46 = (~~(($45))); - $47 = ($46|0)>(1152); - $$ = $47 ? 1152 : $46; - $48 = ($$|0)<(1); - $$$ = $48 ? 1 : $$; - $49 = (($mp3buffer_size) - ($mp3count$010))|0; - $$1 = $40 ? 0 : $49; - $50 = (_lame_encode_buffer_template($gfp,$buffer,$41,$$$,$$0411,$$1,0,1,1.0)|0); - $51 = (($$0411) + ($50)|0); - $52 = (($50) + ($mp3count$010))|0; - $53 = HEAP32[$38>>2]|0; - $55 = ($54|0)!=($53|0); - $56 = $55&1; - $57 = (($frames_left$09) - ($56))|0; - $58 = ($57|0)>(0); - $59 = ($50|0)>(-1); - $60 = $58 & $59; - if ($60) { - $$0411 = $51;$54 = $53;$frames_left$09 = $57;$mp3count$010 = $52; - } else { - $$lcssa = $50;$$lcssa24 = $51;$$lcssa25 = $52; - break; - } - } - HEAP32[$8>>2] = 0; - $61 = ($$lcssa|0)<(0); - if ($61) { - $$0 = $$lcssa; - STACKTOP = sp;return ($$0|0); - } else { - $$04$lcssa16 = $$lcssa24;$mp3count$0$lcssa17 = $$lcssa25; - } - } else { - HEAP32[$8>>2] = 0; - $$04$lcssa16 = $mp3buffer;$mp3count$0$lcssa17 = 0; - } - $62 = (($mp3buffer_size) - ($mp3count$0$lcssa17))|0; - $63 = ($mp3buffer_size|0)==(0); - $$2 = $63 ? 0 : $62; - _flush_bitstream($4); - $64 = (_copy_buffer($4,$$04$lcssa16,$$2,1)|0); - _save_gain_values($4); - $65 = ($64|0)<(0); - if ($65) { - $$0 = $64; - STACKTOP = sp;return ($$0|0); - } - $66 = (($64) + ($mp3count$0$lcssa17))|0; - $67 = ((($gfp)) + 68|0); - $68 = HEAP32[$67>>2]|0; - $69 = ($68|0)==(0); - if ($69) { - $$0 = $66; - STACKTOP = sp;return ($$0|0); - } - $70 = (($mp3buffer_size) - ($66))|0; - $$3 = $63 ? 0 : $70; - $71 = (($$04$lcssa16) + ($64)|0); - (_id3tag_write_v1($gfp)|0); - $72 = (_copy_buffer($4,$71,$$3,0)|0); - $73 = ($72|0)<(0); - $74 = $73 ? 0 : $66; - $$6 = (($74) + ($72))|0; - $$0 = $$6; - STACKTOP = sp;return ($$0|0); -} -function _lame_close($gfp) { - $gfp = $gfp|0; - var $$ = 0, $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ret$02 = 0, $ret$1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($gfp|0)==(0|0); - if ($0) { - $ret$1 = 0; - return ($ret$1|0); - } - $1 = HEAP32[$gfp>>2]|0; - $2 = ($1|0)==(-487877); - if (!($2)) { - $ret$1 = 0; - return ($ret$1|0); - } - $3 = ((($gfp)) + 288|0); - $4 = HEAP32[$3>>2]|0; - HEAP32[$gfp>>2] = 0; - $5 = ($4|0)==(0|0); - if ($5) { - $ret$02 = -3; - } else { - $6 = HEAP32[$4>>2]|0; - $7 = ($6|0)==(-487877); - $$ = $7 ? 0 : -3; - HEAP32[$4>>2] = 0; - _freegfc($4); - HEAP32[$3>>2] = 0; - $ret$02 = $$; - } - $8 = ((($gfp)) + 284|0); - $9 = HEAP32[$8>>2]|0; - $10 = ($9|0)==(0); - if ($10) { - $ret$1 = $ret$02; - return ($ret$1|0); - } - _free($gfp); - $ret$1 = $ret$02; - return ($ret$1|0); -} -function _lame_init() { - var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; - var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; - var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - _init_log_table(); - $0 = (_calloc(1,304)|0); - $1 = ($0|0)==(0|0); - if ($1) { - $$0 = 0; - return ($$0|0); - } - _memset(($0|0),0,304)|0; - HEAP32[$0>>2] = -487877; - $2 = (_calloc(1,85840)|0); - $3 = ((($0)) + 288|0); - HEAP32[$3>>2] = $2; - $4 = ($2|0)==(0|0); - if ($4) { - _free($0); - $$0 = 0; - return ($$0|0); - } else { - $5 = ((($0)) + 124|0); - HEAP32[$5>>2] = 2; - $6 = ((($0)) + 48|0); - HEAP32[$6>>2] = 4; - $7 = ((($0)) + 108|0); - HEAP32[$7>>2] = 1; - $8 = ((($0)) + 12|0); - HEAP32[$8>>2] = 44100; - $9 = ((($0)) + 8|0); - HEAP32[$9>>2] = 2; - $10 = ((($0)) + 4|0); - HEAP32[$10>>2] = -1; - $11 = ((($0)) + 36|0); - HEAP32[$11>>2] = 1; - $12 = ((($0)) + 44|0); - HEAP32[$12>>2] = -1; - $13 = ((($0)) + 240|0); - HEAP32[$13>>2] = -1; - $14 = ((($0)) + 88|0); - HEAP32[$14>>2] = -1; - $15 = ((($0)) + 184|0); - HEAP32[$15>>2] = 0; - $16 = ((($0)) + 188|0); - HEAP32[$16>>2] = 0; - $17 = ((($0)) + 192|0); - HEAP32[$17>>2] = -1; - $18 = ((($0)) + 196|0); - HEAP32[$18>>2] = -1; - $19 = ((($0)) + 156|0); - HEAP32[$19>>2] = 0; - $20 = ((($0)) + 164|0); - HEAP32[$20>>2] = 4; - $21 = ((($0)) + 224|0); - HEAPF32[$21>>2] = -1.0; - $22 = ((($0)) + 168|0); - HEAP32[$22>>2] = 128; - $23 = ((($0)) + 172|0); - HEAP32[$23>>2] = 0; - $24 = ((($0)) + 176|0); - HEAP32[$24>>2] = 0; - $25 = ((($0)) + 180|0); - HEAP32[$25>>2] = 0; - $26 = ((($2)) + 112|0); - HEAP32[$26>>2] = 1; - $27 = ((($2)) + 116|0); - HEAP32[$27>>2] = 13; - $28 = ((($0)) + 132|0); - HEAP32[$28>>2] = -1; - $29 = ((($0)) + 136|0); - HEAP32[$29>>2] = -1; - $30 = ((($0)) + 252|0); - HEAPF32[$30>>2] = -1.0; - $31 = ((($2)) + 84920|0); - HEAP32[$31>>2] = 180; - $32 = ((($2)) + 84924|0); - HEAP32[$32>>2] = 180; - $33 = ((($2)) + 84928|0); - HEAP32[$33>>2] = 4; - $34 = ((($2)) + 84932|0); - HEAP32[$34>>2] = 4; - $35 = ((($2)) + 84908|0); - HEAPF32[$35>>2] = 1.0; - $36 = ((($0)) + 264|0); - HEAPF32[$36>>2] = -1.0; - $37 = ((($0)) + 268|0); - HEAPF32[$37>>2] = -1.0; - $38 = ((($0)) + 20|0); - HEAPF32[$38>>2] = 1.0; - $39 = ((($0)) + 24|0); - HEAPF32[$39>>2] = 1.0; - $40 = ((($0)) + 28|0); - HEAPF32[$40>>2] = 1.0; - $41 = ((($0)) + 232|0); - HEAP32[$41>>2] = -1; - $42 = ((($0)) + 220|0); - HEAP32[$42>>2] = -1; - $43 = ((($0)) + 236|0); - HEAPF32[$43>>2] = 0.0; - $44 = ((($0)) + 244|0); - HEAP32[$44>>2] = -1; - $45 = ((($0)) + 248|0); - HEAPF32[$45>>2] = -1.0; - $46 = ((($2)) + 84032|0); - HEAP32[$46>>2] = 1728; - $47 = ((($2)) + 84764|0); - HEAP32[$47>>2] = 0; - $48 = ((($2)) + 84036|0); - HEAP32[$48>>2] = 528; - $49 = ((($0)) + 60|0); - HEAP32[$49>>2] = 0; - $50 = ((($0)) + 64|0); - HEAP32[$50>>2] = 0; - $51 = ((($2)) + 136|0); - HEAP32[$51>>2] = 0; - $52 = ((($2)) + 128|0); - HEAP32[$52>>2] = 0; - $53 = ((($2)) + 132|0); - HEAP32[$53>>2] = 0; - $54 = ((($2)) + 85680|0); - $55 = ((($2)) + 85688|0); - HEAP32[$55>>2] = 0; - $56 = ((($2)) + 85692|0); - HEAP32[$56>>2] = 0; - HEAPF32[$54>>2] = -1.0; - $57 = ((($0)) + 292|0); - HEAP32[$57>>2] = 1; - $58 = ((($0)) + 296|0); - HEAP32[$58>>2] = 1; - $59 = ((($0)) + 300|0); - HEAP32[$59>>2] = 1; - $60 = ((($0)) + 152|0); - HEAP32[$60>>2] = 0; - $61 = ((($0)) + 68|0); - HEAP32[$61>>2] = 1; - $62 = ((($0)) + 276|0); - HEAP32[$62>>2] = 2; - $63 = ((($0)) + 280|0); - HEAP32[$63>>2] = 2; - $64 = ((($0)) + 272|0); - HEAP32[$64>>2] = 2; - $65 = ((($0)) + 284|0); - HEAP32[$65>>2] = 1; - $$0 = $0; - return ($$0|0); - } - return (0)|0; -} -function _lame_encode_buffer_template($gfp,$buffer_l,$buffer_r,$nsamples,$mp3buf,$mp3buf_size,$pcm_type,$aa,$norm) { - $gfp = $gfp|0; - $buffer_l = $buffer_l|0; - $buffer_r = $buffer_r|0; - $nsamples = $nsamples|0; - $mp3buf = $mp3buf|0; - $mp3buf_size = $mp3buf_size|0; - $pcm_type = $pcm_type|0; - $aa = $aa|0; - $norm = +$norm; - var $$0 = 0, $$0$i3 = 0, $$01$i = 0, $$01$i$us = 0, $$01$ph$i = 0, $$01$ph$i$us = 0, $$02$ph$i = 0, $$02$ph$i$us = 0, $$idx$val$i = 0, $$in_buffer$sroa$4$0$i = 0, $$in_buffer$sroa$4$0$i$lcssa = 0, $$in_buffer$sroa$4$0$i$us = 0, $$in_buffer$sroa$4$0$i$us$lcssa = 0, $$lcssa = 0, $$lcssa46 = 0, $$lcssa48 = 0, $$lcssa49 = 0, $$phi$trans$insert = 0, $$pr15$i = 0, $$pre = 0; - var $$pre$phi$iZ2D = 0, $$pre$phiZ2D = 0, $$pre18 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0; - var $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0; - var $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0; - var $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; - var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; - var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; - var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; - var $98 = 0, $99 = 0, $ch$011$us$i = 0, $ch$011$us$i$us = 0, $exitcond = 0, $exitcond15 = 0, $exitcond16 = 0, $exitcond17 = 0, $i$010$us$i = 0, $i$010$us$i$us = 0, $in_buffer$sroa$0$0$i = 0, $in_buffer$sroa$0$0$i$us = 0, $in_buffer$sroa$0$0$ph$i = 0, $in_buffer$sroa$0$0$ph$i$us = 0, $in_buffer$sroa$4$0$i = 0, $in_buffer$sroa$4$0$i$us = 0, $in_buffer$sroa$4$0$ph$i = 0, $in_buffer$sroa$4$0$ph$i$us = 0, $in_buffer_ptr$i = 0, $mfbuf$i = 0; - var $mp3size$0$ph$i = 0, $mp3size$0$ph$i$us = 0, $n_in$i = 0, $n_out$i = 0, $or$cond = 0, $or$cond$i = 0, $or$cond$i$us = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; - $vararg_buffer = sp; - $mfbuf$i = sp + 24|0; - $in_buffer_ptr$i = sp + 16|0; - $n_in$i = sp + 8|0; - $n_out$i = sp + 4|0; - $0 = ($gfp|0)==(0|0); - if ($0) { - $$0 = -3; - STACKTOP = sp;return ($$0|0); - } - $1 = HEAP32[$gfp>>2]|0; - $2 = ($1|0)==(-487877); - if (!($2)) { - $$0 = -3; - STACKTOP = sp;return ($$0|0); - } - $3 = ((($gfp)) + 288|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($4|0)==(0|0); - if ($5) { - $$0 = -3; - STACKTOP = sp;return ($$0|0); - } - $6 = HEAP32[$4>>2]|0; - $7 = ($6|0)==(-487877); - if (!($7)) { - $$0 = -3; - STACKTOP = sp;return ($$0|0); - } - $8 = ($nsamples|0)==(0); - if ($8) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $9 = ((($4)) + 52152|0); - $10 = HEAP32[$9>>2]|0; - $11 = ($10|0)==(0|0); - do { - if ($11) { - label = 10; - } else { - $12 = ((($4)) + 52148|0); - $13 = HEAP32[$12>>2]|0; - $14 = ($13|0)<($nsamples|0); - if ($14) { - _free($10); - label = 10; - break; - } else { - $$phi$trans$insert = ((($4)) + 52156|0); - $$pre = HEAP32[$$phi$trans$insert>>2]|0; - $$pr15$i = $10;$$pre$phiZ2D = $$phi$trans$insert;$22 = $$pre; - label = 13; - break; - } - } - } while(0); - if ((label|0) == 10) { - $15 = ((($4)) + 52156|0); - $16 = HEAP32[$15>>2]|0; - $17 = ($16|0)==(0|0); - if (!($17)) { - _free($16); - } - $18 = (_calloc($nsamples,4)|0); - HEAP32[$9>>2] = $18; - $19 = (_calloc($nsamples,4)|0); - HEAP32[$15>>2] = $19; - $20 = ((($4)) + 52148|0); - HEAP32[$20>>2] = $nsamples; - $21 = ($18|0)==(0|0); - if ($21) { - $$pre$phi$iZ2D = $15;$24 = $19; - } else { - $$pr15$i = $18;$$pre$phiZ2D = $15;$22 = $19; - label = 13; - } - } - do { - if ((label|0) == 13) { - $23 = ($22|0)==(0|0); - if ($23) { - _free($$pr15$i); - $$pre18 = HEAP32[$$pre$phiZ2D>>2]|0; - $$pre$phi$iZ2D = $$pre$phiZ2D;$24 = $$pre18; - break; - } - $27 = ((($4)) + 68|0); - $28 = HEAP32[$27>>2]|0; - $29 = ($28|0)>(1); - $30 = ($buffer_l|0)==(0|0); - do { - if ($29) { - $31 = ($buffer_r|0)==(0|0); - $or$cond = $30 | $31; - if ($or$cond) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } else { - _lame_copy_inbuffer($4,$buffer_l,$buffer_r,$nsamples,$pcm_type,$aa,$norm); - break; - } - } else { - if ($30) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } else { - _lame_copy_inbuffer($4,$buffer_l,$buffer_l,$nsamples,$pcm_type,$aa,$norm); - break; - } - } - } while(0); - $32 = ((($4)) + 76|0); - $33 = HEAP32[$32>>2]|0; - $34 = ($33*576)|0; - $35 = HEAP32[$4>>2]|0; - $36 = ($35|0)==(-487877); - L41: do { - if ($36) { - $37 = (_copy_buffer($4,$mp3buf,$mp3buf_size,0)|0); - $38 = ($37|0)<(0); - if ($38) { - $$0$i3 = $37; - } else { - $39 = (($mp3buf) + ($37)|0); - $40 = HEAP32[$9>>2]|0; - $41 = HEAP32[$$pre$phiZ2D>>2]|0; - $$idx$val$i = HEAP32[$32>>2]|0; - $42 = ($$idx$val$i*576)|0; - $43 = (($42) + 752)|0; - $44 = ((($4)) + 52160|0); - HEAP32[$mfbuf$i>>2] = $44; - $45 = ((($4)) + 68096|0); - $46 = ((($mfbuf$i)) + 4|0); - HEAP32[$46>>2] = $45; - $47 = ((($in_buffer_ptr$i)) + 4|0); - $48 = ((($4)) + 128|0); - $49 = ((($4)) + 72|0); - $50 = ((($4)) + 84036|0); - $51 = ((($4)) + 84032|0); - $52 = ((($4)) + 136|0); - $53 = ((($4)) + 85676|0); - $54 = ($mp3buf_size|0)==(0); - $55 = Math_imul($33, -576)|0; - if ($54) { - $$01$ph$i$us = $nsamples;$$02$ph$i$us = $39;$in_buffer$sroa$0$0$ph$i$us = $40;$in_buffer$sroa$4$0$ph$i$us = $41;$mp3size$0$ph$i$us = $37; - L65: while(1) { - $$01$i$us = $$01$ph$i$us;$in_buffer$sroa$0$0$i$us = $in_buffer$sroa$0$0$ph$i$us;$in_buffer$sroa$4$0$i$us = $in_buffer$sroa$4$0$ph$i$us; - while(1) { - $56 = ($$01$i$us|0)>(0); - if (!($56)) { - $$0$i3 = $mp3size$0$ph$i$us; - break L41; - } - HEAP32[$n_in$i>>2] = 0; - HEAP32[$n_out$i>>2] = 0; - HEAP32[$in_buffer_ptr$i>>2] = $in_buffer$sroa$0$0$i$us; - HEAP32[$47>>2] = $in_buffer$sroa$4$0$i$us; - _fill_buffer($4,$mfbuf$i,$in_buffer_ptr$i,$$01$i$us,$n_in$i,$n_out$i); - $57 = HEAP32[$48>>2]|0; - $58 = ($57|0)==(0); - if (!($58)) { - $59 = HEAP32[$52>>2]|0; - $60 = ($59|0)==(0); - if ($60) { - $61 = HEAP32[$53>>2]|0; - $62 = HEAP32[$50>>2]|0; - $63 = HEAP32[$mfbuf$i>>2]|0; - $64 = (($63) + ($62<<2)|0); - $65 = HEAP32[$46>>2]|0; - $66 = (($65) + ($62<<2)|0); - $67 = HEAP32[$n_out$i>>2]|0; - $68 = HEAP32[$49>>2]|0; - $69 = (_AnalyzeSamples(($61|0),($64|0),($66|0),($67|0),($68|0))|0); - $70 = ($69|0)==(0); - if ($70) { - $$0$i3 = -6; - break L41; - } - } - } - $71 = HEAP32[$n_in$i>>2]|0; - $72 = (($$01$i$us) - ($71))|0; - $73 = (($in_buffer$sroa$0$0$i$us) + ($71<<2)|0); - $74 = HEAP32[$49>>2]|0; - $75 = ($74|0)==(2); - $76 = (($in_buffer$sroa$4$0$i$us) + ($71<<2)|0); - $$in_buffer$sroa$4$0$i$us = $75 ? $76 : $in_buffer$sroa$4$0$i$us; - $77 = HEAP32[$n_out$i>>2]|0; - $78 = HEAP32[$50>>2]|0; - $79 = (($78) + ($77))|0; - HEAP32[$50>>2] = $79; - $80 = HEAP32[$51>>2]|0; - $81 = ($80|0)<(1); - if ($81) { - HEAP32[$51>>2] = 1728; - $83 = 1728; - } else { - $83 = $80; - } - $82 = (($83) + ($77))|0; - HEAP32[$51>>2] = $82; - $84 = ($79|0)<($43|0); - if ($84) { - $$01$i$us = $72;$in_buffer$sroa$0$0$i$us = $73;$in_buffer$sroa$4$0$i$us = $$in_buffer$sroa$4$0$i$us; - } else { - $$in_buffer$sroa$4$0$i$us$lcssa = $$in_buffer$sroa$4$0$i$us;$$lcssa = $72;$$lcssa46 = $73; - break; - } - } - $85 = HEAP32[$mfbuf$i>>2]|0; - $86 = HEAP32[$46>>2]|0; - $87 = (_lame_encode_mp3_frame($4,$85,$86,$$02$ph$i$us,0)|0); - $88 = ($87|0)<(0); - if ($88) { - $$0$i3 = $87; - break L41; - } - $89 = (($$02$ph$i$us) + ($87)|0); - $90 = (($87) + ($mp3size$0$ph$i$us))|0; - $91 = HEAP32[$50>>2]|0; - $92 = (($91) - ($34))|0; - HEAP32[$50>>2] = $92; - $93 = HEAP32[$51>>2]|0; - $94 = (($93) - ($34))|0; - HEAP32[$51>>2] = $94; - $95 = HEAP32[$49>>2]|0; - $96 = ($95|0)>(0); - $97 = ($92|0)>(0); - $or$cond$i$us = $97 & $96; - if (!($or$cond$i$us)) { - $$01$ph$i$us = $$lcssa;$$02$ph$i$us = $89;$in_buffer$sroa$0$0$ph$i$us = $$lcssa46;$in_buffer$sroa$4$0$ph$i$us = $$in_buffer$sroa$4$0$i$us$lcssa;$mp3size$0$ph$i$us = $90; - continue; - } - $105 = (($55) + ($91))|0; - $ch$011$us$i$us = 0; - while(1) { - $98 = (($mfbuf$i) + ($ch$011$us$i$us<<2)|0); - $99 = HEAP32[$98>>2]|0; - $i$010$us$i$us = 0; - while(1) { - $100 = (($i$010$us$i$us) + ($34))|0; - $101 = (($99) + ($100<<2)|0); - $102 = HEAP32[$101>>2]|0; - $103 = (($99) + ($i$010$us$i$us<<2)|0); - HEAP32[$103>>2] = $102; - $104 = (($i$010$us$i$us) + 1)|0; - $exitcond16 = ($104|0)==($105|0); - if ($exitcond16) { - break; - } else { - $i$010$us$i$us = $104; - } - } - $106 = (($ch$011$us$i$us) + 1)|0; - $exitcond17 = ($106|0)==($95|0); - if ($exitcond17) { - $$01$ph$i$us = $$lcssa;$$02$ph$i$us = $89;$in_buffer$sroa$0$0$ph$i$us = $$lcssa46;$in_buffer$sroa$4$0$ph$i$us = $$in_buffer$sroa$4$0$i$us$lcssa;$mp3size$0$ph$i$us = $90; - continue L65; - } else { - $ch$011$us$i$us = $106; - } - } - } - } else { - $$01$ph$i = $nsamples;$$02$ph$i = $39;$in_buffer$sroa$0$0$ph$i = $40;$in_buffer$sroa$4$0$ph$i = $41;$mp3size$0$ph$i = $37; - L45: while(1) { - $$01$i = $$01$ph$i;$in_buffer$sroa$0$0$i = $in_buffer$sroa$0$0$ph$i;$in_buffer$sroa$4$0$i = $in_buffer$sroa$4$0$ph$i; - while(1) { - $107 = ($$01$i|0)>(0); - if (!($107)) { - $$0$i3 = $mp3size$0$ph$i; - break L41; - } - HEAP32[$n_in$i>>2] = 0; - HEAP32[$n_out$i>>2] = 0; - HEAP32[$in_buffer_ptr$i>>2] = $in_buffer$sroa$0$0$i; - HEAP32[$47>>2] = $in_buffer$sroa$4$0$i; - _fill_buffer($4,$mfbuf$i,$in_buffer_ptr$i,$$01$i,$n_in$i,$n_out$i); - $108 = HEAP32[$48>>2]|0; - $109 = ($108|0)==(0); - if (!($109)) { - $110 = HEAP32[$52>>2]|0; - $111 = ($110|0)==(0); - if ($111) { - $112 = HEAP32[$53>>2]|0; - $113 = HEAP32[$50>>2]|0; - $114 = HEAP32[$mfbuf$i>>2]|0; - $115 = (($114) + ($113<<2)|0); - $116 = HEAP32[$46>>2]|0; - $117 = (($116) + ($113<<2)|0); - $118 = HEAP32[$n_out$i>>2]|0; - $119 = HEAP32[$49>>2]|0; - $120 = (_AnalyzeSamples(($112|0),($115|0),($117|0),($118|0),($119|0))|0); - $121 = ($120|0)==(0); - if ($121) { - $$0$i3 = -6; - break L41; - } - } - } - $122 = HEAP32[$n_in$i>>2]|0; - $123 = (($$01$i) - ($122))|0; - $124 = (($in_buffer$sroa$0$0$i) + ($122<<2)|0); - $125 = HEAP32[$49>>2]|0; - $126 = ($125|0)==(2); - $127 = (($in_buffer$sroa$4$0$i) + ($122<<2)|0); - $$in_buffer$sroa$4$0$i = $126 ? $127 : $in_buffer$sroa$4$0$i; - $128 = HEAP32[$n_out$i>>2]|0; - $129 = HEAP32[$50>>2]|0; - $130 = (($129) + ($128))|0; - HEAP32[$50>>2] = $130; - $131 = HEAP32[$51>>2]|0; - $132 = ($131|0)<(1); - if ($132) { - HEAP32[$51>>2] = 1728; - $134 = 1728; - } else { - $134 = $131; - } - $133 = (($134) + ($128))|0; - HEAP32[$51>>2] = $133; - $135 = ($130|0)<($43|0); - if ($135) { - $$01$i = $123;$in_buffer$sroa$0$0$i = $124;$in_buffer$sroa$4$0$i = $$in_buffer$sroa$4$0$i; - } else { - $$in_buffer$sroa$4$0$i$lcssa = $$in_buffer$sroa$4$0$i;$$lcssa48 = $123;$$lcssa49 = $124; - break; - } - } - $136 = (($mp3buf_size) - ($mp3size$0$ph$i))|0; - $137 = HEAP32[$mfbuf$i>>2]|0; - $138 = HEAP32[$46>>2]|0; - $139 = (_lame_encode_mp3_frame($4,$137,$138,$$02$ph$i,$136)|0); - $140 = ($139|0)<(0); - if ($140) { - $$0$i3 = $139; - break L41; - } - $141 = (($$02$ph$i) + ($139)|0); - $142 = (($139) + ($mp3size$0$ph$i))|0; - $143 = HEAP32[$50>>2]|0; - $144 = (($143) - ($34))|0; - HEAP32[$50>>2] = $144; - $145 = HEAP32[$51>>2]|0; - $146 = (($145) - ($34))|0; - HEAP32[$51>>2] = $146; - $147 = HEAP32[$49>>2]|0; - $148 = ($147|0)>(0); - $149 = ($144|0)>(0); - $or$cond$i = $149 & $148; - if (!($or$cond$i)) { - $$01$ph$i = $$lcssa48;$$02$ph$i = $141;$in_buffer$sroa$0$0$ph$i = $$lcssa49;$in_buffer$sroa$4$0$ph$i = $$in_buffer$sroa$4$0$i$lcssa;$mp3size$0$ph$i = $142; - continue; - } - $150 = (($55) + ($143))|0; - $ch$011$us$i = 0; - while(1) { - $158 = (($mfbuf$i) + ($ch$011$us$i<<2)|0); - $154 = HEAP32[$158>>2]|0; - $i$010$us$i = 0; - while(1) { - $152 = (($i$010$us$i) + ($34))|0; - $153 = (($154) + ($152<<2)|0); - $155 = HEAP32[$153>>2]|0; - $156 = (($154) + ($i$010$us$i<<2)|0); - HEAP32[$156>>2] = $155; - $157 = (($i$010$us$i) + 1)|0; - $exitcond = ($157|0)==($150|0); - if ($exitcond) { - break; - } else { - $i$010$us$i = $157; - } - } - $151 = (($ch$011$us$i) + 1)|0; - $exitcond15 = ($151|0)==($147|0); - if ($exitcond15) { - $$01$ph$i = $$lcssa48;$$02$ph$i = $141;$in_buffer$sroa$0$0$ph$i = $$lcssa49;$in_buffer$sroa$4$0$ph$i = $$in_buffer$sroa$4$0$i$lcssa;$mp3size$0$ph$i = $142; - continue L45; - } else { - $ch$011$us$i = $151; - } - } - } - } - } - } else { - $$0$i3 = -3; - } - } while(0); - $$0 = $$0$i3; - STACKTOP = sp;return ($$0|0); - } - } while(0); - $25 = ($24|0)==(0|0); - if (!($25)) { - _free($24); - } - HEAP32[$9>>2] = 0; - HEAP32[$$pre$phi$iZ2D>>2] = 0; - $26 = ((($4)) + 52148|0); - HEAP32[$26>>2] = 0; - _lame_errorf($4,7168,$vararg_buffer); - $$0 = -2; - STACKTOP = sp;return ($$0|0); -} -function _save_gain_values($gfc) { - $gfc = $gfc|0; - var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0; - var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0.0, $fabsf = 0.0, $fabsf1 = 0.0; - var $floorf = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 85680|0); - $1 = ((($gfc)) + 128|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(0); - do { - if (!($3)) { - $4 = ((($gfc)) + 85676|0); - $5 = HEAP32[$4>>2]|0; - $6 = (+_GetTitleGain(($5|0))); - $7 = $6; - $fabsf = (+Math_abs((+$6))); - $8 = $fabsf > 24601.0; - $9 = $6 + 24601.0; - $fabsf1 = (+Math_abs((+$9))); - $10 = $fabsf1; - if ($8) { - $11 = $fabsf; - $12 = $11 * 9.9999999747524271E-7; - $13 = !($10 <= $12); - if ($13) { - label = 5; - } else { - label = 6; - } - } else { - $14 = !($10 <= 0.024600999937888446); - if ($14) { - label = 5; - } else { - label = 6; - } - } - if ((label|0) == 5) { - $15 = $7 * 10.0; - $16 = $15 + 0.5; - $17 = (+Math_floor((+$16))); - $18 = (~~(($17))); - $19 = ((($gfc)) + 85688|0); - HEAP32[$19>>2] = $18; - break; - } - else if ((label|0) == 6) { - $20 = ((($gfc)) + 85688|0); - HEAP32[$20>>2] = 0; - break; - } - } - } while(0); - $21 = ((($gfc)) + 132|0); - $22 = HEAP32[$21>>2]|0; - $23 = ($22|0)==(0); - if ($23) { - return; - } - $24 = ((($gfc)) + 85684|0); - $25 = +HEAPF32[$24>>2]; - $26 = $25; - $27 = $26 * 3.0518509475997192E-5; - $28 = (+_log10($27)); - $29 = $28 * 200.0; - $30 = (+Math_ceil((+$29))); - $31 = (~~(($30))); - $32 = ((($gfc)) + 85692|0); - HEAP32[$32>>2] = $31; - $33 = ($31|0)>(0); - if ($33) { - $34 = 3276700.0 / $25; - $floorf = (+Math_floor((+$34))); - $35 = $floorf; - $36 = $35 * 0.01; - $37 = $36; - HEAPF32[$0>>2] = $37; - return; - } else { - HEAPF32[$0>>2] = -1.0; - return; - } -} -function _lame_copy_inbuffer($gfc,$l,$r,$nsamples,$pcm_type,$jump,$s) { - $gfc = $gfc|0; - $l = $l|0; - $r = $r|0; - $nsamples = $nsamples|0; - $pcm_type = $pcm_type|0; - $jump = $jump|0; - $s = +$s; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0.0, $60 = 0, $61 = 0, $62 = 0; - var $63 = 0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0.0, $8 = 0.0, $80 = 0.0; - var $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $bl$07 = 0, $bl1$010 = 0, $bl15$016 = 0, $bl22$020 = 0, $bl8$014 = 0, $br$06 = 0; - var $br16$017 = 0, $br2$09 = 0, $br23$021 = 0, $br9$013 = 0, $exitcond = 0, $exitcond24 = 0, $exitcond25 = 0, $exitcond26 = 0, $exitcond27 = 0, $i$05 = 0, $i10$012 = 0, $i17$018 = 0, $i24$022 = 0, $i3$08 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 52152|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($gfc)) + 52156|0); - $3 = HEAP32[$2>>2]|0; - $4 = ((($gfc)) + 264|0); - $5 = +HEAPF32[$4>>2]; - $6 = $5 * $s; - $7 = ((($gfc)) + 268|0); - $8 = +HEAPF32[$7>>2]; - $9 = $8 * $s; - $10 = ((($gfc)) + 272|0); - $11 = +HEAPF32[$10>>2]; - $12 = $11 * $s; - $13 = ((($gfc)) + 276|0); - $14 = +HEAPF32[$13>>2]; - $15 = $14 * $s; - switch ($pcm_type|0) { - case 4: { - $78 = ($nsamples|0)>(0); - if (!($78)) { - return; - } - $bl22$020 = $l;$br23$021 = $r;$i24$022 = 0; - while(1) { - $79 = +HEAPF64[$bl22$020>>3]; - $80 = $79; - $81 = +HEAPF64[$br23$021>>3]; - $82 = $81; - $83 = $80 * $6; - $84 = $82 * $9; - $85 = $84 + $83; - $86 = $80 * $12; - $87 = $82 * $15; - $88 = $87 + $86; - $89 = (($1) + ($i24$022<<2)|0); - HEAPF32[$89>>2] = $85; - $90 = (($3) + ($i24$022<<2)|0); - HEAPF32[$90>>2] = $88; - $91 = (($bl22$020) + ($jump<<3)|0); - $92 = (($br23$021) + ($jump<<3)|0); - $93 = (($i24$022) + 1)|0; - $exitcond27 = ($93|0)==($nsamples|0); - if ($exitcond27) { - break; - } else { - $bl22$020 = $91;$br23$021 = $92;$i24$022 = $93; - } - } - return; - break; - } - case 0: { - $16 = ($nsamples|0)>(0); - if (!($16)) { - return; - } - $bl$07 = $l;$br$06 = $r;$i$05 = 0; - while(1) { - $17 = HEAP16[$bl$07>>1]|0; - $18 = (+($17<<16>>16)); - $19 = HEAP16[$br$06>>1]|0; - $20 = (+($19<<16>>16)); - $21 = $18 * $6; - $22 = $20 * $9; - $23 = $22 + $21; - $24 = $18 * $12; - $25 = $20 * $15; - $26 = $25 + $24; - $27 = (($1) + ($i$05<<2)|0); - HEAPF32[$27>>2] = $23; - $28 = (($3) + ($i$05<<2)|0); - HEAPF32[$28>>2] = $26; - $29 = (($bl$07) + ($jump<<1)|0); - $30 = (($br$06) + ($jump<<1)|0); - $31 = (($i$05) + 1)|0; - $exitcond = ($31|0)==($nsamples|0); - if ($exitcond) { - break; - } else { - $bl$07 = $29;$br$06 = $30;$i$05 = $31; - } - } - return; - break; - } - case 3: { - $64 = ($nsamples|0)>(0); - if (!($64)) { - return; - } - $bl15$016 = $l;$br16$017 = $r;$i17$018 = 0; - while(1) { - $65 = +HEAPF32[$bl15$016>>2]; - $66 = +HEAPF32[$br16$017>>2]; - $67 = $65 * $6; - $68 = $66 * $9; - $69 = $68 + $67; - $70 = $65 * $12; - $71 = $66 * $15; - $72 = $71 + $70; - $73 = (($1) + ($i17$018<<2)|0); - HEAPF32[$73>>2] = $69; - $74 = (($3) + ($i17$018<<2)|0); - HEAPF32[$74>>2] = $72; - $75 = (($bl15$016) + ($jump<<2)|0); - $76 = (($br16$017) + ($jump<<2)|0); - $77 = (($i17$018) + 1)|0; - $exitcond26 = ($77|0)==($nsamples|0); - if ($exitcond26) { - break; - } else { - $bl15$016 = $75;$br16$017 = $76;$i17$018 = $77; - } - } - return; - break; - } - case 2: { - $48 = ($nsamples|0)>(0); - if (!($48)) { - return; - } - $bl8$014 = $l;$br9$013 = $r;$i10$012 = 0; - while(1) { - $49 = HEAP32[$bl8$014>>2]|0; - $50 = (+($49|0)); - $51 = HEAP32[$br9$013>>2]|0; - $52 = (+($51|0)); - $53 = $50 * $6; - $54 = $52 * $9; - $55 = $54 + $53; - $56 = $50 * $12; - $57 = $52 * $15; - $58 = $57 + $56; - $59 = (($1) + ($i10$012<<2)|0); - HEAPF32[$59>>2] = $55; - $60 = (($3) + ($i10$012<<2)|0); - HEAPF32[$60>>2] = $58; - $61 = (($bl8$014) + ($jump<<2)|0); - $62 = (($br9$013) + ($jump<<2)|0); - $63 = (($i10$012) + 1)|0; - $exitcond25 = ($63|0)==($nsamples|0); - if ($exitcond25) { - break; - } else { - $bl8$014 = $61;$br9$013 = $62;$i10$012 = $63; - } - } - return; - break; - } - case 1: { - $32 = ($nsamples|0)>(0); - if (!($32)) { - return; - } - $bl1$010 = $l;$br2$09 = $r;$i3$08 = 0; - while(1) { - $33 = HEAP32[$bl1$010>>2]|0; - $34 = (+($33|0)); - $35 = HEAP32[$br2$09>>2]|0; - $36 = (+($35|0)); - $37 = $34 * $6; - $38 = $36 * $9; - $39 = $38 + $37; - $40 = $34 * $12; - $41 = $36 * $15; - $42 = $41 + $40; - $43 = (($1) + ($i3$08<<2)|0); - HEAPF32[$43>>2] = $39; - $44 = (($3) + ($i3$08<<2)|0); - HEAPF32[$44>>2] = $42; - $45 = (($bl1$010) + ($jump<<2)|0); - $46 = (($br2$09) + ($jump<<2)|0); - $47 = (($i3$08) + 1)|0; - $exitcond24 = ($47|0)==($nsamples|0); - if ($exitcond24) { - break; - } else { - $bl1$010 = $45;$br2$09 = $46;$i3$08 = $47; - } - } - return; - break; - } - default: { - return; - } - } -} -function _mdct_sub48($gfc,$w0,$w1) { - $gfc = $gfc|0; - $w0 = $w0|0; - $w1 = $w1|0; - var $$ = 0, $$02$i = 0, $$lcssa = 0, $$neg11$i = 0.0, $$neg13$i = 0.0, $$neg3$i = 0.0, $$sum = 0, $$sum10 = 0, $$sum11 = 0, $$sum12 = 0, $$sum13 = 0, $$sum14 = 0, $$sum15 = 0, $$sum18$1 = 0, $$sum18$10 = 0, $$sum18$11 = 0, $$sum18$12 = 0, $$sum18$13 = 0, $$sum18$14 = 0, $$sum18$15 = 0; - var $$sum18$16 = 0, $$sum18$17 = 0, $$sum18$2 = 0, $$sum18$3 = 0, $$sum18$4 = 0, $$sum18$5 = 0, $$sum18$6 = 0, $$sum18$7 = 0, $$sum18$8 = 0, $$sum18$9 = 0, $$sum4 = 0, $$sum5 = 0, $$sum6 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0.0; - var $103 = 0.0, $104 = 0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0; - var $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0, $137 = 0.0, $138 = 0.0, $139 = 0.0; - var $14 = 0, $140 = 0, $141 = 0.0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0, $149 = 0.0, $15 = 0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0, $157 = 0.0; - var $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0.0, $162 = 0.0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0.0, $169 = 0, $17 = 0, $170 = 0, $171 = 0.0, $172 = 0.0, $173 = 0, $174 = 0, $175 = 0; - var $176 = 0.0, $177 = 0.0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0.0, $185 = 0.0, $186 = 0, $187 = 0.0, $188 = 0.0, $189 = 0, $19 = 0, $190 = 0, $191 = 0.0, $192 = 0.0, $193 = 0.0; - var $194 = 0.0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0.0, $202 = 0, $203 = 0, $204 = 0.0, $205 = 0.0, $206 = 0, $207 = 0, $208 = 0.0, $209 = 0.0, $21 = 0, $210 = 0.0; - var $211 = 0.0, $212 = 0, $213 = 0, $214 = 0, $215 = 0.0, $216 = 0.0, $217 = 0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0.0, $225 = 0.0, $226 = 0, $227 = 0.0, $228 = 0.0, $229 = 0.0; - var $23 = 0, $230 = 0.0, $231 = 0, $232 = 0.0, $233 = 0.0, $234 = 0.0, $235 = 0.0, $236 = 0.0, $237 = 0.0, $238 = 0.0, $239 = 0.0, $24 = 0, $240 = 0.0, $241 = 0.0, $242 = 0, $243 = 0.0, $244 = 0.0, $245 = 0, $246 = 0.0, $247 = 0.0; - var $248 = 0.0, $249 = 0.0, $25 = 0, $250 = 0.0, $251 = 0.0, $252 = 0.0, $253 = 0.0, $254 = 0.0, $255 = 0.0, $256 = 0.0, $257 = 0.0, $258 = 0.0, $259 = 0.0, $26 = 0, $260 = 0.0, $261 = 0.0, $262 = 0.0, $263 = 0.0, $264 = 0.0, $265 = 0.0; - var $266 = 0.0, $267 = 0.0, $268 = 0.0, $269 = 0.0, $27 = 0, $270 = 0.0, $271 = 0.0, $272 = 0.0, $273 = 0.0, $274 = 0.0, $275 = 0.0, $276 = 0.0, $277 = 0.0, $278 = 0.0, $279 = 0.0, $28 = 0, $280 = 0.0, $281 = 0.0, $282 = 0.0, $283 = 0.0; - var $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0.0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0.0, $293 = 0.0, $294 = 0, $295 = 0, $296 = 0.0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0.0; - var $301 = 0.0, $302 = 0.0, $303 = 0, $304 = 0.0, $305 = 0, $306 = 0.0, $307 = 0.0, $308 = 0, $309 = 0, $31 = 0, $310 = 0.0, $311 = 0, $312 = 0.0, $313 = 0.0, $314 = 0.0, $315 = 0, $316 = 0.0, $317 = 0.0, $318 = 0.0, $319 = 0; - var $32 = 0.0, $320 = 0.0, $321 = 0.0, $322 = 0, $323 = 0, $324 = 0.0, $325 = 0.0, $326 = 0.0, $327 = 0.0, $328 = 0.0, $329 = 0.0, $33 = 0.0, $330 = 0.0, $331 = 0.0, $332 = 0.0, $333 = 0.0, $334 = 0.0, $335 = 0.0, $336 = 0.0, $337 = 0.0; - var $338 = 0.0, $339 = 0.0, $34 = 0, $340 = 0.0, $341 = 0.0, $342 = 0.0, $343 = 0.0, $344 = 0.0, $345 = 0.0, $346 = 0.0, $347 = 0.0, $348 = 0.0, $349 = 0, $35 = 0.0, $350 = 0.0, $351 = 0.0, $352 = 0.0, $353 = 0.0, $354 = 0.0, $355 = 0.0; - var $356 = 0.0, $357 = 0.0, $358 = 0, $359 = 0.0, $36 = 0.0, $360 = 0, $361 = 0.0, $362 = 0.0, $363 = 0.0, $364 = 0.0, $365 = 0.0, $366 = 0.0, $367 = 0.0, $368 = 0.0, $369 = 0.0, $37 = 0, $370 = 0.0, $371 = 0.0, $372 = 0.0, $373 = 0.0; - var $374 = 0.0, $375 = 0.0, $376 = 0.0, $377 = 0.0, $378 = 0.0, $379 = 0.0, $38 = 0.0, $380 = 0.0, $381 = 0, $382 = 0.0, $383 = 0, $384 = 0.0, $385 = 0.0, $386 = 0.0, $387 = 0.0, $388 = 0.0, $389 = 0.0, $39 = 0.0, $390 = 0.0, $391 = 0.0; - var $392 = 0.0, $393 = 0.0, $394 = 0.0, $395 = 0.0, $396 = 0.0, $397 = 0, $398 = 0.0, $399 = 0, $4 = 0, $40 = 0, $400 = 0.0, $401 = 0.0, $402 = 0.0, $403 = 0.0, $404 = 0.0, $405 = 0.0, $406 = 0.0, $407 = 0.0, $408 = 0.0, $409 = 0.0; - var $41 = 0.0, $410 = 0.0, $411 = 0.0, $412 = 0.0, $413 = 0, $414 = 0.0, $415 = 0, $416 = 0.0, $417 = 0.0, $418 = 0.0, $419 = 0.0, $42 = 0.0, $420 = 0.0, $421 = 0.0, $422 = 0.0, $423 = 0.0, $424 = 0.0, $425 = 0.0, $426 = 0.0, $427 = 0.0; - var $428 = 0.0, $429 = 0.0, $43 = 0, $430 = 0.0, $431 = 0.0, $432 = 0.0, $433 = 0.0, $434 = 0.0, $435 = 0.0, $436 = 0.0, $437 = 0.0, $438 = 0.0, $439 = 0.0, $44 = 0.0, $440 = 0.0, $441 = 0.0, $442 = 0.0, $443 = 0.0, $444 = 0.0, $445 = 0.0; - var $446 = 0.0, $447 = 0.0, $448 = 0.0, $449 = 0, $45 = 0.0, $450 = 0.0, $451 = 0, $452 = 0.0, $453 = 0.0, $454 = 0.0, $455 = 0.0, $456 = 0.0, $457 = 0.0, $458 = 0.0, $459 = 0.0, $46 = 0, $460 = 0.0, $461 = 0.0, $462 = 0.0, $463 = 0.0; - var $464 = 0.0, $465 = 0.0, $466 = 0.0, $467 = 0.0, $468 = 0.0, $469 = 0.0, $47 = 0.0, $470 = 0.0, $471 = 0.0, $472 = 0, $473 = 0.0, $474 = 0, $475 = 0.0, $476 = 0.0, $477 = 0.0, $478 = 0.0, $479 = 0.0, $48 = 0.0, $480 = 0.0, $481 = 0.0; - var $482 = 0.0, $483 = 0.0, $484 = 0.0, $485 = 0.0, $486 = 0.0, $487 = 0.0, $488 = 0, $489 = 0.0, $49 = 0, $490 = 0, $491 = 0.0, $492 = 0.0, $493 = 0.0, $494 = 0.0, $495 = 0.0, $496 = 0.0, $497 = 0.0, $498 = 0.0, $499 = 0.0, $5 = 0; - var $50 = 0.0, $500 = 0.0, $501 = 0.0, $502 = 0.0, $503 = 0.0, $504 = 0, $505 = 0.0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0.0, $510 = 0.0, $511 = 0, $512 = 0.0, $513 = 0.0, $514 = 0, $515 = 0, $516 = 0.0, $517 = 0; - var $518 = 0.0, $519 = 0.0, $52 = 0, $520 = 0.0, $521 = 0.0, $522 = 0.0, $523 = 0.0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0.0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0; - var $536 = 0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0; - var $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0.0, $89 = 0.0; - var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $band$156 = 0, $ch$060 = 0, $exitcond = 0, $exitcond$i = 0, $exitcond69 = 0, $exitcond70 = 0, $exitcond71 = 0, $gr$058 = 0, $k$049 = 0; - var $k$252 = 0, $k$351 = 0, $k$453 = 0, $l$01$i = 0, $mdct_enc$054 = 0, $or$cond = 0, $or$cond3 = 0, $samp$047 = 0, $scevgep = 0, $w0$pn59 = 0, $wk$0 = 0, $wk$157 = 0, $wk$248 = 0, $work = 0, dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 80|0; - $work = sp; - $0 = ((($gfc)) + 72|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)>(0); - if (!($2)) { - STACKTOP = sp;return; - } - $3 = ((($gfc)) + 76|0); - $4 = ((($work)) + 68|0); - $5 = ((($work)) + 36|0); - $6 = ((($work)) + 60|0); - $7 = ((($work)) + 44|0); - $8 = ((($work)) + 56|0); - $9 = ((($work)) + 48|0); - $10 = ((($work)) + 32|0); - $11 = ((($work)) + 4|0); - $12 = ((($work)) + 28|0); - $13 = ((($work)) + 8|0); - $14 = ((($work)) + 24|0); - $15 = ((($work)) + 12|0); - $16 = ((($work)) + 20|0); - $17 = ((($work)) + 16|0); - $18 = ((($work)) + 64|0); - $19 = ((($work)) + 40|0); - $20 = ((($work)) + 52|0); - $ch$060 = 0;$w0$pn59 = $w0; - while(1) { - $21 = HEAP32[$3>>2]|0; - $22 = ($21|0)>(0); - if ($22) { - $wk$0 = ((($w0$pn59)) + 1144|0); - $gr$058 = 0;$wk$157 = $wk$0; - while(1) { - $23 = (1 - ($gr$058))|0; - $24 = ((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0); - $k$049 = 0;$samp$047 = $24;$wk$248 = $wk$157; - while(1) { - _window_subband($wk$248,$samp$047); - $28 = ((($wk$248)) + 128|0); - $29 = ((($samp$047)) + 128|0); - _window_subband($28,$29); - $30 = ((($samp$047)) + 256|0); - $31 = ((($samp$047)) + 132|0); - $32 = +HEAPF32[$31>>2]; - $33 = -$32; - HEAPF32[$31>>2] = $33; - $34 = ((($samp$047)) + 140|0); - $35 = +HEAPF32[$34>>2]; - $36 = -$35; - HEAPF32[$34>>2] = $36; - $37 = ((($samp$047)) + 148|0); - $38 = +HEAPF32[$37>>2]; - $39 = -$38; - HEAPF32[$37>>2] = $39; - $40 = ((($samp$047)) + 156|0); - $41 = +HEAPF32[$40>>2]; - $42 = -$41; - HEAPF32[$40>>2] = $42; - $43 = ((($samp$047)) + 164|0); - $44 = +HEAPF32[$43>>2]; - $45 = -$44; - HEAPF32[$43>>2] = $45; - $46 = ((($samp$047)) + 172|0); - $47 = +HEAPF32[$46>>2]; - $48 = -$47; - HEAPF32[$46>>2] = $48; - $49 = ((($samp$047)) + 180|0); - $50 = +HEAPF32[$49>>2]; - $51 = -$50; - HEAPF32[$49>>2] = $51; - $52 = ((($samp$047)) + 188|0); - $53 = +HEAPF32[$52>>2]; - $54 = -$53; - HEAPF32[$52>>2] = $54; - $55 = ((($samp$047)) + 196|0); - $56 = +HEAPF32[$55>>2]; - $57 = -$56; - HEAPF32[$55>>2] = $57; - $58 = ((($samp$047)) + 204|0); - $59 = +HEAPF32[$58>>2]; - $60 = -$59; - HEAPF32[$58>>2] = $60; - $61 = ((($samp$047)) + 212|0); - $62 = +HEAPF32[$61>>2]; - $63 = -$62; - HEAPF32[$61>>2] = $63; - $64 = ((($samp$047)) + 220|0); - $65 = +HEAPF32[$64>>2]; - $66 = -$65; - HEAPF32[$64>>2] = $66; - $67 = ((($samp$047)) + 228|0); - $68 = +HEAPF32[$67>>2]; - $69 = -$68; - HEAPF32[$67>>2] = $69; - $70 = ((($samp$047)) + 236|0); - $71 = +HEAPF32[$70>>2]; - $72 = -$71; - HEAPF32[$70>>2] = $72; - $73 = ((($samp$047)) + 244|0); - $74 = +HEAPF32[$73>>2]; - $75 = -$74; - HEAPF32[$73>>2] = $75; - $76 = ((($samp$047)) + 252|0); - $77 = +HEAPF32[$76>>2]; - $78 = -$77; - HEAPF32[$76>>2] = $78; - $79 = ((($wk$248)) + 256|0); - $80 = (($k$049) + 1)|0; - $exitcond = ($80|0)==(9); - if ($exitcond) { - break; - } else { - $k$049 = $80;$samp$047 = $30;$wk$248 = $79; - } - } - $25 = ((((($gfc)) + 304|0) + (($gr$058*10504)|0)|0) + (($ch$060*5252)|0)|0); - $26 = ((((((($gfc)) + 304|0) + (($gr$058*10504)|0)|0) + (($ch$060*5252)|0)|0)) + 4788|0); - $27 = ((((((($gfc)) + 304|0) + (($gr$058*10504)|0)|0) + (($ch$060*5252)|0)|0)) + 4792|0); - $band$156 = 0;$mdct_enc$054 = $25; - while(1) { - $81 = HEAP32[$26>>2]|0; - $82 = (7208 + ($band$156<<2)|0); - $83 = HEAP32[$82>>2]|0; - $84 = HEAP32[$27>>2]|0; - $85 = ($84|0)!=(0); - $86 = ($band$156|0)<(2); - $or$cond = $86 & $85; - $$ = $or$cond ? 0 : $81; - $87 = (((($gfc)) + 37040|0) + ($band$156<<2)|0); - $88 = +HEAPF32[$87>>2]; - $89 = $88; - $90 = $89 < 9.9999999999999998E-13; - do { - if ($90) { - dest=$mdct_enc$054; stop=dest+72|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - } else { - $91 = $88 < 1.0; - if ($91) { - $92 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($83<<2)|0); - $93 = +HEAPF32[$92>>2]; - $94 = $93 * $88; - HEAPF32[$92>>2] = $94; - $95 = +HEAPF32[$87>>2]; - $$sum18$1 = (($83) + 32)|0; - $96 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$1<<2)|0); - $97 = +HEAPF32[$96>>2]; - $98 = $97 * $95; - HEAPF32[$96>>2] = $98; - $99 = +HEAPF32[$87>>2]; - $$sum18$2 = (($83) + 64)|0; - $100 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$2<<2)|0); - $101 = +HEAPF32[$100>>2]; - $102 = $101 * $99; - HEAPF32[$100>>2] = $102; - $103 = +HEAPF32[$87>>2]; - $$sum18$3 = (($83) + 96)|0; - $104 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$3<<2)|0); - $105 = +HEAPF32[$104>>2]; - $106 = $105 * $103; - HEAPF32[$104>>2] = $106; - $107 = +HEAPF32[$87>>2]; - $$sum18$4 = (($83) + 128)|0; - $108 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$4<<2)|0); - $109 = +HEAPF32[$108>>2]; - $110 = $109 * $107; - HEAPF32[$108>>2] = $110; - $111 = +HEAPF32[$87>>2]; - $$sum18$5 = (($83) + 160)|0; - $112 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$5<<2)|0); - $113 = +HEAPF32[$112>>2]; - $114 = $113 * $111; - HEAPF32[$112>>2] = $114; - $115 = +HEAPF32[$87>>2]; - $$sum18$6 = (($83) + 192)|0; - $116 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$6<<2)|0); - $117 = +HEAPF32[$116>>2]; - $118 = $117 * $115; - HEAPF32[$116>>2] = $118; - $119 = +HEAPF32[$87>>2]; - $$sum18$7 = (($83) + 224)|0; - $120 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$7<<2)|0); - $121 = +HEAPF32[$120>>2]; - $122 = $121 * $119; - HEAPF32[$120>>2] = $122; - $123 = +HEAPF32[$87>>2]; - $$sum18$8 = (($83) + 256)|0; - $124 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$8<<2)|0); - $125 = +HEAPF32[$124>>2]; - $126 = $125 * $123; - HEAPF32[$124>>2] = $126; - $127 = +HEAPF32[$87>>2]; - $$sum18$9 = (($83) + 288)|0; - $128 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$9<<2)|0); - $129 = +HEAPF32[$128>>2]; - $130 = $129 * $127; - HEAPF32[$128>>2] = $130; - $131 = +HEAPF32[$87>>2]; - $$sum18$10 = (($83) + 320)|0; - $132 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$10<<2)|0); - $133 = +HEAPF32[$132>>2]; - $134 = $133 * $131; - HEAPF32[$132>>2] = $134; - $135 = +HEAPF32[$87>>2]; - $$sum18$11 = (($83) + 352)|0; - $136 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$11<<2)|0); - $137 = +HEAPF32[$136>>2]; - $138 = $137 * $135; - HEAPF32[$136>>2] = $138; - $139 = +HEAPF32[$87>>2]; - $$sum18$12 = (($83) + 384)|0; - $140 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$12<<2)|0); - $141 = +HEAPF32[$140>>2]; - $142 = $141 * $139; - HEAPF32[$140>>2] = $142; - $143 = +HEAPF32[$87>>2]; - $$sum18$13 = (($83) + 416)|0; - $144 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$13<<2)|0); - $145 = +HEAPF32[$144>>2]; - $146 = $145 * $143; - HEAPF32[$144>>2] = $146; - $147 = +HEAPF32[$87>>2]; - $$sum18$14 = (($83) + 448)|0; - $148 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$14<<2)|0); - $149 = +HEAPF32[$148>>2]; - $150 = $149 * $147; - HEAPF32[$148>>2] = $150; - $151 = +HEAPF32[$87>>2]; - $$sum18$15 = (($83) + 480)|0; - $152 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$15<<2)|0); - $153 = +HEAPF32[$152>>2]; - $154 = $153 * $151; - HEAPF32[$152>>2] = $154; - $155 = +HEAPF32[$87>>2]; - $$sum18$16 = (($83) + 512)|0; - $156 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$16<<2)|0); - $157 = +HEAPF32[$156>>2]; - $158 = $157 * $155; - HEAPF32[$156>>2] = $158; - $159 = +HEAPF32[$87>>2]; - $$sum18$17 = (($83) + 544)|0; - $160 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum18$17<<2)|0); - $161 = +HEAPF32[$160>>2]; - $162 = $161 * $159; - HEAPF32[$160>>2] = $162; - } - $163 = ($$|0)==(2); - if ($163) { - $164 = (($83) + 288)|0; - $165 = (($83) + 480)|0; - $k$252 = -3; - while(1) { - $166 = (($k$252) + 3)|0; - $167 = (7624 + ($166<<2)|0); - $168 = +HEAPF32[$167>>2]; - $169 = $k$252 << 5; - $$sum10 = (($164) + ($169))|0; - $170 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($gr$058*2304)|0)|0) + ($$sum10<<2)|0); - $171 = +HEAPF32[$170>>2]; - $172 = $171 * $168; - $173 = (8 - ($k$252))|0; - $174 = $173 << 5; - $$sum11 = (($174) + ($83))|0; - $175 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($gr$058*2304)|0)|0) + ($$sum11<<2)|0); - $176 = +HEAPF32[$175>>2]; - $177 = $172 - $176; - $178 = ($k$252*3)|0; - $179 = (($178) + 9)|0; - $180 = (($mdct_enc$054) + ($179<<2)|0); - HEAPF32[$180>>2] = $177; - $181 = (14 - ($k$252))|0; - $182 = $181 << 5; - $$sum12 = (($182) + ($83))|0; - $183 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($gr$058*2304)|0)|0) + ($$sum12<<2)|0); - $184 = +HEAPF32[$183>>2]; - $185 = $184 * $168; - $$sum13 = (($165) + ($169))|0; - $186 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($gr$058*2304)|0)|0) + ($$sum13<<2)|0); - $187 = +HEAPF32[$186>>2]; - $188 = $185 + $187; - $189 = (($178) + 18)|0; - $190 = (($mdct_enc$054) + ($189<<2)|0); - HEAPF32[$190>>2] = $188; - $191 = +HEAPF32[$186>>2]; - $192 = $191 * $168; - $193 = +HEAPF32[$183>>2]; - $194 = $192 - $193; - $195 = (($178) + 10)|0; - $196 = (($mdct_enc$054) + ($195<<2)|0); - HEAPF32[$196>>2] = $194; - $197 = (2 - ($k$252))|0; - $198 = $197 << 5; - $$sum14 = (($198) + ($83))|0; - $199 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum14<<2)|0); - $200 = +HEAPF32[$199>>2]; - $201 = $200 * $168; - $202 = $166 << 5; - $$sum15 = (($202) + ($83))|0; - $203 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum15<<2)|0); - $204 = +HEAPF32[$203>>2]; - $205 = $201 + $204; - $206 = (($178) + 19)|0; - $207 = (($mdct_enc$054) + ($206<<2)|0); - HEAPF32[$207>>2] = $205; - $208 = +HEAPF32[$203>>2]; - $209 = $208 * $168; - $210 = +HEAPF32[$199>>2]; - $211 = $209 - $210; - $212 = (($178) + 11)|0; - $213 = (($mdct_enc$054) + ($212<<2)|0); - HEAPF32[$213>>2] = $211; - $214 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum11<<2)|0); - $215 = +HEAPF32[$214>>2]; - $216 = $215 * $168; - $217 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum10<<2)|0); - $218 = +HEAPF32[$217>>2]; - $219 = $216 + $218; - $220 = (($178) + 20)|0; - $221 = (($mdct_enc$054) + ($220<<2)|0); - HEAPF32[$221>>2] = $219; - $222 = (($k$252) + 1)|0; - $exitcond70 = ($222|0)==(0); - if ($exitcond70) { - $$02$i = $mdct_enc$054;$l$01$i = 0; - break; - } else { - $k$252 = $222; - } - } - while(1) { - $223 = ((($$02$i)) + 24|0); - $224 = +HEAPF32[$223>>2]; - $225 = $224 * 0.13165250420570374; - $226 = ((($$02$i)) + 60|0); - $227 = +HEAPF32[$226>>2]; - $228 = $225 - $227; - $229 = +HEAPF32[$$02$i>>2]; - $230 = $229 * 0.76732701063156128; - $231 = ((($$02$i)) + 36|0); - $232 = +HEAPF32[$231>>2]; - $233 = $230 - $232; - $234 = $233 + $228; - $235 = $228 - $233; - $236 = $227 * 0.13165250420570374; - $237 = $236 + $224; - $238 = $232 * 0.76732701063156128; - $239 = $238 + $229; - $240 = $239 + $237; - $241 = $239 - $237; - $242 = ((($$02$i)) + 12|0); - $243 = +HEAPF32[$242>>2]; - $244 = $243 * 0.41421356797218323; - $245 = ((($$02$i)) + 48|0); - $246 = +HEAPF32[$245>>2]; - $247 = $244 - $246; - $248 = $247; - $249 = $248 * 2.0699781119530891E-11; - $250 = $249; - $251 = $246 * 0.41421356797218323; - $252 = $251 + $243; - $253 = $252; - $254 = $253 * 2.0699781119530891E-11; - $255 = $254; - $256 = $234; - $257 = $256 * 1.9075251917372799E-11; - $258 = $250; - $259 = $258 + $257; - $260 = $259; - HEAPF32[$$02$i>>2] = $260; - $261 = -$240; - $262 = $261; - $263 = $262 * 1.9075251917372799E-11; - $264 = $255; - $265 = $264 + $263; - $266 = $265; - HEAPF32[$226>>2] = $266; - $267 = $235; - $268 = $267 * 1.6519652744032674E-11; - $269 = $268; - $270 = $240; - $271 = $270 * 9.5376259586864042E-12; - $272 = $264 + $271; - $273 = $272; - $274 = $269 - $273; - HEAPF32[$242>>2] = $274; - $275 = $273 + $269; - HEAPF32[$223>>2] = $275; - $276 = $256 * 9.5376259586864042E-12; - $277 = $276 - $258; - $278 = $277; - $279 = $241; - $280 = $279 * 1.6519652744032674E-11; - $281 = $280; - $282 = $278 + $281; - HEAPF32[$231>>2] = $282; - $283 = $278 - $281; - HEAPF32[$245>>2] = $283; - $284 = ((($$02$i)) + 4|0); - $285 = (($l$01$i) + 1)|0; - $exitcond$i = ($285|0)==(3); - if ($exitcond$i) { - break; - } else { - $$02$i = $284;$l$01$i = $285; - } - } - } else { - $k$351 = -9; - while(1) { - $286 = (($k$351) + 27)|0; - $287 = ((7336 + (($$*144)|0)|0) + ($286<<2)|0); - $288 = +HEAPF32[$287>>2]; - $289 = (($k$351) + 9)|0; - $290 = $289 << 5; - $$sum5 = (($290) + ($83))|0; - $291 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum5<<2)|0); - $292 = +HEAPF32[$291>>2]; - $293 = $292 * $288; - $294 = (($k$351) + 36)|0; - $295 = ((7336 + (($$*144)|0)|0) + ($294<<2)|0); - $296 = +HEAPF32[$295>>2]; - $297 = (8 - ($k$351))|0; - $298 = $297 << 5; - $$sum6 = (($298) + ($83))|0; - $299 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($23*2304)|0)|0) + ($$sum6<<2)|0); - $300 = +HEAPF32[$299>>2]; - $301 = $300 * $296; - $302 = $301 + $293; - $303 = ((7336 + (($$*144)|0)|0) + ($289<<2)|0); - $304 = +HEAPF32[$303>>2]; - $305 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($gr$058*2304)|0)|0) + ($$sum5<<2)|0); - $306 = +HEAPF32[$305>>2]; - $307 = $306 * $304; - $308 = (($k$351) + 18)|0; - $309 = ((7336 + (($$*144)|0)|0) + ($308<<2)|0); - $310 = +HEAPF32[$309>>2]; - $311 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0) + (($gr$058*2304)|0)|0) + ($$sum6<<2)|0); - $312 = +HEAPF32[$311>>2]; - $313 = $312 * $310; - $314 = $307 - $313; - $$sum9 = (($k$351) + 12)|0; - $315 = (7624 + ($$sum9<<2)|0); - $316 = +HEAPF32[$315>>2]; - $317 = $314 * $316; - $318 = $302 - $317; - $319 = (($work) + ($289<<2)|0); - HEAPF32[$319>>2] = $318; - $320 = $316 * $302; - $321 = $320 + $314; - $322 = (($work) + ($308<<2)|0); - HEAPF32[$322>>2] = $321; - $323 = (($k$351) + 1)|0; - $exitcond69 = ($323|0)==(0); - if ($exitcond69) { - break; - } else { - $k$351 = $323; - } - } - $324 = +HEAPF32[$4>>2]; - $325 = +HEAPF32[$5>>2]; - $326 = $324 - $325; - $327 = +HEAPF32[$6>>2]; - $328 = +HEAPF32[$7>>2]; - $329 = $327 - $328; - $330 = +HEAPF32[$8>>2]; - $331 = +HEAPF32[$9>>2]; - $332 = $330 - $331; - $333 = +HEAPF32[$work>>2]; - $334 = +HEAPF32[$10>>2]; - $335 = $334 + $333; - $336 = +HEAPF32[$11>>2]; - $337 = +HEAPF32[$12>>2]; - $338 = $337 + $336; - $339 = +HEAPF32[$13>>2]; - $340 = +HEAPF32[$14>>2]; - $341 = $340 + $339; - $342 = +HEAPF32[$15>>2]; - $343 = +HEAPF32[$16>>2]; - $344 = $343 + $342; - $345 = $341 + $335; - $346 = $345 - $344; - $347 = +HEAPF32[$17>>2]; - $$neg3$i = $347 - $338; - $348 = $$neg3$i + $346; - $349 = ((($mdct_enc$054)) + 68|0); - HEAPF32[$349>>2] = $348; - $350 = $346 * 0.5; - $351 = +HEAPF32[$17>>2]; - $352 = $338 - $351; - $353 = $350 + $352; - $354 = $326 - $329; - $355 = $354 - $332; - $356 = $355 * 0.86602538824081421; - $357 = $353 + $356; - $358 = ((($mdct_enc$054)) + 20|0); - HEAPF32[$358>>2] = $357; - $359 = $356 - $353; - $360 = ((($mdct_enc$054)) + 24|0); - HEAPF32[$360>>2] = $359; - $361 = +HEAPF32[$18>>2]; - $362 = +HEAPF32[$19>>2]; - $363 = $361 - $362; - $364 = $363 * 0.86602538824081421; - $365 = $338 * 0.5; - $366 = +HEAPF32[$17>>2]; - $367 = $366 + $365; - $368 = $326 * 0.98480772972106933; - $369 = $329 * 0.6427876353263855; - $370 = $332 * 0.34202015399932861; - $371 = $369 + $368; - $372 = $371 + $370; - $373 = $372 + $364; - $374 = $335 * 0.1736481785774231; - $375 = $341 * 0.76604443788528442; - $376 = $344 * 0.93969261646270751; - $377 = $375 + $374; - $378 = $377 + $376; - $379 = $378 + $367; - $380 = $373 + $379; - $381 = ((($mdct_enc$054)) + 4|0); - HEAPF32[$381>>2] = $380; - $382 = $373 - $379; - $383 = ((($mdct_enc$054)) + 8|0); - HEAPF32[$383>>2] = $382; - $384 = $326 * 0.6427876353263855; - $385 = $329 * 0.34202015399932861; - $386 = $332 * 0.98480772972106933; - $387 = $384 - $385; - $388 = $387 + $386; - $389 = $388 - $364; - $390 = $335 * 0.76604443788528442; - $391 = $341 * 0.93969261646270751; - $392 = $344 * 0.1736481785774231; - $393 = $390 - $391; - $394 = $393 - $392; - $395 = $394 + $367; - $396 = $389 + $395; - $397 = ((($mdct_enc$054)) + 36|0); - HEAPF32[$397>>2] = $396; - $398 = $389 - $395; - $399 = ((($mdct_enc$054)) + 40|0); - HEAPF32[$399>>2] = $398; - $400 = $326 * 0.34202015399932861; - $401 = $329 * 0.98480772972106933; - $402 = $332 * 0.6427876353263855; - $403 = $401 + $400; - $404 = $403 - $402; - $405 = $404 - $364; - $406 = $335 * 0.93969261646270751; - $407 = $341 * 0.1736481785774231; - $408 = $344 * 0.76604443788528442; - $409 = $406 - $407; - $410 = $409 + $408; - $411 = $410 - $367; - $412 = $411 + $405; - $413 = ((($mdct_enc$054)) + 52|0); - HEAPF32[$413>>2] = $412; - $414 = $405 - $411; - $415 = ((($mdct_enc$054)) + 56|0); - HEAPF32[$415>>2] = $414; - $416 = +HEAPF32[$10>>2]; - $417 = +HEAPF32[$work>>2]; - $418 = $416 - $417; - $419 = +HEAPF32[$14>>2]; - $420 = +HEAPF32[$13>>2]; - $421 = $419 - $420; - $422 = +HEAPF32[$16>>2]; - $423 = +HEAPF32[$15>>2]; - $424 = $422 - $423; - $425 = +HEAPF32[$4>>2]; - $426 = +HEAPF32[$5>>2]; - $427 = $426 + $425; - $428 = +HEAPF32[$18>>2]; - $429 = +HEAPF32[$19>>2]; - $430 = $429 + $428; - $431 = +HEAPF32[$6>>2]; - $432 = +HEAPF32[$7>>2]; - $433 = $432 + $431; - $434 = +HEAPF32[$8>>2]; - $435 = +HEAPF32[$9>>2]; - $436 = $435 + $434; - $437 = $433 + $427; - $438 = $437 + $436; - $439 = +HEAPF32[$20>>2]; - $440 = $439 + $430; - $441 = $440 + $438; - HEAPF32[$mdct_enc$054>>2] = $441; - $442 = $438 * 0.5; - $443 = +HEAPF32[$20>>2]; - $$neg11$i = -$430; - $$neg13$i = $$neg11$i - $443; - $444 = $$neg13$i + $442; - $445 = $418 - $421; - $446 = $445 + $424; - $447 = $446 * 0.86602538824081421; - $448 = $444 + $447; - $449 = ((($mdct_enc$054)) + 44|0); - HEAPF32[$449>>2] = $448; - $450 = $444 - $447; - $451 = ((($mdct_enc$054)) + 48|0); - HEAPF32[$451>>2] = $450; - $452 = +HEAPF32[$12>>2]; - $453 = +HEAPF32[$11>>2]; - $454 = $452 - $453; - $455 = $454 * 0.86602538824081421; - $456 = +HEAPF32[$20>>2]; - $457 = $430 * 0.5; - $458 = $456 - $457; - $459 = $427 * 0.93969261646270751; - $460 = $433 * 0.1736481785774231; - $461 = $436 * 0.76604443788528442; - $462 = $459 - $460; - $463 = $462 - $461; - $464 = $463 - $458; - $465 = $418 * 0.34202015399932861; - $466 = $421 * 0.98480772972106933; - $467 = $424 * 0.6427876353263855; - $468 = $466 + $465; - $469 = $468 + $467; - $470 = $469 + $455; - $471 = $464 + $470; - $472 = ((($mdct_enc$054)) + 12|0); - HEAPF32[$472>>2] = $471; - $473 = $464 - $470; - $474 = ((($mdct_enc$054)) + 16|0); - HEAPF32[$474>>2] = $473; - $475 = $427 * 0.76604443788528442; - $476 = $433 * 0.93969261646270751; - $477 = $436 * 0.1736481785774231; - $478 = $475 - $476; - $479 = $478 + $477; - $480 = $479 + $458; - $481 = $418 * 0.6427876353263855; - $482 = $421 * 0.34202015399932861; - $483 = $424 * 0.98480772972106933; - $484 = $481 - $482; - $485 = $484 - $483; - $486 = $485 + $455; - $487 = $480 + $486; - $488 = ((($mdct_enc$054)) + 28|0); - HEAPF32[$488>>2] = $487; - $489 = $480 - $486; - $490 = ((($mdct_enc$054)) + 32|0); - HEAPF32[$490>>2] = $489; - $491 = $427 * 0.1736481785774231; - $492 = $433 * 0.76604443788528442; - $493 = $436 * 0.93969261646270751; - $494 = $492 + $491; - $495 = $494 - $493; - $496 = $495 + $458; - $497 = $418 * 0.98480772972106933; - $498 = $421 * 0.6427876353263855; - $499 = $424 * 0.34202015399932861; - $500 = $498 + $497; - $501 = $500 - $499; - $502 = $501 - $455; - $503 = $496 + $502; - $504 = ((($mdct_enc$054)) + 60|0); - HEAPF32[$504>>2] = $503; - $505 = $496 - $502; - $506 = ((($mdct_enc$054)) + 64|0); - HEAPF32[$506>>2] = $505; - break; - } - } - } while(0); - $507 = ($$|0)!=(2); - $508 = ($band$156|0)!=(0); - $or$cond3 = $508 & $507; - if ($or$cond3) { - $k$453 = 7; - while(1) { - $509 = (($mdct_enc$054) + ($k$453<<2)|0); - $510 = +HEAPF32[$509>>2]; - $$sum = (($k$453) + 20)|0; - $511 = (7624 + ($$sum<<2)|0); - $512 = +HEAPF32[$511>>2]; - $513 = $512 * $510; - $514 = $k$453 ^ -1; - $515 = (($mdct_enc$054) + ($514<<2)|0); - $516 = +HEAPF32[$515>>2]; - $$sum4 = (($k$453) + 28)|0; - $517 = (7624 + ($$sum4<<2)|0); - $518 = +HEAPF32[$517>>2]; - $519 = $518 * $516; - $520 = $519 + $513; - $521 = $518 * $510; - $522 = $516 * $512; - $523 = $521 - $522; - HEAPF32[$515>>2] = $520; - HEAPF32[$509>>2] = $523; - $524 = (($k$453) + -1)|0; - $525 = ($k$453|0)>(0); - if ($525) { - $k$453 = $524; - } else { - break; - } - } - } - $526 = (($band$156) + 1)|0; - $527 = ((($mdct_enc$054)) + 72|0); - $exitcond71 = ($526|0)==(32); - if ($exitcond71) { - break; - } else { - $band$156 = $526;$mdct_enc$054 = $527; - } - } - $scevgep = ((($wk$157)) + 2304|0); - $528 = (($gr$058) + 1)|0; - $529 = HEAP32[$3>>2]|0; - $530 = ($528|0)<($529|0); - if ($530) { - $gr$058 = $528;$wk$157 = $scevgep; - } else { - $$lcssa = $529; - break; - } - } - $531 = ($$lcssa|0)==(1); - if ($531) { - $532 = (((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0); - $533 = (((((($gfc)) + 27824|0) + (($ch$060*4608)|0)|0)) + 2304|0); - _memcpy(($532|0),($533|0),2304)|0; - } - } - $534 = (($ch$060) + 1)|0; - $535 = HEAP32[$0>>2]|0; - $536 = ($534|0)<($535|0); - if ($536) { - $ch$060 = $534;$w0$pn59 = $w1; - } else { - break; - } - } - STACKTOP = sp;return; -} -function _window_subband($x1,$a) { - $x1 = $x1|0; - $a = $a|0; - var $$015 = 0, $0 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0; - var $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0.0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0, $127 = 0.0, $128 = 0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0.0, $132 = 0; - var $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0, $137 = 0.0, $138 = 0, $139 = 0.0, $14 = 0.0, $140 = 0.0, $141 = 0.0, $142 = 0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0, $147 = 0.0, $148 = 0, $149 = 0.0, $15 = 0, $150 = 0.0; - var $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0.0, $160 = 0.0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0, $169 = 0; - var $17 = 0.0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0.0, $175 = 0.0, $176 = 0, $177 = 0.0, $178 = 0.0, $179 = 0, $18 = 0.0, $180 = 0.0, $181 = 0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0, $187 = 0.0; - var $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0, $191 = 0.0, $192 = 0, $193 = 0.0, $194 = 0.0, $195 = 0.0, $196 = 0.0, $197 = 0, $198 = 0.0, $199 = 0.0, $2 = 0.0, $20 = 0.0, $200 = 0.0, $201 = 0, $202 = 0.0, $203 = 0, $204 = 0.0; - var $205 = 0.0, $206 = 0.0, $207 = 0.0, $208 = 0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0, $213 = 0.0, $214 = 0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0, $22 = 0.0, $220 = 0.0, $221 = 0.0, $222 = 0.0; - var $223 = 0, $224 = 0.0, $225 = 0, $226 = 0.0, $227 = 0.0, $228 = 0.0, $229 = 0.0, $23 = 0.0, $230 = 0, $231 = 0.0, $232 = 0.0, $233 = 0.0, $234 = 0, $235 = 0.0, $236 = 0, $237 = 0.0, $238 = 0.0, $239 = 0.0, $24 = 0.0, $240 = 0.0; - var $241 = 0, $242 = 0.0, $243 = 0.0, $244 = 0.0, $245 = 0, $246 = 0.0, $247 = 0, $248 = 0.0, $249 = 0.0, $25 = 0, $250 = 0.0, $251 = 0.0, $252 = 0, $253 = 0.0, $254 = 0.0, $255 = 0.0, $256 = 0.0, $257 = 0, $258 = 0.0, $259 = 0; - var $26 = 0.0, $260 = 0.0, $261 = 0.0, $262 = 0.0, $263 = 0, $264 = 0.0, $265 = 0, $266 = 0.0, $267 = 0.0, $268 = 0, $269 = 0.0, $27 = 0.0, $270 = 0.0, $271 = 0.0, $272 = 0.0, $273 = 0.0, $274 = 0, $275 = 0.0, $276 = 0, $277 = 0.0; - var $278 = 0.0, $279 = 0.0, $28 = 0.0, $280 = 0.0, $281 = 0, $282 = 0.0, $283 = 0, $284 = 0.0, $285 = 0.0, $286 = 0.0, $287 = 0.0, $288 = 0, $289 = 0.0, $29 = 0, $290 = 0, $291 = 0.0, $292 = 0.0, $293 = 0.0, $294 = 0.0, $295 = 0; - var $296 = 0.0, $297 = 0, $298 = 0.0, $299 = 0.0, $3 = 0, $30 = 0.0, $300 = 0.0, $301 = 0.0, $302 = 0, $303 = 0.0, $304 = 0, $305 = 0.0, $306 = 0.0, $307 = 0.0, $308 = 0.0, $309 = 0, $31 = 0, $310 = 0.0, $311 = 0, $312 = 0.0; - var $313 = 0.0, $314 = 0.0, $315 = 0.0, $316 = 0.0, $317 = 0.0, $318 = 0, $319 = 0.0, $32 = 0.0, $320 = 0, $321 = 0.0, $322 = 0.0, $323 = 0.0, $324 = 0.0, $325 = 0.0, $326 = 0.0, $327 = 0.0, $328 = 0.0, $329 = 0.0, $33 = 0.0, $330 = 0.0; - var $331 = 0.0, $332 = 0.0, $333 = 0.0, $334 = 0.0, $335 = 0.0, $336 = 0.0, $337 = 0.0, $338 = 0.0, $339 = 0.0, $34 = 0.0, $340 = 0, $341 = 0.0, $342 = 0, $343 = 0.0, $344 = 0.0, $345 = 0.0, $346 = 0.0, $347 = 0, $348 = 0.0, $349 = 0; - var $35 = 0, $350 = 0.0, $351 = 0.0, $352 = 0.0, $353 = 0.0, $354 = 0, $355 = 0.0, $356 = 0, $357 = 0.0, $358 = 0.0, $359 = 0.0, $36 = 0.0, $360 = 0.0, $361 = 0, $362 = 0.0, $363 = 0, $364 = 0.0, $365 = 0.0, $366 = 0.0, $367 = 0.0; - var $368 = 0, $369 = 0.0, $37 = 0.0, $370 = 0, $371 = 0.0, $372 = 0.0, $373 = 0.0, $374 = 0.0, $375 = 0, $376 = 0.0, $377 = 0, $378 = 0.0, $379 = 0.0, $38 = 0.0, $380 = 0.0, $381 = 0.0, $382 = 0.0, $383 = 0.0, $384 = 0.0, $385 = 0.0; - var $386 = 0.0, $387 = 0.0, $388 = 0.0, $389 = 0.0, $39 = 0, $390 = 0.0, $391 = 0.0, $392 = 0.0, $393 = 0.0, $394 = 0.0, $395 = 0.0, $396 = 0.0, $397 = 0.0, $398 = 0.0, $399 = 0.0, $4 = 0.0, $40 = 0.0, $400 = 0.0, $401 = 0.0, $402 = 0.0; - var $403 = 0.0, $404 = 0.0, $405 = 0.0, $406 = 0.0, $407 = 0.0, $408 = 0.0, $409 = 0.0, $41 = 0, $410 = 0.0, $411 = 0.0, $412 = 0.0, $413 = 0.0, $414 = 0.0, $415 = 0.0, $416 = 0.0, $417 = 0.0, $418 = 0.0, $419 = 0.0, $42 = 0.0, $420 = 0.0; - var $421 = 0.0, $422 = 0.0, $423 = 0.0, $424 = 0.0, $425 = 0.0, $426 = 0.0, $427 = 0.0, $428 = 0.0, $429 = 0.0, $43 = 0.0, $430 = 0.0, $431 = 0.0, $432 = 0.0, $433 = 0.0, $434 = 0.0, $435 = 0.0, $436 = 0.0, $437 = 0.0, $438 = 0.0, $439 = 0.0; - var $44 = 0.0, $440 = 0.0, $441 = 0.0, $442 = 0.0, $443 = 0.0, $444 = 0.0, $445 = 0.0, $446 = 0.0, $447 = 0.0, $448 = 0.0, $449 = 0.0, $45 = 0, $450 = 0.0, $451 = 0.0, $452 = 0.0, $453 = 0.0, $454 = 0.0, $455 = 0.0, $456 = 0.0, $457 = 0.0; - var $458 = 0.0, $459 = 0.0, $46 = 0.0, $460 = 0.0, $461 = 0.0, $462 = 0.0, $463 = 0.0, $464 = 0.0, $465 = 0.0, $466 = 0.0, $467 = 0.0, $468 = 0.0, $469 = 0.0, $47 = 0.0, $470 = 0.0, $471 = 0.0, $472 = 0.0, $473 = 0.0, $474 = 0.0, $475 = 0.0; - var $476 = 0.0, $477 = 0.0, $478 = 0.0, $479 = 0.0, $48 = 0.0, $480 = 0.0, $481 = 0.0, $482 = 0.0, $483 = 0.0, $484 = 0.0, $485 = 0.0, $486 = 0.0, $487 = 0.0, $488 = 0.0, $489 = 0.0, $49 = 0, $490 = 0.0, $491 = 0.0, $492 = 0.0, $493 = 0.0; - var $494 = 0.0, $495 = 0.0, $496 = 0.0, $497 = 0.0, $498 = 0.0, $499 = 0.0, $5 = 0.0, $50 = 0.0, $500 = 0.0, $501 = 0.0, $502 = 0.0, $503 = 0.0, $504 = 0.0, $505 = 0.0, $506 = 0.0, $507 = 0.0, $508 = 0.0, $509 = 0.0, $51 = 0, $510 = 0.0; - var $511 = 0.0, $512 = 0.0, $513 = 0.0, $514 = 0.0, $515 = 0.0, $516 = 0.0, $517 = 0.0, $518 = 0.0, $519 = 0.0, $52 = 0.0, $520 = 0.0, $521 = 0.0, $522 = 0.0, $523 = 0.0, $524 = 0.0, $525 = 0.0, $526 = 0.0, $527 = 0.0, $528 = 0.0, $529 = 0.0; - var $53 = 0.0, $530 = 0.0, $531 = 0.0, $532 = 0.0, $533 = 0.0, $534 = 0.0, $535 = 0.0, $536 = 0.0, $537 = 0.0, $538 = 0.0, $539 = 0.0, $54 = 0.0, $540 = 0.0, $541 = 0.0, $542 = 0.0, $543 = 0.0, $544 = 0.0, $545 = 0.0, $546 = 0.0, $547 = 0.0; - var $548 = 0.0, $549 = 0.0, $55 = 0, $550 = 0.0, $551 = 0.0, $552 = 0.0, $553 = 0.0, $554 = 0.0, $555 = 0.0, $556 = 0.0, $557 = 0.0, $558 = 0.0, $559 = 0.0, $56 = 0.0, $560 = 0.0, $561 = 0.0, $562 = 0.0, $563 = 0.0, $564 = 0.0, $565 = 0.0; - var $566 = 0.0, $567 = 0.0, $568 = 0.0, $569 = 0.0, $57 = 0.0, $570 = 0.0, $571 = 0.0, $572 = 0.0, $573 = 0.0, $574 = 0.0, $575 = 0.0, $576 = 0.0, $577 = 0.0, $578 = 0.0, $579 = 0.0, $58 = 0.0, $580 = 0.0, $581 = 0.0, $582 = 0.0, $583 = 0.0; - var $584 = 0.0, $585 = 0.0, $586 = 0.0, $587 = 0.0, $588 = 0.0, $589 = 0.0, $59 = 0, $590 = 0.0, $591 = 0.0, $592 = 0.0, $593 = 0.0, $594 = 0.0, $595 = 0.0, $596 = 0.0, $597 = 0.0, $598 = 0.0, $599 = 0.0, $6 = 0, $60 = 0.0, $600 = 0.0; - var $601 = 0.0, $602 = 0.0, $603 = 0.0, $604 = 0.0, $605 = 0.0, $606 = 0.0, $607 = 0.0, $608 = 0.0, $609 = 0.0, $61 = 0, $610 = 0.0, $611 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0; - var $7 = 0.0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0, $8 = 0.0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0.0, $87 = 0.0; - var $88 = 0.0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $exitcond = 0, $i$014 = 0, $wp$013 = 0, $x2$012 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($x1)) + -248|0); - $$015 = $x1;$i$014 = -15;$wp$013 = (7952);$x2$012 = $0; - while(1) { - $1 = ((($wp$013)) + -40|0); - $2 = +HEAPF32[$1>>2]; - $3 = ((($x2$012)) + -896|0); - $4 = +HEAPF32[$3>>2]; - $5 = $4 * $2; - $6 = ((($$015)) + 896|0); - $7 = +HEAPF32[$6>>2]; - $8 = $7 * $2; - $9 = ((($wp$013)) + -36|0); - $10 = +HEAPF32[$9>>2]; - $11 = ((($x2$012)) + -640|0); - $12 = +HEAPF32[$11>>2]; - $13 = $12 * $10; - $14 = $13 + $5; - $15 = ((($$015)) + 640|0); - $16 = +HEAPF32[$15>>2]; - $17 = $16 * $10; - $18 = $17 + $8; - $19 = ((($wp$013)) + -32|0); - $20 = +HEAPF32[$19>>2]; - $21 = ((($x2$012)) + -384|0); - $22 = +HEAPF32[$21>>2]; - $23 = $22 * $20; - $24 = $14 + $23; - $25 = ((($$015)) + 384|0); - $26 = +HEAPF32[$25>>2]; - $27 = $26 * $20; - $28 = $18 + $27; - $29 = ((($wp$013)) + -28|0); - $30 = +HEAPF32[$29>>2]; - $31 = ((($x2$012)) + -128|0); - $32 = +HEAPF32[$31>>2]; - $33 = $32 * $30; - $34 = $24 + $33; - $35 = ((($$015)) + 128|0); - $36 = +HEAPF32[$35>>2]; - $37 = $36 * $30; - $38 = $28 + $37; - $39 = ((($wp$013)) + -24|0); - $40 = +HEAPF32[$39>>2]; - $41 = ((($x2$012)) + 128|0); - $42 = +HEAPF32[$41>>2]; - $43 = $42 * $40; - $44 = $34 + $43; - $45 = ((($$015)) + -128|0); - $46 = +HEAPF32[$45>>2]; - $47 = $46 * $40; - $48 = $38 + $47; - $49 = ((($wp$013)) + -20|0); - $50 = +HEAPF32[$49>>2]; - $51 = ((($x2$012)) + 384|0); - $52 = +HEAPF32[$51>>2]; - $53 = $52 * $50; - $54 = $44 + $53; - $55 = ((($$015)) + -384|0); - $56 = +HEAPF32[$55>>2]; - $57 = $56 * $50; - $58 = $48 + $57; - $59 = ((($wp$013)) + -16|0); - $60 = +HEAPF32[$59>>2]; - $61 = ((($x2$012)) + 640|0); - $62 = +HEAPF32[$61>>2]; - $63 = $62 * $60; - $64 = $54 + $63; - $65 = ((($$015)) + -640|0); - $66 = +HEAPF32[$65>>2]; - $67 = $66 * $60; - $68 = $58 + $67; - $69 = ((($wp$013)) + -12|0); - $70 = +HEAPF32[$69>>2]; - $71 = ((($x2$012)) + 896|0); - $72 = +HEAPF32[$71>>2]; - $73 = $72 * $70; - $74 = $64 + $73; - $75 = ((($$015)) + -896|0); - $76 = +HEAPF32[$75>>2]; - $77 = $76 * $70; - $78 = $68 + $77; - $79 = ((($wp$013)) + -8|0); - $80 = +HEAPF32[$79>>2]; - $81 = ((($$015)) + -1024|0); - $82 = +HEAPF32[$81>>2]; - $83 = $82 * $80; - $84 = $74 + $83; - $85 = ((($x2$012)) + 1024|0); - $86 = +HEAPF32[$85>>2]; - $87 = $86 * $80; - $88 = $78 - $87; - $89 = ((($wp$013)) + -4|0); - $90 = +HEAPF32[$89>>2]; - $91 = ((($$015)) + -768|0); - $92 = +HEAPF32[$91>>2]; - $93 = $92 * $90; - $94 = $84 + $93; - $95 = ((($x2$012)) + 768|0); - $96 = +HEAPF32[$95>>2]; - $97 = $96 * $90; - $98 = $88 - $97; - $99 = +HEAPF32[$wp$013>>2]; - $100 = ((($$015)) + -512|0); - $101 = +HEAPF32[$100>>2]; - $102 = $101 * $99; - $103 = $94 + $102; - $104 = ((($x2$012)) + 512|0); - $105 = +HEAPF32[$104>>2]; - $106 = $105 * $99; - $107 = $98 - $106; - $108 = ((($wp$013)) + 4|0); - $109 = +HEAPF32[$108>>2]; - $110 = ((($$015)) + -256|0); - $111 = +HEAPF32[$110>>2]; - $112 = $111 * $109; - $113 = $103 + $112; - $114 = ((($x2$012)) + 256|0); - $115 = +HEAPF32[$114>>2]; - $116 = $115 * $109; - $117 = $107 - $116; - $118 = ((($wp$013)) + 8|0); - $119 = +HEAPF32[$118>>2]; - $120 = +HEAPF32[$$015>>2]; - $121 = $120 * $119; - $122 = $113 + $121; - $123 = +HEAPF32[$x2$012>>2]; - $124 = $123 * $119; - $125 = $117 - $124; - $126 = ((($wp$013)) + 12|0); - $127 = +HEAPF32[$126>>2]; - $128 = ((($$015)) + 256|0); - $129 = +HEAPF32[$128>>2]; - $130 = $129 * $127; - $131 = $122 + $130; - $132 = ((($x2$012)) + -256|0); - $133 = +HEAPF32[$132>>2]; - $134 = $133 * $127; - $135 = $125 - $134; - $136 = ((($wp$013)) + 16|0); - $137 = +HEAPF32[$136>>2]; - $138 = ((($$015)) + 512|0); - $139 = +HEAPF32[$138>>2]; - $140 = $139 * $137; - $141 = $131 + $140; - $142 = ((($x2$012)) + -512|0); - $143 = +HEAPF32[$142>>2]; - $144 = $143 * $137; - $145 = $135 - $144; - $146 = ((($wp$013)) + 20|0); - $147 = +HEAPF32[$146>>2]; - $148 = ((($$015)) + 768|0); - $149 = +HEAPF32[$148>>2]; - $150 = $149 * $147; - $151 = $141 + $150; - $152 = ((($x2$012)) + -768|0); - $153 = +HEAPF32[$152>>2]; - $154 = $153 * $147; - $155 = $145 - $154; - $156 = ((($wp$013)) + 24|0); - $157 = +HEAPF32[$156>>2]; - $158 = $151 * $157; - $159 = $155 - $158; - $160 = $155 + $158; - $161 = $i$014 << 1; - $162 = (($161) + 30)|0; - $163 = (($a) + ($162<<2)|0); - HEAPF32[$163>>2] = $160; - $164 = ((($wp$013)) + 28|0); - $165 = +HEAPF32[$164>>2]; - $166 = $159 * $165; - $167 = (($161) + 31)|0; - $168 = (($a) + ($167<<2)|0); - HEAPF32[$168>>2] = $166; - $169 = ((($wp$013)) + 72|0); - $170 = ((($$015)) + -4|0); - $171 = ((($x2$012)) + 4|0); - $172 = (($i$014) + 1)|0; - $exitcond = ($172|0)==(0); - if ($exitcond) { - break; - } else { - $$015 = $170;$i$014 = $172;$wp$013 = $169;$x2$012 = $171; - } - } - $173 = ((($x1)) + -124|0); - $174 = +HEAPF32[$173>>2]; - $175 = $174 * 10612.802734375; - $176 = ((($x1)) + -188|0); - $177 = +HEAPF32[$176>>2]; - $178 = $177 * 12804.7978515625; - $179 = ((($x1)) + -252|0); - $180 = +HEAPF32[$179>>2]; - $181 = ((($x1)) + 4|0); - $182 = +HEAPF32[$181>>2]; - $183 = $180 - $182; - $184 = $183 * 5302.158203125; - $185 = $184 + $175; - $186 = ((($x1)) + -444|0); - $187 = +HEAPF32[$186>>2]; - $188 = $187 * 1945.5516357421875; - $189 = $188 + $178; - $190 = ((($x1)) + -380|0); - $191 = +HEAPF32[$190>>2]; - $192 = ((($x1)) + 132|0); - $193 = +HEAPF32[$192>>2]; - $194 = $193 + $191; - $195 = $194 * 929.77630615234375; - $196 = $185 + $195; - $197 = ((($x1)) + -700|0); - $198 = +HEAPF32[$197>>2]; - $199 = $198 * 313.42449951171875; - $200 = $189 + $199; - $201 = ((($x1)) + -508|0); - $202 = +HEAPF32[$201>>2]; - $203 = ((($x1)) + 260|0); - $204 = +HEAPF32[$203>>2]; - $205 = $202 - $204; - $206 = $205 * 728.80108642578125; - $207 = $196 + $206; - $208 = ((($x1)) + -956|0); - $209 = +HEAPF32[$208>>2]; - $210 = $209 * 20.801593780517578; - $211 = $200 + $210; - $212 = ((($x1)) + -636|0); - $213 = +HEAPF32[$212>>2]; - $214 = ((($x1)) + 388|0); - $215 = +HEAPF32[$214>>2]; - $216 = $215 + $213; - $217 = $216 * 288.09765625; - $218 = $207 + $217; - $219 = ((($x1)) + 68|0); - $220 = +HEAPF32[$219>>2]; - $221 = $220 * 1995.1556396484375; - $222 = $211 - $221; - $223 = ((($x1)) + -764|0); - $224 = +HEAPF32[$223>>2]; - $225 = ((($x1)) + 516|0); - $226 = +HEAPF32[$225>>2]; - $227 = $224 - $226; - $228 = $227 * 64.917388916015625; - $229 = $218 + $228; - $230 = ((($x1)) + 324|0); - $231 = +HEAPF32[$230>>2]; - $232 = $231 * 9.0008392333984375; - $233 = $222 - $232; - $234 = ((($x1)) + -892|0); - $235 = +HEAPF32[$234>>2]; - $236 = ((($x1)) + 644|0); - $237 = +HEAPF32[$236>>2]; - $238 = $237 + $235; - $239 = $238 * 30.125003814697266; - $240 = $229 + $239; - $241 = ((($x1)) + 580|0); - $242 = +HEAPF32[$241>>2]; - $243 = $242 * -29.202180862426758; - $244 = $233 - $243; - $245 = ((($x1)) + -1020|0); - $246 = +HEAPF32[$245>>2]; - $247 = ((($x1)) + 772|0); - $248 = +HEAPF32[$247>>2]; - $249 = $246 - $248; - $250 = $249 * 4.1014566421508789; - $251 = $240 + $250; - $252 = ((($x1)) + 836|0); - $253 = +HEAPF32[$252>>2]; - $254 = $244 - $253; - $255 = $254 - $251; - $256 = $254 + $251; - $257 = ((($a)) + 56|0); - $258 = +HEAPF32[$257>>2]; - $259 = ((($a)) + 60|0); - $260 = +HEAPF32[$259>>2]; - $261 = $260 - $258; - $262 = $256 + $258; - $263 = ((($a)) + 124|0); - $264 = $261 + $255; - $265 = ((($a)) + 120|0); - $266 = $255 - $261; - $267 = $256 - $258; - $268 = ((($a)) + 112|0); - $269 = +HEAPF32[$268>>2]; - $270 = +HEAPF32[$a>>2]; - $271 = $269 - $270; - $272 = $270 + $269; - HEAPF32[$a>>2] = $272; - $273 = $271 * 1.9615705013275146; - HEAPF32[$268>>2] = $273; - $274 = ((($a)) + 116|0); - $275 = +HEAPF32[$274>>2]; - $276 = ((($a)) + 4|0); - $277 = +HEAPF32[$276>>2]; - $278 = $275 - $277; - $279 = $277 + $275; - HEAPF32[$276>>2] = $279; - $280 = $278 * 1.9615705013275146; - HEAPF32[$274>>2] = $280; - $281 = ((($a)) + 104|0); - $282 = +HEAPF32[$281>>2]; - $283 = ((($a)) + 8|0); - $284 = +HEAPF32[$283>>2]; - $285 = $282 - $284; - $286 = $284 + $282; - HEAPF32[$283>>2] = $286; - $287 = $285 * 1.8477590084075928; - HEAPF32[$281>>2] = $287; - $288 = ((($a)) + 108|0); - $289 = +HEAPF32[$288>>2]; - $290 = ((($a)) + 12|0); - $291 = +HEAPF32[$290>>2]; - $292 = $289 - $291; - $293 = $291 + $289; - HEAPF32[$290>>2] = $293; - $294 = $292 * 1.8477590084075928; - HEAPF32[$288>>2] = $294; - $295 = ((($a)) + 96|0); - $296 = +HEAPF32[$295>>2]; - $297 = ((($a)) + 16|0); - $298 = +HEAPF32[$297>>2]; - $299 = $296 - $298; - $300 = $298 + $296; - HEAPF32[$297>>2] = $300; - $301 = $299 * 1.662939190864563; - HEAPF32[$295>>2] = $301; - $302 = ((($a)) + 100|0); - $303 = +HEAPF32[$302>>2]; - $304 = ((($a)) + 20|0); - $305 = +HEAPF32[$304>>2]; - $306 = $303 - $305; - $307 = $305 + $303; - HEAPF32[$304>>2] = $307; - $308 = $306 * 1.662939190864563; - HEAPF32[$302>>2] = $308; - $309 = ((($a)) + 88|0); - $310 = +HEAPF32[$309>>2]; - $311 = ((($a)) + 24|0); - $312 = +HEAPF32[$311>>2]; - $313 = $310 - $312; - $314 = $312 + $310; - $315 = $313; - $316 = $315 * 1.4142135623730951; - $317 = $316; - $318 = ((($a)) + 92|0); - $319 = +HEAPF32[$318>>2]; - $320 = ((($a)) + 28|0); - $321 = +HEAPF32[$320>>2]; - $322 = $319 - $321; - $323 = $321 + $319; - $324 = $322; - $325 = $324 * 1.4142135623730951; - $326 = $323; - $327 = $325 - $326; - $328 = $327; - $329 = $323 - $314; - $330 = $317 - $329; - $331 = $328 - $330; - $332 = $262 - $314; - HEAPF32[$311>>2] = $332; - $333 = $262 + $314; - HEAPF32[$263>>2] = $333; - $334 = $264 - $329; - HEAPF32[$320>>2] = $334; - $335 = $264 + $329; - HEAPF32[$265>>2] = $335; - $336 = $266 - $330; - HEAPF32[$309>>2] = $336; - $337 = $266 + $330; - HEAPF32[$259>>2] = $337; - $338 = $267 - $331; - HEAPF32[$318>>2] = $338; - $339 = $267 + $331; - HEAPF32[$257>>2] = $339; - $340 = ((($a)) + 80|0); - $341 = +HEAPF32[$340>>2]; - $342 = ((($a)) + 32|0); - $343 = +HEAPF32[$342>>2]; - $344 = $341 - $343; - $345 = $343 + $341; - $346 = $344 * 1.1111404895782471; - $347 = ((($a)) + 84|0); - $348 = +HEAPF32[$347>>2]; - $349 = ((($a)) + 36|0); - $350 = +HEAPF32[$349>>2]; - $351 = $348 - $350; - $352 = $350 + $348; - $353 = $351 * 1.1111404895782471; - $354 = ((($a)) + 72|0); - $355 = +HEAPF32[$354>>2]; - $356 = ((($a)) + 40|0); - $357 = +HEAPF32[$356>>2]; - $358 = $355 - $357; - $359 = $357 + $355; - $360 = $358 * 0.76536685228347778; - $361 = ((($a)) + 76|0); - $362 = +HEAPF32[$361>>2]; - $363 = ((($a)) + 44|0); - $364 = +HEAPF32[$363>>2]; - $365 = $362 - $364; - $366 = $364 + $362; - $367 = $365 * 0.76536685228347778; - $368 = ((($a)) + 64|0); - $369 = +HEAPF32[$368>>2]; - $370 = ((($a)) + 48|0); - $371 = +HEAPF32[$370>>2]; - $372 = $369 - $371; - $373 = $371 + $369; - $374 = $372 * 0.39018064737319946; - $375 = ((($a)) + 68|0); - $376 = +HEAPF32[$375>>2]; - $377 = ((($a)) + 52|0); - $378 = +HEAPF32[$377>>2]; - $379 = $376 - $378; - $380 = $378 + $376; - $381 = $379 * 0.39018064737319946; - $382 = +HEAPF32[$295>>2]; - $383 = $382 - $346; - $384 = $382 + $346; - HEAPF32[$340>>2] = $384; - $385 = $383 * 0.76536685228347778; - HEAPF32[$295>>2] = $385; - $386 = +HEAPF32[$302>>2]; - $387 = $386 - $353; - $388 = $386 + $353; - HEAPF32[$347>>2] = $388; - $389 = $387 * 0.76536685228347778; - HEAPF32[$302>>2] = $389; - $390 = +HEAPF32[$297>>2]; - $391 = $390 - $345; - $392 = $345 + $390; - HEAPF32[$297>>2] = $392; - $393 = $391 * 0.76536685228347778; - HEAPF32[$342>>2] = $393; - $394 = +HEAPF32[$304>>2]; - $395 = $394 - $352; - $396 = $352 + $394; - HEAPF32[$304>>2] = $396; - $397 = $395 * 0.76536685228347778; - HEAPF32[$349>>2] = $397; - $398 = +HEAPF32[$a>>2]; - $399 = $398 - $373; - $400 = $373 + $398; - HEAPF32[$a>>2] = $400; - $401 = $399 * 1.8477590084075928; - HEAPF32[$370>>2] = $401; - $402 = +HEAPF32[$276>>2]; - $403 = $402 - $380; - $404 = $380 + $402; - HEAPF32[$276>>2] = $404; - $405 = $403 * 1.8477590084075928; - HEAPF32[$377>>2] = $405; - $406 = +HEAPF32[$268>>2]; - $407 = $374 - $406; - $408 = $406 + $374; - HEAPF32[$368>>2] = $408; - $409 = $407 * 1.8477590084075928; - HEAPF32[$268>>2] = $409; - $410 = +HEAPF32[$274>>2]; - $411 = $410 - $381; - $412 = $410 + $381; - HEAPF32[$375>>2] = $412; - $413 = $411 * 1.8477590084075928; - HEAPF32[$274>>2] = $413; - $414 = +HEAPF32[$283>>2]; - $415 = $414 - $359; - $416 = $415; - $417 = $416 * 1.4142135623730951; - $418 = $417; - $419 = $359 + $414; - $420 = +HEAPF32[$290>>2]; - $421 = $420 - $366; - $422 = $421; - $423 = $422 * 1.4142135623730951; - $424 = $423; - $425 = $366 + $420; - $426 = +HEAPF32[$281>>2]; - $427 = $426 - $360; - $428 = $427; - $429 = $428 * 1.4142135623730951; - $430 = $429; - $431 = $426 + $360; - $432 = $430 - $431; - $433 = +HEAPF32[$288>>2]; - $434 = $433 - $367; - $435 = $434; - $436 = $435 * 1.4142135623730951; - $437 = $436; - $438 = $433 + $367; - $439 = $437 - $438; - $440 = $438 - $425; - $441 = $425 - $419; - $442 = +HEAPF32[$263>>2]; - $443 = $442 - $419; - HEAPF32[$283>>2] = $443; - $444 = $442 + $419; - HEAPF32[$263>>2] = $444; - $445 = $424 - $440; - $446 = $431 - $441; - $447 = +HEAPF32[$265>>2]; - $448 = $447 - $441; - HEAPF32[$290>>2] = $448; - $449 = $447 + $441; - HEAPF32[$265>>2] = $449; - $450 = $439 - $445; - $451 = $440 - $446; - $452 = +HEAPF32[$259>>2]; - $453 = $452 - $446; - HEAPF32[$354>>2] = $453; - $454 = $452 + $446; - HEAPF32[$259>>2] = $454; - $455 = $418 - $451; - $456 = +HEAPF32[$257>>2]; - $457 = $456 - $451; - HEAPF32[$361>>2] = $457; - $458 = $456 + $451; - HEAPF32[$257>>2] = $458; - $459 = $445 - $455; - $460 = +HEAPF32[$318>>2]; - $461 = $460 - $455; - HEAPF32[$356>>2] = $461; - $462 = $460 + $455; - HEAPF32[$318>>2] = $462; - $463 = $432 - $459; - $464 = +HEAPF32[$309>>2]; - $465 = $464 - $459; - HEAPF32[$363>>2] = $465; - $466 = $464 + $459; - HEAPF32[$309>>2] = $466; - $467 = $450 - $463; - $468 = +HEAPF32[$320>>2]; - $469 = $468 - $463; - HEAPF32[$281>>2] = $469; - $470 = $468 + $463; - HEAPF32[$320>>2] = $470; - $471 = +HEAPF32[$311>>2]; - $472 = $471 - $467; - HEAPF32[$288>>2] = $472; - $473 = $471 + $467; - HEAPF32[$311>>2] = $473; - $474 = +HEAPF32[$a>>2]; - $475 = +HEAPF32[$297>>2]; - $476 = $474 - $475; - $477 = $476; - $478 = $477 * 1.4142135623730951; - $479 = $478; - $480 = $475 + $474; - HEAPF32[$a>>2] = $480; - HEAPF32[$297>>2] = $479; - $481 = +HEAPF32[$276>>2]; - $482 = +HEAPF32[$304>>2]; - $483 = $481 - $482; - $484 = $483; - $485 = $484 * 1.4142135623730951; - $486 = $485; - $487 = $482 + $481; - $488 = +HEAPF32[$368>>2]; - $489 = +HEAPF32[$340>>2]; - $490 = $488 - $489; - $491 = $490; - $492 = $491 * 1.4142135623730951; - $493 = $492; - $494 = $489 + $488; - $495 = +HEAPF32[$375>>2]; - $496 = +HEAPF32[$347>>2]; - $497 = $495 - $496; - $498 = $497; - $499 = $498 * 1.4142135623730951; - $500 = $499; - $501 = $496 + $495; - $502 = +HEAPF32[$342>>2]; - $503 = +HEAPF32[$370>>2]; - $504 = $502 - $503; - $505 = $504; - $506 = $505 * -1.4142135623730951; - $507 = $506; - $508 = $503 + $502; - $509 = $507 - $508; - $510 = +HEAPF32[$349>>2]; - $511 = +HEAPF32[$377>>2]; - $512 = $510 - $511; - $513 = $512; - $514 = $513 * -1.4142135623730951; - $515 = $514; - $516 = $511 + $510; - $517 = $515 - $516; - $518 = +HEAPF32[$302>>2]; - $519 = +HEAPF32[$274>>2]; - $520 = $518 - $519; - $521 = $520; - $522 = $521 * -1.4142135623730951; - $523 = $522; - $524 = $519 + $518; - $525 = $523 - $524; - $526 = +HEAPF32[$295>>2]; - $527 = +HEAPF32[$268>>2]; - $528 = $527 + $526; - $529 = $528; - $530 = $529 * -1.4142135623730951; - $531 = $530; - $532 = $526 - $527; - $533 = $531 - $532; - $534 = $532 - $494; - $535 = $493 - $534; - $536 = $533 - $535; - $537 = $524 - $501; - $538 = $500 - $537; - $539 = $525 - $538; - $540 = $501 - $487; - $541 = $516 - $540; - $542 = $537 - $541; - $543 = $486 - $542; - $544 = $538 - $543; - $545 = $517 - $544; - $546 = $539 - $545; - $547 = $487 - $480; - $548 = $494 - $547; - $549 = $540 - $548; - $550 = $508 - $549; - $551 = $541 - $550; - $552 = $534 - $551; - $553 = $542 - $552; - $554 = +HEAPF32[$297>>2]; - $555 = $554 - $553; - $556 = $543 - $555; - $557 = $535 - $556; - $558 = $544 - $557; - $559 = $509 - $558; - $560 = $545 - $559; - $561 = $536 - $560; - $562 = $546 - $561; - $563 = +HEAPF32[$a>>2]; - $564 = +HEAPF32[$263>>2]; - $565 = $564 + $563; - HEAPF32[$a>>2] = $565; - $566 = $564 - $563; - HEAPF32[$263>>2] = $566; - $567 = +HEAPF32[$265>>2]; - $568 = $567 + $547; - HEAPF32[$276>>2] = $568; - $569 = $567 - $547; - HEAPF32[$265>>2] = $569; - $570 = +HEAPF32[$259>>2]; - $571 = $570 + $548; - HEAPF32[$368>>2] = $571; - $572 = $570 - $548; - HEAPF32[$259>>2] = $572; - $573 = +HEAPF32[$257>>2]; - $574 = $573 + $549; - HEAPF32[$375>>2] = $574; - $575 = $573 - $549; - HEAPF32[$257>>2] = $575; - $576 = +HEAPF32[$318>>2]; - $577 = $576 + $550; - HEAPF32[$342>>2] = $577; - $578 = $576 - $550; - HEAPF32[$318>>2] = $578; - $579 = +HEAPF32[$309>>2]; - $580 = $579 + $551; - HEAPF32[$349>>2] = $580; - $581 = $579 - $551; - HEAPF32[$309>>2] = $581; - $582 = +HEAPF32[$320>>2]; - $583 = $582 + $552; - HEAPF32[$295>>2] = $583; - $584 = $582 - $552; - HEAPF32[$320>>2] = $584; - $585 = +HEAPF32[$311>>2]; - $586 = $585 + $553; - HEAPF32[$302>>2] = $586; - $587 = $585 - $553; - HEAPF32[$311>>2] = $587; - $588 = +HEAPF32[$288>>2]; - $589 = $588 + $555; - HEAPF32[$297>>2] = $589; - $590 = $588 - $555; - HEAPF32[$288>>2] = $590; - $591 = +HEAPF32[$281>>2]; - $592 = $591 + $556; - HEAPF32[$304>>2] = $592; - $593 = $591 - $556; - HEAPF32[$281>>2] = $593; - $594 = +HEAPF32[$363>>2]; - $595 = $594 + $557; - HEAPF32[$340>>2] = $595; - $596 = $594 - $557; - HEAPF32[$363>>2] = $596; - $597 = +HEAPF32[$356>>2]; - $598 = $597 + $558; - HEAPF32[$347>>2] = $598; - $599 = $597 - $558; - HEAPF32[$356>>2] = $599; - $600 = +HEAPF32[$361>>2]; - $601 = $600 + $559; - HEAPF32[$370>>2] = $601; - $602 = $600 - $559; - HEAPF32[$361>>2] = $602; - $603 = +HEAPF32[$354>>2]; - $604 = $603 + $560; - HEAPF32[$377>>2] = $604; - $605 = $603 - $560; - HEAPF32[$354>>2] = $605; - $606 = +HEAPF32[$290>>2]; - $607 = $606 + $561; - HEAPF32[$268>>2] = $607; - $608 = $606 - $561; - HEAPF32[$290>>2] = $608; - $609 = +HEAPF32[$283>>2]; - $610 = $609 + $562; - HEAPF32[$274>>2] = $610; - $611 = $609 - $562; - HEAPF32[$283>>2] = $611; - return; -} -function _apply_preset($gfp,$preset,$enforce) { - $gfp = $gfp|0; - $preset = $preset|0; - $enforce = $enforce|0; - var $$0 = 0, $$02$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - L1: do { - switch ($preset|0) { - case 1004: case 1001: { - (_lame_set_VBR($gfp,4)|0); - $2 = ((($gfp)) + 152|0); - HEAP32[$2>>2] = 480; - label = 15; - break; - } - case 1007: case 1006: { - (_lame_set_VBR($gfp,4)|0); - $1 = ((($gfp)) + 152|0); - HEAP32[$1>>2] = 460; - label = 13; - break; - } - case 1005: case 1002: { - (_lame_set_VBR($gfp,4)|0); - $3 = ((($gfp)) + 152|0); - HEAP32[$3>>2] = 500; - label = 17; - break; - } - case 1003: { - $4 = ((($gfp)) + 152|0); - HEAP32[$4>>2] = 320; - (_apply_abr_preset($gfp,320,$enforce)|0); - (_lame_set_VBR($gfp,0)|0); - $$0 = 320; - return ($$0|0); - break; - } - case 1000: { - (_lame_set_VBR($gfp,4)|0); - $0 = ((($gfp)) + 152|0); - HEAP32[$0>>2] = 470; - label = 14; - break; - } - default: { - $5 = ((($gfp)) + 152|0); - HEAP32[$5>>2] = $preset; - switch ($preset|0) { - case 490: { - _apply_vbr_preset($gfp,1,$enforce); - $$0 = 490; - return ($$0|0); - break; - } - case 470: { - label = 14; - break L1; - break; - } - case 410: { - _apply_vbr_preset($gfp,9,$enforce); - $$0 = 410; - return ($$0|0); - break; - } - case 450: { - _apply_vbr_preset($gfp,5,$enforce); - $$0 = 450; - return ($$0|0); - break; - } - case 420: { - _apply_vbr_preset($gfp,8,$enforce); - $$0 = 420; - return ($$0|0); - break; - } - case 500: { - label = 17; - break L1; - break; - } - case 440: { - _apply_vbr_preset($gfp,6,$enforce); - $$0 = 440; - return ($$0|0); - break; - } - case 480: { - label = 15; - break L1; - break; - } - case 460: { - label = 13; - break L1; - break; - } - case 430: { - _apply_vbr_preset($gfp,7,$enforce); - $$0 = 430; - return ($$0|0); - break; - } - default: { - $$02$off = (($preset) + -8)|0; - $6 = ($$02$off>>>0)<(313); - if ($6) { - $7 = (_apply_abr_preset($gfp,$preset,$enforce)|0); - $$0 = $7; - return ($$0|0); - } else { - HEAP32[$5>>2] = 0; - $$0 = $preset; - return ($$0|0); - } - } - } - } - } - } while(0); - if ((label|0) == 13) { - _apply_vbr_preset($gfp,4,$enforce); - $$0 = 460; - return ($$0|0); - } - else if ((label|0) == 14) { - _apply_vbr_preset($gfp,3,$enforce); - $$0 = 470; - return ($$0|0); - } - else if ((label|0) == 15) { - _apply_vbr_preset($gfp,2,$enforce); - $$0 = 480; - return ($$0|0); - } - else if ((label|0) == 17) { - _apply_vbr_preset($gfp,0,$enforce); - $$0 = 500; - return ($$0|0); - } - return (0)|0; -} -function _apply_abr_preset($gfp,$preset,$enforce) { - $gfp = $gfp|0; - $preset = $preset|0; - $enforce = $enforce|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0; - var $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0.0; - var $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0; - var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0.0; - var $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $a$$i = 0, $a$$i1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $preset&65535; - $1 = (_nearestBitrateFullIndex($0)|0); - (_lame_set_VBR($gfp,3)|0); - (_lame_set_VBR_mean_bitrate_kbps($gfp,$preset)|0); - $2 = (_lame_get_VBR_mean_bitrate_kbps($gfp)|0); - $3 = ($2|0)<(320); - $a$$i = $3 ? $2 : 320; - (_lame_set_VBR_mean_bitrate_kbps($gfp,$a$$i)|0); - $4 = (_lame_get_VBR_mean_bitrate_kbps($gfp)|0); - $5 = ($4|0)>(8); - $a$$i1 = $5 ? $4 : 8; - (_lame_set_VBR_mean_bitrate_kbps($gfp,$a$$i1)|0); - $6 = (_lame_get_VBR_mean_bitrate_kbps($gfp)|0); - (_lame_set_brate($gfp,$6)|0); - $7 = (($1) + -12)|0; - $8 = ($7>>>0)<(5); - if ($8) { - $9 = (_lame_get_exp_nspsytune($gfp)|0); - $10 = $9 | 2; - (_lame_set_exp_nspsytune($gfp,$10)|0); - } - $11 = ($1>>>0)<(13); - if ($11) { - (_lame_set_sfscale($gfp,1)|0); - } - $12 = ($enforce|0)!=(0); - if ($12) { - $32 = (((10560 + (($1*52)|0)|0)) + 4|0); - $33 = HEAP32[$32>>2]|0; - (_lame_set_quant_comp($gfp,$33)|0); - $34 = (((10560 + (($1*52)|0)|0)) + 8|0); - $35 = HEAP32[$34>>2]|0; - (_lame_set_quant_comp_short($gfp,$35)|0); - $36 = (((10560 + (($1*52)|0)|0)) + 16|0); - $37 = +HEAPF32[$36>>2]; - $38 = $37; - _lame_set_msfix($gfp,$38); - $39 = (((10560 + (($1*52)|0)|0)) + 20|0); - $40 = +HEAPF32[$39>>2]; - (_lame_set_short_threshold_lrm($gfp,$40)|0); - $41 = (((10560 + (($1*52)|0)|0)) + 24|0); - $42 = +HEAPF32[$41>>2]; - (_lame_set_short_threshold_s($gfp,$42)|0); - } else { - $13 = (_lame_get_quant_comp($gfp)|0); - $14 = ($13|0)==(-1); - if ($14) { - $15 = (((10560 + (($1*52)|0)|0)) + 4|0); - $16 = HEAP32[$15>>2]|0; - (_lame_set_quant_comp($gfp,$16)|0); - } - $17 = (_lame_get_quant_comp_short($gfp)|0); - $18 = ($17|0)==(-1); - if ($18) { - $19 = (((10560 + (($1*52)|0)|0)) + 8|0); - $20 = HEAP32[$19>>2]|0; - (_lame_set_quant_comp_short($gfp,$20)|0); - } - $21 = (+_lame_get_msfix($gfp)); - $22 = $21 + 1.0; - $23 = ($22 != $22) | (0.0 != 0.0) |($22 == 0.0); - if ($23) { - $24 = (((10560 + (($1*52)|0)|0)) + 16|0); - $25 = +HEAPF32[$24>>2]; - $26 = $25; - _lame_set_msfix($gfp,$26); - } - $27 = (+_lame_get_short_threshold_lrm($gfp)); - $28 = $27 + 1.0; - $29 = ($28 != $28) | (0.0 != 0.0) |($28 == 0.0); - if ($29) { - $30 = (((10560 + (($1*52)|0)|0)) + 20|0); - $31 = +HEAPF32[$30>>2]; - (_lame_set_short_threshold_lrm($gfp,$31)|0); - } - $43 = (+_lame_get_short_threshold_s($gfp)); - $44 = $43 + 1.0; - $45 = ($44 != $44) | (0.0 != 0.0) |($44 == 0.0); - if ($45) { - $46 = (((10560 + (($1*52)|0)|0)) + 24|0); - $47 = +HEAPF32[$46>>2]; - (_lame_set_short_threshold_s($gfp,$47)|0); - } - } - $48 = (+_lame_get_scale($gfp)); - $49 = (((10560 + (($1*52)|0)|0)) + 28|0); - $50 = +HEAPF32[$49>>2]; - $51 = $50 * $48; - (_lame_set_scale($gfp,$51)|0); - if ($12) { - $72 = (((10560 + (($1*52)|0)|0)) + 32|0); - $73 = +HEAPF32[$72>>2]; - (_lame_set_maskingadjust($gfp,$73)|0); - $74 = $73; - $75 = $74 * 1.1000000000000001; - $76 = $75; - (_lame_set_maskingadjust_short($gfp,$76)|0); - $77 = (((10560 + (($1*52)|0)|0)) + 36|0); - $78 = +HEAPF32[$77>>2]; - (_lame_set_ATHlower($gfp,$78)|0); - $79 = (((10560 + (($1*52)|0)|0)) + 40|0); - $80 = +HEAPF32[$79>>2]; - (_lame_set_ATHcurve($gfp,$80)|0); - $81 = (((10560 + (($1*52)|0)|0)) + 44|0); - $82 = +HEAPF32[$81>>2]; - (_lame_set_interChRatio($gfp,$82)|0); - $88 = (10560 + (($1*52)|0)|0); - $89 = HEAP32[$88>>2]|0; - $90 = (+($89|0)); - $91 = $90 * 0.015625; - $92 = $91; - $93 = ((($gfp)) + 288|0); - $94 = HEAP32[$93>>2]|0; - $95 = ((($94)) + 280|0); - HEAPF32[$95>>2] = $92; - return ($preset|0); - } - $52 = (+_lame_get_maskingadjust($gfp)); - $53 = ($52 != $52) | (0.0 != 0.0) |($52 == 0.0); - if ($53) { - $54 = (((10560 + (($1*52)|0)|0)) + 32|0); - $55 = +HEAPF32[$54>>2]; - (_lame_set_maskingadjust($gfp,$55)|0); - } - $56 = (+_lame_get_maskingadjust_short($gfp)); - $57 = ($56 != $56) | (0.0 != 0.0) |($56 == 0.0); - if ($57) { - $58 = (((10560 + (($1*52)|0)|0)) + 32|0); - $59 = +HEAPF32[$58>>2]; - $60 = $59; - $61 = $60 * 1.1000000000000001; - $62 = $61; - (_lame_set_maskingadjust_short($gfp,$62)|0); - } - $63 = (+_lame_get_ATHlower($gfp)); - $64 = ($63 != $63) | (0.0 != 0.0) |($63 == 0.0); - if ($64) { - $65 = (((10560 + (($1*52)|0)|0)) + 36|0); - $66 = +HEAPF32[$65>>2]; - (_lame_set_ATHlower($gfp,$66)|0); - } - $67 = (+_lame_get_ATHcurve($gfp)); - $68 = $67 + 1.0; - $69 = ($68 != $68) | (0.0 != 0.0) |($68 == 0.0); - if ($69) { - $70 = (((10560 + (($1*52)|0)|0)) + 40|0); - $71 = +HEAPF32[$70>>2]; - (_lame_set_ATHcurve($gfp,$71)|0); - } - $83 = (+_lame_get_interChRatio($gfp)); - $84 = $83 + 1.0; - $85 = ($84 != $84) | (0.0 != 0.0) |($84 == 0.0); - if (!($85)) { - $88 = (10560 + (($1*52)|0)|0); - $89 = HEAP32[$88>>2]|0; - $90 = (+($89|0)); - $91 = $90 * 0.015625; - $92 = $91; - $93 = ((($gfp)) + 288|0); - $94 = HEAP32[$93>>2]|0; - $95 = ((($94)) + 280|0); - HEAPF32[$95>>2] = $92; - return ($preset|0); - } - $86 = (((10560 + (($1*52)|0)|0)) + 44|0); - $87 = +HEAPF32[$86>>2]; - (_lame_set_interChRatio($gfp,$87)|0); - $88 = (10560 + (($1*52)|0)|0); - $89 = HEAP32[$88>>2]|0; - $90 = (+($89|0)); - $91 = $90 * 0.015625; - $92 = $91; - $93 = ((($gfp)) + 288|0); - $94 = HEAP32[$93>>2]|0; - $95 = ((($94)) + 280|0); - HEAPF32[$95>>2] = $92; - return ($preset|0); -} -function _apply_vbr_preset($gfp,$a,$enforce) { - $gfp = $gfp|0; - $a = $a|0; - $enforce = $enforce|0; - var $$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0.0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0; - var $115 = 0.0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0.0, $122 = 0, $123 = 0.0, $124 = 0.0, $125 = 0, $126 = 0.0, $127 = 0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0, $132 = 0; - var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0.0, $140 = 0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0.0, $145 = 0.0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; - var $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0.0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0; - var $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0.0; - var $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0; - var $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0, $88 = 0.0; - var $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_lame_get_VBR($gfp)|0); - if ((($0|0) == 1) | (($0|0) == 4)) { - $$0$i = 9808; - } else { - $$0$i = 9056; - } - $1 = ((($gfp)) + 160|0); - $2 = +HEAPF32[$1>>2]; - $3 = (($$0$i) + (($a*68)|0)|0); - $4 = HEAP32[$3>>2]|0; - $5 = (((($$0$i) + (($a*68)|0)|0)) + 4|0); - $6 = HEAP32[$5>>2]|0; - $7 = (((($$0$i) + (($a*68)|0)|0)) + 8|0); - $8 = HEAP32[$7>>2]|0; - $9 = (((($$0$i) + (($a*68)|0)|0)) + 12|0); - $10 = HEAP32[$9>>2]|0; - $11 = (((($$0$i) + (($a*68)|0)|0)) + 16|0); - $12 = +HEAPF32[$11>>2]; - $13 = (((($$0$i) + (($a*68)|0)|0)) + 20|0); - $14 = +HEAPF32[$13>>2]; - $15 = (((($$0$i) + (($a*68)|0)|0)) + 24|0); - $16 = +HEAPF32[$15>>2]; - $17 = (((($$0$i) + (($a*68)|0)|0)) + 28|0); - $18 = +HEAPF32[$17>>2]; - $19 = (((($$0$i) + (($a*68)|0)|0)) + 32|0); - $20 = +HEAPF32[$19>>2]; - $21 = (((($$0$i) + (($a*68)|0)|0)) + 36|0); - $22 = +HEAPF32[$21>>2]; - $23 = (((($$0$i) + (($a*68)|0)|0)) + 40|0); - $24 = +HEAPF32[$23>>2]; - $25 = (((($$0$i) + (($a*68)|0)|0)) + 44|0); - $26 = +HEAPF32[$25>>2]; - $27 = (((($$0$i) + (($a*68)|0)|0)) + 48|0); - $28 = HEAP32[$27>>2]|0; - $29 = (((($$0$i) + (($a*68)|0)|0)) + 52|0); - $30 = HEAP32[$29>>2]|0; - $31 = (((($$0$i) + (($a*68)|0)|0)) + 56|0); - $32 = +HEAPF32[$31>>2]; - $33 = (((($$0$i) + (($a*68)|0)|0)) + 60|0); - $34 = +HEAPF32[$33>>2]; - $35 = (((($$0$i) + (($a*68)|0)|0)) + 64|0); - $36 = +HEAPF32[$35>>2]; - $37 = (($a) + 1)|0; - $38 = (((($$0$i) + (($37*68)|0)|0)) + 16|0); - $39 = +HEAPF32[$38>>2]; - $40 = (((($$0$i) + (($37*68)|0)|0)) + 20|0); - $41 = +HEAPF32[$40>>2]; - $42 = (((($$0$i) + (($37*68)|0)|0)) + 24|0); - $43 = +HEAPF32[$42>>2]; - $44 = (((($$0$i) + (($37*68)|0)|0)) + 28|0); - $45 = +HEAPF32[$44>>2]; - $46 = (((($$0$i) + (($37*68)|0)|0)) + 32|0); - $47 = +HEAPF32[$46>>2]; - $48 = (((($$0$i) + (($37*68)|0)|0)) + 36|0); - $49 = +HEAPF32[$48>>2]; - $50 = (((($$0$i) + (($37*68)|0)|0)) + 40|0); - $51 = +HEAPF32[$50>>2]; - $52 = (((($$0$i) + (($37*68)|0)|0)) + 44|0); - $53 = +HEAPF32[$52>>2]; - $54 = (((($$0$i) + (($37*68)|0)|0)) + 52|0); - $55 = HEAP32[$54>>2]|0; - $56 = (((($$0$i) + (($37*68)|0)|0)) + 56|0); - $57 = +HEAPF32[$56>>2]; - $58 = (((($$0$i) + (($37*68)|0)|0)) + 60|0); - $59 = +HEAPF32[$58>>2]; - $60 = (((($$0$i) + (($37*68)|0)|0)) + 64|0); - $61 = +HEAPF32[$60>>2]; - $62 = $39 - $12; - $63 = $62 * $2; - $64 = $63 + $12; - $65 = $41 - $14; - $66 = $65 * $2; - $67 = $66 + $14; - $68 = $43 - $16; - $69 = $68 * $2; - $70 = $69 + $16; - $71 = $45 - $18; - $72 = $71 * $2; - $73 = $72 + $18; - $74 = $47 - $20; - $75 = $74 * $2; - $76 = $75 + $20; - $77 = $49 - $22; - $78 = $77 * $2; - $79 = $78 + $22; - $80 = $51 - $24; - $81 = $80 * $2; - $82 = $81 + $24; - $83 = $53 - $26; - $84 = $83 * $2; - $85 = $84 + $26; - $86 = (+($30|0)); - $87 = (($55) - ($30))|0; - $88 = (+($87|0)); - $89 = $88 * $2; - $90 = $89 + $86; - $91 = (~~(($90))); - $92 = $57 - $32; - $93 = $92 * $2; - $94 = $93 + $32; - $95 = $59 - $34; - $96 = $95 * $2; - $97 = $96 + $34; - $98 = $61 - $36; - $99 = $98 * $2; - $100 = $99 + $36; - (_lame_set_VBR_q($gfp,$4)|0); - $101 = ($enforce|0)!=(0); - if ($101) { - (_lame_set_quant_comp($gfp,$6)|0); - (_lame_set_quant_comp_short($gfp,$8)|0); - } else { - $102 = (_lame_get_quant_comp($gfp)|0); - $103 = ($102|0)==(-1); - if ($103) { - (_lame_set_quant_comp($gfp,$6)|0); - } - $104 = (_lame_get_quant_comp_short($gfp)|0); - $105 = ($104|0)==(-1); - if ($105) { - (_lame_set_quant_comp_short($gfp,$8)|0); - } - } - $106 = ($10|0)==(0); - if (!($106)) { - (_lame_set_experimentalY($gfp,$10)|0); - } - if ($101) { - (_lame_set_short_threshold_lrm($gfp,$64)|0); - (_lame_set_short_threshold_s($gfp,$67)|0); - (_lame_set_maskingadjust($gfp,$70)|0); - (_lame_set_maskingadjust_short($gfp,$73)|0); - } else { - $107 = (+_lame_get_short_threshold_lrm($gfp)); - $108 = $107 + 1.0; - $109 = ($108 != $108) | (0.0 != 0.0) |($108 == 0.0); - if ($109) { - (_lame_set_short_threshold_lrm($gfp,$64)|0); - } - $110 = (+_lame_get_short_threshold_s($gfp)); - $111 = $110 + 1.0; - $112 = ($111 != $111) | (0.0 != 0.0) |($111 == 0.0); - if ($112) { - (_lame_set_short_threshold_s($gfp,$67)|0); - } - $113 = (+_lame_get_maskingadjust($gfp)); - $114 = ($113 != $113) | (0.0 != 0.0) |($113 == 0.0); - if ($114) { - (_lame_set_maskingadjust($gfp,$70)|0); - } - $115 = (+_lame_get_maskingadjust_short($gfp)); - $116 = ($115 != $115) | (0.0 != 0.0) |($115 == 0.0); - if ($116) { - (_lame_set_maskingadjust_short($gfp,$73)|0); - } - } - $117 = (_lame_get_VBR($gfp)|0); - $118 = ($117|0)==(1); - if ($118) { - label = 23; - } else { - $119 = (_lame_get_VBR($gfp)|0); - $120 = ($119|0)==(4); - if ($120) { - label = 23; - } - } - if ((label|0) == 23) { - (_lame_set_ATHtype($gfp,5)|0); - } - if ($101) { - (_lame_set_ATHlower($gfp,$76)|0); - (_lame_set_ATHcurve($gfp,$79)|0); - (_lame_set_athaa_sensitivity($gfp,$82)|0); - } else { - $121 = (+_lame_get_ATHlower($gfp)); - $122 = ($121 != $121) | (0.0 != 0.0) |($121 == 0.0); - if ($122) { - (_lame_set_ATHlower($gfp,$76)|0); - } - $123 = (+_lame_get_ATHcurve($gfp)); - $124 = $123 + 1.0; - $125 = ($124 != $124) | (0.0 != 0.0) |($124 == 0.0); - if ($125) { - (_lame_set_ATHcurve($gfp,$79)|0); - } - $126 = (+_lame_get_athaa_sensitivity($gfp)); - $127 = ($126 != $126) | (0.0 != 0.0) |($126 == 0.0); - if ($127) { - (_lame_set_athaa_sensitivity($gfp,$82)|0); - } - } - $128 = $85 > 0.0; - do { - if ($128) { - if ($101) { - (_lame_set_interChRatio($gfp,$85)|0); - break; - } - $129 = (+_lame_get_interChRatio($gfp)); - $130 = $129 + 1.0; - $131 = ($130 != $130) | (0.0 != 0.0) |($130 == 0.0); - if ($131) { - (_lame_set_interChRatio($gfp,$85)|0); - } - } - } while(0); - $132 = ($28|0)>(0); - if ($132) { - $133 = (_lame_get_exp_nspsytune($gfp)|0); - $134 = $133 | 2; - (_lame_set_exp_nspsytune($gfp,$134)|0); - } - $135 = ($91|0)>(0); - if ($135) { - $136 = (_lame_get_exp_nspsytune($gfp)|0); - $137 = $136 & 66060288; - $138 = ($137|0)==(0); - if ($138) { - $139 = $91 << 20; - $140 = $136 | $139; - (_lame_set_exp_nspsytune($gfp,$140)|0); - } - } - if ($101) { - $145 = $94; - _lame_set_msfix($gfp,$145); - $147 = ((($gfp)) + 288|0); - $148 = HEAP32[$147>>2]|0; - $149 = ((($148)) + 280|0); - HEAPF32[$149>>2] = $97; - $150 = ((($148)) + 224|0); - HEAPF32[$150>>2] = $100; - return; - } - $141 = (+_lame_get_msfix($gfp)); - $142 = $141 + 1.0; - $143 = ($142 != $142) | (0.0 != 0.0) |($142 == 0.0); - if ($143) { - $144 = $94; - _lame_set_msfix($gfp,$144); - } - $146 = ((($gfp)) + 164|0); - HEAP32[$146>>2] = $a; - HEAPF32[$1>>2] = $2; - $147 = ((($gfp)) + 288|0); - $148 = HEAP32[$147>>2]|0; - $149 = ((($148)) + 280|0); - HEAPF32[$149>>2] = $97; - $150 = ((($148)) + 224|0); - HEAPF32[$150>>2] = $100; - return; -} -function _L3psycho_anal_vbr($gfc,$buffer,$gr_out,$masking_ratio,$masking_MS_ratio,$percep_entropy,$percep_MS_entropy,$energy,$blocktype_d) { - $gfc = $gfc|0; - $buffer = $buffer|0; - $gr_out = $gr_out|0; - $masking_ratio = $masking_ratio|0; - $masking_MS_ratio = $masking_MS_ratio|0; - $percep_entropy = $percep_entropy|0; - $percep_MS_entropy = $percep_MS_entropy|0; - $energy = $energy|0; - $blocktype_d = $blocktype_d|0; - var $$$i = 0.0, $$$i67 = 0, $$01$i$i = 0.0, $$01$i$i46 = 0.0, $$02$i$i = 0.0, $$02$i$i47 = 0.0, $$1$i$i = 0.0, $$1$i$i54 = 0.0, $$lcssa = 0.0, $$lcssa$i$i = 0, $$lcssa$i$i39 = 0, $$lcssa1$i$i = 0.0, $$lcssa1$i$i38 = 0.0, $$lcssa226 = 0.0, $$lcssa227 = 0, $$lcssa228 = 0, $$lcssa229 = 0.0, $$lcssa230 = 0.0, $$lcssa231 = 0.0, $$lcssa232 = 0.0; - var $$lcssa233 = 0, $$lcssa234 = 0, $$not = 0, $$not203 = 0, $$phi$trans$insert$i = 0, $$pre$i = 0, $$pre$i12 = 0.0, $$pre$i27 = 0.0, $$pre$phi$iZ2D = 0, $$pre$phi36$iZ2D = 0, $$pre34$i = 0.0, $$pre35$i = 0, $$pre37$i = 0, $$pre48$i = 0.0, $$pre49$i = 0, $$pre52$i = 0, $$pre61$i = 0, $$pre63$i = 0, $$pre8$i = 0, $$sink$i$i = 0; - var $$sink$i$i36 = 0, $$sink7$i$i = 0, $$sink7$i$i43 = 0, $$sum = 0, $$sum$i = 0, $$sum$us$i = 0, $$sum1$1$i = 0, $$sum1$2$i = 0, $$sum1$3$i = 0, $$sum1$4$i = 0, $$sum1$i = 0, $$sum1$us$1$i = 0, $$sum1$us$2$i = 0, $$sum1$us$3$i = 0, $$sum1$us$4$i = 0, $$sum1$us$i = 0, $$sum2$1$i = 0, $$sum2$2$i = 0, $$sum2$3$i = 0, $$sum2$4$i = 0; - var $$sum2$i = 0, $$sum2$us$1$i = 0, $$sum2$us$2$i = 0, $$sum2$us$3$i = 0, $$sum2$us$4$i = 0, $$sum2$us$i = 0, $$sum3$1$i = 0, $$sum3$2$i = 0, $$sum3$3$i = 0, $$sum3$4$i = 0, $$sum3$i = 0, $$sum3$us$1$i = 0, $$sum3$us$2$i = 0, $$sum3$us$3$i = 0, $$sum3$us$4$i = 0, $$sum3$us$i = 0, $$sum4$1$i = 0, $$sum4$2$i = 0, $$sum4$3$i = 0, $$sum4$4$i = 0; - var $$sum4$i = 0, $$sum4$us$1$i = 0, $$sum4$us$2$i = 0, $$sum4$us$3$i = 0, $$sum4$us$4$i = 0, $$sum4$us$i = 0, $$sum73 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0.0, $1003 = 0.0, $1004 = 0, $1005 = 0, $1006 = 0.0, $1007 = 0, $1008 = 0.0; - var $1009 = 0.0, $101 = 0.0, $1010 = 0.0, $1011 = 0.0, $1012 = 0, $1013 = 0.0, $1014 = 0, $1015 = 0.0, $1016 = 0.0, $1017 = 0.0, $1018 = 0, $1019 = 0.0, $102 = 0.0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0; - var $1027 = 0, $1028 = 0, $1029 = 0.0, $103 = 0.0, $1030 = 0.0, $1031 = 0.0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0.0, $1038 = 0, $1039 = 0.0, $104 = 0.0, $1040 = 0.0, $1041 = 0.0, $1042 = 0, $1043 = 0, $1044 = 0.0; - var $1045 = 0.0, $1046 = 0, $1047 = 0.0, $1048 = 0, $1049 = 0.0, $105 = 0.0, $1050 = 0, $1051 = 0.0, $1052 = 0.0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0.0, $1060 = 0.0, $1061 = 0, $1062 = 0; - var $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0.0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0.0, $1080 = 0; - var $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0.0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0; - var $11 = 0.0, $110 = 0.0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0.0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0; - var $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0.0, $1120 = 0, $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0.0, $113 = 0.0, $1130 = 0.0, $1131 = 0.0, $1132 = 0.0, $1133 = 0, $1134 = 0; - var $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0, $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0.0, $1145 = 0.0, $1146 = 0.0, $1147 = 0, $1148 = 0.0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0.0, $1152 = 0.0; - var $1153 = 0.0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0, $116 = 0, $1160 = 0.0, $1161 = 0.0, $1162 = 0.0, $1163 = 0, $1164 = 0.0, $1165 = 0.0, $1166 = 0.0, $1167 = 0, $1168 = 0.0, $1169 = 0, $117 = 0, $1170 = 0.0; - var $1171 = 0.0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0; - var $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0, $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0.0, $1206 = 0; - var $1207 = 0, $1208 = 0.0, $1209 = 0, $121 = 0, $1210 = 0.0, $1211 = 0, $1212 = 0.0, $1213 = 0, $1214 = 0.0, $1215 = 0, $1216 = 0.0, $1217 = 0.0, $1218 = 0.0, $1219 = 0.0, $122 = 0, $1220 = 0.0, $1221 = 0.0, $1222 = 0.0, $1223 = 0.0, $1224 = 0.0; - var $1225 = 0.0, $1226 = 0.0, $1227 = 0.0, $1228 = 0.0, $1229 = 0.0, $123 = 0, $1230 = 0, $1231 = 0.0, $1232 = 0, $1233 = 0.0, $1234 = 0, $1235 = 0.0, $1236 = 0, $1237 = 0.0, $1238 = 0, $1239 = 0.0, $124 = 0, $1240 = 0.0, $1241 = 0.0, $1242 = 0.0; - var $1243 = 0.0, $1244 = 0.0, $1245 = 0.0, $1246 = 0.0, $1247 = 0.0, $1248 = 0.0, $1249 = 0.0, $125 = 0, $1250 = 0.0, $1251 = 0.0, $1252 = 0.0, $1253 = 0, $1254 = 0.0, $1255 = 0, $1256 = 0.0, $1257 = 0, $1258 = 0.0, $1259 = 0, $126 = 0, $1260 = 0.0; - var $1261 = 0, $1262 = 0.0, $1263 = 0.0, $1264 = 0.0, $1265 = 0.0, $1266 = 0.0, $1267 = 0.0, $1268 = 0.0, $1269 = 0.0, $127 = 0, $1270 = 0.0, $1271 = 0.0, $1272 = 0.0, $1273 = 0.0, $1274 = 0.0, $1275 = 0.0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0.0; - var $128 = 0, $1280 = 0, $1281 = 0.0, $1282 = 0, $1283 = 0.0, $1284 = 0, $1285 = 0.0, $1286 = 0, $1287 = 0, $1288 = 0.0, $1289 = 0.0, $129 = 0, $1290 = 0.0, $1291 = 0.0, $1292 = 0.0, $1293 = 0.0, $1294 = 0.0, $1295 = 0.0, $1296 = 0.0, $1297 = 0.0; - var $1298 = 0.0, $1299 = 0.0, $13 = 0, $130 = 0, $1300 = 0.0, $1301 = 0.0, $1302 = 0, $1303 = 0, $1304 = 0.0, $1305 = 0.0, $1306 = 0, $1307 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0; - var $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0.0, $149 = 0, $15 = 0.0, $150 = 0.0, $151 = 0, $152 = 0.0, $153 = 0.0, $154 = 0.0, $155 = 0, $156 = 0.0; - var $157 = 0, $158 = 0.0, $159 = 0.0, $16 = 0.0, $160 = 0.0, $161 = 0, $162 = 0.0, $163 = 0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0.0, $169 = 0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0, $174 = 0.0; - var $175 = 0, $176 = 0.0, $177 = 0.0, $178 = 0.0, $179 = 0, $18 = 0, $180 = 0.0, $181 = 0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0, $186 = 0.0, $187 = 0, $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0, $192 = 0.0; - var $193 = 0, $194 = 0.0, $195 = 0.0, $196 = 0.0, $197 = 0, $198 = 0.0, $199 = 0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0.0, $202 = 0.0, $203 = 0, $204 = 0.0, $205 = 0, $206 = 0.0, $207 = 0.0, $208 = 0.0, $209 = 0.0, $21 = 0; - var $210 = 0.0, $211 = 0.0, $212 = 0.0, $213 = 0.0, $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0; - var $229 = 0, $23 = 0, $230 = 0.0, $231 = 0, $232 = 0.0, $233 = 0.0, $234 = 0, $235 = 0.0, $236 = 0, $237 = 0.0, $238 = 0.0, $239 = 0.0, $24 = 0, $240 = 0, $241 = 0.0, $242 = 0.0, $243 = 0.0, $244 = 0, $245 = 0.0, $246 = 0; - var $247 = 0.0, $248 = 0.0, $249 = 0.0, $25 = 0, $250 = 0, $251 = 0.0, $252 = 0.0, $253 = 0.0, $254 = 0.0, $255 = 0.0, $256 = 0.0, $257 = 0, $258 = 0, $259 = 0.0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0; - var $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0.0, $27 = 0, $270 = 0.0, $271 = 0, $272 = 0, $273 = 0.0, $274 = 0, $275 = 0.0, $276 = 0.0, $277 = 0, $278 = 0.0, $279 = 0, $28 = 0, $280 = 0.0, $281 = 0, $282 = 0; - var $283 = 0.0, $284 = 0.0, $285 = 0.0, $286 = 0.0, $287 = 0.0, $288 = 0.0, $289 = 0, $29 = 0, $290 = 0.0, $291 = 0.0, $292 = 0, $293 = 0.0, $294 = 0, $295 = 0.0, $296 = 0, $297 = 0.0, $298 = 0, $299 = 0.0, $3 = 0, $30 = 0; - var $300 = 0, $301 = 0.0, $302 = 0, $303 = 0.0, $304 = 0, $305 = 0.0, $306 = 0, $307 = 0.0, $308 = 0, $309 = 0.0, $31 = 0, $310 = 0, $311 = 0.0, $312 = 0, $313 = 0, $314 = 0.0, $315 = 0, $316 = 0.0, $317 = 0, $318 = 0; - var $319 = 0.0, $32 = 0, $320 = 0, $321 = 0.0, $322 = 0.0, $323 = 0, $324 = 0.0, $325 = 0, $326 = 0.0, $327 = 0, $328 = 0.0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0.0, $336 = 0; - var $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0.0, $345 = 0, $346 = 0.0, $347 = 0, $348 = 0.0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0; - var $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0; - var $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0.0, $38 = 0, $380 = 0, $381 = 0, $382 = 0.0, $383 = 0.0, $384 = 0.0, $385 = 0.0, $386 = 0.0, $387 = 0.0, $388 = 0, $389 = 0.0, $39 = 0, $390 = 0; - var $391 = 0, $392 = 0.0, $393 = 0, $394 = 0.0, $395 = 0, $396 = 0.0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0; - var $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0; - var $427 = 0, $428 = 0, $429 = 0, $43 = 0.0, $430 = 0, $431 = 0.0, $432 = 0, $433 = 0.0, $434 = 0.0, $435 = 0.0, $436 = 0.0, $437 = 0.0, $438 = 0, $439 = 0, $44 = 0, $440 = 0.0, $441 = 0.0, $442 = 0, $443 = 0, $444 = 0.0; - var $445 = 0, $446 = 0, $447 = 0.0, $448 = 0.0, $449 = 0.0, $45 = 0.0, $450 = 0.0, $451 = 0.0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0.0, $457 = 0.0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0; - var $463 = 0.0, $464 = 0, $465 = 0, $466 = 0.0, $467 = 0.0, $468 = 0, $469 = 0, $47 = 0.0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0.0, $475 = 0, $476 = 0.0, $477 = 0.0, $478 = 0.0, $479 = 0, $48 = 0.0, $480 = 0.0; - var $481 = 0.0, $482 = 0.0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0.0, $490 = 0, $491 = 0.0, $492 = 0.0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0; - var $5 = 0, $50 = 0, $500 = 0, $501 = 0.0, $502 = 0.0, $503 = 0, $504 = 0, $505 = 0.0, $506 = 0.0, $507 = 0.0, $508 = 0, $509 = 0.0, $51 = 0.0, $510 = 0.0, $511 = 0, $512 = 0.0, $513 = 0.0, $514 = 0.0, $515 = 0, $516 = 0; - var $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0.0, $522 = 0.0, $523 = 0.0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0.0, $530 = 0.0, $531 = 0.0, $532 = 0, $533 = 0, $534 = 0; - var $535 = 0.0, $536 = 0.0, $537 = 0.0, $538 = 0, $539 = 0, $54 = 0.0, $540 = 0, $540$phi = 0, $541 = 0.0, $542 = 0, $543 = 0.0, $544 = 0, $545 = 0, $546 = 0.0, $547 = 0, $548 = 0.0, $549 = 0.0, $55 = 0.0, $550 = 0.0, $551 = 0; - var $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0.0, $561 = 0.0, $562 = 0.0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0.0, $569 = 0.0, $57 = 0.0; - var $570 = 0, $571 = 0, $572 = 0, $573 = 0.0, $574 = 0, $575 = 0.0, $576 = 0, $577 = 0.0, $578 = 0.0, $579 = 0.0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0.0, $587 = 0.0, $588 = 0.0; - var $589 = 0, $59 = 0.0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0.0, $600 = 0.0, $601 = 0.0, $602 = 0.0, $603 = 0, $604 = 0, $605 = 0; - var $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0.0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0.0, $618 = 0, $619 = 0.0, $62 = 0, $620 = 0.0, $621 = 0, $622 = 0.0, $623 = 0.0; - var $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0.0, $630 = 0, $631 = 0.0, $632 = 0, $633 = 0.0, $634 = 0.0, $635 = 0, $636 = 0.0, $637 = 0.0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0; - var $642 = 0, $643 = 0, $644 = 0.0, $645 = 0.0, $646 = 0, $647 = 0, $648 = 0.0, $649 = 0, $65 = 0.0, $650 = 0.0, $651 = 0.0, $652 = 0.0, $653 = 0.0, $654 = 0, $655 = 0.0, $656 = 0, $657 = 0.0, $658 = 0.0, $659 = 0.0, $66 = 0.0; - var $660 = 0, $661 = 0.0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0.0, $670 = 0, $671 = 0.0, $672 = 0.0, $673 = 0.0, $674 = 0, $675 = 0, $676 = 0, $677 = 0.0, $678 = 0.0; - var $679 = 0, $68 = 0, $680 = 0, $681 = 0.0, $682 = 0, $683 = 0.0, $684 = 0, $685 = 0.0, $686 = 0.0, $687 = 0.0, $688 = 0, $689 = 0.0, $69 = 0.0, $690 = 0, $691 = 0, $692 = 0.0, $693 = 0.0, $694 = 0, $695 = 0.0, $696 = 0.0; - var $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0.0, $702 = 0, $703 = 0.0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0.0, $709 = 0, $71 = 0.0, $710 = 0.0, $711 = 0.0, $712 = 0.0, $713 = 0; - var $714 = 0.0, $715 = 0, $716 = 0.0, $717 = 0.0, $718 = 0, $719 = 0.0, $72 = 0.0, $720 = 0, $721 = 0.0, $722 = 0, $723 = 0.0, $724 = 0.0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0.0, $730 = 0, $731 = 0; - var $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0.0, $741 = 0, $742 = 0, $743 = 0.0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0.0; - var $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0.0, $755 = 0.0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0; - var $769 = 0, $77 = 0.0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0.0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0; - var $787 = 0, $788 = 0, $789 = 0, $79 = 0.0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0.0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0; - var $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0.0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0.0, $82 = 0, $820 = 0, $821 = 0.0; - var $822 = 0.0, $823 = 0.0, $824 = 0.0, $825 = 0.0, $826 = 0, $827 = 0, $828 = 0, $829 = 0.0, $83 = 0.0, $830 = 0.0, $831 = 0, $832 = 0, $833 = 0.0, $834 = 0, $835 = 0, $836 = 0.0, $837 = 0.0, $838 = 0.0, $839 = 0.0, $84 = 0.0; - var $840 = 0.0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0.0, $850 = 0, $851 = 0, $852 = 0.0, $853 = 0.0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0; - var $859 = 0, $86 = 0, $860 = 0, $861 = 0.0, $862 = 0.0, $863 = 0, $864 = 0, $865 = 0.0, $866 = 0.0, $867 = 0.0, $868 = 0, $869 = 0.0, $87 = 0.0, $870 = 0.0, $871 = 0, $872 = 0.0, $873 = 0.0, $874 = 0.0, $875 = 0, $876 = 0; - var $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0.0, $882 = 0.0, $883 = 0.0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0.0, $890 = 0.0, $891 = 0, $892 = 0, $893 = 0, $894 = 0.0; - var $895 = 0.0, $896 = 0.0, $897 = 0, $898 = 0, $899 = 0, $899$phi = 0, $9 = 0, $90 = 0.0, $900 = 0.0, $901 = 0, $902 = 0.0, $903 = 0, $904 = 0, $905 = 0.0, $906 = 0, $907 = 0.0, $908 = 0.0, $909 = 0.0, $91 = 0.0, $910 = 0; - var $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0.0, $92 = 0, $920 = 0.0, $921 = 0.0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0.0, $928 = 0.0, $929 = 0; - var $93 = 0.0, $930 = 0, $931 = 0, $932 = 0.0, $933 = 0, $934 = 0.0, $935 = 0, $936 = 0.0, $937 = 0.0, $938 = 0.0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0.0, $946 = 0.0, $947 = 0.0; - var $948 = 0, $949 = 0, $95 = 0.0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0.0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0; - var $966 = 0, $967 = 0.0, $968 = 0.0, $969 = 0.0, $97 = 0.0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0.0, $976 = 0, $977 = 0.0, $978 = 0.0, $979 = 0, $98 = 0, $980 = 0.0, $981 = 0.0, $982 = 0, $983 = 0; - var $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0.0, $99 = 0.0, $990 = 0, $991 = 0.0, $992 = 0.0, $993 = 0, $994 = 0.0, $995 = 0.0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $avg$i = 0, $b$0$lcssa$i$i = 0, $b$0$lcssa$i$i40 = 0; - var $b$01$i = 0, $b$019$i = 0, $b$02$i$i = 0, $b$02$i$i32 = 0, $b$030$i = 0, $b$08$i$i = 0, $b$116$i = 0, $b$16$i$ph = 0, $b$23$i$ph = 0, $blocktype$0$i = 0, $brmerge = 0, $chn$01$i$us = 0, $chn$01$i65 = 0, $chn$01$us$i = 0, $chn$0136 = 0, $chn$031$i = 0, $chn$031$us$i = 0, $chn$1133 = 0, $chn$125$i = 0, $chn$2120 = 0; - var $chn$3127 = 0, $chn$4119 = 0, $chn$5114 = 0, $chn$6112 = 0, $dd$0$lcssa$i = 0, $dd$0$lcssa$i58 = 0, $dd$010$i = 0, $dd$06$i = 0, $dd_n$0$lcssa$i = 0, $dd_n$0$lcssa$i57 = 0, $eb = 0, $ebb$0$lcssa$i = 0.0, $ebb$0$lcssa$i$i = 0.0, $ebb$02$i$i = 0.0, $ebb$021$i = 0.0, $ecb$0$be$i = 0.0, $ecb$0$be$i$lcssa = 0.0, $ecb$0$be$i48 = 0.0, $ecb$0$be$i48$lcssa = 0.0, $ecb$0$lcssa$i = 0.0; - var $ecb$0$lcssa$i56 = 0.0, $ecb$08$i = 0.0, $ecb$09$i = 0.0, $ecb_limit1$0$i = 0.0, $ecb_limit_1$0$i = 0.0, $ecb_limit_2$0$i = 0.0, $en_short$i = 0, $exitcond = 0, $exitcond$i = 0, $exitcond$i$i = 0, $exitcond$i11 = 0, $exitcond$i17 = 0, $exitcond$i18 = 0, $exitcond$i68 = 0, $exitcond$i7 = 0, $exitcond$i8 = 0, $exitcond150 = 0, $exitcond151 = 0, $exitcond155 = 0, $exitcond156 = 0; - var $exitcond159 = 0, $exitcond160 = 0, $exitcond167 = 0, $exitcond168 = 0, $exitcond169 = 0, $exitcond170 = 0, $exitcond173 = 0, $exitcond180 = 0, $exitcond31$i = 0, $exitcond32$i = 0, $exitcond33$i = 0, $exitcond41$i = 0, $exitcond44$i = 0, $exitcond45$i = 0, $exitcond46$i = 0, $exitcond46$i25 = 0, $exitcond48$i = 0, $exitcond49$i = 0, $exitcond50$i = 0, $exitcond51$i = 0; - var $exitcond9$i = 0, $fabsf$i = 0.0, $factor$0$1$i = 0.0, $factor$0$2$i = 0.0, $factor$0$i = 0.0, $fftenergy = 0, $fftenergy_s = 0, $i$01$i$i = 0, $i$023$i = 0, $i$030$i = 0, $i$030$us$i = 0, $i$04$i$i = 0, $i$114$i = 0, $i$319$i = 0, $i$623$i = 0, $ispos$i$i = 0, $ispos$i$i52 = 0, $j$03$i = 0, $j$031$i = 0, $j$07$i$i = 0; - var $j$08$i = 0, $j$1$lcssa$i = 0, $j$1$lcssa$i$i = 0, $j$11$i$i = 0, $j$12$i = 0, $j$122$i = 0, $j$17$i = 0, $j$217$i = 0, $j$25$i = 0, $j$3$i = 0, $j$3$lcssa$i = 0, $j$34$i = 0, $j$34$i45 = 0, $j$39$i = 0, $k$020$i = 0, $k$1$i = 0, $k$1$lcssa$i = 0, $k$112$i = 0, $k$17$i = 0, $kk$010$i = 0; - var $kk$010$in$i = 0, $kk$013$i = 0, $kk$013$in$i = 0, $last_thm = 0, $loudness_power$02$i$i = 0.0, $m$0$i$i = 0.0, $m$0$i$i29 = 0.0, $m$0$lcssa$i = 0.0, $m$0$lcssa$i$i = 0.0, $m$020$i = 0.0, $m$03$i$i = 0.0, $m$1$i = 0.0, $m$1$i$i = 0.0, $m$1$i$i$lcssa = 0.0, $m$1$i$i34 = 0.0, $m$1$i$lcssa = 0.0, $m$1$i2$i = 0.0, $m$2$i$i = 0.0, $m$2$i$i35 = 0.0, $m$3$i$i = 0.0; - var $m$3$i$i42 = 0.0, $mask_idx_s$i = 0, $mr$0 = 0, $neg$i$i = 0, $neg$i$i53 = 0, $new_thmm = 0, $ns_attacks = 0, $ns_uselongblock$0$i = 0, $or$cond = 0, $or$cond$1$i = 0, $or$cond$2$i = 0, $or$cond$i = 0, $or$cond$i20 = 0, $or$cond3 = 0, $or$cond7$1$i = 0, $or$cond7$2$i = 0, $or$cond7$i = 0, $or$cond75 = 0, $p$017$i = 0.0, $p$1$i = 0.0; - var $p$1$i$lcssa = 0.0, $p$2$i = 0.0, $pe_l$02$i = 0.0, $pe_l$1$i = 0.0, $pe_l$1$i$lcssa = 0.0, $pe_s$04$i = 0.0, $pe_s$2$1$i = 0.0, $pe_s$2$2$i = 0.0, $pe_s$2$2$i$lcssa = 0.0, $pe_s$2$i = 0.0, $pf$018$i = 0, $pf$116$i = 0, $ppe$0 = 0, $prev_thm$0 = 0.0, $prev_thm$0$in = 0, $prev_thm$1 = 0.0, $ratio$0$i$i = 0.0, $ratio$0$i$i51 = 0.0, $sb$01$i = 0, $sb$0118 = 0; - var $sb$02$i = 0, $sb$03$i = 0, $sblock$0130 = 0, $sblock$1116 = 0, $scevgep = 0, $scevgep162 = 0, $scevgep165 = 0, $scevgep175 = 0, $scevgep178 = 0, $smax$i = 0, $smax$i$i = 0, $smax$i31 = 0, $storemerge$i$i = 0, $storemerge$i$i30 = 0, $sub_short_factor = 0, $t1$0 = 0.0, $t2$0 = 0.0, $thm$i = 0, $thr = 0, $totalenergy$06$i = 0.0; - var $type$0 = 0, $type$1 = 0, $uselongblock = 0, $wsamp_L = 0, $wsamp_S = 0, $x$1$1$i = 0.0, $x$1$10$i = 0.0, $x$1$2$i = 0.0, $x$1$3$i = 0.0, $x$1$4$i = 0.0, $x$1$5$i = 0.0, $x$1$6$i = 0.0, $x$1$7$i = 0.0, $x$1$8$i = 0.0, $x$1$9$i = 0.0, $x$1$i = 0.0, dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 26240|0; - $mask_idx_s$i = sp + 21624|0; - $thm$i = sp + 21368|0; - $avg$i = sp + 21112|0; - $en_short$i = sp + 21096|0; - $last_thm = sp + 20120|0; - $fftenergy = sp + 18068|0; - $fftenergy_s = sp + 16520|0; - $wsamp_L = sp + 8328|0; - $wsamp_S = sp + 2184|0; - $eb = sp + 1160|0; - $thr = sp + 136|0; - $sub_short_factor = sp + 88|0; - $ns_attacks = sp + 24|0; - $uselongblock = sp + 16|0; - $new_thmm = sp; - $0 = ((($gfc)) + 85800|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($gfc)) + 140|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3|0)==(0); - if ($4) { - $1192 = 0; - } else { - $5 = ((($gfc)) + 85804|0); - $6 = HEAP32[$5>>2]|0; - $1192 = $6; - } - $7 = ((($gfc)) + 192|0); - $8 = +HEAPF32[$7>>2]; - $9 = $8 > 0.0; - if ($9) { - $10 = ((($gfc)) + 200|0); - $11 = +HEAPF32[$10>>2]; - $12 = ((($gfc)) + 85796|0); - $13 = HEAP32[$12>>2]|0; - $14 = ((($13)) + 8|0); - $15 = +HEAPF32[$14>>2]; - $16 = $15 * $11; - $743 = $16; - } else { - $743 = 1.0; - } - dest=$ns_attacks; stop=dest+64|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - $17 = ((($gfc)) + 180|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($18|0)==(1); - if ($19) { - $417 = 4; - } else { - $20 = ((($gfc)) + 72|0); - $21 = HEAP32[$20>>2]|0; - $417 = $21; - } - $22 = ((($gfc)) + 25660|0); - _memcpy(($last_thm|0),($22|0),976)|0; - if ($4) { - $117 = 0; - } else { - $23 = ((($gfc)) + 85804|0); - $24 = HEAP32[$23>>2]|0; - $117 = $24; - } - $25 = ((($gfc)) + 72|0); - $26 = HEAP32[$25>>2]|0; - $27 = $19 ? 4 : $26; - _memset(($mask_idx_s$i|0),0,4608)|0; - $28 = ($26|0)>(0); - if ($28) { - $29 = ($27|0)>(2); - if ($29) { - $chn$031$us$i = 0; - while(1) { - $30 = (($buffer) + ($chn$031$us$i<<2)|0); - $31 = HEAP32[$30>>2]|0; - $i$030$us$i = 0; - while(1) { - $$sum$us$i = (($i$030$us$i) + 407)|0; - $42 = (($31) + ($$sum$us$i<<2)|0); - $43 = +HEAPF32[$42>>2]; - $$sum1$us$i = (($i$030$us$i) + 397)|0; - $44 = (($31) + ($$sum1$us$i<<2)|0); - $45 = +HEAPF32[$44>>2]; - $$sum2$us$i = (($i$030$us$i) + 418)|0; - $46 = (($31) + ($$sum2$us$i<<2)|0); - $47 = +HEAPF32[$46>>2]; - $48 = $47 + $45; - $49 = $48 * 1.7303260184043527E-17; - $$sum3$us$i = (($i$030$us$i) + 398)|0; - $50 = (($31) + ($$sum3$us$i<<2)|0); - $51 = +HEAPF32[$50>>2]; - $$sum4$us$i = (($i$030$us$i) + 417)|0; - $52 = (($31) + ($$sum4$us$i<<2)|0); - $53 = +HEAPF32[$52>>2]; - $54 = $53 + $51; - $55 = $54 * 0.017031719908118248; - $$sum1$us$1$i = (($i$030$us$i) + 399)|0; - $56 = (($31) + ($$sum1$us$1$i<<2)|0); - $57 = +HEAPF32[$56>>2]; - $$sum2$us$1$i = (($i$030$us$i) + 416)|0; - $58 = (($31) + ($$sum2$us$1$i<<2)|0); - $59 = +HEAPF32[$58>>2]; - $60 = $59 + $57; - $61 = $60 * 1.3495279640235235E-17; - $$sum3$us$1$i = (($i$030$us$i) + 400)|0; - $62 = (($31) + ($$sum3$us$1$i<<2)|0); - $63 = +HEAPF32[$62>>2]; - $$sum4$us$1$i = (($i$030$us$i) + 415)|0; - $64 = (($31) + ($$sum4$us$1$i<<2)|0); - $65 = +HEAPF32[$64>>2]; - $66 = $65 + $63; - $67 = $66 * 0.041807200759649277; - $$sum1$us$2$i = (($i$030$us$i) + 401)|0; - $68 = (($31) + ($$sum1$us$2$i<<2)|0); - $69 = +HEAPF32[$68>>2]; - $$sum2$us$2$i = (($i$030$us$i) + 414)|0; - $70 = (($31) + ($$sum2$us$2$i<<2)|0); - $71 = +HEAPF32[$70>>2]; - $72 = $71 + $69; - $73 = $72 * 6.7327796858492251E-17; - $$sum3$us$2$i = (($i$030$us$i) + 402)|0; - $74 = (($31) + ($$sum3$us$2$i<<2)|0); - $75 = +HEAPF32[$74>>2]; - $$sum4$us$2$i = (($i$030$us$i) + 413)|0; - $76 = (($31) + ($$sum4$us$2$i<<2)|0); - $77 = +HEAPF32[$76>>2]; - $78 = $77 + $75; - $79 = $78 * 0.087632402777671814; - $$sum1$us$3$i = (($i$030$us$i) + 403)|0; - $80 = (($31) + ($$sum1$us$3$i<<2)|0); - $81 = +HEAPF32[$80>>2]; - $$sum2$us$3$i = (($i$030$us$i) + 412)|0; - $82 = (($31) + ($$sum2$us$3$i<<2)|0); - $83 = +HEAPF32[$82>>2]; - $84 = $83 + $81; - $85 = $84 * 3.0835000291318875E-17; - $$sum3$us$3$i = (($i$030$us$i) + 404)|0; - $86 = (($31) + ($$sum3$us$3$i<<2)|0); - $87 = +HEAPF32[$86>>2]; - $$sum4$us$3$i = (($i$030$us$i) + 411)|0; - $88 = (($31) + ($$sum4$us$3$i<<2)|0); - $89 = +HEAPF32[$88>>2]; - $90 = $89 + $87; - $91 = $90 * 0.1863476037979126; - $$sum1$us$4$i = (($i$030$us$i) + 405)|0; - $92 = (($31) + ($$sum1$us$4$i<<2)|0); - $93 = +HEAPF32[$92>>2]; - $$sum2$us$4$i = (($i$030$us$i) + 410)|0; - $94 = (($31) + ($$sum2$us$4$i<<2)|0); - $95 = +HEAPF32[$94>>2]; - $96 = $95 + $93; - $97 = $96 * 1.1044240253100168E-16; - $$sum3$us$4$i = (($i$030$us$i) + 406)|0; - $98 = (($31) + ($$sum3$us$4$i<<2)|0); - $99 = +HEAPF32[$98>>2]; - $$sum4$us$4$i = (($i$030$us$i) + 409)|0; - $100 = (($31) + ($$sum4$us$4$i<<2)|0); - $101 = +HEAPF32[$100>>2]; - $102 = $101 + $99; - $103 = $102 * 0.62763798236846924; - $104 = $43 - $49; - $105 = $104 - $55; - $106 = $105 - $61; - $107 = $106 + $67; - $108 = $107 - $73; - $109 = $108 - $79; - $110 = $109 - $85; - $111 = $110 + $91; - $112 = $111 - $97; - $113 = $112 - $103; - $114 = ((($mask_idx_s$i) + (($chn$031$us$i*2304)|0)|0) + ($i$030$us$i<<2)|0); - HEAPF32[$114>>2] = $113; - $115 = (($i$030$us$i) + 1)|0; - $exitcond50$i = ($115|0)==(576); - if ($exitcond50$i) { - break; - } else { - $i$030$us$i = $115; - } - } - $32 = ((((($masking_ratio) + (($gr_out*976)|0)|0) + (($chn$031$us$i*488)|0)|0)) + 244|0); - $33 = (((($gfc)) + 26636|0) + (($chn$031$us$i*244)|0)|0); - _memcpy(($32|0),($33|0),244)|0; - $34 = ((($masking_ratio) + (($gr_out*976)|0)|0) + (($chn$031$us$i*488)|0)|0); - $35 = (((($gfc)) + 25660|0) + (($chn$031$us$i*244)|0)|0); - _memcpy(($34|0),($35|0),244)|0; - $36 = ((((($masking_MS_ratio) + (($gr_out*976)|0)|0) + (($chn$031$us$i*488)|0)|0)) + 244|0); - $37 = (($chn$031$us$i) + 2)|0; - $38 = (((($gfc)) + 26636|0) + (($37*244)|0)|0); - _memcpy(($36|0),($38|0),244)|0; - $39 = ((($masking_MS_ratio) + (($gr_out*976)|0)|0) + (($chn$031$us$i*488)|0)|0); - $40 = (((($gfc)) + 25660|0) + (($37*244)|0)|0); - _memcpy(($39|0),($40|0),244)|0; - $41 = (($chn$031$us$i) + 1)|0; - $exitcond51$i = ($41|0)==($26|0); - if ($exitcond51$i) { - break; - } else { - $chn$031$us$i = $41; - } - } - } else { - $chn$031$i = 0; - while(1) { - $145 = (($buffer) + ($chn$031$i<<2)|0); - $146 = HEAP32[$145>>2]|0; - $i$030$i = 0; - while(1) { - $$sum$i = (($i$030$i) + 407)|0; - $147 = (($146) + ($$sum$i<<2)|0); - $148 = +HEAPF32[$147>>2]; - $$sum1$i = (($i$030$i) + 397)|0; - $149 = (($146) + ($$sum1$i<<2)|0); - $150 = +HEAPF32[$149>>2]; - $$sum2$i = (($i$030$i) + 418)|0; - $151 = (($146) + ($$sum2$i<<2)|0); - $152 = +HEAPF32[$151>>2]; - $153 = $152 + $150; - $154 = $153 * 1.7303260184043527E-17; - $$sum3$i = (($i$030$i) + 398)|0; - $155 = (($146) + ($$sum3$i<<2)|0); - $156 = +HEAPF32[$155>>2]; - $$sum4$i = (($i$030$i) + 417)|0; - $157 = (($146) + ($$sum4$i<<2)|0); - $158 = +HEAPF32[$157>>2]; - $159 = $158 + $156; - $160 = $159 * 0.017031719908118248; - $$sum1$1$i = (($i$030$i) + 399)|0; - $161 = (($146) + ($$sum1$1$i<<2)|0); - $162 = +HEAPF32[$161>>2]; - $$sum2$1$i = (($i$030$i) + 416)|0; - $163 = (($146) + ($$sum2$1$i<<2)|0); - $164 = +HEAPF32[$163>>2]; - $165 = $164 + $162; - $166 = $165 * 1.3495279640235235E-17; - $$sum3$1$i = (($i$030$i) + 400)|0; - $167 = (($146) + ($$sum3$1$i<<2)|0); - $168 = +HEAPF32[$167>>2]; - $$sum4$1$i = (($i$030$i) + 415)|0; - $169 = (($146) + ($$sum4$1$i<<2)|0); - $170 = +HEAPF32[$169>>2]; - $171 = $170 + $168; - $172 = $171 * 0.041807200759649277; - $$sum1$2$i = (($i$030$i) + 401)|0; - $173 = (($146) + ($$sum1$2$i<<2)|0); - $174 = +HEAPF32[$173>>2]; - $$sum2$2$i = (($i$030$i) + 414)|0; - $175 = (($146) + ($$sum2$2$i<<2)|0); - $176 = +HEAPF32[$175>>2]; - $177 = $176 + $174; - $178 = $177 * 6.7327796858492251E-17; - $$sum3$2$i = (($i$030$i) + 402)|0; - $179 = (($146) + ($$sum3$2$i<<2)|0); - $180 = +HEAPF32[$179>>2]; - $$sum4$2$i = (($i$030$i) + 413)|0; - $181 = (($146) + ($$sum4$2$i<<2)|0); - $182 = +HEAPF32[$181>>2]; - $183 = $182 + $180; - $184 = $183 * 0.087632402777671814; - $$sum1$3$i = (($i$030$i) + 403)|0; - $185 = (($146) + ($$sum1$3$i<<2)|0); - $186 = +HEAPF32[$185>>2]; - $$sum2$3$i = (($i$030$i) + 412)|0; - $187 = (($146) + ($$sum2$3$i<<2)|0); - $188 = +HEAPF32[$187>>2]; - $189 = $188 + $186; - $190 = $189 * 3.0835000291318875E-17; - $$sum3$3$i = (($i$030$i) + 404)|0; - $191 = (($146) + ($$sum3$3$i<<2)|0); - $192 = +HEAPF32[$191>>2]; - $$sum4$3$i = (($i$030$i) + 411)|0; - $193 = (($146) + ($$sum4$3$i<<2)|0); - $194 = +HEAPF32[$193>>2]; - $195 = $194 + $192; - $196 = $195 * 0.1863476037979126; - $$sum1$4$i = (($i$030$i) + 405)|0; - $197 = (($146) + ($$sum1$4$i<<2)|0); - $198 = +HEAPF32[$197>>2]; - $$sum2$4$i = (($i$030$i) + 410)|0; - $199 = (($146) + ($$sum2$4$i<<2)|0); - $200 = +HEAPF32[$199>>2]; - $201 = $200 + $198; - $202 = $201 * 1.1044240253100168E-16; - $$sum3$4$i = (($i$030$i) + 406)|0; - $203 = (($146) + ($$sum3$4$i<<2)|0); - $204 = +HEAPF32[$203>>2]; - $$sum4$4$i = (($i$030$i) + 409)|0; - $205 = (($146) + ($$sum4$4$i<<2)|0); - $206 = +HEAPF32[$205>>2]; - $207 = $206 + $204; - $208 = $207 * 0.62763798236846924; - $209 = $148 - $154; - $210 = $209 - $160; - $211 = $210 - $166; - $212 = $211 + $172; - $213 = $212 - $178; - $214 = $213 - $184; - $215 = $214 - $190; - $216 = $215 + $196; - $217 = $216 - $202; - $218 = $217 - $208; - $219 = ((($mask_idx_s$i) + (($chn$031$i*2304)|0)|0) + ($i$030$i<<2)|0); - HEAPF32[$219>>2] = $218; - $220 = (($i$030$i) + 1)|0; - $exitcond48$i = ($220|0)==(576); - if ($exitcond48$i) { - break; - } else { - $i$030$i = $220; - } - } - $221 = ((((($masking_ratio) + (($gr_out*976)|0)|0) + (($chn$031$i*488)|0)|0)) + 244|0); - $222 = (((($gfc)) + 26636|0) + (($chn$031$i*244)|0)|0); - _memcpy(($221|0),($222|0),244)|0; - $223 = ((($masking_ratio) + (($gr_out*976)|0)|0) + (($chn$031$i*488)|0)|0); - $224 = (((($gfc)) + 25660|0) + (($chn$031$i*244)|0)|0); - _memcpy(($223|0),($224|0),244)|0; - $225 = (($chn$031$i) + 1)|0; - $exitcond49$i = ($225|0)==($26|0); - if ($exitcond49$i) { - break; - } else { - $chn$031$i = $225; - } - } - } - } - $116 = ($27|0)>(0); - if ($116) { - $118 = ($117|0)==(0|0); - $119 = ((($uselongblock)) + 4|0); - $120 = ((($avg$i)) + 4|0); - $121 = ((($thm$i)) + 4|0); - $122 = ((($avg$i)) + 8|0); - $123 = ((($thm$i)) + 8|0); - $124 = ((($avg$i)) + 12|0); - $125 = ((($avg$i)) + 16|0); - $126 = ((($avg$i)) + 20|0); - $127 = ((($avg$i)) + 24|0); - $128 = ((($avg$i)) + 28|0); - $129 = ((($avg$i)) + 32|0); - $130 = ((($avg$i)) + 36|0); - $131 = ((($avg$i)) + 40|0); - $132 = ((($avg$i)) + 44|0); - $133 = ((($en_short$i)) + 4|0); - $134 = ((($en_short$i)) + 8|0); - $135 = ((($en_short$i)) + 12|0); - $136 = ((($thm$i)) + 12|0); - $137 = ((($thm$i)) + 16|0); - $138 = ((($thm$i)) + 20|0); - $139 = ((($thm$i)) + 24|0); - $140 = ((($thm$i)) + 28|0); - $141 = ((($thm$i)) + 32|0); - $142 = ((($thm$i)) + 36|0); - $143 = ((($thm$i)) + 40|0); - $144 = ((($thm$i)) + 44|0); - $chn$125$i = 0; - while(1) { - ;HEAP32[$en_short$i>>2]=0|0;HEAP32[$en_short$i+4>>2]=0|0;HEAP32[$en_short$i+8>>2]=0|0;HEAP32[$en_short$i+12>>2]=0|0; - $226 = $chn$125$i & 1; - $227 = (($mask_idx_s$i) + (($226*2304)|0)|0); - $228 = ($chn$125$i|0)==(2); - if ($228) { - $i$114$i = 0; - while(1) { - $244 = (($mask_idx_s$i) + ($i$114$i<<2)|0); - $245 = +HEAPF32[$244>>2]; - $246 = (((($mask_idx_s$i)) + 2304|0) + ($i$114$i<<2)|0); - $247 = +HEAPF32[$246>>2]; - $248 = $247 + $245; - HEAPF32[$244>>2] = $248; - $249 = $245 - $247; - HEAPF32[$246>>2] = $249; - $250 = (($i$114$i) + 1)|0; - $exitcond$i = ($250|0)==(576); - if ($exitcond$i) { - break; - } else { - $i$114$i = $250; - } - } - } - $229 = (((((($gfc)) + 27636|0) + (($chn$125$i*36)|0)|0)) + 24|0); - $230 = +HEAPF32[$229>>2]; - HEAPF32[$avg$i>>2] = $230; - $231 = (((((($gfc)) + 27636|0) + (($chn$125$i*36)|0)|0)) + 16|0); - $232 = +HEAPF32[$231>>2]; - $233 = $230 / $232; - HEAPF32[$thm$i>>2] = $233; - $234 = (((((($gfc)) + 27636|0) + (($chn$125$i*36)|0)|0)) + 28|0); - $235 = +HEAPF32[$234>>2]; - HEAPF32[$120>>2] = $235; - $236 = (((((($gfc)) + 27636|0) + (($chn$125$i*36)|0)|0)) + 20|0); - $237 = +HEAPF32[$236>>2]; - $238 = $235 / $237; - HEAPF32[$121>>2] = $238; - $239 = $235 + $230; - $240 = (((((($gfc)) + 27636|0) + (($chn$125$i*36)|0)|0)) + 32|0); - $241 = +HEAPF32[$240>>2]; - HEAPF32[$122>>2] = $241; - $242 = $241 / $230; - HEAPF32[$123>>2] = $242; - $243 = $239 + $241; - HEAPF32[$en_short$i>>2] = $243; - $i$319$i = 0;$pf$018$i = $227; - while(1) { - $258 = ((($pf$018$i)) + 256|0); - $p$017$i = 1.0;$pf$116$i = $pf$018$i; - while(1) { - $259 = +HEAPF32[$pf$116$i>>2]; - $fabsf$i = (+Math_abs((+$259))); - $260 = $p$017$i < $fabsf$i; - $p$1$i = $260 ? $fabsf$i : $p$017$i; - $261 = ((($pf$116$i)) + 4|0); - $262 = ($261>>>0)<($258>>>0); - if ($262) { - $p$017$i = $p$1$i;$pf$116$i = $261; - } else { - $p$1$i$lcssa = $p$1$i; - break; - } - } - $263 = (($i$319$i) + 3)|0; - $264 = (($avg$i) + ($263<<2)|0); - HEAPF32[$264>>2] = $p$1$i$lcssa; - $265 = ((((($gfc)) + 27636|0) + (($chn$125$i*36)|0)|0) + ($i$319$i<<2)|0); - HEAPF32[$265>>2] = $p$1$i$lcssa; - $266 = (($i$319$i|0) / 3)&-1; - $267 = (($266) + 1)|0; - $268 = (($en_short$i) + ($267<<2)|0); - $269 = +HEAPF32[$268>>2]; - $270 = $269 + $p$1$i$lcssa; - HEAPF32[$268>>2] = $270; - $271 = (($i$319$i) + 1)|0; - $272 = (($avg$i) + ($271<<2)|0); - $273 = +HEAPF32[$272>>2]; - $274 = $p$1$i$lcssa > $273; - if ($274) { - $275 = $p$1$i$lcssa / $273; - $p$2$i = $275; - } else { - $276 = $p$1$i$lcssa * 10.0; - $277 = $273 > $276; - if ($277) { - $278 = $273 / $276; - $p$2$i = $278; - } else { - $p$2$i = 0.0; - } - } - $279 = (($thm$i) + ($263<<2)|0); - HEAPF32[$279>>2] = $p$2$i; - $exitcond41$i = ($271|0)==(9); - if ($exitcond41$i) { - break; - } else { - $i$319$i = $271;$pf$018$i = $258; - } - } - $251 = +HEAPF32[$124>>2]; - $252 = +HEAPF32[$125>>2]; - $253 = $252 + $251; - $254 = +HEAPF32[$126>>2]; - $255 = $253 + $254; - $256 = $254 * 6.0; - $257 = $256 < $255; - if ($257) { - $280 = $252 * 6.0; - $281 = $280 < $255; - if ($281) { - $factor$0$i = 0.25; - } else { - $factor$0$i = 0.5; - } - } else { - $factor$0$i = 1.0; - } - $282 = (($sub_short_factor) + (($chn$125$i*12)|0)|0); - HEAPF32[$282>>2] = $factor$0$i; - $283 = +HEAPF32[$127>>2]; - $284 = +HEAPF32[$128>>2]; - $285 = $284 + $283; - $286 = +HEAPF32[$129>>2]; - $287 = $285 + $286; - $288 = $286 * 6.0; - $289 = $288 < $287; - if ($289) { - $379 = $284 * 6.0; - $380 = $379 < $287; - if ($380) { - $factor$0$1$i = 0.25; - } else { - $factor$0$1$i = 0.5; - } - } else { - $factor$0$1$i = 1.0; - } - $381 = (((($sub_short_factor) + (($chn$125$i*12)|0)|0)) + 4|0); - HEAPF32[$381>>2] = $factor$0$1$i; - $382 = +HEAPF32[$130>>2]; - $383 = +HEAPF32[$131>>2]; - $384 = $383 + $382; - $385 = +HEAPF32[$132>>2]; - $386 = $384 + $385; - $387 = $385 * 6.0; - $388 = $387 < $386; - if ($388) { - $389 = $383 * 6.0; - $390 = $389 < $386; - if ($390) { - $factor$0$2$i = 0.25; - } else { - $factor$0$2$i = 0.5; - } - } else { - $factor$0$2$i = 1.0; - } - $391 = (((($sub_short_factor) + (($chn$125$i*12)|0)|0)) + 8|0); - HEAPF32[$391>>2] = $factor$0$2$i; - if (!($118)) { - $290 = +HEAPF32[$thm$i>>2]; - $291 = +HEAPF32[$121>>2]; - $292 = $290 < $291; - $x$1$i = $292 ? $291 : $290; - $293 = +HEAPF32[$123>>2]; - $294 = $x$1$i < $293; - $x$1$1$i = $294 ? $293 : $x$1$i; - $295 = +HEAPF32[$136>>2]; - $296 = $x$1$1$i < $295; - $x$1$2$i = $296 ? $295 : $x$1$1$i; - $297 = +HEAPF32[$137>>2]; - $298 = $x$1$2$i < $297; - $x$1$3$i = $298 ? $297 : $x$1$2$i; - $299 = +HEAPF32[$138>>2]; - $300 = $x$1$3$i < $299; - $x$1$4$i = $300 ? $299 : $x$1$3$i; - $301 = +HEAPF32[$139>>2]; - $302 = $x$1$4$i < $301; - $x$1$5$i = $302 ? $301 : $x$1$4$i; - $303 = +HEAPF32[$140>>2]; - $304 = $x$1$5$i < $303; - $x$1$6$i = $304 ? $303 : $x$1$5$i; - $305 = +HEAPF32[$141>>2]; - $306 = $x$1$6$i < $305; - $x$1$7$i = $306 ? $305 : $x$1$6$i; - $307 = +HEAPF32[$142>>2]; - $308 = $x$1$7$i < $307; - $x$1$8$i = $308 ? $307 : $x$1$7$i; - $309 = +HEAPF32[$143>>2]; - $310 = $x$1$8$i < $309; - $x$1$9$i = $310 ? $309 : $x$1$8$i; - $311 = +HEAPF32[$144>>2]; - $312 = $x$1$9$i < $311; - $x$1$10$i = $312 ? $311 : $x$1$9$i; - $313 = (((($117)) + 197112|0) + ($chn$125$i<<3)|0); - $314 = +HEAPF64[$313>>3]; - $315 = ((((($117)) + 197144|0) + ($gr_out<<5)|0) + ($chn$125$i<<3)|0); - HEAPF64[$315>>3] = $314; - $316 = $x$1$10$i; - HEAPF64[$313>>3] = $316; - } - $317 = HEAP32[$0>>2]|0; - $318 = (((($317)) + 6480|0) + ($chn$125$i<<2)|0); - $319 = +HEAPF32[$318>>2]; - $i$623$i = 0; - while(1) { - $330 = (($i$623$i|0) / 3)&-1; - $331 = ((($ns_attacks) + ($chn$125$i<<4)|0) + ($330<<2)|0); - $332 = HEAP32[$331>>2]|0; - $333 = ($332|0)==(0); - if ($333) { - $334 = (($thm$i) + ($i$623$i<<2)|0); - $335 = +HEAPF32[$334>>2]; - $336 = $335 > $319; - if ($336) { - $337 = (($i$623$i|0) % 3)&-1; - $338 = (($337) + 1)|0; - HEAP32[$331>>2] = $338; - } - } - $339 = (($i$623$i) + 1)|0; - $exitcond44$i = ($339|0)==(12); - if ($exitcond44$i) { - break; - } else { - $i$623$i = $339; - } - } - $320 = (($ns_attacks) + ($chn$125$i<<4)|0); - $321 = +HEAPF32[$en_short$i>>2]; - $322 = +HEAPF32[$133>>2]; - $323 = $321 > $322; - $324 = $323 ? $321 : $322; - $325 = $324 < 4.0E+4; - $326 = $322 * 1.7000000476837158; - $327 = $321 < $326; - $or$cond$i = $327 & $325; - $328 = $321 * 1.7000000476837158; - $329 = $322 < $328; - $or$cond7$i = $329 & $or$cond$i; - if ($or$cond7$i) { - $340 = HEAP32[$320>>2]|0; - $341 = (((($ns_attacks) + ($chn$125$i<<4)|0)) + 4|0); - $342 = HEAP32[$341>>2]|0; - $343 = ($340|0)>($342|0); - if (!($343)) { - HEAP32[$320>>2] = 0; - } - HEAP32[$341>>2] = 0; - } - $344 = +HEAPF32[$134>>2]; - $345 = $322 > $344; - $346 = $345 ? $322 : $344; - $347 = $346 < 4.0E+4; - $348 = $344 * 1.7000000476837158; - $349 = $322 < $348; - $or$cond$1$i = $349 & $347; - $350 = $344 < $326; - $or$cond7$1$i = $350 & $or$cond$1$i; - if ($or$cond7$1$i) { - $$pre61$i = (((($ns_attacks) + ($chn$125$i<<4)|0)) + 8|0); - HEAP32[$$pre61$i>>2] = 0; - } - $392 = +HEAPF32[$135>>2]; - $393 = $344 > $392; - $394 = $393 ? $344 : $392; - $395 = $394 < 4.0E+4; - $396 = $392 * 1.7000000476837158; - $397 = $344 < $396; - $or$cond$2$i = $397 & $395; - $398 = $392 < $348; - $or$cond7$2$i = $398 & $or$cond$2$i; - if ($or$cond7$2$i) { - $$pre63$i = (((($ns_attacks) + ($chn$125$i<<4)|0)) + 12|0); - HEAP32[$$pre63$i>>2] = 0; - } - $399 = HEAP32[$320>>2]|0; - $400 = (((($gfc)) + 27780|0) + ($chn$125$i<<2)|0); - $351 = HEAP32[$400>>2]|0; - $401 = ($399|0)>($351|0); - if ($401) { - $354 = $399; - } else { - HEAP32[$320>>2] = 0; - $354 = 0; - } - $352 = ($351|0)==(3); - $$phi$trans$insert$i = (((($ns_attacks) + ($chn$125$i<<4)|0)) + 4|0); - $$pre$i = HEAP32[$$phi$trans$insert$i>>2]|0; - if ($352) { - label = 47; - } else { - $353 = (($$pre$i) + ($354))|0; - $355 = (((($ns_attacks) + ($chn$125$i<<4)|0)) + 8|0); - $356 = HEAP32[$355>>2]|0; - $357 = (($353) + ($356))|0; - $358 = (((($ns_attacks) + ($chn$125$i<<4)|0)) + 12|0); - $359 = HEAP32[$358>>2]|0; - $360 = (0 - ($359))|0; - $361 = ($357|0)==($360|0); - if ($361) { - $ns_uselongblock$0$i = 1; - } else { - label = 47; - } - } - do { - if ((label|0) == 47) { - label = 0; - $362 = ($$pre$i|0)==(0); - do { - if ($362) { - $367 = 0; - } else { - $363 = ($354|0)==(0); - if ($363) { - $367 = $$pre$i; - break; - } - HEAP32[$$phi$trans$insert$i>>2] = 0; - $367 = 0; - } - } while(0); - $364 = (((($ns_attacks) + ($chn$125$i<<4)|0)) + 8|0); - $365 = HEAP32[$364>>2]|0; - $366 = ($365|0)==(0); - if ($366) { - $ns_uselongblock$0$i = 0; - break; - } - $368 = ($367|0)==(0); - if (!($368)) { - HEAP32[$364>>2] = 0; - $ns_uselongblock$0$i = 0; - break; - } - $369 = (((($ns_attacks) + ($chn$125$i<<4)|0)) + 12|0); - $370 = HEAP32[$369>>2]|0; - $371 = ($370|0)==(0); - if ($371) { - $ns_uselongblock$0$i = 0; - break; - } - HEAP32[$369>>2] = 0; - $ns_uselongblock$0$i = 0; - } - } while(0); - $372 = ($chn$125$i|0)<(2); - do { - if ($372) { - $373 = (($uselongblock) + ($chn$125$i<<2)|0); - HEAP32[$373>>2] = $ns_uselongblock$0$i; - } else { - $374 = ($ns_uselongblock$0$i|0)==(0); - if (!($374)) { - break; - } - HEAP32[$119>>2] = 0; - HEAP32[$uselongblock>>2] = 0; - } - } while(0); - $375 = (((($gfc)) + 27620|0) + ($chn$125$i<<2)|0); - $376 = HEAP32[$375>>2]|0; - $377 = (($energy) + ($chn$125$i<<2)|0); - HEAP32[$377>>2] = $376; - $378 = (($chn$125$i) + 1)|0; - $exitcond46$i = ($378|0)==($27|0); - if ($exitcond46$i) { - break; - } else { - $chn$125$i = $378; - } - } - } - $402 = ((($gfc)) + 184|0); - $403 = HEAP32[$402>>2]|0; - $404 = ($403|0)==(1); - if ($404) { - $405 = HEAP32[$uselongblock>>2]|0; - $406 = ($405|0)==(0); - $$pre8$i = ((($uselongblock)) + 4|0); - $407 = HEAP32[$$pre8$i>>2]|0; - $408 = ($407|0)==(0); - $or$cond75 = $406 | $408; - if ($or$cond75) { - HEAP32[$$pre8$i>>2] = 0; - HEAP32[$uselongblock>>2] = 0; - } - } - $409 = HEAP32[$25>>2]|0; - $410 = ($409|0)>(0); - do { - if ($410) { - if ((($403|0) == 3)) { - $chn$01$i$us = 0; - while(1) { - $411 = (($uselongblock) + ($chn$01$i$us<<2)|0); - HEAP32[$411>>2] = 0; - $412 = (($chn$01$i$us) + 1)|0; - $413 = ($412|0)<($409|0); - if ($413) { - $chn$01$i$us = $412; - } else { - break; - } - } - } else if ((($403|0) == 2)) { - $chn$01$us$i = 0; - while(1) { - $414 = (($uselongblock) + ($chn$01$us$i<<2)|0); - HEAP32[$414>>2] = 1; - $415 = (($chn$01$us$i) + 1)|0; - $416 = ($415|0)<($409|0); - if ($416) { - $chn$01$us$i = $415; - } else { - break; - } - } - } else { - break; - } - } - } while(0); - $418 = ($417|0)>(0); - if ($418) { - $419 = ((($gfc)) + 85796|0); - $420 = ((($thm$i)) + 4|0); - $421 = ((($gfc)) + 84908|0); - $$pre37$i = ((($avg$i)) + 4|0); - $422 = ((($gfc)) + 85804|0); - $chn$0136 = 0; - while(1) { - $423 = $chn$0136 & 1; - $424 = (($wsamp_L) + ($423<<12)|0); - $425 = HEAP32[$2>>2]|0; - $426 = ($425|0)==(0); - if ($426) { - $460 = 0; - } else { - $427 = HEAP32[$422>>2]|0; - $460 = $427; - } - $428 = ($chn$0136|0)<(2); - if ($428) { - _fft_long($gfc,$424,$chn$0136,$buffer); - } else { - $429 = ($chn$0136|0)==(2); - if ($429) { - $$sum73 = (($423) + 1)|0; - $j$08$i = 1023; - while(1) { - $430 = ((($wsamp_L) + ($423<<12)|0) + ($j$08$i<<2)|0); - $431 = +HEAPF32[$430>>2]; - $432 = ((($wsamp_L) + ($$sum73<<12)|0) + ($j$08$i<<2)|0); - $433 = +HEAPF32[$432>>2]; - $434 = $433 + $431; - $435 = $434 * 0.70710676908493042; - HEAPF32[$430>>2] = $435; - $436 = $431 - $433; - $437 = $436 * 0.70710676908493042; - HEAPF32[$432>>2] = $437; - $438 = (($j$08$i) + -1)|0; - $439 = ($j$08$i|0)>(0); - if ($439) { - $j$08$i = $438; - } else { - break; - } - } - } - } - $440 = +HEAPF32[$424>>2]; - $441 = $440 * $440; - HEAPF32[$fftenergy>>2] = $441; - $j$17$i = 511; - while(1) { - $442 = (512 - ($j$17$i))|0; - $443 = ((($wsamp_L) + ($423<<12)|0) + ($442<<2)|0); - $444 = +HEAPF32[$443>>2]; - $445 = (($j$17$i) + 512)|0; - $446 = ((($wsamp_L) + ($423<<12)|0) + ($445<<2)|0); - $447 = +HEAPF32[$446>>2]; - $448 = $444 * $444; - $449 = $447 * $447; - $450 = $449 + $448; - $451 = $450 * 0.5; - $452 = (($fftenergy) + ($442<<2)|0); - HEAPF32[$452>>2] = $451; - $453 = (($j$17$i) + -1)|0; - $454 = ($j$17$i|0)>(0); - if ($454) { - $j$17$i = $453; - } else { - $j$25$i = 11;$totalenergy$06$i = 0.0; - break; - } - } - while(1) { - $455 = (($fftenergy) + ($j$25$i<<2)|0); - $456 = +HEAPF32[$455>>2]; - $457 = $456 + $totalenergy$06$i; - $458 = (($j$25$i) + 1)|0; - $exitcond9$i = ($458|0)==(513); - if ($exitcond9$i) { - $$lcssa229 = $457; - break; - } else { - $j$25$i = $458;$totalenergy$06$i = $457; - } - } - $459 = (((($gfc)) + 27620|0) + ($chn$0136<<2)|0); - HEAPF32[$459>>2] = $$lcssa229; - $461 = ($460|0)==(0|0); - if (!($461)) { - $j$34$i = 0; - while(1) { - $462 = ((((($460)) + 90936|0) + ($chn$0136<<13)|0) + ($j$34$i<<3)|0); - $463 = +HEAPF64[$462>>3]; - $464 = (((((($460)) + 123704|0) + ($gr_out<<15)|0) + ($chn$0136<<13)|0) + ($j$34$i<<3)|0); - HEAPF64[$464>>3] = $463; - $465 = (($fftenergy) + ($j$34$i<<2)|0); - $466 = +HEAPF32[$465>>2]; - $467 = $466; - HEAPF64[$462>>3] = $467; - $468 = (($j$34$i) + 1)|0; - $exitcond$i8 = ($468|0)==(513); - if ($exitcond$i8) { - break; - } else { - $j$34$i = $468; - } - } - } - if ($428) { - $469 = (((($gfc)) + 27612|0) + ($chn$0136<<2)|0); - $470 = HEAP32[$469>>2]|0; - $471 = ((((($gfc)) + 27804|0) + ($gr_out<<3)|0) + ($chn$0136<<2)|0); - HEAP32[$471>>2] = $470; - $472 = HEAP32[$419>>2]|0; - $i$01$i$i = 0;$loudness_power$02$i$i = 0.0; - while(1) { - $473 = (($fftenergy) + ($i$01$i$i<<2)|0); - $474 = +HEAPF32[$473>>2]; - $475 = (((($472)) + 724|0) + ($i$01$i$i<<2)|0); - $476 = +HEAPF32[$475>>2]; - $477 = $476 * $474; - $478 = $477 + $loudness_power$02$i$i; - $479 = (($i$01$i$i) + 1)|0; - $exitcond$i$i = ($479|0)==(512); - if ($exitcond$i$i) { - $$lcssa230 = $478; - break; - } else { - $i$01$i$i = $479;$loudness_power$02$i$i = $478; - } - } - $480 = $$lcssa230; - $481 = $480 * 8.9748713435966334E-12; - $482 = $481; - HEAPF32[$469>>2] = $482; - } - $483 = HEAP32[$0>>2]|0; - $484 = ((($483)) + 2148|0); - $485 = HEAP32[$484>>2]|0; - $486 = ($485|0)>(0); - if ($486) { - $b$08$i$i = 0;$j$07$i$i = 0; - while(1) { - $487 = (((($483)) + 1716|0) + ($b$08$i$i<<2)|0); - $488 = HEAP32[$487>>2]|0; - $489 = ($488|0)>(0); - if ($489) { - $ebb$02$i$i = 0.0;$i$04$i$i = 0;$j$11$i$i = $j$07$i$i;$m$03$i$i = 0.0; - while(1) { - $490 = (($fftenergy) + ($j$11$i$i<<2)|0); - $491 = +HEAPF32[$490>>2]; - $492 = $491 + $ebb$02$i$i; - $493 = $m$03$i$i < $491; - $m$1$i$i = $493 ? $491 : $m$03$i$i; - $494 = (($i$04$i$i) + 1)|0; - $495 = (($j$11$i$i) + 1)|0; - $exitcond32$i = ($494|0)==($488|0); - if ($exitcond32$i) { - $$lcssa231 = $492;$m$1$i$i$lcssa = $m$1$i$i; - break; - } else { - $ebb$02$i$i = $492;$i$04$i$i = $494;$j$11$i$i = $495;$m$03$i$i = $m$1$i$i; - } - } - $496 = ($488|0)>(1); - $smax$i$i = $496 ? $488 : 1; - $497 = (($smax$i$i) + ($j$07$i$i))|0; - $ebb$0$lcssa$i$i = $$lcssa231;$j$1$lcssa$i$i = $497;$m$0$lcssa$i$i = $m$1$i$i$lcssa; - } else { - $ebb$0$lcssa$i$i = 0.0;$j$1$lcssa$i$i = $j$07$i$i;$m$0$lcssa$i$i = 0.0; - } - $498 = ((($eb) + ($chn$0136<<8)|0) + ($b$08$i$i<<2)|0); - HEAPF32[$498>>2] = $ebb$0$lcssa$i$i; - $499 = (($thm$i) + ($b$08$i$i<<2)|0); - HEAPF32[$499>>2] = $m$0$lcssa$i$i; - $500 = (((($483)) + 512|0) + ($b$08$i$i<<2)|0); - $501 = +HEAPF32[$500>>2]; - $502 = $501 * $ebb$0$lcssa$i$i; - $503 = (($avg$i) + ($b$08$i$i<<2)|0); - HEAPF32[$503>>2] = $502; - $504 = (($b$08$i$i) + 1)|0; - $exitcond33$i = ($504|0)==($485|0); - if ($exitcond33$i) { - break; - } else { - $b$08$i$i = $504;$j$07$i$i = $j$1$lcssa$i$i; - } - } - $$pre$i12 = +HEAPF32[$avg$i>>2]; - $$pre34$i = +HEAPF32[$$pre37$i>>2]; - $506 = $$pre34$i;$507 = $$pre$i12; - } else { - $506 = 0.0;$507 = 0.0; - } - $505 = $507 + $506; - $508 = $505 > 0.0; - if ($508) { - $509 = +HEAPF32[$thm$i>>2]; - $510 = +HEAPF32[$420>>2]; - $511 = $509 < $510; - $m$0$i$i = $511 ? $510 : $509; - $512 = $m$0$i$i * 2.0; - $513 = $512 - $505; - $514 = $513 * 20.0; - $515 = ((($483)) + 1716|0); - $516 = HEAP32[$515>>2]|0; - $517 = ((($483)) + 1720|0); - $518 = HEAP32[$517>>2]|0; - $519 = (($516) + -1)|0; - $520 = (($519) + ($518))|0; - $521 = (+($520|0)); - $522 = $521 * $505; - $523 = $514 / $522; - $524 = (~~(($523))); - $525 = ($524|0)>(8); - $526 = $524&255; - $527 = $525 ? 8 : $526; - $storemerge$i$i = $527; - } else { - $storemerge$i$i = 0; - } - HEAP8[$mask_idx_s$i>>0] = $storemerge$i$i; - $528 = (($485) + -1)|0; - $529 = ($528|0)>(1); - $530 = +HEAPF32[$$pre37$i>>2]; - $531 = $530 + $507; - if ($529) { - $532 = ($528|0)>(2); - $537 = $531;$540 = 0;$569 = $530;$b$02$i$i = 1; - while(1) { - $533 = (($b$02$i$i) + 1)|0; - $534 = (($avg$i) + ($533<<2)|0); - $535 = +HEAPF32[$534>>2]; - $536 = $535 + $537; - $538 = $536 > 0.0; - if ($538) { - $539 = (($thm$i) + ($540<<2)|0); - $541 = +HEAPF32[$539>>2]; - $542 = (($thm$i) + ($b$02$i$i<<2)|0); - $543 = +HEAPF32[$542>>2]; - $544 = $541 < $543; - $m$1$i2$i = $544 ? $543 : $541; - $545 = (($thm$i) + ($533<<2)|0); - $546 = +HEAPF32[$545>>2]; - $547 = $m$1$i2$i < $546; - $m$2$i$i = $547 ? $546 : $m$1$i2$i; - $548 = $m$2$i$i * 3.0; - $549 = $548 - $536; - $550 = $549 * 20.0; - $551 = (((($483)) + 1716|0) + ($540<<2)|0); - $552 = HEAP32[$551>>2]|0; - $553 = (((($483)) + 1716|0) + ($b$02$i$i<<2)|0); - $554 = HEAP32[$553>>2]|0; - $555 = (((($483)) + 1716|0) + ($533<<2)|0); - $556 = HEAP32[$555>>2]|0; - $557 = (($552) + -1)|0; - $558 = (($557) + ($554))|0; - $559 = (($558) + ($556))|0; - $560 = (+($559|0)); - $561 = $560 * $536; - $562 = $550 / $561; - $563 = (~~(($562))); - $564 = ($563|0)>(8); - $565 = $563&255; - $566 = $564 ? 8 : $565; - $$sink$i$i = $566; - } else { - $$sink$i$i = 0; - } - $567 = (($mask_idx_s$i) + ($b$02$i$i)|0); - HEAP8[$567>>0] = $$sink$i$i; - $568 = $535 + $569; - $exitcond173 = ($533|0)==($528|0); - if ($exitcond173) { - $$lcssa232 = $568; - break; - } else { - $540$phi = $b$02$i$i;$537 = $568;$569 = $535;$b$02$i$i = $533;$540 = $540$phi; - } - } - $smax$i = $532 ? $528 : 2; - $570 = (($smax$i) + -1)|0; - $$lcssa$i$i = $570;$$lcssa1$i$i = $$lcssa232;$b$0$lcssa$i$i = $smax$i; - } else { - $$lcssa$i$i = 0;$$lcssa1$i$i = $531;$b$0$lcssa$i$i = 1; - } - $571 = $$lcssa1$i$i > 0.0; - if ($571) { - $572 = (($thm$i) + ($$lcssa$i$i<<2)|0); - $573 = +HEAPF32[$572>>2]; - $574 = (($thm$i) + ($b$0$lcssa$i$i<<2)|0); - $575 = +HEAPF32[$574>>2]; - $576 = $573 < $575; - $m$3$i$i = $576 ? $575 : $573; - $577 = $m$3$i$i * 2.0; - $578 = $577 - $$lcssa1$i$i; - $579 = $578 * 20.0; - $580 = (((($483)) + 1716|0) + ($$lcssa$i$i<<2)|0); - $581 = HEAP32[$580>>2]|0; - $582 = (((($483)) + 1716|0) + ($b$0$lcssa$i$i<<2)|0); - $583 = HEAP32[$582>>2]|0; - $584 = (($581) + -1)|0; - $585 = (($584) + ($583))|0; - $586 = (+($585|0)); - $587 = $586 * $$lcssa1$i$i; - $588 = $579 / $587; - $589 = (~~(($588))); - $590 = ($589|0)>(8); - $591 = $589&255; - $592 = $590 ? 8 : $591; - $$sink7$i$i = $592; - } else { - $$sink7$i$i = 0; - } - $593 = (($mask_idx_s$i) + ($b$0$lcssa$i$i)|0); - HEAP8[$593>>0] = $$sink7$i$i; - if ($486) { - $594 = ((($483)) + 2156|0); - $595 = (((($gfc)) + 27796|0) + ($423<<2)|0); - $b$019$i = 0;$k$020$i = 0; - while(1) { - $599 = (($483) + ($b$019$i<<2)|0); - $600 = +HEAPF32[$599>>2]; - $601 = +HEAPF32[$421>>2]; - $602 = $601 * $600; - $603 = (((($483)) + 1204|0) + ($b$019$i<<3)|0); - $604 = HEAP32[$603>>2]|0; - $605 = (((((($483)) + 1204|0) + ($b$019$i<<3)|0)) + 4|0); - $606 = HEAP32[$605>>2]|0; - $607 = (($mask_idx_s$i) + ($b$019$i)|0); - $608 = HEAP8[$607>>0]|0; - $609 = $608&255; - $610 = (11448 + ($609<<2)|0); - $611 = HEAP32[$610>>2]|0; - $612 = (($mask_idx_s$i) + ($604)|0); - $613 = HEAP8[$612>>0]|0; - $614 = $613&255; - $615 = HEAP32[$594>>2]|0; - $616 = (($615) + ($k$020$i<<2)|0); - $617 = +HEAPF32[$616>>2]; - $618 = ((($eb) + ($chn$0136<<8)|0) + ($604<<2)|0); - $619 = +HEAPF32[$618>>2]; - $620 = $619 * $617; - $621 = (11488 + ($614<<2)|0); - $622 = +HEAPF32[$621>>2]; - $623 = $620 * $622; - $k$17$i = (($k$020$i) + 1)|0; - $624 = ($604|0)<($606|0); - if ($624) { - $630 = $615;$dd$010$i = $614;$ecb$09$i = $623;$k$112$i = $k$17$i;$kk$013$in$i = $604; - while(1) { - $kk$013$i = (($kk$013$in$i) + 1)|0; - $625 = (($mask_idx_s$i) + ($kk$013$i)|0); - $626 = HEAP8[$625>>0]|0; - $627 = $626&255; - $628 = (($627) + ($dd$010$i))|0; - $629 = (($630) + ($k$112$i<<2)|0); - $631 = +HEAPF32[$629>>2]; - $632 = ((($eb) + ($chn$0136<<8)|0) + ($kk$013$i<<2)|0); - $633 = +HEAPF32[$632>>2]; - $634 = $633 * $631; - $635 = (11488 + ($627<<2)|0); - $636 = +HEAPF32[$635>>2]; - $637 = $634 * $636; - $638 = (($kk$013$i) - ($b$019$i))|0; - $639 = $ecb$09$i < 0.0; - $$01$i$i = $639 ? 0.0 : $ecb$09$i; - $640 = $637 < 0.0; - $$02$i$i = $640 ? 0.0 : $637; - $641 = !($$01$i$i <= 0.0); - do { - if ($641) { - $642 = !($$02$i$i <= 0.0); - if (!($642)) { - $ecb$0$be$i = $$01$i$i; - break; - } - $643 = $$02$i$i > $$01$i$i; - $644 = $$02$i$i / $$01$i$i; - $645 = $$01$i$i / $$02$i$i; - $ratio$0$i$i = $643 ? $644 : $645; - $ispos$i$i = ($638|0)>(-1); - $neg$i$i = (0 - ($638))|0; - $646 = $ispos$i$i ? $638 : $neg$i$i; - $647 = ($646|0)>($611|0); - if ($647) { - $659 = +HEAPF32[11576>>2]; - $660 = $ratio$0$i$i < $659; - if ($660) { - $661 = $$02$i$i + $$01$i$i; - $ecb$0$be$i = $661; - break; - } else { - $$1$i$i = $643 ? $$02$i$i : $$01$i$i; - $ecb$0$be$i = $$1$i$i; - break; - } - } else { - $648 = +HEAPF32[11528>>2]; - $649 = !($ratio$0$i$i >= $648); - if ($649) { - $651 = (+_fast_log2($ratio$0$i$i)); - $652 = $651; - $653 = $652 * 4.8164799306236983; - $654 = (~~(($653))); - $655 = $$02$i$i + $$01$i$i; - $656 = (11536 + ($654<<2)|0); - $657 = +HEAPF32[$656>>2]; - $658 = $657 * $655; - $ecb$0$be$i = $658; - break; - } else { - $650 = $$02$i$i + $$01$i$i; - $ecb$0$be$i = $650; - break; - } - } - } else { - $ecb$0$be$i = $$02$i$i; - } - } while(0); - $exitcond31$i = ($kk$013$i|0)==($606|0); - if ($exitcond31$i) { - $$lcssa233 = $628;$ecb$0$be$i$lcssa = $ecb$0$be$i; - break; - } - $k$1$i = (($k$112$i) + 1)|0; - $$pre35$i = HEAP32[$594>>2]|0; - $630 = $$pre35$i;$dd$010$i = $628;$ecb$09$i = $ecb$0$be$i;$k$112$i = $k$1$i;$kk$013$in$i = $kk$013$i; - } - $662 = (($k$17$i) - ($604))|0; - $663 = (($662) + ($606))|0; - $664 = (1 - ($604))|0; - $665 = (($664) + ($606))|0; - $dd$0$lcssa$i = $$lcssa233;$dd_n$0$lcssa$i = $665;$ecb$0$lcssa$i = $ecb$0$be$i$lcssa;$k$1$lcssa$i = $663; - } else { - $dd$0$lcssa$i = $614;$dd_n$0$lcssa$i = 1;$ecb$0$lcssa$i = $623;$k$1$lcssa$i = $k$17$i; - } - $666 = $dd$0$lcssa$i << 1; - $667 = $666 | 1; - $668 = $dd_n$0$lcssa$i << 1; - $669 = (($667|0) / ($668|0))&-1; - $670 = (11488 + ($669<<2)|0); - $671 = +HEAPF32[$670>>2]; - $672 = $671 * 0.5; - $673 = $672 * $ecb$0$lcssa$i; - $674 = HEAP32[$595>>2]|0; - $675 = ($674|0)==(2); - do { - if ($675) { - $676 = ((((($gfc)) + 21564|0) + ($chn$0136<<8)|0) + ($b$019$i<<2)|0); - $677 = +HEAPF32[$676>>2]; - $678 = $677 * 2.0; - $679 = $678 > 0.0; - if ($679) { - $680 = $673 < $678; - $681 = $680 ? $673 : $678; - $682 = ((($thr) + ($chn$0136<<8)|0) + ($b$019$i<<2)|0); - HEAPF32[$682>>2] = $681; - $$pre$phi$iZ2D = $676;$$pre$phi36$iZ2D = $682;$714 = $681; - break; - } else { - $683 = $673; - $684 = ((($eb) + ($chn$0136<<8)|0) + ($b$019$i<<2)|0); - $685 = +HEAPF32[$684>>2]; - $686 = $685; - $687 = $686 * 0.29999999999999999; - $688 = $683 < $687; - $$$i = $688 ? $683 : $687; - $689 = $$$i; - $690 = ((($thr) + ($chn$0136<<8)|0) + ($b$019$i<<2)|0); - HEAPF32[$690>>2] = $689; - $$pre$phi$iZ2D = $676;$$pre$phi36$iZ2D = $690;$714 = $689; - break; - } - } else { - $691 = ((((($gfc)) + 22588|0) + ($chn$0136<<8)|0) + ($b$019$i<<2)|0); - $692 = +HEAPF32[$691>>2]; - $693 = $692 * 16.0; - $694 = ((((($gfc)) + 21564|0) + ($chn$0136<<8)|0) + ($b$019$i<<2)|0); - $695 = +HEAPF32[$694>>2]; - $696 = $695 * 2.0; - $697 = !($693 <= 0.0); - $ecb_limit_2$0$i = $697 ? $693 : $673; - $698 = !($696 <= 0.0); - $ecb_limit_1$0$i = $698 ? $696 : $673; - $699 = ($674|0)==(0); - $700 = $ecb_limit_1$0$i < $ecb_limit_2$0$i; - $701 = $700 ? $ecb_limit_1$0$i : $ecb_limit_2$0$i; - $ecb_limit1$0$i = $699 ? $701 : $ecb_limit_1$0$i; - $702 = $673 < $ecb_limit1$0$i; - $703 = $702 ? $673 : $ecb_limit1$0$i; - $704 = ((($thr) + ($chn$0136<<8)|0) + ($b$019$i<<2)|0); - HEAPF32[$704>>2] = $703; - $$pre$phi$iZ2D = $694;$$pre$phi36$iZ2D = $704;$714 = $703; - } - } while(0); - $705 = HEAP32[$$pre$phi$iZ2D>>2]|0; - $706 = ((((($gfc)) + 22588|0) + ($chn$0136<<8)|0) + ($b$019$i<<2)|0); - HEAP32[$706>>2] = $705; - HEAPF32[$$pre$phi$iZ2D>>2] = $673; - $707 = (($thm$i) + ($b$019$i<<2)|0); - $708 = +HEAPF32[$707>>2]; - $709 = (((($483)) + 256|0) + ($b$019$i<<2)|0); - $710 = +HEAPF32[$709>>2]; - $711 = $708 * $672; - $712 = $711 * $710; - $713 = $714 > $712; - if ($713) { - HEAPF32[$$pre$phi36$iZ2D>>2] = $712; - $717 = $712; - } else { - $717 = $714; - } - $715 = $602 > 1.0; - if ($715) { - $716 = $717 * $602; - HEAPF32[$$pre$phi36$iZ2D>>2] = $716; - $721 = $716; - } else { - $721 = $717; - } - $718 = ((($eb) + ($chn$0136<<8)|0) + ($b$019$i<<2)|0); - $719 = +HEAPF32[$718>>2]; - $720 = $721 > $719; - if ($720) { - HEAPF32[$$pre$phi36$iZ2D>>2] = $719; - $724 = $719; - } else { - $724 = $721; - } - $722 = $602 < 1.0; - if ($722) { - $723 = $724 * $602; - HEAPF32[$$pre$phi36$iZ2D>>2] = $723; - } - $725 = (($b$019$i) + 1)|0; - $726 = HEAP32[$484>>2]|0; - $727 = ($725|0)<($726|0); - if ($727) { - $b$019$i = $725;$k$020$i = $k$1$lcssa$i; - } else { - $$lcssa234 = $725; - break; - } - } - $596 = ($$lcssa234|0)<(64); - if ($596) { - $b$16$i$ph = $$lcssa234; - label = 114; - } - } else { - $b$16$i$ph = 0; - label = 114; - } - if ((label|0) == 114) { - label = 0; - $scevgep175 = ((($eb) + ($chn$0136<<8)|0) + ($b$16$i$ph<<2)|0); - $597 = $b$16$i$ph << 2; - $598 = (256 - ($597))|0; - _memset(($scevgep175|0),0,($598|0))|0; - $scevgep178 = ((($thr) + ($chn$0136<<8)|0) + ($b$16$i$ph<<2)|0); - _memset(($scevgep178|0),0,($598|0))|0; - } - $728 = (($chn$0136) + 1)|0; - $exitcond180 = ($728|0)==($417|0); - if ($exitcond180) { - break; - } else { - $chn$0136 = $728; - } - } - } - $729 = HEAP32[$17>>2]|0; - $730 = ($729|0)==(1); - if ($730) { - $731 = HEAP32[$uselongblock>>2]|0; - $732 = ((($uselongblock)) + 4|0); - $733 = HEAP32[$732>>2]|0; - $734 = (($733) + ($731))|0; - $735 = ($734|0)==(2); - if ($735) { - $736 = ((($1)) + 768|0); - $737 = ((($gfc)) + 85796|0); - $738 = HEAP32[$737>>2]|0; - $739 = ((($738)) + 212|0); - $740 = +HEAPF32[$7>>2]; - $741 = ((($1)) + 2148|0); - $742 = HEAP32[$741>>2]|0; - _vbrpsy_compute_MS_thresholds($eb,$thr,$736,$739,$743,$740,$742); - } - } - if ($418) { - $chn$1133 = 0; - while(1) { - $744 = (($eb) + ($chn$1133<<8)|0); - $745 = (($thr) + ($chn$1133<<8)|0); - $746 = HEAP32[$0>>2]|0; - $747 = (((($gfc)) + 26636|0) + (($chn$1133*244)|0)|0); - $748 = (((($gfc)) + 25660|0) + (($chn$1133*244)|0)|0); - _convert_partition2scalefac($746,$744,$745,$747,$748); - $749 = HEAP32[$0>>2]|0; - $750 = ((($749)) + 4320|0); - _convert_partition2scalefac($750,$744,$745,$mask_idx_s$i,$thm$i); - $sb$02$i = 0; - while(1) { - $751 = (($mask_idx_s$i) + ($sb$02$i<<2)|0); - $752 = HEAP32[$751>>2]|0; - $753 = (($thm$i) + ($sb$02$i<<2)|0); - $754 = +HEAPF32[$753>>2]; - $755 = $754 * 0.015625; - $756 = ((((((($gfc)) + 26636|0) + (($chn$1133*244)|0)|0)) + 88|0) + (($sb$02$i*12)|0)|0); - HEAP32[$756>>2] = $752; - $757 = ((((((($gfc)) + 25660|0) + (($chn$1133*244)|0)|0)) + 88|0) + (($sb$02$i*12)|0)|0); - HEAPF32[$757>>2] = $755; - $758 = ((((((((($gfc)) + 26636|0) + (($chn$1133*244)|0)|0)) + 88|0) + (($sb$02$i*12)|0)|0)) + 4|0); - HEAP32[$758>>2] = $752; - $759 = ((((((((($gfc)) + 25660|0) + (($chn$1133*244)|0)|0)) + 88|0) + (($sb$02$i*12)|0)|0)) + 4|0); - HEAPF32[$759>>2] = $755; - $760 = ((((((((($gfc)) + 26636|0) + (($chn$1133*244)|0)|0)) + 88|0) + (($sb$02$i*12)|0)|0)) + 8|0); - HEAP32[$760>>2] = $752; - $761 = ((((((((($gfc)) + 25660|0) + (($chn$1133*244)|0)|0)) + 88|0) + (($sb$02$i*12)|0)|0)) + 8|0); - HEAPF32[$761>>2] = $755; - $762 = (($sb$02$i) + 1)|0; - $exitcond$i17 = ($762|0)==(13); - if ($exitcond$i17) { - break; - } else { - $sb$02$i = $762; - } - } - $763 = (($chn$1133) + 1)|0; - $exitcond170 = ($763|0)==($417|0); - if ($exitcond170) { - break; - } else { - $chn$1133 = $763; - } - } - } - $764 = HEAP32[$0>>2]|0; - $765 = ((($764)) + 6500|0); - $766 = HEAP32[$765>>2]|0; - $767 = HEAP32[$uselongblock>>2]|0; - $768 = ((($uselongblock)) + 4|0); - $769 = HEAP32[$768>>2]|0; - $770 = (0 - ($769))|0; - $771 = ((($1)) + 2928|0); - $772 = ((($gfc)) + 85796|0); - $773 = ((($1)) + 4308|0); - $774 = ($766|0)!=(0); - $775 = ((($mask_idx_s$i)) + 4|0); - $776 = ((($thm$i)) + 4|0); - $777 = ((($mask_idx_s$i)) + 8|0); - $778 = ((($thm$i)) + 8|0); - $779 = ((($mask_idx_s$i)) + 12|0); - $780 = ((($thm$i)) + 12|0); - $781 = ((($mask_idx_s$i)) + 16|0); - $782 = ((($thm$i)) + 16|0); - $783 = ((($mask_idx_s$i)) + 20|0); - $784 = ((($thm$i)) + 20|0); - $785 = ((($mask_idx_s$i)) + 24|0); - $786 = ((($thm$i)) + 24|0); - $787 = ((($mask_idx_s$i)) + 28|0); - $788 = ((($thm$i)) + 28|0); - $789 = ((($mask_idx_s$i)) + 32|0); - $790 = ((($thm$i)) + 32|0); - $791 = ((($mask_idx_s$i)) + 36|0); - $792 = ((($thm$i)) + 36|0); - $793 = ((($mask_idx_s$i)) + 40|0); - $794 = ((($thm$i)) + 40|0); - $795 = ((($mask_idx_s$i)) + 44|0); - $796 = ((($thm$i)) + 44|0); - $797 = ((($mask_idx_s$i)) + 48|0); - $798 = ((($thm$i)) + 48|0); - $799 = ((($thm$i)) + 4|0); - $800 = ((($gfc)) + 84908|0); - $$pre52$i = ((($avg$i)) + 4|0); - $$not203 = ($767|0)!=($770|0); - $sblock$0130 = 0; - while(1) { - if ($418) { - $801 = ($sblock$0130|0)==(0); - $802 = (($fftenergy_s) + (($sblock$0130*516)|0)|0); - $chn$2120 = 0; - while(1) { - $803 = $chn$2120 & 1; - $804 = (($uselongblock) + ($803<<2)|0); - $805 = HEAP32[$804>>2]|0; - $806 = ($805|0)==(0); - $or$cond = $774 | $806; - if ($or$cond) { - $815 = ($chn$2120|0)<(2); - $or$cond$i20 = $801 & $815; - if ($or$cond$i20) { - $816 = (($wsamp_S) + (($803*3072)|0)|0); - _fft_short($gfc,$816,$chn$2120,$buffer); - } - $817 = ($chn$2120|0)==(2); - if ($817) { - $$sum = (($803) + 1)|0; - $j$03$i = 255; - while(1) { - $818 = (((($wsamp_S) + (($803*3072)|0)|0) + ($sblock$0130<<10)|0) + ($j$03$i<<2)|0); - $819 = +HEAPF32[$818>>2]; - $820 = (((($wsamp_S) + (($$sum*3072)|0)|0) + ($sblock$0130<<10)|0) + ($j$03$i<<2)|0); - $821 = +HEAPF32[$820>>2]; - $822 = $821 + $819; - $823 = $822 * 0.70710676908493042; - HEAPF32[$818>>2] = $823; - $824 = $819 - $821; - $825 = $824 * 0.70710676908493042; - HEAPF32[$820>>2] = $825; - $826 = (($j$03$i) + -1)|0; - $827 = ($j$03$i|0)>(0); - if ($827) { - $j$03$i = $826; - } else { - break; - } - } - } - $828 = ((($wsamp_S) + (($803*3072)|0)|0) + ($sblock$0130<<10)|0); - $829 = +HEAPF32[$828>>2]; - $830 = $829 * $829; - HEAPF32[$802>>2] = $830; - $j$12$i = 127; - while(1) { - $831 = (128 - ($j$12$i))|0; - $832 = (((($wsamp_S) + (($803*3072)|0)|0) + ($sblock$0130<<10)|0) + ($831<<2)|0); - $833 = +HEAPF32[$832>>2]; - $834 = (($j$12$i) + 128)|0; - $835 = (((($wsamp_S) + (($803*3072)|0)|0) + ($sblock$0130<<10)|0) + ($834<<2)|0); - $836 = +HEAPF32[$835>>2]; - $837 = $833 * $833; - $838 = $836 * $836; - $839 = $838 + $837; - $840 = $839 * 0.5; - $841 = ((($fftenergy_s) + (($sblock$0130*516)|0)|0) + ($831<<2)|0); - HEAPF32[$841>>2] = $840; - $842 = (($j$12$i) + -1)|0; - $843 = ($j$12$i|0)>(0); - if ($843) { - $j$12$i = $842; - } else { - break; - } - } - $844 = HEAP32[$0>>2]|0; - _memset(($thm$i|0),0,256)|0; - _memset(($avg$i|0),0,256)|0; - $845 = ((($844)) + 4308|0); - $846 = HEAP32[$845>>2]|0; - $847 = ($846|0)>(0); - if ($847) { - $b$030$i = 0;$j$031$i = 0; - while(1) { - $848 = (((($844)) + 3876|0) + ($b$030$i<<2)|0); - $849 = HEAP32[$848>>2]|0; - $850 = ($849|0)>(0); - if ($850) { - $ebb$021$i = 0.0;$i$023$i = 0;$j$122$i = $j$031$i;$m$020$i = 0.0; - while(1) { - $851 = ((($fftenergy_s) + (($sblock$0130*516)|0)|0) + ($j$122$i<<2)|0); - $852 = +HEAPF32[$851>>2]; - $853 = $852 + $ebb$021$i; - $854 = $m$020$i < $852; - $m$1$i = $854 ? $852 : $m$020$i; - $855 = (($i$023$i) + 1)|0; - $856 = (($j$122$i) + 1)|0; - $exitcond46$i25 = ($855|0)==($849|0); - if ($exitcond46$i25) { - $$lcssa = $853;$m$1$i$lcssa = $m$1$i; - break; - } else { - $ebb$021$i = $853;$i$023$i = $855;$j$122$i = $856;$m$020$i = $m$1$i; - } - } - $857 = (($849) + ($j$031$i))|0; - $ebb$0$lcssa$i = $$lcssa;$j$1$lcssa$i = $857;$m$0$lcssa$i = $m$1$i$lcssa; - } else { - $ebb$0$lcssa$i = 0.0;$j$1$lcssa$i = $j$031$i;$m$0$lcssa$i = 0.0; - } - $858 = ((($eb) + ($chn$2120<<8)|0) + ($b$030$i<<2)|0); - HEAPF32[$858>>2] = $ebb$0$lcssa$i; - $859 = (($thm$i) + ($b$030$i<<2)|0); - HEAPF32[$859>>2] = $m$0$lcssa$i; - $860 = (((($844)) + 2672|0) + ($b$030$i<<2)|0); - $861 = +HEAPF32[$860>>2]; - $862 = $861 * $ebb$0$lcssa$i; - $863 = (($avg$i) + ($b$030$i<<2)|0); - HEAPF32[$863>>2] = $862; - $864 = (($b$030$i) + 1)|0; - $exitcond159 = ($864|0)==($846|0); - if ($exitcond159) { - break; - } else { - $b$030$i = $864;$j$031$i = $j$1$lcssa$i; - } - } - $$pre$i27 = +HEAPF32[$avg$i>>2]; - $$pre48$i = +HEAPF32[$$pre52$i>>2]; - $866 = $$pre48$i;$867 = $$pre$i27; - } else { - $866 = 0.0;$867 = 0.0; - } - $865 = $867 + $866; - $868 = $865 > 0.0; - if ($868) { - $869 = +HEAPF32[$thm$i>>2]; - $870 = +HEAPF32[$799>>2]; - $871 = $869 < $870; - $m$0$i$i29 = $871 ? $870 : $869; - $872 = $m$0$i$i29 * 2.0; - $873 = $872 - $865; - $874 = $873 * 20.0; - $875 = ((($844)) + 3876|0); - $876 = HEAP32[$875>>2]|0; - $877 = ((($844)) + 3880|0); - $878 = HEAP32[$877>>2]|0; - $879 = (($876) + -1)|0; - $880 = (($879) + ($878))|0; - $881 = (+($880|0)); - $882 = $881 * $865; - $883 = $874 / $882; - $884 = (~~(($883))); - $885 = ($884|0)>(8); - $886 = $884&255; - $887 = $885 ? 8 : $886; - $storemerge$i$i30 = $887; - } else { - $storemerge$i$i30 = 0; - } - HEAP8[$mask_idx_s$i>>0] = $storemerge$i$i30; - $888 = (($846) + -1)|0; - $889 = ($888|0)>(1); - $890 = $866 + $867; - if ($889) { - $891 = ($888|0)>(2); - $896 = $890;$899 = 0;$928 = $866;$b$02$i$i32 = 1; - while(1) { - $892 = (($b$02$i$i32) + 1)|0; - $893 = (($avg$i) + ($892<<2)|0); - $894 = +HEAPF32[$893>>2]; - $895 = $894 + $896; - $897 = $895 > 0.0; - if ($897) { - $898 = (($thm$i) + ($899<<2)|0); - $900 = +HEAPF32[$898>>2]; - $901 = (($thm$i) + ($b$02$i$i32<<2)|0); - $902 = +HEAPF32[$901>>2]; - $903 = $900 < $902; - $m$1$i$i34 = $903 ? $902 : $900; - $904 = (($thm$i) + ($892<<2)|0); - $905 = +HEAPF32[$904>>2]; - $906 = $m$1$i$i34 < $905; - $m$2$i$i35 = $906 ? $905 : $m$1$i$i34; - $907 = $m$2$i$i35 * 3.0; - $908 = $907 - $895; - $909 = $908 * 20.0; - $910 = (((($844)) + 3876|0) + ($899<<2)|0); - $911 = HEAP32[$910>>2]|0; - $912 = (((($844)) + 3876|0) + ($b$02$i$i32<<2)|0); - $913 = HEAP32[$912>>2]|0; - $914 = (((($844)) + 3876|0) + ($892<<2)|0); - $915 = HEAP32[$914>>2]|0; - $916 = (($911) + -1)|0; - $917 = (($916) + ($913))|0; - $918 = (($917) + ($915))|0; - $919 = (+($918|0)); - $920 = $919 * $895; - $921 = $909 / $920; - $922 = (~~(($921))); - $923 = ($922|0)>(8); - $924 = $922&255; - $925 = $923 ? 8 : $924; - $$sink$i$i36 = $925; - } else { - $$sink$i$i36 = 0; - } - $926 = (($mask_idx_s$i) + ($b$02$i$i32)|0); - HEAP8[$926>>0] = $$sink$i$i36; - $927 = $894 + $928; - $exitcond160 = ($892|0)==($888|0); - if ($exitcond160) { - $$lcssa226 = $927; - break; - } else { - $899$phi = $b$02$i$i32;$896 = $927;$928 = $894;$b$02$i$i32 = $892;$899 = $899$phi; - } - } - $smax$i31 = $891 ? $888 : 2; - $929 = (($smax$i31) + -1)|0; - $$lcssa$i$i39 = $929;$$lcssa1$i$i38 = $$lcssa226;$b$0$lcssa$i$i40 = $smax$i31; - } else { - $$lcssa$i$i39 = 0;$$lcssa1$i$i38 = $890;$b$0$lcssa$i$i40 = 1; - } - $930 = $$lcssa1$i$i38 > 0.0; - if ($930) { - $931 = (($thm$i) + ($$lcssa$i$i39<<2)|0); - $932 = +HEAPF32[$931>>2]; - $933 = (($thm$i) + ($b$0$lcssa$i$i40<<2)|0); - $934 = +HEAPF32[$933>>2]; - $935 = $932 < $934; - $m$3$i$i42 = $935 ? $934 : $932; - $936 = $m$3$i$i42 * 2.0; - $937 = $936 - $$lcssa1$i$i38; - $938 = $937 * 20.0; - $939 = (((($844)) + 3876|0) + ($$lcssa$i$i39<<2)|0); - $940 = HEAP32[$939>>2]|0; - $941 = (((($844)) + 3876|0) + ($b$0$lcssa$i$i40<<2)|0); - $942 = HEAP32[$941>>2]|0; - $943 = (($940) + -1)|0; - $944 = (($943) + ($942))|0; - $945 = (+($944|0)); - $946 = $945 * $$lcssa1$i$i38; - $947 = $938 / $946; - $948 = (~~(($947))); - $949 = ($948|0)>(8); - $950 = $948&255; - $951 = $949 ? 8 : $950; - $$sink7$i$i43 = $951; - } else { - $$sink7$i$i43 = 0; - } - $952 = (($mask_idx_s$i) + ($b$0$lcssa$i$i40)|0); - HEAP8[$952>>0] = $$sink7$i$i43; - if ($847) { - $953 = ((($844)) + 4316|0); - $b$116$i = 0;$j$217$i = 0; - while(1) { - $957 = (((($844)) + 3364|0) + ($b$116$i<<3)|0); - $958 = HEAP32[$957>>2]|0; - $959 = (((((($844)) + 3364|0) + ($b$116$i<<3)|0)) + 4|0); - $960 = HEAP32[$959>>2]|0; - $961 = (($mask_idx_s$i) + ($b$116$i)|0); - $962 = HEAP8[$961>>0]|0; - $963 = $962&255; - $964 = (11448 + ($963<<2)|0); - $965 = HEAP32[$964>>2]|0; - $966 = (((($844)) + 2160|0) + ($b$116$i<<2)|0); - $967 = +HEAPF32[$966>>2]; - $968 = +HEAPF32[$800>>2]; - $969 = $968 * $967; - $970 = (($mask_idx_s$i) + ($958)|0); - $971 = HEAP8[$970>>0]|0; - $972 = $971&255; - $973 = HEAP32[$953>>2]|0; - $974 = (($973) + ($j$217$i<<2)|0); - $975 = +HEAPF32[$974>>2]; - $976 = ((($eb) + ($chn$2120<<8)|0) + ($958<<2)|0); - $977 = +HEAPF32[$976>>2]; - $978 = $977 * $975; - $979 = (11488 + ($972<<2)|0); - $980 = +HEAPF32[$979>>2]; - $981 = $978 * $980; - $j$34$i45 = (($j$217$i) + 1)|0; - $982 = ($958|0)<($960|0); - if ($982) { - $988 = $973;$dd$06$i = $972;$ecb$08$i = $981;$j$39$i = $j$34$i45;$kk$010$in$i = $958; - while(1) { - $kk$010$i = (($kk$010$in$i) + 1)|0; - $983 = (($mask_idx_s$i) + ($kk$010$i)|0); - $984 = HEAP8[$983>>0]|0; - $985 = $984&255; - $986 = (($985) + ($dd$06$i))|0; - $987 = (($988) + ($j$39$i<<2)|0); - $989 = +HEAPF32[$987>>2]; - $990 = ((($eb) + ($chn$2120<<8)|0) + ($kk$010$i<<2)|0); - $991 = +HEAPF32[$990>>2]; - $992 = $991 * $989; - $993 = (11488 + ($985<<2)|0); - $994 = +HEAPF32[$993>>2]; - $995 = $992 * $994; - $996 = (($kk$010$i) - ($b$116$i))|0; - $997 = $ecb$08$i < 0.0; - $$01$i$i46 = $997 ? 0.0 : $ecb$08$i; - $998 = $995 < 0.0; - $$02$i$i47 = $998 ? 0.0 : $995; - $999 = !($$01$i$i46 <= 0.0); - do { - if ($999) { - $1000 = !($$02$i$i47 <= 0.0); - if (!($1000)) { - $ecb$0$be$i48 = $$01$i$i46; - break; - } - $1001 = $$02$i$i47 > $$01$i$i46; - $1002 = $$02$i$i47 / $$01$i$i46; - $1003 = $$01$i$i46 / $$02$i$i47; - $ratio$0$i$i51 = $1001 ? $1002 : $1003; - $ispos$i$i52 = ($996|0)>(-1); - $neg$i$i53 = (0 - ($996))|0; - $1004 = $ispos$i$i52 ? $996 : $neg$i$i53; - $1005 = ($1004|0)>($965|0); - if ($1005) { - $1017 = +HEAPF32[11576>>2]; - $1018 = $ratio$0$i$i51 < $1017; - if ($1018) { - $1019 = $$02$i$i47 + $$01$i$i46; - $ecb$0$be$i48 = $1019; - break; - } else { - $$1$i$i54 = $1001 ? $$02$i$i47 : $$01$i$i46; - $ecb$0$be$i48 = $$1$i$i54; - break; - } - } else { - $1006 = +HEAPF32[11528>>2]; - $1007 = !($ratio$0$i$i51 >= $1006); - if ($1007) { - $1009 = (+_fast_log2($ratio$0$i$i51)); - $1010 = $1009; - $1011 = $1010 * 4.8164799306236983; - $1012 = (~~(($1011))); - $1013 = $$02$i$i47 + $$01$i$i46; - $1014 = (11536 + ($1012<<2)|0); - $1015 = +HEAPF32[$1014>>2]; - $1016 = $1015 * $1013; - $ecb$0$be$i48 = $1016; - break; - } else { - $1008 = $$02$i$i47 + $$01$i$i46; - $ecb$0$be$i48 = $1008; - break; - } - } - } else { - $ecb$0$be$i48 = $$02$i$i47; - } - } while(0); - $exitcond45$i = ($kk$010$i|0)==($960|0); - if ($exitcond45$i) { - $$lcssa227 = $986;$ecb$0$be$i48$lcssa = $ecb$0$be$i48; - break; - } - $j$3$i = (($j$39$i) + 1)|0; - $$pre49$i = HEAP32[$953>>2]|0; - $988 = $$pre49$i;$dd$06$i = $986;$ecb$08$i = $ecb$0$be$i48;$j$39$i = $j$3$i;$kk$010$in$i = $kk$010$i; - } - $1020 = (($j$34$i45) - ($958))|0; - $1021 = (($1020) + ($960))|0; - $1022 = (1 - ($958))|0; - $1023 = (($1022) + ($960))|0; - $dd$0$lcssa$i58 = $$lcssa227;$dd_n$0$lcssa$i57 = $1023;$ecb$0$lcssa$i56 = $ecb$0$be$i48$lcssa;$j$3$lcssa$i = $1021; - } else { - $dd$0$lcssa$i58 = $972;$dd_n$0$lcssa$i57 = 1;$ecb$0$lcssa$i56 = $981;$j$3$lcssa$i = $j$34$i45; - } - $1024 = $dd$0$lcssa$i58 << 1; - $1025 = $1024 | 1; - $1026 = $dd_n$0$lcssa$i57 << 1; - $1027 = (($1025|0) / ($1026|0))&-1; - $1028 = (11488 + ($1027<<2)|0); - $1029 = +HEAPF32[$1028>>2]; - $1030 = $1029 * 0.5; - $1031 = $1030 * $ecb$0$lcssa$i56; - $1032 = ((($thr) + ($chn$2120<<8)|0) + ($b$116$i<<2)|0); - HEAPF32[$1032>>2] = $1031; - $1033 = ((((($gfc)) + 23612|0) + ($chn$2120<<8)|0) + ($b$116$i<<2)|0); - $1034 = HEAP32[$1033>>2]|0; - $1035 = ((((($gfc)) + 24636|0) + ($chn$2120<<8)|0) + ($b$116$i<<2)|0); - HEAP32[$1035>>2] = $1034; - HEAPF32[$1033>>2] = $1031; - $1036 = (($thm$i) + ($b$116$i<<2)|0); - $1037 = +HEAPF32[$1036>>2]; - $1038 = (((($844)) + 2416|0) + ($b$116$i<<2)|0); - $1039 = +HEAPF32[$1038>>2]; - $1040 = $1037 * $1030; - $1041 = $1040 * $1039; - $1042 = $1031 > $1041; - if ($1042) { - HEAPF32[$1032>>2] = $1041; - $1045 = $1041; - } else { - $1045 = $1031; - } - $1043 = $969 > 1.0; - if ($1043) { - $1044 = $1045 * $969; - HEAPF32[$1032>>2] = $1044; - $1049 = $1044; - } else { - $1049 = $1045; - } - $1046 = ((($eb) + ($chn$2120<<8)|0) + ($b$116$i<<2)|0); - $1047 = +HEAPF32[$1046>>2]; - $1048 = $1049 > $1047; - if ($1048) { - HEAPF32[$1032>>2] = $1047; - $1052 = $1047; - } else { - $1052 = $1049; - } - $1050 = $969 < 1.0; - if ($1050) { - $1051 = $1052 * $969; - HEAPF32[$1032>>2] = $1051; - } - $1053 = (($b$116$i) + 1)|0; - $1054 = HEAP32[$845>>2]|0; - $1055 = ($1053|0)<($1054|0); - if ($1055) { - $b$116$i = $1053;$j$217$i = $j$3$lcssa$i; - } else { - $$lcssa228 = $1053; - break; - } - } - $954 = ($$lcssa228|0)<(64); - if ($954) { - $b$23$i$ph = $$lcssa228; - label = 185; - } - } else { - $b$23$i$ph = 0; - label = 185; - } - if ((label|0) == 185) { - label = 0; - $scevgep162 = ((($eb) + ($chn$2120<<8)|0) + ($b$23$i$ph<<2)|0); - $955 = $b$23$i$ph << 2; - $956 = (256 - ($955))|0; - _memset(($scevgep162|0),0,($956|0))|0; - $scevgep165 = ((($thr) + ($chn$2120<<8)|0) + ($b$23$i$ph<<2)|0); - _memset(($scevgep165|0),0,($956|0))|0; - } - } else { - if ($801) { - $807 = HEAP32[$0>>2]|0; - $808 = ((($807)) + 4308|0); - $809 = HEAP32[$808>>2]|0; - $810 = ($809|0)>(0); - if ($810) { - $b$01$i = 0; - while(1) { - $811 = ((((($gfc)) + 23612|0) + ($chn$2120<<8)|0) + ($b$01$i<<2)|0); - $812 = HEAP32[$811>>2]|0; - $813 = ((((($gfc)) + 24636|0) + ($chn$2120<<8)|0) + ($b$01$i<<2)|0); - HEAP32[$813>>2] = $812; - $814 = (($b$01$i) + 1)|0; - $exitcond$i18 = ($814|0)==($809|0); - if ($exitcond$i18) { - break; - } else { - $b$01$i = $814; - } - } - } - } - } - $1056 = (($chn$2120) + 1)|0; - $exitcond167 = ($1056|0)==($417|0); - if ($exitcond167) { - break; - } else { - $chn$2120 = $1056; - } - } - } - $1057 = HEAP32[$17>>2]|0; - $$not = ($1057|0)!=(1); - $brmerge = $$not | $$not203; - if (!($brmerge)) { - $1058 = HEAP32[$772>>2]|0; - $1059 = ((($1058)) + 468|0); - $1060 = +HEAPF32[$7>>2]; - $1061 = HEAP32[$773>>2]|0; - _vbrpsy_compute_MS_thresholds($eb,$thr,$771,$1059,$743,$1060,$1061); - } - if ($418) { - $chn$3127 = 0; - while(1) { - $1062 = $chn$3127 & 1; - $1063 = (($uselongblock) + ($1062<<2)|0); - $1064 = HEAP32[$1063>>2]|0; - $1065 = ($1064|0)==(0); - $or$cond3 = $774 | $1065; - if ($or$cond3) { - $1066 = (($eb) + ($chn$3127<<8)|0); - $1067 = (($thr) + ($chn$3127<<8)|0); - $1068 = HEAP32[$0>>2]|0; - $1069 = ((($1068)) + 2160|0); - _convert_partition2scalefac($1069,$1066,$1067,$mask_idx_s$i,$thm$i); - $1070 = HEAP32[$mask_idx_s$i>>2]|0; - $1071 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 88|0) + ($sblock$0130<<2)|0); - HEAP32[$1071>>2] = $1070; - $1072 = HEAP32[$thm$i>>2]|0; - $1073 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 88|0) + ($sblock$0130<<2)|0); - HEAP32[$1073>>2] = $1072; - $1074 = HEAP32[$775>>2]|0; - $1075 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 100|0) + ($sblock$0130<<2)|0); - HEAP32[$1075>>2] = $1074; - $1076 = HEAP32[$776>>2]|0; - $1077 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 100|0) + ($sblock$0130<<2)|0); - HEAP32[$1077>>2] = $1076; - $1078 = HEAP32[$777>>2]|0; - $1079 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 112|0) + ($sblock$0130<<2)|0); - HEAP32[$1079>>2] = $1078; - $1080 = HEAP32[$778>>2]|0; - $1081 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 112|0) + ($sblock$0130<<2)|0); - HEAP32[$1081>>2] = $1080; - $1082 = HEAP32[$779>>2]|0; - $1083 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 124|0) + ($sblock$0130<<2)|0); - HEAP32[$1083>>2] = $1082; - $1084 = HEAP32[$780>>2]|0; - $1085 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 124|0) + ($sblock$0130<<2)|0); - HEAP32[$1085>>2] = $1084; - $1086 = HEAP32[$781>>2]|0; - $1087 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 136|0) + ($sblock$0130<<2)|0); - HEAP32[$1087>>2] = $1086; - $1088 = HEAP32[$782>>2]|0; - $1089 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 136|0) + ($sblock$0130<<2)|0); - HEAP32[$1089>>2] = $1088; - $1090 = HEAP32[$783>>2]|0; - $1091 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 148|0) + ($sblock$0130<<2)|0); - HEAP32[$1091>>2] = $1090; - $1092 = HEAP32[$784>>2]|0; - $1093 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 148|0) + ($sblock$0130<<2)|0); - HEAP32[$1093>>2] = $1092; - $1094 = HEAP32[$785>>2]|0; - $1095 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 160|0) + ($sblock$0130<<2)|0); - HEAP32[$1095>>2] = $1094; - $1096 = HEAP32[$786>>2]|0; - $1097 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 160|0) + ($sblock$0130<<2)|0); - HEAP32[$1097>>2] = $1096; - $1098 = HEAP32[$787>>2]|0; - $1099 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 172|0) + ($sblock$0130<<2)|0); - HEAP32[$1099>>2] = $1098; - $1100 = HEAP32[$788>>2]|0; - $1101 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 172|0) + ($sblock$0130<<2)|0); - HEAP32[$1101>>2] = $1100; - $1102 = HEAP32[$789>>2]|0; - $1103 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 184|0) + ($sblock$0130<<2)|0); - HEAP32[$1103>>2] = $1102; - $1104 = HEAP32[$790>>2]|0; - $1105 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 184|0) + ($sblock$0130<<2)|0); - HEAP32[$1105>>2] = $1104; - $1106 = HEAP32[$791>>2]|0; - $1107 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 196|0) + ($sblock$0130<<2)|0); - HEAP32[$1107>>2] = $1106; - $1108 = HEAP32[$792>>2]|0; - $1109 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 196|0) + ($sblock$0130<<2)|0); - HEAP32[$1109>>2] = $1108; - $1110 = HEAP32[$793>>2]|0; - $1111 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 208|0) + ($sblock$0130<<2)|0); - HEAP32[$1111>>2] = $1110; - $1112 = HEAP32[$794>>2]|0; - $1113 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 208|0) + ($sblock$0130<<2)|0); - HEAP32[$1113>>2] = $1112; - $1114 = HEAP32[$795>>2]|0; - $1115 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 220|0) + ($sblock$0130<<2)|0); - HEAP32[$1115>>2] = $1114; - $1116 = HEAP32[$796>>2]|0; - $1117 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 220|0) + ($sblock$0130<<2)|0); - HEAP32[$1117>>2] = $1116; - $1118 = HEAP32[$797>>2]|0; - $1119 = ((((((($gfc)) + 26636|0) + (($chn$3127*244)|0)|0)) + 232|0) + ($sblock$0130<<2)|0); - HEAP32[$1119>>2] = $1118; - $1120 = HEAP32[$798>>2]|0; - $1121 = ((((((($gfc)) + 25660|0) + (($chn$3127*244)|0)|0)) + 232|0) + ($sblock$0130<<2)|0); - HEAP32[$1121>>2] = $1120; - } - $1122 = (($chn$3127) + 1)|0; - $exitcond168 = ($1122|0)==($417|0); - if ($exitcond168) { - break; - } else { - $chn$3127 = $1122; - } - } - } - $1123 = (($sblock$0130) + 1)|0; - $exitcond169 = ($1123|0)==(3); - if ($exitcond169) { - break; - } else { - $sblock$0130 = $1123; - } - } - if ($418) { - $chn$4119 = 0; - while(1) { - $1124 = (((($gfc)) + 27780|0) + ($chn$4119<<2)|0); - $sb$0118 = 0; - while(1) { - $scevgep = ((((((($gfc)) + 25660|0) + (($chn$4119*244)|0)|0)) + 88|0) + (($sb$0118*12)|0)|0); - $1125 = ((((((($last_thm) + (($chn$4119*244)|0)|0)) + 88|0) + (($sb$0118*12)|0)|0)) + 8|0); - $1126 = ((((((($last_thm) + (($chn$4119*244)|0)|0)) + 88|0) + (($sb$0118*12)|0)|0)) + 4|0); - $sblock$1116 = 0; - while(1) { - $1128 = (((((((($gfc)) + 25660|0) + (($chn$4119*244)|0)|0)) + 88|0) + (($sb$0118*12)|0)|0) + ($sblock$1116<<2)|0); - $1129 = +HEAPF32[$1128>>2]; - $1130 = $1129; - $1131 = $1130 * 0.80000000000000004; - $1132 = $1131; - $1133 = ($sblock$1116|0)>(0); - $1134 = (($sblock$1116) + -1)|0; - $1135 = (($new_thmm) + ($1134<<2)|0); - $prev_thm$0$in = $1133 ? $1135 : $1125; - $prev_thm$0 = +HEAPF32[$prev_thm$0$in>>2]; - $1136 = ((($ns_attacks) + ($chn$4119<<4)|0) + ($sblock$1116<<2)|0); - $1137 = HEAP32[$1136>>2]|0; - $1138 = ($1137|0)>(1); - if ($1138) { - label = 223; - } else { - $1139 = (($sblock$1116) + 1)|0; - $1140 = ((($ns_attacks) + ($chn$4119<<4)|0) + ($1139<<2)|0); - $1141 = HEAP32[$1140>>2]|0; - $1142 = ($1141|0)==(1); - if ($1142) { - label = 223; - } else { - $t1$0 = $1132; - } - } - if ((label|0) == 223) { - label = 0; - $1143 = $1132 > 0.0; - if ($1143) { - $1144 = $prev_thm$0 / $1132; - $1145 = (+Math_pow((+$1144),0.36000001430511475)); - $1146 = $1145 * $1132; - $t1$0 = $1146; - } else { - $t1$0 = 0.0; - } - } - $1147 = $t1$0 < $1132; - $1148 = $1147 ? $t1$0 : $1132; - $1149 = ($1137|0)==(1); - L341: do { - if ($1149) { - $1150 = $1148 > 0.0; - if ($1150) { - $1151 = $prev_thm$0 / $1148; - $1152 = (+Math_pow((+$1151),0.18000000715255737)); - $1153 = $1152 * $1148; - $t2$0 = $1153; - } else { - $t2$0 = 0.0; - } - } else { - $1154 = ($sblock$1116|0)==(0); - if ($1154) { - $1155 = HEAP32[$1124>>2]|0; - $1156 = ($1155|0)==(3); - if ($1156) { - label = 233; - } else { - label = 230; - } - } else { - label = 230; - } - do { - if ((label|0) == 230) { - label = 0; - if (!($1133)) { - $t2$0 = $1132; - break L341; - } - $1157 = ((($ns_attacks) + ($chn$4119<<4)|0) + ($1134<<2)|0); - $1158 = HEAP32[$1157>>2]|0; - $1159 = ($1158|0)==(3); - if (!($1159)) { - $t2$0 = $1132; - break L341; - } - if ((($sblock$1116|0) == 0)) { - label = 233; - break; - } else if ((($sblock$1116|0) == 1)) { - $1161 = +HEAPF32[$1125>>2]; - $prev_thm$1 = $1161; - break; - } else if ((($sblock$1116|0) == 2)) { - $1162 = +HEAPF32[$new_thmm>>2]; - $prev_thm$1 = $1162; - break; - } else { - $prev_thm$1 = $prev_thm$0; - break; - } - } - } while(0); - if ((label|0) == 233) { - label = 0; - $1160 = +HEAPF32[$1126>>2]; - $prev_thm$1 = $1160; - } - $1163 = $1148 > 0.0; - if (!($1163)) { - $t2$0 = 0.0; - break; - } - $1164 = $prev_thm$1 / $1148; - $1165 = (+Math_pow((+$1164),0.18000000715255737)); - $1166 = $1165 * $1148; - $t2$0 = $1166; - } - } while(0); - $1167 = $t2$0 < $1148; - $1168 = $1167 ? $t2$0 : $1148; - $1169 = ((($sub_short_factor) + (($chn$4119*12)|0)|0) + ($sblock$1116<<2)|0); - $1170 = +HEAPF32[$1169>>2]; - $1171 = $1168 * $1170; - $1172 = (($new_thmm) + ($sblock$1116<<2)|0); - HEAPF32[$1172>>2] = $1171; - $1173 = (($sblock$1116) + 1)|0; - $exitcond151 = ($1173|0)==(3); - if ($exitcond151) { - break; - } else { - $sblock$1116 = $1173; - } - } - ;HEAP32[$scevgep>>2]=HEAP32[$new_thmm>>2]|0;HEAP32[$scevgep+4>>2]=HEAP32[$new_thmm+4>>2]|0;HEAP32[$scevgep+8>>2]=HEAP32[$new_thmm+8>>2]|0; - $1127 = (($sb$0118) + 1)|0; - $exitcond155 = ($1127|0)==(13); - if ($exitcond155) { - break; - } else { - $sb$0118 = $1127; - } - } - $1174 = (($chn$4119) + 1)|0; - $exitcond156 = ($1174|0)==($417|0); - if ($exitcond156) { - break; - } else { - $chn$4119 = $1174; - } - } - if ($418) { - $chn$5114 = 0; - while(1) { - $1175 = (((($ns_attacks) + ($chn$5114<<4)|0)) + 8|0); - $1176 = HEAP32[$1175>>2]|0; - $1177 = (((($gfc)) + 27780|0) + ($chn$5114<<2)|0); - HEAP32[$1177>>2] = $1176; - $1178 = (($chn$5114) + 1)|0; - $exitcond150 = ($1178|0)==($417|0); - if ($exitcond150) { - break; - } else { - $chn$5114 = $1178; - } - } - } - } - $1179 = HEAP32[$25>>2]|0; - $1180 = ($1179|0)>(0); - if ($1180) { - $chn$01$i65 = 0; - while(1) { - $1181 = (($uselongblock) + ($chn$01$i65<<2)|0); - $1182 = HEAP32[$1181>>2]|0; - $1183 = ($1182|0)==(0); - $1184 = (((($gfc)) + 27796|0) + ($chn$01$i65<<2)|0); - $1185 = HEAP32[$1184>>2]|0; - do { - if ($1183) { - if ((($1185|0) == 0)) { - HEAP32[$1184>>2] = 1; - $1188 = 1;$blocktype$0$i = 2; - break; - } else if ((($1185|0) == 3)) { - HEAP32[$1184>>2] = 2; - $1188 = 2;$blocktype$0$i = 2; - break; - } else { - $1188 = $1185;$blocktype$0$i = 2; - break; - } - } else { - $1186 = ($1185|0)==(2); - $$$i67 = $1186 ? 3 : 0; - $1188 = $1185;$blocktype$0$i = $$$i67; - } - } while(0); - $1187 = (($blocktype_d) + ($chn$01$i65<<2)|0); - HEAP32[$1187>>2] = $1188; - HEAP32[$1184>>2] = $blocktype$0$i; - $1189 = (($chn$01$i65) + 1)|0; - $exitcond$i68 = ($1189|0)==($1179|0); - if ($exitcond$i68) { - break; - } else { - $chn$01$i65 = $1189; - } - } - } - if (!($418)) { - STACKTOP = sp;return 0; - } - $1190 = ((($percep_MS_entropy)) + -8|0); - $1191 = ((($blocktype_d)) + 4|0); - $1193 = ($1192|0)==(0|0); - $chn$6112 = 0; - while(1) { - $1194 = ($chn$6112|0)>(1); - if ($1194) { - $1195 = HEAP32[$blocktype_d>>2]|0; - $1196 = ($1195|0)==(2); - if ($1196) { - label = 253; - } else { - $1197 = HEAP32[$1191>>2]|0; - $1198 = ($1197|0)==(2); - if ($1198) { - label = 253; - } else { - $type$0 = 0; - } - } - if ((label|0) == 253) { - label = 0; - $type$0 = 2; - } - $1199 = (($chn$6112) + -2)|0; - $1200 = ((($masking_MS_ratio) + (($gr_out*976)|0)|0) + (($1199*488)|0)|0); - $mr$0 = $1200;$ppe$0 = $1190;$type$1 = $type$0; - } else { - $1201 = (($blocktype_d) + ($chn$6112<<2)|0); - $1202 = HEAP32[$1201>>2]|0; - $1203 = ((($masking_ratio) + (($gr_out*976)|0)|0) + (($chn$6112*488)|0)|0); - $mr$0 = $1203;$ppe$0 = $percep_entropy;$type$1 = $1202; - } - $1204 = ($type$1|0)==(2); - $1205 = +HEAPF32[$800>>2]; - if ($1204) { - $pe_s$04$i = 309.07000732421875;$sb$03$i = 0; - while(1) { - $1206 = (11584 + ($sb$03$i<<2)|0); - $1207 = (((($mr$0)) + 88|0) + (($sb$03$i*12)|0)|0); - $1208 = +HEAPF32[$1207>>2]; - $1209 = $1208 > 0.0; - do { - if ($1209) { - $1210 = $1208 * $1205; - $1211 = (((($mr$0)) + 332|0) + (($sb$03$i*12)|0)|0); - $1212 = +HEAPF32[$1211>>2]; - $1213 = $1212 > $1210; - if (!($1213)) { - $pe_s$2$i = $pe_s$04$i; - break; - } - $1214 = $1210 * 1.0E+10; - $1215 = $1212 > $1214; - $1216 = +HEAPF32[$1206>>2]; - $1217 = $1216; - if ($1215) { - $1218 = $1217 * 23.025850929940461; - $1219 = $pe_s$04$i; - $1220 = $1218 + $1219; - $1221 = $1220; - $pe_s$2$i = $1221; - break; - } else { - $1222 = $1212 / $1210; - $1223 = (+_fast_log2($1222)); - $1224 = $1223; - $1225 = $1217 * 0.30102999566398114; - $1226 = $1225 * $1224; - $1227 = $pe_s$04$i; - $1228 = $1226 + $1227; - $1229 = $1228; - $pe_s$2$i = $1229; - break; - } - } else { - $pe_s$2$i = $pe_s$04$i; - } - } while(0); - $1230 = (((((($mr$0)) + 88|0) + (($sb$03$i*12)|0)|0)) + 4|0); - $1231 = +HEAPF32[$1230>>2]; - $1232 = $1231 > 0.0; - do { - if ($1232) { - $1233 = $1231 * $1205; - $1234 = (((((($mr$0)) + 332|0) + (($sb$03$i*12)|0)|0)) + 4|0); - $1235 = +HEAPF32[$1234>>2]; - $1236 = $1235 > $1233; - if (!($1236)) { - $pe_s$2$1$i = $pe_s$2$i; - break; - } - $1237 = $1233 * 1.0E+10; - $1238 = $1235 > $1237; - $1239 = +HEAPF32[$1206>>2]; - $1240 = $1239; - if ($1238) { - $1249 = $1240 * 23.025850929940461; - $1250 = $pe_s$2$i; - $1251 = $1249 + $1250; - $1252 = $1251; - $pe_s$2$1$i = $1252; - break; - } else { - $1241 = $1235 / $1233; - $1242 = (+_fast_log2($1241)); - $1243 = $1242; - $1244 = $1240 * 0.30102999566398114; - $1245 = $1244 * $1243; - $1246 = $pe_s$2$i; - $1247 = $1245 + $1246; - $1248 = $1247; - $pe_s$2$1$i = $1248; - break; - } - } else { - $pe_s$2$1$i = $pe_s$2$i; - } - } while(0); - $1253 = (((((($mr$0)) + 88|0) + (($sb$03$i*12)|0)|0)) + 8|0); - $1254 = +HEAPF32[$1253>>2]; - $1255 = $1254 > 0.0; - do { - if ($1255) { - $1256 = $1254 * $1205; - $1257 = (((((($mr$0)) + 332|0) + (($sb$03$i*12)|0)|0)) + 8|0); - $1258 = +HEAPF32[$1257>>2]; - $1259 = $1258 > $1256; - if (!($1259)) { - $pe_s$2$2$i = $pe_s$2$1$i; - break; - } - $1260 = $1256 * 1.0E+10; - $1261 = $1258 > $1260; - $1262 = +HEAPF32[$1206>>2]; - $1263 = $1262; - if ($1261) { - $1272 = $1263 * 23.025850929940461; - $1273 = $pe_s$2$1$i; - $1274 = $1272 + $1273; - $1275 = $1274; - $pe_s$2$2$i = $1275; - break; - } else { - $1264 = $1258 / $1256; - $1265 = (+_fast_log2($1264)); - $1266 = $1265; - $1267 = $1263 * 0.30102999566398114; - $1268 = $1267 * $1266; - $1269 = $pe_s$2$1$i; - $1270 = $1268 + $1269; - $1271 = $1270; - $pe_s$2$2$i = $1271; - break; - } - } else { - $pe_s$2$2$i = $pe_s$2$1$i; - } - } while(0); - $1276 = (($sb$03$i) + 1)|0; - $exitcond$i11 = ($1276|0)==(12); - if ($exitcond$i11) { - $pe_s$2$2$i$lcssa = $pe_s$2$2$i; - break; - } else { - $pe_s$04$i = $pe_s$2$2$i;$sb$03$i = $1276; - } - } - $1277 = (($ppe$0) + ($chn$6112<<2)|0); - HEAPF32[$1277>>2] = $pe_s$2$2$i$lcssa; - $1305 = $pe_s$2$2$i$lcssa; - } else { - $pe_l$02$i = 281.0574951171875;$sb$01$i = 0; - while(1) { - $1278 = (($mr$0) + ($sb$01$i<<2)|0); - $1279 = +HEAPF32[$1278>>2]; - $1280 = $1279 > 0.0; - do { - if ($1280) { - $1281 = $1279 * $1205; - $1282 = (((($mr$0)) + 244|0) + ($sb$01$i<<2)|0); - $1283 = +HEAPF32[$1282>>2]; - $1284 = $1283 > $1281; - if (!($1284)) { - $pe_l$1$i = $pe_l$02$i; - break; - } - $1285 = $1281 * 1.0E+10; - $1286 = $1283 > $1285; - $1287 = (11632 + ($sb$01$i<<2)|0); - $1288 = +HEAPF32[$1287>>2]; - $1289 = $1288; - if ($1286) { - $1290 = $1289 * 23.025850929940461; - $1291 = $pe_l$02$i; - $1292 = $1290 + $1291; - $1293 = $1292; - $pe_l$1$i = $1293; - break; - } else { - $1294 = $1283 / $1281; - $1295 = (+_fast_log2($1294)); - $1296 = $1295; - $1297 = $1289 * 0.30102999566398114; - $1298 = $1297 * $1296; - $1299 = $pe_l$02$i; - $1300 = $1298 + $1299; - $1301 = $1300; - $pe_l$1$i = $1301; - break; - } - } else { - $pe_l$1$i = $pe_l$02$i; - } - } while(0); - $1302 = (($sb$01$i) + 1)|0; - $exitcond$i7 = ($1302|0)==(21); - if ($exitcond$i7) { - $pe_l$1$i$lcssa = $pe_l$1$i; - break; - } else { - $pe_l$02$i = $pe_l$1$i;$sb$01$i = $1302; - } - } - $1303 = (($ppe$0) + ($chn$6112<<2)|0); - HEAPF32[$1303>>2] = $pe_l$1$i$lcssa; - $1305 = $pe_l$1$i$lcssa; - } - if (!($1193)) { - $1304 = $1305; - $1306 = ((((($1192)) + 189240|0) + ($gr_out<<5)|0) + ($chn$6112<<3)|0); - HEAPF64[$1306>>3] = $1304; - } - $1307 = (($chn$6112) + 1)|0; - $exitcond = ($1307|0)==($417|0); - if ($exitcond) { - break; - } else { - $chn$6112 = $1307; - } - } - STACKTOP = sp;return 0; -} -function _psymodel_init($gfp) { - $gfp = $gfp|0; - var $$ = 0.0, $$0 = 0, $$lcssa = 0, $$lcssa133 = 0.0, $$lcssa20 = 0, $$pre = 0, $$pre109 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; - var $11 = 0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0, $114 = 0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0, $126 = 0.0, $127 = 0.0; - var $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0; - var $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0.0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0; - var $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0, $169 = 0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0.0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0.0; - var $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0.0, $191 = 0.0, $192 = 0.0, $193 = 0, $194 = 0.0, $195 = 0.0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0; - var $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0.0, $205 = 0, $206 = 0.0, $207 = 0, $208 = 0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0, $213 = 0, $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0.0; - var $218 = 0.0, $219 = 0, $22 = 0, $220 = 0.0, $221 = 0.0, $222 = 0.0, $223 = 0.0, $224 = 0.0, $225 = 0.0, $226 = 0.0, $227 = 0.0, $228 = 0.0, $229 = 0.0, $23 = 0, $230 = 0.0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0; - var $236 = 0.0, $237 = 0, $238 = 0, $239 = 0.0, $24 = 0, $240 = 0, $241 = 0.0, $242 = 0.0, $243 = 0.0, $244 = 0.0, $245 = 0.0, $246 = 0.0, $247 = 0.0, $248 = 0.0, $249 = 0.0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0; - var $254 = 0.0, $255 = 0.0, $256 = 0.0, $257 = 0.0, $258 = 0.0, $259 = 0.0, $26 = 0, $260 = 0.0, $261 = 0.0, $262 = 0.0, $263 = 0.0, $264 = 0.0, $265 = 0.0, $266 = 0, $267 = 0.0, $268 = 0.0, $269 = 0.0, $27 = 0, $270 = 0, $271 = 0; - var $272 = 0, $273 = 0, $274 = 0.0, $275 = 0, $276 = 0, $277 = 0.0, $278 = 0.0, $279 = 0.0, $28 = 0, $280 = 0.0, $281 = 0, $282 = 0.0, $283 = 0.0, $284 = 0.0, $285 = 0.0, $286 = 0.0, $287 = 0, $288 = 0.0, $289 = 0.0, $29 = 0; - var $290 = 0.0, $291 = 0.0, $292 = 0.0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0.0, $298 = 0.0, $299 = 0.0, $3 = 0, $30 = 0, $300 = 0, $301 = 0.0, $302 = 0.0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0; - var $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0.0, $312 = 0.0, $313 = 0.0, $314 = 0.0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0.0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0; - var $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0.0, $333 = 0.0, $334 = 0.0, $335 = 0.0, $336 = 0.0, $337 = 0.0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0; - var $344 = 0, $345 = 0, $346 = 0, $347 = 0.0, $348 = 0.0, $349 = 0.0, $35 = 0, $350 = 0.0, $351 = 0.0, $352 = 0.0, $353 = 0.0, $354 = 0.0, $355 = 0.0, $356 = 0, $357 = 0, $358 = 0.0, $359 = 0, $36 = 0, $360 = 0.0, $361 = 0; - var $362 = 0, $363 = 0, $364 = 0.0, $365 = 0, $366 = 0.0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0.0, $379 = 0.0, $38 = 0; - var $380 = 0, $381 = 0, $382 = 0, $383 = 0.0, $384 = 0, $385 = 0.0, $386 = 0, $387 = 0, $388 = 0.0, $389 = 0.0, $39 = 0, $390 = 0.0, $391 = 0.0, $392 = 0, $393 = 0.0, $394 = 0, $395 = 0, $396 = 0.0, $397 = 0.0, $398 = 0.0; - var $399 = 0.0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0.0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0.0, $412 = 0.0, $413 = 0.0, $414 = 0.0, $415 = 0; - var $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; - var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0, $73 = 0; - var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0.0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0; - var $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $b$051 = 0, $b$3$lcssa110 = 0, $b$329 = 0, $b$427 = 0, $b$5$lcssa111 = 0, $b$525 = 0, $b$624 = 0, $bval = 0, $bval_width = 0, $eql_balance$049 = 0.0, $exitcond = 0, $exitcond$i = 0; - var $exitcond$i4 = 0, $exitcond101 = 0, $exitcond102 = 0, $exitcond106 = 0, $exitcond108 = 0, $exitcond97 = 0, $freq5$048 = 0.0, $i$089 = 0, $i$180 = 0, $i$278 = 0, $i$365 = 0, $i$450 = 0, $j$01$i = 0, $j$01$i3 = 0, $j$084 = 0, $j$187 = 0, $j$377 = 0, $j$4$lcssa = 0, $j$471 = 0, $j$564 = 0; - var $j$6$lcssa = 0, $j$657 = 0, $k$02$i = 0, $k$02$i2 = 0, $k$069 = 0, $k$155 = 0, $msfix$0 = 0.0, $norm = 0, $phitmp = 0.0, $sk_s$0 = 0.0, $snr2$0 = 0.0, $x$0$lcssa = 0.0, $x$070 = 0.0, $x$1 = 0.0, $x$2 = 0.0, $x$3 = 0.0, $x$3$op = 0.0, $x$3$op$op = 0.0, $x1$0$lcssa = 0.0, $x1$056 = 0.0; - var $x1$1 = 0.0, $x1$2 = 0.0, $x1$3 = 0.0, $x1$4 = 0.0, $x1$5 = 0.0, $x1$5$op = 0.0, $x1$5$op$op = 0.0, $x6$0 = 0.0, $y$0 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 768|0; - $bval = sp + 512|0; - $bval_width = sp + 256|0; - $norm = sp; - $0 = ((($gfp)) + 288|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($1)) + 16|0); - $3 = ((($1)) + 64|0); - $4 = HEAP32[$3>>2]|0; - $5 = (+($4|0)); - $6 = ((($1)) + 280|0); - $7 = +HEAPF32[$6>>2]; - $8 = -$7; - $9 = ((($1)) + 85800|0); - $10 = HEAP32[$9>>2]|0; - $11 = ($10|0)==(0|0); - if (!($11)) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - _memset(($norm|0),0,256)|0; - $12 = (_calloc(1,6504)|0); - HEAP32[$9>>2] = $12; - $13 = ((($gfp)) + 144|0); - $14 = HEAP32[$13>>2]|0; - $15 = ((($12)) + 6500|0); - HEAP32[$15>>2] = $14; - $16 = ((($1)) + 27800|0); - HEAP32[$16>>2] = 0; - $17 = ((($1)) + 27796|0); - HEAP32[$17>>2] = 0; - $i$089 = 0; - while(1) { - $j$084 = 0; - while(1) { - $63 = ((((($1)) + 21564|0) + ($i$089<<8)|0) + ($j$084<<2)|0); - HEAPF32[$63>>2] = 1.0000000200408773E+20; - $64 = ((((($1)) + 22588|0) + ($i$089<<8)|0) + ($j$084<<2)|0); - HEAPF32[$64>>2] = 1.0000000200408773E+20; - $65 = ((((($1)) + 24636|0) + ($i$089<<8)|0) + ($j$084<<2)|0); - HEAPF32[$65>>2] = 1.0; - $66 = ((((($1)) + 23612|0) + ($i$089<<8)|0) + ($j$084<<2)|0); - HEAPF32[$66>>2] = 1.0; - $67 = (($j$084) + 1)|0; - $exitcond102 = ($67|0)==(64); - if ($exitcond102) { - break; - } else { - $j$084 = $67; - } - } - $18 = (((($1)) + 26636|0) + (($i$089*244)|0)|0); - HEAPF32[$18>>2] = 1.0000000200408773E+20; - $19 = (((($1)) + 25660|0) + (($i$089*244)|0)|0); - HEAPF32[$19>>2] = 1.0000000200408773E+20; - $20 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 4|0); - HEAPF32[$20>>2] = 1.0000000200408773E+20; - $21 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 4|0); - HEAPF32[$21>>2] = 1.0000000200408773E+20; - $22 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 8|0); - HEAPF32[$22>>2] = 1.0000000200408773E+20; - $23 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 8|0); - HEAPF32[$23>>2] = 1.0000000200408773E+20; - $24 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 12|0); - HEAPF32[$24>>2] = 1.0000000200408773E+20; - $25 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 12|0); - HEAPF32[$25>>2] = 1.0000000200408773E+20; - $26 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 16|0); - HEAPF32[$26>>2] = 1.0000000200408773E+20; - $27 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 16|0); - HEAPF32[$27>>2] = 1.0000000200408773E+20; - $28 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 20|0); - HEAPF32[$28>>2] = 1.0000000200408773E+20; - $29 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 20|0); - HEAPF32[$29>>2] = 1.0000000200408773E+20; - $30 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 24|0); - HEAPF32[$30>>2] = 1.0000000200408773E+20; - $31 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 24|0); - HEAPF32[$31>>2] = 1.0000000200408773E+20; - $32 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 28|0); - HEAPF32[$32>>2] = 1.0000000200408773E+20; - $33 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 28|0); - HEAPF32[$33>>2] = 1.0000000200408773E+20; - $34 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 32|0); - HEAPF32[$34>>2] = 1.0000000200408773E+20; - $35 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 32|0); - HEAPF32[$35>>2] = 1.0000000200408773E+20; - $36 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 36|0); - HEAPF32[$36>>2] = 1.0000000200408773E+20; - $37 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 36|0); - HEAPF32[$37>>2] = 1.0000000200408773E+20; - $38 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 40|0); - HEAPF32[$38>>2] = 1.0000000200408773E+20; - $39 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 40|0); - HEAPF32[$39>>2] = 1.0000000200408773E+20; - $40 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 44|0); - HEAPF32[$40>>2] = 1.0000000200408773E+20; - $41 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 44|0); - HEAPF32[$41>>2] = 1.0000000200408773E+20; - $42 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 48|0); - HEAPF32[$42>>2] = 1.0000000200408773E+20; - $43 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 48|0); - HEAPF32[$43>>2] = 1.0000000200408773E+20; - $44 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 52|0); - HEAPF32[$44>>2] = 1.0000000200408773E+20; - $45 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 52|0); - HEAPF32[$45>>2] = 1.0000000200408773E+20; - $46 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 56|0); - HEAPF32[$46>>2] = 1.0000000200408773E+20; - $47 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 56|0); - HEAPF32[$47>>2] = 1.0000000200408773E+20; - $48 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 60|0); - HEAPF32[$48>>2] = 1.0000000200408773E+20; - $49 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 60|0); - HEAPF32[$49>>2] = 1.0000000200408773E+20; - $50 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 64|0); - HEAPF32[$50>>2] = 1.0000000200408773E+20; - $51 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 64|0); - HEAPF32[$51>>2] = 1.0000000200408773E+20; - $52 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 68|0); - HEAPF32[$52>>2] = 1.0000000200408773E+20; - $53 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 68|0); - HEAPF32[$53>>2] = 1.0000000200408773E+20; - $54 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 72|0); - HEAPF32[$54>>2] = 1.0000000200408773E+20; - $55 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 72|0); - HEAPF32[$55>>2] = 1.0000000200408773E+20; - $56 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 76|0); - HEAPF32[$56>>2] = 1.0000000200408773E+20; - $57 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 76|0); - HEAPF32[$57>>2] = 1.0000000200408773E+20; - $58 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 80|0); - HEAPF32[$58>>2] = 1.0000000200408773E+20; - $59 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 80|0); - HEAPF32[$59>>2] = 1.0000000200408773E+20; - $60 = (((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 84|0); - HEAPF32[$60>>2] = 1.0000000200408773E+20; - $61 = (((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 84|0); - HEAPF32[$61>>2] = 1.0000000200408773E+20; - $62 = (((($1)) + 27780|0) + ($i$089<<2)|0); - $j$187 = 0; - while(1) { - $78 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 88|0) + ($j$187<<2)|0); - HEAPF32[$78>>2] = 1.0000000200408773E+20; - $79 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 88|0) + ($j$187<<2)|0); - HEAPF32[$79>>2] = 1.0000000200408773E+20; - $80 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 100|0) + ($j$187<<2)|0); - HEAPF32[$80>>2] = 1.0000000200408773E+20; - $81 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 100|0) + ($j$187<<2)|0); - HEAPF32[$81>>2] = 1.0000000200408773E+20; - $82 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 112|0) + ($j$187<<2)|0); - HEAPF32[$82>>2] = 1.0000000200408773E+20; - $83 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 112|0) + ($j$187<<2)|0); - HEAPF32[$83>>2] = 1.0000000200408773E+20; - $84 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 124|0) + ($j$187<<2)|0); - HEAPF32[$84>>2] = 1.0000000200408773E+20; - $85 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 124|0) + ($j$187<<2)|0); - HEAPF32[$85>>2] = 1.0000000200408773E+20; - $86 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 136|0) + ($j$187<<2)|0); - HEAPF32[$86>>2] = 1.0000000200408773E+20; - $87 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 136|0) + ($j$187<<2)|0); - HEAPF32[$87>>2] = 1.0000000200408773E+20; - $88 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 148|0) + ($j$187<<2)|0); - HEAPF32[$88>>2] = 1.0000000200408773E+20; - $89 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 148|0) + ($j$187<<2)|0); - HEAPF32[$89>>2] = 1.0000000200408773E+20; - $90 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 160|0) + ($j$187<<2)|0); - HEAPF32[$90>>2] = 1.0000000200408773E+20; - $91 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 160|0) + ($j$187<<2)|0); - HEAPF32[$91>>2] = 1.0000000200408773E+20; - $92 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 172|0) + ($j$187<<2)|0); - HEAPF32[$92>>2] = 1.0000000200408773E+20; - $93 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 172|0) + ($j$187<<2)|0); - HEAPF32[$93>>2] = 1.0000000200408773E+20; - $94 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 184|0) + ($j$187<<2)|0); - HEAPF32[$94>>2] = 1.0000000200408773E+20; - $95 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 184|0) + ($j$187<<2)|0); - HEAPF32[$95>>2] = 1.0000000200408773E+20; - $96 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 196|0) + ($j$187<<2)|0); - HEAPF32[$96>>2] = 1.0000000200408773E+20; - $97 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 196|0) + ($j$187<<2)|0); - HEAPF32[$97>>2] = 1.0000000200408773E+20; - $98 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 208|0) + ($j$187<<2)|0); - HEAPF32[$98>>2] = 1.0000000200408773E+20; - $99 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 208|0) + ($j$187<<2)|0); - HEAPF32[$99>>2] = 1.0000000200408773E+20; - $100 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 220|0) + ($j$187<<2)|0); - HEAPF32[$100>>2] = 1.0000000200408773E+20; - $101 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 220|0) + ($j$187<<2)|0); - HEAPF32[$101>>2] = 1.0000000200408773E+20; - $102 = ((((((($1)) + 26636|0) + (($i$089*244)|0)|0)) + 232|0) + ($j$187<<2)|0); - HEAPF32[$102>>2] = 1.0000000200408773E+20; - $103 = ((((((($1)) + 25660|0) + (($i$089*244)|0)|0)) + 232|0) + ($j$187<<2)|0); - HEAPF32[$103>>2] = 1.0000000200408773E+20; - HEAP32[$62>>2] = 0; - $104 = (($j$187) + 1)|0; - $exitcond106 = ($104|0)==(3); - if ($exitcond106) { - break; - } else { - $j$187 = $104; - } - } - $68 = (((($1)) + 27636|0) + (($i$089*36)|0)|0); - HEAPF32[$68>>2] = 10.0; - $69 = (((((($1)) + 27636|0) + (($i$089*36)|0)|0)) + 4|0); - HEAPF32[$69>>2] = 10.0; - $70 = (((((($1)) + 27636|0) + (($i$089*36)|0)|0)) + 8|0); - HEAPF32[$70>>2] = 10.0; - $71 = (((((($1)) + 27636|0) + (($i$089*36)|0)|0)) + 12|0); - HEAPF32[$71>>2] = 10.0; - $72 = (((((($1)) + 27636|0) + (($i$089*36)|0)|0)) + 16|0); - HEAPF32[$72>>2] = 10.0; - $73 = (((((($1)) + 27636|0) + (($i$089*36)|0)|0)) + 20|0); - HEAPF32[$73>>2] = 10.0; - $74 = (((((($1)) + 27636|0) + (($i$089*36)|0)|0)) + 24|0); - HEAPF32[$74>>2] = 10.0; - $75 = (((((($1)) + 27636|0) + (($i$089*36)|0)|0)) + 28|0); - HEAPF32[$75>>2] = 10.0; - $76 = (((((($1)) + 27636|0) + (($i$089*36)|0)|0)) + 32|0); - HEAPF32[$76>>2] = 10.0; - $77 = (($i$089) + 1)|0; - $exitcond108 = ($77|0)==(4); - if ($exitcond108) { - break; - } else { - $i$089 = $77; - } - } - $105 = ((($1)) + 27616|0); - HEAPF32[$105>>2] = 0.0; - $106 = ((($1)) + 27612|0); - HEAPF32[$106>>2] = 0.0; - $107 = ((($1)) + 21360|0); - _init_numline($12,$5,1024,576,22,$107); - $108 = ((($12)) + 2148|0); - $109 = HEAP32[$108>>2]|0; - $110 = $5 * 9.765625E-4; - $111 = ($109|0)>(0); - if ($111) { - $112 = $110; - $j$01$i = 0;$k$02$i = 0; - while(1) { - $113 = (((($12)) + 1716|0) + ($k$02$i<<2)|0); - $114 = HEAP32[$113>>2]|0; - $115 = (+($j$01$i|0)); - $116 = $115 * $110; - $117 = (+_freq2bark($116)); - $118 = (($114) + ($j$01$i))|0; - $119 = (($118) + -1)|0; - $120 = (+($119|0)); - $121 = $120 * $110; - $122 = (+_freq2bark($121)); - $123 = $122 + $117; - $124 = $123 * 0.5; - $125 = (($bval) + ($k$02$i<<2)|0); - HEAPF32[$125>>2] = $124; - $126 = (+($j$01$i|0)); - $127 = $126 + -0.5; - $128 = $127 * $112; - $129 = $128; - $130 = (+_freq2bark($129)); - $131 = (+($118|0)); - $132 = $131 + -0.5; - $133 = $132 * $112; - $134 = $133; - $135 = (+_freq2bark($134)); - $136 = $135 - $130; - $137 = (($bval_width) + ($k$02$i<<2)|0); - HEAPF32[$137>>2] = $136; - $138 = (($k$02$i) + 1)|0; - $exitcond$i = ($138|0)==($109|0); - if ($exitcond$i) { - break; - } else { - $j$01$i = $118;$k$02$i = $138; - } - } - $$pre = HEAP32[$108>>2]|0; - $139 = ($$pre|0)>(0); - if ($139) { - $i$180 = 0; - while(1) { - $140 = (($norm) + ($i$180<<2)|0); - HEAPF32[$140>>2] = 1.0; - $141 = (($i$180) + 1)|0; - $142 = ($141|0)<($$pre|0); - if ($142) { - $i$180 = $141; - } else { - $145 = $$pre; - break; - } - } - } else { - $145 = $$pre; - } - } else { - $145 = $109; - } - $143 = ((($12)) + 2156|0); - $144 = ((($12)) + 1204|0); - $146 = (_init_s3_values($143,$144,$145,$bval,$bval_width,$norm)|0); - $147 = ($146|0)==(0); - if (!($147)) { - $$0 = $146; - STACKTOP = sp;return ($$0|0); - } - $148 = HEAP32[$108>>2]|0; - $149 = ($148|0)>(0); - if ($149) { - $150 = ((($12)) + 1716|0); - $151 = ((($1)) + 85796|0); - $152 = $8; - $153 = ((($12)) + 256|0); - $i$278 = 0;$j$377 = 0; - while(1) { - $154 = (($150) + ($i$278<<2)|0); - $155 = HEAP32[$154>>2]|0; - $156 = ($155|0)>(0); - if ($156) { - $j$471 = $j$377;$k$069 = 0;$x$070 = 9.9999999999999995E+36; - while(1) { - $157 = (+($j$471|0)); - $158 = $157 * $5; - $159 = $158; - $160 = $159 * 9.7656250000000002E-7; - $161 = $160; - $162 = $161 * 1000.0; - $163 = (+_ATHformula($2,$162)); - $164 = $163 + -20.0; - $165 = $164; - $166 = $165 * 0.10000000000000001; - $167 = (+Math_pow(10.0,(+$166))); - $168 = $167; - $169 = HEAP32[$154>>2]|0; - $170 = (+($169|0)); - $171 = $170 * $168; - $172 = $171; - $173 = $x$070 > $172; - $x$1 = $173 ? $172 : $x$070; - $174 = (($k$069) + 1)|0; - $175 = (($j$471) + 1)|0; - $176 = ($174|0)<($169|0); - if ($176) { - $j$471 = $175;$k$069 = $174;$x$070 = $x$1; - } else { - $193 = $169;$j$4$lcssa = $175;$x$0$lcssa = $x$1; - break; - } - } - } else { - $193 = $155;$j$4$lcssa = $j$377;$x$0$lcssa = 9.9999999999999995E+36; - } - $177 = $x$0$lcssa; - $178 = HEAP32[$151>>2]|0; - $179 = (((($178)) + 212|0) + ($i$278<<2)|0); - HEAPF32[$179>>2] = $177; - $180 = (($bval) + ($i$278<<2)|0); - $181 = +HEAPF32[$180>>2]; - $182 = $181 * 0.10000000149011612; - $183 = $182; - $184 = $183 + -1.0; - $185 = $184 * 20.0; - $186 = $185 > 6.0; - $x$2 = $186 ? 30.0 : $185; - $187 = $x$2 < $152; - $x$3 = $187 ? $152 : $x$2; - $188 = HEAP32[$3>>2]|0; - $189 = ($188|0)<(44000); - $x$3$op = $x$3 + -8.0; - $x$3$op$op = $x$3$op * 0.10000000000000001; - $190 = $189 ? 2.2000000000000002 : $x$3$op$op; - $191 = (+Math_pow(10.0,(+$190))); - $192 = (+($193|0)); - $194 = $192 * $191; - $195 = $194; - $196 = (($153) + ($i$278<<2)|0); - HEAPF32[$196>>2] = $195; - $197 = (($i$278) + 1)|0; - $198 = HEAP32[$108>>2]|0; - $199 = ($197|0)<($198|0); - if ($199) { - $i$278 = $197;$j$377 = $j$4$lcssa; - } else { - break; - } - } - } - $200 = ((($12)) + 2160|0); - $201 = ((($1)) + 21452|0); - _init_numline($200,$5,256,192,13,$201); - $202 = ((($12)) + 4308|0); - $203 = HEAP32[$202>>2]|0; - $204 = $5 * 0.00390625; - $205 = ($203|0)>(0); - if ($205) { - $206 = $204; - $j$01$i3 = 0;$k$02$i2 = 0; - while(1) { - $207 = (((($200)) + 1716|0) + ($k$02$i2<<2)|0); - $208 = HEAP32[$207>>2]|0; - $209 = (+($j$01$i3|0)); - $210 = $209 * $204; - $211 = (+_freq2bark($210)); - $212 = (($208) + ($j$01$i3))|0; - $213 = (($212) + -1)|0; - $214 = (+($213|0)); - $215 = $214 * $204; - $216 = (+_freq2bark($215)); - $217 = $216 + $211; - $218 = $217 * 0.5; - $219 = (($bval) + ($k$02$i2<<2)|0); - HEAPF32[$219>>2] = $218; - $220 = (+($j$01$i3|0)); - $221 = $220 + -0.5; - $222 = $221 * $206; - $223 = $222; - $224 = (+_freq2bark($223)); - $225 = (+($212|0)); - $226 = $225 + -0.5; - $227 = $226 * $206; - $228 = $227; - $229 = (+_freq2bark($228)); - $230 = $229 - $224; - $231 = (($bval_width) + ($k$02$i2<<2)|0); - HEAPF32[$231>>2] = $230; - $232 = (($k$02$i2) + 1)|0; - $exitcond$i4 = ($232|0)==($203|0); - if ($exitcond$i4) { - break; - } else { - $j$01$i3 = $212;$k$02$i2 = $232; - } - } - $$pre109 = HEAP32[$202>>2]|0; - $233 = ($$pre109|0)>(0); - if ($233) { - $234 = ((($12)) + 3876|0); - $235 = ((($1)) + 85796|0); - $236 = $8; - $237 = ((($12)) + 2416|0); - $i$365 = 0;$j$564 = 0; - while(1) { - $238 = (($bval) + ($i$365<<2)|0); - $239 = +HEAPF32[$238>>2]; - $240 = !($239 >= 13.0); - if ($240) { - $snr2$0 = -8.25; - } else { - $241 = $239 + -13.0; - $242 = $241 * 0.40909090638160706; - $243 = 24.0 - $239; - $244 = $243 * -0.75; - $245 = $244 - $242; - $246 = $245; - $snr2$0 = $246; - } - $247 = $snr2$0 * 0.10000000000000001; - $248 = (+Math_pow(10.0,(+$247))); - $249 = $248; - $250 = (($norm) + ($i$365<<2)|0); - HEAPF32[$250>>2] = $249; - $251 = (($234) + ($i$365<<2)|0); - $252 = HEAP32[$251>>2]|0; - $253 = ($252|0)>(0); - if ($253) { - $j$657 = $j$564;$k$155 = 0;$x1$056 = 9.9999999999999995E+36; - while(1) { - $254 = (+($j$657|0)); - $255 = $254 * $5; - $256 = $255; - $257 = $256 * 3.9062500000000001E-6; - $258 = $257; - $259 = $258 * 1000.0; - $260 = (+_ATHformula($2,$259)); - $261 = $260 + -20.0; - $262 = $261; - $263 = $262 * 0.10000000000000001; - $264 = (+Math_pow(10.0,(+$263))); - $265 = $264; - $266 = HEAP32[$251>>2]|0; - $267 = (+($266|0)); - $268 = $267 * $265; - $269 = $268; - $270 = $x1$056 > $269; - $x1$1 = $270 ? $269 : $x1$056; - $271 = (($k$155) + 1)|0; - $272 = (($j$657) + 1)|0; - $273 = ($271|0)<($266|0); - if ($273) { - $j$657 = $272;$k$155 = $271;$x1$056 = $x1$1; - } else { - $300 = $266;$j$6$lcssa = $272;$x1$0$lcssa = $x1$1; - break; - } - } - } else { - $300 = $252;$j$6$lcssa = $j$564;$x1$0$lcssa = 9.9999999999999995E+36; - } - $274 = $x1$0$lcssa; - $275 = HEAP32[$235>>2]|0; - $276 = (((($275)) + 468|0) + ($i$365<<2)|0); - HEAPF32[$276>>2] = $274; - $277 = $239 * 0.083333335816860198; - $278 = $277; - $279 = $278 + -1.0; - $280 = $279 * 7.0; - $281 = $239 > 12.0; - if ($281) { - $282 = $280 + 1.0; - $283 = (+Math_log((+$282))); - $284 = $283 * 3.1000000000000001; - $285 = $284 + 1.0; - $286 = $285 * $280; - $x1$2 = $286; - } else { - $x1$2 = $280; - } - $287 = $239 < 12.0; - if ($287) { - $288 = 1.0 - $x1$2; - $289 = (+Math_log((+$288))); - $290 = $289 * 2.2999999999999998; - $291 = $290 + 1.0; - $292 = $291 * $x1$2; - $x1$3 = $292; - } else { - $x1$3 = $x1$2; - } - $293 = $x1$3 > 6.0; - $x1$4 = $293 ? 30.0 : $x1$3; - $294 = $x1$4 < $236; - $x1$5 = $294 ? $236 : $x1$4; - $295 = HEAP32[$3>>2]|0; - $296 = ($295|0)<(44000); - $x1$5$op = $x1$5 + -8.0; - $x1$5$op$op = $x1$5$op * 0.10000000000000001; - $297 = $296 ? 2.2000000000000002 : $x1$5$op$op; - $298 = (+Math_pow(10.0,(+$297))); - $299 = (+($300|0)); - $301 = $299 * $298; - $302 = $301; - $303 = (($237) + ($i$365<<2)|0); - HEAPF32[$303>>2] = $302; - $304 = (($i$365) + 1)|0; - $305 = HEAP32[$202>>2]|0; - $306 = ($304|0)<($305|0); - if ($306) { - $i$365 = $304;$j$564 = $j$6$lcssa; - } else { - $$lcssa20 = $305; - break; - } - } - } else { - $$lcssa20 = $$pre109; - } - } else { - $$lcssa20 = $203; - } - $307 = ((($12)) + 4316|0); - $308 = ((($12)) + 3364|0); - $309 = (_init_s3_values($307,$308,$$lcssa20,$bval,$bval_width,$norm)|0); - $310 = ($309|0)==(0); - if (!($310)) { - $$0 = $309; - STACKTOP = sp;return ($$0|0); - } - HEAPF32[11528>>2] = 3.6517412662506104; - HEAPF32[11576>>2] = 31.622776031494141; - _init_fft($1); - $311 = $5; - $312 = -44209.633785485676 / $311; - $313 = (+Math_exp((+$312))); - $314 = $313; - $315 = ((($12)) + 6496|0); - HEAPF32[$315>>2] = $314; - $316 = ((($1)) + 96|0); - $317 = HEAP32[$316>>2]|0; - $318 = ($317|0)!=(0); - $$ = $318 ? 1.0 : 3.5; - $319 = ((($1)) + 192|0); - $320 = +HEAPF32[$319>>2]; - $321 = ($320 != $320) | (0.0 != 0.0) |($320 == 0.0); - $msfix$0 = $321 ? $$ : $320; - HEAPF32[$319>>2] = $msfix$0; - $322 = HEAP32[$108>>2]|0; - $323 = ($322|0)>(0); - if ($323) { - $324 = (($322) + -1)|0; - $b$051 = 0; - while(1) { - $325 = (((($144) + ($b$051<<3)|0)) + 4|0); - $326 = HEAP32[$325>>2]|0; - $327 = ($326|0)>($324|0); - if ($327) { - HEAP32[$325>>2] = $324; - } - $328 = (($b$051) + 1)|0; - $329 = ($328|0)<($322|0); - if ($329) { - $b$051 = $328; - } else { - break; - } - } - } - $330 = ((($1)) + 76|0); - $331 = HEAP32[$330>>2]|0; - $332 = (+($331|0)); - $333 = $332 * 576.0; - $334 = $333 / $311; - $335 = $334 * -1.2; - $336 = (+Math_pow(10.0,(+$335))); - $337 = $336; - $338 = ((($1)) + 85796|0); - $339 = HEAP32[$338>>2]|0; - $340 = ((($339)) + 16|0); - HEAPF32[$340>>2] = $337; - $341 = ((($339)) + 8|0); - HEAPF32[$341>>2] = 0.0099999997764825821; - $342 = ((($339)) + 12|0); - HEAPF32[$342>>2] = 1.0; - $343 = ((($1)) + 208|0); - $344 = HEAP32[$343>>2]|0; - $345 = ($344|0)==(-1); - if (!($345)) { - $346 = HEAP32[$3>>2]|0; - $347 = (+($346|0)); - $348 = $347 * 9.765625E-4; - $eql_balance$049 = 0.0;$freq5$048 = 0.0;$i$450 = 0; - while(1) { - $349 = $freq5$048 + $348; - $350 = (+_ATHformula($2,$349)); - $351 = $350 * 0.10000000149011612; - $352 = $351; - $353 = (+Math_pow(10.0,(+$352))); - $354 = 1.0 / $353; - $355 = $354; - $356 = HEAP32[$338>>2]|0; - $357 = (((($356)) + 724|0) + ($i$450<<2)|0); - HEAPF32[$357>>2] = $355; - $358 = $355 + $eql_balance$049; - $359 = (($i$450) + 1)|0; - $exitcond101 = ($359|0)==(512); - if ($exitcond101) { - $$lcssa = $356;$$lcssa133 = $358; - break; - } else { - $eql_balance$049 = $358;$freq5$048 = $349;$i$450 = $359; - } - } - $360 = 1.0 / $$lcssa133; - $377 = 511; - while(1) { - $376 = (((($$lcssa)) + 724|0) + ($377<<2)|0); - $378 = +HEAPF32[$376>>2]; - $379 = $378 * $360; - HEAPF32[$376>>2] = $379; - $380 = (($377) + -1)|0; - $381 = ($377|0)>(0); - if ($381) { - $377 = $380; - } else { - break; - } - } - } - $361 = HEAP32[$202>>2]|0; - $362 = ($361|0)>(0); - $363 = ((($gfp)) + 264|0); - $364 = +HEAPF32[$363>>2]; - $365 = ((($gfp)) + 268|0); - $366 = +HEAPF32[$365>>2]; - $367 = $364 < 0.0; - $x6$0 = $367 ? 4.4000000953674316 : $364; - $368 = $366 < 0.0; - $y$0 = $368 ? 25.0 : $366; - $369 = ((($12)) + 6480|0); - $370 = ((($12)) + 6488|0); - HEAPF32[$370>>2] = $x6$0; - $371 = ((($12)) + 6484|0); - HEAPF32[$371>>2] = $x6$0; - HEAPF32[$369>>2] = $x6$0; - $372 = ((($12)) + 6492|0); - HEAPF32[$372>>2] = $y$0; - $373 = ((($gfp)) + 164|0); - $374 = HEAP32[$373>>2]|0; - $375 = ($374|0)<(4); - if ($375) { - $sk_s$0 = -0.74000000953674316; - } else { - $382 = (11720 + ($374<<2)|0); - $383 = +HEAPF32[$382>>2]; - $384 = ((($gfp)) + 160|0); - $385 = +HEAPF32[$384>>2]; - $386 = (($374) + 1)|0; - $387 = (11720 + ($386<<2)|0); - $388 = +HEAPF32[$387>>2]; - $389 = $383 - $388; - $390 = $389 * $385; - $391 = $390 + $383; - $phitmp = $391 * 0.10000000149011612; - $sk_s$0 = $phitmp; - } - if ($362) { - $392 = ($361|0)>(1); - $393 = (+($361|0)); - $b$329 = 0; - while(1) { - $395 = (($361) - ($b$329))|0; - $396 = (+($395|0)); - $397 = $396 / $393; - $398 = $sk_s$0 * $397; - $399 = (+Math_pow(10.0,(+$398))); - $400 = (($200) + ($b$329<<2)|0); - HEAPF32[$400>>2] = $399; - $401 = (($b$329) + 1)|0; - $402 = ($361|0)>($401|0); - if ($402) { - $b$329 = $401; - } else { - break; - } - } - if ($392) { - $394 = ($361|0)<(64); - if ($394) { - $b$3$lcssa110 = $361; - label = 50; - } - } else { - $b$3$lcssa110 = 1; - label = 50; - } - } else { - $b$3$lcssa110 = 0; - label = 50; - } - if ((label|0) == 50) { - $b$427 = $b$3$lcssa110; - while(1) { - $407 = (($200) + ($b$427<<2)|0); - HEAPF32[$407>>2] = 1.0; - $408 = (($b$427) + 1)|0; - $exitcond97 = ($408|0)==(64); - if ($exitcond97) { - break; - } else { - $b$427 = $408; - } - } - } - $403 = HEAP32[$108>>2]|0; - $404 = ($403|0)>(0); - if ($404) { - $405 = ($403|0)>(1); - $406 = (+($403|0)); - $b$525 = 0; - while(1) { - $410 = (($403) - ($b$525))|0; - $411 = (+($410|0)); - $412 = $411 / $406; - $413 = $sk_s$0 * $412; - $414 = (+Math_pow(10.0,(+$413))); - $415 = (($12) + ($b$525<<2)|0); - HEAPF32[$415>>2] = $414; - $416 = (($b$525) + 1)|0; - $417 = ($403|0)>($416|0); - if ($417) { - $b$525 = $416; - } else { - break; - } - } - if ($405) { - $409 = ($403|0)<(64); - if ($409) { - $b$5$lcssa111 = $403; - label = 57; - } - } else { - $b$5$lcssa111 = 1; - label = 57; - } - } else { - $b$5$lcssa111 = 0; - label = 57; - } - if ((label|0) == 57) { - $b$624 = $b$5$lcssa111; - while(1) { - $418 = (($12) + ($b$624<<2)|0); - HEAPF32[$418>>2] = 1.0; - $419 = (($b$624) + 1)|0; - $exitcond = ($419|0)==(64); - if ($exitcond) { - break; - } else { - $b$624 = $419; - } - } - } - $420 = ((($12)) + 4320|0); - _memcpy(($420|0),($12|0),2160)|0; - _init_numline($420,$5,1024,192,13,$201); - $$0 = 0; - STACKTOP = sp;return ($$0|0); -} -function _vbrpsy_compute_MS_thresholds($eb,$thr,$cb_mld,$ath_cb,$athlower,$msfix,$n) { - $eb = $eb|0; - $thr = $thr|0; - $cb_mld = $cb_mld|0; - $ath_cb = $ath_cb|0; - $athlower = +$athlower; - $msfix = +$msfix; - $n = $n|0; - var $0 = 0.0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0.0; - var $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0.0, $4 = 0.0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0; - var $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0.0, $60 = 0, $61 = 0.0, $62 = 0; - var $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0, $67 = 0.0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0, $79 = 0.0, $8 = 0.0, $80 = 0; - var $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0, $87 = 0, $88 = 0, $9 = 0, $b$02 = 0, $b$02$us = 0, $exitcond = 0, $exitcond3 = 0, $or$cond = 0, $or$cond$us = 0, $rmid$0 = 0.0, $rmid$0$us = 0.0, $rmid$2 = 0.0, $rmid$2$us = 0.0, $rside$0 = 0.0; - var $rside$0$us = 0.0, $rside$2 = 0.0, $rside$2$us = 0.0, $thmM$0$us = 0.0, $thmS$0$us = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $msfix * 2.0; - $1 = ($n|0)>(0); - if (!($1)) { - return; - } - $2 = $msfix > 0.0; - if ($2) { - $b$02$us = 0; - } else { - $b$02 = 0; - while(1) { - $58 = (((($eb)) + 512|0) + ($b$02<<2)|0); - $59 = +HEAPF32[$58>>2]; - $60 = (((($eb)) + 768|0) + ($b$02<<2)|0); - $61 = +HEAPF32[$60>>2]; - $62 = (($thr) + ($b$02<<2)|0); - $63 = +HEAPF32[$62>>2]; - $64 = (((($thr)) + 256|0) + ($b$02<<2)|0); - $65 = +HEAPF32[$64>>2]; - $66 = (((($thr)) + 512|0) + ($b$02<<2)|0); - $67 = +HEAPF32[$66>>2]; - $68 = (((($thr)) + 768|0) + ($b$02<<2)|0); - $69 = +HEAPF32[$68>>2]; - $70 = $65 * 1.5800000429153442; - $71 = !($63 <= $70); - $72 = $63 * 1.5800000429153442; - $73 = !($65 <= $72); - $or$cond = $73 | $71; - if ($or$cond) { - $rmid$0 = $67;$rside$0 = $69; - } else { - $74 = (($cb_mld) + ($b$02<<2)|0); - $75 = +HEAPF32[$74>>2]; - $76 = $75 * $61; - $77 = $75 * $59; - $78 = $69 < $76; - $79 = $78 ? $69 : $76; - $80 = $67 < $77; - $81 = $80 ? $67 : $77; - $82 = $67 > $79; - $83 = $82 ? $67 : $79; - $84 = $69 > $81; - $85 = $84 ? $69 : $81; - $rmid$0 = $83;$rside$0 = $85; - } - $86 = $rmid$0 > $59; - $rmid$2 = $86 ? $59 : $rmid$0; - $87 = $rside$0 > $61; - $rside$2 = $87 ? $61 : $rside$0; - HEAPF32[$66>>2] = $rmid$2; - HEAPF32[$68>>2] = $rside$2; - $88 = (($b$02) + 1)|0; - $exitcond = ($88|0)==($n|0); - if ($exitcond) { - break; - } else { - $b$02 = $88; - } - } - return; - } - while(1) { - $3 = (((($eb)) + 512|0) + ($b$02$us<<2)|0); - $4 = +HEAPF32[$3>>2]; - $5 = (((($eb)) + 768|0) + ($b$02$us<<2)|0); - $6 = +HEAPF32[$5>>2]; - $7 = (($thr) + ($b$02$us<<2)|0); - $8 = +HEAPF32[$7>>2]; - $9 = (((($thr)) + 256|0) + ($b$02$us<<2)|0); - $10 = +HEAPF32[$9>>2]; - $11 = (((($thr)) + 512|0) + ($b$02$us<<2)|0); - $12 = +HEAPF32[$11>>2]; - $13 = (((($thr)) + 768|0) + ($b$02$us<<2)|0); - $14 = +HEAPF32[$13>>2]; - $15 = $10 * 1.5800000429153442; - $16 = !($8 <= $15); - $17 = $8 * 1.5800000429153442; - $18 = !($10 <= $17); - $or$cond$us = $18 | $16; - if ($or$cond$us) { - $rmid$0$us = $12;$rside$0$us = $14; - } else { - $19 = (($cb_mld) + ($b$02$us<<2)|0); - $20 = +HEAPF32[$19>>2]; - $21 = $20 * $6; - $22 = $20 * $4; - $23 = $14 < $21; - $24 = $23 ? $14 : $21; - $25 = $12 < $22; - $26 = $25 ? $12 : $22; - $27 = $12 > $24; - $28 = $27 ? $12 : $24; - $29 = $14 > $26; - $30 = $29 ? $14 : $26; - $rmid$0$us = $28;$rside$0$us = $30; - } - $31 = (($ath_cb) + ($b$02$us<<2)|0); - $32 = +HEAPF32[$31>>2]; - $33 = $32 * $athlower; - $34 = $8 > $33; - $35 = $34 ? $8 : $33; - $36 = $10 > $33; - $37 = $36 ? $10 : $33; - $38 = $rmid$0$us > $33; - $39 = $38 ? $rmid$0$us : $33; - $40 = $rside$0$us > $33; - $41 = $40 ? $rside$0$us : $33; - $42 = $39 + $41; - $43 = $42 > 0.0; - if ($43) { - $44 = $35 < $37; - $45 = $44 ? $35 : $37; - $46 = $0 * $45; - $47 = $46 < $42; - if ($47) { - $48 = $46 / $42; - $49 = $48 * $39; - $50 = $48 * $41; - $thmM$0$us = $49;$thmS$0$us = $50; - } else { - $thmM$0$us = $39;$thmS$0$us = $41; - } - } else { - $thmM$0$us = $39;$thmS$0$us = $41; - } - $51 = $thmM$0$us < $rmid$0$us; - $52 = $51 ? $thmM$0$us : $rmid$0$us; - $53 = $thmS$0$us < $rside$0$us; - $54 = $53 ? $thmS$0$us : $rside$0$us; - $55 = $52 > $4; - $rmid$2$us = $55 ? $4 : $52; - $56 = $54 > $6; - $rside$2$us = $56 ? $6 : $54; - HEAPF32[$11>>2] = $rmid$2$us; - HEAPF32[$13>>2] = $rside$2$us; - $57 = (($b$02$us) + 1)|0; - $exitcond3 = ($57|0)==($n|0); - if ($exitcond3) { - break; - } else { - $b$02$us = $57; - } - } - return; -} -function _convert_partition2scalefac($gd,$eb,$thr,$enn_out,$thm_out) { - $gd = $gd|0; - $eb = $eb|0; - $thr = $thr|0; - $enn_out = $enn_out|0; - $thm_out = $thm_out|0; - var $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0; - var $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; - var $44 = 0, $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$011 = 0, $b$1$lcssa = 0, $b$13 = 0, $enn$014 = 0.0, $enn$1$lcssa = 0.0, $enn$1$lcssa$lcssa = 0.0, $enn$15 = 0.0, $exitcond = 0, $exitcond26 = 0, $sb$012 = 0, $sb$012$lcssa = 0, $sb$1$ph = 0, $sb$12 = 0; - var $thmm$013 = 0.0, $thmm$1$lcssa = 0.0, $thmm$1$lcssa$lcssa = 0.0, $thmm$14 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gd)) + 2152|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)>(0); - L1: do { - if ($2) { - $3 = ((($gd)) + 2148|0); - $$pre = HEAP32[$3>>2]|0; - $b$011 = 0;$enn$014 = 0.0;$sb$012 = 0;$thmm$013 = 0.0; - while(1) { - $5 = (((($gd)) + 2060|0) + ($sb$012<<2)|0); - $6 = HEAP32[$5>>2]|0; - $7 = ($6|0)<($$pre|0); - $8 = $7 ? $6 : $$pre; - $9 = ($b$011|0)<($8|0); - if ($9) { - $10 = ($$pre|0)>($6|0); - $11 = $10 ? $6 : $$pre; - $b$13 = $b$011;$enn$15 = $enn$014;$thmm$14 = $thmm$013; - while(1) { - $12 = (($eb) + ($b$13<<2)|0); - $13 = +HEAPF32[$12>>2]; - $14 = $13 + $enn$15; - $15 = (($thr) + ($b$13<<2)|0); - $16 = +HEAPF32[$15>>2]; - $17 = $16 + $thmm$14; - $18 = (($b$13) + 1)|0; - $exitcond26 = ($18|0)==($11|0); - if ($exitcond26) { - $b$1$lcssa = $11;$enn$1$lcssa = $14;$thmm$1$lcssa = $17; - break; - } else { - $b$13 = $18;$enn$15 = $14;$thmm$14 = $17; - } - } - } else { - $b$1$lcssa = $b$011;$enn$1$lcssa = $enn$014;$thmm$1$lcssa = $thmm$013; - } - $19 = ($b$1$lcssa|0)<($$pre|0); - if (!($19)) { - $enn$1$lcssa$lcssa = $enn$1$lcssa;$sb$012$lcssa = $sb$012;$thmm$1$lcssa$lcssa = $thmm$1$lcssa; - break; - } - $23 = (((($gd)) + 1112|0) + ($sb$012<<2)|0); - $24 = +HEAPF32[$23>>2]; - $25 = 1.0 - $24; - $26 = (($eb) + ($b$1$lcssa<<2)|0); - $27 = +HEAPF32[$26>>2]; - $28 = $27 * $24; - $29 = $28 + $enn$1$lcssa; - $30 = (($thr) + ($b$1$lcssa<<2)|0); - $31 = +HEAPF32[$30>>2]; - $32 = $31 * $24; - $33 = $32 + $thmm$1$lcssa; - $34 = (($enn_out) + ($sb$012<<2)|0); - HEAPF32[$34>>2] = $29; - $35 = (($thm_out) + ($sb$012<<2)|0); - HEAPF32[$35>>2] = $33; - $36 = +HEAPF32[$26>>2]; - $37 = $36 * $25; - $38 = +HEAPF32[$30>>2]; - $39 = $38 * $25; - $40 = (($b$1$lcssa) + 1)|0; - $41 = (($sb$012) + 1)|0; - $42 = ($41|0)<($1|0); - if ($42) { - $b$011 = $40;$enn$014 = $37;$sb$012 = $41;$thmm$013 = $39; - } else { - $sb$1$ph = $41; - break L1; - } - } - $20 = (($enn_out) + ($sb$012$lcssa<<2)|0); - HEAPF32[$20>>2] = $enn$1$lcssa$lcssa; - $21 = (($thm_out) + ($sb$012$lcssa<<2)|0); - HEAPF32[$21>>2] = $thmm$1$lcssa$lcssa; - $22 = (($sb$012$lcssa) + 1)|0; - $sb$1$ph = $22; - } else { - $sb$1$ph = 0; - } - } while(0); - $4 = ($sb$1$ph|0)<($1|0); - if ($4) { - $sb$12 = $sb$1$ph; - } else { - return; - } - while(1) { - $43 = (($enn_out) + ($sb$12<<2)|0); - HEAPF32[$43>>2] = 0.0; - $44 = (($thm_out) + ($sb$12<<2)|0); - HEAPF32[$44>>2] = 0.0; - $45 = (($sb$12) + 1)|0; - $exitcond = ($45|0)==($1|0); - if ($exitcond) { - break; - } else { - $sb$12 = $45; - } - } - return; -} -function _init_numline($gd,$sfreq,$fft_size,$mdct_size,$sbmax,$scalepos) { - $gd = $gd|0; - $sfreq = +$sfreq; - $fft_size = $fft_size|0; - $mdct_size = $mdct_size|0; - $sbmax = $sbmax|0; - $scalepos = $scalepos|0; - var $$ = 0, $$2 = 0, $$lcssa = 0, $$op$op$i = 0.0, $$op$op$i3 = 0.0, $0 = 0.0, $1 = 0.0, $10 = 0.0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0.0; - var $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0.0; - var $25 = 0.0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0; - var $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; - var $61 = 0.0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0; - var $8 = 0.0, $80 = 0.0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0.0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0; - var $98 = 0.0, $99 = 0.0, $b_frq = 0, $bo_w$0 = 0.0, $exitcond = 0, $exitcond17 = 0, $exitcond18 = 0, $i$29 = 0, $i$36 = 0, $j$0 = 0, $j$1$lcssa = 0, $j$112 = 0, $j$2 = 0, $j$38 = 0, $j2$0 = 0, $j2$0$lcssa = 0, $ni$0 = 0, $ni$1 = 0, $or$cond = 0, $partition = 0; - var $sfb$05 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2320|0; - $b_frq = sp + 2052|0; - $partition = sp; - $0 = (+($mdct_size|0)); - $1 = $0 * 2.0; - $2 = $sfreq / $1; - $3 = (+($fft_size|0)); - $4 = $3 / $1; - _memset(($partition|0),0,2052)|0; - $5 = $sfreq / $3; - $6 = (($fft_size|0) / 2)&-1; - $j$0 = 0;$ni$0 = 0; - while(1) { - $7 = ($ni$0|0)<(64); - if (!($7)) { - $j$2 = $j$0;$ni$1 = $ni$0; - break; - } - $8 = (+($j$0|0)); - $9 = $8 * $5; - $10 = (+_freq2bark($9)); - $11 = (($b_frq) + ($ni$0<<2)|0); - HEAPF32[$11>>2] = $9; - $j2$0 = $j$0; - while(1) { - $12 = (+($j2$0|0)); - $13 = $12 * $5; - $14 = (+_freq2bark($13)); - $15 = $14 - $10; - $16 = $15; - $17 = !($16 < 0.34000000000000002); - $18 = ($j2$0|0)>($6|0); - $or$cond = $18 | $17; - $19 = (($j2$0) + 1)|0; - if ($or$cond) { - $j2$0$lcssa = $j2$0; - break; - } else { - $j2$0 = $19; - } - } - $20 = (($j2$0$lcssa) - ($j$0))|0; - $21 = (((($gd)) + 1716|0) + ($ni$0<<2)|0); - HEAP32[$21>>2] = $20; - $22 = ($20|0)>(0); - $23 = (+($20|0)); - $24 = 1.0 / $23; - $25 = $22 ? $24 : 0.0; - $26 = (((($gd)) + 512|0) + ($ni$0<<2)|0); - HEAPF32[$26>>2] = $25; - $27 = (($ni$0) + 1)|0; - $28 = ($j2$0$lcssa|0)>($j$0|0); - if ($28) { - $j$112 = $j$0; - while(1) { - $29 = (($j$112) + 1)|0; - $30 = (($partition) + ($j$112<<2)|0); - HEAP32[$30>>2] = $ni$0; - $exitcond18 = ($29|0)==($j2$0$lcssa|0); - if ($exitcond18) { - $j$1$lcssa = $j2$0$lcssa; - break; - } else { - $j$112 = $29; - } - } - } else { - $j$1$lcssa = $j$0; - } - $31 = ($j$1$lcssa|0)>($6|0); - if ($31) { - $j$2 = $6;$ni$1 = $27; - break; - } else { - $j$0 = $j$1$lcssa;$ni$0 = $27; - } - } - $32 = (+($j$2|0)); - $33 = $32 * $5; - $34 = (($b_frq) + ($ni$1<<2)|0); - HEAPF32[$34>>2] = $33; - $35 = ((($gd)) + 2152|0); - HEAP32[$35>>2] = $sbmax; - $36 = ((($gd)) + 2148|0); - HEAP32[$36>>2] = $ni$1; - $37 = ($ni$1|0)>(0); - if ($37) { - $i$29 = 0;$j$38 = 0; - while(1) { - $39 = (((($gd)) + 1716|0) + ($i$29<<2)|0); - $40 = HEAP32[$39>>2]|0; - $41 = (($40|0) / 2)&-1; - $42 = (($41) + ($j$38))|0; - $43 = (+($42|0)); - $44 = $43 * $5; - $45 = (+_freq2bark($44)); - $46 = $45; - $47 = $45 < 15.5; - $$op$op$i = $46 * 0.2026833970057931; - $48 = $47 ? $$op$op$i : 3.1415926535897931; - $49 = (+Math_cos((+$48))); - $50 = 1.0 - $49; - $51 = $50 * 1.25; - $52 = $51 + -2.5; - $53 = (+Math_pow(10.0,(+$52))); - $54 = $53; - $55 = (((($gd)) + 768|0) + ($i$29<<2)|0); - HEAPF32[$55>>2] = $54; - $56 = (($40) + ($j$38))|0; - $57 = (($i$29) + 1)|0; - $58 = HEAP32[$36>>2]|0; - $59 = ($57|0)<($58|0); - if ($59) { - $i$29 = $57;$j$38 = $56; - } else { - $$lcssa = $57; - break; - } - } - $38 = ($$lcssa|0)<(64); - if ($38) { - $i$36 = $$lcssa; - label = 13; - } - } else { - $i$36 = 0; - label = 13; - } - if ((label|0) == 13) { - while(1) { - label = 0; - $62 = (((($gd)) + 768|0) + ($i$36<<2)|0); - HEAPF32[$62>>2] = 1.0; - $63 = (($i$36) + 1)|0; - $exitcond17 = ($63|0)==(64); - if ($exitcond17) { - break; - } else { - $i$36 = $63; - label = 13; - } - } - } - $60 = ($sbmax|0)>(0); - if (!($60)) { - STACKTOP = sp;return; - } - $61 = $4; - $sfb$05 = 0; - while(1) { - $64 = (($scalepos) + ($sfb$05<<2)|0); - $65 = HEAP32[$64>>2]|0; - $66 = (($sfb$05) + 1)|0; - $67 = (($scalepos) + ($66<<2)|0); - $68 = HEAP32[$67>>2]|0; - $69 = (+($65|0)); - $70 = $69 + -0.5; - $71 = $70 * $61; - $72 = $71 + 0.5; - $73 = (+Math_floor((+$72))); - $74 = (~~(($73))); - $75 = ($74|0)<(0); - $$ = $75 ? 0 : $74; - $76 = (+($68|0)); - $77 = $76 + -0.5; - $78 = $77 * $61; - $79 = $78 + 0.5; - $80 = (+Math_floor((+$79))); - $81 = (~~(($80))); - $82 = ($81|0)>($6|0); - $$2 = $82 ? $6 : $81; - $83 = (($partition) + ($$2<<2)|0); - $84 = HEAP32[$83>>2]|0; - $85 = (($partition) + ($$<<2)|0); - $86 = HEAP32[$85>>2]|0; - $87 = (($86) + ($84))|0; - $88 = (($87|0) / 2)&-1; - $89 = (((($gd)) + 1972|0) + ($sfb$05<<2)|0); - HEAP32[$89>>2] = $88; - $90 = (((($gd)) + 2060|0) + ($sfb$05<<2)|0); - HEAP32[$90>>2] = $84; - $91 = (+($68|0)); - $92 = $91 * $2; - $93 = (($b_frq) + ($84<<2)|0); - $94 = +HEAPF32[$93>>2]; - $95 = $92 - $94; - $96 = (($84) + 1)|0; - $97 = (($b_frq) + ($96<<2)|0); - $98 = +HEAPF32[$97>>2]; - $99 = $98 - $94; - $100 = $95 / $99; - $101 = $100 < 0.0; - if ($101) { - $bo_w$0 = 0.0; - } else { - $102 = $100 > 1.0; - if ($102) { - $bo_w$0 = 1.0; - } else { - $bo_w$0 = $100; - } - } - $103 = (((($gd)) + 1112|0) + ($sfb$05<<2)|0); - HEAPF32[$103>>2] = $bo_w$0; - $104 = (+($65|0)); - $105 = $104 * $2; - $106 = (+_freq2bark($105)); - $107 = $106; - $108 = $106 < 15.5; - $$op$op$i3 = $107 * 0.2026833970057931; - $109 = $108 ? $$op$op$i3 : 3.1415926535897931; - $110 = (+Math_cos((+$109))); - $111 = 1.0 - $110; - $112 = $111 * 1.25; - $113 = $112 + -2.5; - $114 = (+Math_pow(10.0,(+$113))); - $115 = $114; - $116 = (((($gd)) + 1024|0) + ($sfb$05<<2)|0); - HEAPF32[$116>>2] = $115; - $exitcond = ($66|0)==($sbmax|0); - if ($exitcond) { - break; - } else { - $sfb$05 = $66; - } - } - STACKTOP = sp;return; -} -function _init_s3_values($p,$s3ind,$npart,$bval,$bval_width,$norm) { - $p = $p|0; - $s3ind = $s3ind|0; - $npart = $npart|0; - $bval = $bval|0; - $bval_width = $bval_width|0; - $norm = $norm|0; - var $$0 = 0, $$0$i = 0.0, $$lcssa = 0, $$mux = 0, $$not = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0.0; - var $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0.0; - var $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0; - var $59 = 0, $6 = 0.0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; - var $77 = 0, $8 = 0, $9 = 0.0, $brmerge = 0, $exitcond = 0, $exitcond34 = 0, $exitcond35 = 0, $exitcond36 = 0, $i$024 = 0, $i$117 = 0, $i$27 = 0, $j$021 = 0, $j$111 = 0, $j$2 = 0, $j$2$in = 0, $j$2$in$lcssa = 0, $j$2$lcssa = 0, $k$09 = 0, $k$1$lcssa = 0, $numberOfNoneZero$0$lcssa = 0; - var $numberOfNoneZero$018 = 0, $or$cond$i = 0, $phitmp = 0, $s3 = 0, $scevgep = 0, $scevgep31 = 0, $tempx$0$i = 0.0, $tempx$0$v$i = 0.0, $x$0$i = 0.0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16384|0; - $s3 = sp; - _memset(($s3|0),0,16384)|0; - $0 = ($npart|0)>(0); - if ($0) { - $i$024 = 0; - while(1) { - $1 = (($bval) + ($i$024<<2)|0); - $2 = +HEAPF32[$1>>2]; - $3 = (($norm) + ($i$024<<2)|0); - $4 = +HEAPF32[$3>>2]; - $j$021 = 0; - while(1) { - $5 = (($bval) + ($j$021<<2)|0); - $6 = +HEAPF32[$5>>2]; - $7 = $2 - $6; - $8 = !($7 >= 0.0); - $tempx$0$v$i = $8 ? 1.5 : 3.0; - $tempx$0$i = $7 * $tempx$0$v$i; - $9 = $tempx$0$i; - $10 = !($tempx$0$i >= 0.5); - $11 = !($tempx$0$i <= 2.5); - $or$cond$i = $10 | $11; - if ($or$cond$i) { - $x$0$i = 0.0; - } else { - $12 = $tempx$0$i + -0.5; - $13 = $12 * $12; - $14 = $13; - $15 = $12; - $16 = $15 * 2.0; - $17 = $14 - $16; - $18 = $17 * 8.0; - $19 = $18; - $x$0$i = $19; - } - $20 = $9 + 0.47399999999999998; - $21 = $20; - $22 = $21; - $23 = $22 * 7.5; - $24 = $23 + 15.811389; - $25 = $21 * $21; - $26 = $25; - $27 = $26 + 1.0; - $28 = (+Math_sqrt((+$27))); - $29 = $28 * 17.5; - $30 = $24 - $29; - $31 = $30; - $32 = !($31 <= -60.0); - if ($32) { - $33 = $31 + $x$0$i; - $34 = $33; - $35 = $34 * 0.23025850929940458; - $36 = (+Math_exp((+$35))); - $37 = $36; - $38 = $37; - $39 = $38 * 1.5130440282194817; - $40 = $39; - $$0$i = $40; - } else { - $$0$i = 0.0; - } - $41 = (($bval_width) + ($j$021<<2)|0); - $42 = +HEAPF32[$41>>2]; - $43 = $42 * $$0$i; - $44 = $43 * $4; - $45 = ((($s3) + ($i$024<<8)|0) + ($j$021<<2)|0); - HEAPF32[$45>>2] = $44; - $46 = (($j$021) + 1)|0; - $exitcond35 = ($46|0)==($npart|0); - if ($exitcond35) { - break; - } else { - $j$021 = $46; - } - } - $47 = (($i$024) + 1)|0; - $exitcond36 = ($47|0)==($npart|0); - if ($exitcond36) { - break; - } else { - $i$024 = $47; - } - } - if ($0) { - $i$117 = 0;$numberOfNoneZero$018 = 0; - while(1) { - $j$111 = 0; - while(1) { - $48 = ((($s3) + ($i$117<<8)|0) + ($j$111<<2)|0); - $49 = +HEAPF32[$48>>2]; - $50 = $49 > 0.0; - if ($50) { - $54 = $j$111; - break; - } - $51 = (($j$111) + 1)|0; - $52 = ($51|0)<($npart|0); - if ($52) { - $j$111 = $51; - } else { - $54 = $51; - break; - } - } - $53 = (($s3ind) + ($i$117<<3)|0); - HEAP32[$53>>2] = $54; - $j$2$in = $npart; - while(1) { - $j$2 = (($j$2$in) + -1)|0; - $55 = ($j$2$in|0)>(1); - if (!($55)) { - $j$2$in$lcssa = $j$2$in;$j$2$lcssa = $j$2; - break; - } - $56 = ((($s3) + ($i$117<<8)|0) + ($j$2<<2)|0); - $57 = +HEAPF32[$56>>2]; - $58 = $57 > 0.0; - if ($58) { - $j$2$in$lcssa = $j$2$in;$j$2$lcssa = $j$2; - break; - } else { - $j$2$in = $j$2; - } - } - $59 = (((($s3ind) + ($i$117<<3)|0)) + 4|0); - HEAP32[$59>>2] = $j$2$lcssa; - $60 = (($numberOfNoneZero$018) + ($j$2$in$lcssa))|0; - $61 = (($60) - ($54))|0; - $62 = (($i$117) + 1)|0; - $exitcond34 = ($62|0)==($npart|0); - if ($exitcond34) { - $$lcssa = $61; - break; - } else { - $i$117 = $62;$numberOfNoneZero$018 = $61; - } - } - $phitmp = $$lcssa << 2; - $numberOfNoneZero$0$lcssa = $phitmp; - } else { - $numberOfNoneZero$0$lcssa = 0; - } - } else { - $numberOfNoneZero$0$lcssa = 0; - } - $63 = (_malloc($numberOfNoneZero$0$lcssa)|0); - HEAP32[$p>>2] = $63; - $64 = ($63|0)==(0|0); - $$not = $0 ^ 1; - $brmerge = $64 | $$not; - $$mux = $64 << 31 >> 31; - if ($brmerge) { - $$0 = $$mux; - STACKTOP = sp;return ($$0|0); - } else { - $i$27 = 0;$k$09 = 0; - } - while(1) { - $65 = (($s3ind) + ($i$27<<3)|0); - $66 = HEAP32[$65>>2]|0; - $67 = (((($s3ind) + ($i$27<<3)|0)) + 4|0); - $68 = HEAP32[$67>>2]|0; - $69 = ($66|0)>($68|0); - if ($69) { - $k$1$lcssa = $k$09; - } else { - $70 = HEAP32[$p>>2]|0; - $71 = (($k$09) + 1)|0; - $72 = (($71) + ($68))|0; - $scevgep = (($70) + ($k$09<<2)|0); - $scevgep31 = ((($s3) + ($i$27<<8)|0) + ($66<<2)|0); - $73 = (($68) + 1)|0; - $74 = (($73) - ($66))|0; - $75 = $74 << 2; - _memcpy(($scevgep|0),($scevgep31|0),($75|0))|0; - $76 = (($72) - ($66))|0; - $k$1$lcssa = $76; - } - $77 = (($i$27) + 1)|0; - $exitcond = ($77|0)==($npart|0); - if ($exitcond) { - $$0 = 0; - break; - } else { - $i$27 = $77;$k$09 = $k$1$lcssa; - } - } - STACKTOP = sp;return ($$0|0); -} -function _init_xrpow_core_init($gfc) { - $gfc = $gfc|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $init_xrpow_core_c$init_xrpow_core_sse = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 85824|0); - $1 = ((($gfc)) + 85756|0); - $2 = HEAP32[$1>>2]|0; - $3 = $2 & 4; - $4 = ($3|0)==(0); - $init_xrpow_core_c$init_xrpow_core_sse = $4 ? 6 : 5; - HEAP32[$0>>2] = $init_xrpow_core_c$init_xrpow_core_sse; - return; -} -function _VBR_old_iteration_loop($gfc,$pe,$ms_ener_ratio,$ratio) { - $gfc = $gfc|0; - $pe = $pe|0; - $ms_ener_ratio = $ms_ener_ratio|0; - $ratio = $ratio|0; - var $$$i = 0, $$$i6 = 0.0, $$0$i1 = 0, $$01$i = 0, $$1$i = 0, $$12$i = 0, $$lcssa = 0, $$lcssa63 = 0, $$lobit$i = 0, $$pre$i = 0, $$pre$phiZ2D = 0, $$pre$pre = 0, $$pre$pre$pre = 0, $$pre29$i = 0, $$pre29$i$lcssa = 0, $$pre34 = 0, $$pre35 = 0, $$pre38 = 0, $0 = 0, $1 = 0; - var $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0; - var $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0, $133 = 0, $134 = 0, $135 = 0; - var $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0; - var $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0; - var $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0; - var $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0.0, $206 = 0.0, $207 = 0.0; - var $208 = 0.0, $209 = 0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0.0, $213 = 0.0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0.0, $222 = 0.0, $223 = 0.0, $224 = 0.0, $225 = 0; - var $226 = 0.0, $227 = 0.0, $228 = 0.0, $229 = 0.0, $23 = 0, $230 = 0, $231 = 0.0, $232 = 0.0, $233 = 0.0, $234 = 0.0, $235 = 0, $236 = 0.0, $237 = 0.0, $238 = 0.0, $239 = 0.0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0.0; - var $244 = 0, $245 = 0, $246 = 0.0, $247 = 0.0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0; - var $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; - var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0; - var $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0; - var $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0, $88 = 0, $89 = 0; - var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $analog_silence$0$lcssa34$i = 0, $analog_silence$023$i = 0, $analog_silence$1$$i = 0, $analog_silence$1$lcssa$i = 0, $analog_silence$1$lcssa$i$lcssa = 0, $analog_silence$115$i = 0, $bits$024$i = 0, $bits$1$lcssa$i = 0, $bits$1$lcssa$i$lcssa = 0; - var $bits$116$i = 0, $bst_cod_info$i = 0, $bst_xrpow$i = 0, $ch$014$i = 0, $ch$022 = 0, $ch$07$i = 0, $ch$115 = 0, $ch$16$i = 0, $ch$16$us$us$i = 0, $dbits$0$i = 0, $exitcond = 0, $exitcond$i = 0, $exitcond$i$i = 0, $found$0$i = 0, $found$1$i = 0, $found$1$i$lcssa = 0, $frameBits = 0, $gr$0 = 0, $gr$010$i = 0, $gr$020$i = 0; - var $gr$116 = 0, $gr$17$i = 0, $gr$17$us$i = 0, $i$01$i = 0, $i$01$i$i = 0, $i$01$i2$i = 0, $indvars$iv$i = 0, $indvars$iv13$i = 0, $l3_xmin = 0, $masking_lower_db$0$i = 0.0, $max_bits = 0, $mean_bits = 0, $min_bits = 0, $pxmin$0$lcssa$i = 0, $pxmin$02$i = 0, $pxmin$14$i = 0, $scevgep$i = 0, $scevgep14$i = 0, $scevgep15$i = 0, $sfb$01$i = 0; - var $sfb$13$i = 0, $smax$i = 0, $storemerge = 0, $this_bits$0$i = 0, $this_bits$1$i = 0, $used_bits$0 = 0, $used_bits$1$lcssa = 0, $used_bits$124 = 0, $used_bits$2 = 0, $used_bits$2$lcssa = 0, $xrpow = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 10592|0; - $bst_cod_info$i = sp + 5336|0; - $bst_xrpow$i = sp + 3032|0; - $l3_xmin = sp + 2408|0; - $xrpow = sp + 104|0; - $frameBits = sp + 40|0; - $min_bits = sp + 24|0; - $max_bits = sp + 8|0; - $mean_bits = sp; - $0 = ((($gfc)) + 116|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($gfc)) + 84744|0); - HEAP32[$2>>2] = $1; - $3 = (_ResvFrameBegin($gfc,$bst_xrpow$i)|0); - $4 = ((($gfc)) + 76|0); - $5 = HEAP32[$4>>2]|0; - $6 = (($3|0) / ($5|0))&-1; - HEAP32[$bst_xrpow$i>>2] = $6; - $7 = ((($gfc)) + 112|0); - $8 = HEAP32[$7>>2]|0; - HEAP32[$2>>2] = $8; - HEAP32[$2>>2] = 1; - $9 = (_getframebits($gfc)|0); - HEAP32[$bst_cod_info$i>>2] = $9; - $10 = HEAP32[$0>>2]|0; - $11 = ($10|0)<(1); - if (!($11)) { - $i$01$i$i = 1; - while(1) { - HEAP32[$2>>2] = $i$01$i$i; - $12 = (_ResvFrameBegin($gfc,$bst_cod_info$i)|0); - $13 = (($frameBits) + ($i$01$i$i<<2)|0); - HEAP32[$13>>2] = $12; - $14 = (($i$01$i$i) + 1)|0; - $15 = HEAP32[$0>>2]|0; - $16 = ($i$01$i$i|0)<($15|0); - if ($16) { - $i$01$i$i = $14; - } else { - break; - } - } - } - $17 = HEAP32[$4>>2]|0; - $18 = ($17|0)>(0); - L5: do { - if ($18) { - $19 = ((($gfc)) + 84756|0); - $20 = ((($gfc)) + 72|0); - $21 = ((($gfc)) + 84916|0); - $22 = ((($gfc)) + 84908|0); - $23 = ((($gfc)) + 84912|0); - $analog_silence$023$i = 1;$bits$024$i = 0;$gr$020$i = 0; - while(1) { - $43 = (($max_bits) + ($gr$020$i<<3)|0); - $44 = HEAP32[$bst_xrpow$i>>2]|0; - $45 = (_on_pe($gfc,$pe,$43,$44,$gr$020$i,0)|0); - $46 = HEAP32[$19>>2]|0; - $47 = ($46|0)==(2); - if ($47) { - $i$01$i2$i = 0; - while(1) { - $48 = ((((($gfc)) + 304|0) + (($gr$020$i*10504)|0)|0) + ($i$01$i2$i<<2)|0); - $49 = +HEAPF32[$48>>2]; - $50 = ((((((($gfc)) + 304|0) + (($gr$020$i*10504)|0)|0)) + 5252|0) + ($i$01$i2$i<<2)|0); - $51 = +HEAPF32[$50>>2]; - $52 = $51 + $49; - $53 = $52 * 0.70710676908493042; - HEAPF32[$48>>2] = $53; - $54 = $49 - $51; - $55 = $54 * 0.70710676908493042; - HEAPF32[$50>>2] = $55; - $56 = (($i$01$i2$i) + 1)|0; - $exitcond$i$i = ($56|0)==(576); - if ($exitcond$i$i) { - break; - } else { - $i$01$i2$i = $56; - } - } - $57 = (($ms_ener_ratio) + ($gr$020$i<<2)|0); - $58 = +HEAPF32[$57>>2]; - $59 = HEAP32[$bst_xrpow$i>>2]|0; - _reduce_side($43,$58,$59,$45); - } - $60 = HEAP32[$20>>2]|0; - $61 = ($60|0)>(0); - if ($61) { - $analog_silence$115$i = $analog_silence$023$i;$bits$116$i = $bits$024$i;$ch$014$i = 0; - while(1) { - $62 = ((((($gfc)) + 304|0) + (($gr$020$i*10504)|0)|0) + (($ch$014$i*5252)|0)|0); - $63 = ((((((($gfc)) + 304|0) + (($gr$020$i*10504)|0)|0) + (($ch$014$i*5252)|0)|0)) + 4788|0); - $64 = HEAP32[$63>>2]|0; - $65 = ($64|0)==(2); - $66 = ((($pe) + ($gr$020$i<<3)|0) + ($ch$014$i<<2)|0); - $67 = +HEAPF32[$66>>2]; - $68 = $67; - $69 = $68 * 0.0033333333333333335; - $70 = 3.5 - $69; - $71 = (+Math_exp((+$70))); - $72 = $71 + 1.0; - if ($65) { - $78 = 2.5600000000000001 / $72; - $79 = $78 + -0.14000000000000001; - $80 = $79; - $81 = +HEAPF32[$21>>2]; - $82 = $81 - $80; - $masking_lower_db$0$i = $82; - } else { - $73 = 1.28 / $72; - $74 = $73 + -0.050000000000000003; - $75 = $74; - $76 = +HEAPF32[$23>>2]; - $77 = $76 - $75; - $masking_lower_db$0$i = $77; - } - $83 = $masking_lower_db$0$i; - $84 = $83 * 0.10000000000000001; - $85 = (+Math_pow(10.0,(+$84))); - $86 = $85; - HEAPF32[$22>>2] = $86; - _init_outer_loop($gfc,$62); - $87 = ((($ratio) + (($gr$020$i*976)|0)|0) + (($ch$014$i*488)|0)|0); - $88 = ((($l3_xmin) + (($gr$020$i*312)|0)|0) + (($ch$014$i*156)|0)|0); - $89 = (_calc_xmin($gfc,$87,$62,$88)|0); - $90 = ($89|0)==(0); - $analog_silence$1$$i = $90 ? $analog_silence$115$i : 0; - $91 = ((($min_bits) + ($gr$020$i<<3)|0) + ($ch$014$i<<2)|0); - HEAP32[$91>>2] = 126; - $92 = ((($max_bits) + ($gr$020$i<<3)|0) + ($ch$014$i<<2)|0); - $93 = HEAP32[$92>>2]|0; - $94 = (($93) + ($bits$116$i))|0; - $95 = (($ch$014$i) + 1)|0; - $96 = HEAP32[$20>>2]|0; - $97 = ($95|0)<($96|0); - if ($97) { - $analog_silence$115$i = $analog_silence$1$$i;$bits$116$i = $94;$ch$014$i = $95; - } else { - $$pre29$i = $96;$analog_silence$1$lcssa$i = $analog_silence$1$$i;$bits$1$lcssa$i = $94; - break; - } - } - } else { - $$pre29$i = $60;$analog_silence$1$lcssa$i = $analog_silence$023$i;$bits$1$lcssa$i = $bits$024$i; - } - $98 = (($gr$020$i) + 1)|0; - $99 = HEAP32[$4>>2]|0; - $100 = ($98|0)<($99|0); - if ($100) { - $analog_silence$023$i = $analog_silence$1$lcssa$i;$bits$024$i = $bits$1$lcssa$i;$gr$020$i = $98; - } else { - $$lcssa63 = $99;$$pre29$i$lcssa = $$pre29$i;$analog_silence$1$lcssa$i$lcssa = $analog_silence$1$lcssa$i;$bits$1$lcssa$i$lcssa = $bits$1$lcssa$i; - break; - } - } - $24 = ($$lcssa63|0)>(0); - if ($24) { - $25 = ($bits$1$lcssa$i$lcssa|0)>(0); - if (!($25)) { - $101 = $$pre29$i$lcssa;$267 = $$pre29$i$lcssa;$gr$17$i = 0; - while(1) { - $102 = ($101|0)>(0); - if ($102) { - $268 = $267;$ch$16$i = 0; - while(1) { - $103 = ((($min_bits) + ($gr$17$i<<3)|0) + ($ch$16$i<<2)|0); - $104 = HEAP32[$103>>2]|0; - $105 = ((($max_bits) + ($gr$17$i<<3)|0) + ($ch$16$i<<2)|0); - $106 = HEAP32[$105>>2]|0; - $107 = ($104|0)>($106|0); - if ($107) { - HEAP32[$103>>2] = $106; - $110 = $$pre29$i$lcssa; - } else { - $110 = $268; - } - $108 = (($ch$16$i) + 1)|0; - $109 = ($108|0)<($110|0); - if ($109) { - $268 = $110;$ch$16$i = $108; - } else { - $269 = $110;$270 = $110; - break; - } - } - } else { - $269 = $267;$270 = $101; - } - $111 = (($gr$17$i) + 1)|0; - $112 = ($111|0)<($$lcssa63|0); - if ($112) { - $101 = $270;$267 = $269;$gr$17$i = $111; - } else { - $$pre$phiZ2D = $20;$266 = $$lcssa63;$analog_silence$0$lcssa34$i = $analog_silence$1$lcssa$i$lcssa; - break L5; - } - } - } - $26 = ($$pre29$i$lcssa|0)>(0); - $gr$17$us$i = 0; - while(1) { - if ($26) { - $27 = HEAP32[$0>>2]|0; - $28 = (($frameBits) + ($27<<2)|0); - $29 = HEAP32[$28>>2]|0; - $30 = ($bits$1$lcssa$i$lcssa|0)>($29|0); - $ch$16$us$us$i = 0; - while(1) { - $33 = ((($max_bits) + ($gr$17$us$i<<3)|0) + ($ch$16$us$us$i<<2)|0); - $34 = HEAP32[$33>>2]|0; - if ($30) { - $35 = Math_imul($34, $29)|0; - $36 = (($35|0) / ($bits$1$lcssa$i$lcssa|0))&-1; - HEAP32[$33>>2] = $36; - $40 = $36; - } else { - $40 = $34; - } - $37 = ((($min_bits) + ($gr$17$us$i<<3)|0) + ($ch$16$us$us$i<<2)|0); - $38 = HEAP32[$37>>2]|0; - $39 = ($38|0)>($40|0); - if ($39) { - HEAP32[$37>>2] = $40; - } - $41 = (($ch$16$us$us$i) + 1)|0; - $42 = ($41|0)<($$pre29$i$lcssa|0); - if ($42) { - $ch$16$us$us$i = $41; - } else { - break; - } - } - } - $31 = (($gr$17$us$i) + 1)|0; - $32 = ($31|0)<($$lcssa63|0); - if ($32) { - $gr$17$us$i = $31; - } else { - $$pre$phiZ2D = $20;$266 = $$lcssa63;$analog_silence$0$lcssa34$i = $analog_silence$1$lcssa$i$lcssa; - break; - } - } - } else { - $$pre$phiZ2D = $20;$266 = $$lcssa63;$analog_silence$0$lcssa34$i = $analog_silence$1$lcssa$i$lcssa; - } - } else { - $$pre38 = ((($gfc)) + 72|0); - $$pre$phiZ2D = $$pre38;$266 = $17;$analog_silence$0$lcssa34$i = 1; - } - } while(0); - $113 = ($analog_silence$0$lcssa34$i|0)==(0); - $114 = ((($gfc)) + 124|0); - $115 = ((($gfc)) + 85824|0); - $116 = ((($gfc)) + 85096|0); - $117 = ((($gfc)) + 85092|0); - $118 = ((($bst_cod_info$i)) + 2304|0); - $120 = $266;$gr$0 = 0;$used_bits$0 = 0; - L50: while(1) { - $119 = ($gr$0|0)<($120|0); - if (!($119)) { - if ($113) { - label = 55; - } else { - $182 = HEAP32[$114>>2]|0; - $183 = ($182|0)==(0); - if ($183) { - $storemerge = 1; - } else { - label = 55; - } - } - if ((label|0) == 55) { - label = 0; - $184 = HEAP32[$7>>2]|0; - $storemerge = $184; - } - HEAP32[$2>>2] = $storemerge; - $185 = HEAP32[$0>>2]|0; - $186 = ($storemerge|0)<($185|0); - L59: do { - if ($186) { - $188 = $storemerge; - while(1) { - $187 = (($frameBits) + ($188<<2)|0); - $189 = HEAP32[$187>>2]|0; - $190 = ($used_bits$0|0)>($189|0); - if (!($190)) { - break L59; - } - $191 = (($188) + 1)|0; - HEAP32[$2>>2] = $191; - $192 = ($191|0)<($185|0); - if ($192) { - $188 = $191; - } else { - break; - } - } - } - } while(0); - $193 = (_ResvFrameBegin($gfc,$mean_bits)|0); - $194 = ($used_bits$0|0)>($193|0); - $195 = HEAP32[$4>>2]|0; - $196 = ($195|0)>(0); - if (!($194)) { - break; - } - if (!($196)) { - $120 = $195;$gr$0 = 0;$used_bits$0 = 0; - continue; - } - $$pre$i = HEAP32[$$pre$phiZ2D>>2]|0; - $199 = ($$pre$i|0)>(0); - $gr$010$i = 0;$indvars$iv$i = $l3_xmin; - while(1) { - if ($199) { - $ch$07$i = 0;$indvars$iv13$i = $indvars$iv$i; - while(1) { - $200 = ((($l3_xmin) + (($gr$010$i*312)|0)|0) + (($ch$07$i*156)|0)|0); - $201 = ((((((($gfc)) + 304|0) + (($gr$010$i*10504)|0)|0) + (($ch$07$i*5252)|0)|0)) + 4856|0); - $202 = HEAP32[$201>>2]|0; - $203 = ($202|0)>(0); - if ($203) { - $204 = ($202|0)>(1); - $pxmin$02$i = $200;$sfb$01$i = 0; - while(1) { - $205 = (+($sfb$01$i|0)); - $206 = $205 * $205; - $207 = $206 * 5.9917355371900827E-5; - $208 = $207 + 1.0; - $209 = ((($pxmin$02$i)) + 4|0); - $210 = +HEAPF32[$pxmin$02$i>>2]; - $211 = $210; - $212 = $208 * $211; - $213 = $212; - HEAPF32[$pxmin$02$i>>2] = $213; - $214 = (($sfb$01$i) + 1)|0; - $exitcond = ($214|0)==($202|0); - if ($exitcond) { - break; - } else { - $pxmin$02$i = $209;$sfb$01$i = $214; - } - } - $smax$i = $204 ? $202 : 1; - $scevgep15$i = (($indvars$iv13$i) + ($smax$i<<2)|0); - $pxmin$0$lcssa$i = $scevgep15$i; - } else { - $pxmin$0$lcssa$i = $200; - } - $215 = ((((((($gfc)) + 304|0) + (($gr$010$i*10504)|0)|0) + (($ch$07$i*5252)|0)|0)) + 4788|0); - $216 = HEAP32[$215>>2]|0; - $217 = ($216|0)==(2); - if ($217) { - $218 = ((((((($gfc)) + 304|0) + (($gr$010$i*10504)|0)|0) + (($ch$07$i*5252)|0)|0)) + 4852|0); - $219 = HEAP32[$218>>2]|0; - $220 = ($219|0)<(13); - if ($220) { - $pxmin$14$i = $pxmin$0$lcssa$i;$sfb$13$i = $219; - while(1) { - $221 = (+($sfb$13$i|0)); - $222 = $221 * $221; - $223 = $222 * 1.7159763313609469E-4; - $224 = $223 + 1.0; - $225 = ((($pxmin$14$i)) + 4|0); - $226 = +HEAPF32[$pxmin$14$i>>2]; - $227 = $226; - $228 = $224 * $227; - $229 = $228; - HEAPF32[$pxmin$14$i>>2] = $229; - $230 = ((($pxmin$14$i)) + 8|0); - $231 = +HEAPF32[$225>>2]; - $232 = $231; - $233 = $224 * $232; - $234 = $233; - HEAPF32[$225>>2] = $234; - $235 = ((($pxmin$14$i)) + 12|0); - $236 = +HEAPF32[$230>>2]; - $237 = $236; - $238 = $237 * $224; - $239 = $238; - HEAPF32[$230>>2] = $239; - $240 = (($sfb$13$i) + 1)|0; - $exitcond$i = ($240|0)==(13); - if ($exitcond$i) { - break; - } else { - $pxmin$14$i = $235;$sfb$13$i = $240; - } - } - } - } - $241 = ((($min_bits) + ($gr$010$i<<3)|0) + ($ch$07$i<<2)|0); - $242 = HEAP32[$241>>2]|0; - $243 = (+($242|0)); - $244 = ((($max_bits) + ($gr$010$i<<3)|0) + ($ch$07$i<<2)|0); - $245 = HEAP32[$244>>2]|0; - $246 = (+($245|0)); - $247 = $246 * 0.90000000000000002; - $248 = $243 > $247; - $$$i6 = $248 ? $243 : $247; - $249 = (~~(($$$i6))); - HEAP32[$244>>2] = $249; - $250 = (($ch$07$i) + 1)|0; - $251 = ($250|0)<($$pre$i|0); - $scevgep14$i = ((($indvars$iv13$i)) + 156|0); - if ($251) { - $ch$07$i = $250;$indvars$iv13$i = $scevgep14$i; - } else { - break; - } - } - } - $252 = (($gr$010$i) + 1)|0; - $253 = ($252|0)<($195|0); - $scevgep$i = ((($indvars$iv$i)) + 312|0); - if ($253) { - $gr$010$i = $252;$indvars$iv$i = $scevgep$i; - } else { - $120 = $195;$gr$0 = 0;$used_bits$0 = 0; - continue L50; - } - } - } - $121 = HEAP32[$$pre$phiZ2D>>2]|0; - $122 = ($121|0)>(0); - if ($122) { - $ch$022 = 0;$used_bits$124 = $used_bits$0; - while(1) { - $123 = ((((($gfc)) + 304|0) + (($gr$0*10504)|0)|0) + (($ch$022*5252)|0)|0); - HEAPF32[$bst_cod_info$i>>2] = 0.0; - $124 = ((((((($gfc)) + 304|0) + (($gr$0*10504)|0)|0) + (($ch$022*5252)|0)|0)) + 5208|0); - $125 = HEAP32[$124>>2]|0; - $126 = ((((((($gfc)) + 304|0) + (($gr$0*10504)|0)|0) + (($ch$022*5252)|0)|0)) + 4764|0); - HEAPF32[$126>>2] = 0.0; - $127 = (($xrpow) + ($125<<2)|0); - $128 = (576 - ($125))|0; - $129 = $128 << 2; - _memset(($127|0),0,($129|0))|0; - $130 = HEAP32[$115>>2]|0; - FUNCTION_TABLE_viiii[$130 & 7]($123,$xrpow,$125,$bst_cod_info$i); - $131 = +HEAPF32[$bst_cod_info$i>>2]; - $132 = $131 > 9.9999996826552254E-21; - if ($132) { - $133 = HEAP32[$116>>2]|0; - $134 = $133 >>> 1; - $$lobit$i = $134 & 1; - $135 = ((((((($gfc)) + 304|0) + (($gr$0*10504)|0)|0) + (($ch$022*5252)|0)|0)) + 4864|0); - $136 = HEAP32[$135>>2]|0; - $137 = ($136|0)>(0); - if ($137) { - $i$01$i = 0; - while(1) { - $138 = (((($gfc)) + 84936|0) + ($i$01$i<<2)|0); - HEAP32[$138>>2] = $$lobit$i; - $139 = (($i$01$i) + 1)|0; - $140 = HEAP32[$135>>2]|0; - $141 = ($139|0)<($140|0); - if ($141) { - $i$01$i = $139; - } else { - break; - } - } - } - $143 = ((($max_bits) + ($gr$0<<3)|0) + ($ch$022<<2)|0); - $144 = HEAP32[$143>>2]|0; - $145 = ($144|0)==(0); - if ($145) { - $used_bits$2 = $used_bits$124; - } else { - $146 = ((($l3_xmin) + (($gr$0*312)|0)|0) + (($ch$022*156)|0)|0); - $147 = ((($min_bits) + ($gr$0<<3)|0) + ($ch$022<<2)|0); - $148 = HEAP32[$147>>2]|0; - $149 = (($148) + ($144))|0; - $150 = (($149|0) / 2)&-1; - $151 = HEAP32[$117>>2]|0; - _memset(($118|0),0,2304)|0; - $152 = (($144) + -42)|0; - $153 = ((((((($gfc)) + 304|0) + (($gr$0*10504)|0)|0) + (($ch$022*5252)|0)|0)) + 4768|0); - $$0$i1 = $148;$$01$i = $144;$found$0$i = 0;$this_bits$0$i = $150; - while(1) { - $154 = ($this_bits$0$i|0)>($152|0); - $$$i = $154 ? 0 : $151; - HEAP32[$117>>2] = $$$i; - $155 = (_outer_loop($gfc,$123,$146,$xrpow,$ch$022,$this_bits$0$i)|0); - $156 = ($155|0)<(1); - if ($156) { - $157 = HEAP32[$153>>2]|0; - _memcpy(($bst_cod_info$i|0),($123|0),5252)|0; - _memcpy(($bst_xrpow$i|0),($xrpow|0),2304)|0; - $158 = (($157) + -32)|0; - $159 = (($158) - ($$0$i1))|0; - $160 = (($158) + ($$0$i1))|0; - $161 = (($160|0) / 2)&-1; - $$1$i = $$0$i1;$$12$i = $158;$dbits$0$i = $159;$found$1$i = 1;$this_bits$1$i = $161; - } else { - $162 = (($this_bits$0$i) + 32)|0; - $163 = (($$01$i) - ($162))|0; - $164 = (($$01$i) + ($162))|0; - $165 = (($164|0) / 2)&-1; - $166 = ($found$0$i|0)==(0); - if ($166) { - $$1$i = $162;$$12$i = $$01$i;$dbits$0$i = $163;$found$1$i = 0;$this_bits$1$i = $165; - } else { - _memcpy(($123|0),($bst_cod_info$i|0),5252)|0; - _memcpy(($xrpow|0),($bst_xrpow$i|0),2304)|0; - $$1$i = $162;$$12$i = $$01$i;$dbits$0$i = $163;$found$1$i = 2;$this_bits$1$i = $165; - } - } - $167 = ($dbits$0$i|0)>(12); - if ($167) { - $$0$i1 = $$1$i;$$01$i = $$12$i;$found$0$i = $found$1$i;$this_bits$0$i = $this_bits$1$i; - } else { - $found$1$i$lcssa = $found$1$i; - break; - } - } - HEAP32[$117>>2] = $151; - $168 = ($found$1$i$lcssa|0)==(2); - if ($168) { - $169 = ((((((($gfc)) + 304|0) + (($gr$0*10504)|0)|0) + (($ch$022*5252)|0)|0)) + 2304|0); - _memcpy(($169|0),($118|0),2304)|0; - } - $170 = HEAP32[$116>>2]|0; - $171 = $170 & 1; - $172 = ($171|0)==(0); - if (!($172)) { - _trancate_smallspectrums($gfc,$123,$146,$xrpow); - } - $173 = HEAP32[$153>>2]|0; - $174 = ((((((($gfc)) + 304|0) + (($gr$0*10504)|0)|0) + (($ch$022*5252)|0)|0)) + 4844|0); - $175 = HEAP32[$174>>2]|0; - $176 = (($173) + ($used_bits$124))|0; - $177 = (($176) + ($175))|0; - $used_bits$2 = $177; - } - } else { - $142 = ((((((($gfc)) + 304|0) + (($gr$0*10504)|0)|0) + (($ch$022*5252)|0)|0)) + 2304|0); - _memset(($142|0),0,2304)|0; - $used_bits$2 = $used_bits$124; - } - $178 = (($ch$022) + 1)|0; - $179 = HEAP32[$$pre$phiZ2D>>2]|0; - $180 = ($178|0)<($179|0); - if ($180) { - $ch$022 = $178;$used_bits$124 = $used_bits$2; - } else { - $used_bits$2$lcssa = $used_bits$2; - break; - } - } - $$pre$pre$pre = HEAP32[$4>>2]|0; - $$pre$pre = $$pre$pre$pre;$used_bits$1$lcssa = $used_bits$2$lcssa; - } else { - $$pre$pre = $120;$used_bits$1$lcssa = $used_bits$0; - } - $181 = (($gr$0) + 1)|0; - $120 = $$pre$pre;$gr$0 = $181;$used_bits$0 = $used_bits$1$lcssa; - } - if (!($196)) { - $265 = HEAP32[$mean_bits>>2]|0; - _ResvFrameEnd($gfc,$265); - STACKTOP = sp;return; - } - $197 = ((($gfc)) + 304|0); - $198 = ((($gfc)) + 36|0); - $$pre34 = HEAP32[$$pre$phiZ2D>>2]|0; - $254 = $$pre34;$271 = $195;$gr$116 = 0; - while(1) { - $255 = ($254|0)>(0); - if ($255) { - $ch$115 = 0; - while(1) { - $256 = ((((($gfc)) + 304|0) + (($gr$116*10504)|0)|0) + (($ch$115*5252)|0)|0); - _best_scalefac_store($gfc,$gr$116,$ch$115,$197); - $257 = HEAP32[$198>>2]|0; - $258 = ($257|0)==(1); - if ($258) { - _best_huffman_divide($gfc,$256); - } - _ResvAdjust($gfc,$256); - $259 = (($ch$115) + 1)|0; - $260 = HEAP32[$$pre$phiZ2D>>2]|0; - $261 = ($259|0)<($260|0); - if ($261) { - $ch$115 = $259; - } else { - $$lcssa = $260; - break; - } - } - $$pre35 = HEAP32[$4>>2]|0; - $264 = $$pre35;$272 = $$lcssa; - } else { - $264 = $271;$272 = $254; - } - $262 = (($gr$116) + 1)|0; - $263 = ($262|0)<($264|0); - if ($263) { - $254 = $272;$271 = $264;$gr$116 = $262; - } else { - break; - } - } - $265 = HEAP32[$mean_bits>>2]|0; - _ResvFrameEnd($gfc,$265); - STACKTOP = sp;return; -} -function _VBR_new_iteration_loop($gfc,$pe,$ms_ener_ratio,$ratio) { - $gfc = $gfc|0; - $pe = $pe|0; - $ms_ener_ratio = $ms_ener_ratio|0; - $ratio = $ratio|0; - var $$i$0 = 0, $$lcssa = 0, $$lcssa65 = 0, $$lcssa69 = 0, $$lobit$i = 0, $$pre = 0, $$pre$i = 0, $$pre$i$lcssa = 0, $$pre44 = 0, $$pre45 = 0, $$pre46 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0; - var $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0; - var $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0; - var $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0; - var $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0.0; - var $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; - var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; - var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0.0; - var $98 = 0, $99 = 0, $analog_silence$0$lcssa2526$i = 0, $analog_silence$0$lcssa2527$i = 0, $analog_silence$014$i = 0, $analog_silence$1$$i = 0, $analog_silence$1$lcssa$i = 0, $analog_silence$1$lcssa$i$lcssa = 0, $analog_silence$110$i = 0, $avg$i = 0, $bits$015$i = 0, $bits$1$lcssa$i = 0, $bits$1$lcssa$i$lcssa = 0, $bits$111$i = 0, $ch$026 = 0, $ch$09$i = 0, $ch$15$i = 0, $ch$19 = 0, $exitcond$i$i = 0, $frameBits = 0; - var $gr$016$i = 0, $gr$029 = 0, $gr$110 = 0, $gr$16$i = 0, $i$0$lcssa = 0, $i$0$ph = 0, $i$01$i = 0, $i$01$i$i = 0, $i$01$i2$i = 0, $i$018 = 0, $j$0$lcssa = 0, $j$013 = 0, $l3_xmin = 0, $max_bits = 0, $maximum_framebits$0$i = 0, $mean_bits = 0, $or$cond$i = 0, $sum$i = 0, $vararg_buffer = 0, $xrpow = 0; - var label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 9936|0; - $vararg_buffer = sp; - $sum$i = sp + 9932|0; - $avg$i = sp + 9928|0; - $l3_xmin = sp + 9304|0; - $xrpow = sp + 88|0; - $frameBits = sp + 24|0; - $max_bits = sp + 8|0; - $mean_bits = sp + 4|0; - _memset(($xrpow|0),0,9216)|0; - $0 = ((($gfc)) + 152|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(0); - if ($2) { - $3 = ((($gfc)) + 116|0); - $4 = HEAP32[$3>>2]|0; - $5 = ((($gfc)) + 84744|0); - HEAP32[$5>>2] = $4; - (_ResvFrameBegin($gfc,$avg$i)|0); - $6 = ((($gfc)) + 52144|0); - $7 = HEAP32[$6>>2]|0; - $8 = ((($gfc)) + 112|0); - $9 = HEAP32[$8>>2]|0; - HEAP32[$5>>2] = $9; - HEAP32[$5>>2] = 1; - $10 = (_getframebits($gfc)|0); - HEAP32[$sum$i>>2] = $10; - $11 = HEAP32[$3>>2]|0; - $12 = ($11|0)<(1); - if ($12) { - $19 = $11; - } else { - $i$01$i$i = 1; - while(1) { - HEAP32[$5>>2] = $i$01$i$i; - $13 = (_ResvFrameBegin($gfc,$sum$i)|0); - $14 = (($frameBits) + ($i$01$i$i<<2)|0); - HEAP32[$14>>2] = $13; - $15 = (($i$01$i$i) + 1)|0; - $16 = HEAP32[$3>>2]|0; - $17 = ($i$01$i$i|0)<($16|0); - if ($17) { - $i$01$i$i = $15; - } else { - $19 = $16; - break; - } - } - } - $18 = (($frameBits) + ($19<<2)|0); - $20 = HEAP32[$18>>2]|0; - $163 = $7;$maximum_framebits$0$i = $20; - } else { - $21 = ((($gfc)) + 84744|0); - HEAP32[$21>>2] = 0; - $22 = (_ResvFrameBegin($gfc,$avg$i)|0); - HEAP32[$frameBits>>2] = $22; - $23 = ((($gfc)) + 52144|0); - $24 = HEAP32[$23>>2]|0; - $163 = $24;$maximum_framebits$0$i = $22; - } - $25 = ((($gfc)) + 76|0); - $26 = HEAP32[$25>>2]|0; - $27 = ($26|0)>(0); - if ($27) { - $28 = ((($gfc)) + 84756|0); - $29 = ((($gfc)) + 72|0); - $30 = ((($gfc)) + 84912|0); - $31 = ((($gfc)) + 84908|0); - $analog_silence$014$i = 1;$bits$015$i = 0;$gr$016$i = 0; - while(1) { - $35 = (($max_bits) + ($gr$016$i<<3)|0); - $36 = HEAP32[$avg$i>>2]|0; - (_on_pe($gfc,$pe,$35,$36,$gr$016$i,0)|0); - $37 = HEAP32[$28>>2]|0; - $38 = ($37|0)==(2); - if ($38) { - $i$01$i2$i = 0; - while(1) { - $39 = ((((($gfc)) + 304|0) + (($gr$016$i*10504)|0)|0) + ($i$01$i2$i<<2)|0); - $40 = +HEAPF32[$39>>2]; - $41 = ((((((($gfc)) + 304|0) + (($gr$016$i*10504)|0)|0)) + 5252|0) + ($i$01$i2$i<<2)|0); - $42 = +HEAPF32[$41>>2]; - $43 = $42 + $40; - $44 = $43 * 0.70710676908493042; - HEAPF32[$39>>2] = $44; - $45 = $40 - $42; - $46 = $45 * 0.70710676908493042; - HEAPF32[$41>>2] = $46; - $47 = (($i$01$i2$i) + 1)|0; - $exitcond$i$i = ($47|0)==(576); - if ($exitcond$i$i) { - break; - } else { - $i$01$i2$i = $47; - } - } - } - $48 = HEAP32[$29>>2]|0; - $49 = ($48|0)>(0); - if ($49) { - $analog_silence$110$i = $analog_silence$014$i;$bits$111$i = $bits$015$i;$ch$09$i = 0; - while(1) { - $50 = ((((($gfc)) + 304|0) + (($gr$016$i*10504)|0)|0) + (($ch$09$i*5252)|0)|0); - $51 = +HEAPF32[$30>>2]; - $52 = $51; - $53 = $52 * 0.10000000000000001; - $54 = (+Math_pow(10.0,(+$53))); - $55 = $54; - HEAPF32[$31>>2] = $55; - _init_outer_loop($gfc,$50); - $56 = ((($ratio) + (($gr$016$i*976)|0)|0) + (($ch$09$i*488)|0)|0); - $57 = ((($l3_xmin) + (($gr$016$i*312)|0)|0) + (($ch$09$i*156)|0)|0); - $58 = (_calc_xmin($gfc,$56,$50,$57)|0); - $59 = ($58|0)==(0); - $analog_silence$1$$i = $59 ? $analog_silence$110$i : 0; - $60 = ((($max_bits) + ($gr$016$i<<3)|0) + ($ch$09$i<<2)|0); - $61 = HEAP32[$60>>2]|0; - $62 = (($61) + ($bits$111$i))|0; - $63 = (($ch$09$i) + 1)|0; - $64 = HEAP32[$29>>2]|0; - $65 = ($63|0)<($64|0); - if ($65) { - $analog_silence$110$i = $analog_silence$1$$i;$bits$111$i = $62;$ch$09$i = $63; - } else { - $$pre$i = $64;$analog_silence$1$lcssa$i = $analog_silence$1$$i;$bits$1$lcssa$i = $62; - break; - } - } - } else { - $$pre$i = $48;$analog_silence$1$lcssa$i = $analog_silence$014$i;$bits$1$lcssa$i = $bits$015$i; - } - $66 = (($gr$016$i) + 1)|0; - $67 = HEAP32[$25>>2]|0; - $68 = ($66|0)<($67|0); - if ($68) { - $analog_silence$014$i = $analog_silence$1$lcssa$i;$bits$015$i = $bits$1$lcssa$i;$gr$016$i = $66; - } else { - $$lcssa69 = $67;$$pre$i$lcssa = $$pre$i;$analog_silence$1$lcssa$i$lcssa = $analog_silence$1$lcssa$i;$bits$1$lcssa$i$lcssa = $bits$1$lcssa$i; - break; - } - } - $32 = ($$lcssa69|0)>(0); - if ($32) { - $33 = ($bits$1$lcssa$i$lcssa|0)>($maximum_framebits$0$i|0); - $34 = ($bits$1$lcssa$i$lcssa|0)>(0); - $or$cond$i = $33 & $34; - $69 = $$pre$i$lcssa;$gr$16$i = 0; - while(1) { - $70 = ($69|0)>(0); - if ($70) { - $165 = $69;$ch$15$i = 0; - while(1) { - if ($or$cond$i) { - $71 = ((($max_bits) + ($gr$16$i<<3)|0) + ($ch$15$i<<2)|0); - $72 = HEAP32[$71>>2]|0; - $73 = Math_imul($72, $maximum_framebits$0$i)|0; - $74 = (($73|0) / ($bits$1$lcssa$i$lcssa|0))&-1; - HEAP32[$71>>2] = $74; - $77 = $$pre$i$lcssa; - } else { - $77 = $165; - } - $75 = (($ch$15$i) + 1)|0; - $76 = ($75|0)<($77|0); - if ($76) { - $165 = $77;$ch$15$i = $75; - } else { - $166 = $77; - break; - } - } - } else { - $166 = $69; - } - $78 = (($gr$16$i) + 1)|0; - $79 = ($78|0)<($$lcssa69|0); - if ($79) { - $69 = $166;$gr$16$i = $78; - } else { - break; - } - } - } - $80 = ($analog_silence$1$lcssa$i$lcssa|0)==(0); - if ($80) { - $134 = $163;$81 = $$lcssa69;$analog_silence$0$lcssa2527$i = 0; - } else { - $164 = $$lcssa69;$analog_silence$0$lcssa2526$i = $analog_silence$1$lcssa$i$lcssa; - label = 21; - } - } else { - $164 = $26;$analog_silence$0$lcssa2526$i = 1; - label = 21; - } - if ((label|0) == 21) { - $134 = 0;$81 = $164;$analog_silence$0$lcssa2527$i = $analog_silence$0$lcssa2526$i; - } - $82 = ($81|0)>(0); - if ($82) { - $83 = ((($gfc)) + 72|0); - $84 = ((($gfc)) + 85824|0); - $85 = ((($gfc)) + 85096|0); - $$pre = HEAP32[$83>>2]|0; - $167 = $81;$86 = $$pre;$gr$029 = 0; - while(1) { - $87 = ($86|0)>(0); - if ($87) { - $ch$026 = 0; - while(1) { - $88 = ((((($gfc)) + 304|0) + (($gr$029*10504)|0)|0) + (($ch$026*5252)|0)|0); - $89 = ((($xrpow) + (($gr$029*4608)|0)|0) + (($ch$026*2304)|0)|0); - HEAPF32[$sum$i>>2] = 0.0; - $90 = ((((((($gfc)) + 304|0) + (($gr$029*10504)|0)|0) + (($ch$026*5252)|0)|0)) + 5208|0); - $91 = HEAP32[$90>>2]|0; - $92 = ((((((($gfc)) + 304|0) + (($gr$029*10504)|0)|0) + (($ch$026*5252)|0)|0)) + 4764|0); - HEAPF32[$92>>2] = 0.0; - $93 = (((($xrpow) + (($gr$029*4608)|0)|0) + (($ch$026*2304)|0)|0) + ($91<<2)|0); - $94 = (576 - ($91))|0; - $95 = $94 << 2; - _memset(($93|0),0,($95|0))|0; - $96 = HEAP32[$84>>2]|0; - FUNCTION_TABLE_viiii[$96 & 7]($88,$89,$91,$sum$i); - $97 = +HEAPF32[$sum$i>>2]; - $98 = $97 > 9.9999996826552254E-21; - if ($98) { - $99 = HEAP32[$85>>2]|0; - $100 = $99 >>> 1; - $$lobit$i = $100 & 1; - $101 = ((((((($gfc)) + 304|0) + (($gr$029*10504)|0)|0) + (($ch$026*5252)|0)|0)) + 4864|0); - $102 = HEAP32[$101>>2]|0; - $103 = ($102|0)>(0); - if ($103) { - $i$01$i = 0; - while(1) { - $104 = (((($gfc)) + 84936|0) + ($i$01$i<<2)|0); - HEAP32[$104>>2] = $$lobit$i; - $105 = (($i$01$i) + 1)|0; - $106 = HEAP32[$101>>2]|0; - $107 = ($105|0)<($106|0); - if ($107) { - $i$01$i = $105; - } else { - break; - } - } - } - } else { - $108 = ((((((($gfc)) + 304|0) + (($gr$029*10504)|0)|0) + (($ch$026*5252)|0)|0)) + 2304|0); - _memset(($108|0),0,2304)|0; - $109 = ((($max_bits) + ($gr$029<<3)|0) + ($ch$026<<2)|0); - HEAP32[$109>>2] = 0; - } - $110 = (($ch$026) + 1)|0; - $111 = HEAP32[$83>>2]|0; - $112 = ($110|0)<($111|0); - if ($112) { - $ch$026 = $110; - } else { - $$lcssa65 = $111; - break; - } - } - $$pre44 = HEAP32[$25>>2]|0; - $115 = $$pre44;$168 = $$lcssa65; - } else { - $115 = $167;$168 = $86; - } - $113 = (($gr$029) + 1)|0; - $114 = ($113|0)<($115|0); - if ($114) { - $167 = $115;$86 = $168;$gr$029 = $113; - } else { - break; - } - } - } - $116 = (_VBR_encode_frame(($gfc|0),($xrpow|0),($l3_xmin|0),($max_bits|0))|0); - $117 = HEAP32[$0>>2]|0; - $118 = ($117|0)==(0); - do { - if ($118) { - $119 = ($analog_silence$0$lcssa2527$i|0)==(0); - if ($119) { - label = 36; - } else { - $120 = ((($gfc)) + 124|0); - $121 = HEAP32[$120>>2]|0; - $122 = ($121|0)==(0); - if ($122) { - $i$0$ph = 1; - } else { - label = 36; - } - } - if ((label|0) == 36) { - $123 = ((($gfc)) + 112|0); - $124 = HEAP32[$123>>2]|0; - $i$0$ph = $124; - } - $125 = ((($gfc)) + 116|0); - $126 = HEAP32[$125>>2]|0; - $127 = ($i$0$ph|0)<($126|0); - L63: do { - if ($127) { - $i$018 = $i$0$ph; - while(1) { - $128 = (($frameBits) + ($i$018<<2)|0); - $129 = HEAP32[$128>>2]|0; - $130 = ($116|0)>($129|0); - if (!($130)) { - $i$0$lcssa = $i$018; - break L63; - } - $131 = (($i$018) + 1)|0; - $132 = ($131|0)<($126|0); - if ($132) { - $i$018 = $131; - } else { - $i$0$lcssa = $131; - break; - } - } - } else { - $i$0$lcssa = $i$0$ph; - } - } while(0); - $133 = ($i$0$lcssa|0)>($126|0); - $$i$0 = $133 ? $126 : $i$0$lcssa; - $135 = ($134|0)>(0); - if (!($135)) { - $144 = ((($gfc)) + 84744|0); - HEAP32[$144>>2] = $$i$0; - $147 = $$i$0; - break; - } - $136 = ($126|0)>($$i$0|0); - L71: do { - if ($136) { - $j$013 = $126; - while(1) { - $137 = (($frameBits) + ($j$013<<2)|0); - $138 = HEAP32[$137>>2]|0; - $139 = (($138) - ($116))|0; - $140 = ($139|0)>($134|0); - if (!($140)) { - $j$0$lcssa = $j$013; - break L71; - } - $141 = (($j$013) + -1)|0; - $142 = ($141|0)>($$i$0|0); - if ($142) { - $j$013 = $141; - } else { - $j$0$lcssa = $141; - break; - } - } - } else { - $j$0$lcssa = $126; - } - } while(0); - $143 = ((($gfc)) + 84744|0); - HEAP32[$143>>2] = $j$0$lcssa; - $147 = $j$0$lcssa; - } else { - $145 = ((($gfc)) + 84744|0); - HEAP32[$145>>2] = 0; - $147 = 0; - } - } while(0); - $146 = (($frameBits) + ($147<<2)|0); - $148 = HEAP32[$146>>2]|0; - $149 = ($116|0)>($148|0); - if ($149) { - _lame_errorf($gfc,11768,$vararg_buffer); - _exit(-1); - // unreachable; - } - (_ResvFrameBegin($gfc,$mean_bits)|0); - $150 = HEAP32[$25>>2]|0; - $151 = ($150|0)>(0); - if (!($151)) { - $162 = HEAP32[$mean_bits>>2]|0; - _ResvFrameEnd($gfc,$162); - STACKTOP = sp;return; - } - $152 = ((($gfc)) + 72|0); - $$pre45 = HEAP32[$152>>2]|0; - $153 = $$pre45;$169 = $150;$gr$110 = 0; - while(1) { - $154 = ($153|0)>(0); - if ($154) { - $ch$19 = 0; - while(1) { - $155 = ((((($gfc)) + 304|0) + (($gr$110*10504)|0)|0) + (($ch$19*5252)|0)|0); - _ResvAdjust($gfc,$155); - $156 = (($ch$19) + 1)|0; - $157 = HEAP32[$152>>2]|0; - $158 = ($156|0)<($157|0); - if ($158) { - $ch$19 = $156; - } else { - $$lcssa = $157; - break; - } - } - $$pre46 = HEAP32[$25>>2]|0; - $161 = $$pre46;$170 = $$lcssa; - } else { - $161 = $169;$170 = $153; - } - $159 = (($gr$110) + 1)|0; - $160 = ($159|0)<($161|0); - if ($160) { - $153 = $170;$169 = $161;$gr$110 = $159; - } else { - break; - } - } - $162 = HEAP32[$mean_bits>>2]|0; - _ResvFrameEnd($gfc,$162); - STACKTOP = sp;return; -} -function _ABR_iteration_loop($gfc,$pe,$ms_ener_ratio,$ratio) { - $gfc = $gfc|0; - $pe = $pe|0; - $ms_ener_ratio = $ms_ener_ratio|0; - $ratio = $ratio|0; - var $$add_bits$0$i = 0, $$lcssa39 = 0, $$lobit$i = 0, $$pre = 0, $$pre$i = 0, $$pre37$i = 0, $$pre38$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; - var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0; - var $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0.0; - var $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0.0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0; - var $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0; - var $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; - var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; - var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0.0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0, $98 = 0, $99 = 0; - var $add_bits$0$i = 0, $add_bits$1$i = 0, $ch$013 = 0, $ch$023$i = 0, $ch$128$i = 0, $ch$212$i = 0, $ch$39$i = 0, $exitcond$i = 0, $gr$015 = 0, $gr$030$i = 0, $gr$217$i = 0, $gr$310$i = 0, $i$01$i = 0, $i$01$i1 = 0, $l3_xmin = 0, $masking_lower_db$0 = 0.0, $masking_lower_db$0$in = 0, $mean_bits = 0, $or$cond$i = 0, $res_factor$0$i = 0.0; - var $res_factor$1$i = 0.0, $sum$024$i = 0, $sum$i = 0, $targ_bits = 0, $totbits$016$i = 0, $totbits$1$lcssa$i = 0, $totbits$1$lcssa$i$lcssa = 0, $totbits$113$i = 0, $xrpow = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2496|0; - $sum$i = sp + 2484|0; - $l3_xmin = sp + 2328|0; - $xrpow = sp + 24|0; - $targ_bits = sp + 8|0; - $mean_bits = sp; - $0 = ((($gfc)) + 304|0); - HEAP32[$mean_bits>>2] = 0; - $1 = ((($gfc)) + 76|0); - $2 = HEAP32[$1>>2]|0; - $3 = ((($gfc)) + 116|0); - $4 = HEAP32[$3>>2]|0; - $5 = ((($gfc)) + 84744|0); - HEAP32[$5>>2] = $4; - $6 = (_ResvFrameBegin($gfc,$sum$i)|0); - HEAP32[$5>>2] = 1; - $7 = (_getframebits($gfc)|0); - $8 = ((($gfc)) + 24|0); - $9 = HEAP32[$8>>2]|0; - $10 = $9 << 3; - $11 = (($7) - ($10))|0; - $12 = HEAP32[$1>>2]|0; - $13 = ((($gfc)) + 72|0); - $14 = HEAP32[$13>>2]|0; - $15 = Math_imul($14, $12)|0; - $16 = (($11|0) / ($15|0))&-1; - $17 = ((($gfc)) + 108|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($2*576000)|0; - $20 = Math_imul($19, $18)|0; - HEAP32[$sum$i>>2] = $20; - $21 = ((($gfc)) + 85096|0); - $22 = HEAP32[$21>>2]|0; - $23 = $22 & 1; - $24 = ($23|0)==(0); - if ($24) { - $31 = $20; - } else { - $25 = (+($20|0)); - $26 = $25 * 1.0900000000000001; - $27 = (~~(($26))); - HEAP32[$sum$i>>2] = $27; - $31 = $27; - } - $28 = ((($gfc)) + 64|0); - $29 = HEAP32[$28>>2]|0; - $30 = (($31|0) / ($29|0))&-1; - $32 = (($30) - ($10))|0; - $33 = (($32|0) / ($15|0))&-1; - HEAP32[$sum$i>>2] = $33; - $34 = ((($gfc)) + 244|0); - $35 = +HEAPF32[$34>>2]; - $36 = $35; - $37 = 11.0 - $36; - $38 = $37 * 0.012727272727272728; - $39 = $38 + 0.93000000000000005; - $40 = $39; - $41 = $40; - $42 = $41 < 0.90000000000000002; - $res_factor$0$i = $42 ? 0.89999997615814208 : $40; - $43 = ($12|0)>(0); - if ($43) { - $44 = $res_factor$0$i > 1.0; - $res_factor$1$i = $44 ? 1.0 : $res_factor$0$i; - $45 = (+($33|0)); - $46 = $res_factor$1$i * $45; - $47 = (~~(($46))); - $48 = (($33|0) / 2)&-1; - $49 = ($33*3)|0; - $50 = (($49|0) / 2)&-1; - $51 = ($14|0)>(0); - $gr$030$i = 0; - while(1) { - if ($51) { - $ch$023$i = 0;$sum$024$i = 0; - while(1) { - $52 = ((($targ_bits) + ($gr$030$i<<3)|0) + ($ch$023$i<<2)|0); - HEAP32[$52>>2] = $47; - $53 = ((($pe) + ($gr$030$i<<3)|0) + ($ch$023$i<<2)|0); - $54 = +HEAPF32[$53>>2]; - $55 = $54 > 700.0; - if ($55) { - $56 = $54 + -700.0; - $57 = $56; - $58 = $57 * 0.7142857142857143; - $59 = (~~(($58))); - $60 = ((((((($gfc)) + 304|0) + (($gr$030$i*10504)|0)|0) + (($ch$023$i*5252)|0)|0)) + 4788|0); - $61 = HEAP32[$60>>2]|0; - $62 = ($61|0)==(2); - $63 = ($59|0)<($48|0); - $64 = $63 & $62; - $add_bits$0$i = $64 ? $48 : $59; - $65 = ($add_bits$0$i|0)>($50|0); - $66 = ($add_bits$0$i|0)<(0); - $$add_bits$0$i = $66 ? 0 : $add_bits$0$i; - $add_bits$1$i = $65 ? $50 : $$add_bits$0$i; - $67 = (($add_bits$1$i) + ($47))|0; - HEAP32[$52>>2] = $67; - $68 = $67; - } else { - $68 = $47; - } - $69 = ($68|0)>(4095); - if ($69) { - HEAP32[$52>>2] = 4095; - $71 = 4095; - } else { - $71 = $68; - } - $70 = (($71) + ($sum$024$i))|0; - $72 = (($ch$023$i) + 1)|0; - $73 = ($72|0)<($14|0); - if ($73) { - $ch$023$i = $72;$sum$024$i = $70; - } else { - $$lcssa39 = $70; - break; - } - } - $74 = ($$lcssa39|0)>(7680); - if ($74) { - $ch$128$i = 0; - while(1) { - $75 = ((($targ_bits) + ($gr$030$i<<3)|0) + ($ch$128$i<<2)|0); - $76 = HEAP32[$75>>2]|0; - $77 = ($76*7680)|0; - $78 = (($77|0) / ($$lcssa39|0))&-1; - HEAP32[$75>>2] = $78; - $79 = (($ch$128$i) + 1)|0; - $80 = ($79|0)<($14|0); - if ($80) { - $ch$128$i = $79; - } else { - break; - } - } - } - } - $81 = (($gr$030$i) + 1)|0; - $82 = ($81|0)<($12|0); - if ($82) { - $gr$030$i = $81; - } else { - break; - } - } - } - $83 = ((($gfc)) + 84756|0); - $84 = HEAP32[$83>>2]|0; - $85 = ($84|0)==(2); - if ($85) { - if ($43) { - $86 = +HEAPF32[$ms_ener_ratio>>2]; - $87 = Math_imul($33, $14)|0; - _reduce_side($targ_bits,$86,$87,7680); - $88 = HEAP32[$1>>2]|0; - $89 = ($88|0)>(1); - if ($89) { - $94 = 1; - while(1) { - $$pre$i = HEAP32[$sum$i>>2]|0; - $$pre37$i = HEAP32[$13>>2]|0; - $93 = (($targ_bits) + ($94<<3)|0); - $95 = (($ms_ener_ratio) + ($94<<2)|0); - $96 = +HEAPF32[$95>>2]; - $97 = Math_imul($$pre$i, $$pre37$i)|0; - _reduce_side($93,$96,$97,7680); - $98 = (($94) + 1)|0; - $99 = HEAP32[$1>>2]|0; - $100 = ($98|0)<($99|0); - if ($100) { - $94 = $98; - } else { - $90 = $99; - label = 17; - break; - } - } - } else { - $90 = $88; - label = 17; - } - } else { - label = 30; - } - } else { - $90 = $12; - label = 17; - } - if ((label|0) == 17) { - $91 = ($90|0)>(0); - if ($91) { - $$pre38$i = HEAP32[$13>>2]|0; - $92 = ($$pre38$i|0)>(0); - $gr$217$i = 0;$totbits$016$i = 0; - while(1) { - if ($92) { - $ch$212$i = 0;$totbits$113$i = $totbits$016$i; - while(1) { - $101 = ((($targ_bits) + ($gr$217$i<<3)|0) + ($ch$212$i<<2)|0); - $102 = HEAP32[$101>>2]|0; - $103 = ($102|0)>(4095); - if ($103) { - HEAP32[$101>>2] = 4095; - $105 = 4095; - } else { - $105 = $102; - } - $104 = (($105) + ($totbits$113$i))|0; - $106 = (($ch$212$i) + 1)|0; - $107 = ($106|0)<($$pre38$i|0); - if ($107) { - $ch$212$i = $106;$totbits$113$i = $104; - } else { - $totbits$1$lcssa$i = $104; - break; - } - } - } else { - $totbits$1$lcssa$i = $totbits$016$i; - } - $108 = (($gr$217$i) + 1)|0; - $109 = ($108|0)<($90|0); - if ($109) { - $gr$217$i = $108;$totbits$016$i = $totbits$1$lcssa$i; - } else { - $totbits$1$lcssa$i$lcssa = $totbits$1$lcssa$i; - break; - } - } - $110 = ($totbits$1$lcssa$i$lcssa|0)>($6|0); - $111 = ($totbits$1$lcssa$i$lcssa|0)>(0); - $or$cond$i = $111 & $110; - if ($or$cond$i) { - $112 = ($$pre38$i|0)>(0); - $192 = $90;$gr$310$i = 0; - while(1) { - if ($112) { - $ch$39$i = 0; - while(1) { - $113 = ((($targ_bits) + ($gr$310$i<<3)|0) + ($ch$39$i<<2)|0); - $114 = HEAP32[$113>>2]|0; - $115 = Math_imul($114, $6)|0; - $116 = (($115|0) / ($totbits$1$lcssa$i$lcssa|0))&-1; - HEAP32[$113>>2] = $116; - $117 = (($ch$39$i) + 1)|0; - $118 = ($117|0)<($$pre38$i|0); - if ($118) { - $ch$39$i = $117; - } else { - $121 = $90; - break; - } - } - } else { - $121 = $192; - } - $119 = (($gr$310$i) + 1)|0; - $120 = ($119|0)<($121|0); - if ($120) { - $192 = $121;$gr$310$i = $119; - } else { - break; - } - } - } - $122 = ($90|0)>(0); - if ($122) { - $123 = ((($gfc)) + 84912|0); - $124 = ((($gfc)) + 84916|0); - $125 = ((($gfc)) + 84908|0); - $126 = ((($gfc)) + 85824|0); - $127 = ((($gfc)) + 36|0); - $gr$015 = 0; - while(1) { - $128 = HEAP32[$83>>2]|0; - $129 = ($128|0)==(2); - if ($129) { - $i$01$i = 0; - while(1) { - $130 = ((((($gfc)) + 304|0) + (($gr$015*10504)|0)|0) + ($i$01$i<<2)|0); - $131 = +HEAPF32[$130>>2]; - $132 = ((((((($gfc)) + 304|0) + (($gr$015*10504)|0)|0)) + 5252|0) + ($i$01$i<<2)|0); - $133 = +HEAPF32[$132>>2]; - $134 = $133 + $131; - $135 = $134 * 0.70710676908493042; - HEAPF32[$130>>2] = $135; - $136 = $131 - $133; - $137 = $136 * 0.70710676908493042; - HEAPF32[$132>>2] = $137; - $138 = (($i$01$i) + 1)|0; - $exitcond$i = ($138|0)==(576); - if ($exitcond$i) { - break; - } else { - $i$01$i = $138; - } - } - } - $139 = HEAP32[$13>>2]|0; - $140 = ($139|0)>(0); - if ($140) { - $ch$013 = 0; - while(1) { - $141 = ((((($gfc)) + 304|0) + (($gr$015*10504)|0)|0) + (($ch$013*5252)|0)|0); - $142 = ((((((($gfc)) + 304|0) + (($gr$015*10504)|0)|0) + (($ch$013*5252)|0)|0)) + 4788|0); - $143 = HEAP32[$142>>2]|0; - $144 = ($143|0)==(2); - $masking_lower_db$0$in = $144 ? $124 : $123; - $masking_lower_db$0 = +HEAPF32[$masking_lower_db$0$in>>2]; - $145 = $masking_lower_db$0; - $146 = $145 * 0.10000000000000001; - $147 = (+Math_pow(10.0,(+$146))); - $148 = $147; - HEAPF32[$125>>2] = $148; - _init_outer_loop($gfc,$141); - HEAPF32[$sum$i>>2] = 0.0; - $149 = ((((((($gfc)) + 304|0) + (($gr$015*10504)|0)|0) + (($ch$013*5252)|0)|0)) + 5208|0); - $150 = HEAP32[$149>>2]|0; - $151 = ((((((($gfc)) + 304|0) + (($gr$015*10504)|0)|0) + (($ch$013*5252)|0)|0)) + 4764|0); - HEAPF32[$151>>2] = 0.0; - $152 = (($xrpow) + ($150<<2)|0); - $153 = (576 - ($150))|0; - $154 = $153 << 2; - _memset(($152|0),0,($154|0))|0; - $155 = HEAP32[$126>>2]|0; - FUNCTION_TABLE_viiii[$155 & 7]($141,$xrpow,$150,$sum$i); - $156 = +HEAPF32[$sum$i>>2]; - $157 = $156 > 9.9999996826552254E-21; - if ($157) { - $158 = HEAP32[$21>>2]|0; - $159 = $158 >>> 1; - $$lobit$i = $159 & 1; - $160 = ((((((($gfc)) + 304|0) + (($gr$015*10504)|0)|0) + (($ch$013*5252)|0)|0)) + 4864|0); - $161 = HEAP32[$160>>2]|0; - $162 = ($161|0)>(0); - if ($162) { - $i$01$i1 = 0; - while(1) { - $163 = (((($gfc)) + 84936|0) + ($i$01$i1<<2)|0); - HEAP32[$163>>2] = $$lobit$i; - $164 = (($i$01$i1) + 1)|0; - $165 = HEAP32[$160>>2]|0; - $166 = ($164|0)<($165|0); - if ($166) { - $i$01$i1 = $164; - } else { - break; - } - } - } - $168 = ((($ratio) + (($gr$015*976)|0)|0) + (($ch$013*488)|0)|0); - $169 = (_calc_xmin($gfc,$168,$141,$l3_xmin)|0); - $170 = ($169|0)==(0); - $171 = ((($targ_bits) + ($gr$015<<3)|0) + ($ch$013<<2)|0); - if ($170) { - HEAP32[$171>>2] = $16; - $172 = $16; - } else { - $$pre = HEAP32[$171>>2]|0; - $172 = $$pre; - } - (_outer_loop($gfc,$141,$l3_xmin,$xrpow,$ch$013,$172)|0); - } else { - $167 = ((((((($gfc)) + 304|0) + (($gr$015*10504)|0)|0) + (($ch$013*5252)|0)|0)) + 2304|0); - _memset(($167|0),0,2304)|0; - } - _best_scalefac_store($gfc,$gr$015,$ch$013,$0); - $173 = HEAP32[$127>>2]|0; - $174 = ($173|0)==(1); - if ($174) { - _best_huffman_divide($gfc,$141); - } - _ResvAdjust($gfc,$141); - $175 = (($ch$013) + 1)|0; - $176 = HEAP32[$13>>2]|0; - $177 = ($175|0)<($176|0); - if ($177) { - $ch$013 = $175; - } else { - break; - } - } - } - $178 = (($gr$015) + 1)|0; - $179 = HEAP32[$1>>2]|0; - $180 = ($178|0)<($179|0); - if ($180) { - $gr$015 = $178; - } else { - break; - } - } - } - } else { - label = 30; - } - } - if ((label|0) == 30) { - } - $181 = ((($gfc)) + 112|0); - $182 = HEAP32[$181>>2]|0; - HEAP32[$5>>2] = $182; - $183 = HEAP32[$3>>2]|0; - $184 = ($182|0)>($183|0); - if ($184) { - $191 = HEAP32[$mean_bits>>2]|0; - _ResvFrameEnd($gfc,$191); - STACKTOP = sp;return; - } - while(1) { - $185 = (_ResvFrameBegin($gfc,$mean_bits)|0); - $186 = ($185|0)>(-1); - if ($186) { - label = 51; - break; - } - $187 = HEAP32[$5>>2]|0; - $188 = (($187) + 1)|0; - HEAP32[$5>>2] = $188; - $189 = HEAP32[$3>>2]|0; - $190 = ($187|0)<($189|0); - if (!($190)) { - label = 51; - break; - } - } - if ((label|0) == 51) { - $191 = HEAP32[$mean_bits>>2]|0; - _ResvFrameEnd($gfc,$191); - STACKTOP = sp;return; - } -} -function _CBR_iteration_loop($gfc,$pe,$ms_ener_ratio,$ratio) { - $gfc = $gfc|0; - $pe = $pe|0; - $ms_ener_ratio = $ms_ener_ratio|0; - $ratio = $ratio|0; - var $$lobit$i = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0; - var $26 = 0.0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; - var $44 = 0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0; - var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, $ch$03 = 0, $exitcond$i = 0, $gr$04 = 0, $i$01$i = 0, $i$01$i1 = 0, $l3_xmin = 0, $masking_lower_db$0 = 0.0, $masking_lower_db$0$in = 0, $mean_bits = 0, $sum$i = 0; - var $targ_bits = 0, $xrpow = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2480|0; - $sum$i = sp + 2476|0; - $l3_xmin = sp + 2320|0; - $xrpow = sp + 16|0; - $targ_bits = sp + 8|0; - $mean_bits = sp; - $0 = ((($gfc)) + 304|0); - (_ResvFrameBegin($gfc,$mean_bits)|0); - $1 = ((($gfc)) + 76|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)>(0); - if (!($3)) { - $68 = HEAP32[$mean_bits>>2]|0; - _ResvFrameEnd($gfc,$68); - STACKTOP = sp;return; - } - $4 = ((($gfc)) + 84756|0); - $5 = ((($gfc)) + 72|0); - $6 = ((($gfc)) + 84912|0); - $7 = ((($gfc)) + 84916|0); - $8 = ((($gfc)) + 84908|0); - $9 = ((($gfc)) + 85824|0); - $10 = ((($gfc)) + 85096|0); - $11 = ((($gfc)) + 36|0); - $gr$04 = 0; - while(1) { - $12 = HEAP32[$mean_bits>>2]|0; - $13 = (_on_pe($gfc,$pe,$targ_bits,$12,$gr$04,$gr$04)|0); - $14 = HEAP32[$4>>2]|0; - $15 = ($14|0)==(2); - if ($15) { - $i$01$i = 0; - while(1) { - $16 = ((((($gfc)) + 304|0) + (($gr$04*10504)|0)|0) + ($i$01$i<<2)|0); - $17 = +HEAPF32[$16>>2]; - $18 = ((((((($gfc)) + 304|0) + (($gr$04*10504)|0)|0)) + 5252|0) + ($i$01$i<<2)|0); - $19 = +HEAPF32[$18>>2]; - $20 = $19 + $17; - $21 = $20 * 0.70710676908493042; - HEAPF32[$16>>2] = $21; - $22 = $17 - $19; - $23 = $22 * 0.70710676908493042; - HEAPF32[$18>>2] = $23; - $24 = (($i$01$i) + 1)|0; - $exitcond$i = ($24|0)==(576); - if ($exitcond$i) { - break; - } else { - $i$01$i = $24; - } - } - $25 = (($ms_ener_ratio) + ($gr$04<<2)|0); - $26 = +HEAPF32[$25>>2]; - $27 = HEAP32[$mean_bits>>2]|0; - _reduce_side($targ_bits,$26,$27,$13); - } - $28 = HEAP32[$5>>2]|0; - $29 = ($28|0)>(0); - if ($29) { - $ch$03 = 0; - while(1) { - $30 = ((((($gfc)) + 304|0) + (($gr$04*10504)|0)|0) + (($ch$03*5252)|0)|0); - $31 = ((((((($gfc)) + 304|0) + (($gr$04*10504)|0)|0) + (($ch$03*5252)|0)|0)) + 4788|0); - $32 = HEAP32[$31>>2]|0; - $33 = ($32|0)==(2); - $masking_lower_db$0$in = $33 ? $7 : $6; - $masking_lower_db$0 = +HEAPF32[$masking_lower_db$0$in>>2]; - $34 = $masking_lower_db$0; - $35 = $34 * 0.10000000000000001; - $36 = (+Math_pow(10.0,(+$35))); - $37 = $36; - HEAPF32[$8>>2] = $37; - _init_outer_loop($gfc,$30); - HEAPF32[$sum$i>>2] = 0.0; - $38 = ((((((($gfc)) + 304|0) + (($gr$04*10504)|0)|0) + (($ch$03*5252)|0)|0)) + 5208|0); - $39 = HEAP32[$38>>2]|0; - $40 = ((((((($gfc)) + 304|0) + (($gr$04*10504)|0)|0) + (($ch$03*5252)|0)|0)) + 4764|0); - HEAPF32[$40>>2] = 0.0; - $41 = (($xrpow) + ($39<<2)|0); - $42 = (576 - ($39))|0; - $43 = $42 << 2; - _memset(($41|0),0,($43|0))|0; - $44 = HEAP32[$9>>2]|0; - FUNCTION_TABLE_viiii[$44 & 7]($30,$xrpow,$39,$sum$i); - $45 = +HEAPF32[$sum$i>>2]; - $46 = $45 > 9.9999996826552254E-21; - if ($46) { - $47 = HEAP32[$10>>2]|0; - $48 = $47 >>> 1; - $$lobit$i = $48 & 1; - $49 = ((((((($gfc)) + 304|0) + (($gr$04*10504)|0)|0) + (($ch$03*5252)|0)|0)) + 4864|0); - $50 = HEAP32[$49>>2]|0; - $51 = ($50|0)>(0); - if ($51) { - $i$01$i1 = 0; - while(1) { - $52 = (((($gfc)) + 84936|0) + ($i$01$i1<<2)|0); - HEAP32[$52>>2] = $$lobit$i; - $53 = (($i$01$i1) + 1)|0; - $54 = HEAP32[$49>>2]|0; - $55 = ($53|0)<($54|0); - if ($55) { - $i$01$i1 = $53; - } else { - break; - } - } - } - $57 = ((($ratio) + (($gr$04*976)|0)|0) + (($ch$03*488)|0)|0); - (_calc_xmin($gfc,$57,$30,$l3_xmin)|0); - $58 = (($targ_bits) + ($ch$03<<2)|0); - $59 = HEAP32[$58>>2]|0; - (_outer_loop($gfc,$30,$l3_xmin,$xrpow,$ch$03,$59)|0); - } else { - $56 = ((((((($gfc)) + 304|0) + (($gr$04*10504)|0)|0) + (($ch$03*5252)|0)|0)) + 2304|0); - _memset(($56|0),0,2304)|0; - } - _best_scalefac_store($gfc,$gr$04,$ch$03,$0); - $60 = HEAP32[$11>>2]|0; - $61 = ($60|0)==(1); - if ($61) { - _best_huffman_divide($gfc,$30); - } - _ResvAdjust($gfc,$30); - $62 = (($ch$03) + 1)|0; - $63 = HEAP32[$5>>2]|0; - $64 = ($62|0)<($63|0); - if ($64) { - $ch$03 = $62; - } else { - break; - } - } - } - $65 = (($gr$04) + 1)|0; - $66 = HEAP32[$1>>2]|0; - $67 = ($65|0)<($66|0); - if ($67) { - $gr$04 = $65; - } else { - break; - } - } - $68 = HEAP32[$mean_bits>>2]|0; - _ResvFrameEnd($gfc,$68); - STACKTOP = sp;return; -} -function _init_xrpow_core_c($cod_info,$xrpow,$upper,$sum) { - $cod_info = $cod_info|0; - $xrpow = $xrpow|0; - $upper = $upper|0; - $sum = $sum|0; - var $$pre = 0.0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $exitcond = 0, $fabsf = 0.0, $i$01 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - HEAPF32[$sum>>2] = 0.0; - $0 = ($upper|0)<(0); - if ($0) { - return; - } - $1 = ((($cod_info)) + 4764|0); - $5 = 0.0;$i$01 = 0; - while(1) { - $2 = (($cod_info) + ($i$01<<2)|0); - $3 = +HEAPF32[$2>>2]; - $fabsf = (+Math_abs((+$3))); - $4 = $5 + $fabsf; - HEAPF32[$sum>>2] = $4; - $6 = $fabsf; - $7 = (+Math_sqrt((+$6))); - $8 = $7 * $6; - $9 = (+Math_sqrt((+$8))); - $10 = $9; - $11 = (($xrpow) + ($i$01<<2)|0); - HEAPF32[$11>>2] = $10; - $12 = +HEAPF32[$1>>2]; - $13 = $10 > $12; - if ($13) { - HEAPF32[$1>>2] = $10; - } - $exitcond = ($i$01|0)==($upper|0); - if ($exitcond) { - break; - } - $14 = (($i$01) + 1)|0; - $$pre = +HEAPF32[$sum>>2]; - $5 = $$pre;$i$01 = $14; - } - return; -} -function _init_outer_loop($gfc,$cod_info) { - $gfc = $gfc|0; - $cod_info = $cod_info|0; - var $$phi$trans$insert = 0, $$pre = 0, $$sink = 0, $$sink27 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0; - var $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0, $117 = 0.0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0; - var $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0, $143 = 0.0, $144 = 0, $145 = 0, $146 = 0, $147 = 0.0, $148 = 0; - var $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0.0; - var $167 = 0, $168 = 0.0, $169 = 0.0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0.0, $174 = 0, $175 = 0, $176 = 0, $177 = 0.0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0; - var $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0.0, $198 = 0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0.0; - var $202 = 0.0, $203 = 0, $204 = 0.0, $205 = 0, $206 = 0, $207 = 0, $208 = 0.0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0; - var $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; - var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; - var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; - var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; - var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $ath12$0$i = 0.0, $ath12$0$i$1 = 0.0, $ath12$0$i$2 = 0.0, $ath21$0$i = 0.0, $exitcond = 0, $exitcond20 = 0, $exitcond20$1 = 0, $exitcond20$2 = 0, $exitcond25 = 0, $exitcond26 = 0, $fabsf$i = 0.0; - var $fabsf$i$1 = 0.0, $fabsf$i$2 = 0.0, $fabsf2$i = 0.0, $gsfb$022$i = 0, $gsfb1$011$i = 0, $gsfb1$011$i$1 = 0, $gsfb1$011$i$2 = 0, $ix$013 = 0, $ix$1$lcssa = 0, $ix$26$us = 0, $ix$26$us$1 = 0, $ix$26$us$2 = 0, $ixwork = 0, $j$015$i = 0, $j$015$in$i = 0, $j$04 = 0, $j5$08$i = 0, $j5$08$i$1 = 0, $j5$08$i$2 = 0, $j5$08$in$i = 0; - var $j5$08$in$i$1 = 0, $j5$08$in$i$2 = 0, $l$07$us = 0, $l$07$us$1 = 0, $l$07$us$2 = 0, $scevgep = 0, $scevgep$1 = 0, $scevgep$1$sum = 0, $scevgep$2 = 0, $scevgep$sum = 0, $sfb$018 = 0, $sfb$114 = 0, $sfb$25 = 0, $storemerge = 0, dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2304|0; - $ixwork = sp; - $0 = ((($cod_info)) + 4768|0); - HEAP32[$0>>2] = 0; - $1 = ((($cod_info)) + 4772|0); - HEAP32[$1>>2] = 0; - $2 = ((($cod_info)) + 4776|0); - HEAP32[$2>>2] = 0; - $3 = ((($cod_info)) + 4780|0); - HEAP32[$3>>2] = 210; - $4 = ((($cod_info)) + 4784|0); - HEAP32[$4>>2] = 0; - $5 = ((($cod_info)) + 4796|0); - $6 = ((($gfc)) + 64|0); - dest=$5; stop=dest+52|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)<(8001); - $9 = ((($cod_info)) + 4848|0); - if ($8) { - HEAP32[$9>>2] = 17; - $$sink = 17;$$sink27 = 9;$18 = 17; - } else { - HEAP32[$9>>2] = 21; - $10 = ((($gfc)) + 85092|0); - $11 = HEAP32[$10>>2]|0; - $12 = ($11|0)!=(0); - $13 = $12 ? 22 : 21; - $$sink = $13;$$sink27 = 12;$18 = 21; - } - $14 = ((($cod_info)) + 4852|0); - HEAP32[$14>>2] = $$sink27; - $15 = ((($cod_info)) + 4856|0); - HEAP32[$15>>2] = $$sink; - $16 = ((($cod_info)) + 4864|0); - HEAP32[$16>>2] = $$sink; - $17 = ((($cod_info)) + 4860|0); - HEAP32[$17>>2] = $18; - $19 = ((($cod_info)) + 4868|0); - HEAP32[$19>>2] = 11; - $sfb$018 = 0; - while(1) { - $20 = (($sfb$018) + 1)|0; - $21 = (((($gfc)) + 21360|0) + ($20<<2)|0); - $22 = HEAP32[$21>>2]|0; - $23 = (((($gfc)) + 21360|0) + ($sfb$018<<2)|0); - $24 = HEAP32[$23>>2]|0; - $25 = (($22) - ($24))|0; - $26 = (((($cod_info)) + 4872|0) + ($sfb$018<<2)|0); - HEAP32[$26>>2] = $25; - $27 = (((($cod_info)) + 5028|0) + ($sfb$018<<2)|0); - HEAP32[$27>>2] = 3; - $exitcond26 = ($20|0)==(22); - if ($exitcond26) { - break; - } else { - $sfb$018 = $20; - } - } - $28 = ((($cod_info)) + 4788|0); - $29 = HEAP32[$28>>2]|0; - $30 = ($29|0)==(2); - if ($30) { - HEAP32[$14>>2] = 0; - HEAP32[$9>>2] = 0; - $31 = ((($cod_info)) + 4792|0); - $32 = HEAP32[$31>>2]|0; - $33 = ($32|0)==(0); - if ($33) { - $41 = 0;$44 = 0; - } else { - HEAP32[$14>>2] = 3; - $34 = ((($gfc)) + 76|0); - $35 = HEAP32[$34>>2]|0; - $36 = $35 << 1; - $37 = (($36) + 4)|0; - HEAP32[$9>>2] = $37; - $41 = 3;$44 = $37; - } - $38 = HEAP32[$6>>2]|0; - $39 = ($38|0)<(8001); - if ($39) { - $40 = (9 - ($41))|0; - $42 = ($40*3)|0; - $43 = (($42) + ($44))|0; - HEAP32[$16>>2] = $43; - $storemerge = $43; - } else { - $45 = ((($gfc)) + 85092|0); - $46 = HEAP32[$45>>2]|0; - $47 = ($46|0)!=(0); - $48 = $47 ? 13 : 12; - $49 = (($48) - ($41))|0; - $50 = ($49*3)|0; - $51 = (($50) + ($44))|0; - HEAP32[$16>>2] = $51; - $52 = (12 - ($41))|0; - $53 = ($52*3)|0; - $54 = (($53) + ($44))|0; - $storemerge = $54; - } - HEAP32[$17>>2] = $storemerge; - $55 = (($storemerge) + -18)|0; - HEAP32[$19>>2] = $55; - HEAP32[$15>>2] = $44; - $56 = (((($gfc)) + 21360|0) + ($44<<2)|0); - $57 = HEAP32[$56>>2]|0; - _memcpy(($ixwork|0),($cod_info|0),2304)|0; - $58 = (($cod_info) + ($57<<2)|0); - $$phi$trans$insert = (((($gfc)) + 21452|0) + ($41<<2)|0); - $$pre = HEAP32[$$phi$trans$insert>>2]|0; - $63 = $$pre;$ix$013 = $58;$sfb$114 = $41; - while(1) { - $59 = (($sfb$114) + 1)|0; - $60 = (((($gfc)) + 21452|0) + ($59<<2)|0); - $61 = HEAP32[$60>>2]|0; - $62 = ($61|0)>($63|0); - if ($62) { - $69 = (($61) - ($63))|0; - $ix$26$us = $ix$013;$l$07$us = $63; - while(1) { - $64 = ($l$07$us*3)|0; - $65 = (($ixwork) + ($64<<2)|0); - $66 = HEAP32[$65>>2]|0; - $67 = ((($ix$26$us)) + 4|0); - HEAP32[$ix$26$us>>2] = $66; - $68 = (($l$07$us) + 1)|0; - $exitcond20 = ($68|0)==($61|0); - if ($exitcond20) { - break; - } else { - $ix$26$us = $67;$l$07$us = $68; - } - } - $scevgep = (($ix$013) + ($69<<2)|0); - $ix$26$us$1 = $scevgep;$l$07$us$1 = $63; - while(1) { - $213 = ($l$07$us$1*3)|0; - $214 = (($213) + 1)|0; - $215 = (($ixwork) + ($214<<2)|0); - $216 = HEAP32[$215>>2]|0; - $217 = ((($ix$26$us$1)) + 4|0); - HEAP32[$ix$26$us$1>>2] = $216; - $218 = (($l$07$us$1) + 1)|0; - $exitcond20$1 = ($218|0)==($61|0); - if ($exitcond20$1) { - break; - } else { - $ix$26$us$1 = $217;$l$07$us$1 = $218; - } - } - $scevgep$sum = $69 << 1; - $scevgep$1 = (($ix$013) + ($scevgep$sum<<2)|0); - $ix$26$us$2 = $scevgep$1;$l$07$us$2 = $63; - while(1) { - $219 = ($l$07$us$2*3)|0; - $220 = (($219) + 2)|0; - $221 = (($ixwork) + ($220<<2)|0); - $222 = HEAP32[$221>>2]|0; - $223 = ((($ix$26$us$2)) + 4|0); - HEAP32[$ix$26$us$2>>2] = $222; - $224 = (($l$07$us$2) + 1)|0; - $exitcond20$2 = ($224|0)==($61|0); - if ($exitcond20$2) { - break; - } else { - $ix$26$us$2 = $223;$l$07$us$2 = $224; - } - } - $scevgep$1$sum = ($69*3)|0; - $scevgep$2 = (($ix$013) + ($scevgep$1$sum<<2)|0); - $ix$1$lcssa = $scevgep$2; - } else { - $ix$1$lcssa = $ix$013; - } - $exitcond25 = ($59|0)==(13); - if ($exitcond25) { - $j$04 = $44;$sfb$25 = $41; - break; - } else { - $63 = $61;$ix$013 = $ix$1$lcssa;$sfb$114 = $59; - } - } - while(1) { - $70 = (($sfb$25) + 1)|0; - $71 = (((($gfc)) + 21452|0) + ($70<<2)|0); - $72 = HEAP32[$71>>2]|0; - $73 = (((($gfc)) + 21452|0) + ($sfb$25<<2)|0); - $74 = HEAP32[$73>>2]|0; - $75 = (($72) - ($74))|0; - $76 = (($j$04) + 2)|0; - $77 = (((($cod_info)) + 4872|0) + ($76<<2)|0); - HEAP32[$77>>2] = $75; - $78 = (($j$04) + 1)|0; - $79 = (((($cod_info)) + 4872|0) + ($78<<2)|0); - HEAP32[$79>>2] = $75; - $80 = (((($cod_info)) + 4872|0) + ($j$04<<2)|0); - HEAP32[$80>>2] = $75; - $81 = (((($cod_info)) + 5028|0) + ($j$04<<2)|0); - HEAP32[$81>>2] = 0; - $82 = (((($cod_info)) + 5028|0) + ($78<<2)|0); - HEAP32[$82>>2] = 1; - $83 = (((($cod_info)) + 5028|0) + ($76<<2)|0); - HEAP32[$83>>2] = 2; - $84 = (($j$04) + 3)|0; - $exitcond = ($70|0)==(13); - if ($exitcond) { - break; - } else { - $j$04 = $84;$sfb$25 = $70; - } - } - } - $85 = ((($cod_info)) + 5184|0); - HEAP32[$85>>2] = 0; - $86 = ((($cod_info)) + 5188|0); - HEAP32[$86>>2] = 11824; - $87 = ((($cod_info)) + 5192|0); - $88 = ((($cod_info)) + 5208|0); - ;HEAP32[$87>>2]=0|0;HEAP32[$87+4>>2]=0|0;HEAP32[$87+8>>2]=0|0;HEAP32[$87+12>>2]=0|0; - HEAP32[$88>>2] = 575; - $89 = ((($cod_info)) + 4608|0); - _memset(($89|0),0,156)|0; - $90 = ((($gfc)) + 104|0); - $91 = HEAP32[$90>>2]|0; - if ((($91|0) == 0) | (($91|0) == 3) | (($91|0) == 4) | (($91|0) == 1)) { - STACKTOP = sp;return; - } - $92 = ((($gfc)) + 85796|0); - $93 = HEAP32[$92>>2]|0; - $94 = HEAP32[$28>>2]|0; - $95 = ($94|0)==(2); - if (!($95)) { - $96 = ((($93)) + 8|0); - $97 = ((($93)) + 20|0); - $98 = ((($gfc)) + 84852|0); - $gsfb$022$i = 5; - L40: while(1) { - $105 = (((($gfc)) + 21508|0) + ($gsfb$022$i<<2)|0); - $106 = HEAP32[$105>>2]|0; - $107 = (($gsfb$022$i) + 1)|0; - $108 = (((($gfc)) + 21508|0) + ($107<<2)|0); - $109 = HEAP32[$108>>2]|0; - $110 = +HEAPF32[$96>>2]; - $111 = (((($93)) + 164|0) + ($gsfb$022$i<<2)|0); - $112 = +HEAPF32[$111>>2]; - $113 = +HEAPF32[$97>>2]; - $114 = (+_athAdjust($110,$112,$113,0.0)); - $115 = +HEAPF32[$98>>2]; - $116 = $115 > 9.999999960041972E-13; - $117 = $115 * $114; - $ath21$0$i = $116 ? $117 : $114; - $118 = ($109|0)>($106|0); - if ($118) { - $j$015$in$i = $109; - while(1) { - $j$015$i = (($j$015$in$i) + -1)|0; - $119 = (($cod_info) + ($j$015$i<<2)|0); - $120 = +HEAPF32[$119>>2]; - $fabsf2$i = (+Math_abs((+$120))); - $121 = $fabsf2$i < $ath21$0$i; - if (!($121)) { - label = 32; - break L40; - } - HEAPF32[$119>>2] = 0.0; - $122 = ($j$015$i|0)>($106|0); - if ($122) { - $j$015$in$i = $j$015$i; - } else { - break; - } - } - } - $123 = (($gsfb$022$i) + -1)|0; - $124 = ($gsfb$022$i|0)>(0); - if ($124) { - $gsfb$022$i = $123; - } else { - label = 32; - break; - } - } - if ((label|0) == 32) { - STACKTOP = sp;return; - } - } - $99 = ((($gfc)) + 21500|0); - $100 = ((($gfc)) + 21504|0); - $101 = ((($gfc)) + 21536|0); - $102 = ((($93)) + 8|0); - $103 = ((($93)) + 20|0); - $104 = ((($gfc)) + 84904|0); - $gsfb1$011$i = 5; - L51: while(1) { - $125 = HEAP32[$99>>2]|0; - $126 = ($125*3)|0; - $127 = (((($gfc)) + 21536|0) + ($gsfb1$011$i<<2)|0); - $128 = HEAP32[$127>>2]|0; - $129 = HEAP32[$101>>2]|0; - $130 = (($128) - ($129))|0; - $131 = (($126) + ($130))|0; - $132 = (($gsfb1$011$i) + 1)|0; - $133 = (((($gfc)) + 21536|0) + ($132<<2)|0); - $134 = HEAP32[$133>>2]|0; - $135 = (($134) - ($128))|0; - $136 = +HEAPF32[$102>>2]; - $137 = (((($93)) + 188|0) + ($gsfb1$011$i<<2)|0); - $138 = +HEAPF32[$137>>2]; - $139 = +HEAPF32[$103>>2]; - $140 = (+_athAdjust($136,$138,$139,0.0)); - $141 = +HEAPF32[$104>>2]; - $142 = $141 > 9.999999960041972E-13; - $143 = $141 * $140; - $ath12$0$i = $142 ? $143 : $140; - $144 = ($135|0)>(0); - if ($144) { - $145 = (($135) + ($131))|0; - $j5$08$in$i = $145; - while(1) { - $j5$08$i = (($j5$08$in$i) + -1)|0; - $146 = (($cod_info) + ($j5$08$i<<2)|0); - $147 = +HEAPF32[$146>>2]; - $fabsf$i = (+Math_abs((+$147))); - $148 = $fabsf$i < $ath12$0$i; - if (!($148)) { - $gsfb1$011$i$1 = 5; - break L51; - } - HEAPF32[$146>>2] = 0.0; - $149 = ($j5$08$i|0)>($131|0); - if ($149) { - $j5$08$in$i = $j5$08$i; - } else { - break; - } - } - } - $150 = (($gsfb1$011$i) + -1)|0; - $151 = ($gsfb1$011$i|0)>(0); - if ($151) { - $gsfb1$011$i = $150; - } else { - $gsfb1$011$i$1 = 5; - break; - } - } - L59: while(1) { - $152 = HEAP32[$99>>2]|0; - $153 = ($152*3)|0; - $154 = HEAP32[$100>>2]|0; - $155 = (($154) - ($152))|0; - $156 = (($155) + ($153))|0; - $157 = (((($gfc)) + 21536|0) + ($gsfb1$011$i$1<<2)|0); - $158 = HEAP32[$157>>2]|0; - $159 = HEAP32[$101>>2]|0; - $160 = (($158) - ($159))|0; - $161 = (($156) + ($160))|0; - $162 = (($gsfb1$011$i$1) + 1)|0; - $163 = (((($gfc)) + 21536|0) + ($162<<2)|0); - $164 = HEAP32[$163>>2]|0; - $165 = (($164) - ($158))|0; - $166 = +HEAPF32[$102>>2]; - $167 = (((($93)) + 188|0) + ($gsfb1$011$i$1<<2)|0); - $168 = +HEAPF32[$167>>2]; - $169 = +HEAPF32[$103>>2]; - $170 = (+_athAdjust($166,$168,$169,0.0)); - $171 = +HEAPF32[$104>>2]; - $172 = $171 > 9.999999960041972E-13; - $173 = $171 * $170; - $ath12$0$i$1 = $172 ? $173 : $170; - $174 = ($165|0)>(0); - if ($174) { - $175 = (($165) + ($161))|0; - $j5$08$in$i$1 = $175; - while(1) { - $j5$08$i$1 = (($j5$08$in$i$1) + -1)|0; - $176 = (($cod_info) + ($j5$08$i$1<<2)|0); - $177 = +HEAPF32[$176>>2]; - $fabsf$i$1 = (+Math_abs((+$177))); - $178 = $fabsf$i$1 < $ath12$0$i$1; - if (!($178)) { - $gsfb1$011$i$2 = 5; - break L59; - } - HEAPF32[$176>>2] = 0.0; - $179 = ($j5$08$i$1|0)>($161|0); - if ($179) { - $j5$08$in$i$1 = $j5$08$i$1; - } else { - break; - } - } - } - $180 = (($gsfb1$011$i$1) + -1)|0; - $181 = ($gsfb1$011$i$1|0)>(0); - if ($181) { - $gsfb1$011$i$1 = $180; - } else { - $gsfb1$011$i$2 = 5; - break; - } - } - L67: while(1) { - $182 = HEAP32[$99>>2]|0; - $183 = ($182*3)|0; - $184 = HEAP32[$100>>2]|0; - $185 = (($184) - ($182))|0; - $186 = $185 << 1; - $187 = (($186) + ($183))|0; - $188 = (((($gfc)) + 21536|0) + ($gsfb1$011$i$2<<2)|0); - $189 = HEAP32[$188>>2]|0; - $190 = HEAP32[$101>>2]|0; - $191 = (($189) - ($190))|0; - $192 = (($187) + ($191))|0; - $193 = (($gsfb1$011$i$2) + 1)|0; - $194 = (((($gfc)) + 21536|0) + ($193<<2)|0); - $195 = HEAP32[$194>>2]|0; - $196 = (($195) - ($189))|0; - $197 = +HEAPF32[$102>>2]; - $198 = (((($93)) + 188|0) + ($gsfb1$011$i$2<<2)|0); - $199 = +HEAPF32[$198>>2]; - $200 = +HEAPF32[$103>>2]; - $201 = (+_athAdjust($197,$199,$200,0.0)); - $202 = +HEAPF32[$104>>2]; - $203 = $202 > 9.999999960041972E-13; - $204 = $202 * $201; - $ath12$0$i$2 = $203 ? $204 : $201; - $205 = ($196|0)>(0); - if ($205) { - $206 = (($196) + ($192))|0; - $j5$08$in$i$2 = $206; - while(1) { - $j5$08$i$2 = (($j5$08$in$i$2) + -1)|0; - $207 = (($cod_info) + ($j5$08$i$2<<2)|0); - $208 = +HEAPF32[$207>>2]; - $fabsf$i$2 = (+Math_abs((+$208))); - $209 = $fabsf$i$2 < $ath12$0$i$2; - if (!($209)) { - label = 32; - break L67; - } - HEAPF32[$207>>2] = 0.0; - $210 = ($j5$08$i$2|0)>($192|0); - if ($210) { - $j5$08$in$i$2 = $j5$08$i$2; - } else { - break; - } - } - } - $211 = (($gsfb1$011$i$2) + -1)|0; - $212 = ($gsfb1$011$i$2|0)>(0); - if ($212) { - $gsfb1$011$i$2 = $211; - } else { - label = 32; - break; - } - } - if ((label|0) == 32) { - STACKTOP = sp;return; - } -} -function _outer_loop($gfc,$cod_info,$l3_xmin,$xrpow,$ch,$targ_bits) { - $gfc = $gfc|0; - $cod_info = $cod_info|0; - $l3_xmin = $l3_xmin|0; - $xrpow = $xrpow|0; - $ch = $ch|0; - $targ_bits = $targ_bits|0; - var $$ = 0, $$$$i = 0, $$$flag_GoneOver$3$i = 0, $$$i = 0, $$$i$i = 0.0, $$0 = 0, $$1$i$i = 0, $$6 = 0, $$flag_GoneOver$0$i = 0, $$flag_GoneOver$01$i = 0, $$lcssa$i = 0, $$lcssa120 = 0, $$lcssa26 = 0, $$lcssa27 = 0, $$not = 0, $$not84 = 0, $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i10 = 0.0; - var $$pre$i13$i = 0, $$pre$phi$i$iZ2D = 0, $$pre41$i$i = 0, $$pre61 = 0.0, $$pre62 = 0.0, $$pre63 = 0.0, $$pre64 = 0.0, $$pre65 = 0, $$s1$0$i$i = 0, $$s1$0$i$i$lcssa = 0, $$s2$0$i$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0.0, $104 = 0, $105 = 0; - var $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0.0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0; - var $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0.0, $137 = 0.0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0; - var $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0; - var $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0; - var $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0.0, $184 = 0.0, $185 = 0, $186 = 0.0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0; - var $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0; - var $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0; - var $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0; - var $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0.0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0.0, $264 = 0.0, $265 = 0, $266 = 0.0, $267 = 0, $268 = 0; - var $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0.0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0.0, $284 = 0.0, $285 = 0, $286 = 0.0; - var $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0; - var $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0; - var $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0; - var $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0.0, $35 = 0, $350 = 0, $351 = 0.0, $352 = 0.0, $353 = 0.0, $354 = 0.0, $355 = 0.0, $356 = 0, $357 = 0.0, $358 = 0.0; - var $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0.0, $367 = 0.0, $368 = 0, $369 = 0, $37 = 0, $370 = 0.0, $371 = 0.0, $372 = 0.0, $373 = 0.0, $374 = 0, $375 = 0.0, $376 = 0.0; - var $377 = 0, $378 = 0.0, $379 = 0.0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0.0, $387 = 0.0, $388 = 0.0, $389 = 0.0, $39 = 0, $390 = 0.0, $391 = 0.0, $392 = 0.0, $393 = 0.0, $394 = 0.0; - var $395 = 0.0, $396 = 0.0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0.0, $402 = 0.0, $403 = 0.0, $404 = 0, $405 = 0.0, $406 = 0, $407 = 0.0, $408 = 0.0, $409 = 0, $41 = 0, $410 = 0, $411 = 0.0; - var $412 = 0.0, $413 = 0, $414 = 0.0, $415 = 0.0, $416 = 0, $417 = 0, $418 = 0, $419 = 0.0, $42 = 0, $420 = 0, $421 = 0.0, $422 = 0.0, $423 = 0.0, $424 = 0, $425 = 0.0, $426 = 0, $427 = 0.0, $428 = 0, $429 = 0.0, $43 = 0; - var $430 = 0.0, $431 = 0, $432 = 0.0, $433 = 0.0, $434 = 0.0, $435 = 0.0, $436 = 0, $437 = 0, $438 = 0.0, $439 = 0.0, $44 = 0, $440 = 0, $441 = 0.0, $442 = 0.0, $443 = 0, $444 = 0.0, $445 = 0.0, $446 = 0.0, $447 = 0.0, $448 = 0.0; - var $449 = 0.0, $45 = 0, $450 = 0, $451 = 0, $452 = 0.0, $453 = 0, $454 = 0.0, $455 = 0.0, $456 = 0.0, $457 = 0.0, $458 = 0.0, $459 = 0.0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0.0, $464 = 0.0, $465 = 0, $466 = 0; - var $467 = 0.0, $468 = 0.0, $469 = 0.0, $47 = 0, $470 = 0.0, $471 = 0, $472 = 0.0, $473 = 0.0, $474 = 0, $475 = 0.0, $476 = 0.0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0.0, $481 = 0.0, $482 = 0, $483 = 0, $484 = 0.0; - var $485 = 0.0, $486 = 0.0, $487 = 0.0, $488 = 0, $489 = 0.0, $49 = 0, $490 = 0.0, $491 = 0, $492 = 0.0, $493 = 0.0, $494 = 0, $495 = 0, $496 = 0.0, $497 = 0.0, $498 = 0.0, $499 = 0.0, $5 = 0, $50 = 0, $500 = 0, $501 = 0.0; - var $502 = 0.0, $503 = 0, $504 = 0.0, $505 = 0.0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0.0, $513 = 0.0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0; - var $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0; - var $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0.0, $556 = 0.0; - var $557 = 0, $558 = 0, $559 = 0.0, $56 = 0, $560 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0; - var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0.0; - var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0, $CurrentStep$06$i = 0, $CurrentStep$1$i = 0, $CurrentStep$2$i = 0, $CurrentStep$3$i = 0, $Direction$08$i = 0, $Direction$1$i = 0, $age$1 = 0, $age$2 = 0; - var $bRefine$041 = 0, $best_ggain_pass1$042 = 0, $best_noise_info = 0, $best_part2_3_length$040 = 0, $best_part2_3_length$1 = 0, $best_part2_3_length$2 = 0, $best_part2_3_length$3 = 0, $best_part2_3_length$3$ph = 0, $better$0 = 0, $better$0$i = 0, $better$0$in = 0, $better$1$i = 0, $brmerge = 0, $cod_info_w = 0, $distort = 0, $exitcond$i = 0, $fabs$i$i = 0.0, $fabsf$i = 0.0, $fabsf1$i = 0.0, $fabsf10$i = 0.0; - var $fabsf11$i = 0.0, $fabsf2$i = 0.0, $fabsf3$i = 0.0, $fabsf4$i = 0.0, $fabsf5$i = 0.0, $fabsf6$i = 0.0, $fabsf7$i = 0.0, $fabsf8$i = 0.0, $fabsf9$i = 0.0, $factor$i = 0.0, $factor17$i = 0.0, $flag_GoneOver$07$i = 0, $flag_GoneOver$3$i = 0, $indvars$iv$i$i = 0, $indvars$iv$next$i$i = 0, $indvars$iv$next37$i$i = 0, $indvars$iv36$i$i = 0, $j$0$lcssa$i$i = 0, $j$019$i$i = 0, $j$03$i$i = 0; - var $j$05$i$i = 0, $j$1$i$i = 0, $klemm_noise$0$lcssa$i$i = 0.0, $klemm_noise$02$i$i = 0.0, $l$01$i$i = 0, $l$015$i$i = 0, $l$02$i$i = 0, $l$126$i$i = 0, $nBits$0$lcssa$i = 0, $nBits$02$i = 0, $noise_info = 0, $noise_shaping_amp$0$i$i = 0, $or$cond = 0, $or$cond$i = 0, $or$cond$i$i = 0, $or$cond$i13 = 0, $or$cond14$i = 0, $or$cond16 = 0, $or$cond3 = 0, $or$cond5$i = 0; - var $or$cond8 = 0, $or$cond9 = 0, $prev_noise = 0, $s$0$i$i = 0, $s$1$i$i = 0, $s1$0$lcssa$i$i = 0, $s1$07$i$i = 0, $s2$0$lcssa$i$i = 0, $s2$010$i$i = 0, $save_xrpow = 0, $sfb$01$i$i = 0, $sfb$01$i$i11 = 0, $sfb$01$i5$i = 0, $sfb$011$i$i = 0, $sfb$02$i$i = 0, $sfb$031$i$i = 0, $sfb$1$lcssa$i$i = 0, $sfb$13$i$i = 0, $sfb$18$i$i = 0, $sfb$211$i$i = 0; - var $sfb$3$lcssa$i$i = 0, $sfb$320$i$i = 0, $smax$i$i = 0, $sqrt$i$i = 0.0, $step$0$i = 0, $trigger$0$lcssa$i$i = 0.0, $trigger$012$i$i = 0.0, $trigger$1$i$i = 0.0, $trigger$2$i$i = 0.0, $window$029$i$i = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 8256|0; - $cod_info_w = sp + 2992|0; - $save_xrpow = sp + 688|0; - $distort = sp + 528|0; - $best_noise_info = sp + 504|0; - $prev_noise = sp + 24|0; - $noise_info = sp; - $0 = (((($gfc)) + 84928|0) + ($ch<<2)|0); - $1 = HEAP32[$0>>2]|0; - $2 = (((($gfc)) + 84920|0) + ($ch<<2)|0); - $3 = HEAP32[$2>>2]|0; - $4 = ((($cod_info)) + 4780|0); - HEAP32[$4>>2] = $3; - $5 = ((($cod_info)) + 4844|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($targ_bits) - ($6))|0; - $8 = (_count_bits($gfc,$xrpow,$cod_info,0)|0); - $9 = ($1|0)==(1); - $10 = ($8|0)==($7|0); - $or$cond5$i = $9 | $10; - if ($or$cond5$i) { - $$lcssa$i = $8; - } else { - $12 = $8;$CurrentStep$06$i = $1;$Direction$08$i = 0;$flag_GoneOver$07$i = 0; - while(1) { - $13 = ($12|0)>($7|0); - if ($13) { - $14 = ($Direction$08$i|0)==(2); - $$flag_GoneOver$0$i = $14 ? 1 : $flag_GoneOver$07$i; - $15 = ($$flag_GoneOver$0$i|0)==(0); - $16 = (($CurrentStep$06$i|0) / 2)&-1; - $CurrentStep$1$i = $15 ? $CurrentStep$06$i : $16; - $CurrentStep$3$i = $CurrentStep$1$i;$Direction$1$i = 1;$flag_GoneOver$3$i = $$flag_GoneOver$0$i;$step$0$i = $CurrentStep$1$i; - } else { - $17 = ($Direction$08$i|0)==(1); - $$flag_GoneOver$01$i = $17 ? 1 : $flag_GoneOver$07$i; - $18 = ($$flag_GoneOver$01$i|0)==(0); - $19 = (($CurrentStep$06$i|0) / 2)&-1; - $CurrentStep$2$i = $18 ? $CurrentStep$06$i : $19; - $20 = (0 - ($CurrentStep$2$i))|0; - $CurrentStep$3$i = $CurrentStep$2$i;$Direction$1$i = 2;$flag_GoneOver$3$i = $$flag_GoneOver$01$i;$step$0$i = $20; - } - $21 = HEAP32[$4>>2]|0; - $22 = (($21) + ($step$0$i))|0; - $23 = ($22|0)<(0); - $$$i = $23 ? 0 : $22; - $24 = ($$$i|0)>(255); - $$$$i = $24 ? 255 : $$$i; - HEAP32[$4>>2] = $$$$i; - $25 = $23 | $24; - $$$flag_GoneOver$3$i = $25 ? 1 : $flag_GoneOver$3$i; - $26 = (_count_bits($gfc,$xrpow,$cod_info,0)|0); - $27 = ($CurrentStep$3$i|0)==(1); - $28 = ($26|0)==($7|0); - $or$cond$i = $27 | $28; - if ($or$cond$i) { - $$lcssa$i = $26; - break; - } else { - $12 = $26;$CurrentStep$06$i = $CurrentStep$3$i;$Direction$08$i = $Direction$1$i;$flag_GoneOver$07$i = $$$flag_GoneOver$3$i; - } - } - } - $11 = ($$lcssa$i|0)>($7|0); - L9: do { - if ($11) { - $nBits$02$i = $$lcssa$i; - while(1) { - $29 = HEAP32[$4>>2]|0; - $30 = ($29|0)<(255); - if (!($30)) { - $nBits$0$lcssa$i = $nBits$02$i; - break L9; - } - $31 = (($29) + 1)|0; - HEAP32[$4>>2] = $31; - $32 = (_count_bits($gfc,$xrpow,$cod_info,0)|0); - $33 = ($32|0)>($7|0); - if ($33) { - $nBits$02$i = $32; - } else { - $nBits$0$lcssa$i = $32; - break; - } - } - } else { - $nBits$0$lcssa$i = $$lcssa$i; - } - } while(0); - $34 = HEAP32[$4>>2]|0; - $35 = (($3) - ($34))|0; - $36 = ($35|0)>(3); - $37 = $36 ? 4 : 2; - HEAP32[$0>>2] = $37; - $38 = HEAP32[$4>>2]|0; - HEAP32[$2>>2] = $38; - $39 = ((($cod_info)) + 4768|0); - HEAP32[$39>>2] = $nBits$0$lcssa$i; - $40 = ((($gfc)) + 28|0); - $41 = HEAP32[$40>>2]|0; - $42 = ($41|0)==(0); - if ($42) { - $$0 = 100; - STACKTOP = sp;return ($$0|0); - } - _memset(($prev_noise|0),0,476)|0; - (_calc_noise($cod_info,$l3_xmin,$distort,$best_noise_info,$prev_noise)|0); - $43 = HEAP32[$39>>2]|0; - $44 = ((($best_noise_info)) + 20|0); - HEAP32[$44>>2] = $43; - _memcpy(($cod_info_w|0),($cod_info|0),5252)|0; - _memcpy(($save_xrpow|0),($xrpow|0),2304)|0; - $45 = ((($gfc)) + 85096|0); - $46 = ((($gfc)) + 85092|0); - $47 = ((($cod_info_w)) + 4836|0); - $48 = ((($cod_info_w)) + 4860|0); - $49 = ((($gfc)) + 40|0); - $50 = ((($cod_info_w)) + 4764|0); - $51 = ((($cod_info_w)) + 4844|0); - $52 = ((($cod_info_w)) + 4768|0); - $53 = ((($cod_info_w)) + 4780|0); - $54 = ((($best_noise_info)) + 12|0); - $55 = ((($noise_info)) + 20|0); - $56 = ((($cod_info)) + 4788|0); - $57 = ((($gfc)) + 84|0); - $58 = ((($gfc)) + 88|0); - $59 = ((($noise_info)) + 16|0); - $60 = ((($best_noise_info)) + 16|0); - $61 = ((($noise_info)) + 8|0); - $62 = ((($best_noise_info)) + 8|0); - $63 = ((($gfc)) + 48|0); - $64 = ((($noise_info)) + 12|0); - $65 = ((($noise_info)) + 4|0); - $66 = ((($best_noise_info)) + 4|0); - $67 = ((($cod_info_w)) + 4864|0); - $68 = ((($gfc)) + 84936|0); - $69 = ((($cod_info_w)) + 4832|0); - $70 = ((($cod_info_w)) + 4788|0); - $71 = ((($gfc)) + 32|0); - $72 = ((($cod_info_w)) + 4848|0); - $73 = ((($cod_info_w)) + 4868|0); - $bRefine$041 = 0;$best_ggain_pass1$042 = 0;$best_part2_3_length$040 = 9999999; - while(1) { - $74 = ($bRefine$041|0)==(1); - $$1$i$i = $74 ? 2 : 1; - $75 = ($bRefine$041|0)!=(0); - $age$1 = 0;$best_part2_3_length$1 = $best_part2_3_length$040; - L19: while(1) { - $76 = HEAP32[$45>>2]|0; - $77 = $76 & 2; - $78 = ($77|0)==(0); - $$ = $78 ? 3 : 20; - $79 = HEAP32[$46>>2]|0; - $80 = ($79|0)==(0); - $$pre = HEAP32[$48>>2]|0; - if (!($80)) { - $81 = (($distort) + ($$pre<<2)|0); - $82 = +HEAPF32[$81>>2]; - $83 = $82 > 1.0; - if ($83) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - $84 = HEAP32[$70>>2]|0; - $85 = ($84|0)==(2); - if ($85) { - $86 = (($$pre) + 1)|0; - $87 = (($distort) + ($86<<2)|0); - $88 = +HEAPF32[$87>>2]; - $89 = $88 > 1.0; - if ($89) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - $90 = (($$pre) + 2)|0; - $91 = (($distort) + ($90<<2)|0); - $92 = +HEAPF32[$91>>2]; - $93 = $92 > 1.0; - if ($93) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - } - } - $94 = HEAP32[$47>>2]|0; - $95 = ($94|0)==(0); - $$$i$i = $95 ? 1.2968395948410034 : 1.6817928552627563; - $96 = ($$pre|0)>(0); - if ($96) { - $sfb$011$i$i = 0;$trigger$012$i$i = 0.0; - while(1) { - $97 = (($distort) + ($sfb$011$i$i<<2)|0); - $98 = +HEAPF32[$97>>2]; - $99 = $trigger$012$i$i < $98; - $trigger$1$i$i = $99 ? $98 : $trigger$012$i$i; - $100 = (($sfb$011$i$i) + 1)|0; - $exitcond$i = ($100|0)==($$pre|0); - if ($exitcond$i) { - $trigger$0$lcssa$i$i = $trigger$1$i$i; - break; - } else { - $sfb$011$i$i = $100;$trigger$012$i$i = $trigger$1$i$i; - } - } - } else { - $trigger$0$lcssa$i$i = 0.0; - } - $101 = HEAP32[$49>>2]|0; - $102 = ($101|0)==(3); - $noise_shaping_amp$0$i$i = $102 ? $$1$i$i : $101; - do { - if ((($noise_shaping_amp$0$i$i|0) == 1)) { - $103 = $trigger$0$lcssa$i$i; - $104 = $trigger$0$lcssa$i$i > 1.0; - if ($104) { - $sqrt$i$i = (+Math_sqrt((+$103))); - $fabs$i$i = (+Math_abs((+$sqrt$i$i))); - $105 = $trigger$0$lcssa$i$i == -inf; - $106 = $fabs$i$i; - $107 = $105 ? inf : $106; - $trigger$2$i$i = $107; - break; - } else { - $108 = $103 * 0.94999999999999996; - $109 = $108; - $trigger$2$i$i = $109; - break; - } - } else if ((($noise_shaping_amp$0$i$i|0) == 2)) { - $trigger$2$i$i = $trigger$0$lcssa$i$i; - } else { - $110 = $trigger$0$lcssa$i$i > 1.0; - if ($110) { - $trigger$2$i$i = 1.0; - } else { - $111 = $trigger$0$lcssa$i$i; - $112 = $111 * 0.94999999999999996; - $113 = $112; - $trigger$2$i$i = $113; - } - } - } while(0); - if ($96) { - $551 = $101;$552 = $$pre;$j$05$i$i = 0;$sfb$13$i$i = 0; - } else { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - while(1) { - $114 = (((($cod_info_w)) + 4872|0) + ($sfb$13$i$i<<2)|0); - $115 = HEAP32[$114>>2]|0; - $116 = (($115) + ($j$05$i$i))|0; - $117 = (($distort) + ($sfb$13$i$i<<2)|0); - $118 = +HEAPF32[$117>>2]; - $119 = $118 < $trigger$2$i$i; - if ($119) { - $146 = $552;$553 = $551; - } else { - $120 = HEAP32[$45>>2]|0; - $121 = $120 & 2; - $122 = ($121|0)==(0); - if (!($122)) { - $123 = (((($gfc)) + 84936|0) + ($sfb$13$i$i<<2)|0); - $124 = HEAP32[$123>>2]|0; - $125 = ($124|0)==(0); - $126 = $125&1; - HEAP32[$123>>2] = $126; - if (!($125)) { - $127 = HEAP32[$49>>2]|0; - $128 = ($127|0)==(2); - if ($128) { - $554 = 2; - break; - } - } - } - $129 = (((($cod_info_w)) + 4608|0) + ($sfb$13$i$i<<2)|0); - $130 = HEAP32[$129>>2]|0; - $131 = (($130) + 1)|0; - HEAP32[$129>>2] = $131; - $132 = ($115|0)>(0); - if ($132) { - $133 = (0 - ($115))|0; - $$pre61 = +HEAPF32[$50>>2]; - $139 = $$pre61;$l$02$i$i = $133; - while(1) { - $134 = (($l$02$i$i) + ($116))|0; - $135 = (($xrpow) + ($134<<2)|0); - $136 = +HEAPF32[$135>>2]; - $137 = $136 * $$$i$i; - HEAPF32[$135>>2] = $137; - $138 = $137 > $139; - if ($138) { - HEAPF32[$50>>2] = $137; - $555 = $137; - } else { - $555 = $139; - } - $140 = (($l$02$i$i) + 1)|0; - $141 = ($l$02$i$i|0)<(-1); - if ($141) { - $139 = $555;$l$02$i$i = $140; - } else { - break; - } - } - } - $142 = HEAP32[$49>>2]|0; - $143 = ($142|0)==(2); - if ($143) { - $554 = 2; - break; - } - $$pre$i$i = HEAP32[$48>>2]|0; - $146 = $$pre$i$i;$553 = $142; - } - $144 = (($sfb$13$i$i) + 1)|0; - $145 = ($144|0)<($146|0); - if ($145) { - $551 = $553;$552 = $146;$j$05$i$i = $116;$sfb$13$i$i = $144; - } else { - $554 = $553; - break; - } - } - $$pre$i = HEAP32[$48>>2]|0; - $147 = ($$pre$i|0)>(0); - if ($147) { - $sfb$01$i$i = 0; - } else { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - while(1) { - $150 = (((($cod_info_w)) + 4608|0) + ($sfb$01$i$i<<2)|0); - $151 = HEAP32[$150>>2]|0; - $152 = (((($cod_info_w)) + 5028|0) + ($sfb$01$i$i<<2)|0); - $153 = HEAP32[$152>>2]|0; - $154 = (((($cod_info_w)) + 4808|0) + ($153<<2)|0); - $155 = HEAP32[$154>>2]|0; - $156 = (0 - ($155))|0; - $157 = ($151|0)==($156|0); - $148 = (($sfb$01$i$i) + 1)|0; - if ($157) { - break; - } - $149 = ($148|0)<($$pre$i|0); - if ($149) { - $sfb$01$i$i = $148; - } else { - $541 = $554;$best_part2_3_length$3 = $best_part2_3_length$1; - break L19; - } - } - $158 = (_scale_bitcount($gfc,$cod_info_w)|0); - $159 = ($158|0)==(0); - if (!($159)) { - $160 = HEAP32[$40>>2]|0; - $161 = ($160|0)>(1); - if (!($161)) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - _memset(($68|0),0,156)|0; - $162 = HEAP32[$47>>2]|0; - $163 = ($162|0)==(0); - L65: do { - if ($163) { - $164 = HEAP32[$48>>2]|0; - $165 = ($164|0)>(0); - if ($165) { - $j$03$i$i = 0;$sfb$02$i$i = 0; - while(1) { - $166 = (((($cod_info_w)) + 4872|0) + ($sfb$02$i$i<<2)|0); - $167 = HEAP32[$166>>2]|0; - $168 = (((($cod_info_w)) + 4608|0) + ($sfb$02$i$i<<2)|0); - $169 = HEAP32[$168>>2]|0; - $170 = HEAP32[$69>>2]|0; - $171 = ($170|0)==(0); - if ($171) { - $s$0$i$i = $169; - } else { - $172 = (12112 + ($sfb$02$i$i<<2)|0); - $173 = HEAP32[$172>>2]|0; - $174 = (($173) + ($169))|0; - $s$0$i$i = $174; - } - $175 = (($167) + ($j$03$i$i))|0; - $176 = $s$0$i$i & 1; - $177 = ($176|0)==(0); - do { - if ($177) { - $s$1$i$i = $s$0$i$i; - } else { - $178 = (($s$0$i$i) + 1)|0; - $179 = ($167|0)>(0); - if (!($179)) { - $s$1$i$i = $178; - break; - } - $180 = (0 - ($167))|0; - $$pre64 = +HEAPF32[$50>>2]; - $186 = $$pre64;$l$01$i$i = $180; - while(1) { - $181 = (($l$01$i$i) + ($175))|0; - $182 = (($xrpow) + ($181<<2)|0); - $183 = +HEAPF32[$182>>2]; - $184 = $183 * 1.2968395948410034; - HEAPF32[$182>>2] = $184; - $185 = $184 > $186; - if ($185) { - HEAPF32[$50>>2] = $184; - $556 = $184; - } else { - $556 = $186; - } - $187 = (($l$01$i$i) + 1)|0; - $188 = ($l$01$i$i|0)<(-1); - if ($188) { - $186 = $556;$l$01$i$i = $187; - } else { - $s$1$i$i = $178; - break; - } - } - } - } while(0); - $189 = $s$1$i$i >> 1; - HEAP32[$168>>2] = $189; - $190 = (($sfb$02$i$i) + 1)|0; - $191 = HEAP32[$48>>2]|0; - $192 = ($190|0)<($191|0); - if ($192) { - $j$03$i$i = $175;$sfb$02$i$i = $190; - } else { - break; - } - } - } - HEAP32[$69>>2] = 0; - HEAP32[$47>>2] = 1; - } else { - $193 = HEAP32[$70>>2]|0; - $194 = ($193|0)==(2); - if (!($194)) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break L19; - } - $195 = HEAP32[$71>>2]|0; - $196 = ($195|0)>(0); - if (!($196)) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break L19; - } - $197 = HEAP32[$72>>2]|0; - $198 = ($197|0)>(0); - if ($198) { - $sfb$031$i$i = 0; - while(1) { - $201 = (((($cod_info_w)) + 4608|0) + ($sfb$031$i$i<<2)|0); - $202 = HEAP32[$201>>2]|0; - $203 = ($202|0)>(15); - $199 = (($sfb$031$i$i) + 1)|0; - if ($203) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break L19; - } - $200 = ($199|0)<($197|0); - if ($200) { - $sfb$031$i$i = $199; - } else { - $205 = $197;$indvars$iv$i$i = 3;$indvars$iv36$i$i = -1;$window$029$i$i = 0; - break; - } - } - } else { - $205 = $197;$indvars$iv$i$i = 3;$indvars$iv36$i$i = -1;$window$029$i$i = 0; - } - while(1) { - $204 = (($window$029$i$i) + ($205))|0; - $206 = HEAP32[$73>>2]|0; - $207 = ($204|0)<($206|0); - if ($207) { - $208 = (($indvars$iv$i$i) + ($205))|0; - $209 = ($206|0)>($208|0); - $210 = (($indvars$iv36$i$i) - ($205))|0; - $s1$07$i$i = 0;$sfb$18$i$i = $204; - while(1) { - $217 = (((($cod_info_w)) + 4608|0) + ($sfb$18$i$i<<2)|0); - $218 = HEAP32[$217>>2]|0; - $219 = ($s1$07$i$i|0)<($218|0); - $$s1$0$i$i = $219 ? $218 : $s1$07$i$i; - $220 = (($sfb$18$i$i) + 3)|0; - $221 = ($220|0)<($206|0); - if ($221) { - $s1$07$i$i = $$s1$0$i$i;$sfb$18$i$i = $220; - } else { - $$s1$0$i$i$lcssa = $$s1$0$i$i; - break; - } - } - $smax$i$i = $209 ? $206 : $208; - $211 = (($smax$i$i) + ($210))|0; - $212 = (($211>>>0) % 3)&-1; - $213 = (($211) + ($208))|0; - $214 = (($213) - ($212))|0; - $s1$0$lcssa$i$i = $$s1$0$i$i$lcssa;$sfb$1$lcssa$i$i = $214; - } else { - $s1$0$lcssa$i$i = 0;$sfb$1$lcssa$i$i = $204; - } - $215 = HEAP32[$48>>2]|0; - $216 = ($sfb$1$lcssa$i$i|0)<($215|0); - if ($216) { - $s2$010$i$i = 0;$sfb$211$i$i = $sfb$1$lcssa$i$i; - while(1) { - $222 = (((($cod_info_w)) + 4608|0) + ($sfb$211$i$i<<2)|0); - $223 = HEAP32[$222>>2]|0; - $224 = ($s2$010$i$i|0)<($223|0); - $$s2$0$i$i = $224 ? $223 : $s2$010$i$i; - $225 = (($sfb$211$i$i) + 3)|0; - $226 = ($225|0)<($215|0); - if ($226) { - $s2$010$i$i = $$s2$0$i$i;$sfb$211$i$i = $225; - } else { - $s2$0$lcssa$i$i = $$s2$0$i$i; - break; - } - } - } else { - $s2$0$lcssa$i$i = 0; - } - $227 = ($s1$0$lcssa$i$i|0)<(16); - $228 = ($s2$0$lcssa$i$i|0)<(8); - $or$cond$i$i = $227 & $228; - do { - if ($or$cond$i$i) { - $$pre41$i$i = (($window$029$i$i) + 1)|0; - $$pre$phi$i$iZ2D = $$pre41$i$i;$557 = $215; - } else { - $229 = (((($cod_info_w)) + 4808|0) + ($window$029$i$i<<2)|0); - $230 = HEAP32[$229>>2]|0; - $231 = ($230|0)>(6); - if ($231) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break L19; - } - $232 = (($230) + 1)|0; - HEAP32[$229>>2] = $232; - $233 = HEAP32[$72>>2]|0; - $234 = (((($gfc)) + 21360|0) + ($233<<2)|0); - $235 = HEAP32[$234>>2]|0; - $236 = (($233) + ($window$029$i$i))|0; - $237 = HEAP32[$48>>2]|0; - $238 = ($236|0)<($237|0); - $239 = (($window$029$i$i) + 1)|0; - if ($238) { - $240 = (2 - ($window$029$i$i))|0; - $j$019$i$i = $235;$sfb$320$i$i = $236; - while(1) { - $241 = (((($cod_info_w)) + 4872|0) + ($sfb$320$i$i<<2)|0); - $242 = HEAP32[$241>>2]|0; - $243 = (((($cod_info_w)) + 4608|0) + ($sfb$320$i$i<<2)|0); - $244 = HEAP32[$243>>2]|0; - $245 = HEAP32[$47>>2]|0; - $246 = 4 >>> $245; - $247 = (($244) - ($246))|0; - $248 = ($247|0)>(-1); - if ($248) { - HEAP32[$243>>2] = $247; - $249 = ($242*3)|0; - $250 = (($249) + ($j$019$i$i))|0; - $j$1$i$i = $250; - } else { - HEAP32[$243>>2] = 0; - $251 = HEAP32[$47>>2]|0; - $252 = (($251) + 1)|0; - $253 = $247 << $252; - $254 = (($253) + 210)|0; - $255 = (79704 + ($254<<2)|0); - $256 = +HEAPF32[$255>>2]; - $257 = Math_imul($242, $239)|0; - $258 = (($257) + ($j$019$i$i))|0; - $259 = ($242|0)>(0); - if ($259) { - $260 = (0 - ($242))|0; - $$pre62 = +HEAPF32[$50>>2]; - $266 = $$pre62;$l$015$i$i = $260; - while(1) { - $261 = (($l$015$i$i) + ($258))|0; - $262 = (($xrpow) + ($261<<2)|0); - $263 = +HEAPF32[$262>>2]; - $264 = $263 * $256; - HEAPF32[$262>>2] = $264; - $265 = $264 > $266; - if ($265) { - HEAPF32[$50>>2] = $264; - $559 = $264; - } else { - $559 = $266; - } - $267 = (($l$015$i$i) + 1)|0; - $268 = ($l$015$i$i|0)<(-1); - if ($268) { - $266 = $559;$l$015$i$i = $267; - } else { - break; - } - } - } - $269 = Math_imul($242, $240)|0; - $270 = (($258) + ($269))|0; - $j$1$i$i = $270; - } - $271 = (($sfb$320$i$i) + 3)|0; - $272 = HEAP32[$48>>2]|0; - $273 = ($271|0)<($272|0); - if ($273) { - $j$019$i$i = $j$1$i$i;$sfb$320$i$i = $271; - } else { - $558 = $272;$j$0$lcssa$i$i = $j$1$i$i;$sfb$3$lcssa$i$i = $271; - break; - } - } - } else { - $558 = $237;$j$0$lcssa$i$i = $235;$sfb$3$lcssa$i$i = $236; - } - $274 = +HEAPF32[(80512)>>2]; - $275 = (((($cod_info_w)) + 4872|0) + ($sfb$3$lcssa$i$i<<2)|0); - $276 = HEAP32[$275>>2]|0; - $277 = Math_imul($276, $239)|0; - $278 = (($277) + ($j$0$lcssa$i$i))|0; - $279 = ($276|0)>(0); - if (!($279)) { - $$pre$phi$i$iZ2D = $239;$557 = $558; - break; - } - $280 = (0 - ($276))|0; - $$pre63 = +HEAPF32[$50>>2]; - $286 = $$pre63;$l$126$i$i = $280; - while(1) { - $281 = (($278) + ($l$126$i$i))|0; - $282 = (($xrpow) + ($281<<2)|0); - $283 = +HEAPF32[$282>>2]; - $284 = $283 * $274; - HEAPF32[$282>>2] = $284; - $285 = $284 > $286; - if ($285) { - HEAPF32[$50>>2] = $284; - $560 = $284; - } else { - $560 = $286; - } - $287 = (($l$126$i$i) + 1)|0; - $288 = ($l$126$i$i|0)<(-1); - if ($288) { - $286 = $560;$l$126$i$i = $287; - } else { - $$pre$phi$i$iZ2D = $239;$557 = $558; - break; - } - } - } - } while(0); - $289 = ($$pre$phi$i$iZ2D|0)<(3); - if (!($289)) { - $$lcssa120 = $557; - break; - } - $indvars$iv$next37$i$i = (($indvars$iv36$i$i) + -1)|0; - $indvars$iv$next$i$i = (($indvars$iv$i$i) + 1)|0; - $$pre$i13$i = HEAP32[$72>>2]|0; - $205 = $$pre$i13$i;$indvars$iv$i$i = $indvars$iv$next$i$i;$indvars$iv36$i$i = $indvars$iv$next37$i$i;$window$029$i$i = $$pre$phi$i$iZ2D; - } - $290 = ($$lcssa120|0)>(0); - if ($290) { - $sfb$01$i5$i = 0; - } else { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break L19; - } - while(1) { - $293 = (((($cod_info_w)) + 4608|0) + ($sfb$01$i5$i<<2)|0); - $294 = HEAP32[$293>>2]|0; - $295 = (((($cod_info_w)) + 5028|0) + ($sfb$01$i5$i<<2)|0); - $296 = HEAP32[$295>>2]|0; - $297 = (((($cod_info_w)) + 4808|0) + ($296<<2)|0); - $298 = HEAP32[$297>>2]|0; - $299 = (0 - ($298))|0; - $300 = ($294|0)==($299|0); - $291 = (($sfb$01$i5$i) + 1)|0; - if ($300) { - break L65; - } - $292 = ($291|0)<($$lcssa120|0); - if ($292) { - $sfb$01$i5$i = $291; - } else { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break L19; - } - } - } - } while(0); - $301 = (_scale_bitcount($gfc,$cod_info_w)|0); - $302 = ($301|0)==(0); - if (!($302)) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - } - $303 = HEAP32[$47>>2]|0; - $304 = ($303|0)==(0); - $$6 = $304 ? 255 : 254; - $305 = HEAP32[$51>>2]|0; - $306 = (($targ_bits) - ($305))|0; - $307 = ($306|0)<(1); - if ($307) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - $308 = (_count_bits($gfc,$xrpow,$cod_info_w,$prev_noise)|0); - HEAP32[$52>>2] = $308; - $309 = ($308|0)>($306|0); - $310 = HEAP32[$53>>2]|0; - $311 = ($310|0)<=($$6|0); - $312 = $309 & $311; - if ($312) { - $314 = $310; - while(1) { - $313 = (($314) + 1)|0; - HEAP32[$53>>2] = $313; - $315 = (_count_bits($gfc,$xrpow,$cod_info_w,$prev_noise)|0); - HEAP32[$52>>2] = $315; - $316 = ($315|0)>($306|0); - $317 = HEAP32[$53>>2]|0; - $318 = ($317|0)<=($$6|0); - $319 = $316 & $318; - if ($319) { - $314 = $317; - } else { - $$lcssa26 = $317; - break; - } - } - } else { - $$lcssa26 = $310; - } - $320 = ($$lcssa26|0)>($$6|0); - if ($320) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - $321 = HEAP32[$54>>2]|0; - $322 = ($321|0)==(0); - if ($322) { - $323 = (_count_bits($gfc,$xrpow,$cod_info_w,$prev_noise)|0); - HEAP32[$52>>2] = $323; - $324 = ($323|0)>($best_part2_3_length$1|0); - $325 = HEAP32[$53>>2]|0; - $326 = ($325|0)<=($$6|0); - $327 = $324 & $326; - if ($327) { - $329 = $325; - while(1) { - $328 = (($329) + 1)|0; - HEAP32[$53>>2] = $328; - $330 = (_count_bits($gfc,$xrpow,$cod_info_w,$prev_noise)|0); - HEAP32[$52>>2] = $330; - $331 = ($330|0)>($best_part2_3_length$1|0); - $332 = HEAP32[$53>>2]|0; - $333 = ($332|0)<=($$6|0); - $334 = $331 & $333; - if ($334) { - $329 = $332; - } else { - $$lcssa27 = $332; - break; - } - } - } else { - $$lcssa27 = $325; - } - $335 = ($$lcssa27|0)>($$6|0); - if ($335) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break; - } - } - (_calc_noise($cod_info_w,$l3_xmin,$distort,$noise_info,$prev_noise)|0); - $336 = HEAP32[$52>>2]|0; - HEAP32[$55>>2] = $336; - $337 = HEAP32[$56>>2]|0; - $338 = ($337|0)==(2); - $better$0$in = $338 ? $58 : $57; - $better$0 = HEAP32[$better$0$in>>2]|0; - L150: do { - switch ($better$0|0) { - case 2: { - $407 = +HEAPF32[$65>>2]; - $408 = +HEAPF32[$66>>2]; - $409 = $407 < $408; - $410 = $409&1; - $better$0$i = $410; - break; - } - case 3: { - $411 = +HEAPF32[$65>>2]; - $412 = +HEAPF32[$66>>2]; - $413 = $411 < $412; - if ($413) { - $414 = +HEAPF32[$61>>2]; - $415 = +HEAPF32[$62>>2]; - $416 = $414 < $415; - $418 = $416; - } else { - $418 = 0; - } - $417 = $418&1; - $better$0$i = $417; - break; - } - case 8: { - $383 = HEAP32[$67>>2]|0; - $384 = ($383|0)>(0); - if ($384) { - $klemm_noise$02$i$i = 1.0000000000000001E-37;$sfb$01$i$i11 = 0; - while(1) { - $385 = (($distort) + ($sfb$01$i$i11<<2)|0); - $386 = +HEAPF32[$385>>2]; - $387 = $386; - $388 = $387 * $387; - $389 = $388 * 0.63200000000000001; - $390 = $389 * $387; - $391 = $390 + 0.36799999999999999; - $392 = $391; - $393 = (+_fast_log2($392)); - $394 = $393; - $395 = $394 * 0.30102999566398114; - $396 = $395 + $klemm_noise$02$i$i; - $397 = (($sfb$01$i$i11) + 1)|0; - $398 = HEAP32[$67>>2]|0; - $399 = ($397|0)<($398|0); - if ($399) { - $klemm_noise$02$i$i = $396;$sfb$01$i$i11 = $397; - } else { - $klemm_noise$0$lcssa$i$i = $396; - break; - } - } - } else { - $klemm_noise$0$lcssa$i$i = 1.0000000000000001E-37; - } - $400 = $klemm_noise$0$lcssa$i$i < 9.9999999999999995E-21; - $401 = $klemm_noise$0$lcssa$i$i; - $402 = $400 ? 9.9999996826552254E-21 : $401; - HEAPF32[$61>>2] = $402; - $405 = $402; - label = 118; - break; - } - case 1: { - $$pre$i10 = +HEAPF32[$61>>2]; - $405 = $$pre$i10; - label = 118; - break; - } - case 0: { - $362 = HEAP32[$64>>2]|0; - $363 = HEAP32[$54>>2]|0; - $364 = ($362|0)<($363|0); - do { - if ($364) { - $382 = 1; - } else { - $365 = ($362|0)==($363|0); - if ($365) { - $366 = +HEAPF32[$noise_info>>2]; - $367 = +HEAPF32[$best_noise_info>>2]; - $368 = $366 < $367; - if ($368) { - $382 = 1; - } else { - $fabsf9$i = (+Math_abs((+$366))); - $fabsf10$i = (+Math_abs((+$367))); - $369 = $fabsf9$i > $fabsf10$i; - $370 = $366 - $367; - $fabsf11$i = (+Math_abs((+$370))); - $371 = $fabsf11$i; - if ($369) { - $372 = $fabsf9$i; - $373 = $372 * 9.9999999747524271E-7; - $374 = !($371 <= $373); - if ($374) { - $382 = 0; - break; - } - } else { - $375 = $fabsf10$i; - $376 = $375 * 9.9999999747524271E-7; - $377 = !($371 <= $376); - if ($377) { - $382 = 0; - break; - } - } - $378 = +HEAPF32[$65>>2]; - $379 = +HEAPF32[$66>>2]; - $380 = $378 < $379; - $382 = $380; - } - } else { - $382 = 0; - } - } - } while(0); - $381 = $382&1; - $better$0$i = $381; - break; - } - case 5: { - $463 = +HEAPF32[$noise_info>>2]; - $464 = +HEAPF32[$best_noise_info>>2]; - $465 = $463 < $464; - do { - if ($465) { - $479 = 1; - } else { - $fabsf6$i = (+Math_abs((+$463))); - $fabsf7$i = (+Math_abs((+$464))); - $466 = $fabsf6$i > $fabsf7$i; - $467 = $463 - $464; - $fabsf8$i = (+Math_abs((+$467))); - $468 = $fabsf8$i; - if ($466) { - $469 = $fabsf6$i; - $470 = $469 * 9.9999999747524271E-7; - $471 = !($468 <= $470); - if ($471) { - $479 = 0; - break; - } - } else { - $472 = $fabsf7$i; - $473 = $472 * 9.9999999747524271E-7; - $474 = !($468 <= $473); - if ($474) { - $479 = 0; - break; - } - } - $475 = +HEAPF32[$65>>2]; - $476 = +HEAPF32[$66>>2]; - $477 = $475 < $476; - $479 = $477; - } - } while(0); - $478 = $479&1; - $better$0$i = $478; - break; - } - case 4: { - $419 = +HEAPF32[$61>>2]; - $420 = !($419 <= 0.0); - do { - if ($420) { - $421 = $419; - $442 = $421; - label = 130; - } else { - $422 = +HEAPF32[$62>>2]; - $423 = $422; - $424 = $423 > 0.20000000000000001; - if ($424) { - $462 = 1; - } else { - $425 = $419; - $426 = $422 < 0.0; - $427 = $425 + -0.20000000000000001; - $428 = $423 > $427; - $or$cond16 = $426 & $428; - if ($or$cond16) { - $429 = +HEAPF32[$65>>2]; - $430 = +HEAPF32[$66>>2]; - $431 = $429 < $430; - if ($431) { - $462 = 1; - break; - } - } - $$not = !($422 > 0.0); - $$not84 = $428 ^ 1; - $brmerge = $$not | $$not84; - if ($brmerge) { - $442 = $425; - label = 130; - } else { - $432 = +HEAPF32[$65>>2]; - $433 = +HEAPF32[$66>>2]; - $434 = +HEAPF32[$best_noise_info>>2]; - $435 = $434 + $433; - $436 = $432 < $435; - if ($436) { - $462 = 1; - } else { - $442 = $425; - label = 130; - } - } - } - } - } while(0); - do { - if ((label|0) == 130) { - label = 0; - $437 = $419 > 0.0; - if ($437) { - $438 = +HEAPF32[$62>>2]; - $439 = $438; - $440 = $439 > -0.050000000000000003; - $441 = $442 + -0.10000000000000001; - $443 = $439 > $441; - $or$cond$i13 = $440 & $443; - if ($or$cond$i13) { - $444 = +HEAPF32[$65>>2]; - $445 = +HEAPF32[$noise_info>>2]; - $446 = $445 + $444; - $447 = +HEAPF32[$66>>2]; - $448 = +HEAPF32[$best_noise_info>>2]; - $449 = $448 + $447; - $450 = $446 < $449; - if ($450) { - $462 = 1; - break; - } - } - $451 = $439 > -0.10000000000000001; - $452 = $442 + -0.14999999999999999; - $453 = $439 > $452; - $or$cond14$i = $451 & $453; - if ($or$cond14$i) { - $454 = +HEAPF32[$65>>2]; - $455 = +HEAPF32[$noise_info>>2]; - $factor$i = $455 * 2.0; - $456 = $factor$i + $454; - $457 = +HEAPF32[$66>>2]; - $458 = +HEAPF32[$best_noise_info>>2]; - $factor17$i = $458 * 2.0; - $459 = $factor17$i + $457; - $460 = $456 < $459; - $462 = $460; - } else { - $462 = 0; - } - } else { - $462 = 0; - } - } - } while(0); - $461 = $462&1; - $better$0$i = $461; - break; - } - case 7: { - $509 = HEAP32[$64>>2]|0; - $510 = HEAP32[$54>>2]|0; - $511 = ($509|0)<($510|0); - if ($511) { - $516 = 1; - } else { - $512 = +HEAPF32[$noise_info>>2]; - $513 = +HEAPF32[$best_noise_info>>2]; - $514 = $512 < $513; - $516 = $514; - } - $515 = $516&1; - $better$0$i = $515; - break; - } - case 6: { - $480 = +HEAPF32[$noise_info>>2]; - $481 = +HEAPF32[$best_noise_info>>2]; - $482 = $480 < $481; - do { - if ($482) { - $508 = 1; - } else { - $fabsf$i = (+Math_abs((+$480))); - $fabsf1$i = (+Math_abs((+$481))); - $483 = $fabsf$i > $fabsf1$i; - $484 = $480 - $481; - $fabsf2$i = (+Math_abs((+$484))); - $485 = $fabsf2$i; - if ($483) { - $486 = $fabsf$i; - $487 = $486 * 9.9999999747524271E-7; - $488 = !($485 <= $487); - if ($488) { - $508 = 0; - break; - } - } else { - $489 = $fabsf1$i; - $490 = $489 * 9.9999999747524271E-7; - $491 = !($485 <= $490); - if ($491) { - $508 = 0; - break; - } - } - $492 = +HEAPF32[$61>>2]; - $493 = +HEAPF32[$62>>2]; - $494 = $492 < $493; - if ($494) { - $508 = 1; - } else { - $fabsf3$i = (+Math_abs((+$492))); - $fabsf4$i = (+Math_abs((+$493))); - $495 = $fabsf3$i > $fabsf4$i; - $496 = $492 - $493; - $fabsf5$i = (+Math_abs((+$496))); - $497 = $fabsf5$i; - if ($495) { - $498 = $fabsf3$i; - $499 = $498 * 9.9999999747524271E-7; - $500 = !($497 <= $499); - if ($500) { - $508 = 0; - break; - } - } else { - $501 = $fabsf4$i; - $502 = $501 * 9.9999999747524271E-7; - $503 = !($497 <= $502); - if ($503) { - $508 = 0; - break; - } - } - $504 = +HEAPF32[$65>>2]; - $505 = +HEAPF32[$66>>2]; - $506 = $504 <= $505; - $508 = $506; - } - } - } while(0); - $507 = $508&1; - $better$0$i = $507; - break; - } - default: { - $339 = HEAP32[$54>>2]|0; - $340 = ($339|0)>(0); - if ($340) { - $341 = HEAP32[$59>>2]|0; - $342 = HEAP32[$60>>2]|0; - $343 = ($341|0)<=($342|0); - $344 = $343&1; - $345 = ($341|0)==($342|0); - if (!($345)) { - $better$0$i = $344; - break L150; - } - $346 = HEAP32[$44>>2]|0; - $347 = ($336|0)<($346|0); - $348 = $347&1; - $better$0$i = $348; - break L150; - } - $349 = +HEAPF32[$61>>2]; - $350 = $349 < 0.0; - if ($350) { - $351 = $349 * 10.0; - $352 = (+($336|0)); - $353 = $351 + $352; - $354 = +HEAPF32[$62>>2]; - $355 = $354 * 10.0; - $356 = HEAP32[$44>>2]|0; - $357 = (+($356|0)); - $358 = $357 + $355; - $359 = $353 <= $358; - $361 = $359; - } else { - $361 = 0; - } - $360 = $361&1; - $better$0$i = $360; - } - } - } while(0); - if ((label|0) == 118) { - label = 0; - $403 = +HEAPF32[$62>>2]; - $404 = $405 < $403; - $406 = $404&1; - $better$0$i = $406; - } - $517 = HEAP32[$54>>2]|0; - $518 = ($517|0)==(0); - if ($518) { - $519 = ($better$0$i|0)==(0); - if ($519) { - $524 = 0; - } else { - $520 = HEAP32[$55>>2]|0; - $521 = HEAP32[$44>>2]|0; - $522 = ($520|0)<($521|0); - $524 = $522; - } - $523 = $524&1; - $better$1$i = $523; - } else { - $better$1$i = $better$0$i; - } - $525 = ($better$1$i|0)==(0); - do { - if ($525) { - $527 = HEAP32[$63>>2]|0; - $528 = ($527|0)==(0); - if ($528) { - $529 = (($age$1) + 1)|0; - $530 = ($age$1|0)>=($$|0); - $or$cond8 = $530 & $518; - if ($or$cond8) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break L19; - } - $531 = HEAP32[$49>>2]|0; - $532 = ($531|0)==(3); - $or$cond = $75 & $532; - $533 = ($age$1|0)>(29); - $or$cond3 = $533 & $or$cond; - if ($or$cond3) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break L19; - } - if (!($or$cond)) { - $age$2 = $529;$best_part2_3_length$2 = $best_part2_3_length$1; - break; - } - $534 = HEAP32[$53>>2]|0; - $535 = (($534) - ($best_ggain_pass1$042))|0; - $536 = ($535|0)>(15); - if ($536) { - $best_part2_3_length$3$ph = $best_part2_3_length$1; - label = 167; - break L19; - } else { - $age$2 = $529;$best_part2_3_length$2 = $best_part2_3_length$1; - } - } else { - $age$2 = $age$1;$best_part2_3_length$2 = $best_part2_3_length$1; - } - } else { - $526 = HEAP32[$39>>2]|0; - ;HEAP32[$best_noise_info>>2]=HEAP32[$noise_info>>2]|0;HEAP32[$best_noise_info+4>>2]=HEAP32[$noise_info+4>>2]|0;HEAP32[$best_noise_info+8>>2]=HEAP32[$noise_info+8>>2]|0;HEAP32[$best_noise_info+12>>2]=HEAP32[$noise_info+12>>2]|0;HEAP32[$best_noise_info+16>>2]=HEAP32[$noise_info+16>>2]|0;HEAP32[$best_noise_info+20>>2]=HEAP32[$noise_info+20>>2]|0; - _memcpy(($cod_info|0),($cod_info_w|0),5252)|0; - _memcpy(($save_xrpow|0),($xrpow|0),2304)|0; - $age$2 = 0;$best_part2_3_length$2 = $526; - } - } while(0); - $537 = HEAP32[$53>>2]|0; - $538 = HEAP32[$47>>2]|0; - $539 = (($538) + ($537))|0; - $540 = ($539|0)<(255); - if ($540) { - $age$1 = $age$2;$best_part2_3_length$1 = $best_part2_3_length$2; - } else { - $best_part2_3_length$3$ph = $best_part2_3_length$2; - label = 167; - break; - } - } - if ((label|0) == 167) { - label = 0; - $$pre65 = HEAP32[$49>>2]|0; - $541 = $$pre65;$best_part2_3_length$3 = $best_part2_3_length$3$ph; - } - $542 = ($541|0)==(3); - $543 = ($bRefine$041|0)==(0); - $or$cond9 = $543 & $542; - if (!($or$cond9)) { - break; - } - _memcpy(($cod_info_w|0),($cod_info|0),5252)|0; - _memcpy(($xrpow|0),($save_xrpow|0),2304)|0; - $544 = HEAP32[$53>>2]|0; - $bRefine$041 = 1;$best_ggain_pass1$042 = $544;$best_part2_3_length$040 = $best_part2_3_length$3; - } - $545 = ((($gfc)) + 104|0); - $546 = HEAP32[$545>>2]|0; - if ((($546|0) == 1) | (($546|0) == 4) | (($546|0) == 2)) { - _memcpy(($xrpow|0),($save_xrpow|0),2304)|0; - } else { - $547 = HEAP32[$45>>2]|0; - $548 = $547 & 1; - $549 = ($548|0)==(0); - if (!($549)) { - _trancate_smallspectrums($gfc,$cod_info,$l3_xmin,$xrpow); - } - } - $550 = HEAP32[$54>>2]|0; - $$0 = $550; - STACKTOP = sp;return ($$0|0); -} -function _trancate_smallspectrums($gfc,$gi,$l3_xmin,$work) { - $gfc = $gfc|0; - $gi = $gi|0; - $l3_xmin = $l3_xmin|0; - $work = $work|0; - var $$ = 0, $$lcssa = 0, $$lcssa12 = 0, $$old = 0, $$old46 = 0, $$pre = 0, $$pre$phi$lcssaZ2D = 0, $$pre$phiZ2D = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; - var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0.0; - var $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0; - var $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0, $73 = 0; - var $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0; - var $92 = 0, $93 = 0, $allowedNoise$0 = 0.0, $distort = 0, $dummy = 0, $exitcond = 0, $fabsf = 0.0, $fabsf1 = 0.0, $fabsf2 = 0.0, $fabsf3 = 0.0, $fabsf4 = 0.0, $fabsf5 = 0.0, $fabsf6 = 0.0, $j$027 = 0, $j$1 = 0, $nsame$0$lcssa = 0, $nsame$016 = 0, $or$cond = 0, $sfb$0 = 0, $start$0 = 0; - var $start$0$lcssa = 0, $width$0 = 0, $xr$0 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 192|0; - $distort = sp + 24|0; - $dummy = sp; - $0 = ((($gfc)) + 85096|0); - $1 = HEAP32[$0>>2]|0; - $2 = $1 & 4; - $3 = ($2|0)==(0); - if ($3) { - $4 = ((($gi)) + 4788|0); - $5 = HEAP32[$4>>2]|0; - $6 = ($5|0)!=(2); - $7 = $1 & 128; - $8 = ($7|0)==(0); - $or$cond = $6 & $8; - if (!($or$cond)) { - STACKTOP = sp;return; - } - } else { - $$old = $1 & 128; - $$old46 = ($$old|0)==(0); - if (!($$old46)) { - STACKTOP = sp;return; - } - } - (_calc_noise($gi,$l3_xmin,$distort,$dummy,0)|0); - $j$027 = 0; - while(1) { - $9 = (((($gi)) + 2304|0) + ($j$027<<2)|0); - $10 = HEAP32[$9>>2]|0; - $11 = ($10|0)==(0); - if ($11) { - $xr$0 = 0.0; - } else { - $12 = (($gi) + ($j$027<<2)|0); - $13 = +HEAPF32[$12>>2]; - $fabsf6 = (+Math_abs((+$13))); - $xr$0 = $fabsf6; - } - $14 = (($work) + ($j$027<<2)|0); - HEAPF32[$14>>2] = $xr$0; - $15 = (($j$027) + 1)|0; - $exitcond = ($15|0)==(576); - if ($exitcond) { - break; - } else { - $j$027 = $15; - } - } - $16 = ((($gi)) + 4788|0); - $17 = HEAP32[$16>>2]|0; - $18 = ($17|0)==(2); - $$ = $18 ? 6 : 8; - $19 = ((($gi)) + 4864|0); - $j$1 = 0;$sfb$0 = $$; - while(1) { - $20 = (((($gi)) + 4872|0) + ($sfb$0<<2)|0); - $21 = HEAP32[$20>>2]|0; - $22 = (($21) + ($j$1))|0; - $23 = (($distort) + ($sfb$0<<2)|0); - $24 = +HEAPF32[$23>>2]; - $25 = !($24 >= 1.0); - L15: do { - if ($25) { - $26 = (($work) + ($j$1<<2)|0); - _qsort($26,$21,4,1); - $27 = (($22) + -1)|0; - $28 = (($work) + ($27<<2)|0); - $29 = +HEAPF32[$28>>2]; - $fabsf = (+Math_abs((+$29))); - $30 = $fabsf; - $31 = ($29 != $29) | (0.0 != 0.0) |($29 == 0.0); - if ($31) { - $34 = $29 == 0.0; - if ($34) { - break; - } - } else { - $32 = $30 * 9.9999999747524271E-7; - $33 = !($30 <= $32); - if (!($33)) { - break; - } - } - $35 = +HEAPF32[$23>>2]; - $36 = $35; - $37 = 1.0 - $36; - $38 = (($l3_xmin) + ($sfb$0<<2)|0); - $39 = +HEAPF32[$38>>2]; - $40 = $39; - $41 = $37 * $40; - $42 = $41; - $allowedNoise$0 = $42;$start$0 = 0; - while(1) { - $43 = (($start$0) + 1)|0; - $44 = ($43|0)<($21|0); - L23: do { - if ($44) { - $45 = (($start$0) + ($22))|0; - $46 = (($45) - ($21))|0; - $47 = (($work) + ($46<<2)|0); - $48 = +HEAPF32[$47>>2]; - $fabsf3 = (+Math_abs((+$48))); - $49 = (($start$0) + ($j$1))|0; - $50 = $fabsf3; - $51 = $50 * 9.9999999747524271E-7; - $93 = $43;$nsame$016 = 1; - while(1) { - $52 = (($49) + ($nsame$016))|0; - $53 = (($work) + ($52<<2)|0); - $54 = +HEAPF32[$53>>2]; - $fabsf4 = (+Math_abs((+$54))); - $55 = $fabsf3 > $fabsf4; - $56 = $48 - $54; - $fabsf5 = (+Math_abs((+$56))); - $57 = $fabsf5; - if ($55) { - $58 = !($57 <= $51); - if ($58) { - $$lcssa = $93;$$lcssa12 = 1;$$pre$phiZ2D = $49;$nsame$0$lcssa = $nsame$016; - break L23; - } - } else { - $59 = $fabsf4; - $60 = $59 * 9.9999999747524271E-7; - $61 = !($57 <= $60); - if ($61) { - $$lcssa = $93;$$lcssa12 = 1;$$pre$phiZ2D = $49;$nsame$0$lcssa = $nsame$016; - break L23; - } - } - $62 = (($nsame$016) + 1)|0; - $63 = (($62) + ($start$0))|0; - $64 = ($63|0)<($21|0); - if ($64) { - $93 = $63;$nsame$016 = $62; - } else { - $$lcssa = $63;$$lcssa12 = 0;$$pre$phiZ2D = $49;$nsame$0$lcssa = $62; - break; - } - } - } else { - $$pre = (($j$1) + ($start$0))|0; - $$lcssa = $43;$$lcssa12 = 0;$$pre$phiZ2D = $$pre;$nsame$0$lcssa = 1; - } - } while(0); - $65 = (($work) + ($$pre$phiZ2D<<2)|0); - $66 = +HEAPF32[$65>>2]; - $67 = (+($nsame$0$lcssa|0)); - $68 = $66 * $66; - $69 = $68 * $67; - $70 = $allowedNoise$0 < $69; - if ($70) { - $$pre$phi$lcssaZ2D = $$pre$phiZ2D;$start$0$lcssa = $start$0; - break; - } - $72 = $allowedNoise$0 - $69; - if ($$lcssa12) { - $allowedNoise$0 = $72;$start$0 = $$lcssa; - } else { - break L15; - } - } - $71 = ($start$0$lcssa|0)==(0); - if (!($71)) { - $73 = (($$pre$phi$lcssaZ2D) + -1)|0; - $74 = (($work) + ($73<<2)|0); - $75 = +HEAPF32[$74>>2]; - $fabsf1 = (+Math_abs((+$75))); - $76 = $fabsf1; - $77 = ($75 != $75) | (0.0 != 0.0) |($75 == 0.0); - if ($77) { - $80 = $75 == 0.0; - if ($80) { - break; - } else { - $width$0 = $21; - } - } else { - $78 = $76 * 9.9999999747524271E-7; - $79 = !($76 <= $78); - if ($79) { - $width$0 = $21; - } else { - break; - } - } - while(1) { - $81 = (($22) - ($width$0))|0; - $82 = (($gi) + ($81<<2)|0); - $83 = +HEAPF32[$82>>2]; - $fabsf2 = (+Math_abs((+$83))); - $84 = !($fabsf2 <= $75); - if (!($84)) { - $85 = (((($gi)) + 2304|0) + ($81<<2)|0); - HEAP32[$85>>2] = 0; - } - $86 = (($width$0) + -1)|0; - $87 = ($width$0|0)>(1); - if ($87) { - $width$0 = $86; - } else { - break; - } - } - } - } - } while(0); - $88 = (($sfb$0) + 1)|0; - $89 = HEAP32[$19>>2]|0; - $90 = ($88|0)<($89|0); - if ($90) { - $j$1 = $22;$sfb$0 = $88; - } else { - break; - } - } - $91 = (_noquant_count_bits($gfc,$gi,0)|0); - $92 = ((($gi)) + 4768|0); - HEAP32[$92>>2] = $91; - STACKTOP = sp;return; -} -function _floatcompare($v1,$v2) { - $v1 = $v1|0; - $v2 = $v2|0; - var $$ = 0, $$0 = 0, $0 = 0.0, $1 = 0.0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = +HEAPF32[$v1>>2]; - $1 = +HEAPF32[$v2>>2]; - $2 = $0 > $1; - $3 = $0 < $1; - $$ = $3 << 31 >> 31; - $$0 = $2 ? 1 : $$; - return ($$0|0); -} -function _iteration_init($gfc) { - $gfc = $gfc|0; - var $$$i = 0.0, $$1$i = 0.0, $$2$i = 0.0, $$2$i$lcssa = 0.0, $$3$i = 0.0, $$phi$trans$insert$i = 0, $$pre = 0.0, $$pre$i = 0, $$pre50$i = 0, $0 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0.0, $107 = 0.0; - var $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0; - var $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0; - var $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0.0; - var $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0, $170 = 0, $171 = 0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0, $177 = 0, $178 = 0.0, $179 = 0.0, $18 = 0; - var $180 = 0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0.0, $193 = 0.0, $194 = 0.0, $195 = 0, $196 = 0, $197 = 0, $198 = 0.0; - var $199 = 0.0, $2 = 0, $20 = 0.0, $200 = 0.0, $201 = 0, $202 = 0, $203 = 0, $204 = 0.0, $205 = 0.0, $206 = 0.0, $207 = 0.0, $208 = 0, $209 = 0, $21 = 0.0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0; - var $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0.0, $22 = 0.0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0.0, $229 = 0.0, $23 = 0.0, $230 = 0.0, $231 = 0.0, $232 = 0, $233 = 0; - var $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0.0, $241 = 0.0, $242 = 0.0, $243 = 0.0, $244 = 0, $245 = 0.0, $246 = 0.0, $247 = 0.0, $248 = 0.0, $249 = 0, $25 = 0.0, $250 = 0, $251 = 0; - var $252 = 0.0, $253 = 0.0, $254 = 0.0, $255 = 0.0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0.0, $260 = 0.0, $261 = 0.0, $262 = 0.0, $263 = 0.0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0.0, $27 = 0.0; - var $270 = 0.0, $271 = 0.0, $272 = 0.0, $273 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0; - var $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; - var $60 = 0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; - var $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0.0, $96 = 0.0; - var $97 = 0.0, $98 = 0.0, $99 = 0.0, $ath$0$i$i = 0.0, $ath$0$i11$i = 0.0, $ath$0$i5$i = 0.0, $ath$0$i7$i = 0.0, $ath$0$i9$i = 0.0, $ath$0$p$i$i = 0.0, $ath$0$p$i10$i = 0.0, $ath$0$p$i4$i = 0.0, $ath$0$p$i6$i = 0.0, $ath$0$p$i8$i = 0.0, $exitcond$i = 0, $exitcond43 = 0, $exitcond43$i = 0, $exitcond44 = 0, $exitcond44$i = 0, $exitcond45 = 0, $exitcond45$i = 0; - var $exitcond46 = 0, $exitcond46$i = 0, $exitcond47$i = 0, $exitcond48$i = 0, $exitcond49$i = 0, $exp2 = 0.0, $exp21 = 0.0, $i$030 = 0, $i$035$i = 0, $i$129 = 0, $i$131$i = 0, $i$226$i = 0, $i$228 = 0, $i$324$i = 0, $i$327 = 0, $sfb$038$i = 0, $sfb$134$i = 0, $sfb$230$i = 0, $sfb$325$i = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 8|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(0); - if (!($2)) { - return; - } - HEAP32[$0>>2] = 1; - $3 = ((($gfc)) + 21312|0); - HEAP32[$3>>2] = 0; - $4 = ((($gfc)) + 16|0); - $5 = ((($gfc)) + 85796|0); - $6 = HEAP32[$5>>2]|0; - $7 = ((($gfc)) + 64|0); - $8 = HEAP32[$7>>2]|0; - $9 = (+($8|0)); - $10 = $9 * 8.6805556202307343E-4; - $11 = ((($gfc)) + 224|0); - $12 = ((($gfc)) + 196|0); - $sfb$038$i = 0; - while(1) { - $14 = (((($gfc)) + 21360|0) + ($sfb$038$i<<2)|0); - $15 = HEAP32[$14>>2]|0; - $13 = (($sfb$038$i) + 1)|0; - $16 = (((($gfc)) + 21360|0) + ($13<<2)|0); - $17 = HEAP32[$16>>2]|0; - $18 = (((($6)) + 24|0) + ($sfb$038$i<<2)|0); - HEAPF32[$18>>2] = 9.9999999338158125E+36; - $19 = ($15|0)<($17|0); - if ($19) { - $i$035$i = $15; - while(1) { - $20 = (+($i$035$i|0)); - $21 = $20 * $10; - $22 = (+_ATHformula($4,$21)); - $23 = +HEAPF32[$11>>2]; - $24 = $23 > 0.0; - $25 = -$23; - $ath$0$p$i$i = $24 ? $25 : -100.0; - $26 = +HEAPF32[$12>>2]; - $ath$0$i$i = $26 + $22; - $27 = $ath$0$i$i + $ath$0$p$i$i; - $28 = $27 * 0.10000000149011612; - $29 = (+Math_pow(10.0,(+$28))); - $30 = +HEAPF32[$18>>2]; - $31 = $30 < $29; - $$$i = $31 ? $30 : $29; - HEAPF32[$18>>2] = $$$i; - $32 = (($i$035$i) + 1)|0; - $exitcond48$i = ($32|0)==($17|0); - if ($exitcond48$i) { - break; - } else { - $i$035$i = $32; - } - } - } - $exitcond49$i = ($13|0)==(22); - if ($exitcond49$i) { - $sfb$134$i = 0; - break; - } else { - $sfb$038$i = $13; - } - } - while(1) { - $35 = (((($gfc)) + 21508|0) + ($sfb$134$i<<2)|0); - $36 = HEAP32[$35>>2]|0; - $33 = (($sfb$134$i) + 1)|0; - $37 = (((($gfc)) + 21508|0) + ($33<<2)|0); - $38 = HEAP32[$37>>2]|0; - $39 = (((($6)) + 164|0) + ($sfb$134$i<<2)|0); - HEAPF32[$39>>2] = 9.9999999338158125E+36; - $40 = ($36|0)<($38|0); - if ($40) { - $i$131$i = $36; - while(1) { - $41 = (+($i$131$i|0)); - $42 = $41 * $10; - $43 = (+_ATHformula($4,$42)); - $44 = +HEAPF32[$11>>2]; - $45 = $44 > 0.0; - $46 = -$44; - $ath$0$p$i4$i = $45 ? $46 : -100.0; - $47 = +HEAPF32[$12>>2]; - $ath$0$i5$i = $47 + $43; - $48 = $ath$0$i5$i + $ath$0$p$i4$i; - $49 = $48 * 0.10000000149011612; - $50 = (+Math_pow(10.0,(+$49))); - $51 = +HEAPF32[$39>>2]; - $52 = $51 < $50; - $$1$i = $52 ? $51 : $50; - HEAPF32[$39>>2] = $$1$i; - $53 = (($i$131$i) + 1)|0; - $exitcond46$i = ($53|0)==($38|0); - if ($exitcond46$i) { - break; - } else { - $i$131$i = $53; - } - } - } - $exitcond47$i = ($33|0)==(6); - if ($exitcond47$i) { - break; - } else { - $sfb$134$i = $33; - } - } - $34 = $9 * 0.0026041667442768812; - $$phi$trans$insert$i = ((($gfc)) + 21452|0); - $$pre$i = HEAP32[$$phi$trans$insert$i>>2]|0; - $61 = $$pre$i;$sfb$230$i = 0; - while(1) { - $56 = (((($gfc)) + 21452|0) + ($sfb$230$i<<2)|0); - $57 = (($sfb$230$i) + 1)|0; - $58 = (((($gfc)) + 21452|0) + ($57<<2)|0); - $59 = HEAP32[$58>>2]|0; - $60 = (((($6)) + 112|0) + ($sfb$230$i<<2)|0); - HEAPF32[$60>>2] = 9.9999999338158125E+36; - $62 = ($61|0)<($59|0); - if ($62) { - $i$226$i = $61; - while(1) { - $63 = (+($i$226$i|0)); - $64 = $63 * $34; - $65 = (+_ATHformula($4,$64)); - $66 = +HEAPF32[$11>>2]; - $67 = $66 > 0.0; - $68 = -$66; - $ath$0$p$i6$i = $67 ? $68 : -100.0; - $69 = +HEAPF32[$12>>2]; - $ath$0$i7$i = $69 + $65; - $70 = $ath$0$i7$i + $ath$0$p$i6$i; - $71 = $70 * 0.10000000149011612; - $72 = (+Math_pow(10.0,(+$71))); - $73 = +HEAPF32[$60>>2]; - $74 = $73 < $72; - $$2$i = $74 ? $73 : $72; - HEAPF32[$60>>2] = $$2$i; - $75 = (($i$226$i) + 1)|0; - $exitcond44$i = ($75|0)==($59|0); - if ($exitcond44$i) { - $$2$i$lcssa = $$2$i; - break; - } else { - $i$226$i = $75; - } - } - $$pre50$i = HEAP32[$58>>2]|0; - $78 = $$pre50$i;$81 = $$2$i$lcssa; - } else { - $78 = $59;$81 = 9.9999999338158125E+36; - } - $76 = HEAP32[$56>>2]|0; - $77 = (($78) - ($76))|0; - $79 = (+($77|0)); - $80 = $79 * $81; - HEAPF32[$60>>2] = $80; - $exitcond45$i = ($57|0)==(13); - if ($exitcond45$i) { - break; - } else { - $61 = $78;$sfb$230$i = $57; - } - } - $54 = ((($gfc)) + 21504|0); - $55 = ((($gfc)) + 21500|0); - $sfb$325$i = 0; - while(1) { - $82 = (((($gfc)) + 21536|0) + ($sfb$325$i<<2)|0); - $83 = HEAP32[$82>>2]|0; - $84 = (($sfb$325$i) + 1)|0; - $85 = (((($gfc)) + 21536|0) + ($84<<2)|0); - $86 = HEAP32[$85>>2]|0; - $87 = (((($6)) + 188|0) + ($sfb$325$i<<2)|0); - HEAPF32[$87>>2] = 9.9999999338158125E+36; - $88 = ($83|0)<($86|0); - if ($88) { - $i$324$i = $83; - while(1) { - $89 = (+($i$324$i|0)); - $90 = $89 * $34; - $91 = (+_ATHformula($4,$90)); - $92 = +HEAPF32[$11>>2]; - $93 = $92 > 0.0; - $94 = -$92; - $ath$0$p$i8$i = $93 ? $94 : -100.0; - $95 = +HEAPF32[$12>>2]; - $ath$0$i9$i = $95 + $91; - $96 = $ath$0$i9$i + $ath$0$p$i8$i; - $97 = $96 * 0.10000000149011612; - $98 = (+Math_pow(10.0,(+$97))); - $99 = +HEAPF32[$87>>2]; - $100 = $99 < $98; - $$3$i = $100 ? $99 : $98; - HEAPF32[$87>>2] = $$3$i; - $101 = (($i$324$i) + 1)|0; - $exitcond$i = ($101|0)==($86|0); - if ($exitcond$i) { - $107 = $$3$i; - break; - } else { - $i$324$i = $101; - } - } - } else { - $107 = 9.9999999338158125E+36; - } - $102 = HEAP32[$54>>2]|0; - $103 = HEAP32[$55>>2]|0; - $104 = (($102) - ($103))|0; - $105 = (+($104|0)); - $106 = $105 * $107; - HEAPF32[$87>>2] = $106; - $exitcond43$i = ($84|0)==(6); - if ($exitcond43$i) { - break; - } else { - $sfb$325$i = $84; - } - } - $108 = ((($gfc)) + 220|0); - $109 = HEAP32[$108>>2]|0; - $110 = ($109|0)==(0); - if (!($110)) { - $111 = ((($6)) + 24|0); - HEAPF32[$111>>2] = 9.9999996826552254E-21; - $112 = ((($6)) + 28|0); - HEAPF32[$112>>2] = 9.9999996826552254E-21; - $113 = ((($6)) + 32|0); - HEAPF32[$113>>2] = 9.9999996826552254E-21; - $114 = ((($6)) + 36|0); - HEAPF32[$114>>2] = 9.9999996826552254E-21; - $115 = ((($6)) + 40|0); - HEAPF32[$115>>2] = 9.9999996826552254E-21; - $116 = ((($6)) + 44|0); - HEAPF32[$116>>2] = 9.9999996826552254E-21; - $117 = ((($6)) + 48|0); - HEAPF32[$117>>2] = 9.9999996826552254E-21; - $118 = ((($6)) + 52|0); - HEAPF32[$118>>2] = 9.9999996826552254E-21; - $119 = ((($6)) + 56|0); - HEAPF32[$119>>2] = 9.9999996826552254E-21; - $120 = ((($6)) + 60|0); - HEAPF32[$120>>2] = 9.9999996826552254E-21; - $121 = ((($6)) + 64|0); - HEAPF32[$121>>2] = 9.9999996826552254E-21; - $122 = ((($6)) + 68|0); - HEAPF32[$122>>2] = 9.9999996826552254E-21; - $123 = ((($6)) + 72|0); - HEAPF32[$123>>2] = 9.9999996826552254E-21; - $124 = ((($6)) + 76|0); - HEAPF32[$124>>2] = 9.9999996826552254E-21; - $125 = ((($6)) + 80|0); - HEAPF32[$125>>2] = 9.9999996826552254E-21; - $126 = ((($6)) + 84|0); - HEAPF32[$126>>2] = 9.9999996826552254E-21; - $127 = ((($6)) + 88|0); - HEAPF32[$127>>2] = 9.9999996826552254E-21; - $128 = ((($6)) + 92|0); - HEAPF32[$128>>2] = 9.9999996826552254E-21; - $129 = ((($6)) + 96|0); - HEAPF32[$129>>2] = 9.9999996826552254E-21; - $130 = ((($6)) + 100|0); - HEAPF32[$130>>2] = 9.9999996826552254E-21; - $131 = ((($6)) + 104|0); - HEAPF32[$131>>2] = 9.9999996826552254E-21; - $132 = ((($6)) + 108|0); - HEAPF32[$132>>2] = 9.9999996826552254E-21; - $133 = ((($6)) + 164|0); - HEAPF32[$133>>2] = 9.9999996826552254E-21; - $134 = ((($6)) + 168|0); - HEAPF32[$134>>2] = 9.9999996826552254E-21; - $135 = ((($6)) + 172|0); - HEAPF32[$135>>2] = 9.9999996826552254E-21; - $136 = ((($6)) + 176|0); - HEAPF32[$136>>2] = 9.9999996826552254E-21; - $137 = ((($6)) + 180|0); - HEAPF32[$137>>2] = 9.9999996826552254E-21; - $138 = ((($6)) + 184|0); - HEAPF32[$138>>2] = 9.9999996826552254E-21; - $139 = ((($6)) + 112|0); - HEAPF32[$139>>2] = 9.9999996826552254E-21; - $140 = ((($6)) + 116|0); - HEAPF32[$140>>2] = 9.9999996826552254E-21; - $141 = ((($6)) + 120|0); - HEAPF32[$141>>2] = 9.9999996826552254E-21; - $142 = ((($6)) + 124|0); - HEAPF32[$142>>2] = 9.9999996826552254E-21; - $143 = ((($6)) + 128|0); - HEAPF32[$143>>2] = 9.9999996826552254E-21; - $144 = ((($6)) + 132|0); - HEAPF32[$144>>2] = 9.9999996826552254E-21; - $145 = ((($6)) + 136|0); - HEAPF32[$145>>2] = 9.9999996826552254E-21; - $146 = ((($6)) + 140|0); - HEAPF32[$146>>2] = 9.9999996826552254E-21; - $147 = ((($6)) + 144|0); - HEAPF32[$147>>2] = 9.9999996826552254E-21; - $148 = ((($6)) + 148|0); - HEAPF32[$148>>2] = 9.9999996826552254E-21; - $149 = ((($6)) + 152|0); - HEAPF32[$149>>2] = 9.9999996826552254E-21; - $150 = ((($6)) + 156|0); - HEAPF32[$150>>2] = 9.9999996826552254E-21; - $151 = ((($6)) + 160|0); - HEAPF32[$151>>2] = 9.9999996826552254E-21; - $152 = ((($6)) + 188|0); - HEAPF32[$152>>2] = 9.9999996826552254E-21; - $153 = ((($6)) + 192|0); - HEAPF32[$153>>2] = 9.9999996826552254E-21; - $154 = ((($6)) + 196|0); - HEAPF32[$154>>2] = 9.9999996826552254E-21; - $155 = ((($6)) + 200|0); - HEAPF32[$155>>2] = 9.9999996826552254E-21; - $156 = ((($6)) + 204|0); - HEAPF32[$156>>2] = 9.9999996826552254E-21; - $157 = ((($6)) + 208|0); - HEAPF32[$157>>2] = 9.9999996826552254E-21; - } - $158 = (+_ATHformula($4,-1.0)); - $159 = +HEAPF32[$11>>2]; - $160 = $159 > 0.0; - $161 = -$159; - $ath$0$p$i10$i = $160 ? $161 : -100.0; - $162 = +HEAPF32[$12>>2]; - $ath$0$i11$i = $162 + $158; - $163 = $ath$0$i11$i + $ath$0$p$i10$i; - $164 = $163 * 0.10000000149011612; - $165 = (+Math_pow(10.0,(+$164))); - $166 = $165; - $167 = (+_log10($166)); - $168 = $167 * 10.0; - $169 = $168; - $170 = HEAP32[$5>>2]|0; - $171 = ((($170)) + 20|0); - HEAPF32[$171>>2] = $169; - HEAPF32[14040>>2] = 0.0; - $i$030 = 1; - while(1) { - $172 = (+($i$030|0)); - $173 = $172; - $174 = (+Math_pow((+$173),1.3333333333333333)); - $175 = $174; - $176 = (14040 + ($i$030<<2)|0); - HEAPF32[$176>>2] = $175; - $177 = (($i$030) + 1)|0; - $exitcond46 = ($177|0)==(8208); - if ($exitcond46) { - break; - } else { - $i$030 = $177; - } - } - HEAPF32[46872>>2] = 0.0; - $$pre = +HEAPF32[14040>>2]; - $183 = $$pre;$i$129 = 1; - while(1) { - $178 = (+($i$129|0)); - $179 = $178 + -0.5; - $180 = (14040 + ($i$129<<2)|0); - $181 = +HEAPF32[$180>>2]; - $182 = $181 + $183; - $184 = $182; - $185 = $184 * 0.5; - $186 = (+Math_pow((+$185),0.75)); - $187 = $179 - $186; - $188 = $187; - $189 = (46872 + ($i$129<<2)|0); - HEAPF32[$189>>2] = $188; - $190 = (($i$129) + 1)|0; - $exitcond45 = ($190|0)==(8208); - if ($exitcond45) { - $i$228 = 0; - break; - } else { - $183 = $181;$i$129 = $190; - } - } - while(1) { - $191 = (($i$228) + -210)|0; - $192 = (+($191|0)); - $193 = $192 * -0.1875; - $exp21 = (+_exp2($193)); - $194 = $exp21; - $195 = (79704 + ($i$228<<2)|0); - HEAPF32[$195>>2] = $194; - $196 = (($i$228) + 1)|0; - $exitcond44 = ($196|0)==(257); - if ($exitcond44) { - $i$327 = 0; - break; - } else { - $i$228 = $196; - } - } - while(1) { - $197 = (($i$327) + -326)|0; - $198 = (+($197|0)); - $199 = $198 * 0.25; - $exp2 = (+_exp2($199)); - $200 = $exp2; - $201 = (80736 + ($i$327<<2)|0); - HEAPF32[$201>>2] = $200; - $202 = (($i$327) + 1)|0; - $exitcond43 = ($202|0)==(374); - if ($exitcond43) { - break; - } else { - $i$327 = $202; - } - } - _huffman_init($gfc); - _init_xrpow_core_init($gfc); - $203 = ((($gfc)) + 232|0); - $204 = +HEAPF32[$203>>2]; - $205 = $204 + -0.5; - $206 = $205 * 0.10000000149011612; - $207 = (+Math_pow(10.0,(+$206))); - $208 = ((($gfc)) + 84768|0); - HEAPF32[$208>>2] = $207; - $209 = ((($gfc)) + 84772|0); - HEAPF32[$209>>2] = $207; - $210 = ((($gfc)) + 84776|0); - HEAPF32[$210>>2] = $207; - $211 = ((($gfc)) + 84780|0); - HEAPF32[$211>>2] = $207; - $212 = ((($gfc)) + 84784|0); - HEAPF32[$212>>2] = $207; - $213 = ((($gfc)) + 84788|0); - HEAPF32[$213>>2] = $207; - $214 = ((($gfc)) + 84792|0); - HEAPF32[$214>>2] = $207; - $215 = ((($gfc)) + 228|0); - $216 = +HEAPF32[$215>>2]; - $217 = $216 + -0.25; - $218 = $217 * 0.10000000149011612; - $219 = (+Math_pow(10.0,(+$218))); - $220 = ((($gfc)) + 84796|0); - HEAPF32[$220>>2] = $219; - $221 = ((($gfc)) + 84800|0); - HEAPF32[$221>>2] = $219; - $222 = ((($gfc)) + 84804|0); - HEAPF32[$222>>2] = $219; - $223 = ((($gfc)) + 84808|0); - HEAPF32[$223>>2] = $219; - $224 = ((($gfc)) + 84812|0); - HEAPF32[$224>>2] = $219; - $225 = ((($gfc)) + 84816|0); - HEAPF32[$225>>2] = $219; - $226 = ((($gfc)) + 84820|0); - HEAPF32[$226>>2] = $219; - $227 = ((($gfc)) + 236|0); - $228 = +HEAPF32[$227>>2]; - $229 = $228 + -0.02500000037252903; - $230 = $229 * 0.10000000149011612; - $231 = (+Math_pow(10.0,(+$230))); - $232 = ((($gfc)) + 84824|0); - HEAPF32[$232>>2] = $231; - $233 = ((($gfc)) + 84828|0); - HEAPF32[$233>>2] = $231; - $234 = ((($gfc)) + 84832|0); - HEAPF32[$234>>2] = $231; - $235 = ((($gfc)) + 84836|0); - HEAPF32[$235>>2] = $231; - $236 = ((($gfc)) + 84840|0); - HEAPF32[$236>>2] = $231; - $237 = ((($gfc)) + 84844|0); - HEAPF32[$237>>2] = $231; - $238 = ((($gfc)) + 84848|0); - HEAPF32[$238>>2] = $231; - $239 = ((($gfc)) + 240|0); - $240 = +HEAPF32[$239>>2]; - $241 = $240 + 0.5; - $242 = $241 * 0.10000000149011612; - $243 = (+Math_pow(10.0,(+$242))); - $244 = ((($gfc)) + 84852|0); - HEAPF32[$244>>2] = $243; - $245 = +HEAPF32[$203>>2]; - $246 = $245 + -2.0; - $247 = $246 * 0.10000000149011612; - $248 = (+Math_pow(10.0,(+$247))); - $249 = ((($gfc)) + 84856|0); - HEAPF32[$249>>2] = $248; - $250 = ((($gfc)) + 84860|0); - HEAPF32[$250>>2] = $248; - $251 = ((($gfc)) + 84864|0); - HEAPF32[$251>>2] = $248; - $252 = +HEAPF32[$215>>2]; - $253 = $252 + -1.0; - $254 = $253 * 0.10000000149011612; - $255 = (+Math_pow(10.0,(+$254))); - $256 = ((($gfc)) + 84868|0); - HEAPF32[$256>>2] = $255; - $257 = ((($gfc)) + 84872|0); - HEAPF32[$257>>2] = $255; - $258 = ((($gfc)) + 84876|0); - HEAPF32[$258>>2] = $255; - $259 = ((($gfc)) + 84880|0); - HEAPF32[$259>>2] = $255; - $260 = +HEAPF32[$227>>2]; - $261 = $260 + -0.05000000074505806; - $262 = $261 * 0.10000000149011612; - $263 = (+Math_pow(10.0,(+$262))); - $264 = ((($gfc)) + 84884|0); - HEAPF32[$264>>2] = $263; - $265 = ((($gfc)) + 84888|0); - HEAPF32[$265>>2] = $263; - $266 = ((($gfc)) + 84892|0); - HEAPF32[$266>>2] = $263; - $267 = ((($gfc)) + 84896|0); - HEAPF32[$267>>2] = $263; - $268 = ((($gfc)) + 84900|0); - HEAPF32[$268>>2] = $263; - $269 = +HEAPF32[$239>>2]; - $270 = $269 + 0.5; - $271 = $270 * 0.10000000149011612; - $272 = (+Math_pow(10.0,(+$271))); - $273 = ((($gfc)) + 84904|0); - HEAPF32[$273>>2] = $272; - return; -} -function _on_pe($gfc,$pe,$targ_bits,$mean_bits,$gr,$cbr) { - $gfc = $gfc|0; - $pe = $pe|0; - $targ_bits = $targ_bits|0; - $mean_bits = $mean_bits|0; - $gr = $gr|0; - $cbr = $cbr|0; - var $$ = 0, $$3 = 0, $$4 = 0, $$lcssa = 0, $$lcssa43 = 0, $$lcssa44 = 0, $$lcssa45 = 0, $$lcssa46 = 0, $$not = 0, $$not34 = 0, $$storemerge = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; - var $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; - var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; - var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $8 = 0; - var $9 = 0, $add_bits = 0, $bits$017 = 0, $bits$19 = 0, $brmerge = 0, $ch$018 = 0, $ch$115 = 0, $ch$212 = 0, $ch$310 = 0, $ch$48 = 0, $extra_bits = 0, $or$cond = 0, $storemerge = 0, $storemerge26 = 0, $tbits = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $extra_bits = sp + 12|0; - $tbits = sp + 8|0; - $add_bits = sp; - HEAP32[$extra_bits>>2] = 0; - $0 = $add_bits; - $1 = $0; - HEAP32[$1>>2] = 0; - $2 = (($0) + 4)|0; - $3 = $2; - HEAP32[$3>>2] = 0; - _ResvMaxBits($gfc,$mean_bits,$tbits,$extra_bits,$cbr); - $4 = HEAP32[$tbits>>2]|0; - $5 = HEAP32[$extra_bits>>2]|0; - $6 = (($5) + ($4))|0; - $7 = ($6|0)>(7680); - $$ = $7 ? 7680 : $6; - $8 = ((($gfc)) + 72|0); - $9 = HEAP32[$8>>2]|0; - $10 = ($9|0)>(0); - if (!($10)) { - STACKTOP = sp;return ($$|0); - } - $11 = ($mean_bits*3)|0; - $12 = (($11|0) / 4)&-1; - $14 = $9;$bits$017 = 0;$ch$018 = 0; - while(1) { - $13 = (($4|0) / ($14|0))&-1; - $15 = ($13|0)>(4095); - $$3 = $15 ? 4095 : $13; - $16 = (($targ_bits) + ($ch$018<<2)|0); - HEAP32[$16>>2] = $$3; - $17 = (+($$3|0)); - $18 = ((($pe) + ($gr<<3)|0) + ($ch$018<<2)|0); - $19 = +HEAPF32[$18>>2]; - $20 = $17 * $19; - $21 = $20; - $22 = $21 * 0.0014285714285714286; - $23 = (+($$3|0)); - $24 = $22 - $23; - $25 = (~~(($24))); - $26 = (($add_bits) + ($ch$018<<2)|0); - $27 = ($25|0)>($12|0); - $storemerge = $27 ? $12 : $25; - $28 = ($storemerge|0)<(0); - $$storemerge = $28 ? 0 : $storemerge; - $29 = (($$storemerge) + ($$3))|0; - $30 = ($29|0)>(4095); - if ($30) { - $31 = (4095 - ($$3))|0; - $32 = ($31|0)<(0); - $$4 = $32 ? 0 : $31; - $storemerge26 = $$4; - } else { - $storemerge26 = $$storemerge; - } - HEAP32[$26>>2] = $storemerge26; - $33 = (($storemerge26) + ($bits$017))|0; - $34 = (($ch$018) + 1)|0; - $35 = HEAP32[$8>>2]|0; - $36 = ($34|0)<($35|0); - if ($36) { - $14 = $35;$bits$017 = $33;$ch$018 = $34; - } else { - $$lcssa45 = $33;$$lcssa46 = $35; - break; - } - } - $37 = ($$lcssa45|0)>($5|0); - $38 = ($$lcssa45|0)>(0); - $or$cond = $38 & $37; - if ($or$cond) { - $39 = ($$lcssa46|0)>(0); - if ($39) { - $ch$115 = 0; - while(1) { - $41 = (($add_bits) + ($ch$115<<2)|0); - $42 = HEAP32[$41>>2]|0; - $43 = Math_imul($42, $5)|0; - $44 = (($43|0) / ($$lcssa45|0))&-1; - HEAP32[$41>>2] = $44; - $45 = (($ch$115) + 1)|0; - $46 = ($45|0)<($$lcssa46|0); - if ($46) { - $ch$115 = $45; - } else { - break; - } - } - } else { - STACKTOP = sp;return ($$|0); - } - } - $40 = ($$lcssa46|0)>(0); - if ($40) { - $54 = $5;$ch$212 = 0; - } else { - STACKTOP = sp;return ($$|0); - } - while(1) { - $48 = (($add_bits) + ($ch$212<<2)|0); - $49 = HEAP32[$48>>2]|0; - $50 = (($targ_bits) + ($ch$212<<2)|0); - $51 = HEAP32[$50>>2]|0; - $52 = (($51) + ($49))|0; - HEAP32[$50>>2] = $52; - $53 = (($54) - ($49))|0; - $55 = (($ch$212) + 1)|0; - $56 = HEAP32[$8>>2]|0; - $57 = ($55|0)<($56|0); - if ($57) { - $54 = $53;$ch$212 = $55; - } else { - $$lcssa43 = $53;$$lcssa44 = $56; - break; - } - } - HEAP32[$extra_bits>>2] = $$lcssa43; - $47 = ($$lcssa44|0)>(0); - if ($47) { - $bits$19 = 0;$ch$310 = 0; - } else { - STACKTOP = sp;return ($$|0); - } - while(1) { - $58 = (($targ_bits) + ($ch$310<<2)|0); - $59 = HEAP32[$58>>2]|0; - $60 = (($59) + ($bits$19))|0; - $61 = (($ch$310) + 1)|0; - $62 = ($61|0)<($$lcssa44|0); - if ($62) { - $bits$19 = $60;$ch$310 = $61; - } else { - $$lcssa = $60; - break; - } - } - $$not = ($$lcssa|0)<(7681); - $$not34 = $47 ^ 1; - $brmerge = $$not | $$not34; - if ($brmerge) { - STACKTOP = sp;return ($$|0); - } else { - $ch$48 = 0; - } - while(1) { - $63 = (($targ_bits) + ($ch$48<<2)|0); - $64 = HEAP32[$63>>2]|0; - $65 = ($64*7680)|0; - $66 = (($65|0) / ($$lcssa|0))&-1; - HEAP32[$63>>2] = $66; - $67 = (($ch$48) + 1)|0; - $68 = HEAP32[$8>>2]|0; - $69 = ($67|0)<($68|0); - if ($69) { - $ch$48 = $67; - } else { - break; - } - } - STACKTOP = sp;return ($$|0); -} -function _reduce_side($targ_bits,$ms_ener_ratio,$mean_bits,$max_bits) { - $targ_bits = $targ_bits|0; - $ms_ener_ratio = +$ms_ener_ratio; - $mean_bits = $mean_bits|0; - $max_bits = $max_bits|0; - var $$ = 0, $$op = 0.0, $0 = 0.0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $fac$0 = 0.0, $move_bits$1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $ms_ener_ratio; - $1 = 0.5 - $0; - $2 = $1 * 0.66000000000000003; - $3 = $2; - $4 = $3 < 0.0; - $fac$0 = $4 ? 0.0 : $3; - $5 = $fac$0 > 0.5; - $6 = $fac$0; - $$op = $6 * 0.5; - $7 = $5 ? 0.25 : $$op; - $8 = HEAP32[$targ_bits>>2]|0; - $9 = ((($targ_bits)) + 4|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($10) + ($8))|0; - $12 = (+($11|0)); - $13 = $12 * $7; - $14 = (~~(($13))); - $15 = (4095 - ($8))|0; - $16 = ($14|0)>($15|0); - $$ = $16 ? $15 : $14; - $17 = ($$|0)<(0); - $move_bits$1 = $17 ? 0 : $$; - $18 = ($10|0)>(124); - do { - if ($18) { - $19 = (($10) - ($move_bits$1))|0; - $20 = ($19|0)>(125); - if (!($20)) { - $23 = (($8) + -125)|0; - $24 = (($23) + ($10))|0; - HEAP32[$targ_bits>>2] = $24; - HEAP32[$9>>2] = 125; - $26 = $24;$27 = 125; - break; - } - $21 = ($8|0)<($mean_bits|0); - if ($21) { - $22 = (($move_bits$1) + ($8))|0; - HEAP32[$targ_bits>>2] = $22; - $33 = $22; - } else { - $33 = $8; - } - HEAP32[$9>>2] = $19; - $26 = $33;$27 = $19; - } else { - $26 = $8;$27 = $10; - } - } while(0); - $25 = (($27) + ($26))|0; - $28 = ($25|0)>($max_bits|0); - if (!($28)) { - return; - } - $29 = Math_imul($26, $max_bits)|0; - $30 = (($29|0) / ($25|0))&-1; - HEAP32[$targ_bits>>2] = $30; - $31 = Math_imul($27, $max_bits)|0; - $32 = (($31|0) / ($25|0))&-1; - HEAP32[$9>>2] = $32; - return; -} -function _athAdjust($a,$x,$athFloor,$ATHfixpoint) { - $a = +$a; - $x = +$x; - $athFloor = +$athFloor; - $ATHfixpoint = +$ATHfixpoint; - var $$neg = 0.0, $0 = 0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0; - var $9 = 0.0, $ATHfixpoint$op = 0.0, $w$0 = 0.0, $w$1 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $ATHfixpoint < 1.0; - $1 = (+_fast_log2($x)); - $2 = $1; - $3 = $2 * 3.0102999566398116; - $4 = $3; - $5 = $a * $a; - $6 = $4 - $athFloor; - $7 = $5 > 9.9999996826552254E-21; - if ($7) { - $8 = (+_fast_log2($5)); - $9 = $8; - $10 = $9 * 0.03333343265598758; - $11 = $10 + 1.0; - $12 = $11; - $w$0 = $12; - } else { - $w$0 = 0.0; - } - $13 = $w$0 < 0.0; - $w$1 = $13 ? 0.0 : $w$0; - $14 = $w$1 * $6; - $15 = $athFloor + 90.308731079101563; - $ATHfixpoint$op = -$ATHfixpoint; - $$neg = $0 ? -94.824447631835938 : $ATHfixpoint$op; - $16 = $15 + $$neg; - $17 = $16 + $14; - $18 = $17 * 0.10000000149011612; - $19 = (+Math_pow(10.0,(+$18))); - return (+$19); -} -function _calc_xmin($gfc,$ratio,$cod_info,$pxmin) { - $gfc = $gfc|0; - $ratio = $ratio|0; - $cod_info = $cod_info|0; - $pxmin = $pxmin|0; - var $$0$lcssa = 0, $$040 = 0, $$122 = 0, $$2$lcssa = 0, $$lcssa = 0.0, $$lcssa93 = 0.0, $$lcssa94 = 0.0, $$lcssa95 = 0.0, $$lcssa96 = 0.0, $$lcssa97 = 0.0, $$lcssa98 = 0.0, $$lcssa99 = 0.0, $$neg$i = 0.0, $$neg$i4 = 0.0, $$pre = 0.0, $$rh2$0 = 0.0, $$rh26$0 = 0.0, $$rh26$0$us = 0.0, $$rh26$0$us$1 = 0.0, $$rh26$0$us$2 = 0.0; - var $0 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0.0, $110 = 0, $111 = 0, $112 = 0.0, $113 = 0, $114 = 0.0, $115 = 0.0; - var $116 = 0.0, $117 = 0, $118 = 0.0, $119 = 0.0, $12 = 0.0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0.0, $133 = 0.0; - var $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0.0, $140 = 0, $141 = 0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0, $151 = 0.0; - var $152 = 0, $153 = 0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0, $159 = 0, $16 = 0.0, $160 = 0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0, $169 = 0, $17 = 0.0; - var $170 = 0, $171 = 0, $172 = 0, $173 = 0.0, $174 = 0, $175 = 0, $176 = 0, $177 = 0.0, $178 = 0.0, $179 = 0, $18 = 0.0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0.0, $185 = 0, $186 = 0, $187 = 0, $188 = 0.0; - var $189 = 0.0, $19 = 0.0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0.0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0.0, $202 = 0, $203 = 0, $204 = 0, $205 = 0; - var $206 = 0, $207 = 0, $208 = 0, $209 = 0.0, $21 = 0.0, $210 = 0, $211 = 0.0, $212 = 0, $213 = 0.0, $214 = 0, $215 = 0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0, $22 = 0.0, $220 = 0.0, $221 = 0.0, $222 = 0.0, $223 = 0; - var $224 = 0, $225 = 0.0, $226 = 0.0, $227 = 0.0, $228 = 0, $229 = 0, $23 = 0.0, $230 = 0, $231 = 0, $232 = 0, $233 = 0.0, $234 = 0.0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0.0, $240 = 0, $241 = 0.0; - var $242 = 0.0, $243 = 0.0, $244 = 0, $245 = 0.0, $246 = 0.0, $247 = 0, $248 = 0, $249 = 0, $25 = 0.0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0.0, $255 = 0, $256 = 0, $257 = 0.0, $258 = 0.0, $259 = 0.0, $26 = 0; - var $260 = 0.0, $261 = 0.0, $262 = 0, $263 = 0, $264 = 0.0, $265 = 0.0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0.0, $270 = 0, $271 = 0, $272 = 0, $273 = 0.0, $274 = 0.0, $275 = 0.0, $276 = 0, $277 = 0.0, $278 = 0.0; - var $279 = 0, $28 = 0.0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0.0, $287 = 0, $288 = 0, $289 = 0.0, $29 = 0.0, $290 = 0.0, $291 = 0.0, $292 = 0.0, $293 = 0.0, $294 = 0, $295 = 0, $296 = 0.0; - var $297 = 0.0, $298 = 0, $299 = 0, $3 = 0, $30 = 0.0, $300 = 0, $301 = 0, $302 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0; - var $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0; - var $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0, $78 = 0; - var $79 = 0, $8 = 0.0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0; - var $97 = 0, $98 = 0, $99 = 0, $ATHfixpoint$op$i = 0.0, $ATHfixpoint$op$i3 = 0.0, $ath_over$0$lcssa = 0, $ath_over$037 = 0, $ath_over$1 = 0, $ath_over$2$lcssa = 0, $ath_over$216 = 0, $ath_over$3$lcssa = 0, $ath_over$4 = 0, $ath_over$4$1 = 0, $ath_over$4$2 = 0, $ath_over$4$us = 0, $ath_over$4$us$1 = 0, $ath_over$4$us$2 = 0, $en0$0$lcssa = 0.0, $en0$030 = 0.0, $en03$07$us = 0.0; - var $en03$07$us$1 = 0.0, $en03$07$us$2 = 0.0, $exitcond = 0, $exitcond$1 = 0, $exitcond$2 = 0, $exitcond62 = 0, $fabsf = 0.0, $gsfb$0$lcssa = 0, $gsfb$039 = 0, $gsfb$118 = 0, $j$0$lcssa = 0, $j$038 = 0, $j$1$lcssa = 0, $j$131 = 0, $j$217 = 0, $j$3$lcssa = 0, $j$48$us = 0, $j$48$us$1 = 0, $j$48$us$2 = 0, $k$027 = 0; - var $l$028 = 0, $l2$06$us = 0, $l2$06$us$1 = 0, $l2$06$us$2 = 0, $limit$0 = 0, $limit$0$in = 0, $limit$0$max_nonzero$1 = 0, $max_nonzero$0 = 0, $max_nonzero$1 = 0, $max_nonzero$2 = 0, $or$cond = 0, $or$cond73 = 0, $or$cond74 = 0, $rh2$0$lcssa = 0.0, $rh2$029 = 0.0, $rh26$09$us = 0.0, $rh26$09$us$1 = 0.0, $rh26$09$us$2 = 0.0, $rh3$0 = 0.0, $rh37$0 = 0.0; - var $rh37$0$us = 0.0, $rh37$0$us$1 = 0.0, $rh37$0$us$2 = 0.0, $sfb$020 = 0, $w$0$i = 0.0, $w$0$i1 = 0.0, $w$1$i = 0.0, $w$1$i2 = 0.0, $xmin$0 = 0.0, $xmin4$0 = 0.0, $xmin4$0$1 = 0.0, $xmin4$0$2 = 0.0, $xmin4$0$us = 0.0, $xmin4$0$us$1 = 0.0, $xmin4$0$us$2 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 85796|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($cod_info)) + 4856|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3|0)>(0); - if ($4) { - $5 = ((($1)) + 8|0); - $6 = ((($1)) + 20|0); - $7 = ((($gfc)) + 224|0); - $$040 = $pxmin;$ath_over$037 = 0;$gsfb$039 = 0;$j$038 = 0; - while(1) { - $8 = +HEAPF32[$5>>2]; - $9 = (((($1)) + 24|0) + ($gsfb$039<<2)|0); - $10 = +HEAPF32[$9>>2]; - $11 = +HEAPF32[$6>>2]; - $12 = +HEAPF32[$7>>2]; - $13 = $12 < 1.0; - $14 = (+_fast_log2($10)); - $15 = $14; - $16 = $15 * 3.0102999566398116; - $17 = $16; - $18 = $8 * $8; - $19 = $17 - $11; - $20 = $18 > 9.9999996826552254E-21; - if ($20) { - $21 = (+_fast_log2($18)); - $22 = $21; - $23 = $22 * 0.03333343265598758; - $24 = $23 + 1.0; - $25 = $24; - $w$0$i = $25; - } else { - $w$0$i = 0.0; - } - $26 = $w$0$i < 0.0; - $w$1$i = $26 ? 0.0 : $w$0$i; - $27 = $w$1$i * $19; - $28 = $11 + 90.308731079101563; - $ATHfixpoint$op$i = -$12; - $$neg$i = $13 ? -94.824447631835938 : $ATHfixpoint$op$i; - $29 = $28 + $$neg$i; - $30 = $29 + $27; - $31 = $30 * 0.10000000149011612; - $32 = (+Math_pow(10.0,(+$31))); - $33 = (((($gfc)) + 84768|0) + ($gsfb$039<<2)|0); - $34 = +HEAPF32[$33>>2]; - $35 = $34 * $32; - $36 = (((($cod_info)) + 4872|0) + ($gsfb$039<<2)|0); - $37 = HEAP32[$36>>2]|0; - $38 = (+($37|0)); - $39 = $35 / $38; - $40 = ($37|0)>(0); - if ($40) { - $en0$030 = 0.0;$j$131 = $j$038;$l$028 = 0;$rh2$029 = 2.2204460492503131E-16; - while(1) { - $41 = (($j$131) + 1)|0; - $42 = (($cod_info) + ($j$131<<2)|0); - $43 = +HEAPF32[$42>>2]; - $44 = $43 * $43; - $45 = $44 + $en0$030; - $46 = $44 < $39; - $47 = $46 ? $44 : $39; - $48 = $47 + $rh2$029; - $49 = (($l$028) + 1)|0; - $exitcond62 = ($49|0)==($37|0); - if ($exitcond62) { - $$lcssa98 = $45;$$lcssa99 = $48; - break; - } else { - $en0$030 = $45;$j$131 = $41;$l$028 = $49;$rh2$029 = $48; - } - } - $50 = (($j$038) + ($37))|0; - $en0$0$lcssa = $$lcssa98;$j$1$lcssa = $50;$rh2$0$lcssa = $$lcssa99; - } else { - $en0$0$lcssa = 0.0;$j$1$lcssa = $j$038;$rh2$0$lcssa = 2.2204460492503131E-16; - } - $51 = $en0$0$lcssa > $35; - $52 = $51&1; - $ath_over$1 = (($52) + ($ath_over$037))|0; - $53 = $en0$0$lcssa < $35; - $54 = $rh2$0$lcssa < $35; - $$rh2$0 = $54 ? $35 : $rh2$0$lcssa; - $rh3$0 = $53 ? $en0$0$lcssa : $$rh2$0; - $55 = (((($ratio)) + 244|0) + ($gsfb$039<<2)|0); - $56 = +HEAPF32[$55>>2]; - $57 = $56 > 9.999999960041972E-13; - if ($57) { - $58 = (($ratio) + ($gsfb$039<<2)|0); - $59 = +HEAPF32[$58>>2]; - $60 = $59 * $en0$0$lcssa; - $61 = $60 / $56; - $62 = $34 * $61; - $63 = $rh3$0 < $62; - if ($63) { - $xmin$0 = $62; - } else { - $xmin$0 = $rh3$0; - } - } else { - $xmin$0 = $rh3$0; - } - $64 = $xmin$0 > 2.2204460492503131E-16; - $65 = $64 ? $xmin$0 : 2.2204460492503131E-16; - $66 = $65 + 9.9999998245167004E-15; - $67 = $en0$0$lcssa > $66; - $68 = $67&1; - $69 = (((($cod_info)) + 5212|0) + ($gsfb$039)|0); - HEAP8[$69>>0] = $68; - $70 = ((($$040)) + 4|0); - HEAPF32[$$040>>2] = $65; - $71 = (($gsfb$039) + 1)|0; - $72 = HEAP32[$2>>2]|0; - $73 = ($71|0)<($72|0); - if ($73) { - $$040 = $70;$ath_over$037 = $ath_over$1;$gsfb$039 = $71;$j$038 = $j$1$lcssa; - } else { - $$0$lcssa = $70;$ath_over$0$lcssa = $ath_over$1;$gsfb$0$lcssa = $71;$j$0$lcssa = $j$1$lcssa; - break; - } - } - } else { - $$0$lcssa = $pxmin;$ath_over$0$lcssa = 0;$gsfb$0$lcssa = 0;$j$0$lcssa = 0; - } - $k$027 = 575; - while(1) { - $74 = (($cod_info) + ($k$027<<2)|0); - $75 = +HEAPF32[$74>>2]; - $fabsf = (+Math_abs((+$75))); - $76 = $fabsf > 9.999999960041972E-13; - if ($76) { - $max_nonzero$0 = $k$027; - break; - } - $77 = (($k$027) + -1)|0; - $78 = ($k$027|0)>(1); - if ($78) { - $k$027 = $77; - } else { - $max_nonzero$0 = 0; - break; - } - } - $79 = ((($cod_info)) + 4788|0); - $80 = HEAP32[$79>>2]|0; - $81 = ($80|0)==(2); - if ($81) { - $83 = (($max_nonzero$0|0) % 6)&-1; - $84 = (($max_nonzero$0) + 5)|0; - $85 = (($84) - ($83))|0; - $max_nonzero$1 = $85; - } else { - $82 = $max_nonzero$0 | 1; - $max_nonzero$1 = $82; - } - $86 = ((($gfc)) + 85092|0); - $87 = HEAP32[$86>>2]|0; - $88 = ($87|0)==(0); - if ($88) { - $89 = ((($gfc)) + 64|0); - $90 = HEAP32[$89>>2]|0; - $91 = ($90|0)<(44000); - if ($91) { - $92 = ($90|0)<(8001); - if ($81) { - $96 = $92 ? 9 : 12; - $97 = (((($gfc)) + 21452|0) + ($96<<2)|0); - $98 = HEAP32[$97>>2]|0; - $99 = ($98*3)|0; - $limit$0$in = $99; - } else { - $93 = $92 ? 17 : 21; - $94 = (((($gfc)) + 21360|0) + ($93<<2)|0); - $95 = HEAP32[$94>>2]|0; - $limit$0$in = $95; - } - $limit$0 = (($limit$0$in) + -1)|0; - $100 = ($max_nonzero$1|0)>($limit$0|0); - $limit$0$max_nonzero$1 = $100 ? $limit$0 : $max_nonzero$1; - $max_nonzero$2 = $limit$0$max_nonzero$1; - } else { - $max_nonzero$2 = $max_nonzero$1; - } - } else { - $max_nonzero$2 = $max_nonzero$1; - } - $101 = ((($cod_info)) + 5208|0); - HEAP32[$101>>2] = $max_nonzero$2; - $102 = ((($cod_info)) + 4864|0); - $103 = HEAP32[$102>>2]|0; - $104 = ($gsfb$0$lcssa|0)<($103|0); - if (!($104)) { - $ath_over$2$lcssa = $ath_over$0$lcssa; - return ($ath_over$2$lcssa|0); - } - $105 = ((($cod_info)) + 4852|0); - $106 = HEAP32[$105>>2]|0; - $107 = ((($1)) + 8|0); - $108 = ((($1)) + 20|0); - $109 = ((($gfc)) + 224|0); - $110 = ((($gfc)) + 92|0); - $111 = ((($gfc)) + 85800|0); - $$122 = $$0$lcssa;$ath_over$216 = $ath_over$0$lcssa;$gsfb$118 = $gsfb$0$lcssa;$j$217 = $j$0$lcssa;$sfb$020 = $106; - while(1) { - $112 = +HEAPF32[$107>>2]; - $113 = (((($1)) + 112|0) + ($sfb$020<<2)|0); - $114 = +HEAPF32[$113>>2]; - $115 = +HEAPF32[$108>>2]; - $116 = +HEAPF32[$109>>2]; - $117 = $116 < 1.0; - $118 = (+_fast_log2($114)); - $119 = $118; - $120 = $119 * 3.0102999566398116; - $121 = $120; - $122 = $112 * $112; - $123 = $121 - $115; - $124 = $122 > 9.9999996826552254E-21; - if ($124) { - $125 = (+_fast_log2($122)); - $126 = $125; - $127 = $126 * 0.03333343265598758; - $128 = $127 + 1.0; - $129 = $128; - $w$0$i1 = $129; - } else { - $w$0$i1 = 0.0; - } - $130 = $w$0$i1 < 0.0; - $w$1$i2 = $130 ? 0.0 : $w$0$i1; - $131 = $w$1$i2 * $123; - $132 = $115 + 90.308731079101563; - $ATHfixpoint$op$i3 = -$116; - $$neg$i4 = $117 ? -94.824447631835938 : $ATHfixpoint$op$i3; - $133 = $132 + $$neg$i4; - $134 = $133 + $131; - $135 = $134 * 0.10000000149011612; - $136 = (+Math_pow(10.0,(+$135))); - $137 = (((($gfc)) + 84856|0) + ($sfb$020<<2)|0); - $138 = +HEAPF32[$137>>2]; - $139 = $138 * $136; - $140 = (((($cod_info)) + 4872|0) + ($gsfb$118<<2)|0); - $141 = HEAP32[$140>>2]|0; - $142 = (+($141|0)); - $143 = $139 / $142; - $144 = ($141|0)>(0); - if ($144) { - $en03$07$us = 0.0;$j$48$us = $j$217;$l2$06$us = 0;$rh26$09$us = 2.2204460492503131E-16; - while(1) { - $159 = (($j$48$us) + 1)|0; - $160 = (($cod_info) + ($j$48$us<<2)|0); - $161 = +HEAPF32[$160>>2]; - $162 = $161 * $161; - $163 = $162 + $en03$07$us; - $164 = $162 < $143; - $165 = $164 ? $162 : $143; - $166 = $165 + $rh26$09$us; - $167 = (($l2$06$us) + 1)|0; - $exitcond = ($167|0)==($141|0); - if ($exitcond) { - $$lcssa = $163;$$lcssa93 = $166; - break; - } else { - $en03$07$us = $163;$j$48$us = $159;$l2$06$us = $167;$rh26$09$us = $166; - } - } - $145 = (($141) + ($j$217))|0; - $146 = $$lcssa > $139; - $147 = $146&1; - $ath_over$4$us = (($147) + ($ath_over$216))|0; - $148 = $$lcssa < $139; - $149 = $$lcssa93 < $139; - $$rh26$0$us = $149 ? $139 : $$lcssa93; - $rh37$0$us = $148 ? $$lcssa : $$rh26$0$us; - $150 = (((($ratio)) + 332|0) + (($sfb$020*12)|0)|0); - $151 = +HEAPF32[$150>>2]; - $152 = $151 > 9.999999960041972E-13; - if ($152) { - $153 = (((($ratio)) + 88|0) + (($sfb$020*12)|0)|0); - $154 = +HEAPF32[$153>>2]; - $155 = $154 * $$lcssa; - $156 = $155 / $151; - $157 = $138 * $156; - $158 = $rh37$0$us < $157; - if ($158) { - $xmin4$0$us = $157; - } else { - $xmin4$0$us = $rh37$0$us; - } - } else { - $xmin4$0$us = $rh37$0$us; - } - $232 = $xmin4$0$us > 2.2204460492503131E-16; - $233 = $232 ? $xmin4$0$us : 2.2204460492503131E-16; - $234 = $233 + 9.9999998245167004E-15; - $235 = $$lcssa > $234; - $236 = $235&1; - $237 = (((($cod_info)) + 5212|0) + ($gsfb$118)|0); - HEAP8[$237>>0] = $236; - $238 = ((($$122)) + 4|0); - HEAPF32[$$122>>2] = $233; - $en03$07$us$1 = 0.0;$j$48$us$1 = $145;$l2$06$us$1 = 0;$rh26$09$us$1 = 2.2204460492503131E-16; - while(1) { - $239 = (($j$48$us$1) + 1)|0; - $240 = (($cod_info) + ($j$48$us$1<<2)|0); - $241 = +HEAPF32[$240>>2]; - $242 = $241 * $241; - $243 = $242 + $en03$07$us$1; - $244 = $242 < $143; - $245 = $244 ? $242 : $143; - $246 = $245 + $rh26$09$us$1; - $247 = (($l2$06$us$1) + 1)|0; - $exitcond$1 = ($247|0)==($141|0); - if ($exitcond$1) { - $$lcssa94 = $243;$$lcssa95 = $246; - break; - } else { - $en03$07$us$1 = $243;$j$48$us$1 = $239;$l2$06$us$1 = $247;$rh26$09$us$1 = $246; - } - } - $248 = (($141) + ($145))|0; - $249 = $$lcssa94 > $139; - $250 = $249&1; - $ath_over$4$us$1 = (($250) + ($ath_over$4$us))|0; - $251 = $$lcssa94 < $139; - $252 = $$lcssa95 < $139; - $$rh26$0$us$1 = $252 ? $139 : $$lcssa95; - $rh37$0$us$1 = $251 ? $$lcssa94 : $$rh26$0$us$1; - $253 = (((((($ratio)) + 332|0) + (($sfb$020*12)|0)|0)) + 4|0); - $254 = +HEAPF32[$253>>2]; - $255 = $254 > 9.999999960041972E-13; - if ($255) { - $256 = (((((($ratio)) + 88|0) + (($sfb$020*12)|0)|0)) + 4|0); - $257 = +HEAPF32[$256>>2]; - $258 = $257 * $$lcssa94; - $259 = $258 / $254; - $260 = +HEAPF32[$137>>2]; - $261 = $260 * $259; - $262 = $rh37$0$us$1 < $261; - if ($262) { - $xmin4$0$us$1 = $261; - } else { - $xmin4$0$us$1 = $rh37$0$us$1; - } - } else { - $xmin4$0$us$1 = $rh37$0$us$1; - } - $263 = $xmin4$0$us$1 > 2.2204460492503131E-16; - $264 = $263 ? $xmin4$0$us$1 : 2.2204460492503131E-16; - $265 = $264 + 9.9999998245167004E-15; - $266 = $$lcssa94 > $265; - $267 = $266&1; - $268 = (($gsfb$118) + 1)|0; - $269 = (((($cod_info)) + 5212|0) + ($268)|0); - HEAP8[$269>>0] = $267; - $270 = ((($$122)) + 8|0); - HEAPF32[$238>>2] = $264; - $en03$07$us$2 = 0.0;$j$48$us$2 = $248;$l2$06$us$2 = 0;$rh26$09$us$2 = 2.2204460492503131E-16; - while(1) { - $271 = (($j$48$us$2) + 1)|0; - $272 = (($cod_info) + ($j$48$us$2<<2)|0); - $273 = +HEAPF32[$272>>2]; - $274 = $273 * $273; - $275 = $274 + $en03$07$us$2; - $276 = $274 < $143; - $277 = $276 ? $274 : $143; - $278 = $277 + $rh26$09$us$2; - $279 = (($l2$06$us$2) + 1)|0; - $exitcond$2 = ($279|0)==($141|0); - if ($exitcond$2) { - $$lcssa96 = $275;$$lcssa97 = $278; - break; - } else { - $en03$07$us$2 = $275;$j$48$us$2 = $271;$l2$06$us$2 = $279;$rh26$09$us$2 = $278; - } - } - $280 = (($141) + ($248))|0; - $281 = $$lcssa96 > $139; - $282 = $281&1; - $ath_over$4$us$2 = (($282) + ($ath_over$4$us$1))|0; - $283 = $$lcssa96 < $139; - $284 = $$lcssa97 < $139; - $$rh26$0$us$2 = $284 ? $139 : $$lcssa97; - $rh37$0$us$2 = $283 ? $$lcssa96 : $$rh26$0$us$2; - $285 = (((((($ratio)) + 332|0) + (($sfb$020*12)|0)|0)) + 8|0); - $286 = +HEAPF32[$285>>2]; - $287 = $286 > 9.999999960041972E-13; - if ($287) { - $288 = (((((($ratio)) + 88|0) + (($sfb$020*12)|0)|0)) + 8|0); - $289 = +HEAPF32[$288>>2]; - $290 = $289 * $$lcssa96; - $291 = $290 / $286; - $292 = +HEAPF32[$137>>2]; - $293 = $292 * $291; - $294 = $rh37$0$us$2 < $293; - if ($294) { - $xmin4$0$us$2 = $293; - } else { - $xmin4$0$us$2 = $rh37$0$us$2; - } - } else { - $xmin4$0$us$2 = $rh37$0$us$2; - } - $295 = $xmin4$0$us$2 > 2.2204460492503131E-16; - $296 = $295 ? $xmin4$0$us$2 : 2.2204460492503131E-16; - $297 = $296 + 9.9999998245167004E-15; - $298 = $$lcssa96 > $297; - $299 = $298&1; - $300 = (($gsfb$118) + 2)|0; - $301 = (((($cod_info)) + 5212|0) + ($300)|0); - HEAP8[$301>>0] = $299; - HEAPF32[$270>>2] = $296; - $302 = $296;$ath_over$3$lcssa = $ath_over$4$us$2;$j$3$lcssa = $280; - } else { - $168 = $139 < 0.0; - $169 = $168&1; - $ath_over$4 = (($169) + ($ath_over$216))|0; - $170 = $139 > 0.0; - $171 = $139 > 2.2204460492503131E-16; - $$rh26$0 = $171 ? $139 : 2.2204460492503131E-16; - $rh37$0 = $170 ? 0.0 : $$rh26$0; - $172 = (((($ratio)) + 332|0) + (($sfb$020*12)|0)|0); - $173 = +HEAPF32[$172>>2]; - $174 = $173 > 9.999999960041972E-13; - $175 = $rh37$0 < 0.0; - $or$cond = $174 & $175; - $xmin4$0 = $or$cond ? 0.0 : $rh37$0; - $176 = $xmin4$0 > 2.2204460492503131E-16; - $177 = $176 ? $xmin4$0 : 2.2204460492503131E-16; - $178 = $177 + 9.9999998245167004E-15; - $179 = $178 < 0.0; - $180 = $179&1; - $181 = (((($cod_info)) + 5212|0) + ($gsfb$118)|0); - HEAP8[$181>>0] = $180; - $182 = ((($$122)) + 4|0); - HEAPF32[$$122>>2] = $177; - $ath_over$4$1 = (($169) + ($ath_over$4))|0; - $183 = (((((($ratio)) + 332|0) + (($sfb$020*12)|0)|0)) + 4|0); - $184 = +HEAPF32[$183>>2]; - $185 = $184 > 9.999999960041972E-13; - $186 = $rh37$0 < 0.0; - $or$cond73 = $185 & $186; - $xmin4$0$1 = $or$cond73 ? 0.0 : $rh37$0; - $187 = $xmin4$0$1 > 2.2204460492503131E-16; - $188 = $187 ? $xmin4$0$1 : 2.2204460492503131E-16; - $189 = $188 + 9.9999998245167004E-15; - $190 = $189 < 0.0; - $191 = $190&1; - $192 = (($gsfb$118) + 1)|0; - $193 = (((($cod_info)) + 5212|0) + ($192)|0); - HEAP8[$193>>0] = $191; - $194 = ((($$122)) + 8|0); - HEAPF32[$182>>2] = $188; - $ath_over$4$2 = (($169) + ($ath_over$4$1))|0; - $195 = (((((($ratio)) + 332|0) + (($sfb$020*12)|0)|0)) + 8|0); - $196 = +HEAPF32[$195>>2]; - $197 = $196 > 9.999999960041972E-13; - $198 = $rh37$0 < 0.0; - $or$cond74 = $197 & $198; - $xmin4$0$2 = $or$cond74 ? 0.0 : $rh37$0; - $199 = $xmin4$0$2 > 2.2204460492503131E-16; - $200 = $199 ? $xmin4$0$2 : 2.2204460492503131E-16; - $201 = $200 + 9.9999998245167004E-15; - $202 = $201 < 0.0; - $203 = $202&1; - $204 = (($gsfb$118) + 2)|0; - $205 = (((($cod_info)) + 5212|0) + ($204)|0); - HEAP8[$205>>0] = $203; - HEAPF32[$194>>2] = $200; - $302 = $200;$ath_over$3$lcssa = $ath_over$4$2;$j$3$lcssa = $j$217; - } - $206 = ((($$122)) + 8|0); - $$2$lcssa = ((($$122)) + 12|0); - $207 = HEAP32[$110>>2]|0; - $208 = ($207|0)==(0); - if (!($208)) { - $209 = +HEAPF32[$$122>>2]; - $210 = ((($$122)) + 4|0); - $211 = +HEAPF32[$210>>2]; - $212 = $209 > $211; - if ($212) { - $213 = $209 - $211; - $214 = HEAP32[$111>>2]|0; - $215 = ((($214)) + 6496|0); - $216 = +HEAPF32[$215>>2]; - $217 = $216 * $213; - $218 = $217 + $211; - HEAPF32[$210>>2] = $218; - $$pre = +HEAPF32[$206>>2]; - $220 = $$pre;$221 = $218; - } else { - $220 = $302;$221 = $211; - } - $219 = $221 > $220; - if ($219) { - $222 = $221 - $220; - $223 = HEAP32[$111>>2]|0; - $224 = ((($223)) + 6496|0); - $225 = +HEAPF32[$224>>2]; - $226 = $225 * $222; - $227 = $226 + $220; - HEAPF32[$206>>2] = $227; - } - } - $228 = (($sfb$020) + 1)|0; - $229 = (($gsfb$118) + 3)|0; - $230 = HEAP32[$102>>2]|0; - $231 = ($229|0)<($230|0); - if ($231) { - $$122 = $$2$lcssa;$ath_over$216 = $ath_over$3$lcssa;$gsfb$118 = $229;$j$217 = $j$3$lcssa;$sfb$020 = $228; - } else { - $ath_over$2$lcssa = $ath_over$3$lcssa; - break; - } - } - return ($ath_over$2$lcssa|0); -} -function _calc_noise($cod_info,$l3_xmin,$distort,$res,$prev_noise) { - $cod_info = $cod_info|0; - $l3_xmin = $l3_xmin|0; - $distort = $distort|0; - $res = $res|0; - $prev_noise = $prev_noise|0; - var $$ = 0, $$0114 = 0, $$015 = 0, $$09$i = 0, $$113$i = 0, $$219$i = 0, $$lcssa = 0.0, $$lcssa35 = 0.0, $$lcssa36 = 0.0, $$ph = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0.0, $104 = 0, $105 = 0; - var $106 = 0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0.0, $112 = 0.0, $113 = 0, $114 = 0.0, $115 = 0, $116 = 0, $117 = 0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0.0, $123 = 0.0; - var $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0.0, $134 = 0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0; - var $142 = 0, $143 = 0.0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0.0, $155 = 0, $156 = 0.0, $157 = 0, $158 = 0, $159 = 0, $16 = 0; - var $160 = 0, $161 = 0, $162 = 0, $163 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0; - var $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0.0; - var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0.0, $66 = 0, $67 = 0.0; - var $68 = 0.0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0.0; - var $86 = 0.0, $87 = 0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0.0, $97 = 0, $98 = 0.0, $99 = 0.0, $distort_$0$ph = 0.0, $fabsf$i = 0.0, $fabsf1$i = 0.0, $fabsf2$i = 0.0, $fabsf3$i = 0.0; - var $ix01$i = 0, $j$07$i = 0, $j$111$i = 0, $j$217$i = 0, $j$3$i = 0, $l$0 = 0, $max_noise$0$lcssa = 0.0, $max_noise$08 = 0.0, $noise$0$ph = 0.0, $noise$02 = 0.0, $noise$08$i = 0.0, $noise$112$i = 0.0, $noise$218$i = 0.0, $noise$3$i = 0.0, $over$0$lcssa = 0, $over$010 = 0, $over$1 = 0, $over_noise_db$0$lcssa = 0.0, $over_noise_db$06 = 0.0, $over_noise_db$1 = 0.0; - var $scalefac$09 = 0, $sfb$011 = 0, $tot_noise_db$0$lcssa = 0.0, $tot_noise_db$07 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $ix01$i = sp; - $0 = ((($res)) + 16|0); - HEAP32[$0>>2] = 0; - $1 = ((($cod_info)) + 4864|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)>(0); - if (!($3)) { - $max_noise$0$lcssa = -20.0;$over$0$lcssa = 0;$over_noise_db$0$lcssa = 0.0;$tot_noise_db$0$lcssa = 0.0; - $160 = ((($res)) + 12|0); - HEAP32[$160>>2] = $over$0$lcssa; - $161 = ((($res)) + 4|0); - HEAPF32[$161>>2] = $tot_noise_db$0$lcssa; - HEAPF32[$res>>2] = $over_noise_db$0$lcssa; - $162 = ((($res)) + 8|0); - HEAPF32[$162>>2] = $max_noise$0$lcssa; - STACKTOP = sp;return ($over$0$lcssa|0); - } - $4 = ((($cod_info)) + 4608|0); - $5 = ((($cod_info)) + 4780|0); - $6 = ((($cod_info)) + 4832|0); - $7 = ((($cod_info)) + 4836|0); - $8 = ($prev_noise|0)!=(0|0); - $9 = ((($cod_info)) + 5208|0); - $10 = ((($cod_info)) + 4776|0); - $11 = ((($cod_info)) + 4772|0); - $12 = ((($ix01$i)) + 4|0); - $$0114 = $distort;$$015 = $l3_xmin;$41 = 0;$max_noise$08 = -20.0;$over$010 = 0;$over_noise_db$06 = 0.0;$scalefac$09 = $4;$sfb$011 = 0;$tot_noise_db$07 = 0.0; - while(1) { - $13 = HEAP32[$5>>2]|0; - $14 = ((($scalefac$09)) + 4|0); - $15 = HEAP32[$scalefac$09>>2]|0; - $16 = HEAP32[$6>>2]|0; - $17 = ($16|0)==(0); - if ($17) { - $21 = 0; - } else { - $18 = (12112 + ($sfb$011<<2)|0); - $19 = HEAP32[$18>>2]|0; - $21 = $19; - } - $20 = (($21) + ($15))|0; - $22 = HEAP32[$7>>2]|0; - $23 = (($22) + 1)|0; - $24 = $20 << $23; - $25 = (($13) - ($24))|0; - $26 = (((($cod_info)) + 5028|0) + ($sfb$011<<2)|0); - $27 = HEAP32[$26>>2]|0; - $28 = (((($cod_info)) + 4808|0) + ($27<<2)|0); - $29 = HEAP32[$28>>2]|0; - $30 = $29 << 3; - $31 = (($25) - ($30))|0; - $32 = ((($$015)) + 4|0); - $33 = +HEAPF32[$$015>>2]; - $34 = 1.0 / $33; - if ($8) { - $35 = (((($prev_noise)) + 8|0) + ($sfb$011<<2)|0); - $36 = HEAP32[$35>>2]|0; - $37 = ($36|0)==($31|0); - if ($37) { - $38 = (((($cod_info)) + 4872|0) + ($sfb$011<<2)|0); - $39 = HEAP32[$38>>2]|0; - $40 = (($39) + ($41))|0; - $42 = (((($prev_noise)) + 164|0) + ($sfb$011<<2)|0); - $43 = +HEAPF32[$42>>2]; - $44 = $43 * $34; - $45 = (((($prev_noise)) + 320|0) + ($sfb$011<<2)|0); - $46 = +HEAPF32[$45>>2]; - $$ph = $40;$141 = $13;$distort_$0$ph = $44;$noise$0$ph = $46; - label = 27; - } else { - label = 8; - } - } else { - label = 8; - } - do { - if ((label|0) == 8) { - label = 0; - $47 = (($31) + 116)|0; - $48 = (80736 + ($47<<2)|0); - $49 = +HEAPF32[$48>>2]; - $50 = (((($cod_info)) + 4872|0) + ($sfb$011<<2)|0); - $51 = HEAP32[$50>>2]|0; - $52 = $51 >> 1; - $53 = (($51) + ($41))|0; - $54 = HEAP32[$9>>2]|0; - $55 = ($53|0)>($54|0); - if ($55) { - $56 = (($54) - ($41))|0; - $57 = ($56|0)>(-1); - if ($57) { - $58 = (($56) + 1)|0; - $59 = $58 >> 1; - $l$0 = $59; - } else { - $l$0 = 0; - } - } else { - $l$0 = $52; - } - $60 = HEAP32[$10>>2]|0; - $61 = ($41|0)>($60|0); - do { - if ($61) { - $62 = ($l$0|0)==(0); - if ($62) { - $j$3$i = $41;$noise$3$i = 0.0; - } else { - $$09$i = $l$0;$j$07$i = $41;$noise$08$i = 0.0; - while(1) { - $63 = (($$09$i) + -1)|0; - $64 = (($cod_info) + ($j$07$i<<2)|0); - $65 = +HEAPF32[$64>>2]; - $66 = (($j$07$i) + 1)|0; - $67 = $65 * $65; - $68 = $67 + $noise$08$i; - $69 = (($cod_info) + ($66<<2)|0); - $70 = +HEAPF32[$69>>2]; - $71 = (($j$07$i) + 2)|0; - $72 = $70 * $70; - $73 = $68 + $72; - $74 = ($63|0)==(0); - if ($74) { - $$lcssa36 = $73; - break; - } else { - $$09$i = $63;$j$07$i = $71;$noise$08$i = $73; - } - } - $125 = $l$0 << 1; - $126 = (($125) + ($41))|0; - $j$3$i = $126;$noise$3$i = $$lcssa36; - } - } else { - $75 = HEAP32[$11>>2]|0; - $76 = ($41|0)>($75|0); - if ($76) { - HEAPF32[$ix01$i>>2] = 0.0; - HEAPF32[$12>>2] = $49; - $78 = ($l$0|0)==(0); - if ($78) { - $j$3$i = $41;$noise$3$i = 0.0; - break; - } else { - $$113$i = $l$0;$j$111$i = $41;$noise$112$i = 0.0; - } - while(1) { - $79 = (($$113$i) + -1)|0; - $80 = (($cod_info) + ($j$111$i<<2)|0); - $81 = +HEAPF32[$80>>2]; - $fabsf2$i = (+Math_abs((+$81))); - $82 = (((($cod_info)) + 2304|0) + ($j$111$i<<2)|0); - $83 = HEAP32[$82>>2]|0; - $84 = (($ix01$i) + ($83<<2)|0); - $85 = +HEAPF32[$84>>2]; - $86 = $fabsf2$i - $85; - $87 = (($j$111$i) + 1)|0; - $88 = $86 * $86; - $89 = $88 + $noise$112$i; - $90 = (($cod_info) + ($87<<2)|0); - $91 = +HEAPF32[$90>>2]; - $fabsf3$i = (+Math_abs((+$91))); - $92 = (((($cod_info)) + 2304|0) + ($87<<2)|0); - $93 = HEAP32[$92>>2]|0; - $94 = (($ix01$i) + ($93<<2)|0); - $95 = +HEAPF32[$94>>2]; - $96 = $fabsf3$i - $95; - $97 = (($j$111$i) + 2)|0; - $98 = $96 * $96; - $99 = $89 + $98; - $100 = ($79|0)==(0); - if ($100) { - $$lcssa35 = $99; - break; - } else { - $$113$i = $79;$j$111$i = $97;$noise$112$i = $99; - } - } - $127 = $l$0 << 1; - $128 = (($127) + ($41))|0; - $j$3$i = $128;$noise$3$i = $$lcssa35; - break; - } else { - $77 = ($l$0|0)==(0); - if ($77) { - $j$3$i = $41;$noise$3$i = 0.0; - break; - } else { - $$219$i = $l$0;$j$217$i = $41;$noise$218$i = 0.0; - } - while(1) { - $101 = (($$219$i) + -1)|0; - $102 = (($cod_info) + ($j$217$i<<2)|0); - $103 = +HEAPF32[$102>>2]; - $fabsf$i = (+Math_abs((+$103))); - $104 = (((($cod_info)) + 2304|0) + ($j$217$i<<2)|0); - $105 = HEAP32[$104>>2]|0; - $106 = (14040 + ($105<<2)|0); - $107 = +HEAPF32[$106>>2]; - $108 = $107 * $49; - $109 = $fabsf$i - $108; - $110 = (($j$217$i) + 1)|0; - $111 = $109 * $109; - $112 = $111 + $noise$218$i; - $113 = (($cod_info) + ($110<<2)|0); - $114 = +HEAPF32[$113>>2]; - $fabsf1$i = (+Math_abs((+$114))); - $115 = (((($cod_info)) + 2304|0) + ($110<<2)|0); - $116 = HEAP32[$115>>2]|0; - $117 = (14040 + ($116<<2)|0); - $118 = +HEAPF32[$117>>2]; - $119 = $118 * $49; - $120 = $fabsf1$i - $119; - $121 = (($j$217$i) + 2)|0; - $122 = $120 * $120; - $123 = $112 + $122; - $124 = ($101|0)==(0); - if ($124) { - $$lcssa = $123; - break; - } else { - $$219$i = $101;$j$217$i = $121;$noise$218$i = $123; - } - } - $129 = $l$0 << 1; - $130 = (($129) + ($41))|0; - $j$3$i = $130;$noise$3$i = $$lcssa; - break; - } - } - } while(0); - if ($8) { - $131 = (((($prev_noise)) + 8|0) + ($sfb$011<<2)|0); - HEAP32[$131>>2] = $31; - $132 = (((($prev_noise)) + 164|0) + ($sfb$011<<2)|0); - HEAPF32[$132>>2] = $noise$3$i; - } - $133 = $noise$3$i * $34; - $134 = $133 > 9.9999996826552254E-21; - $135 = $134 ? $133 : 9.9999996826552254E-21; - $136 = (+_fast_log2($135)); - $137 = $136; - $138 = $137 * 0.30102999566398114; - $139 = $138; - if ($8) { - $140 = (((($prev_noise)) + 320|0) + ($sfb$011<<2)|0); - HEAPF32[$140>>2] = $139; - $$pre = HEAP32[$5>>2]|0; - $$ph = $j$3$i;$141 = $$pre;$distort_$0$ph = $133;$noise$0$ph = $139; - label = 27; - break; - } else { - HEAPF32[$$0114>>2] = $133; - $163 = $j$3$i;$noise$02 = $139; - break; - } - } - } while(0); - if ((label|0) == 27) { - label = 0; - HEAPF32[$$0114>>2] = $distort_$0$ph; - HEAP32[$prev_noise>>2] = $141; - $163 = $$ph;$noise$02 = $noise$0$ph; - } - $142 = ((($$0114)) + 4|0); - $143 = $noise$02 + $tot_noise_db$07; - $144 = $noise$02 > 0.0; - if ($144) { - $145 = $noise$02 * 10.0; - $146 = $145; - $147 = $146 + 0.5; - $148 = (~~(($147))); - $149 = ($148|0)>(1); - $$ = $149 ? $148 : 1; - $150 = Math_imul($$, $$)|0; - $151 = HEAP32[$0>>2]|0; - $152 = (($151) + ($150))|0; - HEAP32[$0>>2] = $152; - $153 = (($over$010) + 1)|0; - $154 = $noise$02 + $over_noise_db$06; - $over$1 = $153;$over_noise_db$1 = $154; - } else { - $over$1 = $over$010;$over_noise_db$1 = $over_noise_db$06; - } - $155 = $max_noise$08 > $noise$02; - $156 = $155 ? $max_noise$08 : $noise$02; - $157 = (($sfb$011) + 1)|0; - $158 = HEAP32[$1>>2]|0; - $159 = ($157|0)<($158|0); - if ($159) { - $$0114 = $142;$$015 = $32;$41 = $163;$max_noise$08 = $156;$over$010 = $over$1;$over_noise_db$06 = $over_noise_db$1;$scalefac$09 = $14;$sfb$011 = $157;$tot_noise_db$07 = $143; - } else { - $max_noise$0$lcssa = $156;$over$0$lcssa = $over$1;$over_noise_db$0$lcssa = $over_noise_db$1;$tot_noise_db$0$lcssa = $143; - break; - } - } - $160 = ((($res)) + 12|0); - HEAP32[$160>>2] = $over$0$lcssa; - $161 = ((($res)) + 4|0); - HEAPF32[$161>>2] = $tot_noise_db$0$lcssa; - HEAPF32[$res>>2] = $over_noise_db$0$lcssa; - $162 = ((($res)) + 8|0); - HEAPF32[$162>>2] = $max_noise$0$lcssa; - STACKTOP = sp;return ($over$0$lcssa|0); -} -function _set_frame_pinfo($gfc,$ratio) { - $gfc = $gfc|0; - $ratio = $ratio|0; - var $$2$i = 0.0, $$3$i = 0.0, $$3$i$1 = 0.0, $$3$i$2 = 0.0, $$3$us$i = 0.0, $$4$i = 0.0, $$lcssa27 = 0.0, $$lcssa28 = 0, $$phi$trans$insert$i = 0, $$phi$trans$insert43$i = 0, $$pre = 0, $$pre$i = 0, $$pre19 = 0, $$pre20 = 0, $$pre44$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0; - var $102 = 0.0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0; - var $120 = 0, $121 = 0, $122 = 0, $123 = 0.0, $124 = 0, $125 = 0, $126 = 0.0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0, $138 = 0; - var $139 = 0.0, $14 = 0, $140 = 0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0; - var $157 = 0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0.0, $162 = 0, $163 = 0, $164 = 0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0.0, $169 = 0.0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0.0, $174 = 0.0; - var $175 = 0, $176 = 0, $177 = 0, $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0, $183 = 0, $184 = 0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0.0, $192 = 0; - var $193 = 0, $194 = 0, $195 = 0.0, $196 = 0.0, $197 = 0, $198 = 0.0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0.0, $203 = 0.0, $204 = 0, $205 = 0, $206 = 0, $207 = 0.0, $208 = 0.0, $209 = 0.0, $21 = 0; - var $210 = 0.0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0.0, $216 = 0.0, $217 = 0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0.0, $221 = 0.0, $222 = 0, $223 = 0, $224 = 0.0, $225 = 0, $226 = 0, $227 = 0, $228 = 0; - var $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0.0, $24 = 0, $240 = 0.0, $241 = 0.0, $242 = 0, $243 = 0.0, $244 = 0.0, $245 = 0.0, $246 = 0; - var $247 = 0.0, $248 = 0.0, $249 = 0.0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0.0, $261 = 0, $262 = 0, $263 = 0, $264 = 0.0; - var $265 = 0.0, $266 = 0, $267 = 0.0, $268 = 0.0, $269 = 0, $27 = 0, $270 = 0, $271 = 0.0, $272 = 0.0, $273 = 0, $274 = 0, $275 = 0, $276 = 0.0, $277 = 0.0, $278 = 0.0, $279 = 0.0, $28 = 0, $280 = 0, $281 = 0, $282 = 0; - var $283 = 0, $284 = 0.0, $285 = 0.0, $286 = 0, $287 = 0.0, $288 = 0.0, $289 = 0.0, $29 = 0, $290 = 0.0, $291 = 0, $292 = 0, $293 = 0.0, $294 = 0, $295 = 0.0, $296 = 0, $297 = 0, $298 = 0, $299 = 0.0, $3 = 0, $30 = 0; - var $300 = 0.0, $301 = 0, $302 = 0.0, $303 = 0.0, $304 = 0, $305 = 0, $306 = 0.0, $307 = 0.0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0.0, $312 = 0.0, $313 = 0.0, $314 = 0.0, $315 = 0, $316 = 0, $317 = 0, $32 = 0.0; - var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; - var $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0, $63 = 0, $64 = 0.0, $65 = 0.0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0.0; - var $7 = 0, $70 = 0.0, $71 = 0, $72 = 0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0.0, $85 = 0.0, $86 = 0, $87 = 0; - var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0.0, $ch$06 = 0, $en0$0$lcssa$i = 0.0, $en0$019$i = 0.0, $en0$1$i = 0.0, $en0$28$us$i = 0.0, $en0$3$i = 0.0, $en0$3$i$1 = 0.0; - var $en0$3$i$2 = 0.0, $en0$3$us$i = 0.0, $en0$4$i = 0.0, $en0$4$i$1 = 0.0, $en0$4$i$2 = 0.0, $en0$4$us$i = 0.0, $exitcond38$i = 0, $exitcond39$i = 0, $exitcond40$i = 0, $exitcond41$i = 0, $exitcond42$i = 0, $gr$010 = 0, $i$011$us$i = 0, $j$0$lcssa$i = 0, $j$025$i = 0, $j$1$lcssa$i = 0, $j$118$i = 0, $j$213$i = 0, $j$3$lcssa$i = 0, $j$310$us$i = 0; - var $j$46$us$i = 0, $l$07$us$i = 0, $l3_xmin$i = 0, $noise$i = 0, $or$cond$i = 0, $scalefac_sav = 0, $sfb$0$lcssa$i = 0, $sfb$026$i = 0, $sfb$05 = 0, $sfb$115$i = 0, $sfb2$045$i = 0, $sfb2$114$i = 0, $sfb2$2$lcssa$i = 0, $sfb2$212$us$i = 0, $xfsf$i = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 496|0; - $l3_xmin$i = sp + 340|0; - $xfsf$i = sp + 184|0; - $noise$i = sp + 160|0; - $scalefac_sav = sp; - $0 = ((($gfc)) + 76|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)>(0); - if (!($2)) { - STACKTOP = sp;return; - } - $3 = ((($gfc)) + 72|0); - $4 = ((($gfc)) + 85804|0); - $5 = ((($gfc)) + 212|0); - $6 = ((($gfc)) + 85796|0); - $$phi$trans$insert$i = ((($gfc)) + 21360|0); - $7 = ((($gfc)) + 216|0); - $8 = ((($noise$i)) + 12|0); - $9 = ((($noise$i)) + 8|0); - $10 = ((($noise$i)) + 4|0); - $11 = ((($noise$i)) + 16|0); - $$pre = HEAP32[$3>>2]|0; - $12 = $$pre;$315 = $1;$gr$010 = 0; - while(1) { - $13 = ($12|0)>(0); - if ($13) { - $14 = ($gr$010|0)==(1); - $ch$06 = 0; - while(1) { - $15 = ((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0); - $16 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4608|0); - _memcpy(($scalefac_sav|0),($16|0),156)|0; - if ($14) { - $17 = (((((($gfc)) + 10808|0) + (($ch$06*5252)|0)|0)) + 4848|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($18|0)>(0); - if ($19) { - $317 = $18;$sfb$05 = 0; - while(1) { - $20 = ((((((($gfc)) + 10808|0) + (($ch$06*5252)|0)|0)) + 4608|0) + ($sfb$05<<2)|0); - $21 = HEAP32[$20>>2]|0; - $22 = ($21|0)<(0); - if ($22) { - $23 = ((((((($gfc)) + 304|0) + (($ch$06*5252)|0)|0)) + 4608|0) + ($sfb$05<<2)|0); - $24 = HEAP32[$23>>2]|0; - HEAP32[$20>>2] = $24; - $$pre19 = HEAP32[$17>>2]|0; - $27 = $$pre19; - } else { - $27 = $317; - } - $25 = (($sfb$05) + 1)|0; - $26 = ($25|0)<($27|0); - if ($26) { - $317 = $27;$sfb$05 = $25; - } else { - break; - } - } - } - } - $28 = ((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0); - $29 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4836|0); - $30 = HEAP32[$29>>2]|0; - $31 = ($30|0)==(0); - $32 = $31 ? 0.5 : 1.0; - (_calc_xmin($gfc,$28,$15,$l3_xmin$i)|0); - (_calc_noise($15,$l3_xmin$i,$xfsf$i,$noise$i,0)|0); - $33 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4848|0); - $34 = HEAP32[$33>>2]|0; - $35 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4788|0); - $36 = HEAP32[$35>>2]|0; - $37 = ($36|0)==(2); - if ($37) { - label = 12; - } else { - $38 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4792|0); - $39 = HEAP32[$38>>2]|0; - $40 = ($39|0)==(0); - if ($40) { - $sfb2$045$i = 22; - label = 13; - } else { - label = 12; - } - } - if ((label|0) == 12) { - label = 0; - $41 = ($34|0)>(0); - if ($41) { - $sfb2$045$i = $34; - label = 13; - } else { - $j$0$lcssa$i = 0;$sfb$0$lcssa$i = 0; - } - } - if ((label|0) == 13) { - label = 0; - $42 = HEAP32[$4>>2]|0; - $43 = HEAP32[$6>>2]|0; - $44 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4832|0); - $45 = HEAP32[$44>>2]|0; - $46 = ($45|0)!=(0); - $$pre$i = HEAP32[$$phi$trans$insert$i>>2]|0; - $51 = $$pre$i;$j$025$i = 0;$sfb$026$i = 0; - while(1) { - $47 = (($sfb$026$i) + 1)|0; - $48 = (((($gfc)) + 21360|0) + ($47<<2)|0); - $49 = HEAP32[$48>>2]|0; - $50 = (($49) - ($51))|0; - $52 = ($j$025$i|0)<($49|0); - if ($52) { - $en0$019$i = 0.0;$j$118$i = $j$025$i; - while(1) { - $53 = (((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0) + ($j$118$i<<2)|0); - $54 = +HEAPF32[$53>>2]; - $55 = $54 * $54; - $56 = $55 + $en0$019$i; - $57 = (($j$118$i) + 1)|0; - $exitcond41$i = ($57|0)==($49|0); - if ($exitcond41$i) { - $en0$0$lcssa$i = $56;$j$1$lcssa$i = $49; - break; - } else { - $en0$019$i = $56;$j$118$i = $57; - } - } - } else { - $en0$0$lcssa$i = 0.0;$j$1$lcssa$i = $j$025$i; - } - $58 = (+($50|0)); - $59 = $en0$0$lcssa$i / $58; - $60 = $59 * 999999986991104.0; - $61 = $60; - $62 = (((((($42)) + 190712|0) + (($gr$010*704)|0)|0) + (($ch$06*176)|0)|0) + ($sfb$026$i<<3)|0); - HEAPF64[$62>>3] = $61; - $63 = (($l3_xmin$i) + ($sfb$026$i<<2)|0); - $64 = +HEAPF32[$63>>2]; - $65 = $64 * 999999986991104.0; - $66 = (($xfsf$i) + ($sfb$026$i<<2)|0); - $67 = +HEAPF32[$66>>2]; - $68 = $65 * $67; - $69 = $68 / $58; - $70 = $69; - $71 = (((((($42)) + 201208|0) + (($gr$010*352)|0)|0) + (($ch$06*176)|0)|0) + ($sfb$026$i<<3)|0); - HEAPF64[$71>>3] = $70; - $72 = (((((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0)) + 244|0) + ($sfb$026$i<<2)|0); - $73 = +HEAPF32[$72>>2]; - $74 = $73 > 0.0; - if ($74) { - $75 = HEAP32[$5>>2]|0; - $76 = ($75|0)==(0); - $77 = $59 / $73; - $$4$i = $76 ? $77 : 0.0; - $en0$1$i = $$4$i; - } else { - $en0$1$i = 0.0; - } - $78 = (((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0) + ($sfb$026$i<<2)|0); - $79 = +HEAPF32[$78>>2]; - $80 = $79 * $en0$1$i; - $81 = (((($43)) + 24|0) + ($sfb$026$i<<2)|0); - $82 = +HEAPF32[$81>>2]; - $83 = $80 > $82; - $$2$i = $83 ? $80 : $82; - $84 = $$2$i * 999999986991104.0; - $85 = $84; - $86 = (((((($42)) + 189304|0) + (($gr$010*704)|0)|0) + (($ch$06*176)|0)|0) + ($sfb$026$i<<3)|0); - HEAPF64[$86>>3] = $85; - $87 = (((((($42)) + 199160|0) + (($gr$010*352)|0)|0) + (($ch$06*176)|0)|0) + ($sfb$026$i<<3)|0); - HEAPF64[$87>>3] = 0.0; - $88 = ($sfb$026$i|0)>(10); - $or$cond$i = $46 & $88; - if ($or$cond$i) { - $89 = (12112 + ($sfb$026$i<<2)|0); - $90 = HEAP32[$89>>2]|0; - $91 = (+($90|0)); - $92 = $32 * $91; - $93 = -$92; - $94 = $93; - HEAPF64[$87>>3] = $94; - $102 = $94; - } else { - $102 = 0.0; - } - $95 = ($sfb$026$i|0)<(21); - if ($95) { - $96 = (((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4608|0) + ($sfb$026$i<<2)|0); - $97 = HEAP32[$96>>2]|0; - $98 = (+($97|0)); - $99 = $98 * $32; - $100 = $99; - $101 = $102 - $100; - HEAPF64[$87>>3] = $101; - } - $exitcond42$i = ($47|0)==($sfb2$045$i|0); - if ($exitcond42$i) { - $j$0$lcssa$i = $j$1$lcssa$i;$sfb$0$lcssa$i = $sfb2$045$i; - break; - } else { - $51 = $49;$j$025$i = $j$1$lcssa$i;$sfb$026$i = $47; - } - } - } - if ($37) { - $103 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4852|0); - $104 = HEAP32[$103>>2]|0; - $105 = ($104|0)<(13); - if ($105) { - $106 = HEAP32[$4>>2]|0; - $107 = HEAP32[$5>>2]|0; - $108 = ($107|0)==(0); - $109 = HEAP32[$6>>2]|0; - $$phi$trans$insert43$i = (((($gfc)) + 21452|0) + ($104<<2)|0); - $$pre44$i = HEAP32[$$phi$trans$insert43$i>>2]|0; - $110 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4808|0); - $111 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4812|0); - $112 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4816|0); - $116 = $$pre44$i;$j$213$i = $j$0$lcssa$i;$sfb$115$i = $104;$sfb2$114$i = $sfb$0$lcssa$i; - while(1) { - $118 = (($sfb$115$i) + 1)|0; - $119 = (((($gfc)) + 21452|0) + ($118<<2)|0); - $120 = HEAP32[$119>>2]|0; - $121 = (($120) - ($116))|0; - $122 = ($120|0)>($116|0); - $123 = (+($121|0)); - $124 = ($sfb$115$i*3)|0; - $125 = (((($109)) + 112|0) + ($sfb$115$i<<2)|0); - $126 = +HEAPF32[$125>>2]; - $127 = ($sfb$115$i|0)<(12); - if ($122) { - $114 = ($120*3)|0; - $i$011$us$i = 0;$j$310$us$i = $j$213$i;$sfb2$212$us$i = $sfb2$114$i; - while(1) { - $en0$28$us$i = 0.0;$j$46$us$i = $j$310$us$i;$l$07$us$i = $116; - while(1) { - $184 = (((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0) + ($j$46$us$i<<2)|0); - $185 = +HEAPF32[$184>>2]; - $186 = $185 * $185; - $187 = $186 + $en0$28$us$i; - $188 = (($j$46$us$i) + 1)|0; - $189 = (($l$07$us$i) + 1)|0; - $exitcond38$i = ($189|0)==($120|0); - if ($exitcond38$i) { - $$lcssa27 = $187; - break; - } else { - $en0$28$us$i = $187;$j$46$us$i = $188;$l$07$us$i = $189; - } - } - $140 = (($j$310$us$i) + ($121))|0; - $141 = $$lcssa27 / $123; - $142 = $141; - $143 = $142 > 9.9999999999999995E-21; - $144 = $143 ? $141 : 9.9999996826552254E-21; - $145 = $144 * 999999986991104.0; - $146 = $145; - $147 = (($i$011$us$i) + ($124))|0; - $148 = (((((($106)) + 194616|0) + (($gr$010*1248)|0)|0) + (($ch$06*312)|0)|0) + ($147<<3)|0); - HEAPF64[$148>>3] = $146; - $149 = (($l3_xmin$i) + ($sfb2$212$us$i<<2)|0); - $150 = +HEAPF32[$149>>2]; - $151 = $150 * 999999986991104.0; - $152 = (($xfsf$i) + ($sfb2$212$us$i<<2)|0); - $153 = +HEAPF32[$152>>2]; - $154 = $151 * $153; - $155 = $154 / $123; - $156 = $155; - $157 = (((((($106)) + 201912|0) + (($gr$010*624)|0)|0) + (($ch$06*312)|0)|0) + ($147<<3)|0); - HEAPF64[$157>>3] = $156; - $158 = ((((((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0)) + 332|0) + (($sfb$115$i*12)|0)|0) + ($i$011$us$i<<2)|0); - $159 = +HEAPF32[$158>>2]; - if ($108) { - $160 = $159 > 0.0; - $161 = $144 / $159; - $en0$3$us$i = $160 ? $161 : 0.0; - $162 = HEAP32[$7>>2]|0; - $163 = ($162|0)==(0); - if ($163) { - $en0$4$us$i = $en0$3$us$i; - } else { - label = 33; - } - } else { - label = 33; - } - if ((label|0) == 33) { - label = 0; - $en0$4$us$i = 0.0; - } - $164 = ((((((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0)) + 88|0) + (($sfb$115$i*12)|0)|0) + ($i$011$us$i<<2)|0); - $165 = +HEAPF32[$164>>2]; - $166 = $165 * $en0$4$us$i; - $167 = $166 > $126; - $$3$us$i = $167 ? $166 : $126; - $168 = $$3$us$i * 999999986991104.0; - $169 = $168; - $170 = (((((($106)) + 192120|0) + (($gr$010*1248)|0)|0) + (($ch$06*312)|0)|0) + ($147<<3)|0); - HEAPF64[$170>>3] = $169; - $171 = (((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4808|0) + ($i$011$us$i<<2)|0); - $172 = HEAP32[$171>>2]|0; - $173 = (+($172|0)); - $174 = $173 * -2.0; - $175 = (((((($106)) + 199864|0) + (($gr$010*624)|0)|0) + (($ch$06*312)|0)|0) + ($147<<3)|0); - HEAPF64[$175>>3] = $174; - if ($127) { - $176 = (((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4608|0) + ($sfb2$212$us$i<<2)|0); - $177 = HEAP32[$176>>2]|0; - $178 = (+($177|0)); - $179 = $178 * $32; - $180 = $179; - $181 = $174 - $180; - HEAPF64[$175>>3] = $181; - } - $182 = (($sfb2$212$us$i) + 1)|0; - $183 = (($i$011$us$i) + 1)|0; - $exitcond39$i = ($183|0)==(3); - if ($exitcond39$i) { - break; - } else { - $i$011$us$i = $183;$j$310$us$i = $140;$sfb2$212$us$i = $182; - } - } - $113 = (($j$213$i) + ($114))|0; - $115 = Math_imul($116, -3)|0; - $117 = (($113) + ($115))|0; - $j$3$lcssa$i = $117; - } else { - $128 = (((((($106)) + 194616|0) + (($gr$010*1248)|0)|0) + (($ch$06*312)|0)|0) + ($124<<3)|0); - HEAPF64[$128>>3] = 9.9999997473787516E-6; - $129 = (($l3_xmin$i) + ($sfb2$114$i<<2)|0); - $130 = +HEAPF32[$129>>2]; - $131 = $130 * 999999986991104.0; - $132 = (($xfsf$i) + ($sfb2$114$i<<2)|0); - $133 = +HEAPF32[$132>>2]; - $134 = $131 * $133; - $135 = $134 / $123; - $136 = $135; - $137 = (((((($106)) + 201912|0) + (($gr$010*624)|0)|0) + (($ch$06*312)|0)|0) + ($124<<3)|0); - HEAPF64[$137>>3] = $136; - $138 = (((((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0)) + 332|0) + (($sfb$115$i*12)|0)|0); - $139 = +HEAPF32[$138>>2]; - if ($108) { - $190 = $139 > 0.0; - $191 = 9.9999996826552254E-21 / $139; - $en0$3$i = $190 ? $191 : 0.0; - $192 = HEAP32[$7>>2]|0; - $193 = ($192|0)==(0); - if ($193) { - $en0$4$i = $en0$3$i; - } else { - label = 40; - } - } else { - label = 40; - } - if ((label|0) == 40) { - label = 0; - $en0$4$i = 0.0; - } - $194 = (((((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0)) + 88|0) + (($sfb$115$i*12)|0)|0); - $195 = +HEAPF32[$194>>2]; - $196 = $195 * $en0$4$i; - $197 = $196 > $126; - $$3$i = $197 ? $196 : $126; - $198 = $$3$i * 999999986991104.0; - $199 = $198; - $200 = (((((($106)) + 192120|0) + (($gr$010*1248)|0)|0) + (($ch$06*312)|0)|0) + ($124<<3)|0); - HEAPF64[$200>>3] = $199; - $201 = HEAP32[$110>>2]|0; - $202 = (+($201|0)); - $203 = $202 * -2.0; - $204 = (((((($106)) + 199864|0) + (($gr$010*624)|0)|0) + (($ch$06*312)|0)|0) + ($124<<3)|0); - HEAPF64[$204>>3] = $203; - if ($127) { - $205 = (((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4608|0) + ($sfb2$114$i<<2)|0); - $206 = HEAP32[$205>>2]|0; - $207 = (+($206|0)); - $208 = $207 * $32; - $209 = $208; - $210 = $203 - $209; - HEAPF64[$204>>3] = $210; - } - $211 = (($sfb2$114$i) + 1)|0; - $212 = (($124) + 1)|0; - $213 = (((((($106)) + 194616|0) + (($gr$010*1248)|0)|0) + (($ch$06*312)|0)|0) + ($212<<3)|0); - HEAPF64[$213>>3] = 9.9999997473787516E-6; - $214 = (($l3_xmin$i) + ($211<<2)|0); - $215 = +HEAPF32[$214>>2]; - $216 = $215 * 999999986991104.0; - $217 = (($xfsf$i) + ($211<<2)|0); - $218 = +HEAPF32[$217>>2]; - $219 = $216 * $218; - $220 = $219 / $123; - $221 = $220; - $222 = (((((($106)) + 201912|0) + (($gr$010*624)|0)|0) + (($ch$06*312)|0)|0) + ($212<<3)|0); - HEAPF64[$222>>3] = $221; - $223 = (((((((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0)) + 332|0) + (($sfb$115$i*12)|0)|0)) + 4|0); - $224 = +HEAPF32[$223>>2]; - if ($108) { - $259 = $224 > 0.0; - $260 = 9.9999996826552254E-21 / $224; - $en0$3$i$1 = $259 ? $260 : 0.0; - $261 = HEAP32[$7>>2]|0; - $262 = ($261|0)==(0); - if ($262) { - $en0$4$i$1 = $en0$3$i$1; - } else { - label = 49; - } - } else { - label = 49; - } - if ((label|0) == 49) { - label = 0; - $en0$4$i$1 = 0.0; - } - $263 = (((((((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0)) + 88|0) + (($sfb$115$i*12)|0)|0)) + 4|0); - $264 = +HEAPF32[$263>>2]; - $265 = $264 * $en0$4$i$1; - $266 = $265 > $126; - $$3$i$1 = $266 ? $265 : $126; - $267 = $$3$i$1 * 999999986991104.0; - $268 = $267; - $269 = (((((($106)) + 192120|0) + (($gr$010*1248)|0)|0) + (($ch$06*312)|0)|0) + ($212<<3)|0); - HEAPF64[$269>>3] = $268; - $270 = HEAP32[$111>>2]|0; - $271 = (+($270|0)); - $272 = $271 * -2.0; - $273 = (((((($106)) + 199864|0) + (($gr$010*624)|0)|0) + (($ch$06*312)|0)|0) + ($212<<3)|0); - HEAPF64[$273>>3] = $272; - if ($127) { - $274 = (((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4608|0) + ($211<<2)|0); - $275 = HEAP32[$274>>2]|0; - $276 = (+($275|0)); - $277 = $276 * $32; - $278 = $277; - $279 = $272 - $278; - HEAPF64[$273>>3] = $279; - } - $280 = (($sfb2$114$i) + 2)|0; - $281 = (($124) + 2)|0; - $282 = (((((($106)) + 194616|0) + (($gr$010*1248)|0)|0) + (($ch$06*312)|0)|0) + ($281<<3)|0); - HEAPF64[$282>>3] = 9.9999997473787516E-6; - $283 = (($l3_xmin$i) + ($280<<2)|0); - $284 = +HEAPF32[$283>>2]; - $285 = $284 * 999999986991104.0; - $286 = (($xfsf$i) + ($280<<2)|0); - $287 = +HEAPF32[$286>>2]; - $288 = $285 * $287; - $289 = $288 / $123; - $290 = $289; - $291 = (((((($106)) + 201912|0) + (($gr$010*624)|0)|0) + (($ch$06*312)|0)|0) + ($281<<3)|0); - HEAPF64[$291>>3] = $290; - $292 = (((((((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0)) + 332|0) + (($sfb$115$i*12)|0)|0)) + 8|0); - $293 = +HEAPF32[$292>>2]; - if ($108) { - $294 = $293 > 0.0; - $295 = 9.9999996826552254E-21 / $293; - $en0$3$i$2 = $294 ? $295 : 0.0; - $296 = HEAP32[$7>>2]|0; - $297 = ($296|0)==(0); - if ($297) { - $en0$4$i$2 = $en0$3$i$2; - } else { - label = 54; - } - } else { - label = 54; - } - if ((label|0) == 54) { - label = 0; - $en0$4$i$2 = 0.0; - } - $298 = (((((((($ratio) + (($gr$010*976)|0)|0) + (($ch$06*488)|0)|0)) + 88|0) + (($sfb$115$i*12)|0)|0)) + 8|0); - $299 = +HEAPF32[$298>>2]; - $300 = $299 * $en0$4$i$2; - $301 = $300 > $126; - $$3$i$2 = $301 ? $300 : $126; - $302 = $$3$i$2 * 999999986991104.0; - $303 = $302; - $304 = (((((($106)) + 192120|0) + (($gr$010*1248)|0)|0) + (($ch$06*312)|0)|0) + ($281<<3)|0); - HEAPF64[$304>>3] = $303; - $305 = HEAP32[$112>>2]|0; - $306 = (+($305|0)); - $307 = $306 * -2.0; - $308 = (((((($106)) + 199864|0) + (($gr$010*624)|0)|0) + (($ch$06*312)|0)|0) + ($281<<3)|0); - HEAPF64[$308>>3] = $307; - if ($127) { - $309 = (((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4608|0) + ($280<<2)|0); - $310 = HEAP32[$309>>2]|0; - $311 = (+($310|0)); - $312 = $311 * $32; - $313 = $312; - $314 = $307 - $313; - HEAPF64[$308>>3] = $314; - $j$3$lcssa$i = $j$213$i; - } else { - $j$3$lcssa$i = $j$213$i; - } - } - $sfb2$2$lcssa$i = (($sfb2$114$i) + 3)|0; - $exitcond40$i = ($118|0)==(13); - if ($exitcond40$i) { - break; - } else { - $116 = $120;$j$213$i = $j$3$lcssa$i;$sfb$115$i = $118;$sfb2$114$i = $sfb2$2$lcssa$i; - } - } - } - } - $225 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4780|0); - $226 = HEAP32[$225>>2]|0; - $227 = HEAP32[$4>>2]|0; - $228 = ((((($227)) + 201112|0) + ($gr$010<<3)|0) + ($ch$06<<2)|0); - HEAP32[$228>>2] = $226; - $229 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4768|0); - $230 = HEAP32[$229>>2]|0; - $231 = ((((((($gfc)) + 304|0) + (($gr$010*10504)|0)|0) + (($ch$06*5252)|0)|0)) + 4844|0); - $232 = HEAP32[$231>>2]|0; - $233 = (($232) + ($230))|0; - $234 = ((((($227)) + 203400|0) + ($gr$010<<3)|0) + ($ch$06<<2)|0); - HEAP32[$234>>2] = $233; - $235 = HEAP32[$231>>2]|0; - $236 = ((((($227)) + 203416|0) + ($gr$010<<3)|0) + ($ch$06<<2)|0); - HEAP32[$236>>2] = $235; - $237 = HEAP32[$8>>2]|0; - $238 = ((((($227)) + 203160|0) + ($gr$010<<3)|0) + ($ch$06<<2)|0); - HEAP32[$238>>2] = $237; - $239 = +HEAPF32[$9>>2]; - $240 = $239; - $241 = $240 * 10.0; - $242 = ((((($227)) + 203208|0) + ($gr$010<<4)|0) + ($ch$06<<3)|0); - HEAPF64[$242>>3] = $241; - $243 = +HEAPF32[$noise$i>>2]; - $244 = $243; - $245 = $244 * 10.0; - $246 = ((((($227)) + 203240|0) + ($gr$010<<4)|0) + ($ch$06<<3)|0); - HEAPF64[$246>>3] = $245; - $247 = +HEAPF32[$10>>2]; - $248 = $247; - $249 = $248 * 10.0; - $250 = ((((($227)) + 203176|0) + ($gr$010<<4)|0) + ($ch$06<<3)|0); - HEAPF64[$250>>3] = $249; - $251 = HEAP32[$11>>2]|0; - $252 = ((((($227)) + 203272|0) + ($gr$010<<3)|0) + ($ch$06<<2)|0); - HEAP32[$252>>2] = $251; - _memcpy(($16|0),($scalefac_sav|0),156)|0; - $253 = (($ch$06) + 1)|0; - $254 = HEAP32[$3>>2]|0; - $255 = ($253|0)<($254|0); - if ($255) { - $ch$06 = $253; - } else { - $$lcssa28 = $254; - break; - } - } - $$pre20 = HEAP32[$0>>2]|0; - $258 = $$pre20;$316 = $$lcssa28; - } else { - $258 = $315;$316 = $12; - } - $256 = (($gr$010) + 1)|0; - $257 = ($256|0)<($258|0); - if ($257) { - $12 = $316;$315 = $258;$gr$010 = $256; - } else { - break; - } - } - STACKTOP = sp;return; -} -function _ResvFrameBegin($gfc,$mean_bits) { - $gfc = $gfc|0; - $mean_bits = $mean_bits|0; - var $$ = 0, $$1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $fullFrameBits$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_getframebits($gfc)|0); - $1 = ((($gfc)) + 24|0); - $2 = HEAP32[$1>>2]|0; - $3 = $2 << 3; - $4 = (($0) - ($3))|0; - $5 = ((($gfc)) + 76|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($4|0) / ($6|0))&-1; - $8 = $6 << 11; - $9 = (($8) + -8)|0; - $10 = ((($gfc)) + 148|0); - $11 = HEAP32[$10>>2]|0; - $12 = (($11) - ($0))|0; - $13 = ((($gfc)) + 52144|0); - $14 = ($12|0)>($9|0); - $$ = $14 ? $9 : $12; - HEAP32[$13>>2] = $$; - $15 = ($$|0)<(0); - if ($15) { - label = 3; - } else { - $16 = ((($gfc)) + 144|0); - $17 = HEAP32[$16>>2]|0; - $18 = ($17|0)==(0); - if ($18) { - $23 = $$; - } else { - label = 3; - } - } - if ((label|0) == 3) { - HEAP32[$13>>2] = 0; - $23 = 0; - } - $19 = Math_imul($6, $7)|0; - $20 = ((($gfc)) + 52140|0); - $21 = HEAP32[$20>>2]|0; - $22 = ($21|0)<($23|0); - $$1 = $22 ? $21 : $23; - $24 = (($$1) + ($19))|0; - $25 = ($24|0)>($11|0); - $fullFrameBits$0 = $25 ? $11 : $24; - $26 = ((($gfc)) + 21320|0); - HEAP32[$26>>2] = 0; - $27 = ((($gfc)) + 85804|0); - $28 = HEAP32[$27>>2]|0; - $29 = ($28|0)==(0|0); - if ($29) { - HEAP32[$mean_bits>>2] = $7; - return ($fullFrameBits$0|0); - } - $30 = (($7|0) / 2)&-1; - $31 = ((($28)) + 203484|0); - HEAP32[$31>>2] = $30; - $32 = ((($28)) + 203488|0); - HEAP32[$32>>2] = $21; - HEAP32[$mean_bits>>2] = $7; - return ($fullFrameBits$0|0); -} -function _ResvMaxBits($gfc,$mean_bits,$targ_bits,$extra_bits,$cbr) { - $gfc = $gfc|0; - $mean_bits = $mean_bits|0; - $targ_bits = $targ_bits|0; - $extra_bits = $extra_bits|0; - $cbr = $cbr|0; - var $$ = 0, $$1 = 0, $$1$ = 0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ResvMax$0 = 0, $add_bits$0 = 0, $targBits$0 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 52140|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($gfc)) + 52144|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($cbr|0)==(0); - $5 = $4 ? 0 : $mean_bits; - $$1 = (($1) + ($5))|0; - $6 = ((($gfc)) + 85096|0); - $7 = HEAP32[$6>>2]|0; - $8 = $7 & 1; - $9 = ($8|0)==(0); - if ($9) { - $ResvMax$0 = $3; - } else { - $10 = (+($3|0)); - $11 = $10 * 0.90000000000000002; - $12 = (~~(($11))); - $ResvMax$0 = $12; - } - $13 = ($$1*10)|0; - $14 = ($ResvMax$0*9)|0; - $15 = ($13|0)>($14|0); - if ($15) { - $16 = (($14|0) / 10)&-1; - $17 = (($$1) - ($16))|0; - $18 = (($17) + ($mean_bits))|0; - $19 = $7 | 128; - HEAP32[$6>>2] = $19; - $add_bits$0 = $17;$targBits$0 = $18; - } else { - $20 = $7 & 127; - HEAP32[$6>>2] = $20; - $21 = ((($gfc)) + 144|0); - $22 = HEAP32[$21>>2]|0; - $23 = $22 | $8; - $24 = ($23|0)==(0); - if ($24) { - $25 = (+($mean_bits|0)); - $26 = $25 * 0.90000000000000002; - $27 = (~~(($26))); - $add_bits$0 = 0;$targBits$0 = $27; - } else { - $add_bits$0 = 0;$targBits$0 = $mean_bits; - } - } - $28 = ($3*6)|0; - $29 = (($28|0) / 10)&-1; - $30 = ($$1|0)<($29|0); - $$1$ = $30 ? $$1 : $29; - $31 = (($$1$) - ($add_bits$0))|0; - $32 = ($31|0)<(0); - $$ = $32 ? 0 : $31; - HEAP32[$targ_bits>>2] = $targBits$0; - HEAP32[$extra_bits>>2] = $$; - return; -} -function _ResvAdjust($gfc,$gi) { - $gfc = $gfc|0; - $gi = $gi|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $sum = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gi)) + 4768|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($gi)) + 4844|0); - $3 = HEAP32[$2>>2]|0; - $4 = ((($gfc)) + 52140|0); - $5 = HEAP32[$4>>2]|0; - $sum = (($3) + ($1))|0; - $6 = (($5) - ($sum))|0; - HEAP32[$4>>2] = $6; - return; -} -function _ResvFrameEnd($gfc,$mean_bits) { - $gfc = $gfc|0; - $mean_bits = $mean_bits|0; - var $$stuffingBits$1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0; - var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $stuffingBits$1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 76|0); - $1 = HEAP32[$0>>2]|0; - $2 = Math_imul($1, $mean_bits)|0; - $3 = ((($gfc)) + 52140|0); - $4 = HEAP32[$3>>2]|0; - $5 = (($4) + ($2))|0; - $6 = ((($gfc)) + 21324|0); - $7 = ((($gfc)) + 21320|0); - $8 = (($5|0) % 8)&-1; - $9 = (($5) - ($8))|0; - $10 = ((($gfc)) + 52144|0); - $11 = HEAP32[$10>>2]|0; - $12 = (($9) - ($11))|0; - $13 = ($12|0)>(0); - $14 = $13 ? $12 : 0; - $stuffingBits$1 = (($14) + ($8))|0; - $15 = ((($gfc)) + 21312|0); - $16 = HEAP32[$15>>2]|0; - $17 = $16 << 3; - $18 = ($17|0)<($stuffingBits$1|0); - $$stuffingBits$1 = $18 ? $17 : $stuffingBits$1; - $19 = (($$stuffingBits$1|0) / 8)&-1; - $20 = $19 << 3; - HEAP32[$7>>2] = $20; - $21 = (($stuffingBits$1) - ($20))|0; - $22 = (($5) - ($20))|0; - $23 = (($16) - ($19))|0; - HEAP32[$15>>2] = $23; - HEAP32[$6>>2] = $21; - $24 = (($22) - ($21))|0; - HEAP32[$3>>2] = $24; - return; -} -function _lame_set_in_samplerate($gfp,$in_samplerate) { - $gfp = $gfp|0; - $in_samplerate = $in_samplerate|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 12|0); - HEAP32[$2>>2] = $in_samplerate; - $$0 = 0; - return ($$0|0); -} -function _lame_set_num_channels($gfp,$num_channels) { - $gfp = $gfp|0; - $num_channels = $num_channels|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ($num_channels|0)>(2); - $3 = ($num_channels|0)==(0); - $or$cond = $2 | $3; - if ($or$cond) { - $$0 = -1; - return ($$0|0); - } - $4 = ((($gfp)) + 8|0); - HEAP32[$4>>2] = $num_channels; - $$0 = 0; - return ($$0|0); -} -function _lame_set_scale($gfp,$scale) { - $gfp = $gfp|0; - $scale = +$scale; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 20|0); - HEAPF32[$2>>2] = $scale; - $$0 = 0; - return ($$0|0); -} -function _lame_get_scale($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 20|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _lame_set_mode($gfp,$mode) { - $gfp = $gfp|0; - $mode = $mode|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - $2 = ($mode>>>0)>(4); - $or$cond = $2 | $1; - if ($or$cond) { - $$0 = -1; - return ($$0|0); - } - $3 = ((($gfp)) + 48|0); - HEAP32[$3>>2] = $mode; - $$0 = 0; - return ($$0|0); -} -function _lame_set_brate($gfp,$brate) { - $gfp = $gfp|0; - $brate = $brate|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 96|0); - HEAP32[$2>>2] = $brate; - $3 = ($brate|0)>(320); - if (!($3)) { - $$0 = 0; - return ($$0|0); - } - $4 = ((($gfp)) + 128|0); - HEAP32[$4>>2] = 1; - $$0 = 0; - return ($$0|0); -} -function _lame_set_quant_comp($gfp,$quant_type) { - $gfp = $gfp|0; - $quant_type = $quant_type|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 132|0); - HEAP32[$2>>2] = $quant_type; - $$0 = 0; - return ($$0|0); -} -function _lame_set_quant_comp_short($gfp,$quant_type) { - $gfp = $gfp|0; - $quant_type = $quant_type|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 136|0); - HEAP32[$2>>2] = $quant_type; - $$0 = 0; - return ($$0|0); -} -function _lame_get_quant_comp($gfp) { - $gfp = $gfp|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0; - return ($$0|0); - } - $2 = ((($gfp)) + 132|0); - $3 = HEAP32[$2>>2]|0; - $$0 = $3; - return ($$0|0); -} -function _lame_get_quant_comp_short($gfp) { - $gfp = $gfp|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0; - return ($$0|0); - } - $2 = ((($gfp)) + 136|0); - $3 = HEAP32[$2>>2]|0; - $$0 = $3; - return ($$0|0); -} -function _lame_set_experimentalY($gfp,$experimentalY) { - $gfp = $gfp|0; - $experimentalY = $experimentalY|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 140|0); - HEAP32[$2>>2] = $experimentalY; - $$0 = 0; - return ($$0|0); -} -function _lame_set_exp_nspsytune($gfp,$exp_nspsytune) { - $gfp = $gfp|0; - $exp_nspsytune = $exp_nspsytune|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 148|0); - HEAP32[$2>>2] = $exp_nspsytune; - $$0 = 0; - return ($$0|0); -} -function _lame_get_exp_nspsytune($gfp) { - $gfp = $gfp|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0; - return ($$0|0); - } - $2 = ((($gfp)) + 148|0); - $3 = HEAP32[$2>>2]|0; - $$0 = $3; - return ($$0|0); -} -function _lame_set_VBR($gfp,$VBR) { - $gfp = $gfp|0; - $VBR = $VBR|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - $2 = ($VBR>>>0)>(4); - $or$cond = $2 | $1; - if ($or$cond) { - $$0 = -1; - return ($$0|0); - } - $3 = ((($gfp)) + 156|0); - HEAP32[$3>>2] = $VBR; - $$0 = 0; - return ($$0|0); -} -function _lame_get_VBR($gfp) { - $gfp = $gfp|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0; - return ($$0|0); - } - $2 = ((($gfp)) + 156|0); - $3 = HEAP32[$2>>2]|0; - $$0 = $3; - return ($$0|0); -} -function _lame_set_VBR_q($gfp,$VBR_q) { - $gfp = $gfp|0; - $VBR_q = $VBR_q|0; - var $$01 = 0, $$1 = 0, $$VBR_q = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $VBR_q$lobit = 0, $ret$1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$01 = -1; - return ($$01|0); - } - $2 = ($VBR_q|0)<(0); - $$VBR_q = $2 ? 0 : $VBR_q; - $VBR_q$lobit = $VBR_q >> 31; - $3 = ($$VBR_q|0)>(9); - $$1 = $3 ? 9 : $$VBR_q; - $ret$1 = $3 ? -1 : $VBR_q$lobit; - $4 = ((($gfp)) + 164|0); - HEAP32[$4>>2] = $$1; - $5 = ((($gfp)) + 160|0); - HEAPF32[$5>>2] = 0.0; - $$01 = $ret$1; - return ($$01|0); -} -function _lame_set_VBR_mean_bitrate_kbps($gfp,$VBR_mean_bitrate_kbps) { - $gfp = $gfp|0; - $VBR_mean_bitrate_kbps = $VBR_mean_bitrate_kbps|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 168|0); - HEAP32[$2>>2] = $VBR_mean_bitrate_kbps; - $$0 = 0; - return ($$0|0); -} -function _lame_get_VBR_mean_bitrate_kbps($gfp) { - $gfp = $gfp|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0; - return ($$0|0); - } - $2 = ((($gfp)) + 168|0); - $3 = HEAP32[$2>>2]|0; - $$0 = $3; - return ($$0|0); -} -function _lame_set_maskingadjust($gfp,$adjust) { - $gfp = $gfp|0; - $adjust = +$adjust; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 200|0); - HEAPF32[$2>>2] = $adjust; - $$0 = 0; - return ($$0|0); -} -function _lame_get_maskingadjust($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 200|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _lame_set_maskingadjust_short($gfp,$adjust) { - $gfp = $gfp|0; - $adjust = +$adjust; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 204|0); - HEAPF32[$2>>2] = $adjust; - $$0 = 0; - return ($$0|0); -} -function _lame_get_maskingadjust_short($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 204|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _lame_set_ATHtype($gfp,$ATHtype) { - $gfp = $gfp|0; - $ATHtype = $ATHtype|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 220|0); - HEAP32[$2>>2] = $ATHtype; - $$0 = 0; - return ($$0|0); -} -function _lame_set_ATHcurve($gfp,$ATHcurve) { - $gfp = $gfp|0; - $ATHcurve = +$ATHcurve; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 224|0); - HEAPF32[$2>>2] = $ATHcurve; - $$0 = 0; - return ($$0|0); -} -function _lame_get_ATHcurve($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 224|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _lame_set_ATHlower($gfp,$ATHlower) { - $gfp = $gfp|0; - $ATHlower = +$ATHlower; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 228|0); - HEAPF32[$2>>2] = $ATHlower; - $$0 = 0; - return ($$0|0); -} -function _lame_get_ATHlower($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 228|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _lame_set_athaa_sensitivity($gfp,$athaa_sensitivity) { - $gfp = $gfp|0; - $athaa_sensitivity = +$athaa_sensitivity; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 236|0); - HEAPF32[$2>>2] = $athaa_sensitivity; - $$0 = 0; - return ($$0|0); -} -function _lame_get_athaa_sensitivity($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 236|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _lame_set_interChRatio($gfp,$ratio) { - $gfp = $gfp|0; - $ratio = +$ratio; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $notlhs = 0, $notrhs = 0, $or$cond$not = 0, $or$cond2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $notlhs = ($0|0)==(0); - $notrhs = !($ratio >= 0.0); - $or$cond$not = $notrhs | $notlhs; - $1 = !($ratio <= 1.0); - $or$cond2 = $1 | $or$cond$not; - if ($or$cond2) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 248|0); - HEAPF32[$2>>2] = $ratio; - $$0 = 0; - return ($$0|0); -} -function _lame_get_interChRatio($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 248|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _lame_set_sfscale($gfp,$val) { - $gfp = $gfp|0; - $val = $val|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ($val|0)!=(0); - $3 = $2 ? 2 : 1; - $4 = ((($gfp)) + 84|0); - HEAP32[$4>>2] = $3; - $$0 = 0; - return ($$0|0); -} -function _lame_set_short_threshold_lrm($gfp,$lrm) { - $gfp = $gfp|0; - $lrm = +$lrm; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 264|0); - HEAPF32[$2>>2] = $lrm; - $$0 = 0; - return ($$0|0); -} -function _lame_get_short_threshold_lrm($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 264|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _lame_set_short_threshold_s($gfp,$s) { - $gfp = $gfp|0; - $s = +$s; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = -1; - return ($$0|0); - } - $2 = ((($gfp)) + 268|0); - HEAPF32[$2>>2] = $s; - $$0 = 0; - return ($$0|0); -} -function _lame_get_short_threshold_s($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 268|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _lame_set_msfix($gfp,$msfix) { - $gfp = $gfp|0; - $msfix = +$msfix; - var $0 = 0, $1 = 0, $2 = 0.0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - return; - } - $2 = $msfix; - $3 = ((($gfp)) + 252|0); - HEAPF32[$3>>2] = $2; - return; -} -function _lame_get_msfix($gfp) { - $gfp = $gfp|0; - var $$0 = 0.0, $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_is_lame_global_flags_valid($gfp)|0); - $1 = ($0|0)==(0); - if ($1) { - $$0 = 0.0; - return (+$$0); - } - $2 = ((($gfp)) + 252|0); - $3 = +HEAPF32[$2>>2]; - $$0 = $3; - return (+$$0); -} -function _noquant_count_bits($gfc,$gi,$prev_noise) { - $gfc = $gfc|0; - $gi = $gi|0; - $prev_noise = $prev_noise|0; - var $$ = 0, $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0; - var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; - var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; - var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0; - var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0; - var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0; - var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $a1$0$lcssa = 0, $a1$04 = 0, $a1$2 = 0, $a2$0$lcssa = 0, $a2$03 = 0, $a2$1 = 0, $bits = 0, $i$0 = 0, $i$0$lcssa = 0, $i$0$lcssa24 = 0, $i$025 = 0, $i$1$ = 0, $i$1$1 = 0, $i$1$lcssa = 0; - var $i$1$lcssa17 = 0, $i$15 = 0, $sfb$0 = 0, $sfb$0$lcssa = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $bits = sp; - HEAP32[$bits>>2] = 0; - $0 = ((($gi)) + 2304|0); - $1 = ((($gi)) + 5208|0); - $2 = HEAP32[$1>>2]|0; - $3 = (($2) + 2)|0; - $4 = $3 & -2; - $5 = ($4|0)>(576); - $$ = $5 ? 576 : $4; - $6 = ($prev_noise|0)!=(0|0); - if ($6) { - $7 = ((($prev_noise)) + 4|0); - HEAP32[$7>>2] = 0; - $i$0 = $$; - } else { - $i$0 = $$; - } - while(1) { - $8 = ($i$0|0)>(1); - if (!($8)) { - $i$0$lcssa = $i$0; - label = 4; - break; - } - $10 = (($i$0) + -1)|0; - $11 = (((($gi)) + 2304|0) + ($10<<2)|0); - $12 = HEAP32[$11>>2]|0; - $13 = (($i$0) + -2)|0; - $14 = (((($gi)) + 2304|0) + ($13<<2)|0); - $15 = HEAP32[$14>>2]|0; - $16 = $15 | $12; - $17 = ($16|0)==(0); - if ($17) { - $i$0 = $13; - } else { - $i$0$lcssa24 = $i$0; - label = 6; - break; - } - } - if ((label|0) == 4) { - $9 = ((($gi)) + 4776|0); - HEAP32[$9>>2] = $i$0$lcssa; - $i$025 = $i$0$lcssa; - label = 9; - } - else if ((label|0) == 6) { - $18 = ((($gi)) + 4776|0); - HEAP32[$18>>2] = $i$0$lcssa24; - $19 = ($i$0$lcssa24|0)>(3); - if ($19) { - $a1$04 = 0;$a2$03 = 0;$i$15 = $i$0$lcssa24; - while(1) { - $20 = (($i$15) + -4)|0; - $21 = (((($gi)) + 2304|0) + ($20<<2)|0); - $22 = HEAP32[$21>>2]|0; - $23 = (($i$15) + -3)|0; - $24 = (((($gi)) + 2304|0) + ($23<<2)|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($i$15) + -2)|0; - $27 = (((($gi)) + 2304|0) + ($26<<2)|0); - $28 = HEAP32[$27>>2]|0; - $29 = (($i$15) + -1)|0; - $30 = (((($gi)) + 2304|0) + ($29<<2)|0); - $31 = HEAP32[$30>>2]|0; - $32 = $25 | $22; - $33 = $32 | $28; - $34 = $33 | $31; - $35 = ($34>>>0)>(1); - if ($35) { - $a1$0$lcssa = $a1$04;$a2$0$lcssa = $a2$03;$i$1$lcssa = $i$15; - break; - } - $36 = $22 << 1; - $37 = (($36) + ($25))|0; - $38 = $37 << 1; - $39 = (($38) + ($28))|0; - $40 = $39 << 1; - $41 = (($40) + ($31))|0; - $42 = (82240 + ($41)|0); - $43 = HEAP8[$42>>0]|0; - $44 = $43&255; - $45 = (($44) + ($a1$04))|0; - $46 = (82256 + ($41)|0); - $47 = HEAP8[$46>>0]|0; - $48 = $47&255; - $49 = (($48) + ($a2$03))|0; - $50 = ($20|0)>(3); - if ($50) { - $a1$04 = $45;$a2$03 = $49;$i$15 = $20; - } else { - $a1$0$lcssa = $45;$a2$0$lcssa = $49;$i$1$lcssa = $20; - break; - } - } - HEAP32[$bits>>2] = $a1$0$lcssa; - $52 = ((($gi)) + 4840|0); - HEAP32[$52>>2] = 0; - $53 = ($a1$0$lcssa|0)>($a2$0$lcssa|0); - if ($53) { - HEAP32[$bits>>2] = $a2$0$lcssa; - HEAP32[$52>>2] = 1; - $55 = $a2$0$lcssa;$i$1$lcssa17 = $i$1$lcssa; - } else { - $55 = $a1$0$lcssa;$i$1$lcssa17 = $i$1$lcssa; - } - } else { - $i$025 = $i$0$lcssa24; - label = 9; - } - } - if ((label|0) == 9) { - HEAP32[$bits>>2] = 0; - $51 = ((($gi)) + 4840|0); - HEAP32[$51>>2] = 0; - $55 = 0;$i$1$lcssa17 = $i$025; - } - $54 = ((($gi)) + 5184|0); - HEAP32[$54>>2] = $55; - $56 = ((($gi)) + 4772|0); - HEAP32[$56>>2] = $i$1$lcssa17; - $57 = ($i$1$lcssa17|0)==(0); - if ($57) { - $$0 = HEAP32[$bits>>2]|0; - STACKTOP = sp;return ($$0|0); - } - $58 = ((($gi)) + 4788|0); - $59 = HEAP32[$58>>2]|0; - if ((($59|0) == 2)) { - $60 = ((($gfc)) + 21464|0); - $61 = HEAP32[$60>>2]|0; - $62 = ($61*3)|0; - $63 = ($62|0)>($i$1$lcssa17|0); - $i$1$ = $63 ? $i$1$lcssa17 : $62; - $a1$2 = $i$1$;$a2$1 = $i$1$lcssa17; - } else if ((($59|0) == 0)) { - $64 = (($i$1$lcssa17) + -2)|0; - $65 = (((($gfc)) + 85100|0) + ($64)|0); - $66 = HEAP8[$65>>0]|0; - $67 = $66 << 24 >> 24; - $68 = ((($gi)) + 4824|0); - HEAP32[$68>>2] = $67; - $69 = (($i$1$lcssa17) + -1)|0; - $70 = (((($gfc)) + 85100|0) + ($69)|0); - $71 = HEAP8[$70>>0]|0; - $72 = $71 << 24 >> 24; - $73 = ((($gi)) + 4828|0); - HEAP32[$73>>2] = $72; - $74 = (($67) + 2)|0; - $75 = (($74) + ($72))|0; - $76 = (((($gfc)) + 21360|0) + ($75<<2)|0); - $77 = HEAP32[$76>>2]|0; - $78 = (($67) + 1)|0; - $79 = (((($gfc)) + 21360|0) + ($78<<2)|0); - $80 = HEAP32[$79>>2]|0; - $81 = ($77|0)<($i$1$lcssa17|0); - if ($81) { - $82 = ((($gfc)) + 85816|0); - $83 = HEAP32[$82>>2]|0; - $84 = (((($gi)) + 2304|0) + ($77<<2)|0); - $85 = (((($gi)) + 2304|0) + ($i$1$lcssa17<<2)|0); - $86 = (FUNCTION_TABLE_iiii[$83 & 3]($84,$85,$bits)|0); - $87 = ((($gi)) + 4804|0); - HEAP32[$87>>2] = $86; - $a1$2 = $80;$a2$1 = $77; - } else { - $a1$2 = $80;$a2$1 = $77; - } - } else { - $88 = ((($gi)) + 4824|0); - HEAP32[$88>>2] = 7; - $89 = ((($gi)) + 4828|0); - HEAP32[$89>>2] = 13; - $90 = ((($gfc)) + 21392|0); - $91 = HEAP32[$90>>2]|0; - $92 = ($91|0)>($i$1$lcssa17|0); - $i$1$1 = $92 ? $i$1$lcssa17 : $91; - $a1$2 = $i$1$1;$a2$1 = $i$1$lcssa17; - } - $93 = ($a1$2|0)<($i$1$lcssa17|0); - $94 = $93 ? $a1$2 : $i$1$lcssa17; - $95 = ($a2$1|0)<($i$1$lcssa17|0); - $96 = $95 ? $a2$1 : $i$1$lcssa17; - $97 = ($94|0)>(0); - if ($97) { - $98 = ((($gfc)) + 85816|0); - $99 = HEAP32[$98>>2]|0; - $100 = (((($gi)) + 2304|0) + ($94<<2)|0); - $101 = (FUNCTION_TABLE_iiii[$99 & 3]($0,$100,$bits)|0); - $102 = ((($gi)) + 4796|0); - HEAP32[$102>>2] = $101; - } - $103 = ($94|0)<($96|0); - if ($103) { - $104 = ((($gfc)) + 85816|0); - $105 = HEAP32[$104>>2]|0; - $106 = (((($gi)) + 2304|0) + ($94<<2)|0); - $107 = (((($gi)) + 2304|0) + ($96<<2)|0); - $108 = (FUNCTION_TABLE_iiii[$105 & 3]($106,$107,$bits)|0); - $109 = ((($gi)) + 4800|0); - HEAP32[$109>>2] = $108; - } - $110 = ((($gfc)) + 36|0); - $111 = HEAP32[$110>>2]|0; - $112 = ($111|0)==(2); - if ($112) { - $113 = HEAP32[$bits>>2]|0; - $114 = ((($gi)) + 4768|0); - HEAP32[$114>>2] = $113; - _best_huffman_divide($gfc,$gi); - $115 = HEAP32[$114>>2]|0; - HEAP32[$bits>>2] = $115; - } - if (!($6)) { - $$0 = HEAP32[$bits>>2]|0; - STACKTOP = sp;return ($$0|0); - } - $116 = HEAP32[$58>>2]|0; - $117 = ($116|0)==(0); - if (!($117)) { - $$0 = HEAP32[$bits>>2]|0; - STACKTOP = sp;return ($$0|0); - } - $118 = HEAP32[$56>>2]|0; - $sfb$0 = 0; - while(1) { - $119 = (((($gfc)) + 21360|0) + ($sfb$0<<2)|0); - $120 = HEAP32[$119>>2]|0; - $121 = ($120|0)<($118|0); - $122 = (($sfb$0) + 1)|0; - if ($121) { - $sfb$0 = $122; - } else { - $sfb$0$lcssa = $sfb$0; - break; - } - } - $123 = ((($prev_noise)) + 4|0); - HEAP32[$123>>2] = $sfb$0$lcssa; - $$0 = HEAP32[$bits>>2]|0; - STACKTOP = sp;return ($$0|0); -} -function _best_huffman_divide($gfc,$gi) { - $gfc = $gfc|0; - $gi = $gi|0; - var $$ = 0, $$lcssa = 0, $$lcssa16 = 0, $$pre = 0, $$pre$phiZ2D = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0; - var $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0; - var $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0; - var $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0; - var $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0; - var $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0; - var $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0; - var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; - var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0; - var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0; - var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $a1$0$lcssa = 0, $a1$06 = 0, $a2$0$a1$0 = 0, $a2$0$lcssa = 0, $a2$05 = 0, $bits$i2 = 0, $cod_info2 = 0; - var $gi$idx = 0, $gi$idx$val = 0, $i$0$ = 0, $i$07 = 0, $r0$12$i = 0, $r01_bits = 0, $r01_div = 0, $r0_tbl = 0, $r0bits$i = 0, $r1$01$i = 0, $r1_tbl = 0, $r2$01$i = 0, $r2$01$i3 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 5632|0; - $bits$i2 = sp + 5624|0; - $r0bits$i = sp + 5620|0; - $cod_info2 = sp + 368|0; - $r01_bits = sp + 276|0; - $r01_div = sp + 184|0; - $r0_tbl = sp + 92|0; - $r1_tbl = sp; - $0 = ((($gi)) + 2304|0); - $1 = ((($gi)) + 4788|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(2); - do { - if ($3) { - $4 = ((($gfc)) + 76|0); - $5 = HEAP32[$4>>2]|0; - $6 = ($5|0)==(1); - if ($6) { - STACKTOP = sp;return; - } else { - _memcpy(($cod_info2|0),($gi|0),5252)|0; - $207 = $gi; - label = 5; - break; - } - } else { - _memcpy(($cod_info2|0),($gi|0),5252)|0; - $7 = ($2|0)==(0); - if ($7) { - $gi$idx = ((($gi)) + 4772|0); - $gi$idx$val = HEAP32[$gi$idx>>2]|0; - HEAP32[$r01_bits>>2] = 100000; - $8 = ((($r01_bits)) + 4|0); - HEAP32[$8>>2] = 100000; - $9 = ((($r01_bits)) + 8|0); - HEAP32[$9>>2] = 100000; - $10 = ((($r01_bits)) + 12|0); - HEAP32[$10>>2] = 100000; - $11 = ((($r01_bits)) + 16|0); - HEAP32[$11>>2] = 100000; - $12 = ((($r01_bits)) + 20|0); - HEAP32[$12>>2] = 100000; - $13 = ((($r01_bits)) + 24|0); - HEAP32[$13>>2] = 100000; - $14 = ((($r01_bits)) + 28|0); - HEAP32[$14>>2] = 100000; - $15 = ((($r01_bits)) + 32|0); - HEAP32[$15>>2] = 100000; - $16 = ((($r01_bits)) + 36|0); - HEAP32[$16>>2] = 100000; - $17 = ((($r01_bits)) + 40|0); - HEAP32[$17>>2] = 100000; - $18 = ((($r01_bits)) + 44|0); - HEAP32[$18>>2] = 100000; - $19 = ((($r01_bits)) + 48|0); - HEAP32[$19>>2] = 100000; - $20 = ((($r01_bits)) + 52|0); - HEAP32[$20>>2] = 100000; - $21 = ((($r01_bits)) + 56|0); - HEAP32[$21>>2] = 100000; - $22 = ((($r01_bits)) + 60|0); - HEAP32[$22>>2] = 100000; - $23 = ((($r01_bits)) + 64|0); - HEAP32[$23>>2] = 100000; - $24 = ((($r01_bits)) + 68|0); - HEAP32[$24>>2] = 100000; - $25 = ((($r01_bits)) + 72|0); - HEAP32[$25>>2] = 100000; - $26 = ((($r01_bits)) + 76|0); - HEAP32[$26>>2] = 100000; - $27 = ((($r01_bits)) + 80|0); - HEAP32[$27>>2] = 100000; - $28 = ((($r01_bits)) + 84|0); - HEAP32[$28>>2] = 100000; - $29 = ((($r01_bits)) + 88|0); - HEAP32[$29>>2] = 100000; - $30 = ((($gfc)) + 85816|0); - $r0$12$i = 0; - while(1) { - $31 = (($r0$12$i) + 1)|0; - $33 = (((($gfc)) + 21360|0) + ($31<<2)|0); - $34 = HEAP32[$33>>2]|0; - $35 = ($34|0)<($gi$idx$val|0); - if (!($35)) { - break; - } - HEAP32[$r0bits$i>>2] = 0; - $36 = HEAP32[$30>>2]|0; - $37 = (((($gi)) + 2304|0) + ($34<<2)|0); - $38 = (FUNCTION_TABLE_iiii[$36 & 3]($0,$37,$r0bits$i)|0); - $r1$01$i = 0; - while(1) { - $39 = (($r1$01$i) + ($r0$12$i))|0; - $40 = (($39) + 2)|0; - $41 = (((($gfc)) + 21360|0) + ($40<<2)|0); - $42 = HEAP32[$41>>2]|0; - $43 = ($42|0)<($gi$idx$val|0); - if (!($43)) { - break; - } - $44 = HEAP32[$r0bits$i>>2]|0; - HEAP32[$bits$i2>>2] = $44; - $45 = HEAP32[$30>>2]|0; - $46 = (((($gi)) + 2304|0) + ($42<<2)|0); - $47 = (FUNCTION_TABLE_iiii[$45 & 3]($37,$46,$bits$i2)|0); - $48 = (($r01_bits) + ($39<<2)|0); - $49 = HEAP32[$48>>2]|0; - $50 = HEAP32[$bits$i2>>2]|0; - $51 = ($49|0)>($50|0); - if ($51) { - HEAP32[$48>>2] = $50; - $52 = (($r01_div) + ($39<<2)|0); - HEAP32[$52>>2] = $r0$12$i; - $53 = (($r0_tbl) + ($39<<2)|0); - HEAP32[$53>>2] = $38; - $54 = (($r1_tbl) + ($39<<2)|0); - HEAP32[$54>>2] = $47; - } - $55 = (($r1$01$i) + 1)|0; - $56 = ($55|0)<(8); - if ($56) { - $r1$01$i = $55; - } else { - break; - } - } - $32 = ($31|0)<(16); - if ($32) { - $r0$12$i = $31; - } else { - break; - } - } - $57 = ((($cod_info2)) + 4772|0); - $58 = HEAP32[$57>>2]|0; - $59 = ((($cod_info2)) + 5184|0); - $60 = ((($gi)) + 4768|0); - $61 = (((($gi)) + 2304|0) + ($58<<2)|0); - $62 = ((($gi)) + 4824|0); - $63 = ((($gi)) + 4828|0); - $64 = ((($gi)) + 4796|0); - $65 = ((($gi)) + 4800|0); - $66 = ((($gi)) + 4804|0); - $r2$01$i = 2; - while(1) { - $67 = (((($gfc)) + 21360|0) + ($r2$01$i<<2)|0); - $68 = HEAP32[$67>>2]|0; - $69 = ($68|0)<($58|0); - if (!($69)) { - break; - } - $70 = (($r2$01$i) + -2)|0; - $71 = (($r01_bits) + ($70<<2)|0); - $72 = HEAP32[$71>>2]|0; - $73 = HEAP32[$59>>2]|0; - $74 = (($73) + ($72))|0; - HEAP32[$bits$i2>>2] = $74; - $75 = HEAP32[$60>>2]|0; - $76 = ($75|0)>($74|0); - if (!($76)) { - break; - } - $77 = HEAP32[$30>>2]|0; - $78 = (((($gi)) + 2304|0) + ($68<<2)|0); - $79 = (FUNCTION_TABLE_iiii[$77 & 3]($78,$61,$bits$i2)|0); - $80 = HEAP32[$60>>2]|0; - $81 = HEAP32[$bits$i2>>2]|0; - $82 = ($80|0)>($81|0); - if ($82) { - _memcpy(($gi|0),($cod_info2|0),5252)|0; - HEAP32[$60>>2] = $81; - $83 = (($r01_div) + ($70<<2)|0); - $84 = HEAP32[$83>>2]|0; - HEAP32[$62>>2] = $84; - $85 = (($70) - ($84))|0; - HEAP32[$63>>2] = $85; - $86 = (($r0_tbl) + ($70<<2)|0); - $87 = HEAP32[$86>>2]|0; - HEAP32[$64>>2] = $87; - $88 = (($r1_tbl) + ($70<<2)|0); - $89 = HEAP32[$88>>2]|0; - HEAP32[$65>>2] = $89; - HEAP32[$66>>2] = $79; - } - $90 = (($r2$01$i) + 1)|0; - $91 = ($90|0)<(23); - if ($91) { - $r2$01$i = $90; - } else { - break; - } - } - $$pre$phiZ2D = $57;$106 = $gi; - } else { - $207 = $gi; - label = 5; - } - } - } while(0); - if ((label|0) == 5) { - $$pre = ((($cod_info2)) + 4772|0); - $$pre$phiZ2D = $$pre;$106 = $207; - } - $92 = HEAP32[$$pre$phiZ2D>>2]|0; - $93 = ($92|0)==(0); - if ($93) { - STACKTOP = sp;return; - } - $94 = (($92) + -2)|0; - $95 = (((($gi)) + 2304|0) + ($94<<2)|0); - $96 = HEAP32[$95>>2]|0; - $97 = (($92) + -1)|0; - $98 = (((($gi)) + 2304|0) + ($97<<2)|0); - $99 = HEAP32[$98>>2]|0; - $100 = $99 | $96; - $101 = ($100>>>0)>(1); - if ($101) { - STACKTOP = sp;return; - } - $102 = ((($gi)) + 4776|0); - $103 = HEAP32[$102>>2]|0; - $104 = (($103) + 2)|0; - $105 = ($104|0)>(576); - if ($105) { - STACKTOP = sp;return; - } - _memcpy(($cod_info2|0),($106|0),5252)|0; - $107 = ((($cod_info2)) + 4776|0); - HEAP32[$107>>2] = $104; - $108 = HEAP32[$$pre$phiZ2D>>2]|0; - $109 = ($104|0)>($108|0); - if ($109) { - $110 = (($103) + -2)|0; - $111 = ($108|0)>($110|0); - $112 = $111 ? $110 : $108; - $113 = $112 ^ -1; - $114 = (($103) + ($113))|0; - $115 = (($114) + 2)|0; - $116 = $115 & -4; - $a1$06 = 0;$a2$05 = 0;$i$07 = $104; - while(1) { - $117 = (($i$07) + -4)|0; - $118 = (((($gi)) + 2304|0) + ($117<<2)|0); - $119 = HEAP32[$118>>2]|0; - $120 = $119 << 1; - $121 = (($i$07) + -3)|0; - $122 = (((($gi)) + 2304|0) + ($121<<2)|0); - $123 = HEAP32[$122>>2]|0; - $124 = (($120) + ($123))|0; - $125 = $124 << 1; - $126 = (($i$07) + -2)|0; - $127 = (((($gi)) + 2304|0) + ($126<<2)|0); - $128 = HEAP32[$127>>2]|0; - $129 = (($125) + ($128))|0; - $130 = $129 << 1; - $131 = (($i$07) + -1)|0; - $132 = (((($gi)) + 2304|0) + ($131<<2)|0); - $133 = HEAP32[$132>>2]|0; - $134 = (($130) + ($133))|0; - $135 = (82240 + ($134)|0); - $136 = HEAP8[$135>>0]|0; - $137 = $136&255; - $138 = (($137) + ($a1$06))|0; - $139 = (82256 + ($134)|0); - $140 = HEAP8[$139>>0]|0; - $141 = $140&255; - $142 = (($141) + ($a2$05))|0; - $143 = ($117|0)>($108|0); - if ($143) { - $a1$06 = $138;$a2$05 = $142;$i$07 = $117; - } else { - $$lcssa = $138;$$lcssa16 = $142; - break; - } - } - $144 = (($103) + -2)|0; - $145 = (($144) - ($116))|0; - $146 = $145;$a1$0$lcssa = $$lcssa;$a2$0$lcssa = $$lcssa16; - } else { - $146 = $104;$a1$0$lcssa = 0;$a2$0$lcssa = 0; - } - HEAP32[$$pre$phiZ2D>>2] = $146; - $147 = ((($cod_info2)) + 4840|0); - $148 = ($a1$0$lcssa|0)>($a2$0$lcssa|0); - $$ = $148&1; - $a2$0$a1$0 = $148 ? $a2$0$lcssa : $a1$0$lcssa; - HEAP32[$147>>2] = $$; - $149 = ((($cod_info2)) + 5184|0); - HEAP32[$149>>2] = $a2$0$a1$0; - $150 = ((($cod_info2)) + 4788|0); - $151 = HEAP32[$150>>2]|0; - $152 = ($151|0)==(0); - if ($152) { - $153 = ((($gi)) + 4768|0); - $154 = ((($gfc)) + 85816|0); - $155 = (((($gi)) + 2304|0) + ($146<<2)|0); - $156 = ((($gi)) + 4824|0); - $157 = ((($gi)) + 4828|0); - $158 = ((($gi)) + 4796|0); - $159 = ((($gi)) + 4800|0); - $160 = ((($gi)) + 4804|0); - $r2$01$i3 = 2; - while(1) { - $161 = (((($gfc)) + 21360|0) + ($r2$01$i3<<2)|0); - $162 = HEAP32[$161>>2]|0; - $163 = ($162|0)<($146|0); - if (!($163)) { - break; - } - $164 = (($r2$01$i3) + -2)|0; - $165 = (($r01_bits) + ($164<<2)|0); - $166 = HEAP32[$165>>2]|0; - $167 = HEAP32[$149>>2]|0; - $168 = (($167) + ($166))|0; - HEAP32[$bits$i2>>2] = $168; - $169 = HEAP32[$153>>2]|0; - $170 = ($169|0)>($168|0); - if (!($170)) { - break; - } - $171 = HEAP32[$154>>2]|0; - $172 = (((($gi)) + 2304|0) + ($162<<2)|0); - $173 = (FUNCTION_TABLE_iiii[$171 & 3]($172,$155,$bits$i2)|0); - $174 = HEAP32[$153>>2]|0; - $175 = HEAP32[$bits$i2>>2]|0; - $176 = ($174|0)>($175|0); - if ($176) { - _memcpy(($106|0),($cod_info2|0),5252)|0; - HEAP32[$153>>2] = $175; - $177 = (($r01_div) + ($164<<2)|0); - $178 = HEAP32[$177>>2]|0; - HEAP32[$156>>2] = $178; - $179 = (($164) - ($178))|0; - HEAP32[$157>>2] = $179; - $180 = (($r0_tbl) + ($164<<2)|0); - $181 = HEAP32[$180>>2]|0; - HEAP32[$158>>2] = $181; - $182 = (($r1_tbl) + ($164<<2)|0); - $183 = HEAP32[$182>>2]|0; - HEAP32[$159>>2] = $183; - HEAP32[$160>>2] = $173; - } - $184 = (($r2$01$i3) + 1)|0; - $185 = ($184|0)<(23); - if ($185) { - $r2$01$i3 = $184; - } else { - break; - } - } - STACKTOP = sp;return; - } else { - $186 = ((($cod_info2)) + 4768|0); - HEAP32[$186>>2] = $a2$0$a1$0; - $187 = ((($gfc)) + 21392|0); - $188 = HEAP32[$187>>2]|0; - $189 = ($188|0)>($146|0); - $i$0$ = $189 ? $146 : $188; - $190 = ($i$0$|0)>(0); - if ($190) { - $191 = ((($gfc)) + 85816|0); - $192 = HEAP32[$191>>2]|0; - $193 = (((($gi)) + 2304|0) + ($i$0$<<2)|0); - $194 = (FUNCTION_TABLE_iiii[$192 & 3]($0,$193,$186)|0); - $195 = ((($cod_info2)) + 4796|0); - HEAP32[$195>>2] = $194; - } - $196 = ($146|0)>($i$0$|0); - if ($196) { - $197 = ((($gfc)) + 85816|0); - $198 = HEAP32[$197>>2]|0; - $199 = (((($gi)) + 2304|0) + ($i$0$<<2)|0); - $200 = (((($gi)) + 2304|0) + ($146<<2)|0); - $201 = (FUNCTION_TABLE_iiii[$198 & 3]($199,$200,$186)|0); - $202 = ((($cod_info2)) + 4800|0); - HEAP32[$202>>2] = $201; - } - $203 = ((($gi)) + 4768|0); - $204 = HEAP32[$203>>2]|0; - $205 = HEAP32[$186>>2]|0; - $206 = ($204|0)>($205|0); - if (!($206)) { - STACKTOP = sp;return; - } - _memcpy(($106|0),($cod_info2|0),5252)|0; - STACKTOP = sp;return; - } -} -function _count_bits($gfc,$xr,$gi,$prev_noise) { - $gfc = $gfc|0; - $xr = $xr|0; - $gi = $gi|0; - $prev_noise = $prev_noise|0; - var $$$i = 0, $$0 = 0, $$0$acc_xp$0$i = 0, $$041$i = 0, $$1$i = 0, $$2$i = 0, $$pre$pre = 0, $$pre7 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0; - var $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0.0, $119 = 0, $12 = 0, $120 = 0, $121 = 0.0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0; - var $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0; - var $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0.0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0; - var $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; - var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0; - var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; - var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0.0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; - var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0, $98 = 0, $99 = 0.0, $acc_iData$037$i = 0, $acc_iData$2$i = 0, $acc_iData$3$i = 0, $acc_iData$4$i = 0, $acc_iData$4$i$lcssa = 0, $acc_iData$5$i = 0, $acc_iData$5$i$lcssa = 0, $acc_xp$039$i = 0, $acc_xp$2$i = 0; - var $acc_xp$3$i = 0, $acc_xp$4$i = 0, $acc_xp$4$i$lcssa = 0, $acc_xp$5$i = 0, $acc_xp$5$i$lcssa = 0, $accumulate$035$i = 0, $accumulate$3$i = 0, $accumulate$3$i$lcssa = 0, $accumulate$4$i = 0, $accumulate$4$i$lcssa = 0, $accumulate01$036$i = 0, $accumulate01$2$i = 0, $accumulate01$2$i$lcssa = 0, $accumulate01$4$i = 0, $accumulate01$4$i$lcssa = 0, $i$02$i$i = 0, $i$02$i14$i = 0, $i$02$i4$i = 0, $i$02$i9$i = 0, $iData$0$acc_iData$0$i = 0; - var $iData$031$i = 0, $iData$1$i = 0, $j$028$i = 0, $j$03 = 0, $j$1$i = 0, $k$02 = 0, $l$0$i = 0, $not$$i$i = 0, $not$$i10$i = 0, $not$$i15$i = 0, $not$$i5$i = 0, $not$1$i$i = 0, $not$1$i11$i = 0, $not$1$i16$i = 0, $not$1$i6$i = 0, $or$cond = 0, $or$cond$i = 0, $or$cond3$i = 0, $sfb$029$i = 0, $sfb$04 = 0; - var $sfb$1$i = 0, $sfb$2$i = 0, $step$019$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gi)) + 4780|0); - $1 = HEAP32[$0>>2]|0; - $2 = (79704 + ($1<<2)|0); - $3 = +HEAPF32[$2>>2]; - $4 = 8206.0 / $3; - $5 = ((($gi)) + 4764|0); - $6 = +HEAPF32[$5>>2]; - $7 = $6 > $4; - if ($7) { - $$0 = 100000; - return ($$0|0); - } - $8 = ((($gi)) + 2304|0); - $9 = ($prev_noise|0)!=(0|0); - if ($9) { - $10 = HEAP32[$prev_noise>>2]|0; - $11 = ($1|0)==($10|0); - $161 = $11; - } else { - $161 = 0; - } - $12 = ((($gi)) + 4788|0); - $13 = HEAP32[$12>>2]|0; - $14 = ($13|0)==(2); - $$2$i = $14 ? 38 : 21; - $15 = ((($gi)) + 4832|0); - $16 = ((($gi)) + 4836|0); - $17 = 0.59459996223449707 / $3; - $18 = ((($gi)) + 5208|0); - $19 = (($$2$i) + 1)|0; - $20 = ((($prev_noise)) + 4|0); - $$041$i = $xr;$acc_iData$037$i = $8;$acc_xp$039$i = $xr;$accumulate$035$i = 0;$accumulate01$036$i = 0;$iData$031$i = $8;$j$028$i = 0;$sfb$029$i = 0; - while(1) { - if ($161) { - label = 7; - } else { - $21 = HEAP32[$12>>2]|0; - $22 = ($21|0)==(0); - if ($22) { - label = 7; - } else { - $step$019$i = -1; - label = 15; - } - } - if ((label|0) == 7) { - label = 0; - $23 = HEAP32[$0>>2]|0; - $24 = (((($gi)) + 4608|0) + ($sfb$029$i<<2)|0); - $25 = HEAP32[$24>>2]|0; - $26 = HEAP32[$15>>2]|0; - $27 = ($26|0)==(0); - if ($27) { - $31 = 0; - } else { - $28 = (12112 + ($sfb$029$i<<2)|0); - $29 = HEAP32[$28>>2]|0; - $31 = $29; - } - $30 = (($31) + ($25))|0; - $32 = HEAP32[$16>>2]|0; - $33 = (($32) + 1)|0; - $34 = $30 << $33; - $35 = (($23) - ($34))|0; - $36 = (((($gi)) + 5028|0) + ($sfb$029$i<<2)|0); - $37 = HEAP32[$36>>2]|0; - $38 = (((($gi)) + 4808|0) + ($37<<2)|0); - $39 = HEAP32[$38>>2]|0; - $40 = $39 << 3; - $41 = (($35) - ($40))|0; - if ($161) { - $42 = (((($prev_noise)) + 8|0) + ($sfb$029$i<<2)|0); - $43 = HEAP32[$42>>2]|0; - $44 = ($43|0)==($41|0); - if ($44) { - $45 = ($accumulate$035$i|0)==(0); - if (!($45)) { - _quantize_lines_xrpow($accumulate$035$i,$3,$acc_xp$039$i,$acc_iData$037$i); - } - $46 = ($accumulate01$036$i|0)==(0); - if ($46) { - $acc_iData$5$i = $acc_iData$037$i;$acc_xp$5$i = $acc_xp$039$i;$accumulate$4$i = 0;$accumulate01$4$i = 0;$sfb$2$i = $sfb$029$i; - } else { - $i$02$i$i = 0; - while(1) { - $47 = (($acc_xp$039$i) + ($i$02$i$i<<2)|0); - $48 = +HEAPF32[$47>>2]; - $49 = $i$02$i$i | 1; - $50 = (($acc_xp$039$i) + ($49<<2)|0); - $51 = +HEAPF32[$50>>2]; - $not$$i$i = !($17 > $48); - $52 = $not$$i$i&1; - $not$1$i$i = !($17 > $51); - $53 = $not$1$i$i&1; - $54 = (($acc_iData$037$i) + ($i$02$i$i<<2)|0); - HEAP32[$54>>2] = $52; - $55 = (($acc_iData$037$i) + ($49<<2)|0); - HEAP32[$55>>2] = $53; - $56 = (($i$02$i$i) + 2)|0; - $57 = ($56>>>0)<($accumulate01$036$i>>>0); - if ($57) { - $i$02$i$i = $56; - } else { - $acc_iData$5$i = $acc_iData$037$i;$acc_xp$5$i = $acc_xp$039$i;$accumulate$4$i = 0;$accumulate01$4$i = 0;$sfb$2$i = $sfb$029$i; - break; - } - } - } - } else { - $step$019$i = $41; - label = 15; - } - } else { - $step$019$i = $41; - label = 15; - } - } - if ((label|0) == 15) { - label = 0; - $58 = (((($gi)) + 4872|0) + ($sfb$029$i<<2)|0); - $59 = HEAP32[$58>>2]|0; - $60 = (($59) + ($j$028$i))|0; - $61 = HEAP32[$18>>2]|0; - $62 = ($60|0)>($61|0); - if ($62) { - $63 = (($61) - ($j$028$i))|0; - $64 = (($63) + 1)|0; - $65 = (((($gi)) + 2304|0) + ($61<<2)|0); - $66 = (576 - ($61))|0; - $67 = $66 << 2; - _memset(($65|0),0,($67|0))|0; - $68 = ($64|0)<(0); - $$$i = $68 ? 0 : $64; - $l$0$i = $$$i;$sfb$1$i = $19; - } else { - $l$0$i = $59;$sfb$1$i = $sfb$029$i; - } - $69 = ($accumulate$035$i|0)==(0); - $70 = ($accumulate01$036$i|0)==(0); - $71 = $accumulate$035$i | $accumulate01$036$i; - $72 = ($71|0)==(0); - $iData$0$acc_iData$0$i = $72 ? $iData$031$i : $acc_iData$037$i; - $$0$acc_xp$0$i = $72 ? $$041$i : $acc_xp$039$i; - if ($9) { - $73 = HEAP32[$20>>2]|0; - $74 = ($73|0)<(1); - $75 = ($sfb$1$i|0)<($73|0); - $or$cond$i = $74 | $75; - if ($or$cond$i) { - label = 23; - } else { - $76 = (((($prev_noise)) + 8|0) + ($sfb$1$i<<2)|0); - $77 = HEAP32[$76>>2]|0; - $78 = ($77|0)<(1); - $79 = ($step$019$i|0)<($77|0); - $or$cond3$i = $78 | $79; - if ($or$cond3$i) { - label = 23; - } else { - if ($69) { - $acc_iData$2$i = $iData$0$acc_iData$0$i;$acc_xp$2$i = $$0$acc_xp$0$i; - } else { - _quantize_lines_xrpow($accumulate$035$i,$3,$$0$acc_xp$0$i,$iData$0$acc_iData$0$i); - $acc_iData$2$i = $iData$031$i;$acc_xp$2$i = $$041$i; - } - $80 = (($l$0$i) + ($accumulate01$036$i))|0; - $acc_iData$4$i = $acc_iData$2$i;$acc_xp$4$i = $acc_xp$2$i;$accumulate$3$i = 0;$accumulate01$2$i = $80; - } - } - } else { - label = 23; - } - if ((label|0) == 23) { - label = 0; - if ($70) { - $acc_iData$3$i = $iData$0$acc_iData$0$i;$acc_xp$3$i = $$0$acc_xp$0$i; - } else { - $i$02$i9$i = 0; - while(1) { - $81 = (($$0$acc_xp$0$i) + ($i$02$i9$i<<2)|0); - $82 = +HEAPF32[$81>>2]; - $83 = $i$02$i9$i | 1; - $84 = (($$0$acc_xp$0$i) + ($83<<2)|0); - $85 = +HEAPF32[$84>>2]; - $not$$i10$i = !($17 > $82); - $86 = $not$$i10$i&1; - $not$1$i11$i = !($17 > $85); - $87 = $not$1$i11$i&1; - $88 = (($iData$0$acc_iData$0$i) + ($i$02$i9$i<<2)|0); - HEAP32[$88>>2] = $86; - $89 = (($iData$0$acc_iData$0$i) + ($83<<2)|0); - HEAP32[$89>>2] = $87; - $90 = (($i$02$i9$i) + 2)|0; - $91 = ($90>>>0)<($accumulate01$036$i>>>0); - if ($91) { - $i$02$i9$i = $90; - } else { - $acc_iData$3$i = $iData$031$i;$acc_xp$3$i = $$041$i; - break; - } - } - } - $92 = (($l$0$i) + ($accumulate$035$i))|0; - $acc_iData$4$i = $acc_iData$3$i;$acc_xp$4$i = $acc_xp$3$i;$accumulate$3$i = $92;$accumulate01$2$i = 0; - } - $93 = ($l$0$i|0)<(1); - if ($93) { - $acc_iData$4$i$lcssa = $acc_iData$4$i;$acc_xp$4$i$lcssa = $acc_xp$4$i;$accumulate$3$i$lcssa = $accumulate$3$i;$accumulate01$2$i$lcssa = $accumulate01$2$i; - label = 27; - break; - } else { - $acc_iData$5$i = $acc_iData$4$i;$acc_xp$5$i = $acc_xp$4$i;$accumulate$4$i = $accumulate$3$i;$accumulate01$4$i = $accumulate01$2$i;$sfb$2$i = $sfb$1$i; - } - } - $107 = ($sfb$2$i|0)>($$2$i|0); - if ($107) { - $$1$i = $$041$i;$iData$1$i = $iData$031$i;$j$1$i = $j$028$i; - } else { - $108 = (((($gi)) + 4872|0) + ($sfb$2$i<<2)|0); - $109 = HEAP32[$108>>2]|0; - $110 = (($iData$031$i) + ($109<<2)|0); - $111 = (($$041$i) + ($109<<2)|0); - $112 = (($109) + ($j$028$i))|0; - $$1$i = $111;$iData$1$i = $110;$j$1$i = $112; - } - $113 = (($sfb$2$i) + 1)|0; - $114 = ($sfb$2$i|0)<($$2$i|0); - if ($114) { - $$041$i = $$1$i;$acc_iData$037$i = $acc_iData$5$i;$acc_xp$039$i = $acc_xp$5$i;$accumulate$035$i = $accumulate$4$i;$accumulate01$036$i = $accumulate01$4$i;$iData$031$i = $iData$1$i;$j$028$i = $j$1$i;$sfb$029$i = $113; - } else { - $acc_iData$5$i$lcssa = $acc_iData$5$i;$acc_xp$5$i$lcssa = $acc_xp$5$i;$accumulate$4$i$lcssa = $accumulate$4$i;$accumulate01$4$i$lcssa = $accumulate01$4$i; - label = 34; - break; - } - } - if ((label|0) == 27) { - $94 = ($accumulate01$2$i$lcssa|0)==(0); - if (!($94)) { - $i$02$i14$i = 0; - while(1) { - $95 = (($acc_xp$4$i$lcssa) + ($i$02$i14$i<<2)|0); - $96 = +HEAPF32[$95>>2]; - $97 = $i$02$i14$i | 1; - $98 = (($acc_xp$4$i$lcssa) + ($97<<2)|0); - $99 = +HEAPF32[$98>>2]; - $not$$i15$i = !($17 > $96); - $100 = $not$$i15$i&1; - $not$1$i16$i = !($17 > $99); - $101 = $not$1$i16$i&1; - $102 = (($acc_iData$4$i$lcssa) + ($i$02$i14$i<<2)|0); - HEAP32[$102>>2] = $100; - $103 = (($acc_iData$4$i$lcssa) + ($97<<2)|0); - HEAP32[$103>>2] = $101; - $104 = (($i$02$i14$i) + 2)|0; - $105 = ($104>>>0)<($accumulate01$2$i$lcssa>>>0); - if ($105) { - $i$02$i14$i = $104; - } else { - break; - } - } - } - $106 = ($accumulate$3$i$lcssa|0)==(0); - if (!($106)) { - _quantize_lines_xrpow($accumulate$3$i$lcssa,$3,$acc_xp$4$i$lcssa,$acc_iData$4$i$lcssa); - } - } - else if ((label|0) == 34) { - $115 = ($accumulate$4$i$lcssa|0)==(0); - if (!($115)) { - _quantize_lines_xrpow($accumulate$4$i$lcssa,$3,$acc_xp$5$i$lcssa,$acc_iData$5$i$lcssa); - } - $116 = ($accumulate01$4$i$lcssa|0)==(0); - if (!($116)) { - $i$02$i4$i = 0; - while(1) { - $117 = (($acc_xp$5$i$lcssa) + ($i$02$i4$i<<2)|0); - $118 = +HEAPF32[$117>>2]; - $119 = $i$02$i4$i | 1; - $120 = (($acc_xp$5$i$lcssa) + ($119<<2)|0); - $121 = +HEAPF32[$120>>2]; - $not$$i5$i = !($17 > $118); - $122 = $not$$i5$i&1; - $not$1$i6$i = !($17 > $121); - $123 = $not$1$i6$i&1; - $124 = (($acc_iData$5$i$lcssa) + ($i$02$i4$i<<2)|0); - HEAP32[$124>>2] = $122; - $125 = (($acc_iData$5$i$lcssa) + ($119<<2)|0); - HEAP32[$125>>2] = $123; - $126 = (($i$02$i4$i) + 2)|0; - $127 = ($126>>>0)<($accumulate01$4$i$lcssa>>>0); - if ($127) { - $i$02$i4$i = $126; - } else { - break; - } - } - } - } - $128 = ((($gfc)) + 85096|0); - $129 = HEAP32[$128>>2]|0; - $130 = $129 & 2; - $131 = ($130|0)==(0); - if (!($131)) { - $132 = HEAP32[$0>>2]|0; - $133 = HEAP32[$16>>2]|0; - $134 = (($133) + ($132))|0; - $135 = (79704 + ($134<<2)|0); - $136 = +HEAPF32[$135>>2]; - $137 = $136; - $138 = 0.63452168224243899 / $137; - $139 = $138; - $140 = ((($gi)) + 4860|0); - $141 = HEAP32[$140>>2]|0; - $142 = ($141|0)>(0); - if ($142) { - $162 = $141;$j$03 = 0;$sfb$04 = 0; - while(1) { - $143 = (((($gi)) + 4872|0) + ($sfb$04<<2)|0); - $144 = HEAP32[$143>>2]|0; - $145 = (((($gfc)) + 84936|0) + ($sfb$04<<2)|0); - $146 = HEAP32[$145>>2]|0; - $147 = ($146|0)!=(0); - $148 = (($144) + ($j$03))|0; - $149 = ($144|0)>(0); - $or$cond = $147 & $149; - if ($or$cond) { - $k$02 = $j$03; - while(1) { - $150 = (($xr) + ($k$02<<2)|0); - $151 = +HEAPF32[$150>>2]; - $152 = !($151 >= $139); - $$pre7 = (((($gi)) + 2304|0) + ($k$02<<2)|0); - if ($152) { - $154 = 0; - } else { - $153 = HEAP32[$$pre7>>2]|0; - $154 = $153; - } - HEAP32[$$pre7>>2] = $154; - $155 = (($k$02) + 1)|0; - $156 = ($155|0)<($148|0); - if ($156) { - $k$02 = $155; - } else { - break; - } - } - $$pre$pre = HEAP32[$140>>2]|0; - $159 = $$pre$pre; - } else { - $159 = $162; - } - $157 = (($sfb$04) + 1)|0; - $158 = ($157|0)<($159|0); - if ($158) { - $162 = $159;$j$03 = $148;$sfb$04 = $157; - } else { - break; - } - } - } - } - $160 = (_noquant_count_bits($gfc,$gi,$prev_noise)|0); - $$0 = $160; - return ($$0|0); -} -function _best_scalefac_store($gfc,$gr,$ch,$l3_side) { - $gfc = $gfc|0; - $gr = $gr|0; - $ch = $ch|0; - $l3_side = $l3_side|0; - var $$pre = 0, $$pre$i = 0, $$pre42 = 0, $$pre43 = 0, $$s$0 = 0, $$s$0$lcssa = 0, $$s1$0$1$i = 0, $$s1$0$10$i = 0, $$s1$0$2$i = 0, $$s1$0$3$i = 0, $$s1$0$4$i = 0, $$s1$0$5$i = 0, $$s1$0$6$i = 0, $$s1$0$7$i = 0, $$s1$0$8$i = 0, $$s1$0$9$i = 0, $$s1$0$i = 0, $$s2$0$i = 0, $$s2$0$i$1 = 0, $$s2$0$i$2 = 0; - var $$s2$0$i$3 = 0, $$s2$0$i$4 = 0, $$s2$0$i$5 = 0, $$s2$0$i$6 = 0, $$s2$0$i$7 = 0, $$s2$0$i$8 = 0, $$s2$0$i$9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; - var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0; - var $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0; - var $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0; - var $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0; - var $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0; - var $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0; - var $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0; - var $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0; - var $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0; - var $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0; - var $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0; - var $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; - var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; - var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0; - var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0; - var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $c1$1$1$i = 0, $c1$1$10$i = 0, $c1$1$2$i = 0, $c1$1$3$i = 0, $c1$1$4$i = 0, $c1$1$5$i = 0, $c1$1$6$i = 0, $c1$1$7$i = 0, $c1$1$8$i = 0, $c1$1$9$i = 0, $c1$1$i = 0; - var $c2$1$i = 0, $c2$1$i$1 = 0, $c2$1$i$2 = 0, $c2$1$i$3 = 0, $c2$1$i$4 = 0, $c2$1$i$5 = 0, $c2$1$i$6 = 0, $c2$1$i$7 = 0, $c2$1$i$8 = 0, $c2$1$i$9 = 0, $exitcond$i = 0, $i$14$i = 0, $j$027 = 0, $l$0$lcssa = 0, $l$020 = 0, $or$cond = 0, $or$cond$i = 0, $or$cond$i$1 = 0, $or$cond$i$2 = 0, $or$cond$i$3 = 0; - var $or$cond3 = 0, $or$cond4 = 0, $or$cond4$1 = 0, $or$cond4$2 = 0, $or$cond4$3 = 0, $or$cond4$4 = 0, $or$cond4$5 = 0, $or$cond4$6 = 0, $or$cond4$7 = 0, $or$cond4$8 = 0, $or$cond4$9 = 0, $recalc$0$lcssa = 0, $recalc$028 = 0, $recalc$1 = 0, $recalc$2 = 0, $recalc$3 = 0, $recalc$4 = 0, $s$017 = 0, $s1$1$1$i = 0, $s1$1$10$i = 0; - var $s1$1$2$i = 0, $s1$1$3$i = 0, $s1$1$4$i = 0, $s1$1$5$i = 0, $s1$1$6$i = 0, $s1$1$7$i = 0, $s1$1$8$i = 0, $s1$1$9$i = 0, $s1$1$i = 0, $s2$1$i = 0, $s2$1$i$1 = 0, $s2$1$i$2 = 0, $s2$1$i$3 = 0, $s2$1$i$4 = 0, $s2$1$i$5 = 0, $s2$1$i$6 = 0, $s2$1$i$7 = 0, $s2$1$i$8 = 0, $s2$1$i$9 = 0, $scevgep = 0; - var $scevgep38 = 0, $scevgep38$1 = 0, $scevgep38$2 = 0, $scevgep38$3 = 0, $scevgep40 = 0, $sfb$0$lcssa$i = 0, $sfb$0$lcssa$i$1 = 0, $sfb$0$lcssa$i$2 = 0, $sfb$0$lcssa$i$3 = 0, $sfb$012$i = 0, $sfb$012$i$1 = 0, $sfb$012$i$2 = 0, $sfb$012$i$3 = 0, $sfb$029 = 0, $sfb$116 = 0, $sfb$213 = 0, $sfb$59 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0); - $1 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4860|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)>(0); - if ($3) { - $319 = $2;$j$027 = 0;$recalc$028 = 0;$sfb$029 = 0; - while(1) { - $4 = (((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4872|0) + ($sfb$029<<2)|0); - $5 = HEAP32[$4>>2]|0; - $6 = (($5) + ($j$027))|0; - $7 = ($5|0)>(0); - L4: do { - if ($7) { - $l$020 = $j$027; - while(1) { - $8 = (((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 2304|0) + ($l$020<<2)|0); - $9 = HEAP32[$8>>2]|0; - $10 = ($9|0)==(0); - if (!($10)) { - $l$0$lcssa = $l$020; - break L4; - } - $11 = (($l$020) + 1)|0; - $12 = ($11|0)<($6|0); - if ($12) { - $l$020 = $11; - } else { - $l$0$lcssa = $11; - break; - } - } - } else { - $l$0$lcssa = $j$027; - } - } while(0); - $13 = ($l$0$lcssa|0)==($6|0); - if ($13) { - $14 = (((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$029<<2)|0); - HEAP32[$14>>2] = -2; - $$pre = HEAP32[$1>>2]|0; - $17 = $$pre;$recalc$1 = -2; - } else { - $17 = $319;$recalc$1 = $recalc$028; - } - $15 = (($sfb$029) + 1)|0; - $16 = ($15|0)<($17|0); - if ($16) { - $319 = $17;$j$027 = $6;$recalc$028 = $recalc$1;$sfb$029 = $15; - } else { - $24 = $17;$recalc$0$lcssa = $recalc$1; - break; - } - } - } else { - $24 = $2;$recalc$0$lcssa = 0; - } - $18 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4836|0); - $19 = HEAP32[$18>>2]|0; - $20 = ($19|0)==(0); - $21 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4832|0); - if ($20) { - $22 = HEAP32[$21>>2]|0; - $23 = ($22|0)==(0); - if ($23) { - $25 = ($24|0)>(0); - if ($25) { - $s$017 = 0;$sfb$116 = 0; - while(1) { - $26 = (((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$116<<2)|0); - $27 = HEAP32[$26>>2]|0; - $28 = ($27|0)>(0); - $29 = $28 ? $27 : 0; - $$s$0 = $29 | $s$017; - $30 = (($sfb$116) + 1)|0; - $31 = ($30|0)<($24|0); - if ($31) { - $s$017 = $$s$0;$sfb$116 = $30; - } else { - $$s$0$lcssa = $$s$0; - break; - } - } - $32 = $$s$0$lcssa & 1; - $33 = ($32|0)==(0); - $34 = ($$s$0$lcssa|0)!=(0); - $or$cond = $34 & $33; - if ($or$cond) { - if ($25) { - $320 = $24;$sfb$213 = 0; - while(1) { - $35 = (((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$213<<2)|0); - $36 = HEAP32[$35>>2]|0; - $37 = ($36|0)>(0); - if ($37) { - $38 = $36 >> 1; - HEAP32[$35>>2] = $38; - $$pre42 = HEAP32[$1>>2]|0; - $41 = $$pre42; - } else { - $41 = $320; - } - $39 = (($sfb$213) + 1)|0; - $40 = ($39|0)<($41|0); - if ($40) { - $320 = $41;$sfb$213 = $39; - } else { - break; - } - } - } - HEAP32[$18>>2] = 1; - $recalc$2 = 1; - } else { - $recalc$2 = $recalc$0$lcssa; - } - } else { - $recalc$2 = $recalc$0$lcssa; - } - } else { - $recalc$2 = $recalc$0$lcssa; - } - } else { - $recalc$2 = $recalc$0$lcssa; - } - $42 = HEAP32[$21>>2]|0; - $43 = ($42|0)==(0); - if ($43) { - $44 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4788|0); - $45 = HEAP32[$44>>2]|0; - $46 = ($45|0)==(2); - if ($46) { - $recalc$3 = $recalc$2; - } else { - $47 = ((($gfc)) + 76|0); - $48 = HEAP32[$47>>2]|0; - $49 = ($48|0)==(2); - if ($49) { - $50 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4652|0); - $51 = HEAP32[$50>>2]|0; - $52 = HEAP32[(12156)>>2]|0; - $53 = ($51|0)>=($52|0); - $54 = ($51|0)==(-2); - $or$cond4 = $54 | $53; - if ($or$cond4) { - $55 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4656|0); - $56 = HEAP32[$55>>2]|0; - $57 = HEAP32[(12160)>>2]|0; - $58 = ($56|0)>=($57|0); - $59 = ($56|0)==(-2); - $or$cond4$1 = $59 | $58; - if ($or$cond4$1) { - $267 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4660|0); - $263 = HEAP32[$267>>2]|0; - $266 = HEAP32[(12164)>>2]|0; - $303 = ($263|0)>=($266|0); - $304 = ($263|0)==(-2); - $or$cond4$2 = $304 | $303; - if ($or$cond4$2) { - $272 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4664|0); - $268 = HEAP32[$272>>2]|0; - $271 = HEAP32[(12168)>>2]|0; - $305 = ($268|0)>=($271|0); - $306 = ($268|0)==(-2); - $or$cond4$3 = $306 | $305; - if ($or$cond4$3) { - $277 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4668|0); - $273 = HEAP32[$277>>2]|0; - $276 = HEAP32[(12172)>>2]|0; - $307 = ($273|0)>=($276|0); - $308 = ($273|0)==(-2); - $or$cond4$4 = $308 | $307; - if ($or$cond4$4) { - $282 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4672|0); - $278 = HEAP32[$282>>2]|0; - $281 = HEAP32[(12176)>>2]|0; - $309 = ($278|0)>=($281|0); - $310 = ($278|0)==(-2); - $or$cond4$5 = $310 | $309; - if ($or$cond4$5) { - $287 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4676|0); - $283 = HEAP32[$287>>2]|0; - $286 = HEAP32[(12180)>>2]|0; - $311 = ($283|0)>=($286|0); - $312 = ($283|0)==(-2); - $or$cond4$6 = $312 | $311; - if ($or$cond4$6) { - $292 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4680|0); - $288 = HEAP32[$292>>2]|0; - $291 = HEAP32[(12184)>>2]|0; - $313 = ($288|0)>=($291|0); - $314 = ($288|0)==(-2); - $or$cond4$7 = $314 | $313; - if ($or$cond4$7) { - $297 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4684|0); - $293 = HEAP32[$297>>2]|0; - $296 = HEAP32[(12188)>>2]|0; - $315 = ($293|0)>=($296|0); - $316 = ($293|0)==(-2); - $or$cond4$8 = $316 | $315; - if ($or$cond4$8) { - $302 = ((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4688|0); - $298 = HEAP32[$302>>2]|0; - $301 = HEAP32[(12192)>>2]|0; - $317 = ($298|0)>=($301|0); - $318 = ($298|0)==(-2); - $or$cond4$9 = $318 | $317; - if ($or$cond4$9) { - $60 = ($51|0)>(0); - if ($60) { - $61 = (($51) - ($52))|0; - HEAP32[$50>>2] = $61; - } - $62 = ($56|0)>(0); - if ($62) { - $262 = (($56) - ($57))|0; - HEAP32[$55>>2] = $262; - } - $264 = ($263|0)>(0); - if ($264) { - $265 = (($263) - ($266))|0; - HEAP32[$267>>2] = $265; - } - $269 = ($268|0)>(0); - if ($269) { - $270 = (($268) - ($271))|0; - HEAP32[$272>>2] = $270; - } - $274 = ($273|0)>(0); - if ($274) { - $275 = (($273) - ($276))|0; - HEAP32[$277>>2] = $275; - } - $279 = ($278|0)>(0); - if ($279) { - $280 = (($278) - ($281))|0; - HEAP32[$282>>2] = $280; - } - $284 = ($283|0)>(0); - if ($284) { - $285 = (($283) - ($286))|0; - HEAP32[$287>>2] = $285; - } - $289 = ($288|0)>(0); - if ($289) { - $290 = (($288) - ($291))|0; - HEAP32[$292>>2] = $290; - } - $294 = ($293|0)>(0); - if ($294) { - $295 = (($293) - ($296))|0; - HEAP32[$297>>2] = $295; - } - $299 = ($298|0)>(0); - if ($299) { - $300 = (($298) - ($301))|0; - HEAP32[$302>>2] = $300; - } - HEAP32[$21>>2] = 1; - $recalc$3 = 1; - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } else { - $recalc$3 = $recalc$2; - } - } - } else { - $recalc$3 = $recalc$2; - } - $63 = $ch << 2; - $64 = (($63) + 4)|0; - $scevgep40 = (((($l3_side)) + 21008|0) + ($64<<2)|0); - ;HEAP32[$scevgep40>>2]=0|0;HEAP32[$scevgep40+4>>2]=0|0;HEAP32[$scevgep40+8>>2]=0|0;HEAP32[$scevgep40+12>>2]=0|0; - $65 = ((($gfc)) + 76|0); - $66 = HEAP32[$65>>2]|0; - $67 = ($66|0)==(2); - $68 = ($gr|0)==(1); - $or$cond3 = $68 & $67; - if ($or$cond3) { - $69 = (((($l3_side) + (($ch*5252)|0)|0)) + 4788|0); - $70 = HEAP32[$69>>2]|0; - $71 = ($70|0)==(2); - if ($71) { - $recalc$4 = $recalc$3; - } else { - $72 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4788|0); - $73 = HEAP32[$72>>2]|0; - $74 = ($73|0)==(2); - if ($74) { - $recalc$4 = $recalc$3; - } else { - $$pre$i = HEAP32[84136>>2]|0; - $scevgep = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4608|0); - $75 = HEAP32[(84140)>>2]|0; - $76 = ($75|0)>($$pre$i|0); - L77: do { - if ($76) { - $sfb$012$i = $$pre$i; - while(1) { - $77 = ((((($l3_side) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$012$i<<2)|0); - $78 = HEAP32[$77>>2]|0; - $79 = ((((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$012$i<<2)|0); - $80 = HEAP32[$79>>2]|0; - $81 = ($78|0)!=($80|0); - $82 = ($80|0)>(-1); - $or$cond$i = $81 & $82; - if ($or$cond$i) { - $sfb$0$lcssa$i = $sfb$012$i; - break L77; - } - $83 = (($sfb$012$i) + 1)|0; - $84 = ($83|0)<($75|0); - if ($84) { - $sfb$012$i = $83; - } else { - $sfb$0$lcssa$i = $83; - break; - } - } - } else { - $sfb$0$lcssa$i = $$pre$i; - } - } while(0); - $85 = ($sfb$0$lcssa$i|0)==($75|0); - if ($85) { - if ($76) { - $scevgep38 = ((((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4608|0) + ($$pre$i<<2)|0); - $88 = (($75) - ($$pre$i))|0; - $89 = $88 << 2; - _memset(($scevgep38|0),-1,($89|0))|0; - } - $90 = (((($l3_side)) + 21024|0) + ($ch<<4)|0); - HEAP32[$90>>2] = 1; - } - $86 = HEAP32[(84144)>>2]|0; - $87 = ($86|0)>($75|0); - L88: do { - if ($87) { - $sfb$012$i$1 = $75; - while(1) { - $216 = ((((($l3_side) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$012$i$1<<2)|0); - $217 = HEAP32[$216>>2]|0; - $218 = ((((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$012$i$1<<2)|0); - $219 = HEAP32[$218>>2]|0; - $220 = ($217|0)!=($219|0); - $221 = ($219|0)>(-1); - $or$cond$i$1 = $220 & $221; - if ($or$cond$i$1) { - $sfb$0$lcssa$i$1 = $sfb$012$i$1; - break L88; - } - $222 = (($sfb$012$i$1) + 1)|0; - $223 = ($222|0)<($86|0); - if ($223) { - $sfb$012$i$1 = $222; - } else { - $sfb$0$lcssa$i$1 = $222; - break; - } - } - } else { - $sfb$0$lcssa$i$1 = $75; - } - } while(0); - $224 = ($sfb$0$lcssa$i$1|0)==($86|0); - if ($224) { - if ($87) { - $scevgep38$1 = ((((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4608|0) + ($75<<2)|0); - $225 = (($86) - ($75))|0; - $226 = $225 << 2; - _memset(($scevgep38$1|0),-1,($226|0))|0; - } - $227 = (((((($l3_side)) + 21024|0) + ($ch<<4)|0)) + 4|0); - HEAP32[$227>>2] = 1; - } - $228 = HEAP32[(84148)>>2]|0; - $229 = ($228|0)>($86|0); - L99: do { - if ($229) { - $sfb$012$i$2 = $86; - while(1) { - $230 = ((((($l3_side) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$012$i$2<<2)|0); - $231 = HEAP32[$230>>2]|0; - $232 = ((((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$012$i$2<<2)|0); - $233 = HEAP32[$232>>2]|0; - $234 = ($231|0)!=($233|0); - $235 = ($233|0)>(-1); - $or$cond$i$2 = $234 & $235; - if ($or$cond$i$2) { - $sfb$0$lcssa$i$2 = $sfb$012$i$2; - break L99; - } - $236 = (($sfb$012$i$2) + 1)|0; - $237 = ($236|0)<($228|0); - if ($237) { - $sfb$012$i$2 = $236; - } else { - $sfb$0$lcssa$i$2 = $236; - break; - } - } - } else { - $sfb$0$lcssa$i$2 = $86; - } - } while(0); - $238 = ($sfb$0$lcssa$i$2|0)==($228|0); - if ($238) { - if ($229) { - $scevgep38$2 = ((((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4608|0) + ($86<<2)|0); - $239 = (($228) - ($86))|0; - $240 = $239 << 2; - _memset(($scevgep38$2|0),-1,($240|0))|0; - } - $241 = (((((($l3_side)) + 21024|0) + ($ch<<4)|0)) + 8|0); - HEAP32[$241>>2] = 1; - } - $242 = HEAP32[(84152)>>2]|0; - $243 = ($242|0)>($228|0); - L110: do { - if ($243) { - $sfb$012$i$3 = $228; - while(1) { - $244 = ((((($l3_side) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$012$i$3<<2)|0); - $245 = HEAP32[$244>>2]|0; - $246 = ((((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$012$i$3<<2)|0); - $247 = HEAP32[$246>>2]|0; - $248 = ($245|0)!=($247|0); - $249 = ($247|0)>(-1); - $or$cond$i$3 = $248 & $249; - if ($or$cond$i$3) { - $sfb$0$lcssa$i$3 = $sfb$012$i$3; - break L110; - } - $250 = (($sfb$012$i$3) + 1)|0; - $251 = ($250|0)<($242|0); - if ($251) { - $sfb$012$i$3 = $250; - } else { - $sfb$0$lcssa$i$3 = $250; - break; - } - } - } else { - $sfb$0$lcssa$i$3 = $228; - } - } while(0); - $252 = ($sfb$0$lcssa$i$3|0)==($242|0); - if ($252) { - if ($243) { - $scevgep38$3 = ((((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4608|0) + ($228<<2)|0); - $253 = (($242) - ($228))|0; - $254 = $253 << 2; - _memset(($scevgep38$3|0),-1,($254|0))|0; - } - $255 = (((((($l3_side)) + 21024|0) + ($ch<<4)|0)) + 12|0); - HEAP32[$255>>2] = 1; - } - $256 = HEAP32[$scevgep>>2]|0; - $257 = ($256|0)==(-1); - $258 = ($256|0)>(0); - $$s1$0$i = $258 ? $256 : 0; - $259 = $257&1; - $c1$1$i = $259 ^ 1; - $s1$1$i = $257 ? 0 : $$s1$0$i; - $260 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4612|0); - $119 = HEAP32[$260>>2]|0; - $261 = ($119|0)==(-1); - if ($261) { - $c1$1$1$i = $c1$1$i;$s1$1$1$i = $s1$1$i; - } else { - $117 = (($c1$1$i) + 1)|0; - $118 = ($s1$1$i|0)<($119|0); - $$s1$0$1$i = $118 ? $119 : $s1$1$i; - $c1$1$1$i = $117;$s1$1$1$i = $$s1$0$1$i; - } - $120 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4616|0); - $121 = HEAP32[$120>>2]|0; - $122 = ($121|0)==(-1); - if ($122) { - $c1$1$2$i = $c1$1$1$i;$s1$1$2$i = $s1$1$1$i; - } else { - $123 = (($c1$1$1$i) + 1)|0; - $124 = ($s1$1$1$i|0)<($121|0); - $$s1$0$2$i = $124 ? $121 : $s1$1$1$i; - $c1$1$2$i = $123;$s1$1$2$i = $$s1$0$2$i; - } - $125 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4620|0); - $126 = HEAP32[$125>>2]|0; - $127 = ($126|0)==(-1); - if ($127) { - $c1$1$3$i = $c1$1$2$i;$s1$1$3$i = $s1$1$2$i; - } else { - $128 = (($c1$1$2$i) + 1)|0; - $129 = ($s1$1$2$i|0)<($126|0); - $$s1$0$3$i = $129 ? $126 : $s1$1$2$i; - $c1$1$3$i = $128;$s1$1$3$i = $$s1$0$3$i; - } - $130 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4624|0); - $131 = HEAP32[$130>>2]|0; - $132 = ($131|0)==(-1); - if ($132) { - $c1$1$4$i = $c1$1$3$i;$s1$1$4$i = $s1$1$3$i; - } else { - $133 = (($c1$1$3$i) + 1)|0; - $134 = ($s1$1$3$i|0)<($131|0); - $$s1$0$4$i = $134 ? $131 : $s1$1$3$i; - $c1$1$4$i = $133;$s1$1$4$i = $$s1$0$4$i; - } - $135 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4628|0); - $136 = HEAP32[$135>>2]|0; - $137 = ($136|0)==(-1); - if ($137) { - $c1$1$5$i = $c1$1$4$i;$s1$1$5$i = $s1$1$4$i; - } else { - $138 = (($c1$1$4$i) + 1)|0; - $139 = ($s1$1$4$i|0)<($136|0); - $$s1$0$5$i = $139 ? $136 : $s1$1$4$i; - $c1$1$5$i = $138;$s1$1$5$i = $$s1$0$5$i; - } - $140 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4632|0); - $141 = HEAP32[$140>>2]|0; - $142 = ($141|0)==(-1); - if ($142) { - $c1$1$6$i = $c1$1$5$i;$s1$1$6$i = $s1$1$5$i; - } else { - $143 = (($c1$1$5$i) + 1)|0; - $144 = ($s1$1$5$i|0)<($141|0); - $$s1$0$6$i = $144 ? $141 : $s1$1$5$i; - $c1$1$6$i = $143;$s1$1$6$i = $$s1$0$6$i; - } - $145 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4636|0); - $146 = HEAP32[$145>>2]|0; - $147 = ($146|0)==(-1); - if ($147) { - $c1$1$7$i = $c1$1$6$i;$s1$1$7$i = $s1$1$6$i; - } else { - $148 = (($c1$1$6$i) + 1)|0; - $149 = ($s1$1$6$i|0)<($146|0); - $$s1$0$7$i = $149 ? $146 : $s1$1$6$i; - $c1$1$7$i = $148;$s1$1$7$i = $$s1$0$7$i; - } - $150 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4640|0); - $151 = HEAP32[$150>>2]|0; - $152 = ($151|0)==(-1); - if ($152) { - $c1$1$8$i = $c1$1$7$i;$s1$1$8$i = $s1$1$7$i; - } else { - $153 = (($c1$1$7$i) + 1)|0; - $154 = ($s1$1$7$i|0)<($151|0); - $$s1$0$8$i = $154 ? $151 : $s1$1$7$i; - $c1$1$8$i = $153;$s1$1$8$i = $$s1$0$8$i; - } - $155 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4644|0); - $156 = HEAP32[$155>>2]|0; - $157 = ($156|0)==(-1); - if ($157) { - $c1$1$9$i = $c1$1$8$i;$s1$1$9$i = $s1$1$8$i; - } else { - $158 = (($c1$1$8$i) + 1)|0; - $159 = ($s1$1$8$i|0)<($156|0); - $$s1$0$9$i = $159 ? $156 : $s1$1$8$i; - $c1$1$9$i = $158;$s1$1$9$i = $$s1$0$9$i; - } - $160 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4648|0); - $161 = HEAP32[$160>>2]|0; - $162 = ($161|0)==(-1); - if ($162) { - $c1$1$10$i = $c1$1$9$i;$s1$1$10$i = $s1$1$9$i; - } else { - $163 = (($c1$1$9$i) + 1)|0; - $164 = ($s1$1$9$i|0)<($161|0); - $$s1$0$10$i = $164 ? $161 : $s1$1$9$i; - $c1$1$10$i = $163;$s1$1$10$i = $$s1$0$10$i; - } - $91 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4652|0); - $92 = HEAP32[$91>>2]|0; - $93 = ($92|0)==(-1); - $94 = ($92|0)>(0); - $$s2$0$i = $94 ? $92 : 0; - $95 = $93&1; - $c2$1$i = $95 ^ 1; - $s2$1$i = $93 ? 0 : $$s2$0$i; - $96 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4656|0); - $97 = HEAP32[$96>>2]|0; - $98 = ($97|0)==(-1); - if ($98) { - $c2$1$i$1 = $c2$1$i;$s2$1$i$1 = $s2$1$i; - } else { - $174 = (($c2$1$i) + 1)|0; - $175 = ($s2$1$i|0)<($97|0); - $$s2$0$i$1 = $175 ? $97 : $s2$1$i; - $c2$1$i$1 = $174;$s2$1$i$1 = $$s2$0$i$1; - } - $176 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4660|0); - $177 = HEAP32[$176>>2]|0; - $178 = ($177|0)==(-1); - if ($178) { - $c2$1$i$2 = $c2$1$i$1;$s2$1$i$2 = $s2$1$i$1; - } else { - $179 = (($c2$1$i$1) + 1)|0; - $180 = ($s2$1$i$1|0)<($177|0); - $$s2$0$i$2 = $180 ? $177 : $s2$1$i$1; - $c2$1$i$2 = $179;$s2$1$i$2 = $$s2$0$i$2; - } - $181 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4664|0); - $182 = HEAP32[$181>>2]|0; - $183 = ($182|0)==(-1); - if ($183) { - $c2$1$i$3 = $c2$1$i$2;$s2$1$i$3 = $s2$1$i$2; - } else { - $184 = (($c2$1$i$2) + 1)|0; - $185 = ($s2$1$i$2|0)<($182|0); - $$s2$0$i$3 = $185 ? $182 : $s2$1$i$2; - $c2$1$i$3 = $184;$s2$1$i$3 = $$s2$0$i$3; - } - $186 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4668|0); - $187 = HEAP32[$186>>2]|0; - $188 = ($187|0)==(-1); - if ($188) { - $c2$1$i$4 = $c2$1$i$3;$s2$1$i$4 = $s2$1$i$3; - } else { - $189 = (($c2$1$i$3) + 1)|0; - $190 = ($s2$1$i$3|0)<($187|0); - $$s2$0$i$4 = $190 ? $187 : $s2$1$i$3; - $c2$1$i$4 = $189;$s2$1$i$4 = $$s2$0$i$4; - } - $191 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4672|0); - $192 = HEAP32[$191>>2]|0; - $193 = ($192|0)==(-1); - if ($193) { - $c2$1$i$5 = $c2$1$i$4;$s2$1$i$5 = $s2$1$i$4; - } else { - $194 = (($c2$1$i$4) + 1)|0; - $195 = ($s2$1$i$4|0)<($192|0); - $$s2$0$i$5 = $195 ? $192 : $s2$1$i$4; - $c2$1$i$5 = $194;$s2$1$i$5 = $$s2$0$i$5; - } - $196 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4676|0); - $197 = HEAP32[$196>>2]|0; - $198 = ($197|0)==(-1); - if ($198) { - $c2$1$i$6 = $c2$1$i$5;$s2$1$i$6 = $s2$1$i$5; - } else { - $199 = (($c2$1$i$5) + 1)|0; - $200 = ($s2$1$i$5|0)<($197|0); - $$s2$0$i$6 = $200 ? $197 : $s2$1$i$5; - $c2$1$i$6 = $199;$s2$1$i$6 = $$s2$0$i$6; - } - $201 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4680|0); - $202 = HEAP32[$201>>2]|0; - $203 = ($202|0)==(-1); - if ($203) { - $c2$1$i$7 = $c2$1$i$6;$s2$1$i$7 = $s2$1$i$6; - } else { - $204 = (($c2$1$i$6) + 1)|0; - $205 = ($s2$1$i$6|0)<($202|0); - $$s2$0$i$7 = $205 ? $202 : $s2$1$i$6; - $c2$1$i$7 = $204;$s2$1$i$7 = $$s2$0$i$7; - } - $206 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4684|0); - $207 = HEAP32[$206>>2]|0; - $208 = ($207|0)==(-1); - if ($208) { - $c2$1$i$8 = $c2$1$i$7;$s2$1$i$8 = $s2$1$i$7; - } else { - $209 = (($c2$1$i$7) + 1)|0; - $210 = ($s2$1$i$7|0)<($207|0); - $$s2$0$i$8 = $210 ? $207 : $s2$1$i$7; - $c2$1$i$8 = $209;$s2$1$i$8 = $$s2$0$i$8; - } - $211 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4688|0); - $212 = HEAP32[$211>>2]|0; - $213 = ($212|0)==(-1); - if ($213) { - $c2$1$i$9 = $c2$1$i$8;$s2$1$i$9 = $s2$1$i$8; - } else { - $214 = (($c2$1$i$8) + 1)|0; - $215 = ($s2$1$i$8|0)<($212|0); - $$s2$0$i$9 = $215 ? $212 : $s2$1$i$8; - $c2$1$i$9 = $214;$s2$1$i$9 = $$s2$0$i$9; - } - $113 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4844|0); - $115 = (((((($l3_side)) + 10504|0) + (($ch*5252)|0)|0)) + 4784|0); - $i$14$i = 0; - while(1) { - $99 = (88776 + ($i$14$i<<2)|0); - $100 = HEAP32[$99>>2]|0; - $101 = ($s1$1$10$i|0)<($100|0); - do { - if ($101) { - $102 = (88840 + ($i$14$i<<2)|0); - $103 = HEAP32[$102>>2]|0; - $104 = ($s2$1$i$9|0)<($103|0); - if (!($104)) { - break; - } - $105 = (88648 + ($i$14$i<<2)|0); - $106 = HEAP32[$105>>2]|0; - $107 = Math_imul($106, $c1$1$10$i)|0; - $108 = (88712 + ($i$14$i<<2)|0); - $109 = HEAP32[$108>>2]|0; - $110 = Math_imul($109, $c2$1$i$9)|0; - $111 = (($110) + ($107))|0; - $112 = HEAP32[$113>>2]|0; - $114 = ($112|0)>($111|0); - if (!($114)) { - break; - } - HEAP32[$113>>2] = $111; - HEAP32[$115>>2] = $i$14$i; - } - } while(0); - $116 = (($i$14$i) + 1)|0; - $exitcond$i = ($116|0)==(16); - if ($exitcond$i) { - $recalc$4 = 0; - break; - } else { - $i$14$i = $116; - } - } - } - } - } else { - $recalc$4 = $recalc$3; - } - $165 = HEAP32[$1>>2]|0; - $166 = ($165|0)>(0); - if ($166) { - $321 = $165;$sfb$59 = 0; - while(1) { - $167 = (((((($l3_side) + (($gr*10504)|0)|0) + (($ch*5252)|0)|0)) + 4608|0) + ($sfb$59<<2)|0); - $168 = HEAP32[$167>>2]|0; - $169 = ($168|0)==(-2); - if ($169) { - HEAP32[$167>>2] = 0; - $$pre43 = HEAP32[$1>>2]|0; - $172 = $$pre43; - } else { - $172 = $321; - } - $170 = (($sfb$59) + 1)|0; - $171 = ($170|0)<($172|0); - if ($171) { - $321 = $172;$sfb$59 = $170; - } else { - break; - } - } - } - $173 = ($recalc$4|0)==(0); - if ($173) { - return; - } - (_scale_bitcount($gfc,$0)|0); - return; -} -function _scale_bitcount($gfc,$cod_info) { - $gfc = $gfc|0; - $cod_info = $cod_info|0; - var $$$i = 0, $$$i1 = 0, $$0 = 0, $$lcssa = 0, $$lcssa30 = 0, $$lcssa31 = 0, $$max_slen1$0$i = 0, $$max_slen1$0$i$lcssa = 0, $$max_slen2$0$i = 0, $$over$0$1$i = 0, $$over$0$2$i = 0, $$over$0$3$i = 0, $$phi$trans$insert29$i = 0, $$phi$trans$insert31$i = 0, $$phi$trans$insert33$i = 0, $$pre$i = 0, $$pre28$i = 0, $$pre30$i = 0, $$pre32$i = 0, $$pre34$i = 0; - var $$sink$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; - var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; - var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; - var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0; - var $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0; - var $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0; - var $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0; - var $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0; - var $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0; - var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0; - var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0; - var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond$i = 0, $exitcond$i6 = 0, $exitcond16 = 0, $exitcond23$1$i = 0, $exitcond23$2$i = 0; - var $exitcond23$3$i = 0, $exitcond23$i = 0, $i$19$i = 0, $i$213$1$i = 0, $i$213$2$i = 0, $i$213$3$i = 0, $k$04$i = 0, $max_sfac$i = 0, $max_slen1$0$lcssa$i = 0, $max_slen1$08$i = 0, $max_slen2$0$lcssa$i = 0, $max_slen2$06$i = 0, $partition$012$i = 0, $row_in_table$0$i = 0, $sfb$011$i = 0, $sfb$1$lcssa$i = 0, $sfb$110$i = 0, $sfb$2$lcssa$i = 0, $sfb$27$i = 0, $sfb$3$lcssa$1$i = 0; - var $sfb$3$lcssa$2$i = 0, $sfb$3$lcssa$i = 0, $sfb$314$1$i = 0, $sfb$314$2$i = 0, $sfb$314$3$i = 0, $sfb$314$i = 0, $sfb$35$i = 0, $smax$i = 0, $smax$i3 = 0, $tab$0$i = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $max_sfac$i = sp; - $0 = ((($gfc)) + 76|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(2); - if ($2) { - $3 = ((($cod_info)) + 4788|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($4|0)==(2); - if ($5) { - $6 = ((($cod_info)) + 4792|0); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)!=(0); - $$$i = $8 ? 88904 : 88968; - $tab$0$i = $$$i; - } else { - $9 = ((($cod_info)) + 4832|0); - $10 = HEAP32[$9>>2]|0; - $11 = ($10|0)==(0); - if ($11) { - $12 = ((($cod_info)) + 4652|0); - $13 = HEAP32[$12>>2]|0; - $14 = HEAP32[(12156)>>2]|0; - $15 = ($13|0)<($14|0); - if ($15) { - $tab$0$i = 89032; - } else { - $16 = ((($cod_info)) + 4656|0); - $17 = HEAP32[$16>>2]|0; - $18 = HEAP32[(12160)>>2]|0; - $19 = ($17|0)<($18|0); - if ($19) { - $tab$0$i = 89032; - } else { - $25 = ((($cod_info)) + 4660|0); - $24 = HEAP32[$25>>2]|0; - $23 = HEAP32[(12164)>>2]|0; - $82 = ($24|0)<($23|0); - if ($82) { - $tab$0$i = 89032; - } else { - $29 = ((($cod_info)) + 4664|0); - $28 = HEAP32[$29>>2]|0; - $27 = HEAP32[(12168)>>2]|0; - $83 = ($28|0)<($27|0); - if ($83) { - $tab$0$i = 89032; - } else { - $33 = ((($cod_info)) + 4668|0); - $32 = HEAP32[$33>>2]|0; - $31 = HEAP32[(12172)>>2]|0; - $84 = ($32|0)<($31|0); - if ($84) { - $tab$0$i = 89032; - } else { - $37 = ((($cod_info)) + 4672|0); - $36 = HEAP32[$37>>2]|0; - $35 = HEAP32[(12176)>>2]|0; - $85 = ($36|0)<($35|0); - if ($85) { - $tab$0$i = 89032; - } else { - $41 = ((($cod_info)) + 4676|0); - $40 = HEAP32[$41>>2]|0; - $39 = HEAP32[(12180)>>2]|0; - $86 = ($40|0)<($39|0); - if ($86) { - $tab$0$i = 89032; - } else { - $45 = ((($cod_info)) + 4680|0); - $44 = HEAP32[$45>>2]|0; - $43 = HEAP32[(12184)>>2]|0; - $87 = ($44|0)<($43|0); - if ($87) { - $tab$0$i = 89032; - } else { - $49 = ((($cod_info)) + 4684|0); - $48 = HEAP32[$49>>2]|0; - $47 = HEAP32[(12188)>>2]|0; - $88 = ($48|0)<($47|0); - if ($88) { - $tab$0$i = 89032; - } else { - $53 = ((($cod_info)) + 4688|0); - $52 = HEAP32[$53>>2]|0; - $51 = HEAP32[(12192)>>2]|0; - $89 = ($52|0)<($51|0); - if ($89) { - $tab$0$i = 89032; - } else { - HEAP32[$9>>2] = 1; - $20 = (($13) - ($14))|0; - HEAP32[$12>>2] = $20; - $21 = (($17) - ($18))|0; - HEAP32[$16>>2] = $21; - $22 = (($24) - ($23))|0; - HEAP32[$25>>2] = $22; - $26 = (($28) - ($27))|0; - HEAP32[$29>>2] = $26; - $30 = (($32) - ($31))|0; - HEAP32[$33>>2] = $30; - $34 = (($36) - ($35))|0; - HEAP32[$37>>2] = $34; - $38 = (($40) - ($39))|0; - HEAP32[$41>>2] = $38; - $42 = (($44) - ($43))|0; - HEAP32[$45>>2] = $42; - $46 = (($48) - ($47))|0; - HEAP32[$49>>2] = $46; - $50 = (($52) - ($51))|0; - HEAP32[$53>>2] = $50; - $tab$0$i = 89032; - } - } - } - } - } - } - } - } - } - } - } else { - $tab$0$i = 89032; - } - } - $54 = ((($cod_info)) + 4868|0); - $55 = HEAP32[$54>>2]|0; - $56 = ($55|0)>(0); - if ($56) { - $max_slen1$08$i = 0;$sfb$27$i = 0; - while(1) { - $61 = (((($cod_info)) + 4608|0) + ($sfb$27$i<<2)|0); - $62 = HEAP32[$61>>2]|0; - $63 = ($max_slen1$08$i|0)<($62|0); - $$max_slen1$0$i = $63 ? $62 : $max_slen1$08$i; - $64 = (($sfb$27$i) + 1)|0; - $exitcond16 = ($64|0)==($55|0); - if ($exitcond16) { - $$max_slen1$0$i$lcssa = $$max_slen1$0$i; - break; - } else { - $max_slen1$08$i = $$max_slen1$0$i;$sfb$27$i = $64; - } - } - $57 = ($55|0)>(1); - $smax$i = $57 ? $55 : 1; - $max_slen1$0$lcssa$i = $$max_slen1$0$i$lcssa;$sfb$2$lcssa$i = $smax$i; - } else { - $max_slen1$0$lcssa$i = 0;$sfb$2$lcssa$i = 0; - } - $58 = ((($cod_info)) + 4860|0); - $59 = HEAP32[$58>>2]|0; - $60 = ($sfb$2$lcssa$i|0)<($59|0); - if ($60) { - $max_slen2$06$i = 0;$sfb$35$i = $sfb$2$lcssa$i; - while(1) { - $65 = (((($cod_info)) + 4608|0) + ($sfb$35$i<<2)|0); - $66 = HEAP32[$65>>2]|0; - $67 = ($max_slen2$06$i|0)<($66|0); - $$max_slen2$0$i = $67 ? $66 : $max_slen2$06$i; - $68 = (($sfb$35$i) + 1)|0; - $exitcond = ($68|0)==($59|0); - if ($exitcond) { - $max_slen2$0$lcssa$i = $$max_slen2$0$i; - break; - } else { - $max_slen2$06$i = $$max_slen2$0$i;$sfb$35$i = $68; - } - } - } else { - $max_slen2$0$lcssa$i = 0; - } - $69 = ((($cod_info)) + 4844|0); - HEAP32[$69>>2] = 100000; - $70 = ((($cod_info)) + 4784|0); - $79 = 100000;$k$04$i = 0; - while(1) { - $71 = (88776 + ($k$04$i<<2)|0); - $72 = HEAP32[$71>>2]|0; - $73 = ($max_slen1$0$lcssa$i|0)<($72|0); - if ($73) { - $74 = (88840 + ($k$04$i<<2)|0); - $75 = HEAP32[$74>>2]|0; - $76 = ($max_slen2$0$lcssa$i|0)<($75|0); - if ($76) { - $77 = (($tab$0$i) + ($k$04$i<<2)|0); - $78 = HEAP32[$77>>2]|0; - $80 = ($79|0)>($78|0); - if ($80) { - HEAP32[$69>>2] = $78; - HEAP32[$70>>2] = $k$04$i; - $224 = $78; - } else { - $224 = $79; - } - } else { - $224 = $79; - } - } else { - $224 = $79; - } - $81 = (($k$04$i) + 1)|0; - $exitcond$i = ($81|0)==(16); - if ($exitcond$i) { - $$lcssa = $224; - break; - } else { - $79 = $224;$k$04$i = $81; - } - } - $90 = ($$lcssa|0)==(100000); - $91 = $90&1; - $$0 = $91; - STACKTOP = sp;return ($$0|0); - } - $92 = ((($cod_info)) + 4832|0); - $93 = HEAP32[$92>>2]|0; - $94 = ($93|0)==(0); - ;HEAP32[$max_sfac$i>>2]=0|0;HEAP32[$max_sfac$i+4>>2]=0|0;HEAP32[$max_sfac$i+8>>2]=0|0;HEAP32[$max_sfac$i+12>>2]=0|0; - $$$i1 = $94 ? 0 : 2; - $95 = ((($cod_info)) + 4788|0); - $96 = HEAP32[$95>>2]|0; - $97 = ($96|0)==(2); - if ($97) { - $partition$012$i = 0;$sfb$011$i = 0; - while(1) { - $101 = ((((11824 + (($$$i1*48)|0)|0)) + 16|0) + ($partition$012$i<<2)|0); - $102 = HEAP32[$101>>2]|0; - $103 = (($102|0) / 3)&-1; - $104 = ($102|0)>(2); - if ($104) { - $105 = (($max_sfac$i) + ($partition$012$i<<2)|0); - $106 = ($103|0)>(1); - $$pre$i = HEAP32[$105>>2]|0; - $111 = $$pre$i;$i$19$i = 0;$sfb$110$i = $sfb$011$i; - while(1) { - $107 = ($sfb$110$i*3)|0; - $108 = (((($cod_info)) + 4608|0) + ($107<<2)|0); - $109 = HEAP32[$108>>2]|0; - $110 = ($109|0)>($111|0); - if ($110) { - HEAP32[$105>>2] = $109; - $116 = $109; - } else { - $116 = $111; - } - $112 = (($107) + 1)|0; - $113 = (((($cod_info)) + 4608|0) + ($112<<2)|0); - $114 = HEAP32[$113>>2]|0; - $115 = ($114|0)>($116|0); - if ($115) { - HEAP32[$105>>2] = $114; - $191 = $114; - } else { - $191 = $116; - } - $187 = (($107) + 2)|0; - $188 = (((($cod_info)) + 4608|0) + ($187<<2)|0); - $189 = HEAP32[$188>>2]|0; - $190 = ($189|0)>($191|0); - if ($190) { - HEAP32[$105>>2] = $189; - $228 = $189; - } else { - $228 = $191; - } - $192 = (($i$19$i) + 1)|0; - $193 = (($sfb$110$i) + 1)|0; - $194 = ($192|0)<($103|0); - if ($194) { - $111 = $228;$i$19$i = $192;$sfb$110$i = $193; - } else { - break; - } - } - $smax$i3 = $106 ? $103 : 1; - $117 = (($smax$i3) + ($sfb$011$i))|0; - $sfb$1$lcssa$i = $117; - } else { - $sfb$1$lcssa$i = $sfb$011$i; - } - $118 = (($partition$012$i) + 1)|0; - $exitcond$i6 = ($118|0)==(4); - if ($exitcond$i6) { - break; - } else { - $partition$012$i = $118;$sfb$011$i = $sfb$1$lcssa$i; - } - } - $$pre28$i = HEAP32[$max_sfac$i>>2]|0; - $$phi$trans$insert29$i = ((($max_sfac$i)) + 4|0); - $$pre30$i = HEAP32[$$phi$trans$insert29$i>>2]|0; - $$phi$trans$insert31$i = ((($max_sfac$i)) + 8|0); - $$pre32$i = HEAP32[$$phi$trans$insert31$i>>2]|0; - $$phi$trans$insert33$i = ((($max_sfac$i)) + 12|0); - $$pre34$i = HEAP32[$$phi$trans$insert33$i>>2]|0; - $129 = $$pre28$i;$134 = $$pre30$i;$139 = $$pre32$i;$144 = $$pre34$i;$row_in_table$0$i = 1; - } else { - $98 = (11824 + (($$$i1*48)|0)|0); - $99 = HEAP32[$98>>2]|0; - $100 = ($99|0)>(0); - if ($100) { - $122 = 0;$sfb$314$i = 0; - while(1) { - $119 = (((($cod_info)) + 4608|0) + ($sfb$314$i<<2)|0); - $120 = HEAP32[$119>>2]|0; - $121 = ($120|0)>($122|0); - if ($121) { - HEAP32[$max_sfac$i>>2] = $120; - $226 = $120; - } else { - $226 = $122; - } - $123 = (($sfb$314$i) + 1)|0; - $exitcond23$i = ($123|0)==($99|0); - if ($exitcond23$i) { - $225 = $226;$sfb$3$lcssa$i = $99; - break; - } else { - $122 = $226;$sfb$314$i = $123; - } - } - } else { - $225 = 0;$sfb$3$lcssa$i = 0; - } - $124 = (((11824 + (($$$i1*48)|0)|0)) + 4|0); - $125 = HEAP32[$124>>2]|0; - $126 = ($125|0)>(0); - if ($126) { - $195 = ((($max_sfac$i)) + 4|0); - $199 = 0;$i$213$1$i = 0;$sfb$314$1$i = $sfb$3$lcssa$i; - while(1) { - $196 = (((($cod_info)) + 4608|0) + ($sfb$314$1$i<<2)|0); - $197 = HEAP32[$196>>2]|0; - $198 = ($197|0)>($199|0); - if ($198) { - HEAP32[$195>>2] = $197; - $229 = $197; - } else { - $229 = $199; - } - $200 = (($i$213$1$i) + 1)|0; - $201 = (($sfb$314$1$i) + 1)|0; - $exitcond23$1$i = ($200|0)==($125|0); - if ($exitcond23$1$i) { - $$lcssa31 = $229; - break; - } else { - $199 = $229;$i$213$1$i = $200;$sfb$314$1$i = $201; - } - } - $202 = (($125) + ($sfb$3$lcssa$i))|0; - $227 = $$lcssa31;$sfb$3$lcssa$1$i = $202; - } else { - $227 = 0;$sfb$3$lcssa$1$i = $sfb$3$lcssa$i; - } - $203 = (((11824 + (($$$i1*48)|0)|0)) + 8|0); - $204 = HEAP32[$203>>2]|0; - $205 = ($204|0)>(0); - if ($205) { - $206 = ((($max_sfac$i)) + 8|0); - $210 = 0;$i$213$2$i = 0;$sfb$314$2$i = $sfb$3$lcssa$1$i; - while(1) { - $207 = (((($cod_info)) + 4608|0) + ($sfb$314$2$i<<2)|0); - $208 = HEAP32[$207>>2]|0; - $209 = ($208|0)>($210|0); - if ($209) { - HEAP32[$206>>2] = $208; - $231 = $208; - } else { - $231 = $210; - } - $211 = (($i$213$2$i) + 1)|0; - $212 = (($sfb$314$2$i) + 1)|0; - $exitcond23$2$i = ($211|0)==($204|0); - if ($exitcond23$2$i) { - $$lcssa30 = $231; - break; - } else { - $210 = $231;$i$213$2$i = $211;$sfb$314$2$i = $212; - } - } - $213 = (($204) + ($sfb$3$lcssa$1$i))|0; - $230 = $$lcssa30;$sfb$3$lcssa$2$i = $213; - } else { - $230 = 0;$sfb$3$lcssa$2$i = $sfb$3$lcssa$1$i; - } - $214 = (((11824 + (($$$i1*48)|0)|0)) + 12|0); - $215 = HEAP32[$214>>2]|0; - $216 = ($215|0)>(0); - if ($216) { - $217 = ((($max_sfac$i)) + 12|0); - $221 = 0;$i$213$3$i = 0;$sfb$314$3$i = $sfb$3$lcssa$2$i; - while(1) { - $218 = (((($cod_info)) + 4608|0) + ($sfb$314$3$i<<2)|0); - $219 = HEAP32[$218>>2]|0; - $220 = ($219|0)>($221|0); - if ($220) { - HEAP32[$217>>2] = $219; - $232 = $219; - } else { - $232 = $221; - } - $222 = (($i$213$3$i) + 1)|0; - $223 = (($sfb$314$3$i) + 1)|0; - $exitcond23$3$i = ($222|0)==($215|0); - if ($exitcond23$3$i) { - $129 = $225;$134 = $227;$139 = $230;$144 = $232;$row_in_table$0$i = 0; - break; - } else { - $221 = $232;$i$213$3$i = $222;$sfb$314$3$i = $223; - } - } - } else { - $129 = $225;$134 = $227;$139 = $230;$144 = 0;$row_in_table$0$i = 0; - } - } - $127 = (89096 + ($$$i1<<4)|0); - $128 = HEAP32[$127>>2]|0; - $130 = ($129|0)>($128|0); - $131 = $130&1; - $132 = (((89096 + ($$$i1<<4)|0)) + 4|0); - $133 = HEAP32[$132>>2]|0; - $135 = ($134|0)>($133|0); - $136 = $135&1; - $$over$0$1$i = (($136) + ($131))|0; - $137 = (((89096 + ($$$i1<<4)|0)) + 8|0); - $138 = HEAP32[$137>>2]|0; - $140 = ($139|0)>($138|0); - $141 = $140&1; - $$over$0$2$i = (($$over$0$1$i) + ($141))|0; - $142 = (((89096 + ($$$i1<<4)|0)) + 12|0); - $143 = HEAP32[$142>>2]|0; - $145 = ($144|0)>($143|0); - $146 = $145&1; - $$over$0$3$i = (($$over$0$2$i) + ($146))|0; - $147 = ($$over$0$3$i|0)==(0); - if ($147) { - $148 = ((11824 + (($$$i1*48)|0)|0) + ($row_in_table$0$i<<4)|0); - $149 = ((($cod_info)) + 5188|0); - HEAP32[$149>>2] = $148; - $150 = (89192 + ($129<<2)|0); - $151 = HEAP32[$150>>2]|0; - $152 = ((($cod_info)) + 5192|0); - HEAP32[$152>>2] = $151; - $153 = (89192 + ($134<<2)|0); - $154 = HEAP32[$153>>2]|0; - $155 = ((($cod_info)) + 5196|0); - HEAP32[$155>>2] = $154; - $156 = (89192 + ($139<<2)|0); - $157 = HEAP32[$156>>2]|0; - $158 = ((($cod_info)) + 5200|0); - HEAP32[$158>>2] = $157; - $159 = (89192 + ($144<<2)|0); - $160 = HEAP32[$159>>2]|0; - $161 = ((($cod_info)) + 5204|0); - HEAP32[$161>>2] = $160; - if ($94) { - $162 = ($151*5)|0; - $163 = (($162) + ($154))|0; - $164 = $163 << 4; - $165 = $157 << 2; - $166 = (($165) + ($164))|0; - $167 = (($166) + ($160))|0; - $$sink$i = $167; - } else { - $168 = ($151*3)|0; - $169 = (($168) + 500)|0; - $170 = (($169) + ($154))|0; - $$sink$i = $170; - } - $171 = ((($cod_info)) + 4784|0); - HEAP32[$171>>2] = $$sink$i; - $172 = ((($cod_info)) + 4844|0); - $173 = HEAP32[$148>>2]|0; - $174 = Math_imul($173, $151)|0; - $175 = ((((11824 + (($$$i1*48)|0)|0) + ($row_in_table$0$i<<4)|0)) + 4|0); - $176 = HEAP32[$175>>2]|0; - $177 = Math_imul($176, $154)|0; - $178 = (($177) + ($174))|0; - $179 = ((((11824 + (($$$i1*48)|0)|0) + ($row_in_table$0$i<<4)|0)) + 8|0); - $180 = HEAP32[$179>>2]|0; - $181 = Math_imul($180, $157)|0; - $182 = (($178) + ($181))|0; - $183 = ((((11824 + (($$$i1*48)|0)|0) + ($row_in_table$0$i<<4)|0)) + 12|0); - $184 = HEAP32[$183>>2]|0; - $185 = Math_imul($184, $160)|0; - $186 = (($182) + ($185))|0; - HEAP32[$172>>2] = $186; - } - $$0 = $$over$0$3$i; - STACKTOP = sp;return ($$0|0); -} -function _huffman_init($gfc) { - $gfc = $gfc|0; - var $$bv_index$0$lcssa = 0, $$bv_index$2$lcssa = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $bv_index$0 = 0, $bv_index$0$lcssa = 0, $bv_index$2 = 0, $bv_index$2$lcssa = 0, $i$01 = 0, $scfb_anz$0 = 0; - var $sext = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 85816|0); - HEAP32[$0>>2] = 2; - $i$01 = 2; - while(1) { - $scfb_anz$0 = 0; - while(1) { - $1 = (($scfb_anz$0) + 1)|0; - $2 = (((($gfc)) + 21360|0) + ($1<<2)|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3|0)<($i$01|0); - if ($4) { - $scfb_anz$0 = $1; - } else { - $$lcssa = $1; - break; - } - } - $5 = (89256 + ($$lcssa<<3)|0); - $6 = HEAP32[$5>>2]|0; - $bv_index$0 = $6; - while(1) { - $7 = (($bv_index$0) + 1)|0; - $8 = (((($gfc)) + 21360|0) + ($7<<2)|0); - $9 = HEAP32[$8>>2]|0; - $10 = ($9|0)>($i$01|0); - $11 = (($bv_index$0) + -1)|0; - if ($10) { - $bv_index$0 = $11; - } else { - $bv_index$0$lcssa = $bv_index$0; - break; - } - } - $12 = ($bv_index$0$lcssa|0)<(0); - $$bv_index$0$lcssa = $12 ? $6 : $bv_index$0$lcssa; - $13 = $$bv_index$0$lcssa&255; - $14 = (($i$01) + -2)|0; - $15 = (((($gfc)) + 85100|0) + ($14)|0); - HEAP8[$15>>0] = $13; - $16 = (((89256 + ($$lcssa<<3)|0)) + 4|0); - $17 = HEAP32[$16>>2]|0; - $sext = $$bv_index$0$lcssa << 24; - $18 = $sext >> 24; - $bv_index$2 = $17; - while(1) { - $19 = (($bv_index$2) + 2)|0; - $20 = (($19) + ($18))|0; - $21 = (((($gfc)) + 21360|0) + ($20<<2)|0); - $22 = HEAP32[$21>>2]|0; - $23 = ($22|0)>($i$01|0); - $24 = (($bv_index$2) + -1)|0; - if ($23) { - $bv_index$2 = $24; - } else { - $bv_index$2$lcssa = $bv_index$2; - break; - } - } - $25 = ($bv_index$2$lcssa|0)<(0); - $$bv_index$2$lcssa = $25 ? $17 : $bv_index$2$lcssa; - $26 = $$bv_index$2$lcssa&255; - $27 = (($i$01) + -1)|0; - $28 = (((($gfc)) + 85100|0) + ($27)|0); - HEAP8[$28>>0] = $26; - $29 = (($i$01) + 2)|0; - $30 = ($29|0)<(577); - if ($30) { - $i$01 = $29; - } else { - break; - } - } - return; -} -function _quantize_lines_xrpow($l,$istep,$xp,$pi) { - $l = $l|0; - $istep = +$istep; - $xp = $xp|0; - $pi = $pi|0; - var $$01$lcssa = 0, $$013 = 0, $$04 = 0, $0 = 0, $1 = 0, $10 = 0.0, $100 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0; - var $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0; - var $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0; - var $6 = 0.0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0.0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0.0; - var $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0, $93 = 0.0, $94 = 0.0, $95 = 0.0; - var $96 = 0.0, $97 = 0, $98 = 0, $99 = 0, $fi$0$lcssa = 0, $fi$02 = 0, $scevgep = 0, $scevgep7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $l & 2; - $1 = $l >>> 2; - $2 = ($1|0)==(0); - if ($2) { - $$01$lcssa = $xp;$fi$0$lcssa = $pi; - } else { - $3 = $1 << 2; - $scevgep7 = (($pi) + ($3<<2)|0); - $$013 = $xp;$$04 = $1;$fi$02 = $pi; - while(1) { - $4 = (($$04) + -1)|0; - $5 = +HEAPF32[$$013>>2]; - $6 = $5 * $istep; - $7 = $6; - $8 = ((($$013)) + 4|0); - $9 = +HEAPF32[$8>>2]; - $10 = $9 * $istep; - $11 = $10; - $12 = ((($$013)) + 8|0); - $13 = +HEAPF32[$12>>2]; - $14 = $13 * $istep; - $15 = $14; - $16 = ((($$013)) + 12|0); - $17 = +HEAPF32[$16>>2]; - $18 = $17 * $istep; - $19 = $18; - $20 = $7 + 8388608.0; - $21 = $20; - $22 = $11 + 8388608.0; - $23 = $22; - $24 = ((($fi$02)) + 4|0); - $25 = $15 + 8388608.0; - $26 = $25; - $27 = ((($fi$02)) + 8|0); - $28 = $19 + 8388608.0; - $29 = $28; - $30 = ((($fi$02)) + 12|0); - $31 = (HEAPF32[tempDoublePtr>>2]=$21,HEAP32[tempDoublePtr>>2]|0); - $32 = (($31) + -1258291200)|0; - $33 = (46872 + ($32<<2)|0); - $34 = +HEAPF32[$33>>2]; - $35 = $34; - $36 = $35 + $20; - $37 = $36; - $38 = (HEAPF32[tempDoublePtr>>2]=$23,HEAP32[tempDoublePtr>>2]|0); - $39 = (($38) + -1258291200)|0; - $40 = (46872 + ($39<<2)|0); - $41 = +HEAPF32[$40>>2]; - $42 = $41; - $43 = $42 + $22; - $44 = $43; - $45 = (HEAPF32[tempDoublePtr>>2]=$26,HEAP32[tempDoublePtr>>2]|0); - $46 = (($45) + -1258291200)|0; - $47 = (46872 + ($46<<2)|0); - $48 = +HEAPF32[$47>>2]; - $49 = $48; - $50 = $49 + $25; - $51 = $50; - $52 = (HEAPF32[tempDoublePtr>>2]=$29,HEAP32[tempDoublePtr>>2]|0); - $53 = (($52) + -1258291200)|0; - $54 = (46872 + ($53<<2)|0); - $55 = +HEAPF32[$54>>2]; - $56 = $55; - $57 = $56 + $28; - $58 = $57; - $59 = (HEAPF32[tempDoublePtr>>2]=$37,HEAP32[tempDoublePtr>>2]|0); - $60 = (($59) + -1258291200)|0; - HEAP32[$fi$02>>2] = $60; - $61 = (HEAPF32[tempDoublePtr>>2]=$44,HEAP32[tempDoublePtr>>2]|0); - $62 = (($61) + -1258291200)|0; - HEAP32[$24>>2] = $62; - $63 = (HEAPF32[tempDoublePtr>>2]=$51,HEAP32[tempDoublePtr>>2]|0); - $64 = (($63) + -1258291200)|0; - HEAP32[$27>>2] = $64; - $65 = (HEAPF32[tempDoublePtr>>2]=$58,HEAP32[tempDoublePtr>>2]|0); - $66 = (($65) + -1258291200)|0; - HEAP32[$30>>2] = $66; - $67 = ((($fi$02)) + 16|0); - $68 = ((($$013)) + 16|0); - $69 = ($4|0)==(0); - if ($69) { - break; - } else { - $$013 = $68;$$04 = $4;$fi$02 = $67; - } - } - $scevgep = (($xp) + ($3<<2)|0); - $$01$lcssa = $scevgep;$fi$0$lcssa = $scevgep7; - } - $70 = ($0|0)==(0); - if ($70) { - return; - } - $71 = +HEAPF32[$$01$lcssa>>2]; - $72 = $71 * $istep; - $73 = $72; - $74 = ((($$01$lcssa)) + 4|0); - $75 = +HEAPF32[$74>>2]; - $76 = $75 * $istep; - $77 = $76; - $78 = $73 + 8388608.0; - $79 = $78; - $80 = $77 + 8388608.0; - $81 = $80; - $82 = ((($fi$0$lcssa)) + 4|0); - $83 = (HEAPF32[tempDoublePtr>>2]=$79,HEAP32[tempDoublePtr>>2]|0); - $84 = (($83) + -1258291200)|0; - $85 = (46872 + ($84<<2)|0); - $86 = +HEAPF32[$85>>2]; - $87 = $86; - $88 = $87 + $78; - $89 = $88; - $90 = (HEAPF32[tempDoublePtr>>2]=$81,HEAP32[tempDoublePtr>>2]|0); - $91 = (($90) + -1258291200)|0; - $92 = (46872 + ($91<<2)|0); - $93 = +HEAPF32[$92>>2]; - $94 = $93; - $95 = $94 + $80; - $96 = $95; - $97 = (HEAPF32[tempDoublePtr>>2]=$89,HEAP32[tempDoublePtr>>2]|0); - $98 = (($97) + -1258291200)|0; - HEAP32[$fi$0$lcssa>>2] = $98; - $99 = (HEAPF32[tempDoublePtr>>2]=$96,HEAP32[tempDoublePtr>>2]|0); - $100 = (($99) + -1258291200)|0; - HEAP32[$82>>2] = $100; - return; -} -function _choose_table_nonMMX($ix,$end,$_s) { - $ix = $ix|0; - $end = $end|0; - $_s = $_s|0; - var $$0 = 0, $$0$i = 0, $$0$i1 = 0, $$2$i = 0, $$lcssa = 0, $$max1$0$i = 0, $$max1$0$i$lcssa = 0, $$op$i = 0, $$sum$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; - var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; - var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0; - var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $7 = 0, $8 = 0, $9 = 0, $choice$0$lcssa = 0, $choice$02 = 0, $choice2$0$lcssa$ph = 0, $choice2$0$lcssa8 = 0, $max1$0$i = 0, $max2$0$i = 0, $max2$1$$max1$0$i = 0, $max2$1$i = 0, $max2$1$i$lcssa = 0, $sum$0$i = 0; - var $sum$2$i = 0, $t2$t1$i = 0, $y$0$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $$0$i = $ix;$max1$0$i = 0;$max2$0$i = 0; - while(1) { - $0 = ((($$0$i)) + 4|0); - $1 = HEAP32[$$0$i>>2]|0; - $2 = ((($$0$i)) + 8|0); - $3 = HEAP32[$0>>2]|0; - $4 = ($max1$0$i|0)<($1|0); - $$max1$0$i = $4 ? $1 : $max1$0$i; - $5 = ($max2$0$i|0)<($3|0); - $max2$1$i = $5 ? $3 : $max2$0$i; - $6 = ($2>>>0)<($end>>>0); - if ($6) { - $$0$i = $2;$max1$0$i = $$max1$0$i;$max2$0$i = $max2$1$i; - } else { - $$max1$0$i$lcssa = $$max1$0$i;$max2$1$i$lcssa = $max2$1$i; - break; - } - } - $7 = ($$max1$0$i$lcssa|0)<($max2$1$i$lcssa|0); - $max2$1$$max1$0$i = $7 ? $max2$1$i$lcssa : $$max1$0$i$lcssa; - $8 = ($max2$1$$max1$0$i>>>0)<(16); - if ($8) { - $9 = (89440 + ($max2$1$$max1$0$i<<2)|0); - $10 = HEAP32[$9>>2]|0; - $11 = (FUNCTION_TABLE_iiiii[$10 & 7]($ix,$end,$max2$1$$max1$0$i,$_s)|0); - $$0 = $11; - return ($$0|0); - } - $12 = ($max2$1$$max1$0$i>>>0)>(8206); - if ($12) { - HEAP32[$_s>>2] = 100000; - $$0 = -1; - return ($$0|0); - } - $13 = (($max2$1$$max1$0$i) + -15)|0; - $14 = HEAP32[(82660)>>2]|0; - $15 = ($14>>>0)<($13>>>0); - if ($15) { - $16 = HEAP32[(82676)>>2]|0; - $17 = ($16>>>0)<($13>>>0); - if ($17) { - $49 = HEAP32[(82692)>>2]|0; - $50 = ($49>>>0)<($13>>>0); - if ($50) { - $51 = HEAP32[(82708)>>2]|0; - $52 = ($51>>>0)<($13>>>0); - if ($52) { - $53 = HEAP32[(82724)>>2]|0; - $54 = ($53>>>0)<($13>>>0); - if ($54) { - $55 = HEAP32[(82740)>>2]|0; - $56 = ($55>>>0)<($13>>>0); - if ($56) { - $57 = HEAP32[(82756)>>2]|0; - $58 = ($57>>>0)<($13>>>0); - if ($58) { - $59 = HEAP32[(82772)>>2]|0; - $60 = ($59>>>0)<($13>>>0); - if ($60) { - $choice$0$lcssa = 24;$choice2$0$lcssa8 = 32; - } else { - $choice2$0$lcssa$ph = 31; - label = 9; - } - } else { - $choice2$0$lcssa$ph = 30; - label = 9; - } - } else { - $choice2$0$lcssa$ph = 29; - label = 9; - } - } else { - $choice2$0$lcssa$ph = 28; - label = 9; - } - } else { - $choice2$0$lcssa$ph = 27; - label = 9; - } - } else { - $choice2$0$lcssa$ph = 26; - label = 9; - } - } else { - $choice2$0$lcssa$ph = 25; - label = 9; - } - } else { - $choice2$0$lcssa$ph = 24; - label = 9; - } - L20: do { - if ((label|0) == 9) { - $18 = (($choice2$0$lcssa$ph) + -8)|0; - $choice$02 = $18; - while(1) { - $19 = (((82272 + ($choice$02<<4)|0)) + 4|0); - $20 = HEAP32[$19>>2]|0; - $21 = ($20>>>0)<($13>>>0); - if (!($21)) { - $choice$0$lcssa = $choice$02;$choice2$0$lcssa8 = $choice2$0$lcssa$ph; - break L20; - } - $22 = (($choice$02) + 1)|0; - $23 = ($22|0)<(24); - if ($23) { - $choice$02 = $22; - } else { - $choice$0$lcssa = $22;$choice2$0$lcssa8 = $choice2$0$lcssa$ph; - break; - } - } - } - } while(0); - $24 = (82272 + ($choice$0$lcssa<<4)|0); - $25 = HEAP32[$24>>2]|0; - $26 = $25 << 16; - $27 = (82272 + ($choice2$0$lcssa8<<4)|0); - $28 = HEAP32[$27>>2]|0; - $29 = (($26) + ($28))|0; - $$0$i1 = $ix;$sum$0$i = 0; - while(1) { - $30 = ((($$0$i1)) + 4|0); - $31 = HEAP32[$$0$i1>>2]|0; - $32 = ((($$0$i1)) + 8|0); - $33 = HEAP32[$30>>2]|0; - $34 = ($31>>>0)>(14); - $35 = $34 ? $29 : 0; - $$sum$0$i = (($35) + ($sum$0$i))|0; - $36 = ($33>>>0)>(14); - $37 = $36 ? $29 : 0; - $y$0$i = $36 ? 15 : $33; - $$op$i = $31 << 4; - $38 = $34 ? 240 : $$op$i; - $39 = (($y$0$i) + ($38))|0; - $40 = (82816 + ($39<<2)|0); - $41 = HEAP32[$40>>2]|0; - $sum$2$i = (($$sum$0$i) + ($41))|0; - $42 = (($sum$2$i) + ($37))|0; - $43 = ($32>>>0)<($end>>>0); - if ($43) { - $$0$i1 = $32;$sum$0$i = $42; - } else { - $$lcssa = $42; - break; - } - } - $44 = $$lcssa & 65535; - $45 = $$lcssa >>> 16; - $46 = ($45>>>0)>($44>>>0); - $t2$t1$i = $46 ? $choice2$0$lcssa8 : $choice$0$lcssa; - $$2$i = $46 ? $44 : $45; - $47 = HEAP32[$_s>>2]|0; - $48 = (($47) + ($$2$i))|0; - HEAP32[$_s>>2] = $48; - $$0 = $t2$t1$i; - return ($$0|0); -} -function _count_bit_null($ix,$end,$max,$s) { - $ix = $ix|0; - $end = $end|0; - $max = $max|0; - $s = $s|0; - var label = 0, sp = 0; - sp = STACKTOP; - return 0; -} -function _count_bit_noESC($ix,$end,$mx,$s) { - $ix = $ix|0; - $end = $end|0; - $mx = $mx|0; - $s = $s|0; - var $$0 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $sum1$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[(82300)>>2]|0; - $$0 = $ix;$sum1$0 = 0; - while(1) { - $1 = ((($$0)) + 4|0); - $2 = HEAP32[$$0>>2]|0; - $3 = ((($$0)) + 8|0); - $4 = HEAP32[$1>>2]|0; - $5 = $2 << 1; - $6 = (($5) + ($4))|0; - $7 = (($0) + ($6)|0); - $8 = HEAP8[$7>>0]|0; - $9 = $8&255; - $10 = (($9) + ($sum1$0))|0; - $11 = ($3>>>0)<($end>>>0); - if ($11) { - $$0 = $3;$sum1$0 = $10; - } else { - $$lcssa = $10; - break; - } - } - $12 = HEAP32[$s>>2]|0; - $13 = (($12) + ($$lcssa))|0; - HEAP32[$s>>2] = $13; - return 1; -} -function _count_bit_noESC_from2($ix,$end,$max,$s) { - $ix = $ix|0; - $end = $end|0; - $max = $max|0; - $s = $s|0; - var $$ = 0, $$0 = 0, $$1 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $sum$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($max) + -1)|0; - $1 = (89504 + ($0<<2)|0); - $2 = HEAP32[$1>>2]|0; - $3 = (82272 + ($2<<4)|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($0|0)==(1); - $6 = $5 ? 83840 : 83880; - $$0 = $ix;$sum$0 = 0; - while(1) { - $7 = ((($$0)) + 4|0); - $8 = HEAP32[$$0>>2]|0; - $9 = ((($$0)) + 8|0); - $10 = HEAP32[$7>>2]|0; - $11 = Math_imul($8, $4)|0; - $12 = (($11) + ($10))|0; - $13 = (($6) + ($12<<2)|0); - $14 = HEAP32[$13>>2]|0; - $15 = (($14) + ($sum$0))|0; - $16 = ($9>>>0)<($end>>>0); - if ($16) { - $$0 = $9;$sum$0 = $15; - } else { - $$lcssa = $15; - break; - } - } - $17 = $$lcssa & 65535; - $18 = $$lcssa >>> 16; - $19 = ($18>>>0)>($17>>>0); - $$ = $19 ? $17 : $18; - $20 = $19&1; - $$1 = (($20) + ($2))|0; - $21 = HEAP32[$s>>2]|0; - $22 = (($21) + ($$))|0; - HEAP32[$s>>2] = $22; - return ($$1|0); -} -function _count_bit_noESC_from3($ix,$end,$max,$s) { - $ix = $ix|0; - $end = $end|0; - $max = $max|0; - $s = $s|0; - var $$ = 0, $$0 = 0, $$1 = 0, $$lcssa = 0, $$lcssa12 = 0, $$lcssa13 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; - var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, $sum1$0 = 0, $sum1$2 = 0, $sum2$0 = 0, $sum3$0 = 0, $t$1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($max) + -1)|0; - $1 = (89504 + ($0<<2)|0); - $2 = HEAP32[$1>>2]|0; - $3 = (82272 + ($2<<4)|0); - $4 = HEAP32[$3>>2]|0; - $5 = (((82272 + ($2<<4)|0)) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = (($2) + 1)|0; - $8 = (((82272 + ($7<<4)|0)) + 12|0); - $9 = HEAP32[$8>>2]|0; - $10 = (($2) + 2)|0; - $11 = (((82272 + ($10<<4)|0)) + 12|0); - $12 = HEAP32[$11>>2]|0; - $$0 = $ix;$sum1$0 = 0;$sum2$0 = 0;$sum3$0 = 0; - while(1) { - $13 = ((($$0)) + 4|0); - $14 = HEAP32[$$0>>2]|0; - $15 = ((($$0)) + 8|0); - $16 = HEAP32[$13>>2]|0; - $17 = Math_imul($14, $4)|0; - $18 = (($17) + ($16))|0; - $19 = (($6) + ($18)|0); - $20 = HEAP8[$19>>0]|0; - $21 = $20&255; - $22 = (($21) + ($sum1$0))|0; - $23 = (($9) + ($18)|0); - $24 = HEAP8[$23>>0]|0; - $25 = $24&255; - $26 = (($25) + ($sum2$0))|0; - $27 = (($12) + ($18)|0); - $28 = HEAP8[$27>>0]|0; - $29 = $28&255; - $30 = (($29) + ($sum3$0))|0; - $31 = ($15>>>0)<($end>>>0); - if ($31) { - $$0 = $15;$sum1$0 = $22;$sum2$0 = $26;$sum3$0 = $30; - } else { - $$lcssa = $22;$$lcssa12 = $26;$$lcssa13 = $30; - break; - } - } - $32 = ($$lcssa>>>0)>($$lcssa12>>>0); - $$ = $32 ? $7 : $2; - $$1 = $32 ? $$lcssa12 : $$lcssa; - $33 = ($$1>>>0)>($$lcssa13>>>0); - $t$1 = $33 ? $10 : $$; - $sum1$2 = $33 ? $$lcssa13 : $$1; - $34 = HEAP32[$s>>2]|0; - $35 = (($34) + ($sum1$2))|0; - HEAP32[$s>>2] = $35; - return ($t$1|0); -} -function _free_id3tag($gfc) { - $gfc = $gfc|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $node$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 85704|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(0|0); - if (!($2)) { - _free($1); - HEAP32[$0>>2] = 0; - } - $3 = ((($gfc)) + 85708|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($4|0)==(0|0); - if (!($5)) { - _free($4); - HEAP32[$3>>2] = 0; - } - $6 = ((($gfc)) + 85712|0); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)==(0|0); - if (!($8)) { - _free($7); - HEAP32[$6>>2] = 0; - } - $9 = ((($gfc)) + 85716|0); - $10 = HEAP32[$9>>2]|0; - $11 = ($10|0)==(0|0); - if (!($11)) { - _free($10); - HEAP32[$9>>2] = 0; - } - $12 = ((($gfc)) + 85728|0); - $13 = HEAP32[$12>>2]|0; - $14 = ($13|0)==(0|0); - if (!($14)) { - _free($13); - HEAP32[$12>>2] = 0; - $15 = ((($gfc)) + 85732|0); - HEAP32[$15>>2] = 0; - $16 = ((($gfc)) + 85740|0); - HEAP32[$16>>2] = 0; - } - $17 = ((($gfc)) + 85744|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($18|0)==(0|0); - if ($19) { - return; - } else { - $node$0 = $18; - } - while(1) { - $20 = ((($node$0)) + 12|0); - $21 = HEAP32[$20>>2]|0; - $22 = ((($node$0)) + 24|0); - $23 = HEAP32[$22>>2]|0; - $24 = HEAP32[$node$0>>2]|0; - _free($21); - _free($23); - _free($node$0); - $25 = ($24|0)==(0|0); - if ($25) { - break; - } else { - $node$0 = $24; - } - } - HEAP32[$17>>2] = 0; - $26 = ((($gfc)) + 85748|0); - HEAP32[$26>>2] = 0; - return; -} -function _freegfc($gfc) { - $gfc = $gfc|0; - var $$in$i = 0, $$pre$i = 0, $$pre1$i = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; - var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $i$01 = 0, label = 0, sp = 0; - sp = STACKTOP; - $i$01 = 0; - while(1) { - $0 = (((($gfc)) + 37192|0) + ($i$01<<2)|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(0|0); - if (!($2)) { - _free($1); - HEAP32[$0>>2] = 0; - } - $3 = (($i$01) + 1)|0; - $exitcond = ($3|0)==(641); - if ($exitcond) { - break; - } else { - $i$01 = $3; - } - } - $4 = ((($gfc)) + 37184|0); - $5 = HEAP32[$4>>2]|0; - $6 = ($5|0)==(0|0); - if (!($6)) { - _free($5); - HEAP32[$4>>2] = 0; - } - $7 = ((($gfc)) + 37188|0); - $8 = HEAP32[$7>>2]|0; - $9 = ($8|0)==(0|0); - if (!($9)) { - _free($8); - HEAP32[$7>>2] = 0; - } - $10 = ((($gfc)) + 284|0); - $11 = HEAP32[$10>>2]|0; - $12 = ($11|0)==(0|0); - if (!($12)) { - _free($11); - HEAP32[$10>>2] = 0; - } - $13 = ((($gfc)) + 85780|0); - $14 = HEAP32[$13>>2]|0; - $15 = ($14|0)==(0|0); - if (!($15)) { - _free($14); - HEAP32[$13>>2] = 0; - $16 = ((($gfc)) + 85776|0); - HEAP32[$16>>2] = 0; - } - $17 = ((($gfc)) + 85796|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($18|0)==(0|0); - if (!($19)) { - _free($18); - } - $20 = ((($gfc)) + 85676|0); - $21 = HEAP32[$20>>2]|0; - $22 = ($21|0)==(0|0); - if (!($22)) { - _free($21); - } - $23 = ((($gfc)) + 52152|0); - $24 = HEAP32[$23>>2]|0; - $25 = ($24|0)==(0|0); - if (!($25)) { - _free($24); - } - $26 = ((($gfc)) + 52156|0); - $27 = HEAP32[$26>>2]|0; - $28 = ($27|0)==(0|0); - if (!($28)) { - _free($27); - } - _free_id3tag($gfc); - $29 = ((($gfc)) + 85808|0); - $30 = HEAP32[$29>>2]|0; - $31 = ($30|0)==(0|0); - if (!($31)) { - (_hip_decode_exit(($30|0))|0); - HEAP32[$29>>2] = 0; - } - $32 = ((($gfc)) + 85800|0); - $33 = HEAP32[$32>>2]|0; - $34 = ($33|0)==(0|0); - if ($34) { - _free($gfc); - return; - } - $35 = ((($33)) + 2156|0); - $36 = HEAP32[$35>>2]|0; - $37 = ($36|0)==(0|0); - if ($37) { - $$in$i = $33; - } else { - _free($36); - $$pre$i = HEAP32[$32>>2]|0; - $$in$i = $$pre$i; - } - $38 = ((($$in$i)) + 4316|0); - $39 = HEAP32[$38>>2]|0; - $40 = ($39|0)==(0|0); - if ($40) { - $41 = $$in$i; - } else { - _free($39); - $$pre1$i = HEAP32[$32>>2]|0; - $41 = $$pre1$i; - } - _free($41); - _free($gfc); - return; -} -function _ATHformula($cfg,$f) { - $cfg = $cfg|0; - $f = +$f; - var $0 = 0, $1 = 0, $10 = 0.0, $100 = 0.0, $101 = 0.0, $102 = 0, $103 = 0.0, $104 = 0, $105 = 0.0, $106 = 0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0; - var $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0.0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0, $132 = 0.0, $133 = 0; - var $134 = 0.0, $135 = 0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0.0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0.0; - var $152 = 0.0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0, $159 = 0.0, $16 = 0.0, $160 = 0, $161 = 0.0, $162 = 0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0.0; - var $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0, $177 = 0.0, $178 = 0.0, $179 = 0.0, $18 = 0.0, $180 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0; - var $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0; - var $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0; - var $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0.0; - var $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0; - var $99 = 0, $ath$0 = 0.0, $f$op$i = 0.0, $f$op$i1 = 0.0, $f$op$i10 = 0.0, $f$op$i13 = 0.0, $f$op$i16 = 0.0, $f$op$i4 = 0.0, $f$op$i7 = 0.0, $pow2$i = 0.0, $pow2$i11 = 0.0, $pow2$i14 = 0.0, $pow2$i17 = 0.0, $pow2$i2 = 0.0, $pow2$i5 = 0.0, $pow2$i8 = 0.0, $pow21$i = 0.0, $pow21$i12 = 0.0, $pow21$i15 = 0.0, $pow21$i18 = 0.0; - var $pow21$i3 = 0.0, $pow21$i6 = 0.0, $pow21$i9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($cfg)) + 192|0); - $1 = HEAP32[$0>>2]|0; - switch ($1|0) { - case 5: { - $128 = ((($cfg)) + 188|0); - $129 = +HEAPF32[$128>>2]; - $130 = $f; - $131 = $130 < -0.29999999999999999; - $f$op$i13 = $f * 0.0010000000474974513; - $132 = $131 ? 3.4100000858306885 : $f$op$i13; - $133 = $132 < 3.4100000858306885; - $134 = $133 ? 3.4100000858306885 : $132; - $135 = $134 > 16.100000381469727; - $136 = $134; - $137 = $135 ? 16.100000381469727 : $136; - $138 = (+Math_pow((+$137),-0.80000000000000004)); - $139 = $138 * 3.6400000000000001; - $140 = $137 + -3.3999999999999999; - $pow2$i14 = $140 * $140; - $141 = $pow2$i14 * -0.59999999999999998; - $142 = (+Math_exp((+$141))); - $143 = $142 * 6.7999999999999998; - $144 = $139 - $143; - $145 = $137 + -8.6999999999999993; - $pow21$i15 = $145 * $145; - $146 = $pow21$i15 * -0.14999999999999999; - $147 = (+Math_exp((+$146))); - $148 = $147 * 6.0; - $149 = $144 + $148; - $150 = $129; - $151 = $150 * 4.0000000000000003E-5; - $152 = $151 + 5.9999999999999995E-4; - $153 = (+Math_pow((+$137),4.0)); - $154 = $153 * $152; - $155 = $149 + $154; - $156 = $155; - $ath$0 = $156; - return (+$ath$0); - break; - } - case 1: { - $26 = $f; - $27 = $26 < -0.29999999999999999; - $f$op$i1 = $f * 0.0010000000474974513; - $28 = $27 ? 3.4100000858306885 : $f$op$i1; - $29 = $28 < 0.10000000149011612; - $30 = $29 ? 0.10000000149011612 : $28; - $31 = $30 > 24.0; - $32 = $30; - $33 = $31 ? 24.0 : $32; - $34 = (+Math_pow((+$33),-0.80000000000000004)); - $35 = $34 * 3.6400000000000001; - $36 = $33 + -3.3999999999999999; - $pow2$i2 = $36 * $36; - $37 = $pow2$i2 * -0.59999999999999998; - $38 = (+Math_exp((+$37))); - $39 = $38 * 6.7999999999999998; - $40 = $35 - $39; - $41 = $33 + -8.6999999999999993; - $pow21$i3 = $41 * $41; - $42 = $pow21$i3 * -0.14999999999999999; - $43 = (+Math_exp((+$42))); - $44 = $43 * 6.0; - $45 = $40 + $44; - $46 = (+Math_pow((+$33),4.0)); - $47 = $46 * 5.5999999999999995E-4; - $48 = $45 + $47; - $49 = $48; - $ath$0 = $49; - return (+$ath$0); - break; - } - case 0: { - $2 = $f; - $3 = $2 < -0.29999999999999999; - $f$op$i = $f * 0.0010000000474974513; - $4 = $3 ? 3.4100000858306885 : $f$op$i; - $5 = $4 < 0.10000000149011612; - $6 = $5 ? 0.10000000149011612 : $4; - $7 = $6 > 24.0; - $8 = $6; - $9 = $7 ? 24.0 : $8; - $10 = (+Math_pow((+$9),-0.80000000000000004)); - $11 = $10 * 3.6400000000000001; - $12 = $9 + -3.3999999999999999; - $pow2$i = $12 * $12; - $13 = $pow2$i * -0.59999999999999998; - $14 = (+Math_exp((+$13))); - $15 = $14 * 6.7999999999999998; - $16 = $11 - $15; - $17 = $9 + -8.6999999999999993; - $pow21$i = $17 * $17; - $18 = $pow21$i * -0.14999999999999999; - $19 = (+Math_exp((+$18))); - $20 = $19 * 6.0; - $21 = $16 + $20; - $22 = (+Math_pow((+$9),4.0)); - $23 = $22 * 9.5999999999999991E-4; - $24 = $21 + $23; - $25 = $24; - $ath$0 = $25; - return (+$ath$0); - break; - } - case 3: { - $74 = $f; - $75 = $74 < -0.29999999999999999; - $f$op$i7 = $f * 0.0010000000474974513; - $76 = $75 ? 3.4100000858306885 : $f$op$i7; - $77 = $76 < 0.10000000149011612; - $78 = $77 ? 0.10000000149011612 : $76; - $79 = $78 > 24.0; - $80 = $78; - $81 = $79 ? 24.0 : $80; - $82 = (+Math_pow((+$81),-0.80000000000000004)); - $83 = $82 * 3.6400000000000001; - $84 = $81 + -3.3999999999999999; - $pow2$i8 = $84 * $84; - $85 = $pow2$i8 * -0.59999999999999998; - $86 = (+Math_exp((+$85))); - $87 = $86 * 6.7999999999999998; - $88 = $83 - $87; - $89 = $81 + -8.6999999999999993; - $pow21$i9 = $89 * $89; - $90 = $pow21$i9 * -0.14999999999999999; - $91 = (+Math_exp((+$90))); - $92 = $91 * 6.0; - $93 = $88 + $92; - $94 = (+Math_pow((+$81),4.0)); - $95 = $94 * 6.3999999999999994E-4; - $96 = $93 + $95; - $97 = $96; - $98 = $97 + 6.0; - $ath$0 = $98; - return (+$ath$0); - break; - } - case 4: { - $99 = ((($cfg)) + 188|0); - $100 = +HEAPF32[$99>>2]; - $101 = $f; - $102 = $101 < -0.29999999999999999; - $f$op$i10 = $f * 0.0010000000474974513; - $103 = $102 ? 3.4100000858306885 : $f$op$i10; - $104 = $103 < 0.10000000149011612; - $105 = $104 ? 0.10000000149011612 : $103; - $106 = $105 > 24.0; - $107 = $105; - $108 = $106 ? 24.0 : $107; - $109 = (+Math_pow((+$108),-0.80000000000000004)); - $110 = $109 * 3.6400000000000001; - $111 = $108 + -3.3999999999999999; - $pow2$i11 = $111 * $111; - $112 = $pow2$i11 * -0.59999999999999998; - $113 = (+Math_exp((+$112))); - $114 = $113 * 6.7999999999999998; - $115 = $110 - $114; - $116 = $108 + -8.6999999999999993; - $pow21$i12 = $116 * $116; - $117 = $pow21$i12 * -0.14999999999999999; - $118 = (+Math_exp((+$117))); - $119 = $118 * 6.0; - $120 = $115 + $119; - $121 = $100; - $122 = $121 * 4.0000000000000003E-5; - $123 = $122 + 5.9999999999999995E-4; - $124 = (+Math_pow((+$108),4.0)); - $125 = $124 * $123; - $126 = $120 + $125; - $127 = $126; - $ath$0 = $127; - return (+$ath$0); - break; - } - case 2: { - $50 = $f; - $51 = $50 < -0.29999999999999999; - $f$op$i4 = $f * 0.0010000000474974513; - $52 = $51 ? 3.4100000858306885 : $f$op$i4; - $53 = $52 < 0.10000000149011612; - $54 = $53 ? 0.10000000149011612 : $52; - $55 = $54 > 24.0; - $56 = $54; - $57 = $55 ? 24.0 : $56; - $58 = (+Math_pow((+$57),-0.80000000000000004)); - $59 = $58 * 3.6400000000000001; - $60 = $57 + -3.3999999999999999; - $pow2$i5 = $60 * $60; - $61 = $pow2$i5 * -0.59999999999999998; - $62 = (+Math_exp((+$61))); - $63 = $62 * 6.7999999999999998; - $64 = $59 - $63; - $65 = $57 + -8.6999999999999993; - $pow21$i6 = $65 * $65; - $66 = $pow21$i6 * -0.14999999999999999; - $67 = (+Math_exp((+$66))); - $68 = $67 * 6.0; - $69 = $64 + $68; - $70 = (+Math_pow((+$57),4.0)); - $71 = $70 * 5.9999999999999995E-4; - $72 = $69 + $71; - $73 = $72; - $ath$0 = $73; - return (+$ath$0); - break; - } - default: { - $157 = $f; - $158 = $157 < -0.29999999999999999; - $f$op$i16 = $f * 0.0010000000474974513; - $159 = $158 ? 3.4100000858306885 : $f$op$i16; - $160 = $159 < 0.10000000149011612; - $161 = $160 ? 0.10000000149011612 : $159; - $162 = $161 > 24.0; - $163 = $161; - $164 = $162 ? 24.0 : $163; - $165 = (+Math_pow((+$164),-0.80000000000000004)); - $166 = $165 * 3.6400000000000001; - $167 = $164 + -3.3999999999999999; - $pow2$i17 = $167 * $167; - $168 = $pow2$i17 * -0.59999999999999998; - $169 = (+Math_exp((+$168))); - $170 = $169 * 6.7999999999999998; - $171 = $166 - $170; - $172 = $164 + -8.6999999999999993; - $pow21$i18 = $172 * $172; - $173 = $pow21$i18 * -0.14999999999999999; - $174 = (+Math_exp((+$173))); - $175 = $174 * 6.0; - $176 = $171 + $175; - $177 = (+Math_pow((+$164),4.0)); - $178 = $177 * 5.9999999999999995E-4; - $179 = $176 + $178; - $180 = $179; - $ath$0 = $180; - return (+$ath$0); - } - } - return +(0.0); -} -function _freq2bark($freq) { - $freq = +$freq; - var $$op = 0.0, $0 = 0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $freq < 0.0; - $1 = $freq; - $$op = $1 * 0.001; - $2 = $$op; - $3 = $0 ? 0.0 : $2; - $4 = $3; - $5 = $4 * 0.76000000000000001; - $6 = (+Math_atan((+$5))); - $7 = $6 * 13.0; - $8 = $3 * $3; - $9 = $8; - $10 = $9 * 0.017777777777777778; - $11 = (+Math_atan((+$10))); - $12 = $11 * 3.5; - $13 = $12 + $7; - $14 = $13; - return (+$14); -} -function _FindNearestBitrate($bRate,$version,$samplerate) { - $bRate = $bRate|0; - $version = $version|0; - $samplerate = $samplerate|0; - var $$bitrate$0 = 0, $$version = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $bitrate$01 = 0, $bitrate$1 = 0; - var $bitrate$1$lcssa = 0, $exitcond = 0, $i$02 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($samplerate|0)<(16000); - $$version = $0 ? 2 : $version; - $1 = (((83944 + ($$version<<6)|0)) + 4|0); - $2 = HEAP32[$1>>2]|0; - $bitrate$01 = $2;$i$02 = 2; - while(1) { - $3 = ((83944 + ($$version<<6)|0) + ($i$02<<2)|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($4|0)>(0); - if ($5) { - $6 = (($4) - ($bRate))|0; - $7 = ($6|0)>(0); - $8 = (0 - ($6))|0; - $9 = $7 ? $6 : $8; - $10 = (($bitrate$01) - ($bRate))|0; - $11 = ($10|0)>(0); - $12 = (0 - ($10))|0; - $13 = $11 ? $10 : $12; - $14 = ($9|0)<($13|0); - $$bitrate$0 = $14 ? $4 : $bitrate$01; - $bitrate$1 = $$bitrate$0; - } else { - $bitrate$1 = $bitrate$01; - } - $15 = (($i$02) + 1)|0; - $exitcond = ($15|0)==(15); - if ($exitcond) { - $bitrate$1$lcssa = $bitrate$1; - break; - } else { - $bitrate$01 = $bitrate$1;$i$02 = $15; - } - } - return ($bitrate$1$lcssa|0); -} -function _nearestBitrateFullIndex($bitrate) { - $bitrate = $bitrate|0; - var $$ = 0, $$lcssa = 0, $$lcssa12 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b$0 = 0, $b$0$lcssa11 = 0, $lower_range$0 = 0, $lower_range$0$upper_range$0 = 0, $lower_range_kbps$0 = 0; - var $upper_range$0 = 0, $upper_range_kbps$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $bitrate&65535; - $b$0 = 0; - while(1) { - $1 = ($b$0|0)<(16); - if (!($1)) { - $lower_range$0 = 16;$lower_range_kbps$0 = 320;$upper_range$0 = 16;$upper_range_kbps$0 = 320; - break; - } - $2 = (($b$0) + 1)|0; - $3 = (89568 + ($2<<2)|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($0|0)>($4|0); - $$ = $5 ? $0 : $4; - $6 = ($$|0)==($0|0); - if ($6) { - $b$0 = $2; - } else { - $$lcssa = $2;$$lcssa12 = $4;$b$0$lcssa11 = $b$0; - label = 4; - break; - } - } - if ((label|0) == 4) { - $7 = (89568 + ($b$0$lcssa11<<2)|0); - $8 = HEAP32[$7>>2]|0; - $lower_range$0 = $b$0$lcssa11;$lower_range_kbps$0 = $8;$upper_range$0 = $$lcssa;$upper_range_kbps$0 = $$lcssa12; - } - $9 = (($upper_range_kbps$0) - ($0))|0; - $10 = (($0) - ($lower_range_kbps$0))|0; - $11 = ($9|0)>($10|0); - $lower_range$0$upper_range$0 = $11 ? $lower_range$0 : $upper_range$0; - return ($lower_range$0$upper_range$0|0); -} -function _map2MP3Frequency($freq) { - $freq = $freq|0; - var $$ = 0, $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($freq|0)<(8001); - if ($0) { - $$0 = 8000; - } else { - $1 = ($freq|0)<(11026); - if ($1) { - $$0 = 11025; - } else { - $2 = ($freq|0)<(12001); - if ($2) { - $$0 = 12000; - } else { - $3 = ($freq|0)<(16001); - if ($3) { - $$0 = 16000; - } else { - $4 = ($freq|0)<(22051); - if ($4) { - $$0 = 22050; - } else { - $5 = ($freq|0)<(24001); - if ($5) { - $$0 = 24000; - } else { - $6 = ($freq|0)<(32001); - if ($6) { - $$0 = 32000; - } else { - $7 = ($freq|0)<(44101); - $$ = $7 ? 44100 : 48000; - $$0 = $$; - } - } - } - } - } - } - } - return ($$0|0); -} -function _BitrateIndex($bRate,$version,$samplerate) { - $bRate = $bRate|0; - $version = $version|0; - $samplerate = $samplerate|0; - var $$ = 0, $$0 = 0, $$version = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; - var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; - var $60 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond$1 = 0, $or$cond$10 = 0, $or$cond$11 = 0, $or$cond$12 = 0, $or$cond$13 = 0, $or$cond$14 = 0, $or$cond$2 = 0, $or$cond$3 = 0, $or$cond$4 = 0, $or$cond$5 = 0, $or$cond$6 = 0, $or$cond$7 = 0, $or$cond$8 = 0, $or$cond$9 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $0 = ($samplerate|0)<(16000); - $$version = $0 ? 2 : $version; - $1 = (83944 + ($$version<<6)|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)>(0); - $4 = ($2|0)==($bRate|0); - $or$cond = $3 & $4; - if ($or$cond) { - $$0 = 0; - return ($$0|0); - } - $5 = (((83944 + ($$version<<6)|0)) + 4|0); - $6 = HEAP32[$5>>2]|0; - $7 = ($6|0)>(0); - $8 = ($6|0)==($bRate|0); - $or$cond$1 = $7 & $8; - if ($or$cond$1) { - $$0 = 1; - return ($$0|0); - } - $9 = (((83944 + ($$version<<6)|0)) + 8|0); - $10 = HEAP32[$9>>2]|0; - $11 = ($10|0)>(0); - $12 = ($10|0)==($bRate|0); - $or$cond$2 = $11 & $12; - if ($or$cond$2) { - $$0 = 2; - return ($$0|0); - } - $13 = (((83944 + ($$version<<6)|0)) + 12|0); - $14 = HEAP32[$13>>2]|0; - $15 = ($14|0)>(0); - $16 = ($14|0)==($bRate|0); - $or$cond$3 = $15 & $16; - if ($or$cond$3) { - $$0 = 3; - return ($$0|0); - } - $17 = (((83944 + ($$version<<6)|0)) + 16|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($18|0)>(0); - $20 = ($18|0)==($bRate|0); - $or$cond$4 = $19 & $20; - if ($or$cond$4) { - $$0 = 4; - return ($$0|0); - } - $21 = (((83944 + ($$version<<6)|0)) + 20|0); - $22 = HEAP32[$21>>2]|0; - $23 = ($22|0)>(0); - $24 = ($22|0)==($bRate|0); - $or$cond$5 = $23 & $24; - if ($or$cond$5) { - $$0 = 5; - return ($$0|0); - } - $25 = (((83944 + ($$version<<6)|0)) + 24|0); - $26 = HEAP32[$25>>2]|0; - $27 = ($26|0)>(0); - $28 = ($26|0)==($bRate|0); - $or$cond$6 = $27 & $28; - if ($or$cond$6) { - $$0 = 6; - return ($$0|0); - } - $29 = (((83944 + ($$version<<6)|0)) + 28|0); - $30 = HEAP32[$29>>2]|0; - $31 = ($30|0)>(0); - $32 = ($30|0)==($bRate|0); - $or$cond$7 = $31 & $32; - if ($or$cond$7) { - $$0 = 7; - return ($$0|0); - } - $33 = (((83944 + ($$version<<6)|0)) + 32|0); - $34 = HEAP32[$33>>2]|0; - $35 = ($34|0)>(0); - $36 = ($34|0)==($bRate|0); - $or$cond$8 = $35 & $36; - if ($or$cond$8) { - $$0 = 8; - return ($$0|0); - } - $37 = (((83944 + ($$version<<6)|0)) + 36|0); - $38 = HEAP32[$37>>2]|0; - $39 = ($38|0)>(0); - $40 = ($38|0)==($bRate|0); - $or$cond$9 = $39 & $40; - if ($or$cond$9) { - $$0 = 9; - return ($$0|0); - } - $41 = (((83944 + ($$version<<6)|0)) + 40|0); - $42 = HEAP32[$41>>2]|0; - $43 = ($42|0)>(0); - $44 = ($42|0)==($bRate|0); - $or$cond$10 = $43 & $44; - if ($or$cond$10) { - $$0 = 10; - return ($$0|0); - } - $45 = (((83944 + ($$version<<6)|0)) + 44|0); - $46 = HEAP32[$45>>2]|0; - $47 = ($46|0)>(0); - $48 = ($46|0)==($bRate|0); - $or$cond$11 = $47 & $48; - if ($or$cond$11) { - $$0 = 11; - return ($$0|0); - } - $49 = (((83944 + ($$version<<6)|0)) + 48|0); - $50 = HEAP32[$49>>2]|0; - $51 = ($50|0)>(0); - $52 = ($50|0)==($bRate|0); - $or$cond$12 = $51 & $52; - if ($or$cond$12) { - $$0 = 12; - return ($$0|0); - } - $53 = (((83944 + ($$version<<6)|0)) + 52|0); - $54 = HEAP32[$53>>2]|0; - $55 = ($54|0)>(0); - $56 = ($54|0)==($bRate|0); - $or$cond$13 = $55 & $56; - if ($or$cond$13) { - $$0 = 13; - return ($$0|0); - } else { - $57 = (((83944 + ($$version<<6)|0)) + 56|0); - $58 = HEAP32[$57>>2]|0; - $59 = ($58|0)>(0); - $60 = ($58|0)==($bRate|0); - $or$cond$14 = $59 & $60; - $$ = $or$cond$14 ? 14 : -1; - return ($$|0); - } - return (0)|0; -} -function _SmpFrqIndex($sample_freq,$version) { - $sample_freq = $sample_freq|0; - $version = $version|0; - var $$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - do { - if ((($sample_freq|0) == 12000)) { - HEAP32[$version>>2] = 0; - $$0 = 1; - } else if ((($sample_freq|0) == 44100)) { - HEAP32[$version>>2] = 1; - $$0 = 0; - } else if ((($sample_freq|0) == 11025)) { - HEAP32[$version>>2] = 0; - $$0 = 0; - } else if ((($sample_freq|0) == 16000)) { - HEAP32[$version>>2] = 0; - $$0 = 2; - } else if ((($sample_freq|0) == 48000)) { - HEAP32[$version>>2] = 1; - $$0 = 1; - } else if ((($sample_freq|0) == 22050)) { - HEAP32[$version>>2] = 0; - $$0 = 0; - } else if ((($sample_freq|0) == 24000)) { - HEAP32[$version>>2] = 0; - $$0 = 1; - } else if ((($sample_freq|0) == 8000)) { - HEAP32[$version>>2] = 0; - $$0 = 2; - } else if ((($sample_freq|0) == 32000)) { - HEAP32[$version>>2] = 1; - $$0 = 2; - } else { - HEAP32[$version>>2] = 0; - $$0 = -1; - } - } while(0); - return ($$0|0); -} -function _isResamplingNecessary($cfg) { - $cfg = $cfg|0; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($cfg)) + 48|0); - $1 = HEAP32[$0>>2]|0; - $2 = (+($1|0)); - $3 = $2 * 0.99949997663497925; - $4 = (~~(($3))); - $5 = ((($cfg)) + 44|0); - $6 = HEAP32[$5>>2]|0; - $7 = ($6|0)<($4|0); - if ($7) { - $12 = 1; - $11 = $12&1; - return ($11|0); - } - $8 = $2 * 1.000499963760376; - $9 = (~~(($8))); - $10 = ($9|0)<($6|0); - $12 = $10; - $11 = $12&1; - return ($11|0); -} -function _fill_buffer($gfc,$mfbuf,$in_buffer,$nsamples,$n_in,$n_out) { - $gfc = $gfc|0; - $mfbuf = $mfbuf|0; - $in_buffer = $in_buffer|0; - $nsamples = $nsamples|0; - $n_in = $n_in|0; - $n_out = $n_out|0; - var $$$i = 0, $$0$i$i = 0.0, $$0$in$i$i = 0.0, $$01$i$i = 0.0, $$1$i$i = 0.0, $$in$i = 0, $$lcssa = 0.0, $$lcssa20 = 0.0, $$neg4$i = 0.0, $$neg7$i = 0, $$op$i = 0.0, $$op54$i = 0, $$op54$op$i = 0, $$op54$op$op$i = 0, $$op55$i = 0, $$pre = 0, $$pre$i = 0.0, $$pre$phi52$iZ2D = 0, $$pre10 = 0, $$pre49$i = 0.0; - var $$pre50$i = 0, $$pre51$i = 0, $$sum = 0, $0 = 0, $1 = 0, $10 = 0.0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0; - var $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0.0; - var $131 = 0.0, $132 = 0, $133 = 0, $134 = 0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0; - var $15 = 0.0, $150 = 0, $151 = 0, $152 = 0.0, $153 = 0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0; - var $168 = 0.0, $169 = 0.0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0; - var $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0; - var $203 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0.0; - var $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0; - var $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0; - var $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0; - var $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $ch$0 = 0, $ch$1 = 0, $exitcond$i = 0, $exitcond46$i = 0, $fabsf$i$i = 0.0, $i$033$i = 0, $i$126$i = 0, $i$227$i = 0, $i$316$i = 0, $i$411$i = 0, $i$5$lcssa$i = 0, $i$514$i = 0, $i$613$i = 0; - var $i$tr$lcssa$i$i = 0, $i$tr1$i$i = 0, $i$tr1$i$i$phi = 0, $j$0$lcssa$i = 0, $j$028$i = 0, $j$1$i = 0, $j$3$i = 0, $j$412$i = 0, $j$tr2$i$i = 0, $k$0$lcssa$i = 0, $k$0$lcssa$i$lcssa = 0, $k$018$i = 0, $len$$i = 0, $sum$025$i = 0.0, $xvalue$017$i = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($gfc)) + 84036|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($gfc)) + 76|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3*576)|0; - $5 = ((($gfc)) + 72|0); - $6 = HEAP32[$5>>2]|0; - $7 = ((($gfc)) + 64|0); - $8 = HEAP32[$7>>2]|0; - $9 = (+($8|0)); - $10 = $9 * 0.99949997663497925; - $11 = (~~(($10))); - $12 = ((($gfc)) + 60|0); - $13 = HEAP32[$12>>2]|0; - $14 = ($13|0)<($11|0); - if (!($14)) { - $15 = $9 * 1.000499963760376; - $16 = (~~(($15))); - $17 = ($16|0)<($13|0); - if (!($17)) { - $194 = ($4|0)<($nsamples|0); - $195 = $194 ? $4 : $nsamples; - $196 = $195 << 2; - $ch$1 = 0; - while(1) { - $197 = (($mfbuf) + ($ch$1<<2)|0); - $198 = HEAP32[$197>>2]|0; - $199 = (($198) + ($1<<2)|0); - $200 = (($in_buffer) + ($ch$1<<2)|0); - $201 = HEAP32[$200>>2]|0; - _memcpy(($199|0),($201|0),($196|0))|0; - $202 = (($ch$1) + 1)|0; - $203 = ($202|0)<($6|0); - if ($203) { - $ch$1 = $202; - } else { - break; - } - } - HEAP32[$n_out>>2] = $195; - HEAP32[$n_in>>2] = $195; - return; - } - } - $18 = ((($gfc)) + 12|0); - $19 = ((($gfc)) + 37184|0); - $20 = ((($gfc)) + 37188|0); - $21 = ((($gfc)) + 37168|0); - $22 = ($3|0)>(0); - $28 = $13;$30 = $8;$ch$0 = 0; - while(1) { - $23 = (($mfbuf) + ($ch$0<<2)|0); - $24 = HEAP32[$23>>2]|0; - $25 = (($in_buffer) + ($ch$0<<2)|0); - $26 = HEAP32[$25>>2]|0; - $27 = (+($28|0)); - $29 = (+($30|0)); - $31 = $27 / $29; - $32 = ($28|0)==(0); - if ($32) { - $i$tr$lcssa$i$i = $30; - } else { - $i$tr1$i$i = $30;$j$tr2$i$i = $28; - while(1) { - $33 = (($i$tr1$i$i|0) % ($j$tr2$i$i|0))&-1; - $34 = ($33|0)==(0); - if ($34) { - $i$tr$lcssa$i$i = $j$tr2$i$i; - break; - } else { - $i$tr1$i$i$phi = $j$tr2$i$i;$j$tr2$i$i = $33;$i$tr1$i$i = $i$tr1$i$i$phi; - } - } - } - $35 = (($30|0) / ($i$tr$lcssa$i$i|0))&-1; - $36 = ($35|0)>(320); - $$$i = $36 ? 320 : $35; - $37 = $31 + 0.5; - $38 = (+Math_floor((+$37))); - $39 = $31 - $38; - $40 = (+Math_abs((+$39))); - $41 = $40 < 1.0E-4; - $42 = 1.0 / $31; - $43 = $42; - $44 = $43 > 1.0; - $45 = $41 ? 32 : 31; - $46 = (($45) + 1)|0; - $47 = HEAP32[$18>>2]|0; - $48 = ($47|0)==(0); - if ($48) { - $49 = (_calloc($46,4)|0); - HEAP32[$19>>2] = $49; - $50 = (_calloc($46,4)|0); - HEAP32[$20>>2] = $50; - $51 = $$$i << 1; - $52 = ($$$i|0)<(0); - if ($52) { - ;HEAP32[$21>>2]=0|0;HEAP32[$21+4>>2]=0|0;HEAP32[$21+8>>2]=0|0;HEAP32[$21+12>>2]=0|0; - $j$0$lcssa$i = 0; - } else { - $i$033$i = 0; - while(1) { - $53 = (_calloc($46,4)|0); - $54 = (((($gfc)) + 37192|0) + ($i$033$i<<2)|0); - HEAP32[$54>>2] = $53; - $55 = (($i$033$i) + 1)|0; - $56 = ($i$033$i|0)<($51|0); - if ($56) { - $i$033$i = $55; - } else { - break; - } - } - ;HEAP32[$21>>2]=0|0;HEAP32[$21+4>>2]=0|0;HEAP32[$21+8>>2]=0|0;HEAP32[$21+12>>2]=0|0; - $57 = (+($$$i|0)); - $58 = $57 * 2.0; - $59 = $43; - $$op$i = $59 * 3.1415926535897931; - $60 = $$op$i; - $61 = $44 ? 3.1415927410125732 : $60; - $62 = (+($45|0)); - $63 = $61; - $64 = $63 * 0.31830988618379069; - $65 = $61 * $62; - $66 = (+($45|0)); - $67 = $66 * 3.1415926535897931; - $68 = ($35|0)<(320); - $$op54$i = $35 << 1; - $$op54$op$i = $$op54$i ^ -2; - $$op54$op$op$i = (-2 - ($$op54$op$i))|0; - $69 = $68 ? $$op54$op$op$i : 640; - $j$028$i = 0; - while(1) { - $70 = (($j$028$i) - ($$$i))|0; - $71 = (+($70|0)); - $72 = $71 / $58; - $73 = $72; - $74 = (((($gfc)) + 37192|0) + ($j$028$i<<2)|0); - $75 = HEAP32[$74>>2]|0; - $i$126$i = 0;$sum$025$i = 0.0; - while(1) { - $76 = (+($i$126$i|0)); - $77 = $76 - $73; - $78 = $77 / $62; - $79 = $78 < 0.0; - $$01$i$i = $79 ? 0.0 : $78; - $80 = $$01$i$i > 1.0; - $$1$i$i = $80 ? 1.0 : $$01$i$i; - $81 = $$1$i$i + -0.5; - $fabsf$i$i = (+Math_abs((+$81))); - $82 = $fabsf$i$i; - $83 = $82 < 1.0000000000000001E-9; - if ($83) { - $$0$in$i$i = $64; - } else { - $84 = $81; - $85 = $$1$i$i * 2.0; - $86 = $85; - $87 = $86 * 3.1415926535897931; - $88 = (+Math_cos((+$87))); - $89 = $88 * 0.5; - $90 = 0.41999999999999998 - $89; - $91 = $$1$i$i * 4.0; - $92 = $91; - $93 = $92 * 3.1415926535897931; - $94 = (+Math_cos((+$93))); - $95 = $94 * 0.080000000000000002; - $96 = $90 + $95; - $97 = $96; - $98 = $97; - $99 = $65 * $81; - $100 = $99; - $101 = (+Math_sin((+$100))); - $102 = $98 * $101; - $103 = $67 * $84; - $104 = $102 / $103; - $$0$in$i$i = $104; - } - $$0$i$i = $$0$in$i$i; - $105 = (($75) + ($i$126$i<<2)|0); - HEAPF32[$105>>2] = $$0$i$i; - $106 = $$0$i$i + $sum$025$i; - $107 = (($i$126$i) + 1)|0; - $108 = ($i$126$i|0)<($45|0); - if ($108) { - $i$126$i = $107;$sum$025$i = $106; - } else { - $$lcssa = $106; - break; - } - } - $i$227$i = 0; - while(1) { - $109 = (($75) + ($i$227$i<<2)|0); - $110 = +HEAPF32[$109>>2]; - $111 = $110 / $$lcssa; - HEAPF32[$109>>2] = $111; - $112 = (($i$227$i) + 1)|0; - $113 = ($i$227$i|0)<($45|0); - if ($113) { - $i$227$i = $112; - } else { - break; - } - } - $114 = (($j$028$i) + 1)|0; - $115 = ($j$028$i|0)<($51|0); - if ($115) { - $j$028$i = $114; - } else { - break; - } - } - $116 = ($69|0)>(0); - $$op55$i = $69 | 1; - $117 = $116 ? $$op55$i : 1; - $j$0$lcssa$i = $117; - } - HEAP32[$18>>2] = 1; - $j$1$i = $j$0$lcssa$i; - } else { - $j$1$i = 0; - } - $118 = (((($gfc)) + 37184|0) + ($ch$0<<2)|0); - $119 = HEAP32[$118>>2]|0; - $120 = (((($gfc)) + 37168|0) + ($ch$0<<3)|0); - L36: do { - if ($22) { - $121 = $45 >>> 1; - $122 = (($45) - ($121))|0; - $123 = $45 & 1; - $124 = (+($123|0)); - $125 = $124 * 0.5; - $126 = (+($$$i|0)); - $127 = $126 * 2.0; - $$pre$i = +HEAPF64[$120>>3]; - $k$018$i = 0; - while(1) { - $128 = (+($k$018$i|0)); - $129 = $128 * $31; - $130 = $129 - $$pre$i; - $131 = (+Math_floor((+$130))); - $132 = (~~(($131))); - $133 = (($132) + ($122))|0; - $134 = ($133|0)<($nsamples|0); - if (!($134)) { - $$pre$phi52$iZ2D = $122;$168 = $$pre$i;$j$3$i = $132;$k$0$lcssa$i = $k$018$i; - break L36; - } - $135 = (+($132|0)); - $$neg4$i = $130 - $125; - $136 = $$neg4$i - $135; - $137 = $136; - $138 = $127 * $137; - $139 = $138 + $126; - $140 = $139; - $141 = $140 + 0.5; - $142 = (+Math_floor((+$141))); - $143 = (~~(($142))); - $144 = (($132) - ($121))|0; - $145 = (((($gfc)) + 37192|0) + ($143<<2)|0); - $146 = HEAP32[$145>>2]|0; - $i$316$i = 0;$xvalue$017$i = 0.0; - while(1) { - $147 = (($i$316$i) + ($144))|0; - $148 = ($147|0)<(0); - $149 = (($147) + ($46))|0; - $150 = (($119) + ($149<<2)|0); - $151 = (($26) + ($147<<2)|0); - $$in$i = $148 ? $150 : $151; - $152 = +HEAPF32[$$in$i>>2]; - $153 = (($146) + ($i$316$i<<2)|0); - $154 = +HEAPF32[$153>>2]; - $155 = $154 * $152; - $156 = $155 + $xvalue$017$i; - $157 = (($i$316$i) + 1)|0; - $158 = ($i$316$i|0)<($45|0); - if ($158) { - $i$316$i = $157;$xvalue$017$i = $156; - } else { - $$lcssa20 = $156; - break; - } - } - $$sum = (($k$018$i) + ($1))|0; - $159 = (($24) + ($$sum<<2)|0); - HEAPF32[$159>>2] = $$lcssa20; - $160 = (($k$018$i) + 1)|0; - $161 = ($160|0)<($4|0); - if ($161) { - $k$018$i = $160; - } else { - $$pre$phi52$iZ2D = $122;$168 = $$pre$i;$j$3$i = $132;$k$0$lcssa$i = $160; - break; - } - } - } else { - $$pre49$i = +HEAPF64[$120>>3]; - $$pre50$i = $45 >>> 1; - $$pre51$i = (($45) - ($$pre50$i))|0; - $$pre$phi52$iZ2D = $$pre51$i;$168 = $$pre49$i;$j$3$i = $j$1$i;$k$0$lcssa$i = 0; - } - } while(0); - $162 = (($j$3$i) + ($$pre$phi52$iZ2D))|0; - $163 = ($162|0)>($nsamples|0); - $len$$i = $163 ? $nsamples : $162; - HEAP32[$n_in>>2] = $len$$i; - $164 = (+($len$$i|0)); - $165 = (+($k$0$lcssa$i|0)); - $166 = $165 * $31; - $167 = $168 - $166; - $169 = $167 + $164; - HEAPF64[$120>>3] = $169; - $170 = ($45|0)<($len$$i|0); - if ($170) { - $$neg7$i = $45 ^ -1; - $171 = (($len$$i) + ($$neg7$i))|0; - $i$411$i = 0; - while(1) { - $172 = (($171) + ($i$411$i))|0; - $173 = (($26) + ($172<<2)|0); - $174 = HEAP32[$173>>2]|0; - $175 = (($119) + ($i$411$i<<2)|0); - HEAP32[$175>>2] = $174; - $176 = (($i$411$i) + 1)|0; - $177 = ($176|0)<($46|0); - if ($177) { - $i$411$i = $176; - } else { - break; - } - } - } else { - $178 = (($46) - ($len$$i))|0; - $179 = ($178|0)>(0); - if ($179) { - $i$514$i = 0; - while(1) { - $182 = (($i$514$i) + ($len$$i))|0; - $183 = (($119) + ($182<<2)|0); - $184 = HEAP32[$183>>2]|0; - $185 = (($119) + ($i$514$i<<2)|0); - HEAP32[$185>>2] = $184; - $186 = (($i$514$i) + 1)|0; - $exitcond46$i = ($186|0)==($178|0); - if ($exitcond46$i) { - $i$5$lcssa$i = $178; - break; - } else { - $i$514$i = $186; - } - } - } else { - $i$5$lcssa$i = 0; - } - $180 = ($45|0)<($i$5$lcssa$i|0); - if (!($180)) { - $181 = (($46) - ($i$5$lcssa$i))|0; - $i$613$i = $i$5$lcssa$i;$j$412$i = 0; - while(1) { - $187 = (($26) + ($j$412$i<<2)|0); - $188 = HEAP32[$187>>2]|0; - $189 = (($119) + ($i$613$i<<2)|0); - HEAP32[$189>>2] = $188; - $190 = (($i$613$i) + 1)|0; - $191 = (($j$412$i) + 1)|0; - $exitcond$i = ($191|0)==($181|0); - if ($exitcond$i) { - break; - } else { - $i$613$i = $190;$j$412$i = $191; - } - } - } - } - $192 = (($ch$0) + 1)|0; - $193 = ($192|0)<($6|0); - if (!($193)) { - $k$0$lcssa$i$lcssa = $k$0$lcssa$i; - break; - } - $$pre = HEAP32[$12>>2]|0; - $$pre10 = HEAP32[$7>>2]|0; - $28 = $$pre;$30 = $$pre10;$ch$0 = $192; - } - HEAP32[$n_out>>2] = $k$0$lcssa$i$lcssa; - return; -} -function _lame_report_def($format,$args) { - $format = $format|0; - $args = $args|0; - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[_stderr>>2]|0; - (_vfprintf(($0|0),($format|0),($args|0))|0); - (_fflush(($0|0))|0); - return; -} -function _lame_msgf($gfc,$format,$varargs) { - $gfc = $gfc|0; - $format = $format|0; - $varargs = $varargs|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $args = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $args = sp; - $0 = ($gfc|0)==(0|0); - if ($0) { - STACKTOP = sp;return; - } - $1 = ((($gfc)) + 85828|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(0|0); - if ($3) { - STACKTOP = sp;return; - } - HEAP32[$args>>2] = $varargs; - $4 = HEAP32[$1>>2]|0; - FUNCTION_TABLE_vii[$4 & 3]($format,$args); - STACKTOP = sp;return; -} -function _lame_errorf($gfc,$format,$varargs) { - $gfc = $gfc|0; - $format = $format|0; - $varargs = $varargs|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $args = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $args = sp; - $0 = ($gfc|0)==(0|0); - if ($0) { - STACKTOP = sp;return; - } - $1 = ((($gfc)) + 85836|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(0|0); - if ($3) { - STACKTOP = sp;return; - } - HEAP32[$args>>2] = $varargs; - $4 = HEAP32[$1>>2]|0; - FUNCTION_TABLE_vii[$4 & 3]($format,$args); - STACKTOP = sp;return; -} -function _has_MMX() { - var label = 0, sp = 0; - sp = STACKTOP; - return 0; -} -function _has_3DNow() { - var label = 0, sp = 0; - sp = STACKTOP; - return 0; -} -function _has_SSE() { - var label = 0, sp = 0; - sp = STACKTOP; - return 0; -} -function _has_SSE2() { - var label = 0, sp = 0; - sp = STACKTOP; - return 0; -} -function _disable_FPE() { - var label = 0, sp = 0; - sp = STACKTOP; - return; -} -function _init_log_table() { - var $0 = 0, $1 = 0, $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, $exitcond = 0, $j$01 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[89640>>2]|0; - $1 = ($0|0)==(0); - if ($1) { - $j$01 = 0; - } else { - HEAP32[89640>>2] = 1; - return; - } - while(1) { - $2 = (+($j$01|0)); - $3 = $2 * 0.001953125; - $4 = $3 + 1.0; - $5 = $4; - $6 = (+Math_log((+$5))); - $7 = $6 * 1.4426950408889634; - $8 = $7; - $9 = (89648 + ($j$01<<2)|0); - HEAPF32[$9>>2] = $8; - $10 = (($j$01) + 1)|0; - $exitcond = ($10|0)==(513); - if ($exitcond) { - break; - } else { - $j$01 = $10; - } - } - HEAP32[89640>>2] = 1; - return; -} -function _fast_log2($x) { - $x = +$x; - var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0; - var label = 0, sp = 0; - sp = STACKTOP; - $0 = (HEAPF32[tempDoublePtr>>2]=$x,HEAP32[tempDoublePtr>>2]|0); - $1 = $0 >>> 23; - $2 = $1 & 255; - $3 = (($2) + -127)|0; - $4 = (+($3|0)); - $5 = $0 & 16383; - $6 = (+($5|0)); - $7 = $6 * 6.103515625E-5; - $8 = $0 >>> 14; - $9 = $8 & 511; - $10 = (89648 + ($9<<2)|0); - $11 = +HEAPF32[$10>>2]; - $12 = 1.0 - $7; - $13 = $11 * $12; - $14 = (($9) + 1)|0; - $15 = (89648 + ($14<<2)|0); - $16 = +HEAPF32[$15>>2]; - $17 = $16 * $7; - $18 = $13 + $4; - $19 = $18 + $17; - return (+$19); -} -function _get_lame_short_version() { - var label = 0, sp = 0; - sp = STACKTOP; - return (91704|0); -} -function _qsort($base,$nel,$width,$cmp) { - $base = $base|0; - $nel = $nel|0; - $width = $width|0; - $cmp = $cmp|0; - var $$ = 0, $$0$be$i = 0, $$0$be$i19 = 0, $$0$i44 = 0, $$01$be$i = 0, $$01$be$i18 = 0, $$012$i = 0, $$012$i15 = 0, $$02$i$i = 0, $$02$i3$i = 0, $$02$us$i = 0, $$02$us$i30 = 0, $$03$i = 0, $$03$i14 = 0, $$66 = 0, $$67 = 0, $$lcssa = 0, $$lcssa102 = 0, $$lcssa70 = 0, $$lcssa71 = 0; - var $$pre = 0, $$pre$i = 0, $$pre$i21 = 0, $$pre6$i = 0, $$pre6$i26 = 0, $$sum = 0, $$sum$i = 0, $$sum$i17 = 0, $$sum2 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0; - var $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0; - var $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0; - var $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0; - var $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $4$phi = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; - var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; - var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; - var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $ar$i = 0; - var $exitcond$i = 0, $exitcond$i29 = 0, $head$0$lcssa = 0, $head$076 = 0, $head$174 = 0, $i$0 = 0, $i$0$lcssa$i = 0, $i$0$lcssa$i23 = 0, $i$01$us$i = 0, $i$01$us$i28 = 0, $i$04$i = 0, $i$04$i13 = 0, $lp = 0, $nTrailingZeros$03$i$i = 0, $nTrailingZeros$03$i2$i = 0, $nTrailingZeros$03$i2$i$lcssa = 0, $or$cond = 0, $or$cond68 = 0, $or$cond6873 = 0, $or$cond72 = 0; - var $pshift$0$lcssa = 0, $pshift$077 = 0, $pshift$1 = 0, $pshift$275 = 0, $sum = 0, $sum$i = 0, $sum$i16 = 0, $tmp$i25 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 688|0; - $tmp$i25 = sp + 424|0; - $ar$i = sp + 192|0; - $lp = sp; - $0 = Math_imul($width, $nel)|0; - $1 = ($0|0)==(0); - if ($1) { - STACKTOP = sp;return; - } - $$sum = (($0) - ($width))|0; - $2 = ((($lp)) + 4|0); - HEAP32[$2>>2] = $width; - HEAP32[$lp>>2] = $width; - $4 = $width;$6 = $width;$i$0 = 2; - while(1) { - $3 = (($4) + ($width))|0; - $5 = (($3) + ($6))|0; - $7 = (($lp) + ($i$0<<2)|0); - HEAP32[$7>>2] = $5; - $8 = ($5>>>0)<($0>>>0); - $9 = (($i$0) + 1)|0; - if ($8) { - $4$phi = $6;$6 = $5;$i$0 = $9;$4 = $4$phi; - } else { - break; - } - } - $10 = (0 - ($width))|0; - $11 = (($base) + ($$sum)|0); - $12 = ($$sum|0)>(0); - if ($12) { - $13 = ($width|0)==(0); - $14 = $11; - $16 = 1;$51 = 0;$head$076 = $base;$pshift$077 = 1; - while(1) { - $15 = $16 & 3; - $17 = ($15|0)==(3); - do { - if ($17) { - HEAP32[$ar$i>>2] = $head$076; - $18 = ($pshift$077|0)>(1); - L13: do { - if ($18) { - $$012$i = $pshift$077;$$03$i = $head$076;$24 = $head$076;$i$04$i = 1; - while(1) { - $19 = (($$03$i) + ($10)|0); - $20 = (($$012$i) + -2)|0; - $21 = (($lp) + ($20<<2)|0); - $22 = HEAP32[$21>>2]|0; - $sum$i = (($22) + ($width))|0; - $$sum$i = (0 - ($sum$i))|0; - $23 = (($$03$i) + ($$sum$i)|0); - $25 = (FUNCTION_TABLE_iii[$cmp & 1]($24,$23)|0); - $26 = ($25|0)>(-1); - if ($26) { - $27 = (FUNCTION_TABLE_iii[$cmp & 1]($24,$19)|0); - $28 = ($27|0)>(-1); - if ($28) { - $i$0$lcssa$i = $i$04$i; - break; - } - } - $29 = (FUNCTION_TABLE_iii[$cmp & 1]($23,$19)|0); - $30 = ($29|0)>(-1); - $31 = (($i$04$i) + 1)|0; - $32 = (($ar$i) + ($i$04$i<<2)|0); - if ($30) { - HEAP32[$32>>2] = $23; - $33 = (($$012$i) + -1)|0; - $$0$be$i = $23;$$01$be$i = $33; - } else { - HEAP32[$32>>2] = $19; - $$0$be$i = $19;$$01$be$i = $20; - } - $34 = ($$01$be$i|0)>(1); - if (!($34)) { - $i$0$lcssa$i = $31; - break; - } - $$pre$i = HEAP32[$ar$i>>2]|0; - $$012$i = $$01$be$i;$$03$i = $$0$be$i;$24 = $$pre$i;$i$04$i = $31; - } - $35 = ($i$0$lcssa$i|0)<(2); - if (!($35)) { - $36 = (($ar$i) + ($i$0$lcssa$i<<2)|0); - HEAP32[$36>>2] = $tmp$i25; - if (!($13)) { - $$02$us$i = $width;$48 = $tmp$i25; - while(1) { - $46 = ($$02$us$i>>>0)>(256); - $38 = $46 ? 256 : $$02$us$i; - $47 = HEAP32[$ar$i>>2]|0; - _memcpy(($48|0),($47|0),($38|0))|0; - $44 = $47;$i$01$us$i = 0; - while(1) { - $40 = (($ar$i) + ($i$01$us$i<<2)|0); - $41 = (($i$01$us$i) + 1)|0; - $42 = (($ar$i) + ($41<<2)|0); - $43 = HEAP32[$42>>2]|0; - _memcpy(($44|0),($43|0),($38|0))|0; - $45 = (($44) + ($38)|0); - HEAP32[$40>>2] = $45; - $exitcond$i = ($41|0)==($i$0$lcssa$i|0); - if ($exitcond$i) { - break; - } else { - $44 = $43;$i$01$us$i = $41; - } - } - $37 = ($$02$us$i|0)==($38|0); - if ($37) { - break L13; - } - $39 = (($$02$us$i) - ($38))|0; - $$pre6$i = HEAP32[$36>>2]|0; - $$02$us$i = $39;$48 = $$pre6$i; - } - } - } - } else { - } - } while(0); - $49 = $16 >>> 2; - $50 = $51 << 30; - $52 = $49 | $50; - $53 = $51 >>> 2; - $54 = (($pshift$077) + 2)|0; - $105 = $52;$168 = $53;$pshift$1 = $54; - } else { - $55 = (($pshift$077) + -1)|0; - $56 = (($lp) + ($55<<2)|0); - $57 = HEAP32[$56>>2]|0; - $58 = $head$076; - $59 = (($14) - ($58))|0; - $60 = ($57>>>0)<($59>>>0); - if ($60) { - HEAP32[$ar$i>>2] = $head$076; - $61 = ($pshift$077|0)>(1); - L38: do { - if ($61) { - $$012$i15 = $pshift$077;$$03$i14 = $head$076;$67 = $head$076;$i$04$i13 = 1; - while(1) { - $62 = (($$03$i14) + ($10)|0); - $63 = (($$012$i15) + -2)|0; - $64 = (($lp) + ($63<<2)|0); - $65 = HEAP32[$64>>2]|0; - $sum$i16 = (($65) + ($width))|0; - $$sum$i17 = (0 - ($sum$i16))|0; - $66 = (($$03$i14) + ($$sum$i17)|0); - $68 = (FUNCTION_TABLE_iii[$cmp & 1]($67,$66)|0); - $69 = ($68|0)>(-1); - if ($69) { - $70 = (FUNCTION_TABLE_iii[$cmp & 1]($67,$62)|0); - $71 = ($70|0)>(-1); - if ($71) { - $i$0$lcssa$i23 = $i$04$i13; - break; - } - } - $72 = (FUNCTION_TABLE_iii[$cmp & 1]($66,$62)|0); - $73 = ($72|0)>(-1); - $74 = (($i$04$i13) + 1)|0; - $75 = (($ar$i) + ($i$04$i13<<2)|0); - if ($73) { - HEAP32[$75>>2] = $66; - $76 = (($$012$i15) + -1)|0; - $$0$be$i19 = $66;$$01$be$i18 = $76; - } else { - HEAP32[$75>>2] = $62; - $$0$be$i19 = $62;$$01$be$i18 = $63; - } - $77 = ($$01$be$i18|0)>(1); - if (!($77)) { - $i$0$lcssa$i23 = $74; - break; - } - $$pre$i21 = HEAP32[$ar$i>>2]|0; - $$012$i15 = $$01$be$i18;$$03$i14 = $$0$be$i19;$67 = $$pre$i21;$i$04$i13 = $74; - } - $78 = ($i$0$lcssa$i23|0)<(2); - if (!($78)) { - $79 = (($ar$i) + ($i$0$lcssa$i23<<2)|0); - HEAP32[$79>>2] = $tmp$i25; - if (!($13)) { - $$02$us$i30 = $width;$91 = $tmp$i25; - while(1) { - $89 = ($$02$us$i30>>>0)>(256); - $81 = $89 ? 256 : $$02$us$i30; - $90 = HEAP32[$ar$i>>2]|0; - _memcpy(($91|0),($90|0),($81|0))|0; - $87 = $90;$i$01$us$i28 = 0; - while(1) { - $83 = (($ar$i) + ($i$01$us$i28<<2)|0); - $84 = (($i$01$us$i28) + 1)|0; - $85 = (($ar$i) + ($84<<2)|0); - $86 = HEAP32[$85>>2]|0; - _memcpy(($87|0),($86|0),($81|0))|0; - $88 = (($87) + ($81)|0); - HEAP32[$83>>2] = $88; - $exitcond$i29 = ($84|0)==($i$0$lcssa$i23|0); - if ($exitcond$i29) { - break; - } else { - $87 = $86;$i$01$us$i28 = $84; - } - } - $80 = ($$02$us$i30|0)==($81|0); - if ($80) { - break L38; - } - $82 = (($$02$us$i30) - ($81))|0; - $$pre6$i26 = HEAP32[$79>>2]|0; - $$02$us$i30 = $82;$91 = $$pre6$i26; - } - } - } - } else { - } - } while(0); - } else { - _trinkle($head$076,$width,$cmp,$16,$51,$pshift$077,0,$lp); - } - $92 = ($pshift$077|0)==(1); - if ($92) { - $93 = $51 << 1; - $94 = $16 >>> 31; - $95 = $94 | $93; - $96 = $16 << 1; - $105 = $96;$168 = $95;$pshift$1 = 0; - break; - } else { - $97 = ($55>>>0)>(31); - $98 = (($pshift$077) + -33)|0; - $$ = $97 ? 0 : $16; - $$66 = $97 ? $16 : $51; - $$67 = $97 ? $98 : $55; - $99 = $$66 << $$67; - $100 = (32 - ($$67))|0; - $101 = $$ >>> $100; - $102 = $101 | $99; - $103 = $$ << $$67; - $105 = $103;$168 = $102;$pshift$1 = 1; - break; - } - } - } while(0); - $104 = $105 | 1; - $106 = (($head$076) + ($width)|0); - $107 = ($106>>>0)<($11>>>0); - if ($107) { - $16 = $104;$51 = $168;$head$076 = $106;$pshift$077 = $pshift$1; - } else { - $$lcssa70 = $168;$$lcssa71 = $104;$head$0$lcssa = $106;$pshift$0$lcssa = $pshift$1; - break; - } - } - } else { - $$lcssa70 = 0;$$lcssa71 = 1;$head$0$lcssa = $base;$pshift$0$lcssa = 1; - } - _trinkle($head$0$lcssa,$width,$cmp,$$lcssa71,$$lcssa70,$pshift$0$lcssa,0,$lp); - $108 = ($pshift$0$lcssa|0)==(1); - $109 = ($$lcssa71|0)==(1); - $or$cond72 = $109 & $108; - $110 = ($$lcssa70|0)==(0); - $or$cond6873 = $110 & $or$cond72; - if ($or$cond6873) { - STACKTOP = sp;return; - } else { - $113 = $$lcssa71;$122 = $$lcssa70;$head$174 = $head$0$lcssa;$pshift$275 = $pshift$0$lcssa; - } - while(1) { - $111 = ($pshift$275|0)<(2); - if (!($111)) { - $136 = $122 << 2; - $137 = $113 >>> 30; - $138 = $137 | $136; - $139 = (($pshift$275) + -2)|0; - $140 = $113 << 1; - $141 = $140 & 2147483646; - $142 = $137 << 31; - $143 = $141 | $142; - $144 = $143 ^ 3; - $145 = $138 >>> 1; - $146 = (($lp) + ($139<<2)|0); - $147 = HEAP32[$146>>2]|0; - $sum = (($147) + ($width))|0; - $$sum2 = (0 - ($sum))|0; - $148 = (($head$174) + ($$sum2)|0); - $149 = (($pshift$275) + -1)|0; - _trinkle($148,$width,$cmp,$144,$145,$149,1,$lp); - $150 = $145 << 1; - $151 = $137 & 1; - $152 = $150 | $151; - $153 = $144 << 1; - $154 = $153 | 1; - $155 = (($head$174) + ($10)|0); - _trinkle($155,$width,$cmp,$154,$152,$139,1,$lp); - $113 = $154;$122 = $152;$head$174 = $155;$pshift$275 = $139; - continue; - } - $112 = (($113) + -1)|0; - $114 = ($112|0)==(0); - do { - if ($114) { - $135 = 32; - label = 56; - } else { - $115 = $112 & 1; - $116 = ($115|0)==(0); - if ($116) { - $$02$i$i = $112;$nTrailingZeros$03$i$i = 0; - while(1) { - $117 = (($nTrailingZeros$03$i$i) + 1)|0; - $118 = $$02$i$i >>> 1; - $119 = $118 & 1; - $120 = ($119|0)==(0); - if ($120) { - $$02$i$i = $118;$nTrailingZeros$03$i$i = $117; - } else { - $$lcssa = $117; - break; - } - } - $121 = ($$lcssa|0)==(0); - if ($121) { - label = 51; - } else { - $132 = $$lcssa; - } - } else { - label = 51; - } - if ((label|0) == 51) { - label = 0; - $123 = ($122|0)==(0); - if ($123) { - $135 = 64; - label = 56; - break; - } - $124 = $122 & 1; - $125 = ($124|0)==(0); - if ($125) { - $$02$i3$i = $122;$nTrailingZeros$03$i2$i = 0; - } else { - $$0$i44 = 0;$157 = $113;$160 = $122;$164 = 0; - break; - } - while(1) { - $126 = (($nTrailingZeros$03$i2$i) + 1)|0; - $127 = $$02$i3$i >>> 1; - $128 = $127 & 1; - $129 = ($128|0)==(0); - if ($129) { - $$02$i3$i = $127;$nTrailingZeros$03$i2$i = $126; - } else { - $$lcssa102 = $126;$nTrailingZeros$03$i2$i$lcssa = $nTrailingZeros$03$i2$i; - break; - } - } - $130 = (($nTrailingZeros$03$i2$i$lcssa) + 33)|0; - $131 = ($$lcssa102|0)==(0); - if ($131) { - $$0$i44 = 0;$157 = $113;$160 = $122;$164 = 0; - break; - } else { - $132 = $130; - } - } - $133 = ($132>>>0)>(31); - if ($133) { - $135 = $132; - label = 56; - } else { - $$0$i44 = $132;$157 = $113;$160 = $122;$164 = $132; - } - } - } while(0); - if ((label|0) == 56) { - label = 0; - $134 = (($135) + -32)|0; - $$0$i44 = $134;$157 = $122;$160 = 0;$164 = $135; - } - $156 = $157 >>> $$0$i44; - $158 = (32 - ($$0$i44))|0; - $159 = $160 << $158; - $161 = $159 | $156; - $162 = $160 >>> $$0$i44; - $163 = (($164) + ($pshift$275))|0; - $$pre = (($head$174) + ($10)|0); - $165 = ($163|0)==(1); - $166 = ($161|0)==(1); - $or$cond = $166 & $165; - $167 = ($162|0)==(0); - $or$cond68 = $167 & $or$cond; - if ($or$cond68) { - break; - } else { - $113 = $161;$122 = $162;$head$174 = $$pre;$pshift$275 = $163; - } - } - STACKTOP = sp;return; -} -function _trinkle($head,$width,$cmp,$pp$val,$pp$1$val,$pshift,$trusty,$lp) { - $head = $head|0; - $width = $width|0; - $cmp = $cmp|0; - $pp$val = $pp$val|0; - $pp$1$val = $pp$1$val|0; - $pshift = $pshift|0; - $trusty = $trusty|0; - $lp = $lp|0; - var $$0$be$i = 0, $$0$i = 0, $$0$lcssa = 0, $$0$lcssa49 = 0, $$01$be$i = 0, $$01162 = 0, $$01162$phi = 0, $$012$i = 0, $$02$i$i = 0, $$02$i3$i = 0, $$02$lcssa = 0, $$02$lcssa51 = 0, $$02$us$i = 0, $$02$us$i10 = 0, $$02964 = 0, $$03$i = 0, $$03$lcssa = 0, $$03865 = 0, $$lcssa = 0, $$lcssa76 = 0; - var $$pre = 0, $$pre$i = 0, $$pre6$i = 0, $$pre6$i6 = 0, $$sum = 0, $$sum$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0; - var $110 = 0, $111 = 0, $112 = 0, $113 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; - var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; - var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0; - var $ar = 0, $ar$i = 0, $exitcond$i = 0, $exitcond$i9 = 0, $i$0$lcssa = 0, $i$0$lcssa$i = 0, $i$0$lcssa50 = 0, $i$01$us$i = 0, $i$01$us$i8 = 0, $i$01063 = 0, $i$04$i = 0, $nTrailingZeros$03$i$i = 0, $nTrailingZeros$03$i2$i = 0, $nTrailingZeros$03$i2$i$lcssa = 0, $or$cond = 0, $pp$val1666 = 0, $sum = 0, $sum$i = 0, $tmp$i5 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 720|0; - $tmp$i5 = sp + 456|0; - $ar$i = sp + 228|0; - $ar = sp; - HEAP32[$ar>>2] = $head; - $0 = (0 - ($width))|0; - $1 = ($pp$val|0)!=(1); - $2 = ($pp$1$val|0)!=(0); - $3 = $2 | $1; - L1: do { - if ($3) { - $4 = (($lp) + ($pshift<<2)|0); - $5 = HEAP32[$4>>2]|0; - $6 = (0 - ($5))|0; - $7 = (($head) + ($6)|0); - $8 = (FUNCTION_TABLE_iii[$cmp & 1]($7,$head)|0); - $9 = ($8|0)<(1); - if ($9) { - $$0$lcssa = $head;$$02$lcssa = $pshift;$$03$lcssa = $trusty;$i$0$lcssa = 1; - label = 18; - } else { - $$01162 = $head;$$02964 = $pshift;$$03865 = $trusty;$16 = $7;$33 = $pp$1$val;$i$01063 = 1;$pp$val1666 = $pp$val; - while(1) { - $10 = ($$03865|0)==(0); - $11 = ($$02964|0)>(1); - $or$cond = $10 & $11; - if ($or$cond) { - $12 = (($$01162) + ($0)|0); - $13 = (($$02964) + -2)|0; - $14 = (($lp) + ($13<<2)|0); - $15 = HEAP32[$14>>2]|0; - $17 = (FUNCTION_TABLE_iii[$cmp & 1]($12,$16)|0); - $18 = ($17|0)>(-1); - if ($18) { - $$0$lcssa49 = $$01162;$$02$lcssa51 = $$02964;$i$0$lcssa50 = $i$01063; - break L1; - } - $sum = (($15) + ($width))|0; - $$sum = (0 - ($sum))|0; - $19 = (($$01162) + ($$sum)|0); - $20 = (FUNCTION_TABLE_iii[$cmp & 1]($19,$16)|0); - $21 = ($20|0)>(-1); - if ($21) { - $$0$lcssa49 = $$01162;$$02$lcssa51 = $$02964;$i$0$lcssa50 = $i$01063; - break L1; - } - } - $22 = (($i$01063) + 1)|0; - $23 = (($ar) + ($i$01063<<2)|0); - HEAP32[$23>>2] = $16; - $24 = (($pp$val1666) + -1)|0; - $25 = ($24|0)==(0); - do { - if ($25) { - $46 = 32; - label = 15; - } else { - $26 = $24 & 1; - $27 = ($26|0)==(0); - if ($27) { - $$02$i$i = $24;$nTrailingZeros$03$i$i = 0; - while(1) { - $28 = (($nTrailingZeros$03$i$i) + 1)|0; - $29 = $$02$i$i >>> 1; - $30 = $29 & 1; - $31 = ($30|0)==(0); - if ($31) { - $$02$i$i = $29;$nTrailingZeros$03$i$i = $28; - } else { - $$lcssa = $28; - break; - } - } - $32 = ($$lcssa|0)==(0); - if ($32) { - label = 10; - } else { - $43 = $$lcssa; - } - } else { - label = 10; - } - if ((label|0) == 10) { - label = 0; - $34 = ($33|0)==(0); - if ($34) { - $46 = 64; - label = 15; - break; - } - $35 = $33 & 1; - $36 = ($35|0)==(0); - if ($36) { - $$02$i3$i = $33;$nTrailingZeros$03$i2$i = 0; - } else { - $$0$i = 0;$48 = $pp$val1666;$51 = $33;$55 = 0; - break; - } - while(1) { - $37 = (($nTrailingZeros$03$i2$i) + 1)|0; - $38 = $$02$i3$i >>> 1; - $39 = $38 & 1; - $40 = ($39|0)==(0); - if ($40) { - $$02$i3$i = $38;$nTrailingZeros$03$i2$i = $37; - } else { - $$lcssa76 = $37;$nTrailingZeros$03$i2$i$lcssa = $nTrailingZeros$03$i2$i; - break; - } - } - $41 = (($nTrailingZeros$03$i2$i$lcssa) + 33)|0; - $42 = ($$lcssa76|0)==(0); - if ($42) { - $$0$i = 0;$48 = $pp$val1666;$51 = $33;$55 = 0; - break; - } else { - $43 = $41; - } - } - $44 = ($43>>>0)>(31); - if ($44) { - $46 = $43; - label = 15; - } else { - $$0$i = $43;$48 = $pp$val1666;$51 = $33;$55 = $43; - } - } - } while(0); - if ((label|0) == 15) { - label = 0; - $45 = (($46) + -32)|0; - $$0$i = $45;$48 = $33;$51 = 0;$55 = $46; - } - $47 = $48 >>> $$0$i; - $49 = (32 - ($$0$i))|0; - $50 = $51 << $49; - $52 = $50 | $47; - $53 = $51 >>> $$0$i; - $54 = (($55) + ($$02964))|0; - $56 = ($52|0)!=(1); - $57 = ($53|0)!=(0); - $58 = $57 | $56; - if (!($58)) { - $$0$lcssa49 = $16;$$02$lcssa51 = $54;$i$0$lcssa50 = $22; - break L1; - } - $$pre = HEAP32[$ar>>2]|0; - $59 = (($lp) + ($54<<2)|0); - $60 = HEAP32[$59>>2]|0; - $61 = (0 - ($60))|0; - $62 = (($16) + ($61)|0); - $63 = (FUNCTION_TABLE_iii[$cmp & 1]($62,$$pre)|0); - $64 = ($63|0)<(1); - if ($64) { - $$0$lcssa = $16;$$02$lcssa = $54;$$03$lcssa = 0;$i$0$lcssa = $22; - label = 18; - break; - } else { - $$01162$phi = $16;$$02964 = $54;$$03865 = 0;$16 = $62;$33 = $53;$i$01063 = $22;$pp$val1666 = $52;$$01162 = $$01162$phi; - } - } - } - } else { - $$0$lcssa = $head;$$02$lcssa = $pshift;$$03$lcssa = $trusty;$i$0$lcssa = 1; - label = 18; - } - } while(0); - if ((label|0) == 18) { - $65 = ($$03$lcssa|0)==(0); - if ($65) { - $$0$lcssa49 = $$0$lcssa;$$02$lcssa51 = $$02$lcssa;$i$0$lcssa50 = $i$0$lcssa; - } else { - STACKTOP = sp;return; - } - } - $66 = ($i$0$lcssa50|0)<(2); - L30: do { - if (!($66)) { - $67 = (($ar) + ($i$0$lcssa50<<2)|0); - HEAP32[$67>>2] = $tmp$i5; - $68 = ($width|0)==(0); - if (!($68)) { - $$02$us$i10 = $width;$80 = $tmp$i5; - while(1) { - $78 = ($$02$us$i10>>>0)>(256); - $70 = $78 ? 256 : $$02$us$i10; - $79 = HEAP32[$ar>>2]|0; - _memcpy(($80|0),($79|0),($70|0))|0; - $76 = $79;$i$01$us$i8 = 0; - while(1) { - $72 = (($ar) + ($i$01$us$i8<<2)|0); - $73 = (($i$01$us$i8) + 1)|0; - $74 = (($ar) + ($73<<2)|0); - $75 = HEAP32[$74>>2]|0; - _memcpy(($76|0),($75|0),($70|0))|0; - $77 = (($76) + ($70)|0); - HEAP32[$72>>2] = $77; - $exitcond$i9 = ($73|0)==($i$0$lcssa50|0); - if ($exitcond$i9) { - break; - } else { - $76 = $75;$i$01$us$i8 = $73; - } - } - $69 = ($$02$us$i10|0)==($70|0); - if ($69) { - break L30; - } - $71 = (($$02$us$i10) - ($70))|0; - $$pre6$i6 = HEAP32[$67>>2]|0; - $$02$us$i10 = $71;$80 = $$pre6$i6; - } - } - } - } while(0); - HEAP32[$ar$i>>2] = $$0$lcssa49; - $81 = ($$02$lcssa51|0)>(1); - L39: do { - if ($81) { - $$012$i = $$02$lcssa51;$$03$i = $$0$lcssa49;$87 = $$0$lcssa49;$i$04$i = 1; - while(1) { - $82 = (($$03$i) + ($0)|0); - $83 = (($$012$i) + -2)|0; - $84 = (($lp) + ($83<<2)|0); - $85 = HEAP32[$84>>2]|0; - $sum$i = (($85) + ($width))|0; - $$sum$i = (0 - ($sum$i))|0; - $86 = (($$03$i) + ($$sum$i)|0); - $88 = (FUNCTION_TABLE_iii[$cmp & 1]($87,$86)|0); - $89 = ($88|0)>(-1); - if ($89) { - $90 = (FUNCTION_TABLE_iii[$cmp & 1]($87,$82)|0); - $91 = ($90|0)>(-1); - if ($91) { - $i$0$lcssa$i = $i$04$i; - break; - } - } - $92 = (FUNCTION_TABLE_iii[$cmp & 1]($86,$82)|0); - $93 = ($92|0)>(-1); - $94 = (($i$04$i) + 1)|0; - $95 = (($ar$i) + ($i$04$i<<2)|0); - if ($93) { - HEAP32[$95>>2] = $86; - $96 = (($$012$i) + -1)|0; - $$0$be$i = $86;$$01$be$i = $96; - } else { - HEAP32[$95>>2] = $82; - $$0$be$i = $82;$$01$be$i = $83; - } - $97 = ($$01$be$i|0)>(1); - if (!($97)) { - $i$0$lcssa$i = $94; - break; - } - $$pre$i = HEAP32[$ar$i>>2]|0; - $$012$i = $$01$be$i;$$03$i = $$0$be$i;$87 = $$pre$i;$i$04$i = $94; - } - $98 = ($i$0$lcssa$i|0)<(2); - if ($98) { - $113 = $tmp$i5; - } else { - $99 = (($ar$i) + ($i$0$lcssa$i<<2)|0); - HEAP32[$99>>2] = $tmp$i5; - $100 = ($width|0)==(0); - if ($100) { - $113 = $tmp$i5; - } else { - $$02$us$i = $width;$112 = $tmp$i5; - while(1) { - $110 = ($$02$us$i>>>0)>(256); - $102 = $110 ? 256 : $$02$us$i; - $111 = HEAP32[$ar$i>>2]|0; - _memcpy(($112|0),($111|0),($102|0))|0; - $108 = $111;$i$01$us$i = 0; - while(1) { - $104 = (($ar$i) + ($i$01$us$i<<2)|0); - $105 = (($i$01$us$i) + 1)|0; - $106 = (($ar$i) + ($105<<2)|0); - $107 = HEAP32[$106>>2]|0; - _memcpy(($108|0),($107|0),($102|0))|0; - $109 = (($108) + ($102)|0); - HEAP32[$104>>2] = $109; - $exitcond$i = ($105|0)==($i$0$lcssa$i|0); - if ($exitcond$i) { - break; - } else { - $108 = $107;$i$01$us$i = $105; - } - } - $101 = ($$02$us$i|0)==($102|0); - if ($101) { - $113 = $tmp$i5; - break L39; - } - $103 = (($$02$us$i) - ($102))|0; - $$pre6$i = HEAP32[$99>>2]|0; - $$02$us$i = $103;$112 = $$pre6$i; - } - } - } - } else { - $113 = $tmp$i5; - } - } while(0); - STACKTOP = sp;return; -} -function _isupper($c) { - $c = $c|0; - var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (($c) + -65)|0; - $1 = ($0>>>0)<(26); - $2 = $1&1; - return ($2|0); -} -function _tolower($c) { - $c = $c|0; - var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_isupper($c)|0); - $1 = ($0|0)==(0); - $2 = $c | 32; - $$0 = $1 ? $c : $2; - return ($$0|0); -} -function _exp2($x) { - $x = +$x; - var $$0 = 0.0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0; - var $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $__x = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $__x = sp; - HEAPF64[tempDoublePtr>>3] = $x;$0 = HEAP32[tempDoublePtr>>2]|0; - $1 = HEAP32[tempDoublePtr+4>>2]|0; - $2 = $1 & 2147483647; - $3 = ($2>>>0)>(1083174911); - do { - if ($3) { - $4 = ($2>>>0)>(1083179007); - $5 = ($1|0)>(-1); - $6 = ($0>>>0)>(4294967295); - $7 = ($1|0)==(-1); - $8 = $7 & $6; - $9 = $5 | $8; - $or$cond = $9 & $4; - if ($or$cond) { - $10 = $x * 8.9884656743115795E+307; - $$0 = $10; - STACKTOP = sp;return (+$$0); - } - $11 = ($2>>>0)>(2146435071); - if ($11) { - $12 = -1.0 / $x; - $$0 = $12; - STACKTOP = sp;return (+$$0); - } - $13 = ($1|0)<(0); - if ($13) { - $14 = !($x <= -1075.0); - if ($14) { - $17 = $x + -4503599627370496.0; - $18 = $17 + 4503599627370496.0; - $19 = $18 != $x; - if (!($19)) { - break; - } - $20 = -1.4012984643248171E-45 / $x; - $21 = $20; - HEAPF32[$__x>>2] = $21; - break; - } else { - $15 = -1.4012984643248171E-45 / $x; - $16 = $15; - HEAPF32[$__x>>2] = $16; - $$0 = 0.0; - STACKTOP = sp;return (+$$0); - } - } - } else { - $22 = ($2>>>0)<(1016070144); - if ($22) { - $23 = $x + 1.0; - $$0 = $23; - STACKTOP = sp;return (+$$0); - } - } - } while(0); - $24 = $x + 26388279066624.0; - HEAPF64[tempDoublePtr>>3] = $24;$25 = HEAP32[tempDoublePtr>>2]|0; - $26 = HEAP32[tempDoublePtr+4>>2]|0; - $27 = (($25) + 128)|0; - $28 = $27 & -256; - $29 = (($28|0) / 256)&-1; - $30 = $24 + -26388279066624.0; - $31 = $x - $30; - $32 = $27 << 1; - $33 = $32 & 510; - $34 = (91712 + ($33<<3)|0); - $35 = +HEAPF64[$34>>3]; - $36 = $33 | 1; - $37 = (91712 + ($36<<3)|0); - $38 = +HEAPF64[$37>>3]; - $39 = $31 - $38; - $40 = $35 * $39; - $41 = $39 * 0.0013333559164630223; - $42 = $41 + 0.0096181298421260663; - $43 = $39 * $42; - $44 = $43 + 0.055504108664821403; - $45 = $39 * $44; - $46 = $45 + 0.2402265069591; - $47 = $39 * $46; - $48 = $47 + 0.69314718055994529; - $49 = $40 * $48; - $50 = $35 + $49; - $51 = (+_scalbn($50,$29)); - $$0 = $51; - STACKTOP = sp;return (+$$0); -} -function _frexp($x,$e) { - $x = +$x; - $e = $e|0; - var $$0 = 0.0, $$01 = 0.0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $storemerge = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF64[tempDoublePtr>>3] = $x;$0 = HEAP32[tempDoublePtr>>2]|0; - $1 = HEAP32[tempDoublePtr+4>>2]|0; - $2 = (_bitshift64Lshr(($0|0),($1|0),52)|0); - $3 = tempRet0; - $4 = $2 & 2047; - if ((($4|0) == 0)) { - $5 = $x != 0.0; - if ($5) { - $6 = $x * 1.8446744073709552E+19; - $7 = (+_frexp($6,$e)); - $8 = HEAP32[$e>>2]|0; - $9 = (($8) + -64)|0; - $$01 = $7;$storemerge = $9; - } else { - $$01 = $x;$storemerge = 0; - } - HEAP32[$e>>2] = $storemerge; - $$0 = $$01; - return (+$$0); - } else if ((($4|0) == 2047)) { - $$0 = $x; - return (+$$0); - } else { - $10 = (($4) + -1022)|0; - HEAP32[$e>>2] = $10; - $11 = $1 & -2146435073; - $12 = $11 | 1071644672; - HEAP32[tempDoublePtr>>2] = $0;HEAP32[tempDoublePtr+4>>2] = $12;$13 = +HEAPF64[tempDoublePtr>>3]; - $$0 = $13; - return (+$$0); - } - return +(0.0); -} -function _frexpl($x,$e) { - $x = +$x; - $e = $e|0; - var $0 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (+_frexp($x,$e)); - return (+$0); -} -function _log10($x) { - $x = +$x; - var $$0 = 0.0, $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0; - var $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0; - var $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0; - var $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $8 = 0.0, $9 = 0.0, $hx$0 = 0, $k$0 = 0, $or$cond = 0, $or$cond4 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF64[tempDoublePtr>>3] = $x;$0 = HEAP32[tempDoublePtr>>2]|0; - $1 = HEAP32[tempDoublePtr+4>>2]|0; - $2 = ($1>>>0)<(1048576); - $3 = ($1|0)<(0); - $or$cond = $3 | $2; - do { - if ($or$cond) { - $4 = $1 & 2147483647; - $5 = ($0|0)==(0); - $6 = ($4|0)==(0); - $7 = $5 & $6; - if ($7) { - $8 = $x * $x; - $9 = -1.0 / $8; - $$0 = $9; - return (+$$0); - } - if (!($3)) { - $12 = $x * 18014398509481984.0; - HEAPF64[tempDoublePtr>>3] = $12;$13 = HEAP32[tempDoublePtr>>2]|0; - $14 = HEAP32[tempDoublePtr+4>>2]|0; - $26 = $13;$70 = $14;$hx$0 = $14;$k$0 = -1077; - break; - } - $10 = $x - $x; - $11 = $10 / 0.0; - $$0 = $11; - return (+$$0); - } else { - $15 = ($1>>>0)>(2146435071); - if ($15) { - $$0 = $x; - return (+$$0); - } - $16 = ($1|0)==(1072693248); - $17 = ($0|0)==(0); - $18 = (0)==(0); - $19 = $17 & $18; - $or$cond4 = $19 & $16; - if ($or$cond4) { - $$0 = 0.0; - return (+$$0); - } else { - $26 = $0;$70 = $1;$hx$0 = $1;$k$0 = -1023; - } - } - } while(0); - $20 = (($hx$0) + 614242)|0; - $21 = $20 >>> 20; - $22 = (($k$0) + ($21))|0; - $23 = $20 & 1048575; - $24 = (($23) + 1072079006)|0; - HEAP32[tempDoublePtr>>2] = $26;HEAP32[tempDoublePtr+4>>2] = $24;$25 = +HEAPF64[tempDoublePtr>>3]; - $27 = $25 + -1.0; - $28 = $27 * 0.5; - $29 = $27 * $28; - $30 = $27 + 2.0; - $31 = $27 / $30; - $32 = $31 * $31; - $33 = $32 * $32; - $34 = $33 * 0.15313837699209373; - $35 = $34 + 0.22222198432149784; - $36 = $33 * $35; - $37 = $36 + 0.39999999999409419; - $38 = $33 * $37; - $39 = $33 * 0.14798198605116586; - $40 = $39 + 0.1818357216161805; - $41 = $33 * $40; - $42 = $41 + 0.28571428743662391; - $43 = $33 * $42; - $44 = $43 + 0.66666666666667351; - $45 = $32 * $44; - $46 = $38 + $45; - $47 = $27 - $29; - HEAPF64[tempDoublePtr>>3] = $47;$48 = HEAP32[tempDoublePtr>>2]|0; - $49 = HEAP32[tempDoublePtr+4>>2]|0; - HEAP32[tempDoublePtr>>2] = 0;HEAP32[tempDoublePtr+4>>2] = $49;$50 = +HEAPF64[tempDoublePtr>>3]; - $51 = $27 - $50; - $52 = $51 - $29; - $53 = $29 + $46; - $54 = $31 * $53; - $55 = $54 + $52; - $56 = $50 * 0.43429448187816888; - $57 = (+($22|0)); - $58 = $57 * 0.30102999566361177; - $59 = $57 * 3.6942390771589308E-13; - $60 = $50 + $55; - $61 = $60 * 2.5082946711645275E-11; - $62 = $59 + $61; - $63 = $55 * 0.43429448187816888; - $64 = $63 + $62; - $65 = $58 + $56; - $66 = $58 - $65; - $67 = $56 + $66; - $68 = $67 + $64; - $69 = $65 + $68; - $$0 = $69; - return (+$$0); -} -function _scalbn($x,$n) { - $x = +$x; - $n = $n|0; - var $$ = 0, $$0 = 0, $$1 = 0, $0 = 0, $1 = 0.0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0.0, $9 = 0, $y$0 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($n|0)>(1023); - if ($0) { - $1 = $x * 8.9884656743115795E+307; - $2 = (($n) + -1023)|0; - $3 = ($2|0)>(1023); - if ($3) { - $4 = $1 * 8.9884656743115795E+307; - $5 = (($n) + -2046)|0; - $6 = ($5|0)>(1023); - $$ = $6 ? 1023 : $5; - $$0 = $$;$y$0 = $4; - } else { - $$0 = $2;$y$0 = $1; - } - } else { - $7 = ($n|0)<(-1022); - if ($7) { - $8 = $x * 2.2250738585072014E-308; - $9 = (($n) + 1022)|0; - $10 = ($9|0)<(-1022); - if ($10) { - $11 = $8 * 2.2250738585072014E-308; - $12 = (($n) + 2044)|0; - $13 = ($12|0)<(-1022); - $$1 = $13 ? -1022 : $12; - $$0 = $$1;$y$0 = $11; - } else { - $$0 = $9;$y$0 = $8; - } - } else { - $$0 = $n;$y$0 = $x; - } - } - $14 = (($$0) + 1023)|0; - $15 = (_bitshift64Shl(($14|0),0,52)|0); - $16 = tempRet0; - HEAP32[tempDoublePtr>>2] = $15;HEAP32[tempDoublePtr+4>>2] = $16;$17 = +HEAPF64[tempDoublePtr>>3]; - $18 = $y$0 * $17; - return (+$18); -} -function _wctomb($s,$wc) { - $s = $s|0; - $wc = $wc|0; - var $$0 = 0, $0 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($s|0)==(0|0); - if ($0) { - $$0 = 0; - } else { - $1 = (_wcrtomb($s,$wc,0)|0); - $$0 = $1; - } - return ($$0|0); -} -function _wcrtomb($s,$wc,$st) { - $s = $s|0; - $wc = $wc|0; - $st = $st|0; - var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; - var $44 = 0, $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($s|0)==(0|0); - if ($0) { - $$0 = 1; - return ($$0|0); - } - $1 = ($wc>>>0)<(128); - if ($1) { - $2 = $wc&255; - HEAP8[$s>>0] = $2; - $$0 = 1; - return ($$0|0); - } - $3 = ($wc>>>0)<(2048); - if ($3) { - $4 = $wc >>> 6; - $5 = $4 | 192; - $6 = $5&255; - $7 = ((($s)) + 1|0); - HEAP8[$s>>0] = $6; - $8 = $wc & 63; - $9 = $8 | 128; - $10 = $9&255; - HEAP8[$7>>0] = $10; - $$0 = 2; - return ($$0|0); - } - $11 = ($wc>>>0)<(55296); - $12 = $wc & -8192; - $13 = ($12|0)==(57344); - $or$cond = $11 | $13; - if ($or$cond) { - $14 = $wc >>> 12; - $15 = $14 | 224; - $16 = $15&255; - $17 = ((($s)) + 1|0); - HEAP8[$s>>0] = $16; - $18 = $wc >>> 6; - $19 = $18 & 63; - $20 = $19 | 128; - $21 = $20&255; - $22 = ((($s)) + 2|0); - HEAP8[$17>>0] = $21; - $23 = $wc & 63; - $24 = $23 | 128; - $25 = $24&255; - HEAP8[$22>>0] = $25; - $$0 = 3; - return ($$0|0); - } - $26 = (($wc) + -65536)|0; - $27 = ($26>>>0)<(1048576); - if ($27) { - $28 = $wc >>> 18; - $29 = $28 | 240; - $30 = $29&255; - $31 = ((($s)) + 1|0); - HEAP8[$s>>0] = $30; - $32 = $wc >>> 12; - $33 = $32 & 63; - $34 = $33 | 128; - $35 = $34&255; - $36 = ((($s)) + 2|0); - HEAP8[$31>>0] = $35; - $37 = $wc >>> 6; - $38 = $37 & 63; - $39 = $38 | 128; - $40 = $39&255; - $41 = ((($s)) + 3|0); - HEAP8[$36>>0] = $40; - $42 = $wc & 63; - $43 = $42 | 128; - $44 = $43&255; - HEAP8[$41>>0] = $44; - $$0 = 4; - return ($$0|0); - } else { - $45 = (___errno_location()|0); - HEAP32[$45>>2] = 84; - $$0 = -1; - return ($$0|0); - } - return (0)|0; -} -function ___towrite($f) { - $f = $f|0; - var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($f)) + 74|0); - $1 = HEAP8[$0>>0]|0; - $2 = $1 << 24 >> 24; - $3 = (($2) + 255)|0; - $4 = $3 | $2; - $5 = $4&255; - HEAP8[$0>>0] = $5; - $6 = HEAP32[$f>>2]|0; - $7 = $6 & 8; - $8 = ($7|0)==(0); - if ($8) { - $10 = ((($f)) + 8|0); - HEAP32[$10>>2] = 0; - $11 = ((($f)) + 4|0); - HEAP32[$11>>2] = 0; - $12 = ((($f)) + 44|0); - $13 = HEAP32[$12>>2]|0; - $14 = ((($f)) + 28|0); - HEAP32[$14>>2] = $13; - $15 = ((($f)) + 20|0); - HEAP32[$15>>2] = $13; - $16 = $13; - $17 = ((($f)) + 48|0); - $18 = HEAP32[$17>>2]|0; - $19 = (($16) + ($18)|0); - $20 = ((($f)) + 16|0); - HEAP32[$20>>2] = $19; - $$0 = 0; - return ($$0|0); - } else { - $9 = $6 | 32; - HEAP32[$f>>2] = $9; - $$0 = -1; - return ($$0|0); - } - return (0)|0; -} -function ___fwritex($s,$l,$f) { - $s = $s|0; - $l = $l|0; - $f = $f|0; - var $$0 = 0, $$01 = 0, $$02 = 0, $$pre = 0, $$pre6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; - var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i$0 = 0, $i$0$lcssa10 = 0; - var $i$1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($f)) + 16|0); - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(0|0); - do { - if ($2) { - $3 = (___towrite($f)|0); - $4 = ($3|0)==(0); - if ($4) { - $$pre = HEAP32[$0>>2]|0; - $7 = $$pre; - break; - } else { - $$0 = 0; - return ($$0|0); - } - } else { - $7 = $1; - } - } while(0); - $5 = ((($f)) + 20|0); - $6 = HEAP32[$5>>2]|0; - $8 = $7; - $9 = $6; - $10 = (($8) - ($9))|0; - $11 = ($10>>>0)<($l>>>0); - if ($11) { - $12 = ((($f)) + 36|0); - $13 = HEAP32[$12>>2]|0; - $14 = (FUNCTION_TABLE_iiii[$13 & 3]($f,$s,$l)|0); - $$0 = $14; - return ($$0|0); - } - $15 = ((($f)) + 75|0); - $16 = HEAP8[$15>>0]|0; - $17 = ($16<<24>>24)>(-1); - L11: do { - if ($17) { - $i$0 = $l; - while(1) { - $18 = ($i$0|0)==(0); - if ($18) { - $$01 = $l;$$02 = $s;$29 = $6;$i$1 = 0; - break L11; - } - $19 = (($i$0) + -1)|0; - $20 = (($s) + ($19)|0); - $21 = HEAP8[$20>>0]|0; - $22 = ($21<<24>>24)==(10); - if ($22) { - $i$0$lcssa10 = $i$0; - break; - } else { - $i$0 = $19; - } - } - $23 = ((($f)) + 36|0); - $24 = HEAP32[$23>>2]|0; - $25 = (FUNCTION_TABLE_iiii[$24 & 3]($f,$s,$i$0$lcssa10)|0); - $26 = ($25>>>0)<($i$0$lcssa10>>>0); - if ($26) { - $$0 = $i$0$lcssa10; - return ($$0|0); - } else { - $27 = (($s) + ($i$0$lcssa10)|0); - $28 = (($l) - ($i$0$lcssa10))|0; - $$pre6 = HEAP32[$5>>2]|0; - $$01 = $28;$$02 = $27;$29 = $$pre6;$i$1 = $i$0$lcssa10; - break; - } - } else { - $$01 = $l;$$02 = $s;$29 = $6;$i$1 = 0; - } - } while(0); - _memcpy(($29|0),($$02|0),($$01|0))|0; - $30 = HEAP32[$5>>2]|0; - $31 = (($30) + ($$01)|0); - HEAP32[$5>>2] = $31; - $32 = (($i$1) + ($$01))|0; - $$0 = $32; - return ($$0|0); -} -function _sprintf($s,$fmt,$varargs) { - $s = $s|0; - $fmt = $fmt|0; - $varargs = $varargs|0; - var $0 = 0, $ap = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; - $ap = sp; - HEAP32[$ap>>2] = $varargs; - $0 = (_vsprintf($s,$fmt,$ap)|0); - STACKTOP = sp;return ($0|0); -} -function _MUSL_vfprintf($f,$fmt,$ap) { - $f = $f|0; - $fmt = $fmt|0; - $ap = $ap|0; - var $$ = 0, $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; - var $ap2 = 0, $internal_buf = 0, $nl_arg = 0, $nl_type = 0, $ret$1 = 0, $vacopy_currentptr = 0, dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 224|0; - $ap2 = sp + 120|0; - $nl_type = sp + 80|0; - $nl_arg = sp; - $internal_buf = sp + 136|0; - dest=$nl_type; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - $vacopy_currentptr = HEAP32[$ap>>2]|0; - HEAP32[$ap2>>2] = $vacopy_currentptr; - $0 = (_printf_core(0,$fmt,$ap2,$nl_arg,$nl_type)|0); - $1 = ($0|0)<(0); - if ($1) { - $$0 = -1; - STACKTOP = sp;return ($$0|0); - } - $2 = ((($f)) + 48|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3|0)==(0); - if ($4) { - $6 = ((($f)) + 44|0); - $7 = HEAP32[$6>>2]|0; - HEAP32[$6>>2] = $internal_buf; - $8 = ((($f)) + 28|0); - HEAP32[$8>>2] = $internal_buf; - $9 = ((($f)) + 20|0); - HEAP32[$9>>2] = $internal_buf; - HEAP32[$2>>2] = 80; - $10 = ((($internal_buf)) + 80|0); - $11 = ((($f)) + 16|0); - HEAP32[$11>>2] = $10; - $12 = (_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0); - $13 = ($7|0)==(0|0); - if ($13) { - $ret$1 = $12; - } else { - $14 = ((($f)) + 36|0); - $15 = HEAP32[$14>>2]|0; - (FUNCTION_TABLE_iiii[$15 & 3]($f,0,0)|0); - $16 = HEAP32[$9>>2]|0; - $17 = ($16|0)==(0|0); - $$ = $17 ? -1 : $12; - HEAP32[$6>>2] = $7; - HEAP32[$2>>2] = 0; - HEAP32[$11>>2] = 0; - HEAP32[$8>>2] = 0; - HEAP32[$9>>2] = 0; - $ret$1 = $$; - } - } else { - $5 = (_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0); - $ret$1 = $5; - } - $$0 = $ret$1; - STACKTOP = sp;return ($$0|0); -} -function _vsnprintf($s,$n,$fmt,$ap) { - $s = $s|0; - $n = $n|0; - $fmt = $fmt|0; - $ap = $ap|0; - var $$$02 = 0, $$0 = 0, $$01 = 0, $$02 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0; - var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b = 0, $f = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; - $b = sp + 112|0; - $f = sp; - dest=$f; src=95808; stop=dest+112|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $0 = (($n) + -1)|0; - $1 = ($0>>>0)>(2147483646); - if ($1) { - $2 = ($n|0)==(0); - if ($2) { - $$01 = $b;$$02 = 1; - } else { - $3 = (___errno_location()|0); - HEAP32[$3>>2] = 75; - $$0 = -1; - STACKTOP = sp;return ($$0|0); - } - } else { - $$01 = $s;$$02 = $n; - } - $4 = $$01; - $5 = (-2 - ($4))|0; - $6 = ($$02>>>0)>($5>>>0); - $$$02 = $6 ? $5 : $$02; - $7 = ((($f)) + 48|0); - HEAP32[$7>>2] = $$$02; - $8 = ((($f)) + 20|0); - HEAP32[$8>>2] = $$01; - $9 = ((($f)) + 44|0); - HEAP32[$9>>2] = $$01; - $10 = (($$01) + ($$$02)|0); - $11 = ((($f)) + 16|0); - HEAP32[$11>>2] = $10; - $12 = ((($f)) + 28|0); - HEAP32[$12>>2] = $10; - $13 = (_MUSL_vfprintf($f,$fmt,$ap)|0); - $14 = ($$$02|0)==(0); - if ($14) { - $$0 = $13; - STACKTOP = sp;return ($$0|0); - } - $15 = HEAP32[$8>>2]|0; - $16 = HEAP32[$11>>2]|0; - $17 = ($15|0)==($16|0); - $18 = $17 << 31 >> 31; - $19 = (($15) + ($18)|0); - HEAP8[$19>>0] = 0; - $$0 = $13; - STACKTOP = sp;return ($$0|0); -} -function _vsprintf($s,$fmt,$ap) { - $s = $s|0; - $fmt = $fmt|0; - $ap = $ap|0; - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_vsnprintf($s,2147483647,$fmt,$ap)|0); - return ($0|0); -} -function _memchr($src,$c,$n) { - $src = $src|0; - $c = $c|0; - $n = $n|0; - var $$0$lcssa = 0, $$0$lcssa44 = 0, $$019 = 0, $$1$lcssa = 0, $$110 = 0, $$110$lcssa = 0, $$24 = 0, $$3 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0; - var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; - var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond18 = 0, $s$0$lcssa = 0, $s$0$lcssa43 = 0, $s$020 = 0, $s$15 = 0, $s$2 = 0, $w$0$lcssa = 0, $w$011 = 0, $w$011$lcssa = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = $c & 255; - $1 = $src; - $2 = $1 & 3; - $3 = ($2|0)!=(0); - $4 = ($n|0)!=(0); - $or$cond18 = $4 & $3; - L1: do { - if ($or$cond18) { - $5 = $c&255; - $$019 = $n;$s$020 = $src; - while(1) { - $6 = HEAP8[$s$020>>0]|0; - $7 = ($6<<24>>24)==($5<<24>>24); - if ($7) { - $$0$lcssa44 = $$019;$s$0$lcssa43 = $s$020; - label = 6; - break L1; - } - $8 = ((($s$020)) + 1|0); - $9 = (($$019) + -1)|0; - $10 = $8; - $11 = $10 & 3; - $12 = ($11|0)!=(0); - $13 = ($9|0)!=(0); - $or$cond = $13 & $12; - if ($or$cond) { - $$019 = $9;$s$020 = $8; - } else { - $$0$lcssa = $9;$$lcssa = $13;$s$0$lcssa = $8; - label = 5; - break; - } - } - } else { - $$0$lcssa = $n;$$lcssa = $4;$s$0$lcssa = $src; - label = 5; - } - } while(0); - if ((label|0) == 5) { - if ($$lcssa) { - $$0$lcssa44 = $$0$lcssa;$s$0$lcssa43 = $s$0$lcssa; - label = 6; - } else { - $$3 = 0;$s$2 = $s$0$lcssa; - } - } - L8: do { - if ((label|0) == 6) { - $14 = HEAP8[$s$0$lcssa43>>0]|0; - $15 = $c&255; - $16 = ($14<<24>>24)==($15<<24>>24); - if ($16) { - $$3 = $$0$lcssa44;$s$2 = $s$0$lcssa43; - } else { - $17 = Math_imul($0, 16843009)|0; - $18 = ($$0$lcssa44>>>0)>(3); - L11: do { - if ($18) { - $$110 = $$0$lcssa44;$w$011 = $s$0$lcssa43; - while(1) { - $19 = HEAP32[$w$011>>2]|0; - $20 = $19 ^ $17; - $21 = (($20) + -16843009)|0; - $22 = $20 & -2139062144; - $23 = $22 ^ -2139062144; - $24 = $23 & $21; - $25 = ($24|0)==(0); - if (!($25)) { - $$110$lcssa = $$110;$w$011$lcssa = $w$011; - break; - } - $26 = ((($w$011)) + 4|0); - $27 = (($$110) + -4)|0; - $28 = ($27>>>0)>(3); - if ($28) { - $$110 = $27;$w$011 = $26; - } else { - $$1$lcssa = $27;$w$0$lcssa = $26; - label = 11; - break L11; - } - } - $$24 = $$110$lcssa;$s$15 = $w$011$lcssa; - } else { - $$1$lcssa = $$0$lcssa44;$w$0$lcssa = $s$0$lcssa43; - label = 11; - } - } while(0); - if ((label|0) == 11) { - $29 = ($$1$lcssa|0)==(0); - if ($29) { - $$3 = 0;$s$2 = $w$0$lcssa; - break; - } else { - $$24 = $$1$lcssa;$s$15 = $w$0$lcssa; - } - } - while(1) { - $30 = HEAP8[$s$15>>0]|0; - $31 = ($30<<24>>24)==($15<<24>>24); - if ($31) { - $$3 = $$24;$s$2 = $s$15; - break L8; - } - $32 = ((($s$15)) + 1|0); - $33 = (($$24) + -1)|0; - $34 = ($33|0)==(0); - if ($34) { - $$3 = 0;$s$2 = $32; - break; - } else { - $$24 = $33;$s$15 = $32; - } - } - } - } - } while(0); - $35 = ($$3|0)!=(0); - $36 = $35 ? $s$2 : 0; - return ($36|0); -} -function _printf_core($f,$fmt,$ap,$nl_arg,$nl_type) { - $f = $f|0; - $fmt = $fmt|0; - $ap = $ap|0; - $nl_arg = $nl_arg|0; - $nl_type = $nl_type|0; - var $$ = 0, $$$i = 0, $$0 = 0, $$0$i = 0, $$0$lcssa$i = 0, $$0$lcssa$i$i = 0, $$0$lcssa$i104$i = 0, $$0$lcssa$i128$i = 0, $$0$lcssa$i143$i = 0, $$0$lcssa$i39$i = 0, $$0$lcssa$i46 = 0, $$0$lcssa$i46$i = 0, $$0$lcssa$i48$i = 0, $$0$lcssa$i51 = 0, $$0$lcssa$i53 = 0, $$0$lcssa$i56$i = 0, $$0$lcssa$i61 = 0, $$0$lcssa$i63$i = 0, $$0$lcssa$i68 = 0, $$0$lcssa$i69$i = 0; - var $$0$lcssa$i75 = 0, $$0$lcssa$i76$i = 0, $$0$lcssa$i84$i = 0, $$0$lcssa$i85 = 0, $$0$lcssa$i97$i = 0, $$01$i = 0, $$01$i$i = 0, $$01$i102$i = 0, $$01$i126$i = 0, $$01$i141$i = 0, $$01$i37$i = 0, $$01$i44 = 0, $$01$i44$i = 0, $$01$i54$i = 0, $$01$i59 = 0, $$01$i61$i = 0, $$01$i66 = 0, $$01$i67$i = 0, $$01$i73 = 0, $$01$i74$i = 0; - var $$01$i83 = 0, $$01$i95$i = 0, $$01$lcssa$off0$i = 0, $$01$lcssa$off0$i$i = 0, $$01$lcssa$off0$i85$i = 0, $$012$i = 0, $$013$i = 0, $$03$i48 = 0, $$05$i = 0, $$05$i$i = 0, $$05$i79$i = 0, $$07$i = 0.0, $$1$i = 0.0, $$1$lcssa$i$i = 0, $$1$lcssa$i112$i = 0, $$114$i = 0, $$12$i = 0, $$12$i$i = 0, $$12$i110$i = 0, $$12$i119$i = 0; - var $$12$i134$i = 0, $$12$i134$i$lcssa = 0, $$12$i87$i = 0, $$2$i = 0.0, $$2$us$i = 0.0, $$2$us$us$i = 0.0, $$20$i = 0.0, $$21$i = 0, $$210$$22$i = 0, $$210$$24$i = 0, $$210$i = 0, $$23$i = 0, $$24 = 0, $$25 = 0, $$3$i = 0.0, $$31$i = 0, $$311$i = 0, $$4$i = 0.0, $$412$lcssa$i = 0, $$412184$i = 0; - var $$5196$i = 0, $$92 = 0, $$a$3$i = 0, $$a$3$us$i = 0, $$a$3$us303$i = 0, $$a$3$us304$i = 0, $$a$3305$i = 0, $$a$3306$i = 0, $$fl$4 = 0, $$l10n$0 = 0, $$lcssa106 = 0, $$lcssa275$i = 0, $$lcssa450 = 0, $$lcssa451 = 0, $$lcssa455 = 0, $$lcssa457 = 0, $$lcssa458 = 0, $$lcssa459 = 0, $$lcssa460 = 0, $$lcssa461 = 0; - var $$lcssa463 = 0, $$lcssa464 = 0, $$lcssa470 = 0, $$lcssa474 = 0, $$lcssa476 = 0, $$lcssa479 = 0, $$lcssa480 = 0, $$lcssa483 = 0.0, $$lcssa484 = 0, $$lcssa487 = 0, $$lcssa491 = 0, $$mask$i = 0, $$mask$i38 = 0, $$mask1$i = 0, $$mask1$i37 = 0, $$neg151$i = 0, $$neg152$i = 0, $$p$$i = 0, $$p$5 = 0, $$p$i = 0; - var $$pn$i = 0, $$pr$i = 0, $$pr146$i = 0, $$pre = 0, $$pre$i = 0, $$pre$phi302$iZ2D = 0, $$pre270 = 0, $$pre300$i = 0, $$pre301$i = 0, $$sum$i = 0, $$sum15$i = 0, $$sum16$i = 0, $$z$3$i = 0, $$z$4$i = 0, $$z$4$us$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0; - var $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0; - var $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0; - var $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0; - var $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0; - var $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0; - var $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0; - var $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0; - var $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0, $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0; - var $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0.0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0, $116 = 0, $1160 = 0, $1161 = 0.0, $1162 = 0, $1163 = 0; - var $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $1169$phi = 0, $117 = 0, $1170 = 0, $1170$phi = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0; - var $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0; - var $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0; - var $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0; - var $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0; - var $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0; - var $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0; - var $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0; - var $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0.0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0.0, $253 = 0, $254 = 0, $255 = 0; - var $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0; - var $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0; - var $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0; - var $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0; - var $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0; - var $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0; - var $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0; - var $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0; - var $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0; - var $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0.0, $431 = 0, $432 = 0.0, $433 = 0, $434 = 0, $435 = 0; - var $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0; - var $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0.0; - var $472 = 0.0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0.0, $488 = 0, $489 = 0, $49 = 0; - var $490 = 0, $491 = 0.0, $492 = 0.0, $493 = 0.0, $494 = 0.0, $495 = 0.0, $496 = 0.0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0; - var $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0; - var $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0; - var $544 = 0.0, $545 = 0.0, $546 = 0.0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0.0, $56 = 0, $560 = 0.0, $561 = 0.0; - var $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0.0, $575 = 0.0, $576 = 0.0, $577 = 0, $578 = 0, $579 = 0, $58 = 0; - var $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0; - var $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0; - var $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0.0, $632 = 0, $633 = 0; - var $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0.0, $64 = 0, $640 = 0.0, $641 = 0.0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0; - var $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0; - var $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0; - var $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0; - var $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0; - var $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0; - var $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0; - var $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0; - var $779 = 0, $78 = 0, $780 = 0.0, $781 = 0.0, $782 = 0, $783 = 0.0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0; - var $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0; - var $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0; - var $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0; - var $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0; - var $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0; - var $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0; - var $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0; - var $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0; - var $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0; - var $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0; - var $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0; - var $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $a$0 = 0, $a$1 = 0, $a$1$lcssa$i = 0, $a$1253$i = 0, $a$2 = 0, $a$2$ph$i = 0, $a$3$lcssa$i = 0, $a$3240$i = 0, $a$3240$us$i = 0, $a$5$lcssa$i = 0, $a$5215$i = 0, $a$6$i = 0, $a$7$i = 0, $a$8$ph$i = 0, $arglist_current = 0; - var $arglist_current11 = 0, $arglist_current14 = 0, $arglist_current17 = 0, $arglist_current2 = 0, $arglist_current20 = 0, $arglist_current23 = 0, $arglist_current26 = 0, $arglist_current29 = 0, $arglist_current32 = 0, $arglist_current35 = 0, $arglist_current38 = 0, $arglist_current41 = 0, $arglist_current44 = 0, $arglist_current47 = 0, $arglist_current5 = 0, $arglist_current50 = 0, $arglist_current53 = 0, $arglist_current56 = 0, $arglist_current59 = 0, $arglist_current62 = 0; - var $arglist_current8 = 0, $arglist_next = 0, $arglist_next12 = 0, $arglist_next15 = 0, $arglist_next18 = 0, $arglist_next21 = 0, $arglist_next24 = 0, $arglist_next27 = 0, $arglist_next3 = 0, $arglist_next30 = 0, $arglist_next33 = 0, $arglist_next36 = 0, $arglist_next39 = 0, $arglist_next42 = 0, $arglist_next45 = 0, $arglist_next48 = 0, $arglist_next51 = 0, $arglist_next54 = 0, $arglist_next57 = 0, $arglist_next6 = 0; - var $arglist_next60 = 0, $arglist_next63 = 0, $arglist_next9 = 0, $argpos$0 = 0, $big$i = 0, $buf = 0, $buf$i = 0, $carry$0246$i = 0, $carry3$0234$i = 0, $carry3$0234$us$i = 0, $cnt$0 = 0, $cnt$1 = 0, $cnt$1$lcssa = 0, $d$0$i = 0, $d$0245$i = 0, $d$0247$i = 0, $d$1233$i = 0, $d$1233$us$i = 0, $d$2$lcssa$i = 0, $d$2214$i = 0; - var $d$3$i = 0, $d$4191$i = 0, $d$5183$i = 0, $d$6195$i = 0, $e$0229$i = 0, $e$1$i = 0, $e$2210$i = 0, $e$3$i = 0, $e$4$ph$i = 0, $e2$i = 0, $ebuf0$i = 0, $estr$0$i = 0, $estr$1$lcssa$i = 0, $estr$1$ph$i = 0, $estr$1201$i = 0, $estr$2$i = 0, $exitcond$i = 0, $expanded = 0, $expanded101 = 0, $expanded102 = 0; - var $expanded103 = 0, $expanded105 = 0, $expanded106 = 0, $expanded108 = 0, $expanded109 = 0, $expanded110 = 0, $expanded112 = 0, $expanded113 = 0, $expanded115 = 0, $expanded116 = 0, $expanded117 = 0, $expanded119 = 0, $expanded120 = 0, $expanded122 = 0, $expanded123 = 0, $expanded124 = 0, $expanded126 = 0, $expanded127 = 0, $expanded129 = 0, $expanded130 = 0; - var $expanded131 = 0, $expanded133 = 0, $expanded134 = 0, $expanded136 = 0, $expanded137 = 0, $expanded138 = 0, $expanded140 = 0, $expanded141 = 0, $expanded143 = 0, $expanded144 = 0, $expanded145 = 0, $expanded147 = 0, $expanded148 = 0, $expanded150 = 0, $expanded151 = 0, $expanded152 = 0, $expanded154 = 0, $expanded155 = 0, $expanded157 = 0, $expanded158 = 0; - var $expanded159 = 0, $expanded161 = 0, $expanded162 = 0, $expanded164 = 0, $expanded165 = 0, $expanded166 = 0, $expanded168 = 0, $expanded169 = 0, $expanded171 = 0, $expanded172 = 0, $expanded173 = 0, $expanded175 = 0, $expanded176 = 0, $expanded178 = 0, $expanded179 = 0, $expanded180 = 0, $expanded182 = 0, $expanded183 = 0, $expanded185 = 0, $expanded186 = 0; - var $expanded187 = 0, $expanded189 = 0, $expanded190 = 0, $expanded192 = 0, $expanded193 = 0, $expanded194 = 0, $expanded196 = 0, $expanded197 = 0, $expanded199 = 0, $expanded200 = 0, $expanded201 = 0, $expanded203 = 0, $expanded204 = 0, $expanded206 = 0, $expanded207 = 0, $expanded208 = 0, $expanded210 = 0, $expanded211 = 0, $expanded213 = 0, $expanded214 = 0; - var $expanded215 = 0, $expanded64 = 0, $expanded66 = 0, $expanded67 = 0, $expanded68 = 0, $expanded70 = 0, $expanded71 = 0, $expanded73 = 0, $expanded74 = 0, $expanded75 = 0, $expanded77 = 0, $expanded78 = 0, $expanded80 = 0, $expanded81 = 0, $expanded82 = 0, $expanded84 = 0, $expanded85 = 0, $expanded87 = 0, $expanded88 = 0, $expanded89 = 0; - var $expanded91 = 0, $expanded92 = 0, $expanded94 = 0, $expanded95 = 0, $expanded96 = 0, $expanded98 = 0, $expanded99 = 0, $fl$0110 = 0, $fl$0170 = 0, $fl$1 = 0, $fl$1$ = 0, $fl$3 = 0, $fl$4 = 0, $fl$6 = 0, $i$0$lcssa = 0, $i$0$lcssa273 = 0, $i$0175 = 0, $i$0228$i = 0, $i$03$i = 0, $i$03$i30 = 0; - var $i$1$lcssa$i = 0, $i$1186 = 0, $i$1222$i = 0, $i$2162 = 0, $i$2162$lcssa = 0, $i$2209$i = 0, $i$3160 = 0, $i$3205$i = 0, $isdigit = 0, $isdigit$i = 0, $isdigit$i32 = 0, $isdigit10 = 0, $isdigit12 = 0, $isdigit2$i = 0, $isdigit2$i28 = 0, $isdigittmp = 0, $isdigittmp$ = 0, $isdigittmp$i = 0, $isdigittmp$i31 = 0, $isdigittmp1$i = 0; - var $isdigittmp1$i27 = 0, $isdigittmp11 = 0, $isdigittmp4$i = 0, $isdigittmp4$i29 = 0, $isdigittmp9 = 0, $j$0$i = 0, $j$0221$i = 0, $j$0223$i = 0, $j$1206$i = 0, $j$2$i = 0, $l$0 = 0, $l$0$i = 0, $l$1$i = 0, $l$1174 = 0, $l$2 = 0, $l10n$0 = 0, $l10n$0$lcssa = 0, $l10n$0$phi = 0, $l10n$1 = 0, $l10n$2 = 0; - var $l10n$3 = 0, $mb = 0, $notlhs$us$us$i = 0, $notrhs$i = 0, $or$cond = 0, $or$cond$i = 0, $or$cond$i$i = 0, $or$cond$i100$i = 0, $or$cond$i35$i = 0, $or$cond$i42$i = 0, $or$cond$i52$i = 0, $or$cond$i57 = 0, $or$cond$i59$i = 0, $or$cond$i64 = 0, $or$cond$i71 = 0, $or$cond$i72$i = 0, $or$cond$i79 = 0, $or$cond$i81 = 0, $or$cond$i93$i = 0, $or$cond15 = 0; - var $or$cond19 = 0, $or$cond22 = 0, $or$cond29$i = 0, $or$cond332 = 0, $or$cond6$i = 0, $p$0 = 0, $p$1 = 0, $p$2 = 0, $p$2$ = 0, $p$3 = 0, $p$4272 = 0, $p$5 = 0, $pad$i = 0, $pl$0 = 0, $pl$0$i = 0, $pl$1 = 0, $pl$1$i = 0, $pl$2 = 0, $prefix$0 = 0, $prefix$0$$i = 0; - var $prefix$0$i = 0, $prefix$1 = 0, $prefix$2 = 0, $r$0$a$8$i = 0, $re$1179$i = 0, $round$0178$i = 0.0, $round6$1$i = 0.0, $s$0$i = 0, $s$0$us$i = 0, $s$0$us$us$i = 0, $s$1$i = 0, $s$1$lcssa$i = 0, $s$1$us$i = 0, $s$1$us$us$i = 0, $s1$0$i = 0, $s7$0188$i = 0, $s7$1$i = 0, $s8$0$lcssa$i = 0, $s8$0180$i = 0, $s9$0$i = 0; - var $s9$1192$i = 0, $s9$2$i = 0, $sext = 0, $sext93 = 0, $small$0$i = 0.0, $small$1$i = 0.0, $st$0 = 0, $st$0$lcssa456 = 0, $storemerge = 0, $storemerge13 = 0, $storemerge8108 = 0, $storemerge8169 = 0, $t$0 = 0, $t$1 = 0, $w$$i = 0, $w$0 = 0, $w$1 = 0, $w$2 = 0, $w$30$i = 0, $wc = 0; - var $ws$0176 = 0, $ws$1187 = 0, $y$03$i = 0, $y$03$i$i = 0, $y$03$i109$i = 0, $y$03$i118$i = 0, $y$03$i133$i = 0, $y$03$i86$i = 0, $z$0$i = 0, $z$0$lcssa = 0, $z$0163 = 0, $z$1 = 0, $z$1$lcssa$i = 0, $z$1252$i = 0, $z$2 = 0, $z$2$i = 0, $z$2$i$lcssa = 0, $z$3$lcssa$i = 0, $z$3239$i = 0, $z$3239$us$i = 0; - var $z$4$i = 0, $z$4$us$i = 0, $z$6$$i = 0, $z$6$i = 0, $z$6$i$lcssa = 0, $z$6$ph$i = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 864|0; - $big$i = sp + 16|0; - $e2$i = sp + 8|0; - $buf$i = sp + 836|0; - $0 = $buf$i; - $ebuf0$i = sp + 824|0; - $pad$i = sp + 568|0; - $buf = sp + 528|0; - $wc = sp; - $mb = sp + 520|0; - $1 = ($f|0)!=(0|0); - $2 = ((($buf)) + 40|0); - $3 = $2; - $4 = ((($buf)) + 39|0); - $5 = ((($wc)) + 4|0); - $6 = $wc; - $7 = ((($ebuf0$i)) + 12|0); - $8 = ((($ebuf0$i)) + 11|0); - $9 = $7; - $10 = (($9) - ($0))|0; - $11 = (-2 - ($0))|0; - $12 = (($9) + 2)|0; - $13 = ((($big$i)) + 288|0); - $14 = ((($buf$i)) + 9|0); - $15 = $14; - $16 = ((($buf$i)) + 8|0); - $1169 = 0;$1170 = 0;$23 = $fmt;$cnt$0 = 0;$l$0 = 0;$l10n$0 = 0; - L1: while(1) { - $17 = ($cnt$0|0)>(-1); - do { - if ($17) { - $18 = (2147483647 - ($cnt$0))|0; - $19 = ($l$0|0)>($18|0); - if ($19) { - $20 = (___errno_location()|0); - HEAP32[$20>>2] = 75; - $cnt$1 = -1; - break; - } else { - $21 = (($l$0) + ($cnt$0))|0; - $cnt$1 = $21; - break; - } - } else { - $cnt$1 = $cnt$0; - } - } while(0); - $22 = HEAP8[$23>>0]|0; - $24 = ($22<<24>>24)==(0); - if ($24) { - $cnt$1$lcssa = $cnt$1;$l10n$0$lcssa = $l10n$0; - label = 344; - break; - } else { - $1171 = $22;$26 = $23; - } - while(1) { - if ((($1171<<24>>24) == 0)) { - $$lcssa106 = $26;$z$0$lcssa = $26; - break; - } else if ((($1171<<24>>24) == 37)) { - $28 = $26;$z$0163 = $26; - label = 9; - break; - } - $25 = ((($26)) + 1|0); - $$pre = HEAP8[$25>>0]|0; - $1171 = $$pre;$26 = $25; - } - L12: do { - if ((label|0) == 9) { - while(1) { - label = 0; - $27 = ((($28)) + 1|0); - $29 = HEAP8[$27>>0]|0; - $30 = ($29<<24>>24)==(37); - if (!($30)) { - $$lcssa106 = $28;$z$0$lcssa = $z$0163; - break L12; - } - $31 = ((($z$0163)) + 1|0); - $32 = ((($28)) + 2|0); - $33 = HEAP8[$32>>0]|0; - $34 = ($33<<24>>24)==(37); - if ($34) { - $28 = $32;$z$0163 = $31; - label = 9; - } else { - $$lcssa106 = $32;$z$0$lcssa = $31; - break; - } - } - } - } while(0); - $35 = $z$0$lcssa; - $36 = $23; - $37 = (($35) - ($36))|0; - if ($1) { - (___fwritex($23,$37,$f)|0); - } - $38 = ($z$0$lcssa|0)==($23|0); - if (!($38)) { - $l10n$0$phi = $l10n$0;$1170$phi = $1170;$1169$phi = $1169;$23 = $$lcssa106;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$0$phi;$1170 = $1170$phi;$1169 = $1169$phi; - continue; - } - $39 = ((($$lcssa106)) + 1|0); - $40 = HEAP8[$39>>0]|0; - $41 = $40 << 24 >> 24; - $isdigittmp = (($41) + -48)|0; - $isdigit = ($isdigittmp>>>0)<(10); - if ($isdigit) { - $42 = ((($$lcssa106)) + 2|0); - $43 = HEAP8[$42>>0]|0; - $44 = ($43<<24>>24)==(36); - $45 = ((($$lcssa106)) + 3|0); - $$92 = $44 ? $45 : $39; - $$l10n$0 = $44 ? 1 : $l10n$0; - $isdigittmp$ = $44 ? $isdigittmp : -1; - $$pre270 = HEAP8[$$92>>0]|0; - $47 = $$pre270;$argpos$0 = $isdigittmp$;$l10n$1 = $$l10n$0;$storemerge = $$92; - } else { - $47 = $40;$argpos$0 = -1;$l10n$1 = $l10n$0;$storemerge = $39; - } - $46 = $47 << 24 >> 24; - $48 = $46 & -32; - $49 = ($48|0)==(32); - L24: do { - if ($49) { - $51 = $46;$56 = $47;$fl$0170 = 0;$storemerge8169 = $storemerge; - while(1) { - $50 = (($51) + -32)|0; - $52 = 1 << $50; - $53 = $52 & 75913; - $54 = ($53|0)==(0); - if ($54) { - $65 = $56;$fl$0110 = $fl$0170;$storemerge8108 = $storemerge8169; - break L24; - } - $55 = $56 << 24 >> 24; - $57 = (($55) + -32)|0; - $58 = 1 << $57; - $59 = $58 | $fl$0170; - $60 = ((($storemerge8169)) + 1|0); - $61 = HEAP8[$60>>0]|0; - $62 = $61 << 24 >> 24; - $63 = $62 & -32; - $64 = ($63|0)==(32); - if ($64) { - $51 = $62;$56 = $61;$fl$0170 = $59;$storemerge8169 = $60; - } else { - $65 = $61;$fl$0110 = $59;$storemerge8108 = $60; - break; - } - } - } else { - $65 = $47;$fl$0110 = 0;$storemerge8108 = $storemerge; - } - } while(0); - $66 = ($65<<24>>24)==(42); - do { - if ($66) { - $67 = ((($storemerge8108)) + 1|0); - $68 = HEAP8[$67>>0]|0; - $69 = $68 << 24 >> 24; - $isdigittmp11 = (($69) + -48)|0; - $isdigit12 = ($isdigittmp11>>>0)<(10); - if ($isdigit12) { - $70 = ((($storemerge8108)) + 2|0); - $71 = HEAP8[$70>>0]|0; - $72 = ($71<<24>>24)==(36); - if ($72) { - $73 = (($nl_type) + ($isdigittmp11<<2)|0); - HEAP32[$73>>2] = 10; - $74 = HEAP8[$67>>0]|0; - $75 = $74 << 24 >> 24; - $76 = (($75) + -48)|0; - $77 = (($nl_arg) + ($76<<3)|0); - $78 = $77; - $79 = $78; - $80 = HEAP32[$79>>2]|0; - $81 = (($78) + 4)|0; - $82 = $81; - $83 = HEAP32[$82>>2]|0; - $84 = ((($storemerge8108)) + 3|0); - $l10n$2 = 1;$storemerge13 = $84;$w$0 = $80; - } else { - label = 23; - } - } else { - label = 23; - } - if ((label|0) == 23) { - label = 0; - $85 = ($l10n$1|0)==(0); - if (!($85)) { - $$0 = -1; - label = 363; - break L1; - } - if (!($1)) { - $105 = $67;$fl$1 = $fl$0110;$l10n$3 = 0;$w$1 = 0; - break; - } - $arglist_current = HEAP32[$ap>>2]|0; - $86 = $arglist_current; - $87 = ((0) + 4|0); - $expanded64 = $87; - $expanded = (($expanded64) - 1)|0; - $88 = (($86) + ($expanded))|0; - $89 = ((0) + 4|0); - $expanded68 = $89; - $expanded67 = (($expanded68) - 1)|0; - $expanded66 = $expanded67 ^ -1; - $90 = $88 & $expanded66; - $91 = $90; - $92 = HEAP32[$91>>2]|0; - $arglist_next = ((($91)) + 4|0); - HEAP32[$ap>>2] = $arglist_next; - $l10n$2 = 0;$storemerge13 = $67;$w$0 = $92; - } - $93 = ($w$0|0)<(0); - if ($93) { - $94 = $fl$0110 | 8192; - $95 = (0 - ($w$0))|0; - $105 = $storemerge13;$fl$1 = $94;$l10n$3 = $l10n$2;$w$1 = $95; - } else { - $105 = $storemerge13;$fl$1 = $fl$0110;$l10n$3 = $l10n$2;$w$1 = $w$0; - } - } else { - $96 = $65 << 24 >> 24; - $isdigittmp1$i = (($96) + -48)|0; - $isdigit2$i = ($isdigittmp1$i>>>0)<(10); - if ($isdigit2$i) { - $100 = $storemerge8108;$i$03$i = 0;$isdigittmp4$i = $isdigittmp1$i; - while(1) { - $97 = ($i$03$i*10)|0; - $98 = (($97) + ($isdigittmp4$i))|0; - $99 = ((($100)) + 1|0); - $101 = HEAP8[$99>>0]|0; - $102 = $101 << 24 >> 24; - $isdigittmp$i = (($102) + -48)|0; - $isdigit$i = ($isdigittmp$i>>>0)<(10); - if ($isdigit$i) { - $100 = $99;$i$03$i = $98;$isdigittmp4$i = $isdigittmp$i; - } else { - $$lcssa450 = $98;$$lcssa451 = $99; - break; - } - } - $103 = ($$lcssa450|0)<(0); - if ($103) { - $$0 = -1; - label = 363; - break L1; - } else { - $105 = $$lcssa451;$fl$1 = $fl$0110;$l10n$3 = $l10n$1;$w$1 = $$lcssa450; - } - } else { - $105 = $storemerge8108;$fl$1 = $fl$0110;$l10n$3 = $l10n$1;$w$1 = 0; - } - } - } while(0); - $104 = HEAP8[$105>>0]|0; - $106 = ($104<<24>>24)==(46); - L45: do { - if ($106) { - $107 = ((($105)) + 1|0); - $108 = HEAP8[$107>>0]|0; - $109 = ($108<<24>>24)==(42); - if (!($109)) { - $136 = $108 << 24 >> 24; - $isdigittmp1$i27 = (($136) + -48)|0; - $isdigit2$i28 = ($isdigittmp1$i27>>>0)<(10); - if ($isdigit2$i28) { - $140 = $107;$i$03$i30 = 0;$isdigittmp4$i29 = $isdigittmp1$i27; - } else { - $1172 = $107;$p$0 = 0; - break; - } - while(1) { - $137 = ($i$03$i30*10)|0; - $138 = (($137) + ($isdigittmp4$i29))|0; - $139 = ((($140)) + 1|0); - $141 = HEAP8[$139>>0]|0; - $142 = $141 << 24 >> 24; - $isdigittmp$i31 = (($142) + -48)|0; - $isdigit$i32 = ($isdigittmp$i31>>>0)<(10); - if ($isdigit$i32) { - $140 = $139;$i$03$i30 = $138;$isdigittmp4$i29 = $isdigittmp$i31; - } else { - $1172 = $139;$p$0 = $138; - break L45; - } - } - } - $110 = ((($105)) + 2|0); - $111 = HEAP8[$110>>0]|0; - $112 = $111 << 24 >> 24; - $isdigittmp9 = (($112) + -48)|0; - $isdigit10 = ($isdigittmp9>>>0)<(10); - if ($isdigit10) { - $113 = ((($105)) + 3|0); - $114 = HEAP8[$113>>0]|0; - $115 = ($114<<24>>24)==(36); - if ($115) { - $116 = (($nl_type) + ($isdigittmp9<<2)|0); - HEAP32[$116>>2] = 10; - $117 = HEAP8[$110>>0]|0; - $118 = $117 << 24 >> 24; - $119 = (($118) + -48)|0; - $120 = (($nl_arg) + ($119<<3)|0); - $121 = $120; - $122 = $121; - $123 = HEAP32[$122>>2]|0; - $124 = (($121) + 4)|0; - $125 = $124; - $126 = HEAP32[$125>>2]|0; - $127 = ((($105)) + 4|0); - $1172 = $127;$p$0 = $123; - break; - } - } - $128 = ($l10n$3|0)==(0); - if (!($128)) { - $$0 = -1; - label = 363; - break L1; - } - if ($1) { - $arglist_current2 = HEAP32[$ap>>2]|0; - $129 = $arglist_current2; - $130 = ((0) + 4|0); - $expanded71 = $130; - $expanded70 = (($expanded71) - 1)|0; - $131 = (($129) + ($expanded70))|0; - $132 = ((0) + 4|0); - $expanded75 = $132; - $expanded74 = (($expanded75) - 1)|0; - $expanded73 = $expanded74 ^ -1; - $133 = $131 & $expanded73; - $134 = $133; - $135 = HEAP32[$134>>2]|0; - $arglist_next3 = ((($134)) + 4|0); - HEAP32[$ap>>2] = $arglist_next3; - $1172 = $110;$p$0 = $135; - } else { - $1172 = $110;$p$0 = 0; - } - } else { - $1172 = $105;$p$0 = -1; - } - } while(0); - $144 = $1172;$st$0 = 0; - while(1) { - $143 = HEAP8[$144>>0]|0; - $145 = $143 << 24 >> 24; - $146 = (($145) + -65)|0; - $147 = ($146>>>0)>(57); - if ($147) { - $$0 = -1; - label = 363; - break L1; - } - $148 = ((($144)) + 1|0); - $149 = ((95920 + (($st$0*58)|0)|0) + ($146)|0); - $150 = HEAP8[$149>>0]|0; - $151 = $150&255; - $152 = (($151) + -1)|0; - $153 = ($152>>>0)<(8); - if ($153) { - $144 = $148;$st$0 = $151; - } else { - $$lcssa455 = $144;$$lcssa457 = $148;$$lcssa458 = $150;$$lcssa459 = $151;$st$0$lcssa456 = $st$0; - break; - } - } - $154 = ($$lcssa458<<24>>24)==(0); - if ($154) { - $$0 = -1; - label = 363; - break; - } - $155 = ($$lcssa458<<24>>24)==(19); - $156 = ($argpos$0|0)>(-1); - L64: do { - if ($155) { - if ($156) { - $$0 = -1; - label = 363; - break L1; - } else { - $1173 = $1169;$1174 = $1170; - label = 62; - } - } else { - if ($156) { - $157 = (($nl_type) + ($argpos$0<<2)|0); - HEAP32[$157>>2] = $$lcssa459; - $158 = (($nl_arg) + ($argpos$0<<3)|0); - $159 = HEAP32[$158>>2]|0; - $160 = ((($158)) + 4|0); - $161 = HEAP32[$160>>2]|0; - $1173 = $161;$1174 = $159; - label = 62; - break; - } - if (!($1)) { - $$0 = 0; - label = 363; - break L1; - } - $162 = ($$lcssa458&255)>(20); - if ($162) { - $264 = $1170;$291 = $1169; - } else { - do { - switch ($$lcssa459|0) { - case 15: { - $arglist_current23 = HEAP32[$ap>>2]|0; - $218 = $arglist_current23; - $219 = ((0) + 4|0); - $expanded120 = $219; - $expanded119 = (($expanded120) - 1)|0; - $220 = (($218) + ($expanded119))|0; - $221 = ((0) + 4|0); - $expanded124 = $221; - $expanded123 = (($expanded124) - 1)|0; - $expanded122 = $expanded123 ^ -1; - $222 = $220 & $expanded122; - $223 = $222; - $224 = HEAP32[$223>>2]|0; - $arglist_next24 = ((($223)) + 4|0); - HEAP32[$ap>>2] = $arglist_next24; - $225 = $224&255; - $226 = $225 << 24 >> 24; - $227 = ($226|0)<(0); - $228 = $227 << 31 >> 31; - $sext = $224 << 24; - $229 = $sext >> 24; - $264 = $229;$291 = $228; - break L64; - break; - } - case 12: { - $arglist_current14 = HEAP32[$ap>>2]|0; - $187 = $arglist_current14; - $188 = ((0) + 8|0); - $expanded99 = $188; - $expanded98 = (($expanded99) - 1)|0; - $189 = (($187) + ($expanded98))|0; - $190 = ((0) + 8|0); - $expanded103 = $190; - $expanded102 = (($expanded103) - 1)|0; - $expanded101 = $expanded102 ^ -1; - $191 = $189 & $expanded101; - $192 = $191; - $193 = $192; - $194 = $193; - $195 = HEAP32[$194>>2]|0; - $196 = (($193) + 4)|0; - $197 = $196; - $198 = HEAP32[$197>>2]|0; - $arglist_next15 = ((($192)) + 8|0); - HEAP32[$ap>>2] = $arglist_next15; - $264 = $195;$291 = $198; - break L64; - break; - } - case 17: { - $arglist_current29 = HEAP32[$ap>>2]|0; - $237 = $arglist_current29; - $238 = ((0) + 8|0); - $expanded134 = $238; - $expanded133 = (($expanded134) - 1)|0; - $239 = (($237) + ($expanded133))|0; - $240 = ((0) + 8|0); - $expanded138 = $240; - $expanded137 = (($expanded138) - 1)|0; - $expanded136 = $expanded137 ^ -1; - $241 = $239 & $expanded136; - $242 = $241; - $243 = +HEAPF64[$242>>3]; - $arglist_next30 = ((($242)) + 8|0); - HEAP32[$ap>>2] = $arglist_next30; - HEAPF64[tempDoublePtr>>3] = $243;$244 = HEAP32[tempDoublePtr>>2]|0; - $245 = HEAP32[tempDoublePtr+4>>2]|0; - $264 = $244;$291 = $245; - break L64; - break; - } - case 11: { - $arglist_current11 = HEAP32[$ap>>2]|0; - $180 = $arglist_current11; - $181 = ((0) + 4|0); - $expanded92 = $181; - $expanded91 = (($expanded92) - 1)|0; - $182 = (($180) + ($expanded91))|0; - $183 = ((0) + 4|0); - $expanded96 = $183; - $expanded95 = (($expanded96) - 1)|0; - $expanded94 = $expanded95 ^ -1; - $184 = $182 & $expanded94; - $185 = $184; - $186 = HEAP32[$185>>2]|0; - $arglist_next12 = ((($185)) + 4|0); - HEAP32[$ap>>2] = $arglist_next12; - $264 = $186;$291 = 0; - break L64; - break; - } - case 10: { - $arglist_current8 = HEAP32[$ap>>2]|0; - $171 = $arglist_current8; - $172 = ((0) + 4|0); - $expanded85 = $172; - $expanded84 = (($expanded85) - 1)|0; - $173 = (($171) + ($expanded84))|0; - $174 = ((0) + 4|0); - $expanded89 = $174; - $expanded88 = (($expanded89) - 1)|0; - $expanded87 = $expanded88 ^ -1; - $175 = $173 & $expanded87; - $176 = $175; - $177 = HEAP32[$176>>2]|0; - $arglist_next9 = ((($176)) + 4|0); - HEAP32[$ap>>2] = $arglist_next9; - $178 = ($177|0)<(0); - $179 = $178 << 31 >> 31; - $264 = $177;$291 = $179; - break L64; - break; - } - case 9: { - $arglist_current5 = HEAP32[$ap>>2]|0; - $163 = $arglist_current5; - $164 = ((0) + 4|0); - $expanded78 = $164; - $expanded77 = (($expanded78) - 1)|0; - $165 = (($163) + ($expanded77))|0; - $166 = ((0) + 4|0); - $expanded82 = $166; - $expanded81 = (($expanded82) - 1)|0; - $expanded80 = $expanded81 ^ -1; - $167 = $165 & $expanded80; - $168 = $167; - $169 = HEAP32[$168>>2]|0; - $arglist_next6 = ((($168)) + 4|0); - HEAP32[$ap>>2] = $arglist_next6; - $170 = $169; - $264 = $170;$291 = $1169; - break L64; - break; - } - case 13: { - $arglist_current17 = HEAP32[$ap>>2]|0; - $199 = $arglist_current17; - $200 = ((0) + 4|0); - $expanded106 = $200; - $expanded105 = (($expanded106) - 1)|0; - $201 = (($199) + ($expanded105))|0; - $202 = ((0) + 4|0); - $expanded110 = $202; - $expanded109 = (($expanded110) - 1)|0; - $expanded108 = $expanded109 ^ -1; - $203 = $201 & $expanded108; - $204 = $203; - $205 = HEAP32[$204>>2]|0; - $arglist_next18 = ((($204)) + 4|0); - HEAP32[$ap>>2] = $arglist_next18; - $206 = $205&65535; - $207 = $206 << 16 >> 16; - $208 = ($207|0)<(0); - $209 = $208 << 31 >> 31; - $sext93 = $205 << 16; - $210 = $sext93 >> 16; - $264 = $210;$291 = $209; - break L64; - break; - } - case 16: { - $arglist_current26 = HEAP32[$ap>>2]|0; - $230 = $arglist_current26; - $231 = ((0) + 4|0); - $expanded127 = $231; - $expanded126 = (($expanded127) - 1)|0; - $232 = (($230) + ($expanded126))|0; - $233 = ((0) + 4|0); - $expanded131 = $233; - $expanded130 = (($expanded131) - 1)|0; - $expanded129 = $expanded130 ^ -1; - $234 = $232 & $expanded129; - $235 = $234; - $236 = HEAP32[$235>>2]|0; - $arglist_next27 = ((($235)) + 4|0); - HEAP32[$ap>>2] = $arglist_next27; - $$mask$i38 = $236 & 255; - $264 = $$mask$i38;$291 = 0; - break L64; - break; - } - case 18: { - $arglist_current32 = HEAP32[$ap>>2]|0; - $246 = $arglist_current32; - $247 = ((0) + 8|0); - $expanded141 = $247; - $expanded140 = (($expanded141) - 1)|0; - $248 = (($246) + ($expanded140))|0; - $249 = ((0) + 8|0); - $expanded145 = $249; - $expanded144 = (($expanded145) - 1)|0; - $expanded143 = $expanded144 ^ -1; - $250 = $248 & $expanded143; - $251 = $250; - $252 = +HEAPF64[$251>>3]; - $arglist_next33 = ((($251)) + 8|0); - HEAP32[$ap>>2] = $arglist_next33; - HEAPF64[tempDoublePtr>>3] = $252;$253 = HEAP32[tempDoublePtr>>2]|0; - $254 = HEAP32[tempDoublePtr+4>>2]|0; - $264 = $253;$291 = $254; - break L64; - break; - } - case 14: { - $arglist_current20 = HEAP32[$ap>>2]|0; - $211 = $arglist_current20; - $212 = ((0) + 4|0); - $expanded113 = $212; - $expanded112 = (($expanded113) - 1)|0; - $213 = (($211) + ($expanded112))|0; - $214 = ((0) + 4|0); - $expanded117 = $214; - $expanded116 = (($expanded117) - 1)|0; - $expanded115 = $expanded116 ^ -1; - $215 = $213 & $expanded115; - $216 = $215; - $217 = HEAP32[$216>>2]|0; - $arglist_next21 = ((($216)) + 4|0); - HEAP32[$ap>>2] = $arglist_next21; - $$mask1$i37 = $217 & 65535; - $264 = $$mask1$i37;$291 = 0; - break L64; - break; - } - default: { - $264 = $1170;$291 = $1169; - break L64; - } - } - } while(0); - } - } - } while(0); - if ((label|0) == 62) { - label = 0; - if ($1) { - $264 = $1174;$291 = $1173; - } else { - $1169 = $1173;$1170 = $1174;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$3; - continue; - } - } - $255 = HEAP8[$$lcssa455>>0]|0; - $256 = $255 << 24 >> 24; - $257 = ($st$0$lcssa456|0)!=(0); - $258 = $256 & 15; - $259 = ($258|0)==(3); - $or$cond15 = $257 & $259; - $260 = $256 & -33; - $t$0 = $or$cond15 ? $260 : $256; - $261 = $fl$1 & 8192; - $262 = ($261|0)==(0); - $263 = $fl$1 & -65537; - $fl$1$ = $262 ? $fl$1 : $263; - L86: do { - switch ($t$0|0) { - case 117: { - $336 = $291;$338 = $264;$pl$0 = 0;$prefix$0 = 96400; - label = 84; - break; - } - case 111: { - $312 = ($264|0)==(0); - $313 = ($291|0)==(0); - $314 = $312 & $313; - if ($314) { - $$0$lcssa$i51 = $2; - } else { - $$03$i48 = $2;$316 = $264;$320 = $291; - while(1) { - $315 = $316 & 7; - $317 = $315 | 48; - $318 = $317&255; - $319 = ((($$03$i48)) + -1|0); - HEAP8[$319>>0] = $318; - $321 = (_bitshift64Lshr(($316|0),($320|0),3)|0); - $322 = tempRet0; - $323 = ($321|0)==(0); - $324 = ($322|0)==(0); - $325 = $323 & $324; - if ($325) { - $$0$lcssa$i51 = $319; - break; - } else { - $$03$i48 = $319;$316 = $321;$320 = $322; - } - } - } - $326 = $fl$1$ & 8; - $327 = ($326|0)==(0); - $or$cond19 = $327 | $314; - $$24 = $or$cond19 ? 96400 : (96405); - $328 = $or$cond19&1; - $$25 = $328 ^ 1; - $366 = $264;$368 = $291;$a$0 = $$0$lcssa$i51;$fl$4 = $fl$1$;$p$2 = $p$0;$pl$1 = $$25;$prefix$1 = $$24; - label = 89; - break; - } - case 67: { - HEAP32[$wc>>2] = $264; - HEAP32[$5>>2] = 0; - $1179 = $wc;$1180 = $6;$p$4272 = -1; - label = 97; - break; - } - case 83: { - $391 = $264; - $392 = ($p$0|0)==(0); - if ($392) { - $1181 = $264;$1182 = $391;$i$0$lcssa273 = 0; - label = 102; - } else { - $1179 = $391;$1180 = $264;$p$4272 = $p$0; - label = 97; - } - break; - } - case 110: { - switch ($st$0$lcssa456|0) { - case 7: { - $279 = ($cnt$1|0)<(0); - $280 = $279 << 31 >> 31; - $281 = $264; - $282 = $281; - $283 = $282; - HEAP32[$283>>2] = $cnt$1; - $284 = (($282) + 4)|0; - $285 = $284; - HEAP32[$285>>2] = $280; - $1169 = $291;$1170 = $264;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$3; - continue L1; - break; - } - case 0: { - $265 = $264; - HEAP32[$265>>2] = $cnt$1; - $1169 = $291;$1170 = $264;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$3; - continue L1; - break; - } - case 1: { - $266 = $264; - HEAP32[$266>>2] = $cnt$1; - $1169 = $291;$1170 = $264;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$3; - continue L1; - break; - } - case 2: { - $267 = ($cnt$1|0)<(0); - $268 = $267 << 31 >> 31; - $269 = $264; - $270 = $269; - $271 = $270; - HEAP32[$271>>2] = $cnt$1; - $272 = (($270) + 4)|0; - $273 = $272; - HEAP32[$273>>2] = $268; - $1169 = $291;$1170 = $264;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$3; - continue L1; - break; - } - case 3: { - $274 = $cnt$1&65535; - $275 = $264; - HEAP16[$275>>1] = $274; - $1169 = $291;$1170 = $264;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$3; - continue L1; - break; - } - case 4: { - $276 = $cnt$1&255; - $277 = $264; - HEAP8[$277>>0] = $276; - $1169 = $291;$1170 = $264;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$3; - continue L1; - break; - } - case 6: { - $278 = $264; - HEAP32[$278>>2] = $cnt$1; - $1169 = $291;$1170 = $264;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$3; - continue L1; - break; - } - default: { - $1169 = $291;$1170 = $264;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $37;$l10n$0 = $l10n$3; - continue L1; - } - } - break; - } - case 65: case 71: case 70: case 69: case 97: case 103: case 102: case 101: { - HEAP32[tempDoublePtr>>2] = $264;HEAP32[tempDoublePtr+4>>2] = $291;$430 = +HEAPF64[tempDoublePtr>>3]; - HEAP32[$e2$i>>2] = 0; - $431 = ($291|0)<(0); - if ($431) { - $432 = -$430; - $$07$i = $432;$pl$0$i = 1;$prefix$0$i = 96424; - } else { - $433 = $fl$1$ & 2048; - $434 = ($433|0)==(0); - if ($434) { - $435 = $fl$1$ & 1; - $436 = ($435|0)==(0); - $$$i = $436 ? (96425) : (96430); - $$07$i = $430;$pl$0$i = $435;$prefix$0$i = $$$i; - } else { - $$07$i = $430;$pl$0$i = 1;$prefix$0$i = (96427); - } - } - HEAPF64[tempDoublePtr>>3] = $$07$i;$437 = HEAP32[tempDoublePtr>>2]|0; - $438 = HEAP32[tempDoublePtr+4>>2]|0; - $439 = $438 & 2146435072; - $440 = ($439>>>0)<(2146435072); - $441 = (0)<(0); - $442 = ($439|0)==(2146435072); - $443 = $442 & $441; - $444 = $440 | $443; - do { - if ($444) { - $471 = (+_frexpl($$07$i,$e2$i)); - $472 = $471 * 2.0; - $473 = $472 != 0.0; - if ($473) { - $474 = HEAP32[$e2$i>>2]|0; - $475 = (($474) + -1)|0; - HEAP32[$e2$i>>2] = $475; - } - $476 = $t$0 | 32; - $477 = ($476|0)==(97); - if ($477) { - $478 = $t$0 & 32; - $479 = ($478|0)==(0); - $480 = ((($prefix$0$i)) + 9|0); - $prefix$0$$i = $479 ? $prefix$0$i : $480; - $481 = $pl$0$i | 2; - $482 = ($p$0>>>0)>(11); - $483 = (12 - ($p$0))|0; - $484 = ($483|0)==(0); - $485 = $482 | $484; - do { - if ($485) { - $$1$i = $472; - } else { - $re$1179$i = $483;$round$0178$i = 8.0; - while(1) { - $486 = (($re$1179$i) + -1)|0; - $487 = $round$0178$i * 16.0; - $488 = ($486|0)==(0); - if ($488) { - $$lcssa483 = $487; - break; - } else { - $re$1179$i = $486;$round$0178$i = $487; - } - } - $489 = HEAP8[$prefix$0$$i>>0]|0; - $490 = ($489<<24>>24)==(45); - if ($490) { - $491 = -$472; - $492 = $491 - $$lcssa483; - $493 = $$lcssa483 + $492; - $494 = -$493; - $$1$i = $494; - break; - } else { - $495 = $472 + $$lcssa483; - $496 = $495 - $$lcssa483; - $$1$i = $496; - break; - } - } - } while(0); - $497 = HEAP32[$e2$i>>2]|0; - $498 = ($497|0)<(0); - $499 = (0 - ($497))|0; - $500 = $498 ? $499 : $497; - $501 = ($500|0)<(0); - if ($501) { - $502 = ($500|0)<(0); - $503 = $502 << 31 >> 31; - $$05$i$i = $7;$504 = $500;$505 = $503; - while(1) { - $506 = (___uremdi3(($504|0),($505|0),10,0)|0); - $507 = tempRet0; - $508 = $506 | 48; - $509 = $508&255; - $510 = ((($$05$i$i)) + -1|0); - HEAP8[$510>>0] = $509; - $511 = (___udivdi3(($504|0),($505|0),10,0)|0); - $512 = tempRet0; - $513 = ($505>>>0)>(9); - $514 = ($504>>>0)>(4294967295); - $515 = ($505|0)==(9); - $516 = $515 & $514; - $517 = $513 | $516; - if ($517) { - $$05$i$i = $510;$504 = $511;$505 = $512; - } else { - $$lcssa484 = $510;$1183 = $511;$1184 = $512; - break; - } - } - $$0$lcssa$i48$i = $$lcssa484;$$01$lcssa$off0$i$i = $1183; - } else { - $$0$lcssa$i48$i = $7;$$01$lcssa$off0$i$i = $500; - } - $518 = ($$01$lcssa$off0$i$i|0)==(0); - if ($518) { - $$1$lcssa$i$i = $$0$lcssa$i48$i; - } else { - $$12$i$i = $$0$lcssa$i48$i;$y$03$i$i = $$01$lcssa$off0$i$i; - while(1) { - $519 = (($y$03$i$i>>>0) % 10)&-1; - $520 = $519 | 48; - $521 = $520&255; - $522 = ((($$12$i$i)) + -1|0); - HEAP8[$522>>0] = $521; - $523 = (($y$03$i$i>>>0) / 10)&-1; - $524 = ($y$03$i$i>>>0)<(10); - if ($524) { - $$1$lcssa$i$i = $522; - break; - } else { - $$12$i$i = $522;$y$03$i$i = $523; - } - } - } - $525 = ($$1$lcssa$i$i|0)==($7|0); - if ($525) { - HEAP8[$8>>0] = 48; - $estr$0$i = $8; - } else { - $estr$0$i = $$1$lcssa$i$i; - } - $526 = HEAP32[$e2$i>>2]|0; - $527 = $526 >> 31; - $528 = $527 & 2; - $529 = (($528) + 43)|0; - $530 = $529&255; - $531 = ((($estr$0$i)) + -1|0); - HEAP8[$531>>0] = $530; - $532 = (($t$0) + 15)|0; - $533 = $532&255; - $534 = ((($estr$0$i)) + -2|0); - HEAP8[$534>>0] = $533; - $535 = $fl$1$ & 8; - $536 = ($535|0)==(0); - if ($536) { - $notrhs$i = ($p$0|0)<(1); - if ($notrhs$i) { - $$2$us$us$i = $$1$i;$s$0$us$us$i = $buf$i; - while(1) { - $537 = (~~(($$2$us$us$i))); - $538 = (96384 + ($537)|0); - $539 = HEAP8[$538>>0]|0; - $540 = $539&255; - $541 = $540 | $478; - $542 = $541&255; - $543 = ((($s$0$us$us$i)) + 1|0); - HEAP8[$s$0$us$us$i>>0] = $542; - $544 = (+($537|0)); - $545 = $$2$us$us$i - $544; - $546 = $545 * 16.0; - $547 = $543; - $548 = (($547) - ($0))|0; - $549 = ($548|0)!=(1); - $notlhs$us$us$i = $546 == 0.0; - $or$cond$i79 = $549 | $notlhs$us$us$i; - if ($or$cond$i79) { - $s$1$us$us$i = $543; - } else { - $550 = ((($s$0$us$us$i)) + 2|0); - HEAP8[$543>>0] = 46; - $s$1$us$us$i = $550; - } - $551 = $546 != 0.0; - if ($551) { - $$2$us$us$i = $546;$s$0$us$us$i = $s$1$us$us$i; - } else { - $s$1$lcssa$i = $s$1$us$us$i; - break; - } - } - } else { - $$2$us$i = $$1$i;$s$0$us$i = $buf$i; - while(1) { - $552 = (~~(($$2$us$i))); - $553 = (96384 + ($552)|0); - $554 = HEAP8[$553>>0]|0; - $555 = $554&255; - $556 = $555 | $478; - $557 = $556&255; - $558 = ((($s$0$us$i)) + 1|0); - HEAP8[$s$0$us$i>>0] = $557; - $559 = (+($552|0)); - $560 = $$2$us$i - $559; - $561 = $560 * 16.0; - $562 = $558; - $563 = (($562) - ($0))|0; - $564 = ($563|0)==(1); - if ($564) { - $565 = ((($s$0$us$i)) + 2|0); - HEAP8[$558>>0] = 46; - $s$1$us$i = $565; - } else { - $s$1$us$i = $558; - } - $566 = $561 != 0.0; - if ($566) { - $$2$us$i = $561;$s$0$us$i = $s$1$us$i; - } else { - $s$1$lcssa$i = $s$1$us$i; - break; - } - } - } - } else { - $$2$i = $$1$i;$s$0$i = $buf$i; - while(1) { - $567 = (~~(($$2$i))); - $568 = (96384 + ($567)|0); - $569 = HEAP8[$568>>0]|0; - $570 = $569&255; - $571 = $570 | $478; - $572 = $571&255; - $573 = ((($s$0$i)) + 1|0); - HEAP8[$s$0$i>>0] = $572; - $574 = (+($567|0)); - $575 = $$2$i - $574; - $576 = $575 * 16.0; - $577 = $573; - $578 = (($577) - ($0))|0; - $579 = ($578|0)==(1); - if ($579) { - $580 = ((($s$0$i)) + 2|0); - HEAP8[$573>>0] = 46; - $s$1$i = $580; - } else { - $s$1$i = $573; - } - $581 = $576 != 0.0; - if ($581) { - $$2$i = $576;$s$0$i = $s$1$i; - } else { - $s$1$lcssa$i = $s$1$i; - break; - } - } - } - $582 = ($p$0|0)!=(0); - $$pre300$i = $s$1$lcssa$i; - $583 = (($11) + ($$pre300$i))|0; - $584 = ($583|0)<($p$0|0); - $or$cond332 = $582 & $584; - $585 = $534; - $586 = (($12) + ($p$0))|0; - $587 = (($586) - ($585))|0; - $588 = $534; - $589 = (($10) - ($588))|0; - $590 = (($589) + ($$pre300$i))|0; - $l$0$i = $or$cond332 ? $587 : $590; - $591 = (($l$0$i) + ($481))|0; - $592 = $fl$1$ & 73728; - $593 = ($592|0)==(0); - $594 = ($w$1|0)>($591|0); - $or$cond$i52$i = $593 & $594; - if ($or$cond$i52$i) { - $595 = (($w$1) - ($591))|0; - $596 = ($595>>>0)>(256); - $597 = $596 ? 256 : $595; - _memset(($pad$i|0),32,($597|0))|0; - $598 = ($595>>>0)>(255); - if ($598) { - $$01$i54$i = $595; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $599 = (($$01$i54$i) + -256)|0; - $600 = ($599>>>0)>(255); - if ($600) { - $$01$i54$i = $599; - } else { - break; - } - } - $601 = $595 & 255; - $$0$lcssa$i56$i = $601; - } else { - $$0$lcssa$i56$i = $595; - } - (___fwritex($pad$i,$$0$lcssa$i56$i,$f)|0); - } - (___fwritex($prefix$0$$i,$481,$f)|0); - $602 = ($592|0)==(65536); - $or$cond$i59$i = $602 & $594; - if ($or$cond$i59$i) { - $603 = (($w$1) - ($591))|0; - $604 = ($603>>>0)>(256); - $605 = $604 ? 256 : $603; - _memset(($pad$i|0),48,($605|0))|0; - $606 = ($603>>>0)>(255); - if ($606) { - $$01$i61$i = $603; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $607 = (($$01$i61$i) + -256)|0; - $608 = ($607>>>0)>(255); - if ($608) { - $$01$i61$i = $607; - } else { - break; - } - } - $609 = $603 & 255; - $$0$lcssa$i63$i = $609; - } else { - $$0$lcssa$i63$i = $603; - } - (___fwritex($pad$i,$$0$lcssa$i63$i,$f)|0); - } - $610 = (($$pre300$i) - ($0))|0; - (___fwritex($buf$i,$610,$f)|0); - $611 = $534; - $612 = (($9) - ($611))|0; - $613 = (($l$0$i) - ($612))|0; - $614 = (($613) - ($610))|0; - $615 = ($614|0)>(0); - if ($615) { - $616 = ($614>>>0)>(256); - $617 = $616 ? 256 : $614; - _memset(($pad$i|0),48,($617|0))|0; - $618 = ($614>>>0)>(255); - if ($618) { - $$01$i67$i = $614; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $619 = (($$01$i67$i) + -256)|0; - $620 = ($619>>>0)>(255); - if ($620) { - $$01$i67$i = $619; - } else { - break; - } - } - $621 = $614 & 255; - $$0$lcssa$i69$i = $621; - } else { - $$0$lcssa$i69$i = $614; - } - (___fwritex($pad$i,$$0$lcssa$i69$i,$f)|0); - } - (___fwritex($534,$612,$f)|0); - $622 = ($592|0)==(8192); - $or$cond$i72$i = $622 & $594; - if ($or$cond$i72$i) { - $623 = (($w$1) - ($591))|0; - $624 = ($623>>>0)>(256); - $625 = $624 ? 256 : $623; - _memset(($pad$i|0),32,($625|0))|0; - $626 = ($623>>>0)>(255); - if ($626) { - $$01$i74$i = $623; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $627 = (($$01$i74$i) + -256)|0; - $628 = ($627>>>0)>(255); - if ($628) { - $$01$i74$i = $627; - } else { - break; - } - } - $629 = $623 & 255; - $$0$lcssa$i76$i = $629; - } else { - $$0$lcssa$i76$i = $623; - } - (___fwritex($pad$i,$$0$lcssa$i76$i,$f)|0); - } - $w$$i = $594 ? $w$1 : $591; - $$0$i = $w$$i; - break; - } - $630 = ($p$0|0)<(0); - $$p$i = $630 ? 6 : $p$0; - if ($473) { - $631 = $472 * 268435456.0; - $632 = HEAP32[$e2$i>>2]|0; - $633 = (($632) + -28)|0; - HEAP32[$e2$i>>2] = $633; - $$3$i = $631;$634 = $633; - } else { - $$pre$i = HEAP32[$e2$i>>2]|0; - $$3$i = $472;$634 = $$pre$i; - } - $635 = ($634|0)<(0); - $$31$i = $635 ? $big$i : $13; - $636 = $$31$i; - $$4$i = $$3$i;$z$0$i = $$31$i; - while(1) { - $637 = (~~(($$4$i))>>>0); - HEAP32[$z$0$i>>2] = $637; - $638 = ((($z$0$i)) + 4|0); - $639 = (+($637>>>0)); - $640 = $$4$i - $639; - $641 = $640 * 1.0E+9; - $642 = $641 != 0.0; - if ($642) { - $$4$i = $641;$z$0$i = $638; - } else { - $$lcssa460 = $638; - break; - } - } - $$pr$i = HEAP32[$e2$i>>2]|0; - $643 = ($$pr$i|0)>(0); - if ($643) { - $644 = $$pr$i;$a$1253$i = $$31$i;$z$1252$i = $$lcssa460; - while(1) { - $645 = ($644|0)>(29); - $646 = $645 ? 29 : $644; - $d$0245$i = ((($z$1252$i)) + -4|0); - $647 = ($d$0245$i>>>0)<($a$1253$i>>>0); - do { - if ($647) { - $a$2$ph$i = $a$1253$i; - } else { - $carry$0246$i = 0;$d$0247$i = $d$0245$i; - while(1) { - $648 = HEAP32[$d$0247$i>>2]|0; - $649 = (_bitshift64Shl(($648|0),0,($646|0))|0); - $650 = tempRet0; - $651 = (_i64Add(($649|0),($650|0),($carry$0246$i|0),0)|0); - $652 = tempRet0; - $653 = (___uremdi3(($651|0),($652|0),1000000000,0)|0); - $654 = tempRet0; - HEAP32[$d$0247$i>>2] = $653; - $655 = (___udivdi3(($651|0),($652|0),1000000000,0)|0); - $656 = tempRet0; - $d$0$i = ((($d$0247$i)) + -4|0); - $657 = ($d$0$i>>>0)<($a$1253$i>>>0); - if ($657) { - $$lcssa461 = $655; - break; - } else { - $carry$0246$i = $655;$d$0247$i = $d$0$i; - } - } - $658 = ($$lcssa461|0)==(0); - if ($658) { - $a$2$ph$i = $a$1253$i; - break; - } - $659 = ((($a$1253$i)) + -4|0); - HEAP32[$659>>2] = $$lcssa461; - $a$2$ph$i = $659; - } - } while(0); - $z$2$i = $z$1252$i; - while(1) { - $660 = ($z$2$i>>>0)>($a$2$ph$i>>>0); - if (!($660)) { - $z$2$i$lcssa = $z$2$i; - break; - } - $661 = ((($z$2$i)) + -4|0); - $662 = HEAP32[$661>>2]|0; - $663 = ($662|0)==(0); - if ($663) { - $z$2$i = $661; - } else { - $z$2$i$lcssa = $z$2$i; - break; - } - } - $664 = HEAP32[$e2$i>>2]|0; - $665 = (($664) - ($646))|0; - HEAP32[$e2$i>>2] = $665; - $666 = ($665|0)>(0); - if ($666) { - $644 = $665;$a$1253$i = $a$2$ph$i;$z$1252$i = $z$2$i$lcssa; - } else { - $$pr146$i = $665;$a$1$lcssa$i = $a$2$ph$i;$z$1$lcssa$i = $z$2$i$lcssa; - break; - } - } - } else { - $$pr146$i = $$pr$i;$a$1$lcssa$i = $$31$i;$z$1$lcssa$i = $$lcssa460; - } - $667 = ($$pr146$i|0)<(0); - L228: do { - if ($667) { - $668 = (($$p$i) + 25)|0; - $669 = (($668|0) / 9)&-1; - $670 = (($669) + 1)|0; - $671 = ($476|0)==(102); - if (!($671)) { - $704 = $$pr146$i;$a$3240$i = $a$1$lcssa$i;$z$3239$i = $z$1$lcssa$i; - while(1) { - $703 = (0 - ($704))|0; - $705 = ($703|0)>(9); - $706 = $705 ? 9 : $703; - $707 = ($a$3240$i>>>0)<($z$3239$i>>>0); - do { - if ($707) { - $711 = 1 << $706; - $712 = (($711) + -1)|0; - $713 = 1000000000 >>> $706; - $carry3$0234$i = 0;$d$1233$i = $a$3240$i; - while(1) { - $714 = HEAP32[$d$1233$i>>2]|0; - $715 = $714 & $712; - $716 = $714 >>> $706; - $717 = (($716) + ($carry3$0234$i))|0; - HEAP32[$d$1233$i>>2] = $717; - $718 = Math_imul($715, $713)|0; - $719 = ((($d$1233$i)) + 4|0); - $720 = ($719>>>0)<($z$3239$i>>>0); - if ($720) { - $carry3$0234$i = $718;$d$1233$i = $719; - } else { - $$lcssa463 = $718; - break; - } - } - $721 = HEAP32[$a$3240$i>>2]|0; - $722 = ($721|0)==(0); - $723 = ((($a$3240$i)) + 4|0); - $$a$3$i = $722 ? $723 : $a$3240$i; - $724 = ($$lcssa463|0)==(0); - if ($724) { - $$a$3306$i = $$a$3$i;$z$4$i = $z$3239$i; - break; - } - $725 = ((($z$3239$i)) + 4|0); - HEAP32[$z$3239$i>>2] = $$lcssa463; - $$a$3306$i = $$a$3$i;$z$4$i = $725; - } else { - $708 = HEAP32[$a$3240$i>>2]|0; - $709 = ($708|0)==(0); - $710 = ((($a$3240$i)) + 4|0); - $$a$3305$i = $709 ? $710 : $a$3240$i; - $$a$3306$i = $$a$3305$i;$z$4$i = $z$3239$i; - } - } while(0); - $726 = $z$4$i; - $727 = $$a$3306$i; - $728 = (($726) - ($727))|0; - $729 = $728 >> 2; - $730 = ($729|0)>($670|0); - $731 = (($$a$3306$i) + ($670<<2)|0); - $$z$4$i = $730 ? $731 : $z$4$i; - $732 = HEAP32[$e2$i>>2]|0; - $733 = (($732) + ($706))|0; - HEAP32[$e2$i>>2] = $733; - $734 = ($733|0)<(0); - if ($734) { - $704 = $733;$a$3240$i = $$a$3306$i;$z$3239$i = $$z$4$i; - } else { - $a$3$lcssa$i = $$a$3306$i;$z$3$lcssa$i = $$z$4$i; - break L228; - } - } - } - $672 = (($$31$i) + ($670<<2)|0); - $674 = $$pr146$i;$a$3240$us$i = $a$1$lcssa$i;$z$3239$us$i = $z$1$lcssa$i; - while(1) { - $673 = (0 - ($674))|0; - $675 = ($673|0)>(9); - $676 = $675 ? 9 : $673; - $677 = ($a$3240$us$i>>>0)<($z$3239$us$i>>>0); - do { - if ($677) { - $702 = 1 << $676; - $695 = (($702) + -1)|0; - $699 = 1000000000 >>> $676; - $carry3$0234$us$i = 0;$d$1233$us$i = $a$3240$us$i; - while(1) { - $693 = HEAP32[$d$1233$us$i>>2]|0; - $694 = $693 & $695; - $696 = $693 >>> $676; - $697 = (($696) + ($carry3$0234$us$i))|0; - HEAP32[$d$1233$us$i>>2] = $697; - $698 = Math_imul($694, $699)|0; - $700 = ((($d$1233$us$i)) + 4|0); - $701 = ($700>>>0)<($z$3239$us$i>>>0); - if ($701) { - $carry3$0234$us$i = $698;$d$1233$us$i = $700; - } else { - $$lcssa464 = $698; - break; - } - } - $681 = HEAP32[$a$3240$us$i>>2]|0; - $682 = ($681|0)==(0); - $683 = ((($a$3240$us$i)) + 4|0); - $$a$3$us$i = $682 ? $683 : $a$3240$us$i; - $684 = ($$lcssa464|0)==(0); - if ($684) { - $$a$3$us304$i = $$a$3$us$i;$z$4$us$i = $z$3239$us$i; - break; - } - $685 = ((($z$3239$us$i)) + 4|0); - HEAP32[$z$3239$us$i>>2] = $$lcssa464; - $$a$3$us304$i = $$a$3$us$i;$z$4$us$i = $685; - } else { - $678 = HEAP32[$a$3240$us$i>>2]|0; - $679 = ($678|0)==(0); - $680 = ((($a$3240$us$i)) + 4|0); - $$a$3$us303$i = $679 ? $680 : $a$3240$us$i; - $$a$3$us304$i = $$a$3$us303$i;$z$4$us$i = $z$3239$us$i; - } - } while(0); - $686 = $z$4$us$i; - $687 = (($686) - ($636))|0; - $688 = $687 >> 2; - $689 = ($688|0)>($670|0); - $$z$4$us$i = $689 ? $672 : $z$4$us$i; - $690 = HEAP32[$e2$i>>2]|0; - $691 = (($690) + ($676))|0; - HEAP32[$e2$i>>2] = $691; - $692 = ($691|0)<(0); - if ($692) { - $674 = $691;$a$3240$us$i = $$a$3$us304$i;$z$3239$us$i = $$z$4$us$i; - } else { - $a$3$lcssa$i = $$a$3$us304$i;$z$3$lcssa$i = $$z$4$us$i; - break; - } - } - } else { - $a$3$lcssa$i = $a$1$lcssa$i;$z$3$lcssa$i = $z$1$lcssa$i; - } - } while(0); - $735 = ($a$3$lcssa$i>>>0)<($z$3$lcssa$i>>>0); - do { - if ($735) { - $736 = $a$3$lcssa$i; - $737 = (($636) - ($736))|0; - $738 = $737 >> 2; - $739 = ($738*9)|0; - $740 = HEAP32[$a$3$lcssa$i>>2]|0; - $741 = ($740>>>0)<(10); - if ($741) { - $e$1$i = $739; - break; - } else { - $e$0229$i = $739;$i$0228$i = 10; - } - while(1) { - $742 = ($i$0228$i*10)|0; - $743 = (($e$0229$i) + 1)|0; - $744 = ($740>>>0)<($742>>>0); - if ($744) { - $e$1$i = $743; - break; - } else { - $e$0229$i = $743;$i$0228$i = $742; - } - } - } else { - $e$1$i = 0; - } - } while(0); - $745 = ($476|0)!=(102); - $746 = $745 ? $e$1$i : 0; - $747 = (($$p$i) - ($746))|0; - $748 = ($476|0)==(103); - $749 = ($$p$i|0)!=(0); - $750 = $749 & $748; - $$neg151$i = $750 << 31 >> 31; - $751 = (($747) + ($$neg151$i))|0; - $752 = $z$3$lcssa$i; - $753 = (($752) - ($636))|0; - $754 = $753 >> 2; - $755 = ($754*9)|0; - $756 = (($755) + -9)|0; - $757 = ($751|0)<($756|0); - if ($757) { - $758 = (($751) + 9216)|0; - $759 = (($758|0) / 9)&-1; - $$sum$i = (($759) + -1023)|0; - $760 = (($$31$i) + ($$sum$i<<2)|0); - $761 = (($758|0) % 9)&-1; - $j$0221$i = (($761) + 1)|0; - $762 = ($j$0221$i|0)<(9); - if ($762) { - $i$1222$i = 10;$j$0223$i = $j$0221$i; - while(1) { - $763 = ($i$1222$i*10)|0; - $j$0$i = (($j$0223$i) + 1)|0; - $exitcond$i = ($j$0$i|0)==(9); - if ($exitcond$i) { - $i$1$lcssa$i = $763; - break; - } else { - $i$1222$i = $763;$j$0223$i = $j$0$i; - } - } - } else { - $i$1$lcssa$i = 10; - } - $764 = HEAP32[$760>>2]|0; - $765 = (($764>>>0) % ($i$1$lcssa$i>>>0))&-1; - $766 = ($765|0)==(0); - if ($766) { - $$sum15$i = (($759) + -1022)|0; - $767 = (($$31$i) + ($$sum15$i<<2)|0); - $768 = ($767|0)==($z$3$lcssa$i|0); - if ($768) { - $a$7$i = $a$3$lcssa$i;$d$3$i = $760;$e$3$i = $e$1$i; - } else { - label = 221; - } - } else { - label = 221; - } - do { - if ((label|0) == 221) { - label = 0; - $769 = (($764>>>0) / ($i$1$lcssa$i>>>0))&-1; - $770 = $769 & 1; - $771 = ($770|0)==(0); - $$20$i = $771 ? 9007199254740992.0 : 9007199254740994.0; - $772 = (($i$1$lcssa$i|0) / 2)&-1; - $773 = ($765>>>0)<($772>>>0); - do { - if ($773) { - $small$0$i = 0.5; - } else { - $774 = ($765|0)==($772|0); - if ($774) { - $$sum16$i = (($759) + -1022)|0; - $775 = (($$31$i) + ($$sum16$i<<2)|0); - $776 = ($775|0)==($z$3$lcssa$i|0); - if ($776) { - $small$0$i = 1.0; - break; - } - } - $small$0$i = 1.5; - } - } while(0); - $777 = ($pl$0$i|0)==(0); - do { - if ($777) { - $round6$1$i = $$20$i;$small$1$i = $small$0$i; - } else { - $778 = HEAP8[$prefix$0$i>>0]|0; - $779 = ($778<<24>>24)==(45); - if (!($779)) { - $round6$1$i = $$20$i;$small$1$i = $small$0$i; - break; - } - $780 = -$$20$i; - $781 = -$small$0$i; - $round6$1$i = $780;$small$1$i = $781; - } - } while(0); - $782 = (($764) - ($765))|0; - HEAP32[$760>>2] = $782; - $783 = $round6$1$i + $small$1$i; - $784 = $783 != $round6$1$i; - if (!($784)) { - $a$7$i = $a$3$lcssa$i;$d$3$i = $760;$e$3$i = $e$1$i; - break; - } - $785 = (($782) + ($i$1$lcssa$i))|0; - HEAP32[$760>>2] = $785; - $786 = ($785>>>0)>(999999999); - if ($786) { - $a$5215$i = $a$3$lcssa$i;$d$2214$i = $760; - while(1) { - $787 = ((($d$2214$i)) + -4|0); - HEAP32[$d$2214$i>>2] = 0; - $788 = ($787>>>0)<($a$5215$i>>>0); - if ($788) { - $789 = ((($a$5215$i)) + -4|0); - HEAP32[$789>>2] = 0; - $a$6$i = $789; - } else { - $a$6$i = $a$5215$i; - } - $790 = HEAP32[$787>>2]|0; - $791 = (($790) + 1)|0; - HEAP32[$787>>2] = $791; - $792 = ($791>>>0)>(999999999); - if ($792) { - $a$5215$i = $a$6$i;$d$2214$i = $787; - } else { - $a$5$lcssa$i = $a$6$i;$d$2$lcssa$i = $787; - break; - } - } - } else { - $a$5$lcssa$i = $a$3$lcssa$i;$d$2$lcssa$i = $760; - } - $793 = $a$5$lcssa$i; - $794 = (($636) - ($793))|0; - $795 = $794 >> 2; - $796 = ($795*9)|0; - $797 = HEAP32[$a$5$lcssa$i>>2]|0; - $798 = ($797>>>0)<(10); - if ($798) { - $a$7$i = $a$5$lcssa$i;$d$3$i = $d$2$lcssa$i;$e$3$i = $796; - break; - } else { - $e$2210$i = $796;$i$2209$i = 10; - } - while(1) { - $799 = ($i$2209$i*10)|0; - $800 = (($e$2210$i) + 1)|0; - $801 = ($797>>>0)<($799>>>0); - if ($801) { - $a$7$i = $a$5$lcssa$i;$d$3$i = $d$2$lcssa$i;$e$3$i = $800; - break; - } else { - $e$2210$i = $800;$i$2209$i = $799; - } - } - } - } while(0); - $802 = ((($d$3$i)) + 4|0); - $803 = ($z$3$lcssa$i>>>0)>($802>>>0); - $$z$3$i = $803 ? $802 : $z$3$lcssa$i; - $a$8$ph$i = $a$7$i;$e$4$ph$i = $e$3$i;$z$6$ph$i = $$z$3$i; - } else { - $a$8$ph$i = $a$3$lcssa$i;$e$4$ph$i = $e$1$i;$z$6$ph$i = $z$3$lcssa$i; - } - $804 = (0 - ($e$4$ph$i))|0; - $z$6$i = $z$6$ph$i; - while(1) { - $805 = ($z$6$i>>>0)>($a$8$ph$i>>>0); - if (!($805)) { - $$lcssa275$i = 0;$z$6$i$lcssa = $z$6$i; - break; - } - $806 = ((($z$6$i)) + -4|0); - $807 = HEAP32[$806>>2]|0; - $808 = ($807|0)==(0); - if ($808) { - $z$6$i = $806; - } else { - $$lcssa275$i = 1;$z$6$i$lcssa = $z$6$i; - break; - } - } - do { - if ($748) { - $809 = $749&1; - $810 = $809 ^ 1; - $$p$$i = (($810) + ($$p$i))|0; - $811 = ($$p$$i|0)>($e$4$ph$i|0); - $812 = ($e$4$ph$i|0)>(-5); - $or$cond6$i = $811 & $812; - if ($or$cond6$i) { - $813 = (($t$0) + -1)|0; - $$neg152$i = (($$p$$i) + -1)|0; - $814 = (($$neg152$i) - ($e$4$ph$i))|0; - $$013$i = $813;$$210$i = $814; - } else { - $815 = (($t$0) + -2)|0; - $816 = (($$p$$i) + -1)|0; - $$013$i = $815;$$210$i = $816; - } - $817 = $fl$1$ & 8; - $818 = ($817|0)==(0); - if (!($818)) { - $$114$i = $$013$i;$$311$i = $$210$i;$$pre$phi302$iZ2D = $817; - break; - } - do { - if ($$lcssa275$i) { - $819 = ((($z$6$i$lcssa)) + -4|0); - $820 = HEAP32[$819>>2]|0; - $821 = ($820|0)==(0); - if ($821) { - $j$2$i = 9; - break; - } - $822 = (($820>>>0) % 10)&-1; - $823 = ($822|0)==(0); - if ($823) { - $i$3205$i = 10;$j$1206$i = 0; - } else { - $j$2$i = 0; - break; - } - while(1) { - $824 = ($i$3205$i*10)|0; - $825 = (($j$1206$i) + 1)|0; - $826 = (($820>>>0) % ($824>>>0))&-1; - $827 = ($826|0)==(0); - if ($827) { - $i$3205$i = $824;$j$1206$i = $825; - } else { - $j$2$i = $825; - break; - } - } - } else { - $j$2$i = 9; - } - } while(0); - $828 = $$013$i | 32; - $829 = ($828|0)==(102); - $830 = $z$6$i$lcssa; - $831 = (($830) - ($636))|0; - $832 = $831 >> 2; - $833 = ($832*9)|0; - $834 = (($833) + -9)|0; - if ($829) { - $835 = (($834) - ($j$2$i))|0; - $836 = ($835|0)<(0); - $$21$i = $836 ? 0 : $835; - $837 = ($$210$i|0)<($$21$i|0); - $$210$$22$i = $837 ? $$210$i : $$21$i; - $$114$i = $$013$i;$$311$i = $$210$$22$i;$$pre$phi302$iZ2D = 0; - break; - } else { - $838 = (($834) + ($e$4$ph$i))|0; - $839 = (($838) - ($j$2$i))|0; - $840 = ($839|0)<(0); - $$23$i = $840 ? 0 : $839; - $841 = ($$210$i|0)<($$23$i|0); - $$210$$24$i = $841 ? $$210$i : $$23$i; - $$114$i = $$013$i;$$311$i = $$210$$24$i;$$pre$phi302$iZ2D = 0; - break; - } - } else { - $$pre301$i = $fl$1$ & 8; - $$114$i = $t$0;$$311$i = $$p$i;$$pre$phi302$iZ2D = $$pre301$i; - } - } while(0); - $842 = $$311$i | $$pre$phi302$iZ2D; - $843 = ($842|0)!=(0); - $844 = $843&1; - $845 = $$114$i | 32; - $846 = ($845|0)==(102); - if ($846) { - $847 = ($e$4$ph$i|0)>(0); - $848 = $847 ? $e$4$ph$i : 0; - $$pn$i = $848;$estr$2$i = 0; - } else { - $849 = ($e$4$ph$i|0)<(0); - $850 = $849 ? $804 : $e$4$ph$i; - $851 = ($850|0)<(0); - if ($851) { - $852 = ($850|0)<(0); - $853 = $852 << 31 >> 31; - $$05$i79$i = $7;$854 = $850;$855 = $853; - while(1) { - $856 = (___uremdi3(($854|0),($855|0),10,0)|0); - $857 = tempRet0; - $858 = $856 | 48; - $859 = $858&255; - $860 = ((($$05$i79$i)) + -1|0); - HEAP8[$860>>0] = $859; - $861 = (___udivdi3(($854|0),($855|0),10,0)|0); - $862 = tempRet0; - $863 = ($855>>>0)>(9); - $864 = ($854>>>0)>(4294967295); - $865 = ($855|0)==(9); - $866 = $865 & $864; - $867 = $863 | $866; - if ($867) { - $$05$i79$i = $860;$854 = $861;$855 = $862; - } else { - $$lcssa470 = $860;$1185 = $861;$1186 = $862; - break; - } - } - $$0$lcssa$i84$i = $$lcssa470;$$01$lcssa$off0$i85$i = $1185; - } else { - $$0$lcssa$i84$i = $7;$$01$lcssa$off0$i85$i = $850; - } - $868 = ($$01$lcssa$off0$i85$i|0)==(0); - if ($868) { - $estr$1$ph$i = $$0$lcssa$i84$i; - } else { - $$12$i87$i = $$0$lcssa$i84$i;$y$03$i86$i = $$01$lcssa$off0$i85$i; - while(1) { - $869 = (($y$03$i86$i>>>0) % 10)&-1; - $870 = $869 | 48; - $871 = $870&255; - $872 = ((($$12$i87$i)) + -1|0); - HEAP8[$872>>0] = $871; - $873 = (($y$03$i86$i>>>0) / 10)&-1; - $874 = ($y$03$i86$i>>>0)<(10); - if ($874) { - $estr$1$ph$i = $872; - break; - } else { - $$12$i87$i = $872;$y$03$i86$i = $873; - } - } - } - $875 = $estr$1$ph$i; - $876 = (($9) - ($875))|0; - $877 = ($876|0)<(2); - if ($877) { - $estr$1201$i = $estr$1$ph$i; - while(1) { - $878 = ((($estr$1201$i)) + -1|0); - HEAP8[$878>>0] = 48; - $879 = $878; - $880 = (($9) - ($879))|0; - $881 = ($880|0)<(2); - if ($881) { - $estr$1201$i = $878; - } else { - $estr$1$lcssa$i = $878; - break; - } - } - } else { - $estr$1$lcssa$i = $estr$1$ph$i; - } - $882 = $e$4$ph$i >> 31; - $883 = $882 & 2; - $884 = (($883) + 43)|0; - $885 = $884&255; - $886 = ((($estr$1$lcssa$i)) + -1|0); - HEAP8[$886>>0] = $885; - $887 = $$114$i&255; - $888 = ((($estr$1$lcssa$i)) + -2|0); - HEAP8[$888>>0] = $887; - $889 = $888; - $890 = (($9) - ($889))|0; - $$pn$i = $890;$estr$2$i = $888; - } - $891 = (($pl$0$i) + 1)|0; - $892 = (($891) + ($$311$i))|0; - $l$1$i = (($892) + ($844))|0; - $893 = (($l$1$i) + ($$pn$i))|0; - $894 = $fl$1$ & 73728; - $895 = ($894|0)==(0); - $896 = ($w$1|0)>($893|0); - $or$cond$i93$i = $895 & $896; - if ($or$cond$i93$i) { - $897 = (($w$1) - ($893))|0; - $898 = ($897>>>0)>(256); - $899 = $898 ? 256 : $897; - _memset(($pad$i|0),32,($899|0))|0; - $900 = ($897>>>0)>(255); - if ($900) { - $$01$i95$i = $897; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $901 = (($$01$i95$i) + -256)|0; - $902 = ($901>>>0)>(255); - if ($902) { - $$01$i95$i = $901; - } else { - break; - } - } - $903 = $897 & 255; - $$0$lcssa$i97$i = $903; - } else { - $$0$lcssa$i97$i = $897; - } - (___fwritex($pad$i,$$0$lcssa$i97$i,$f)|0); - } - (___fwritex($prefix$0$i,$pl$0$i,$f)|0); - $904 = ($894|0)==(65536); - $or$cond$i100$i = $904 & $896; - if ($or$cond$i100$i) { - $905 = (($w$1) - ($893))|0; - $906 = ($905>>>0)>(256); - $907 = $906 ? 256 : $905; - _memset(($pad$i|0),48,($907|0))|0; - $908 = ($905>>>0)>(255); - if ($908) { - $$01$i102$i = $905; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $909 = (($$01$i102$i) + -256)|0; - $910 = ($909>>>0)>(255); - if ($910) { - $$01$i102$i = $909; - } else { - break; - } - } - $911 = $905 & 255; - $$0$lcssa$i104$i = $911; - } else { - $$0$lcssa$i104$i = $905; - } - (___fwritex($pad$i,$$0$lcssa$i104$i,$f)|0); - } - if ($846) { - $912 = ($a$8$ph$i>>>0)>($$31$i>>>0); - $r$0$a$8$i = $912 ? $$31$i : $a$8$ph$i; - $d$4191$i = $r$0$a$8$i; - while(1) { - $913 = HEAP32[$d$4191$i>>2]|0; - $914 = ($913|0)==(0); - if ($914) { - $$1$lcssa$i112$i = $14; - } else { - $$12$i110$i = $14;$y$03$i109$i = $913; - while(1) { - $915 = (($y$03$i109$i>>>0) % 10)&-1; - $916 = $915 | 48; - $917 = $916&255; - $918 = ((($$12$i110$i)) + -1|0); - HEAP8[$918>>0] = $917; - $919 = (($y$03$i109$i>>>0) / 10)&-1; - $920 = ($y$03$i109$i>>>0)<(10); - if ($920) { - $$1$lcssa$i112$i = $918; - break; - } else { - $$12$i110$i = $918;$y$03$i109$i = $919; - } - } - } - $921 = ($d$4191$i|0)==($r$0$a$8$i|0); - do { - if ($921) { - $925 = ($$1$lcssa$i112$i|0)==($14|0); - if (!($925)) { - $s7$1$i = $$1$lcssa$i112$i; - break; - } - HEAP8[$16>>0] = 48; - $s7$1$i = $16; - } else { - $922 = ($$1$lcssa$i112$i>>>0)>($buf$i>>>0); - if ($922) { - $s7$0188$i = $$1$lcssa$i112$i; - } else { - $s7$1$i = $$1$lcssa$i112$i; - break; - } - while(1) { - $923 = ((($s7$0188$i)) + -1|0); - HEAP8[$923>>0] = 48; - $924 = ($923>>>0)>($buf$i>>>0); - if ($924) { - $s7$0188$i = $923; - } else { - $s7$1$i = $923; - break; - } - } - } - } while(0); - $926 = $s7$1$i; - $927 = (($15) - ($926))|0; - (___fwritex($s7$1$i,$927,$f)|0); - $928 = ((($d$4191$i)) + 4|0); - $929 = ($928>>>0)>($$31$i>>>0); - if ($929) { - $$lcssa479 = $928; - break; - } else { - $d$4191$i = $928; - } - } - $930 = ($842|0)==(0); - if (!($930)) { - (___fwritex(96480,1,$f)|0); - } - $931 = ($$lcssa479>>>0)<($z$6$i$lcssa>>>0); - $932 = ($$311$i|0)>(0); - $933 = $932 & $931; - if ($933) { - $$412184$i = $$311$i;$d$5183$i = $$lcssa479; - while(1) { - $934 = HEAP32[$d$5183$i>>2]|0; - $935 = ($934|0)==(0); - if ($935) { - $s8$0180$i = $14; - label = 289; - } else { - $$12$i119$i = $14;$y$03$i118$i = $934; - while(1) { - $936 = (($y$03$i118$i>>>0) % 10)&-1; - $937 = $936 | 48; - $938 = $937&255; - $939 = ((($$12$i119$i)) + -1|0); - HEAP8[$939>>0] = $938; - $940 = (($y$03$i118$i>>>0) / 10)&-1; - $941 = ($y$03$i118$i>>>0)<(10); - if ($941) { - $$lcssa480 = $939; - break; - } else { - $$12$i119$i = $939;$y$03$i118$i = $940; - } - } - $942 = ($$lcssa480>>>0)>($buf$i>>>0); - if ($942) { - $s8$0180$i = $$lcssa480; - label = 289; - } else { - $s8$0$lcssa$i = $$lcssa480; - } - } - if ((label|0) == 289) { - while(1) { - label = 0; - $943 = ((($s8$0180$i)) + -1|0); - HEAP8[$943>>0] = 48; - $944 = ($943>>>0)>($buf$i>>>0); - if ($944) { - $s8$0180$i = $943; - label = 289; - } else { - $s8$0$lcssa$i = $943; - break; - } - } - } - $945 = ($$412184$i|0)>(9); - $946 = $945 ? 9 : $$412184$i; - (___fwritex($s8$0$lcssa$i,$946,$f)|0); - $947 = ((($d$5183$i)) + 4|0); - $948 = (($$412184$i) + -9)|0; - $949 = ($947>>>0)<($z$6$i$lcssa>>>0); - $950 = $945 & $949; - if ($950) { - $$412184$i = $948;$d$5183$i = $947; - } else { - $$412$lcssa$i = $948; - break; - } - } - } else { - $$412$lcssa$i = $$311$i; - } - $951 = ($$412$lcssa$i|0)>(0); - if ($951) { - $952 = ($$412$lcssa$i>>>0)>(256); - $953 = $952 ? 256 : $$412$lcssa$i; - _memset(($pad$i|0),48,($953|0))|0; - $954 = ($$412$lcssa$i>>>0)>(255); - if ($954) { - $$01$i126$i = $$412$lcssa$i; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $955 = (($$01$i126$i) + -256)|0; - $956 = ($955>>>0)>(255); - if ($956) { - $$01$i126$i = $955; - } else { - break; - } - } - $957 = $$412$lcssa$i & 255; - $$0$lcssa$i128$i = $957; - } else { - $$0$lcssa$i128$i = $$412$lcssa$i; - } - (___fwritex($pad$i,$$0$lcssa$i128$i,$f)|0); - } - } else { - $958 = ((($a$8$ph$i)) + 4|0); - $z$6$$i = $$lcssa275$i ? $z$6$i$lcssa : $958; - $959 = ($$311$i|0)>(-1); - do { - if ($959) { - $960 = ($$pre$phi302$iZ2D|0)==(0); - $$5196$i = $$311$i;$d$6195$i = $a$8$ph$i; - while(1) { - $961 = HEAP32[$d$6195$i>>2]|0; - $962 = ($961|0)==(0); - if ($962) { - label = 303; - } else { - $$12$i134$i = $14;$y$03$i133$i = $961; - while(1) { - $963 = (($y$03$i133$i>>>0) % 10)&-1; - $964 = $963 | 48; - $965 = $964&255; - $966 = ((($$12$i134$i)) + -1|0); - HEAP8[$966>>0] = $965; - $967 = (($y$03$i133$i>>>0) / 10)&-1; - $968 = ($y$03$i133$i>>>0)<(10); - if ($968) { - $$12$i134$i$lcssa = $$12$i134$i;$$lcssa474 = $966; - break; - } else { - $$12$i134$i = $966;$y$03$i133$i = $967; - } - } - $969 = ($$lcssa474|0)==($14|0); - if ($969) { - label = 303; - } else { - $1187 = $$12$i134$i$lcssa;$s9$0$i = $$lcssa474; - } - } - if ((label|0) == 303) { - label = 0; - HEAP8[$16>>0] = 48; - $1187 = $14;$s9$0$i = $16; - } - $970 = ($d$6195$i|0)==($a$8$ph$i|0); - do { - if ($970) { - (___fwritex($s9$0$i,1,$f)|0); - $974 = ($$5196$i|0)<(1); - $or$cond29$i = $960 & $974; - if ($or$cond29$i) { - $s9$2$i = $1187; - break; - } - (___fwritex(96480,1,$f)|0); - $s9$2$i = $1187; - } else { - $971 = ($s9$0$i>>>0)>($buf$i>>>0); - if ($971) { - $s9$1192$i = $s9$0$i; - } else { - $s9$2$i = $s9$0$i; - break; - } - while(1) { - $972 = ((($s9$1192$i)) + -1|0); - HEAP8[$972>>0] = 48; - $973 = ($972>>>0)>($buf$i>>>0); - if ($973) { - $s9$1192$i = $972; - } else { - $s9$2$i = $972; - break; - } - } - } - } while(0); - $975 = $s9$2$i; - $976 = (($15) - ($975))|0; - $977 = ($$5196$i|0)>($976|0); - $978 = $977 ? $976 : $$5196$i; - (___fwritex($s9$2$i,$978,$f)|0); - $979 = (($$5196$i) - ($976))|0; - $980 = ((($d$6195$i)) + 4|0); - $981 = ($980>>>0)<($z$6$$i>>>0); - $982 = ($979|0)>(-1); - $983 = $981 & $982; - if ($983) { - $$5196$i = $979;$d$6195$i = $980; - } else { - $$lcssa476 = $979; - break; - } - } - $984 = ($$lcssa476|0)>(0); - if (!($984)) { - break; - } - $985 = ($$lcssa476>>>0)>(256); - $986 = $985 ? 256 : $$lcssa476; - _memset(($pad$i|0),48,($986|0))|0; - $987 = ($$lcssa476>>>0)>(255); - if ($987) { - $$01$i141$i = $$lcssa476; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $988 = (($$01$i141$i) + -256)|0; - $989 = ($988>>>0)>(255); - if ($989) { - $$01$i141$i = $988; - } else { - break; - } - } - $990 = $$lcssa476 & 255; - $$0$lcssa$i143$i = $990; - } else { - $$0$lcssa$i143$i = $$lcssa476; - } - (___fwritex($pad$i,$$0$lcssa$i143$i,$f)|0); - } else { - } - } while(0); - $991 = $estr$2$i; - $992 = (($9) - ($991))|0; - (___fwritex($estr$2$i,$992,$f)|0); - } - $993 = ($894|0)==(8192); - $or$cond$i$i = $993 & $896; - if ($or$cond$i$i) { - $994 = (($w$1) - ($893))|0; - $995 = ($994>>>0)>(256); - $996 = $995 ? 256 : $994; - _memset(($pad$i|0),32,($996|0))|0; - $997 = ($994>>>0)>(255); - if ($997) { - $$01$i$i = $994; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $998 = (($$01$i$i) + -256)|0; - $999 = ($998>>>0)>(255); - if ($999) { - $$01$i$i = $998; - } else { - break; - } - } - $1000 = $994 & 255; - $$0$lcssa$i$i = $1000; - } else { - $$0$lcssa$i$i = $994; - } - (___fwritex($pad$i,$$0$lcssa$i$i,$f)|0); - } - $w$30$i = $896 ? $w$1 : $893; - $$0$i = $w$30$i; - } else { - $445 = $t$0 & 32; - $446 = ($445|0)!=(0); - $447 = $446 ? 96448 : 96456; - $448 = ($$07$i != $$07$i) | (0.0 != 0.0); - $449 = $446 ? 96464 : 96472; - $pl$1$i = $448 ? 0 : $pl$0$i; - $s1$0$i = $448 ? $449 : $447; - $450 = (($pl$1$i) + 3)|0; - $451 = $fl$1$ & 8192; - $452 = ($451|0)==(0); - $453 = ($w$1|0)>($450|0); - $or$cond$i35$i = $452 & $453; - if ($or$cond$i35$i) { - $454 = (($w$1) - ($450))|0; - $455 = ($454>>>0)>(256); - $456 = $455 ? 256 : $454; - _memset(($pad$i|0),32,($456|0))|0; - $457 = ($454>>>0)>(255); - if ($457) { - $$01$i37$i = $454; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $458 = (($$01$i37$i) + -256)|0; - $459 = ($458>>>0)>(255); - if ($459) { - $$01$i37$i = $458; - } else { - break; - } - } - $460 = $454 & 255; - $$0$lcssa$i39$i = $460; - } else { - $$0$lcssa$i39$i = $454; - } - (___fwritex($pad$i,$$0$lcssa$i39$i,$f)|0); - } - (___fwritex($prefix$0$i,$pl$1$i,$f)|0); - (___fwritex($s1$0$i,3,$f)|0); - $461 = $fl$1$ & 73728; - $462 = ($461|0)==(8192); - $or$cond$i42$i = $462 & $453; - if ($or$cond$i42$i) { - $463 = (($w$1) - ($450))|0; - $464 = ($463>>>0)>(256); - $465 = $464 ? 256 : $463; - _memset(($pad$i|0),32,($465|0))|0; - $466 = ($463>>>0)>(255); - if ($466) { - $$01$i44$i = $463; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $467 = (($$01$i44$i) + -256)|0; - $468 = ($467>>>0)>(255); - if ($468) { - $$01$i44$i = $467; - } else { - break; - } - } - $469 = $463 & 255; - $$0$lcssa$i46$i = $469; - } else { - $$0$lcssa$i46$i = $463; - } - (___fwritex($pad$i,$$0$lcssa$i46$i,$f)|0); - } - $470 = $453 ? $w$1 : $450; - $$0$i = $470; - } - } while(0); - $1169 = $291;$1170 = $264;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $$0$i;$l10n$0 = $l10n$3; - continue L1; - break; - } - case 112: { - $286 = ($p$0>>>0)>(8); - $287 = $286 ? $p$0 : 8; - $288 = $fl$1$ | 8; - $fl$3 = $288;$p$1 = $287;$t$1 = 120; - label = 73; - break; - } - case 88: case 120: { - $fl$3 = $fl$1$;$p$1 = $p$0;$t$1 = $t$0; - label = 73; - break; - } - case 105: case 100: { - $329 = ($291|0)<(0); - if ($329) { - $330 = (_i64Subtract(0,0,($264|0),($291|0))|0); - $331 = tempRet0; - $336 = $331;$338 = $330;$pl$0 = 1;$prefix$0 = 96400; - label = 84; - break L86; - } - $332 = $fl$1$ & 2048; - $333 = ($332|0)==(0); - if ($333) { - $334 = $fl$1$ & 1; - $335 = ($334|0)==(0); - $$ = $335 ? 96400 : (96402); - $336 = $291;$338 = $264;$pl$0 = $334;$prefix$0 = $$; - label = 84; - } else { - $336 = $291;$338 = $264;$pl$0 = 1;$prefix$0 = (96401); - label = 84; - } - break; - } - case 99: { - $378 = $264&255; - HEAP8[$4>>0] = $378; - $1175 = $291;$1176 = $264;$a$2 = $4;$fl$6 = $263;$p$5 = 1;$pl$2 = 0;$prefix$2 = 96400;$z$2 = $2; - break; - } - case 109: { - $379 = (___errno_location()|0); - $380 = HEAP32[$379>>2]|0; - $381 = (_strerror(($380|0))|0); - $a$1 = $381; - label = 94; - break; - } - case 115: { - $382 = $264; - $383 = ($264|0)!=(0); - $384 = $383 ? $382 : 96416; - $a$1 = $384; - label = 94; - break; - } - default: { - $1175 = $291;$1176 = $264;$a$2 = $23;$fl$6 = $fl$1$;$p$5 = $p$0;$pl$2 = 0;$prefix$2 = 96400;$z$2 = $2; - } - } - } while(0); - if ((label|0) == 73) { - label = 0; - $289 = $t$1 & 32; - $290 = ($264|0)==(0); - $292 = ($291|0)==(0); - $293 = $290 & $292; - if ($293) { - $366 = $264;$368 = $291;$a$0 = $2;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = 0;$prefix$1 = 96400; - label = 89; - } else { - $$012$i = $2;$295 = $264;$302 = $291; - while(1) { - $294 = $295 & 15; - $296 = (96384 + ($294)|0); - $297 = HEAP8[$296>>0]|0; - $298 = $297&255; - $299 = $298 | $289; - $300 = $299&255; - $301 = ((($$012$i)) + -1|0); - HEAP8[$301>>0] = $300; - $303 = (_bitshift64Lshr(($295|0),($302|0),4)|0); - $304 = tempRet0; - $305 = ($303|0)==(0); - $306 = ($304|0)==(0); - $307 = $305 & $306; - if ($307) { - $$lcssa491 = $301; - break; - } else { - $$012$i = $301;$295 = $303;$302 = $304; - } - } - $308 = $fl$3 & 8; - $309 = ($308|0)==(0); - if ($309) { - $366 = $264;$368 = $291;$a$0 = $$lcssa491;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = 0;$prefix$1 = 96400; - label = 89; - } else { - $310 = $t$1 >> 4; - $311 = (96400 + ($310)|0); - $366 = $264;$368 = $291;$a$0 = $$lcssa491;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = 2;$prefix$1 = $311; - label = 89; - } - } - } - else if ((label|0) == 84) { - label = 0; - $337 = ($336>>>0)>(0); - $339 = ($338>>>0)>(4294967295); - $340 = ($336|0)==(0); - $341 = $340 & $339; - $342 = $337 | $341; - if ($342) { - $$05$i = $2;$343 = $338;$344 = $336; - while(1) { - $345 = (___uremdi3(($343|0),($344|0),10,0)|0); - $346 = tempRet0; - $347 = $345 | 48; - $348 = $347&255; - $349 = ((($$05$i)) + -1|0); - HEAP8[$349>>0] = $348; - $350 = (___udivdi3(($343|0),($344|0),10,0)|0); - $351 = tempRet0; - $352 = ($344>>>0)>(9); - $353 = ($343>>>0)>(4294967295); - $354 = ($344|0)==(9); - $355 = $354 & $353; - $356 = $352 | $355; - if ($356) { - $$05$i = $349;$343 = $350;$344 = $351; - } else { - $$lcssa487 = $349;$1177 = $350;$1178 = $351; - break; - } - } - $$0$lcssa$i53 = $$lcssa487;$$01$lcssa$off0$i = $1177; - } else { - $$0$lcssa$i53 = $2;$$01$lcssa$off0$i = $338; - } - $357 = ($$01$lcssa$off0$i|0)==(0); - if ($357) { - $366 = $338;$368 = $336;$a$0 = $$0$lcssa$i53;$fl$4 = $fl$1$;$p$2 = $p$0;$pl$1 = $pl$0;$prefix$1 = $prefix$0; - label = 89; - } else { - $$12$i = $$0$lcssa$i53;$y$03$i = $$01$lcssa$off0$i; - while(1) { - $358 = (($y$03$i>>>0) % 10)&-1; - $359 = $358 | 48; - $360 = $359&255; - $361 = ((($$12$i)) + -1|0); - HEAP8[$361>>0] = $360; - $362 = (($y$03$i>>>0) / 10)&-1; - $363 = ($y$03$i>>>0)<(10); - if ($363) { - $366 = $338;$368 = $336;$a$0 = $361;$fl$4 = $fl$1$;$p$2 = $p$0;$pl$1 = $pl$0;$prefix$1 = $prefix$0; - label = 89; - break; - } else { - $$12$i = $361;$y$03$i = $362; - } - } - } - } - else if ((label|0) == 94) { - label = 0; - $385 = (_memchr($a$1,0,$p$0)|0); - $386 = ($385|0)==(0|0); - $387 = $385; - $388 = $a$1; - $389 = (($387) - ($388))|0; - $390 = (($a$1) + ($p$0)|0); - $z$1 = $386 ? $390 : $385; - $p$3 = $386 ? $p$0 : $389; - $1175 = $291;$1176 = $264;$a$2 = $a$1;$fl$6 = $263;$p$5 = $p$3;$pl$2 = 0;$prefix$2 = 96400;$z$2 = $z$1; - } - else if ((label|0) == 97) { - label = 0; - $i$0175 = 0;$l$1174 = 0;$ws$0176 = $1179; - while(1) { - $393 = HEAP32[$ws$0176>>2]|0; - $394 = ($393|0)==(0); - if ($394) { - $i$0$lcssa = $i$0175;$l$2 = $l$1174; - break; - } - $395 = (_wctomb($mb,$393)|0); - $396 = ($395|0)<(0); - $397 = (($p$4272) - ($i$0175))|0; - $398 = ($395>>>0)>($397>>>0); - $or$cond22 = $396 | $398; - if ($or$cond22) { - $i$0$lcssa = $i$0175;$l$2 = $395; - break; - } - $399 = ((($ws$0176)) + 4|0); - $400 = (($395) + ($i$0175))|0; - $401 = ($p$4272>>>0)>($400>>>0); - if ($401) { - $i$0175 = $400;$l$1174 = $395;$ws$0176 = $399; - } else { - $i$0$lcssa = $400;$l$2 = $395; - break; - } - } - $402 = ($l$2|0)<(0); - if ($402) { - $$0 = -1; - label = 363; - break; - } else { - $1181 = $1180;$1182 = $1179;$i$0$lcssa273 = $i$0$lcssa; - label = 102; - } - } - if ((label|0) == 89) { - label = 0; - $364 = ($p$2|0)>(-1); - $365 = $fl$4 & -65537; - $$fl$4 = $364 ? $365 : $fl$4; - $367 = ($366|0)!=(0); - $369 = ($368|0)!=(0); - $370 = $367 | $369; - $371 = ($p$2|0)!=(0); - $or$cond = $370 | $371; - if ($or$cond) { - $372 = $a$0; - $373 = (($3) - ($372))|0; - $374 = $370&1; - $375 = $374 ^ 1; - $376 = (($375) + ($373))|0; - $377 = ($p$2|0)>($376|0); - $p$2$ = $377 ? $p$2 : $376; - $1175 = $368;$1176 = $366;$a$2 = $a$0;$fl$6 = $$fl$4;$p$5 = $p$2$;$pl$2 = $pl$1;$prefix$2 = $prefix$1;$z$2 = $2; - } else { - $1175 = $368;$1176 = $366;$a$2 = $2;$fl$6 = $$fl$4;$p$5 = 0;$pl$2 = $pl$1;$prefix$2 = $prefix$1;$z$2 = $2; - } - } - else if ((label|0) == 102) { - label = 0; - $403 = $fl$1$ & 73728; - $404 = ($403|0)==(0); - $405 = ($w$1|0)>($i$0$lcssa273|0); - $or$cond$i64 = $404 & $405; - if ($or$cond$i64) { - $406 = (($w$1) - ($i$0$lcssa273))|0; - $407 = ($406>>>0)>(256); - $408 = $407 ? 256 : $406; - _memset(($pad$i|0),32,($408|0))|0; - $409 = ($406>>>0)>(255); - if ($409) { - $$01$i66 = $406; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $410 = (($$01$i66) + -256)|0; - $411 = ($410>>>0)>(255); - if ($411) { - $$01$i66 = $410; - } else { - break; - } - } - $412 = $406 & 255; - $$0$lcssa$i68 = $412; - } else { - $$0$lcssa$i68 = $406; - } - (___fwritex($pad$i,$$0$lcssa$i68,$f)|0); - } - $413 = ($i$0$lcssa273|0)==(0); - L465: do { - if (!($413)) { - $i$1186 = 0;$ws$1187 = $1182; - while(1) { - $414 = HEAP32[$ws$1187>>2]|0; - $415 = ($414|0)==(0); - if ($415) { - break L465; - } - $416 = (_wctomb($mb,$414)|0); - $417 = (($416) + ($i$1186))|0; - $418 = ($417|0)>($i$0$lcssa273|0); - if ($418) { - break L465; - } - $419 = ((($ws$1187)) + 4|0); - (___fwritex($mb,$416,$f)|0); - $420 = ($417>>>0)<($i$0$lcssa273>>>0); - if ($420) { - $i$1186 = $417;$ws$1187 = $419; - } else { - break; - } - } - } - } while(0); - $421 = ($403|0)==(8192); - $or$cond$i71 = $421 & $405; - if ($or$cond$i71) { - $422 = (($w$1) - ($i$0$lcssa273))|0; - $423 = ($422>>>0)>(256); - $424 = $423 ? 256 : $422; - _memset(($pad$i|0),32,($424|0))|0; - $425 = ($422>>>0)>(255); - if ($425) { - $$01$i73 = $422; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $426 = (($$01$i73) + -256)|0; - $427 = ($426>>>0)>(255); - if ($427) { - $$01$i73 = $426; - } else { - break; - } - } - $428 = $422 & 255; - $$0$lcssa$i75 = $428; - } else { - $$0$lcssa$i75 = $422; - } - (___fwritex($pad$i,$$0$lcssa$i75,$f)|0); - } - $429 = $405 ? $w$1 : $i$0$lcssa273; - $1169 = $291;$1170 = $1181;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $429;$l10n$0 = $l10n$3; - continue; - } - $1001 = $z$2; - $1002 = $a$2; - $1003 = (($1001) - ($1002))|0; - $1004 = ($p$5|0)<($1003|0); - $$p$5 = $1004 ? $1003 : $p$5; - $1005 = (($pl$2) + ($$p$5))|0; - $1006 = ($w$1|0)<($1005|0); - $w$2 = $1006 ? $1005 : $w$1; - $1007 = $fl$6 & 73728; - $1008 = ($1007|0)==(0); - $1009 = ($w$2|0)>($1005|0); - $or$cond$i81 = $1008 & $1009; - if ($or$cond$i81) { - $1010 = (($w$2) - ($1005))|0; - $1011 = ($1010>>>0)>(256); - $1012 = $1011 ? 256 : $1010; - _memset(($pad$i|0),32,($1012|0))|0; - $1013 = ($1010>>>0)>(255); - if ($1013) { - $$01$i83 = $1010; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $1014 = (($$01$i83) + -256)|0; - $1015 = ($1014>>>0)>(255); - if ($1015) { - $$01$i83 = $1014; - } else { - break; - } - } - $1016 = $1010 & 255; - $$0$lcssa$i85 = $1016; - } else { - $$0$lcssa$i85 = $1010; - } - (___fwritex($pad$i,$$0$lcssa$i85,$f)|0); - } - (___fwritex($prefix$2,$pl$2,$f)|0); - $1017 = ($1007|0)==(65536); - $or$cond$i57 = $1017 & $1009; - if ($or$cond$i57) { - $1018 = (($w$2) - ($1005))|0; - $1019 = ($1018>>>0)>(256); - $1020 = $1019 ? 256 : $1018; - _memset(($pad$i|0),48,($1020|0))|0; - $1021 = ($1018>>>0)>(255); - if ($1021) { - $$01$i59 = $1018; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $1022 = (($$01$i59) + -256)|0; - $1023 = ($1022>>>0)>(255); - if ($1023) { - $$01$i59 = $1022; - } else { - break; - } - } - $1024 = $1018 & 255; - $$0$lcssa$i61 = $1024; - } else { - $$0$lcssa$i61 = $1018; - } - (___fwritex($pad$i,$$0$lcssa$i61,$f)|0); - } - $1025 = ($$p$5|0)>($1003|0); - if ($1025) { - $1026 = (($$p$5) - ($1003))|0; - $1027 = ($1026>>>0)>(256); - $1028 = $1027 ? 256 : $1026; - _memset(($pad$i|0),48,($1028|0))|0; - $1029 = ($1026>>>0)>(255); - if ($1029) { - $$01$i44 = $1026; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $1030 = (($$01$i44) + -256)|0; - $1031 = ($1030>>>0)>(255); - if ($1031) { - $$01$i44 = $1030; - } else { - break; - } - } - $1032 = $1026 & 255; - $$0$lcssa$i46 = $1032; - } else { - $$0$lcssa$i46 = $1026; - } - (___fwritex($pad$i,$$0$lcssa$i46,$f)|0); - } - (___fwritex($a$2,$1003,$f)|0); - $1033 = ($1007|0)==(8192); - $or$cond$i = $1033 & $1009; - if ($or$cond$i) { - $1034 = (($w$2) - ($1005))|0; - $1035 = ($1034>>>0)>(256); - $1036 = $1035 ? 256 : $1034; - _memset(($pad$i|0),32,($1036|0))|0; - $1037 = ($1034>>>0)>(255); - if ($1037) { - $$01$i = $1034; - while(1) { - (___fwritex($pad$i,256,$f)|0); - $1038 = (($$01$i) + -256)|0; - $1039 = ($1038>>>0)>(255); - if ($1039) { - $$01$i = $1038; - } else { - break; - } - } - $1040 = $1034 & 255; - $$0$lcssa$i = $1040; - } else { - $$0$lcssa$i = $1034; - } - (___fwritex($pad$i,$$0$lcssa$i,$f)|0); - } - $1169 = $1175;$1170 = $1176;$23 = $$lcssa457;$cnt$0 = $cnt$1;$l$0 = $w$2;$l10n$0 = $l10n$3; - } - if ((label|0) == 344) { - $1041 = ($f|0)==(0|0); - if (!($1041)) { - $$0 = $cnt$1$lcssa; - STACKTOP = sp;return ($$0|0); - } - $1042 = ($l10n$0$lcssa|0)==(0); - if ($1042) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } else { - $i$2162 = 1; - } - while(1) { - $1043 = (($nl_type) + ($i$2162<<2)|0); - $1044 = HEAP32[$1043>>2]|0; - $1045 = ($1044|0)==(0); - if ($1045) { - $i$2162$lcssa = $i$2162; - break; - } - $1047 = (($nl_arg) + ($i$2162<<3)|0); - $1048 = ($1044>>>0)>(20); - L530: do { - if (!($1048)) { - do { - switch ($1044|0) { - case 9: { - $arglist_current35 = HEAP32[$ap>>2]|0; - $1049 = $arglist_current35; - $1050 = ((0) + 4|0); - $expanded148 = $1050; - $expanded147 = (($expanded148) - 1)|0; - $1051 = (($1049) + ($expanded147))|0; - $1052 = ((0) + 4|0); - $expanded152 = $1052; - $expanded151 = (($expanded152) - 1)|0; - $expanded150 = $expanded151 ^ -1; - $1053 = $1051 & $expanded150; - $1054 = $1053; - $1055 = HEAP32[$1054>>2]|0; - $arglist_next36 = ((($1054)) + 4|0); - HEAP32[$ap>>2] = $arglist_next36; - HEAP32[$1047>>2] = $1055; - break L530; - break; - } - case 10: { - $arglist_current38 = HEAP32[$ap>>2]|0; - $1056 = $arglist_current38; - $1057 = ((0) + 4|0); - $expanded155 = $1057; - $expanded154 = (($expanded155) - 1)|0; - $1058 = (($1056) + ($expanded154))|0; - $1059 = ((0) + 4|0); - $expanded159 = $1059; - $expanded158 = (($expanded159) - 1)|0; - $expanded157 = $expanded158 ^ -1; - $1060 = $1058 & $expanded157; - $1061 = $1060; - $1062 = HEAP32[$1061>>2]|0; - $arglist_next39 = ((($1061)) + 4|0); - HEAP32[$ap>>2] = $arglist_next39; - $1063 = ($1062|0)<(0); - $1064 = $1063 << 31 >> 31; - $1065 = $1047; - $1066 = $1065; - HEAP32[$1066>>2] = $1062; - $1067 = (($1065) + 4)|0; - $1068 = $1067; - HEAP32[$1068>>2] = $1064; - break L530; - break; - } - case 11: { - $arglist_current41 = HEAP32[$ap>>2]|0; - $1069 = $arglist_current41; - $1070 = ((0) + 4|0); - $expanded162 = $1070; - $expanded161 = (($expanded162) - 1)|0; - $1071 = (($1069) + ($expanded161))|0; - $1072 = ((0) + 4|0); - $expanded166 = $1072; - $expanded165 = (($expanded166) - 1)|0; - $expanded164 = $expanded165 ^ -1; - $1073 = $1071 & $expanded164; - $1074 = $1073; - $1075 = HEAP32[$1074>>2]|0; - $arglist_next42 = ((($1074)) + 4|0); - HEAP32[$ap>>2] = $arglist_next42; - $1076 = $1047; - $1077 = $1076; - HEAP32[$1077>>2] = $1075; - $1078 = (($1076) + 4)|0; - $1079 = $1078; - HEAP32[$1079>>2] = 0; - break L530; - break; - } - case 12: { - $arglist_current44 = HEAP32[$ap>>2]|0; - $1080 = $arglist_current44; - $1081 = ((0) + 8|0); - $expanded169 = $1081; - $expanded168 = (($expanded169) - 1)|0; - $1082 = (($1080) + ($expanded168))|0; - $1083 = ((0) + 8|0); - $expanded173 = $1083; - $expanded172 = (($expanded173) - 1)|0; - $expanded171 = $expanded172 ^ -1; - $1084 = $1082 & $expanded171; - $1085 = $1084; - $1086 = $1085; - $1087 = $1086; - $1088 = HEAP32[$1087>>2]|0; - $1089 = (($1086) + 4)|0; - $1090 = $1089; - $1091 = HEAP32[$1090>>2]|0; - $arglist_next45 = ((($1085)) + 8|0); - HEAP32[$ap>>2] = $arglist_next45; - $1092 = $1047; - $1093 = $1092; - HEAP32[$1093>>2] = $1088; - $1094 = (($1092) + 4)|0; - $1095 = $1094; - HEAP32[$1095>>2] = $1091; - break L530; - break; - } - case 13: { - $arglist_current47 = HEAP32[$ap>>2]|0; - $1096 = $arglist_current47; - $1097 = ((0) + 4|0); - $expanded176 = $1097; - $expanded175 = (($expanded176) - 1)|0; - $1098 = (($1096) + ($expanded175))|0; - $1099 = ((0) + 4|0); - $expanded180 = $1099; - $expanded179 = (($expanded180) - 1)|0; - $expanded178 = $expanded179 ^ -1; - $1100 = $1098 & $expanded178; - $1101 = $1100; - $1102 = HEAP32[$1101>>2]|0; - $arglist_next48 = ((($1101)) + 4|0); - HEAP32[$ap>>2] = $arglist_next48; - $1103 = $1102&65535; - $1104 = $1103 << 16 >> 16; - $1105 = ($1104|0)<(0); - $1106 = $1105 << 31 >> 31; - $1107 = $1047; - $1108 = $1107; - HEAP32[$1108>>2] = $1104; - $1109 = (($1107) + 4)|0; - $1110 = $1109; - HEAP32[$1110>>2] = $1106; - break L530; - break; - } - case 14: { - $arglist_current50 = HEAP32[$ap>>2]|0; - $1111 = $arglist_current50; - $1112 = ((0) + 4|0); - $expanded183 = $1112; - $expanded182 = (($expanded183) - 1)|0; - $1113 = (($1111) + ($expanded182))|0; - $1114 = ((0) + 4|0); - $expanded187 = $1114; - $expanded186 = (($expanded187) - 1)|0; - $expanded185 = $expanded186 ^ -1; - $1115 = $1113 & $expanded185; - $1116 = $1115; - $1117 = HEAP32[$1116>>2]|0; - $arglist_next51 = ((($1116)) + 4|0); - HEAP32[$ap>>2] = $arglist_next51; - $$mask1$i = $1117 & 65535; - $1118 = $1047; - $1119 = $1118; - HEAP32[$1119>>2] = $$mask1$i; - $1120 = (($1118) + 4)|0; - $1121 = $1120; - HEAP32[$1121>>2] = 0; - break L530; - break; - } - case 15: { - $arglist_current53 = HEAP32[$ap>>2]|0; - $1122 = $arglist_current53; - $1123 = ((0) + 4|0); - $expanded190 = $1123; - $expanded189 = (($expanded190) - 1)|0; - $1124 = (($1122) + ($expanded189))|0; - $1125 = ((0) + 4|0); - $expanded194 = $1125; - $expanded193 = (($expanded194) - 1)|0; - $expanded192 = $expanded193 ^ -1; - $1126 = $1124 & $expanded192; - $1127 = $1126; - $1128 = HEAP32[$1127>>2]|0; - $arglist_next54 = ((($1127)) + 4|0); - HEAP32[$ap>>2] = $arglist_next54; - $1129 = $1128&255; - $1130 = $1129 << 24 >> 24; - $1131 = ($1130|0)<(0); - $1132 = $1131 << 31 >> 31; - $1133 = $1047; - $1134 = $1133; - HEAP32[$1134>>2] = $1130; - $1135 = (($1133) + 4)|0; - $1136 = $1135; - HEAP32[$1136>>2] = $1132; - break L530; - break; - } - case 16: { - $arglist_current56 = HEAP32[$ap>>2]|0; - $1137 = $arglist_current56; - $1138 = ((0) + 4|0); - $expanded197 = $1138; - $expanded196 = (($expanded197) - 1)|0; - $1139 = (($1137) + ($expanded196))|0; - $1140 = ((0) + 4|0); - $expanded201 = $1140; - $expanded200 = (($expanded201) - 1)|0; - $expanded199 = $expanded200 ^ -1; - $1141 = $1139 & $expanded199; - $1142 = $1141; - $1143 = HEAP32[$1142>>2]|0; - $arglist_next57 = ((($1142)) + 4|0); - HEAP32[$ap>>2] = $arglist_next57; - $$mask$i = $1143 & 255; - $1144 = $1047; - $1145 = $1144; - HEAP32[$1145>>2] = $$mask$i; - $1146 = (($1144) + 4)|0; - $1147 = $1146; - HEAP32[$1147>>2] = 0; - break L530; - break; - } - case 17: { - $arglist_current59 = HEAP32[$ap>>2]|0; - $1148 = $arglist_current59; - $1149 = ((0) + 8|0); - $expanded204 = $1149; - $expanded203 = (($expanded204) - 1)|0; - $1150 = (($1148) + ($expanded203))|0; - $1151 = ((0) + 8|0); - $expanded208 = $1151; - $expanded207 = (($expanded208) - 1)|0; - $expanded206 = $expanded207 ^ -1; - $1152 = $1150 & $expanded206; - $1153 = $1152; - $1154 = +HEAPF64[$1153>>3]; - $arglist_next60 = ((($1153)) + 8|0); - HEAP32[$ap>>2] = $arglist_next60; - HEAPF64[$1047>>3] = $1154; - break L530; - break; - } - case 18: { - $arglist_current62 = HEAP32[$ap>>2]|0; - $1155 = $arglist_current62; - $1156 = ((0) + 8|0); - $expanded211 = $1156; - $expanded210 = (($expanded211) - 1)|0; - $1157 = (($1155) + ($expanded210))|0; - $1158 = ((0) + 8|0); - $expanded215 = $1158; - $expanded214 = (($expanded215) - 1)|0; - $expanded213 = $expanded214 ^ -1; - $1159 = $1157 & $expanded213; - $1160 = $1159; - $1161 = +HEAPF64[$1160>>3]; - $arglist_next63 = ((($1160)) + 8|0); - HEAP32[$ap>>2] = $arglist_next63; - HEAPF64[$1047>>3] = $1161; - break L530; - break; - } - default: { - break L530; - } - } - } while(0); - } - } while(0); - $1162 = (($i$2162) + 1)|0; - $1163 = ($1162|0)<(10); - if ($1163) { - $i$2162 = $1162; - } else { - $$0 = 1; - label = 363; - break; - } - } - if ((label|0) == 363) { - STACKTOP = sp;return ($$0|0); - } - $1046 = ($i$2162$lcssa|0)<(10); - if ($1046) { - $i$3160 = $i$2162$lcssa; - } else { - $$0 = 1; - STACKTOP = sp;return ($$0|0); - } - while(1) { - $1166 = (($nl_type) + ($i$3160<<2)|0); - $1167 = HEAP32[$1166>>2]|0; - $1168 = ($1167|0)==(0); - $1164 = (($i$3160) + 1)|0; - if (!($1168)) { - $$0 = -1; - label = 363; - break; - } - $1165 = ($1164|0)<(10); - if ($1165) { - $i$3160 = $1164; - } else { - $$0 = 1; - label = 363; - break; - } - } - if ((label|0) == 363) { - STACKTOP = sp;return ($$0|0); - } - } - else if ((label|0) == 363) { - STACKTOP = sp;return ($$0|0); - } - return (0)|0; -} -function _sn_write($f,$s,$l) { - $f = $f|0; - $s = $s|0; - $l = $l|0; - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $l$ = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ((($f)) + 16|0); - $1 = HEAP32[$0>>2]|0; - $2 = ((($f)) + 20|0); - $3 = HEAP32[$2>>2]|0; - $4 = $1; - $5 = $3; - $6 = (($4) - ($5))|0; - $7 = ($6>>>0)>($l>>>0); - $l$ = $7 ? $l : $6; - _memcpy(($3|0),($s|0),($l$|0))|0; - $8 = HEAP32[$2>>2]|0; - $9 = (($8) + ($l$)|0); - HEAP32[$2>>2] = $9; - return ($l|0); -} -function _malloc($bytes) { - $bytes = $bytes|0; - var $$3$i = 0, $$lcssa = 0, $$lcssa211 = 0, $$lcssa215 = 0, $$lcssa216 = 0, $$lcssa217 = 0, $$lcssa219 = 0, $$lcssa222 = 0, $$lcssa224 = 0, $$lcssa226 = 0, $$lcssa228 = 0, $$lcssa230 = 0, $$lcssa232 = 0, $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i22$i = 0, $$pre$i25 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i23$iZ2D = 0; - var $$pre$phi$i26Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phi58$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre105 = 0, $$pre106 = 0, $$pre14$i$i = 0, $$pre43$i = 0, $$pre56$i$i = 0, $$pre57$i$i = 0, $$pre8$i = 0, $$rsize$0$i = 0, $$rsize$3$i = 0, $$sum = 0, $$sum$i$i = 0, $$sum$i$i$i = 0, $$sum$i13$i = 0, $$sum$i14$i = 0, $$sum$i17$i = 0, $$sum$i19$i = 0; - var $$sum$i2334 = 0, $$sum$i32 = 0, $$sum$i35 = 0, $$sum1 = 0, $$sum1$i = 0, $$sum1$i$i = 0, $$sum1$i15$i = 0, $$sum1$i20$i = 0, $$sum1$i24 = 0, $$sum10 = 0, $$sum10$i = 0, $$sum10$i$i = 0, $$sum11$i = 0, $$sum11$i$i = 0, $$sum1112 = 0, $$sum112$i = 0, $$sum113$i = 0, $$sum114$i = 0, $$sum115$i = 0, $$sum116$i = 0; - var $$sum117$i = 0, $$sum118$i = 0, $$sum119$i = 0, $$sum12$i = 0, $$sum12$i$i = 0, $$sum120$i = 0, $$sum121$i = 0, $$sum122$i = 0, $$sum123$i = 0, $$sum124$i = 0, $$sum125$i = 0, $$sum13$i = 0, $$sum13$i$i = 0, $$sum14$i$i = 0, $$sum15$i = 0, $$sum15$i$i = 0, $$sum16$i = 0, $$sum16$i$i = 0, $$sum17$i = 0, $$sum17$i$i = 0; - var $$sum18$i = 0, $$sum1819$i$i = 0, $$sum2 = 0, $$sum2$i = 0, $$sum2$i$i = 0, $$sum2$i$i$i = 0, $$sum2$i16$i = 0, $$sum2$i18$i = 0, $$sum2$i21$i = 0, $$sum20$i$i = 0, $$sum21$i$i = 0, $$sum22$i$i = 0, $$sum23$i$i = 0, $$sum24$i$i = 0, $$sum25$i$i = 0, $$sum27$i$i = 0, $$sum28$i$i = 0, $$sum29$i$i = 0, $$sum3$i = 0, $$sum3$i27 = 0; - var $$sum30$i$i = 0, $$sum3132$i$i = 0, $$sum34$i$i = 0, $$sum3536$i$i = 0, $$sum3738$i$i = 0, $$sum39$i$i = 0, $$sum4 = 0, $$sum4$i = 0, $$sum4$i$i = 0, $$sum4$i28 = 0, $$sum40$i$i = 0, $$sum41$i$i = 0, $$sum42$i$i = 0, $$sum5$i = 0, $$sum5$i$i = 0, $$sum56 = 0, $$sum6$i = 0, $$sum67$i$i = 0, $$sum7$i = 0, $$sum8$i = 0; - var $$sum9 = 0, $$sum9$i = 0, $$sum9$i$i = 0, $$tsize$1$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0; - var $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0; - var $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0; - var $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0; - var $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0; - var $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0; - var $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0; - var $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0; - var $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0; - var $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0; - var $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0; - var $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0; - var $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0; - var $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0; - var $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0; - var $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0; - var $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0; - var $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0; - var $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0; - var $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0; - var $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0; - var $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0; - var $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0; - var $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0; - var $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0; - var $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0; - var $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0; - var $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0; - var $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0; - var $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0; - var $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0; - var $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0; - var $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0; - var $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0; - var $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0; - var $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0; - var $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0; - var $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0; - var $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0; - var $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0; - var $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0; - var $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0; - var $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0; - var $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0; - var $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0; - var $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0; - var $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0; - var $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0; - var $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0; - var $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0; - var $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0; - var $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0; - var $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0; - var $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0; - var $F5$0$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$029$i = 0, $K2$07$i$i = 0, $K8$051$i$i = 0, $R$0$i = 0, $R$0$i$i = 0, $R$0$i$i$lcssa = 0, $R$0$i$lcssa = 0, $R$0$i18 = 0, $R$0$i18$lcssa = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i20 = 0, $RP$0$i = 0, $RP$0$i$i = 0, $RP$0$i$i$lcssa = 0, $RP$0$i$lcssa = 0; - var $RP$0$i17 = 0, $RP$0$i17$lcssa = 0, $T$0$lcssa$i = 0, $T$0$lcssa$i$i = 0, $T$0$lcssa$i25$i = 0, $T$028$i = 0, $T$028$i$lcssa = 0, $T$050$i$i = 0, $T$050$i$i$lcssa = 0, $T$06$i$i = 0, $T$06$i$i$lcssa = 0, $br$0$ph$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i21 = 0, $exitcond$i$i = 0, $i$02$i$i = 0, $idx$0$i = 0, $mem$0 = 0, $nb$0 = 0; - var $not$$i = 0, $not$$i$i = 0, $not$$i26$i = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i30 = 0, $or$cond1$i = 0, $or$cond19$i = 0, $or$cond2$i = 0, $or$cond3$i = 0, $or$cond5$i = 0, $or$cond57$i = 0, $or$cond6$i = 0, $or$cond8$i = 0, $or$cond9$i = 0, $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i$lcssa = 0, $rsize$0$i15 = 0, $rsize$1$i = 0; - var $rsize$2$i = 0, $rsize$3$lcssa$i = 0, $rsize$331$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$084$i = 0, $sp$084$i$lcssa = 0, $sp$183$i = 0, $sp$183$i$lcssa = 0, $ssize$0$$i = 0, $ssize$0$i = 0, $ssize$1$ph$i = 0, $ssize$2$i = 0, $t$0$i = 0, $t$0$i14 = 0, $t$1$i = 0, $t$2$ph$i = 0; - var $t$2$v$3$i = 0, $t$230$i = 0, $tbase$255$i = 0, $tsize$0$ph$i = 0, $tsize$0323944$i = 0, $tsize$1$i = 0, $tsize$254$i = 0, $v$0$i = 0, $v$0$i$lcssa = 0, $v$0$i16 = 0, $v$1$i = 0, $v$2$i = 0, $v$3$lcssa$i = 0, $v$3$ph$i = 0, $v$332$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($bytes>>>0)<(245); - do { - if ($0) { - $1 = ($bytes>>>0)<(11); - $2 = (($bytes) + 11)|0; - $3 = $2 & -8; - $4 = $1 ? 16 : $3; - $5 = $4 >>> 3; - $6 = HEAP32[96488>>2]|0; - $7 = $6 >>> $5; - $8 = $7 & 3; - $9 = ($8|0)==(0); - if (!($9)) { - $10 = $7 & 1; - $11 = $10 ^ 1; - $12 = (($11) + ($5))|0; - $13 = $12 << 1; - $14 = (96528 + ($13<<2)|0); - $$sum10 = (($13) + 2)|0; - $15 = (96528 + ($$sum10<<2)|0); - $16 = HEAP32[$15>>2]|0; - $17 = ((($16)) + 8|0); - $18 = HEAP32[$17>>2]|0; - $19 = ($14|0)==($18|0); - do { - if ($19) { - $20 = 1 << $12; - $21 = $20 ^ -1; - $22 = $6 & $21; - HEAP32[96488>>2] = $22; - } else { - $23 = HEAP32[(96504)>>2]|0; - $24 = ($18>>>0)<($23>>>0); - if ($24) { - _abort(); - // unreachable; - } - $25 = ((($18)) + 12|0); - $26 = HEAP32[$25>>2]|0; - $27 = ($26|0)==($16|0); - if ($27) { - HEAP32[$25>>2] = $14; - HEAP32[$15>>2] = $18; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $28 = $12 << 3; - $29 = $28 | 3; - $30 = ((($16)) + 4|0); - HEAP32[$30>>2] = $29; - $$sum1112 = $28 | 4; - $31 = (($16) + ($$sum1112)|0); - $32 = HEAP32[$31>>2]|0; - $33 = $32 | 1; - HEAP32[$31>>2] = $33; - $mem$0 = $17; - return ($mem$0|0); - } - $34 = HEAP32[(96496)>>2]|0; - $35 = ($4>>>0)>($34>>>0); - if ($35) { - $36 = ($7|0)==(0); - if (!($36)) { - $37 = $7 << $5; - $38 = 2 << $5; - $39 = (0 - ($38))|0; - $40 = $38 | $39; - $41 = $37 & $40; - $42 = (0 - ($41))|0; - $43 = $41 & $42; - $44 = (($43) + -1)|0; - $45 = $44 >>> 12; - $46 = $45 & 16; - $47 = $44 >>> $46; - $48 = $47 >>> 5; - $49 = $48 & 8; - $50 = $49 | $46; - $51 = $47 >>> $49; - $52 = $51 >>> 2; - $53 = $52 & 4; - $54 = $50 | $53; - $55 = $51 >>> $53; - $56 = $55 >>> 1; - $57 = $56 & 2; - $58 = $54 | $57; - $59 = $55 >>> $57; - $60 = $59 >>> 1; - $61 = $60 & 1; - $62 = $58 | $61; - $63 = $59 >>> $61; - $64 = (($62) + ($63))|0; - $65 = $64 << 1; - $66 = (96528 + ($65<<2)|0); - $$sum4 = (($65) + 2)|0; - $67 = (96528 + ($$sum4<<2)|0); - $68 = HEAP32[$67>>2]|0; - $69 = ((($68)) + 8|0); - $70 = HEAP32[$69>>2]|0; - $71 = ($66|0)==($70|0); - do { - if ($71) { - $72 = 1 << $64; - $73 = $72 ^ -1; - $74 = $6 & $73; - HEAP32[96488>>2] = $74; - $88 = $34; - } else { - $75 = HEAP32[(96504)>>2]|0; - $76 = ($70>>>0)<($75>>>0); - if ($76) { - _abort(); - // unreachable; - } - $77 = ((($70)) + 12|0); - $78 = HEAP32[$77>>2]|0; - $79 = ($78|0)==($68|0); - if ($79) { - HEAP32[$77>>2] = $66; - HEAP32[$67>>2] = $70; - $$pre = HEAP32[(96496)>>2]|0; - $88 = $$pre; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $80 = $64 << 3; - $81 = (($80) - ($4))|0; - $82 = $4 | 3; - $83 = ((($68)) + 4|0); - HEAP32[$83>>2] = $82; - $84 = (($68) + ($4)|0); - $85 = $81 | 1; - $$sum56 = $4 | 4; - $86 = (($68) + ($$sum56)|0); - HEAP32[$86>>2] = $85; - $87 = (($68) + ($80)|0); - HEAP32[$87>>2] = $81; - $89 = ($88|0)==(0); - if (!($89)) { - $90 = HEAP32[(96508)>>2]|0; - $91 = $88 >>> 3; - $92 = $91 << 1; - $93 = (96528 + ($92<<2)|0); - $94 = HEAP32[96488>>2]|0; - $95 = 1 << $91; - $96 = $94 & $95; - $97 = ($96|0)==(0); - if ($97) { - $98 = $94 | $95; - HEAP32[96488>>2] = $98; - $$pre105 = (($92) + 2)|0; - $$pre106 = (96528 + ($$pre105<<2)|0); - $$pre$phiZ2D = $$pre106;$F4$0 = $93; - } else { - $$sum9 = (($92) + 2)|0; - $99 = (96528 + ($$sum9<<2)|0); - $100 = HEAP32[$99>>2]|0; - $101 = HEAP32[(96504)>>2]|0; - $102 = ($100>>>0)<($101>>>0); - if ($102) { - _abort(); - // unreachable; - } else { - $$pre$phiZ2D = $99;$F4$0 = $100; - } - } - HEAP32[$$pre$phiZ2D>>2] = $90; - $103 = ((($F4$0)) + 12|0); - HEAP32[$103>>2] = $90; - $104 = ((($90)) + 8|0); - HEAP32[$104>>2] = $F4$0; - $105 = ((($90)) + 12|0); - HEAP32[$105>>2] = $93; - } - HEAP32[(96496)>>2] = $81; - HEAP32[(96508)>>2] = $84; - $mem$0 = $69; - return ($mem$0|0); - } - $106 = HEAP32[(96492)>>2]|0; - $107 = ($106|0)==(0); - if ($107) { - $nb$0 = $4; - } else { - $108 = (0 - ($106))|0; - $109 = $106 & $108; - $110 = (($109) + -1)|0; - $111 = $110 >>> 12; - $112 = $111 & 16; - $113 = $110 >>> $112; - $114 = $113 >>> 5; - $115 = $114 & 8; - $116 = $115 | $112; - $117 = $113 >>> $115; - $118 = $117 >>> 2; - $119 = $118 & 4; - $120 = $116 | $119; - $121 = $117 >>> $119; - $122 = $121 >>> 1; - $123 = $122 & 2; - $124 = $120 | $123; - $125 = $121 >>> $123; - $126 = $125 >>> 1; - $127 = $126 & 1; - $128 = $124 | $127; - $129 = $125 >>> $127; - $130 = (($128) + ($129))|0; - $131 = (96792 + ($130<<2)|0); - $132 = HEAP32[$131>>2]|0; - $133 = ((($132)) + 4|0); - $134 = HEAP32[$133>>2]|0; - $135 = $134 & -8; - $136 = (($135) - ($4))|0; - $rsize$0$i = $136;$t$0$i = $132;$v$0$i = $132; - while(1) { - $137 = ((($t$0$i)) + 16|0); - $138 = HEAP32[$137>>2]|0; - $139 = ($138|0)==(0|0); - if ($139) { - $140 = ((($t$0$i)) + 20|0); - $141 = HEAP32[$140>>2]|0; - $142 = ($141|0)==(0|0); - if ($142) { - $rsize$0$i$lcssa = $rsize$0$i;$v$0$i$lcssa = $v$0$i; - break; - } else { - $144 = $141; - } - } else { - $144 = $138; - } - $143 = ((($144)) + 4|0); - $145 = HEAP32[$143>>2]|0; - $146 = $145 & -8; - $147 = (($146) - ($4))|0; - $148 = ($147>>>0)<($rsize$0$i>>>0); - $$rsize$0$i = $148 ? $147 : $rsize$0$i; - $$v$0$i = $148 ? $144 : $v$0$i; - $rsize$0$i = $$rsize$0$i;$t$0$i = $144;$v$0$i = $$v$0$i; - } - $149 = HEAP32[(96504)>>2]|0; - $150 = ($v$0$i$lcssa>>>0)<($149>>>0); - if ($150) { - _abort(); - // unreachable; - } - $151 = (($v$0$i$lcssa) + ($4)|0); - $152 = ($v$0$i$lcssa>>>0)<($151>>>0); - if (!($152)) { - _abort(); - // unreachable; - } - $153 = ((($v$0$i$lcssa)) + 24|0); - $154 = HEAP32[$153>>2]|0; - $155 = ((($v$0$i$lcssa)) + 12|0); - $156 = HEAP32[$155>>2]|0; - $157 = ($156|0)==($v$0$i$lcssa|0); - do { - if ($157) { - $167 = ((($v$0$i$lcssa)) + 20|0); - $168 = HEAP32[$167>>2]|0; - $169 = ($168|0)==(0|0); - if ($169) { - $170 = ((($v$0$i$lcssa)) + 16|0); - $171 = HEAP32[$170>>2]|0; - $172 = ($171|0)==(0|0); - if ($172) { - $R$1$i = 0; - break; - } else { - $R$0$i = $171;$RP$0$i = $170; - } - } else { - $R$0$i = $168;$RP$0$i = $167; - } - while(1) { - $173 = ((($R$0$i)) + 20|0); - $174 = HEAP32[$173>>2]|0; - $175 = ($174|0)==(0|0); - if (!($175)) { - $R$0$i = $174;$RP$0$i = $173; - continue; - } - $176 = ((($R$0$i)) + 16|0); - $177 = HEAP32[$176>>2]|0; - $178 = ($177|0)==(0|0); - if ($178) { - $R$0$i$lcssa = $R$0$i;$RP$0$i$lcssa = $RP$0$i; - break; - } else { - $R$0$i = $177;$RP$0$i = $176; - } - } - $179 = ($RP$0$i$lcssa>>>0)<($149>>>0); - if ($179) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i$lcssa>>2] = 0; - $R$1$i = $R$0$i$lcssa; - break; - } - } else { - $158 = ((($v$0$i$lcssa)) + 8|0); - $159 = HEAP32[$158>>2]|0; - $160 = ($159>>>0)<($149>>>0); - if ($160) { - _abort(); - // unreachable; - } - $161 = ((($159)) + 12|0); - $162 = HEAP32[$161>>2]|0; - $163 = ($162|0)==($v$0$i$lcssa|0); - if (!($163)) { - _abort(); - // unreachable; - } - $164 = ((($156)) + 8|0); - $165 = HEAP32[$164>>2]|0; - $166 = ($165|0)==($v$0$i$lcssa|0); - if ($166) { - HEAP32[$161>>2] = $156; - HEAP32[$164>>2] = $159; - $R$1$i = $156; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $180 = ($154|0)==(0|0); - do { - if (!($180)) { - $181 = ((($v$0$i$lcssa)) + 28|0); - $182 = HEAP32[$181>>2]|0; - $183 = (96792 + ($182<<2)|0); - $184 = HEAP32[$183>>2]|0; - $185 = ($v$0$i$lcssa|0)==($184|0); - if ($185) { - HEAP32[$183>>2] = $R$1$i; - $cond$i = ($R$1$i|0)==(0|0); - if ($cond$i) { - $186 = 1 << $182; - $187 = $186 ^ -1; - $188 = HEAP32[(96492)>>2]|0; - $189 = $188 & $187; - HEAP32[(96492)>>2] = $189; - break; - } - } else { - $190 = HEAP32[(96504)>>2]|0; - $191 = ($154>>>0)<($190>>>0); - if ($191) { - _abort(); - // unreachable; - } - $192 = ((($154)) + 16|0); - $193 = HEAP32[$192>>2]|0; - $194 = ($193|0)==($v$0$i$lcssa|0); - if ($194) { - HEAP32[$192>>2] = $R$1$i; - } else { - $195 = ((($154)) + 20|0); - HEAP32[$195>>2] = $R$1$i; - } - $196 = ($R$1$i|0)==(0|0); - if ($196) { - break; - } - } - $197 = HEAP32[(96504)>>2]|0; - $198 = ($R$1$i>>>0)<($197>>>0); - if ($198) { - _abort(); - // unreachable; - } - $199 = ((($R$1$i)) + 24|0); - HEAP32[$199>>2] = $154; - $200 = ((($v$0$i$lcssa)) + 16|0); - $201 = HEAP32[$200>>2]|0; - $202 = ($201|0)==(0|0); - do { - if (!($202)) { - $203 = ($201>>>0)<($197>>>0); - if ($203) { - _abort(); - // unreachable; - } else { - $204 = ((($R$1$i)) + 16|0); - HEAP32[$204>>2] = $201; - $205 = ((($201)) + 24|0); - HEAP32[$205>>2] = $R$1$i; - break; - } - } - } while(0); - $206 = ((($v$0$i$lcssa)) + 20|0); - $207 = HEAP32[$206>>2]|0; - $208 = ($207|0)==(0|0); - if (!($208)) { - $209 = HEAP32[(96504)>>2]|0; - $210 = ($207>>>0)<($209>>>0); - if ($210) { - _abort(); - // unreachable; - } else { - $211 = ((($R$1$i)) + 20|0); - HEAP32[$211>>2] = $207; - $212 = ((($207)) + 24|0); - HEAP32[$212>>2] = $R$1$i; - break; - } - } - } - } while(0); - $213 = ($rsize$0$i$lcssa>>>0)<(16); - if ($213) { - $214 = (($rsize$0$i$lcssa) + ($4))|0; - $215 = $214 | 3; - $216 = ((($v$0$i$lcssa)) + 4|0); - HEAP32[$216>>2] = $215; - $$sum4$i = (($214) + 4)|0; - $217 = (($v$0$i$lcssa) + ($$sum4$i)|0); - $218 = HEAP32[$217>>2]|0; - $219 = $218 | 1; - HEAP32[$217>>2] = $219; - } else { - $220 = $4 | 3; - $221 = ((($v$0$i$lcssa)) + 4|0); - HEAP32[$221>>2] = $220; - $222 = $rsize$0$i$lcssa | 1; - $$sum$i35 = $4 | 4; - $223 = (($v$0$i$lcssa) + ($$sum$i35)|0); - HEAP32[$223>>2] = $222; - $$sum1$i = (($rsize$0$i$lcssa) + ($4))|0; - $224 = (($v$0$i$lcssa) + ($$sum1$i)|0); - HEAP32[$224>>2] = $rsize$0$i$lcssa; - $225 = HEAP32[(96496)>>2]|0; - $226 = ($225|0)==(0); - if (!($226)) { - $227 = HEAP32[(96508)>>2]|0; - $228 = $225 >>> 3; - $229 = $228 << 1; - $230 = (96528 + ($229<<2)|0); - $231 = HEAP32[96488>>2]|0; - $232 = 1 << $228; - $233 = $231 & $232; - $234 = ($233|0)==(0); - if ($234) { - $235 = $231 | $232; - HEAP32[96488>>2] = $235; - $$pre$i = (($229) + 2)|0; - $$pre8$i = (96528 + ($$pre$i<<2)|0); - $$pre$phi$iZ2D = $$pre8$i;$F1$0$i = $230; - } else { - $$sum3$i = (($229) + 2)|0; - $236 = (96528 + ($$sum3$i<<2)|0); - $237 = HEAP32[$236>>2]|0; - $238 = HEAP32[(96504)>>2]|0; - $239 = ($237>>>0)<($238>>>0); - if ($239) { - _abort(); - // unreachable; - } else { - $$pre$phi$iZ2D = $236;$F1$0$i = $237; - } - } - HEAP32[$$pre$phi$iZ2D>>2] = $227; - $240 = ((($F1$0$i)) + 12|0); - HEAP32[$240>>2] = $227; - $241 = ((($227)) + 8|0); - HEAP32[$241>>2] = $F1$0$i; - $242 = ((($227)) + 12|0); - HEAP32[$242>>2] = $230; - } - HEAP32[(96496)>>2] = $rsize$0$i$lcssa; - HEAP32[(96508)>>2] = $151; - } - $243 = ((($v$0$i$lcssa)) + 8|0); - $mem$0 = $243; - return ($mem$0|0); - } - } else { - $nb$0 = $4; - } - } else { - $244 = ($bytes>>>0)>(4294967231); - if ($244) { - $nb$0 = -1; - } else { - $245 = (($bytes) + 11)|0; - $246 = $245 & -8; - $247 = HEAP32[(96492)>>2]|0; - $248 = ($247|0)==(0); - if ($248) { - $nb$0 = $246; - } else { - $249 = (0 - ($246))|0; - $250 = $245 >>> 8; - $251 = ($250|0)==(0); - if ($251) { - $idx$0$i = 0; - } else { - $252 = ($246>>>0)>(16777215); - if ($252) { - $idx$0$i = 31; - } else { - $253 = (($250) + 1048320)|0; - $254 = $253 >>> 16; - $255 = $254 & 8; - $256 = $250 << $255; - $257 = (($256) + 520192)|0; - $258 = $257 >>> 16; - $259 = $258 & 4; - $260 = $259 | $255; - $261 = $256 << $259; - $262 = (($261) + 245760)|0; - $263 = $262 >>> 16; - $264 = $263 & 2; - $265 = $260 | $264; - $266 = (14 - ($265))|0; - $267 = $261 << $264; - $268 = $267 >>> 15; - $269 = (($266) + ($268))|0; - $270 = $269 << 1; - $271 = (($269) + 7)|0; - $272 = $246 >>> $271; - $273 = $272 & 1; - $274 = $273 | $270; - $idx$0$i = $274; - } - } - $275 = (96792 + ($idx$0$i<<2)|0); - $276 = HEAP32[$275>>2]|0; - $277 = ($276|0)==(0|0); - L123: do { - if ($277) { - $rsize$2$i = $249;$t$1$i = 0;$v$2$i = 0; - label = 86; - } else { - $278 = ($idx$0$i|0)==(31); - $279 = $idx$0$i >>> 1; - $280 = (25 - ($279))|0; - $281 = $278 ? 0 : $280; - $282 = $246 << $281; - $rsize$0$i15 = $249;$rst$0$i = 0;$sizebits$0$i = $282;$t$0$i14 = $276;$v$0$i16 = 0; - while(1) { - $283 = ((($t$0$i14)) + 4|0); - $284 = HEAP32[$283>>2]|0; - $285 = $284 & -8; - $286 = (($285) - ($246))|0; - $287 = ($286>>>0)<($rsize$0$i15>>>0); - if ($287) { - $288 = ($285|0)==($246|0); - if ($288) { - $rsize$331$i = $286;$t$230$i = $t$0$i14;$v$332$i = $t$0$i14; - label = 90; - break L123; - } else { - $rsize$1$i = $286;$v$1$i = $t$0$i14; - } - } else { - $rsize$1$i = $rsize$0$i15;$v$1$i = $v$0$i16; - } - $289 = ((($t$0$i14)) + 20|0); - $290 = HEAP32[$289>>2]|0; - $291 = $sizebits$0$i >>> 31; - $292 = (((($t$0$i14)) + 16|0) + ($291<<2)|0); - $293 = HEAP32[$292>>2]|0; - $294 = ($290|0)==(0|0); - $295 = ($290|0)==($293|0); - $or$cond19$i = $294 | $295; - $rst$1$i = $or$cond19$i ? $rst$0$i : $290; - $296 = ($293|0)==(0|0); - $297 = $sizebits$0$i << 1; - if ($296) { - $rsize$2$i = $rsize$1$i;$t$1$i = $rst$1$i;$v$2$i = $v$1$i; - label = 86; - break; - } else { - $rsize$0$i15 = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $297;$t$0$i14 = $293;$v$0$i16 = $v$1$i; - } - } - } - } while(0); - if ((label|0) == 86) { - $298 = ($t$1$i|0)==(0|0); - $299 = ($v$2$i|0)==(0|0); - $or$cond$i = $298 & $299; - if ($or$cond$i) { - $300 = 2 << $idx$0$i; - $301 = (0 - ($300))|0; - $302 = $300 | $301; - $303 = $247 & $302; - $304 = ($303|0)==(0); - if ($304) { - $nb$0 = $246; - break; - } - $305 = (0 - ($303))|0; - $306 = $303 & $305; - $307 = (($306) + -1)|0; - $308 = $307 >>> 12; - $309 = $308 & 16; - $310 = $307 >>> $309; - $311 = $310 >>> 5; - $312 = $311 & 8; - $313 = $312 | $309; - $314 = $310 >>> $312; - $315 = $314 >>> 2; - $316 = $315 & 4; - $317 = $313 | $316; - $318 = $314 >>> $316; - $319 = $318 >>> 1; - $320 = $319 & 2; - $321 = $317 | $320; - $322 = $318 >>> $320; - $323 = $322 >>> 1; - $324 = $323 & 1; - $325 = $321 | $324; - $326 = $322 >>> $324; - $327 = (($325) + ($326))|0; - $328 = (96792 + ($327<<2)|0); - $329 = HEAP32[$328>>2]|0; - $t$2$ph$i = $329;$v$3$ph$i = 0; - } else { - $t$2$ph$i = $t$1$i;$v$3$ph$i = $v$2$i; - } - $330 = ($t$2$ph$i|0)==(0|0); - if ($330) { - $rsize$3$lcssa$i = $rsize$2$i;$v$3$lcssa$i = $v$3$ph$i; - } else { - $rsize$331$i = $rsize$2$i;$t$230$i = $t$2$ph$i;$v$332$i = $v$3$ph$i; - label = 90; - } - } - if ((label|0) == 90) { - while(1) { - label = 0; - $331 = ((($t$230$i)) + 4|0); - $332 = HEAP32[$331>>2]|0; - $333 = $332 & -8; - $334 = (($333) - ($246))|0; - $335 = ($334>>>0)<($rsize$331$i>>>0); - $$rsize$3$i = $335 ? $334 : $rsize$331$i; - $t$2$v$3$i = $335 ? $t$230$i : $v$332$i; - $336 = ((($t$230$i)) + 16|0); - $337 = HEAP32[$336>>2]|0; - $338 = ($337|0)==(0|0); - if (!($338)) { - $rsize$331$i = $$rsize$3$i;$t$230$i = $337;$v$332$i = $t$2$v$3$i; - label = 90; - continue; - } - $339 = ((($t$230$i)) + 20|0); - $340 = HEAP32[$339>>2]|0; - $341 = ($340|0)==(0|0); - if ($341) { - $rsize$3$lcssa$i = $$rsize$3$i;$v$3$lcssa$i = $t$2$v$3$i; - break; - } else { - $rsize$331$i = $$rsize$3$i;$t$230$i = $340;$v$332$i = $t$2$v$3$i; - label = 90; - } - } - } - $342 = ($v$3$lcssa$i|0)==(0|0); - if ($342) { - $nb$0 = $246; - } else { - $343 = HEAP32[(96496)>>2]|0; - $344 = (($343) - ($246))|0; - $345 = ($rsize$3$lcssa$i>>>0)<($344>>>0); - if ($345) { - $346 = HEAP32[(96504)>>2]|0; - $347 = ($v$3$lcssa$i>>>0)<($346>>>0); - if ($347) { - _abort(); - // unreachable; - } - $348 = (($v$3$lcssa$i) + ($246)|0); - $349 = ($v$3$lcssa$i>>>0)<($348>>>0); - if (!($349)) { - _abort(); - // unreachable; - } - $350 = ((($v$3$lcssa$i)) + 24|0); - $351 = HEAP32[$350>>2]|0; - $352 = ((($v$3$lcssa$i)) + 12|0); - $353 = HEAP32[$352>>2]|0; - $354 = ($353|0)==($v$3$lcssa$i|0); - do { - if ($354) { - $364 = ((($v$3$lcssa$i)) + 20|0); - $365 = HEAP32[$364>>2]|0; - $366 = ($365|0)==(0|0); - if ($366) { - $367 = ((($v$3$lcssa$i)) + 16|0); - $368 = HEAP32[$367>>2]|0; - $369 = ($368|0)==(0|0); - if ($369) { - $R$1$i20 = 0; - break; - } else { - $R$0$i18 = $368;$RP$0$i17 = $367; - } - } else { - $R$0$i18 = $365;$RP$0$i17 = $364; - } - while(1) { - $370 = ((($R$0$i18)) + 20|0); - $371 = HEAP32[$370>>2]|0; - $372 = ($371|0)==(0|0); - if (!($372)) { - $R$0$i18 = $371;$RP$0$i17 = $370; - continue; - } - $373 = ((($R$0$i18)) + 16|0); - $374 = HEAP32[$373>>2]|0; - $375 = ($374|0)==(0|0); - if ($375) { - $R$0$i18$lcssa = $R$0$i18;$RP$0$i17$lcssa = $RP$0$i17; - break; - } else { - $R$0$i18 = $374;$RP$0$i17 = $373; - } - } - $376 = ($RP$0$i17$lcssa>>>0)<($346>>>0); - if ($376) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i17$lcssa>>2] = 0; - $R$1$i20 = $R$0$i18$lcssa; - break; - } - } else { - $355 = ((($v$3$lcssa$i)) + 8|0); - $356 = HEAP32[$355>>2]|0; - $357 = ($356>>>0)<($346>>>0); - if ($357) { - _abort(); - // unreachable; - } - $358 = ((($356)) + 12|0); - $359 = HEAP32[$358>>2]|0; - $360 = ($359|0)==($v$3$lcssa$i|0); - if (!($360)) { - _abort(); - // unreachable; - } - $361 = ((($353)) + 8|0); - $362 = HEAP32[$361>>2]|0; - $363 = ($362|0)==($v$3$lcssa$i|0); - if ($363) { - HEAP32[$358>>2] = $353; - HEAP32[$361>>2] = $356; - $R$1$i20 = $353; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $377 = ($351|0)==(0|0); - do { - if (!($377)) { - $378 = ((($v$3$lcssa$i)) + 28|0); - $379 = HEAP32[$378>>2]|0; - $380 = (96792 + ($379<<2)|0); - $381 = HEAP32[$380>>2]|0; - $382 = ($v$3$lcssa$i|0)==($381|0); - if ($382) { - HEAP32[$380>>2] = $R$1$i20; - $cond$i21 = ($R$1$i20|0)==(0|0); - if ($cond$i21) { - $383 = 1 << $379; - $384 = $383 ^ -1; - $385 = HEAP32[(96492)>>2]|0; - $386 = $385 & $384; - HEAP32[(96492)>>2] = $386; - break; - } - } else { - $387 = HEAP32[(96504)>>2]|0; - $388 = ($351>>>0)<($387>>>0); - if ($388) { - _abort(); - // unreachable; - } - $389 = ((($351)) + 16|0); - $390 = HEAP32[$389>>2]|0; - $391 = ($390|0)==($v$3$lcssa$i|0); - if ($391) { - HEAP32[$389>>2] = $R$1$i20; - } else { - $392 = ((($351)) + 20|0); - HEAP32[$392>>2] = $R$1$i20; - } - $393 = ($R$1$i20|0)==(0|0); - if ($393) { - break; - } - } - $394 = HEAP32[(96504)>>2]|0; - $395 = ($R$1$i20>>>0)<($394>>>0); - if ($395) { - _abort(); - // unreachable; - } - $396 = ((($R$1$i20)) + 24|0); - HEAP32[$396>>2] = $351; - $397 = ((($v$3$lcssa$i)) + 16|0); - $398 = HEAP32[$397>>2]|0; - $399 = ($398|0)==(0|0); - do { - if (!($399)) { - $400 = ($398>>>0)<($394>>>0); - if ($400) { - _abort(); - // unreachable; - } else { - $401 = ((($R$1$i20)) + 16|0); - HEAP32[$401>>2] = $398; - $402 = ((($398)) + 24|0); - HEAP32[$402>>2] = $R$1$i20; - break; - } - } - } while(0); - $403 = ((($v$3$lcssa$i)) + 20|0); - $404 = HEAP32[$403>>2]|0; - $405 = ($404|0)==(0|0); - if (!($405)) { - $406 = HEAP32[(96504)>>2]|0; - $407 = ($404>>>0)<($406>>>0); - if ($407) { - _abort(); - // unreachable; - } else { - $408 = ((($R$1$i20)) + 20|0); - HEAP32[$408>>2] = $404; - $409 = ((($404)) + 24|0); - HEAP32[$409>>2] = $R$1$i20; - break; - } - } - } - } while(0); - $410 = ($rsize$3$lcssa$i>>>0)<(16); - L199: do { - if ($410) { - $411 = (($rsize$3$lcssa$i) + ($246))|0; - $412 = $411 | 3; - $413 = ((($v$3$lcssa$i)) + 4|0); - HEAP32[$413>>2] = $412; - $$sum18$i = (($411) + 4)|0; - $414 = (($v$3$lcssa$i) + ($$sum18$i)|0); - $415 = HEAP32[$414>>2]|0; - $416 = $415 | 1; - HEAP32[$414>>2] = $416; - } else { - $417 = $246 | 3; - $418 = ((($v$3$lcssa$i)) + 4|0); - HEAP32[$418>>2] = $417; - $419 = $rsize$3$lcssa$i | 1; - $$sum$i2334 = $246 | 4; - $420 = (($v$3$lcssa$i) + ($$sum$i2334)|0); - HEAP32[$420>>2] = $419; - $$sum1$i24 = (($rsize$3$lcssa$i) + ($246))|0; - $421 = (($v$3$lcssa$i) + ($$sum1$i24)|0); - HEAP32[$421>>2] = $rsize$3$lcssa$i; - $422 = $rsize$3$lcssa$i >>> 3; - $423 = ($rsize$3$lcssa$i>>>0)<(256); - if ($423) { - $424 = $422 << 1; - $425 = (96528 + ($424<<2)|0); - $426 = HEAP32[96488>>2]|0; - $427 = 1 << $422; - $428 = $426 & $427; - $429 = ($428|0)==(0); - if ($429) { - $430 = $426 | $427; - HEAP32[96488>>2] = $430; - $$pre$i25 = (($424) + 2)|0; - $$pre43$i = (96528 + ($$pre$i25<<2)|0); - $$pre$phi$i26Z2D = $$pre43$i;$F5$0$i = $425; - } else { - $$sum17$i = (($424) + 2)|0; - $431 = (96528 + ($$sum17$i<<2)|0); - $432 = HEAP32[$431>>2]|0; - $433 = HEAP32[(96504)>>2]|0; - $434 = ($432>>>0)<($433>>>0); - if ($434) { - _abort(); - // unreachable; - } else { - $$pre$phi$i26Z2D = $431;$F5$0$i = $432; - } - } - HEAP32[$$pre$phi$i26Z2D>>2] = $348; - $435 = ((($F5$0$i)) + 12|0); - HEAP32[$435>>2] = $348; - $$sum15$i = (($246) + 8)|0; - $436 = (($v$3$lcssa$i) + ($$sum15$i)|0); - HEAP32[$436>>2] = $F5$0$i; - $$sum16$i = (($246) + 12)|0; - $437 = (($v$3$lcssa$i) + ($$sum16$i)|0); - HEAP32[$437>>2] = $425; - break; - } - $438 = $rsize$3$lcssa$i >>> 8; - $439 = ($438|0)==(0); - if ($439) { - $I7$0$i = 0; - } else { - $440 = ($rsize$3$lcssa$i>>>0)>(16777215); - if ($440) { - $I7$0$i = 31; - } else { - $441 = (($438) + 1048320)|0; - $442 = $441 >>> 16; - $443 = $442 & 8; - $444 = $438 << $443; - $445 = (($444) + 520192)|0; - $446 = $445 >>> 16; - $447 = $446 & 4; - $448 = $447 | $443; - $449 = $444 << $447; - $450 = (($449) + 245760)|0; - $451 = $450 >>> 16; - $452 = $451 & 2; - $453 = $448 | $452; - $454 = (14 - ($453))|0; - $455 = $449 << $452; - $456 = $455 >>> 15; - $457 = (($454) + ($456))|0; - $458 = $457 << 1; - $459 = (($457) + 7)|0; - $460 = $rsize$3$lcssa$i >>> $459; - $461 = $460 & 1; - $462 = $461 | $458; - $I7$0$i = $462; - } - } - $463 = (96792 + ($I7$0$i<<2)|0); - $$sum2$i = (($246) + 28)|0; - $464 = (($v$3$lcssa$i) + ($$sum2$i)|0); - HEAP32[$464>>2] = $I7$0$i; - $$sum3$i27 = (($246) + 16)|0; - $465 = (($v$3$lcssa$i) + ($$sum3$i27)|0); - $$sum4$i28 = (($246) + 20)|0; - $466 = (($v$3$lcssa$i) + ($$sum4$i28)|0); - HEAP32[$466>>2] = 0; - HEAP32[$465>>2] = 0; - $467 = HEAP32[(96492)>>2]|0; - $468 = 1 << $I7$0$i; - $469 = $467 & $468; - $470 = ($469|0)==(0); - if ($470) { - $471 = $467 | $468; - HEAP32[(96492)>>2] = $471; - HEAP32[$463>>2] = $348; - $$sum5$i = (($246) + 24)|0; - $472 = (($v$3$lcssa$i) + ($$sum5$i)|0); - HEAP32[$472>>2] = $463; - $$sum6$i = (($246) + 12)|0; - $473 = (($v$3$lcssa$i) + ($$sum6$i)|0); - HEAP32[$473>>2] = $348; - $$sum7$i = (($246) + 8)|0; - $474 = (($v$3$lcssa$i) + ($$sum7$i)|0); - HEAP32[$474>>2] = $348; - break; - } - $475 = HEAP32[$463>>2]|0; - $476 = ((($475)) + 4|0); - $477 = HEAP32[$476>>2]|0; - $478 = $477 & -8; - $479 = ($478|0)==($rsize$3$lcssa$i|0); - L217: do { - if ($479) { - $T$0$lcssa$i = $475; - } else { - $480 = ($I7$0$i|0)==(31); - $481 = $I7$0$i >>> 1; - $482 = (25 - ($481))|0; - $483 = $480 ? 0 : $482; - $484 = $rsize$3$lcssa$i << $483; - $K12$029$i = $484;$T$028$i = $475; - while(1) { - $491 = $K12$029$i >>> 31; - $492 = (((($T$028$i)) + 16|0) + ($491<<2)|0); - $487 = HEAP32[$492>>2]|0; - $493 = ($487|0)==(0|0); - if ($493) { - $$lcssa232 = $492;$T$028$i$lcssa = $T$028$i; - break; - } - $485 = $K12$029$i << 1; - $486 = ((($487)) + 4|0); - $488 = HEAP32[$486>>2]|0; - $489 = $488 & -8; - $490 = ($489|0)==($rsize$3$lcssa$i|0); - if ($490) { - $T$0$lcssa$i = $487; - break L217; - } else { - $K12$029$i = $485;$T$028$i = $487; - } - } - $494 = HEAP32[(96504)>>2]|0; - $495 = ($$lcssa232>>>0)<($494>>>0); - if ($495) { - _abort(); - // unreachable; - } else { - HEAP32[$$lcssa232>>2] = $348; - $$sum11$i = (($246) + 24)|0; - $496 = (($v$3$lcssa$i) + ($$sum11$i)|0); - HEAP32[$496>>2] = $T$028$i$lcssa; - $$sum12$i = (($246) + 12)|0; - $497 = (($v$3$lcssa$i) + ($$sum12$i)|0); - HEAP32[$497>>2] = $348; - $$sum13$i = (($246) + 8)|0; - $498 = (($v$3$lcssa$i) + ($$sum13$i)|0); - HEAP32[$498>>2] = $348; - break L199; - } - } - } while(0); - $499 = ((($T$0$lcssa$i)) + 8|0); - $500 = HEAP32[$499>>2]|0; - $501 = HEAP32[(96504)>>2]|0; - $502 = ($500>>>0)>=($501>>>0); - $not$$i = ($T$0$lcssa$i>>>0)>=($501>>>0); - $503 = $502 & $not$$i; - if ($503) { - $504 = ((($500)) + 12|0); - HEAP32[$504>>2] = $348; - HEAP32[$499>>2] = $348; - $$sum8$i = (($246) + 8)|0; - $505 = (($v$3$lcssa$i) + ($$sum8$i)|0); - HEAP32[$505>>2] = $500; - $$sum9$i = (($246) + 12)|0; - $506 = (($v$3$lcssa$i) + ($$sum9$i)|0); - HEAP32[$506>>2] = $T$0$lcssa$i; - $$sum10$i = (($246) + 24)|0; - $507 = (($v$3$lcssa$i) + ($$sum10$i)|0); - HEAP32[$507>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $508 = ((($v$3$lcssa$i)) + 8|0); - $mem$0 = $508; - return ($mem$0|0); - } else { - $nb$0 = $246; - } - } - } - } - } - } while(0); - $509 = HEAP32[(96496)>>2]|0; - $510 = ($509>>>0)<($nb$0>>>0); - if (!($510)) { - $511 = (($509) - ($nb$0))|0; - $512 = HEAP32[(96508)>>2]|0; - $513 = ($511>>>0)>(15); - if ($513) { - $514 = (($512) + ($nb$0)|0); - HEAP32[(96508)>>2] = $514; - HEAP32[(96496)>>2] = $511; - $515 = $511 | 1; - $$sum2 = (($nb$0) + 4)|0; - $516 = (($512) + ($$sum2)|0); - HEAP32[$516>>2] = $515; - $517 = (($512) + ($509)|0); - HEAP32[$517>>2] = $511; - $518 = $nb$0 | 3; - $519 = ((($512)) + 4|0); - HEAP32[$519>>2] = $518; - } else { - HEAP32[(96496)>>2] = 0; - HEAP32[(96508)>>2] = 0; - $520 = $509 | 3; - $521 = ((($512)) + 4|0); - HEAP32[$521>>2] = $520; - $$sum1 = (($509) + 4)|0; - $522 = (($512) + ($$sum1)|0); - $523 = HEAP32[$522>>2]|0; - $524 = $523 | 1; - HEAP32[$522>>2] = $524; - } - $525 = ((($512)) + 8|0); - $mem$0 = $525; - return ($mem$0|0); - } - $526 = HEAP32[(96500)>>2]|0; - $527 = ($526>>>0)>($nb$0>>>0); - if ($527) { - $528 = (($526) - ($nb$0))|0; - HEAP32[(96500)>>2] = $528; - $529 = HEAP32[(96512)>>2]|0; - $530 = (($529) + ($nb$0)|0); - HEAP32[(96512)>>2] = $530; - $531 = $528 | 1; - $$sum = (($nb$0) + 4)|0; - $532 = (($529) + ($$sum)|0); - HEAP32[$532>>2] = $531; - $533 = $nb$0 | 3; - $534 = ((($529)) + 4|0); - HEAP32[$534>>2] = $533; - $535 = ((($529)) + 8|0); - $mem$0 = $535; - return ($mem$0|0); - } - $536 = HEAP32[96960>>2]|0; - $537 = ($536|0)==(0); - do { - if ($537) { - $538 = (_sysconf(30)|0); - $539 = (($538) + -1)|0; - $540 = $539 & $538; - $541 = ($540|0)==(0); - if ($541) { - HEAP32[(96968)>>2] = $538; - HEAP32[(96964)>>2] = $538; - HEAP32[(96972)>>2] = -1; - HEAP32[(96976)>>2] = -1; - HEAP32[(96980)>>2] = 0; - HEAP32[(96932)>>2] = 0; - $542 = (_time((0|0))|0); - $543 = $542 & -16; - $544 = $543 ^ 1431655768; - HEAP32[96960>>2] = $544; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $545 = (($nb$0) + 48)|0; - $546 = HEAP32[(96968)>>2]|0; - $547 = (($nb$0) + 47)|0; - $548 = (($546) + ($547))|0; - $549 = (0 - ($546))|0; - $550 = $548 & $549; - $551 = ($550>>>0)>($nb$0>>>0); - if (!($551)) { - $mem$0 = 0; - return ($mem$0|0); - } - $552 = HEAP32[(96928)>>2]|0; - $553 = ($552|0)==(0); - if (!($553)) { - $554 = HEAP32[(96920)>>2]|0; - $555 = (($554) + ($550))|0; - $556 = ($555>>>0)<=($554>>>0); - $557 = ($555>>>0)>($552>>>0); - $or$cond1$i = $556 | $557; - if ($or$cond1$i) { - $mem$0 = 0; - return ($mem$0|0); - } - } - $558 = HEAP32[(96932)>>2]|0; - $559 = $558 & 4; - $560 = ($559|0)==(0); - L258: do { - if ($560) { - $561 = HEAP32[(96512)>>2]|0; - $562 = ($561|0)==(0|0); - L260: do { - if ($562) { - label = 174; - } else { - $sp$0$i$i = (96936); - while(1) { - $563 = HEAP32[$sp$0$i$i>>2]|0; - $564 = ($563>>>0)>($561>>>0); - if (!($564)) { - $565 = ((($sp$0$i$i)) + 4|0); - $566 = HEAP32[$565>>2]|0; - $567 = (($563) + ($566)|0); - $568 = ($567>>>0)>($561>>>0); - if ($568) { - $$lcssa228 = $sp$0$i$i;$$lcssa230 = $565; - break; - } - } - $569 = ((($sp$0$i$i)) + 8|0); - $570 = HEAP32[$569>>2]|0; - $571 = ($570|0)==(0|0); - if ($571) { - label = 174; - break L260; - } else { - $sp$0$i$i = $570; - } - } - $594 = HEAP32[(96500)>>2]|0; - $595 = (($548) - ($594))|0; - $596 = $595 & $549; - $597 = ($596>>>0)<(2147483647); - if ($597) { - $598 = (_sbrk(($596|0))|0); - $599 = HEAP32[$$lcssa228>>2]|0; - $600 = HEAP32[$$lcssa230>>2]|0; - $601 = (($599) + ($600)|0); - $602 = ($598|0)==($601|0); - $$3$i = $602 ? $596 : 0; - if ($602) { - $603 = ($598|0)==((-1)|0); - if ($603) { - $tsize$0323944$i = $$3$i; - } else { - $tbase$255$i = $598;$tsize$254$i = $$3$i; - label = 194; - break L258; - } - } else { - $br$0$ph$i = $598;$ssize$1$ph$i = $596;$tsize$0$ph$i = $$3$i; - label = 184; - } - } else { - $tsize$0323944$i = 0; - } - } - } while(0); - do { - if ((label|0) == 174) { - $572 = (_sbrk(0)|0); - $573 = ($572|0)==((-1)|0); - if ($573) { - $tsize$0323944$i = 0; - } else { - $574 = $572; - $575 = HEAP32[(96964)>>2]|0; - $576 = (($575) + -1)|0; - $577 = $576 & $574; - $578 = ($577|0)==(0); - if ($578) { - $ssize$0$i = $550; - } else { - $579 = (($576) + ($574))|0; - $580 = (0 - ($575))|0; - $581 = $579 & $580; - $582 = (($550) - ($574))|0; - $583 = (($582) + ($581))|0; - $ssize$0$i = $583; - } - $584 = HEAP32[(96920)>>2]|0; - $585 = (($584) + ($ssize$0$i))|0; - $586 = ($ssize$0$i>>>0)>($nb$0>>>0); - $587 = ($ssize$0$i>>>0)<(2147483647); - $or$cond$i30 = $586 & $587; - if ($or$cond$i30) { - $588 = HEAP32[(96928)>>2]|0; - $589 = ($588|0)==(0); - if (!($589)) { - $590 = ($585>>>0)<=($584>>>0); - $591 = ($585>>>0)>($588>>>0); - $or$cond2$i = $590 | $591; - if ($or$cond2$i) { - $tsize$0323944$i = 0; - break; - } - } - $592 = (_sbrk(($ssize$0$i|0))|0); - $593 = ($592|0)==($572|0); - $ssize$0$$i = $593 ? $ssize$0$i : 0; - if ($593) { - $tbase$255$i = $572;$tsize$254$i = $ssize$0$$i; - label = 194; - break L258; - } else { - $br$0$ph$i = $592;$ssize$1$ph$i = $ssize$0$i;$tsize$0$ph$i = $ssize$0$$i; - label = 184; - } - } else { - $tsize$0323944$i = 0; - } - } - } - } while(0); - L280: do { - if ((label|0) == 184) { - $604 = (0 - ($ssize$1$ph$i))|0; - $605 = ($br$0$ph$i|0)!=((-1)|0); - $606 = ($ssize$1$ph$i>>>0)<(2147483647); - $or$cond5$i = $606 & $605; - $607 = ($545>>>0)>($ssize$1$ph$i>>>0); - $or$cond6$i = $607 & $or$cond5$i; - do { - if ($or$cond6$i) { - $608 = HEAP32[(96968)>>2]|0; - $609 = (($547) - ($ssize$1$ph$i))|0; - $610 = (($609) + ($608))|0; - $611 = (0 - ($608))|0; - $612 = $610 & $611; - $613 = ($612>>>0)<(2147483647); - if ($613) { - $614 = (_sbrk(($612|0))|0); - $615 = ($614|0)==((-1)|0); - if ($615) { - (_sbrk(($604|0))|0); - $tsize$0323944$i = $tsize$0$ph$i; - break L280; - } else { - $616 = (($612) + ($ssize$1$ph$i))|0; - $ssize$2$i = $616; - break; - } - } else { - $ssize$2$i = $ssize$1$ph$i; - } - } else { - $ssize$2$i = $ssize$1$ph$i; - } - } while(0); - $617 = ($br$0$ph$i|0)==((-1)|0); - if ($617) { - $tsize$0323944$i = $tsize$0$ph$i; - } else { - $tbase$255$i = $br$0$ph$i;$tsize$254$i = $ssize$2$i; - label = 194; - break L258; - } - } - } while(0); - $618 = HEAP32[(96932)>>2]|0; - $619 = $618 | 4; - HEAP32[(96932)>>2] = $619; - $tsize$1$i = $tsize$0323944$i; - label = 191; - } else { - $tsize$1$i = 0; - label = 191; - } - } while(0); - if ((label|0) == 191) { - $620 = ($550>>>0)<(2147483647); - if ($620) { - $621 = (_sbrk(($550|0))|0); - $622 = (_sbrk(0)|0); - $623 = ($621|0)!=((-1)|0); - $624 = ($622|0)!=((-1)|0); - $or$cond3$i = $623 & $624; - $625 = ($621>>>0)<($622>>>0); - $or$cond8$i = $625 & $or$cond3$i; - if ($or$cond8$i) { - $626 = $622; - $627 = $621; - $628 = (($626) - ($627))|0; - $629 = (($nb$0) + 40)|0; - $630 = ($628>>>0)>($629>>>0); - $$tsize$1$i = $630 ? $628 : $tsize$1$i; - if ($630) { - $tbase$255$i = $621;$tsize$254$i = $$tsize$1$i; - label = 194; - } - } - } - } - if ((label|0) == 194) { - $631 = HEAP32[(96920)>>2]|0; - $632 = (($631) + ($tsize$254$i))|0; - HEAP32[(96920)>>2] = $632; - $633 = HEAP32[(96924)>>2]|0; - $634 = ($632>>>0)>($633>>>0); - if ($634) { - HEAP32[(96924)>>2] = $632; - } - $635 = HEAP32[(96512)>>2]|0; - $636 = ($635|0)==(0|0); - L299: do { - if ($636) { - $637 = HEAP32[(96504)>>2]|0; - $638 = ($637|0)==(0|0); - $639 = ($tbase$255$i>>>0)<($637>>>0); - $or$cond9$i = $638 | $639; - if ($or$cond9$i) { - HEAP32[(96504)>>2] = $tbase$255$i; - } - HEAP32[(96936)>>2] = $tbase$255$i; - HEAP32[(96940)>>2] = $tsize$254$i; - HEAP32[(96948)>>2] = 0; - $640 = HEAP32[96960>>2]|0; - HEAP32[(96524)>>2] = $640; - HEAP32[(96520)>>2] = -1; - $i$02$i$i = 0; - while(1) { - $641 = $i$02$i$i << 1; - $642 = (96528 + ($641<<2)|0); - $$sum$i$i = (($641) + 3)|0; - $643 = (96528 + ($$sum$i$i<<2)|0); - HEAP32[$643>>2] = $642; - $$sum1$i$i = (($641) + 2)|0; - $644 = (96528 + ($$sum1$i$i<<2)|0); - HEAP32[$644>>2] = $642; - $645 = (($i$02$i$i) + 1)|0; - $exitcond$i$i = ($645|0)==(32); - if ($exitcond$i$i) { - break; - } else { - $i$02$i$i = $645; - } - } - $646 = (($tsize$254$i) + -40)|0; - $647 = ((($tbase$255$i)) + 8|0); - $648 = $647; - $649 = $648 & 7; - $650 = ($649|0)==(0); - $651 = (0 - ($648))|0; - $652 = $651 & 7; - $653 = $650 ? 0 : $652; - $654 = (($tbase$255$i) + ($653)|0); - $655 = (($646) - ($653))|0; - HEAP32[(96512)>>2] = $654; - HEAP32[(96500)>>2] = $655; - $656 = $655 | 1; - $$sum$i13$i = (($653) + 4)|0; - $657 = (($tbase$255$i) + ($$sum$i13$i)|0); - HEAP32[$657>>2] = $656; - $$sum2$i$i = (($tsize$254$i) + -36)|0; - $658 = (($tbase$255$i) + ($$sum2$i$i)|0); - HEAP32[$658>>2] = 40; - $659 = HEAP32[(96976)>>2]|0; - HEAP32[(96516)>>2] = $659; - } else { - $sp$084$i = (96936); - while(1) { - $660 = HEAP32[$sp$084$i>>2]|0; - $661 = ((($sp$084$i)) + 4|0); - $662 = HEAP32[$661>>2]|0; - $663 = (($660) + ($662)|0); - $664 = ($tbase$255$i|0)==($663|0); - if ($664) { - $$lcssa222 = $660;$$lcssa224 = $661;$$lcssa226 = $662;$sp$084$i$lcssa = $sp$084$i; - label = 204; - break; - } - $665 = ((($sp$084$i)) + 8|0); - $666 = HEAP32[$665>>2]|0; - $667 = ($666|0)==(0|0); - if ($667) { - break; - } else { - $sp$084$i = $666; - } - } - if ((label|0) == 204) { - $668 = ((($sp$084$i$lcssa)) + 12|0); - $669 = HEAP32[$668>>2]|0; - $670 = $669 & 8; - $671 = ($670|0)==(0); - if ($671) { - $672 = ($635>>>0)>=($$lcssa222>>>0); - $673 = ($635>>>0)<($tbase$255$i>>>0); - $or$cond57$i = $673 & $672; - if ($or$cond57$i) { - $674 = (($$lcssa226) + ($tsize$254$i))|0; - HEAP32[$$lcssa224>>2] = $674; - $675 = HEAP32[(96500)>>2]|0; - $676 = (($675) + ($tsize$254$i))|0; - $677 = ((($635)) + 8|0); - $678 = $677; - $679 = $678 & 7; - $680 = ($679|0)==(0); - $681 = (0 - ($678))|0; - $682 = $681 & 7; - $683 = $680 ? 0 : $682; - $684 = (($635) + ($683)|0); - $685 = (($676) - ($683))|0; - HEAP32[(96512)>>2] = $684; - HEAP32[(96500)>>2] = $685; - $686 = $685 | 1; - $$sum$i17$i = (($683) + 4)|0; - $687 = (($635) + ($$sum$i17$i)|0); - HEAP32[$687>>2] = $686; - $$sum2$i18$i = (($676) + 4)|0; - $688 = (($635) + ($$sum2$i18$i)|0); - HEAP32[$688>>2] = 40; - $689 = HEAP32[(96976)>>2]|0; - HEAP32[(96516)>>2] = $689; - break; - } - } - } - $690 = HEAP32[(96504)>>2]|0; - $691 = ($tbase$255$i>>>0)<($690>>>0); - if ($691) { - HEAP32[(96504)>>2] = $tbase$255$i; - $755 = $tbase$255$i; - } else { - $755 = $690; - } - $692 = (($tbase$255$i) + ($tsize$254$i)|0); - $sp$183$i = (96936); - while(1) { - $693 = HEAP32[$sp$183$i>>2]|0; - $694 = ($693|0)==($692|0); - if ($694) { - $$lcssa219 = $sp$183$i;$sp$183$i$lcssa = $sp$183$i; - label = 212; - break; - } - $695 = ((($sp$183$i)) + 8|0); - $696 = HEAP32[$695>>2]|0; - $697 = ($696|0)==(0|0); - if ($697) { - $sp$0$i$i$i = (96936); - break; - } else { - $sp$183$i = $696; - } - } - if ((label|0) == 212) { - $698 = ((($sp$183$i$lcssa)) + 12|0); - $699 = HEAP32[$698>>2]|0; - $700 = $699 & 8; - $701 = ($700|0)==(0); - if ($701) { - HEAP32[$$lcssa219>>2] = $tbase$255$i; - $702 = ((($sp$183$i$lcssa)) + 4|0); - $703 = HEAP32[$702>>2]|0; - $704 = (($703) + ($tsize$254$i))|0; - HEAP32[$702>>2] = $704; - $705 = ((($tbase$255$i)) + 8|0); - $706 = $705; - $707 = $706 & 7; - $708 = ($707|0)==(0); - $709 = (0 - ($706))|0; - $710 = $709 & 7; - $711 = $708 ? 0 : $710; - $712 = (($tbase$255$i) + ($711)|0); - $$sum112$i = (($tsize$254$i) + 8)|0; - $713 = (($tbase$255$i) + ($$sum112$i)|0); - $714 = $713; - $715 = $714 & 7; - $716 = ($715|0)==(0); - $717 = (0 - ($714))|0; - $718 = $717 & 7; - $719 = $716 ? 0 : $718; - $$sum113$i = (($719) + ($tsize$254$i))|0; - $720 = (($tbase$255$i) + ($$sum113$i)|0); - $721 = $720; - $722 = $712; - $723 = (($721) - ($722))|0; - $$sum$i19$i = (($711) + ($nb$0))|0; - $724 = (($tbase$255$i) + ($$sum$i19$i)|0); - $725 = (($723) - ($nb$0))|0; - $726 = $nb$0 | 3; - $$sum1$i20$i = (($711) + 4)|0; - $727 = (($tbase$255$i) + ($$sum1$i20$i)|0); - HEAP32[$727>>2] = $726; - $728 = ($720|0)==($635|0); - L324: do { - if ($728) { - $729 = HEAP32[(96500)>>2]|0; - $730 = (($729) + ($725))|0; - HEAP32[(96500)>>2] = $730; - HEAP32[(96512)>>2] = $724; - $731 = $730 | 1; - $$sum42$i$i = (($$sum$i19$i) + 4)|0; - $732 = (($tbase$255$i) + ($$sum42$i$i)|0); - HEAP32[$732>>2] = $731; - } else { - $733 = HEAP32[(96508)>>2]|0; - $734 = ($720|0)==($733|0); - if ($734) { - $735 = HEAP32[(96496)>>2]|0; - $736 = (($735) + ($725))|0; - HEAP32[(96496)>>2] = $736; - HEAP32[(96508)>>2] = $724; - $737 = $736 | 1; - $$sum40$i$i = (($$sum$i19$i) + 4)|0; - $738 = (($tbase$255$i) + ($$sum40$i$i)|0); - HEAP32[$738>>2] = $737; - $$sum41$i$i = (($736) + ($$sum$i19$i))|0; - $739 = (($tbase$255$i) + ($$sum41$i$i)|0); - HEAP32[$739>>2] = $736; - break; - } - $$sum2$i21$i = (($tsize$254$i) + 4)|0; - $$sum114$i = (($$sum2$i21$i) + ($719))|0; - $740 = (($tbase$255$i) + ($$sum114$i)|0); - $741 = HEAP32[$740>>2]|0; - $742 = $741 & 3; - $743 = ($742|0)==(1); - if ($743) { - $744 = $741 & -8; - $745 = $741 >>> 3; - $746 = ($741>>>0)<(256); - L331: do { - if ($746) { - $$sum3738$i$i = $719 | 8; - $$sum124$i = (($$sum3738$i$i) + ($tsize$254$i))|0; - $747 = (($tbase$255$i) + ($$sum124$i)|0); - $748 = HEAP32[$747>>2]|0; - $$sum39$i$i = (($tsize$254$i) + 12)|0; - $$sum125$i = (($$sum39$i$i) + ($719))|0; - $749 = (($tbase$255$i) + ($$sum125$i)|0); - $750 = HEAP32[$749>>2]|0; - $751 = $745 << 1; - $752 = (96528 + ($751<<2)|0); - $753 = ($748|0)==($752|0); - do { - if (!($753)) { - $754 = ($748>>>0)<($755>>>0); - if ($754) { - _abort(); - // unreachable; - } - $756 = ((($748)) + 12|0); - $757 = HEAP32[$756>>2]|0; - $758 = ($757|0)==($720|0); - if ($758) { - break; - } - _abort(); - // unreachable; - } - } while(0); - $759 = ($750|0)==($748|0); - if ($759) { - $760 = 1 << $745; - $761 = $760 ^ -1; - $762 = HEAP32[96488>>2]|0; - $763 = $762 & $761; - HEAP32[96488>>2] = $763; - break; - } - $764 = ($750|0)==($752|0); - do { - if ($764) { - $$pre57$i$i = ((($750)) + 8|0); - $$pre$phi58$i$iZ2D = $$pre57$i$i; - } else { - $765 = ($750>>>0)<($755>>>0); - if ($765) { - _abort(); - // unreachable; - } - $766 = ((($750)) + 8|0); - $767 = HEAP32[$766>>2]|0; - $768 = ($767|0)==($720|0); - if ($768) { - $$pre$phi58$i$iZ2D = $766; - break; - } - _abort(); - // unreachable; - } - } while(0); - $769 = ((($748)) + 12|0); - HEAP32[$769>>2] = $750; - HEAP32[$$pre$phi58$i$iZ2D>>2] = $748; - } else { - $$sum34$i$i = $719 | 24; - $$sum115$i = (($$sum34$i$i) + ($tsize$254$i))|0; - $770 = (($tbase$255$i) + ($$sum115$i)|0); - $771 = HEAP32[$770>>2]|0; - $$sum5$i$i = (($tsize$254$i) + 12)|0; - $$sum116$i = (($$sum5$i$i) + ($719))|0; - $772 = (($tbase$255$i) + ($$sum116$i)|0); - $773 = HEAP32[$772>>2]|0; - $774 = ($773|0)==($720|0); - do { - if ($774) { - $$sum67$i$i = $719 | 16; - $$sum122$i = (($$sum2$i21$i) + ($$sum67$i$i))|0; - $784 = (($tbase$255$i) + ($$sum122$i)|0); - $785 = HEAP32[$784>>2]|0; - $786 = ($785|0)==(0|0); - if ($786) { - $$sum123$i = (($$sum67$i$i) + ($tsize$254$i))|0; - $787 = (($tbase$255$i) + ($$sum123$i)|0); - $788 = HEAP32[$787>>2]|0; - $789 = ($788|0)==(0|0); - if ($789) { - $R$1$i$i = 0; - break; - } else { - $R$0$i$i = $788;$RP$0$i$i = $787; - } - } else { - $R$0$i$i = $785;$RP$0$i$i = $784; - } - while(1) { - $790 = ((($R$0$i$i)) + 20|0); - $791 = HEAP32[$790>>2]|0; - $792 = ($791|0)==(0|0); - if (!($792)) { - $R$0$i$i = $791;$RP$0$i$i = $790; - continue; - } - $793 = ((($R$0$i$i)) + 16|0); - $794 = HEAP32[$793>>2]|0; - $795 = ($794|0)==(0|0); - if ($795) { - $R$0$i$i$lcssa = $R$0$i$i;$RP$0$i$i$lcssa = $RP$0$i$i; - break; - } else { - $R$0$i$i = $794;$RP$0$i$i = $793; - } - } - $796 = ($RP$0$i$i$lcssa>>>0)<($755>>>0); - if ($796) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$i$i$lcssa>>2] = 0; - $R$1$i$i = $R$0$i$i$lcssa; - break; - } - } else { - $$sum3536$i$i = $719 | 8; - $$sum117$i = (($$sum3536$i$i) + ($tsize$254$i))|0; - $775 = (($tbase$255$i) + ($$sum117$i)|0); - $776 = HEAP32[$775>>2]|0; - $777 = ($776>>>0)<($755>>>0); - if ($777) { - _abort(); - // unreachable; - } - $778 = ((($776)) + 12|0); - $779 = HEAP32[$778>>2]|0; - $780 = ($779|0)==($720|0); - if (!($780)) { - _abort(); - // unreachable; - } - $781 = ((($773)) + 8|0); - $782 = HEAP32[$781>>2]|0; - $783 = ($782|0)==($720|0); - if ($783) { - HEAP32[$778>>2] = $773; - HEAP32[$781>>2] = $776; - $R$1$i$i = $773; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $797 = ($771|0)==(0|0); - if ($797) { - break; - } - $$sum30$i$i = (($tsize$254$i) + 28)|0; - $$sum118$i = (($$sum30$i$i) + ($719))|0; - $798 = (($tbase$255$i) + ($$sum118$i)|0); - $799 = HEAP32[$798>>2]|0; - $800 = (96792 + ($799<<2)|0); - $801 = HEAP32[$800>>2]|0; - $802 = ($720|0)==($801|0); - do { - if ($802) { - HEAP32[$800>>2] = $R$1$i$i; - $cond$i$i = ($R$1$i$i|0)==(0|0); - if (!($cond$i$i)) { - break; - } - $803 = 1 << $799; - $804 = $803 ^ -1; - $805 = HEAP32[(96492)>>2]|0; - $806 = $805 & $804; - HEAP32[(96492)>>2] = $806; - break L331; - } else { - $807 = HEAP32[(96504)>>2]|0; - $808 = ($771>>>0)<($807>>>0); - if ($808) { - _abort(); - // unreachable; - } - $809 = ((($771)) + 16|0); - $810 = HEAP32[$809>>2]|0; - $811 = ($810|0)==($720|0); - if ($811) { - HEAP32[$809>>2] = $R$1$i$i; - } else { - $812 = ((($771)) + 20|0); - HEAP32[$812>>2] = $R$1$i$i; - } - $813 = ($R$1$i$i|0)==(0|0); - if ($813) { - break L331; - } - } - } while(0); - $814 = HEAP32[(96504)>>2]|0; - $815 = ($R$1$i$i>>>0)<($814>>>0); - if ($815) { - _abort(); - // unreachable; - } - $816 = ((($R$1$i$i)) + 24|0); - HEAP32[$816>>2] = $771; - $$sum3132$i$i = $719 | 16; - $$sum119$i = (($$sum3132$i$i) + ($tsize$254$i))|0; - $817 = (($tbase$255$i) + ($$sum119$i)|0); - $818 = HEAP32[$817>>2]|0; - $819 = ($818|0)==(0|0); - do { - if (!($819)) { - $820 = ($818>>>0)<($814>>>0); - if ($820) { - _abort(); - // unreachable; - } else { - $821 = ((($R$1$i$i)) + 16|0); - HEAP32[$821>>2] = $818; - $822 = ((($818)) + 24|0); - HEAP32[$822>>2] = $R$1$i$i; - break; - } - } - } while(0); - $$sum120$i = (($$sum2$i21$i) + ($$sum3132$i$i))|0; - $823 = (($tbase$255$i) + ($$sum120$i)|0); - $824 = HEAP32[$823>>2]|0; - $825 = ($824|0)==(0|0); - if ($825) { - break; - } - $826 = HEAP32[(96504)>>2]|0; - $827 = ($824>>>0)<($826>>>0); - if ($827) { - _abort(); - // unreachable; - } else { - $828 = ((($R$1$i$i)) + 20|0); - HEAP32[$828>>2] = $824; - $829 = ((($824)) + 24|0); - HEAP32[$829>>2] = $R$1$i$i; - break; - } - } - } while(0); - $$sum9$i$i = $744 | $719; - $$sum121$i = (($$sum9$i$i) + ($tsize$254$i))|0; - $830 = (($tbase$255$i) + ($$sum121$i)|0); - $831 = (($744) + ($725))|0; - $oldfirst$0$i$i = $830;$qsize$0$i$i = $831; - } else { - $oldfirst$0$i$i = $720;$qsize$0$i$i = $725; - } - $832 = ((($oldfirst$0$i$i)) + 4|0); - $833 = HEAP32[$832>>2]|0; - $834 = $833 & -2; - HEAP32[$832>>2] = $834; - $835 = $qsize$0$i$i | 1; - $$sum10$i$i = (($$sum$i19$i) + 4)|0; - $836 = (($tbase$255$i) + ($$sum10$i$i)|0); - HEAP32[$836>>2] = $835; - $$sum11$i$i = (($qsize$0$i$i) + ($$sum$i19$i))|0; - $837 = (($tbase$255$i) + ($$sum11$i$i)|0); - HEAP32[$837>>2] = $qsize$0$i$i; - $838 = $qsize$0$i$i >>> 3; - $839 = ($qsize$0$i$i>>>0)<(256); - if ($839) { - $840 = $838 << 1; - $841 = (96528 + ($840<<2)|0); - $842 = HEAP32[96488>>2]|0; - $843 = 1 << $838; - $844 = $842 & $843; - $845 = ($844|0)==(0); - do { - if ($845) { - $846 = $842 | $843; - HEAP32[96488>>2] = $846; - $$pre$i22$i = (($840) + 2)|0; - $$pre56$i$i = (96528 + ($$pre$i22$i<<2)|0); - $$pre$phi$i23$iZ2D = $$pre56$i$i;$F4$0$i$i = $841; - } else { - $$sum29$i$i = (($840) + 2)|0; - $847 = (96528 + ($$sum29$i$i<<2)|0); - $848 = HEAP32[$847>>2]|0; - $849 = HEAP32[(96504)>>2]|0; - $850 = ($848>>>0)<($849>>>0); - if (!($850)) { - $$pre$phi$i23$iZ2D = $847;$F4$0$i$i = $848; - break; - } - _abort(); - // unreachable; - } - } while(0); - HEAP32[$$pre$phi$i23$iZ2D>>2] = $724; - $851 = ((($F4$0$i$i)) + 12|0); - HEAP32[$851>>2] = $724; - $$sum27$i$i = (($$sum$i19$i) + 8)|0; - $852 = (($tbase$255$i) + ($$sum27$i$i)|0); - HEAP32[$852>>2] = $F4$0$i$i; - $$sum28$i$i = (($$sum$i19$i) + 12)|0; - $853 = (($tbase$255$i) + ($$sum28$i$i)|0); - HEAP32[$853>>2] = $841; - break; - } - $854 = $qsize$0$i$i >>> 8; - $855 = ($854|0)==(0); - do { - if ($855) { - $I7$0$i$i = 0; - } else { - $856 = ($qsize$0$i$i>>>0)>(16777215); - if ($856) { - $I7$0$i$i = 31; - break; - } - $857 = (($854) + 1048320)|0; - $858 = $857 >>> 16; - $859 = $858 & 8; - $860 = $854 << $859; - $861 = (($860) + 520192)|0; - $862 = $861 >>> 16; - $863 = $862 & 4; - $864 = $863 | $859; - $865 = $860 << $863; - $866 = (($865) + 245760)|0; - $867 = $866 >>> 16; - $868 = $867 & 2; - $869 = $864 | $868; - $870 = (14 - ($869))|0; - $871 = $865 << $868; - $872 = $871 >>> 15; - $873 = (($870) + ($872))|0; - $874 = $873 << 1; - $875 = (($873) + 7)|0; - $876 = $qsize$0$i$i >>> $875; - $877 = $876 & 1; - $878 = $877 | $874; - $I7$0$i$i = $878; - } - } while(0); - $879 = (96792 + ($I7$0$i$i<<2)|0); - $$sum12$i$i = (($$sum$i19$i) + 28)|0; - $880 = (($tbase$255$i) + ($$sum12$i$i)|0); - HEAP32[$880>>2] = $I7$0$i$i; - $$sum13$i$i = (($$sum$i19$i) + 16)|0; - $881 = (($tbase$255$i) + ($$sum13$i$i)|0); - $$sum14$i$i = (($$sum$i19$i) + 20)|0; - $882 = (($tbase$255$i) + ($$sum14$i$i)|0); - HEAP32[$882>>2] = 0; - HEAP32[$881>>2] = 0; - $883 = HEAP32[(96492)>>2]|0; - $884 = 1 << $I7$0$i$i; - $885 = $883 & $884; - $886 = ($885|0)==(0); - if ($886) { - $887 = $883 | $884; - HEAP32[(96492)>>2] = $887; - HEAP32[$879>>2] = $724; - $$sum15$i$i = (($$sum$i19$i) + 24)|0; - $888 = (($tbase$255$i) + ($$sum15$i$i)|0); - HEAP32[$888>>2] = $879; - $$sum16$i$i = (($$sum$i19$i) + 12)|0; - $889 = (($tbase$255$i) + ($$sum16$i$i)|0); - HEAP32[$889>>2] = $724; - $$sum17$i$i = (($$sum$i19$i) + 8)|0; - $890 = (($tbase$255$i) + ($$sum17$i$i)|0); - HEAP32[$890>>2] = $724; - break; - } - $891 = HEAP32[$879>>2]|0; - $892 = ((($891)) + 4|0); - $893 = HEAP32[$892>>2]|0; - $894 = $893 & -8; - $895 = ($894|0)==($qsize$0$i$i|0); - L417: do { - if ($895) { - $T$0$lcssa$i25$i = $891; - } else { - $896 = ($I7$0$i$i|0)==(31); - $897 = $I7$0$i$i >>> 1; - $898 = (25 - ($897))|0; - $899 = $896 ? 0 : $898; - $900 = $qsize$0$i$i << $899; - $K8$051$i$i = $900;$T$050$i$i = $891; - while(1) { - $907 = $K8$051$i$i >>> 31; - $908 = (((($T$050$i$i)) + 16|0) + ($907<<2)|0); - $903 = HEAP32[$908>>2]|0; - $909 = ($903|0)==(0|0); - if ($909) { - $$lcssa = $908;$T$050$i$i$lcssa = $T$050$i$i; - break; - } - $901 = $K8$051$i$i << 1; - $902 = ((($903)) + 4|0); - $904 = HEAP32[$902>>2]|0; - $905 = $904 & -8; - $906 = ($905|0)==($qsize$0$i$i|0); - if ($906) { - $T$0$lcssa$i25$i = $903; - break L417; - } else { - $K8$051$i$i = $901;$T$050$i$i = $903; - } - } - $910 = HEAP32[(96504)>>2]|0; - $911 = ($$lcssa>>>0)<($910>>>0); - if ($911) { - _abort(); - // unreachable; - } else { - HEAP32[$$lcssa>>2] = $724; - $$sum23$i$i = (($$sum$i19$i) + 24)|0; - $912 = (($tbase$255$i) + ($$sum23$i$i)|0); - HEAP32[$912>>2] = $T$050$i$i$lcssa; - $$sum24$i$i = (($$sum$i19$i) + 12)|0; - $913 = (($tbase$255$i) + ($$sum24$i$i)|0); - HEAP32[$913>>2] = $724; - $$sum25$i$i = (($$sum$i19$i) + 8)|0; - $914 = (($tbase$255$i) + ($$sum25$i$i)|0); - HEAP32[$914>>2] = $724; - break L324; - } - } - } while(0); - $915 = ((($T$0$lcssa$i25$i)) + 8|0); - $916 = HEAP32[$915>>2]|0; - $917 = HEAP32[(96504)>>2]|0; - $918 = ($916>>>0)>=($917>>>0); - $not$$i26$i = ($T$0$lcssa$i25$i>>>0)>=($917>>>0); - $919 = $918 & $not$$i26$i; - if ($919) { - $920 = ((($916)) + 12|0); - HEAP32[$920>>2] = $724; - HEAP32[$915>>2] = $724; - $$sum20$i$i = (($$sum$i19$i) + 8)|0; - $921 = (($tbase$255$i) + ($$sum20$i$i)|0); - HEAP32[$921>>2] = $916; - $$sum21$i$i = (($$sum$i19$i) + 12)|0; - $922 = (($tbase$255$i) + ($$sum21$i$i)|0); - HEAP32[$922>>2] = $T$0$lcssa$i25$i; - $$sum22$i$i = (($$sum$i19$i) + 24)|0; - $923 = (($tbase$255$i) + ($$sum22$i$i)|0); - HEAP32[$923>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $$sum1819$i$i = $711 | 8; - $924 = (($tbase$255$i) + ($$sum1819$i$i)|0); - $mem$0 = $924; - return ($mem$0|0); - } else { - $sp$0$i$i$i = (96936); - } - } - while(1) { - $925 = HEAP32[$sp$0$i$i$i>>2]|0; - $926 = ($925>>>0)>($635>>>0); - if (!($926)) { - $927 = ((($sp$0$i$i$i)) + 4|0); - $928 = HEAP32[$927>>2]|0; - $929 = (($925) + ($928)|0); - $930 = ($929>>>0)>($635>>>0); - if ($930) { - $$lcssa215 = $925;$$lcssa216 = $928;$$lcssa217 = $929; - break; - } - } - $931 = ((($sp$0$i$i$i)) + 8|0); - $932 = HEAP32[$931>>2]|0; - $sp$0$i$i$i = $932; - } - $$sum$i14$i = (($$lcssa216) + -47)|0; - $$sum1$i15$i = (($$lcssa216) + -39)|0; - $933 = (($$lcssa215) + ($$sum1$i15$i)|0); - $934 = $933; - $935 = $934 & 7; - $936 = ($935|0)==(0); - $937 = (0 - ($934))|0; - $938 = $937 & 7; - $939 = $936 ? 0 : $938; - $$sum2$i16$i = (($$sum$i14$i) + ($939))|0; - $940 = (($$lcssa215) + ($$sum2$i16$i)|0); - $941 = ((($635)) + 16|0); - $942 = ($940>>>0)<($941>>>0); - $943 = $942 ? $635 : $940; - $944 = ((($943)) + 8|0); - $945 = (($tsize$254$i) + -40)|0; - $946 = ((($tbase$255$i)) + 8|0); - $947 = $946; - $948 = $947 & 7; - $949 = ($948|0)==(0); - $950 = (0 - ($947))|0; - $951 = $950 & 7; - $952 = $949 ? 0 : $951; - $953 = (($tbase$255$i) + ($952)|0); - $954 = (($945) - ($952))|0; - HEAP32[(96512)>>2] = $953; - HEAP32[(96500)>>2] = $954; - $955 = $954 | 1; - $$sum$i$i$i = (($952) + 4)|0; - $956 = (($tbase$255$i) + ($$sum$i$i$i)|0); - HEAP32[$956>>2] = $955; - $$sum2$i$i$i = (($tsize$254$i) + -36)|0; - $957 = (($tbase$255$i) + ($$sum2$i$i$i)|0); - HEAP32[$957>>2] = 40; - $958 = HEAP32[(96976)>>2]|0; - HEAP32[(96516)>>2] = $958; - $959 = ((($943)) + 4|0); - HEAP32[$959>>2] = 27; - ;HEAP32[$944>>2]=HEAP32[(96936)>>2]|0;HEAP32[$944+4>>2]=HEAP32[(96936)+4>>2]|0;HEAP32[$944+8>>2]=HEAP32[(96936)+8>>2]|0;HEAP32[$944+12>>2]=HEAP32[(96936)+12>>2]|0; - HEAP32[(96936)>>2] = $tbase$255$i; - HEAP32[(96940)>>2] = $tsize$254$i; - HEAP32[(96948)>>2] = 0; - HEAP32[(96944)>>2] = $944; - $960 = ((($943)) + 28|0); - HEAP32[$960>>2] = 7; - $961 = ((($943)) + 32|0); - $962 = ($961>>>0)<($$lcssa217>>>0); - if ($962) { - $964 = $960; - while(1) { - $963 = ((($964)) + 4|0); - HEAP32[$963>>2] = 7; - $965 = ((($964)) + 8|0); - $966 = ($965>>>0)<($$lcssa217>>>0); - if ($966) { - $964 = $963; - } else { - break; - } - } - } - $967 = ($943|0)==($635|0); - if (!($967)) { - $968 = $943; - $969 = $635; - $970 = (($968) - ($969))|0; - $971 = HEAP32[$959>>2]|0; - $972 = $971 & -2; - HEAP32[$959>>2] = $972; - $973 = $970 | 1; - $974 = ((($635)) + 4|0); - HEAP32[$974>>2] = $973; - HEAP32[$943>>2] = $970; - $975 = $970 >>> 3; - $976 = ($970>>>0)<(256); - if ($976) { - $977 = $975 << 1; - $978 = (96528 + ($977<<2)|0); - $979 = HEAP32[96488>>2]|0; - $980 = 1 << $975; - $981 = $979 & $980; - $982 = ($981|0)==(0); - if ($982) { - $983 = $979 | $980; - HEAP32[96488>>2] = $983; - $$pre$i$i = (($977) + 2)|0; - $$pre14$i$i = (96528 + ($$pre$i$i<<2)|0); - $$pre$phi$i$iZ2D = $$pre14$i$i;$F$0$i$i = $978; - } else { - $$sum4$i$i = (($977) + 2)|0; - $984 = (96528 + ($$sum4$i$i<<2)|0); - $985 = HEAP32[$984>>2]|0; - $986 = HEAP32[(96504)>>2]|0; - $987 = ($985>>>0)<($986>>>0); - if ($987) { - _abort(); - // unreachable; - } else { - $$pre$phi$i$iZ2D = $984;$F$0$i$i = $985; - } - } - HEAP32[$$pre$phi$i$iZ2D>>2] = $635; - $988 = ((($F$0$i$i)) + 12|0); - HEAP32[$988>>2] = $635; - $989 = ((($635)) + 8|0); - HEAP32[$989>>2] = $F$0$i$i; - $990 = ((($635)) + 12|0); - HEAP32[$990>>2] = $978; - break; - } - $991 = $970 >>> 8; - $992 = ($991|0)==(0); - if ($992) { - $I1$0$i$i = 0; - } else { - $993 = ($970>>>0)>(16777215); - if ($993) { - $I1$0$i$i = 31; - } else { - $994 = (($991) + 1048320)|0; - $995 = $994 >>> 16; - $996 = $995 & 8; - $997 = $991 << $996; - $998 = (($997) + 520192)|0; - $999 = $998 >>> 16; - $1000 = $999 & 4; - $1001 = $1000 | $996; - $1002 = $997 << $1000; - $1003 = (($1002) + 245760)|0; - $1004 = $1003 >>> 16; - $1005 = $1004 & 2; - $1006 = $1001 | $1005; - $1007 = (14 - ($1006))|0; - $1008 = $1002 << $1005; - $1009 = $1008 >>> 15; - $1010 = (($1007) + ($1009))|0; - $1011 = $1010 << 1; - $1012 = (($1010) + 7)|0; - $1013 = $970 >>> $1012; - $1014 = $1013 & 1; - $1015 = $1014 | $1011; - $I1$0$i$i = $1015; - } - } - $1016 = (96792 + ($I1$0$i$i<<2)|0); - $1017 = ((($635)) + 28|0); - HEAP32[$1017>>2] = $I1$0$i$i; - $1018 = ((($635)) + 20|0); - HEAP32[$1018>>2] = 0; - HEAP32[$941>>2] = 0; - $1019 = HEAP32[(96492)>>2]|0; - $1020 = 1 << $I1$0$i$i; - $1021 = $1019 & $1020; - $1022 = ($1021|0)==(0); - if ($1022) { - $1023 = $1019 | $1020; - HEAP32[(96492)>>2] = $1023; - HEAP32[$1016>>2] = $635; - $1024 = ((($635)) + 24|0); - HEAP32[$1024>>2] = $1016; - $1025 = ((($635)) + 12|0); - HEAP32[$1025>>2] = $635; - $1026 = ((($635)) + 8|0); - HEAP32[$1026>>2] = $635; - break; - } - $1027 = HEAP32[$1016>>2]|0; - $1028 = ((($1027)) + 4|0); - $1029 = HEAP32[$1028>>2]|0; - $1030 = $1029 & -8; - $1031 = ($1030|0)==($970|0); - L459: do { - if ($1031) { - $T$0$lcssa$i$i = $1027; - } else { - $1032 = ($I1$0$i$i|0)==(31); - $1033 = $I1$0$i$i >>> 1; - $1034 = (25 - ($1033))|0; - $1035 = $1032 ? 0 : $1034; - $1036 = $970 << $1035; - $K2$07$i$i = $1036;$T$06$i$i = $1027; - while(1) { - $1043 = $K2$07$i$i >>> 31; - $1044 = (((($T$06$i$i)) + 16|0) + ($1043<<2)|0); - $1039 = HEAP32[$1044>>2]|0; - $1045 = ($1039|0)==(0|0); - if ($1045) { - $$lcssa211 = $1044;$T$06$i$i$lcssa = $T$06$i$i; - break; - } - $1037 = $K2$07$i$i << 1; - $1038 = ((($1039)) + 4|0); - $1040 = HEAP32[$1038>>2]|0; - $1041 = $1040 & -8; - $1042 = ($1041|0)==($970|0); - if ($1042) { - $T$0$lcssa$i$i = $1039; - break L459; - } else { - $K2$07$i$i = $1037;$T$06$i$i = $1039; - } - } - $1046 = HEAP32[(96504)>>2]|0; - $1047 = ($$lcssa211>>>0)<($1046>>>0); - if ($1047) { - _abort(); - // unreachable; - } else { - HEAP32[$$lcssa211>>2] = $635; - $1048 = ((($635)) + 24|0); - HEAP32[$1048>>2] = $T$06$i$i$lcssa; - $1049 = ((($635)) + 12|0); - HEAP32[$1049>>2] = $635; - $1050 = ((($635)) + 8|0); - HEAP32[$1050>>2] = $635; - break L299; - } - } - } while(0); - $1051 = ((($T$0$lcssa$i$i)) + 8|0); - $1052 = HEAP32[$1051>>2]|0; - $1053 = HEAP32[(96504)>>2]|0; - $1054 = ($1052>>>0)>=($1053>>>0); - $not$$i$i = ($T$0$lcssa$i$i>>>0)>=($1053>>>0); - $1055 = $1054 & $not$$i$i; - if ($1055) { - $1056 = ((($1052)) + 12|0); - HEAP32[$1056>>2] = $635; - HEAP32[$1051>>2] = $635; - $1057 = ((($635)) + 8|0); - HEAP32[$1057>>2] = $1052; - $1058 = ((($635)) + 12|0); - HEAP32[$1058>>2] = $T$0$lcssa$i$i; - $1059 = ((($635)) + 24|0); - HEAP32[$1059>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } - } while(0); - $1060 = HEAP32[(96500)>>2]|0; - $1061 = ($1060>>>0)>($nb$0>>>0); - if ($1061) { - $1062 = (($1060) - ($nb$0))|0; - HEAP32[(96500)>>2] = $1062; - $1063 = HEAP32[(96512)>>2]|0; - $1064 = (($1063) + ($nb$0)|0); - HEAP32[(96512)>>2] = $1064; - $1065 = $1062 | 1; - $$sum$i32 = (($nb$0) + 4)|0; - $1066 = (($1063) + ($$sum$i32)|0); - HEAP32[$1066>>2] = $1065; - $1067 = $nb$0 | 3; - $1068 = ((($1063)) + 4|0); - HEAP32[$1068>>2] = $1067; - $1069 = ((($1063)) + 8|0); - $mem$0 = $1069; - return ($mem$0|0); - } - } - $1070 = (___errno_location()|0); - HEAP32[$1070>>2] = 12; - $mem$0 = 0; - return ($mem$0|0); -} -function _free($mem) { - $mem = $mem|0; - var $$lcssa = 0, $$pre = 0, $$pre$phi59Z2D = 0, $$pre$phi61Z2D = 0, $$pre$phiZ2D = 0, $$pre57 = 0, $$pre58 = 0, $$pre60 = 0, $$sum = 0, $$sum11 = 0, $$sum12 = 0, $$sum13 = 0, $$sum14 = 0, $$sum1718 = 0, $$sum19 = 0, $$sum2 = 0, $$sum20 = 0, $$sum22 = 0, $$sum23 = 0, $$sum24 = 0; - var $$sum25 = 0, $$sum26 = 0, $$sum27 = 0, $$sum28 = 0, $$sum29 = 0, $$sum3 = 0, $$sum30 = 0, $$sum31 = 0, $$sum5 = 0, $$sum67 = 0, $$sum8 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0; - var $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0; - var $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0; - var $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0; - var $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0; - var $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0; - var $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0; - var $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0; - var $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0; - var $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0; - var $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0; - var $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0; - var $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0; - var $321 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0; - var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0; - var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0; - var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F16$0 = 0, $I18$0 = 0, $K19$052 = 0, $R$0 = 0, $R$0$lcssa = 0, $R$1 = 0; - var $R7$0 = 0, $R7$0$lcssa = 0, $R7$1 = 0, $RP$0 = 0, $RP$0$lcssa = 0, $RP9$0 = 0, $RP9$0$lcssa = 0, $T$0$lcssa = 0, $T$051 = 0, $T$051$lcssa = 0, $cond = 0, $cond47 = 0, $not$ = 0, $p$0 = 0, $psize$0 = 0, $psize$1 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($mem|0)==(0|0); - if ($0) { - return; - } - $1 = ((($mem)) + -8|0); - $2 = HEAP32[(96504)>>2]|0; - $3 = ($1>>>0)<($2>>>0); - if ($3) { - _abort(); - // unreachable; - } - $4 = ((($mem)) + -4|0); - $5 = HEAP32[$4>>2]|0; - $6 = $5 & 3; - $7 = ($6|0)==(1); - if ($7) { - _abort(); - // unreachable; - } - $8 = $5 & -8; - $$sum = (($8) + -8)|0; - $9 = (($mem) + ($$sum)|0); - $10 = $5 & 1; - $11 = ($10|0)==(0); - do { - if ($11) { - $12 = HEAP32[$1>>2]|0; - $13 = ($6|0)==(0); - if ($13) { - return; - } - $$sum2 = (-8 - ($12))|0; - $14 = (($mem) + ($$sum2)|0); - $15 = (($12) + ($8))|0; - $16 = ($14>>>0)<($2>>>0); - if ($16) { - _abort(); - // unreachable; - } - $17 = HEAP32[(96508)>>2]|0; - $18 = ($14|0)==($17|0); - if ($18) { - $$sum3 = (($8) + -4)|0; - $103 = (($mem) + ($$sum3)|0); - $104 = HEAP32[$103>>2]|0; - $105 = $104 & 3; - $106 = ($105|0)==(3); - if (!($106)) { - $p$0 = $14;$psize$0 = $15; - break; - } - HEAP32[(96496)>>2] = $15; - $107 = $104 & -2; - HEAP32[$103>>2] = $107; - $108 = $15 | 1; - $$sum20 = (($$sum2) + 4)|0; - $109 = (($mem) + ($$sum20)|0); - HEAP32[$109>>2] = $108; - HEAP32[$9>>2] = $15; - return; - } - $19 = $12 >>> 3; - $20 = ($12>>>0)<(256); - if ($20) { - $$sum30 = (($$sum2) + 8)|0; - $21 = (($mem) + ($$sum30)|0); - $22 = HEAP32[$21>>2]|0; - $$sum31 = (($$sum2) + 12)|0; - $23 = (($mem) + ($$sum31)|0); - $24 = HEAP32[$23>>2]|0; - $25 = $19 << 1; - $26 = (96528 + ($25<<2)|0); - $27 = ($22|0)==($26|0); - if (!($27)) { - $28 = ($22>>>0)<($2>>>0); - if ($28) { - _abort(); - // unreachable; - } - $29 = ((($22)) + 12|0); - $30 = HEAP32[$29>>2]|0; - $31 = ($30|0)==($14|0); - if (!($31)) { - _abort(); - // unreachable; - } - } - $32 = ($24|0)==($22|0); - if ($32) { - $33 = 1 << $19; - $34 = $33 ^ -1; - $35 = HEAP32[96488>>2]|0; - $36 = $35 & $34; - HEAP32[96488>>2] = $36; - $p$0 = $14;$psize$0 = $15; - break; - } - $37 = ($24|0)==($26|0); - if ($37) { - $$pre60 = ((($24)) + 8|0); - $$pre$phi61Z2D = $$pre60; - } else { - $38 = ($24>>>0)<($2>>>0); - if ($38) { - _abort(); - // unreachable; - } - $39 = ((($24)) + 8|0); - $40 = HEAP32[$39>>2]|0; - $41 = ($40|0)==($14|0); - if ($41) { - $$pre$phi61Z2D = $39; - } else { - _abort(); - // unreachable; - } - } - $42 = ((($22)) + 12|0); - HEAP32[$42>>2] = $24; - HEAP32[$$pre$phi61Z2D>>2] = $22; - $p$0 = $14;$psize$0 = $15; - break; - } - $$sum22 = (($$sum2) + 24)|0; - $43 = (($mem) + ($$sum22)|0); - $44 = HEAP32[$43>>2]|0; - $$sum23 = (($$sum2) + 12)|0; - $45 = (($mem) + ($$sum23)|0); - $46 = HEAP32[$45>>2]|0; - $47 = ($46|0)==($14|0); - do { - if ($47) { - $$sum25 = (($$sum2) + 20)|0; - $57 = (($mem) + ($$sum25)|0); - $58 = HEAP32[$57>>2]|0; - $59 = ($58|0)==(0|0); - if ($59) { - $$sum24 = (($$sum2) + 16)|0; - $60 = (($mem) + ($$sum24)|0); - $61 = HEAP32[$60>>2]|0; - $62 = ($61|0)==(0|0); - if ($62) { - $R$1 = 0; - break; - } else { - $R$0 = $61;$RP$0 = $60; - } - } else { - $R$0 = $58;$RP$0 = $57; - } - while(1) { - $63 = ((($R$0)) + 20|0); - $64 = HEAP32[$63>>2]|0; - $65 = ($64|0)==(0|0); - if (!($65)) { - $R$0 = $64;$RP$0 = $63; - continue; - } - $66 = ((($R$0)) + 16|0); - $67 = HEAP32[$66>>2]|0; - $68 = ($67|0)==(0|0); - if ($68) { - $R$0$lcssa = $R$0;$RP$0$lcssa = $RP$0; - break; - } else { - $R$0 = $67;$RP$0 = $66; - } - } - $69 = ($RP$0$lcssa>>>0)<($2>>>0); - if ($69) { - _abort(); - // unreachable; - } else { - HEAP32[$RP$0$lcssa>>2] = 0; - $R$1 = $R$0$lcssa; - break; - } - } else { - $$sum29 = (($$sum2) + 8)|0; - $48 = (($mem) + ($$sum29)|0); - $49 = HEAP32[$48>>2]|0; - $50 = ($49>>>0)<($2>>>0); - if ($50) { - _abort(); - // unreachable; - } - $51 = ((($49)) + 12|0); - $52 = HEAP32[$51>>2]|0; - $53 = ($52|0)==($14|0); - if (!($53)) { - _abort(); - // unreachable; - } - $54 = ((($46)) + 8|0); - $55 = HEAP32[$54>>2]|0; - $56 = ($55|0)==($14|0); - if ($56) { - HEAP32[$51>>2] = $46; - HEAP32[$54>>2] = $49; - $R$1 = $46; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $70 = ($44|0)==(0|0); - if ($70) { - $p$0 = $14;$psize$0 = $15; - } else { - $$sum26 = (($$sum2) + 28)|0; - $71 = (($mem) + ($$sum26)|0); - $72 = HEAP32[$71>>2]|0; - $73 = (96792 + ($72<<2)|0); - $74 = HEAP32[$73>>2]|0; - $75 = ($14|0)==($74|0); - if ($75) { - HEAP32[$73>>2] = $R$1; - $cond = ($R$1|0)==(0|0); - if ($cond) { - $76 = 1 << $72; - $77 = $76 ^ -1; - $78 = HEAP32[(96492)>>2]|0; - $79 = $78 & $77; - HEAP32[(96492)>>2] = $79; - $p$0 = $14;$psize$0 = $15; - break; - } - } else { - $80 = HEAP32[(96504)>>2]|0; - $81 = ($44>>>0)<($80>>>0); - if ($81) { - _abort(); - // unreachable; - } - $82 = ((($44)) + 16|0); - $83 = HEAP32[$82>>2]|0; - $84 = ($83|0)==($14|0); - if ($84) { - HEAP32[$82>>2] = $R$1; - } else { - $85 = ((($44)) + 20|0); - HEAP32[$85>>2] = $R$1; - } - $86 = ($R$1|0)==(0|0); - if ($86) { - $p$0 = $14;$psize$0 = $15; - break; - } - } - $87 = HEAP32[(96504)>>2]|0; - $88 = ($R$1>>>0)<($87>>>0); - if ($88) { - _abort(); - // unreachable; - } - $89 = ((($R$1)) + 24|0); - HEAP32[$89>>2] = $44; - $$sum27 = (($$sum2) + 16)|0; - $90 = (($mem) + ($$sum27)|0); - $91 = HEAP32[$90>>2]|0; - $92 = ($91|0)==(0|0); - do { - if (!($92)) { - $93 = ($91>>>0)<($87>>>0); - if ($93) { - _abort(); - // unreachable; - } else { - $94 = ((($R$1)) + 16|0); - HEAP32[$94>>2] = $91; - $95 = ((($91)) + 24|0); - HEAP32[$95>>2] = $R$1; - break; - } - } - } while(0); - $$sum28 = (($$sum2) + 20)|0; - $96 = (($mem) + ($$sum28)|0); - $97 = HEAP32[$96>>2]|0; - $98 = ($97|0)==(0|0); - if ($98) { - $p$0 = $14;$psize$0 = $15; - } else { - $99 = HEAP32[(96504)>>2]|0; - $100 = ($97>>>0)<($99>>>0); - if ($100) { - _abort(); - // unreachable; - } else { - $101 = ((($R$1)) + 20|0); - HEAP32[$101>>2] = $97; - $102 = ((($97)) + 24|0); - HEAP32[$102>>2] = $R$1; - $p$0 = $14;$psize$0 = $15; - break; - } - } - } - } else { - $p$0 = $1;$psize$0 = $8; - } - } while(0); - $110 = ($p$0>>>0)<($9>>>0); - if (!($110)) { - _abort(); - // unreachable; - } - $$sum19 = (($8) + -4)|0; - $111 = (($mem) + ($$sum19)|0); - $112 = HEAP32[$111>>2]|0; - $113 = $112 & 1; - $114 = ($113|0)==(0); - if ($114) { - _abort(); - // unreachable; - } - $115 = $112 & 2; - $116 = ($115|0)==(0); - if ($116) { - $117 = HEAP32[(96512)>>2]|0; - $118 = ($9|0)==($117|0); - if ($118) { - $119 = HEAP32[(96500)>>2]|0; - $120 = (($119) + ($psize$0))|0; - HEAP32[(96500)>>2] = $120; - HEAP32[(96512)>>2] = $p$0; - $121 = $120 | 1; - $122 = ((($p$0)) + 4|0); - HEAP32[$122>>2] = $121; - $123 = HEAP32[(96508)>>2]|0; - $124 = ($p$0|0)==($123|0); - if (!($124)) { - return; - } - HEAP32[(96508)>>2] = 0; - HEAP32[(96496)>>2] = 0; - return; - } - $125 = HEAP32[(96508)>>2]|0; - $126 = ($9|0)==($125|0); - if ($126) { - $127 = HEAP32[(96496)>>2]|0; - $128 = (($127) + ($psize$0))|0; - HEAP32[(96496)>>2] = $128; - HEAP32[(96508)>>2] = $p$0; - $129 = $128 | 1; - $130 = ((($p$0)) + 4|0); - HEAP32[$130>>2] = $129; - $131 = (($p$0) + ($128)|0); - HEAP32[$131>>2] = $128; - return; - } - $132 = $112 & -8; - $133 = (($132) + ($psize$0))|0; - $134 = $112 >>> 3; - $135 = ($112>>>0)<(256); - do { - if ($135) { - $136 = (($mem) + ($8)|0); - $137 = HEAP32[$136>>2]|0; - $$sum1718 = $8 | 4; - $138 = (($mem) + ($$sum1718)|0); - $139 = HEAP32[$138>>2]|0; - $140 = $134 << 1; - $141 = (96528 + ($140<<2)|0); - $142 = ($137|0)==($141|0); - if (!($142)) { - $143 = HEAP32[(96504)>>2]|0; - $144 = ($137>>>0)<($143>>>0); - if ($144) { - _abort(); - // unreachable; - } - $145 = ((($137)) + 12|0); - $146 = HEAP32[$145>>2]|0; - $147 = ($146|0)==($9|0); - if (!($147)) { - _abort(); - // unreachable; - } - } - $148 = ($139|0)==($137|0); - if ($148) { - $149 = 1 << $134; - $150 = $149 ^ -1; - $151 = HEAP32[96488>>2]|0; - $152 = $151 & $150; - HEAP32[96488>>2] = $152; - break; - } - $153 = ($139|0)==($141|0); - if ($153) { - $$pre58 = ((($139)) + 8|0); - $$pre$phi59Z2D = $$pre58; - } else { - $154 = HEAP32[(96504)>>2]|0; - $155 = ($139>>>0)<($154>>>0); - if ($155) { - _abort(); - // unreachable; - } - $156 = ((($139)) + 8|0); - $157 = HEAP32[$156>>2]|0; - $158 = ($157|0)==($9|0); - if ($158) { - $$pre$phi59Z2D = $156; - } else { - _abort(); - // unreachable; - } - } - $159 = ((($137)) + 12|0); - HEAP32[$159>>2] = $139; - HEAP32[$$pre$phi59Z2D>>2] = $137; - } else { - $$sum5 = (($8) + 16)|0; - $160 = (($mem) + ($$sum5)|0); - $161 = HEAP32[$160>>2]|0; - $$sum67 = $8 | 4; - $162 = (($mem) + ($$sum67)|0); - $163 = HEAP32[$162>>2]|0; - $164 = ($163|0)==($9|0); - do { - if ($164) { - $$sum9 = (($8) + 12)|0; - $175 = (($mem) + ($$sum9)|0); - $176 = HEAP32[$175>>2]|0; - $177 = ($176|0)==(0|0); - if ($177) { - $$sum8 = (($8) + 8)|0; - $178 = (($mem) + ($$sum8)|0); - $179 = HEAP32[$178>>2]|0; - $180 = ($179|0)==(0|0); - if ($180) { - $R7$1 = 0; - break; - } else { - $R7$0 = $179;$RP9$0 = $178; - } - } else { - $R7$0 = $176;$RP9$0 = $175; - } - while(1) { - $181 = ((($R7$0)) + 20|0); - $182 = HEAP32[$181>>2]|0; - $183 = ($182|0)==(0|0); - if (!($183)) { - $R7$0 = $182;$RP9$0 = $181; - continue; - } - $184 = ((($R7$0)) + 16|0); - $185 = HEAP32[$184>>2]|0; - $186 = ($185|0)==(0|0); - if ($186) { - $R7$0$lcssa = $R7$0;$RP9$0$lcssa = $RP9$0; - break; - } else { - $R7$0 = $185;$RP9$0 = $184; - } - } - $187 = HEAP32[(96504)>>2]|0; - $188 = ($RP9$0$lcssa>>>0)<($187>>>0); - if ($188) { - _abort(); - // unreachable; - } else { - HEAP32[$RP9$0$lcssa>>2] = 0; - $R7$1 = $R7$0$lcssa; - break; - } - } else { - $165 = (($mem) + ($8)|0); - $166 = HEAP32[$165>>2]|0; - $167 = HEAP32[(96504)>>2]|0; - $168 = ($166>>>0)<($167>>>0); - if ($168) { - _abort(); - // unreachable; - } - $169 = ((($166)) + 12|0); - $170 = HEAP32[$169>>2]|0; - $171 = ($170|0)==($9|0); - if (!($171)) { - _abort(); - // unreachable; - } - $172 = ((($163)) + 8|0); - $173 = HEAP32[$172>>2]|0; - $174 = ($173|0)==($9|0); - if ($174) { - HEAP32[$169>>2] = $163; - HEAP32[$172>>2] = $166; - $R7$1 = $163; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $189 = ($161|0)==(0|0); - if (!($189)) { - $$sum12 = (($8) + 20)|0; - $190 = (($mem) + ($$sum12)|0); - $191 = HEAP32[$190>>2]|0; - $192 = (96792 + ($191<<2)|0); - $193 = HEAP32[$192>>2]|0; - $194 = ($9|0)==($193|0); - if ($194) { - HEAP32[$192>>2] = $R7$1; - $cond47 = ($R7$1|0)==(0|0); - if ($cond47) { - $195 = 1 << $191; - $196 = $195 ^ -1; - $197 = HEAP32[(96492)>>2]|0; - $198 = $197 & $196; - HEAP32[(96492)>>2] = $198; - break; - } - } else { - $199 = HEAP32[(96504)>>2]|0; - $200 = ($161>>>0)<($199>>>0); - if ($200) { - _abort(); - // unreachable; - } - $201 = ((($161)) + 16|0); - $202 = HEAP32[$201>>2]|0; - $203 = ($202|0)==($9|0); - if ($203) { - HEAP32[$201>>2] = $R7$1; - } else { - $204 = ((($161)) + 20|0); - HEAP32[$204>>2] = $R7$1; - } - $205 = ($R7$1|0)==(0|0); - if ($205) { - break; - } - } - $206 = HEAP32[(96504)>>2]|0; - $207 = ($R7$1>>>0)<($206>>>0); - if ($207) { - _abort(); - // unreachable; - } - $208 = ((($R7$1)) + 24|0); - HEAP32[$208>>2] = $161; - $$sum13 = (($8) + 8)|0; - $209 = (($mem) + ($$sum13)|0); - $210 = HEAP32[$209>>2]|0; - $211 = ($210|0)==(0|0); - do { - if (!($211)) { - $212 = ($210>>>0)<($206>>>0); - if ($212) { - _abort(); - // unreachable; - } else { - $213 = ((($R7$1)) + 16|0); - HEAP32[$213>>2] = $210; - $214 = ((($210)) + 24|0); - HEAP32[$214>>2] = $R7$1; - break; - } - } - } while(0); - $$sum14 = (($8) + 12)|0; - $215 = (($mem) + ($$sum14)|0); - $216 = HEAP32[$215>>2]|0; - $217 = ($216|0)==(0|0); - if (!($217)) { - $218 = HEAP32[(96504)>>2]|0; - $219 = ($216>>>0)<($218>>>0); - if ($219) { - _abort(); - // unreachable; - } else { - $220 = ((($R7$1)) + 20|0); - HEAP32[$220>>2] = $216; - $221 = ((($216)) + 24|0); - HEAP32[$221>>2] = $R7$1; - break; - } - } - } - } - } while(0); - $222 = $133 | 1; - $223 = ((($p$0)) + 4|0); - HEAP32[$223>>2] = $222; - $224 = (($p$0) + ($133)|0); - HEAP32[$224>>2] = $133; - $225 = HEAP32[(96508)>>2]|0; - $226 = ($p$0|0)==($225|0); - if ($226) { - HEAP32[(96496)>>2] = $133; - return; - } else { - $psize$1 = $133; - } - } else { - $227 = $112 & -2; - HEAP32[$111>>2] = $227; - $228 = $psize$0 | 1; - $229 = ((($p$0)) + 4|0); - HEAP32[$229>>2] = $228; - $230 = (($p$0) + ($psize$0)|0); - HEAP32[$230>>2] = $psize$0; - $psize$1 = $psize$0; - } - $231 = $psize$1 >>> 3; - $232 = ($psize$1>>>0)<(256); - if ($232) { - $233 = $231 << 1; - $234 = (96528 + ($233<<2)|0); - $235 = HEAP32[96488>>2]|0; - $236 = 1 << $231; - $237 = $235 & $236; - $238 = ($237|0)==(0); - if ($238) { - $239 = $235 | $236; - HEAP32[96488>>2] = $239; - $$pre = (($233) + 2)|0; - $$pre57 = (96528 + ($$pre<<2)|0); - $$pre$phiZ2D = $$pre57;$F16$0 = $234; - } else { - $$sum11 = (($233) + 2)|0; - $240 = (96528 + ($$sum11<<2)|0); - $241 = HEAP32[$240>>2]|0; - $242 = HEAP32[(96504)>>2]|0; - $243 = ($241>>>0)<($242>>>0); - if ($243) { - _abort(); - // unreachable; - } else { - $$pre$phiZ2D = $240;$F16$0 = $241; - } - } - HEAP32[$$pre$phiZ2D>>2] = $p$0; - $244 = ((($F16$0)) + 12|0); - HEAP32[$244>>2] = $p$0; - $245 = ((($p$0)) + 8|0); - HEAP32[$245>>2] = $F16$0; - $246 = ((($p$0)) + 12|0); - HEAP32[$246>>2] = $234; - return; - } - $247 = $psize$1 >>> 8; - $248 = ($247|0)==(0); - if ($248) { - $I18$0 = 0; - } else { - $249 = ($psize$1>>>0)>(16777215); - if ($249) { - $I18$0 = 31; - } else { - $250 = (($247) + 1048320)|0; - $251 = $250 >>> 16; - $252 = $251 & 8; - $253 = $247 << $252; - $254 = (($253) + 520192)|0; - $255 = $254 >>> 16; - $256 = $255 & 4; - $257 = $256 | $252; - $258 = $253 << $256; - $259 = (($258) + 245760)|0; - $260 = $259 >>> 16; - $261 = $260 & 2; - $262 = $257 | $261; - $263 = (14 - ($262))|0; - $264 = $258 << $261; - $265 = $264 >>> 15; - $266 = (($263) + ($265))|0; - $267 = $266 << 1; - $268 = (($266) + 7)|0; - $269 = $psize$1 >>> $268; - $270 = $269 & 1; - $271 = $270 | $267; - $I18$0 = $271; - } - } - $272 = (96792 + ($I18$0<<2)|0); - $273 = ((($p$0)) + 28|0); - HEAP32[$273>>2] = $I18$0; - $274 = ((($p$0)) + 16|0); - $275 = ((($p$0)) + 20|0); - HEAP32[$275>>2] = 0; - HEAP32[$274>>2] = 0; - $276 = HEAP32[(96492)>>2]|0; - $277 = 1 << $I18$0; - $278 = $276 & $277; - $279 = ($278|0)==(0); - L199: do { - if ($279) { - $280 = $276 | $277; - HEAP32[(96492)>>2] = $280; - HEAP32[$272>>2] = $p$0; - $281 = ((($p$0)) + 24|0); - HEAP32[$281>>2] = $272; - $282 = ((($p$0)) + 12|0); - HEAP32[$282>>2] = $p$0; - $283 = ((($p$0)) + 8|0); - HEAP32[$283>>2] = $p$0; - } else { - $284 = HEAP32[$272>>2]|0; - $285 = ((($284)) + 4|0); - $286 = HEAP32[$285>>2]|0; - $287 = $286 & -8; - $288 = ($287|0)==($psize$1|0); - L201: do { - if ($288) { - $T$0$lcssa = $284; - } else { - $289 = ($I18$0|0)==(31); - $290 = $I18$0 >>> 1; - $291 = (25 - ($290))|0; - $292 = $289 ? 0 : $291; - $293 = $psize$1 << $292; - $K19$052 = $293;$T$051 = $284; - while(1) { - $300 = $K19$052 >>> 31; - $301 = (((($T$051)) + 16|0) + ($300<<2)|0); - $296 = HEAP32[$301>>2]|0; - $302 = ($296|0)==(0|0); - if ($302) { - $$lcssa = $301;$T$051$lcssa = $T$051; - break; - } - $294 = $K19$052 << 1; - $295 = ((($296)) + 4|0); - $297 = HEAP32[$295>>2]|0; - $298 = $297 & -8; - $299 = ($298|0)==($psize$1|0); - if ($299) { - $T$0$lcssa = $296; - break L201; - } else { - $K19$052 = $294;$T$051 = $296; - } - } - $303 = HEAP32[(96504)>>2]|0; - $304 = ($$lcssa>>>0)<($303>>>0); - if ($304) { - _abort(); - // unreachable; - } else { - HEAP32[$$lcssa>>2] = $p$0; - $305 = ((($p$0)) + 24|0); - HEAP32[$305>>2] = $T$051$lcssa; - $306 = ((($p$0)) + 12|0); - HEAP32[$306>>2] = $p$0; - $307 = ((($p$0)) + 8|0); - HEAP32[$307>>2] = $p$0; - break L199; - } - } - } while(0); - $308 = ((($T$0$lcssa)) + 8|0); - $309 = HEAP32[$308>>2]|0; - $310 = HEAP32[(96504)>>2]|0; - $311 = ($309>>>0)>=($310>>>0); - $not$ = ($T$0$lcssa>>>0)>=($310>>>0); - $312 = $311 & $not$; - if ($312) { - $313 = ((($309)) + 12|0); - HEAP32[$313>>2] = $p$0; - HEAP32[$308>>2] = $p$0; - $314 = ((($p$0)) + 8|0); - HEAP32[$314>>2] = $309; - $315 = ((($p$0)) + 12|0); - HEAP32[$315>>2] = $T$0$lcssa; - $316 = ((($p$0)) + 24|0); - HEAP32[$316>>2] = 0; - break; - } else { - _abort(); - // unreachable; - } - } - } while(0); - $317 = HEAP32[(96520)>>2]|0; - $318 = (($317) + -1)|0; - HEAP32[(96520)>>2] = $318; - $319 = ($318|0)==(0); - if ($319) { - $sp$0$in$i = (96944); - } else { - return; - } - while(1) { - $sp$0$i = HEAP32[$sp$0$in$i>>2]|0; - $320 = ($sp$0$i|0)==(0|0); - $321 = ((($sp$0$i)) + 8|0); - if ($320) { - break; - } else { - $sp$0$in$i = $321; - } - } - HEAP32[(96520)>>2] = -1; - return; -} -function _calloc($n_elements,$elem_size) { - $n_elements = $n_elements|0; - $elem_size = $elem_size|0; - var $$ = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $req$0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = ($n_elements|0)==(0); - if ($0) { - $req$0 = 0; - } else { - $1 = Math_imul($elem_size, $n_elements)|0; - $2 = $elem_size | $n_elements; - $3 = ($2>>>0)>(65535); - if ($3) { - $4 = (($1>>>0) / ($n_elements>>>0))&-1; - $5 = ($4|0)==($elem_size|0); - $$ = $5 ? $1 : -1; - $req$0 = $$; - } else { - $req$0 = $1; - } - } - $6 = (_malloc($req$0)|0); - $7 = ($6|0)==(0|0); - if ($7) { - return ($6|0); - } - $8 = ((($6)) + -4|0); - $9 = HEAP32[$8>>2]|0; - $10 = $9 & 3; - $11 = ($10|0)==(0); - if ($11) { - return ($6|0); - } - _memset(($6|0),0,($req$0|0))|0; - return ($6|0); -} -function runPostSets() { - -} -function _i64Subtract(a, b, c, d) { - a = a|0; b = b|0; c = c|0; d = d|0; - var l = 0, h = 0; - l = (a - c)>>>0; - h = (b - d)>>>0; - h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow. - return ((tempRet0 = h,l|0)|0); -} -function _memset(ptr, value, num) { - ptr = ptr|0; value = value|0; num = num|0; - var stop = 0, value4 = 0, stop4 = 0, unaligned = 0; - stop = (ptr + num)|0; - if ((num|0) >= 20) { - // This is unaligned, but quite large, so work hard to get to aligned settings - value = value & 0xff; - unaligned = ptr & 3; - value4 = value | (value << 8) | (value << 16) | (value << 24); - stop4 = stop & ~3; - if (unaligned) { - unaligned = (ptr + 4 - unaligned)|0; - while ((ptr|0) < (unaligned|0)) { // no need to check for stop, since we have large num - HEAP8[((ptr)>>0)]=value; - ptr = (ptr+1)|0; - } - } - while ((ptr|0) < (stop4|0)) { - HEAP32[ptr>>2]=value4; - ptr = (ptr+4)|0; - } - } - while ((ptr|0) < (stop|0)) { - HEAP8[((ptr)>>0)]=value; - ptr = (ptr+1)|0; - } - return (ptr-num)|0; -} -function _strlen(ptr) { - ptr = ptr|0; - var curr = 0; - curr = ptr; - while (((HEAP8[((curr)>>0)])|0)) { - curr = (curr + 1)|0; - } - return (curr - ptr)|0; -} -function _i64Add(a, b, c, d) { - /* - x = a + b*2^32 - y = c + d*2^32 - result = l + h*2^32 - */ - a = a|0; b = b|0; c = c|0; d = d|0; - var l = 0, h = 0; - l = (a + c)>>>0; - h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow. - return ((tempRet0 = h,l|0)|0); -} -function _bitshift64Lshr(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = high >>> bits; - return (low >>> bits) | ((high&ander) << (32 - bits)); - } - tempRet0 = 0; - return (high >>> (bits - 32))|0; -} -function _memcpy(dest, src, num) { - dest = dest|0; src = src|0; num = num|0; - var ret = 0; - if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0; - ret = dest|0; - if ((dest&3) == (src&3)) { - while (dest & 3) { - if ((num|0) == 0) return ret|0; - HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0); - dest = (dest+1)|0; - src = (src+1)|0; - num = (num-1)|0; - } - while ((num|0) >= 4) { - HEAP32[dest>>2]=((HEAP32[src>>2])|0); - dest = (dest+4)|0; - src = (src+4)|0; - num = (num-4)|0; - } - } - while ((num|0) > 0) { - HEAP8[dest>>0]=((HEAP8[src>>0])|0); - dest = (dest+1)|0; - src = (src+1)|0; - num = (num-1)|0; - } - return ret|0; -} -function _bitshift64Shl(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits)); - return low << bits; - } - tempRet0 = low << (bits - 32); - return 0; -} -function _bitshift64Ashr(low, high, bits) { - low = low|0; high = high|0; bits = bits|0; - var ander = 0; - if ((bits|0) < 32) { - ander = ((1 << bits) - 1)|0; - tempRet0 = high >> bits; - return (low >>> bits) | ((high&ander) << (32 - bits)); - } - tempRet0 = (high|0) < 0 ? -1 : 0; - return (high >> (bits - 32))|0; - } -function _llvm_cttz_i32(x) { - x = x|0; - var ret = 0; - ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0); - if ((ret|0) < 8) return ret|0; - ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 8)|0; - ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0); - if ((ret|0) < 8) return (ret + 16)|0; - return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0; - } - -// ======== compiled code from system/lib/compiler-rt , see readme therein -function ___muldsi3($a, $b) { - $a = $a | 0; - $b = $b | 0; - var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0; - $1 = $a & 65535; - $2 = $b & 65535; - $3 = Math_imul($2, $1) | 0; - $6 = $a >>> 16; - $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0; - $11 = $b >>> 16; - $12 = Math_imul($11, $1) | 0; - return (tempRet0 = (($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0, 0 | ($8 + $12 << 16 | $3 & 65535)) | 0; -} -function ___divdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $7$0 = 0, $7$1 = 0, $8$0 = 0, $10$0 = 0; - $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; - $4$1 = tempRet0; - $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; - $7$0 = $2$0 ^ $1$0; - $7$1 = $2$1 ^ $1$1; - $8$0 = ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, 0) | 0; - $10$0 = _i64Subtract($8$0 ^ $7$0, tempRet0 ^ $7$1, $7$0, $7$1) | 0; - return $10$0 | 0; -} -function ___remdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $rem = 0, $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $10$0 = 0, $10$1 = 0, __stackBase__ = 0; - __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; - $rem = __stackBase__ | 0; - $1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1; - $2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1; - $4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0; - $4$1 = tempRet0; - $6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0; - ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, $rem) | 0; - $10$0 = _i64Subtract(HEAP32[$rem >> 2] ^ $1$0, HEAP32[$rem + 4 >> 2] ^ $1$1, $1$0, $1$1) | 0; - $10$1 = tempRet0; - STACKTOP = __stackBase__; - return (tempRet0 = $10$1, $10$0) | 0; -} -function ___muldi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0; - $x_sroa_0_0_extract_trunc = $a$0; - $y_sroa_0_0_extract_trunc = $b$0; - $1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0; - $1$1 = tempRet0; - $2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0; - return (tempRet0 = ((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0, 0 | $1$0 & -1) | 0; -} -function ___udivdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $1$0 = 0; - $1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0; - return $1$0 | 0; -} -function ___uremdi3($a$0, $a$1, $b$0, $b$1) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - var $rem = 0, __stackBase__ = 0; - __stackBase__ = STACKTOP; - STACKTOP = STACKTOP + 8 | 0; - $rem = __stackBase__ | 0; - ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0; - STACKTOP = __stackBase__; - return (tempRet0 = HEAP32[$rem + 4 >> 2] | 0, HEAP32[$rem >> 2] | 0) | 0; -} -function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) { - $a$0 = $a$0 | 0; - $a$1 = $a$1 | 0; - $b$0 = $b$0 | 0; - $b$1 = $b$1 | 0; - $rem = $rem | 0; - var $n_sroa_0_0_extract_trunc = 0, $n_sroa_1_4_extract_shift$0 = 0, $n_sroa_1_4_extract_trunc = 0, $d_sroa_0_0_extract_trunc = 0, $d_sroa_1_4_extract_shift$0 = 0, $d_sroa_1_4_extract_trunc = 0, $4 = 0, $17 = 0, $37 = 0, $49 = 0, $51 = 0, $57 = 0, $58 = 0, $66 = 0, $78 = 0, $86 = 0, $88 = 0, $89 = 0, $91 = 0, $92 = 0, $95 = 0, $105 = 0, $117 = 0, $119 = 0, $125 = 0, $126 = 0, $130 = 0, $q_sroa_1_1_ph = 0, $q_sroa_0_1_ph = 0, $r_sroa_1_1_ph = 0, $r_sroa_0_1_ph = 0, $sr_1_ph = 0, $d_sroa_0_0_insert_insert99$0 = 0, $d_sroa_0_0_insert_insert99$1 = 0, $137$0 = 0, $137$1 = 0, $carry_0203 = 0, $sr_1202 = 0, $r_sroa_0_1201 = 0, $r_sroa_1_1200 = 0, $q_sroa_0_1199 = 0, $q_sroa_1_1198 = 0, $147 = 0, $149 = 0, $r_sroa_0_0_insert_insert42$0 = 0, $r_sroa_0_0_insert_insert42$1 = 0, $150$1 = 0, $151$0 = 0, $152 = 0, $154$0 = 0, $r_sroa_0_0_extract_trunc = 0, $r_sroa_1_4_extract_trunc = 0, $155 = 0, $carry_0_lcssa$0 = 0, $carry_0_lcssa$1 = 0, $r_sroa_0_1_lcssa = 0, $r_sroa_1_1_lcssa = 0, $q_sroa_0_1_lcssa = 0, $q_sroa_1_1_lcssa = 0, $q_sroa_0_0_insert_ext75$0 = 0, $q_sroa_0_0_insert_ext75$1 = 0, $q_sroa_0_0_insert_insert77$1 = 0, $_0$0 = 0, $_0$1 = 0; - $n_sroa_0_0_extract_trunc = $a$0; - $n_sroa_1_4_extract_shift$0 = $a$1; - $n_sroa_1_4_extract_trunc = $n_sroa_1_4_extract_shift$0; - $d_sroa_0_0_extract_trunc = $b$0; - $d_sroa_1_4_extract_shift$0 = $b$1; - $d_sroa_1_4_extract_trunc = $d_sroa_1_4_extract_shift$0; - if (($n_sroa_1_4_extract_trunc | 0) == 0) { - $4 = ($rem | 0) != 0; - if (($d_sroa_1_4_extract_trunc | 0) == 0) { - if ($4) { - HEAP32[$rem >> 2] = ($n_sroa_0_0_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); - HEAP32[$rem + 4 >> 2] = 0; - } - $_0$1 = 0; - $_0$0 = ($n_sroa_0_0_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } else { - if (!$4) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - HEAP32[$rem >> 2] = $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - } - $17 = ($d_sroa_1_4_extract_trunc | 0) == 0; - do { - if (($d_sroa_0_0_extract_trunc | 0) == 0) { - if ($17) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0); - HEAP32[$rem + 4 >> 2] = 0; - } - $_0$1 = 0; - $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - if (($n_sroa_0_0_extract_trunc | 0) == 0) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0; - HEAP32[$rem + 4 >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_1_4_extract_trunc >>> 0); - } - $_0$1 = 0; - $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_1_4_extract_trunc >>> 0) >>> 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - $37 = $d_sroa_1_4_extract_trunc - 1 | 0; - if (($37 & $d_sroa_1_4_extract_trunc | 0) == 0) { - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $37 & $n_sroa_1_4_extract_trunc | $a$1 & 0; - } - $_0$1 = 0; - $_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0); - return (tempRet0 = $_0$1, $_0$0) | 0; - } - $49 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; - $51 = $49 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - if ($51 >>> 0 <= 30) { - $57 = $51 + 1 | 0; - $58 = 31 - $51 | 0; - $sr_1_ph = $57; - $r_sroa_0_1_ph = $n_sroa_1_4_extract_trunc << $58 | $n_sroa_0_0_extract_trunc >>> ($57 >>> 0); - $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($57 >>> 0); - $q_sroa_0_1_ph = 0; - $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $58; - break; - } - if (($rem | 0) == 0) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } else { - if (!$17) { - $117 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0; - $119 = $117 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - if ($119 >>> 0 <= 31) { - $125 = $119 + 1 | 0; - $126 = 31 - $119 | 0; - $130 = $119 - 31 >> 31; - $sr_1_ph = $125; - $r_sroa_0_1_ph = $n_sroa_0_0_extract_trunc >>> ($125 >>> 0) & $130 | $n_sroa_1_4_extract_trunc << $126; - $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($125 >>> 0) & $130; - $q_sroa_0_1_ph = 0; - $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $126; - break; - } - if (($rem | 0) == 0) { - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - HEAP32[$rem >> 2] = 0 | $a$0 & -1; - HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$1 = 0; - $_0$0 = 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - $66 = $d_sroa_0_0_extract_trunc - 1 | 0; - if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) { - $86 = (Math_clz32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0; - $88 = $86 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0; - $89 = 64 - $88 | 0; - $91 = 32 - $88 | 0; - $92 = $91 >> 31; - $95 = $88 - 32 | 0; - $105 = $95 >> 31; - $sr_1_ph = $88; - $r_sroa_0_1_ph = $91 - 1 >> 31 & $n_sroa_1_4_extract_trunc >>> ($95 >>> 0) | ($n_sroa_1_4_extract_trunc << $91 | $n_sroa_0_0_extract_trunc >>> ($88 >>> 0)) & $105; - $r_sroa_1_1_ph = $105 & $n_sroa_1_4_extract_trunc >>> ($88 >>> 0); - $q_sroa_0_1_ph = $n_sroa_0_0_extract_trunc << $89 & $92; - $q_sroa_1_1_ph = ($n_sroa_1_4_extract_trunc << $89 | $n_sroa_0_0_extract_trunc >>> ($95 >>> 0)) & $92 | $n_sroa_0_0_extract_trunc << $91 & $88 - 33 >> 31; - break; - } - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = $66 & $n_sroa_0_0_extract_trunc; - HEAP32[$rem + 4 >> 2] = 0; - } - if (($d_sroa_0_0_extract_trunc | 0) == 1) { - $_0$1 = $n_sroa_1_4_extract_shift$0 | $a$1 & 0; - $_0$0 = 0 | $a$0 & -1; - return (tempRet0 = $_0$1, $_0$0) | 0; - } else { - $78 = _llvm_cttz_i32($d_sroa_0_0_extract_trunc | 0) | 0; - $_0$1 = 0 | $n_sroa_1_4_extract_trunc >>> ($78 >>> 0); - $_0$0 = $n_sroa_1_4_extract_trunc << 32 - $78 | $n_sroa_0_0_extract_trunc >>> ($78 >>> 0) | 0; - return (tempRet0 = $_0$1, $_0$0) | 0; - } - } - } while (0); - if (($sr_1_ph | 0) == 0) { - $q_sroa_1_1_lcssa = $q_sroa_1_1_ph; - $q_sroa_0_1_lcssa = $q_sroa_0_1_ph; - $r_sroa_1_1_lcssa = $r_sroa_1_1_ph; - $r_sroa_0_1_lcssa = $r_sroa_0_1_ph; - $carry_0_lcssa$1 = 0; - $carry_0_lcssa$0 = 0; - } else { - $d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1; - $d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0; - $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0 | 0, $d_sroa_0_0_insert_insert99$1 | 0, -1, -1) | 0; - $137$1 = tempRet0; - $q_sroa_1_1198 = $q_sroa_1_1_ph; - $q_sroa_0_1199 = $q_sroa_0_1_ph; - $r_sroa_1_1200 = $r_sroa_1_1_ph; - $r_sroa_0_1201 = $r_sroa_0_1_ph; - $sr_1202 = $sr_1_ph; - $carry_0203 = 0; - while (1) { - $147 = $q_sroa_0_1199 >>> 31 | $q_sroa_1_1198 << 1; - $149 = $carry_0203 | $q_sroa_0_1199 << 1; - $r_sroa_0_0_insert_insert42$0 = 0 | ($r_sroa_0_1201 << 1 | $q_sroa_1_1198 >>> 31); - $r_sroa_0_0_insert_insert42$1 = $r_sroa_0_1201 >>> 31 | $r_sroa_1_1200 << 1 | 0; - _i64Subtract($137$0, $137$1, $r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1) | 0; - $150$1 = tempRet0; - $151$0 = $150$1 >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1; - $152 = $151$0 & 1; - $154$0 = _i64Subtract($r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1, $151$0 & $d_sroa_0_0_insert_insert99$0, ((($150$1 | 0) < 0 ? -1 : 0) >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1) & $d_sroa_0_0_insert_insert99$1) | 0; - $r_sroa_0_0_extract_trunc = $154$0; - $r_sroa_1_4_extract_trunc = tempRet0; - $155 = $sr_1202 - 1 | 0; - if (($155 | 0) == 0) { - break; - } else { - $q_sroa_1_1198 = $147; - $q_sroa_0_1199 = $149; - $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc; - $sr_1202 = $155; - $carry_0203 = $152; - } - } - $q_sroa_1_1_lcssa = $147; - $q_sroa_0_1_lcssa = $149; - $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc; - $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc; - $carry_0_lcssa$1 = 0; - $carry_0_lcssa$0 = $152; - } - $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa; - $q_sroa_0_0_insert_ext75$1 = 0; - $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1; - if (($rem | 0) != 0) { - HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa; - HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0; - } - $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1; - $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0; - return (tempRet0 = $_0$1, $_0$0) | 0; -} -// ======================================================================= - - - - -function dynCall_iiii(index,a1,a2,a3) { - index = index|0; - a1=a1|0; a2=a2|0; a3=a3|0; - return FUNCTION_TABLE_iiii[index&3](a1|0,a2|0,a3|0)|0; -} - - -function dynCall_iiiii(index,a1,a2,a3,a4) { - index = index|0; - a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; - return FUNCTION_TABLE_iiiii[index&7](a1|0,a2|0,a3|0,a4|0)|0; -} - - -function dynCall_vii(index,a1,a2) { - index = index|0; - a1=a1|0; a2=a2|0; - FUNCTION_TABLE_vii[index&3](a1|0,a2|0); -} - - -function dynCall_iii(index,a1,a2) { - index = index|0; - a1=a1|0; a2=a2|0; - return FUNCTION_TABLE_iii[index&1](a1|0,a2|0)|0; -} - - -function dynCall_viiii(index,a1,a2,a3,a4) { - index = index|0; - a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; - FUNCTION_TABLE_viiii[index&7](a1|0,a2|0,a3|0,a4|0); -} - -function b0(p0,p1,p2) { p0 = p0|0;p1 = p1|0;p2 = p2|0; abort(0);return 0; } -function b1(p0,p1,p2,p3) { p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0; abort(1);return 0; } -function b2(p0,p1) { p0 = p0|0;p1 = p1|0; abort(2); } -function b3(p0,p1) { p0 = p0|0;p1 = p1|0; abort(3);return 0; } -function b4(p0,p1,p2,p3) { p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0; abort(4); } -function _init_xrpow_core_sse__wrapper(p0,p1,p2,p3) { p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0; _init_xrpow_core_sse(p0|0,p1|0,p2|0,p3|0); } - -// EMSCRIPTEN_END_FUNCS -var FUNCTION_TABLE_iiii = [b0,_sn_write,_choose_table_nonMMX,b0]; -var FUNCTION_TABLE_iiiii = [b1,_count_bit_null,_count_bit_noESC,_count_bit_noESC_from2,_count_bit_noESC_from3,b1,b1,b1]; -var FUNCTION_TABLE_vii = [b2,_fht,_lame_report_def,b2]; -var FUNCTION_TABLE_iii = [b3,_floatcompare]; -var FUNCTION_TABLE_viiii = [b4,_VBR_new_iteration_loop,_VBR_old_iteration_loop,_CBR_iteration_loop,_ABR_iteration_loop,_init_xrpow_core_sse__wrapper,_init_xrpow_core_c,b4]; - - return { _i64Subtract: _i64Subtract, _lame_set_brate: _lame_set_brate, _lame_encode_buffer_ieee_float: _lame_encode_buffer_ieee_float, _lame_close: _lame_close, _lame_set_in_samplerate: _lame_set_in_samplerate, _i64Add: _i64Add, _lame_set_num_channels: _lame_set_num_channels, _strlen: _strlen, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, _lame_init: _lame_init, _bitshift64Lshr: _bitshift64Lshr, _free: _free, _lame_init_params: _lame_init_params, _lame_encode_flush: _lame_encode_flush, _bitshift64Shl: _bitshift64Shl, _lame_set_mode: _lame_set_mode, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, establishStackSpace: establishStackSpace, setThrew: setThrew, setTempRet0: setTempRet0, getTempRet0: getTempRet0, dynCall_iiii: dynCall_iiii, dynCall_iiiii: dynCall_iiiii, dynCall_vii: dynCall_vii, dynCall_iii: dynCall_iii, dynCall_viiii: dynCall_viiii }; -}) -// EMSCRIPTEN_END_ASM -(Module.asmGlobalArg, Module.asmLibraryArg, buffer); -var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"]; -var _lame_set_brate = Module["_lame_set_brate"] = asm["_lame_set_brate"]; -var _lame_encode_buffer_ieee_float = Module["_lame_encode_buffer_ieee_float"] = asm["_lame_encode_buffer_ieee_float"]; -var runPostSets = Module["runPostSets"] = asm["runPostSets"]; -var _lame_close = Module["_lame_close"] = asm["_lame_close"]; -var _lame_set_in_samplerate = Module["_lame_set_in_samplerate"] = asm["_lame_set_in_samplerate"]; -var _i64Add = Module["_i64Add"] = asm["_i64Add"]; -var _lame_set_num_channels = Module["_lame_set_num_channels"] = asm["_lame_set_num_channels"]; -var _strlen = Module["_strlen"] = asm["_strlen"]; -var _memset = Module["_memset"] = asm["_memset"]; -var _malloc = Module["_malloc"] = asm["_malloc"]; -var _lame_set_mode = Module["_lame_set_mode"] = asm["_lame_set_mode"]; -var _memcpy = Module["_memcpy"] = asm["_memcpy"]; -var _lame_init = Module["_lame_init"] = asm["_lame_init"]; -var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"]; -var _free = Module["_free"] = asm["_free"]; -var _lame_init_params = Module["_lame_init_params"] = asm["_lame_init_params"]; -var _lame_encode_flush = Module["_lame_encode_flush"] = asm["_lame_encode_flush"]; -var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"]; -var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"]; -var dynCall_iiiii = Module["dynCall_iiiii"] = asm["dynCall_iiiii"]; -var dynCall_vii = Module["dynCall_vii"] = asm["dynCall_vii"]; -var dynCall_iii = Module["dynCall_iii"] = asm["dynCall_iii"]; -var dynCall_viiii = Module["dynCall_viiii"] = asm["dynCall_viiii"]; -; - -Runtime.stackAlloc = asm['stackAlloc']; -Runtime.stackSave = asm['stackSave']; -Runtime.stackRestore = asm['stackRestore']; -Runtime.establishStackSpace = asm['establishStackSpace']; - -Runtime.setTempRet0 = asm['setTempRet0']; -Runtime.getTempRet0 = asm['getTempRet0']; - - -// TODO: strip out parts of this we do not need - -//======= begin closure i64 code ======= - -// Copyright 2009 The Closure Library Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Defines a Long class for representing a 64-bit two's-complement - * integer value, which faithfully simulates the behavior of a Java "long". This - * implementation is derived from LongLib in GWT. - * - */ - -var i64Math = (function() { // Emscripten wrapper - var goog = { math: {} }; - - - /** - * Constructs a 64-bit two's-complement integer, given its low and high 32-bit - * values as *signed* integers. See the from* functions below for more - * convenient ways of constructing Longs. - * - * The internal representation of a long is the two given signed, 32-bit values. - * We use 32-bit pieces because these are the size of integers on which - * Javascript performs bit-operations. For operations like addition and - * multiplication, we split each number into 16-bit pieces, which can easily be - * multiplied within Javascript's floating-point representation without overflow - * or change in sign. - * - * In the algorithms below, we frequently reduce the negative case to the - * positive case by negating the input(s) and then post-processing the result. - * Note that we must ALWAYS check specially whether those values are MIN_VALUE - * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as - * a positive number, it overflows back into a negative). Not handling this - * case would often result in infinite recursion. - * - * @param {number} low The low (signed) 32 bits of the long. - * @param {number} high The high (signed) 32 bits of the long. - * @constructor - */ - goog.math.Long = function(low, high) { - /** - * @type {number} - * @private - */ - this.low_ = low | 0; // force into 32 signed bits. - - /** - * @type {number} - * @private - */ - this.high_ = high | 0; // force into 32 signed bits. - }; - - - // NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the - // from* methods on which they depend. - - - /** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @private - */ - goog.math.Long.IntCache_ = {}; - - - /** - * Returns a Long representing the given (32-bit) integer value. - * @param {number} value The 32-bit integer in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromInt = function(value) { - if (-128 <= value && value < 128) { - var cachedObj = goog.math.Long.IntCache_[value]; - if (cachedObj) { - return cachedObj; - } - } - - var obj = new goog.math.Long(value | 0, value < 0 ? -1 : 0); - if (-128 <= value && value < 128) { - goog.math.Long.IntCache_[value] = obj; - } - return obj; - }; - - - /** - * Returns a Long representing the given value, provided that it is a finite - * number. Otherwise, zero is returned. - * @param {number} value The number in question. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromNumber = function(value) { - if (isNaN(value) || !isFinite(value)) { - return goog.math.Long.ZERO; - } else if (value <= -goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MIN_VALUE; - } else if (value + 1 >= goog.math.Long.TWO_PWR_63_DBL_) { - return goog.math.Long.MAX_VALUE; - } else if (value < 0) { - return goog.math.Long.fromNumber(-value).negate(); - } else { - return new goog.math.Long( - (value % goog.math.Long.TWO_PWR_32_DBL_) | 0, - (value / goog.math.Long.TWO_PWR_32_DBL_) | 0); - } - }; - - - /** - * Returns a Long representing the 64-bit integer that comes by concatenating - * the given high and low bits. Each is assumed to use 32 bits. - * @param {number} lowBits The low 32-bits. - * @param {number} highBits The high 32-bits. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromBits = function(lowBits, highBits) { - return new goog.math.Long(lowBits, highBits); - }; - - - /** - * Returns a Long representation of the given string, written using the given - * radix. - * @param {string} str The textual representation of the Long. - * @param {number=} opt_radix The radix in which the text is written. - * @return {!goog.math.Long} The corresponding Long value. - */ - goog.math.Long.fromString = function(str, opt_radix) { - if (str.length == 0) { - throw Error('number format error: empty string'); - } - - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (str.charAt(0) == '-') { - return goog.math.Long.fromString(str.substring(1), radix).negate(); - } else if (str.indexOf('-') >= 0) { - throw Error('number format error: interior "-" character: ' + str); - } - - // Do several (8) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 8)); - - var result = goog.math.Long.ZERO; - for (var i = 0; i < str.length; i += 8) { - var size = Math.min(8, str.length - i); - var value = parseInt(str.substring(i, i + size), radix); - if (size < 8) { - var power = goog.math.Long.fromNumber(Math.pow(radix, size)); - result = result.multiply(power).add(goog.math.Long.fromNumber(value)); - } else { - result = result.multiply(radixToPower); - result = result.add(goog.math.Long.fromNumber(value)); - } - } - return result; - }; - - - // NOTE: the compiler should inline these constant values below and then remove - // these variables, so there should be no runtime penalty for these. - - - /** - * Number used repeated below in calculations. This must appear before the - * first call to any from* function below. - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_16_DBL_ = 1 << 16; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_24_DBL_ = 1 << 24; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_32_DBL_ = - goog.math.Long.TWO_PWR_16_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_31_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ / 2; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_48_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_16_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_64_DBL_ = - goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_32_DBL_; - - - /** - * @type {number} - * @private - */ - goog.math.Long.TWO_PWR_63_DBL_ = - goog.math.Long.TWO_PWR_64_DBL_ / 2; - - - /** @type {!goog.math.Long} */ - goog.math.Long.ZERO = goog.math.Long.fromInt(0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.ONE = goog.math.Long.fromInt(1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.NEG_ONE = goog.math.Long.fromInt(-1); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MAX_VALUE = - goog.math.Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0); - - - /** @type {!goog.math.Long} */ - goog.math.Long.MIN_VALUE = goog.math.Long.fromBits(0, 0x80000000 | 0); - - - /** - * @type {!goog.math.Long} - * @private - */ - goog.math.Long.TWO_PWR_24_ = goog.math.Long.fromInt(1 << 24); - - - /** @return {number} The value, assuming it is a 32-bit integer. */ - goog.math.Long.prototype.toInt = function() { - return this.low_; - }; - - - /** @return {number} The closest floating-point representation to this value. */ - goog.math.Long.prototype.toNumber = function() { - return this.high_ * goog.math.Long.TWO_PWR_32_DBL_ + - this.getLowBitsUnsigned(); - }; - - - /** - * @param {number=} opt_radix The radix in which the text should be written. - * @return {string} The textual representation of this value. - */ - goog.math.Long.prototype.toString = function(opt_radix) { - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error('radix out of range: ' + radix); - } - - if (this.isZero()) { - return '0'; - } - - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - // We need to change the Long value before it can be negated, so we remove - // the bottom-most digit in this base and then recurse to do the rest. - var radixLong = goog.math.Long.fromNumber(radix); - var div = this.div(radixLong); - var rem = div.multiply(radixLong).subtract(this); - return div.toString(radix) + rem.toInt().toString(radix); - } else { - return '-' + this.negate().toString(radix); - } - } - - // Do several (6) digits each time through the loop, so as to - // minimize the calls to the very expensive emulated div. - var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 6)); - - var rem = this; - var result = ''; - while (true) { - var remDiv = rem.div(radixToPower); - var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt(); - var digits = intval.toString(radix); - - rem = remDiv; - if (rem.isZero()) { - return digits + result; - } else { - while (digits.length < 6) { - digits = '0' + digits; - } - result = '' + digits + result; - } - } - }; - - - /** @return {number} The high 32-bits as a signed value. */ - goog.math.Long.prototype.getHighBits = function() { - return this.high_; - }; - - - /** @return {number} The low 32-bits as a signed value. */ - goog.math.Long.prototype.getLowBits = function() { - return this.low_; - }; - - - /** @return {number} The low 32-bits as an unsigned value. */ - goog.math.Long.prototype.getLowBitsUnsigned = function() { - return (this.low_ >= 0) ? - this.low_ : goog.math.Long.TWO_PWR_32_DBL_ + this.low_; - }; - - - /** - * @return {number} Returns the number of bits needed to represent the absolute - * value of this Long. - */ - goog.math.Long.prototype.getNumBitsAbs = function() { - if (this.isNegative()) { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return 64; - } else { - return this.negate().getNumBitsAbs(); - } - } else { - var val = this.high_ != 0 ? this.high_ : this.low_; - for (var bit = 31; bit > 0; bit--) { - if ((val & (1 << bit)) != 0) { - break; - } - } - return this.high_ != 0 ? bit + 33 : bit + 1; - } - }; - - - /** @return {boolean} Whether this value is zero. */ - goog.math.Long.prototype.isZero = function() { - return this.high_ == 0 && this.low_ == 0; - }; - - - /** @return {boolean} Whether this value is negative. */ - goog.math.Long.prototype.isNegative = function() { - return this.high_ < 0; - }; - - - /** @return {boolean} Whether this value is odd. */ - goog.math.Long.prototype.isOdd = function() { - return (this.low_ & 1) == 1; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long equals the other. - */ - goog.math.Long.prototype.equals = function(other) { - return (this.high_ == other.high_) && (this.low_ == other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long does not equal the other. - */ - goog.math.Long.prototype.notEquals = function(other) { - return (this.high_ != other.high_) || (this.low_ != other.low_); - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than the other. - */ - goog.math.Long.prototype.lessThan = function(other) { - return this.compare(other) < 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is less than or equal to the other. - */ - goog.math.Long.prototype.lessThanOrEqual = function(other) { - return this.compare(other) <= 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than the other. - */ - goog.math.Long.prototype.greaterThan = function(other) { - return this.compare(other) > 0; - }; - - - /** - * @param {goog.math.Long} other Long to compare against. - * @return {boolean} Whether this Long is greater than or equal to the other. - */ - goog.math.Long.prototype.greaterThanOrEqual = function(other) { - return this.compare(other) >= 0; - }; - - - /** - * Compares this Long with the given one. - * @param {goog.math.Long} other Long to compare against. - * @return {number} 0 if they are the same, 1 if the this is greater, and -1 - * if the given one is greater. - */ - goog.math.Long.prototype.compare = function(other) { - if (this.equals(other)) { - return 0; - } - - var thisNeg = this.isNegative(); - var otherNeg = other.isNegative(); - if (thisNeg && !otherNeg) { - return -1; - } - if (!thisNeg && otherNeg) { - return 1; - } - - // at this point, the signs are the same, so subtraction will not overflow - if (this.subtract(other).isNegative()) { - return -1; - } else { - return 1; - } - }; - - - /** @return {!goog.math.Long} The negation of this value. */ - goog.math.Long.prototype.negate = function() { - if (this.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.MIN_VALUE; - } else { - return this.not().add(goog.math.Long.ONE); - } - }; - - - /** - * Returns the sum of this and the given Long. - * @param {goog.math.Long} other Long to add to this one. - * @return {!goog.math.Long} The sum of this and the given Long. - */ - goog.math.Long.prototype.add = function(other) { - // Divide each number into 4 chunks of 16 bits, and then sum the chunks. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 + b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns the difference of this and the given Long. - * @param {goog.math.Long} other Long to subtract from this. - * @return {!goog.math.Long} The difference of this and the given Long. - */ - goog.math.Long.prototype.subtract = function(other) { - return this.add(other.negate()); - }; - - - /** - * Returns the product of this and the given long. - * @param {goog.math.Long} other Long to multiply with this. - * @return {!goog.math.Long} The product of this and the other. - */ - goog.math.Long.prototype.multiply = function(other) { - if (this.isZero()) { - return goog.math.Long.ZERO; - } else if (other.isZero()) { - return goog.math.Long.ZERO; - } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - return other.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return this.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().multiply(other.negate()); - } else { - return this.negate().multiply(other).negate(); - } - } else if (other.isNegative()) { - return this.multiply(other.negate()).negate(); - } - - // If both longs are small, use float multiplication - if (this.lessThan(goog.math.Long.TWO_PWR_24_) && - other.lessThan(goog.math.Long.TWO_PWR_24_)) { - return goog.math.Long.fromNumber(this.toNumber() * other.toNumber()); - } - - // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products. - // We can skip products that would overflow. - - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 0xFFFF; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 0xFFFF; - - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 0xFFFF; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 0xFFFF; - - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 0xFFFF; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 0xFFFF; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 0xFFFF; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 0xFFFF; - return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32); - }; - - - /** - * Returns this Long divided by the given one. - * @param {goog.math.Long} other Long by which to divide. - * @return {!goog.math.Long} This Long divided by the given one. - */ - goog.math.Long.prototype.div = function(other) { - if (other.isZero()) { - throw Error('division by zero'); - } else if (this.isZero()) { - return goog.math.Long.ZERO; - } - - if (this.equals(goog.math.Long.MIN_VALUE)) { - if (other.equals(goog.math.Long.ONE) || - other.equals(goog.math.Long.NEG_ONE)) { - return goog.math.Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ONE; - } else { - // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|. - var halfThis = this.shiftRight(1); - var approx = halfThis.div(other).shiftLeft(1); - if (approx.equals(goog.math.Long.ZERO)) { - return other.isNegative() ? goog.math.Long.ONE : goog.math.Long.NEG_ONE; - } else { - var rem = this.subtract(other.multiply(approx)); - var result = approx.add(rem.div(other)); - return result; - } - } - } else if (other.equals(goog.math.Long.MIN_VALUE)) { - return goog.math.Long.ZERO; - } - - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().div(other.negate()); - } else { - return this.negate().div(other).negate(); - } - } else if (other.isNegative()) { - return this.div(other.negate()).negate(); - } - - // Repeat the following until the remainder is less than other: find a - // floating-point that approximates remainder / other *from below*, add this - // into the result, and subtract it from the remainder. It is critical that - // the approximate value is less than or equal to the real value so that the - // remainder never becomes negative. - var res = goog.math.Long.ZERO; - var rem = this; - while (rem.greaterThanOrEqual(other)) { - // Approximate the result of division. This may be a little greater or - // smaller than the actual value. - var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber())); - - // We will tweak the approximate result by changing it in the 48-th digit or - // the smallest non-fractional digit, whichever is larger. - var log2 = Math.ceil(Math.log(approx) / Math.LN2); - var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48); - - // Decrease the approximation until it is smaller than the remainder. Note - // that if it is too large, the product overflows and is negative. - var approxRes = goog.math.Long.fromNumber(approx); - var approxRem = approxRes.multiply(other); - while (approxRem.isNegative() || approxRem.greaterThan(rem)) { - approx -= delta; - approxRes = goog.math.Long.fromNumber(approx); - approxRem = approxRes.multiply(other); - } - - // We know the answer can't be zero... and actually, zero would cause - // infinite recursion since we would make no progress. - if (approxRes.isZero()) { - approxRes = goog.math.Long.ONE; - } - - res = res.add(approxRes); - rem = rem.subtract(approxRem); - } - return res; - }; - - - /** - * Returns this Long modulo the given one. - * @param {goog.math.Long} other Long by which to mod. - * @return {!goog.math.Long} This Long modulo the given one. - */ - goog.math.Long.prototype.modulo = function(other) { - return this.subtract(this.div(other).multiply(other)); - }; - - - /** @return {!goog.math.Long} The bitwise-NOT of this value. */ - goog.math.Long.prototype.not = function() { - return goog.math.Long.fromBits(~this.low_, ~this.high_); - }; - - - /** - * Returns the bitwise-AND of this Long and the given one. - * @param {goog.math.Long} other The Long with which to AND. - * @return {!goog.math.Long} The bitwise-AND of this and the other. - */ - goog.math.Long.prototype.and = function(other) { - return goog.math.Long.fromBits(this.low_ & other.low_, - this.high_ & other.high_); - }; - - - /** - * Returns the bitwise-OR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to OR. - * @return {!goog.math.Long} The bitwise-OR of this and the other. - */ - goog.math.Long.prototype.or = function(other) { - return goog.math.Long.fromBits(this.low_ | other.low_, - this.high_ | other.high_); - }; - - - /** - * Returns the bitwise-XOR of this Long and the given one. - * @param {goog.math.Long} other The Long with which to XOR. - * @return {!goog.math.Long} The bitwise-XOR of this and the other. - */ - goog.math.Long.prototype.xor = function(other) { - return goog.math.Long.fromBits(this.low_ ^ other.low_, - this.high_ ^ other.high_); - }; - - - /** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the left by the given amount. - */ - goog.math.Long.prototype.shiftLeft = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var low = this.low_; - if (numBits < 32) { - var high = this.high_; - return goog.math.Long.fromBits( - low << numBits, - (high << numBits) | (low >>> (32 - numBits))); - } else { - return goog.math.Long.fromBits(0, low << (numBits - 32)); - } - } - }; - - - /** - * Returns this Long with bits shifted to the right by the given amount. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount. - */ - goog.math.Long.prototype.shiftRight = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >> numBits); - } else { - return goog.math.Long.fromBits( - high >> (numBits - 32), - high >= 0 ? 0 : -1); - } - } - }; - - - /** - * Returns this Long with bits shifted to the right by the given amount, with - * the new top bits matching the current sign bit. - * @param {number} numBits The number of bits by which to shift. - * @return {!goog.math.Long} This shifted to the right by the given amount, with - * zeros placed into the new leading bits. - */ - goog.math.Long.prototype.shiftRightUnsigned = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return goog.math.Long.fromBits( - (low >>> numBits) | (high << (32 - numBits)), - high >>> numBits); - } else if (numBits == 32) { - return goog.math.Long.fromBits(high, 0); - } else { - return goog.math.Long.fromBits(high >>> (numBits - 32), 0); - } - } - }; - - //======= begin jsbn ======= - - var navigator = { appName: 'Modern Browser' }; // polyfill a little - - // Copyright (c) 2005 Tom Wu - // All Rights Reserved. - // http://www-cs-students.stanford.edu/~tjw/jsbn/ - - /* - * Copyright (c) 2003-2005 Tom Wu - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF - * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * In addition, the following condition applies: - * - * All redistributions must retain an intact copy of this copyright notice - * and disclaimer. - */ - - // Basic JavaScript BN library - subset useful for RSA encryption. - - // Bits per digit - var dbits; - - // JavaScript engine analysis - var canary = 0xdeadbeefcafe; - var j_lm = ((canary&0xffffff)==0xefcafe); - - // (public) Constructor - function BigInteger(a,b,c) { - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); - } - - // return new, unset BigInteger - function nbi() { return new BigInteger(null); } - - // am: Compute w_j += (x*this_i), propagate carries, - // c is initial carry, returns final carry. - // c < 3*dvalue, x < 2*dvalue, this_i < dvalue - // We need to select the fastest one that works in this environment. - - // am1: use a single mult and divide to get the high bits, - // max digit bits should be 26 because - // max internal value = 2*dvalue^2-2*dvalue (< 2^53) - function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this[i++]+w[j]+c; - c = Math.floor(v/0x4000000); - w[j++] = v&0x3ffffff; - } - return c; - } - // am2 avoids a big mult-and-extract completely. - // Max digit bits should be <= 30 because we do bitwise ops - // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this[i]&0x7fff; - var h = this[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w[j++] = l&0x3fffffff; - } - return c; - } - // Alternately, set max digit bits to 28 since some - // browsers slow down when dealing with 32-bit numbers. - function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this[i]&0x3fff; - var h = this[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w[j++] = l&0xfffffff; - } - return c; - } - if(j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; - } - else if(j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; - } - else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; - } - - BigInteger.prototype.DB = dbits; - BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; - } - - // (protected) set from integer value x, -DV <= x < DV - function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+DV; - else this.t = 0; - } - - // return bigint initialized to value - function nbv(i) { var r = nbi(); r.fromInt(i); return r; } - - // (protected) set from string and radix - function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; - } - mi = false; - if(sh == 0) - this[this.t++] = x; - else if(sh+k > this.DB) { - this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); - } - else - this[this.t-1] |= x<= this.DB) sh -= this.DB; - } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; - } - - // (public) return string representation in given radix - function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this[i]&((1<>(p+=this.DB-k); - } - else { - d = (this[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } - } - if(d > 0) m = true; - if(m) r += int2char(d); - } - } - return m?r:"0"; - } - - // (public) -this - function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } - - // (public) |this| - function bnAbs() { return (this.s<0)?this.negate():this; } - - // (public) return + if this > a, - if this < a, 0 if equal - function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; - return 0; - } - - // returns bit length of the integer x - function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; - } - - // (public) return the number of bits in "this" - function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); - } - - // (protected) r = this << n*DB - function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; - for(i = n-1; i >= 0; --i) r[i] = 0; - r.t = this.t+n; - r.s = this.s; - } - - // (protected) r = this >> n*DB - function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r[i-n] = this[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; - } - - // (protected) r = this << n - function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r[i+ds+1] = (this[i]>>cbs)|c; - c = (this[i]&bm)<= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); - } - - // (protected) r = this >> n - function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r[i-ds-1] |= (this[i]&bm)<>bs; - } - if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c -= a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c -= a.s; - } - r.s = (c<0)?-1:0; - if(c < -1) r[i++] = this.DV+c; - else if(c > 0) r[i++] = c; - r.t = i; - r.clamp(); - } - - // (protected) r = this * a, r != this,a (HAC 14.12) - // "this" should be the larger one if appropriate. - function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); - } - - // (protected) r = this^2, r != this (HAC 14.16) - function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x[i],r,2*i,0,1); - if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r[i+x.t] -= x.DV; - r[i+x.t+1] = 1; - } - } - if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); - r.s = 0; - r.clamp(); - } - - // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) - // r != q, this != m. q or r may be null. - function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; - } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } - else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r[r.t++] = 1; - r.subTo(t,r); - } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); - if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r[i] < --qd) r.subTo(t,r); - } - } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); - } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); - } - - // (public) this mod a - function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; - } - - // Modular reduction using "classic" algorithm - function Classic(m) { this.m = m; } - function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; - } - function cRevert(x) { return x; } - function cReduce(x) { x.divRemTo(this.m,null,x); } - function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - Classic.prototype.convert = cConvert; - Classic.prototype.revert = cRevert; - Classic.prototype.reduce = cReduce; - Classic.prototype.mulTo = cMulTo; - Classic.prototype.sqrTo = cSqrTo; - - // (protected) return "-1/this % 2^DB"; useful for Mont. reduction - // justification: - // xy == 1 (mod m) - // xy = 1+km - // xy(2-xy) = (1+km)(1-km) - // x[y(2-xy)] = 1-k^2m^2 - // x[y(2-xy)] == 1 (mod m^2) - // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 - // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. - // JS multiply "overflows" differently from C/C++, so care is needed here. - function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; - } - - // Montgomery reduction - function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; - } - - // xR mod m - function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; - } - - // x/R mod m - function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; - } - - // x = x/R mod m (HAC 14.32) - function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } - } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = "x^2/R mod m"; x != r - function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = "xy/R mod m"; x,y != r - function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Montgomery.prototype.convert = montConvert; - Montgomery.prototype.revert = montRevert; - Montgomery.prototype.reduce = montReduce; - Montgomery.prototype.mulTo = montMulTo; - Montgomery.prototype.sqrTo = montSqrTo; - - // (protected) true iff this is even - function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } - - // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } - } - return z.revert(r); - } - - // (public) this^e % m, 0 <= e < 2^32 - function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); - } - - // protected - BigInteger.prototype.copyTo = bnpCopyTo; - BigInteger.prototype.fromInt = bnpFromInt; - BigInteger.prototype.fromString = bnpFromString; - BigInteger.prototype.clamp = bnpClamp; - BigInteger.prototype.dlShiftTo = bnpDLShiftTo; - BigInteger.prototype.drShiftTo = bnpDRShiftTo; - BigInteger.prototype.lShiftTo = bnpLShiftTo; - BigInteger.prototype.rShiftTo = bnpRShiftTo; - BigInteger.prototype.subTo = bnpSubTo; - BigInteger.prototype.multiplyTo = bnpMultiplyTo; - BigInteger.prototype.squareTo = bnpSquareTo; - BigInteger.prototype.divRemTo = bnpDivRemTo; - BigInteger.prototype.invDigit = bnpInvDigit; - BigInteger.prototype.isEven = bnpIsEven; - BigInteger.prototype.exp = bnpExp; - - // public - BigInteger.prototype.toString = bnToString; - BigInteger.prototype.negate = bnNegate; - BigInteger.prototype.abs = bnAbs; - BigInteger.prototype.compareTo = bnCompareTo; - BigInteger.prototype.bitLength = bnBitLength; - BigInteger.prototype.mod = bnMod; - BigInteger.prototype.modPowInt = bnModPowInt; - - // "constants" - BigInteger.ZERO = nbv(0); - BigInteger.ONE = nbv(1); - - // jsbn2 stuff - - // (protected) convert from radix string - function bnpFromRadix(s,b) { - this.fromInt(0); - if(b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b,cs), mi = false, j = 0, w = 0; - for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } - } - if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); - } - if(mi) BigInteger.ZERO.subTo(this,this); - } - - // (protected) return x s.t. r^x < DV - function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } - - // (public) 0 if this == 0, 1 if this > 0 - function bnSigNum() { - if(this.s < 0) return -1; - else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; - } - - // (protected) this *= n, this >= 0, 1 < n < DV - function bnpDMultiply(n) { - this[this.t] = this.am(0,n-1,this,0,0,this.t); - ++this.t; - this.clamp(); - } - - // (protected) this += n << w words, this >= 0 - function bnpDAddOffset(n,w) { - if(n == 0) return; - while(this.t <= w) this[this.t++] = 0; - this[w] += n; - while(this[w] >= this.DV) { - this[w] -= this.DV; - if(++w >= this.t) this[this.t++] = 0; - ++this[w]; - } - } - - // (protected) convert to radix string - function bnpToRadix(b) { - if(b == null) b = 10; - if(this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b,cs); - var d = nbv(a), y = nbi(), z = nbi(), r = ""; - this.divRemTo(d,y,z); - while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); - } - return z.intValue().toString(b) + r; - } - - // (public) return value as integer - function bnIntValue() { - if(this.s < 0) { - if(this.t == 1) return this[0]-this.DV; - else if(this.t == 0) return -1; - } - else if(this.t == 1) return this[0]; - else if(this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1]&((1<<(32-this.DB))-1))<>= this.DB; - } - if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c += a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c<0)?-1:0; - if(c > 0) r[i++] = c; - else if(c < -1) r[i++] = this.DV+c; - r.t = i; - r.clamp(); - } - - BigInteger.prototype.fromRadix = bnpFromRadix; - BigInteger.prototype.chunkSize = bnpChunkSize; - BigInteger.prototype.signum = bnSigNum; - BigInteger.prototype.dMultiply = bnpDMultiply; - BigInteger.prototype.dAddOffset = bnpDAddOffset; - BigInteger.prototype.toRadix = bnpToRadix; - BigInteger.prototype.intValue = bnIntValue; - BigInteger.prototype.addTo = bnpAddTo; - - //======= end jsbn ======= - - // Emscripten wrapper - var Wrapper = { - abs: function(l, h) { - var x = new goog.math.Long(l, h); - var ret; - if (x.isNegative()) { - ret = x.negate(); - } else { - ret = x; - } - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - }, - ensureTemps: function() { - if (Wrapper.ensuredTemps) return; - Wrapper.ensuredTemps = true; - Wrapper.two32 = new BigInteger(); - Wrapper.two32.fromString('4294967296', 10); - Wrapper.two64 = new BigInteger(); - Wrapper.two64.fromString('18446744073709551616', 10); - Wrapper.temp1 = new BigInteger(); - Wrapper.temp2 = new BigInteger(); - }, - lh2bignum: function(l, h) { - var a = new BigInteger(); - a.fromString(h.toString(), 10); - var b = new BigInteger(); - a.multiplyTo(Wrapper.two32, b); - var c = new BigInteger(); - c.fromString(l.toString(), 10); - var d = new BigInteger(); - c.addTo(b, d); - return d; - }, - stringify: function(l, h, unsigned) { - var ret = new goog.math.Long(l, h).toString(); - if (unsigned && ret[0] == '-') { - // unsign slowly using jsbn bignums - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(ret, 10); - ret = new BigInteger(); - Wrapper.two64.addTo(bignum, ret); - ret = ret.toString(10); - } - return ret; - }, - fromString: function(str, base, min, max, unsigned) { - Wrapper.ensureTemps(); - var bignum = new BigInteger(); - bignum.fromString(str, base); - var bigmin = new BigInteger(); - bigmin.fromString(min, 10); - var bigmax = new BigInteger(); - bigmax.fromString(max, 10); - if (unsigned && bignum.compareTo(BigInteger.ZERO) < 0) { - var temp = new BigInteger(); - bignum.addTo(Wrapper.two64, temp); - bignum = temp; - } - var error = false; - if (bignum.compareTo(bigmin) < 0) { - bignum = bigmin; - error = true; - } else if (bignum.compareTo(bigmax) > 0) { - bignum = bigmax; - error = true; - } - var ret = goog.math.Long.fromString(bignum.toString()); // min-max checks should have clamped this to a range goog.math.Long can handle well - HEAP32[tempDoublePtr>>2] = ret.low_; - HEAP32[tempDoublePtr+4>>2] = ret.high_; - if (error) throw 'range error'; - } - }; - return Wrapper; -})(); - -//======= end closure i64 code ======= - - - -// === Auto-generated postamble setup entry stuff === - - -function ExitStatus(status) { - this.name = "ExitStatus"; - this.message = "Program terminated with exit(" + status + ")"; - this.status = status; -}; -ExitStatus.prototype = new Error(); -ExitStatus.prototype.constructor = ExitStatus; - -var initialStackTop; -var preloadStartTime = null; -var calledMain = false; - -dependenciesFulfilled = function runCaller() { - // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) - if (!Module['calledRun']) run(); - if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled -} - -Module['callMain'] = Module.callMain = function callMain(args) { - assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)'); - assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); - - args = args || []; - - ensureInitRuntime(); - - var argc = args.length+1; - function pad() { - for (var i = 0; i < 4-1; i++) { - argv.push(0); - } - } - var argv = [allocate(intArrayFromString(Module['thisProgram']), 'i8', ALLOC_NORMAL) ]; - pad(); - for (var i = 0; i < argc-1; i = i + 1) { - argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL)); - pad(); - } - argv.push(0); - argv = allocate(argv, 'i32', ALLOC_NORMAL); - - initialStackTop = STACKTOP; - - try { - - var ret = Module['_main'](argc, argv, 0); - - - // if we're not running an evented main loop, it's time to exit - exit(ret, /* implicit = */ true); - } - catch(e) { - if (e instanceof ExitStatus) { - // exit() throws this once it's done to make sure execution - // has been stopped completely - return; - } else if (e == 'SimulateInfiniteLoop') { - // running an evented main loop, don't immediately exit - Module['noExitRuntime'] = true; - return; - } else { - if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]); - throw e; - } - } finally { - calledMain = true; - } -} - - - - -function run(args) { - args = args || Module['arguments']; - - if (preloadStartTime === null) preloadStartTime = Date.now(); - - if (runDependencies > 0) { - return; - } - - preRun(); - - if (runDependencies > 0) return; // a preRun added a dependency, run will be called later - if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame - - function doRun() { - if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening - Module['calledRun'] = true; - - if (ABORT) return; - - ensureInitRuntime(); - - preMain(); - - if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) { - Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms'); - } - - if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); - - if (Module['_main'] && shouldRunNow) Module['callMain'](args); - - postRun(); - } - - if (Module['setStatus']) { - Module['setStatus']('Running...'); - setTimeout(function() { - setTimeout(function() { - Module['setStatus'](''); - }, 1); - doRun(); - }, 1); - } else { - doRun(); - } -} -Module['run'] = Module.run = run; - -function exit(status, implicit) { - if (implicit && Module['noExitRuntime']) { - return; - } - - if (Module['noExitRuntime']) { - } else { - - ABORT = true; - EXITSTATUS = status; - STACKTOP = initialStackTop; - - exitRuntime(); - - if (Module['onExit']) Module['onExit'](status); - } - - if (ENVIRONMENT_IS_NODE) { - // Work around a node.js bug where stdout buffer is not flushed at process exit: - // Instead of process.exit() directly, wait for stdout flush event. - // See https://github.com/joyent/node/issues/1669 and https://github.com/kripken/emscripten/issues/2582 - // Workaround is based on https://github.com/RReverser/acorn/commit/50ab143cecc9ed71a2d66f78b4aec3bb2e9844f6 - process['stdout']['once']('drain', function () { - process['exit'](status); - }); - console.log(' '); // Make sure to print something to force the drain event to occur, in case the stdout buffer was empty. - // Work around another node bug where sometimes 'drain' is never fired - make another effort - // to emit the exit status, after a significant delay (if node hasn't fired drain by then, give up) - setTimeout(function() { - process['exit'](status); - }, 500); - } else - if (ENVIRONMENT_IS_SHELL && typeof quit === 'function') { - quit(status); - } - // if we reach here, we must throw an exception to halt the current execution - throw new ExitStatus(status); -} -Module['exit'] = Module.exit = exit; - -var abortDecorators = []; - -function abort(what) { - if (what !== undefined) { - Module.print(what); - Module.printErr(what); - what = JSON.stringify(what) - } else { - what = ''; - } - - ABORT = true; - EXITSTATUS = 1; - - var extra = '\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.'; - - var output = 'abort(' + what + ') at ' + stackTrace() + extra; - if (abortDecorators) { - abortDecorators.forEach(function(decorator) { - output = decorator(output, what); - }); - } - throw output; -} -Module['abort'] = Module.abort = abort; - -// {{PRE_RUN_ADDITIONS}} - -if (Module['preInit']) { - if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; - while (Module['preInit'].length > 0) { - Module['preInit'].pop()(); - } -} - -// shouldRunNow refers to calling main(), not run(). -var shouldRunNow = true; -if (Module['noInitialRun']) { - shouldRunNow = false; -} - - -run(); - -// {{POST_RUN_ADDITIONS}} - - - - - - -// {{MODULE_ADDITIONS}} - - - - var NUM_CH = 2, - HEAPU8 = Module.HEAPU8, - malloc = Module._malloc, - free = Module._free, - lame_init = Module._lame_init, - lame_set_mode = Module._lame_set_mode, - lame_set_num_channels = Module._lame_set_num_channels, - lame_set_in_samplerate = Module._lame_set_in_samplerate, - lame_set_brate = Module._lame_set_brate, - lame_init_params = Module._lame_init_params, - lame_encode_buffer_ieee_float = Module._lame_encode_buffer_ieee_float, - lame_encode_flush = Module._lame_encode_flush, - lame_close = Module._lame_close; - - var Encoder = function(sampleRate, bitRate) { - this.gfp = lame_init(); - lame_set_mode(this.gfp, 1/*JOINT_STEREO*/); - lame_set_num_channels(this.gfp, NUM_CH); - lame_set_in_samplerate(this.gfp, sampleRate); - lame_set_brate(this.gfp, bitRate); - lame_init_params(this.gfp); - this.allocBuffers(8192); - this.mp3Buffers = []; - }; - - Encoder.prototype.encode = function(buffers) { - var length = buffers[0].length; - if (length > this.srcLen) { - this.freeBuffers(); - this.allocBuffers(length); - } - for (var ch = 0; ch < NUM_CH; ++ch) - this.srcBuf[ch].set(buffers[ch]); - var nBytes = lame_encode_buffer_ieee_float( - this.gfp, this.srcPtr[0], this.srcPtr[1], length, - this.dstPtr, this.dstSz); - this.mp3Buffers.push(new Uint8Array(this.dstBuf.subarray(0, nBytes))); - }; - - Encoder.prototype.finish = function(mimeType) { - var nBytes = lame_encode_flush(this.gfp, this.dstPtr, this.dstSz); - this.mp3Buffers.push(new Uint8Array(this.dstBuf.subarray(0, nBytes))); - var blob = new Blob(this.mp3Buffers, {type: mimeType || 'audio/mpeg'}); - this.cleanup(); - return blob; - }; - - Encoder.prototype.cancel = Encoder.prototype.cleanup = function() { - lame_close(this.gfp); - delete this.gfp; - delete this.mp3Buffers; - this.freeBuffers(); - }; - - Encoder.prototype.allocBuffers = function(srcLen) { - this.srcLen = srcLen; - this.srcPtr = []; - this.srcBuf = []; - for (var ch = 0; ch < NUM_CH; ++ch) { - this.srcPtr[ch] = malloc(this.srcLen * 4); - this.srcBuf[ch] = new Float32Array(HEAPU8.buffer, - this.srcPtr[ch], this.srcLen); - } - this.dstSz = Math.ceil(1.25 * this.srcLen) + 7200; // see lame.h - this.dstPtr = malloc(this.dstSz); - this.dstBuf = new Uint8Array(HEAPU8.buffer, this.dstPtr, this.dstSz); - }; - - Encoder.prototype.freeBuffers = function() { - delete this.dstBuf; - delete this.srcBuf; - free(this.dstPtr); - for (var ch = 0; ch < NUM_CH; ++ch) - free(this.srcPtr[ch]); - delete this.dstPtr; - delete this.srcPtr; - }; - - self.Mp3LameEncoder = Encoder; -})(self); - diff --git a/js/WebAudioRecorderMp3.js b/js/WebAudioRecorderMp3.js index b6f73c22f7..0bfc4101a0 100644 --- a/js/WebAudioRecorderMp3.js +++ b/js/WebAudioRecorderMp3.js @@ -1,91 +1 @@ -importScripts("Mp3LameEncoder.min.js"); - -var NUM_CH = 2, // constant - sampleRate = 44100, - options = undefined, - maxBuffers = undefined, - encoder = undefined, - recBuffers = undefined, - bufferCount = 0; - -function error(message) { - self.postMessage({ command: "error", message: "mp3: " + message }); -} - -function init(data) { - if (data.config.numChannels === NUM_CH) { - sampleRate = data.config.sampleRate; - options = data.options; - } else - error("numChannels must be " + NUM_CH); -}; - -function setOptions(opt) { - if (encoder || recBuffers) - error("cannot set options during recording"); - else - options = opt; -} - -function start(bufferSize) { - maxBuffers = Math.ceil(options.timeLimit * sampleRate / bufferSize); - if (options.encodeAfterRecord) - recBuffers = []; - else - encoder = new Mp3LameEncoder(sampleRate, options.mp3.bitRate); -} - -function record(buffer) { - if (bufferCount++ < maxBuffers) - if (encoder) - encoder.encode(buffer); - else - recBuffers.push(buffer); - else - self.postMessage({ command: "timeout" }); -}; - -function postProgress(progress) { - self.postMessage({ command: "progress", progress: progress }); -}; - -function finish() { - if (recBuffers) { - postProgress(0); - encoder = new Mp3LameEncoder(sampleRate, options.mp3.bitRate); - var timeout = Date.now() + options.progressInterval; - while (recBuffers.length > 0) { - encoder.encode(recBuffers.shift()); - var now = Date.now(); - if (now > timeout) { - postProgress((bufferCount - recBuffers.length) / bufferCount); - timeout = now + options.progressInterval; - } - } - postProgress(1); - } - self.postMessage({ - command: "complete", - blob: encoder.finish(options.mp3.mimeType) - }); - cleanup(); -}; - -function cleanup() { - encoder = recBuffers = undefined; - bufferCount = 0; -} - -self.onmessage = function(event) { - var data = event.data; - switch (data.command) { - case "init": init(data); break; - case "options": setOptions(data.options); break; - case "start": start(data.bufferSize); break; - case "record": record(data.buffer); break; - case "finish": finish(); break; - case "cancel": cleanup(); - } -}; - -self.postMessage({ command: "loaded" }); +(function(self){var Module=self.Mp3LameEncoderConfig,Module;Module||(Module=(void 0!==Module?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=function(x){process.stdout.write(x+"\n")}),Module.printErr||(Module.printErr=function(x){process.stderr.write(x+"\n")});var nodeFS=require("fs"),nodePath=require("path");Module.read=function(filename,binary){filename=nodePath.normalize(filename);var ret=nodeFS.readFileSync(filename);return ret||filename==nodePath.resolve(filename)||(filename=path.join(__dirname,"..","src",filename),ret=nodeFS.readFileSync(filename)),ret&&!binary&&(ret=ret.toString()),ret},Module.readBinary=function(filename){return Module.read(filename,!0)},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(ex){if(!(ex instanceof ExitStatus))throw ex}),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),"undefined"!=typeof printErr&&(Module.printErr=printErr),"undefined"!=typeof read?Module.read=read:Module.read=function(){throw"no read() available (jsc?)"},Module.readBinary=function(f){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(f));var data=read(f,"binary");return assert("object"==typeof data),data},"undefined"!=typeof scriptArgs?Module.arguments=scriptArgs:void 0!==arguments&&(Module.arguments=arguments);else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(url){var xhr=new XMLHttpRequest;return xhr.open("GET",url,!1),xhr.send(null),xhr.responseText},void 0!==arguments&&(Module.arguments=arguments),"undefined"!=typeof console)Module.print||(Module.print=function(x){console.log(x)}),Module.printErr||(Module.printErr=function(x){console.log(x)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&"undefined"!=typeof dump?function(x){dump(x)}:function(x){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),void 0===Module.setWindowTitle&&(Module.setWindowTitle=function(title){document.title=title})}for(var key in Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[],moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);var Runtime={setTempRet0:function(value){tempRet0=value},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(stackTop){STACKTOP=stackTop},getNativeTypeSize:function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":case"float":return 4;case"i64":case"double":return 8;default:if("*"===type[type.length-1])return Runtime.QUANTUM_SIZE;if("i"===type[0]){var bits=parseInt(type.substr(1));return assert(bits%8==0),bits/8}return 0}},getNativeFieldSize:function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(ptr,type){return"double"===type||"i64"===type?7&ptr&&(assert(4==(7&ptr)),ptr+=4):assert(!(3&ptr)),ptr},getAlignSize:function(type,size,vararg){return vararg||"i64"!=type&&"double"!=type?type?Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE):Math.min(size,8):8},dynCall:function(sig,ptr,args){return args&&args.length?(args.splice||(args=Array.prototype.slice.call(args)),args.splice(0,0,ptr),Module["dynCall_"+sig].apply(null,args)):Module["dynCall_"+sig].call(null,ptr)},functionPointers:[],addFunction:function(func){for(var i=0;i=TOTAL_MEMORY&&!enlargeMemory())return DYNAMICTOP=ret,0;return ret},alignMemory:function(size,quantum){return size=Math.ceil(size/(quantum||16))*(quantum||16)},makeBigInt:function(low,high,unsigned){return unsigned?+(low>>>0)+4294967296*+(high>>>0):+(low>>>0)+4294967296*+(0|high)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var __THREW__=0,ABORT=!1,EXITSTATUS=0,undef=0,tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat,tempI64,tempI64b,tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9;function assert(condition,text){condition||abort("Assertion failed: "+text)}var globalScope=this,cwrap,ccall;function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(ptr,value,type,noSafe){switch("*"===(type=type||"i8").charAt(type.length-1)&&(type="i32"),type){case"i1":case"i8":HEAP8[ptr|0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}function getValue(ptr,type,noSafe){switch("*"===(type=type||"i8").charAt(type.length-1)&&(type="i32"),type){case"i1":case"i8":return HEAP8[ptr|0];case"i16":return HEAP16[ptr>>1];case"i32":case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(arr){var ret=Runtime.stackAlloc(arr.length);return writeArrayToMemory(arr,ret),ret},stringToC:function(str){var ret=0;return null!=str&&0!==str&&writeStringToMemory(str,ret=Runtime.stackAlloc(1+(str.length<<2))),ret}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(ident,returnType,argTypes,args,opts){var func=getCFunc(ident),cArgs=[],stack=0;if(args)for(var i=0;i>2]=0;for(stop=ret+size;ptr0;)curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,1024))),ret=ret?ret+curr:curr,ptr+=1024,length-=1024;return ret}return Module.UTF8ToString(ptr)}function AsciiToString(ptr){for(var str="";;){var ch=HEAP8[ptr++|0];if(!ch)return str;str+=String.fromCharCode(ch)}}function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,!1)}function UTF8ArrayToString(u8Array,idx){for(var u0,u1,u2,u3,u4,str="";;){if(!(u0=u8Array[idx++]))return str;if(128&u0)if(u1=63&u8Array[idx++],192!=(224&u0))if(u2=63&u8Array[idx++],224==(240&u0)?u0=(15&u0)<<12|u1<<6|u2:(u3=63&u8Array[idx++],240==(248&u0)?u0=(7&u0)<<18|u1<<12|u2<<6|u3:(u4=63&u8Array[idx++],u0=248==(252&u0)?(3&u0)<<24|u1<<18|u2<<12|u3<<6|u4:(1&u0)<<30|u1<<24|u2<<18|u3<<12|u4<<6|63&u8Array[idx++])),u0<65536)str+=String.fromCharCode(u0);else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|1023&ch)}else str+=String.fromCharCode((31&u0)<<6|u1);else str+=String.fromCharCode(u0)}}function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;for(var startIdx=outIdx,endIdx=outIdx+maxBytesToWrite-1,i=0;i=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&str.charCodeAt(++i)),u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6,outU8Array[outIdx++]=128|63&u}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12,outU8Array[outIdx++]=128|u>>6&63,outU8Array[outIdx++]=128|63&u}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18,outU8Array[outIdx++]=128|u>>12&63,outU8Array[outIdx++]=128|u>>6&63,outU8Array[outIdx++]=128|63&u}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24,outU8Array[outIdx++]=128|u>>18&63,outU8Array[outIdx++]=128|u>>12&63,outU8Array[outIdx++]=128|u>>6&63,outU8Array[outIdx++]=128|63&u}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30,outU8Array[outIdx++]=128|u>>24&63,outU8Array[outIdx++]=128|u>>18&63,outU8Array[outIdx++]=128|u>>12&63,outU8Array[outIdx++]=128|u>>6&63,outU8Array[outIdx++]=128|63&u}}return outU8Array[outIdx]=0,outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){for(var len=0,i=0;i=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&str.charCodeAt(++i)),u<=127?++len:len+=u<=2047?2:u<=65535?3:u<=2097151?4:u<=67108863?5:6}return len}function UTF16ToString(ptr){for(var i=0,str="";;){var codeUnit=HEAP16[ptr+2*i>>1];if(0==codeUnit)return str;++i,str+=String.fromCharCode(codeUnit)}}function stringToUTF16(str,outPtr,maxBytesToWrite){if(void 0===maxBytesToWrite&&(maxBytesToWrite=2147483647),maxBytesToWrite<2)return 0;for(var startPtr=outPtr,numCharsToWrite=(maxBytesToWrite-=2)<2*str.length?maxBytesToWrite/2:str.length,i=0;i>1]=codeUnit,outPtr+=2}return HEAP16[outPtr>>1]=0,outPtr-startPtr}function lengthBytesUTF16(str){return 2*str.length}function UTF32ToString(ptr){for(var i=0,str="";;){var utf32=HEAP32[ptr+4*i>>2];if(0==utf32)return str;if(++i,utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|1023&ch)}else str+=String.fromCharCode(utf32)}}function stringToUTF32(str,outPtr,maxBytesToWrite){if(void 0===maxBytesToWrite&&(maxBytesToWrite=2147483647),maxBytesToWrite<4)return 0;for(var startPtr=outPtr,endPtr=startPtr+maxBytesToWrite-4,i=0;i=55296&&codeUnit<=57343)codeUnit=65536+((1023&codeUnit)<<10)|1023&str.charCodeAt(++i);if(HEAP32[outPtr>>2]=codeUnit,(outPtr+=4)+4>endPtr)break}return HEAP32[outPtr>>2]=0,outPtr-startPtr}function lengthBytesUTF32(str){for(var len=0,i=0;i=55296&&codeUnit<=57343&&++i,len+=4}return len}function demangle(func){var hasLibcxxabi=!!Module.___cxa_demangle;if(hasLibcxxabi)try{var buf=_malloc(func.length);writeStringToMemory(func.substr(1),buf);var status=_malloc(4),ret=Module.___cxa_demangle(buf,0,0,status);if(0===getValue(status,"i32")&&ret)return Pointer_stringify(ret)}catch(e){}finally{buf&&_free(buf),status&&_free(status),ret&&_free(ret)}var i=3,basicTypes={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},subs=[],first=!0;var parsed=func;try{if("Object._main"==func||"_main"==func)return"main()";if("number"==typeof func&&(func=Pointer_stringify(func)),"_"!==func[0])return func;if("_"!==func[1])return func;if("Z"!==func[2])return func;switch(func[3]){case"n":return"operator new()";case"d":return"operator delete()"}parsed=function parse(rawList,limit,allowVoid){limit=limit||1/0;var name,ret="",list=[];if("N"===func[i]){if(name=function(){i++,"K"===func[i]&&i++;for(var parts=[];"E"!==func[i];)if("S"!==func[i])if("C"!==func[i]){var size=parseInt(func.substr(i)),pre=size.toString().length;if(!size||!pre){i--;break}var curr=func.substr(i+pre,size);parts.push(curr),subs.push(curr),i+=pre+size}else parts.push(parts[parts.length-1]),i+=2;else{i++;var next=func.indexOf("_",i),num=func.substring(i,next)||0;parts.push(subs[num]||"?"),i=next+1}return i++,parts}().join("::"),0===--limit)return rawList?[name]:name}else if(("K"===func[i]||first&&"L"===func[i])&&i++,size=parseInt(func.substr(i))){var pre=size.toString().length;name=func.substr(i+pre,size),i+=pre+size}if(first=!1,"I"===func[i]){i++;var iList=parse(!0);ret+=parse(!0,1,!0)[0]+" "+name+"<"+iList.join(", ")+">"}else ret=name;paramLoop:for(;i0;){var c=func[i++];if(c in basicTypes)list.push(basicTypes[c]);else switch(c){case"P":list.push(parse(!0,1,!0)[0]+"*");break;case"R":list.push(parse(!0,1,!0)[0]+"&");break;case"L":i++;var size=func.indexOf("E",i)-i;list.push(func.substr(i,size)),i+=size+2;break;case"A":if(size=parseInt(func.substr(i)),i+=size.toString().length,"_"!==func[i])throw"?";i++,list.push(parse(!0,1,!0)[0]+" ["+size+"]");break;case"E":break paramLoop;default:ret+="?"+c;break paramLoop}}return allowVoid||1!==list.length||"void"!==list[0]||(list=[]),rawList?(ret&&list.push(ret+"?"),list):ret+"("+list.join(", ")+")"}()}catch(e){parsed+="?"}return parsed.indexOf("?")>=0&&!hasLibcxxabi&&Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),parsed}function demangleAll(text){return text.replace(/__Z[\w\d_]+/g,function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack)return"(no stack trace available)"}return err.stack.toString()}function stackTrace(){return demangleAll(jsStackTrace())}Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE,Module.allocate=allocate,Module.getMemory=getMemory,Module.Pointer_stringify=Pointer_stringify,Module.AsciiToString=AsciiToString,Module.stringToAscii=stringToAscii,Module.UTF8ArrayToString=UTF8ArrayToString,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8Array=stringToUTF8Array,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.UTF16ToString=UTF16ToString,Module.stringToUTF16=stringToUTF16,Module.lengthBytesUTF16=lengthBytesUTF16,Module.UTF32ToString=UTF32ToString,Module.stringToUTF32=stringToUTF32,Module.lengthBytesUTF32=lengthBytesUTF32,Module.stackTrace=stackTrace;var PAGE_SIZE=4096,HEAP,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function alignMemoryPage(x){return x%4096>0&&(x+=4096-x%4096),x}var STATIC_BASE=0,STATICTOP=0,staticSealed=!1,STACK_BASE=0,STACKTOP=0,STACK_MAX=0,DYNAMIC_BASE=0,DYNAMICTOP=0;function enlargeMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.")}for(var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216,totalMemory=65536,buffer;totalMemory0;){var callback=callbacks.shift();if("function"!=typeof callback){var func=callback.func;"number"==typeof func?void 0===callback.arg?Runtime.dynCall("v",func):Runtime.dynCall("vi",func,[callback.arg]):func(void 0===callback.arg?null:callback.arg)}else callback()}}totalMemory!==TOTAL_MEMORY&&(Module.printErr("increasing TOTAL_MEMORY to "+totalMemory+" to be compliant with the asm.js spec (and given that TOTAL_STACK="+TOTAL_STACK+")"),TOTAL_MEMORY=totalMemory),assert("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&!!new Int32Array(1).subarray&&!!new Int32Array(1).set,"JS engine does not provide full typed array support"),buffer=new ArrayBuffer(TOTAL_MEMORY),HEAP8=new Int8Array(buffer),HEAP16=new Int16Array(buffer),HEAP32=new Int32Array(buffer),HEAPU8=new Uint8Array(buffer),HEAPU16=new Uint16Array(buffer),HEAPU32=new Uint32Array(buffer),HEAPF32=new Float32Array(buffer),HEAPF64=new Float64Array(buffer),HEAP32[0]=255,assert(255===HEAPU8[0]&&0===HEAPU8[3],"Typed arrays 2 must be run on a little-endian system"),Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPreMain(cb){__ATMAIN__.unshift(cb)}function addOnExit(cb){__ATEXIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1,u8array=new Array(len),numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);return dontAddNull&&(u8array.length=numBytesWritten),u8array}function intArrayToString(array){for(var ret=[],i=0;i255&&(chr&=255),ret.push(String.fromCharCode(chr))}return ret.join("")}function writeStringToMemory(string,buffer,dontAddNull){for(var array=intArrayFromString(string,dontAddNull),i=0;i=0?value:bits<=32?2*Math.abs(1<=half&&(bits<=32||value>half)&&(value=-2*half+value),value}Module.addOnPreRun=Module.addOnPreRun=addOnPreRun,Module.addOnInit=Module.addOnInit=addOnInit,Module.addOnPreMain=Module.addOnPreMain=addOnPreMain,Module.addOnExit=Module.addOnExit=addOnExit,Module.addOnPostRun=Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(a,b){var al=65535&a,bl=65535&b;return al*bl+((a>>>16)*bl+al*(b>>>16)<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(x){x>>>=0;for(var i=0;i<32;i++)if(x&1<<31-i)return i;return 32}),Math.clz32=Math.clz32;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_min=Math.min,Math_clz32=Math.clz32,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(id){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var callback=dependenciesFulfilled;dependenciesFulfilled=null,callback()}}Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var memoryInitializer=null,ASM_CONSTS=[];STATIC_BASE=8,STATICTOP=STATIC_BASE+96992,__ATINIT__.push(),allocate([69,114,114,111,114,58,32,99,97,110,39,116,32,97,108,108,111,99,97,116,101,32,86,98,114,70,114,97,109,101,115,32,98,117,102,102,101,114,10,0,0,0,0,0,193,192,0,0,129,193,0,0,64,1,0,0,1,195,0,0,192,3,0,0,128,2,0,0,65,194,0,0,1,198,0,0,192,6,0,0,128,7,0,0,65,199,0,0,0,5,0,0,193,197,0,0,129,196,0,0,64,4,0,0,1,204,0,0,192,12,0,0,128,13,0,0,65,205,0,0,0,15,0,0,193,207,0,0,129,206,0,0,64,14,0,0,0,10,0,0,193,202,0,0,129,203,0,0,64,11,0,0,1,201,0,0,192,9,0,0,128,8,0,0,65,200,0,0,1,216,0,0,192,24,0,0,128,25,0,0,65,217,0,0,0,27,0,0,193,219,0,0,129,218,0,0,64,26,0,0,0,30,0,0,193,222,0,0,129,223,0,0,64,31,0,0,1,221,0,0,192,29,0,0,128,28,0,0,65,220,0,0,0,20,0,0,193,212,0,0,129,213,0,0,64,21,0,0,1,215,0,0,192,23,0,0,128,22,0,0,65,214,0,0,1,210,0,0,192,18,0,0,128,19,0,0,65,211,0,0,0,17,0,0,193,209,0,0,129,208,0,0,64,16,0,0,1,240,0,0,192,48,0,0,128,49,0,0,65,241,0,0,0,51,0,0,193,243,0,0,129,242,0,0,64,50,0,0,0,54,0,0,193,246,0,0,129,247,0,0,64,55,0,0,1,245,0,0,192,53,0,0,128,52,0,0,65,244,0,0,0,60,0,0,193,252,0,0,129,253,0,0,64,61,0,0,1,255,0,0,192,63,0,0,128,62,0,0,65,254,0,0,1,250,0,0,192,58,0,0,128,59,0,0,65,251,0,0,0,57,0,0,193,249,0,0,129,248,0,0,64,56,0,0,0,40,0,0,193,232,0,0,129,233,0,0,64,41,0,0,1,235,0,0,192,43,0,0,128,42,0,0,65,234,0,0,1,238,0,0,192,46,0,0,128,47,0,0,65,239,0,0,0,45,0,0,193,237,0,0,129,236,0,0,64,44,0,0,1,228,0,0,192,36,0,0,128,37,0,0,65,229,0,0,0,39,0,0,193,231,0,0,129,230,0,0,64,38,0,0,0,34,0,0,193,226,0,0,129,227,0,0,64,35,0,0,1,225,0,0,192,33,0,0,128,32,0,0,65,224,0,0,1,160,0,0,192,96,0,0,128,97,0,0,65,161,0,0,0,99,0,0,193,163,0,0,129,162,0,0,64,98,0,0,0,102,0,0,193,166,0,0,129,167,0,0,64,103,0,0,1,165,0,0,192,101,0,0,128,100,0,0,65,164,0,0,0,108,0,0,193,172,0,0,129,173,0,0,64,109,0,0,1,175,0,0,192,111,0,0,128,110,0,0,65,174,0,0,1,170,0,0,192,106,0,0,128,107,0,0,65,171,0,0,0,105,0,0,193,169,0,0,129,168,0,0,64,104,0,0,0,120,0,0,193,184,0,0,129,185,0,0,64,121,0,0,1,187,0,0,192,123,0,0,128,122,0,0,65,186,0,0,1,190,0,0,192,126,0,0,128,127,0,0,65,191,0,0,0,125,0,0,193,189,0,0,129,188,0,0,64,124,0,0,1,180,0,0,192,116,0,0,128,117,0,0,65,181,0,0,0,119,0,0,193,183,0,0,129,182,0,0,64,118,0,0,0,114,0,0,193,178,0,0,129,179,0,0,64,115,0,0,1,177,0,0,192,113,0,0,128,112,0,0,65,176,0,0,0,80,0,0,193,144,0,0,129,145,0,0,64,81,0,0,1,147,0,0,192,83,0,0,128,82,0,0,65,146,0,0,1,150,0,0,192,86,0,0,128,87,0,0,65,151,0,0,0,85,0,0,193,149,0,0,129,148,0,0,64,84,0,0,1,156,0,0,192,92,0,0,128,93,0,0,65,157,0,0,0,95,0,0,193,159,0,0,129,158,0,0,64,94,0,0,0,90,0,0,193,154,0,0,129,155,0,0,64,91,0,0,1,153,0,0,192,89,0,0,128,88,0,0,65,152,0,0,1,136,0,0,192,72,0,0,128,73,0,0,65,137,0,0,0,75,0,0,193,139,0,0,129,138,0,0,64,74,0,0,0,78,0,0,193,142,0,0,129,143,0,0,64,79,0,0,1,141,0,0,192,77,0,0,128,76,0,0,65,140,0,0,0,68,0,0,193,132,0,0,129,133,0,0,64,69,0,0,1,135,0,0,192,71,0,0,128,70,0,0,65,134,0,0,1,130,0,0,192,66,0,0,128,67,0,0,65,131,0,0,0,65,0,0,193,129,0,0,129,128,0,0,64,64,0,0,115,116,114,97,110,103,101,32,101,114,114,111,114,32,102,108,117,115,104,105,110,103,32,98,117,102,102,101,114,32,46,46,46,32,10,0,0,0,0,0,69,114,114,111,114,58,32,77,65,88,95,72,69,65,68,69,82,95,66,85,70,32,116,111,111,32,115,109,97,108,108,32,105,110,32,98,105,116,115,116,114,101,97,109,46,99,32,10,0,0,0,0,0,0,0,0,73,110,116,101,114,110,97,108,32,98,117,102,102,101,114,32,105,110,99,111,110,115,105,115,116,101,110,99,121,46,32,102,108,117,115,104,98,105,116,115,32,60,62,32,82,101,115,118,83,105,122,101,0,0,0,0,98,105,116,32,114,101,115,101,114,118,111,105,114,32,101,114,114,111,114,58,32,10,108,51,95,115,105,100,101,45,62,109,97,105,110,95,100,97,116,97,95,98,101,103,105,110,58,32,37,105,32,10,82,101,115,118,111,105,114,32,115,105,122,101,58,32,32,32,32,32,32,32,32,32,32,32,32,32,37,105,32,10,114,101,115,118,32,100,114,97,105,110,32,40,112,111,115,116,41,32,32,32,32,32,32,32,32,32,37,105,32,10,114,101,115,118,32,100,114,97,105,110,32,40,112,114,101,41,32,32,32,32,32,32,32,32,32,32,37,105,32,10,104,101,97,100,101,114,32,97,110,100,32,115,105,100,101,105,110,102,111,58,32,32,32,32,32,32,37,105,32,10,100,97,116,97,32,98,105,116,115,58,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,37,105,32,10,116,111,116,97,108,32,98,105,116,115,58,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,37,105,32,40,114,101,109,97,105,110,100,101,114,58,32,37,105,41,32,10,98,105,116,115,112,101,114,102,114,97,109,101,58,32,32,32,32,32,32,32,32,32,32,32,32,32,37,105,32,10,0,0,84,104,105,115,32,105,115,32,97,32,102,97,116,97,108,32,101,114,114,111,114,46,32,32,73,116,32,104,97,115,32,115,101,118,101,114,97,108,32,112,111,115,115,105,98,108,101,32,99,97,117,115,101,115,58,0,57,48,37,37,32,32,76,65,77,69,32,99,111,109,112,105,108,101,100,32,119,105,116,104,32,98,117,103,103,121,32,118,101,114,115,105,111,110,32,111,102,32,103,99,99,32,117,115,105,110,103,32,97,100,118,97,110,99,101,100,32,111,112,116,105,109,105,122,97,116,105,111,110,115,0,0,0,0,0,0,32,57,37,37,32,32,89,111,117,114,32,115,121,115,116,101,109,32,105,115,32,111,118,101,114,99,108,111,99,107,101,100,0,0,0,0,0,0,0,0,32,49,37,37,32,32,98,117,103,32,105,110,32,76,65,77,69,32,101,110,99,111,100,105,110,103,32,108,105,98,114,97,114,121,0,0,0,0,0,0,0,128,64,192,32,160,96,224,16,144,80,208,48,176,112,240,8,136,72,200,40,168,104,232,24,152,88,216,56,184,120,248,4,132,68,196,36,164,100,228,20,148,84,212,52,180,116,244,12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE),allocate([94,131,108,63,21,239,195,62,109,196,126,63,54,189,200,61,67,236,127,63,176,10,201,60,196,254,127,63,136,15,201,59,88,88,88,0,0,0,0,0,37,108,117,0,0,0,0,0,105,109,97,103,101,47,112,110,103,0,0,0,0,0,0,0,105,109,97,103,101,47,103,105,102,0,0,0,0,0,0,0,105,109,97,103,101,47,106,112,101,103,0,0,0,0,0,0,37,100,0,0,0,0,0,0,128,187,0,0,0,0,0,0,0,0,208,64,0,0,0,0,0,0,208,64,148,92,0,0,68,172,0,0,0,0,0,0,0,0,208,64,0,0,0,0,0,0,208,64,20,85,0,0,0,125,0,0,0,0,208,64,0,0,0,65,102,102,166,64,0,0,208,64,184,61,0,0,192,93,0,0,0,0,0,65,0,0,8,65,102,102,166,64,0,0,192,64,74,46,0,0,34,86,0,0,0,0,8,65,246,40,16,65,102,102,166,64,0,0,208,64,140,42,0,0,128,62,0,0,246,40,16,65,102,102,22,65,205,204,156,64,0,0,208,64,223,30,0,0,224,46,0,0,102,102,22,65,154,153,25,65,0,0,144,64,0,0,192,64,40,23,0,0,17,43,0,0,154,153,25,65,102,102,30,65,51,51,163,64,0,0,208,64,70,21,0,0,64,31,0,0,102,102,30,65,0,0,32,65,205,204,156,64,0,0,208,64,112,15,0,0,8,0,0,0,208,7,0,0,16,0,0,0,116,14,0,0,24,0,0,0,60,15,0,0,32,0,0,0,124,21,0,0,40,0,0,0,88,27,0,0,48,0,0,0,76,29,0,0,56,0,0,0,16,39,0,0,64,0,0,0,248,42,0,0,80,0,0,0,188,52,0,0,96,0,0,0,252,58,0,0,112,0,0,0,240,60,0,0,128,0,0,0,104,66,0,0,160,0,0,0,92,68,0,0,192,0,0,0,168,72,0,0,224,0,0,0,200,75,0,0,0,1,0,0,244,76,0,0,64,1,0,0,20,80,0,0,44,76,0,0,56,74,0,0,168,72,0,0,80,70,0,0,92,68,0,0,128,62,0,0,240,60,0,0,52,58,0,0,212,48,0,0,16,39,0,0,110,15,0,0,0,0,0,0,192,93,0,0,44,76,0,0,68,72,0,0,80,70,0,0,92,68,0,0,104,66,0,0,116,64,0,0,240,60,0,0,96,59,0,0,62,28,0,0,110,15,0,0,0,0,0,0,44,76,0,0,56,74,0,0,68,72,0,0,80,70,0,0,92,68,0,0,116,64,0,0,140,60,0,0,164,56,0,0,212,48,0,0,28,37,0,0,110,15,0,0,0,0,0,0,102,102,182,64,0,0,208,64,154,153,233,64,51,51,3,65,0,0,32,65,102,102,62,65,0,0,80,65,0,0,96,65,0,0,112,65,0,0,132,65,87,97,114,110,105,110,103,58,32,104,105,103,104,112,97,115,115,32,102,105,108,116,101,114,32,100,105,115,97,98,108,101,100,46,32,32,104,105,103,104,112,97,115,115,32,102,114,101,113,117,101,110,99,121,32,116,111,111,32,115,109,97,108,108,10,0,0,0,0,0,0,0,69,114,114,111,114,58,32,99,97,110,39,116,32,97,108,108,111,99,97,116,101,32,105,110,95,98,117,102,102,101,114,32,98,117,102,102,101,114,10,0,0,0,0,0,1,0,0,0,16,0,0,0,17,0,0,0,8,0,0,0,9,0,0,0,24,0,0,0,25,0,0,0,4,0,0,0,5,0,0,0,20,0,0,0,21,0,0,0,12,0,0,0,13,0,0,0,28,0,0,0,29,0,0,0,2,0,0,0,3,0,0,0,18,0,0,0,19,0,0,0,10,0,0,0,11,0,0,0,26,0,0,0,27,0,0,0,6,0,0,0,7,0,0,0,22,0,0,0,23,0,0,0,14,0,0,0,15,0,0,0,30,0,0,0,31,0,0,0,0,27,134,42,204,204,52,43,33,78,132,43,252,247,157,43,88,156,166,43,252,247,157,43,33,78,132,43,204,204,52,43,0,27,134,42,83,248,191,44,254,169,171,44,146,50,149,44,159,129,122,44,239,29,73,44,62,186,23,44,116,173,207,43,133,159,107,43,183,89,146,42,83,248,191,172,254,169,171,172,146,50,149,172,159,129,122,172,239,29,73,172,62,186,23,172,116,173,207,171,133,159,107,171,183,89,146,170,0,27,134,170,204,204,52,171,33,78,132,171,252,247,157,171,88,156,166,171,252,247,157,171,33,78,132,171,204,204,52,171,0,27,134,170,0,27,134,42,204,204,52,43,33,78,132,43,252,247,157,43,88,156,166,43,252,247,157,43,33,78,132,43,204,204,52,43,0,27,134,42,83,248,191,44,254,169,171,44,146,50,149,44,159,129,122,44,239,29,73,44,62,186,23,44,116,173,207,43,133,159,107,43,183,89,146,42,37,39,192,172,51,37,173,172,234,209,152,172,227,84,131,172,249,175,89,172,11,14,43,172,102,34,244,171,201,49,137,171,74,123,157,170,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,144,128,170,174,79,227,170,5,174,113,170,234,207,6,62,205,19,212,62,139,111,68,63,255,175,139,63,23,208,166,63,117,235,200,63,190,226,245,63,122,130,26,64,105,251,74,64,185,87,144,64,107,16,243,64,233,58,183,65,92,28,124,63,187,141,36,63,68,29,175,62,178,143,112,63,212,208,49,190,125,27,68,191,215,179,93,63,0,0,0,63,254,181,3,191,218,134,241,190,2,115,160,190,116,71,58,190,29,176,193,189,135,203,39,189,29,161,104,188,70,123,114,187,168,132,91,63,216,185,97,63,221,26,115,63,129,186,123,63,65,218,126,63,253,200,127,63,101,249,127,63,141,255,127,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,144,128,42,174,79,227,42,5,174,113,42,37,39,192,44,51,37,173,44,234,209,152,44,227,84,131,44,249,175,89,44,11,14,43,44,102,34,244,43,201,49,137,43,74,123,157,42,83,248,191,172,254,169,171,172,146,50,149,172,159,129,122,172,239,29,73,172,62,186,23,172,116,173,207,171,133,159,107,171,183,89,146,170,0,27,134,170,204,204,52,171,33,78,132,171,252,247,157,171,88,156,166,171,252,247,157,171,33,78,132,171,204,204,52,171,0,27,134,170,121,207,23,190,138,59,1,66,164,51,148,67,155,200,92,68,202,167,45,70,175,40,132,68,192,222,152,67,129,155,246,65,199,156,118,64,77,183,109,66,194,101,49,68,74,15,165,69,82,45,182,197,71,104,76,196,73,213,153,194,66,4,147,192,94,6,104,63,54,189,72,62,3,97,30,190,44,76,9,66,68,231,150,67,96,102,76,68,47,215,52,70,17,168,147,68,117,204,160,67,46,219,249,65,68,124,109,64,146,154,86,66,183,10,43,68,136,68,163,69,35,243,198,197,129,62,99,196,80,169,179,194,43,42,173,192,1,24,82,63,194,197,199,62,223,144,36,190,144,150,16,66,32,15,152,67,140,47,55,68,113,86,59,70,101,128,162,68,120,164,167,67,193,231,251,65,149,237,87,64,209,237,60,66,46,47,35,68,80,99,160,69,178,232,215,197,240,127,122,196,100,62,207,194,121,91,195,192,207,220,61,63,49,160,20,63,61,91,42,190,177,1,23,66,106,129,151,67,98,254,28,68,14,27,65,70,229,136,176,68,246,95,173,67,75,201,252,65,52,59,74,64,173,80,34,66,178,10,26,68,170,126,156,69,83,240,232,197,121,249,136,196,253,124,236,194,231,48,218,192,193,13,43,63,21,239,67,63,139,188,47,190,75,118,28,66,177,43,149,67,81,195,251,67,92,30,70,70,161,146,189,68,23,254,177,67,116,41,251,65,165,166,58,64,77,48,7,66,62,185,15,68,225,169,151,69,144,236,249,197,102,184,148,196,253,164,5,195,130,12,247,192,196,112,25,63,234,90,113,63,120,177,52,190,11,224,32,66,197,255,144,67,75,169,179,67,9,89,74,70,63,131,201,68,227,108,181,67,12,94,248,65,73,159,52,64,49,233,215,65,148,121,4,68,250,250,145,69,153,95,5,198,224,82,160,196,230,149,21,195,193,75,10,193,185,213,8,63,218,57,142,63,244,54,185,190,93,45,36,66,238,197,138,67,123,163,67,67,193,197,77,70,150,52,212,68,118,180,183,67,208,116,244,65,169,3,34,64,173,143,160,65,68,192,240,67,195,135,139,69,122,165,13,198,28,180,171,196,130,42,38,195,136,83,25,193,112,40,242,62,153,103,162,63,55,74,189,190,167,146,37,66,148,165,130,67,182,247,78,65,135,96,80,70,71,144,221,68,247,225,184,67,182,2,238,65,153,191,25,64,113,224,84,65,226,71,215,67,116,104,132,69,186,183,21,198,32,182,182,196,153,32,55,195,248,124,43,193,205,19,212,62,243,4,181,63,187,232,192,190,91,122,38,66,227,13,113,67,88,242,59,195,65,40,82,70,237,132,229,68,213,190,184,67,201,3,232,65,16,147,4,64,105,242,216,64,110,227,188,67,47,102,121,69,214,134,29,198,81,62,193,196,85,96,72,195,235,212,61,193,80,50,183,62,3,228,197,63,71,16,196,190,73,155,36,66,18,122,88,67,23,20,203,195,140,28,83,70,216,249,235,68,185,166,183,67,247,22,225,65,11,250,244,63,71,16,196,62,69,237,161,67,91,2,105,69,239,4,37,198,124,38,203,196,16,160,89,195,54,63,80,193,66,80,155,62,49,219,212,63,46,15,21,191,242,108,33,66,98,51,60,67,83,17,32,196,220,60,83,70,70,243,240,68,238,104,181,67,38,192,215,65,112,137,223,63,88,12,180,192,157,166,134,67,47,214,87,69,149,32,44,198,6,85,212,196,16,196,106,195,193,157,98,193,212,63,128,62,152,197,225,63,57,182,22,191,234,239,28,66,206,194,27,67,244,79,94,196,226,141,82,70,182,97,244,68,249,56,178,67,221,40,207,65,124,229,200,63,57,233,50,193,16,207,86,67,160,18,70,69,73,205,50,198,21,165,220,196,104,176,123,195,1,246,119,193,175,175,75,62,94,131,236,63,230,143,74,191,36,147,21,66,35,102,239,66,16,227,143,196,201,17,81,70,166,76,246,68,130,2,174,67,22,218,197,65,28,72,177,63,12,95,131,193,224,12,33,67,81,229,51,69,247,251,56,198,140,255,227,196,139,36,134,195,184,137,134,193,100,229,23,62,11,250,244,63,223,202,75,191,201,237,12,66,223,9,160,66,174,0,178,196,45,207,78,70,187,185,246,68,213,254,168,67,51,80,186,65,197,91,178,63,32,204,168,193,139,247,216,66,54,123,33,69,232,158,62,198,230,72,234,196,148,31,142,195,218,232,144,193,220,181,201,61,190,20,251,63,15,177,127,191,152,64,2,66,94,213,19,66,106,66,213,196,38,205,75,70,66,172,245,68,70,55,163,67,112,102,177,65,251,108,153,63,81,248,202,193,231,35,102,66,180,6,15,69,179,170,67,198,226,90,239,196,151,161,149,195,66,6,155,193,60,57,73,61,109,196,254,63,54,211,37,70,68,177,165,69,175,113,104,68,69,51,54,68,128,12,144,67,180,213,129,66,2,0,241,65,34,63,131,64,49,19,72,70,167,49,243,68,86,182,156,67,170,105,166,65,251,100,249,68,112,3,16,65,17,158,233,193,0,0,0,0,0,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,102,102,166,64,0,0,250,66,102,102,134,192,154,153,201,192,154,153,153,64,0,0,128,63,0,0,0,0,0,0,0,0,2,0,0,0,21,0,0,0,236,81,120,63,0,0,160,64,0,0,200,66,1,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,154,153,169,64,0,0,250,66,102,102,102,192,51,51,179,192,0,0,144,64,0,0,192,63,0,0,0,0,0,0,0,0,2,0,0,0,21,0,0,0,205,204,172,63,0,0,160,64,0,0,200,66,2,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,51,51,179,64,0,0,250,66,205,204,12,192,0,0,96,192,51,51,51,64,0,0,0,64,0,0,0,0,0,0,0,0,2,0,0,0,21,0,0,0,82,184,190,63,0,0,160,64,0,0,200,66,3,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,154,153,185,64,0,0,2,67,102,102,230,191,51,51,51,192,102,102,38,64,0,0,64,64,0,0,128,192,0,0,0,0,2,0,0,0,20,0,0,0,133,235,209,63,0,0,160,64,0,0,200,66,4,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,0,0,192,64,0,0,7,67,51,51,51,191,205,204,140,191,205,204,140,63,0,0,96,64,0,0,0,193,0,0,0,0,2,0,0,0,0,0,0,0,184,30,229,63,0,0,160,64,0,0,200,66,5,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,205,204,204,64,0,0,12,67,0,0,0,63,205,204,204,62,0,0,240,192,0,0,128,64,0,0,64,193,23,183,81,57,0,0,0,0,0,0,0,0,154,153,249,63,0,0,160,64,0,0,200,66,6,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,31,133,43,63,102,102,38,63,51,51,107,193,0,0,208,64,0,0,152,193,23,183,209,57,0,0,0,0,0,0,0,0,51,51,19,64,0,0,160,64,0,0,200,66,7,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,205,204,76,63,0,0,64,63,154,153,157,193,0,0,0,65,0,0,176,193,82,73,29,58,0,0,0,0,0,0,0,0,205,204,44,64,0,0,160,64,0,0,200,66,8,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,154,153,153,63,51,51,147,63,0,0,220,193,0,0,32,65,0,0,184,193,52,128,55,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,64,0,0,200,66,9,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,205,204,204,63,205,204,204,63,0,0,16,194,0,0,48,65,0,0,200,193,23,183,81,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,64,0,0,200,66,10,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,17,67,0,0,0,64,0,0,0,64,0,0,16,194,0,0,64,65,0,0,200,193,23,183,81,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,64,0,0,200,66,0,0,0,0,0,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,102,102,134,64,0,0,200,65,154,153,217,192,154,153,217,192,51,51,227,64,0,0,128,63,0,0,0,0,0,0,0,0,2,0,0,0,31,0,0,0,0,0,128,63,0,0,160,64,0,0,200,66,1,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,102,102,134,64,0,0,200,65,154,153,153,192,154,153,153,192,205,204,172,64,51,51,179,63,0,0,128,191,0,0,0,0,2,0,0,0,27,0,0,0,178,157,143,63,0,0,160,64,0,0,196,66,2,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,102,102,134,64,0,0,200,65,102,102,38,192,102,102,38,192,205,204,108,64,0,0,0,64,0,0,64,192,0,0,0,0,2,0,0,0,23,0,0,0,47,221,164,63,0,0,160,64,0,0,194,66,3,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,102,102,134,64,0,0,200,65,205,204,204,191,205,204,204,191,0,0,0,64,0,0,0,64,0,0,160,192,0,0,0,0,2,0,0,0,18,0,0,0,223,79,189,63,0,0,160,64,0,0,192,66,4,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,102,102,134,64,0,0,200,65,0,0,0,128,0,0,0,128,0,0,0,0,0,0,0,64,0,0,0,193,0,0,0,0,2,0,0,0,12,0,0,0,16,88,217,63,0,0,160,64,0,0,190,66,5,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,102,102,134,64,0,0,200,65,102,102,166,63,102,102,166,63,0,0,192,192,0,0,96,64,0,0,48,193,0,0,0,0,2,0,0,0,8,0,0,0,154,153,249,63,0,0,160,64,102,102,188,66,6,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,0,0,144,64,0,0,200,66,205,204,12,64,51,51,19,64,0,0,64,193,0,0,192,64,0,0,96,193,0,0,0,0,2,0,0,0,4,0,0,0,199,75,15,64,0,0,64,64,205,204,187,66,7,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,154,153,153,64,0,0,72,67,205,204,44,64,205,204,44,64,0,0,144,193,0,0,16,65,0,0,136,193,0,0,0,0,2,0,0,0,0,0,0,0,225,122,36,64,0,0,128,63,51,51,187,66,8,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,154,153,169,64,0,0,150,67,51,51,51,64,51,51,51,64,0,0,168,193,0,0,32,65,0,0,184,193,23,183,81,57,0,0,0,0,0,0,0,0,47,221,60,64,0,0,0,0,154,153,186,66,9,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,51,51,211,64,0,0,150,67,51,51,51,64,51,51,51,64,0,0,184,193,0,0,48,65,0,0,200,193,82,73,29,58,0,0,0,0,0,0,0,0,254,212,88,64,0,0,0,0,154,153,186,66,10,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,0,0,200,65,0,0,150,67,51,51,51,64,51,51,51,64,0,0,200,193,0,0,64,65,0,0,216,193,10,215,35,59,0,0,0,0,0,0,0,0,0,0,96,64,0,0,0,0,154,153,186,66,0,0,0,0,8,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,240,193,0,0,48,65,82,73,157,58,1,0,0,0,16,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,200,193,0,0,48,65,111,18,131,58,1,0,0,0,24,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,160,193,0,0,48,65,111,18,131,58,1,0,0,0,32,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,112,193,0,0,48,65,111,18,131,58,1,0,0,0,40,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,32,193,0,0,48,65,250,237,107,58,1,0,0,0,48,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,32,193,0,0,48,65,250,237,107,58,1,0,0,0,56,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,192,192,0,0,48,65,23,183,81,58,1,0,0,0,64,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,0,192,0,0,48,65,23,183,81,58,1,0,0,0,80,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,0,0,0,0,0,65,52,128,55,58,1,0,0,0,96,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,32,64,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,128,63,0,0,176,64,82,73,29,58,1,0,0,0,112,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,0,0,16,64,51,51,211,64,0,0,17,67,51,51,115,63,0,0,0,0,0,0,0,64,0,0,144,64,111,18,3,58,1,0,0,0,128,0,0,0,9,0,0,0,9,0,0,0,0,0,0,0,154,153,249,63,205,204,204,64,0,0,12,67,51,51,115,63,0,0,0,0,0,0,64,64,0,0,128,64,23,183,81,57,1,0,0,0,160,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,184,30,229,63,0,0,192,64,0,0,7,67,51,51,115,63,0,0,0,192,0,0,160,64,0,0,96,64,0,0,0,0,1,0,0,0,192,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,82,184,190,63,51,51,179,64,0,0,250,66,236,81,120,63,0,0,128,192,0,0,224,64,0,0,64,64,0,0,0,0,0,0,0,0,224,0,0,0,9,0,0,0,9,0,0,0,1,0,0,0,0,0,160,63,102,102,166,64,0,0,250,66,72,225,122,63,0,0,192,192,0,0,16,65,0,0,0,64,0,0,0,0,0,0,0,0,0,1,0,0,9,0,0,0,9,0,0,0,1,0,0,0,236,81,120,63,102,102,166,64,0,0,250,66,0,0,128,63,0,0,0,193,0,0,32,65,0,0,128,63,0,0,0,0,0,0,0,0,64,1,0,0,9,0,0,0,9,0,0,0,1,0,0,0,102,102,102,63,102,102,166,64,0,0,250,66,0,0,128,63,0,0,32,193,0,0,64,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,128,63,54,89,75,63,152,134,33,63,152,134,33,63,152,134,33,63,152,134,33,63,152,134,33,63,250,155,128,62,153,158,240,61,0,0,0,0,0,0,0,0,0,0,0,0,137,158,227,63,229,83,236,63,167,94,245,63,155,20,249,63,14,217,252,63,123,143,234,63,218,151,217,63,226,132,191,63,124,145,168,63,0,0,128,63,0,0,0,0,0,0,0,0,205,204,60,65,154,153,89,65,154,153,137,65,0,0,0,66,0,0,58,66,51,51,77,66,0,0,102,66,51,51,134,66,0,0,143,66,51,51,169,66,51,51,195,66,0,0,2,67,154,153,217,64,154,153,185,64,154,153,185,64,205,204,204,64,0,0,208,64,102,102,30,65,154,153,65,65,102,102,102,65,0,0,112,65,51,51,151,65,205,204,172,65,51,51,215,65,205,204,8,66,205,204,32,66,51,51,59,66,0,0,98,66,205,204,114,66,205,204,147,66,102,102,171,66,205,204,186,66,51,51,252,66,0,0,0,0,205,204,236,192,205,204,236,192,205,204,236,192,0,0,24,193,205,204,236,192,51,51,195,192,0,0,176,192,102,102,150,192,102,102,150,192,102,102,150,192,102,102,150,192,0,0,0,0,73,78,84,69,82,78,65,76,32,69,82,82,79,82,32,73,78,32,86,66,82,32,78,69,87,32,67,79,68,69,44,32,112,108,101,97,115,101,32,115,101,110,100,32,98,117,103,32,114,101,112,111,114,116,10,0,6,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,9,0,0,0,9,0,0,0,9,0,0,0,9,0,0,0,6,0,0,0,9,0,0,0,9,0,0,0,9,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,3,0,0,0,9,0,0,0,9,0,0,0,12,0,0,0,6,0,0,0,6,0,0,0,9,0,0,0,12,0,0,0,6,0,0,0,11,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,12,0,0,0,12,0,0,0,12,0,0,0,0,0,0,0,6,0,0,0,15,0,0,0,12,0,0,0,0,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,12,0,0,0,9,0,0,0,9,0,0,0,6,0,0,0,6,0,0,0,12,0,0,0,9,0,0,0,6,0,0,0,8,0,0,0,8,0,0,0,5,0,0,0,0,0,0,0,15,0,0,0,12,0,0,0,9,0,0,0,0,0,0,0,6,0,0,0,18,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,116,0,0,0,140,0,0,0,168,0,0,0,200,0,0,0,238,0,0,0,28,1,0,0,80,1,0,0,140,1,0,0,208,1,0,0,10,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,32,0,0,0,42,0,0,0,56,0,0,0,74,0,0,0,100,0,0,0,132,0,0,0,174,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,114,0,0,0,136,0,0,0,162,0,0,0,194,0,0,0,232,0,0,0,22,1,0,0,76,1,0,0,138,1,0,0,208,1,0,0,28,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,26,0,0,0,36,0,0,0,48,0,0,0,62,0,0,0,80,0,0,0,104,0,0,0,136,0,0,0,180,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,116,0,0,0,140,0,0,0,168,0,0,0,200,0,0,0,238,0,0,0,28,1,0,0,80,1,0,0,140,1,0,0,208,1,0,0,10,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,26,0,0,0,36,0,0,0,48,0,0,0,62,0,0,0,80,0,0,0,104,0,0,0,134,0,0,0,174,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,20,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,52,0,0,0,62,0,0,0,74,0,0,0,90,0,0,0,110,0,0,0,134,0,0,0,162,0,0,0,196,0,0,0,238,0,0,0,32,1,0,0,86,1,0,0,162,1,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,22,0,0,0,30,0,0,0,40,0,0,0,52,0,0,0,66,0,0,0,84,0,0,0,106,0,0,0,136,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,20,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,42,0,0,0,50,0,0,0,60,0,0,0,72,0,0,0,88,0,0,0,106,0,0,0,128,0,0,0,156,0,0,0,190,0,0,0,230,0,0,0,20,1,0,0,74,1,0,0,128,1,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,22,0,0,0,28,0,0,0,38,0,0,0,50,0,0,0,64,0,0,0,80,0,0,0,100,0,0,0,126,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,20,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,82,0,0,0,102,0,0,0,126,0,0,0,156,0,0,0,194,0,0,0,240,0,0,0,40,1,0,0,108,1,0,0,192,1,0,0,38,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,22,0,0,0,30,0,0,0,42,0,0,0,58,0,0,0,78,0,0,0,104,0,0,0,138,0,0,0,180,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,116,0,0,0,140,0,0,0,168,0,0,0,200,0,0,0,238,0,0,0,28,1,0,0,80,1,0,0,140,1,0,0,208,1,0,0,10,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,26,0,0,0,36,0,0,0,48,0,0,0,62,0,0,0,80,0,0,0,104,0,0,0,134,0,0,0,174,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,12,0,0,0,18,0,0,0,24,0,0,0,30,0,0,0,36,0,0,0,44,0,0,0,54,0,0,0,66,0,0,0,80,0,0,0,96,0,0,0,116,0,0,0,140,0,0,0,168,0,0,0,200,0,0,0,238,0,0,0,28,1,0,0,80,1,0,0,140,1,0,0,208,1,0,0,10,2,0,0,64,2,0,0,0,0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,18,0,0,0,26,0,0,0,36,0,0,0,48,0,0,0,62,0,0,0,80,0,0,0,104,0,0,0,134,0,0,0,174,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,24,0,0,0,36,0,0,0,48,0,0,0,60,0,0,0,72,0,0,0,88,0,0,0,108,0,0,0,132,0,0,0,160,0,0,0,192,0,0,0,232,0,0,0,24,1,0,0,80,1,0,0,144,1,0,0,220,1,0,0,54,2,0,0,56,2,0,0,58,2,0,0,60,2,0,0,62,2,0,0,64,2,0,0,0,0,0,0,8,0,0,0,16,0,0,0,24,0,0,0,36,0,0,0,52,0,0,0,72,0,0,0,96,0,0,0,124,0,0,0,160,0,0,0,162,0,0,0,164,0,0,0,166,0,0,0,192],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+6448),allocate([1,4,3,5,0,0,0,0,1,5,5,7,5,8,7,9,5,7,7,9,7,9,9,10,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,192,72,1,0,56,65,1,0,3,0,0,0,0,0,0,0,200,72,1,0,224,72,1,0,3,0,0,0,0,0,0,0,240,72,1,0,8,73,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,24,73,1,0,56,73,1,0,4,0,0,0,0,0,0,0,72,73,1,0,104,73,1,0,6,0,0,0,0,0,0,0,120,73,1,0,192,73,1,0,6,0,0,0,0,0,0,0,232,73,1,0,48,74,1,0,6,0,0,0,0,0,0,0,88,74,1,0,160,74,1,0,8,0,0,0,0,0,0,0,200,74,1,0,72,75,1,0,8,0,0,0,0,0,0,0,136,75,1,0,8,76,1,0,8,0,0,0,0,0,0,0,72,76,1,0,200,76,1,0,16,0,0,0,0,0,0,0,8,77,1,0,8,79,1,0,0,0,0,0,0,0,0,0,0,0,0,0,8,80,1,0,16,0,0,0,0,0,0,0,8,81,1,0,8,83,1,0,1,0,0,0,1,0,0,0,8,84,1,0,8,86,1,0,2,0,0,0,3,0,0,0,8,84,1,0,8,86,1,0,3,0,0,0,7,0,0,0,8,84,1,0,8,86,1,0,4,0,0,0,15,0,0,0,8,84,1,0,8,86,1,0,6,0,0,0,63,0,0,0,8,84,1,0,8,86,1,0,8,0,0,0,255,0,0,0,8,84,1,0,8,86,1,0,10,0,0,0,255,3,0,0,8,84,1,0,8,86,1,0,13,0,0,0,255,31,0,0,8,84,1,0,8,86,1,0,4,0,0,0,15,0,0,0,8,87,1,0,8,89,1,0,5,0,0,0,31,0,0,0,8,87,1,0,8,89,1,0,6,0,0,0,63,0,0,0,8,87,1,0,8,89,1,0,7,0,0,0,127,0,0,0,8,87,1,0,8,89,1,0,8,0,0,0,255,0,0,0,8,87,1,0,8,89,1,0,9,0,0,0,255,1,0,0,8,87,1,0,8,89,1,0,11,0,0,0,255,7,0,0,8,87,1,0,8,89,1,0,13,0,0,0,255,31,0,0,8,87,1,0,8,89,1,0,0,0,0,0,0,0,0,0,8,90,1,0,64,65,1,0,0,0,0,0,0,0,0,0,40,90,1,0,80,65,1,0,4,0,1,0,5,0,5,0,7,0,7,0,8,0,9,0,9,0,10,0,10,0,10,0,10,0,11,0,11,0,11,0,11,0,12,0,12,0,12,0,12,0,12,0,12,0,13,0,12,0,13,0,12,0,13,0,13,0,14,0,10,0,10,0,5,0,4,0,6,0,6,0,7,0,8,0,8,0,9,0,9,0,10,0,10,0,11,0,10,0,11,0,11,0,11,0,11,0,12,0,11,0,12,0,12,0,12,0,12,0,13,0,12,0,14,0,12,0,13,0,12,0,14,0,10,0,10,0,7,0,7,0,7,0,8,0,8,0,9,0,9,0,10,0,9,0,11,0,10,0,11,0,10,0,12,0,11,0,12,0,11,0,13,0,11,0,12,0,11,0,13,0,12,0,13,0,12,0,13,0,12,0,14,0,13,0,14,0,9,0,11,0,8,0,9,0,8,0,9,0,9,0,10,0,9,0,11,0,10,0,11,0,10,0,12,0,10,0,12,0,11,0,12,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,9,0,12,0,9,0,10,0,9,0,10,0,9,0,11,0,10,0,11,0,10,0,12,0,10,0,12,0,10,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,13,0,15,0,9,0,11,0,10,0,10,0,9,0,10,0,10,0,11,0,10,0,11,0,10,0,12,0,10,0,13,0,11,0,13,0,11,0,14,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,16,0,9,0,12,0,10,0,11,0,10,0,11,0,10,0,11,0,10,0,12,0,10,0,13,0,11,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,13,0,16,0,9,0,12,0,11,0,11,0,10,0,11,0,10,0,12,0,10,0,12,0,11,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,15,0,13,0,17,0,13,0,17,0,10,0,12,0,11,0,11,0,11,0,12,0,11,0,12,0,11,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,11,0,14,0,11,0,15,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,16,0,13,0,16,0,13,0,16,0,10,0,12,0,11,0,12,0,11,0,12,0,11,0,12,0,11,0,13,0,11,0,13,0,11,0,14,0,11,0,14,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,16,0,13,0,15,0,13,0,16,0,13,0,15,0,10,0,13,0,12,0,12,0,11,0,13,0,11,0,12,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,16,0,12,0,16,0,13,0,16,0,13,0,17,0,13,0,17,0,13,0,16,0,10,0,12,0,12,0,13,0,12,0,13,0,11,0,13,0,11,0,13,0,11,0,14,0,12,0,14,0,12,0,15,0,12,0,16,0,12,0,16,0,12,0,16,0,12,0,16,0,13,0,16,0,13,0,16,0,13,0,15,0,13,0,16,0,10,0,13,0,12,0,13,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,15,0,12,0,17,0,13,0,16,0,13,0,16,0,13,0,16,0,13,0,16,0,13,0,18,0,10,0,13,0,12,0,15,0,12,0,14,0,12,0,14,0,12,0,14,0,12,0,15,0,12,0,15,0,12,0,16,0,12,0,16,0,13,0,16,0,13,0,18,0,13,0,17,0,13,0,17,0,13,0,17,0,13,0,19,0,13,0,17,0,10,0,13,0,13,0,14,0,12,0,15,0,12,0,13,0,12,0,14,0,12,0,16,0,12,0,16,0,12,0,15,0,13,0,16,0,13,0,16,0,13,0,17,0,13,0,18,0,13,0,17,0,13,0,19,0,13,0,17,0,13,0,16,0,10,0,13,0,9,0,10,0,9,0,10,0,9,0,10,0,9,0,11,0,9,0,11,0,9,0,12,0,9,0,12,0,9,0,12,0,9,0,13,0,9,0,13,0,9,0,13,0,10,0,13,0,10,0,13,0,10,0,13,0,10,0,13,0,6,0,10,0,2,0,1,0,3,0,4,0,7,0,7,0,4,0,4,0,4,0,5,0,7,0,7,0,6,0,6,0,7,0,7,0,8,0,8,0,0,0,0,0,3,0,1,0,4,0,4,0,6,0,7,0,8,0,8,0,4,0,4,0,4,0,5,0,6,0,8,0,7,0,9,0,5,0,7,0,6,0,8,0,7,0,9,0,8,0,10,0,7,0,8,0,7,0,8,0,8,0,9,0,9,0,10,0,0,0,0,0,8,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,80,0,0,0,96,0,0,0,112,0,0,0,128,0,0,0,144,0,0,0,160,0,0,0,255,255,255,255,0,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,80,0,0,0,96,0,0,0,112,0,0,0,128,0,0,0,160,0,0,0,192,0,0,0,224,0,0,0,0,1,0,0,64,1,0,0,255,255,255,255,0,0,0,0,8,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,6,0,0,0,11,0,0,0,16,0,0,0,21,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,2,0,1,0,3,0,1,0,1,0,3,0,2,0,0,0,0,0,0,0,0,0,1,4,7,4,5,7,6,7,8,0,0,0,0,0,0,0,3,0,2,0,1,0,1,0,1,0,1,0,3,0,2,0,0,0,0,0,0,0,0,0,2,3,7,4,4,7,6,7,8,0,0,0,0,0,0,0,1,0,2,0,6,0,5,0,3,0,1,0,4,0,4,0,7,0,5,0,7,0,1,0,6,0,1,0,1,0,0,0,1,4,7,8,4,5,8,9,7,8,9,10,8,8,9,10,7,0,3,0,5,0,1,0,6,0,2,0,3,0,2,0,5,0,4,0,4,0,1,0,3,0,3,0,2,0,0,0,3,4,6,8,4,4,6,7,5,6,7,8,7,7,8,9,1,0,2,0,10,0,19,0,16,0,10,0,3,0,3,0,7,0,10,0,5,0,3,0,11,0,4,0,13,0,17,0,8,0,4,0,12,0,11,0,18,0,15,0,11,0,2,0,7,0,6,0,9,0,14,0,3,0,1,0,6,0,4,0,5,0,3,0,2,0,0,0,1,4,7,9,9,10,4,6,8,9,9,10,7,7,9,10,10,11,8,9,10,11,11,11,8,9,10,11,11,12,9,10,11,12,12,12,0,0,0,0,3,0,4,0,6,0,18,0,12,0,5,0,5,0,1,0,2,0,16,0,9,0,3,0,7,0,3,0,5,0,14,0,7,0,3,0,19,0,17,0,15,0,13,0,10,0,4,0,13,0,5,0,8,0,11,0,5,0,1,0,12,0,4,0,4,0,1,0,1,0,0,0,2,4,7,9,9,10,4,4,6,10,10,10,7,6,8,10,10,11,9,10,10,11,11,12,9,9,10,11,12,12,10,10,11,11,13,13,0,0,0,0,7,0,5,0,9,0,14,0,15,0,7,0,6,0,4,0,5,0,5,0,6,0,7,0,7,0,6,0,8,0,8,0,8,0,5,0,15,0,6,0,9,0,10,0,5,0,1,0,11,0,7,0,9,0,6,0,4,0,1,0,14,0,4,0,6,0,2,0,6,0,0,0,3,4,6,7,9,10,4,5,6,7,8,10,5,6,7,8,9,10,7,7,8,9,9,10,8,8,9,9,10,11,9,9,10,10,11,11,0,0,0,0,1,0,2,0,10,0,23,0,35,0,30,0,12,0,17,0,3,0,3,0,8,0,12,0,18,0,21,0,12,0,7,0,11,0,9,0,15,0,21,0,32,0,40,0,19,0,6,0,14,0,13,0,22,0,34,0,46,0,23,0,18,0,7,0,20,0,19,0,33,0,47,0,27,0,22,0,9,0,3,0,31,0,22,0,41,0,26,0,21,0,20,0,5,0,3,0,14,0,13,0,10,0,11,0,16,0,6,0,5,0,1,0,9,0,8,0,7,0,8,0,4,0,4,0,2,0,0,0,1,4,7,9,10,10,10,11,4,6,8,9,10,11,10,10,7,8,9,10,11,12,11,11,8,9,10,11,12,12,11,12,9,10,11,12,12,12,12,12,10,11,12,12,13,13,12,13,9,10,11,12,12,12,13,13,10,10,11,12,12,13,13,13,3,0,4,0,10,0,24,0,34,0,33,0,21,0,15,0,5,0,3,0,4,0,10,0,32,0,17,0,11,0,10,0,11,0,7,0,13,0,18,0,30,0,31,0,20,0,5,0,25,0,11,0,19,0,59,0,27,0,18,0,12,0,5,0,35,0,33,0,31,0,58,0,30,0,16,0,7,0,5,0,28,0,26,0,32,0,19,0,17,0,15,0,8,0,14,0,14,0,12,0,9,0,13,0,14,0,9,0,4,0,1,0,11,0,4,0,6,0,6,0,6,0,3,0,2,0,0,0,2,4,6,8,9,10,9,10,4,5,6,8,10,10,9,10,6,7,8,9,10,11,10,10,8,8,9,11,10,12,10,11,9,10,10,11,11,12,11,12,9,10,11,12,12,13,12,13,9,9,9,10,11,12,12,12,9,9,10,11,12,12,12,12,9,0,6,0,16,0,33,0,41,0,39,0,38,0,26,0,7,0,5,0,6,0,9,0,23,0,16,0,26,0,11,0,17,0,7,0,11,0,14,0,21,0,30,0,10,0,7,0,17,0,10,0,15,0,12,0,18,0,28,0,14,0,5,0,32,0,13,0,22,0,19,0,18,0,16,0,9,0,5,0,40,0,17,0,31,0,29,0,17,0,13,0,4,0,2,0,27,0,12,0,11,0,15,0,10,0,7,0,4,0,1,0,27,0,12,0,8,0,12,0,6,0,3,0,1,0,0,0,4,4,6,8,9,10,10,10,4,5,6,7,9,9,10,10,6,6,7,8,9,10,9,10,7,7,8,8,9,10,10,10,8,8,9,9,10,10,10,11,9,9,10,10,10,11,10,11,9,9,9,10,10,11,11,12,10,10,10,11,11,11,11,12,1,0,5,0,14,0,21,0,34,0,51,0,46,0,71,0,42,0,52,0,68,0,52,0,67,0,44,0,43,0,19,0,3,0,4,0,12,0,19,0,31,0,26,0,44,0,33,0,31,0,24,0,32,0,24,0,31,0,35,0,22,0,14,0,15,0,13,0,23,0,36,0,59,0,49,0,77,0,65,0,29,0,40,0,30,0,40,0,27,0,33,0,42,0,16,0,22,0,20,0,37,0,61,0,56,0,79,0,73,0,64,0,43,0,76,0,56,0,37,0,26,0,31,0,25,0,14,0,35,0,16,0,60,0,57,0,97,0,75,0,114,0,91,0,54,0,73,0,55,0,41,0,48,0,53,0,23,0,24,0,58,0,27,0,50,0,96,0,76,0,70,0,93,0,84,0,77,0,58,0,79,0,29,0,74,0,49,0,41,0,17,0,47,0,45,0,78,0,74,0,115,0,94,0,90,0,79,0,69,0,83,0,71,0,50,0,59,0,38,0,36,0,15,0,72,0,34,0,56,0,95,0,92,0,85,0,91,0,90,0,86,0,73,0,77,0,65,0,51,0,44,0,43,0,42,0,43,0,20,0,30,0,44,0,55,0,78,0,72,0,87,0,78,0,61,0,46,0,54,0,37,0,30,0,20,0,16,0,53,0,25,0,41,0,37,0,44,0,59,0,54,0,81,0,66,0,76,0,57,0,54,0,37,0,18,0,39,0,11,0,35,0,33,0,31,0,57,0,42,0,82,0,72,0,80,0,47,0,58,0,55,0,21,0,22,0,26,0,38,0,22,0,53,0,25,0,23,0,38,0,70,0,60,0,51,0,36,0,55,0,26,0,34,0,23,0,27,0,14,0,9,0,7,0,34,0,32,0,28,0,39,0,49,0,75,0,30,0,52,0,48,0,40,0,52,0,28,0,18,0,17,0,9,0,5,0,45,0,21,0,34,0,64,0,56,0,50,0,49,0,45,0,31,0,19,0,12,0,15,0,10,0,7,0,6,0,3,0,48,0,23,0,20,0,39,0,36,0,35,0,53,0,21,0,16,0,23,0,13,0,10,0,6,0,1,0,4,0,2,0,16,0,15,0,17,0,27,0,25,0,20,0,29,0,11,0,17,0,12,0,16,0,8,0,1,0,1,0,0,0,1,0,1,5,7,8,9,10,10,11,10,11,12,12,13,13,14,14,4,6,8,9,10,10,11,11,11,11,12,12,13,14,14,14,7,8,9,10,11,11,12,12,11,12,12,13,13,14,15,15,8,9,10,11,11,12,12,12,12,13,13,13,13,14,15,15,9,9,11,11,12,12,13,13,12,13,13,14,14,15,15,16,10,10,11,12,12,12,13,13,13,13,14,13,15,15,16,16,10,11,12,12,13,13,13,13,13,14,14,14,15,15,16,16,11,11,12,13,13,13,14,14,14,14,15,15,15,16,18,18,10,10,11,12,12,13,13,14,14,14,14,15,15,16,17,17,11,11,12,12,13,13,13,15,14,15,15,16,16,16,18,17,11,12,12,13,13,14,14,15,14,15,16,15,16,17,18,19,12,12,12,13,14,14,14,14,15,15,15,16,17,17,17,18,12,13,13,14,14,15,14,15,16,16,17,17,17,18,18,18,13,13,14,15,15,15,16,16,16,16,16,17,18,17,18,18,14,14,14,15,15,15,17,16,16,19,17,17,17,19,18,18,13,14,15,16,16,16,17,16,17,17,18,18,21,20,21,18,1,5,7,9,10,10,11,11,12,12,12,13,13,13,14,11,4,6,8,9,10,11,11,11,12,12,12,13,14,13,14,11,7,8,9,10,11,11,12,12,13,12,13,13,13,14,14,12,9,9,10,11,11,12,12,12,13,13,14,14,14,15,15,13,10,10,11,11,12,12,13,13,13,14,14,14,15,15,15,12,10,10,11,11,12,13,13,14,13,14,14,15,15,15,16,13,11,11,11,12,13,13,13,13,14,14,14,14,15,15,16,13,11,11,12,12,13,13,13,14,14,15,15,15,15,17,17,13,11,12,12,13,13,13,14,14,15,15,15,15,16,16,16,13,12,12,12,13,13,14,14,15,15,15,15,16,15,16,15,14,12,13,12,13,14,14,14,14,15,16,16,16,17,17,16,13,13,13,13,13,14,14,15,16,16,16,16,16,16,15,16,14,13,14,14,14,14,15,15,15,15,17,16,16,16,16,18,14,15,14,14,14,15,15,16,16,16,18,17,17,17,19,17,14,14,15,13,14,16,16,15,16,16,17,18,17,19,17,16,14,11,11,11,12,12,13,13,13,14,14,14,14,14,14,14,12,7,0,12,0,18,0,53,0,47,0,76,0,124,0,108,0,89,0,123,0,108,0,119,0,107,0,81,0,122,0,63,0,13,0,5,0,16,0,27,0,46,0,36,0,61,0,51,0,42,0,70,0,52,0,83,0,65,0,41,0,59,0,36,0,19,0,17,0,15,0,24,0,41,0,34,0,59,0,48,0,40,0,64,0,50,0,78,0,62,0,80,0,56,0,33,0,29,0,28,0,25,0,43,0,39,0,63,0,55,0,93,0,76,0,59,0,93,0,72,0,54,0,75,0,50,0,29,0,52,0,22,0,42,0,40,0,67,0,57,0,95,0,79,0,72,0,57,0,89,0,69,0,49,0,66,0,46,0,27,0,77,0,37,0,35,0,66,0,58,0,52,0,91,0,74,0,62,0,48,0,79,0,63,0,90,0,62,0,40,0,38,0,125,0,32,0,60,0,56,0,50,0,92,0,78,0,65,0,55,0,87,0,71,0,51,0,73,0,51,0,70,0,30,0,109,0,53,0,49,0,94,0,88,0,75,0,66,0,122,0,91,0,73,0,56,0,42,0,64,0,44,0,21,0,25,0,90,0,43,0,41,0,77,0,73,0,63,0,56,0,92,0,77,0,66,0,47,0,67,0,48,0,53,0,36,0,20,0,71,0,34,0,67,0,60,0,58,0,49,0,88,0,76,0,67,0,106,0,71,0,54,0,38,0,39,0,23,0,15,0,109,0,53,0,51,0,47,0,90,0,82,0,58,0,57,0,48,0,72,0,57,0,41,0,23,0,27,0,62,0,9,0,86,0,42,0,40,0,37,0,70,0,64,0,52,0,43,0,70,0,55,0,42,0,25,0,29,0,18,0,11,0,11,0,118,0,68,0,30,0,55,0,50,0,46,0,74,0,65,0,49,0,39,0,24,0,16,0,22,0,13,0,14,0,7,0,91,0,44,0,39,0,38,0,34,0,63,0,52,0,45,0,31,0,52,0,28,0,19,0,14,0,8,0,9,0,3,0,123,0,60,0,58,0,53,0,47,0,43,0,32,0,22,0,37,0,24,0,17,0,12,0,15,0,10,0,2,0,1,0,71,0,37,0,34,0,30,0,28,0,20,0,17,0,26,0,21,0,16,0,10,0,6,0,8,0,6,0,2,0,0,0,3,5,6,8,8,9,10,10,10,11,11,12,12,12,13,14,5,5,7,8,9,9,10,10,10,11,11,12,12,12,13,13,6,7,7,8,9,9,10,10,10,11,11,12,12,13,13,13,7,8,8,9,9,10,10,11,11,11,12,12,12,13,13,13,8,8,9,9,10,10,11,11,11,11,12,12,12,13,13,13,9,9,9,10,10,10,11,11,11,11,12,12,13,13,13,14,10,9,10,10,10,11,11,11,11,12,12,12,13,13,14,14,10,10,10,11,11,11,11,12,12,12,12,12,13,13,13,14,10,10,10,11,11,11,11,12,12,12,12,13,13,14,14,14,10,10,11,11,11,11,12,12,12,13,13,13,13,14,14,14,11,11,11,11,12,12,12,12,12,13,13,13,13,14,15,14,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,15,12,12,11,12,12,12,13,13,13,13,13,13,14,14,15,15,12,12,12,12,12,13,13,13,13,14,14,14,14,14,15,15,13,13,13,13,13,13,13,13,14,14,14,14,15,15,14,15,13,13,13,13,13,13,13,14,14,14,14,14,15,15,15,15,1,0,5,0,14,0,44,0,74,0,63,0,110,0,93,0,172,0,149,0,138,0,242,0,225,0,195,0,120,1,17,0,3,0,4,0,12,0,20,0,35,0,62,0,53,0,47,0,83,0,75,0,68,0,119,0,201,0,107,0,207,0,9,0,15,0,13,0,23,0,38,0,67,0,58,0,103,0,90,0,161,0,72,0,127,0,117,0,110,0,209,0,206,0,16,0,45,0,21,0,39,0,69,0,64,0,114,0,99,0,87,0,158,0,140,0,252,0,212,0,199,0,131,1,109,1,26,0,75,0,36,0,68,0,65,0,115,0,101,0,179,0,164,0,155,0,8,1,246,0,226,0,139,1,126,1,106,1,9,0,66,0,30,0,59,0,56,0,102,0,185,0,173,0,9,1,142,0,253,0,232,0,144,1,132,1,122,1,189,1,16,0,111,0,54,0,52,0,100,0,184,0,178,0,160,0,133,0,1,1,244,0,228,0,217,0,129,1,110,1,203,2,10,0,98,0,48,0,91,0,88,0,165,0,157,0,148,0,5,1,248,0,151,1,141,1,116,1,124,1,121,3,116,3,8,0,85,0,84,0,81,0,159,0,156,0,143,0,4,1,249,0,171,1,145,1,136,1,127,1,215,2,201,2,196,2,7,0,154,0,76,0,73,0,141,0,131,0,0,1,245,0,170,1,150,1,138,1,128,1,223,2,103,1,198,2,96,1,11,0,139,0,129,0,67,0,125,0,247,0,233,0,229,0,219,0,137,1,231,2,225,2,208,2,117,3,114,3,183,1,4,0,243,0,120,0,118,0,115,0,227,0,223,0,140,1,234,2,230,2,224,2,209,2,200,2,194,2,223,0,180,1,6,0,202,0,224,0,222,0,218,0,216,0,133,1,130,1,125,1,108,1,120,3,187,1,195,2,184,1,181,1,192,6,4,0,235,2,211,0,210,0,208,0,114,1,123,1,222,2,211,2,202,2,199,6,115,3,109,3,108,3,131,13,97,3,2,0,121,1,113,1,102,0,187,0,214,2,210,2,102,1,199,2,197,2,98,3,198,6,103,3,130,13,102,3,178,1,0,0,12,0,10,0,7,0,11,0,10,0,17,0,11,0,9,0,13,0,12,0,10,0,7,0,5,0,3,0,1,0,3,0,1,5,7,9,10,10,11,11,12,12,12,13,13,13,14,10,4,6,8,9,10,11,11,11,12,12,12,13,14,13,14,10,7,8,9,10,11,11,12,12,13,12,13,13,13,14,14,11,9,9,10,11,11,12,12,12,13,13,14,14,14,15,15,12,10,10,11,11,12,12,13,13,13,14,14,14,15,15,15,11,10,10,11,11,12,13,13,14,13,14,14,15,15,15,16,12,11,11,11,12,13,13,13,13,14,14,14,14,15,15,16,12,11,11,12,12,13,13,13,14,14,15,15,15,15,17,17,12,11,12,12,13,13,13,14,14,15,15,15,15,16,16,16,12,12,12,12,13,13,14,14,15,15,15,15,16,15,16,15,13,12,13,12,13,14,14,14,14,15,16,16,16,17,17,16,12,13,13,13,13,14,14,15,16,16,16,16,16,16,15,16,13,13,14,14,14,14,15,15,15,15,17,16,16,16,16,18,13,15,14,14,14,15,15,16,16,16,18,17,17,17,19,17,13,14,15,13,14,16,16,15,16,16,17,18,17,19,17,16,13,10,10,10,11,11,12,12,12,13,13,13,13,13,13,13,10,15,0,13,0,46,0,80,0,146,0,6,1,248,0,178,1,170,1,157,2,141,2,137,2,109,2,5,2,8,4,88,0,14,0,12,0,21,0,38,0,71,0,130,0,122,0,216,0,209,0,198,0,71,1,89,1,63,1,41,1,23,1,42,0,47,0,22,0,41,0,74,0,68,0,128,0,120,0,221,0,207,0,194,0,182,0,84,1,59,1,39,1,29,2,18,0,81,0,39,0,75,0,70,0,134,0,125,0,116,0,220,0,204,0,190,0,178,0,69,1,55,1,37,1,15,1,16,0,147,0,72,0,69,0,135,0,127,0,118,0,112,0,210,0,200,0,188,0,96,1,67,1,50,1,29,1,28,2,14,0,7,1,66,0,129,0,126,0,119,0,114,0,214,0,202,0,192,0,180,0,85,1,61,1,45,1,25,1,6,1,12,0,249,0,123,0,121,0,117,0,113,0,215,0,206,0,195,0,185,0,91,1,74,1,52,1,35,1,16,1,8,2,10,0,179,1,115,0,111,0,109,0,211,0,203,0,196,0,187,0,97,1,76,1,57,1,42,1,27,1,19,2,125,1,17,0,171,1,212,0,208,0,205,0,201,0,193,0,186,0,177,0,169,0,64,1,47,1,30,1,12,1,2,2,121,1,16,0,79,1,199,0,197,0,191,0,189,0,181,0,174,0,77,1,65,1,49,1,33,1,19,1,9,2,123,1,115,1,11,0,156,2,184,0,183,0,179,0,175,0,88,1,75,1,58,1,48,1,34,1,21,1,18,2,127,1,117,1,110,1,10,0,140,2,90,1,171,0,168,0,164,0,62,1,53,1,43,1,31,1,20,1,7,1,1,2,119,1,112,1,106,1,6,0,136,2,66,1,60,1,56,1,51,1,46,1,36,1,28,1,13,1,5,1,0,2,120,1,114,1,108,1,103,1,4,0,108,2,44,1,40,1,38,1,32,1,26,1,17,1,10,1,3,2,124,1,118,1,113,1,109,1,105,1,101,1,2,0,9,4,24,1,22,1,18,1,11,1,8,1,3,1,126,1,122,1,116,1,111,1,107,1,104,1,102,1,100,1,0,0,43,0,20,0,19,0,17,0,15,0,13,0,11,0,9,0,7,0,6,0,4,0,7,0,5,0,3,0,1,0,3,0,4,5,7,8,9,10,10,11,11,12,12,12,12,12,13,10,5,6,7,8,9,10,10,11,11,11,12,12,12,12,12,10,7,7,8,9,9,10,10,11,11,11,11,12,12,12,13,9,8,8,9,9,10,10,10,11,11,11,11,12,12,12,12,9,9,9,9,10,10,10,10,11,11,11,12,12,12,12,13,9,10,9,10,10,10,10,11,11,11,11,12,12,12,12,12,9,10,10,10,10,10,11,11,11,11,12,12,12,12,12,13,9,11,10,10,10,11,11,11,11,12,12,12,12,12,13,13,10,11,11,11,11,11,11,11,11,11,12,12,12,12,13,13,10,11,11,11,11,11,11,11,12,12,12,12,12,13,13,13,10,12,11,11,11,11,12,12,12,12,12,12,13,13,13,13,10,12,12,11,11,11,12,12,12,12,12,12,13,13,13,13,10,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,10,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,10,13,12,12,12,12,12,12,13,13,13,13,13,13,13,13,10,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,6,1,0,10,0,8,0,20,0,12,0,20,0,16,0,32,0,14,0,12,0,24,0,0,0,28,0,16,0,24,0,16,0,15,0,28,0,26,0,48,0,22,0,40,0,36,0,64,0,14,0,24,0,20,0,32,0,12,0,16,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,8,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,8,0,0,0,8,0,0,0,8,0,0,0,16,0,0,0,16,0,0,0,1,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,1,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,4,0,0,0,8,0,0,0,0,0,0,0,18,0,0,0,36,0,0,0,54,0,0,0,51,0,0,0,35,0,0,0,53,0,0,0,71,0,0,0,52,0,0,0,70,0,0,0,88,0,0,0,69,0,0,0,87,0,0,0,105,0,0,0,104,0,0,0,122,0,0,0,0,0,0,0,18,0,0,0,36,0,0,0,54,0,0,0,54,0,0,0,36,0,0,0,54,0,0,0,72,0,0,0,54,0,0,0,72,0,0,0,90,0,0,0,72,0,0,0,90,0,0,0,108,0,0,0,108,0,0,0,126,0,0,0,0,0,0,0,10,0,0,0,20,0,0,0,30,0,0,0,33,0,0,0,21,0,0,0,31,0,0,0,41,0,0,0,32,0,0,0,42,0,0,0,52,0,0,0,43,0,0,0,53,0,0,0,63,0,0,0,64,0,0,0,74,0,0,0,15,0,0,0,15,0,0,0,7,0,0,0,7,0,0,0,15,0,0,0,15,0,0,0,7,0,0,0,0,0,0,0,7,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,31,0,0,0,31,0,0,0,0,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,6,0,0,0,5,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,7,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,1,0,0,0,2,0,0,0,5,0,0,0,7,0,0,0,7,0,0,0,10,0,0,0,10,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,13,0,0,0,0,0,0,0,8,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,80,0,0,0,96,0,0,0,112,0,0,0,128,0,0,0,160,0,0,0,192,0,0,0,224,0,0,0,0,1,0,0,64,1],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+82224),allocate([51,46,57,57,46,53,0,0,93,61,127,102,158,160,230,63,0,0,0,0,0,136,57,61,68,23,117,250,82,176,230,63,0,0,0,0,0,0,216,60,254,217,11,117,18,192,230,63,0,0,0,0,0,120,40,189,191,118,212,221,220,207,230,63,0,0,0,0,0,192,30,61,41,26,101,60,178,223,230,63,0,0,0,0,0,0,216,188,227,58,89,152,146,239,230,63,0,0,0,0,0,0,188,188,134,147,81,249,125,255,230,63,0,0,0,0,0,216,47,189,163,45,244,102,116,15,231,63,0,0,0,0,0,136,44,189,195,95,236,232,117,31,231,63,0,0,0,0,0,192,19,61,5,207,234,134,130,47,231,63,0,0,0,0,0,48,56,189,82,129,165,72,154,63,231,63,0,0,0,0,0,192,0,189,252,204,215,53,189,79,231,63,0,0,0,0,0,136,47,61,241,103,66,86,235,95,231,63,0,0,0,0,0,224,3,61,72,109,171,177,36,112,231,63,0,0,0,0,0,208,39,189,56,93,222,79,105,128,231,63,0,0,0,0,0,0,221,188,0,29,172,56,185,144,231,63,0,0,0,0,0,0,227,60,120,1,235,115,20,161,231,63,0,0,0,0,0,0,237,188,96,208,118,9,123,177,231,63,0,0,0,0,0,64,32,61,51,193,48,1,237,193,231,63,0,0,0,0,0,0,160,60,54,134,255,98,106,210,231,63,0,0,0,0,0,144,38,189,59,78,207,54,243,226,231,63,0,0,0,0,0,224,2,189,232,195,145,132,135,243,231,63,0,0,0,0,0,88,36,189,78,27,62,84,39,4,232,63,0,0,0,0,0,0,51,61,26,7,209,173,210,20,232,63,0,0,0,0,0,0,15,61,126,205,76,153,137,37,232,63,0,0,0,0,0,192,33,189,208,66,185,30,76,54,232,63,0,0,0,0,0,208,41,61,181,202,35,70,26,71,232,63,0,0,0,0,0,16,71,61,188,91,159,23,244,87,232,63,0,0,0,0,0,96,34,61,175,145,68,155,217,104,232,63,0,0,0,0,0,196,50,189,149,163,49,217,202,121,232,63,0,0,0,0,0,0,35,189,184,101,138,217,199,138,232,63,0,0,0,0,0,128,42,189,0,88,120,164,208,155,232,63,0,0,0,0,0,0,237,188,35,162,42,66,229,172,232,63,0,0,0,0,0,40,51,61,250,25,214,186,5,190,232,63,0,0,0,0,0,180,66,61,131,67,181,22,50,207,232,63,0,0,0,0,0,208,46,189,76,102,8,94,106,224,232,63,0,0,0,0,0,80,32,189,7,120,21,153,174,241,232,63,0,0,0,0,0,40,40,61,14,44,40,208,254,2,233,63,0,0,0,0,0,176,28,189,150,255,145,11,91,20,233,63,0,0,0,0,0,224,5,189,249,47,170,83,195,37,233,63,0,0,0,0,0,64,245,60,74,198,205,176,55,55,233,63,0,0,0,0,0,32,23,61,174,152,95,43,184,72,233,63,0,0,0,0,0,0,9,189,203,82,200,203,68,90,233,63,0,0,0,0,0,104,37,61,33,111,118,154,221,107,233,63,0,0,0,0,0,208,54,189,42,78,222,159,130,125,233,63,0,0,0,0,0,0,1,189,163,35,122,228,51,143,233,63,0,0,0,0,0,0,45,61,4,6,202,112,241,160,233,63,0,0,0,0,0,164,56,189,137,255,83,77,187,178,233,63,0,0,0,0,0,92,53,61,91,241,163,130,145,196,233,63,0,0,0,0,0,184,38,61,197,184,75,25,116,214,233,63,0,0,0,0,0,0,236,188,142,35,227,25,99,232,233,63,0,0,0,0,0,208,23,61,2,243,7,141,94,250,233,63,0,0,0,0,0,64,22,61,77,229,93,123,102,12,234,63,0,0,0,0,0,0,245,188,246,184,142,237,122,30,234,63,0,0,0,0,0,224,9,61,39,46,74,236,155,48,234,63,0,0,0,0,0,216,42,61,93,10,70,128,201,66,234,63,0,0,0,0,0,240,26,189,155,37,62,178,3,85,234,63,0,0,0,0,0,96,11,61,19,98,244,138,74,103,234,63,0,0,0,0,0,136,56,61,167,179,48,19,158,121,234,63,0,0,0,0,0,32,17,61,141,46,193,83,254,139,234,63,0,0,0,0,0,192,6,61,210,252,121,85,107,158,234,63,0,0,0,0,0,184,41,189,184,111,53,33,229,176,234,63,0,0,0,0,0,112,43,61,129,243,211,191,107,195,234,63,0,0,0,0,0,0,217,60,128,39,60,58,255,213,234,63,0,0,0,0,0,0,228,60,163,210,90,153,159,232,234,63,0,0,0,0,0,144,44,189,103,243,34,230,76,251,234,63,0,0,0,0,0,80,22,61,144,183,141,41,7,14,235,63,0,0,0,0,0,212,47,61,169,137,154,108,206,32,235,63,0,0,0,0,0,112,18,61,75,26,79,184,162,51,235,63,0,0,0,0,0,71,77,61,231,71,183,21,132,70,235,63,0,0,0,0,0,56,56,189,58,89,229,141,114,89,235,63,0,0,0,0,0,0,152,60,106,197,241,41,110,108,235,63,0,0,0,0,0,208,10,61,80,94,251,242,118,127,235,63,0,0,0,0,0,128,222,60,178,73,39,242,140,146,235,63,0,0,0,0,0,192,4,189,3,6,161,48,176,165,235,63,0,0,0,0,0,112,13,189,102,111,154,183,224,184,235,63,0,0,0,0,0,144,13,61,255,193,75,144,30,204,235,63,0,0,0,0,0,160,2,61,111,161,243,195,105,223,235,63,0,0,0,0,0,120,31,189,184,29,215,91,194,242,235,63,0,0,0,0,0,160,16,189,233,178,65,97,40,6,236,63,0,0,0,0,0,64,17,189,224,82,133,221,155,25,236,63,0,0,0,0,0,224,11,61,238,100,250,217,28,45,236,63,0,0,0,0,0,64,9,189,47,208,255,95,171,64,236,63,0,0,0,0,0,208,14,189,21,253,250,120,71,84,236,63,0,0,0,0,0,102,57,61,203,208,87,46,241,103,236,63,0,0,0,0,0,16,26,189,182,193,136,137,168,123,236,63,0,0,0,0,128,69,88,189,51,231,6,148,109,143,236,63,0,0,0,0,0,72,26,189,223,196,81,87,64,163,236,63,0,0,0,0,0,0,203,60,148,144,239,220,32,183,236,63,0,0,0,0,0,64,1,61,137,22,109,46,15,203,236,63,0,0,0,0,0,32,240,60,18,196,93,85,11,223,236,63,0,0,0,0,0,96,243,60,59,171,91,91,21,243,236,63,0,0,0,0,0,144,6,189,188,137,7,74,45,7,237,63,0,0,0,0,0,160,9,61,250,200,8,43,83,27,237,63,0,0,0,0,0,224,21,189,133,138,13,8,135,47,237,63,0,0,0,0,0,40,29,61,3,162,202,234,200,67,237,63,0,0,0,0,0,160,1,61,145,164,251,220,24,88,237,63,0,0,0,0,0,0,223,60,161,230,98,232,118,108,237,63,0,0,0,0,0,160,3,189,78,131,201,22,227,128,237,63,0,0,0,0,0,216,12,189,144,96,255,113,93,149,237,63,0,0,0,0,0,192,244,60,174,50,219,3,230,169,237,63,0,0,0,0,0,144,255,60,37,131,58,214,124,190,237,63,0,0,0,0,0,128,233,60,69,180,1,243,33,211,237,63,0,0,0,0,0,32,245,188,191,5,28,100,213,231,237,63,0,0,0,0,0,112,29,189,236,154,123,51,151,252,237,63,0,0,0,0,0,20,22,189,94,125,25,107,103,17,238,63,0,0,0,0,0,72,11,61,231,163,245,20,70,38,238,63,0,0,0,0,0,206,64,61,92,238,22,59,51,59,238,63,0,0,0,0,0,104,12,61,180,63,139,231,46,80,238,63,0,0,0,0,0,48,9,189,104,109,103,36,57,101,238,63,0,0,0,0,0,0,229,188,68,76,199,251,81,122,238,63,0,0,0,0,0,248,7,189,38,183,205,119,121,143,238,63,0,0,0,0,0,112,243,188,232,144,164,162,175,164,238,63,0,0,0,0,0,208,229,60,228,202,124,134,244,185,238,63,0,0,0,0,0,26,22,61,13,104,142,45,72,207,238,63,0,0,0,0,0,80,245,60,20,133,24,162,170,228,238,63,0,0,0,0,0,64,198,60,19,90,97,238,27,250,238,63,0,0,0,0,0,128,238,188,6,65,182,28,156,15,239,63,0,0,0,0,0,136,250,188,99,185,107,55,43,37,239,63,0,0,0,0,0,144,44,189,117,114,221,72,201,58,239,63,0,0,0,0,0,0,170,60,36,69,110,91,118,80,239,63,0,0,0,0,0,240,244,188,253,68,136,121,50,102,239,63,0,0,0,0,0,128,202,60,56,190,156,173,253,123,239,63,0,0,0,0,0,188,250,60,130,60,36,2,216,145,239,63,0,0,0,0,0,96,212,188,142,144,158,129,193,167,239,63,0,0,0,0,0,12,11,189,17,213,146,54,186,189,239,63,0,0,0,0,0,224,192,188,148,113,143,43,194,211,239,63,0,0,0,0,128,222,16,189,238,35,42,107,217,233,239,63,0,0,0,0,0,67,238,60,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,0,190,188,90,250,26,11,240,63,0,0,0,0,0,64,179,188,3,51,251,169,61,22,240,63,0,0,0,0,0,23,18,189,130,2,59,20,104,33,240,63,0,0,0,0,0,64,186,60,108,128,119,62,154,44,240,63,0,0,0,0,0,152,239,60,202,187,17,46,212,55,240,63,0,0,0,0,0,64,199,188,137,127,110,232,21,67,240,63,0,0,0,0,0,48,216,60,103,84,246,114,95,78,240,63,0,0,0,0,0,63,26,189,90,133,21,211,176,89,240,63,0,0,0,0,0,132,2,189,149,31,60,14,10,101,240,63,0,0,0,0,0,96,241,60,26,247,221,41,107,112,240,63,0,0,0,0,0,36,21,61,45,168,114,43,212,123,240,63,0,0,0,0,0,160,233,188,208,155,117,24,69,135,240,63,0,0,0,0,0,64,230,60,200,7,102,246,189,146,240,63,0,0,0,0,0,120,0,189,131,243,198,202,62,158,240,63,0,0,0,0,0,0,152,188,48,57,31,155,199,169,240,63,0,0,0,0,0,160,255,60,252,136,249,108,88,181,240,63,0,0,0,0,0,200,250,188,138,108,228,69,241,192,240,63,0,0,0,0,0,192,217,60,22,72,114,43,146,204,240,63,0,0,0,0,0,32,5,61,216,93,57,35,59,216,240,63,0,0,0,0,0,208,250,188,243,209,211,50,236,227,240,63,0,0,0,0,0,172,27,61,166,169,223,95,165,239,240,63,0,0,0,0,0,232,4,189,240,210,254,175,102,251,240,63,0,0,0,0,0,48,13,189,75,35,215,40,48,7,241,63,0,0,0,0,0,80,241,60,91,91,18,208,1,19,241,63,0,0,0,0,0,0,236,60,249,42,94,171,219,30,241,63,0,0,0,0,0,188,22,61,213,49,108,192,189,42,241,63,0,0,0,0,0,64,232,60,125,4,242,20,168,54,241,63,0,0,0,0,0,208,14,189,233,45,169,174,154,66,241,63,0,0,0,0,0,224,232,60,56,49,79,147,149,78,241,63,0,0,0,0,0,64,235,60,113,142,165,200,152,90,241,63,0,0,0,0,0,48,5,61,223,195,113,84,164,102,241,63,0,0,0,0,0,56,3,61,17,82,125,60,184,114,241,63,0,0,0,0,0,212,40,61,159,187,149,134,212,126,241,63,0,0,0,0,0,208,5,189,147,141,140,56,249,138,241,63,0,0,0,0,0,136,28,189,102,93,55,88,38,151,241,63,0,0,0,0,0,240,17,61,167,203,111,235,91,163,241,63,0,0,0,0,0,72,16,61,227,135,19,248,153,175,241,63,0,0,0,0,0,57,71,189,84,93,4,132,224,187,241,63,0,0,0,0,0,228,36,61,67,28,40,149,47,200,241,63,0,0,0,0,0,32,10,189,178,185,104,49,135,212,241,63,0,0,0,0,0,128,227,60,49,64,180,94,231,224,241,63,0,0,0,0,0,192,234,60,56,217,252,34,80,237,241,63,0,0,0,0,0,144,1,61,247,205,56,132,193,249,241,63,0,0,0,0,0,120,27,189,143,141,98,136,59,6,242,63,0,0,0,0,0,148,45,61,30,168,120,53,190,18,242,63,0,0,0,0,0,0,216,60,65,221,125,145,73,31,242,63,0,0,0,0,0,52,43,61,35,19,121,162,221,43,242,63,0,0,0,0,0,248,25,61,231,97,117,110,122,56,242,63,0,0,0,0,0,200,25,189,39,20,130,251,31,69,242,63,0,0,0,0,0,48,2,61,2,166,178,79,206,81,242,63,0,0,0,0,0,72,19,189,176,206,30,113,133,94,242,63,0,0,0,0,0,112,18,61,22,125,226,101,69,107,242,63,0,0,0,0,0,208,17,61,15,224,29,52,14,120,242,63,0,0,0,0,0,238,49,61,62,99,245,225,223,132,242,63,0,0,0,0,0,192,20,189,48,187,145,117,186,145,242,63,0,0,0,0,0,216,19,189,9,223,31,245,157,158,242,63,0,0,0,0,0,176,8,61,155,14,209,102,138,171,242,63,0,0,0,0,0,124,34,189,58,218,218,208,127,184,242,63,0,0,0,0,0,52,42,61,249,26,119,57,126,197,242,63,0,0,0,0,0,128,16,189,217,2,228,166,133,210,242,63,0,0,0,0,0,208,14,189,121,21,100,31,150,223,242,63,0,0,0,0,0,32,244,188,207,46,62,169,175,236,242,63,0,0,0,0,0,152,36,189,34,136,189,74,210,249,242,63,0,0,0,0,0,48,22,189,37,182,49,10,254,6,243,63,0,0,0,0,0,54,50,189,11,165,238,237,50,20,243,63,0,0,0,0,128,223,112,189,184,215,76,252,112,33,243,63,0,0,0,0,0,72,34,189,162,233,168,59,184,46,243,63,0,0,0,0,0,152,37,189,102,23,100,178,8,60,243,63,0,0,0,0,0,208,30,61,39,250,227,102,98,73,243,63,0,0,0,0,0,0,220,188,15,159,146,95,197,86,243,63,0,0,0,0,0,216,48,189,185,136,222,162,49,100,243,63,0,0,0,0,0,200,34,61,57,170,58,55,167,113,243,63,0,0,0,0,0,96,32,61,254,116,30,35,38,127,243,63,0,0,0,0,0,96,22,189,56,216,5,109,174,140,243,63,0,0,0,0,0,224,10,189,195,62,113,27,64,154,243,63,0,0,0,0,0,114,68,189,32,160,229,52,219,167,243,63,0,0,0,0,0,32,8,61,149,110,236,191,127,181,243,63,0,0,0,0,0,128,62,61,242,168,19,195,45,195,243,63,0,0,0,0,0,128,239,60,34,225,237,68,229,208,243,63,0,0,0,0,0,160,23,189,187,52,18,76,166,222,243,63,0,0,0,0,0,48,38,61,204,78,28,223,112,236,243,63,0,0,0,0,0,166,72,189,140,126,172,4,69,250,243,63,0,0,0,0,0,220,60,189,187,160,103,195,34,8,244,63,0,0,0,0,0,184,37,61,149,46,247,33,10,22,244,63,0,0,0,0,0,192,30,61,70,70,9,39,251,35,244,63,0,0,0,0,0,96,19,189,32,169,80,217,245,49,244,63,0,0,0,0,0,152,35,61,235,185,132,63,250,63,244,63,0,0,0,0,0,0,250,60,25,137,97,96,8,78,244,63,0,0,0,0,0,192,246,188,1,210,167,66,32,92,244,63,0,0,0,0,0,192,11,189,22,0,29,237,65,106,244,63,0,0,0,0,0,128,18,189,38,51,139,102,109,120,244,63,0,0,0,0,0,224,48,61,0,60,193,181,162,134,244,63,0,0,0,0,0,64,45,189,4,175,146,225,225,148,244,63,0,0,0,0,0,32,12,61,114,211,215,240,42,163,244,63,0,0,0,0,0,80,30,189,1,184,109,234,125,177,244,63,0,0,0,0,0,128,7,61,225,41,54,213,218,191,244,63,0,0,0,0,0,128,19,189,50,193,23,184,65,206,244,63,0,0,0,0,0,128,0,61,219,221,253,153,178,220,244,63,0,0,0,0,0,112,44,61,150,171,216,129,45,235,244,63,0,0,0,0,0,224,28,189,2,45,157,118,178,249,244,63,0,0,0,0,0,32,25,61,193,49,69,127,65,8,245,63,0,0,0,0,0,192,8,189,42,102,207,162,218,22,245,63,0,0,0,0,0,0,250,188,234,81,63,232,125,37,245,63,0,0,0,0,0,8,74,61,218,78,157,86,43,52,245,63,0,0,0,0,0,216,38,189,26,172,246,244,226,66,245,63,0,0,0,0,0,68,50,189,219,148,93,202,164,81,245,63,0,0,0,0,0,60,72,61,107,17,233,221,112,96,245,63,0,0,0,0,0,176,36,61,222,41,181,54,71,111,245,63,0,0,0,0,0,90,65,61,14,196,226,219,39,126,245,63,0,0,0,0,0,224,41,189,111,199,151,212,18,141,245,63,0,0,0,0,0,8,35,189,76,11,255,39,8,156,245,63,0,0,0,0,0,236,77,61,39,84,72,221,7,171,245,63,0,0,0,0,0,0,196,188,244,122,168,251,17,186,245,63,0,0,0,0,0,8,48,61,11,70,89,138,38,201,245,63,0,0,0,0,0,200,38,189,63,142,153,144,69,216,245,63,0,0,0,0,0,154,70,61,225,32,173,21,111,231,245,63,0,0,0,0,0,64,27,189,202,235,220,32,163,246,245,63,0,0,0,0,0,112,23,61,184,220,118,185,225,5,246,63,0,0,0,0,0,248,38,61,21,247,205,230,42,21,246,63,0,0,0,0,0,0,1,61,49,85,58,176,126,36,246,63,0,0,0,0,0,208,21,189,181,41,25,29,221,51,246,63,0,0,0,0,0,208,18,189,19,195,204,52,70,67,246,63,0,0,0,0,0,128,234,188,250,142,188,254,185,82,246,63,0,0,0,0,0,96,40,189,151,51,85,130,56,98,246,63,0,0,0,0,0,254,113,61,142,50,8,199,193,113,246,63,0,0,0,0,0,32,55,189,126,169,76,212,85,129,246,63,0,0,0,0,0,128,230,60,113,148,158,177,244,144,246,63,0,0,0,0,0,120,41,189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,0,0,0,0,0,0,40,110,117,108,108,41,0,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,0,0,0,0,0,105,110,102,0,0,0,0,0,73,78,70,0,0,0,0,0,110,97,110,0,0,0,0,0,78,65,78,0,0,0,0,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+91696);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);function copyTempFloat(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr],HEAP8[tempDoublePtr+1]=HEAP8[ptr+1],HEAP8[tempDoublePtr+2]=HEAP8[ptr+2],HEAP8[tempDoublePtr+3]=HEAP8[ptr+3]}function copyTempDouble(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr],HEAP8[tempDoublePtr+1]=HEAP8[ptr+1],HEAP8[tempDoublePtr+2]=HEAP8[ptr+2],HEAP8[tempDoublePtr+3]=HEAP8[ptr+3],HEAP8[tempDoublePtr+4]=HEAP8[ptr+4],HEAP8[tempDoublePtr+5]=HEAP8[ptr+5],HEAP8[tempDoublePtr+6]=HEAP8[ptr+6],HEAP8[tempDoublePtr+7]=HEAP8[ptr+7]}function _InitGainAnalysis(){Module.printErr("missing function: InitGainAnalysis"),abort(-1)}function _AnalyzeSamples(){Module.printErr("missing function: AnalyzeSamples"),abort(-1)}assert(tempDoublePtr%8==0),Module._i64Subtract=_i64Subtract;var _fabsf=Math_abs,_floorf=Math_floor;Module._memset=_memset;var _BDtoILow=!0,ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86},ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"},___errno_state=0;function ___setErrNo(value){return HEAP32[___errno_state>>2]=value,value}function _strerror_r(errnum,strerrbuf,buflen){return errnum in ERRNO_MESSAGES?ERRNO_MESSAGES[errnum].length>buflen-1?___setErrNo(ERRNO_CODES.ERANGE):(writeAsciiToMemory(ERRNO_MESSAGES[errnum],strerrbuf),0):___setErrNo(ERRNO_CODES.EINVAL)}function _strerror(errnum){return _strerror.buffer||(_strerror.buffer=_malloc(256)),_strerror_r(errnum,_strerror.buffer,256),_strerror.buffer}function _VBR_encode_frame(){Module.printErr("missing function: VBR_encode_frame"),abort(-1)}function _abort(){Module.abort()}function _init_xrpow_core_sse(){Module.printErr("missing function: init_xrpow_core_sse"),abort(-1)}var PATH={splitPath:function(filename){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){for(var up=0,i=parts.length-1;i>=0;i--){var last=parts[i];"."===last?parts.splice(i,1):".."===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift("..");return parts},normalize:function(path){var isAbsolute="/"===path.charAt(0),trailingSlash="/"===path.substr(-1);return(path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/"))||isAbsolute||(path="."),path&&trailingSlash&&(path+="/"),(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];return root||dir?(dir&&(dir=dir.substr(0,dir.length-1)),root+dir):"."},basename:function(path){if("/"===path)return"/";var lastSlash=path.lastIndexOf("/");return-1===lastSlash?path:path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)},resolve:function(){for(var resolvedPath="",resolvedAbsolute=!1,i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if("string"!=typeof path)throw new TypeError("Arguments to path.resolve must be strings");if(!path)return"";resolvedPath=path+"/"+resolvedPath,resolvedAbsolute="/"===path.charAt(0)}return(resolvedAbsolute?"/":"")+(resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/"))||"."},relative:function(from,to){function trim(arr){for(var start=0;start=0&&""===arr[end];end--);return start>end?[]:arr.slice(start,end-start+1)}from=PATH.resolve(from).substr(1),to=PATH.resolve(to).substr(1);for(var fromParts=trim(from.split("/")),toParts=trim(to.split("/")),length=Math.min(fromParts.length,toParts.length),samePartsLength=length,i=0;i0?buf.slice(0,bytesRead).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(result=window.prompt("Input: "))&&(result+="\n"):"function"==typeof readline&&null!==(result=readline())&&(result+="\n");if(!result)return null;tty.input=intArrayFromString(result,!0)}return tty.input.shift()},put_char:function(tty,val){null===val||10===val?(Module.print(UTF8ArrayToString(tty.output,0)),tty.output=[]):0!=val&&tty.output.push(val)},flush:function(tty){tty.output&&tty.output.length>0&&(Module.print(UTF8ArrayToString(tty.output,0)),tty.output=[])}},default_tty1_ops:{put_char:function(tty,val){null===val||10===val?(Module.printErr(UTF8ArrayToString(tty.output,0)),tty.output=[]):0!=val&&tty.output.push(val)},flush:function(tty){tty.output&&tty.output.length>0&&(Module.printErr(UTF8ArrayToString(tty.output,0)),tty.output=[])}}},MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16895,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode))throw new FS.ErrnoError(ERRNO_CODES.EPERM);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var node=FS.createNode(parent,name,mode,dev);return FS.isDir(node.mode)?(node.node_ops=MEMFS.ops_table.dir.node,node.stream_ops=MEMFS.ops_table.dir.stream,node.contents={}):FS.isFile(node.mode)?(node.node_ops=MEMFS.ops_table.file.node,node.stream_ops=MEMFS.ops_table.file.stream,node.usedBytes=0,node.contents=null):FS.isLink(node.mode)?(node.node_ops=MEMFS.ops_table.link.node,node.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(node.mode)&&(node.node_ops=MEMFS.ops_table.chrdev.node,node.stream_ops=MEMFS.ops_table.chrdev.stream),node.timestamp=Date.now(),parent&&(parent.contents[name]=node),node},getFileDataAsRegularArray:function(node){if(node.contents&&node.contents.subarray){for(var arr=[],i=0;inode.contents.length&&(node.contents=MEMFS.getFileDataAsRegularArray(node),node.usedBytes=node.contents.length),!node.contents||node.contents.subarray){var prevCapacity=node.contents?node.contents.buffer.byteLength:0;if(prevCapacity>=newCapacity)return;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity<1048576?2:1.125)|0),0!=prevCapacity&&(newCapacity=Math.max(newCapacity,256));var oldContents=node.contents;return node.contents=new Uint8Array(newCapacity),void(node.usedBytes>0&&node.contents.set(oldContents.subarray(0,node.usedBytes),0))}for(!node.contents&&newCapacity>0&&(node.contents=[]);node.contents.lengthnewSize)node.contents.length=newSize;else for(;node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(assert(size>=0),size>8&&contents.subarray)buffer.set(contents.subarray(position,position+size),offset);else for(var i=0;i0||position+lengthe2.timestamp)&&(create.push(key),total++)});var remove=[];if(Object.keys(dst.entries).forEach(function(key){dst.entries[key];src.entries[key]||(remove.push(key),total++)}),!total)return callback(null);var completed=0,transaction=("remote"===src.type?src.db:dst.db).transaction([IDBFS.DB_STORE_NAME],"readwrite"),store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){return err?done.errored?void 0:(done.errored=!0,callback(err)):++completed>=total?callback(null):void 0}transaction.onerror=function(e){done(this.error),e.preventDefault()},create.sort().forEach(function(path){"local"===dst.type?IDBFS.loadRemoteEntry(store,path,function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)}):IDBFS.loadLocalEntry(path,function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}),remove.sort().reverse().forEach(function(path){"local"===dst.type?IDBFS.removeLocalEntry(path,done):IDBFS.removeRemoteEntry(store,path,done)})}},NODEFS={isWindows:!1,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/)},mount:function(mount){return assert(ENVIRONMENT_IS_NODE),NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)},createNode:function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var node=FS.createNode(parent,name,mode);return node.node_ops=NODEFS.node_ops,node.stream_ops=NODEFS.stream_ops,node},getMode:function(path){var stat;try{stat=fs.lstatSync(path),NODEFS.isWindows&&(stat.mode=stat.mode|(146&stat.mode)>>1)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return stat.mode},realPath:function(node){for(var parts=[];node.parent!==node;)parts.push(node.name),node=node.parent;return parts.push(node.mount.opts.root),parts.reverse(),PATH.join.apply(null,parts)},flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function(flags){return flags in NODEFS.flagsToPermissionStringMap?NODEFS.flagsToPermissionStringMap[flags]:flags},node_ops:{getattr:function(node){var stat,path=NODEFS.realPath(node);try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return NODEFS.isWindows&&!stat.blksize&&(stat.blksize=4096),NODEFS.isWindows&&!stat.blocks&&(stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0),{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}},setattr:function(node,attr){var path=NODEFS.realPath(node);try{if(void 0!==attr.mode&&(fs.chmodSync(path,attr.mode),node.mode=attr.mode),void 0!==attr.timestamp){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}void 0!==attr.size&&fs.truncateSync(path,attr.size)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}},lookup:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name),mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)},mknod:function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev),path=NODEFS.realPath(node);try{FS.isDir(node.mode)?fs.mkdirSync(path,node.mode):fs.writeFileSync(path,"",{mode:node.mode})}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return node},rename:function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode),newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}},unlink:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}},rmdir:function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}},readdir:function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}},symlink:function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}},readlink:function(node){var path=NODEFS.realPath(node);try{return path=fs.readlinkSync(path),path=NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root),path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}},stream_ops:{open:function(stream){var path=NODEFS.realPath(stream.node);try{FS.isFile(stream.node.mode)&&(stream.nfd=fs.openSync(path,NODEFS.flagsToPermissionString(stream.flags)))}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}},close:function(stream){try{FS.isFile(stream.node.mode)&&stream.nfd&&fs.closeSync(stream.nfd)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}},read:function(stream,buffer,offset,length,position){if(0===length)return 0;var res,nbuffer=new Buffer(length);try{res=fs.readSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(res>0)for(var i=0;i8)throw new FS.ErrnoError(ERRNO_CODES.ELOOP);for(var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!1),current=FS.root,current_path="/",i=0;i40)throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}return{path:current_path,node:current}},getPath:function(node){for(var path;;){if(FS.isRoot(node)){var mount=node.mount.mountpoint;return path?"/"!==mount[mount.length-1]?mount+"/"+path:mount+path:mount}path=path?node.name+"/"+path:node.name,node=node.parent}},hashName:function(parentid,name){for(var hash=0,i=0;i>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash],FS.nameTable[hash]=node},hashRemoveNode:function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node)FS.nameTable[hash]=node.name_next;else for(var current=FS.nameTable[hash];current;){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}},lookupNode:function(parent,name){var err=FS.mayLookup(parent);if(err)throw new FS.ErrnoError(err,parent);for(var hash=FS.hashName(parent.id,name),node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name)return node}return FS.lookup(parent,name)},createNode:function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=function(parent,name,mode,rdev){parent||(parent=this),this.parent=parent,this.mount=parent.mount,this.mounted=null,this.id=FS.nextInode++,this.name=name,this.mode=mode,this.node_ops={},this.stream_ops={},this.rdev=rdev},FS.FSNode.prototype={};Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(val){val?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(val){val?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var node=new FS.FSNode(parent,name,mode,rdev);return FS.hashAddNode(node),node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return 32768==(61440&mode)},isDir:function(mode){return 16384==(61440&mode)},isLink:function(mode){return 40960==(61440&mode)},isChrdev:function(mode){return 8192==(61440&mode)},isBlkdev:function(mode){return 24576==(61440&mode)},isFIFO:function(mode){return 4096==(61440&mode)},isSocket:function(mode){return!(49152&~mode)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(void 0===flags)throw new Error("Unknown file open mode: "+str);return flags},flagsToPermissionString:function(flag){var perms=["r","w","rw"][2097155&flag];return 512&flag&&(perms+="w"),perms},nodePermissions:function(node,perms){return FS.ignorePermissions||(-1===perms.indexOf("r")||292&node.mode)&&(-1===perms.indexOf("w")||146&node.mode)&&(-1===perms.indexOf("x")||73&node.mode)?0:ERRNO_CODES.EACCES},mayLookup:function(dir){var err=FS.nodePermissions(dir,"x");return err||(dir.node_ops.lookup?0:ERRNO_CODES.EACCES)},mayCreate:function(dir,name){try{FS.lookupNode(dir,name);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err)return err;if(isdir){if(!FS.isDir(node.mode))return ERRNO_CODES.ENOTDIR;if(FS.isRoot(node)||FS.getPath(node)===FS.cwd())return ERRNO_CODES.EBUSY}else if(FS.isDir(node.mode))return ERRNO_CODES.EISDIR;return 0},mayOpen:function(node,flags){return node?FS.isLink(node.mode)?ERRNO_CODES.ELOOP:FS.isDir(node.mode)&&(2097155&flags||512&flags)?ERRNO_CODES.EISDIR:FS.nodePermissions(node,FS.flagsToPermissionString(flags)):ERRNO_CODES.ENOENT},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0,fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++)if(!FS.streams[fd])return fd;throw new FS.ErrnoError(ERRNO_CODES.EMFILE)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){FS.FSStream||(FS.FSStream=function(){},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return!!(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var newStream=new FS.FSStream;for(var p in stream)newStream[p]=stream[p];stream=newStream;var fd=FS.nextfd(fd_start,fd_end);return stream.fd=fd,FS.streams[fd]=stream,stream},closeStream:function(fd){FS.streams[fd]=null},getStreamFromPtr:function(ptr){return FS.streams[ptr-1]},getPtrForStream:function(stream){return stream?stream.fd+1:0},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops,stream.stream_ops.open&&stream.stream_ops.open(stream)},llseek:function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}},major:function(dev){return dev>>8},minor:function(dev){return 255&dev},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){for(var mounts=[],check=[mount];check.length;){var m=check.pop();mounts.push(m),check.push.apply(check,m.mounts)}return mounts},syncfs:function(populate,callback){"function"==typeof populate&&(callback=populate,populate=!1);var mounts=FS.getMounts(FS.root.mount),completed=0;function done(err){if(err)return done.errored?void 0:(done.errored=!0,callback(err));++completed>=mounts.length&&callback(null)}mounts.forEach(function(mount){if(!mount.type.syncfs)return done(null);mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){var node,root="/"===mountpoint,pseudo=!mountpoint;if(root&&FS.root)throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:!1});if(mountpoint=lookup.path,node=lookup.node,FS.isMountpoint(node))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!FS.isDir(node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]},mountRoot=type.mount(mount);return mountRoot.mount=mount,mount.root=mountRoot,root?FS.root=mountRoot:node&&(node.mounted=mount,node.mount&&node.mount.mounts.push(mount)),mountRoot},unmount:function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:!1});if(!FS.isMountpoint(lookup.node))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var node=lookup.node,mount=node.mounted,mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){for(var current=FS.nameTable[hash];current;){var next=current.name_next;-1!==mounts.indexOf(current.mount)&&FS.destroyNode(current),current=next}}),node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(-1!==idx),node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var parent=FS.lookupPath(path,{parent:!0}).node,name=PATH.basename(path);if(!name||"."===name||".."===name)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var err=FS.mayCreate(parent,name);if(err)throw new FS.ErrnoError(err);if(!parent.node_ops.mknod)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return parent.node_ops.mknod(parent,name,mode,dev)},create:function(path,mode){return mode=void 0!==mode?mode:438,mode&=4095,mode|=32768,FS.mknod(path,mode,0)},mkdir:function(path,mode){return mode=void 0!==mode?mode:511,mode&=1023,mode|=16384,FS.mknod(path,mode,0)},mkdev:function(path,mode,dev){return void 0===dev&&(dev=mode,mode=438),mode|=8192,FS.mknod(path,mode,dev)},symlink:function(oldpath,newpath){if(!PATH.resolve(oldpath))throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var parent=FS.lookupPath(newpath,{parent:!0}).node;if(!parent)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var newname=PATH.basename(newpath),err=FS.mayCreate(parent,newname);if(err)throw new FS.ErrnoError(err);if(!parent.node_ops.symlink)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return parent.node_ops.symlink(parent,newname,oldpath)},rename:function(old_path,new_path){var old_dir,new_dir,old_dirname=PATH.dirname(old_path),new_dirname=PATH.dirname(new_path),old_name=PATH.basename(old_path),new_name=PATH.basename(new_path);try{old_dir=FS.lookupPath(old_path,{parent:!0}).node,new_dir=FS.lookupPath(new_path,{parent:!0}).node}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!old_dir||!new_dir)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(old_dir.mount!==new_dir.mount)throw new FS.ErrnoError(ERRNO_CODES.EXDEV);var new_node,old_node=FS.lookupNode(old_dir,old_name),relative=PATH.relative(old_path,new_dirname);if("."!==relative.charAt(0))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if("."!==(relative=PATH.relative(new_path,old_dirname)).charAt(0))throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node!==new_node){var isdir=FS.isDir(old_node.mode),err=FS.mayDelete(old_dir,old_name,isdir);if(err)throw new FS.ErrnoError(err);if(err=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name))throw new FS.ErrnoError(err);if(!old_dir.node_ops.rename)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(new_dir!==old_dir&&(err=FS.nodePermissions(old_dir,"w")))throw new FS.ErrnoError(err);try{FS.trackingDelegate.willMovePath&&FS.trackingDelegate.willMovePath(old_path,new_path)}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{FS.trackingDelegate.onMovePath&&FS.trackingDelegate.onMovePath(old_path,new_path)}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}}},rmdir:function(path){var parent=FS.lookupPath(path,{parent:!0}).node,name=PATH.basename(path),node=FS.lookupNode(parent,name),err=FS.mayDelete(parent,name,!0);if(err)throw new FS.ErrnoError(err);if(!parent.node_ops.rmdir)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(node))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(path)}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.rmdir(parent,name),FS.destroyNode(node);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}},readdir:function(path){var node=FS.lookupPath(path,{follow:!0}).node;if(!node.node_ops.readdir)throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);return node.node_ops.readdir(node)},unlink:function(path){var parent=FS.lookupPath(path,{parent:!0}).node,name=PATH.basename(path),node=FS.lookupNode(parent,name),err=FS.mayDelete(parent,name,!1);if(err)throw err===ERRNO_CODES.EISDIR&&(err=ERRNO_CODES.EPERM),new FS.ErrnoError(err);if(!parent.node_ops.unlink)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(node))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(path)}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.unlink(parent,name),FS.destroyNode(node);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}},readlink:function(path){var lookup=FS.lookupPath(path),link=lookup.node;if(!link)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(!link.node_ops.readlink)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return PATH.resolve(FS.getPath(lookup.node.parent),link.node_ops.readlink(link))},stat:function(path,dontFollow){var node=FS.lookupPath(path,{follow:!dontFollow}).node;if(!node)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(!node.node_ops.getattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return node.node_ops.getattr(node)},lstat:function(path){return FS.stat(path,!0)},chmod:function(path,mode,dontFollow){var node;"string"==typeof path?node=FS.lookupPath(path,{follow:!dontFollow}).node:node=path;if(!node.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);node.node_ops.setattr(node,{mode:4095&mode|-4096&node.mode,timestamp:Date.now()})},lchmod:function(path,mode){FS.chmod(path,mode,!0)},fchmod:function(fd,mode){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chmod(stream.node,mode)},chown:function(path,uid,gid,dontFollow){var node;"string"==typeof path?node=FS.lookupPath(path,{follow:!dontFollow}).node:node=path;if(!node.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:function(path,uid,gid){FS.chown(path,uid,gid,!0)},fchown:function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chown(stream.node,uid,gid)},truncate:function(path,len){if(len<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var node;"string"==typeof path?node=FS.lookupPath(path,{follow:!0}).node:node=path;if(!node.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isDir(node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!FS.isFile(node.mode))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var err=FS.nodePermissions(node,"w");if(err)throw new FS.ErrnoError(err);node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:function(fd,len){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(!(2097155&stream.flags))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);FS.truncate(stream.node,len)},utime:function(path,atime,mtime){var node=FS.lookupPath(path,{follow:!0}).node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:function(path,flags,mode,fd_start,fd_end){if(""===path)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var node;if(mode=void 0===mode?438:mode,mode=64&(flags="string"==typeof flags?FS.modeStringToFlags(flags):flags)?4095&mode|32768:0,"object"==typeof path)node=path;else{path=PATH.normalize(path);try{node=FS.lookupPath(path,{follow:!(131072&flags)}).node}catch(e){}}var created=!1;if(64&flags)if(node){if(128&flags)throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}else node=FS.mknod(path,mode,0),created=!0;if(!node)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(FS.isChrdev(node.mode)&&(flags&=-513),!created){var err=FS.mayOpen(node,flags);if(err)throw new FS.ErrnoError(err)}512&flags&&FS.truncate(node,0),flags&=-641;var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:!0,position:0,stream_ops:node.stream_ops,ungotten:[],error:!1},fd_start,fd_end);stream.stream_ops.open&&stream.stream_ops.open(stream),!Module.logReadFiles||1&flags||(FS.readFiles||(FS.readFiles={}),path in FS.readFiles||(FS.readFiles[path]=1,Module.printErr("read file: "+path)));try{if(FS.trackingDelegate.onOpenFile){var trackingFlags=0;1!=(2097155&flags)&&(trackingFlags|=FS.tracking.openFlags.READ),2097155&flags&&(trackingFlags|=FS.tracking.openFlags.WRITE),FS.trackingDelegate.onOpenFile(path,trackingFlags)}}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: "+e.message)}return stream},close:function(stream){try{stream.stream_ops.close&&stream.stream_ops.close(stream)}catch(e){throw e}finally{FS.closeStream(stream.fd)}},llseek:function(stream,offset,whence){if(!stream.seekable||!stream.stream_ops.llseek)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);return stream.position=stream.stream_ops.llseek(stream,offset,whence),stream.ungotten=[],stream.position},read:function(stream,buffer,offset,length,position){if(length<0||position<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(1==(2097155&stream.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(stream.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!stream.stream_ops.read)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var seeking=!0;if(void 0===position)position=stream.position,seeking=!1;else if(!stream.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);return seeking||(stream.position+=bytesRead),bytesRead},write:function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(!(2097155&stream.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(stream.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!stream.stream_ops.write)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);1024&stream.flags&&FS.llseek(stream,0,2);var seeking=!0;if(void 0===position)position=stream.position,seeking=!1;else if(!stream.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);seeking||(stream.position+=bytesWritten);try{stream.path&&FS.trackingDelegate.onWriteToFile&&FS.trackingDelegate.onWriteToFile(stream.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return bytesWritten},allocate:function(stream,offset,length){if(offset<0||length<=0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(!(2097155&stream.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(!FS.isFile(stream.node.mode)&&!FS.isDir(node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);if(!stream.stream_ops.allocate)throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);stream.stream_ops.allocate(stream,offset,length)},mmap:function(stream,buffer,offset,length,position,prot,flags){if(1==(2097155&stream.flags))throw new FS.ErrnoError(ERRNO_CODES.EACCES);if(!stream.stream_ops.mmap)throw new FS.ErrnoError(ERRNO_CODES.ENODEV);return stream.stream_ops.mmap(stream,buffer,offset,length,position,prot,flags)},msync:function(stream,buffer,offset,length,mmapFlags){return stream&&stream.stream_ops.msync?stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags):0},munmap:function(stream){return 0},ioctl:function(stream,cmd,arg){if(!stream.stream_ops.ioctl)throw new FS.ErrnoError(ERRNO_CODES.ENOTTY);return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:function(path,opts){if((opts=opts||{}).flags=opts.flags||"r",opts.encoding=opts.encoding||"binary","utf8"!==opts.encoding&&"binary"!==opts.encoding)throw new Error('Invalid encoding type "'+opts.encoding+'"');var ret,stream=FS.open(path,opts.flags),length=FS.stat(path).size,buf=new Uint8Array(length);return FS.read(stream,buf,0,length,0),"utf8"===opts.encoding?ret=UTF8ArrayToString(buf,0):"binary"===opts.encoding&&(ret=buf),FS.close(stream),ret},writeFile:function(path,data,opts){if((opts=opts||{}).flags=opts.flags||"w",opts.encoding=opts.encoding||"utf8","utf8"!==opts.encoding&&"binary"!==opts.encoding)throw new Error('Invalid encoding type "'+opts.encoding+'"');var stream=FS.open(path,opts.flags,opts.mode);if("utf8"===opts.encoding){var buf=new Uint8Array(lengthBytesUTF8(data)+1),actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,0,opts.canOwn)}else"binary"===opts.encoding&&FS.write(stream,data,0,data.length,0,opts.canOwn);FS.close(stream)},cwd:function(){return FS.currentPath},chdir:function(path){var lookup=FS.lookupPath(path,{follow:!0});if(!FS.isDir(lookup.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);var err=FS.nodePermissions(lookup.node,"x");if(err)throw new FS.ErrnoError(err);FS.currentPath=lookup.path},createDefaultDirectories:function(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices:function(){var random_device;if(FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(stream,buffer,offset,length,pos){return length}}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0)),"undefined"!=typeof crypto){var randomBuffer=new Uint8Array(1);random_device=function(){return crypto.getRandomValues(randomBuffer),randomBuffer[0]}}else random_device=ENVIRONMENT_IS_NODE?function(){return require("crypto").randomBytes(1)[0]}:function(){return 256*Math.random()|0};FS.createDevice("/dev","random",random_device),FS.createDevice("/dev","urandom",random_device),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createStandardStreams:function(){Module.stdin?FS.createDevice("/dev","stdin",Module.stdin):FS.symlink("/dev/tty","/dev/stdin"),Module.stdout?FS.createDevice("/dev","stdout",null,Module.stdout):FS.symlink("/dev/tty","/dev/stdout"),Module.stderr?FS.createDevice("/dev","stderr",null,Module.stderr):FS.symlink("/dev/tty1","/dev/stderr");var stdin=FS.open("/dev/stdin","r");HEAP32[_stdin>>2]=FS.getPtrForStream(stdin),assert(0===stdin.fd,"invalid handle for stdin ("+stdin.fd+")");var stdout=FS.open("/dev/stdout","w");HEAP32[_stdout>>2]=FS.getPtrForStream(stdout),assert(1===stdout.fd,"invalid handle for stdout ("+stdout.fd+")");var stderr=FS.open("/dev/stderr","w");HEAP32[_stderr>>2]=FS.getPtrForStream(stderr),assert(2===stderr.fd,"invalid handle for stderr ("+stderr.fd+")")},ensureErrnoError:function(){FS.ErrnoError||(FS.ErrnoError=function(errno,node){this.node=node,this.setErrno=function(errno){for(var key in this.errno=errno,ERRNO_CODES)if(ERRNO_CODES[key]===errno){this.code=key;break}},this.setErrno(errno),this.message=ERRNO_MESSAGES[errno]},FS.ErrnoError.prototype=new Error,FS.ErrnoError.prototype.constructor=FS.ErrnoError,[ERRNO_CODES.ENOENT].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code),FS.genericErrors[code].stack=""}))},staticInit:function(){FS.ensureErrnoError(),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices()},init:function(input,output,error){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),FS.init.initialized=!0,FS.ensureErrnoError(),Module.stdin=input||Module.stdin,Module.stdout=output||Module.stdout,Module.stderr=error||Module.stderr,FS.createStandardStreams()},quit:function(){FS.init.initialized=!1;for(var i=0;ithis.length-1||idx<0)){var chunkOffset=idx%this.chunkSize,chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]}},LazyUint8Array.prototype.setDataGetter=function(getter){this.getter=getter},LazyUint8Array.prototype.cacheLength=function(){var xhr=new XMLHttpRequest;if(xhr.open("HEAD",url,!1),xhr.send(null),!(xhr.status>=200&&xhr.status<300||304===xhr.status))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var header,datalength=Number(xhr.getResponseHeader("Content-length")),hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&"bytes"===header,chunkSize=1048576;hasByteServing||(chunkSize=datalength);var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize,end=(chunkNum+1)*chunkSize-1;if(end=Math.min(end,datalength-1),void 0===lazyArray.chunks[chunkNum]&&(lazyArray.chunks[chunkNum]=function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;if(xhr.open("GET",url,!1),datalength!==chunkSize&&xhr.setRequestHeader("Range","bytes="+from+"-"+to),"undefined"!=typeof Uint8Array&&(xhr.responseType="arraybuffer"),xhr.overrideMimeType&&xhr.overrideMimeType("text/plain; charset=x-user-defined"),xhr.send(null),!(xhr.status>=200&&xhr.status<300||304===xhr.status))throw new Error("Couldn't load "+url+". Status: "+xhr.status);return void 0!==xhr.response?new Uint8Array(xhr.response||[]):intArrayFromString(xhr.responseText||"",!0)}(start,end)),void 0===lazyArray.chunks[chunkNum])throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]}),this._length=datalength,this._chunkSize=chunkSize,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperty(lazyArray,"length",{get:function(){return this.lengthKnown||this.cacheLength(),this._length}}),Object.defineProperty(lazyArray,"chunkSize",{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}});var properties={isDevice:!1,contents:lazyArray}}else properties={isDevice:!1,url:url};var node=FS.createFile(parent,name,properties,canRead,canWrite);properties.contents?node.contents=properties.contents:properties.url&&(node.contents=null,node.url=properties.url),Object.defineProperty(node,"usedBytes",{get:function(){return this.contents.length}});var stream_ops={};return Object.keys(node.stream_ops).forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function(){if(!FS.forceLoadFile(node))throw new FS.ErrnoError(ERRNO_CODES.EIO);return fn.apply(null,arguments)}}),stream_ops.read=function(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node))throw new FS.ErrnoError(ERRNO_CODES.EIO);var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(assert(size>=0),contents.slice)for(var i=0;i0){var start=Date.now(),blocker=Browser.mainLoop.queue.shift();if(blocker.func(blocker.arg),Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers,next=remaining%1==0?remaining-1:Math.floor(remaining);blocker.counted?Browser.mainLoop.remainingBlockers=next:(next+=.5,Browser.mainLoop.remainingBlockers=(8*remaining+next)/9)}return console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms"),Browser.mainLoop.updateStatus(),void setTimeout(Browser.mainLoop.runner,0)}thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0?Browser.mainLoop.scheduler():("timeout"===Browser.mainLoop.method&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(function(){void 0!==arg?Runtime.dynCall("vi",func,[arg]):Runtime.dynCall("v",func)}),thisMainLoopId0?_emscripten_set_main_loop_timing(0,1e3/fps):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),simulateInfiniteLoop)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode,timingValue=Browser.mainLoop.timingValue,func=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(func,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(timingMode,timingValue),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var message=Module.statusMessage||"Please wait...",remaining=Browser.mainLoop.remainingBlockers,expected=Browser.mainLoop.expectedBlockers;remaining?remaining=6;){var curr=leftchar>>leftbits-6&63;leftbits-=6,ret+=BASE[curr]}return 2==leftbits?(ret+=BASE[(3&leftchar)<<4],ret+="=="):4==leftbits&&(ret+=BASE[(15&leftchar)<<2],ret+="="),ret}(byteArray),finish(audio))},audio.src=url,Browser.safeSetTimeout(function(){finish(audio)},1e4)}};Module.preloadPlugins.push(audioPlugin);var canvas=Module.canvas;canvas&&(canvas.requestPointerLock=canvas.requestPointerLock||canvas.mozRequestPointerLock||canvas.webkitRequestPointerLock||canvas.msRequestPointerLock||function(){},canvas.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},canvas.exitPointerLock=canvas.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",pointerLockChange,!1),document.addEventListener("mozpointerlockchange",pointerLockChange,!1),document.addEventListener("webkitpointerlockchange",pointerLockChange,!1),document.addEventListener("mspointerlockchange",pointerLockChange,!1),Module.elementPointerLock&&canvas.addEventListener("click",function(ev){!Browser.pointerLock&&canvas.requestPointerLock&&(canvas.requestPointerLock(),ev.preventDefault())},!1))}function pointerLockChange(){Browser.pointerLock=document.pointerLockElement===canvas||document.mozPointerLockElement===canvas||document.webkitPointerLockElement===canvas||document.msPointerLockElement===canvas}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx,contextHandle;if(useWebGL){var contextAttributes={antialias:!1,alpha:!1};if(webGLContextAttributes)for(var attribute in webGLContextAttributes)contextAttributes[attribute]=webGLContextAttributes[attribute];(contextHandle=GL.createContext(canvas,contextAttributes))&&(ctx=GL.getContext(contextHandle).GLctx),canvas.style.backgroundColor="black"}else ctx=canvas.getContext("2d");return ctx?(setInModule&&(useWebGL||assert("undefined"==typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=ctx,useWebGL&&GL.makeContextCurrent(contextHandle),Module.useWebGL=useWebGL,Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()}),Browser.init()),ctx):null},destroyContext:function(canvas,useWebGL,setInModule){},fullScreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullScreen:function(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer,Browser.resizeCanvas=resizeCanvas,Browser.vrDevice=vrDevice,void 0===Browser.lockPointer&&(Browser.lockPointer=!0),void 0===Browser.resizeCanvas&&(Browser.resizeCanvas=!1),void 0===Browser.vrDevice&&(Browser.vrDevice=null);var canvas=Module.canvas;function fullScreenChange(){Browser.isFullScreen=!1;var canvasContainer=canvas.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===canvasContainer?(canvas.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},canvas.cancelFullScreen=canvas.cancelFullScreen.bind(document),Browser.lockPointer&&canvas.requestPointerLock(),Browser.isFullScreen=!0,Browser.resizeCanvas&&Browser.setFullScreenCanvasSize()):(canvasContainer.parentNode.insertBefore(canvas,canvasContainer),canvasContainer.parentNode.removeChild(canvasContainer),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullScreen),Browser.updateCanvasDimensions(canvas)}Browser.fullScreenHandlersInstalled||(Browser.fullScreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",fullScreenChange,!1),document.addEventListener("mozfullscreenchange",fullScreenChange,!1),document.addEventListener("webkitfullscreenchange",fullScreenChange,!1),document.addEventListener("MSFullscreenChange",fullScreenChange,!1));var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas),canvasContainer.appendChild(canvas),canvasContainer.requestFullScreen=canvasContainer.requestFullScreen||canvasContainer.mozRequestFullScreen||canvasContainer.msRequestFullscreen||(canvasContainer.webkitRequestFullScreen?function(){canvasContainer.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),vrDevice?canvasContainer.requestFullScreen({vrDisplay:vrDevice}):canvasContainer.requestFullScreen()},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(0===Browser.nextRAF)Browser.nextRAF=now+1e3/60;else for(;now+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){"undefined"==typeof window?Browser.fakeRequestAnimationFrame(func):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(func))},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?func():Browser.queuedAsyncCallbacks.push(func))})},safeSetTimeout:function(func,timeout){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?func():Browser.queuedAsyncCallbacks.push(func))},timeout)},safeSetInterval:function(func,timeout){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&func()},timeout)},getMimetype:function(name){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(func)},getMovementX:function(event){return event.movementX||event.mozMovementX||event.webkitMovementX||0},getMovementY:function(event){return event.movementY||event.mozMovementY||event.webkitMovementY||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail;break;case"mousewheel":delta=event.wheelDelta;break;case"wheel":delta=event.deltaY;break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock)"mousemove"!=event.type&&"mozMovementX"in event?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(event),Browser.mouseMovementY=Browser.getMovementY(event)),"undefined"!=typeof SDL?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var rect=Module.canvas.getBoundingClientRect(),cw=Module.canvas.width,ch=Module.canvas.height,scrollX=void 0!==window.scrollX?window.scrollX:window.pageXOffset,scrollY=void 0!==window.scrollY?window.scrollY:window.pageYOffset;if("touchstart"===event.type||"touchend"===event.type||"touchmove"===event.type){var touch=event.touch;if(void 0===touch)return;var adjustedX=touch.pageX-(scrollX+rect.left),adjustedY=touch.pageY-(scrollY+rect.top),coords={x:adjustedX*=cw/rect.width,y:adjustedY*=ch/rect.height};if("touchstart"===event.type)Browser.lastTouches[touch.identifier]=coords,Browser.touches[touch.identifier]=coords;else if("touchend"===event.type||"touchmove"===event.type){var last=Browser.touches[touch.identifier];last||(last=coords),Browser.lastTouches[touch.identifier]=last,Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left),y=event.pageY-(scrollY+rect.top);x*=cw/rect.width,y*=ch/rect.height,Browser.mouseMovementX=x-Browser.mouseX,Browser.mouseMovementY=y-Browser.mouseY,Browser.mouseX=x,Browser.mouseY=y}},xhrLoad:function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,!0),xhr.responseType="arraybuffer",xhr.onload=function(){200==xhr.status||0==xhr.status&&xhr.response?onload(xhr.response):onerror()},xhr.onerror=onerror,xhr.send(null)},asyncLoad:function(url,onload,onerror,noRunDep){Browser.xhrLoad(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).'),onload(new Uint8Array(arrayBuffer)),noRunDep||removeRunDependency("al "+url)},function(event){if(!onerror)throw'Loading data file "'+url+'" failed.';onerror()}),noRunDep||addRunDependency("al "+url)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module.canvas;Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module.canvas;Browser.updateCanvasDimensions(canvas,width,height),noUpdates||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function(){if("undefined"!=typeof SDL){var flags=HEAPU32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2];flags|=8388608,HEAP32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2]=flags}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var flags=HEAPU32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2];flags&=-8388609,HEAP32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2]=flags}Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){wNative&&hNative?(canvas.widthNative=wNative,canvas.heightNative=hNative):(wNative=canvas.widthNative,hNative=canvas.heightNative);var w=wNative,h=hNative;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(w/h>8,255&sock.sport])),peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=!0,handleOpen=function(){Module.websocket.emit("open",sock.stream.fd);try{for(var queued=peer.dgram_send_queue.shift();queued;)peer.socket.send(queued),queued=peer.dgram_send_queue.shift()}catch(e){peer.socket.close()}};function handleMessage(data){assert("string"!=typeof data&&void 0!==data.byteLength),data=new Uint8Array(data);var wasfirst=first;if(first=!1,wasfirst&&10===data.length&&255===data[0]&&255===data[1]&&255===data[2]&&255===data[3]&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];return SOCKFS.websocket_sock_ops.removePeer(sock,peer),peer.port=newport,void SOCKFS.websocket_sock_ops.addPeer(sock,peer)}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data}),Module.websocket.emit("message",sock.stream.fd)}ENVIRONMENT_IS_NODE?(peer.socket.on("open",handleOpen),peer.socket.on("message",function(data,flags){flags.binary&&handleMessage(new Uint8Array(data).buffer)}),peer.socket.on("close",function(){Module.websocket.emit("close",sock.stream.fd)}),peer.socket.on("error",function(error){sock.error=ERRNO_CODES.ECONNREFUSED,Module.websocket.emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})):(peer.socket.onopen=handleOpen,peer.socket.onclose=function(){Module.websocket.emit("close",sock.stream.fd)},peer.socket.onmessage=function(event){handleMessage(event.data)},peer.socket.onerror=function(error){sock.error=ERRNO_CODES.ECONNREFUSED,Module.websocket.emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})},poll:function(sock){if(1===sock.type&&sock.server)return sock.pending.length?65:0;var mask=0,dest=1===sock.type?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;return(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED)&&(mask|=65),(!dest||dest&&dest.socket.readyState===dest.socket.OPEN)&&(mask|=4),(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED)&&(mask|=16),mask},ioctl:function(sock,request,arg){if(21531===request){var bytes=0;return sock.recv_queue.length&&(bytes=sock.recv_queue[0].data.length),HEAP32[arg>>2]=bytes,0}return ERRNO_CODES.EINVAL},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}for(var peers=Object.keys(sock.peers),i=0;i>2]=HEAP32[varargs+argIndex>>2],HEAP32[tempDoublePtr+4>>2]=HEAP32[varargs+(argIndex+4)>>2],ret=+HEAPF64[tempDoublePtr>>3],argIndex+=8):"i64"==type?(ret=[HEAP32[varargs+argIndex>>2],HEAP32[varargs+(argIndex+4)>>2]],argIndex+=8):(assert(!(3&argIndex)),type="i32",ret=HEAP32[varargs+argIndex>>2],argIndex+=4),ret}for(var curr,next,ret=[];;){var startTextIndex=textIndex;if(0===(curr=HEAP8[textIndex|0]))break;if(next=HEAP8[textIndex+1|0],37==curr){var flagAlwaysSigned=!1,flagLeftAlign=!1,flagAlternative=!1,flagZeroPad=!1,flagPadSign=!1;flagsLoop:for(;;){switch(next){case 43:flagAlwaysSigned=!0;break;case 45:flagLeftAlign=!0;break;case 35:flagAlternative=!0;break;case 48:if(flagZeroPad)break flagsLoop;flagZeroPad=!0;break;case 32:flagPadSign=!0;break;default:break flagsLoop}textIndex++,next=HEAP8[textIndex+1|0]}var width=0;if(42==next)width=getNextArg("i32"),textIndex++,next=HEAP8[textIndex+1|0];else for(;next>=48&&next<=57;)width=10*width+(next-48),textIndex++,next=HEAP8[textIndex+1|0];var argSize,precisionSet=!1,precision=-1;if(46==next){if(precision=0,precisionSet=!0,textIndex++,42==(next=HEAP8[textIndex+1|0]))precision=getNextArg("i32"),textIndex++;else for(;;){var precisionChr=HEAP8[textIndex+1|0];if(precisionChr<48||precisionChr>57)break;precision=10*precision+(precisionChr-48),textIndex++}next=HEAP8[textIndex+1|0]}switch(precision<0&&(precision=6,precisionSet=!1),String.fromCharCode(next)){case"h":104==HEAP8[textIndex+2|0]?(textIndex++,argSize=1):argSize=2;break;case"l":108==HEAP8[textIndex+2|0]?(textIndex++,argSize=8):argSize=4;break;case"L":case"q":case"j":argSize=8;break;case"z":case"t":case"I":argSize=4;break;default:argSize=null}switch(argSize&&textIndex++,next=HEAP8[textIndex+1|0],String.fromCharCode(next)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var signed=100==next||105==next,origArg=currArg=getNextArg("i"+8*(argSize=argSize||4));if(8==argSize&&(currArg=Runtime.makeBigInt(currArg[0],currArg[1],117==next)),argSize<=4)currArg=(signed?reSign:unSign)(currArg&Math.pow(256,argSize)-1,8*argSize);var currAbsArg=Math.abs(currArg),prefix="";if(100==next||105==next)argText=8==argSize&&i64Math?i64Math.stringify(origArg[0],origArg[1],null):reSign(currArg,8*argSize,1).toString(10);else if(117==next)argText=8==argSize&&i64Math?i64Math.stringify(origArg[0],origArg[1],!0):unSign(currArg,8*argSize,1).toString(10),currArg=Math.abs(currArg);else if(111==next)argText=(flagAlternative?"0":"")+currAbsArg.toString(8);else if(120==next||88==next){if(prefix=flagAlternative&&0!=currArg?"0x":"",8==argSize&&i64Math)if(origArg[1]){argText=(origArg[1]>>>0).toString(16);for(var lower=(origArg[0]>>>0).toString(16);lower.length<8;)lower="0"+lower;argText+=lower}else argText=(origArg[0]>>>0).toString(16);else if(currArg<0){currArg=-currArg,argText=(currAbsArg-1).toString(16);for(var buffer=[],i=0;i=0&&(flagAlwaysSigned?prefix="+"+prefix:flagPadSign&&(prefix=" "+prefix)),"-"==argText.charAt(0)&&(prefix="-"+prefix,argText=argText.substr(1));prefix.length+argText.lengthexponent&&exponent>=-4?(next=(103==next?"f":"F").charCodeAt(0),precision-=exponent+1):(next=(103==next?"e":"E").charCodeAt(0),precision--),effectivePrecision=Math.min(precision,20)}101==next||69==next?(argText=currArg.toExponential(effectivePrecision),/[eE][-+]\d$/.test(argText)&&(argText=argText.slice(0,-1)+"0"+argText.slice(-1))):102!=next&&70!=next||(argText=currArg.toFixed(effectivePrecision),0===currArg&&__reallyNegative(currArg)&&(argText="-"+argText));var parts=argText.split("e");if(isGeneral&&!flagAlternative)for(;parts[0].length>1&&-1!=parts[0].indexOf(".")&&("0"==parts[0].slice(-1)||"."==parts[0].slice(-1));)parts[0]=parts[0].slice(0,-1);else for(flagAlternative&&-1==argText.indexOf(".")&&(parts[0]+=".");precision>effectivePrecision++;)parts[0]+="0";argText=parts[0]+(parts.length>1?"e"+parts[1]:""),69==next&&(argText=argText.toUpperCase()),currArg>=0&&(flagAlwaysSigned?argText="+"+argText:flagPadSign&&(argText=" "+argText))}else argText=(currArg<0?"-":"")+"inf",flagZeroPad=!1;for(;argText.length0;)ret.push(32);flagLeftAlign||ret.push(getNextArg("i8"));break;case"n":var ptr=getNextArg("i32*");HEAP32[ptr>>2]=ret.length;break;case"%":ret.push(curr);break;default:for(i=startTextIndex;i>2])}function _emscripten_memcpy_big(dest,src,num){return HEAPU8.set(HEAPU8.subarray(src,src+num),dest),dest}Module._memcpy=_memcpy;var _log=Math_log,_cos=Math_cos,_llvm_pow_f64=Math_pow;function _sbrk(bytes){var self=_sbrk;self.called||(DYNAMICTOP=alignMemoryPage(DYNAMICTOP),self.called=!0,assert(Runtime.dynamicAlloc),self.alloc=Runtime.dynamicAlloc,Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control")});var ret=DYNAMICTOP;if(0!=bytes&&!self.alloc(bytes))return-1>>>0;return ret}function ___errno_location(){return ___errno_state}Module._bitshift64Shl=_bitshift64Shl;var _BItoD=!0;function _hip_set_debugf(){Module.printErr("missing function: hip_set_debugf"),abort(-1)}var _exp=Math_exp;function _time(ptr){var ret=Date.now()/1e3|0;return ptr&&(HEAP32[ptr>>2]=ret),ret}function _hip_decode1_unclipped(){Module.printErr("missing function: hip_decode1_unclipped"),abort(-1)}if(___errno_state=Runtime.staticAlloc(4),HEAP32[___errno_state>>2]=0,FS.staticInit(),__ATINIT__.unshift(function(){Module.noFSInit||FS.init.initialized||FS.init()}),__ATMAIN__.push(function(){FS.ignorePermissions=!1}),__ATEXIT__.push(function(){FS.quit()}),Module.FS_createFolder=FS.createFolder,Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createLink=FS.createLink,Module.FS_createDevice=FS.createDevice,__ATINIT__.unshift(function(){TTY.init()}),__ATEXIT__.push(function(){TTY.shutdown()}),ENVIRONMENT_IS_NODE){var fs=require("fs"),NODEJS_PATH=require("path");NODEFS.staticInit()}Module.requestFullScreen=function(lockPointer,resizeCanvas,vrDevice){Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)},Module.requestAnimationFrame=function(func){Browser.requestAnimationFrame(func)},Module.setCanvasSize=function(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)},Module.pauseMainLoop=function(){Browser.mainLoop.pause()},Module.resumeMainLoop=function(){Browser.mainLoop.resume()},Module.getUserMedia=function(){Browser.getUserMedia()},Module.createContext=function(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)},__ATINIT__.push(function(){SOCKFS.root=FS.mount(SOCKFS,{},null)}),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),staticSealed=!0,STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX),assert(DYNAMIC_BASE>0]=HEAP8[ptr>>0];HEAP8[tempDoublePtr+1>>0]=HEAP8[ptr+1>>0];HEAP8[tempDoublePtr+2>>0]=HEAP8[ptr+2>>0];HEAP8[tempDoublePtr+3>>0]=HEAP8[ptr+3>>0]}function copyTempDouble(ptr){ptr=ptr|0;HEAP8[tempDoublePtr>>0]=HEAP8[ptr>>0];HEAP8[tempDoublePtr+1>>0]=HEAP8[ptr+1>>0];HEAP8[tempDoublePtr+2>>0]=HEAP8[ptr+2>>0];HEAP8[tempDoublePtr+3>>0]=HEAP8[ptr+3>>0];HEAP8[tempDoublePtr+4>>0]=HEAP8[ptr+4>>0];HEAP8[tempDoublePtr+5>>0]=HEAP8[ptr+5>>0];HEAP8[tempDoublePtr+6>>0]=HEAP8[ptr+6>>0];HEAP8[tempDoublePtr+7>>0]=HEAP8[ptr+7>>0]}function setTempRet0(value){value=value|0;tempRet0=value}function getTempRet0(){return tempRet0|0}function _AddVbrFrame($gfc){$gfc=$gfc|0;var $$pre$i=0,$$pre2$i=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0;var $25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0;var $43=0,$44=0,$5=0,$6=0,$7=0,$8=0,$9=0,$i$01$i=0,label=0,sp=0;sp=STACKTOP;$0=$gfc+84744|0;$1=HEAP32[$0>>2]|0;$2=$gfc+16|0;$3=HEAP32[$2>>2]|0;$4=(83944+($3<<6)|0)+($1<<2)|0;$5=HEAP32[$4>>2]|0;$6=$gfc+85784|0;$7=HEAP32[$6>>2]|0;$8=$7+1|0;HEAP32[$6>>2]=$8;$9=$gfc+85760|0;$10=HEAP32[$9>>2]|0;$11=$10+$5|0;HEAP32[$9>>2]=$11;$12=$gfc+85764|0;$13=HEAP32[$12>>2]|0;$14=$13+1|0;HEAP32[$12>>2]=$14;$15=$gfc+85768|0;$16=HEAP32[$15>>2]|0;$17=($14|0)<($16|0);if($17){return}$18=$gfc+85772|0;$19=HEAP32[$18>>2]|0;$20=$gfc+85776|0;$21=HEAP32[$20>>2]|0;$22=($19|0)<($21|0);if($22){$23=$gfc+85780|0;$24=HEAP32[$23>>2]|0;$25=$24+($19<<2)|0;HEAP32[$25>>2]=$11;$26=HEAP32[$18>>2]|0;$27=$26+1|0;HEAP32[$18>>2]=$27;HEAP32[$12>>2]=0;$$pre$i=HEAP32[$20>>2]|0;$28=$27;$30=$$pre$i}else{$28=$19;$30=$21}$29=($28|0)==($30|0);if(!$29){return}$31=($30|0)>1;if($31){$32=$gfc+85780|0;$33=HEAP32[$32>>2]|0;$i$01$i=1;while(1){$34=$33+($i$01$i<<2)|0;$35=HEAP32[$34>>2]|0;$36=($i$01$i|0)/2&-1;$37=$33+($36<<2)|0;HEAP32[$37>>2]=$35;$38=$i$01$i+2|0;$39=HEAP32[$20>>2]|0;$40=($38|0)<($39|0);if($40){$i$01$i=$38}else{break}}$$pre2$i=HEAP32[$18>>2]|0;$44=$$pre2$i}else{$44=$30}$41=HEAP32[$15>>2]|0;$42=$41<<1;HEAP32[$15>>2]=$42;$43=($44|0)/2&-1;HEAP32[$18>>2]=$43;return}function _InitVbrTag($gfp){$gfp=$gfp|0;var $$=0,$$0=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0;var $25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0;var $43=0,$5=0,$6=0,$7=0,$8=0,$9=0,$buffer=0,$exitcond=0,$i$02=0,$kbps_header$0=0,$kbps_header$1=0,$or$cond=0,$vararg_buffer=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+2896|0;$vararg_buffer=sp;$buffer=sp+8|0;$0=$gfp+288|0;$1=HEAP32[$0>>2]|0;$2=$1+16|0;$3=HEAP32[$2>>2]|0;$4=($3|0)==1;if($4){$kbps_header$0=128}else{$5=$1+64|0;$6=HEAP32[$5>>2]|0;$7=($6|0)<16000;$$=$7?32:64;$kbps_header$0=$$}$8=$1+104|0;$9=HEAP32[$8>>2]|0;$10=($9|0)==0;if($10){$11=$1+120|0;$12=HEAP32[$11>>2]|0;$kbps_header$1=$12}else{$kbps_header$1=$kbps_header$0}$13=$3*72000|0;$14=$13+72000|0;$15=Math_imul($14,$kbps_header$1)|0;$16=$1+64|0;$17=HEAP32[$16>>2]|0;$18=($15|0)/($17|0)&-1;$19=$1+24|0;$20=HEAP32[$19>>2]|0;$21=$20+156|0;$22=$1+85792|0;HEAP32[$22>>2]=$18;$23=($18|0)<($21|0);$24=($18|0)>2880;$or$cond=$24|$23;if($or$cond){$25=$1+156|0;HEAP32[$25>>2]=0;$$0=0;STACKTOP=sp;return $$0|0}$26=$1+85784|0;HEAP32[$26>>2]=0;$27=$1+85788|0;HEAP32[$27>>2]=0;$28=$1+85760|0;HEAP32[$28>>2]=0;$29=$1+85764|0;HEAP32[$29>>2]=0;$30=$1+85768|0;HEAP32[$30>>2]=1;$31=$1+85772|0;HEAP32[$31>>2]=0;$32=$1+85780|0;$33=HEAP32[$32>>2]|0;$34=($33|0)==(0|0);do{if($34){$35=_malloc(1600)|0;HEAP32[$32>>2]=$35;$36=($35|0)==(0|0);$37=$1+85776|0;if(!$36){HEAP32[$37>>2]=400;break}HEAP32[$37>>2]=0;_lame_errorf($1,8,$vararg_buffer);$38=$1+156|0;HEAP32[$38>>2]=0;$$0=-1;STACKTOP=sp;return $$0|0}}while(0);_memset($buffer|0,0,2880)|0;_setLameTagFrameHeader($1,$buffer);$39=HEAP32[$22>>2]|0;$40=($39|0)==0;if(!$40){$i$02=0;while(1){$41=$buffer+$i$02|0;$42=HEAP8[$41>>0]|0;_add_dummy_byte($1,$42,1);$43=$i$02+1|0;$exitcond=($43|0)==($39|0);if($exitcond){break}else{$i$02=$43}}}$$0=0;STACKTOP=sp;return $$0|0}function _UpdateMusicCRC($crc,$buffer,$size){$crc=$crc|0;$buffer=$buffer|0;$size=$size|0;var $$pre=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$exitcond=0,$i$01=0,label=0,sp=0;sp=STACKTOP;$0=($size|0)>0;if(!$0){return}$$pre=HEAP16[$crc>>1]|0;$5=$$pre;$i$01=0;while(1){$1=$buffer+$i$01|0;$2=HEAP8[$1>>0]|0;$3=$2&255;$4=$5&65535;$6=$5^$3;$7=$4>>>8;$8=$6&65535;$9=$8&255;$10=48+($9<<2)|0;$11=HEAP32[$10>>2]|0;$12=$7^$11;$13=$12&65535;HEAP16[$crc>>1]=$13;$14=$i$01+1|0;$exitcond=($14|0)==($size|0);if($exitcond){break}else{$5=$13;$i$01=$14}}return}function _setLameTagFrameHeader($gfc,$buffer){$gfc=$gfc|0;$buffer=$buffer|0;var $$=0,$$masked=0,$$masked1=0,$$pre=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0,$111=0;var $112=0,$113=0,$114=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0;var $28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0;var $46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0;var $64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0;var $82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$bbyte$0=0;var $bitrate$0=0,$bitrate$1=0,$not$=0,$sext=0,$sext2=0,$storemerge=0,$storemerge$in=0,label=0,sp=0;sp=STACKTOP;HEAP8[$buffer>>0]=-1;$0=$buffer+1|0;$1=HEAP8[$0>>0]|0;$2=$1&255;$3=$2<<3;$4=$3|7;$5=$4&255;HEAP8[$0>>0]=$5;$6=$4<<1;$7=$gfc+64|0;$8=HEAP32[$7>>2]|0;$not$=($8|0)>15999;$9=$not$&1;$10=$6|$9;$11=$10&255;HEAP8[$0>>0]=$11;$12=$10<<1;$13=$gfc+16|0;$14=HEAP32[$13>>2]|0;$15=$14&1;$$masked=$12&62;$16=$$masked|$15;$17=$16<<2;$18=$17|1;$19=$18&255;HEAP8[$0>>0]=$19;$20=$18<<1;$21=$gfc+160|0;$22=HEAP32[$21>>2]|0;$23=($22|0)==0;$24=$23&1;$25=$20|$24;$26=$25&255;HEAP8[$0>>0]=$26;$27=$buffer+2|0;$28=HEAP8[$27>>0]|0;$29=$28&255;$30=$29<<4;$31=$gfc+84744|0;$32=HEAP32[$31>>2]|0;$33=$32&15;$34=$30|$33;$35=$34&255;HEAP8[$27>>0]=$35;$36=$34<<2;$37=$gfc+20|0;$38=HEAP32[$37>>2]|0;$39=$38&3;$$masked1=$36&124;$40=$$masked1|$39;$41=$40<<1;$42=$41&255;HEAP8[$27>>0]=$42;$43=$40<<2;$44=$gfc+172|0;$45=HEAP32[$44>>2]|0;$46=$45&1;$47=$43|$46;$48=$47&255;HEAP8[$27>>0]=$48;$49=$buffer+3|0;$50=HEAP8[$49>>0]|0;$51=$50&255;$52=$51<<2;$53=$gfc+180|0;$54=HEAP32[$53>>2]|0;$55=$54&3;$56=$52|$55;$57=$56&255;HEAP8[$49>>0]=$57;$58=$56<<2;$59=$gfc+84756|0;$60=HEAP32[$59>>2]|0;$61=$60&3;$62=$58|$61;$63=$62&255;HEAP8[$49>>0]=$63;$64=$62<<1;$65=$gfc+164|0;$66=HEAP32[$65>>2]|0;$67=$66&1;$68=$64|$67;$69=$68&255;HEAP8[$49>>0]=$69;$70=$68<<1;$71=$gfc+168|0;$72=HEAP32[$71>>2]|0;$73=$72&1;$74=$70|$73;$75=$74&255;HEAP8[$49>>0]=$75;$76=$74<<2;$77=$gfc+176|0;$78=HEAP32[$77>>2]|0;$79=$78&3;$80=$76|$79;$81=$80&255;HEAP8[$49>>0]=$81;HEAP8[$buffer>>0]=-1;$82=HEAP32[$13>>2]|0;$83=($82|0)==1;if($83){$bitrate$0=128}else{$84=HEAP32[$7>>2]|0;$85=($84|0)<16000;$$=$85?32:64;$bitrate$0=$$}$86=$gfc+104|0;$87=HEAP32[$86>>2]|0;$88=($87|0)==0;if($88){$89=$gfc+120|0;$90=HEAP32[$89>>2]|0;$bitrate$1=$90}else{$bitrate$1=$bitrate$0}$91=$gfc+152|0;$92=HEAP32[$91>>2]|0;$93=($92|0)==0;if($93){$94=HEAP32[$7>>2]|0;$95=_BitrateIndex($bitrate$1,$82,$94)|0;$96=$95<<4;$97=$96&255;$$pre=HEAP32[$13>>2]|0;$98=$$pre;$bbyte$0=$97}else{$98=$82;$bbyte$0=0}$99=($98|0)==1;$sext2=$25<<24;$sext=$sext2>>24;$100=$sext&-15;if($99){$101=$100|10;$102=$101&255;HEAP8[$0>>0]=$102;$103=HEAP8[$27>>0]|0;$104=$103&255;$105=$104&13;$106=$bbyte$0<<24>>24;$107=$105|$106;$storemerge$in=$107;$storemerge=$storemerge$in&255;HEAP8[$27>>0]=$storemerge;return}else{$108=$100|2;$109=$108&255;HEAP8[$0>>0]=$109;$110=HEAP8[$27>>0]|0;$111=$110&255;$112=$111&13;$113=$bbyte$0&255;$114=$112|$113;$storemerge$in=$114;$storemerge=$storemerge$in&255;HEAP8[$27>>0]=$storemerge;return}}function _getframebits($gfc){$gfc=$gfc|0;var $$idx$val=0,$$idx$val$pre=0,$$idx1=0,$$idx1$val=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$bit_rate$0=0;var $bit_rate$0$in=0,label=0,sp=0;sp=STACKTOP;$0=$gfc+16|0;$1=$gfc+84744|0;$2=HEAP32[$1>>2]|0;$3=($2|0)==0;if($3){$6=$gfc+120|0;$$idx$val$pre=HEAP32[$0>>2]|0;$$idx$val=$$idx$val$pre;$bit_rate$0$in=$6}else{$4=HEAP32[$0>>2]|0;$5=(83944+($4<<6)|0)+($2<<2)|0;$$idx$val=$4;$bit_rate$0$in=$5}$bit_rate$0=HEAP32[$bit_rate$0$in>>2]|0;$7=$gfc+84752|0;$8=HEAP32[$7>>2]|0;$$idx1=$gfc+64|0;$$idx1$val=HEAP32[$$idx1>>2]|0;$9=$$idx$val*72000|0;$10=$9+72000|0;$11=Math_imul($10,$bit_rate$0)|0;$12=($11|0)/($$idx1$val|0)&-1;$13=$12+$8|0;$14=$13<<3;return $14|0}function _get_max_frame_buffer_size_by_constraint($cfg,$constraint){$cfg=$cfg|0;$constraint=$constraint|0;var $0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$3=0,$4=0,$5=0;var $6=0,$7=0,$8=0,$9=0,$cfg$idx2$val=0,$cfg$idx3=0,$cfg$idx3$val=0,$max_kbps$0=0,$max_kbps$0$in=0,$maxmp3buf$0=0,label=0,sp=0;sp=STACKTOP;$0=$cfg+104|0;$1=HEAP32[$0>>2]|0;$2=($1|0)>320;if($2){$3=($constraint|0)==1;$cfg$idx2$val=HEAP32[$cfg>>2]|0;if($3){$cfg$idx3=$cfg+48|0;$cfg$idx3$val=HEAP32[$cfg$idx3>>2]|0;$4=$cfg$idx2$val*72000|0;$5=$4+72000|0;$6=Math_imul($5,$1)|0;$7=($6|0)/($cfg$idx3$val|0)&-1;$8=$7<<3;$maxmp3buf$0=$8;return $maxmp3buf$0|0}else{$9=$cfg$idx2$val*7680|0;$10=$9+7680|0;$maxmp3buf$0=$10;return $maxmp3buf$0|0}}$11=HEAP32[$cfg>>2]|0;if(($constraint|0)==2){$22=$11*7680|0;$23=$22+7680|0;$maxmp3buf$0=$23;return $maxmp3buf$0|0}else if(($constraint|0)==1){$12=$cfg+48|0;$13=HEAP32[$12>>2]|0;$14=($13|0)<16000;$15=(83944+($11<<6)|0)+32|0;$16=(83944+($11<<6)|0)+56|0;$max_kbps$0$in=$14?$15:$16;$max_kbps$0=HEAP32[$max_kbps$0$in>>2]|0;$17=$11*72000|0;$18=$17+72000|0;$19=Math_imul($18,$max_kbps$0)|0;$20=($19|0)/($13|0)&-1;$21=$20<<3;$maxmp3buf$0=$21;return $maxmp3buf$0|0}else{$maxmp3buf$0=11520;return $maxmp3buf$0|0}return 0|0}function _CRC_writeheader($gfc,$header){$gfc=$gfc|0;$header=$header|0;var $$$1$i=0,$$$1$i10=0,$$$1$i2=0,$$$2$i=0,$$$2$i11=0,$$$2$i3=0,$$$3$i=0,$$$3$i12=0,$$$3$i4=0,$$$4$i=0,$$$4$i13=0,$$$4$i5=0,$$$5$i=0,$$$5$i14=0,$$$5$i6=0,$$$6$i=0,$$$6$i15=0,$$$6$i7=0,$$$7$i=0,$$$7$i16=0;var $$$7$i8=0,$$$i=0,$$$i1=0,$$$i9=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0,$111=0;var $112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0;var $130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0;var $149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0;var $25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0;var $43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0;var $61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0;var $8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0;var $98=0,$99=0,$crc$0$lcssa=0,$crc$017=0,$i$018=0,label=0,sp=0;sp=STACKTOP;$0=$header+2|0;$1=HEAP8[$0>>0]|0;$2=$1&255;$3=$2&128;$4=($3|0)!=0;$$$i=$4?262140:196598;$5=$2<<10;$6=$$$i^$5;$7=$6&65536;$8=($7|0)==0;$9=$$$i^32773;$$$1$i=$8?$$$i:$9;$10=$2<<11;$11=$$$1$i<<1;$12=$11^$10;$13=$12&65536;$14=($13|0)==0;$15=$11^32773;$$$2$i=$14?$11:$15;$16=$2<<12;$17=$$$2$i<<1;$18=$17^$16;$19=$18&65536;$20=($19|0)==0;$21=$17^32773;$$$3$i=$20?$17:$21;$22=$2<<13;$23=$$$3$i<<1;$24=$23^$22;$25=$24&65536;$26=($25|0)==0;$27=$23^32773;$$$4$i=$26?$23:$27;$28=$2<<14;$29=$$$4$i<<1;$30=$29^$28;$31=$30&65536;$32=($31|0)==0;$33=$29^32773;$$$5$i=$32?$29:$33;$34=$2<<15;$35=$$$5$i<<1;$36=$35^$34;$37=$36&65536;$38=($37|0)==0;$39=$35^32773;$$$6$i=$38?$35:$39;$40=$2<<16;$41=$$$6$i<<1;$42=$41^$40;$43=$42&65536;$44=($43|0)==0;$45=$41^32773;$$$7$i=$44?$41:$45;$46=$header+3|0;$47=HEAP8[$46>>0]|0;$48=$47&255;$49=$48<<9;$50=$$$7$i<<1;$51=$50^$49;$52=$51&65536;$53=($52|0)==0;$54=$50^32773;$$$i9=$53?$50:$54;$55=$48<<10;$56=$$$i9<<1;$57=$56^$55;$58=$57&65536;$59=($58|0)==0;$60=$56^32773;$$$1$i10=$59?$56:$60;$61=$48<<11;$62=$$$1$i10<<1;$63=$62^$61;$64=$63&65536;$65=($64|0)==0;$66=$62^32773;$$$2$i11=$65?$62:$66;$67=$48<<12;$68=$$$2$i11<<1;$69=$68^$67;$70=$69&65536;$71=($70|0)==0;$72=$68^32773;$$$3$i12=$71?$68:$72;$73=$48<<13;$74=$$$3$i12<<1;$75=$74^$73;$76=$75&65536;$77=($76|0)==0;$78=$74^32773;$$$4$i13=$77?$74:$78;$79=$48<<14;$80=$$$4$i13<<1;$81=$80^$79;$82=$81&65536;$83=($82|0)==0;$84=$80^32773;$$$5$i14=$83?$80:$84;$85=$48<<15;$86=$$$5$i14<<1;$87=$86^$85;$88=$87&65536;$89=($88|0)==0;$90=$86^32773;$$$6$i15=$89?$86:$90;$91=$48<<16;$92=$$$6$i15<<1;$93=$92^$91;$94=$93&65536;$95=($94|0)==0;$96=$92^32773;$$$7$i16=$95?$92:$96;$97=$gfc+24|0;$98=HEAP32[$97>>2]|0;$99=($98|0)>6;if($99){$crc$017=$$$7$i16;$i$018=6}else{$crc$0$lcssa=$$$7$i16;$153=$crc$0$lcssa>>>8;$154=$153&255;$155=$header+4|0;HEAP8[$155>>0]=$154;$156=$crc$0$lcssa&255;$157=$header+5|0;HEAP8[$157>>0]=$156;return}while(1){$100=$header+$i$018|0;$101=HEAP8[$100>>0]|0;$102=$101&255;$103=$102<<9;$104=$crc$017<<1;$105=$103^$104;$106=$105&65536;$107=($106|0)==0;$108=$104^32773;$$$i1=$107?$104:$108;$109=$102<<10;$110=$$$i1<<1;$111=$110^$109;$112=$111&65536;$113=($112|0)==0;$114=$110^32773;$$$1$i2=$113?$110:$114;$115=$102<<11;$116=$$$1$i2<<1;$117=$116^$115;$118=$117&65536;$119=($118|0)==0;$120=$116^32773;$$$2$i3=$119?$116:$120;$121=$102<<12;$122=$$$2$i3<<1;$123=$122^$121;$124=$123&65536;$125=($124|0)==0;$126=$122^32773;$$$3$i4=$125?$122:$126;$127=$102<<13;$128=$$$3$i4<<1;$129=$128^$127;$130=$129&65536;$131=($130|0)==0;$132=$128^32773;$$$4$i5=$131?$128:$132;$133=$102<<14;$134=$$$4$i5<<1;$135=$134^$133;$136=$135&65536;$137=($136|0)==0;$138=$134^32773;$$$5$i6=$137?$134:$138;$139=$102<<15;$140=$$$5$i6<<1;$141=$140^$139;$142=$141&65536;$143=($142|0)==0;$144=$140^32773;$$$6$i7=$143?$140:$144;$145=$102<<16;$146=$$$6$i7<<1;$147=$146^$145;$148=$147&65536;$149=($148|0)==0;$150=$146^32773;$$$7$i8=$149?$146:$150;$151=$i$018+1|0;$152=($151|0)<($98|0);if($152){$crc$017=$$$7$i8;$i$018=$151}else{$crc$0$lcssa=$$$7$i8;break}}$153=$crc$0$lcssa>>>8;$154=$153&255;$155=$header+4|0;HEAP8[$155>>0]=$154;$156=$crc$0$lcssa&255;$157=$header+5|0;HEAP8[$157>>0]=$156;return}function _flush_bitstream($gfc){$gfc=$gfc|0;var $$$i=0,$$1$i=0,$$idx$val$i$i=0,$$idx$val$pre$i$i=0,$$idx1$i$i=0,$$idx1$val$i$i=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0;var $21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0;var $4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$bit_rate$0$i$i=0,$bit_rate$0$in$i$i=0,$flushbits$0$i=0,$vararg_buffer=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$vararg_buffer=sp;$0=$gfc+52132|0;$1=HEAP32[$0>>2]|0;$2=$gfc+52128|0;$3=HEAP32[$2>>2]|0;$4=$3+-1|0;$5=($3|0)==0;$$$i=$5?255:$4;$6=($gfc+39840|0)+($$$i*48|0)|0;$7=HEAP32[$6>>2]|0;$8=$gfc+292|0;$9=HEAP32[$8>>2]|0;$10=$7-$9|0;$11=($10|0)>-1;if($11){$12=1-$1|0;$13=$$$i+$12|0;$14=($$$i|0)<($1|0);$15=$13+256|0;$$1$i=$14?$15:$13;$16=$$1$i<<3;$17=$gfc+24|0;$18=HEAP32[$17>>2]|0;$19=Math_imul($16,$18)|0;$20=$10-$19|0;$flushbits$0$i=$20}else{$flushbits$0$i=$10}$21=$gfc+16|0;$22=$gfc+84744|0;$23=HEAP32[$22>>2]|0;$24=($23|0)==0;if($24){$27=$gfc+120|0;$$idx$val$pre$i$i=HEAP32[$21>>2]|0;$$idx$val$i$i=$$idx$val$pre$i$i;$bit_rate$0$in$i$i=$27}else{$25=HEAP32[$21>>2]|0;$26=(83944+($25<<6)|0)+($23<<2)|0;$$idx$val$i$i=$25;$bit_rate$0$in$i$i=$26}$bit_rate$0$i$i=HEAP32[$bit_rate$0$in$i$i>>2]|0;$28=$gfc+84752|0;$29=HEAP32[$28>>2]|0;$$idx1$i$i=$gfc+64|0;$$idx1$val$i$i=HEAP32[$$idx1$i$i>>2]|0;$30=$$idx$val$i$i*72000|0;$31=$30+72000|0;$32=Math_imul($31,$bit_rate$0$i$i)|0;$33=($32|0)/($$idx1$val$i$i|0)&-1;$34=$33+$29|0;$35=$34<<3;$36=$35+$flushbits$0$i|0;$37=($36|0)<0;if($37){_lame_errorf($gfc,1072,$vararg_buffer);STACKTOP=sp;return}else{_drain_into_ancillary($gfc,$36);$38=$gfc+52140|0;HEAP32[$38>>2]=0;$39=$gfc+21312|0;HEAP32[$39>>2]=0;STACKTOP=sp;return}}function _add_dummy_byte($gfc,$val,$n){$gfc=$gfc|0;$val=$val|0;$n=$n|0;var $$0$$i=0,$$01$i=0,$$in=0,$$pre$i=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0;var $23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$exitcond=0,$i$01=0;var label=0,sp=0;sp=STACKTOP;$0=($n|0)==0;if($0){return}$1=$val&255;$2=$gfc+300|0;$3=$gfc+296|0;$4=$gfc+284|0;$5=$gfc+292|0;$$in=$n;while(1){$$01$i=8;while(1){$8=HEAP32[$2>>2]|0;$9=($8|0)==0;if($9){HEAP32[$2>>2]=8;$10=HEAP32[$3>>2]|0;$11=$10+1|0;HEAP32[$3>>2]=$11;$12=HEAP32[$4>>2]|0;$13=$12+$11|0;HEAP8[$13>>0]=0;$$pre$i=HEAP32[$2>>2]|0;$15=$$pre$i}else{$15=$8}$14=($$01$i|0)<($15|0);$$0$$i=$14?$$01$i:$15;$16=$$01$i-$$0$$i|0;$17=$15-$$0$$i|0;HEAP32[$2>>2]=$17;$18=$1>>>$16;$19=$18<<$17;$20=HEAP32[$3>>2]|0;$21=HEAP32[$4>>2]|0;$22=$21+$20|0;$23=HEAP8[$22>>0]|0;$24=$23&255;$25=$19|$24;$26=$25&255;HEAP8[$22>>0]=$26;$27=HEAP32[$5>>2]|0;$28=$27+$$0$$i|0;HEAP32[$5>>2]=$28;$29=($16|0)>0;if($29){$$01$i=$16}else{$i$01=0;break}}while(1){$30=($gfc+39840|0)+($i$01*48|0)|0;$31=HEAP32[$30>>2]|0;$32=$31+8|0;HEAP32[$30>>2]=$32;$33=$i$01+1|0;$exitcond=($33|0)==256;if($exitcond){break}else{$i$01=$33}}$6=$$in+-1|0;$7=($6|0)==0;if($7){break}else{$$in=$6}}return}function _format_bitstream($gfc){$gfc=$gfc|0;var $$$i=0,$$$i$i=0,$$$i26$i=0,$$$i7=0,$$$i8$i=0,$$$i9$i=0,$$0$$i$i=0,$$0$$i$us$i=0,$$0$$i107$i=0,$$0$$i11$i=0,$$0$$i115$i=0,$$0$$i123$i=0,$$0$$i131$i=0,$$0$$i139$i=0,$$0$$i14$i=0,$$0$$i147$i=0,$$0$$i155$i=0,$$0$$i163$i=0,$$0$$i171$i=0,$$0$$i179$i=0;var $$0$$i189$i=0,$$0$$i19$i=0,$$0$$i19$i9=0,$$0$$i199$i=0,$$0$$i209$i=0,$$0$$i219$i=0,$$0$$i229$i=0,$$0$$i239$i=0,$$0$$i24$i=0,$$0$$i249$i=0,$$0$$i259$i=0,$$0$$i269$i=0,$$0$$i27$i=0,$$0$$i279$i=0,$$0$$i289$i=0,$$0$$i299$i=0,$$0$$i3$i=0,$$0$$i30$us$i=0,$$0$$i309$i=0,$$0$$i319$i=0;var $$0$$i329$i=0,$$0$$i339$i=0,$$0$$i349$i=0,$$0$$i35$i=0,$$0$$i359$i=0,$$0$$i369$i=0,$$0$$i379$i=0,$$0$$i389$i=0,$$0$$i399$1$i=0,$$0$$i399$2$i=0,$$0$$i399$3$i=0,$$0$$i399$i=0,$$0$$i409$i=0,$$0$$i419$i=0,$$0$$i429$i=0,$$0$$i43$i=0,$$0$$i439$i=0,$$0$$i449$i=0,$$0$$i459$i=0,$$0$$i469$i=0;var $$0$$i479$i=0,$$0$$i489$i=0,$$0$$i499$i=0,$$0$$i509$i=0,$$0$$i51$i=0,$$0$$i519$i=0,$$0$$i529$i=0,$$0$$i539$i=0,$$0$$i549$i=0,$$0$$i559$i=0,$$0$$i59$i=0,$$0$$i6$i=0,$$0$$i67$i=0,$$0$$i75$i=0,$$0$$i83$i=0,$$0$$i91$i=0,$$0$$i99$i=0,$$01$i$us$i=0,$$01$i12$i=0,$$01$i17$i=0;var $$01$i22$i=0,$$01$i28$us$i=0,$$01$i4$i=0,$$02$i$i=0,$$02$i1$i=0,$$02$i105$i=0,$$02$i113$i=0,$$02$i121$i=0,$$02$i129$i=0,$$02$i137$i=0,$$02$i145$i=0,$$02$i153$i=0,$$02$i161$i=0,$$02$i169$i=0,$$02$i17$i=0,$$02$i177$i=0,$$02$i187$i=0,$$02$i197$i=0,$$02$i207$i=0,$$02$i217$i=0;var $$02$i227$i=0,$$02$i237$i=0,$$02$i247$i=0,$$02$i25$i=0,$$02$i257$i=0,$$02$i267$i=0,$$02$i277$i=0,$$02$i287$i=0,$$02$i297$i=0,$$02$i307$i=0,$$02$i317$i=0,$$02$i327$i=0,$$02$i33$i=0,$$02$i337$i=0,$$02$i347$i=0,$$02$i357$i=0,$$02$i367$i=0,$$02$i377$i=0,$$02$i387$i=0,$$02$i397$1$i=0;var $$02$i397$2$i=0,$$02$i397$3$i=0,$$02$i397$i=0,$$02$i407$i=0,$$02$i41$i=0,$$02$i417$i=0,$$02$i427$i=0,$$02$i437$i=0,$$02$i447$i=0,$$02$i457$i=0,$$02$i467$i=0,$$02$i477$i=0,$$02$i487$i=0,$$02$i49$i=0,$$02$i497$i=0,$$02$i507$i=0,$$02$i517$i=0,$$02$i527$i=0,$$02$i537$i=0,$$02$i547$i=0;var $$02$i557$i=0,$$02$i57$i=0,$$02$i65$i=0,$$02$i73$i=0,$$02$i81$i=0,$$02$i89$i=0,$$02$i9$i=0,$$02$i97$i=0,$$1$i=0,$$1$i10=0,$$2$us$i=0,$$idx$val$i=0,$$idx$val$i$i=0,$$idx$val$pre$i=0,$$idx$val$pre$i$i=0,$$idx1$i=0,$$idx1$val$i=0,$$idx1$val$i$i=0,$$lcssa401=0,$$lcssa402=0;var $$lcssa404=0,$$lcssa405=0,$$lcssa406=0,$$lcssa407=0,$$lcssa408=0,$$lcssa409=0,$$lcssa410=0,$$lcssa411=0,$$lcssa412=0,$$lcssa413=0,$$lcssa414=0,$$lcssa415=0,$$lcssa416=0,$$lcssa417=0,$$lcssa418=0,$$lcssa419=0,$$lcssa420=0,$$lcssa421=0,$$lcssa422=0,$$lcssa423=0;var $$lcssa424=0,$$lcssa427=0,$$lcssa428=0,$$lcssa429=0,$$lcssa430=0,$$lcssa432=0,$$lcssa433=0,$$lcssa434=0,$$lcssa435=0,$$lcssa436=0,$$lcssa437=0,$$lcssa438=0,$$lcssa439=0,$$lcssa440=0,$$lcssa441=0,$$lcssa442=0,$$lcssa443=0,$$lcssa444=0,$$lcssa445=0,$$lcssa446=0;var $$lcssa447=0,$$lcssa448=0,$$lcssa449=0,$$lcssa450=0,$$lcssa451=0,$$lcssa452=0,$$lcssa453=0,$$lcssa454=0,$$lcssa455=0,$$lcssa456=0,$$lcssa457=0,$$lcssa458=0,$$lcssa459=0,$$lcssa460=0,$$lcssa461=0,$$lcssa462=0,$$lcssa463=0,$$lcssa464=0,$$lcssa465=0,$$lcssa466=0;var $$lcssa467=0,$$lcssa468=0,$$lcssa469=0,$$lcssa470=0,$$lcssa471=0,$$phi$trans$insert705$i=0,$$phi$trans$insert708$i=0,$$phi$trans$insert711$i=0,$$phi$trans$insert714$i=0,$$phi$trans$insert717$i=0,$$phi$trans$insert720$i=0,$$phi$trans$insert723$i=0,$$phi$trans$insert726$i=0,$$phi$trans$insert729$i=0,$$phi$trans$insert732$i=0,$$phi$trans$insert736$i=0,$$pn$i=0,$$pn100$i=0,$$pre=0,$$pre$i=0;var $$pre$i$i=0,$$pre$i$i$lcssa=0,$$pre$i$us$i=0,$$pre$i1=0,$$pre$i101$i=0,$$pre$i101$i$lcssa=0,$$pre$i109$i=0,$$pre$i109$i$lcssa=0,$$pre$i117$i=0,$$pre$i117$i$lcssa=0,$$pre$i125$i=0,$$pre$i125$i$lcssa=0,$$pre$i13$i=0,$$pre$i13$i$lcssa=0,$$pre$i13$i8=0,$$pre$i133$i=0,$$pre$i133$i$lcssa=0,$$pre$i141$i=0,$$pre$i141$i$lcssa=0,$$pre$i149$i=0;var $$pre$i149$i$lcssa=0,$$pre$i157$i=0,$$pre$i157$i$lcssa=0,$$pre$i165$i=0,$$pre$i165$i$lcssa=0,$$pre$i173$i=0,$$pre$i173$i$lcssa=0,$$pre$i18$i=0,$$pre$i181$i=0,$$pre$i181$i$lcssa=0,$$pre$i191$i=0,$$pre$i191$i$lcssa=0,$$pre$i201$i=0,$$pre$i201$i$lcssa=0,$$pre$i21$i=0,$$pre$i21$i$lcssa=0,$$pre$i211$i=0,$$pre$i211$i$lcssa=0,$$pre$i221$i=0,$$pre$i221$i$lcssa=0;var $$pre$i23$i=0,$$pre$i231$i=0,$$pre$i231$i$lcssa=0,$$pre$i241$i=0,$$pre$i241$i$lcssa=0,$$pre$i251$i=0,$$pre$i251$i$lcssa=0,$$pre$i261$i=0,$$pre$i261$i$lcssa=0,$$pre$i281$i=0,$$pre$i281$i$lcssa=0,$$pre$i29$i=0,$$pre$i29$i$lcssa=0,$$pre$i29$us$i=0,$$pre$i291$i=0,$$pre$i291$i$lcssa=0,$$pre$i301$i=0,$$pre$i301$i$lcssa=0,$$pre$i311$i=0,$$pre$i311$i$lcssa=0;var $$pre$i321$i=0,$$pre$i321$i$lcssa=0,$$pre$i331$i=0,$$pre$i331$i$lcssa=0,$$pre$i341$i=0,$$pre$i341$i$lcssa=0,$$pre$i351$i=0,$$pre$i351$i$lcssa=0,$$pre$i361$i=0,$$pre$i361$i$lcssa=0,$$pre$i37$i=0,$$pre$i37$i$lcssa=0,$$pre$i371$i=0,$$pre$i371$i$lcssa=0,$$pre$i381$i=0,$$pre$i381$i$lcssa=0,$$pre$i391$i=0,$$pre$i391$i$lcssa=0,$$pre$i401$1$i=0,$$pre$i401$1$i$lcssa=0;var $$pre$i401$2$i=0,$$pre$i401$2$i$lcssa=0,$$pre$i401$3$i=0,$$pre$i401$3$i$lcssa=0,$$pre$i401$i=0,$$pre$i401$i$lcssa=0,$$pre$i411$i=0,$$pre$i411$i$lcssa=0,$$pre$i421$i=0,$$pre$i421$i$lcssa=0,$$pre$i431$i=0,$$pre$i431$i$lcssa=0,$$pre$i45$i=0,$$pre$i45$i$lcssa=0,$$pre$i451$i=0,$$pre$i451$i$lcssa=0,$$pre$i461$i=0,$$pre$i461$i$lcssa=0,$$pre$i471$i=0,$$pre$i471$i$lcssa=0;var $$pre$i481$i=0,$$pre$i481$i$lcssa=0,$$pre$i491$i=0,$$pre$i491$i$lcssa=0,$$pre$i5$i=0,$$pre$i5$i$lcssa=0,$$pre$i5$i4=0,$$pre$i501$i=0,$$pre$i501$i$lcssa=0,$$pre$i511$i=0,$$pre$i511$i$lcssa=0,$$pre$i521$i=0,$$pre$i521$i$lcssa=0,$$pre$i53$i=0,$$pre$i53$i$lcssa=0,$$pre$i531$i=0,$$pre$i531$i$lcssa=0,$$pre$i541$i=0,$$pre$i541$i$lcssa=0,$$pre$i551$i=0;var $$pre$i551$i$lcssa=0,$$pre$i561$i=0,$$pre$i561$i$lcssa=0,$$pre$i61$i=0,$$pre$i61$i$lcssa=0,$$pre$i77$i=0,$$pre$i77$i$lcssa=0,$$pre$i85$i=0,$$pre$i85$i$lcssa=0,$$pre$i93$i=0,$$pre$i93$i$lcssa=0,$$pre$phiZ2D=0,$$pre167=0,$$pre704$i=0,$$pre706$i=0,$$pre707$i=0,$$pre709$i=0,$$pre710$i=0,$$pre712$i=0,$$pre713$i=0;var $$pre715$i=0,$$pre716$i=0,$$pre718$i=0,$$pre719$i=0,$$pre721$i=0,$$pre722$i=0,$$pre724$i=0,$$pre725$i=0,$$pre727$i=0,$$pre728$i=0,$$pre730$i=0,$$pre731$i=0,$$pre733$i=0,$$pre734$i=0,$$pre735$i=0,$$pre737$i=0,$$pre96$pre$i=0,$$pre97$i=0,$$pre97$pre$i=0,$0=0;var $1=0,$10=0,$100=0,$1000=0,$1001=0,$1002=0,$1003=0,$1004=0,$1005=0,$1006=0,$1007=0,$1008=0,$1009=0,$101=0,$1010=0,$1011=0,$1012=0,$1013=0,$1014=0,$1015=0;var $1016=0,$1017=0,$1018=0,$1019=0,$102=0,$1020=0,$1021=0,$1022=0,$1023=0,$1024=0,$1025=0,$1026=0,$1027=0,$1028=0,$1029=0,$103=0,$1030=0,$1031=0,$1032=0,$1033=0;var $1034=0,$1035=0,$1036=0,$1037=0,$1038=0,$1039=0,$104=0,$1040=0,$1041=0,$1042=0,$1043=0,$1044=0,$1045=0,$1046=0,$1047=0,$1048=0,$1049=0,$105=0,$1050=0,$1051=0;var $1052=0,$1053=0,$1054=0,$1055=0,$1056=0,$1057=0,$1058=0,$1059=0,$106=0,$1060=0,$1061=0,$1062=0,$1063=0,$1064=0,$1065=0,$1066=0,$1067=0,$1068=0,$1069=0,$107=0;var $1070=0,$1071=0,$1072=0,$1073=0,$1074=0,$1075=0,$1076=0,$1077=0,$1078=0,$1079=0,$108=0,$1080=0,$1081=0,$1082=0,$1083=0,$1084=0,$1085=0,$1086=0,$1087=0,$1088=0;var $1089=0,$109=0,$1090=0,$1091=0,$1092=0,$1093=0,$1094=0,$1095=0,$1096=0,$1097=0,$1098=0,$1099=0,$11=0,$110=0,$1100=0,$1101=0,$1102=0,$1103=0,$1104=0,$1105=0;var $1106=0,$1107=0,$1108=0,$1109=0,$111=0,$1110=0,$1111=0,$1112=0,$1113=0,$1114=0,$1115=0,$1116=0,$1117=0,$1118=0,$1119=0,$112=0,$1120=0,$1121=0,$1122=0,$1123=0;var $1124=0,$1125=0,$1126=0,$1127=0,$1128=0,$1129=0,$113=0,$1130=0,$1131=0,$1132=0,$1133=0,$1134=0,$1135=0,$1136=0,$1137=0,$1138=0,$1139=0,$114=0,$1140=0,$1141=0;var $1142=0,$1143=0,$1144=0,$1145=0,$1146=0,$1147=0,$1148=0,$1149=0,$115=0,$1150=0,$1151=0,$1152=0,$1153=0,$1154=0,$1155=0,$1156=0,$1157=0,$1158=0,$1159=0,$116=0;var $1160=0,$1161=0,$1162=0,$1163=0,$1164=0,$1165=0,$1166=0,$1167=0,$1168=0,$1169=0,$117=0,$1170=0,$1171=0,$1172=0,$1173=0,$1174=0,$1175=0,$1176=0,$1177=0,$1178=0;var $1179=0,$118=0,$1180=0,$1181=0,$1182=0,$1183=0,$1184=0,$1185=0,$1186=0,$1187=0,$1188=0,$1189=0,$119=0,$1190=0,$1191=0,$1192=0,$1193=0,$1194=0,$1195=0,$1196=0;var $1197=0,$1198=0,$1199=0,$12=0,$120=0,$1200=0,$1201=0,$1202=0,$1203=0,$1204=0,$1205=0,$1206=0,$1207=0,$1208=0,$1209=0,$121=0,$1210=0,$1211=0,$1212=0,$1213=0;var $1214=0,$1215=0,$1216=0,$1217=0,$1218=0,$1219=0,$122=0,$1220=0,$1221=0,$1222=0,$1223=0,$1224=0,$1225=0,$1226=0,$1227=0,$1228=0,$1229=0,$123=0,$1230=0,$1231=0;var $1232=0,$1233=0,$1234=0,$1235=0,$1236=0,$1237=0,$1238=0,$1239=0,$124=0,$1240=0,$1241=0,$1242=0,$1243=0,$1244=0,$1245=0,$1246=0,$1247=0,$1248=0,$1249=0,$125=0;var $1250=0,$1251=0,$1252=0,$1253=0,$1254=0,$1255=0,$1256=0,$1257=0,$1258=0,$1259=0,$126=0,$1260=0,$1261=0,$1262=0,$1263=0,$1264=0,$1265=0,$1266=0,$1267=0,$1268=0;var $1269=0,$127=0,$1270=0,$1271=0,$1272=0,$1273=0,$1274=0,$1275=0,$1276=0,$1277=0,$1278=0,$1279=0,$128=0,$1280=0,$1281=0,$1282=0,$1283=0,$1284=0,$1285=0,$1286=0;var $1287=0,$1288=0,$1289=0,$129=0,$1290=0,$1291=0,$1292=0,$1293=0,$1294=0,$1295=0,$1296=0,$1297=0,$1298=0,$1299=0,$13=0,$130=0,$1300=0,$1301=0,$1302=0,$1303=0;var $1304=0,$1305=0,$1306=0,$1307=0,$1308=0,$1309=0,$131=0,$1310=0,$1311=0,$1312=0,$1313=0,$1314=0,$1315=0,$1316=0,$1317=0,$1318=0,$1319=0,$132=0,$1320=0,$1321=0;var $1322=0,$1323=0,$1324=0,$1325=0,$1326=0,$1327=0,$1328=0,$1329=0,$133=0,$1330=0,$1331=0,$1332=0,$1333=0,$1334=0,$1335=0,$1336=0,$1337=0,$1338=0,$1339=0,$134=0;var $1340=0,$1341=0,$1342=0,$1343=0,$1344=0,$1345=0,$1346=0,$1347=0,$1348=0,$1349=0,$135=0,$1350=0,$1351=0,$1352=0,$1353=0,$1354=0,$1355=0,$1356=0,$1357=0,$1358=0;var $1359=0,$136=0,$1360=0,$1361=0,$1362=0,$1363=0,$1364=0,$1365=0,$1366=0,$1367=0,$1368=0,$1369=0,$137=0,$1370=0,$1371=0,$1372=0,$1373=0,$1374=0,$1375=0,$1376=0;var $1377=0,$1378=0,$1379=0,$138=0,$1380=0,$1381=0,$1382=0,$1383=0,$1384=0,$1385=0,$1386=0,$1387=0,$1388=0,$1389=0,$139=0,$1390=0,$1391=0,$1392=0,$1393=0,$1394=0;var $1395=0,$1396=0,$1397=0,$1398=0,$1399=0,$14=0,$140=0,$1400=0,$1401=0,$1402=0,$1403=0,$1404=0,$1405=0,$1406=0,$1407=0,$1408=0,$1409=0,$141=0,$1410=0,$1411=0;var $1412=0,$1413=0,$1414=0,$1415=0,$1416=0,$1417=0,$1418=0,$1419=0,$142=0,$1420=0,$1421=0,$1422=0,$1423=0,$1424=0,$1425=0,$1426=0,$1427=0,$1428=0,$1429=0,$143=0;var $1430=0,$1431=0,$1432=0,$1433=0,$1434=0,$1435=0,$1436=0,$1437=0,$1438=0,$1439=0,$144=0,$1440=0,$1441=0,$1442=0,$1443=0,$1444=0,$1445=0,$1446=0,$1447=0,$1448=0;var $1449=0,$145=0,$1450=0,$1451=0,$1452=0,$1453=0,$1454=0,$1455=0,$1456=0,$1457=0,$1458=0,$1459=0,$146=0,$1460=0,$1461=0,$1462=0,$1463=0,$1464=0,$1465=0,$1466=0;var $1467=0,$1468=0,$1469=0,$147=0,$1470=0,$1471=0,$1472=0,$1473=0,$1474=0,$1475=0,$1476=0,$1477=0,$1478=0,$1479=0,$148=0,$1480=0,$1481=0,$1482=0,$1483=0,$1484=0;var $1485=0,$1486=0,$1487=0,$1488=0,$1489=0,$149=0,$1490=0,$1491=0,$1492=0,$1493=0,$1494=0,$1495=0,$1496=0,$1497=0,$1498=0,$1499=0,$15=0,$150=0,$1500=0,$1501=0;var $1502=0,$1503=0,$1504=0,$1505=0,$1506=0,$1507=0,$1508=0,$1509=0,$151=0,$1510=0,$1511=0,$1512=0,$1513=0,$1514=0,$1515=0,$1516=0,$1517=0,$1518=0,$1519=0,$152=0;var $1520=0,$1521=0,$1522=0,$1523=0,$1524=0,$1525=0,$1526=0,$1527=0,$1528=0,$1529=0,$153=0,$1530=0,$1531=0,$1532=0,$1533=0,$1534=0,$1535=0,$1536=0,$1537=0,$1538=0;var $1539=0,$154=0,$1540=0,$1541=0,$1542=0,$1543=0,$1544=0,$1545=0,$1546=0,$1547=0,$1548=0,$1549=0,$155=0,$1550=0,$1551=0,$1552=0,$1553=0,$1554=0,$1555=0,$1556=0;var $1557=0,$1558=0,$1559=0,$156=0,$1560=0,$1561=0,$1562=0,$1563=0,$1564=0,$1565=0,$1566=0,$1567=0,$1568=0,$1569=0,$157=0,$1570=0,$1571=0,$1572=0,$1573=0,$1574=0;var $1575=0,$1576=0,$1577=0,$1578=0,$1579=0,$158=0,$1580=0,$1581=0,$1582=0,$1583=0,$1584=0,$1585=0,$1586=0,$1587=0,$1588=0,$1589=0,$159=0,$1590=0,$1591=0,$1592=0;var $1593=0,$1594=0,$1595=0,$1596=0,$1597=0,$1598=0,$1599=0,$16=0,$160=0,$1600=0,$1601=0,$1602=0,$1603=0,$1604=0,$1605=0,$1606=0,$1607=0,$1608=0,$1609=0,$161=0;var $1610=0,$1611=0,$1612=0,$1613=0,$1614=0,$1615=0,$1616=0,$1617=0,$1618=0,$1619=0,$162=0,$1620=0,$1621=0,$1622=0,$1623=0,$1624=0,$1625=0,$1626=0,$1627=0,$1628=0;var $1629=0,$163=0,$1630=0,$1631=0,$1632=0,$1633=0,$1634=0,$1635=0,$1636=0,$1637=0,$1638=0,$1639=0,$164=0,$1640=0,$1641=0,$1642=0,$1643=0,$1644=0,$1645=0,$1646=0;var $1647=0,$1648=0,$1649=0,$165=0,$1650=0,$1651=0,$1652=0,$1653=0,$1654=0,$1655=0,$1656=0,$1657=0,$1658=0,$1659=0,$166=0,$1660=0,$1661=0,$1662=0,$1663=0,$1664=0;var $1665=0,$1666=0,$1667=0,$1668=0,$1669=0,$167=0,$1670=0,$1671=0,$1672=0,$1673=0,$1674=0,$1675=0,$1676=0,$1677=0,$1678=0,$1679=0,$168=0,$1680=0,$1681=0,$1682=0;var $1683=0,$1684=0,$1685=0,$1686=0,$1687=0,$1688=0,$1689=0,$169=0,$1690=0,$1691=0,$1692=0,$1693=0,$1694=0,$1695=0,$1696=0,$1697=0,$1698=0,$1699=0,$17=0,$170=0;var $1700=0,$1701=0,$1702=0,$1703=0,$1704=0,$1705=0,$1706=0,$1707=0,$1708=0,$1709=0,$171=0,$1710=0,$1711=0,$1712=0,$1713=0,$1714=0,$1715=0,$1716=0,$1717=0,$1718=0;var $1719=0,$172=0,$1720=0,$1721=0,$1722=0,$1723=0,$1724=0,$1725=0,$1726=0,$1727=0,$1728=0,$1729=0,$173=0,$1730=0,$1731=0,$1732=0,$1733=0,$1734=0,$1735=0,$1736=0;var $1737=0,$1738=0,$1739=0,$174=0,$1740=0,$1741=0,$1742=0,$1743=0,$1744=0,$1745=0,$1746=0,$1747=0,$1748=0,$1749=0,$175=0,$1750=0,$1751=0,$1752=0,$1753=0,$1754=0;var $1755=0,$1756=0,$1757=0,$1758=0,$1759=0,$176=0,$1760=0,$1761=0,$1762=0,$1763=0,$1764=0,$1765=0,$1766=0,$1767=0,$1768=0,$1769=0,$177=0,$1770=0,$1771=0,$1772=0;var $1773=0,$1774=0,$1775=0,$1776=0,$1777=0,$1778=0,$1779=0,$178=0,$1780=0,$1781=0,$1782=0,$1783=0,$1784=0,$1785=0,$1786=0,$1787=0,$1788=0,$1789=0,$179=0,$1790=0;var $1791=0,$1792=0,$1793=0,$1794=0,$1795=0,$1796=0,$1797=0,$1798=0,$1799=0,$18=0,$180=0,$1800=0,$1801=0,$1802=0,$1803=0,$1804=0,$1805=0,$1806=0,$1807=0,$1808=0;var $1809=0,$181=0,$1810=0,$1811=0,$1812=0,$1813=0,$1814=0,$1815=0,$1816=0,$1817=0,$1818=0,$1819=0,$182=0,$1820=0,$1821=0,$1822=0,$1823=0,$1824=0,$1825=0,$183=0;var $184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0;var $201=0,$202=0,$203=0,$204=0,$205=0,$206=0,$207=0,$208=0,$209=0,$21=0,$210=0,$211=0,$212=0,$213=0,$214=0,$215=0,$216=0,$217=0,$218=0,$219=0;var $22=0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0,$231=0,$232=0,$233=0,$234=0,$235=0,$236=0,$237=0;var $238=0,$239=0,$24=0,$240=0,$241=0,$242=0,$243=0,$244=0,$245=0,$246=0,$247=0,$248=0,$249=0,$25=0,$250=0,$251=0,$252=0,$253=0,$254=0,$255=0;var $256=0,$257=0,$258=0,$259=0,$26=0,$260=0,$261=0,$262=0,$263=0,$264=0,$265=0,$266=0,$267=0,$268=0,$269=0,$27=0,$270=0,$271=0,$272=0,$273=0;var $274=0,$275=0,$276=0,$277=0,$278=0,$279=0,$28=0,$280=0,$281=0,$282=0,$283=0,$284=0,$285=0,$286=0,$287=0,$288=0,$289=0,$29=0,$290=0,$291=0;var $292=0,$293=0,$294=0,$295=0,$296=0,$297=0,$298=0,$299=0,$3=0,$30=0,$300=0,$301=0,$302=0,$303=0,$304=0,$305=0,$306=0,$307=0,$308=0,$309=0;var $31=0,$310=0,$311=0,$312=0,$313=0,$314=0,$315=0,$316=0,$317=0,$318=0,$319=0,$32=0,$320=0,$321=0,$322=0,$323=0,$324=0,$325=0,$326=0,$327=0;var $328=0,$329=0,$33=0,$330=0,$331=0,$332=0,$333=0,$334=0,$335=0,$336=0,$337=0,$338=0,$339=0,$34=0,$340=0,$341=0,$342=0,$343=0,$344=0,$345=0;var $346=0,$347=0,$348=0,$349=0,$35=0,$350=0,$351=0,$352=0,$353=0,$354=0,$355=0,$356=0,$357=0,$358=0,$359=0,$36=0,$360=0,$361=0,$362=0,$363=0;var $364=0,$365=0,$366=0,$367=0,$368=0,$369=0,$37=0,$370=0,$371=0,$372=0,$373=0,$374=0,$375=0,$376=0,$377=0,$378=0,$379=0,$38=0,$380=0,$381=0;var $382=0,$383=0,$384=0,$385=0,$386=0,$387=0,$388=0,$389=0,$39=0,$390=0,$391=0,$392=0,$393=0,$394=0,$395=0,$396=0,$397=0,$398=0,$399=0,$4=0;var $40=0,$400=0,$401=0,$402=0,$403=0,$404=0,$405=0,$406=0,$407=0,$408=0,$409=0,$41=0,$410=0,$411=0,$412=0,$413=0,$414=0,$415=0,$416=0,$417=0;var $418=0,$419=0,$42=0,$420=0,$421=0,$422=0,$423=0,$424=0,$425=0,$426=0,$427=0,$428=0,$429=0,$43=0,$430=0,$431=0,$432=0,$433=0,$434=0,$435=0;var $436=0,$437=0,$438=0,$439=0,$44=0,$440=0,$441=0,$442=0,$443=0,$444=0,$445=0,$446=0,$447=0,$448=0,$449=0,$45=0,$450=0,$451=0,$452=0,$453=0;var $454=0,$455=0,$456=0,$457=0,$458=0,$459=0,$46=0,$460=0,$461=0,$462=0,$463=0,$464=0,$465=0,$466=0,$467=0,$468=0,$469=0,$47=0,$470=0,$471=0;var $472=0,$473=0,$474=0,$475=0,$476=0,$477=0,$478=0,$479=0,$48=0,$480=0,$481=0,$482=0,$483=0,$484=0,$485=0,$486=0,$487=0,$488=0,$489=0,$49=0;var $490=0,$491=0,$492=0,$493=0,$494=0,$495=0,$496=0,$497=0,$498=0,$499=0,$5=0,$50=0,$500=0,$501=0,$502=0,$503=0,$504=0,$505=0,$506=0,$507=0;var $508=0,$509=0,$51=0,$510=0,$511=0,$512=0,$513=0,$514=0,$515=0,$516=0,$517=0,$518=0,$519=0,$52=0,$520=0,$521=0,$522=0,$523=0,$524=0,$525=0;var $526=0,$527=0,$528=0,$529=0,$53=0,$530=0,$531=0,$532=0,$533=0,$534=0,$535=0,$536=0,$537=0,$538=0,$539=0,$54=0,$540=0,$541=0,$542=0,$543=0;var $544=0,$545=0,$546=0,$547=0,$548=0,$549=0,$55=0,$550=0,$551=0,$552=0,$553=0,$554=0,$555=0,$556=0,$557=0,$558=0,$559=0,$56=0,$560=0,$561=0;var $562=0,$563=0,$564=0,$565=0,$566=0,$567=0,$568=0,$569=0,$57=0,$570=0,$571=0,$572=0,$573=0,$574=0,$575=0,$576=0,$577=0,$578=0,$579=0,$58=0;var $580=0,$581=0,$582=0,$583=0,$584=0,$585=0,$586=0,$587=0,$588=0,$589=0,$59=0,$590=0,$591=0,$592=0,$593=0,$594=0,$595=0,$596=0,$597=0,$598=0;var $599=0,$6=0,$60=0,$600=0,$601=0,$602=0,$603=0,$604=0,$605=0,$606=0,$607=0,$608=0,$609=0,$61=0,$610=0,$611=0,$612=0,$613=0,$614=0,$615=0;var $616=0,$617=0,$618=0,$619=0,$62=0,$620=0,$621=0,$622=0,$623=0,$624=0,$625=0,$626=0,$627=0,$628=0,$629=0,$63=0,$630=0,$631=0,$632=0,$633=0;var $634=0,$635=0,$636=0,$637=0,$638=0,$639=0,$64=0,$640=0,$641=0,$642=0,$643=0,$644=0,$645=0,$646=0,$647=0,$648=0,$649=0,$65=0,$650=0,$651=0;var $652=0,$653=0,$654=0,$655=0,$656=0,$657=0,$658=0,$659=0,$66=0,$660=0,$661=0,$662=0,$663=0,$664=0,$665=0,$666=0,$667=0,$668=0,$669=0,$67=0;var $670=0,$671=0,$672=0,$673=0,$674=0,$675=0,$676=0,$677=0,$678=0,$679=0,$68=0,$680=0,$681=0,$682=0,$683=0,$684=0,$685=0,$686=0,$687=0,$688=0;var $689=0,$69=0,$690=0,$691=0,$692=0,$693=0,$694=0,$695=0,$696=0,$697=0,$698=0,$699=0,$7=0,$70=0,$700=0,$701=0,$702=0,$703=0,$704=0,$705=0;var $706=0,$707=0,$708=0,$709=0,$71=0,$710=0,$711=0,$712=0,$713=0,$714=0,$715=0,$716=0,$717=0,$718=0,$719=0,$72=0,$720=0,$721=0,$722=0,$723=0;var $724=0,$725=0,$726=0,$727=0,$728=0,$729=0,$73=0,$730=0,$731=0,$732=0,$733=0,$734=0,$735=0,$736=0,$737=0,$738=0,$739=0,$74=0,$740=0,$741=0;var $742=0,$743=0,$744=0,$745=0,$746=0,$747=0,$748=0,$749=0,$75=0,$750=0,$751=0,$752=0,$753=0,$754=0,$755=0,$756=0,$757=0,$758=0,$759=0,$76=0;var $760=0,$761=0,$762=0,$763=0,$764=0,$765=0,$766=0,$767=0,$768=0,$769=0,$77=0,$770=0,$771=0,$772=0,$773=0,$774=0,$775=0,$776=0,$777=0,$778=0;var $779=0,$78=0,$780=0,$781=0,$782=0,$783=0,$784=0,$785=0,$786=0,$787=0,$788=0,$789=0,$79=0,$790=0,$791=0,$792=0,$793=0,$794=0,$795=0,$796=0;var $797=0,$798=0,$799=0,$8=0,$80=0,$800=0,$801=0,$802=0,$803=0,$804=0,$805=0,$806=0,$807=0,$808=0,$809=0,$81=0,$810=0,$811=0,$812=0,$813=0;var $814=0,$815=0,$816=0,$817=0,$818=0,$819=0,$82=0,$820=0,$821=0,$822=0,$823=0,$824=0,$825=0,$826=0,$827=0,$828=0,$829=0,$83=0,$830=0,$831=0;var $832=0,$833=0,$834=0,$835=0,$836=0,$837=0,$838=0,$839=0,$84=0,$840=0,$841=0,$842=0,$843=0,$844=0,$845=0,$846=0,$847=0,$848=0,$849=0,$85=0;var $850=0,$851=0,$852=0,$853=0,$854=0,$855=0,$856=0,$857=0,$858=0,$859=0,$86=0,$860=0,$861=0,$862=0,$863=0,$864=0,$865=0,$866=0,$867=0,$868=0;var $869=0,$87=0,$870=0,$871=0,$872=0,$873=0,$874=0,$875=0,$876=0,$877=0,$878=0,$879=0,$88=0,$880=0,$881=0,$882=0,$883=0,$884=0,$885=0,$886=0;var $887=0,$888=0,$889=0,$89=0,$890=0,$891=0,$892=0,$893=0,$894=0,$895=0,$896=0,$897=0,$898=0,$899=0,$9=0,$90=0,$900=0,$901=0,$902=0,$903=0;var $904=0,$905=0,$906=0,$907=0,$908=0,$909=0,$91=0,$910=0,$911=0,$912=0,$913=0,$914=0,$915=0,$916=0,$917=0,$918=0,$919=0,$92=0,$920=0,$921=0;var $922=0,$923=0,$924=0,$925=0,$926=0,$927=0,$928=0,$929=0,$93=0,$930=0,$931=0,$932=0,$933=0,$934=0,$935=0,$936=0,$937=0,$938=0,$939=0,$94=0;var $940=0,$941=0,$942=0,$943=0,$944=0,$945=0,$946=0,$947=0,$948=0,$949=0,$95=0,$950=0,$951=0,$952=0,$953=0,$954=0,$955=0,$956=0,$957=0,$958=0;var $959=0,$96=0,$960=0,$961=0,$962=0,$963=0,$964=0,$965=0,$966=0,$967=0,$968=0,$969=0,$97=0,$970=0,$971=0,$972=0,$973=0,$974=0,$975=0,$976=0;var $977=0,$978=0,$979=0,$98=0,$980=0,$981=0,$982=0,$983=0,$984=0,$985=0,$986=0,$987=0,$988=0,$989=0,$99=0,$990=0,$991=0,$992=0,$993=0,$994=0;var $995=0,$996=0,$997=0,$998=0,$999=0,$bit_rate$0$i=0,$bit_rate$0$i$i=0,$bit_rate$0$in$i=0,$bit_rate$0$in$i$i=0,$ch$047$i=0,$ch$0637$i=0,$ch$1632$i=0,$ch$179$i=0,$ch$2638$i=0,$data_bits$0$lcssa$i=0,$data_bits$039$$i=0,$data_bits$039$i=0,$data_bits$039$us$i=0,$data_bits$1$us$i=0,$data_bits$2$lcssa$i=0;var $data_bits$242$i=0,$data_bits$3$i=0,$data_bits$4$i=0,$data_bits$5$i=0,$exitcond=0,$exitcond$i=0,$exitcond$i6=0,$exitcond166=0,$exitcond93$i=0,$exitcond94$i=0,$exitcond95$i=0,$flushbits$0$i=0,$gr$054$i=0,$gr$0634$i=0,$i$067$i=0,$i$091=0,$i$156$us$i=0,$ptr$01$i$i=0,$ptr$01$i10$i=0,$ptr$01$i106$i=0;var $ptr$01$i114$i=0,$ptr$01$i122$i=0,$ptr$01$i130$i=0,$ptr$01$i138$i=0,$ptr$01$i146$i=0,$ptr$01$i154$i=0,$ptr$01$i162$i=0,$ptr$01$i170$i=0,$ptr$01$i178$i=0,$ptr$01$i18$i=0,$ptr$01$i188$i=0,$ptr$01$i198$i=0,$ptr$01$i2$i=0,$ptr$01$i208$i=0,$ptr$01$i218$i=0,$ptr$01$i228$i=0,$ptr$01$i238$i=0,$ptr$01$i248$i=0,$ptr$01$i258$i=0,$ptr$01$i26$i=0;var $ptr$01$i268$i=0,$ptr$01$i278$i=0,$ptr$01$i288$i=0,$ptr$01$i298$i=0,$ptr$01$i308$i=0,$ptr$01$i318$i=0,$ptr$01$i328$i=0,$ptr$01$i338$i=0,$ptr$01$i34$i=0,$ptr$01$i348$i=0,$ptr$01$i358$i=0,$ptr$01$i368$i=0,$ptr$01$i378$i=0,$ptr$01$i388$i=0,$ptr$01$i398$1$i=0,$ptr$01$i398$2$i=0,$ptr$01$i398$3$i=0,$ptr$01$i398$i=0,$ptr$01$i408$i=0,$ptr$01$i418$i=0;var $ptr$01$i42$i=0,$ptr$01$i428$i=0,$ptr$01$i438$i=0,$ptr$01$i448$i=0,$ptr$01$i458$i=0,$ptr$01$i468$i=0,$ptr$01$i478$i=0,$ptr$01$i488$i=0,$ptr$01$i498$i=0,$ptr$01$i50$i=0,$ptr$01$i508$i=0,$ptr$01$i518$i=0,$ptr$01$i528$i=0,$ptr$01$i538$i=0,$ptr$01$i548$i=0,$ptr$01$i558$i=0,$ptr$01$i58$i=0,$ptr$01$i66$i=0,$ptr$01$i74$i=0,$ptr$01$i82$i=0;var $ptr$01$i90$i=0,$ptr$01$i98$i=0,$region2Start$0$i$i=0,$region2Start$0$i10$i=0,$scale_bits$076$i=0,$scale_bits$1$lcssa$i=0,$scale_bits$1$lcssa$i$lcssa=0,$scale_bits$265$i=0,$scale_bits$3$lcssa$i=0,$scale_bits$3$lcssa$i$lcssa=0,$scale_bits$4$i=0,$sfb$0$lcssa$i=0,$sfb$040$i=0,$sfb$040$us$i=0,$sfb$143$i=0,$sfb$277$i=0,$sfb$3$lcssa$i=0,$sfb$369$i=0,$sfb$466$i=0,$sfb$5$lcssa$i=0;var $sfb$558$us$i=0,$sfb_partition$075$i=0,$sfb_partition$164$i=0,$smax$i=0,$split62$i=0,$split63$i=0,$tot_bits$053$i=0,$tot_bits$1$lcssa$i=0,$tot_bits$146$i=0,$tot_bits$278$i=0,$tot_bits$3$i=0,$vararg_buffer=0,$vararg_buffer1=0,$vararg_buffer15=0,$vararg_buffer17=0,$vararg_buffer19=0,$vararg_buffer21=0,$vararg_buffer3=0,$vararg_buffer5=0,$vararg_ptr10=0;var $vararg_ptr11=0,$vararg_ptr12=0,$vararg_ptr13=0,$vararg_ptr14=0,$vararg_ptr7=0,$vararg_ptr8=0,$vararg_ptr9=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+96|0;$vararg_buffer21=sp+88|0;$vararg_buffer19=sp+80|0;$vararg_buffer17=sp+72|0;$vararg_buffer15=sp+64|0;$vararg_buffer5=sp+24|0;$vararg_buffer3=sp+16|0;$vararg_buffer1=sp+8|0;$vararg_buffer=sp;$0=$gfc+16|0;$1=$gfc+84744|0;$2=HEAP32[$1>>2]|0;$3=($2|0)==0;if($3){$6=$gfc+120|0;$$idx$val$pre$i=HEAP32[$0>>2]|0;$$idx$val$i=$$idx$val$pre$i;$bit_rate$0$in$i=$6}else{$4=HEAP32[$0>>2]|0;$5=(83944+($4<<6)|0)+($2<<2)|0;$$idx$val$i=$4;$bit_rate$0$in$i=$5}$bit_rate$0$i=HEAP32[$bit_rate$0$in$i>>2]|0;$7=$gfc+84752|0;$8=HEAP32[$7>>2]|0;$$idx1$i=$gfc+64|0;$$idx1$val$i=HEAP32[$$idx1$i>>2]|0;$9=$$idx$val$i*72000|0;$10=$9+72000|0;$11=Math_imul($10,$bit_rate$0$i)|0;$12=($11|0)/($$idx1$val$i|0)&-1;$13=$12+$8|0;$14=$13<<3;$15=$gfc+21320|0;$16=HEAP32[$15>>2]|0;_drain_into_ancillary($gfc,$16);$17=$gfc+52128|0;$18=HEAP32[$17>>2]|0;$19=(($gfc+39840|0)+($18*48|0)|0)+4|0;HEAP32[$19>>2]=0;$20=(($gfc+39840|0)+($18*48|0)|0)+8|0;$21=$gfc+24|0;$22=HEAP32[$21>>2]|0;_memset($20|0,0,$22|0)|0;$23=HEAP32[$$idx1$i>>2]|0;$24=($23|0)<16000;$25=HEAP32[$17>>2]|0;$26=(($gfc+39840|0)+($25*48|0)|0)+4|0;$27=HEAP32[$26>>2]|0;if($24){$$02$i$i=12;$37=$25;$ptr$01$i$i=$27;while(1){$28=$ptr$01$i$i&7;$29=8-$28|0;$30=($$02$i$i|0)<($29|0);$$0$$i$i=$30?$$02$i$i:$29;$31=$$02$i$i-$$0$$i$i|0;$32=4094>>>$31;$33=$29-$$0$$i$i|0;$34=$32<<$33;$35=$ptr$01$i$i>>3;$36=((($gfc+39840|0)+($37*48|0)|0)+8|0)+$35|0;$38=HEAP8[$36>>0]|0;$39=$38&255;$40=$34|$39;$41=$40&255;HEAP8[$36>>0]=$41;$42=$$0$$i$i+$ptr$01$i$i|0;$43=($31|0)>0;$$pre$i$i=HEAP32[$17>>2]|0;if($43){$$02$i$i=$31;$37=$$pre$i$i;$ptr$01$i$i=$42}else{$$lcssa470=$42;$$pre$i$i$lcssa=$$pre$i$i;break}}$44=(($gfc+39840|0)+($$pre$i$i$lcssa*48|0)|0)+4|0;HEAP32[$44>>2]=$$lcssa470;$1787=$$lcssa470;$1788=$$pre$i$i$lcssa}else{$$02$i1$i=12;$54=$25;$ptr$01$i2$i=$27;while(1){$45=$ptr$01$i2$i&7;$46=8-$45|0;$47=($$02$i1$i|0)<($46|0);$$0$$i3$i=$47?$$02$i1$i:$46;$48=$$02$i1$i-$$0$$i3$i|0;$49=4095>>>$48;$50=$46-$$0$$i3$i|0;$51=$49<<$50;$52=$ptr$01$i2$i>>3;$53=((($gfc+39840|0)+($54*48|0)|0)+8|0)+$52|0;$55=HEAP8[$53>>0]|0;$56=$55&255;$57=$51|$56;$58=$57&255;HEAP8[$53>>0]=$58;$59=$$0$$i3$i+$ptr$01$i2$i|0;$60=($48|0)>0;$$pre$i5$i=HEAP32[$17>>2]|0;if($60){$$02$i1$i=$48;$54=$$pre$i5$i;$ptr$01$i2$i=$59}else{$$lcssa471=$59;$$pre$i5$i$lcssa=$$pre$i5$i;break}}$61=(($gfc+39840|0)+($$pre$i5$i$lcssa*48|0)|0)+4|0;HEAP32[$61>>2]=$$lcssa471;$1787=$$lcssa471;$1788=$$pre$i5$i$lcssa}$62=$gfc+16|0;$63=HEAP32[$62>>2]|0;$$02$i557$i=1;$73=$1788;$ptr$01$i558$i=$1787;while(1){$64=$ptr$01$i558$i&7;$65=8-$64|0;$66=($$02$i557$i|0)<($65|0);$$0$$i559$i=$66?$$02$i557$i:$65;$67=$$02$i557$i-$$0$$i559$i|0;$68=$63>>$67;$69=$65-$$0$$i559$i|0;$70=$68<<$69;$71=$ptr$01$i558$i>>3;$72=((($gfc+39840|0)+($73*48|0)|0)+8|0)+$71|0;$74=HEAP8[$72>>0]|0;$75=$74&255;$76=$70|$75;$77=$76&255;HEAP8[$72>>0]=$77;$78=$$0$$i559$i+$ptr$01$i558$i|0;$79=($67|0)>0;$$pre$i561$i=HEAP32[$17>>2]|0;if($79){$$02$i557$i=$67;$73=$$pre$i561$i;$ptr$01$i558$i=$78}else{$$lcssa469=$78;$$pre$i561$i$lcssa=$$pre$i561$i;break}}$80=(($gfc+39840|0)+($$pre$i561$i$lcssa*48|0)|0)+4|0;HEAP32[$80>>2]=$$lcssa469;$$02$i547$i=2;$90=$$pre$i561$i$lcssa;$ptr$01$i548$i=$$lcssa469;while(1){$81=$ptr$01$i548$i&7;$82=8-$81|0;$83=($$02$i547$i|0)<($82|0);$$0$$i549$i=$83?$$02$i547$i:$82;$84=$$02$i547$i-$$0$$i549$i|0;$85=1>>>$84;$86=$82-$$0$$i549$i|0;$87=$85<<$86;$88=$ptr$01$i548$i>>3;$89=((($gfc+39840|0)+($90*48|0)|0)+8|0)+$88|0;$91=HEAP8[$89>>0]|0;$92=$91&255;$93=$87|$92;$94=$93&255;HEAP8[$89>>0]=$94;$95=$$0$$i549$i+$ptr$01$i548$i|0;$96=($84|0)>0;$$pre$i551$i=HEAP32[$17>>2]|0;if($96){$$02$i547$i=$84;$90=$$pre$i551$i;$ptr$01$i548$i=$95}else{$$lcssa468=$95;$$pre$i551$i$lcssa=$$pre$i551$i;break}}$97=(($gfc+39840|0)+($$pre$i551$i$lcssa*48|0)|0)+4|0;HEAP32[$97>>2]=$$lcssa468;$98=$gfc+160|0;$99=HEAP32[$98>>2]|0;$100=($99|0)==0;$101=$100&1;$$02$i537$i=1;$111=$$pre$i551$i$lcssa;$ptr$01$i538$i=$$lcssa468;while(1){$102=$ptr$01$i538$i&7;$103=8-$102|0;$104=($$02$i537$i|0)<($103|0);$$0$$i539$i=$104?$$02$i537$i:$103;$105=$$02$i537$i-$$0$$i539$i|0;$106=$101>>>$105;$107=$103-$$0$$i539$i|0;$108=$106<<$107;$109=$ptr$01$i538$i>>3;$110=((($gfc+39840|0)+($111*48|0)|0)+8|0)+$109|0;$112=HEAP8[$110>>0]|0;$113=$112&255;$114=$108|$113;$115=$114&255;HEAP8[$110>>0]=$115;$116=$$0$$i539$i+$ptr$01$i538$i|0;$117=($105|0)>0;$$pre$i541$i=HEAP32[$17>>2]|0;if($117){$$02$i537$i=$105;$111=$$pre$i541$i;$ptr$01$i538$i=$116}else{$$lcssa467=$116;$$pre$i541$i$lcssa=$$pre$i541$i;break}}$118=(($gfc+39840|0)+($$pre$i541$i$lcssa*48|0)|0)+4|0;HEAP32[$118>>2]=$$lcssa467;$119=HEAP32[$1>>2]|0;$$02$i527$i=4;$129=$$pre$i541$i$lcssa;$ptr$01$i528$i=$$lcssa467;while(1){$120=$ptr$01$i528$i&7;$121=8-$120|0;$122=($$02$i527$i|0)<($121|0);$$0$$i529$i=$122?$$02$i527$i:$121;$123=$$02$i527$i-$$0$$i529$i|0;$124=$119>>$123;$125=$121-$$0$$i529$i|0;$126=$124<<$125;$127=$ptr$01$i528$i>>3;$128=((($gfc+39840|0)+($129*48|0)|0)+8|0)+$127|0;$130=HEAP8[$128>>0]|0;$131=$130&255;$132=$126|$131;$133=$132&255;HEAP8[$128>>0]=$133;$134=$$0$$i529$i+$ptr$01$i528$i|0;$135=($123|0)>0;$$pre$i531$i=HEAP32[$17>>2]|0;if($135){$$02$i527$i=$123;$129=$$pre$i531$i;$ptr$01$i528$i=$134}else{$$lcssa466=$134;$$pre$i531$i$lcssa=$$pre$i531$i;break}}$136=(($gfc+39840|0)+($$pre$i531$i$lcssa*48|0)|0)+4|0;HEAP32[$136>>2]=$$lcssa466;$137=$gfc+20|0;$138=HEAP32[$137>>2]|0;$$02$i517$i=2;$148=$$pre$i531$i$lcssa;$ptr$01$i518$i=$$lcssa466;while(1){$139=$ptr$01$i518$i&7;$140=8-$139|0;$141=($$02$i517$i|0)<($140|0);$$0$$i519$i=$141?$$02$i517$i:$140;$142=$$02$i517$i-$$0$$i519$i|0;$143=$138>>$142;$144=$140-$$0$$i519$i|0;$145=$143<<$144;$146=$ptr$01$i518$i>>3;$147=((($gfc+39840|0)+($148*48|0)|0)+8|0)+$146|0;$149=HEAP8[$147>>0]|0;$150=$149&255;$151=$145|$150;$152=$151&255;HEAP8[$147>>0]=$152;$153=$$0$$i519$i+$ptr$01$i518$i|0;$154=($142|0)>0;$$pre$i521$i=HEAP32[$17>>2]|0;if($154){$$02$i517$i=$142;$148=$$pre$i521$i;$ptr$01$i518$i=$153}else{$$lcssa465=$153;$$pre$i521$i$lcssa=$$pre$i521$i;break}}$155=(($gfc+39840|0)+($$pre$i521$i$lcssa*48|0)|0)+4|0;HEAP32[$155>>2]=$$lcssa465;$156=HEAP32[$7>>2]|0;$$02$i507$i=1;$166=$$pre$i521$i$lcssa;$ptr$01$i508$i=$$lcssa465;while(1){$157=$ptr$01$i508$i&7;$158=8-$157|0;$159=($$02$i507$i|0)<($158|0);$$0$$i509$i=$159?$$02$i507$i:$158;$160=$$02$i507$i-$$0$$i509$i|0;$161=$156>>$160;$162=$158-$$0$$i509$i|0;$163=$161<<$162;$164=$ptr$01$i508$i>>3;$165=((($gfc+39840|0)+($166*48|0)|0)+8|0)+$164|0;$167=HEAP8[$165>>0]|0;$168=$167&255;$169=$163|$168;$170=$169&255;HEAP8[$165>>0]=$170;$171=$$0$$i509$i+$ptr$01$i508$i|0;$172=($160|0)>0;$$pre$i511$i=HEAP32[$17>>2]|0;if($172){$$02$i507$i=$160;$166=$$pre$i511$i;$ptr$01$i508$i=$171}else{$$lcssa464=$171;$$pre$i511$i$lcssa=$$pre$i511$i;break}}$173=(($gfc+39840|0)+($$pre$i511$i$lcssa*48|0)|0)+4|0;HEAP32[$173>>2]=$$lcssa464;$174=$gfc+172|0;$175=HEAP32[$174>>2]|0;$$02$i497$i=1;$185=$$pre$i511$i$lcssa;$ptr$01$i498$i=$$lcssa464;while(1){$176=$ptr$01$i498$i&7;$177=8-$176|0;$178=($$02$i497$i|0)<($177|0);$$0$$i499$i=$178?$$02$i497$i:$177;$179=$$02$i497$i-$$0$$i499$i|0;$180=$175>>$179;$181=$177-$$0$$i499$i|0;$182=$180<<$181;$183=$ptr$01$i498$i>>3;$184=((($gfc+39840|0)+($185*48|0)|0)+8|0)+$183|0;$186=HEAP8[$184>>0]|0;$187=$186&255;$188=$182|$187;$189=$188&255;HEAP8[$184>>0]=$189;$190=$$0$$i499$i+$ptr$01$i498$i|0;$191=($179|0)>0;$$pre$i501$i=HEAP32[$17>>2]|0;if($191){$$02$i497$i=$179;$185=$$pre$i501$i;$ptr$01$i498$i=$190}else{$$lcssa463=$190;$$pre$i501$i$lcssa=$$pre$i501$i;break}}$192=(($gfc+39840|0)+($$pre$i501$i$lcssa*48|0)|0)+4|0;HEAP32[$192>>2]=$$lcssa463;$193=$gfc+180|0;$194=HEAP32[$193>>2]|0;$$02$i487$i=2;$204=$$pre$i501$i$lcssa;$ptr$01$i488$i=$$lcssa463;while(1){$195=$ptr$01$i488$i&7;$196=8-$195|0;$197=($$02$i487$i|0)<($196|0);$$0$$i489$i=$197?$$02$i487$i:$196;$198=$$02$i487$i-$$0$$i489$i|0;$199=$194>>$198;$200=$196-$$0$$i489$i|0;$201=$199<<$200;$202=$ptr$01$i488$i>>3;$203=((($gfc+39840|0)+($204*48|0)|0)+8|0)+$202|0;$205=HEAP8[$203>>0]|0;$206=$205&255;$207=$201|$206;$208=$207&255;HEAP8[$203>>0]=$208;$209=$$0$$i489$i+$ptr$01$i488$i|0;$210=($198|0)>0;$$pre$i491$i=HEAP32[$17>>2]|0;if($210){$$02$i487$i=$198;$204=$$pre$i491$i;$ptr$01$i488$i=$209}else{$$lcssa462=$209;$$pre$i491$i$lcssa=$$pre$i491$i;break}}$211=(($gfc+39840|0)+($$pre$i491$i$lcssa*48|0)|0)+4|0;HEAP32[$211>>2]=$$lcssa462;$212=$gfc+84756|0;$213=HEAP32[$212>>2]|0;$$02$i477$i=2;$223=$$pre$i491$i$lcssa;$ptr$01$i478$i=$$lcssa462;while(1){$214=$ptr$01$i478$i&7;$215=8-$214|0;$216=($$02$i477$i|0)<($215|0);$$0$$i479$i=$216?$$02$i477$i:$215;$217=$$02$i477$i-$$0$$i479$i|0;$218=$213>>$217;$219=$215-$$0$$i479$i|0;$220=$218<<$219;$221=$ptr$01$i478$i>>3;$222=((($gfc+39840|0)+($223*48|0)|0)+8|0)+$221|0;$224=HEAP8[$222>>0]|0;$225=$224&255;$226=$220|$225;$227=$226&255;HEAP8[$222>>0]=$227;$228=$$0$$i479$i+$ptr$01$i478$i|0;$229=($217|0)>0;$$pre$i481$i=HEAP32[$17>>2]|0;if($229){$$02$i477$i=$217;$223=$$pre$i481$i;$ptr$01$i478$i=$228}else{$$lcssa461=$228;$$pre$i481$i$lcssa=$$pre$i481$i;break}}$230=(($gfc+39840|0)+($$pre$i481$i$lcssa*48|0)|0)+4|0;HEAP32[$230>>2]=$$lcssa461;$231=$gfc+164|0;$232=HEAP32[$231>>2]|0;$$02$i467$i=1;$242=$$pre$i481$i$lcssa;$ptr$01$i468$i=$$lcssa461;while(1){$233=$ptr$01$i468$i&7;$234=8-$233|0;$235=($$02$i467$i|0)<($234|0);$$0$$i469$i=$235?$$02$i467$i:$234;$236=$$02$i467$i-$$0$$i469$i|0;$237=$232>>$236;$238=$234-$$0$$i469$i|0;$239=$237<<$238;$240=$ptr$01$i468$i>>3;$241=((($gfc+39840|0)+($242*48|0)|0)+8|0)+$240|0;$243=HEAP8[$241>>0]|0;$244=$243&255;$245=$239|$244;$246=$245&255;HEAP8[$241>>0]=$246;$247=$$0$$i469$i+$ptr$01$i468$i|0;$248=($236|0)>0;$$pre$i471$i=HEAP32[$17>>2]|0;if($248){$$02$i467$i=$236;$242=$$pre$i471$i;$ptr$01$i468$i=$247}else{$$lcssa460=$247;$$pre$i471$i$lcssa=$$pre$i471$i;break}}$249=(($gfc+39840|0)+($$pre$i471$i$lcssa*48|0)|0)+4|0;HEAP32[$249>>2]=$$lcssa460;$250=$gfc+168|0;$251=HEAP32[$250>>2]|0;$$02$i457$i=1;$261=$$pre$i471$i$lcssa;$ptr$01$i458$i=$$lcssa460;while(1){$252=$ptr$01$i458$i&7;$253=8-$252|0;$254=($$02$i457$i|0)<($253|0);$$0$$i459$i=$254?$$02$i457$i:$253;$255=$$02$i457$i-$$0$$i459$i|0;$256=$251>>$255;$257=$253-$$0$$i459$i|0;$258=$256<<$257;$259=$ptr$01$i458$i>>3;$260=((($gfc+39840|0)+($261*48|0)|0)+8|0)+$259|0;$262=HEAP8[$260>>0]|0;$263=$262&255;$264=$258|$263;$265=$264&255;HEAP8[$260>>0]=$265;$266=$$0$$i459$i+$ptr$01$i458$i|0;$267=($255|0)>0;$$pre$i461$i=HEAP32[$17>>2]|0;if($267){$$02$i457$i=$255;$261=$$pre$i461$i;$ptr$01$i458$i=$266}else{$$lcssa459=$266;$$pre$i461$i$lcssa=$$pre$i461$i;break}}$268=(($gfc+39840|0)+($$pre$i461$i$lcssa*48|0)|0)+4|0;HEAP32[$268>>2]=$$lcssa459;$269=$gfc+176|0;$270=HEAP32[$269>>2]|0;$$02$i447$i=2;$280=$$pre$i461$i$lcssa;$ptr$01$i448$i=$$lcssa459;while(1){$271=$ptr$01$i448$i&7;$272=8-$271|0;$273=($$02$i447$i|0)<($272|0);$$0$$i449$i=$273?$$02$i447$i:$272;$274=$$02$i447$i-$$0$$i449$i|0;$275=$270>>$274;$276=$272-$$0$$i449$i|0;$277=$275<<$276;$278=$ptr$01$i448$i>>3;$279=((($gfc+39840|0)+($280*48|0)|0)+8|0)+$278|0;$281=HEAP8[$279>>0]|0;$282=$281&255;$283=$277|$282;$284=$283&255;HEAP8[$279>>0]=$284;$285=$$0$$i449$i+$ptr$01$i448$i|0;$286=($274|0)>0;$$pre$i451$i=HEAP32[$17>>2]|0;if($286){$$02$i447$i=$274;$280=$$pre$i451$i;$ptr$01$i448$i=$285}else{$$lcssa458=$285;$$pre$i451$i$lcssa=$$pre$i451$i;break}}$287=(($gfc+39840|0)+($$pre$i451$i$lcssa*48|0)|0)+4|0;HEAP32[$287>>2]=$$lcssa458;$288=HEAP32[$98>>2]|0;$289=($288|0)==0;if($289){$1789=$$lcssa458}else{$$02$i437$i=16;$ptr$01$i438$i=$$lcssa458;while(1){$290=$ptr$01$i438$i&7;$291=8-$290|0;$292=($$02$i437$i|0)<($291|0);$$0$$i439$i=$292?$$02$i437$i:$291;$293=$$02$i437$i-$$0$$i439$i|0;$294=$$0$$i439$i+$ptr$01$i438$i|0;$295=($293|0)>0;if($295){$$02$i437$i=$293;$ptr$01$i438$i=$294}else{$$lcssa457=$294;break}}HEAP32[$287>>2]=$$lcssa457;$1789=$$lcssa457}$296=HEAP32[$62>>2]|0;$297=($296|0)==1;$298=$gfc+21312|0;$299=HEAP32[$298>>2]|0;do{if($297){$$02$i427$i=9;$309=$$pre$i451$i$lcssa;$ptr$01$i428$i=$1789;while(1){$300=$ptr$01$i428$i&7;$301=8-$300|0;$302=($$02$i427$i|0)<($301|0);$$0$$i429$i=$302?$$02$i427$i:$301;$303=$$02$i427$i-$$0$$i429$i|0;$304=$299>>$303;$305=$301-$$0$$i429$i|0;$306=$304<<$305;$307=$ptr$01$i428$i>>3;$308=((($gfc+39840|0)+($309*48|0)|0)+8|0)+$307|0;$310=HEAP8[$308>>0]|0;$311=$310&255;$312=$306|$311;$313=$312&255;HEAP8[$308>>0]=$313;$314=$$0$$i429$i+$ptr$01$i428$i|0;$315=($303|0)>0;$$pre$i431$i=HEAP32[$17>>2]|0;if($315){$$02$i427$i=$303;$309=$$pre$i431$i;$ptr$01$i428$i=$314}else{$$lcssa434=$314;$$pre$i431$i$lcssa=$$pre$i431$i;break}}$316=(($gfc+39840|0)+($$pre$i431$i$lcssa*48|0)|0)+4|0;HEAP32[$316>>2]=$$lcssa434;$317=$gfc+72|0;$318=HEAP32[$317>>2]|0;$319=($318|0)==2;$320=$gfc+21316|0;$321=HEAP32[$320>>2]|0;if($319){$$02$i417$i=3;$331=$$pre$i431$i$lcssa;$ptr$01$i418$i=$$lcssa434;while(1){$322=$ptr$01$i418$i&7;$323=8-$322|0;$324=($$02$i417$i|0)<($323|0);$$0$$i419$i=$324?$$02$i417$i:$323;$325=$$02$i417$i-$$0$$i419$i|0;$326=$321>>$325;$327=$323-$$0$$i419$i|0;$328=$326<<$327;$329=$ptr$01$i418$i>>3;$330=((($gfc+39840|0)+($331*48|0)|0)+8|0)+$329|0;$332=HEAP8[$330>>0]|0;$333=$332&255;$334=$328|$333;$335=$334&255;HEAP8[$330>>0]=$335;$336=$$0$$i419$i+$ptr$01$i418$i|0;$337=($325|0)>0;$$pre$i421$i=HEAP32[$17>>2]|0;if($337){$$02$i417$i=$325;$331=$$pre$i421$i;$ptr$01$i418$i=$336}else{$$lcssa432=$336;$$pre$i421$i$lcssa=$$pre$i421$i;break}}$338=(($gfc+39840|0)+($$pre$i421$i$lcssa*48|0)|0)+4|0;HEAP32[$338>>2]=$$lcssa432;$$pre735$i=$$lcssa432;$1790=$$pre$i421$i$lcssa}else{$$02$i407$i=5;$348=$$pre$i431$i$lcssa;$ptr$01$i408$i=$$lcssa434;while(1){$339=$ptr$01$i408$i&7;$340=8-$339|0;$341=($$02$i407$i|0)<($340|0);$$0$$i409$i=$341?$$02$i407$i:$340;$342=$$02$i407$i-$$0$$i409$i|0;$343=$321>>$342;$344=$340-$$0$$i409$i|0;$345=$343<<$344;$346=$ptr$01$i408$i>>3;$347=((($gfc+39840|0)+($348*48|0)|0)+8|0)+$346|0;$349=HEAP8[$347>>0]|0;$350=$349&255;$351=$345|$350;$352=$351&255;HEAP8[$347>>0]=$352;$353=$$0$$i409$i+$ptr$01$i408$i|0;$354=($342|0)>0;$$pre$i411$i=HEAP32[$17>>2]|0;if($354){$$02$i407$i=$342;$348=$$pre$i411$i;$ptr$01$i408$i=$353}else{$$lcssa433=$353;$$pre$i411$i$lcssa=$$pre$i411$i;break}}$355=(($gfc+39840|0)+($$pre$i411$i$lcssa*48|0)|0)+4|0;HEAP32[$355>>2]=$$lcssa433;$$pre735$i=$$lcssa433;$1790=$$pre$i411$i$lcssa}$356=HEAP32[$317>>2]|0;$357=($356|0)>0;if($357){$1791=$$pre735$i;$1792=$1790;$ch$0637$i=0;while(1){$358=($gfc+21328|0)+($ch$0637$i<<4)|0;$359=HEAP32[$358>>2]|0;$$02$i397$i=1;$369=$1792;$ptr$01$i398$i=$1791;while(1){$360=$ptr$01$i398$i&7;$361=8-$360|0;$362=($$02$i397$i|0)<($361|0);$$0$$i399$i=$362?$$02$i397$i:$361;$363=$$02$i397$i-$$0$$i399$i|0;$364=$359>>$363;$365=$361-$$0$$i399$i|0;$366=$364<<$365;$367=$ptr$01$i398$i>>3;$368=((($gfc+39840|0)+($369*48|0)|0)+8|0)+$367|0;$370=HEAP8[$368>>0]|0;$371=$370&255;$372=$366|$371;$373=$372&255;HEAP8[$368>>0]=$373;$374=$$0$$i399$i+$ptr$01$i398$i|0;$375=($363|0)>0;$$pre$i401$i=HEAP32[$17>>2]|0;if($375){$$02$i397$i=$363;$369=$$pre$i401$i;$ptr$01$i398$i=$374}else{$$lcssa427=$374;$$pre$i401$i$lcssa=$$pre$i401$i;break}}$376=(($gfc+39840|0)+($$pre$i401$i$lcssa*48|0)|0)+4|0;HEAP32[$376>>2]=$$lcssa427;$377=(($gfc+21328|0)+($ch$0637$i<<4)|0)+4|0;$378=HEAP32[$377>>2]|0;$$02$i397$1$i=1;$1234=$$pre$i401$i$lcssa;$ptr$01$i398$1$i=$$lcssa427;while(1){$1225=$ptr$01$i398$1$i&7;$1226=8-$1225|0;$1227=($$02$i397$1$i|0)<($1226|0);$$0$$i399$1$i=$1227?$$02$i397$1$i:$1226;$1228=$$02$i397$1$i-$$0$$i399$1$i|0;$1229=$378>>$1228;$1230=$1226-$$0$$i399$1$i|0;$1231=$1229<<$1230;$1232=$ptr$01$i398$1$i>>3;$1233=((($gfc+39840|0)+($1234*48|0)|0)+8|0)+$1232|0;$1235=HEAP8[$1233>>0]|0;$1236=$1235&255;$1237=$1231|$1236;$1238=$1237&255;HEAP8[$1233>>0]=$1238;$1239=$$0$$i399$1$i+$ptr$01$i398$1$i|0;$1240=($1228|0)>0;$$pre$i401$1$i=HEAP32[$17>>2]|0;if($1240){$$02$i397$1$i=$1228;$1234=$$pre$i401$1$i;$ptr$01$i398$1$i=$1239}else{$$lcssa428=$1239;$$pre$i401$1$i$lcssa=$$pre$i401$1$i;break}}$1241=(($gfc+39840|0)+($$pre$i401$1$i$lcssa*48|0)|0)+4|0;HEAP32[$1241>>2]=$$lcssa428;$1242=(($gfc+21328|0)+($ch$0637$i<<4)|0)+8|0;$1243=HEAP32[$1242>>2]|0;$$02$i397$2$i=1;$1253=$$pre$i401$1$i$lcssa;$ptr$01$i398$2$i=$$lcssa428;while(1){$1244=$ptr$01$i398$2$i&7;$1245=8-$1244|0;$1246=($$02$i397$2$i|0)<($1245|0);$$0$$i399$2$i=$1246?$$02$i397$2$i:$1245;$1247=$$02$i397$2$i-$$0$$i399$2$i|0;$1248=$1243>>$1247;$1249=$1245-$$0$$i399$2$i|0;$1250=$1248<<$1249;$1251=$ptr$01$i398$2$i>>3;$1252=((($gfc+39840|0)+($1253*48|0)|0)+8|0)+$1251|0;$1254=HEAP8[$1252>>0]|0;$1255=$1254&255;$1256=$1250|$1255;$1257=$1256&255;HEAP8[$1252>>0]=$1257;$1258=$$0$$i399$2$i+$ptr$01$i398$2$i|0;$1259=($1247|0)>0;$$pre$i401$2$i=HEAP32[$17>>2]|0;if($1259){$$02$i397$2$i=$1247;$1253=$$pre$i401$2$i;$ptr$01$i398$2$i=$1258}else{$$lcssa429=$1258;$$pre$i401$2$i$lcssa=$$pre$i401$2$i;break}}$1260=(($gfc+39840|0)+($$pre$i401$2$i$lcssa*48|0)|0)+4|0;HEAP32[$1260>>2]=$$lcssa429;$1261=(($gfc+21328|0)+($ch$0637$i<<4)|0)+12|0;$1262=HEAP32[$1261>>2]|0;$$02$i397$3$i=1;$1272=$$pre$i401$2$i$lcssa;$ptr$01$i398$3$i=$$lcssa429;while(1){$1263=$ptr$01$i398$3$i&7;$1264=8-$1263|0;$1265=($$02$i397$3$i|0)<($1264|0);$$0$$i399$3$i=$1265?$$02$i397$3$i:$1264;$1266=$$02$i397$3$i-$$0$$i399$3$i|0;$1267=$1262>>$1266;$1268=$1264-$$0$$i399$3$i|0;$1269=$1267<<$1268;$1270=$ptr$01$i398$3$i>>3;$1271=((($gfc+39840|0)+($1272*48|0)|0)+8|0)+$1270|0;$1273=HEAP8[$1271>>0]|0;$1274=$1273&255;$1275=$1269|$1274;$1276=$1275&255;HEAP8[$1271>>0]=$1276;$1277=$$0$$i399$3$i+$ptr$01$i398$3$i|0;$1278=($1266|0)>0;$$pre$i401$3$i=HEAP32[$17>>2]|0;if($1278){$$02$i397$3$i=$1266;$1272=$$pre$i401$3$i;$ptr$01$i398$3$i=$1277}else{$$lcssa430=$1277;$$pre$i401$3$i$lcssa=$$pre$i401$3$i;break}}$1279=(($gfc+39840|0)+($$pre$i401$3$i$lcssa*48|0)|0)+4|0;HEAP32[$1279>>2]=$$lcssa430;$1280=$ch$0637$i+1|0;$1281=HEAP32[$317>>2]|0;$1282=($1280|0)<($1281|0);if($1282){$1791=$$lcssa430;$1792=$$pre$i401$3$i$lcssa;$ch$0637$i=$1280}else{$379=$1281;$381=$$pre$i401$3$i$lcssa;$gr$0634$i=0;break}}}else{$379=$356;$381=$1790;$gr$0634$i=0}while(1){$380=($379|0)>0;if($380){$$phi$trans$insert736$i=(($gfc+39840|0)+($381*48|0)|0)+4|0;$$pre737$i=HEAP32[$$phi$trans$insert736$i>>2]|0;$1795=$$pre737$i;$1796=$381;$ch$1632$i=0;while(1){$382=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4768|0;$383=HEAP32[$382>>2]|0;$384=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4844|0;$385=HEAP32[$384>>2]|0;$386=$385+$383|0;$$02$i387$i=12;$396=$1796;$ptr$01$i388$i=$1795;while(1){$387=$ptr$01$i388$i&7;$388=8-$387|0;$389=($$02$i387$i|0)<($388|0);$$0$$i389$i=$389?$$02$i387$i:$388;$390=$$02$i387$i-$$0$$i389$i|0;$391=$386>>$390;$392=$388-$$0$$i389$i|0;$393=$391<<$392;$394=$ptr$01$i388$i>>3;$395=((($gfc+39840|0)+($396*48|0)|0)+8|0)+$394|0;$397=HEAP8[$395>>0]|0;$398=$397&255;$399=$393|$398;$400=$399&255;HEAP8[$395>>0]=$400;$401=$$0$$i389$i+$ptr$01$i388$i|0;$402=($390|0)>0;$$pre$i391$i=HEAP32[$17>>2]|0;if($402){$$02$i387$i=$390;$396=$$pre$i391$i;$ptr$01$i388$i=$401}else{$$lcssa404=$401;$$pre$i391$i$lcssa=$$pre$i391$i;break}}$403=(($gfc+39840|0)+($$pre$i391$i$lcssa*48|0)|0)+4|0;HEAP32[$403>>2]=$$lcssa404;$404=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4772|0;$405=HEAP32[$404>>2]|0;$406=($405|0)/2&-1;$$02$i377$i=9;$416=$$pre$i391$i$lcssa;$ptr$01$i378$i=$$lcssa404;while(1){$407=$ptr$01$i378$i&7;$408=8-$407|0;$409=($$02$i377$i|0)<($408|0);$$0$$i379$i=$409?$$02$i377$i:$408;$410=$$02$i377$i-$$0$$i379$i|0;$411=$406>>$410;$412=$408-$$0$$i379$i|0;$413=$411<<$412;$414=$ptr$01$i378$i>>3;$415=((($gfc+39840|0)+($416*48|0)|0)+8|0)+$414|0;$417=HEAP8[$415>>0]|0;$418=$417&255;$419=$413|$418;$420=$419&255;HEAP8[$415>>0]=$420;$421=$$0$$i379$i+$ptr$01$i378$i|0;$422=($410|0)>0;$$pre$i381$i=HEAP32[$17>>2]|0;if($422){$$02$i377$i=$410;$416=$$pre$i381$i;$ptr$01$i378$i=$421}else{$$lcssa405=$421;$$pre$i381$i$lcssa=$$pre$i381$i;break}}$423=(($gfc+39840|0)+($$pre$i381$i$lcssa*48|0)|0)+4|0;HEAP32[$423>>2]=$$lcssa405;$424=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4780|0;$425=HEAP32[$424>>2]|0;$$02$i367$i=8;$435=$$pre$i381$i$lcssa;$ptr$01$i368$i=$$lcssa405;while(1){$426=$ptr$01$i368$i&7;$427=8-$426|0;$428=($$02$i367$i|0)<($427|0);$$0$$i369$i=$428?$$02$i367$i:$427;$429=$$02$i367$i-$$0$$i369$i|0;$430=$425>>$429;$431=$427-$$0$$i369$i|0;$432=$430<<$431;$433=$ptr$01$i368$i>>3;$434=((($gfc+39840|0)+($435*48|0)|0)+8|0)+$433|0;$436=HEAP8[$434>>0]|0;$437=$436&255;$438=$432|$437;$439=$438&255;HEAP8[$434>>0]=$439;$440=$$0$$i369$i+$ptr$01$i368$i|0;$441=($429|0)>0;$$pre$i371$i=HEAP32[$17>>2]|0;if($441){$$02$i367$i=$429;$435=$$pre$i371$i;$ptr$01$i368$i=$440}else{$$lcssa406=$440;$$pre$i371$i$lcssa=$$pre$i371$i;break}}$442=(($gfc+39840|0)+($$pre$i371$i$lcssa*48|0)|0)+4|0;HEAP32[$442>>2]=$$lcssa406;$443=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4784|0;$444=HEAP32[$443>>2]|0;$$02$i357$i=4;$454=$$pre$i371$i$lcssa;$ptr$01$i358$i=$$lcssa406;while(1){$445=$ptr$01$i358$i&7;$446=8-$445|0;$447=($$02$i357$i|0)<($446|0);$$0$$i359$i=$447?$$02$i357$i:$446;$448=$$02$i357$i-$$0$$i359$i|0;$449=$444>>$448;$450=$446-$$0$$i359$i|0;$451=$449<<$450;$452=$ptr$01$i358$i>>3;$453=((($gfc+39840|0)+($454*48|0)|0)+8|0)+$452|0;$455=HEAP8[$453>>0]|0;$456=$455&255;$457=$451|$456;$458=$457&255;HEAP8[$453>>0]=$458;$459=$$0$$i359$i+$ptr$01$i358$i|0;$460=($448|0)>0;$$pre$i361$i=HEAP32[$17>>2]|0;if($460){$$02$i357$i=$448;$454=$$pre$i361$i;$ptr$01$i358$i=$459}else{$$lcssa407=$459;$$pre$i361$i$lcssa=$$pre$i361$i;break}}$461=(($gfc+39840|0)+($$pre$i361$i$lcssa*48|0)|0)+4|0;HEAP32[$461>>2]=$$lcssa407;$462=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4788|0;$463=HEAP32[$462>>2]|0;$464=($463|0)==0;if($464){$$02$i267$i=1;$ptr$01$i268$i=$$lcssa407;while(1){$618=$ptr$01$i268$i&7;$619=8-$618|0;$620=($$02$i267$i|0)<($619|0);$$0$$i269$i=$620?$$02$i267$i:$619;$621=$$02$i267$i-$$0$$i269$i|0;$622=$$0$$i269$i+$ptr$01$i268$i|0;$623=($621|0)>0;if($623){$$02$i267$i=$621;$ptr$01$i268$i=$622}else{$$lcssa416=$622;break}}HEAP32[$461>>2]=$$lcssa416;$624=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4796|0;$625=HEAP32[$624>>2]|0;$626=($625|0)==14;if($626){HEAP32[$624>>2]=16;$$pre725$i=HEAP32[$17>>2]|0;$$phi$trans$insert726$i=(($gfc+39840|0)+($$pre725$i*48|0)|0)+4|0;$$pre727$i=HEAP32[$$phi$trans$insert726$i>>2]|0;$1803=$$pre727$i;$1804=$$pre725$i;$632=16}else{$1803=$$lcssa416;$1804=$$pre$i361$i$lcssa;$632=$625}$$02$i257$i=5;$637=$1804;$ptr$01$i258$i=$1803;while(1){$627=$ptr$01$i258$i&7;$628=8-$627|0;$629=($$02$i257$i|0)<($628|0);$$0$$i259$i=$629?$$02$i257$i:$628;$630=$$02$i257$i-$$0$$i259$i|0;$631=$632>>$630;$633=$628-$$0$$i259$i|0;$634=$631<<$633;$635=$ptr$01$i258$i>>3;$636=((($gfc+39840|0)+($637*48|0)|0)+8|0)+$635|0;$638=HEAP8[$636>>0]|0;$639=$638&255;$640=$634|$639;$641=$640&255;HEAP8[$636>>0]=$641;$642=$$0$$i259$i+$ptr$01$i258$i|0;$643=($630|0)>0;$$pre$i261$i=HEAP32[$17>>2]|0;if($643){$$02$i257$i=$630;$637=$$pre$i261$i;$ptr$01$i258$i=$642}else{$$lcssa417=$642;$$pre$i261$i$lcssa=$$pre$i261$i;break}}$644=(($gfc+39840|0)+($$pre$i261$i$lcssa*48|0)|0)+4|0;HEAP32[$644>>2]=$$lcssa417;$645=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4800|0;$646=HEAP32[$645>>2]|0;$647=($646|0)==14;if($647){HEAP32[$645>>2]=16;$$pre728$i=HEAP32[$17>>2]|0;$$phi$trans$insert729$i=(($gfc+39840|0)+($$pre728$i*48|0)|0)+4|0;$$pre730$i=HEAP32[$$phi$trans$insert729$i>>2]|0;$1805=$$pre730$i;$1806=$$pre728$i;$653=16}else{$1805=$$lcssa417;$1806=$$pre$i261$i$lcssa;$653=$646}$$02$i247$i=5;$658=$1806;$ptr$01$i248$i=$1805;while(1){$648=$ptr$01$i248$i&7;$649=8-$648|0;$650=($$02$i247$i|0)<($649|0);$$0$$i249$i=$650?$$02$i247$i:$649;$651=$$02$i247$i-$$0$$i249$i|0;$652=$653>>$651;$654=$649-$$0$$i249$i|0;$655=$652<<$654;$656=$ptr$01$i248$i>>3;$657=((($gfc+39840|0)+($658*48|0)|0)+8|0)+$656|0;$659=HEAP8[$657>>0]|0;$660=$659&255;$661=$655|$660;$662=$661&255;HEAP8[$657>>0]=$662;$663=$$0$$i249$i+$ptr$01$i248$i|0;$664=($651|0)>0;$$pre$i251$i=HEAP32[$17>>2]|0;if($664){$$02$i247$i=$651;$658=$$pre$i251$i;$ptr$01$i248$i=$663}else{$$lcssa418=$663;$$pre$i251$i$lcssa=$$pre$i251$i;break}}$665=(($gfc+39840|0)+($$pre$i251$i$lcssa*48|0)|0)+4|0;HEAP32[$665>>2]=$$lcssa418;$666=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4804|0;$667=HEAP32[$666>>2]|0;$668=($667|0)==14;if($668){HEAP32[$666>>2]=16;$$pre731$i=HEAP32[$17>>2]|0;$$phi$trans$insert732$i=(($gfc+39840|0)+($$pre731$i*48|0)|0)+4|0;$$pre733$i=HEAP32[$$phi$trans$insert732$i>>2]|0;$1807=$$pre733$i;$1808=$$pre731$i;$674=16}else{$1807=$$lcssa418;$1808=$$pre$i251$i$lcssa;$674=$667}$$02$i237$i=5;$679=$1808;$ptr$01$i238$i=$1807;while(1){$669=$ptr$01$i238$i&7;$670=8-$669|0;$671=($$02$i237$i|0)<($670|0);$$0$$i239$i=$671?$$02$i237$i:$670;$672=$$02$i237$i-$$0$$i239$i|0;$673=$674>>$672;$675=$670-$$0$$i239$i|0;$676=$673<<$675;$677=$ptr$01$i238$i>>3;$678=((($gfc+39840|0)+($679*48|0)|0)+8|0)+$677|0;$680=HEAP8[$678>>0]|0;$681=$680&255;$682=$676|$681;$683=$682&255;HEAP8[$678>>0]=$683;$684=$$0$$i239$i+$ptr$01$i238$i|0;$685=($672|0)>0;$$pre$i241$i=HEAP32[$17>>2]|0;if($685){$$02$i237$i=$672;$679=$$pre$i241$i;$ptr$01$i238$i=$684}else{$$lcssa419=$684;$$pre$i241$i$lcssa=$$pre$i241$i;break}}$686=(($gfc+39840|0)+($$pre$i241$i$lcssa*48|0)|0)+4|0;HEAP32[$686>>2]=$$lcssa419;$687=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4824|0;$688=HEAP32[$687>>2]|0;$$02$i227$i=4;$698=$$pre$i241$i$lcssa;$ptr$01$i228$i=$$lcssa419;while(1){$689=$ptr$01$i228$i&7;$690=8-$689|0;$691=($$02$i227$i|0)<($690|0);$$0$$i229$i=$691?$$02$i227$i:$690;$692=$$02$i227$i-$$0$$i229$i|0;$693=$688>>$692;$694=$690-$$0$$i229$i|0;$695=$693<<$694;$696=$ptr$01$i228$i>>3;$697=((($gfc+39840|0)+($698*48|0)|0)+8|0)+$696|0;$699=HEAP8[$697>>0]|0;$700=$699&255;$701=$695|$700;$702=$701&255;HEAP8[$697>>0]=$702;$703=$$0$$i229$i+$ptr$01$i228$i|0;$704=($692|0)>0;$$pre$i231$i=HEAP32[$17>>2]|0;if($704){$$02$i227$i=$692;$698=$$pre$i231$i;$ptr$01$i228$i=$703}else{$$lcssa420=$703;$$pre$i231$i$lcssa=$$pre$i231$i;break}}$705=(($gfc+39840|0)+($$pre$i231$i$lcssa*48|0)|0)+4|0;HEAP32[$705>>2]=$$lcssa420;$706=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4828|0;$707=HEAP32[$706>>2]|0;$$02$i217$i=3;$717=$$pre$i231$i$lcssa;$ptr$01$i218$i=$$lcssa420;while(1){$708=$ptr$01$i218$i&7;$709=8-$708|0;$710=($$02$i217$i|0)<($709|0);$$0$$i219$i=$710?$$02$i217$i:$709;$711=$$02$i217$i-$$0$$i219$i|0;$712=$707>>$711;$713=$709-$$0$$i219$i|0;$714=$712<<$713;$715=$ptr$01$i218$i>>3;$716=((($gfc+39840|0)+($717*48|0)|0)+8|0)+$715|0;$718=HEAP8[$716>>0]|0;$719=$718&255;$720=$714|$719;$721=$720&255;HEAP8[$716>>0]=$721;$722=$$0$$i219$i+$ptr$01$i218$i|0;$723=($711|0)>0;$$pre$i221$i=HEAP32[$17>>2]|0;if($723){$$02$i217$i=$711;$717=$$pre$i221$i;$ptr$01$i218$i=$722}else{$$lcssa421=$722;$$pre$i221$i$lcssa=$$pre$i221$i;break}}$724=(($gfc+39840|0)+($$pre$i221$i$lcssa*48|0)|0)+4|0;HEAP32[$724>>2]=$$lcssa421;$1801=$$lcssa421;$1802=$$pre$i221$i$lcssa}else{$$02$i347$i=1;$474=$$pre$i361$i$lcssa;$ptr$01$i348$i=$$lcssa407;while(1){$465=$ptr$01$i348$i&7;$466=8-$465|0;$467=($$02$i347$i|0)<($466|0);$$0$$i349$i=$467?$$02$i347$i:$466;$468=$$02$i347$i-$$0$$i349$i|0;$469=1>>>$468;$470=$466-$$0$$i349$i|0;$471=$469<<$470;$472=$ptr$01$i348$i>>3;$473=((($gfc+39840|0)+($474*48|0)|0)+8|0)+$472|0;$475=HEAP8[$473>>0]|0;$476=$475&255;$477=$471|$476;$478=$477&255;HEAP8[$473>>0]=$478;$479=$$0$$i349$i+$ptr$01$i348$i|0;$480=($468|0)>0;$$pre$i351$i=HEAP32[$17>>2]|0;if($480){$$02$i347$i=$468;$474=$$pre$i351$i;$ptr$01$i348$i=$479}else{$$lcssa408=$479;$$pre$i351$i$lcssa=$$pre$i351$i;break}}$481=(($gfc+39840|0)+($$pre$i351$i$lcssa*48|0)|0)+4|0;HEAP32[$481>>2]=$$lcssa408;$482=HEAP32[$462>>2]|0;$$02$i337$i=2;$492=$$pre$i351$i$lcssa;$ptr$01$i338$i=$$lcssa408;while(1){$483=$ptr$01$i338$i&7;$484=8-$483|0;$485=($$02$i337$i|0)<($484|0);$$0$$i339$i=$485?$$02$i337$i:$484;$486=$$02$i337$i-$$0$$i339$i|0;$487=$482>>$486;$488=$484-$$0$$i339$i|0;$489=$487<<$488;$490=$ptr$01$i338$i>>3;$491=((($gfc+39840|0)+($492*48|0)|0)+8|0)+$490|0;$493=HEAP8[$491>>0]|0;$494=$493&255;$495=$489|$494;$496=$495&255;HEAP8[$491>>0]=$496;$497=$$0$$i339$i+$ptr$01$i338$i|0;$498=($486|0)>0;$$pre$i341$i=HEAP32[$17>>2]|0;if($498){$$02$i337$i=$486;$492=$$pre$i341$i;$ptr$01$i338$i=$497}else{$$lcssa409=$497;$$pre$i341$i$lcssa=$$pre$i341$i;break}}$499=(($gfc+39840|0)+($$pre$i341$i$lcssa*48|0)|0)+4|0;HEAP32[$499>>2]=$$lcssa409;$500=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4792|0;$501=HEAP32[$500>>2]|0;$$02$i327$i=1;$511=$$pre$i341$i$lcssa;$ptr$01$i328$i=$$lcssa409;while(1){$502=$ptr$01$i328$i&7;$503=8-$502|0;$504=($$02$i327$i|0)<($503|0);$$0$$i329$i=$504?$$02$i327$i:$503;$505=$$02$i327$i-$$0$$i329$i|0;$506=$501>>$505;$507=$503-$$0$$i329$i|0;$508=$506<<$507;$509=$ptr$01$i328$i>>3;$510=((($gfc+39840|0)+($511*48|0)|0)+8|0)+$509|0;$512=HEAP8[$510>>0]|0;$513=$512&255;$514=$508|$513;$515=$514&255;HEAP8[$510>>0]=$515;$516=$$0$$i329$i+$ptr$01$i328$i|0;$517=($505|0)>0;$$pre$i331$i=HEAP32[$17>>2]|0;if($517){$$02$i327$i=$505;$511=$$pre$i331$i;$ptr$01$i328$i=$516}else{$$lcssa410=$516;$$pre$i331$i$lcssa=$$pre$i331$i;break}}$518=(($gfc+39840|0)+($$pre$i331$i$lcssa*48|0)|0)+4|0;HEAP32[$518>>2]=$$lcssa410;$519=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4796|0;$520=HEAP32[$519>>2]|0;$521=($520|0)==14;if($521){HEAP32[$519>>2]=16;$$pre719$i=HEAP32[$17>>2]|0;$$phi$trans$insert720$i=(($gfc+39840|0)+($$pre719$i*48|0)|0)+4|0;$$pre721$i=HEAP32[$$phi$trans$insert720$i>>2]|0;$1797=$$pre721$i;$1798=$$pre719$i;$527=16}else{$1797=$$lcssa410;$1798=$$pre$i331$i$lcssa;$527=$520}$$02$i317$i=5;$532=$1798;$ptr$01$i318$i=$1797;while(1){$522=$ptr$01$i318$i&7;$523=8-$522|0;$524=($$02$i317$i|0)<($523|0);$$0$$i319$i=$524?$$02$i317$i:$523;$525=$$02$i317$i-$$0$$i319$i|0;$526=$527>>$525;$528=$523-$$0$$i319$i|0;$529=$526<<$528;$530=$ptr$01$i318$i>>3;$531=((($gfc+39840|0)+($532*48|0)|0)+8|0)+$530|0;$533=HEAP8[$531>>0]|0;$534=$533&255;$535=$529|$534;$536=$535&255;HEAP8[$531>>0]=$536;$537=$$0$$i319$i+$ptr$01$i318$i|0;$538=($525|0)>0;$$pre$i321$i=HEAP32[$17>>2]|0;if($538){$$02$i317$i=$525;$532=$$pre$i321$i;$ptr$01$i318$i=$537}else{$$lcssa411=$537;$$pre$i321$i$lcssa=$$pre$i321$i;break}}$539=(($gfc+39840|0)+($$pre$i321$i$lcssa*48|0)|0)+4|0;HEAP32[$539>>2]=$$lcssa411;$540=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4800|0;$541=HEAP32[$540>>2]|0;$542=($541|0)==14;if($542){HEAP32[$540>>2]=16;$$pre722$i=HEAP32[$17>>2]|0;$$phi$trans$insert723$i=(($gfc+39840|0)+($$pre722$i*48|0)|0)+4|0;$$pre724$i=HEAP32[$$phi$trans$insert723$i>>2]|0;$1799=$$pre724$i;$1800=$$pre722$i;$548=16}else{$1799=$$lcssa411;$1800=$$pre$i321$i$lcssa;$548=$541}$$02$i307$i=5;$553=$1800;$ptr$01$i308$i=$1799;while(1){$543=$ptr$01$i308$i&7;$544=8-$543|0;$545=($$02$i307$i|0)<($544|0);$$0$$i309$i=$545?$$02$i307$i:$544;$546=$$02$i307$i-$$0$$i309$i|0;$547=$548>>$546;$549=$544-$$0$$i309$i|0;$550=$547<<$549;$551=$ptr$01$i308$i>>3;$552=((($gfc+39840|0)+($553*48|0)|0)+8|0)+$551|0;$554=HEAP8[$552>>0]|0;$555=$554&255;$556=$550|$555;$557=$556&255;HEAP8[$552>>0]=$557;$558=$$0$$i309$i+$ptr$01$i308$i|0;$559=($546|0)>0;$$pre$i311$i=HEAP32[$17>>2]|0;if($559){$$02$i307$i=$546;$553=$$pre$i311$i;$ptr$01$i308$i=$558}else{$$lcssa412=$558;$$pre$i311$i$lcssa=$$pre$i311$i;break}}$560=(($gfc+39840|0)+($$pre$i311$i$lcssa*48|0)|0)+4|0;HEAP32[$560>>2]=$$lcssa412;$561=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4808|0;$562=HEAP32[$561>>2]|0;$$02$i297$i=3;$572=$$pre$i311$i$lcssa;$ptr$01$i298$i=$$lcssa412;while(1){$563=$ptr$01$i298$i&7;$564=8-$563|0;$565=($$02$i297$i|0)<($564|0);$$0$$i299$i=$565?$$02$i297$i:$564;$566=$$02$i297$i-$$0$$i299$i|0;$567=$562>>$566;$568=$564-$$0$$i299$i|0;$569=$567<<$568;$570=$ptr$01$i298$i>>3;$571=((($gfc+39840|0)+($572*48|0)|0)+8|0)+$570|0;$573=HEAP8[$571>>0]|0;$574=$573&255;$575=$569|$574;$576=$575&255;HEAP8[$571>>0]=$576;$577=$$0$$i299$i+$ptr$01$i298$i|0;$578=($566|0)>0;$$pre$i301$i=HEAP32[$17>>2]|0;if($578){$$02$i297$i=$566;$572=$$pre$i301$i;$ptr$01$i298$i=$577}else{$$lcssa413=$577;$$pre$i301$i$lcssa=$$pre$i301$i;break}}$579=(($gfc+39840|0)+($$pre$i301$i$lcssa*48|0)|0)+4|0;HEAP32[$579>>2]=$$lcssa413;$580=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4812|0;$581=HEAP32[$580>>2]|0;$$02$i287$i=3;$591=$$pre$i301$i$lcssa;$ptr$01$i288$i=$$lcssa413;while(1){$582=$ptr$01$i288$i&7;$583=8-$582|0;$584=($$02$i287$i|0)<($583|0);$$0$$i289$i=$584?$$02$i287$i:$583;$585=$$02$i287$i-$$0$$i289$i|0;$586=$581>>$585;$587=$583-$$0$$i289$i|0;$588=$586<<$587;$589=$ptr$01$i288$i>>3;$590=((($gfc+39840|0)+($591*48|0)|0)+8|0)+$589|0;$592=HEAP8[$590>>0]|0;$593=$592&255;$594=$588|$593;$595=$594&255;HEAP8[$590>>0]=$595;$596=$$0$$i289$i+$ptr$01$i288$i|0;$597=($585|0)>0;$$pre$i291$i=HEAP32[$17>>2]|0;if($597){$$02$i287$i=$585;$591=$$pre$i291$i;$ptr$01$i288$i=$596}else{$$lcssa414=$596;$$pre$i291$i$lcssa=$$pre$i291$i;break}}$598=(($gfc+39840|0)+($$pre$i291$i$lcssa*48|0)|0)+4|0;HEAP32[$598>>2]=$$lcssa414;$599=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4816|0;$600=HEAP32[$599>>2]|0;$$02$i277$i=3;$610=$$pre$i291$i$lcssa;$ptr$01$i278$i=$$lcssa414;while(1){$601=$ptr$01$i278$i&7;$602=8-$601|0;$603=($$02$i277$i|0)<($602|0);$$0$$i279$i=$603?$$02$i277$i:$602;$604=$$02$i277$i-$$0$$i279$i|0;$605=$600>>$604;$606=$602-$$0$$i279$i|0;$607=$605<<$606;$608=$ptr$01$i278$i>>3;$609=((($gfc+39840|0)+($610*48|0)|0)+8|0)+$608|0;$611=HEAP8[$609>>0]|0;$612=$611&255;$613=$607|$612;$614=$613&255;HEAP8[$609>>0]=$614;$615=$$0$$i279$i+$ptr$01$i278$i|0;$616=($604|0)>0;$$pre$i281$i=HEAP32[$17>>2]|0;if($616){$$02$i277$i=$604;$610=$$pre$i281$i;$ptr$01$i278$i=$615}else{$$lcssa415=$615;$$pre$i281$i$lcssa=$$pre$i281$i;break}}$617=(($gfc+39840|0)+($$pre$i281$i$lcssa*48|0)|0)+4|0;HEAP32[$617>>2]=$$lcssa415;$1801=$$lcssa415;$1802=$$pre$i281$i$lcssa}$725=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4832|0;$726=HEAP32[$725>>2]|0;$$02$i207$i=1;$736=$1802;$ptr$01$i208$i=$1801;while(1){$727=$ptr$01$i208$i&7;$728=8-$727|0;$729=($$02$i207$i|0)<($728|0);$$0$$i209$i=$729?$$02$i207$i:$728;$730=$$02$i207$i-$$0$$i209$i|0;$731=$726>>$730;$732=$728-$$0$$i209$i|0;$733=$731<<$732;$734=$ptr$01$i208$i>>3;$735=((($gfc+39840|0)+($736*48|0)|0)+8|0)+$734|0;$737=HEAP8[$735>>0]|0;$738=$737&255;$739=$733|$738;$740=$739&255;HEAP8[$735>>0]=$740;$741=$$0$$i209$i+$ptr$01$i208$i|0;$742=($730|0)>0;$$pre$i211$i=HEAP32[$17>>2]|0;if($742){$$02$i207$i=$730;$736=$$pre$i211$i;$ptr$01$i208$i=$741}else{$$lcssa422=$741;$$pre$i211$i$lcssa=$$pre$i211$i;break}}$743=(($gfc+39840|0)+($$pre$i211$i$lcssa*48|0)|0)+4|0;HEAP32[$743>>2]=$$lcssa422;$744=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4836|0;$745=HEAP32[$744>>2]|0;$$02$i197$i=1;$755=$$pre$i211$i$lcssa;$ptr$01$i198$i=$$lcssa422;while(1){$746=$ptr$01$i198$i&7;$747=8-$746|0;$748=($$02$i197$i|0)<($747|0);$$0$$i199$i=$748?$$02$i197$i:$747;$749=$$02$i197$i-$$0$$i199$i|0;$750=$745>>$749;$751=$747-$$0$$i199$i|0;$752=$750<<$751;$753=$ptr$01$i198$i>>3;$754=((($gfc+39840|0)+($755*48|0)|0)+8|0)+$753|0;$756=HEAP8[$754>>0]|0;$757=$756&255;$758=$752|$757;$759=$758&255;HEAP8[$754>>0]=$759;$760=$$0$$i199$i+$ptr$01$i198$i|0;$761=($749|0)>0;$$pre$i201$i=HEAP32[$17>>2]|0;if($761){$$02$i197$i=$749;$755=$$pre$i201$i;$ptr$01$i198$i=$760}else{$$lcssa423=$760;$$pre$i201$i$lcssa=$$pre$i201$i;break}}$762=(($gfc+39840|0)+($$pre$i201$i$lcssa*48|0)|0)+4|0;HEAP32[$762>>2]=$$lcssa423;$763=((($gfc+304|0)+($gr$0634$i*10504|0)|0)+($ch$1632$i*5252|0)|0)+4840|0;$764=HEAP32[$763>>2]|0;$$02$i187$i=1;$774=$$pre$i201$i$lcssa;$ptr$01$i188$i=$$lcssa423;while(1){$765=$ptr$01$i188$i&7;$766=8-$765|0;$767=($$02$i187$i|0)<($766|0);$$0$$i189$i=$767?$$02$i187$i:$766;$768=$$02$i187$i-$$0$$i189$i|0;$769=$764>>$768;$770=$766-$$0$$i189$i|0;$771=$769<<$770;$772=$ptr$01$i188$i>>3;$773=((($gfc+39840|0)+($774*48|0)|0)+8|0)+$772|0;$775=HEAP8[$773>>0]|0;$776=$775&255;$777=$771|$776;$778=$777&255;HEAP8[$773>>0]=$778;$779=$$0$$i189$i+$ptr$01$i188$i|0;$780=($768|0)>0;$$pre$i191$i=HEAP32[$17>>2]|0;if($780){$$02$i187$i=$768;$774=$$pre$i191$i;$ptr$01$i188$i=$779}else{$$lcssa424=$779;$$pre$i191$i$lcssa=$$pre$i191$i;break}}$781=(($gfc+39840|0)+($$pre$i191$i$lcssa*48|0)|0)+4|0;HEAP32[$781>>2]=$$lcssa424;$782=$ch$1632$i+1|0;$783=HEAP32[$317>>2]|0;$784=($782|0)<($783|0);if($784){$1795=$$lcssa424;$1796=$$pre$i191$i$lcssa;$ch$1632$i=$782}else{$1793=$$pre$i191$i$lcssa;$1794=$783;break}}}else{$1793=$381;$1794=$379}$785=$gr$0634$i+1|0;$exitcond$i=($785|0)==2;if($exitcond$i){$1213=$1793;break}else{$379=$1794;$381=$1793;$gr$0634$i=$785}}}else{$$02$i177$i=8;$795=$$pre$i451$i$lcssa;$ptr$01$i178$i=$1789;while(1){$786=$ptr$01$i178$i&7;$787=8-$786|0;$788=($$02$i177$i|0)<($787|0);$$0$$i179$i=$788?$$02$i177$i:$787;$789=$$02$i177$i-$$0$$i179$i|0;$790=$299>>$789;$791=$787-$$0$$i179$i|0;$792=$790<<$791;$793=$ptr$01$i178$i>>3;$794=((($gfc+39840|0)+($795*48|0)|0)+8|0)+$793|0;$796=HEAP8[$794>>0]|0;$797=$796&255;$798=$792|$797;$799=$798&255;HEAP8[$794>>0]=$799;$800=$$0$$i179$i+$ptr$01$i178$i|0;$801=($789|0)>0;$$pre$i181$i=HEAP32[$17>>2]|0;if($801){$$02$i177$i=$789;$795=$$pre$i181$i;$ptr$01$i178$i=$800}else{$$lcssa456=$800;$$pre$i181$i$lcssa=$$pre$i181$i;break}}$802=(($gfc+39840|0)+($$pre$i181$i$lcssa*48|0)|0)+4|0;HEAP32[$802>>2]=$$lcssa456;$803=$gfc+21316|0;$804=HEAP32[$803>>2]|0;$805=$gfc+72|0;$806=HEAP32[$805>>2]|0;$807=($806|0)>0;if($807){$$02$i169$i=$806;$817=$$pre$i181$i$lcssa;$ptr$01$i170$i=$$lcssa456}else{HEAP32[$802>>2]=$$lcssa456;$1213=$$pre$i181$i$lcssa;break}while(1){$808=$ptr$01$i170$i&7;$809=8-$808|0;$810=($$02$i169$i|0)<($809|0);$$0$$i171$i=$810?$$02$i169$i:$809;$811=$$02$i169$i-$$0$$i171$i|0;$812=$804>>$811;$813=$809-$$0$$i171$i|0;$814=$812<<$813;$815=$ptr$01$i170$i>>3;$816=((($gfc+39840|0)+($817*48|0)|0)+8|0)+$815|0;$818=HEAP8[$816>>0]|0;$819=$818&255;$820=$814|$819;$821=$820&255;HEAP8[$816>>0]=$821;$822=$$0$$i171$i+$ptr$01$i170$i|0;$823=($811|0)>0;$$pre$i173$i=HEAP32[$17>>2]|0;if($823){$$02$i169$i=$811;$817=$$pre$i173$i;$ptr$01$i170$i=$822}else{$$lcssa455=$822;$$pre$i173$i$lcssa=$$pre$i173$i;break}}$$pre$i=HEAP32[$805>>2]|0;$824=(($gfc+39840|0)+($$pre$i173$i$lcssa*48|0)|0)+4|0;HEAP32[$824>>2]=$$lcssa455;$825=($$pre$i|0)>0;if($825){$1809=$$lcssa455;$1810=$$pre$i173$i$lcssa;$ch$2638$i=0;while(1){$826=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4768|0;$827=HEAP32[$826>>2]|0;$828=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4844|0;$829=HEAP32[$828>>2]|0;$830=$829+$827|0;$$02$i161$i=12;$840=$1810;$ptr$01$i162$i=$1809;while(1){$831=$ptr$01$i162$i&7;$832=8-$831|0;$833=($$02$i161$i|0)<($832|0);$$0$$i163$i=$833?$$02$i161$i:$832;$834=$$02$i161$i-$$0$$i163$i|0;$835=$830>>$834;$836=$832-$$0$$i163$i|0;$837=$835<<$836;$838=$ptr$01$i162$i>>3;$839=((($gfc+39840|0)+($840*48|0)|0)+8|0)+$838|0;$841=HEAP8[$839>>0]|0;$842=$841&255;$843=$837|$842;$844=$843&255;HEAP8[$839>>0]=$844;$845=$$0$$i163$i+$ptr$01$i162$i|0;$846=($834|0)>0;$$pre$i165$i=HEAP32[$17>>2]|0;if($846){$$02$i161$i=$834;$840=$$pre$i165$i;$ptr$01$i162$i=$845}else{$$lcssa435=$845;$$pre$i165$i$lcssa=$$pre$i165$i;break}}$847=(($gfc+39840|0)+($$pre$i165$i$lcssa*48|0)|0)+4|0;HEAP32[$847>>2]=$$lcssa435;$848=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4772|0;$849=HEAP32[$848>>2]|0;$850=($849|0)/2&-1;$$02$i153$i=9;$860=$$pre$i165$i$lcssa;$ptr$01$i154$i=$$lcssa435;while(1){$851=$ptr$01$i154$i&7;$852=8-$851|0;$853=($$02$i153$i|0)<($852|0);$$0$$i155$i=$853?$$02$i153$i:$852;$854=$$02$i153$i-$$0$$i155$i|0;$855=$850>>$854;$856=$852-$$0$$i155$i|0;$857=$855<<$856;$858=$ptr$01$i154$i>>3;$859=((($gfc+39840|0)+($860*48|0)|0)+8|0)+$858|0;$861=HEAP8[$859>>0]|0;$862=$861&255;$863=$857|$862;$864=$863&255;HEAP8[$859>>0]=$864;$865=$$0$$i155$i+$ptr$01$i154$i|0;$866=($854|0)>0;$$pre$i157$i=HEAP32[$17>>2]|0;if($866){$$02$i153$i=$854;$860=$$pre$i157$i;$ptr$01$i154$i=$865}else{$$lcssa436=$865;$$pre$i157$i$lcssa=$$pre$i157$i;break}}$867=(($gfc+39840|0)+($$pre$i157$i$lcssa*48|0)|0)+4|0;HEAP32[$867>>2]=$$lcssa436;$868=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4780|0;$869=HEAP32[$868>>2]|0;$$02$i145$i=8;$879=$$pre$i157$i$lcssa;$ptr$01$i146$i=$$lcssa436;while(1){$870=$ptr$01$i146$i&7;$871=8-$870|0;$872=($$02$i145$i|0)<($871|0);$$0$$i147$i=$872?$$02$i145$i:$871;$873=$$02$i145$i-$$0$$i147$i|0;$874=$869>>$873;$875=$871-$$0$$i147$i|0;$876=$874<<$875;$877=$ptr$01$i146$i>>3;$878=((($gfc+39840|0)+($879*48|0)|0)+8|0)+$877|0;$880=HEAP8[$878>>0]|0;$881=$880&255;$882=$876|$881;$883=$882&255;HEAP8[$878>>0]=$883;$884=$$0$$i147$i+$ptr$01$i146$i|0;$885=($873|0)>0;$$pre$i149$i=HEAP32[$17>>2]|0;if($885){$$02$i145$i=$873;$879=$$pre$i149$i;$ptr$01$i146$i=$884}else{$$lcssa437=$884;$$pre$i149$i$lcssa=$$pre$i149$i;break}}$886=(($gfc+39840|0)+($$pre$i149$i$lcssa*48|0)|0)+4|0;HEAP32[$886>>2]=$$lcssa437;$887=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4784|0;$888=HEAP32[$887>>2]|0;$$02$i137$i=9;$898=$$pre$i149$i$lcssa;$ptr$01$i138$i=$$lcssa437;while(1){$889=$ptr$01$i138$i&7;$890=8-$889|0;$891=($$02$i137$i|0)<($890|0);$$0$$i139$i=$891?$$02$i137$i:$890;$892=$$02$i137$i-$$0$$i139$i|0;$893=$888>>$892;$894=$890-$$0$$i139$i|0;$895=$893<<$894;$896=$ptr$01$i138$i>>3;$897=((($gfc+39840|0)+($898*48|0)|0)+8|0)+$896|0;$899=HEAP8[$897>>0]|0;$900=$899&255;$901=$895|$900;$902=$901&255;HEAP8[$897>>0]=$902;$903=$$0$$i139$i+$ptr$01$i138$i|0;$904=($892|0)>0;$$pre$i141$i=HEAP32[$17>>2]|0;if($904){$$02$i137$i=$892;$898=$$pre$i141$i;$ptr$01$i138$i=$903}else{$$lcssa438=$903;$$pre$i141$i$lcssa=$$pre$i141$i;break}}$905=(($gfc+39840|0)+($$pre$i141$i$lcssa*48|0)|0)+4|0;HEAP32[$905>>2]=$$lcssa438;$906=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4788|0;$907=HEAP32[$906>>2]|0;$908=($907|0)==0;if($908){$$02$i65$i=1;$ptr$01$i66$i=$$lcssa438;while(1){$1062=$ptr$01$i66$i&7;$1063=8-$1062|0;$1064=($$02$i65$i|0)<($1063|0);$$0$$i67$i=$1064?$$02$i65$i:$1063;$1065=$$02$i65$i-$$0$$i67$i|0;$1066=$$0$$i67$i+$ptr$01$i66$i|0;$1067=($1065|0)>0;if($1067){$$02$i65$i=$1065;$ptr$01$i66$i=$1066}else{$$lcssa447=$1066;break}}HEAP32[$905>>2]=$$lcssa447;$1068=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4796|0;$1069=HEAP32[$1068>>2]|0;$1070=($1069|0)==14;if($1070){HEAP32[$1068>>2]=16;$$pre710$i=HEAP32[$17>>2]|0;$$phi$trans$insert711$i=(($gfc+39840|0)+($$pre710$i*48|0)|0)+4|0;$$pre712$i=HEAP32[$$phi$trans$insert711$i>>2]|0;$1076=16;$1817=$$pre712$i;$1818=$$pre710$i}else{$1076=$1069;$1817=$$lcssa447;$1818=$$pre$i141$i$lcssa}$$02$i57$i=5;$1081=$1818;$ptr$01$i58$i=$1817;while(1){$1071=$ptr$01$i58$i&7;$1072=8-$1071|0;$1073=($$02$i57$i|0)<($1072|0);$$0$$i59$i=$1073?$$02$i57$i:$1072;$1074=$$02$i57$i-$$0$$i59$i|0;$1075=$1076>>$1074;$1077=$1072-$$0$$i59$i|0;$1078=$1075<<$1077;$1079=$ptr$01$i58$i>>3;$1080=((($gfc+39840|0)+($1081*48|0)|0)+8|0)+$1079|0;$1082=HEAP8[$1080>>0]|0;$1083=$1082&255;$1084=$1078|$1083;$1085=$1084&255;HEAP8[$1080>>0]=$1085;$1086=$$0$$i59$i+$ptr$01$i58$i|0;$1087=($1074|0)>0;$$pre$i61$i=HEAP32[$17>>2]|0;if($1087){$$02$i57$i=$1074;$1081=$$pre$i61$i;$ptr$01$i58$i=$1086}else{$$lcssa448=$1086;$$pre$i61$i$lcssa=$$pre$i61$i;break}}$1088=(($gfc+39840|0)+($$pre$i61$i$lcssa*48|0)|0)+4|0;HEAP32[$1088>>2]=$$lcssa448;$1089=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4800|0;$1090=HEAP32[$1089>>2]|0;$1091=($1090|0)==14;if($1091){HEAP32[$1089>>2]=16;$$pre713$i=HEAP32[$17>>2]|0;$$phi$trans$insert714$i=(($gfc+39840|0)+($$pre713$i*48|0)|0)+4|0;$$pre715$i=HEAP32[$$phi$trans$insert714$i>>2]|0;$1097=16;$1819=$$pre715$i;$1820=$$pre713$i}else{$1097=$1090;$1819=$$lcssa448;$1820=$$pre$i61$i$lcssa}$$02$i49$i=5;$1102=$1820;$ptr$01$i50$i=$1819;while(1){$1092=$ptr$01$i50$i&7;$1093=8-$1092|0;$1094=($$02$i49$i|0)<($1093|0);$$0$$i51$i=$1094?$$02$i49$i:$1093;$1095=$$02$i49$i-$$0$$i51$i|0;$1096=$1097>>$1095;$1098=$1093-$$0$$i51$i|0;$1099=$1096<<$1098;$1100=$ptr$01$i50$i>>3;$1101=((($gfc+39840|0)+($1102*48|0)|0)+8|0)+$1100|0;$1103=HEAP8[$1101>>0]|0;$1104=$1103&255;$1105=$1099|$1104;$1106=$1105&255;HEAP8[$1101>>0]=$1106;$1107=$$0$$i51$i+$ptr$01$i50$i|0;$1108=($1095|0)>0;$$pre$i53$i=HEAP32[$17>>2]|0;if($1108){$$02$i49$i=$1095;$1102=$$pre$i53$i;$ptr$01$i50$i=$1107}else{$$lcssa449=$1107;$$pre$i53$i$lcssa=$$pre$i53$i;break}}$1109=(($gfc+39840|0)+($$pre$i53$i$lcssa*48|0)|0)+4|0;HEAP32[$1109>>2]=$$lcssa449;$1110=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4804|0;$1111=HEAP32[$1110>>2]|0;$1112=($1111|0)==14;if($1112){HEAP32[$1110>>2]=16;$$pre716$i=HEAP32[$17>>2]|0;$$phi$trans$insert717$i=(($gfc+39840|0)+($$pre716$i*48|0)|0)+4|0;$$pre718$i=HEAP32[$$phi$trans$insert717$i>>2]|0;$1118=16;$1821=$$pre718$i;$1822=$$pre716$i}else{$1118=$1111;$1821=$$lcssa449;$1822=$$pre$i53$i$lcssa}$$02$i41$i=5;$1123=$1822;$ptr$01$i42$i=$1821;while(1){$1113=$ptr$01$i42$i&7;$1114=8-$1113|0;$1115=($$02$i41$i|0)<($1114|0);$$0$$i43$i=$1115?$$02$i41$i:$1114;$1116=$$02$i41$i-$$0$$i43$i|0;$1117=$1118>>$1116;$1119=$1114-$$0$$i43$i|0;$1120=$1117<<$1119;$1121=$ptr$01$i42$i>>3;$1122=((($gfc+39840|0)+($1123*48|0)|0)+8|0)+$1121|0;$1124=HEAP8[$1122>>0]|0;$1125=$1124&255;$1126=$1120|$1125;$1127=$1126&255;HEAP8[$1122>>0]=$1127;$1128=$$0$$i43$i+$ptr$01$i42$i|0;$1129=($1116|0)>0;$$pre$i45$i=HEAP32[$17>>2]|0;if($1129){$$02$i41$i=$1116;$1123=$$pre$i45$i;$ptr$01$i42$i=$1128}else{$$lcssa450=$1128;$$pre$i45$i$lcssa=$$pre$i45$i;break}}$1130=(($gfc+39840|0)+($$pre$i45$i$lcssa*48|0)|0)+4|0;HEAP32[$1130>>2]=$$lcssa450;$1131=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4824|0;$1132=HEAP32[$1131>>2]|0;$$02$i33$i=4;$1142=$$pre$i45$i$lcssa;$ptr$01$i34$i=$$lcssa450;while(1){$1133=$ptr$01$i34$i&7;$1134=8-$1133|0;$1135=($$02$i33$i|0)<($1134|0);$$0$$i35$i=$1135?$$02$i33$i:$1134;$1136=$$02$i33$i-$$0$$i35$i|0;$1137=$1132>>$1136;$1138=$1134-$$0$$i35$i|0;$1139=$1137<<$1138;$1140=$ptr$01$i34$i>>3;$1141=((($gfc+39840|0)+($1142*48|0)|0)+8|0)+$1140|0;$1143=HEAP8[$1141>>0]|0;$1144=$1143&255;$1145=$1139|$1144;$1146=$1145&255;HEAP8[$1141>>0]=$1146;$1147=$$0$$i35$i+$ptr$01$i34$i|0;$1148=($1136|0)>0;$$pre$i37$i=HEAP32[$17>>2]|0;if($1148){$$02$i33$i=$1136;$1142=$$pre$i37$i;$ptr$01$i34$i=$1147}else{$$lcssa451=$1147;$$pre$i37$i$lcssa=$$pre$i37$i;break}}$1149=(($gfc+39840|0)+($$pre$i37$i$lcssa*48|0)|0)+4|0;HEAP32[$1149>>2]=$$lcssa451;$1150=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4828|0;$1151=HEAP32[$1150>>2]|0;$$02$i25$i=3;$1161=$$pre$i37$i$lcssa;$ptr$01$i26$i=$$lcssa451;while(1){$1152=$ptr$01$i26$i&7;$1153=8-$1152|0;$1154=($$02$i25$i|0)<($1153|0);$$0$$i27$i=$1154?$$02$i25$i:$1153;$1155=$$02$i25$i-$$0$$i27$i|0;$1156=$1151>>$1155;$1157=$1153-$$0$$i27$i|0;$1158=$1156<<$1157;$1159=$ptr$01$i26$i>>3;$1160=((($gfc+39840|0)+($1161*48|0)|0)+8|0)+$1159|0;$1162=HEAP8[$1160>>0]|0;$1163=$1162&255;$1164=$1158|$1163;$1165=$1164&255;HEAP8[$1160>>0]=$1165;$1166=$$0$$i27$i+$ptr$01$i26$i|0;$1167=($1155|0)>0;$$pre$i29$i=HEAP32[$17>>2]|0;if($1167){$$02$i25$i=$1155;$1161=$$pre$i29$i;$ptr$01$i26$i=$1166}else{$$lcssa452=$1166;$$pre$i29$i$lcssa=$$pre$i29$i;break}}$1168=(($gfc+39840|0)+($$pre$i29$i$lcssa*48|0)|0)+4|0;HEAP32[$1168>>2]=$$lcssa452;$1815=$$lcssa452;$1816=$$pre$i29$i$lcssa}else{$$02$i129$i=1;$918=$$pre$i141$i$lcssa;$ptr$01$i130$i=$$lcssa438;while(1){$909=$ptr$01$i130$i&7;$910=8-$909|0;$911=($$02$i129$i|0)<($910|0);$$0$$i131$i=$911?$$02$i129$i:$910;$912=$$02$i129$i-$$0$$i131$i|0;$913=1>>>$912;$914=$910-$$0$$i131$i|0;$915=$913<<$914;$916=$ptr$01$i130$i>>3;$917=((($gfc+39840|0)+($918*48|0)|0)+8|0)+$916|0;$919=HEAP8[$917>>0]|0;$920=$919&255;$921=$915|$920;$922=$921&255;HEAP8[$917>>0]=$922;$923=$$0$$i131$i+$ptr$01$i130$i|0;$924=($912|0)>0;$$pre$i133$i=HEAP32[$17>>2]|0;if($924){$$02$i129$i=$912;$918=$$pre$i133$i;$ptr$01$i130$i=$923}else{$$lcssa439=$923;$$pre$i133$i$lcssa=$$pre$i133$i;break}}$925=(($gfc+39840|0)+($$pre$i133$i$lcssa*48|0)|0)+4|0;HEAP32[$925>>2]=$$lcssa439;$926=HEAP32[$906>>2]|0;$$02$i121$i=2;$936=$$pre$i133$i$lcssa;$ptr$01$i122$i=$$lcssa439;while(1){$927=$ptr$01$i122$i&7;$928=8-$927|0;$929=($$02$i121$i|0)<($928|0);$$0$$i123$i=$929?$$02$i121$i:$928;$930=$$02$i121$i-$$0$$i123$i|0;$931=$926>>$930;$932=$928-$$0$$i123$i|0;$933=$931<<$932;$934=$ptr$01$i122$i>>3;$935=((($gfc+39840|0)+($936*48|0)|0)+8|0)+$934|0;$937=HEAP8[$935>>0]|0;$938=$937&255;$939=$933|$938;$940=$939&255;HEAP8[$935>>0]=$940;$941=$$0$$i123$i+$ptr$01$i122$i|0;$942=($930|0)>0;$$pre$i125$i=HEAP32[$17>>2]|0;if($942){$$02$i121$i=$930;$936=$$pre$i125$i;$ptr$01$i122$i=$941}else{$$lcssa440=$941;$$pre$i125$i$lcssa=$$pre$i125$i;break}}$943=(($gfc+39840|0)+($$pre$i125$i$lcssa*48|0)|0)+4|0;HEAP32[$943>>2]=$$lcssa440;$944=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4792|0;$945=HEAP32[$944>>2]|0;$$02$i113$i=1;$955=$$pre$i125$i$lcssa;$ptr$01$i114$i=$$lcssa440;while(1){$946=$ptr$01$i114$i&7;$947=8-$946|0;$948=($$02$i113$i|0)<($947|0);$$0$$i115$i=$948?$$02$i113$i:$947;$949=$$02$i113$i-$$0$$i115$i|0;$950=$945>>$949;$951=$947-$$0$$i115$i|0;$952=$950<<$951;$953=$ptr$01$i114$i>>3;$954=((($gfc+39840|0)+($955*48|0)|0)+8|0)+$953|0;$956=HEAP8[$954>>0]|0;$957=$956&255;$958=$952|$957;$959=$958&255;HEAP8[$954>>0]=$959;$960=$$0$$i115$i+$ptr$01$i114$i|0;$961=($949|0)>0;$$pre$i117$i=HEAP32[$17>>2]|0;if($961){$$02$i113$i=$949;$955=$$pre$i117$i;$ptr$01$i114$i=$960}else{$$lcssa441=$960;$$pre$i117$i$lcssa=$$pre$i117$i;break}}$962=(($gfc+39840|0)+($$pre$i117$i$lcssa*48|0)|0)+4|0;HEAP32[$962>>2]=$$lcssa441;$963=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4796|0;$964=HEAP32[$963>>2]|0;$965=($964|0)==14;if($965){HEAP32[$963>>2]=16;$$pre704$i=HEAP32[$17>>2]|0;$$phi$trans$insert705$i=(($gfc+39840|0)+($$pre704$i*48|0)|0)+4|0;$$pre706$i=HEAP32[$$phi$trans$insert705$i>>2]|0;$1811=$$pre706$i;$1812=$$pre704$i;$971=16}else{$1811=$$lcssa441;$1812=$$pre$i117$i$lcssa;$971=$964}$$02$i105$i=5;$976=$1812;$ptr$01$i106$i=$1811;while(1){$966=$ptr$01$i106$i&7;$967=8-$966|0;$968=($$02$i105$i|0)<($967|0);$$0$$i107$i=$968?$$02$i105$i:$967;$969=$$02$i105$i-$$0$$i107$i|0;$970=$971>>$969;$972=$967-$$0$$i107$i|0;$973=$970<<$972;$974=$ptr$01$i106$i>>3;$975=((($gfc+39840|0)+($976*48|0)|0)+8|0)+$974|0;$977=HEAP8[$975>>0]|0;$978=$977&255;$979=$973|$978;$980=$979&255;HEAP8[$975>>0]=$980;$981=$$0$$i107$i+$ptr$01$i106$i|0;$982=($969|0)>0;$$pre$i109$i=HEAP32[$17>>2]|0;if($982){$$02$i105$i=$969;$976=$$pre$i109$i;$ptr$01$i106$i=$981}else{$$lcssa442=$981;$$pre$i109$i$lcssa=$$pre$i109$i;break}}$983=(($gfc+39840|0)+($$pre$i109$i$lcssa*48|0)|0)+4|0;HEAP32[$983>>2]=$$lcssa442;$984=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4800|0;$985=HEAP32[$984>>2]|0;$986=($985|0)==14;if($986){HEAP32[$984>>2]=16;$$pre707$i=HEAP32[$17>>2]|0;$$phi$trans$insert708$i=(($gfc+39840|0)+($$pre707$i*48|0)|0)+4|0;$$pre709$i=HEAP32[$$phi$trans$insert708$i>>2]|0;$1813=$$pre709$i;$1814=$$pre707$i;$992=16}else{$1813=$$lcssa442;$1814=$$pre$i109$i$lcssa;$992=$985}$$02$i97$i=5;$997=$1814;$ptr$01$i98$i=$1813;while(1){$987=$ptr$01$i98$i&7;$988=8-$987|0;$989=($$02$i97$i|0)<($988|0);$$0$$i99$i=$989?$$02$i97$i:$988;$990=$$02$i97$i-$$0$$i99$i|0;$991=$992>>$990;$993=$988-$$0$$i99$i|0;$994=$991<<$993;$995=$ptr$01$i98$i>>3;$996=((($gfc+39840|0)+($997*48|0)|0)+8|0)+$995|0;$998=HEAP8[$996>>0]|0;$999=$998&255;$1000=$994|$999;$1001=$1000&255;HEAP8[$996>>0]=$1001;$1002=$$0$$i99$i+$ptr$01$i98$i|0;$1003=($990|0)>0;$$pre$i101$i=HEAP32[$17>>2]|0;if($1003){$$02$i97$i=$990;$997=$$pre$i101$i;$ptr$01$i98$i=$1002}else{$$lcssa443=$1002;$$pre$i101$i$lcssa=$$pre$i101$i;break}}$1004=(($gfc+39840|0)+($$pre$i101$i$lcssa*48|0)|0)+4|0;HEAP32[$1004>>2]=$$lcssa443;$1005=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4808|0;$1006=HEAP32[$1005>>2]|0;$$02$i89$i=3;$1016=$$pre$i101$i$lcssa;$ptr$01$i90$i=$$lcssa443;while(1){$1007=$ptr$01$i90$i&7;$1008=8-$1007|0;$1009=($$02$i89$i|0)<($1008|0);$$0$$i91$i=$1009?$$02$i89$i:$1008;$1010=$$02$i89$i-$$0$$i91$i|0;$1011=$1006>>$1010;$1012=$1008-$$0$$i91$i|0;$1013=$1011<<$1012;$1014=$ptr$01$i90$i>>3;$1015=((($gfc+39840|0)+($1016*48|0)|0)+8|0)+$1014|0;$1017=HEAP8[$1015>>0]|0;$1018=$1017&255;$1019=$1013|$1018;$1020=$1019&255;HEAP8[$1015>>0]=$1020;$1021=$$0$$i91$i+$ptr$01$i90$i|0;$1022=($1010|0)>0;$$pre$i93$i=HEAP32[$17>>2]|0;if($1022){$$02$i89$i=$1010;$1016=$$pre$i93$i;$ptr$01$i90$i=$1021}else{$$lcssa444=$1021;$$pre$i93$i$lcssa=$$pre$i93$i;break}}$1023=(($gfc+39840|0)+($$pre$i93$i$lcssa*48|0)|0)+4|0;HEAP32[$1023>>2]=$$lcssa444;$1024=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4812|0;$1025=HEAP32[$1024>>2]|0;$$02$i81$i=3;$1035=$$pre$i93$i$lcssa;$ptr$01$i82$i=$$lcssa444;while(1){$1026=$ptr$01$i82$i&7;$1027=8-$1026|0;$1028=($$02$i81$i|0)<($1027|0);$$0$$i83$i=$1028?$$02$i81$i:$1027;$1029=$$02$i81$i-$$0$$i83$i|0;$1030=$1025>>$1029;$1031=$1027-$$0$$i83$i|0;$1032=$1030<<$1031;$1033=$ptr$01$i82$i>>3;$1034=((($gfc+39840|0)+($1035*48|0)|0)+8|0)+$1033|0;$1036=HEAP8[$1034>>0]|0;$1037=$1036&255;$1038=$1032|$1037;$1039=$1038&255;HEAP8[$1034>>0]=$1039;$1040=$$0$$i83$i+$ptr$01$i82$i|0;$1041=($1029|0)>0;$$pre$i85$i=HEAP32[$17>>2]|0;if($1041){$$02$i81$i=$1029;$1035=$$pre$i85$i;$ptr$01$i82$i=$1040}else{$$lcssa445=$1040;$$pre$i85$i$lcssa=$$pre$i85$i;break}}$1042=(($gfc+39840|0)+($$pre$i85$i$lcssa*48|0)|0)+4|0;HEAP32[$1042>>2]=$$lcssa445;$1043=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4816|0;$1044=HEAP32[$1043>>2]|0;$$02$i73$i=3;$1054=$$pre$i85$i$lcssa;$ptr$01$i74$i=$$lcssa445;while(1){$1045=$ptr$01$i74$i&7;$1046=8-$1045|0;$1047=($$02$i73$i|0)<($1046|0);$$0$$i75$i=$1047?$$02$i73$i:$1046;$1048=$$02$i73$i-$$0$$i75$i|0;$1049=$1044>>$1048;$1050=$1046-$$0$$i75$i|0;$1051=$1049<<$1050;$1052=$ptr$01$i74$i>>3;$1053=((($gfc+39840|0)+($1054*48|0)|0)+8|0)+$1052|0;$1055=HEAP8[$1053>>0]|0;$1056=$1055&255;$1057=$1051|$1056;$1058=$1057&255;HEAP8[$1053>>0]=$1058;$1059=$$0$$i75$i+$ptr$01$i74$i|0;$1060=($1048|0)>0;$$pre$i77$i=HEAP32[$17>>2]|0;if($1060){$$02$i73$i=$1048;$1054=$$pre$i77$i;$ptr$01$i74$i=$1059}else{$$lcssa446=$1059;$$pre$i77$i$lcssa=$$pre$i77$i;break}}$1061=(($gfc+39840|0)+($$pre$i77$i$lcssa*48|0)|0)+4|0;HEAP32[$1061>>2]=$$lcssa446;$1815=$$lcssa446;$1816=$$pre$i77$i$lcssa}$1169=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4836|0;$1170=HEAP32[$1169>>2]|0;$$02$i17$i=1;$1180=$1816;$ptr$01$i18$i=$1815;while(1){$1171=$ptr$01$i18$i&7;$1172=8-$1171|0;$1173=($$02$i17$i|0)<($1172|0);$$0$$i19$i=$1173?$$02$i17$i:$1172;$1174=$$02$i17$i-$$0$$i19$i|0;$1175=$1170>>$1174;$1176=$1172-$$0$$i19$i|0;$1177=$1175<<$1176;$1178=$ptr$01$i18$i>>3;$1179=((($gfc+39840|0)+($1180*48|0)|0)+8|0)+$1178|0;$1181=HEAP8[$1179>>0]|0;$1182=$1181&255;$1183=$1177|$1182;$1184=$1183&255;HEAP8[$1179>>0]=$1184;$1185=$$0$$i19$i+$ptr$01$i18$i|0;$1186=($1174|0)>0;$$pre$i21$i=HEAP32[$17>>2]|0;if($1186){$$02$i17$i=$1174;$1180=$$pre$i21$i;$ptr$01$i18$i=$1185}else{$$lcssa453=$1185;$$pre$i21$i$lcssa=$$pre$i21$i;break}}$1187=(($gfc+39840|0)+($$pre$i21$i$lcssa*48|0)|0)+4|0;HEAP32[$1187>>2]=$$lcssa453;$1188=(($gfc+304|0)+($ch$2638$i*5252|0)|0)+4840|0;$1189=HEAP32[$1188>>2]|0;$$02$i9$i=1;$1199=$$pre$i21$i$lcssa;$ptr$01$i10$i=$$lcssa453;while(1){$1190=$ptr$01$i10$i&7;$1191=8-$1190|0;$1192=($$02$i9$i|0)<($1191|0);$$0$$i11$i=$1192?$$02$i9$i:$1191;$1193=$$02$i9$i-$$0$$i11$i|0;$1194=$1189>>$1193;$1195=$1191-$$0$$i11$i|0;$1196=$1194<<$1195;$1197=$ptr$01$i10$i>>3;$1198=((($gfc+39840|0)+($1199*48|0)|0)+8|0)+$1197|0;$1200=HEAP8[$1198>>0]|0;$1201=$1200&255;$1202=$1196|$1201;$1203=$1202&255;HEAP8[$1198>>0]=$1203;$1204=$$0$$i11$i+$ptr$01$i10$i|0;$1205=($1193|0)>0;$$pre$i13$i=HEAP32[$17>>2]|0;if($1205){$$02$i9$i=$1193;$1199=$$pre$i13$i;$ptr$01$i10$i=$1204}else{$$lcssa454=$1204;$$pre$i13$i$lcssa=$$pre$i13$i;break}}$1206=(($gfc+39840|0)+($$pre$i13$i$lcssa*48|0)|0)+4|0;HEAP32[$1206>>2]=$$lcssa454;$1207=$ch$2638$i+1|0;$1208=HEAP32[$805>>2]|0;$1209=($1207|0)<($1208|0);if($1209){$1809=$$lcssa454;$1810=$$pre$i13$i$lcssa;$ch$2638$i=$1207}else{$1213=$$pre$i13$i$lcssa;break}}}else{$1213=$$pre$i173$i$lcssa}}}while(0);$1210=HEAP32[$98>>2]|0;$1211=($1210|0)==0;if($1211){$1215=$1213}else{$1212=(($gfc+39840|0)+($1213*48|0)|0)+8|0;_CRC_writeheader($gfc,$1212);$$pre734$i=HEAP32[$17>>2]|0;$1215=$$pre734$i}$1214=$1215+1|0;$1216=$1214&255;HEAP32[$17>>2]=$1216;$1217=($gfc+39840|0)+($1215*48|0)|0;$1218=HEAP32[$1217>>2]|0;$1219=$1218+$14|0;$1220=($gfc+39840|0)+($1216*48|0)|0;HEAP32[$1220>>2]=$1219;$1221=HEAP32[$17>>2]|0;$1222=$gfc+52132|0;$1223=HEAP32[$1222>>2]|0;$1224=($1221|0)==($1223|0);if($1224){_lame_errorf($gfc,1112,$vararg_buffer)}$1283=HEAP32[$21>>2]|0;$1284=$1283<<3;$1285=HEAP32[$62>>2]|0;$1286=($1285|0)==1;$1287=$gfc+72|0;do{if($1286){$1295=$gfc+300|0;$1296=$gfc+296|0;$1297=$gfc+292|0;$1298=$gfc+284|0;$1299=$gfc+21464|0;$$pre$i1=HEAP32[$1287>>2]|0;$1300=$$pre$i1;$gr$054$i=0;$tot_bits$053$i=0;while(1){$1301=($1300|0)>0;if($1301){$ch$047$i=0;$tot_bits$146$i=$tot_bits$053$i;while(1){$1302=(($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0;$1303=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4784|0;$1304=HEAP32[$1303>>2]|0;$1305=88648+($1304<<2)|0;$1306=HEAP32[$1305>>2]|0;$1307=88712+($1304<<2)|0;$1308=HEAP32[$1307>>2]|0;$1309=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4868|0;$1310=HEAP32[$1309>>2]|0;$1311=($1310|0)>0;L269:do{if($1311){$1312=($1306|0)>0;if($1312){$1824=$1310;$data_bits$039$us$i=0;$sfb$040$us$i=0}else{$data_bits$039$i=0;$sfb$040$i=0;while(1){$1365=(((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4608|0)+($sfb$040$i<<2)|0;$1366=HEAP32[$1365>>2]|0;$1367=($1366|0)==-1;$1368=$1367?0:$1306;$data_bits$039$$i=$1368+$data_bits$039$i|0;$1369=$sfb$040$i+1|0;$exitcond166=($1369|0)==($1310|0);if($exitcond166){$data_bits$0$lcssa$i=$data_bits$039$$i;$sfb$0$lcssa$i=$1310;break L269}else{$data_bits$039$i=$data_bits$039$$i;$sfb$040$i=$1369}}}while(1){$1313=(((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4608|0)+($sfb$040$us$i<<2)|0;$1314=HEAP32[$1313>>2]|0;$1315=($1314|0)==-1;if($1315){$1360=$1824;$data_bits$1$us$i=$data_bits$039$us$i}else{$$01$i$us$i=$1306;while(1){$1316=HEAP32[$1295>>2]|0;$1317=($1316|0)==0;if($1317){HEAP32[$1295>>2]=8;$1318=HEAP32[$1296>>2]|0;$1319=$1318+1|0;HEAP32[$1296>>2]=$1319;$1320=HEAP32[$1222>>2]|0;$1321=($gfc+39840|0)+($1320*48|0)|0;$1322=HEAP32[$1321>>2]|0;$1323=HEAP32[$1297>>2]|0;$1324=($1322|0)==($1323|0);if($1324){$1325=HEAP32[$1298>>2]|0;$1326=$1325+$1319|0;$1327=(($gfc+39840|0)+($1320*48|0)|0)+8|0;$1328=HEAP32[$21>>2]|0;_memcpy($1326|0,$1327|0,$1328|0)|0;$1329=HEAP32[$21>>2]|0;$1330=HEAP32[$1296>>2]|0;$1331=$1330+$1329|0;HEAP32[$1296>>2]=$1331;$1332=$1329<<3;$1333=HEAP32[$1297>>2]|0;$1334=$1333+$1332|0;HEAP32[$1297>>2]=$1334;$1335=HEAP32[$1222>>2]|0;$1336=$1335+1|0;$1337=$1336&255;HEAP32[$1222>>2]=$1337;$1340=$1331}else{$1340=$1319}$1338=HEAP32[$1298>>2]|0;$1339=$1338+$1340|0;HEAP8[$1339>>0]=0;$$pre$i$us$i=HEAP32[$1295>>2]|0;$1342=$$pre$i$us$i}else{$1342=$1316}$1341=($$01$i$us$i|0)<($1342|0);$$0$$i$us$i=$1341?$$01$i$us$i:$1342;$1343=$$01$i$us$i-$$0$$i$us$i|0;$1344=$1342-$$0$$i$us$i|0;HEAP32[$1295>>2]=$1344;$1345=$1314>>$1343;$1346=$1345<<$1344;$1347=HEAP32[$1296>>2]|0;$1348=HEAP32[$1298>>2]|0;$1349=$1348+$1347|0;$1350=HEAP8[$1349>>0]|0;$1351=$1350&255;$1352=$1346|$1351;$1353=$1352&255;HEAP8[$1349>>0]=$1353;$1354=HEAP32[$1297>>2]|0;$1355=$1354+$$0$$i$us$i|0;HEAP32[$1297>>2]=$1355;$1356=($1343|0)>0;if($1356){$$01$i$us$i=$1343}else{break}}$$pre96$pre$i=HEAP32[$1309>>2]|0;$1357=$data_bits$039$us$i+$1306|0;$1360=$$pre96$pre$i;$data_bits$1$us$i=$1357}$1358=$sfb$040$us$i+1|0;$1359=($1358|0)<($1360|0);if($1359){$1824=$1360;$data_bits$039$us$i=$data_bits$1$us$i;$sfb$040$us$i=$1358}else{$data_bits$0$lcssa$i=$data_bits$1$us$i;$sfb$0$lcssa$i=$1358;break}}}else{$data_bits$0$lcssa$i=0;$sfb$0$lcssa$i=0}}while(0);$1361=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4860|0;$1362=HEAP32[$1361>>2]|0;$1363=($sfb$0$lcssa$i|0)<($1362|0);if($1363){$1364=($1308|0)>0;$1825=$1362;$data_bits$242$i=$data_bits$0$lcssa$i;$sfb$143$i=$sfb$0$lcssa$i;while(1){$1370=(((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4608|0)+($sfb$143$i<<2)|0;$1371=HEAP32[$1370>>2]|0;$1372=($1371|0)==-1;if($1372){$1417=$1825;$data_bits$3$i=$data_bits$242$i}else{if($1364){$$01$i4$i=$1308;while(1){$1373=HEAP32[$1295>>2]|0;$1374=($1373|0)==0;if($1374){HEAP32[$1295>>2]=8;$1375=HEAP32[$1296>>2]|0;$1376=$1375+1|0;HEAP32[$1296>>2]=$1376;$1377=HEAP32[$1222>>2]|0;$1378=($gfc+39840|0)+($1377*48|0)|0;$1379=HEAP32[$1378>>2]|0;$1380=HEAP32[$1297>>2]|0;$1381=($1379|0)==($1380|0);if($1381){$1382=HEAP32[$1298>>2]|0;$1383=$1382+$1376|0;$1384=(($gfc+39840|0)+($1377*48|0)|0)+8|0;$1385=HEAP32[$21>>2]|0;_memcpy($1383|0,$1384|0,$1385|0)|0;$1386=HEAP32[$21>>2]|0;$1387=HEAP32[$1296>>2]|0;$1388=$1387+$1386|0;HEAP32[$1296>>2]=$1388;$1389=$1386<<3;$1390=HEAP32[$1297>>2]|0;$1391=$1390+$1389|0;HEAP32[$1297>>2]=$1391;$1392=HEAP32[$1222>>2]|0;$1393=$1392+1|0;$1394=$1393&255;HEAP32[$1222>>2]=$1394;$1397=$1388}else{$1397=$1376}$1395=HEAP32[$1298>>2]|0;$1396=$1395+$1397|0;HEAP8[$1396>>0]=0;$$pre$i5$i4=HEAP32[$1295>>2]|0;$1399=$$pre$i5$i4}else{$1399=$1373}$1398=($$01$i4$i|0)<($1399|0);$$0$$i6$i=$1398?$$01$i4$i:$1399;$1400=$$01$i4$i-$$0$$i6$i|0;$1401=$1399-$$0$$i6$i|0;HEAP32[$1295>>2]=$1401;$1402=$1371>>$1400;$1403=$1402<<$1401;$1404=HEAP32[$1296>>2]|0;$1405=HEAP32[$1298>>2]|0;$1406=$1405+$1404|0;$1407=HEAP8[$1406>>0]|0;$1408=$1407&255;$1409=$1403|$1408;$1410=$1409&255;HEAP8[$1406>>0]=$1410;$1411=HEAP32[$1297>>2]|0;$1412=$1411+$$0$$i6$i|0;HEAP32[$1297>>2]=$1412;$1413=($1400|0)>0;if($1413){$$01$i4$i=$1400}else{break}}$$pre97$pre$i=HEAP32[$1361>>2]|0;$$pre97$i=$$pre97$pre$i}else{$$pre97$i=$1825}$1414=$data_bits$242$i+$1308|0;$1417=$$pre97$i;$data_bits$3$i=$1414}$1415=$sfb$143$i+1|0;$1416=($1415|0)<($1417|0);if($1416){$1825=$1417;$data_bits$242$i=$data_bits$3$i;$sfb$143$i=$1415}else{$data_bits$2$lcssa$i=$data_bits$3$i;break}}}else{$data_bits$2$lcssa$i=$data_bits$0$lcssa$i}$1418=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4788|0;$1419=HEAP32[$1418>>2]|0;$1420=($1419|0)==2;if($1420){$1421=HEAP32[$1299>>2]|0;$1422=$1421*3|0;$1423=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4772|0;$1424=HEAP32[$1423>>2]|0;$1425=($1422|0)>($1424|0);$$$i8$i=$1425?$1424:$1422;$1426=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4796|0;$1427=HEAP32[$1426>>2]|0;$1428=_Huffmancode($gfc,$1427,0,$$$i8$i,$1302)|0;$1429=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4800|0;$1430=HEAP32[$1429>>2]|0;$1431=HEAP32[$1423>>2]|0;$1432=_Huffmancode($gfc,$1430,$$$i8$i,$1431,$1302)|0;$1433=$1432+$1428|0;$$pn$i=$1433}else{$1434=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4772|0;$1435=HEAP32[$1434>>2]|0;$1436=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4824|0;$1437=HEAP32[$1436>>2]|0;$1438=$1437+1|0;$1439=($gfc+21360|0)+($1438<<2)|0;$1440=HEAP32[$1439>>2]|0;$1441=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4828|0;$1442=HEAP32[$1441>>2]|0;$1443=$1437+2|0;$1444=$1443+$1442|0;$1445=($gfc+21360|0)+($1444<<2)|0;$1446=HEAP32[$1445>>2]|0;$1447=($1440|0)>($1435|0);$$$i9$i=$1447?$1435:$1440;$1448=($1446|0)>($1435|0);$region2Start$0$i10$i=$1448?$1435:$1446;$1449=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4796|0;$1450=HEAP32[$1449>>2]|0;$1451=_Huffmancode($gfc,$1450,0,$$$i9$i,$1302)|0;$1452=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4800|0;$1453=HEAP32[$1452>>2]|0;$1454=_Huffmancode($gfc,$1453,$$$i9$i,$region2Start$0$i10$i,$1302)|0;$1455=$1454+$1451|0;$1456=((($gfc+304|0)+($gr$054$i*10504|0)|0)+($ch$047$i*5252|0)|0)+4804|0;$1457=HEAP32[$1456>>2]|0;$1458=_Huffmancode($gfc,$1457,$region2Start$0$i10$i,$1435,$1302)|0;$1459=$1455+$1458|0;$$pn$i=$1459}$1460=_huffman_coder_count1($gfc,$1302)|0;$data_bits$4$i=$data_bits$2$lcssa$i+$tot_bits$146$i|0;$1461=$data_bits$4$i+$$pn$i|0;$1462=$1461+$1460|0;$1463=$ch$047$i+1|0;$1464=HEAP32[$1287>>2]|0;$1465=($1463|0)<($1464|0);if($1465){$ch$047$i=$1463;$tot_bits$146$i=$1462}else{$1823=$1464;$tot_bits$1$lcssa$i=$1462;break}}}else{$1823=$1300;$tot_bits$1$lcssa$i=$tot_bits$053$i}$1466=$gr$054$i+1|0;$exitcond$i6=($1466|0)==2;if($exitcond$i6){$$pre$phiZ2D=$1297;$tot_bits$3$i=$tot_bits$1$lcssa$i;break}else{$1300=$1823;$gr$054$i=$1466;$tot_bits$053$i=$tot_bits$1$lcssa$i}}}else{$1288=HEAP32[$1287>>2]|0;$1289=($1288|0)>0;if(!$1289){$$pre167=$gfc+292|0;$$pre$phiZ2D=$$pre167;$tot_bits$3$i=0;break}$1290=$gfc+300|0;$1291=$gfc+296|0;$1292=$gfc+292|0;$1293=$gfc+284|0;$1294=$gfc+21464|0;$ch$179$i=0;$tot_bits$278$i=0;while(1){$1467=($gfc+304|0)+($ch$179$i*5252|0)|0;$1468=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4788|0;$1469=HEAP32[$1468>>2]|0;$1470=($1469|0)==2;$1471=(($gfc+304|0)+($ch$179$i*5252|0)|0)+5188|0;if($1470){$scale_bits$076$i=0;$sfb$277$i=0;$sfb_partition$075$i=0;while(1){$1472=HEAP32[$1471>>2]|0;$1473=$1472+($sfb_partition$075$i<<2)|0;$1474=HEAP32[$1473>>2]|0;$1475=($1474|0)/3&-1;$1476=((($gfc+304|0)+($ch$179$i*5252|0)|0)+5192|0)+($sfb_partition$075$i<<2)|0;$1477=HEAP32[$1476>>2]|0;$1478=($1474|0)>2;if($1478){$1479=($1477|0)>0;$1480=($1475|0)>1;$smax$i=$1480?$1475:1;$i$067$i=0;$sfb$369$i=$sfb$277$i;while(1){$1481=$sfb$369$i*3|0;$1482=((($gfc+304|0)+($ch$179$i*5252|0)|0)+4608|0)+($1481<<2)|0;$1483=HEAP32[$1482>>2]|0;$1484=($1483|0)>0;$$$i7=$1484?$1483:0;if($1479){$$01$i12$i=$1477;while(1){$1485=HEAP32[$1290>>2]|0;$1486=($1485|0)==0;if($1486){HEAP32[$1290>>2]=8;$1487=HEAP32[$1291>>2]|0;$1488=$1487+1|0;HEAP32[$1291>>2]=$1488;$1489=HEAP32[$1222>>2]|0;$1490=($gfc+39840|0)+($1489*48|0)|0;$1491=HEAP32[$1490>>2]|0;$1492=HEAP32[$1292>>2]|0;$1493=($1491|0)==($1492|0);if($1493){$1494=HEAP32[$1293>>2]|0;$1495=$1494+$1488|0;$1496=(($gfc+39840|0)+($1489*48|0)|0)+8|0;$1497=HEAP32[$21>>2]|0;_memcpy($1495|0,$1496|0,$1497|0)|0;$1498=HEAP32[$21>>2]|0;$1499=HEAP32[$1291>>2]|0;$1500=$1499+$1498|0;HEAP32[$1291>>2]=$1500;$1501=$1498<<3;$1502=HEAP32[$1292>>2]|0;$1503=$1502+$1501|0;HEAP32[$1292>>2]=$1503;$1504=HEAP32[$1222>>2]|0;$1505=$1504+1|0;$1506=$1505&255;HEAP32[$1222>>2]=$1506;$1509=$1500}else{$1509=$1488}$1507=HEAP32[$1293>>2]|0;$1508=$1507+$1509|0;HEAP8[$1508>>0]=0;$$pre$i13$i8=HEAP32[$1290>>2]|0;$1511=$$pre$i13$i8}else{$1511=$1485}$1510=($$01$i12$i|0)<($1511|0);$$0$$i14$i=$1510?$$01$i12$i:$1511;$1512=$$01$i12$i-$$0$$i14$i|0;$1513=$1511-$$0$$i14$i|0;HEAP32[$1290>>2]=$1513;$1514=$$$i7>>$1512;$1515=$1514<<$1513;$1516=HEAP32[$1291>>2]|0;$1517=HEAP32[$1293>>2]|0;$1518=$1517+$1516|0;$1519=HEAP8[$1518>>0]|0;$1520=$1519&255;$1521=$1515|$1520;$1522=$1521&255;HEAP8[$1518>>0]=$1522;$1523=HEAP32[$1292>>2]|0;$1524=$1523+$$0$$i14$i|0;HEAP32[$1292>>2]=$1524;$1525=($1512|0)>0;if($1525){$$01$i12$i=$1512}else{$$lcssa401=$1524;break}}$1526=$1481+1|0;$1527=((($gfc+304|0)+($ch$179$i*5252|0)|0)+4608|0)+($1526<<2)|0;$1528=HEAP32[$1527>>2]|0;$1529=($1528|0)>0;$1530=$1529?$1528:0;$$01$i17$i=$1477;$1539=$$lcssa401;while(1){$1531=HEAP32[$1290>>2]|0;$1532=($1531|0)==0;if($1532){HEAP32[$1290>>2]=8;$1533=HEAP32[$1291>>2]|0;$1534=$1533+1|0;HEAP32[$1291>>2]=$1534;$1535=HEAP32[$1222>>2]|0;$1536=($gfc+39840|0)+($1535*48|0)|0;$1537=HEAP32[$1536>>2]|0;$1538=($1537|0)==($1539|0);if($1538){$1540=HEAP32[$1293>>2]|0;$1541=$1540+$1534|0;$1542=(($gfc+39840|0)+($1535*48|0)|0)+8|0;$1543=HEAP32[$21>>2]|0;_memcpy($1541|0,$1542|0,$1543|0)|0;$1544=HEAP32[$21>>2]|0;$1545=HEAP32[$1291>>2]|0;$1546=$1545+$1544|0;HEAP32[$1291>>2]=$1546;$1547=$1544<<3;$1548=HEAP32[$1292>>2]|0;$1549=$1548+$1547|0;HEAP32[$1292>>2]=$1549;$1550=HEAP32[$1222>>2]|0;$1551=$1550+1|0;$1552=$1551&255;HEAP32[$1222>>2]=$1552;$1555=$1546}else{$1555=$1534}$1553=HEAP32[$1293>>2]|0;$1554=$1553+$1555|0;HEAP8[$1554>>0]=0;$$pre$i18$i=HEAP32[$1290>>2]|0;$1557=$$pre$i18$i}else{$1557=$1531}$1556=($$01$i17$i|0)<($1557|0);$$0$$i19$i9=$1556?$$01$i17$i:$1557;$1558=$$01$i17$i-$$0$$i19$i9|0;$1559=$1557-$$0$$i19$i9|0;HEAP32[$1290>>2]=$1559;$1560=$1530>>$1558;$1561=$1560<<$1559;$1562=HEAP32[$1291>>2]|0;$1563=HEAP32[$1293>>2]|0;$1564=$1563+$1562|0;$1565=HEAP8[$1564>>0]|0;$1566=$1565&255;$1567=$1561|$1566;$1568=$1567&255;HEAP8[$1564>>0]=$1568;$1569=HEAP32[$1292>>2]|0;$1570=$1569+$$0$$i19$i9|0;HEAP32[$1292>>2]=$1570;$1571=($1558|0)>0;if($1571){$$01$i17$i=$1558;$1539=$1570}else{$$lcssa402=$1570;break}}$1572=$1481+2|0;$1573=((($gfc+304|0)+($ch$179$i*5252|0)|0)+4608|0)+($1572<<2)|0;$1574=HEAP32[$1573>>2]|0;$1575=($1574|0)>0;$$1$i10=$1575?$1574:0;$$01$i22$i=$1477;$1584=$$lcssa402;while(1){$1576=HEAP32[$1290>>2]|0;$1577=($1576|0)==0;if($1577){HEAP32[$1290>>2]=8;$1578=HEAP32[$1291>>2]|0;$1579=$1578+1|0;HEAP32[$1291>>2]=$1579;$1580=HEAP32[$1222>>2]|0;$1581=($gfc+39840|0)+($1580*48|0)|0;$1582=HEAP32[$1581>>2]|0;$1583=($1582|0)==($1584|0);if($1583){$1585=HEAP32[$1293>>2]|0;$1586=$1585+$1579|0;$1587=(($gfc+39840|0)+($1580*48|0)|0)+8|0;$1588=HEAP32[$21>>2]|0;_memcpy($1586|0,$1587|0,$1588|0)|0;$1589=HEAP32[$21>>2]|0;$1590=HEAP32[$1291>>2]|0;$1591=$1590+$1589|0;HEAP32[$1291>>2]=$1591;$1592=$1589<<3;$1593=HEAP32[$1292>>2]|0;$1594=$1593+$1592|0;HEAP32[$1292>>2]=$1594;$1595=HEAP32[$1222>>2]|0;$1596=$1595+1|0;$1597=$1596&255;HEAP32[$1222>>2]=$1597;$1600=$1591}else{$1600=$1579}$1598=HEAP32[$1293>>2]|0;$1599=$1598+$1600|0;HEAP8[$1599>>0]=0;$$pre$i23$i=HEAP32[$1290>>2]|0;$1602=$$pre$i23$i}else{$1602=$1576}$1601=($$01$i22$i|0)<($1602|0);$$0$$i24$i=$1601?$$01$i22$i:$1602;$1603=$$01$i22$i-$$0$$i24$i|0;$1604=$1602-$$0$$i24$i|0;HEAP32[$1290>>2]=$1604;$1605=$$1$i10>>$1603;$1606=$1605<<$1604;$1607=HEAP32[$1291>>2]|0;$1608=HEAP32[$1293>>2]|0;$1609=$1608+$1607|0;$1610=HEAP8[$1609>>0]|0;$1611=$1610&255;$1612=$1606|$1611;$1613=$1612&255;HEAP8[$1609>>0]=$1613;$1614=HEAP32[$1292>>2]|0;$1615=$1614+$$0$$i24$i|0;HEAP32[$1292>>2]=$1615;$1616=($1603|0)>0;if($1616){$$01$i22$i=$1603;$1584=$1615}else{break}}}$1617=$i$067$i+1|0;$1618=$sfb$369$i+1|0;$1619=($1617|0)<($1475|0);if($1619){$i$067$i=$1617;$sfb$369$i=$1618}else{break}}$1620=$1477*3|0;$1621=Math_imul($1620,$smax$i)|0;$1622=$smax$i+$sfb$277$i|0;$1623=$1621+$scale_bits$076$i|0;$scale_bits$1$lcssa$i=$1623;$sfb$3$lcssa$i=$1622}else{$scale_bits$1$lcssa$i=$scale_bits$076$i;$sfb$3$lcssa$i=$sfb$277$i}$1624=$sfb_partition$075$i+1|0;$exitcond95$i=($1624|0)==4;if($exitcond95$i){$scale_bits$1$lcssa$i$lcssa=$scale_bits$1$lcssa$i;break}else{$scale_bits$076$i=$scale_bits$1$lcssa$i;$sfb$277$i=$sfb$3$lcssa$i;$sfb_partition$075$i=$1624}}$1625=HEAP32[$1294>>2]|0;$1626=$1625*3|0;$1627=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4772|0;$1628=HEAP32[$1627>>2]|0;$1629=($1626|0)>($1628|0);$$$i26$i=$1629?$1628:$1626;$1630=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4796|0;$1631=HEAP32[$1630>>2]|0;$1632=_Huffmancode($gfc,$1631,0,$$$i26$i,$1467)|0;$1633=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4800|0;$1634=HEAP32[$1633>>2]|0;$1635=HEAP32[$1627>>2]|0;$1636=_Huffmancode($gfc,$1634,$$$i26$i,$1635,$1467)|0;$1637=$1636+$1632|0;$data_bits$5$i=$1637;$scale_bits$4$i=$scale_bits$1$lcssa$i$lcssa}else{$scale_bits$265$i=0;$sfb$466$i=0;$sfb_partition$164$i=0;while(1){$1638=HEAP32[$1471>>2]|0;$1639=$1638+($sfb_partition$164$i<<2)|0;$1640=HEAP32[$1639>>2]|0;$1641=((($gfc+304|0)+($ch$179$i*5252|0)|0)+5192|0)+($sfb_partition$164$i<<2)|0;$1642=HEAP32[$1641>>2]|0;$1643=($1640|0)>0;if($1643){$1644=($1642|0)>0;if($1644){$i$156$us$i=0;$sfb$558$us$i=$sfb$466$i;while(1){$1645=((($gfc+304|0)+($ch$179$i*5252|0)|0)+4608|0)+($sfb$558$us$i<<2)|0;$1646=HEAP32[$1645>>2]|0;$1647=($1646|0)>0;$$2$us$i=$1647?$1646:0;$$01$i28$us$i=$1642;while(1){$1648=HEAP32[$1290>>2]|0;$1649=($1648|0)==0;if($1649){HEAP32[$1290>>2]=8;$1650=HEAP32[$1291>>2]|0;$1651=$1650+1|0;HEAP32[$1291>>2]=$1651;$1652=HEAP32[$1222>>2]|0;$1653=($gfc+39840|0)+($1652*48|0)|0;$1654=HEAP32[$1653>>2]|0;$1655=HEAP32[$1292>>2]|0;$1656=($1654|0)==($1655|0);if($1656){$1657=HEAP32[$1293>>2]|0;$1658=$1657+$1651|0;$1659=(($gfc+39840|0)+($1652*48|0)|0)+8|0;$1660=HEAP32[$21>>2]|0;_memcpy($1658|0,$1659|0,$1660|0)|0;$1661=HEAP32[$21>>2]|0;$1662=HEAP32[$1291>>2]|0;$1663=$1662+$1661|0;HEAP32[$1291>>2]=$1663;$1664=$1661<<3;$1665=HEAP32[$1292>>2]|0;$1666=$1665+$1664|0;HEAP32[$1292>>2]=$1666;$1667=HEAP32[$1222>>2]|0;$1668=$1667+1|0;$1669=$1668&255;HEAP32[$1222>>2]=$1669;$1672=$1663}else{$1672=$1651}$1670=HEAP32[$1293>>2]|0;$1671=$1670+$1672|0;HEAP8[$1671>>0]=0;$$pre$i29$us$i=HEAP32[$1290>>2]|0;$1674=$$pre$i29$us$i}else{$1674=$1648}$1673=($$01$i28$us$i|0)<($1674|0);$$0$$i30$us$i=$1673?$$01$i28$us$i:$1674;$1675=$$01$i28$us$i-$$0$$i30$us$i|0;$1676=$1674-$$0$$i30$us$i|0;HEAP32[$1290>>2]=$1676;$1677=$$2$us$i>>$1675;$1678=$1677<<$1676;$1679=HEAP32[$1291>>2]|0;$1680=HEAP32[$1293>>2]|0;$1681=$1680+$1679|0;$1682=HEAP8[$1681>>0]|0;$1683=$1682&255;$1684=$1678|$1683;$1685=$1684&255;HEAP8[$1681>>0]=$1685;$1686=HEAP32[$1292>>2]|0;$1687=$1686+$$0$$i30$us$i|0;HEAP32[$1292>>2]=$1687;$1688=($1675|0)>0;if($1688){$$01$i28$us$i=$1675}else{break}}$1689=$i$156$us$i+1|0;$1690=$sfb$558$us$i+1|0;$exitcond93$i=($1689|0)==($1640|0);if($exitcond93$i){break}else{$i$156$us$i=$1689;$sfb$558$us$i=$1690}}}$$pn100$i=Math_imul($1642,$1640)|0;$split63$i=$$pn100$i+$scale_bits$265$i|0;$split62$i=$1640+$sfb$466$i|0;$scale_bits$3$lcssa$i=$split63$i;$sfb$5$lcssa$i=$split62$i}else{$scale_bits$3$lcssa$i=$scale_bits$265$i;$sfb$5$lcssa$i=$sfb$466$i}$1691=$sfb_partition$164$i+1|0;$exitcond94$i=($1691|0)==4;if($exitcond94$i){$scale_bits$3$lcssa$i$lcssa=$scale_bits$3$lcssa$i;break}else{$scale_bits$265$i=$scale_bits$3$lcssa$i;$sfb$466$i=$sfb$5$lcssa$i;$sfb_partition$164$i=$1691}}$1692=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4772|0;$1693=HEAP32[$1692>>2]|0;$1694=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4824|0;$1695=HEAP32[$1694>>2]|0;$1696=$1695+1|0;$1697=($gfc+21360|0)+($1696<<2)|0;$1698=HEAP32[$1697>>2]|0;$1699=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4828|0;$1700=HEAP32[$1699>>2]|0;$1701=$1695+2|0;$1702=$1701+$1700|0;$1703=($gfc+21360|0)+($1702<<2)|0;$1704=HEAP32[$1703>>2]|0;$1705=($1698|0)>($1693|0);$$$i$i=$1705?$1693:$1698;$1706=($1704|0)>($1693|0);$region2Start$0$i$i=$1706?$1693:$1704;$1707=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4796|0;$1708=HEAP32[$1707>>2]|0;$1709=_Huffmancode($gfc,$1708,0,$$$i$i,$1467)|0;$1710=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4800|0;$1711=HEAP32[$1710>>2]|0;$1712=_Huffmancode($gfc,$1711,$$$i$i,$region2Start$0$i$i,$1467)|0;$1713=$1712+$1709|0;$1714=(($gfc+304|0)+($ch$179$i*5252|0)|0)+4804|0;$1715=HEAP32[$1714>>2]|0;$1716=_Huffmancode($gfc,$1715,$region2Start$0$i$i,$1693,$1467)|0;$1717=$1713+$1716|0;$data_bits$5$i=$1717;$scale_bits$4$i=$scale_bits$3$lcssa$i$lcssa}$1718=_huffman_coder_count1($gfc,$1467)|0;$1719=$scale_bits$4$i+$tot_bits$278$i|0;$1720=$1719+$data_bits$5$i|0;$1721=$1720+$1718|0;$1722=$ch$179$i+1|0;$1723=HEAP32[$1287>>2]|0;$1724=($1722|0)<($1723|0);if($1724){$ch$179$i=$1722;$tot_bits$278$i=$1721}else{$$pre$phiZ2D=$1292;$tot_bits$3$i=$1721;break}}}}while(0);$1725=$tot_bits$3$i+$1284|0;$1726=$gfc+21324|0;$1727=HEAP32[$1726>>2]|0;_drain_into_ancillary($gfc,$1727);$1728=HEAP32[$1726>>2]|0;$1729=$1725+$1728|0;$1730=$14-$1729|0;$1731=($1730|0)/8&-1;$1732=HEAP32[$298>>2]|0;$1733=$1732+$1731|0;HEAP32[$298>>2]=$1733;$1734=HEAP32[$1222>>2]|0;$1735=HEAP32[$17>>2]|0;$1736=$1735+-1|0;$1737=($1735|0)==0;$$$i=$1737?255:$1736;$1738=($gfc+39840|0)+($$$i*48|0)|0;$1739=HEAP32[$1738>>2]|0;$1740=HEAP32[$$pre$phiZ2D>>2]|0;$1741=$1739-$1740|0;$1742=($1741|0)>-1;if($1742){$1743=1-$1734|0;$1744=$$$i+$1743|0;$1745=($$$i|0)<($1734|0);$1746=$1744+256|0;$$1$i=$1745?$1746:$1744;$1747=$$1$i<<3;$1748=HEAP32[$21>>2]|0;$1749=Math_imul($1747,$1748)|0;$1750=$1741-$1749|0;$flushbits$0$i=$1750}else{$flushbits$0$i=$1741}$1751=HEAP32[$1>>2]|0;$1752=($1751|0)==0;if($1752){$1755=$gfc+120|0;$$idx$val$pre$i$i=HEAP32[$0>>2]|0;$$idx$val$i$i=$$idx$val$pre$i$i;$bit_rate$0$in$i$i=$1755}else{$1753=HEAP32[$0>>2]|0;$1754=(83944+($1753<<6)|0)+($1751<<2)|0;$$idx$val$i$i=$1753;$bit_rate$0$in$i$i=$1754}$bit_rate$0$i$i=HEAP32[$bit_rate$0$in$i$i>>2]|0;$1756=HEAP32[$7>>2]|0;$$idx1$val$i$i=HEAP32[$$idx1$i>>2]|0;$1757=$$idx$val$i$i*72000|0;$1758=$1757+72000|0;$1759=Math_imul($1758,$bit_rate$0$i$i)|0;$1760=($1759|0)/($$idx1$val$i$i|0)&-1;$1761=$1760+$1756|0;$1762=$1761<<3;$1763=$1762+$flushbits$0$i|0;$1764=($1763|0)<0;if($1764){_lame_errorf($gfc,1072,$vararg_buffer1)}$1765=$gfc+52140|0;$1766=HEAP32[$1765>>2]|0;$1767=($1763|0)==($1766|0);if($1767){$1771=$1763}else{_lame_errorf($gfc,1168,$vararg_buffer3);$$pre=HEAP32[$1765>>2]|0;$1771=$$pre}$1768=HEAP32[$298>>2]|0;$1769=$1768<<3;$1770=($1769|0)==($1771|0);if(!$1770){$1772=HEAP32[$1726>>2]|0;$1773=HEAP32[$15>>2]|0;$1774=HEAP32[$21>>2]|0;$1775=$1774<<3;$1776=$1729-$1772|0;$1777=$1776-$1775|0;$1778=($1729|0)%8&-1;HEAP32[$vararg_buffer5>>2]=$1769;$vararg_ptr7=$vararg_buffer5+4|0;HEAP32[$vararg_ptr7>>2]=$1771;$vararg_ptr8=$vararg_buffer5+8|0;HEAP32[$vararg_ptr8>>2]=$1772;$vararg_ptr9=$vararg_buffer5+12|0;HEAP32[$vararg_ptr9>>2]=$1773;$vararg_ptr10=$vararg_buffer5+16|0;HEAP32[$vararg_ptr10>>2]=$1775;$vararg_ptr11=$vararg_buffer5+20|0;HEAP32[$vararg_ptr11>>2]=$1777;$vararg_ptr12=$vararg_buffer5+24|0;HEAP32[$vararg_ptr12>>2]=$1729;$vararg_ptr13=$vararg_buffer5+28|0;HEAP32[$vararg_ptr13>>2]=$1778;$vararg_ptr14=$vararg_buffer5+32|0;HEAP32[$vararg_ptr14>>2]=$14;_lame_errorf($gfc,1224,$vararg_buffer5);_lame_errorf($gfc,1504,$vararg_buffer15);_lame_errorf($gfc,1560,$vararg_buffer17);_lame_errorf($gfc,1640,$vararg_buffer19);_lame_errorf($gfc,1680,$vararg_buffer21);$1779=HEAP32[$298>>2]|0;$1780=$1779<<3;HEAP32[$1765>>2]=$1780}$1781=HEAP32[$$pre$phiZ2D>>2]|0;$1782=($1781|0)>1000000000;if($1782){$i$091=0}else{STACKTOP=sp;return 0}while(1){$1783=($gfc+39840|0)+($i$091*48|0)|0;$1784=HEAP32[$1783>>2]|0;$1785=$1784-$1781|0;HEAP32[$1783>>2]=$1785;$1786=$i$091+1|0;$exitcond=($1786|0)==256;if($exitcond){break}else{$i$091=$1786}}HEAP32[$$pre$phiZ2D>>2]=0;STACKTOP=sp;return 0}function _copy_buffer($gfc,$buffer,$size,$mp3data){$gfc=$gfc|0;$buffer=$buffer|0;$size=$size|0;$mp3data=$mp3data|0;var $$$i=0,$$0=0,$$pre$i=0.0,$$pre8$i=0.0,$$pre8$i$lcssa=0.0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0;var $22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0.0,$32=0,$33=0.0,$34=0.0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0;var $40=0.0,$41=0,$42=0.0,$43=0.0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0.0,$6=0,$7=0,$8=0,$9=0,$exitcond$i=0;var $exitcond7$i=0,$i$03$i=0,$i$14$i=0,$mp3_in$06$i=0,$or$cond$i=0,$pcm_buf$i=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+9216|0;$pcm_buf$i=sp;$0=$gfc+296|0;$1=HEAP32[$0>>2]|0;$2=$1+1|0;$3=($1|0)<0;if($3){$$0=0;STACKTOP=sp;return $$0|0}$4=($size|0)==0;$5=($1|0)<($size|0);$or$cond$i=$4|$5;if(!$or$cond$i){$$0=-1;STACKTOP=sp;return $$0|0}$6=$gfc+284|0;$7=HEAP32[$6>>2]|0;_memcpy($buffer|0,$7|0,$2|0)|0;HEAP32[$0>>2]=-1;$8=$gfc+300|0;HEAP32[$8>>2]=0;$9=($mp3data|0)==0;if($9){$$0=$2;STACKTOP=sp;return $$0|0}$10=$gfc+85752|0;_UpdateMusicCRC($10,$buffer,$2);$11=$gfc+85788|0;$12=HEAP32[$11>>2]|0;$13=$12+$2|0;HEAP32[$11>>2]=$13;$14=$gfc+136|0;$15=HEAP32[$14>>2]|0;$16=($15|0)==0;if($16){$$0=$2;STACKTOP=sp;return $$0|0}$17=$gfc+85808|0;$18=$pcm_buf$i+4608|0;$19=$gfc+132|0;$20=$gfc+128|0;$21=$gfc+85676|0;$22=$gfc+72|0;$23=$gfc+85684|0;$mp3_in$06$i=$2;while(1){$24=HEAP32[$17>>2]|0;$25=_hip_decode1_unclipped($24|0,$buffer|0,$mp3_in$06$i|0,$pcm_buf$i|0,$18|0)|0;$26=($25|0)==-1;$$$i=$26?0:$25;$27=($$$i|0)>0;if($27){$28=HEAP32[$19>>2]|0;$29=($28|0)==0;if(!$29){$$pre$i=+HEAPF32[$23>>2];$33=$$pre$i;$i$03$i=0;while(1){$30=$pcm_buf$i+($i$03$i<<2)|0;$31=+HEAPF32[$30>>2];$32=$31>$33;if($32){HEAPF32[$23>>2]=$31;$$pre8$i=$31}else{$34=-$31;$35=$33<$34;if($35){HEAPF32[$23>>2]=$34;$$pre8$i=$34}else{$$pre8$i=$33}}$36=$i$03$i+1|0;$exitcond$i=($36|0)==($$$i|0);if($exitcond$i){$$pre8$i$lcssa=$$pre8$i;break}else{$33=$$pre8$i;$i$03$i=$36}}$37=HEAP32[$22>>2]|0;$38=($37|0)>1;if($38){$42=$$pre8$i$lcssa;$i$14$i=0;while(1){$39=($pcm_buf$i+4608|0)+($i$14$i<<2)|0;$40=+HEAPF32[$39>>2];$41=$40>$42;if($41){HEAPF32[$23>>2]=$40;$53=$40}else{$43=-$40;$44=$42<$43;if($44){HEAPF32[$23>>2]=$43;$53=$43}else{$53=$42}}$45=$i$14$i+1|0;$exitcond7$i=($45|0)==($$$i|0);if($exitcond7$i){break}else{$42=$53;$i$14$i=$45}}}}$46=HEAP32[$20>>2]|0;$47=($46|0)==0;if(!$47){$48=HEAP32[$21>>2]|0;$49=HEAP32[$22>>2]|0;$50=_AnalyzeSamples($48|0,$pcm_buf$i|0,$18|0,$$$i|0,$49|0)|0;$51=($50|0)==0;if($51){label=24;break}}}$52=($$$i|0)==0;if($52){label=23;break}else{$mp3_in$06$i=0}}if((label|0)==23){$$0=$2;STACKTOP=sp;return $$0|0}else if((label|0)==24){$$0=-6;STACKTOP=sp;return $$0|0}return 0|0}function _init_bit_stream_w($gfc){$gfc=$gfc|0;var $0=0,$1=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,label=0,sp=0;sp=STACKTOP;$0=$gfc+52132|0;HEAP32[$0>>2]=0;$1=$gfc+52128|0;HEAP32[$1>>2]=0;$2=$gfc+39840|0;HEAP32[$2>>2]=0;$3=_malloc(147456)|0;$4=$gfc+284|0;HEAP32[$4>>2]=$3;$5=$gfc+288|0;HEAP32[$5>>2]=147456;$6=$gfc+296|0;HEAP32[$6>>2]=-1;$7=$gfc+300|0;HEAP32[$7>>2]=0;$8=$gfc+292|0;HEAP32[$8>>2]=0;return}function _drain_into_ancillary($gfc,$remainingBits){$gfc=$gfc|0;$remainingBits=$remainingBits|0;var $$0$$i=0,$$0$$i11=0,$$0$$i15=0,$$0$$i19=0,$$0$$i3=0,$$0$$i7=0,$$01$i=0,$$01$i1=0,$$01$i13=0,$$01$i17=0,$$01$i5=0,$$01$i9=0,$$428=0,$$5$ph=0,$$5$ph30=0,$$526=0,$$lcssa42=0,$$lcssa43=0,$$lcssa44=0,$$pre=0;var $$pre$i=0,$$pre$i10=0,$$pre$i14=0,$$pre$i18=0,$$pre$i2=0,$$pre$i6=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0;var $110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0,$128=0;var $129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0,$146=0;var $147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0,$164=0;var $165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0;var $183=0,$184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0;var $200=0,$201=0,$202=0,$203=0,$204=0,$205=0,$206=0,$207=0,$208=0,$209=0,$21=0,$210=0,$211=0,$212=0,$213=0,$214=0,$215=0,$216=0,$217=0,$218=0;var $219=0,$22=0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0,$231=0,$232=0,$233=0,$234=0,$235=0,$236=0;var $237=0,$238=0,$239=0,$24=0,$240=0,$241=0,$242=0,$243=0,$244=0,$245=0,$246=0,$247=0,$248=0,$249=0,$25=0,$250=0,$251=0,$252=0,$253=0,$254=0;var $255=0,$256=0,$257=0,$258=0,$259=0,$26=0,$260=0,$261=0,$262=0,$263=0,$264=0,$265=0,$266=0,$267=0,$268=0,$269=0,$27=0,$270=0,$271=0,$272=0;var $273=0,$274=0,$275=0,$276=0,$277=0,$278=0,$279=0,$28=0,$280=0,$281=0,$282=0,$283=0,$284=0,$285=0,$286=0,$287=0,$288=0,$289=0,$29=0,$3=0;var $30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0;var $49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0;var $67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0;var $85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$i$027=0,label=0,sp=0;sp=STACKTOP;$0=($remainingBits|0)>7;if($0){$10=$gfc+300|0;$11=$gfc+296|0;$12=$gfc+52132|0;$13=$gfc+292|0;$14=$gfc+284|0;$15=$gfc+24|0;$$01$i=8;while(1){$16=HEAP32[$10>>2]|0;$17=($16|0)==0;if($17){HEAP32[$10>>2]=8;$18=HEAP32[$11>>2]|0;$19=$18+1|0;HEAP32[$11>>2]=$19;$20=HEAP32[$12>>2]|0;$21=($gfc+39840|0)+($20*48|0)|0;$22=HEAP32[$21>>2]|0;$23=HEAP32[$13>>2]|0;$24=($22|0)==($23|0);if($24){$25=HEAP32[$14>>2]|0;$26=$25+$19|0;$27=(($gfc+39840|0)+($20*48|0)|0)+8|0;$28=HEAP32[$15>>2]|0;_memcpy($26|0,$27|0,$28|0)|0;$29=HEAP32[$15>>2]|0;$30=HEAP32[$11>>2]|0;$31=$30+$29|0;HEAP32[$11>>2]=$31;$32=$29<<3;$33=HEAP32[$13>>2]|0;$34=$33+$32|0;HEAP32[$13>>2]=$34;$35=HEAP32[$12>>2]|0;$36=$35+1|0;$37=$36&255;HEAP32[$12>>2]=$37;$40=$31}else{$40=$19}$38=HEAP32[$14>>2]|0;$39=$38+$40|0;HEAP8[$39>>0]=0;$$pre$i=HEAP32[$10>>2]|0;$42=$$pre$i}else{$42=$16}$41=($$01$i|0)<($42|0);$$0$$i=$41?$$01$i:$42;$43=$$01$i-$$0$$i|0;$44=$42-$$0$$i|0;HEAP32[$10>>2]=$44;$45=76>>>$43;$46=$45<<$44;$47=HEAP32[$11>>2]|0;$48=HEAP32[$14>>2]|0;$49=$48+$47|0;$50=HEAP8[$49>>0]|0;$51=$50&255;$52=$46|$51;$53=$52&255;HEAP8[$49>>0]=$53;$54=HEAP32[$13>>2]|0;$55=$54+$$0$$i|0;HEAP32[$13>>2]=$55;$56=($43|0)>0;if($56){$$01$i=$43}else{$$lcssa44=$55;break}}$57=$remainingBits+-8|0;$58=($57|0)>7;if($58){$$01$i17=8;$67=$$lcssa44;while(1){$59=HEAP32[$10>>2]|0;$60=($59|0)==0;if($60){HEAP32[$10>>2]=8;$61=HEAP32[$11>>2]|0;$62=$61+1|0;HEAP32[$11>>2]=$62;$63=HEAP32[$12>>2]|0;$64=($gfc+39840|0)+($63*48|0)|0;$65=HEAP32[$64>>2]|0;$66=($65|0)==($67|0);if($66){$68=HEAP32[$14>>2]|0;$69=$68+$62|0;$70=(($gfc+39840|0)+($63*48|0)|0)+8|0;$71=HEAP32[$15>>2]|0;_memcpy($69|0,$70|0,$71|0)|0;$72=HEAP32[$15>>2]|0;$73=HEAP32[$11>>2]|0;$74=$73+$72|0;HEAP32[$11>>2]=$74;$75=$72<<3;$76=HEAP32[$13>>2]|0;$77=$76+$75|0;HEAP32[$13>>2]=$77;$78=HEAP32[$12>>2]|0;$79=$78+1|0;$80=$79&255;HEAP32[$12>>2]=$80;$83=$74}else{$83=$62}$81=HEAP32[$14>>2]|0;$82=$81+$83|0;HEAP8[$82>>0]=0;$$pre$i18=HEAP32[$10>>2]|0;$85=$$pre$i18}else{$85=$59}$84=($$01$i17|0)<($85|0);$$0$$i19=$84?$$01$i17:$85;$86=$$01$i17-$$0$$i19|0;$87=$85-$$0$$i19|0;HEAP32[$10>>2]=$87;$88=65>>>$86;$89=$88<<$87;$90=HEAP32[$11>>2]|0;$91=HEAP32[$14>>2]|0;$92=$91+$90|0;$93=HEAP8[$92>>0]|0;$94=$93&255;$95=$89|$94;$96=$95&255;HEAP8[$92>>0]=$96;$97=HEAP32[$13>>2]|0;$98=$97+$$0$$i19|0;HEAP32[$13>>2]=$98;$99=($86|0)>0;if($99){$$01$i17=$86;$67=$98}else{$$lcssa43=$98;break}}$100=$remainingBits+-16|0;$101=($100|0)>7;if($101){$$01$i13=8;$110=$$lcssa43;while(1){$102=HEAP32[$10>>2]|0;$103=($102|0)==0;if($103){HEAP32[$10>>2]=8;$104=HEAP32[$11>>2]|0;$105=$104+1|0;HEAP32[$11>>2]=$105;$106=HEAP32[$12>>2]|0;$107=($gfc+39840|0)+($106*48|0)|0;$108=HEAP32[$107>>2]|0;$109=($108|0)==($110|0);if($109){$111=HEAP32[$14>>2]|0;$112=$111+$105|0;$113=(($gfc+39840|0)+($106*48|0)|0)+8|0;$114=HEAP32[$15>>2]|0;_memcpy($112|0,$113|0,$114|0)|0;$115=HEAP32[$15>>2]|0;$116=HEAP32[$11>>2]|0;$117=$116+$115|0;HEAP32[$11>>2]=$117;$118=$115<<3;$119=HEAP32[$13>>2]|0;$120=$119+$118|0;HEAP32[$13>>2]=$120;$121=HEAP32[$12>>2]|0;$122=$121+1|0;$123=$122&255;HEAP32[$12>>2]=$123;$126=$117}else{$126=$105}$124=HEAP32[$14>>2]|0;$125=$124+$126|0;HEAP8[$125>>0]=0;$$pre$i14=HEAP32[$10>>2]|0;$128=$$pre$i14}else{$128=$102}$127=($$01$i13|0)<($128|0);$$0$$i15=$127?$$01$i13:$128;$129=$$01$i13-$$0$$i15|0;$130=$128-$$0$$i15|0;HEAP32[$10>>2]=$130;$131=77>>>$129;$132=$131<<$130;$133=HEAP32[$11>>2]|0;$134=HEAP32[$14>>2]|0;$135=$134+$133|0;$136=HEAP8[$135>>0]|0;$137=$136&255;$138=$132|$137;$139=$138&255;HEAP8[$135>>0]=$139;$140=HEAP32[$13>>2]|0;$141=$140+$$0$$i15|0;HEAP32[$13>>2]=$141;$142=($129|0)>0;if($142){$$01$i13=$129;$110=$141}else{$$lcssa42=$141;break}}$143=$remainingBits+-24|0;$144=($143|0)>7;if($144){$$01$i9=8;$153=$$lcssa42;while(1){$145=HEAP32[$10>>2]|0;$146=($145|0)==0;if($146){HEAP32[$10>>2]=8;$147=HEAP32[$11>>2]|0;$148=$147+1|0;HEAP32[$11>>2]=$148;$149=HEAP32[$12>>2]|0;$150=($gfc+39840|0)+($149*48|0)|0;$151=HEAP32[$150>>2]|0;$152=($151|0)==($153|0);if($152){$154=HEAP32[$14>>2]|0;$155=$154+$148|0;$156=(($gfc+39840|0)+($149*48|0)|0)+8|0;$157=HEAP32[$15>>2]|0;_memcpy($155|0,$156|0,$157|0)|0;$158=HEAP32[$15>>2]|0;$159=HEAP32[$11>>2]|0;$160=$159+$158|0;HEAP32[$11>>2]=$160;$161=$158<<3;$162=HEAP32[$13>>2]|0;$163=$162+$161|0;HEAP32[$13>>2]=$163;$164=HEAP32[$12>>2]|0;$165=$164+1|0;$166=$165&255;HEAP32[$12>>2]=$166;$169=$160}else{$169=$148}$167=HEAP32[$14>>2]|0;$168=$167+$169|0;HEAP8[$168>>0]=0;$$pre$i10=HEAP32[$10>>2]|0;$171=$$pre$i10}else{$171=$145}$170=($$01$i9|0)<($171|0);$$0$$i11=$170?$$01$i9:$171;$172=$$01$i9-$$0$$i11|0;$173=$171-$$0$$i11|0;HEAP32[$10>>2]=$173;$174=69>>>$172;$175=$174<<$173;$176=HEAP32[$11>>2]|0;$177=HEAP32[$14>>2]|0;$178=$177+$176|0;$179=HEAP8[$178>>0]|0;$180=$179&255;$181=$175|$180;$182=$181&255;HEAP8[$178>>0]=$182;$183=HEAP32[$13>>2]|0;$184=$183+$$0$$i11|0;HEAP32[$13>>2]=$184;$185=($172|0)>0;if($185){$$01$i9=$172;$153=$184}else{break}}$186=$remainingBits+-32|0;$187=($186|0)>31;if($187){$188=_get_lame_short_version()|0;$189=_strlen($188|0)|0;$190=($189|0)>0;if($190){$$428=$186;$i$027=0;while(1){$191=$188+$i$027|0;$192=HEAP8[$191>>0]|0;$193=$192<<24>>24;$$01$i5=8;while(1){$194=HEAP32[$10>>2]|0;$195=($194|0)==0;if($195){HEAP32[$10>>2]=8;$196=HEAP32[$11>>2]|0;$197=$196+1|0;HEAP32[$11>>2]=$197;$198=HEAP32[$12>>2]|0;$199=($gfc+39840|0)+($198*48|0)|0;$200=HEAP32[$199>>2]|0;$201=HEAP32[$13>>2]|0;$202=($200|0)==($201|0);if($202){$203=HEAP32[$14>>2]|0;$204=$203+$197|0;$205=(($gfc+39840|0)+($198*48|0)|0)+8|0;$206=HEAP32[$15>>2]|0;_memcpy($204|0,$205|0,$206|0)|0;$207=HEAP32[$15>>2]|0;$208=HEAP32[$11>>2]|0;$209=$208+$207|0;HEAP32[$11>>2]=$209;$210=$207<<3;$211=HEAP32[$13>>2]|0;$212=$211+$210|0;HEAP32[$13>>2]=$212;$213=HEAP32[$12>>2]|0;$214=$213+1|0;$215=$214&255;HEAP32[$12>>2]=$215;$218=$209}else{$218=$197}$216=HEAP32[$14>>2]|0;$217=$216+$218|0;HEAP8[$217>>0]=0;$$pre$i6=HEAP32[$10>>2]|0;$220=$$pre$i6}else{$220=$194}$219=($$01$i5|0)<($220|0);$$0$$i7=$219?$$01$i5:$220;$221=$$01$i5-$$0$$i7|0;$222=$220-$$0$$i7|0;HEAP32[$10>>2]=$222;$223=$193>>$221;$224=$223<<$222;$225=HEAP32[$11>>2]|0;$226=HEAP32[$14>>2]|0;$227=$226+$225|0;$228=HEAP8[$227>>0]|0;$229=$228&255;$230=$224|$229;$231=$230&255;HEAP8[$227>>0]=$231;$232=HEAP32[$13>>2]|0;$233=$232+$$0$$i7|0;HEAP32[$13>>2]=$233;$234=($221|0)>0;if($234){$$01$i5=$221}else{break}}$235=$$428+-8|0;$236=$i$027+1|0;$237=_strlen($188|0)|0;$238=($236|0)<($237|0);$239=($235|0)>7;$240=$239&$238;if($240){$$428=$235;$i$027=$236}else{$$5$ph=$235;label=2;break}}}else{$$5$ph30=$186}}else{$$5$ph=$186;label=2}}else{$$5$ph=$143;label=2}}else{$$5$ph=$100;label=2}}else{$$5$ph=$57;label=2}}else{$$5$ph=$remainingBits;label=2}if((label|0)==2){$1=($$5$ph|0)>0;if($1){$$5$ph30=$$5$ph}else{return}}$2=$gfc+52136|0;$3=$gfc+300|0;$4=$gfc+296|0;$5=$gfc+52132|0;$6=$gfc+292|0;$7=$gfc+284|0;$8=$gfc+24|0;$9=$gfc+144|0;$$pre=HEAP32[$2>>2]|0;$$526=$$5$ph30;$271=$$pre;while(1){$$01$i1=1;while(1){$241=HEAP32[$3>>2]|0;$242=($241|0)==0;if($242){HEAP32[$3>>2]=8;$243=HEAP32[$4>>2]|0;$244=$243+1|0;HEAP32[$4>>2]=$244;$245=HEAP32[$5>>2]|0;$246=($gfc+39840|0)+($245*48|0)|0;$247=HEAP32[$246>>2]|0;$248=HEAP32[$6>>2]|0;$249=($247|0)==($248|0);if($249){$250=HEAP32[$7>>2]|0;$251=$250+$244|0;$252=(($gfc+39840|0)+($245*48|0)|0)+8|0;$253=HEAP32[$8>>2]|0;_memcpy($251|0,$252|0,$253|0)|0;$254=HEAP32[$8>>2]|0;$255=HEAP32[$4>>2]|0;$256=$255+$254|0;HEAP32[$4>>2]=$256;$257=$254<<3;$258=HEAP32[$6>>2]|0;$259=$258+$257|0;HEAP32[$6>>2]=$259;$260=HEAP32[$5>>2]|0;$261=$260+1|0;$262=$261&255;HEAP32[$5>>2]=$262;$265=$256}else{$265=$244}$263=HEAP32[$7>>2]|0;$264=$263+$265|0;HEAP8[$264>>0]=0;$$pre$i2=HEAP32[$3>>2]|0;$267=$$pre$i2}else{$267=$241}$266=($$01$i1|0)<($267|0);$$0$$i3=$266?$$01$i1:$267;$268=$$01$i1-$$0$$i3|0;$269=$267-$$0$$i3|0;HEAP32[$3>>2]=$269;$270=$271>>$268;$272=$270<<$269;$273=HEAP32[$4>>2]|0;$274=HEAP32[$7>>2]|0;$275=$274+$273|0;$276=HEAP8[$275>>0]|0;$277=$276&255;$278=$272|$277;$279=$278&255;HEAP8[$275>>0]=$279;$280=HEAP32[$6>>2]|0;$281=$280+$$0$$i3|0;HEAP32[$6>>2]=$281;$282=($268|0)>0;if($282){$$01$i1=$268}else{break}}$283=HEAP32[$9>>2]|0;$284=($283|0)==0;$285=$284&1;$286=HEAP32[$2>>2]|0;$287=$285^$286;HEAP32[$2>>2]=$287;$288=$$526+-1|0;$289=($$526|0)>1;if($289){$$526=$288;$271=$287}else{break}}return}function _Huffmancode($gfc,$tableindex,$start,$end,$gi){$gfc=$gfc|0;$tableindex=$tableindex|0;$start=$start|0;$end=$end|0;$gi=$gi|0;var $$0=0,$$0$$i=0,$$0$$i4=0,$$01$i=0,$$01$i2=0,$$pre$i=0,$$pre$i3=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0;var $11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0;var $128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0;var $15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0.0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0;var $33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0.0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0;var $51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0;var $7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0;var $88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$bits$015=0,$cbits$0=0,$cbits$1=0,$ext$0=0,$ext$1=0,$ext$2=0,$ext$4=0;var $ext$410=0,$ext$5=0,$ext$6=0,$i$016=0,$or$cond=0,$x1$0=0,$x1$1=0,$x1$111=0,$x1$112=0,$x2$113=0,$x2$114=0,$xbits$0=0,$xbits$2=0,$xbits$26=0,$xbits$27=0,$xlen$0=0,$xlen$08=0,$xlen$09=0,label=0,sp=0;sp=STACKTOP;$0=82272+($tableindex<<4)|0;$1=HEAP32[$0>>2]|0;$2=($tableindex|0)!=0;$3=($start|0)<($end|0);$or$cond=$2&$3;if(!$or$cond){$$0=0;return $$0|0}$4=$tableindex>>>0>15;$5=$1&65535;$6=(82272+($tableindex<<4)|0)+12|0;$7=HEAP32[$6>>2]|0;$8=(82272+($tableindex<<4)|0)+8|0;$9=HEAP32[$8>>2]|0;$10=$gfc+300|0;$11=$gfc+296|0;$12=$gfc+52132|0;$13=$gfc+292|0;$14=$gfc+284|0;$15=$gfc+24|0;$bits$015=0;$i$016=$start;while(1){$16=($gi+2304|0)+($i$016<<2)|0;$17=HEAP32[$16>>2]|0;$18=$i$016+1|0;$19=($gi+2304|0)+($18<<2)|0;$20=HEAP32[$19>>2]|0;$21=($17|0)==0;if($21){$cbits$0=0;$ext$1=0}else{$22=$gi+($i$016<<2)|0;$23=+HEAPF32[$22>>2];$24=$23<0.0;$ext$0=$24&1;$cbits$0=-1;$ext$1=$ext$0}if($4){$25=$17>>>0>14;if($25){$26=$17<<1;$27=$26+131042|0;$28=$27&131070;$29=$ext$1|$28;$ext$2=$29;$x1$0=15;$xbits$0=$5}else{$ext$2=$ext$1;$x1$0=$17;$xbits$0=0}$30=$20>>>0>14;if($30){$31=$20+65521|0;$32=$ext$2<<$1;$33=$31&65535;$34=$32|$33;$35=$xbits$0&65535;$36=$35+$1|0;$37=$36&65535;$ext$410=$34;$x1$111=$x1$0;$x2$113=15;$xbits$26=$37;$xlen$08=16;label=11}else{$ext$4=$ext$2;$x1$1=$x1$0;$xbits$2=$xbits$0;$xlen$0=16;label=10}}else{$ext$4=$ext$1;$x1$1=$17;$xbits$2=0;$xlen$0=$1;label=10}if((label|0)==10){label=0;$38=($20|0)==0;if($38){$cbits$1=$cbits$0;$ext$6=$ext$4;$x1$112=$x1$1;$x2$114=0;$xbits$27=$xbits$2;$xlen$09=$xlen$0}else{$ext$410=$ext$4;$x1$111=$x1$1;$x2$113=$20;$xbits$26=$xbits$2;$xlen$08=$xlen$0;label=11}}if((label|0)==11){label=0;$39=$ext$410<<1;$40=$gi+($18<<2)|0;$41=+HEAPF32[$40>>2];$42=$41<0.0;$43=$42&1;$ext$5=$43|$39;$44=$cbits$0+-1<<16>>16;$cbits$1=$44;$ext$6=$ext$5;$x1$112=$x1$111;$x2$114=$x2$113;$xbits$27=$xbits$26;$xlen$09=$xlen$08}$45=Math_imul($xlen$09,$x1$112)|0;$46=$45+$x2$114|0;$47=$cbits$1<<16>>16;$48=$xbits$27&65535;$49=$48-$47|0;$50=$7+$46|0;$51=HEAP8[$50>>0]|0;$52=$51&255;$53=$52+$47|0;$54=$9+($46<<1)|0;$55=HEAP16[$54>>1]|0;$56=$55&65535;$57=($53|0)>0;if($57){$$01$i=$53;while(1){$58=HEAP32[$10>>2]|0;$59=($58|0)==0;if($59){HEAP32[$10>>2]=8;$60=HEAP32[$11>>2]|0;$61=$60+1|0;HEAP32[$11>>2]=$61;$62=HEAP32[$12>>2]|0;$63=($gfc+39840|0)+($62*48|0)|0;$64=HEAP32[$63>>2]|0;$65=HEAP32[$13>>2]|0;$66=($64|0)==($65|0);if($66){$67=HEAP32[$14>>2]|0;$68=$67+$61|0;$69=(($gfc+39840|0)+($62*48|0)|0)+8|0;$70=HEAP32[$15>>2]|0;_memcpy($68|0,$69|0,$70|0)|0;$71=HEAP32[$15>>2]|0;$72=HEAP32[$11>>2]|0;$73=$72+$71|0;HEAP32[$11>>2]=$73;$74=$71<<3;$75=HEAP32[$13>>2]|0;$76=$75+$74|0;HEAP32[$13>>2]=$76;$77=HEAP32[$12>>2]|0;$78=$77+1|0;$79=$78&255;HEAP32[$12>>2]=$79;$82=$73}else{$82=$61}$80=HEAP32[$14>>2]|0;$81=$80+$82|0;HEAP8[$81>>0]=0;$$pre$i=HEAP32[$10>>2]|0;$84=$$pre$i}else{$84=$58}$83=($$01$i|0)<($84|0);$$0$$i=$83?$$01$i:$84;$85=$$01$i-$$0$$i|0;$86=$84-$$0$$i|0;HEAP32[$10>>2]=$86;$87=$56>>>$85;$88=$87<<$86;$89=HEAP32[$11>>2]|0;$90=HEAP32[$14>>2]|0;$91=$90+$89|0;$92=HEAP8[$91>>0]|0;$93=$92&255;$94=$88|$93;$95=$94&255;HEAP8[$91>>0]=$95;$96=HEAP32[$13>>2]|0;$97=$96+$$0$$i|0;HEAP32[$13>>2]=$97;$98=($85|0)>0;if($98){$$01$i=$85}else{break}}}$99=$49&65535;$100=($99|0)==0;if(!$100){$$01$i2=$99;while(1){$101=HEAP32[$10>>2]|0;$102=($101|0)==0;if($102){HEAP32[$10>>2]=8;$103=HEAP32[$11>>2]|0;$104=$103+1|0;HEAP32[$11>>2]=$104;$105=HEAP32[$12>>2]|0;$106=($gfc+39840|0)+($105*48|0)|0;$107=HEAP32[$106>>2]|0;$108=HEAP32[$13>>2]|0;$109=($107|0)==($108|0);if($109){$110=HEAP32[$14>>2]|0;$111=$110+$104|0;$112=(($gfc+39840|0)+($105*48|0)|0)+8|0;$113=HEAP32[$15>>2]|0;_memcpy($111|0,$112|0,$113|0)|0;$114=HEAP32[$15>>2]|0;$115=HEAP32[$11>>2]|0;$116=$115+$114|0;HEAP32[$11>>2]=$116;$117=$114<<3;$118=HEAP32[$13>>2]|0;$119=$118+$117|0;HEAP32[$13>>2]=$119;$120=HEAP32[$12>>2]|0;$121=$120+1|0;$122=$121&255;HEAP32[$12>>2]=$122;$125=$116}else{$125=$104}$123=HEAP32[$14>>2]|0;$124=$123+$125|0;HEAP8[$124>>0]=0;$$pre$i3=HEAP32[$10>>2]|0;$127=$$pre$i3}else{$127=$101}$126=($$01$i2|0)<($127|0);$$0$$i4=$126?$$01$i2:$127;$128=$$01$i2-$$0$$i4|0;$129=$127-$$0$$i4|0;HEAP32[$10>>2]=$129;$130=$ext$6>>$128;$131=$130<<$129;$132=HEAP32[$11>>2]|0;$133=HEAP32[$14>>2]|0;$134=$133+$132|0;$135=HEAP8[$134>>0]|0;$136=$135&255;$137=$131|$136;$138=$137&255;HEAP8[$134>>0]=$138;$139=HEAP32[$13>>2]|0;$140=$139+$$0$$i4|0;HEAP32[$13>>2]=$140;$141=($128|0)>0;if($141){$$01$i2=$128}else{break}}}$142=$99+$bits$015|0;$143=$142+$53|0;$144=$i$016+2|0;$145=($144|0)<($end|0);if($145){$bits$015=$143;$i$016=$144}else{$$0=$143;break}}return $$0|0}function _huffman_coder_count1($gfc,$gi){$gfc=$gfc|0;$gi=$gi|0;var $$0$$i=0,$$01$i=0,$$pre=0,$$pre$i=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$11=0,$12=0,$13=0,$14=0;var $15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0.0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0.0;var $33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0.0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0.0;var $51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0;var $7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0;var $88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$bits$0$lcssa=0,$bits$02=0,$huffbits$0=0,$huffbits$1=0,$huffbits$2=0,$huffbits$3=0,$i$01=0;var $ix$03=0,$p$0=0,$p$1=0,$p$2=0,$p$3=0,$xr$04=0,label=0,sp=0;sp=STACKTOP;$0=$gi+4840|0;$1=HEAP32[$0>>2]|0;$2=$1+32|0;$3=$gi+4772|0;$4=HEAP32[$3>>2]|0;$5=$gi+4776|0;$6=HEAP32[$5>>2]|0;$7=$6-$4|0;$8=($7|0)>3;if(!$8){$bits$0$lcssa=0;return $bits$0$lcssa|0}$9=($7|0)/4&-1;$10=$gi+($4<<2)|0;$11=($gi+2304|0)+($4<<2)|0;$12=(82272+($2<<4)|0)+8|0;$13=HEAP32[$12>>2]|0;$14=(82272+($2<<4)|0)+12|0;$15=HEAP32[$14>>2]|0;$16=$gfc+300|0;$17=$gfc+296|0;$18=$gfc+52132|0;$19=$gfc+292|0;$20=$gfc+284|0;$21=$gfc+24|0;$bits$02=0;$i$01=$9;$ix$03=$11;$xr$04=$10;while(1){$22=HEAP32[$ix$03>>2]|0;$23=($22|0)==0;if($23){$huffbits$0=0;$p$0=0}else{$24=+HEAPF32[$xr$04>>2];$25=$24<0.0;if($25){$huffbits$0=1;$p$0=8}else{$huffbits$0=0;$p$0=8}}$26=$ix$03+4|0;$27=HEAP32[$26>>2]|0;$28=($27|0)==0;if($28){$huffbits$1=$huffbits$0;$p$1=$p$0}else{$29=$p$0|4;$30=$huffbits$0<<1;$31=$xr$04+4|0;$32=+HEAPF32[$31>>2];$33=$32<0.0;if($33){$34=$30|1;$huffbits$1=$34;$p$1=$29}else{$huffbits$1=$30;$p$1=$29}}$35=$ix$03+8|0;$36=HEAP32[$35>>2]|0;$37=($36|0)==0;if($37){$huffbits$2=$huffbits$1;$p$2=$p$1}else{$38=$p$1+2|0;$39=$huffbits$1<<1;$40=$xr$04+8|0;$41=+HEAPF32[$40>>2];$42=$41<0.0;if($42){$43=$39|1;$huffbits$2=$43;$p$2=$38}else{$huffbits$2=$39;$p$2=$38}}$44=$ix$03+12|0;$45=HEAP32[$44>>2]|0;$46=($45|0)==0;if($46){$huffbits$3=$huffbits$2;$p$3=$p$2}else{$47=$p$2+1|0;$48=$huffbits$2<<1;$49=$xr$04+12|0;$50=+HEAPF32[$49>>2];$51=$50<0.0;if($51){$52=$48|1;$huffbits$3=$52;$p$3=$47}else{$huffbits$3=$48;$p$3=$47}}$53=$ix$03+16|0;$54=$xr$04+16|0;$55=$13+($p$3<<1)|0;$56=HEAP16[$55>>1]|0;$57=$56&65535;$58=$57+$huffbits$3|0;$59=$15+$p$3|0;$60=HEAP8[$59>>0]|0;$61=$60<<24>>24==0;if($61){$105=0}else{$62=$60&255;$$01$i=$62;while(1){$63=HEAP32[$16>>2]|0;$64=($63|0)==0;if($64){HEAP32[$16>>2]=8;$65=HEAP32[$17>>2]|0;$66=$65+1|0;HEAP32[$17>>2]=$66;$67=HEAP32[$18>>2]|0;$68=($gfc+39840|0)+($67*48|0)|0;$69=HEAP32[$68>>2]|0;$70=HEAP32[$19>>2]|0;$71=($69|0)==($70|0);if($71){$72=HEAP32[$20>>2]|0;$73=$72+$66|0;$74=(($gfc+39840|0)+($67*48|0)|0)+8|0;$75=HEAP32[$21>>2]|0;_memcpy($73|0,$74|0,$75|0)|0;$76=HEAP32[$21>>2]|0;$77=HEAP32[$17>>2]|0;$78=$77+$76|0;HEAP32[$17>>2]=$78;$79=$76<<3;$80=HEAP32[$19>>2]|0;$81=$80+$79|0;HEAP32[$19>>2]=$81;$82=HEAP32[$18>>2]|0;$83=$82+1|0;$84=$83&255;HEAP32[$18>>2]=$84;$87=$78}else{$87=$66}$85=HEAP32[$20>>2]|0;$86=$85+$87|0;HEAP8[$86>>0]=0;$$pre$i=HEAP32[$16>>2]|0;$89=$$pre$i}else{$89=$63}$88=($$01$i|0)<($89|0);$$0$$i=$88?$$01$i:$89;$90=$$01$i-$$0$$i|0;$91=$89-$$0$$i|0;HEAP32[$16>>2]=$91;$92=$58>>$90;$93=$92<<$91;$94=HEAP32[$17>>2]|0;$95=HEAP32[$20>>2]|0;$96=$95+$94|0;$97=HEAP8[$96>>0]|0;$98=$97&255;$99=$93|$98;$100=$99&255;HEAP8[$96>>0]=$100;$101=HEAP32[$19>>2]|0;$102=$101+$$0$$i|0;HEAP32[$19>>2]=$102;$103=($90|0)>0;if($103){$$01$i=$90}else{break}}$$pre=HEAP8[$59>>0]|0;$105=$$pre}$104=$105&255;$106=$104+$bits$02|0;$107=$i$01+-1|0;$108=($i$01|0)>1;if($108){$bits$02=$106;$i$01=$107;$ix$03=$53;$xr$04=$54}else{$bits$0$lcssa=$106;break}}return $bits$0$lcssa|0}function _lame_encode_mp3_frame($gfc,$inbuf_l,$inbuf_r,$mp3buf,$mp3buf_size){$gfc=$gfc|0;$inbuf_l=$inbuf_l|0;$inbuf_r=$inbuf_r|0;$mp3buf=$mp3buf|0;$mp3buf_size=$mp3buf_size|0;var $$$i=0,$$0=0,$$lcssa=0,$$lcssa116=0.0,$$lcssa117=0,$$lcssa118=0.0,$$lcssa118$lcssa=0.0,$$lcssa119=0.0,$$lcssa119$lcssa=0.0,$$lcssa121=0,$$pn$i=0.0,$$pn1$i=0.0,$$pre=0,$$pre$i=0,$$pre$i2=0,$$pre$i4=0,$$pre$phi$iZ2D=0,$$pre10$i=0,$$pre6$i=0,$$pre92=0;var $0=0,$1=0,$10=0,$100=0,$101=0.0,$102=0,$103=0.0,$104=0,$105=0,$106=0,$107=0,$108=0.0,$109=0,$11=0,$110=0.0,$111=0,$112=0,$113=0,$114=0.0,$115=0;var $116=0.0,$117=0.0,$118=0.0,$119=0,$12=0,$120=0,$121=0.0,$122=0,$123=0,$124=0.0,$125=0,$126=0.0,$127=0.0,$128=0.0,$129=0.0,$13=0,$130=0,$131=0.0,$132=0,$133=0.0;var $134=0.0,$135=0.0,$136=0.0,$137=0.0,$138=0.0,$139=0,$14=0,$140=0,$141=0.0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0;var $152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0.0,$162=0.0,$163=0,$164=0.0,$165=0.0,$166=0,$167=0,$168=0,$169=0,$17=0;var $170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0,$184=0,$185=0,$186=0,$187=0,$188=0;var $189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0.0,$195=0.0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0,$201=0,$202=0,$203=0.0,$204=0.0,$205=0;var $206=0,$207=0,$208=0,$209=0,$21=0,$210=0,$211=0,$212=0,$213=0.0,$214=0,$215=0,$216=0,$217=0,$218=0,$219=0,$22=0,$220=0,$221=0,$222=0,$223=0;var $224=0,$225=0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0,$231=0,$232=0,$233=0,$234=0,$235=0,$236=0,$237=0,$238=0,$239=0,$24=0,$240=0,$241=0;var $242=0,$243=0,$244=0,$245=0,$246=0,$247=0,$248=0,$249=0,$25=0,$250=0,$251=0,$252=0,$253=0,$254=0,$255=0,$256=0,$257=0,$258=0,$259=0,$26=0;var $260=0,$261=0,$262=0,$263=0,$264=0.0,$265=0.0,$266=0.0,$267=0.0,$268=0.0,$269=0.0,$27=0,$270=0.0,$271=0.0,$272=0.0,$273=0.0,$274=0.0,$275=0.0,$276=0.0,$277=0.0,$278=0.0;var $279=0.0,$28=0,$280=0.0,$281=0.0,$282=0,$283=0,$284=0,$285=0,$286=0,$287=0,$288=0.0,$289=0.0,$29=0,$290=0,$291=0,$292=0.0,$293=0.0,$294=0.0,$295=0.0,$296=0.0;var $297=0.0,$298=0.0,$299=0.0,$3=0,$30=0,$300=0.0,$301=0.0,$302=0.0,$303=0.0,$304=0.0,$305=0.0,$306=0.0,$307=0.0,$308=0.0,$309=0.0,$31=0,$310=0.0,$311=0.0,$312=0.0,$313=0.0;var $314=0.0,$315=0.0,$316=0.0,$317=0.0,$318=0.0,$319=0,$32=0,$320=0,$321=0.0,$322=0.0,$323=0,$324=0,$325=0,$326=0,$327=0.0,$328=0.0,$329=0,$33=0,$330=0,$331=0;var $332=0,$333=0,$334=0,$335=0,$336=0,$337=0,$338=0,$339=0,$34=0,$340=0,$341=0,$342=0,$343=0,$344=0,$345=0,$346=0,$347=0,$348=0,$349=0,$35=0;var $350=0,$351=0.0,$352=0,$353=0,$354=0,$355=0,$356=0.0,$357=0.0,$358=0,$359=0,$36=0,$360=0,$361=0,$362=0,$363=0,$364=0,$365=0,$366=0,$367=0,$368=0;var $369=0,$37=0,$370=0,$371=0,$372=0,$373=0,$374=0,$375=0,$376=0,$377=0,$378=0,$379=0,$38=0,$380=0,$381=0,$382=0,$383=0,$384=0,$385=0,$386=0;var $387=0,$388=0,$389=0,$39=0,$390=0,$391=0,$392=0,$393=0,$394=0,$395=0,$396=0,$397=0,$398=0,$399=0,$4=0,$40=0,$400=0,$401=0,$402=0,$403=0;var $404=0,$405=0,$406=0,$407=0,$408=0,$409=0,$41=0,$410=0,$411=0,$412=0,$413=0,$414=0,$415=0,$416=0,$417=0,$418=0,$419=0,$42=0,$420=0,$43=0;var $44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0;var $62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0.0,$78=0,$79=0.0,$8=0;var $80=0.0,$81=0,$82=0,$83=0.0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0;var $99=0,$blocktype=0,$bufp=0,$ch$02$i=0,$ch$02$i8=0,$ch$069=0,$ch$173=0,$ch$254$us=0,$ch$349=0,$ch$439$us=0,$ch$533$us=0,$ch$632=0,$exitcond=0,$exitcond86=0,$exitcond91=0,$f$0$lcssa=0.0,$f$045$us=0.0,$f$140$us=0.0,$gr$03$i=0,$gr$03$i6=0;var $gr$076=0,$gr$161$us=0,$gr$252=0,$gr$343$us=0,$gr$435$us=0,$gr2_max$0$i=0.0,$i$06$i=0,$inbuf=0,$j$030=0,$j$07$i=0,$j$1$i=0,$j$131=0,$masking_LR=0,$masking_MS=0,$masking_MS$sink=0,$max_pow$0$i=0.0,$max_pow$1$i=0.0,$ms_ener_ratio=0,$or$cond=0,$or$cond101=0;var $pe=0,$pe_MS=0,$primebuff0$i=0,$primebuff1$i=0,$sum_pe_LR$064$us=0.0,$sum_pe_LR$156$us=0.0,$sum_pe_MS$063$us=0.0,$sum_pe_MS$155$us=0.0,$tot_ener=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+20112|0;$primebuff0$i=sp+12056|0;$primebuff1$i=sp+4000|0;$masking_LR=sp+2048|0;$masking_MS=sp+96|0;$inbuf=sp+88|0;$tot_ener=sp+56|0;$ms_ener_ratio=sp+8|0;$pe=sp+40|0;$pe_MS=sp+24|0;$bufp=sp;$blocktype=sp+16|0;$0=$ms_ener_ratio;$1=$0;HEAP32[$1>>2]=1056964608;$2=$0+4|0;$3=$2;HEAP32[$3>>2]=1056964608;HEAP32[$pe>>2]=0|0;HEAP32[$pe+4>>2]=0|0;HEAP32[$pe+8>>2]=0|0;HEAP32[$pe+12>>2]=0|0;HEAP32[$pe_MS>>2]=0|0;HEAP32[$pe_MS+4>>2]=0|0;HEAP32[$pe_MS+8>>2]=0|0;HEAP32[$pe_MS+12>>2]=0|0;HEAP32[$inbuf>>2]=$inbuf_l;$4=$inbuf+4|0;HEAP32[$4>>2]=$inbuf_r;$5=$gfc+4|0;$6=HEAP32[$5>>2]|0;$7=($6|0)==0;if($7){$8=$gfc+76|0;$9=HEAP32[$8>>2]|0;$10=$9*576|0;HEAP32[$5>>2]=1;_memset($primebuff0$i|0,0,8056)|0;_memset($primebuff1$i|0,0,8056)|0;$11=$10+862|0;$12=($11|0)>0;if($12){$13=$gfc+72|0;$i$06$i=0;$j$07$i=0;while(1){$16=($i$06$i|0)<($10|0);if($16){$17=$primebuff0$i+($i$06$i<<2)|0;HEAPF32[$17>>2]=0.0;$18=HEAP32[$13>>2]|0;$19=($18|0)==2;if($19){$20=$primebuff1$i+($i$06$i<<2)|0;HEAPF32[$20>>2]=0.0;$j$1$i=$j$07$i}else{$j$1$i=$j$07$i}}else{$21=$inbuf_l+($j$07$i<<2)|0;$22=HEAP32[$21>>2]|0;$23=$primebuff0$i+($i$06$i<<2)|0;HEAP32[$23>>2]=$22;$24=HEAP32[$13>>2]|0;$25=($24|0)==2;if($25){$26=$inbuf_r+($j$07$i<<2)|0;$27=HEAP32[$26>>2]|0;$28=$primebuff1$i+($i$06$i<<2)|0;HEAP32[$28>>2]=$27}$29=$j$07$i+1|0;$j$1$i=$29}$30=$i$06$i+1|0;$exitcond91=($30|0)==($11|0);if($exitcond91){break}else{$i$06$i=$30;$j$07$i=$j$1$i}}}$14=($9|0)>0;if($14){$15=$gfc+72|0;$$pre$i=HEAP32[$15>>2]|0;$31=$$pre$i;$415=$9;$gr$03$i=0;while(1){$32=($31|0)>0;if($32){$ch$02$i=0;while(1){$33=((($gfc+304|0)+($gr$03$i*10504|0)|0)+($ch$02$i*5252|0)|0)+4788|0;HEAP32[$33>>2]=2;$34=$ch$02$i+1|0;$35=HEAP32[$15>>2]|0;$36=($34|0)<($35|0);if($36){$ch$02$i=$34}else{$$lcssa121=$35;break}}$$pre10$i=HEAP32[$8>>2]|0;$39=$$pre10$i;$416=$$lcssa121}else{$39=$415;$416=$31}$37=$gr$03$i+1|0;$38=($37|0)<($39|0);if($38){$31=$416;$415=$39;$gr$03$i=$37}else{break}}}_mdct_sub48($gfc,$primebuff0$i,$primebuff1$i)}$40=$gfc+84752|0;HEAP32[$40>>2]=0;$41=$gfc+39832|0;$42=HEAP32[$41>>2]|0;$43=$gfc+39836|0;$44=HEAP32[$43>>2]|0;$45=$44-$42|0;HEAP32[$43>>2]=$45;$46=($45|0)<0;if($46){$47=$gfc+64|0;$48=HEAP32[$47>>2]|0;$49=$48+$45|0;HEAP32[$43>>2]=$49;HEAP32[$40>>2]=1}$50=$bufp;$51=$50;HEAP32[$51>>2]=0;$52=$50+4|0;$53=$52;HEAP32[$53>>2]=0;$54=$gfc+76|0;$55=HEAP32[$54>>2]|0;$56=($55|0)>0;L30:do{if($56){$57=$gfc+72|0;$58=$gfc+180|0;$gr$076=0;while(1){$59=HEAP32[$57>>2]|0;$60=($59|0)>0;if($60){$61=$gr$076*576|0;$62=$61+304|0;$ch$069=0;while(1){$63=$inbuf+($ch$069<<2)|0;$64=HEAP32[$63>>2]|0;$65=$64+($62<<2)|0;$66=$bufp+($ch$069<<2)|0;HEAP32[$66>>2]=$65;$67=$ch$069+1|0;$68=($67|0)<($59|0);if($68){$ch$069=$67}else{break}}}$69=$pe+($gr$076<<3)|0;$70=$pe_MS+($gr$076<<3)|0;$71=$tot_ener+($gr$076<<4)|0;$72=_L3psycho_anal_vbr($gfc,$bufp,$gr$076,$masking_LR,$masking_MS,$69,$70,$71,$blocktype)|0;$73=($72|0)==0;if(!$73){$$0=-4;break}$74=HEAP32[$58>>2]|0;$75=($74|0)==1;if($75){$76=($tot_ener+($gr$076<<4)|0)+8|0;$77=+HEAPF32[$76>>2];$78=($tot_ener+($gr$076<<4)|0)+12|0;$79=+HEAPF32[$78>>2];$80=$79+$77;$81=$ms_ener_ratio+($gr$076<<2)|0;HEAPF32[$81>>2]=$80;$82=$80>0.0;if($82){$83=$79/$80;HEAPF32[$81>>2]=$83}}$84=HEAP32[$57>>2]|0;$85=($84|0)>0;if($85){$ch$173=0;while(1){$86=$blocktype+($ch$173<<2)|0;$87=HEAP32[$86>>2]|0;$88=((($gfc+304|0)+($gr$076*10504|0)|0)+($ch$173*5252|0)|0)+4788|0;HEAP32[$88>>2]=$87;$89=((($gfc+304|0)+($gr$076*10504|0)|0)+($ch$173*5252|0)|0)+4792|0;HEAP32[$89>>2]=0;$90=$ch$173+1|0;$91=($90|0)<($84|0);if($91){$ch$173=$90}else{break}}}$92=$gr$076+1|0;$93=HEAP32[$54>>2]|0;$94=($92|0)<($93|0);if($94){$gr$076=$92}else{$111=$93;break L30}}STACKTOP=sp;return $$0|0}else{$111=$55}}while(0);$95=$gfc+85796|0;$96=HEAP32[$95>>2]|0;$97=HEAP32[$96>>2]|0;$98=($97|0)==0;do{if($98){$99=$96+8|0;HEAPF32[$99>>2]=1.0}else{$100=$gfc+27804|0;$101=+HEAPF32[$100>>2];$102=$gfc+27812|0;$103=+HEAPF32[$102>>2];$104=$gfc+72|0;$105=HEAP32[$104>>2]|0;$106=($105|0)==2;if($106){$107=$gfc+27808|0;$108=+HEAPF32[$107>>2];$109=$gfc+27816|0;$110=+HEAPF32[$109>>2];$$pn$i=$108;$$pn1$i=$110}else{$$pn$i=$101;$$pn1$i=$103}$gr2_max$0$i=$103+$$pn1$i;$max_pow$0$i=$101+$$pn$i;$112=($111|0)==2;$113=$max_pow$0$i>$gr2_max$0$i;$114=$113?$max_pow$0$i:$gr2_max$0$i;$max_pow$1$i=$112?$114:$max_pow$0$i;$115=$96+4|0;$116=+HEAPF32[$115>>2];$117=$116*0.5;$118=$117*$max_pow$1$i;$119=$118>0.03125;if($119){$120=$96+8|0;$121=+HEAPF32[$120>>2];$122=!($121>=1.0);if($122){$123=$96+12|0;$124=+HEAPF32[$123>>2];$125=$121<$124;if($125){HEAPF32[$120>>2]=$124;$$pre$phi$iZ2D=$123}else{$$pre$phi$iZ2D=$123}}else{HEAPF32[$120>>2]=1.0;$$pre$i2=$96+12|0;$$pre$phi$iZ2D=$$pre$i2}HEAPF32[$$pre$phi$iZ2D>>2]=1.0;break}$126=$118;$127=$126*31.98;$128=$127+6.2500000000000001E-4;$129=$128;$130=$96+8|0;$131=+HEAPF32[$130>>2];$132=!($131>=$129);do{if($132){$140=$96+12|0;$141=+HEAPF32[$140>>2];$142=!($141>=$129);if(!$142){HEAPF32[$130>>2]=$129;break}$143=$131<$141;if($143){HEAPF32[$130>>2]=$141}}else{$133=$129;$134=$133*0.074999999999999997;$135=$134+0.92500000000000004;$136=$131;$137=$136*$135;$138=$137;HEAPF32[$130>>2]=$138;$139=$138<$129;if($139){HEAPF32[$130>>2]=$129}}}while(0);$144=$96+12|0;HEAPF32[$144>>2]=$129}}while(0);$145=HEAP32[$inbuf>>2]|0;_mdct_sub48($gfc,$145,$inbuf_r);$146=$gfc+84756|0;HEAP32[$146>>2]=0;$147=$gfc+80|0;$148=HEAP32[$147>>2]|0;$149=($148|0)==0;do{if($149){$150=$gfc+180|0;$151=HEAP32[$150>>2]|0;$152=($151|0)==1;if($152){$153=HEAP32[$54>>2]|0;$154=($153|0)>0;if($154){$155=$gfc+72|0;$156=HEAP32[$155>>2]|0;$157=($156|0)>0;if($157){$gr$161$us=0;$sum_pe_LR$064$us=0.0;$sum_pe_MS$063$us=0.0;while(1){$ch$254$us=0;$sum_pe_LR$156$us=$sum_pe_LR$064$us;$sum_pe_MS$155$us=$sum_pe_MS$063$us;while(1){$160=($pe_MS+($gr$161$us<<3)|0)+($ch$254$us<<2)|0;$161=+HEAPF32[$160>>2];$162=$161+$sum_pe_MS$155$us;$163=($pe+($gr$161$us<<3)|0)+($ch$254$us<<2)|0;$164=+HEAPF32[$163>>2];$165=$164+$sum_pe_LR$156$us;$166=$ch$254$us+1|0;$167=($166|0)<($156|0);if($167){$ch$254$us=$166;$sum_pe_LR$156$us=$165;$sum_pe_MS$155$us=$162}else{$$lcssa118=$162;$$lcssa119=$165;break}}$158=$gr$161$us+1|0;$159=($158|0)<($153|0);if($159){$gr$161$us=$158;$sum_pe_LR$064$us=$$lcssa119;$sum_pe_MS$063$us=$$lcssa118}else{$$lcssa118$lcssa=$$lcssa118;$$lcssa119$lcssa=$$lcssa119;break}}$168=!($$lcssa118$lcssa<=$$lcssa119$lcssa);if($168){$180=0;break}}}$169=$153+-1|0;$170=$gfc+5092|0;$171=HEAP32[$170>>2]|0;$172=$gfc+10344|0;$173=HEAP32[$172>>2]|0;$174=($171|0)==($173|0);if($174){$175=(($gfc+304|0)+($169*10504|0)|0)+4788|0;$176=HEAP32[$175>>2]|0;$177=(($gfc+304|0)+($169*10504|0)|0)+10040|0;$178=HEAP32[$177>>2]|0;$179=($176|0)==($178|0);if($179){HEAP32[$146>>2]=2;$180=1}else{$180=0}}else{$180=0}}else{$180=0}}else{HEAP32[$146>>2]=2;$180=1}}while(0);$masking_MS$sink=$180?$masking_MS:$masking_LR;$181=$180?$pe_MS:$pe;$182=$gfc+140|0;$183=HEAP32[$182>>2]|0;$184=($183|0)==0;if(!$184){$185=$gfc+85804|0;$186=HEAP32[$185>>2]|0;$187=($186|0)==(0|0);if(!$187){$188=HEAP32[$54>>2]|0;$189=($188|0)>0;if($189){$190=$gfc+72|0;$$pre=HEAP32[$190>>2]|0;$191=$$pre;$417=$188;$gr$252=0;while(1){$192=($191|0)>0;if($192){$193=$ms_ener_ratio+($gr$252<<2)|0;$194=+HEAPF32[$193>>2];$195=$194;$ch$349=0;while(1){$196=HEAP32[$185>>2]|0;$197=($196+90904|0)+($gr$252<<3)|0;HEAPF64[$197>>3]=0.0;$198=($196+90920|0)+($gr$252<<3)|0;HEAPF64[$198>>3]=$195;$199=((($gfc+304|0)+($gr$252*10504|0)|0)+($ch$349*5252|0)|0)+4788|0;$200=HEAP32[$199>>2]|0;$201=(($196+203288|0)+($gr$252<<3)|0)+($ch$349<<2)|0;HEAP32[$201>>2]=$200;$202=($181+($gr$252<<3)|0)+($ch$349<<2)|0;$203=+HEAPF32[$202>>2];$204=$203;$205=(($196+189240|0)+($gr$252<<5)|0)+($ch$349<<3)|0;HEAPF64[$205>>3]=$204;$206=(($196+54040|0)+($gr$252*9216|0)|0)+($ch$349*4608|0)|0;$207=(($gfc+304|0)+($gr$252*10504|0)|0)+($ch$349*5252|0)|0;_memcpy($206|0,$207|0,2304)|0;$208=HEAP32[$146>>2]|0;$209=($208|0)==2;if($209){$210=$ch$349+2|0;$211=HEAP32[$185>>2]|0;$212=(($211+197144|0)+($gr$252<<5)|0)+($210<<3)|0;$213=+HEAPF64[$212>>3];$214=(($211+197144|0)+($gr$252<<5)|0)+($ch$349<<3)|0;HEAPF64[$214>>3]=$213;$215=(($211+123704|0)+($gr$252<<15)|0)+($ch$349<<13)|0;$216=(($211+123704|0)+($gr$252<<15)|0)+($210<<13)|0;_memcpy($215|0,$216|0,8192)|0}$217=$ch$349+1|0;$218=HEAP32[$190>>2]|0;$219=($217|0)<($218|0);if($219){$ch$349=$217}else{$$lcssa117=$218;break}}$$pre92=HEAP32[$54>>2]|0;$222=$$pre92;$418=$$lcssa117}else{$222=$417;$418=$191}$220=$gr$252+1|0;$221=($220|0)<($222|0);if($221){$191=$418;$417=$222;$gr$252=$220}else{break}}}}}$223=$gfc+104|0;$224=HEAP32[$223>>2]|0;if(($224|0)==3|($224|0)==0){$225=$gfc+39760|0;$226=HEAP32[$225>>2]|0;$227=$gfc+39756|0;HEAP32[$227>>2]=$226;$228=$gfc+39764|0;$229=HEAP32[$228>>2]|0;HEAP32[$225>>2]=$229;$230=$gfc+39768|0;$231=HEAP32[$230>>2]|0;HEAP32[$228>>2]=$231;$232=$gfc+39772|0;$233=HEAP32[$232>>2]|0;HEAP32[$230>>2]=$233;$234=$gfc+39776|0;$235=HEAP32[$234>>2]|0;HEAP32[$232>>2]=$235;$236=$gfc+39780|0;$237=HEAP32[$236>>2]|0;HEAP32[$234>>2]=$237;$238=$gfc+39784|0;$239=HEAP32[$238>>2]|0;HEAP32[$236>>2]=$239;$240=$gfc+39788|0;$241=HEAP32[$240>>2]|0;HEAP32[$238>>2]=$241;$242=$gfc+39792|0;$243=HEAP32[$242>>2]|0;HEAP32[$240>>2]=$243;$244=$gfc+39796|0;$245=HEAP32[$244>>2]|0;HEAP32[$242>>2]=$245;$246=$gfc+39800|0;$247=HEAP32[$246>>2]|0;HEAP32[$244>>2]=$247;$248=$gfc+39804|0;$249=HEAP32[$248>>2]|0;HEAP32[$246>>2]=$249;$250=$gfc+39808|0;$251=HEAP32[$250>>2]|0;HEAP32[$248>>2]=$251;$252=$gfc+39812|0;$253=HEAP32[$252>>2]|0;HEAP32[$250>>2]=$253;$254=$gfc+39816|0;$255=HEAP32[$254>>2]|0;HEAP32[$252>>2]=$255;$256=$gfc+39820|0;$257=HEAP32[$256>>2]|0;HEAP32[$254>>2]=$257;$258=$gfc+39824|0;$259=HEAP32[$258>>2]|0;HEAP32[$256>>2]=$259;$260=$gfc+39828|0;$261=HEAP32[$260>>2]|0;HEAP32[$258>>2]=$261;$262=HEAP32[$54>>2]|0;$263=($262|0)>0;$264=(HEAP32[tempDoublePtr>>2]=$245,+HEAPF32[tempDoublePtr>>2]);$265=(HEAP32[tempDoublePtr>>2]=$226,+HEAPF32[tempDoublePtr>>2]);$266=(HEAP32[tempDoublePtr>>2]=$229,+HEAPF32[tempDoublePtr>>2]);$267=(HEAP32[tempDoublePtr>>2]=$261,+HEAPF32[tempDoublePtr>>2]);$268=(HEAP32[tempDoublePtr>>2]=$231,+HEAPF32[tempDoublePtr>>2]);$269=(HEAP32[tempDoublePtr>>2]=$259,+HEAPF32[tempDoublePtr>>2]);$270=(HEAP32[tempDoublePtr>>2]=$233,+HEAPF32[tempDoublePtr>>2]);$271=(HEAP32[tempDoublePtr>>2]=$257,+HEAPF32[tempDoublePtr>>2]);$272=(HEAP32[tempDoublePtr>>2]=$235,+HEAPF32[tempDoublePtr>>2]);$273=(HEAP32[tempDoublePtr>>2]=$255,+HEAPF32[tempDoublePtr>>2]);$274=(HEAP32[tempDoublePtr>>2]=$237,+HEAPF32[tempDoublePtr>>2]);$275=(HEAP32[tempDoublePtr>>2]=$253,+HEAPF32[tempDoublePtr>>2]);$276=(HEAP32[tempDoublePtr>>2]=$239,+HEAPF32[tempDoublePtr>>2]);$277=(HEAP32[tempDoublePtr>>2]=$251,+HEAPF32[tempDoublePtr>>2]);$278=(HEAP32[tempDoublePtr>>2]=$241,+HEAPF32[tempDoublePtr>>2]);$279=(HEAP32[tempDoublePtr>>2]=$249,+HEAPF32[tempDoublePtr>>2]);$280=(HEAP32[tempDoublePtr>>2]=$243,+HEAPF32[tempDoublePtr>>2]);$281=(HEAP32[tempDoublePtr>>2]=$247,+HEAPF32[tempDoublePtr>>2]);$282=$gfc+72|0;$283=HEAP32[$282>>2]|0;$284=($283|0)>0;$or$cond=$263&$284;if($or$cond){$f$045$us=0.0;$gr$343$us=0;while(1){$ch$439$us=0;$f$140$us=$f$045$us;while(1){$287=($181+($gr$343$us<<3)|0)+($ch$439$us<<2)|0;$288=+HEAPF32[$287>>2];$289=$288+$f$140$us;$290=$ch$439$us+1|0;$291=($290|0)<($283|0);if($291){$ch$439$us=$290;$f$140$us=$289}else{$$lcssa116=$289;break}}$285=$gr$343$us+1|0;$286=($285|0)<($262|0);if($286){$f$045$us=$$lcssa116;$gr$343$us=$285}else{$f$0$lcssa=$$lcssa116;break}}}else{$f$0$lcssa=0.0}HEAPF32[$260>>2]=$f$0$lcssa;$292=$f$0$lcssa+$265;$293=$292*-0.10394349694252014;$294=$293+$264;$295=$267+$266;$296=$295*-0.18920649588108063;$297=$296+$294;$298=$269+$268;$299=$298*-0.21623599529266357;$300=$299+$297;$301=$271+$270;$302=$301*-0.15591500699520111;$303=$302+$300;$304=$273+$272;$305=$304*3.8980449615198001E-17;$306=$305+$303;$307=$275+$274;$308=$307*0.23387250304222107;$309=$308+$306;$310=$277+$276;$311=$310*0.50454998016357422;$312=$311+$309;$313=$279+$278;$314=$313*0.75682497024536133;$315=$314+$312;$316=$281+$280;$317=$316*0.93549001216888427;$318=$317+$315;$319=$262*3350|0;$320=Math_imul($319,$283)|0;$321=+($320|0);$322=$321/$318;$323=($283|0)>0;$or$cond101=$263&$323;if($or$cond101){$gr$435$us=0;while(1){$ch$533$us=0;while(1){$326=($181+($gr$435$us<<3)|0)+($ch$533$us<<2)|0;$327=+HEAPF32[$326>>2];$328=$327*$322;HEAPF32[$326>>2]=$328;$329=$ch$533$us+1|0;$330=($329|0)<($283|0);if($330){$ch$533$us=$329}else{break}}$324=$gr$435$us+1|0;$325=($324|0)<($262|0);if($325){$gr$435$us=$324}else{break}}}}$331=$gfc+85812|0;$332=HEAP32[$331>>2]|0;FUNCTION_TABLE_viiii[$332&7]($gfc,$181,$ms_ener_ratio,$masking_MS$sink);_format_bitstream($gfc)|0;$333=_copy_buffer($gfc,$mp3buf,$mp3buf_size,1)|0;$334=$gfc+156|0;$335=HEAP32[$334>>2]|0;$336=($335|0)==0;if(!$336){_AddVbrFrame($gfc)}$337=HEAP32[$182>>2]|0;$338=($337|0)==0;if(!$338){$339=$gfc+85804|0;$340=HEAP32[$339>>2]|0;$341=($340|0)==(0|0);if(!$341){$342=HEAP32[$54>>2]|0;$343=$342*576|0;$344=$gfc+72|0;$345=HEAP32[$344>>2]|0;$346=($345|0)>0;if($346){$ch$632=0;while(1){$j$030=0;while(1){$349=$j$030+$343|0;$350=(($340+24|0)+($ch$632*12800|0)|0)+($349<<3)|0;$351=+HEAPF64[$350>>3];$352=(($340+24|0)+($ch$632*12800|0)|0)+($j$030<<3)|0;HEAPF64[$352>>3]=$351;$353=$j$030+1|0;$exitcond=($353|0)==272;if($exitcond){break}else{$j$030=$353}}$347=$inbuf+($ch$632<<2)|0;$348=HEAP32[$347>>2]|0;$j$131=272;while(1){$354=$j$131+-272|0;$355=$348+($354<<2)|0;$356=+HEAPF32[$355>>2];$357=$356;$358=(($340+24|0)+($ch$632*12800|0)|0)+($j$131<<3)|0;HEAPF64[$358>>3]=$357;$359=$j$131+1|0;$exitcond86=($359|0)==1600;if($exitcond86){break}else{$j$131=$359}}$360=$ch$632+1|0;$361=($360|0)<($345|0);if($361){$ch$632=$360}else{break}}}$362=$gfc+84908|0;HEAPF32[$362>>2]=1.0;_set_frame_pinfo($gfc,$masking_MS$sink)}}$363=$gfc+84748|0;$364=HEAP32[$363>>2]|0;$365=$364+1|0;HEAP32[$363>>2]=$365;$366=$gfc+84744|0;$367=HEAP32[$366>>2]|0;$368=(($gfc+84040|0)+($367*20|0)|0)+16|0;$369=HEAP32[$368>>2]|0;$370=$369+1|0;HEAP32[$368>>2]=$370;$371=$gfc+84356|0;$372=HEAP32[$371>>2]|0;$373=$372+1|0;HEAP32[$371>>2]=$373;$374=$gfc+72|0;$375=HEAP32[$374>>2]|0;$376=($375|0)==2;if($376){$377=HEAP32[$146>>2]|0;$378=HEAP32[$366>>2]|0;$379=(($gfc+84040|0)+($378*20|0)|0)+($377<<2)|0;$380=HEAP32[$379>>2]|0;$381=$380+1|0;HEAP32[$379>>2]=$381;$382=HEAP32[$146>>2]|0;$383=($gfc+84340|0)+($382<<2)|0;$384=HEAP32[$383>>2]|0;$385=$384+1|0;HEAP32[$383>>2]=$385}$386=HEAP32[$54>>2]|0;$387=($386|0)>0;if(!$387){$$0=$333;STACKTOP=sp;return $$0|0}$388=$gfc+84740|0;$$pre$i4=HEAP32[$374>>2]|0;$389=$$pre$i4;$419=$386;$gr$03$i6=0;while(1){$390=($389|0)>0;if($390){$ch$02$i8=0;while(1){$391=((($gfc+304|0)+($gr$03$i6*10504|0)|0)+($ch$02$i8*5252|0)|0)+4788|0;$392=HEAP32[$391>>2]|0;$393=((($gfc+304|0)+($gr$03$i6*10504|0)|0)+($ch$02$i8*5252|0)|0)+4792|0;$394=HEAP32[$393>>2]|0;$395=($394|0)==0;$$$i=$395?$392:4;$396=HEAP32[$366>>2]|0;$397=(($gfc+84360|0)+($396*24|0)|0)+($$$i<<2)|0;$398=HEAP32[$397>>2]|0;$399=$398+1|0;HEAP32[$397>>2]=$399;$400=HEAP32[$366>>2]|0;$401=(($gfc+84360|0)+($400*24|0)|0)+20|0;$402=HEAP32[$401>>2]|0;$403=$402+1|0;HEAP32[$401>>2]=$403;$404=($gfc+84720|0)+($$$i<<2)|0;$405=HEAP32[$404>>2]|0;$406=$405+1|0;HEAP32[$404>>2]=$406;$407=HEAP32[$388>>2]|0;$408=$407+1|0;HEAP32[$388>>2]=$408;$409=$ch$02$i8+1|0;$410=HEAP32[$374>>2]|0;$411=($409|0)<($410|0);if($411){$ch$02$i8=$409}else{$$lcssa=$410;break}}$$pre6$i=HEAP32[$54>>2]|0;$414=$$pre6$i;$420=$$lcssa}else{$414=$419;$420=$389}$412=$gr$03$i6+1|0;$413=($412|0)<($414|0);if($413){$389=$420;$419=$414;$gr$03$i6=$412}else{$$0=$333;break}}STACKTOP=sp;return $$0|0}function _fft_short($gfc,$x_real,$chn,$buffer){$gfc=$gfc|0;$x_real=$x_real|0;$chn=$chn|0;$buffer=$buffer|0;var $$pre=0,$0=0,$1=0,$10=0.0,$11=0,$12=0,$13=0.0,$14=0.0,$15=0,$16=0,$17=0.0,$18=0,$19=0,$2=0,$20=0.0,$21=0.0,$22=0.0,$23=0.0,$24=0,$25=0;var $26=0.0,$27=0,$28=0,$29=0.0,$3=0,$30=0.0,$31=0,$32=0,$33=0.0,$34=0,$35=0,$36=0.0,$37=0.0,$38=0.0,$39=0.0,$4=0,$40=0,$41=0.0,$42=0.0,$43=0;var $44=0.0,$45=0,$46=0.0,$47=0,$48=0,$49=0,$5=0,$50=0.0,$51=0,$52=0,$53=0.0,$54=0.0,$55=0,$56=0,$57=0.0,$58=0,$59=0,$6=0,$60=0.0,$61=0.0;var $62=0.0,$63=0.0,$64=0,$65=0,$66=0.0,$67=0,$68=0,$69=0.0,$7=0,$70=0.0,$71=0,$72=0,$73=0.0,$74=0,$75=0,$76=0.0,$77=0.0,$78=0.0,$79=0.0,$8=0;var $80=0.0,$81=0,$82=0.0,$83=0,$84=0.0,$85=0,$86=0.0,$87=0,$88=0,$89=0,$9=0,$90=0,$b$01=0,$exitcond=0,$indvars$iv=0,$j$0=0,$scevgep=0,$sext=0,$x$0=0,label=0;var sp=0;sp=STACKTOP;$0=$buffer+($chn<<2)|0;$1=$gfc+85820|0;$b$01=0;$indvars$iv=$x_real;while(1){$2=($x_real+($b$01<<10)|0)+512|0;$3=$b$01+1|0;$sext=Math_imul($3,12582912)|0;$4=$sext>>16;$$pre=HEAP32[$0>>2]|0;$j$0=31;$x$0=$2;while(1){$5=$j$0<<2;$6=1720+$5|0;$7=HEAP8[$6>>0]|0;$8=$7&255;$9=1848+($8<<2)|0;$10=+HEAPF32[$9>>2];$11=$8+$4|0;$12=$$pre+($11<<2)|0;$13=+HEAPF32[$12>>2];$14=$13*$10;$15=127-$8|0;$16=1848+($15<<2)|0;$17=+HEAPF32[$16>>2];$18=$11+128|0;$19=$$pre+($18<<2)|0;$20=+HEAPF32[$19>>2];$21=$20*$17;$22=$14-$21;$23=$21+$14;$24=$8+64|0;$25=1848+($24<<2)|0;$26=+HEAPF32[$25>>2];$27=$11+64|0;$28=$$pre+($27<<2)|0;$29=+HEAPF32[$28>>2];$30=$29*$26;$31=63-$8|0;$32=1848+($31<<2)|0;$33=+HEAPF32[$32>>2];$34=$11+192|0;$35=$$pre+($34<<2)|0;$36=+HEAPF32[$35>>2];$37=$36*$33;$38=$30-$37;$39=$37+$30;$40=$x$0+-16|0;$41=$39+$23;HEAPF32[$40>>2]=$41;$42=$23-$39;$43=$x$0+-8|0;HEAPF32[$43>>2]=$42;$44=$38+$22;$45=$x$0+-12|0;HEAPF32[$45>>2]=$44;$46=$22-$38;$47=$x$0+-4|0;HEAPF32[$47>>2]=$46;$48=$8+1|0;$49=1848+($48<<2)|0;$50=+HEAPF32[$49>>2];$51=$11+1|0;$52=$$pre+($51<<2)|0;$53=+HEAPF32[$52>>2];$54=$53*$50;$55=126-$8|0;$56=1848+($55<<2)|0;$57=+HEAPF32[$56>>2];$58=$11+129|0;$59=$$pre+($58<<2)|0;$60=+HEAPF32[$59>>2];$61=$60*$57;$62=$54-$61;$63=$61+$54;$64=$8+65|0;$65=1848+($64<<2)|0;$66=+HEAPF32[$65>>2];$67=$11+65|0;$68=$$pre+($67<<2)|0;$69=+HEAPF32[$68>>2];$70=$69*$66;$71=62-$8|0;$72=1848+($71<<2)|0;$73=+HEAPF32[$72>>2];$74=$11+193|0;$75=$$pre+($74<<2)|0;$76=+HEAPF32[$75>>2];$77=$76*$73;$78=$70-$77;$79=$77+$70;$80=$79+$63;$81=$x$0+496|0;HEAPF32[$81>>2]=$80;$82=$63-$79;$83=$x$0+504|0;HEAPF32[$83>>2]=$82;$84=$78+$62;$85=$x$0+500|0;HEAPF32[$85>>2]=$84;$86=$62-$78;$87=$x$0+508|0;HEAPF32[$87>>2]=$86;$88=$j$0+-1|0;$89=($j$0|0)>0;if($89){$j$0=$88;$x$0=$40}else{break}}$90=HEAP32[$1>>2]|0;FUNCTION_TABLE_vii[$90&3]($indvars$iv,128);$scevgep=$indvars$iv+1024|0;$exitcond=($3|0)==3;if($exitcond){break}else{$b$01=$3;$indvars$iv=$scevgep}}return}function _fft_long($gfc,$x,$chn,$buffer){$gfc=$gfc|0;$x=$x|0;$chn=$chn|0;$buffer=$buffer|0;var $$0=0,$$pre=0,$0=0,$1=0,$10=0,$11=0,$12=0.0,$13=0,$14=0.0,$15=0.0,$16=0.0,$17=0.0,$18=0,$19=0,$2=0,$20=0.0,$21=0,$22=0.0,$23=0.0,$24=0;var $25=0,$26=0.0,$27=0,$28=0.0,$29=0.0,$3=0,$30=0.0,$31=0.0,$32=0,$33=0.0,$34=0.0,$35=0,$36=0.0,$37=0,$38=0.0,$39=0,$4=0,$40=0,$41=0,$42=0.0;var $43=0,$44=0.0,$45=0.0,$46=0,$47=0,$48=0.0,$49=0,$5=0,$50=0.0,$51=0.0,$52=0.0,$53=0.0,$54=0,$55=0,$56=0.0,$57=0,$58=0.0,$59=0.0,$6=0.0,$60=0;var $61=0,$62=0.0,$63=0,$64=0.0,$65=0.0,$66=0.0,$67=0.0,$68=0.0,$69=0,$7=0,$70=0.0,$71=0,$72=0.0,$73=0,$74=0.0,$75=0,$76=0,$77=0,$78=0,$79=0;var $8=0.0,$9=0.0,$jj$0=0,label=0,sp=0;sp=STACKTOP;$0=$x+2048|0;$1=$buffer+($chn<<2)|0;$$pre=HEAP32[$1>>2]|0;$$0=$0;$jj$0=127;while(1){$2=1720+$jj$0|0;$3=HEAP8[$2>>0]|0;$4=$3&255;$5=2360+($4<<2)|0;$6=+HEAPF32[$5>>2];$7=$$pre+($4<<2)|0;$8=+HEAPF32[$7>>2];$9=$8*$6;$10=$4|512;$11=2360+($10<<2)|0;$12=+HEAPF32[$11>>2];$13=$$pre+($10<<2)|0;$14=+HEAPF32[$13>>2];$15=$14*$12;$16=$9-$15;$17=$15+$9;$18=$4|256;$19=2360+($18<<2)|0;$20=+HEAPF32[$19>>2];$21=$$pre+($18<<2)|0;$22=+HEAPF32[$21>>2];$23=$22*$20;$24=$4|768;$25=2360+($24<<2)|0;$26=+HEAPF32[$25>>2];$27=$$pre+($24<<2)|0;$28=+HEAPF32[$27>>2];$29=$28*$26;$30=$23-$29;$31=$29+$23;$32=$$0+-16|0;$33=$31+$17;HEAPF32[$32>>2]=$33;$34=$17-$31;$35=$$0+-8|0;HEAPF32[$35>>2]=$34;$36=$30+$16;$37=$$0+-12|0;HEAPF32[$37>>2]=$36;$38=$16-$30;$39=$$0+-4|0;HEAPF32[$39>>2]=$38;$40=$4+1|0;$41=2360+($40<<2)|0;$42=+HEAPF32[$41>>2];$43=$$pre+($40<<2)|0;$44=+HEAPF32[$43>>2];$45=$44*$42;$46=$4+513|0;$47=2360+($46<<2)|0;$48=+HEAPF32[$47>>2];$49=$$pre+($46<<2)|0;$50=+HEAPF32[$49>>2];$51=$50*$48;$52=$45-$51;$53=$51+$45;$54=$4+257|0;$55=2360+($54<<2)|0;$56=+HEAPF32[$55>>2];$57=$$pre+($54<<2)|0;$58=+HEAPF32[$57>>2];$59=$58*$56;$60=$4+769|0;$61=2360+($60<<2)|0;$62=+HEAPF32[$61>>2];$63=$$pre+($60<<2)|0;$64=+HEAPF32[$63>>2];$65=$64*$62;$66=$59-$65;$67=$65+$59;$68=$67+$53;$69=$$0+2032|0;HEAPF32[$69>>2]=$68;$70=$53-$67;$71=$$0+2040|0;HEAPF32[$71>>2]=$70;$72=$66+$52;$73=$$0+2036|0;HEAPF32[$73>>2]=$72;$74=$52-$66;$75=$$0+2044|0;HEAPF32[$75>>2]=$74;$76=$jj$0+-1|0;$77=($jj$0|0)>0;if($77){$$0=$32;$jj$0=$76}else{break}}$78=$gfc+85820|0;$79=HEAP32[$78>>2]|0;FUNCTION_TABLE_vii[$79&3]($x,512);return}function _init_fft($gfc){$gfc=$gfc|0;var $0=0.0,$1=0.0,$10=0.0,$11=0,$12=0,$13=0.0,$14=0.0,$15=0.0,$16=0.0,$17=0.0,$18=0.0,$19=0.0,$2=0.0,$20=0,$21=0,$22=0,$3=0.0,$4=0.0,$5=0.0,$6=0.0;var $7=0.0,$8=0.0,$9=0.0,$exitcond=0,$exitcond3=0,$i$02=0,$i$11=0,label=0,sp=0;sp=STACKTOP;$i$02=0;while(1){$0=+($i$02|0);$1=$0+0.5;$2=$1*0.0061359231515425647;$3=+Math_cos(+$2);$4=$3*0.5;$5=0.41999999999999998-$4;$6=$1*0.012271846303085129;$7=+Math_cos(+$6);$8=$7*0.080000000000000002;$9=$5+$8;$10=$9;$11=2360+($i$02<<2)|0;HEAPF32[$11>>2]=$10;$12=$i$02+1|0;$exitcond3=($12|0)==1024;if($exitcond3){$i$11=0;break}else{$i$02=$12}}while(1){$13=+($i$11|0);$14=$13+0.5;$15=$14*0.024543692606170259;$16=+Math_cos(+$15);$17=1.0-$16;$18=$17*0.5;$19=$18;$20=1848+($i$11<<2)|0;HEAPF32[$20>>2]=$19;$21=$i$11+1|0;$exitcond=($21|0)==128;if($exitcond){break}else{$i$11=$21}}$22=$gfc+85820|0;HEAP32[$22>>2]=1;return}function _fht($fz,$n){$fz=$fz|0;$n=$n|0;var $$sum=0,$0=0,$1=0,$10=0.0,$100=0.0,$101=0.0,$102=0.0,$103=0.0,$104=0.0,$105=0.0,$106=0.0,$107=0.0,$108=0,$109=0,$11=0.0,$110=0,$111=0.0,$112=0.0,$113=0.0,$114=0.0;var $115=0.0,$116=0.0,$117=0.0,$118=0.0,$119=0,$12=0,$120=0,$121=0,$122=0,$13=0.0,$14=0,$15=0.0,$16=0.0,$17=0.0,$18=0.0,$19=0.0,$2=0,$20=0.0,$21=0.0,$22=0.0;var $23=0,$24=0.0,$25=0.0,$26=0.0,$27=0,$28=0.0,$29=0.0,$3=0,$30=0.0,$31=0.0,$32=0,$33=0.0,$34=0.0,$35=0.0,$36=0.0,$37=0.0,$38=0.0,$39=0.0,$4=0,$40=0.0;var $41=0,$42=0,$43=0,$44=0,$45=0,$46=0.0,$47=0.0,$48=0.0,$49=0.0,$5=0,$50=0.0,$51=0.0,$52=0,$53=0,$54=0,$55=0.0,$56=0.0,$57=0,$58=0.0,$59=0.0;var $6=0,$60=0.0,$61=0.0,$62=0.0,$63=0.0,$64=0.0,$65=0.0,$66=0.0,$67=0.0,$68=0.0,$69=0.0,$7=0.0,$70=0,$71=0.0,$72=0.0,$73=0,$74=0.0,$75=0.0,$76=0.0,$77=0.0;var $78=0.0,$79=0.0,$8=0,$80=0,$81=0.0,$82=0.0,$83=0.0,$84=0,$85=0.0,$86=0.0,$87=0.0,$88=0.0,$89=0.0,$9=0.0,$90=0.0,$91=0.0,$92=0.0,$93=0.0,$94=0.0,$95=0.0;var $96=0.0,$97=0.0,$98=0.0,$99=0.0,$c1$02=0.0,$fi$0=0,$fi$1=0,$gi$0=0,$gi$1=0,$i$01=0,$k4$0=0,$s1$03=0.0,$tri$0=0,label=0,sp=0;sp=STACKTOP;$0=$n<<1;$1=$fz+($0<<2)|0;$k4$0=4;$tri$0=6456;while(1){$2=$k4$0>>1;$3=$k4$0<<1;$4=$k4$0*3|0;$5=$k4$0<<2;$6=$fz+($2<<2)|0;$fi$0=$fz;$gi$0=$6;while(1){$7=+HEAPF32[$fi$0>>2];$8=$fi$0+($k4$0<<2)|0;$9=+HEAPF32[$8>>2];$10=$7-$9;$11=$9+$7;$12=$fi$0+($3<<2)|0;$13=+HEAPF32[$12>>2];$14=$fi$0+($4<<2)|0;$15=+HEAPF32[$14>>2];$16=$13-$15;$17=$15+$13;$18=$11-$17;HEAPF32[$12>>2]=$18;$19=$17+$11;HEAPF32[$fi$0>>2]=$19;$20=$10-$16;HEAPF32[$14>>2]=$20;$21=$16+$10;HEAPF32[$8>>2]=$21;$22=+HEAPF32[$gi$0>>2];$23=$gi$0+($k4$0<<2)|0;$24=+HEAPF32[$23>>2];$25=$22-$24;$26=$24+$22;$27=$gi$0+($4<<2)|0;$28=+HEAPF32[$27>>2];$29=$28;$30=$29*1.4142135623730951;$31=$30;$32=$gi$0+($3<<2)|0;$33=+HEAPF32[$32>>2];$34=$33;$35=$34*1.4142135623730951;$36=$35;$37=$26-$36;HEAPF32[$32>>2]=$37;$38=$36+$26;HEAPF32[$gi$0>>2]=$38;$39=$25-$31;HEAPF32[$27>>2]=$39;$40=$31+$25;HEAPF32[$23>>2]=$40;$41=$gi$0+($5<<2)|0;$42=$fi$0+($5<<2)|0;$43=$42>>>0<$1>>>0;if($43){$fi$0=$42;$gi$0=$41}else{break}}$44=$tri$0+4|0;$45=($k4$0|0)>2;if($45){$46=+HEAPF32[$44>>2];$47=+HEAPF32[$tri$0>>2];$c1$02=$47;$i$01=1;$s1$03=$46;while(1){$48=$s1$03*2.0;$49=$48*$s1$03;$50=1.0-$49;$51=$48*$c1$02;$52=$fz+($i$01<<2)|0;$$sum=$k4$0-$i$01|0;$53=$fz+($$sum<<2)|0;$fi$1=$52;$gi$1=$53;while(1){$54=$fi$1+($k4$0<<2)|0;$55=+HEAPF32[$54>>2];$56=$55*$51;$57=$gi$1+($k4$0<<2)|0;$58=+HEAPF32[$57>>2];$59=$58*$50;$60=$56-$59;$61=$55*$50;$62=$58*$51;$63=$62+$61;$64=+HEAPF32[$fi$1>>2];$65=$64-$63;$66=$63+$64;$67=+HEAPF32[$gi$1>>2];$68=$67-$60;$69=$67+$60;$70=$fi$1+($4<<2)|0;$71=+HEAPF32[$70>>2];$72=$71*$51;$73=$gi$1+($4<<2)|0;$74=+HEAPF32[$73>>2];$75=$74*$50;$76=$72-$75;$77=$71*$50;$78=$74*$51;$79=$78+$77;$80=$fi$1+($3<<2)|0;$81=+HEAPF32[$80>>2];$82=$81-$79;$83=$79+$81;$84=$gi$1+($3<<2)|0;$85=+HEAPF32[$84>>2];$86=$85-$76;$87=$85+$76;$88=$83*$s1$03;$89=$86*$c1$02;$90=$88-$89;$91=$83*$c1$02;$92=$86*$s1$03;$93=$91+$92;$94=$66-$93;HEAPF32[$80>>2]=$94;$95=$93+$66;HEAPF32[$fi$1>>2]=$95;$96=$68-$90;HEAPF32[$73>>2]=$96;$97=$90+$68;HEAPF32[$57>>2]=$97;$98=$87*$c1$02;$99=$82*$s1$03;$100=$98-$99;$101=$87*$s1$03;$102=$82*$c1$02;$103=$101+$102;$104=$69-$103;HEAPF32[$84>>2]=$104;$105=$103+$69;HEAPF32[$gi$1>>2]=$105;$106=$65-$100;HEAPF32[$70>>2]=$106;$107=$100+$65;HEAPF32[$54>>2]=$107;$108=$gi$1+($5<<2)|0;$109=$fi$1+($5<<2)|0;$110=$109>>>0<$1>>>0;if($110){$fi$1=$109;$gi$1=$108}else{break}}$111=+HEAPF32[$tri$0>>2];$112=$111*$c1$02;$113=+HEAPF32[$44>>2];$114=$113*$s1$03;$115=$112-$114;$116=$113*$c1$02;$117=$111*$s1$03;$118=$116+$117;$119=$i$01+1|0;$120=($119|0)<($2|0);if($120){$c1$02=$115;$i$01=$119;$s1$03=$118}else{break}}}$121=$tri$0+8|0;$122=($5|0)<($0|0);if($122){$k4$0=$5;$tri$0=$121}else{break}}return}function _lame_get_id3v2_tag($gfp,$buffer,$size){$gfp=$gfp|0;$buffer=$buffer|0;$size=$size|0;var $$$i=0,$$$i$i=0,$$$i$i29=0,$$0=0,$$0$be$i$i=0,$$0$i=0,$$0$i$off0$i$i=0,$$0$i$off0$i$i18=0,$$0$i$off0$i$i66=0,$$0$i$off0$i22$i=0,$$0$i$off0$i30$i=0,$$0$i$off0$i35$i=0,$$0$i$off0$i8$i=0,$$0$i$off0$i8$i47=0,$$0$i$off0$i836$i=0,$$0$i$off0$i841$i=0,$$0$i$off0$v$i$i=0,$$0$i$off0$v$i$i17=0,$$0$i$off0$v$i$i65=0,$$0$i$off0$v$i21$i=0;var $$0$i$off0$v$i29$i=0,$$0$i$off0$v$i34$i=0,$$0$i$off0$v$i7$i=0,$$0$i$off0$v$i7$i46=0,$$0$i$off0$v$i735$i=0,$$0$i$off0$v$i740$i=0,$$0$i$off8$i$i=0,$$0$i$off8$i$i20=0,$$0$i$off8$i$i68=0,$$0$i$off8$i10$i=0,$$0$i$off8$i10$i49=0,$$0$i$off8$i1038$i=0,$$0$i$off8$i1043$i=0,$$0$i$off8$i24$i=0,$$0$i$off8$i32$i=0,$$0$i$off8$i37$i=0,$$0$i$off8$v$i$i=0,$$0$i$off8$v$i$i19=0,$$0$i$off8$v$i$i67=0,$$0$i$off8$v$i9$i=0;var $$0$i$off8$v$i9$i48=0,$$0$i23=0,$$0$i3$i$i=0,$$0$i3$off$i$i=0,$$0$i53=0,$$0$sum$i=0,$$0$sum30$i=0,$$0$sum45$i=0,$$01$ph8$i$i=0,$$010$i25$i=0,$$010$i33$i=0,$$010$i339$i=0,$$010$i344$i=0,$$010$i38$i=0,$$014$i$i=0,$$014$i$i25=0,$$014$i$i56=0,$$014$i19$i=0,$$014$i19$i36=0,$$014$i7$i=0;var $$015$i$i=0,$$02$lcssa$i12$i=0,$$02$lcssa$i24$i=0,$$02$ph7$i$i=0,$$023$i$i=0,$$023$i$i26=0,$$023$i$i57=0,$$023$i20$i=0,$$023$i20$i37=0,$$023$i8$i=0,$$048$i=0,$$05$i$i=0,$$05$i$i24=0,$$05$i$i55=0,$$05$i18$i=0,$$05$i18$i35=0,$$05$i6$i=0,$$0511$i=0,$$06$i$i=0,$$06$lcssa$i=0;var $$0610$i=0,$$09$i=0,$$1$i16$i=0,$$1$i5$i=0,$$17$i=0,$$idx$val=0,$$idx9=0,$$idx9$val=0,$$in$i$i=0,$$lobit=0,$$lobit85=0,$$pn=0,$$pn$i=0,$$pn$i14=0,$$pn$i62=0,$$pn40$i=0,$$pn46$i=0,$$pre$i$i=0,$$pre$i$i15=0,$$pre$i$i63=0;var $$pre$i12$i=0,$$pre$i12$i44=0,$$sink$i=0,$$sum$i=0,$$sum$i12=0,$$sum$i39=0,$$sum15$i=0,$$sum26$i=0,$$sum26$pn$i=0,$$sum27$i=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0;var $107=0,$108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0;var $125=0,$126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0;var $143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0;var $161=0,$162=0,$163=0,$164=0,$165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0;var $18=0,$180=0,$181=0,$182=0,$183=0,$184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0;var $198=0,$199=0,$2=0,$20=0,$200=0,$201=0,$202=0,$203=0,$204=0,$205=0,$206=0,$207=0,$208=0,$209=0,$21=0,$210=0,$211=0,$212=0,$213=0,$214=0;var $215=0,$216=0,$217=0,$218=0,$219=0,$22=0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0,$231=0,$232=0;var $233=0,$234=0,$235=0,$236=0,$237=0,$238=0,$239=0,$24=0,$240=0,$241=0,$242=0,$243=0,$244=0,$245=0,$246=0,$247=0,$248=0,$249=0,$25=0,$250=0;var $251=0,$252=0,$253=0,$254=0,$255=0,$256=0,$257=0,$258=0,$259=0,$26=0,$260=0,$261=0,$262=0,$263=0,$264=0,$265=0,$266=0,$267=0,$268=0,$269=0;var $27=0,$270=0,$271=0,$272=0,$273=0,$274=0,$275=0,$276=0,$277=0,$278=0,$279=0,$28=0,$280=0,$281=0,$282=0,$283=0,$284=0,$285=0,$286=0,$287=0;var $288=0,$289=0,$29=0,$290=0,$291=0,$292=0,$293=0,$294=0,$295=0,$296=0,$297=0,$298=0,$299=0,$3=0,$30=0,$300=0,$301=0,$302=0,$303=0,$304=0;var $305=0,$306=0,$307=0,$308=0,$309=0,$31=0,$310=0,$311=0,$312=0,$313=0,$314=0,$315=0,$316=0,$317=0,$318=0,$319=0,$32=0,$320=0,$321=0,$322=0;var $323=0,$324=0,$325=0,$326=0,$327=0,$328=0,$329=0,$33=0,$330=0,$331=0,$332=0,$333=0,$334=0,$335=0,$336=0,$337=0,$338=0,$339=0,$34=0,$340=0;var $341=0,$342=0,$343=0,$344=0,$345=0,$346=0,$347=0,$348=0,$349=0,$35=0,$350=0,$351=0,$352=0,$353=0,$354=0,$355=0,$356=0,$357=0,$358=0,$359=0;var $36=0.0,$360=0,$361=0,$362=0,$363=0,$364=0,$365=0,$366=0,$367=0,$368=0,$369=0,$37=0.0,$370=0,$371=0,$372=0,$373=0,$374=0,$375=0,$376=0,$377=0;var $378=0,$379=0,$38=0,$380=0,$381=0,$382=0,$383=0,$384=0,$385=0,$386=0,$387=0,$388=0,$389=0,$39=0,$390=0,$391=0,$392=0,$393=0,$394=0,$395=0;var $396=0,$397=0,$398=0,$399=0,$4=0,$40=0.0,$400=0,$401=0,$402=0,$403=0,$404=0,$405=0,$406=0,$407=0,$408=0,$409=0,$41=0.0,$410=0,$411=0,$412=0;var $413=0,$414=0,$415=0,$416=0,$417=0,$418=0,$419=0,$42=0,$420=0,$421=0,$422=0,$423=0,$424=0,$425=0,$426=0,$427=0,$428=0,$429=0,$43=0,$430=0;var $431=0,$432=0,$433=0,$434=0,$435=0,$436=0,$437=0,$438=0,$439=0,$44=0,$440=0,$441=0,$442=0,$443=0,$444=0,$445=0,$446=0,$447=0,$448=0,$449=0;var $45=0,$450=0,$451=0,$452=0,$453=0,$454=0,$455=0,$456=0,$457=0,$458=0,$459=0,$46=0,$460=0,$461=0,$462=0,$463=0,$464=0,$465=0,$466=0,$467=0;var $468=0,$469=0,$47=0,$470=0,$471=0,$472=0,$473=0,$474=0,$475=0,$476=0,$477=0,$478=0,$479=0,$48=0,$480=0,$481=0,$482=0,$483=0,$484=0,$485=0;var $486=0,$487=0,$488=0,$489=0,$49=0,$490=0,$491=0,$492=0,$493=0,$494=0,$495=0,$496=0,$497=0,$498=0,$499=0,$5=0,$50=0,$500=0,$501=0,$502=0;var $503=0,$504=0,$505=0,$506=0,$507=0,$508=0,$509=0,$51=0,$510=0,$511=0,$512=0,$513=0,$514=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0;var $59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0;var $77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0;var $95=0,$96=0,$97=0,$98=0,$99=0,$albumart_mime$0$ph=0,$albumart_mime$1=0,$buffer$i=0,$cond$i=0,$cond$i$i=0,$cond$i$i10=0,$cond$i$i32=0,$cond$i73=0,$cond$i75=0,$cond1$i=0,$cond1$i$i=0,$cond1$i$i34=0,$cond1$i77=0,$extract5$i$i=0,$extract5$i$i16=0;var $extract5$i$i64=0,$extract5$i20$i=0,$extract5$i28$i=0,$extract5$i33$i=0,$extract5$i6$i=0,$extract5$i6$i45=0,$extract5$i634$i=0,$extract5$i639$i=0,$n$0$i=0,$n$0$i$i=0,$n$0$i$i33=0,$n$0$i76=0,$n$1$i=0,$n$1$i$i=0,$n$1$i$i11=0,$n$2$i$i=0,$node$096=0,$node2$093=0,$notlhs=0,$notrhs=0;var $or$cond=0,$or$cond3=0,$or$cond3$i=0,$or$cond5=0,$or$cond7$not=0,$or$cond82=0,$p$091=0,$p$1=0,$p$2=0,$p$3=0,$phitmp$i=0,$phitmp$i41=0,$phitmp18$i=0,$phitmp19$i=0,$phitmp31$i=0,$phitmp32$i=0,$playlength_ms$0$i=0,$scevgep$i=0,$scevgep$i$i=0,$scevgep$i$i30=0;var $scevgep$i$i70=0,$scevgep$i1$i=0,$scevgep$i1$i59=0,$scevgep$i10$i=0,$scevgep$i14$i=0,$scevgep$i14$i51=0,$scevgep$i14$sum$i=0,$scevgep$i14$sum27$i=0,$scevgep$i2$i=0,$scevgep$i22$i=0,$scevgep$i22$i40=0,$scevgep$i22$sum$i=0,$scevgep$i4$i=0,$tag_size$0=0,$tag_size$195=0,$tag_size$2=0,$tag_size$3=0,$tag_size$4=0,$vararg_buffer=0,label=0;var sp=0;sp=STACKTOP;STACKTOP=STACKTOP+1040|0;$vararg_buffer=sp;$buffer$i=sp+8|0;$0=($gfp|0)==(0|0);if($0){$$0=0;STACKTOP=sp;return $$0|0}$1=$gfp+288|0;$2=HEAP32[$1>>2]|0;$3=($2|0)==(0|0);if($3){$$0=0;STACKTOP=sp;return $$0|0}$$idx9=$2+85696|0;$$idx9$val=HEAP32[$$idx9>>2]|0;$$lobit=$$idx9$val&4;$4=($$lobit|0)==0;if(!$4){$$0=0;STACKTOP=sp;return $$0|0}$5=$$idx9$val&10;$6=$2+85704|0;$7=HEAP32[$6>>2]|0;$8=($7|0)==(0|0);if($8){$22=0}else{$9=_strlen($7|0)|0;$22=$9}$10=$2+85708|0;$11=HEAP32[$10>>2]|0;$12=($11|0)==(0|0);if($12){$24=0}else{$13=_strlen($11|0)|0;$24=$13}$14=$2+85712|0;$15=HEAP32[$14>>2]|0;$16=($15|0)==(0|0);if($16){$26=0}else{$17=_strlen($15|0)|0;$26=$17}$18=$2+85716|0;$19=HEAP32[$18>>2]|0;$20=($19|0)==(0|0);if($20){$28=0}else{$21=_strlen($19|0)|0;$28=$21}$23=$22>>>0>30;$25=$24>>>0>30;$or$cond=$23|$25;$27=$26>>>0>30;$or$cond3=$or$cond|$27;$29=$28>>>0>30;$or$cond5=$or$cond3|$29;if(!$or$cond5){$30=$2+85720|0;$31=HEAP32[$30>>2]|0;$notlhs=($31|0)==0;$notrhs=$28>>>0<29;$or$cond7$not=$notrhs|$notlhs;$32=($5|0)==0;$or$cond82=$32&$or$cond7$not;if($or$cond82){$$0=0;STACKTOP=sp;return $$0|0}}$33=$gfp+4|0;$34=HEAP32[$33>>2]|0;$35=($34|0)==-1;if(!$35){$36=+($34>>>0);$37=$36*1000.0;$38=$2+60|0;$39=HEAP32[$38>>2]|0;$40=+($39|0);$41=$37/$40;$42=$41>4294967295.0;if($42){$playlength_ms$0$i=-1}else{$43=$41<0.0;if($43){$playlength_ms$0$i=0}else{$44=~~$41>>>0;$playlength_ms$0$i=$44}}HEAP32[$vararg_buffer>>2]=$playlength_ms$0$i;_sprintf($buffer$i,6496,$vararg_buffer)|0;$45=HEAP32[$1>>2]|0;$46=($45|0)==(0|0);if(!$46){$47=$45+85696|0;$48=HEAP32[$47>>2]|0;_id3v2_add_latin1($gfp,1414284622,6488,0,$buffer$i)|0;HEAP32[$47>>2]=$48}}$49=$2+85728|0;$50=HEAP32[$49>>2]|0;$51=($50|0)==(0|0);do{if($51){$albumart_mime$1=0;$tag_size$0=10}else{$52=$2+85732|0;$53=HEAP32[$52>>2]|0;$54=($53|0)==0;if($54){$albumart_mime$1=0;$tag_size$0=10}else{$55=$2+85740|0;$56=HEAP32[$55>>2]|0;if(($56|0)==2){$albumart_mime$0$ph=6504}else if(($56|0)==3){$albumart_mime$0$ph=6520}else if(($56|0)==1){$albumart_mime$0$ph=6536}else{$albumart_mime$1=0;$tag_size$0=10;break}$57=_strlen($albumart_mime$0$ph|0)|0;$58=$57+24|0;$59=$58+$53|0;$albumart_mime$1=$albumart_mime$0$ph;$tag_size$0=$59}}}while(0);$60=$2+85744|0;$61=HEAP32[$60>>2]|0;$62=($61|0)==(0|0);if($62){$tag_size$3=$tag_size$0}else{$node$096=$61;$tag_size$195=$tag_size$0;while(1){$63=$node$096+4|0;$64=HEAP32[$63>>2]|0;do{if(($64|0)==1431520594|($64|0)==1129270605){$65=$node$096+20|0;$66=HEAP32[$65>>2]|0;$cond$i75=($66|0)==1;$67=$node$096+16|0;$68=HEAP32[$67>>2]|0;$69=$68<<1;$70=$69+16|0;$71=$68+15|0;$n$0$i76=$cond$i75?$70:$71;$72=$node$096+32|0;$73=HEAP32[$72>>2]|0;$cond1$i77=($73|0)==1;$74=$node$096+28|0;$75=HEAP32[$74>>2]|0;if($cond1$i77){$77=$75<<1;$78=$n$0$i76+$77|0;$$pn=$78;break}else{$76=$n$0$i76+$75|0;$$pn=$76;break}}else{$79=$64&-16777216;if(!(($79|0)==0|($79|0)==1459617792)){$96=$node$096+32|0;$97=HEAP32[$96>>2]|0;$cond$i=($97|0)==1;$98=$node$096+16|0;$99=HEAP32[$98>>2]|0;$100=($99|0)!=0;$101=$node$096+28|0;$102=HEAP32[$101>>2]|0;if($cond$i){$105=$99<<1;$106=$105+13|0;$n$1$i=$100?$106:11;$107=$102<<1;$108=$n$1$i+$107|0;$$pn=$108;break}else{$103=$99+12|0;$$$i=$100?$103:11;$104=$$$i+$102|0;$$pn=$104;break}}$80=$node$096+16|0;$81=HEAP32[$80>>2]|0;$82=($81|0)==0;do{if($82){$n$0$i=10}else{$83=$node$096+20|0;$84=HEAP32[$83>>2]|0;$cond$i73=($84|0)==1;if($cond$i73){$86=$81<<1;$87=$86+13|0;$n$0$i=$87;break}else{$85=$81+12|0;$n$0$i=$85;break}}}while(0);$88=$node$096+28|0;$89=HEAP32[$88>>2]|0;$90=($89|0)==0;if($90){$$pn=$n$0$i}else{$91=$node$096+32|0;$92=HEAP32[$91>>2]|0;$cond1$i=($92|0)==1;if($cond1$i){$94=$n$0$i+-1|0;$95=$94+$89|0;$$pn=$95;break}else{$93=$89+$n$0$i|0;$$pn=$93;break}}}}while(0);$tag_size$2=$$pn+$tag_size$195|0;$109=HEAP32[$node$096>>2]|0;$110=($109|0)==(0|0);if($110){$tag_size$3=$tag_size$2;break}else{$node$096=$109;$tag_size$195=$tag_size$2}}}$$idx$val=HEAP32[$$idx9>>2]|0;$$lobit85=$$idx$val&32;$111=($$lobit85|0)==0;if($111){$tag_size$4=$tag_size$3}else{$112=$2+85736|0;$113=HEAP32[$112>>2]|0;$114=$113+$tag_size$3|0;$tag_size$4=$114}$115=$tag_size$4>>>0>$size>>>0;if($115){$$0=$tag_size$4;STACKTOP=sp;return $$0|0}$116=($buffer|0)==(0|0);if($116){$$0=0;STACKTOP=sp;return $$0|0}$117=$buffer+1|0;HEAP8[$buffer>>0]=73;$118=$buffer+2|0;HEAP8[$117>>0]=68;$119=$buffer+3|0;HEAP8[$118>>0]=51;$120=$buffer+4|0;HEAP8[$119>>0]=3;$121=$buffer+5|0;HEAP8[$120>>0]=0;$122=$buffer+6|0;HEAP8[$121>>0]=0;$123=$tag_size$4+-10|0;$124=$123>>>21;$125=$124&127;$126=$125&255;$127=$buffer+7|0;HEAP8[$122>>0]=$126;$128=$123>>>14;$129=$128&127;$130=$129&255;$131=$buffer+8|0;HEAP8[$127>>0]=$130;$132=$123>>>7;$133=$132&127;$134=$133&255;$135=$buffer+9|0;HEAP8[$131>>0]=$134;$136=$123&127;$137=$136&255;$138=$buffer+10|0;HEAP8[$135>>0]=$137;$139=HEAP32[$60>>2]|0;$140=($139|0)==(0|0);if($140){$p$2=$138}else{$node2$093=$139;$p$091=$138;while(1){$141=$node2$093+4|0;$142=HEAP32[$141>>2]|0;do{if(($142|0)==1431520594|($142|0)==1129270605){$143=$node2$093+20|0;$144=HEAP32[$143>>2]|0;$cond$i$i32=($144|0)==1;$145=$node2$093+16|0;$146=HEAP32[$145>>2]|0;$147=$146<<1;$148=$147+16|0;$149=$146+15|0;$n$0$i$i33=$cond$i$i32?$148:$149;$150=$node2$093+32|0;$151=HEAP32[$150>>2]|0;$cond1$i$i34=($151|0)==1;$152=$node2$093+28|0;$153=HEAP32[$152>>2]|0;$154=$cond1$i$i34&1;$$sink$i=$153<<$154;$155=$$sink$i+$n$0$i$i33|0;$156=$155>>>0>10;if($156){$157=$142&255;$158=$p$091+3|0;HEAP8[$158>>0]=$157;$159=$142>>>8;$160=$159&255;$161=$p$091+2|0;HEAP8[$161>>0]=$160;$162=$142>>>16;$163=$162&255;$164=$p$091+1|0;HEAP8[$164>>0]=$163;$165=$142>>>24;$166=$165&255;HEAP8[$p$091>>0]=$166;$167=$p$091+4|0;$168=$155+-10|0;$169=$168&255;$170=$p$091+7|0;HEAP8[$170>>0]=$169;$171=$168>>>8;$172=$171&255;$173=$p$091+6|0;HEAP8[$173>>0]=$172;$174=$168>>>16;$175=$174&255;$176=$p$091+5|0;HEAP8[$176>>0]=$175;$177=$168>>>24;$178=$177&255;HEAP8[$167>>0]=$178;$179=$p$091+8|0;$180=$p$091+9|0;HEAP8[$179>>0]=0;$181=$p$091+10|0;HEAP8[$180>>0]=0;$182=$node2$093+24|0;$183=HEAP32[$150>>2]|0;$184=($183|0)==1;$185=$184&1;$186=$p$091+11|0;HEAP8[$181>>0]=$185;$187=$node2$093+8|0;$188=HEAP8[$187>>0]|0;$189=$p$091+12|0;HEAP8[$186>>0]=$188;$190=$node2$093+9|0;$191=HEAP8[$190>>0]|0;$192=$p$091+13|0;HEAP8[$189>>0]=$191;$193=$node2$093+10|0;$194=HEAP8[$193>>0]|0;$195=$p$091+14|0;HEAP8[$192>>0]=$194;$196=$node2$093+12|0;$197=HEAP32[$143>>2]|0;$198=($197|0)==1;if($198){$207=HEAP32[$196>>2]|0;$208=HEAP32[$145>>2]|0;$209=($208|0)==0;if($209){$$1$i16$i=$195;$224=15;$514=16}else{$210=HEAP16[$207>>1]|0;$211=$210<<16>>16==-2;$212=$208<<1;$213=$208+-1|0;$extract5$i639$i=($210&65535)>>>8;$$0$i$off0$v$i740$i=$211?$extract5$i639$i:$210;$$0$i$off0$i841$i=$$0$i$off0$v$i740$i&255;$214=$extract5$i639$i&255;$$0$i$off8$i1043$i=$211?-2:$214;$215=$p$091+15|0;HEAP8[$195>>0]=$$0$i$off0$i841$i;HEAP8[$215>>0]=$$0$i$off8$i1043$i;$216=($213|0)==0;if(!$216){$$010$i344$i=$195;$$pn46$i=$207;$220=$213;while(1){$217=$$pn46$i+2|0;$218=$$010$i344$i+2|0;$$pre$i12$i44=HEAP16[$217>>1]|0;$219=$220+-1|0;$extract5$i6$i45=($$pre$i12$i44&65535)>>>8;$$0$i$off0$v$i7$i46=$211?$extract5$i6$i45:$$pre$i12$i44;$$0$i$off0$i8$i47=$$0$i$off0$v$i7$i46&255;$$0$i$off8$v$i9$i48=$211?$$pre$i12$i44:$extract5$i6$i45;$$0$i$off8$i10$i49=$$0$i$off8$v$i9$i48&255;$221=$$010$i344$i+3|0;HEAP8[$218>>0]=$$0$i$off0$i8$i47;HEAP8[$221>>0]=$$0$i$off8$i10$i49;$222=($219|0)==0;if($222){break}else{$$010$i344$i=$218;$$pn46$i=$217;$220=$219}}}$$sum27$i=$212+14|0;$scevgep$i14$i51=$p$091+$$sum27$i|0;$phitmp31$i=$212+15|0;$phitmp32$i=$212+16|0;$$1$i16$i=$scevgep$i14$i51;$224=$phitmp31$i;$514=$phitmp32$i}$223=$p$091+$224|0;HEAP8[$$1$i16$i>>0]=0;HEAP8[$223>>0]=0;$$sum26$pn$i=$514}else{$199=HEAP32[$145>>2]|0;$200=($199|0)==0;if($200){$$02$lcssa$i24$i=$195;$513=15}else{$201=HEAP32[$196>>2]|0;$$014$i19$i36=$201;$$023$i20$i37=$195;$$05$i18$i35=$199;while(1){$202=$$05$i18$i35+-1|0;$203=$$014$i19$i36+1|0;$204=HEAP8[$$014$i19$i36>>0]|0;$205=$$023$i20$i37+1|0;HEAP8[$$023$i20$i37>>0]=$204;$206=($202|0)==0;if($206){break}else{$$014$i19$i36=$203;$$023$i20$i37=$205;$$05$i18$i35=$202}}$$sum$i39=$199+14|0;$scevgep$i22$i40=$p$091+$$sum$i39|0;$phitmp$i41=$199+15|0;$$02$lcssa$i24$i=$scevgep$i22$i40;$513=$phitmp$i41}HEAP8[$$02$lcssa$i24$i>>0]=0;$$sum26$pn$i=$513}$$0$i53=$p$091+$$sum26$pn$i|0;$225=HEAP32[$150>>2]|0;$226=($225|0)==1;if($226){$235=HEAP32[$182>>2]|0;$236=HEAP32[$152>>2]|0;$237=($236|0)==0;if($237){$p$1=$$0$i53;break}$238=HEAP16[$235>>1]|0;$239=$238<<16>>16==-2;$240=$236<<1;$241=$236+-1|0;$extract5$i33$i=($238&65535)>>>8;$$0$i$off0$v$i34$i=$239?$extract5$i33$i:$238;$$0$i$off0$i35$i=$$0$i$off0$v$i34$i&255;$242=$extract5$i33$i&255;$$0$i$off8$i37$i=$239?-2:$242;$$0$sum45$i=$$sum26$pn$i+1|0;$243=$p$091+$$0$sum45$i|0;HEAP8[$$0$i53>>0]=$$0$i$off0$i35$i;HEAP8[$243>>0]=$$0$i$off8$i37$i;$244=($241|0)==0;if(!$244){$$010$i38$i=$$0$i53;$$pn$i62=$235;$248=$241;while(1){$245=$$pn$i62+2|0;$246=$$010$i38$i+2|0;$$pre$i$i63=HEAP16[$245>>1]|0;$247=$248+-1|0;$extract5$i$i64=($$pre$i$i63&65535)>>>8;$$0$i$off0$v$i$i65=$239?$extract5$i$i64:$$pre$i$i63;$$0$i$off0$i$i66=$$0$i$off0$v$i$i65&255;$$0$i$off8$v$i$i67=$239?$$pre$i$i63:$extract5$i$i64;$$0$i$off8$i$i68=$$0$i$off8$v$i$i67&255;$249=$$010$i38$i+3|0;HEAP8[$246>>0]=$$0$i$off0$i$i66;HEAP8[$249>>0]=$$0$i$off8$i$i68;$250=($247|0)==0;if($250){break}else{$$010$i38$i=$246;$$pn$i62=$245;$248=$247}}}$$0$sum30$i=$240+$$sum26$pn$i|0;$scevgep$i$i70=$p$091+$$0$sum30$i|0;$p$1=$scevgep$i$i70;break}else{$227=HEAP32[$152>>2]|0;$228=($227|0)==0;if($228){$p$1=$$0$i53;break}$229=HEAP32[$182>>2]|0;$$014$i$i56=$229;$$023$i$i57=$$0$i53;$$05$i$i55=$227;while(1){$230=$$05$i$i55+-1|0;$231=$$014$i$i56+1|0;$232=HEAP8[$$014$i$i56>>0]|0;$233=$$023$i$i57+1|0;HEAP8[$$023$i$i57>>0]=$232;$234=($230|0)==0;if($234){break}else{$$014$i$i56=$231;$$023$i$i57=$233;$$05$i$i55=$230}}$$0$sum$i=$227+$$sum26$pn$i|0;$scevgep$i1$i59=$p$091+$$0$sum$i|0;$p$1=$scevgep$i1$i59;break}}else{$p$1=$p$091}}else{$251=$142&-16777216;if(!(($251|0)==0|($251|0)==1459617792)){$365=$node2$093+32|0;$366=HEAP32[$365>>2]|0;$cond$i$i=($366|0)==1;$367=$node2$093+16|0;$368=HEAP32[$367>>2]|0;$369=($368|0)!=0;$370=$node2$093+28|0;$371=HEAP32[$370>>2]|0;if($cond$i$i){$374=$368<<1;$375=$374+13|0;$n$1$i$i=$369?$375:11;$376=$371<<1;$377=$n$1$i$i+$376|0;$n$2$i$i=$377}else{$372=$368+12|0;$$$i$i=$369?$372:11;$373=$$$i$i+$371|0;$n$2$i$i=$373}$378=$n$2$i$i>>>0>10;if(!$378){$p$1=$p$091;break}$379=$142&255;$380=$p$091+3|0;HEAP8[$380>>0]=$379;$381=$142>>>8;$382=$381&255;$383=$p$091+2|0;HEAP8[$383>>0]=$382;$384=$142>>>16;$385=$384&255;$386=$p$091+1|0;HEAP8[$386>>0]=$385;$387=$142>>>24;$388=$387&255;HEAP8[$p$091>>0]=$388;$389=$p$091+4|0;$390=$n$2$i$i+-10|0;$391=$390&255;$392=$p$091+7|0;HEAP8[$392>>0]=$391;$393=$390>>>8;$394=$393&255;$395=$p$091+6|0;HEAP8[$395>>0]=$394;$396=$390>>>16;$397=$396&255;$398=$p$091+5|0;HEAP8[$398>>0]=$397;$399=$390>>>24;$400=$399&255;HEAP8[$389>>0]=$400;$401=$p$091+8|0;$402=$p$091+9|0;HEAP8[$401>>0]=0;$403=$p$091+10|0;HEAP8[$402>>0]=0;$404=$node2$093+24|0;$405=HEAP32[$365>>2]|0;$406=($405|0)==1;$407=$406&1;$408=$p$091+11|0;HEAP8[$403>>0]=$407;$409=HEAP32[$367>>2]|0;$410=($409|0)==0;do{if($410){$$0$i=$408}else{$411=$node2$093+20|0;$412=HEAP32[$411>>2]|0;$413=($412|0)==1;$414=$node2$093+12|0;if($413){$422=HEAP32[$414>>2]|0;$423=HEAP16[$422>>1]|0;$424=$423<<16>>16==-2;$425=$409<<1;$426=$409+-1|0;$extract5$i634$i=($423&65535)>>>8;$$0$i$off0$v$i735$i=$424?$extract5$i634$i:$423;$$0$i$off0$i836$i=$$0$i$off0$v$i735$i&255;$427=$extract5$i634$i&255;$$0$i$off8$i1038$i=$424?-2:$427;$428=$p$091+12|0;HEAP8[$408>>0]=$$0$i$off0$i836$i;HEAP8[$428>>0]=$$0$i$off8$i1038$i;$429=($426|0)==0;if(!$429){$$010$i339$i=$408;$$pn40$i=$422;$433=$426;while(1){$430=$$pn40$i+2|0;$431=$$010$i339$i+2|0;$$pre$i12$i=HEAP16[$430>>1]|0;$432=$433+-1|0;$extract5$i6$i=($$pre$i12$i&65535)>>>8;$$0$i$off0$v$i7$i=$424?$extract5$i6$i:$$pre$i12$i;$$0$i$off0$i8$i=$$0$i$off0$v$i7$i&255;$$0$i$off8$v$i9$i=$424?$$pre$i12$i:$extract5$i6$i;$$0$i$off8$i10$i=$$0$i$off8$v$i9$i&255;$434=$$010$i339$i+3|0;HEAP8[$431>>0]=$$0$i$off0$i8$i;HEAP8[$434>>0]=$$0$i$off8$i10$i;$435=($432|0)==0;if($435){break}else{$$010$i339$i=$431;$$pn40$i=$430;$433=$432}}}$$sum26$i=$425+11|0;$scevgep$i14$i=$p$091+$$sum26$i|0;$scevgep$i14$sum$i=$425+12|0;$436=$p$091+$scevgep$i14$sum$i|0;HEAP8[$scevgep$i14$i>>0]=0;$scevgep$i14$sum27$i=$425+13|0;$437=$p$091+$scevgep$i14$sum27$i|0;HEAP8[$436>>0]=0;$$0$i=$437;break}else{$415=HEAP32[$414>>2]|0;$$014$i19$i=$415;$$023$i20$i=$408;$$05$i18$i=$409;while(1){$416=$$05$i18$i+-1|0;$417=$$014$i19$i+1|0;$418=HEAP8[$$014$i19$i>>0]|0;$419=$$023$i20$i+1|0;HEAP8[$$023$i20$i>>0]=$418;$420=($416|0)==0;if($420){break}else{$$014$i19$i=$417;$$023$i20$i=$419;$$05$i18$i=$416}}$$sum$i=$409+11|0;$scevgep$i22$i=$p$091+$$sum$i|0;$scevgep$i22$sum$i=$409+12|0;$421=$p$091+$scevgep$i22$sum$i|0;HEAP8[$scevgep$i22$i>>0]=0;$$0$i=$421;break}}}while(0);$438=HEAP32[$365>>2]|0;$439=($438|0)==1;if($439){$448=HEAP32[$404>>2]|0;$449=HEAP32[$370>>2]|0;$450=($449|0)==0;if($450){$p$1=$$0$i;break}$451=HEAP16[$448>>1]|0;$452=$451<<16>>16==-2;$453=$449<<1;$454=$449+-1|0;$extract5$i28$i=($451&65535)>>>8;$$0$i$off0$v$i29$i=$452?$extract5$i28$i:$451;$$0$i$off0$i30$i=$$0$i$off0$v$i29$i&255;$455=$extract5$i28$i&255;$$0$i$off8$i32$i=$452?-2:$455;$456=$$0$i+1|0;HEAP8[$$0$i>>0]=$$0$i$off0$i30$i;HEAP8[$456>>0]=$$0$i$off8$i32$i;$457=($454|0)==0;if(!$457){$$010$i33$i=$$0$i;$$pn$i=$448;$461=$454;while(1){$458=$$pn$i+2|0;$459=$$010$i33$i+2|0;$$pre$i$i=HEAP16[$458>>1]|0;$460=$461+-1|0;$extract5$i$i=($$pre$i$i&65535)>>>8;$$0$i$off0$v$i$i=$452?$extract5$i$i:$$pre$i$i;$$0$i$off0$i$i=$$0$i$off0$v$i$i&255;$$0$i$off8$v$i$i=$452?$$pre$i$i:$extract5$i$i;$$0$i$off8$i$i=$$0$i$off8$v$i$i&255;$462=$$010$i33$i+3|0;HEAP8[$459>>0]=$$0$i$off0$i$i;HEAP8[$462>>0]=$$0$i$off8$i$i;$463=($460|0)==0;if($463){break}else{$$010$i33$i=$459;$$pn$i=$458;$461=$460}}}$scevgep$i$i=$$0$i+$453|0;$p$1=$scevgep$i$i;break}else{$440=HEAP32[$370>>2]|0;$441=($440|0)==0;if($441){$p$1=$$0$i;break}$442=HEAP32[$404>>2]|0;$$014$i$i=$442;$$023$i$i=$$0$i;$$05$i$i=$440;while(1){$443=$$05$i$i+-1|0;$444=$$014$i$i+1|0;$445=HEAP8[$$014$i$i>>0]|0;$446=$$023$i$i+1|0;HEAP8[$$023$i$i>>0]=$445;$447=($443|0)==0;if($447){break}else{$$014$i$i=$444;$$023$i$i=$446;$$05$i$i=$443}}$scevgep$i1$i=$$0$i+$440|0;$p$1=$scevgep$i1$i;break}}$252=$node2$093+16|0;$253=HEAP32[$252>>2]|0;$254=($253|0)==0;do{if($254){$n$0$i$i=10}else{$255=$node2$093+20|0;$256=HEAP32[$255>>2]|0;$cond$i$i10=($256|0)==1;if($cond$i$i10){$258=$253<<1;$259=$258+13|0;$n$0$i$i=$259;break}else{$257=$253+12|0;$n$0$i$i=$257;break}}}while(0);$260=$node2$093+28|0;$261=HEAP32[$260>>2]|0;$262=($261|0)==0;do{if($262){$n$1$i$i11=$n$0$i$i}else{$263=$node2$093+32|0;$264=HEAP32[$263>>2]|0;$cond1$i$i=($264|0)==1;if($cond1$i$i){$266=$n$0$i$i+-1|0;$267=$266+$261|0;$n$1$i$i11=$267;break}else{$265=$261+$n$0$i$i|0;$n$1$i$i11=$265;break}}}while(0);$268=$n$1$i$i11>>>0>10;if(!$268){$p$1=$p$091;break}$269=$142&255;$270=$p$091+3|0;HEAP8[$270>>0]=$269;$271=$142>>>8;$272=$271&255;$273=$p$091+2|0;HEAP8[$273>>0]=$272;$274=$142>>>16;$275=$274&255;$276=$p$091+1|0;HEAP8[$276>>0]=$275;$277=$142>>>24;$278=$277&255;HEAP8[$p$091>>0]=$278;$279=$p$091+4|0;$280=$n$1$i$i11+-10|0;$281=$280&255;$282=$p$091+7|0;HEAP8[$282>>0]=$281;$283=$280>>>8;$284=$283&255;$285=$p$091+6|0;HEAP8[$285>>0]=$284;$286=$280>>>16;$287=$286&255;$288=$p$091+5|0;HEAP8[$288>>0]=$287;$289=$280>>>24;$290=$289&255;HEAP8[$279>>0]=$290;$291=$p$091+8|0;$292=$p$091+9|0;HEAP8[$291>>0]=0;$293=$p$091+10|0;HEAP8[$292>>0]=0;$294=HEAP32[$252>>2]|0;$295=($294|0)==0;do{if($295){$$0$i23=$293}else{$296=$node2$093+20|0;$297=HEAP32[$296>>2]|0;$298=($297|0)==1;$299=$298&1;$300=$p$091+11|0;HEAP8[$293>>0]=$299;$301=HEAP32[$296>>2]|0;$302=($301|0)==1;$303=$node2$093+12|0;if($302){$314=HEAP32[$303>>2]|0;$315=HEAP32[$252>>2]|0;$316=($315|0)==0;if($316){$$1$i5$i=$300;$331=12;$333=13}else{$317=HEAP16[$314>>1]|0;$318=$317<<16>>16==-2;$319=$315<<1;$320=$315+-1|0;$extract5$i20$i=($317&65535)>>>8;$$0$i$off0$v$i21$i=$318?$extract5$i20$i:$317;$$0$i$off0$i22$i=$$0$i$off0$v$i21$i&255;$321=$extract5$i20$i&255;$$0$i$off8$i24$i=$318?-2:$321;$322=$p$091+12|0;HEAP8[$300>>0]=$$0$i$off0$i22$i;HEAP8[$322>>0]=$$0$i$off8$i24$i;$323=($320|0)==0;if(!$323){$$010$i25$i=$300;$$pn$i14=$314;$327=$320;while(1){$324=$$pn$i14+2|0;$325=$$010$i25$i+2|0;$$pre$i$i15=HEAP16[$324>>1]|0;$326=$327+-1|0;$extract5$i$i16=($$pre$i$i15&65535)>>>8;$$0$i$off0$v$i$i17=$318?$extract5$i$i16:$$pre$i$i15;$$0$i$off0$i$i18=$$0$i$off0$v$i$i17&255;$$0$i$off8$v$i$i19=$318?$$pre$i$i15:$extract5$i$i16;$$0$i$off8$i$i20=$$0$i$off8$v$i$i19&255;$328=$$010$i25$i+3|0;HEAP8[$325>>0]=$$0$i$off0$i$i18;HEAP8[$328>>0]=$$0$i$off8$i$i20;$329=($326|0)==0;if($329){break}else{$$010$i25$i=$325;$$pn$i14=$324;$327=$326}}}$$sum15$i=$319+11|0;$scevgep$i4$i=$p$091+$$sum15$i|0;$phitmp18$i=$319+12|0;$phitmp19$i=$319+13|0;$$1$i5$i=$scevgep$i4$i;$331=$phitmp18$i;$333=$phitmp19$i}$330=$p$091+$331|0;HEAP8[$$1$i5$i>>0]=0;$332=$p$091+$333|0;HEAP8[$330>>0]=0;$$0$i23=$332;break}else{$304=HEAP32[$252>>2]|0;$305=($304|0)==0;if($305){$$02$lcssa$i12$i=$300;$313=12}else{$306=HEAP32[$303>>2]|0;$$014$i7$i=$306;$$023$i8$i=$300;$$05$i6$i=$304;while(1){$307=$$05$i6$i+-1|0;$308=$$014$i7$i+1|0;$309=HEAP8[$$014$i7$i>>0]|0;$310=$$023$i8$i+1|0;HEAP8[$$023$i8$i>>0]=$309;$311=($307|0)==0;if($311){break}else{$$014$i7$i=$308;$$023$i8$i=$310;$$05$i6$i=$307}}$$sum$i12=$304+11|0;$scevgep$i10$i=$p$091+$$sum$i12|0;$phitmp$i=$304+12|0;$$02$lcssa$i12$i=$scevgep$i10$i;$313=$phitmp$i}$312=$p$091+$313|0;HEAP8[$$02$lcssa$i12$i>>0]=0;$$0$i23=$312;break}}}while(0);$334=$node2$093+24|0;$335=$node2$093+32|0;$336=HEAP32[$335>>2]|0;$337=($336|0)==1;if(!$337){$338=HEAP32[$260>>2]|0;$339=($338|0)==0;if($339){$p$1=$$0$i23;break}$340=HEAP32[$334>>2]|0;$$014$i$i25=$340;$$023$i$i26=$$0$i23;$$05$i$i24=$338;while(1){$341=$$05$i$i24+-1|0;$342=$$014$i$i25+1|0;$343=HEAP8[$$014$i$i25>>0]|0;$344=$$023$i$i26+1|0;HEAP8[$$023$i$i26>>0]=$343;$345=($341|0)==0;if($345){break}else{$$014$i$i25=$342;$$023$i$i26=$344;$$05$i$i24=$341}}$scevgep$i2$i=$$0$i23+$338|0;$p$1=$scevgep$i2$i;break}$346=HEAP32[$334>>2]|0;$347=HEAP32[$260>>2]|0;$348=($347|0)==0;if($348){$p$1=$$0$i23;break}$349=HEAP16[$346>>1]|0;if($349<<16>>16==-257|$349<<16>>16==-2){$350=$346+2|0;$351=$347+-1|0;$352=($351|0)==0;if($352){$p$1=$$0$i23;break}else{$$01$ph8$i$i=$350;$$02$ph7$i$i=$351}}else{$$01$ph8$i$i=$346;$$02$ph7$i$i=$347}$353=$349<<16>>16==-2;$$015$i$i=$$01$ph8$i$i;$$06$i$i=$$0$i23;$$in$i$i=$$02$ph7$i$i;while(1){$354=$$in$i$i+-1|0;$355=$$015$i$i+2|0;$356=HEAP16[$$015$i$i>>1]|0;if($353){$357=$356&65535;$358=$357<<8;$359=$357>>>8;$360=$358|$359;$361=$360&65535;$$0$i3$i$i=$361}else{$$0$i3$i$i=$356}$$0$i3$off$i$i=$$0$i3$i$i+-32<<16>>16;$362=($$0$i3$off$i$i&65535)>223;$363=$$0$i3$i$i&255;$$$i$i29=$362?32:$363;$$0$be$i$i=$$06$i$i+1|0;HEAP8[$$06$i$i>>0]=$$$i$i29;$364=($354|0)==0;if($364){break}else{$$015$i$i=$355;$$06$i$i=$$0$be$i$i;$$in$i$i=$354}}$scevgep$i$i30=$$0$i23+$$02$ph7$i$i|0;$p$1=$scevgep$i$i30}}while(0);$464=HEAP32[$node2$093>>2]|0;$465=($464|0)==(0|0);if($465){$p$2=$p$1;break}else{$node2$093=$464;$p$091=$p$1}}}$466=($albumart_mime$1|0)==(0|0);if($466){$p$3=$p$2}else{$467=HEAP32[$49>>2]|0;$468=$2+85732|0;$469=HEAP32[$468>>2]|0;$470=($467|0)!=(0|0);$471=($469|0)!=0;$or$cond3$i=$470&$471;if($or$cond3$i){$472=$p$2+3|0;HEAP8[$472>>0]=67;$473=$p$2+2|0;HEAP8[$473>>0]=73;$474=$p$2+1|0;HEAP8[$474>>0]=80;HEAP8[$p$2>>0]=65;$475=$p$2+4|0;$476=_strlen($albumart_mime$1|0)|0;$477=$469+4|0;$478=$477+$476|0;$479=$478&255;$480=$p$2+7|0;HEAP8[$480>>0]=$479;$481=$478>>>8;$482=$481&255;$483=$p$2+6|0;HEAP8[$483>>0]=$482;$484=$478>>>16;$485=$484&255;$486=$p$2+5|0;HEAP8[$486>>0]=$485;$487=$478>>>24;$488=$487&255;HEAP8[$475>>0]=$488;$489=$p$2+8|0;$490=$p$2+9|0;HEAP8[$489>>0]=0;$491=$p$2+10|0;HEAP8[$490>>0]=0;$492=$p$2+11|0;HEAP8[$491>>0]=0;$493=HEAP8[$albumart_mime$1>>0]|0;$494=$493<<24>>24==0;if($494){$$06$lcssa$i=$492}else{$$0511$i=$albumart_mime$1;$$0610$i=$492;$497=$493;while(1){$495=$$0511$i+1|0;$496=$$0610$i+1|0;HEAP8[$$0610$i>>0]=$497;$498=HEAP8[$495>>0]|0;$499=$498<<24>>24==0;if($499){$$06$lcssa$i=$496;break}else{$$0511$i=$495;$$0610$i=$496;$497=$498}}}$500=$$06$lcssa$i+1|0;HEAP8[$$06$lcssa$i>>0]=0;$501=$$06$lcssa$i+2|0;HEAP8[$500>>0]=0;HEAP8[$501>>0]=0;$502=$$06$lcssa$i+3|0;$$048$i=$467;$$09$i=$469;$$17$i=$502;while(1){$503=$$09$i+-1|0;$504=$$048$i+1|0;$505=HEAP8[$$048$i>>0]|0;$506=$$17$i+1|0;HEAP8[$$17$i>>0]=$505;$507=($503|0)==0;if($507){break}else{$$048$i=$504;$$09$i=$503;$$17$i=$506}}$508=$469+3|0;$scevgep$i=$$06$lcssa$i+$508|0;$p$3=$scevgep$i}else{$p$3=$p$2}}$509=$p$3;$510=$buffer;$511=$tag_size$4+$510|0;$512=$511-$509|0;_memset($p$3|0,0,$512|0)|0;$$0=$tag_size$4;STACKTOP=sp;return $$0|0}function _id3tag_write_v2($gfp){$gfp=$gfp|0;var $$0=0,$$idx1=0,$$idx1$val=0,$0=0,$1=0,$10=0,$11=0,$12=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$exitcond=0,$i$03=0,label=0,sp=0;sp=STACKTOP;$0=$gfp+288|0;$1=HEAP32[$0>>2]|0;$$idx1=$1+85696|0;$$idx1$val=HEAP32[$$idx1>>2]|0;$2=$$idx1$val&5;$3=($2|0)==1;if(!$3){$$0=0;return $$0|0}$4=_lame_get_id3v2_tag($gfp,0,0)|0;$5=_calloc($4,1)|0;$6=($5|0)==(0|0);if($6){$$0=-1;return $$0|0}$7=_lame_get_id3v2_tag($gfp,$5,$4)|0;$8=$7>>>0>$4>>>0;if($8){_free($5);$$0=-1;return $$0|0}$9=($7|0)==0;if(!$9){$i$03=0;while(1){$10=$5+$i$03|0;$11=HEAP8[$10>>0]|0;_add_dummy_byte($1,$11,1);$12=$i$03+1|0;$exitcond=($12|0)==($7|0);if($exitcond){break}else{$i$03=$12}}}_free($5);$$0=$7;return $$0|0}function _lame_get_id3v1_tag($gfp,$buffer,$size){$gfp=$gfp|0;$buffer=$buffer|0;$size=$size|0;var $$0=0,$$0$lcssa$i=0,$$0$lcssa$i10=0,$$0$lcssa$i19=0,$$0$lcssa$i28=0,$$0$lcssa$i37=0,$$0$ph8$i=0,$$0$ph8$i13=0,$$0$ph8$i22=0,$$0$ph8$i31=0,$$0$ph8$i4=0,$$02$ph7$i=0,$$02$ph7$i14=0,$$02$ph7$i23=0,$$02$ph7$i32=0,$$02$ph7$i5=0,$$05$i=0,$$05$i$lcssa=0,$$05$i17=0,$$05$i17$lcssa=0;var $$05$i212=0,$$05$i26=0,$$05$i26$lcssa=0,$$05$i35=0,$$05$i35$lcssa=0,$$05$i8=0,$$05$i8$lcssa=0,$$idx2=0,$$idx2$val=0,$$in$i=0,$$in$i12=0,$$in$i21=0,$$in$i3=0,$$in$i30=0,$$in10$i=0,$$in10$i16=0,$$in10$i25=0,$$in10$i34=0,$$in10$i7=0,$$lcssa=0;var $$lcssa214=0,$$lcssa218=0,$$lcssa220=0,$$lcssa224=0,$$lcssa226=0,$$lcssa230=0,$$lcssa232=0,$$lcssa236=0,$$lcssa238=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0;var $19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0;var $37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0;var $55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0;var $73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$9=0,$or$cond=0,$p$0=0,$vararg_buffer=0,$year=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$vararg_buffer=sp;$year=sp+4|0;$0=($gfp|0)==(0|0);if($0){$$0=0;STACKTOP=sp;return $$0|0}$1=$size>>>0<128;if($1){$$0=128;STACKTOP=sp;return $$0|0}$2=$gfp+288|0;$3=HEAP32[$2>>2]|0;$4=($3|0)==(0|0);$5=($buffer|0)==(0|0);$or$cond=$5|$4;if($or$cond){$$0=0;STACKTOP=sp;return $$0|0}$$idx2=$3+85696|0;$$idx2$val=HEAP32[$$idx2>>2]|0;$6=$$idx2$val&9;$7=($6|0)==1;if(!$7){$$0=0;STACKTOP=sp;return $$0|0}$8=$$idx2$val<<1;$9=$8&32;$10=$buffer+1|0;HEAP8[$buffer>>0]=84;$11=$buffer+2|0;HEAP8[$10>>0]=65;$12=$buffer+3|0;HEAP8[$11>>0]=71;$13=$3+85704|0;$14=HEAP32[$13>>2]|0;$15=$9&255;$$0$ph8$i31=$12;$$02$ph7$i32=$14;$$in$i30=30;L13:while(1){$16=($$02$ph7$i32|0)==(0|0);$$05$i35=$$0$ph8$i31;$$in10$i34=$$in$i30;while(1){$17=$$in10$i34+-1|0;if(!$16){$18=HEAP8[$$02$ph7$i32>>0]|0;$19=$18<<24>>24==0;if(!$19){$$05$i35$lcssa=$$05$i35;$$lcssa236=$17;$$lcssa238=$18;break}}$23=$$05$i35+1|0;HEAP8[$$05$i35>>0]=$15;$24=($17|0)==0;if($24){$$0$lcssa$i37=$23;break L13}else{$$05$i35=$23;$$in10$i34=$17}}$20=$$02$ph7$i32+1|0;$21=$$05$i35$lcssa+1|0;HEAP8[$$05$i35$lcssa>>0]=$$lcssa238;$22=($$lcssa236|0)==0;if($22){$$0$lcssa$i37=$21;break}else{$$0$ph8$i31=$21;$$02$ph7$i32=$20;$$in$i30=$$lcssa236}}$25=$3+85708|0;$26=HEAP32[$25>>2]|0;$$0$ph8$i22=$$0$lcssa$i37;$$02$ph7$i23=$26;$$in$i21=30;L22:while(1){$27=($$02$ph7$i23|0)==(0|0);$$05$i26=$$0$ph8$i22;$$in10$i25=$$in$i21;while(1){$28=$$in10$i25+-1|0;if(!$27){$29=HEAP8[$$02$ph7$i23>>0]|0;$30=$29<<24>>24==0;if(!$30){$$05$i26$lcssa=$$05$i26;$$lcssa230=$28;$$lcssa232=$29;break}}$34=$$05$i26+1|0;HEAP8[$$05$i26>>0]=$15;$35=($28|0)==0;if($35){$$0$lcssa$i28=$34;break L22}else{$$05$i26=$34;$$in10$i25=$28}}$31=$$02$ph7$i23+1|0;$32=$$05$i26$lcssa+1|0;HEAP8[$$05$i26$lcssa>>0]=$$lcssa232;$33=($$lcssa230|0)==0;if($33){$$0$lcssa$i28=$32;break}else{$$0$ph8$i22=$32;$$02$ph7$i23=$31;$$in$i21=$$lcssa230}}$36=$3+85712|0;$37=HEAP32[$36>>2]|0;$$0$ph8$i13=$$0$lcssa$i28;$$02$ph7$i14=$37;$$in$i12=30;L31:while(1){$38=($$02$ph7$i14|0)==(0|0);$$05$i17=$$0$ph8$i13;$$in10$i16=$$in$i12;while(1){$39=$$in10$i16+-1|0;if(!$38){$40=HEAP8[$$02$ph7$i14>>0]|0;$41=$40<<24>>24==0;if(!$41){$$05$i17$lcssa=$$05$i17;$$lcssa224=$39;$$lcssa226=$40;break}}$45=$$05$i17+1|0;HEAP8[$$05$i17>>0]=$15;$46=($39|0)==0;if($46){$$0$lcssa$i19=$45;break L31}else{$$05$i17=$45;$$in10$i16=$39}}$42=$$02$ph7$i14+1|0;$43=$$05$i17$lcssa+1|0;HEAP8[$$05$i17$lcssa>>0]=$$lcssa226;$44=($$lcssa224|0)==0;if($44){$$0$lcssa$i19=$43;break}else{$$0$ph8$i13=$43;$$02$ph7$i14=$42;$$in$i12=$$lcssa224}}$47=$3+85700|0;$48=HEAP32[$47>>2]|0;HEAP32[$vararg_buffer>>2]=$48;_sprintf($year,6552,$vararg_buffer)|0;$49=HEAP32[$47>>2]|0;$50=($49|0)!=0;$51=$50?$year:0;$$0$ph8$i4=$$0$lcssa$i19;$$02$ph7$i5=$51;$$in$i3=4;L40:while(1){$52=($$02$ph7$i5|0)==(0|0);$$05$i8=$$0$ph8$i4;$$in10$i7=$$in$i3;while(1){$53=$$in10$i7+-1|0;if(!$52){$54=HEAP8[$$02$ph7$i5>>0]|0;$55=$54<<24>>24==0;if(!$55){$$05$i8$lcssa=$$05$i8;$$lcssa218=$53;$$lcssa220=$54;break}}$59=$$05$i8+1|0;HEAP8[$$05$i8>>0]=$15;$60=($53|0)==0;if($60){$$0$lcssa$i10=$59;break L40}else{$$05$i8=$59;$$in10$i7=$53}}$56=$$02$ph7$i5+1|0;$57=$$05$i8$lcssa+1|0;HEAP8[$$05$i8$lcssa>>0]=$$lcssa220;$58=($$lcssa218|0)==0;if($58){$$0$lcssa$i10=$57;break}else{$$0$ph8$i4=$57;$$02$ph7$i5=$56;$$in$i3=$$lcssa218}}$61=$3+85716|0;$62=HEAP32[$61>>2]|0;$63=$3+85720|0;$64=HEAP32[$63>>2]|0;$65=($64|0)!=0;$66=$65?28:30;$$0$ph8$i=$$0$lcssa$i10;$$02$ph7$i=$62;$$in$i=$66;L49:while(1){$67=($$02$ph7$i|0)==(0|0);$$05$i=$$0$ph8$i;$$in10$i=$$in$i;while(1){$68=$$in10$i+-1|0;if(!$67){$69=HEAP8[$$02$ph7$i>>0]|0;$70=$69<<24>>24==0;if(!$70){$$05$i$lcssa=$$05$i;$$lcssa=$68;$$lcssa214=$69;break}}$74=$$05$i+1|0;HEAP8[$$05$i>>0]=$15;$75=($68|0)==0;if($75){$$0$lcssa$i=$74;$$05$i212=$$05$i;break L49}else{$$05$i=$74;$$in10$i=$68}}$71=$$02$ph7$i+1|0;$72=$$05$i$lcssa+1|0;HEAP8[$$05$i$lcssa>>0]=$$lcssa214;$73=($$lcssa|0)==0;if($73){$$0$lcssa$i=$72;$$05$i212=$$05$i$lcssa;break}else{$$0$ph8$i=$72;$$02$ph7$i=$71;$$in$i=$$lcssa}}$76=HEAP32[$63>>2]|0;$77=($76|0)==0;if($77){$p$0=$$0$lcssa$i}else{$78=$$05$i212+2|0;HEAP8[$$0$lcssa$i>>0]=0;$79=HEAP32[$63>>2]|0;$80=$79&255;$81=$$05$i212+3|0;HEAP8[$78>>0]=$80;$p$0=$81}$82=$3+85724|0;$83=HEAP32[$82>>2]|0;$84=$83&255;HEAP8[$p$0>>0]=$84;$$0=128;STACKTOP=sp;return $$0|0}function _id3tag_write_v1($gfp){$gfp=$gfp|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$exitcond=0,$i$01=0,$tag=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+128|0;$tag=sp;$0=$gfp+288|0;$1=HEAP32[$0>>2]|0;$2=_lame_get_id3v1_tag($gfp,$tag,128)|0;$3=$2+-1|0;$4=$3>>>0>127;if($4){$$0=0;STACKTOP=sp;return $$0|0}else{$i$01=0}while(1){$5=$tag+$i$01|0;$6=HEAP8[$5>>0]|0;_add_dummy_byte($1,$6,1);$7=$i$01+1|0;$exitcond=($7|0)==($2|0);if($exitcond){$$0=$2;break}else{$i$01=$7}}STACKTOP=sp;return $$0|0}function _id3v2_add_latin1($gfp,$frame_id,$lang,$desc,$text){$gfp=$gfp|0;$frame_id=$frame_id|0;$lang=$lang|0;$desc=$desc|0;$text=$text|0;var $$0=0,$$0$i=0,$$0$i2=0,$$0$i9=0,$$in$i=0,$$lcssa=0,$$lcssa84=0,$0=0,$1=0,$10=0,$100=0,$101=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0;var $19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0;var $37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0;var $55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0;var $73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0;var $91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$i$0$lcssa$ph$i=0,$i$01$i=0,$n$0$i=0,$n$0$i$lcssa=0,$n$0$i7=0,$n$0$i7$lcssa=0,$node$0=0,$node$0$i=0,$node$0$i14=0,$node$0$i14$us=0,$node$0$us=0;var $node$01$i=0,$node$01$i11=0,$node$01$i11$us=0,$node$02$i=0,$node$02$i12=0,$node$02$i12$us=0,$node$1=0,$node$2=0,$scevgep$i=0,label=0,sp=0;sp=STACKTOP;$0=($gfp|0)==(0|0);if($0){$$0=-255;return $$0|0}$1=$gfp+288|0;$2=HEAP32[$1>>2]|0;$3=($2|0)==(0|0);if($3){$$0=-255;return $$0|0}$4=$2+85744|0;$node$01$i=HEAP32[$4>>2]|0;$5=($node$01$i|0)==(0|0);L7:do{if($5){$$0$i=0}else{$node$02$i=$node$01$i;while(1){$6=$node$02$i+4|0;$7=HEAP32[$6>>2]|0;$8=($7|0)==($frame_id|0);if($8){$$0$i=$node$02$i;break L7}$node$0$i=HEAP32[$node$02$i>>2]|0;$9=($node$0$i|0)==(0|0);if($9){$$0$i=0;break}else{$node$02$i=$node$0$i}}}}while(0);L12:do{if(($frame_id|0)==1347570006|($frame_id|0)==1196575044|($frame_id|0)==1162756946|($frame_id|0)==1279872587|($frame_id|0)==1095061059|($frame_id|0)==1346588244|($frame_id|0)==1195724610|($frame_id|0)==1095780675|($frame_id|0)==1398361172|($frame_id|0)==1129270605|($frame_id|0)==1465407576|($frame_id|0)==1415075928){$10=($$0$i|0)==(0|0);if($10){label=25}else{$11=($desc|0)==(0|0);if($11){$node$0$us=$$0$i;L16:while(1){$12=$node$0$us+8|0;$13=_isSameLang($12,$lang)|0;$14=($13|0)==0;if(!$14){$15=$node$0$us+16|0;$16=HEAP32[$15>>2]|0;$17=($16|0)==0;if($17){$node$2=$node$0$us;break L12}}$node$01$i11$us=HEAP32[$node$0$us>>2]|0;$18=($node$01$i11$us|0)==(0|0);if($18){label=25;break L12}else{$node$02$i12$us=$node$01$i11$us}while(1){$19=$node$02$i12$us+4|0;$20=HEAP32[$19>>2]|0;$21=($20|0)==($frame_id|0);if($21){$node$0$us=$node$02$i12$us;continue L16}$node$0$i14$us=HEAP32[$node$02$i12$us>>2]|0;$22=($node$0$i14$us|0)==(0|0);if($22){label=25;break L12}else{$node$02$i12$us=$node$0$i14$us}}}}else{$node$0=$$0$i}L24:while(1){$23=$node$0+8|0;$24=_isSameLang($23,$lang)|0;$25=($24|0)==0;L26:do{if(!$25){$26=$node$0+20|0;$27=HEAP32[$26>>2]|0;$28=($27|0)==1;$29=$node$0+16|0;$30=HEAP32[$29>>2]|0;$31=($30|0)==0;if($28){if($31){$node$2=$node$0;break L12}else{break}}if($31){$node$2=$node$0;break L12}$32=$node$0+12|0;$33=HEAP32[$32>>2]|0;$i$01$i=0;while(1){$36=$33+$i$01$i|0;$37=HEAP8[$36>>0]|0;$38=$desc+$i$01$i|0;$39=HEAP8[$38>>0]|0;$40=$37<<24>>24==$39<<24>>24;$34=$i$01$i+1|0;if(!$40){break L26}$35=$34>>>0<$30>>>0;if($35){$i$01$i=$34}else{$node$1=$node$0;label=24;break L12}}}}while(0);$41=($node$0|0)==(0|0);$$in$i=$41?$4:$node$0;$node$01$i11=HEAP32[$$in$i>>2]|0;$42=($node$01$i11|0)==(0|0);if($42){label=25;break L12}else{$node$02$i12=$node$01$i11}while(1){$43=$node$02$i12+4|0;$44=HEAP32[$43>>2]|0;$45=($44|0)==($frame_id|0);if($45){$node$0=$node$02$i12;continue L24}$node$0$i14=HEAP32[$node$02$i12>>2]|0;$46=($node$0$i14|0)==(0|0);if($46){label=25;break L12}else{$node$02$i12=$node$0$i14}}}}}else{$node$1=$$0$i;label=24}}while(0);if((label|0)==24){$47=($node$1|0)==(0|0);if($47){label=25}else{$node$2=$node$1}}if((label|0)==25){$48=_calloc(1,36)|0;$49=($48|0)==(0|0);if($49){$$0=-254;return $$0|0}$50=$2+85748|0;$51=HEAP32[$50>>2]|0;$52=($51|0)==(0|0);if($52){label=28}else{$53=HEAP32[$4>>2]|0;$54=($53|0)==(0|0);if($54){label=28}else{HEAP32[$51>>2]=$48}}if((label|0)==28){HEAP32[$4>>2]=$48}HEAP32[$50>>2]=$48;$node$2=$48}$55=$node$2+4|0;HEAP32[$55>>2]=$frame_id;$56=$node$2+8|0;$57=($lang|0)==(0|0);do{if($57){label=33}else{$58=HEAP8[$lang>>0]|0;$59=$58<<24>>24==0;if($59){label=33}else{HEAP8[$56>>0]=$58;$66=HEAP8[$lang>>0]|0;$67=$66<<24>>24==0;if($67){$i$0$lcssa$ph$i=1}else{$68=$lang+1|0;$69=HEAP8[$68>>0]|0;$70=$node$2+9|0;HEAP8[$70>>0]=$69;$71=HEAP8[$lang>>0]|0;$72=$71<<24>>24==0;if($72){$i$0$lcssa$ph$i=2}else{$62=$lang+2|0;$63=HEAP8[$62>>0]|0;$64=$node$2+10|0;HEAP8[$64>>0]=$63;break}}$scevgep$i=($node$2+8|0)+$i$0$lcssa$ph$i|0;$65=$i$0$lcssa$ph$i^3;_memset($scevgep$i|0,32,$65|0)|0}}}while(0);if((label|0)==33){HEAP8[$56>>0]=88;$60=$node$2+9|0;HEAP8[$60>>0]=88;$61=$node$2+10|0;HEAP8[$61>>0]=88}$73=$node$2+12|0;$74=HEAP32[$73>>2]|0;_free($74);HEAP32[$73>>2]=0;$75=($desc|0)==(0|0);if($75){$$0$i9=0}else{$n$0$i7=0;while(1){$76=$desc+$n$0$i7|0;$77=HEAP8[$76>>0]|0;$78=$77<<24>>24==0;$79=$n$0$i7+1|0;if($78){$$lcssa84=$79;$n$0$i7$lcssa=$n$0$i7;break}else{$n$0$i7=$79}}$80=($n$0$i7$lcssa|0)==0;if($80){$$0$i9=0}else{$81=_calloc($$lcssa84,1)|0;HEAP32[$73>>2]=$81;$82=($81|0)==(0|0);if($82){$$0$i9=0}else{_memcpy($81|0,$desc|0,$n$0$i7$lcssa|0)|0;$83=$81+$n$0$i7$lcssa|0;HEAP8[$83>>0]=0;$$0$i9=$n$0$i7$lcssa}}}$84=$node$2+16|0;HEAP32[$84>>2]=$$0$i9;$85=$node$2+20|0;HEAP32[$85>>2]=0;$86=$node$2+24|0;$87=HEAP32[$86>>2]|0;_free($87);HEAP32[$86>>2]=0;$88=($text|0)==(0|0);if($88){$$0$i2=0}else{$n$0$i=0;while(1){$89=$text+$n$0$i|0;$90=HEAP8[$89>>0]|0;$91=$90<<24>>24==0;$92=$n$0$i+1|0;if($91){$$lcssa=$92;$n$0$i$lcssa=$n$0$i;break}else{$n$0$i=$92}}$93=($n$0$i$lcssa|0)==0;if($93){$$0$i2=0}else{$94=_calloc($$lcssa,1)|0;HEAP32[$86>>2]=$94;$95=($94|0)==(0|0);if($95){$$0$i2=0}else{_memcpy($94|0,$text|0,$n$0$i$lcssa|0)|0;$96=$94+$n$0$i$lcssa|0;HEAP8[$96>>0]=0;$$0$i2=$n$0$i$lcssa}}}$97=$node$2+28|0;HEAP32[$97>>2]=$$0$i2;$98=$node$2+32|0;HEAP32[$98>>2]=0;$99=$2+85696|0;$100=HEAP32[$99>>2]|0;$101=$100|3;HEAP32[$99>>2]=$101;$$0=0;return $$0|0}function _isSameLang($l1,$l2){$l1=$l1|0;$l2=$l2|0;var $$=0,$$$1=0,$$$2=0,$$5=0,$$mask=0,$$mask$1=0,$$mask$2=0,$$unshifted=0,$$unshifted$1=0,$$unshifted$2=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0;var $18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0;var $36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$5=0,$6=0,$7=0,$8=0,$9=0,$b$0=0,$b$0$1=0,$b$0$2=0,label=0,sp=0;sp=STACKTOP;$0=($l2|0)==(0|0);if($0){$11=88;$23=88;$35=88}else{$1=HEAP8[$l2>>0]|0;$2=$1<<24>>24==0;if($2){$11=88;$23=88;$35=88}else{$3=$l2+1|0;$4=HEAP8[$3>>0]|0;$5=$l2+2|0;$6=HEAP8[$5>>0]|0;$11=$1;$23=$4;$35=$6}}$7=HEAP8[$l1>>0]|0;$8=$7<<24>>24;$9=_tolower($8)|0;$10=$11<<24>>24;$12=_tolower($10)|0;$13=$9&255;$14=$13<<24>>24<32;$$=$14?32:$9;$15=$12&255;$16=$15<<24>>24<32;$b$0=$16?32:$12;$$unshifted=$b$0^$$;$$mask=$$unshifted&255;$17=($$mask|0)==0;if(!$17){return 0}$18=$l1+1|0;$19=HEAP8[$18>>0]|0;$20=$19<<24>>24;$21=_tolower($20)|0;$22=$23<<24>>24;$24=_tolower($22)|0;$25=$21&255;$26=$25<<24>>24<32;$$$1=$26?32:$21;$27=$24&255;$28=$27<<24>>24<32;$b$0$1=$28?32:$24;$$unshifted$1=$b$0$1^$$$1;$$mask$1=$$unshifted$1&255;$29=($$mask$1|0)==0;if($29){$30=$l1+2|0;$31=HEAP8[$30>>0]|0;$32=$31<<24>>24;$33=_tolower($32)|0;$34=$35<<24>>24;$36=_tolower($34)|0;$37=$33&255;$38=$37<<24>>24<32;$$$2=$38?32:$33;$39=$36&255;$40=$39<<24>>24<32;$b$0$2=$40?32:$36;$$unshifted$2=$b$0$2^$$$2;$$mask$2=$$unshifted$2&255;$41=($$mask$2|0)==0;$$5=$41&1;return $$5|0}else{return 0}return 0|0}function _is_lame_global_flags_valid($gfp){$gfp=$gfp|0;var $$=0,$$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=($gfp|0)==(0|0);if($0){$$0=0;return $$0|0}$1=HEAP32[$gfp>>2]|0;$2=($1|0)==-487877;$$=$2&1;$$0=$$;return $$0|0}function _lame_init_params($gfp){$gfp=$gfp|0;var $$=0,$$$i=0,$$0=0,$$0$i13=0,$$1$i=0,$$10=0,$$11=0,$$12=0,$$30=0,$$5=0,$$6=0,$$9=0,$$lcssa=0,$$lcssa113=0.0,$$lcssa114=0.0,$$phi$trans$insert56=0,$$phi$trans$insert64=0,$$phi$trans$insert77=0,$$pr$i=0.0,$$pre=0;var $$pre$i=0.0,$$pre57=0,$$pre58=0,$$pre59=0.0,$$pre60=0,$$pre63=0,$$pre65=0,$$pre67=0,$$pre69=0,$$pre69$1=0,$$pre69$10=0,$$pre69$11=0,$$pre69$12=0,$$pre69$13=0,$$pre69$14=0,$$pre69$15=0,$$pre69$16=0,$$pre69$17=0,$$pre69$2=0,$$pre69$3=0;var $$pre69$4=0,$$pre69$5=0,$$pre69$6=0,$$pre69$7=0,$$pre69$8=0,$$pre69$9=0,$$pre70=0,$$pre70$1=0,$$pre70$10=0,$$pre70$11=0,$$pre70$12=0,$$pre70$13=0,$$pre70$14=0,$$pre70$15=0,$$pre70$16=0,$$pre70$17=0,$$pre70$2=0,$$pre70$3=0,$$pre70$4=0,$$pre70$5=0;var $$pre70$6=0,$$pre70$7=0,$$pre70$8=0,$$pre70$9=0,$$pre72=0,$$pre74=0,$$pre75=0,$$pre78=0,$$sink=0.0,$$sink54=0,$$sink55=0,$$storemerge=0,$$storemerge91=0,$$suggested_samplefreq$0$i=0,$$suggested_samplefreq$2$i=0,$$suggested_samplefreq$4$i=0,$$suggested_samplefreq$6$i=0,$0=0,$1=0,$10=0;var $100=0,$1000=0,$1001=0,$1002=0,$1003=0,$1004=0,$1005=0,$1006=0,$1007=0,$1008=0,$1009=0,$101=0,$1010=0,$1011=0,$1012=0,$1013=0,$1014=0,$1015=0,$1016=0,$1017=0;var $1018=0,$1019=0,$102=0,$1020=0,$1021=0,$1022=0,$1023=0,$1024=0,$1025=0,$1026=0,$1027=0,$1028=0,$1029=0,$103=0,$1030=0,$1031=0,$1032=0,$1033=0,$1034=0,$1035=0;var $1036=0,$1037=0,$1038=0,$1039=0,$104=0,$1040=0,$1041=0,$1042=0,$1043=0,$1044=0,$1045=0,$1046=0,$1047=0,$1048=0,$1049=0,$105=0,$1050=0,$1051=0,$1052=0,$1053=0;var $1054=0,$1055=0,$1056=0,$1057=0,$1058=0,$1059=0,$106=0,$1060=0,$1061=0.0,$1062=0.0,$1063=0.0,$1064=0.0,$1065=0.0,$1066=0,$1067=0,$1068=0,$1069=0,$107=0,$1070=0,$1071=0;var $1072=0,$1073=0,$1074=0,$1075=0,$1076=0.0,$1077=0,$1078=0,$1079=0,$108=0,$1080=0,$1081=0,$1082=0,$1083=0.0,$1084=0,$1085=0,$1086=0,$1087=0.0,$1088=0,$1089=0,$109=0;var $1090=0,$1091=0,$1092=0,$1093=0,$1094=0,$1095=0,$1096=0,$1097=0,$1098=0,$1099=0.0,$11=0,$110=0,$1100=0.0,$1101=0,$1102=0.0,$1103=0.0,$1104=0,$1105=0,$1106=0,$1107=0;var $1108=0,$1109=0,$111=0,$1110=0,$1111=0,$1112=0,$1113=0,$1114=0,$1115=0,$1116=0,$1117=0,$1118=0,$1119=0,$112=0,$1120=0,$1121=0,$1122=0,$1123=0,$1124=0,$1125=0;var $1126=0,$1127=0,$1128=0,$1129=0,$113=0,$1130=0,$1131=0,$1132=0.0,$1133=0,$1134=0,$1135=0.0,$1136=0.0,$1137=0,$1138=0,$1139=0.0,$114=0,$1140=0,$1141=0,$1142=0.0,$1143=0.0;var $1144=0,$1145=0,$1146=0.0,$1147=0,$1148=0,$1149=0.0,$115=0,$1150=0.0,$1151=0,$1152=0,$1153=0.0,$1154=0,$1155=0,$1156=0.0,$1157=0.0,$1158=0.0,$1159=0,$116=0,$1160=0.0,$1161=0;var $1162=0.0,$1163=0.0,$1164=0,$1165=0.0,$1166=0.0,$1167=0,$1168=0,$1169=0,$117=0,$1170=0,$1171=0.0,$1172=0.0,$1173=0,$1174=0,$1175=0,$1176=0,$1177=0,$1178=0,$1179=0,$118=0;var $1180=0,$1181=0,$1182=0,$1183=0,$1184=0,$1185=0,$1186=0,$1187=0,$1188=0,$1189=0,$119=0,$1190=0,$1191=0,$1192=0,$1193=0,$1194=0,$1195=0,$1196=0,$1197=0,$1198=0;var $1199=0,$12=0,$120=0,$1200=0,$1201=0,$1202=0,$1203=0,$1204=0,$1205=0,$1206=0,$1207=0,$1208=0,$1209=0,$121=0,$1210=0,$122=0,$123=0,$124=0.0,$125=0.0,$126=0;var $127=0.0,$128=0,$129=0,$13=0,$130=0,$131=0.0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0.0,$139=0.0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0;var $145=0,$146=0,$147=0.0,$148=0.0,$149=0.0,$15=0,$150=0.0,$151=0.0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0;var $163=0,$164=0,$165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0;var $181=0,$182=0.0,$183=0,$184=0.0,$185=0.0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0.0,$193=0,$194=0.0,$195=0.0,$196=0,$197=0.0,$198=0.0,$199=0.0;var $2=0,$20=0,$200=0,$201=0.0,$202=0.0,$203=0.0,$204=0,$205=0,$206=0.0,$207=0,$208=0,$209=0.0,$21=0,$210=0,$211=0.0,$212=0,$213=0.0,$214=0,$215=0.0,$216=0.0;var $217=0.0,$218=0.0,$219=0.0,$22=0,$220=0.0,$221=0.0,$222=0,$223=0.0,$224=0.0,$225=0.0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0,$231=0,$232=0,$233=0,$234=0;var $235=0,$236=0,$237=0,$238=0,$239=0,$24=0,$240=0,$241=0.0,$242=0,$243=0,$244=0,$245=0,$246=0,$247=0,$248=0.0,$249=0,$25=0,$250=0,$251=0,$252=0;var $253=0,$254=0.0,$255=0,$256=0,$257=0,$258=0.0,$259=0,$26=0,$260=0.0,$261=0.0,$262=0.0,$263=0.0,$264=0.0,$265=0,$266=0,$267=0,$268=0,$269=0,$27=0,$270=0.0;var $271=0,$272=0,$273=0,$274=0.0,$275=0,$276=0.0,$277=0.0,$278=0.0,$279=0.0,$28=0,$280=0.0,$281=0,$282=0,$283=0,$284=0,$285=0,$286=0.0,$287=0,$288=0,$289=0;var $29=0,$290=0.0,$291=0,$292=0.0,$293=0.0,$294=0.0,$295=0.0,$296=0.0,$297=0,$298=0,$299=0,$3=0,$30=0,$300=0.0,$301=0.0,$302=0,$303=0.0,$304=0,$305=0,$306=0;var $307=0,$308=0,$309=0,$31=0,$310=0,$311=0,$312=0,$313=0,$314=0,$315=0,$316=0,$317=0,$318=0,$319=0,$32=0,$320=0,$321=0,$322=0,$323=0,$324=0;var $325=0,$326=0,$327=0,$328=0,$329=0,$33=0,$330=0,$331=0,$332=0,$333=0,$334=0,$335=0,$336=0,$337=0,$338=0,$339=0,$34=0,$340=0,$341=0,$342=0;var $343=0,$344=0,$345=0,$346=0,$347=0,$348=0,$349=0,$35=0,$350=0,$351=0,$352=0,$353=0.0,$354=0,$355=0,$356=0.0,$357=0.0,$358=0.0,$359=0.0,$36=0,$360=0;var $361=0,$362=0,$363=0,$364=0.0,$365=0,$366=0,$367=0.0,$368=0.0,$369=0.0,$37=0,$370=0.0,$371=0,$372=0,$373=0,$374=0,$375=0,$376=0,$377=0,$378=0,$379=0;var $38=0,$380=0,$381=0,$382=0,$383=0,$384=0,$385=0,$386=0,$387=0,$388=0,$389=0,$39=0,$390=0,$391=0,$392=0,$393=0,$394=0,$395=0,$396=0,$397=0;var $398=0,$399=0,$4=0,$40=0,$400=0,$401=0,$402=0,$403=0,$404=0,$405=0,$406=0,$407=0,$408=0,$409=0,$41=0,$410=0,$411=0,$412=0,$413=0,$414=0;var $415=0,$416=0,$417=0,$418=0,$419=0,$42=0,$420=0,$421=0,$422=0,$423=0,$424=0,$425=0,$426=0,$427=0,$428=0.0,$429=0,$43=0,$430=0,$431=0.0,$432=0.0;var $433=0.0,$434=0.0,$435=0,$436=0,$437=0,$438=0,$439=0.0,$44=0,$440=0,$441=0,$442=0.0,$443=0.0,$444=0.0,$445=0.0,$446=0,$447=0,$448=0,$449=0,$45=0,$450=0;var $451=0,$452=0.0,$453=0.0,$454=0.0,$455=0,$456=0,$457=0,$458=0,$459=0,$46=0,$460=0.0,$461=0.0,$462=0.0,$463=0,$464=0.0,$465=0.0,$466=0.0,$467=0,$468=0,$469=0;var $47=0,$470=0,$471=0,$472=0,$473=0,$474=0.0,$475=0.0,$476=0.0,$477=0,$478=0,$479=0,$48=0,$480=0,$481=0.0,$482=0.0,$483=0.0,$484=0,$485=0.0,$486=0.0,$487=0.0;var $488=0.0,$489=0,$49=0,$490=0.0,$491=0.0,$492=0.0,$493=0,$494=0,$495=0,$496=0,$497=0,$498=0,$499=0,$5=0,$50=0,$500=0,$501=0,$502=0.0,$503=0.0,$504=0.0;var $505=0,$506=0,$507=0.0,$508=0.0,$509=0,$51=0,$510=0,$511=0,$512=0.0,$513=0.0,$514=0.0,$515=0.0,$516=0.0,$517=0,$518=0,$519=0,$52=0,$520=0,$521=0,$522=0;var $523=0,$524=0,$525=0.0,$526=0.0,$527=0.0,$528=0,$529=0.0,$53=0,$530=0.0,$531=0.0,$532=0.0,$533=0.0,$534=0.0,$535=0.0,$536=0.0,$537=0.0,$538=0.0,$539=0,$54=0,$540=0.0;var $541=0.0,$542=0.0,$543=0.0,$544=0.0,$545=0.0,$546=0.0,$547=0.0,$548=0.0,$549=0,$55=0,$550=0,$551=0.0,$552=0.0,$553=0.0,$554=0.0,$555=0.0,$556=0,$557=0.0,$558=0.0,$559=0.0;var $56=0,$560=0.0,$561=0.0,$562=0.0,$563=0.0,$564=0.0,$565=0,$566=0,$567=0.0,$568=0.0,$569=0.0,$57=0,$570=0.0,$571=0,$572=0,$573=0,$574=0,$575=0,$576=0,$577=0;var $578=0,$579=0,$58=0,$580=0,$581=0,$582=0,$583=0,$584=0,$585=0,$586=0,$587=0,$588=0,$589=0,$59=0,$590=0,$591=0,$592=0,$593=0,$594=0,$595=0;var $596=0,$597=0,$598=0,$599=0,$6=0,$60=0,$600=0,$601=0,$602=0,$603=0,$604=0,$605=0,$606=0,$607=0,$608=0,$609=0,$61=0,$610=0,$611=0,$612=0;var $613=0,$614=0,$615=0,$616=0,$617=0,$618=0,$619=0,$62=0,$620=0,$621=0,$622=0,$623=0,$624=0,$625=0,$626=0,$627=0,$628=0,$629=0,$63=0,$630=0;var $631=0,$632=0,$633=0,$634=0,$635=0,$636=0,$637=0,$638=0,$639=0,$64=0,$640=0,$641=0,$642=0,$643=0,$644=0,$645=0,$646=0,$647=0,$648=0,$649=0;var $65=0,$650=0,$651=0,$652=0,$653=0,$654=0,$655=0,$656=0,$657=0,$658=0,$659=0,$66=0,$660=0,$661=0,$662=0,$663=0,$664=0,$665=0,$666=0,$667=0;var $668=0,$669=0,$67=0,$670=0,$671=0,$672=0,$673=0,$674=0,$675=0,$676=0,$677=0,$678=0,$679=0,$68=0,$680=0,$681=0,$682=0,$683=0,$684=0,$685=0;var $686=0,$687=0,$688=0,$689=0,$69=0,$690=0,$691=0,$692=0,$693=0,$694=0,$695=0,$696=0,$697=0,$698=0,$699=0,$7=0,$70=0,$700=0,$701=0,$702=0;var $703=0,$704=0,$705=0,$706=0,$707=0,$708=0,$709=0,$71=0,$710=0,$711=0,$712=0,$713=0,$714=0,$715=0,$716=0,$717=0,$718=0,$719=0,$72=0,$720=0;var $721=0,$722=0,$723=0,$724=0,$725=0,$726=0,$727=0,$728=0,$729=0,$73=0,$730=0,$731=0,$732=0,$733=0,$734=0,$735=0,$736=0,$737=0,$738=0,$739=0;var $74=0,$740=0,$741=0,$742=0,$743=0,$744=0,$745=0,$746=0,$747=0,$748=0,$749=0,$75=0,$750=0,$751=0,$752=0,$753=0,$754=0,$755=0,$756=0,$757=0;var $758=0,$759=0,$76=0,$760=0,$761=0,$762=0.0,$763=0,$764=0,$765=0,$766=0.0,$767=0,$768=0,$769=0,$77=0,$770=0.0,$771=0,$772=0,$773=0,$774=0.0,$775=0;var $776=0,$777=0,$778=0.0,$779=0,$78=0,$780=0,$781=0,$782=0.0,$783=0,$784=0,$785=0,$786=0.0,$787=0,$788=0,$789=0,$79=0,$790=0.0,$791=0,$792=0,$793=0;var $794=0.0,$795=0,$796=0,$797=0,$798=0.0,$799=0,$8=0,$80=0,$800=0,$801=0,$802=0.0,$803=0,$804=0,$805=0,$806=0.0,$807=0,$808=0,$809=0,$81=0,$810=0.0;var $811=0,$812=0,$813=0,$814=0.0,$815=0,$816=0,$817=0,$818=0.0,$819=0,$82=0,$820=0,$821=0,$822=0.0,$823=0,$824=0,$825=0,$826=0.0,$827=0,$828=0,$829=0;var $83=0,$830=0.0,$831=0,$832=0,$833=0,$834=0.0,$835=0,$836=0,$837=0,$838=0,$839=0,$84=0,$840=0,$841=0,$842=0,$843=0,$844=0,$845=0,$846=0,$847=0;var $848=0,$849=0,$85=0,$850=0,$851=0,$852=0,$853=0,$854=0,$855=0,$856=0,$857=0,$858=0,$859=0,$86=0,$860=0,$861=0,$862=0,$863=0,$864=0,$865=0;var $866=0,$867=0,$868=0,$869=0,$87=0,$870=0,$871=0,$872=0,$873=0,$874=0,$875=0,$876=0,$877=0,$878=0,$879=0,$88=0,$880=0,$881=0,$882=0,$883=0;var $884=0,$885=0,$886=0,$887=0,$888=0,$889=0,$89=0,$890=0,$891=0,$892=0,$893=0,$894=0,$895=0,$896=0,$897=0,$898=0.0,$899=0.0,$9=0,$90=0,$900=0;var $901=0.0,$902=0.0,$903=0.0,$904=0,$905=0,$906=0,$907=0,$908=0,$909=0,$91=0,$910=0,$911=0,$912=0,$913=0,$914=0,$915=0,$916=0,$917=0,$918=0,$919=0;var $92=0,$920=0,$921=0,$922=0,$923=0,$924=0,$925=0,$926=0,$927=0,$928=0,$929=0,$93=0,$930=0,$931=0,$932=0,$933=0,$934=0,$935=0,$936=0,$937=0;var $938=0,$939=0,$94=0,$940=0,$941=0,$942=0,$943=0,$944=0,$945=0,$946=0,$947=0,$948=0,$949=0,$95=0,$950=0,$951=0,$952=0,$953=0,$954=0,$955=0;var $956=0,$957=0,$958=0,$959=0,$96=0,$960=0,$961=0,$962=0,$963=0,$964=0,$965=0,$966=0,$967=0,$968=0,$969=0,$97=0,$970=0,$971=0,$972=0,$973=0;var $974=0,$975=0,$976=0,$977=0,$978=0,$979=0,$98=0,$980=0,$981=0,$982=0,$983=0,$984=0,$985=0,$986=0,$987=0,$988=0,$989=0,$99=0,$990=0,$991=0;var $992=0,$993=0,$994=0,$995=0,$996=0,$997=0,$998=0,$999=0,$band$011$i=0,$band$18$i=0,$band$27$i=0,$exitcond$i=0,$exitcond14$i=0,$exitcond15$i=0,$fabsf=0.0,$fc1$0$i=0.0,$fc2$0$i=0.0,$highpass_band$010$i=0,$highpass_band$1$i=0,$highpass_band$1$i$lcssa=0;var $i$040=0,$i$040$lcssa=0,$lowpass_band$0$minband$0$i=0,$lowpass_band$013$i=0,$lowpass_band$1$i=0,$lowpass_band$1$i$lcssa=0,$m10$sroa$0$0=0.0,$m10$sroa$22$0=0.0,$m10$sroa$8$0=0.0,$maxband$09$i=0,$maxband$1$i=0,$maxband$1$i$lcssa=0,$minband$012$i=0,$minband$1$i=0,$minband$1$i$lcssa=0,$or$cond=0,$or$cond$i=0,$or$cond17$i=0,$or$cond4$i=0,$storemerge$i=0.0;var $storemerge$in$i=0.0,$storemerge$in$in$i=0.0,$storemerge$in$in$in$i=0.0,$storemerge1=0.0,$storemerge2=0.0,$storemerge3=0.0,$storemerge4=0.0,$suggested_samplefreq$0$i=0,$suggested_samplefreq$2$i=0,$suggested_samplefreq$4$i=0,$suggested_samplefreq$6$i=0,$suggested_samplefreq$8$i=0,$switch=0,$vararg_buffer=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$vararg_buffer=sp;$0=$gfp+288|0;$1=HEAP32[$0>>2]|0;$2=$1+16|0;HEAP32[$1>>2]=0;$3=$gfp+180|0;$4=HEAP32[$3>>2]|0;$5=$1+124|0;HEAP32[$5>>2]=$4;$6=$gfp+32|0;$7=HEAP32[$6>>2]|0;$8=$1+140|0;HEAP32[$8>>2]=$7;$9=($7|0)==0;if(!$9){$10=$gfp+36|0;HEAP32[$10>>2]=0}$11=$1+85804|0;$12=HEAP32[$11>>2]|0;$13=($12|0)==(0|0);if(!$13){$14=$gfp+36|0;HEAP32[$14>>2]=0}$15=$gfp+272|0;$16=HEAP32[$15>>2]|0;$17=$1+85828|0;HEAP32[$17>>2]=$16;$18=$gfp+276|0;$19=HEAP32[$18>>2]|0;$20=$1+85832|0;HEAP32[$20>>2]=$19;$21=$gfp+280|0;$22=HEAP32[$21>>2]|0;$23=$1+85836|0;HEAP32[$23>>2]=$22;$24=$gfp+296|0;$25=HEAP32[$24>>2]|0;$26=($25|0)==0;if($26){$34=$1+85756|0;$35=HEAP32[$34>>2]|0;$36=$35&-3;HEAP32[$34>>2]=$36;$48=$36}else{$27=_has_3DNow()|0;$28=$1+85756|0;$29=HEAP32[$28>>2]|0;$30=$27<<1;$31=$30&2;$32=$29&-3;$33=$32|$31;HEAP32[$28>>2]=$33;$48=$33}$37=$gfp+292|0;$38=HEAP32[$37>>2]|0;$39=($38|0)==0;if($39){$46=$1+85756|0;$47=$48&-2;HEAP32[$46>>2]=$47;$67=$47}else{$40=_has_MMX()|0;$41=$1+85756|0;$42=HEAP32[$41>>2]|0;$43=$40&1;$44=$42&-2;$45=$44|$43;HEAP32[$41>>2]=$45;$67=$45}$49=$gfp+300|0;$50=HEAP32[$49>>2]|0;$51=($50|0)==0;if($51){$65=$1+85756|0;$66=$67&-13;HEAP32[$65>>2]=$66}else{$52=_has_SSE()|0;$53=$1+85756|0;$54=HEAP32[$53>>2]|0;$55=$52<<2;$56=$55&4;$57=$54&-5;$58=$57|$56;HEAP32[$53>>2]=$58;$59=_has_SSE2()|0;$60=HEAP32[$53>>2]|0;$61=$59<<3;$62=$61&8;$63=$60&-9;$64=$63|$62;HEAP32[$53>>2]=$64}$68=$1+85796|0;$69=HEAP32[$68>>2]|0;$70=($69|0)==(0|0);if($70){$71=_calloc(1,2772)|0;HEAP32[$68>>2]=$71;$72=($71|0)==(0|0);if($72){$$0=-2;STACKTOP=sp;return $$0|0}}$73=$1+85676|0;$74=HEAP32[$73>>2]|0;$75=($74|0)==(0|0);if($75){$76=_calloc(1,134792)|0;HEAP32[$73>>2]=$76;$77=($76|0)==(0|0);if($77){_freegfc($1);HEAP32[$0>>2]=0;$$0=-2;STACKTOP=sp;return $$0|0}}$78=$gfp+120|0;$79=HEAP32[$78>>2]|0;$80=$1+160|0;HEAP32[$80>>2]=$79;$81=$gfp+104|0;$82=HEAP32[$81>>2]|0;$83=$1+164|0;HEAP32[$83>>2]=$82;$84=$gfp+108|0;$85=HEAP32[$84>>2]|0;$86=$1+168|0;HEAP32[$86>>2]=$85;$87=$gfp+112|0;$88=HEAP32[$87>>2]|0;$89=$1+172|0;HEAP32[$89>>2]=$88;$90=$gfp+116|0;$91=HEAP32[$90>>2]|0;$92=$1+176|0;HEAP32[$92>>2]=$91;$93=$gfp+8|0;$94=HEAP32[$93>>2]|0;$95=$1+68|0;HEAP32[$95>>2]=$94;$96=($94|0)==1;$97=$gfp+48|0;if($96){HEAP32[$97>>2]=3;$98=$1+72|0;HEAP32[$98>>2]=1;$1205=$98;$1206=1;label=23}else{$$pre=HEAP32[$97>>2]|0;$99=($$pre|0)==3;$100=$99?1:2;$101=$1+72|0;HEAP32[$101>>2]=$100;if($99){$1205=$101;$1206=$100;label=23}else{$$phi$trans$insert56=$gfp+52|0;$$pre57=HEAP32[$$phi$trans$insert56>>2]|0;$104=$$pre57;$1207=$100;$142=$101}}if((label|0)==23){$102=$gfp+52|0;HEAP32[$102>>2]=0;$104=0;$1207=$1206;$142=$1205}$103=$1+80|0;HEAP32[$103>>2]=$104;$105=$gfp+156|0;$106=HEAP32[$105>>2]|0;if(($106|0)==4|($106|0)==1){label=29}else if(($106|0)==0){$107=$gfp+168|0;$108=HEAP32[$107>>2]|0;$109=($108|0)==128;if(!$109){$110=$gfp+96|0;$111=HEAP32[$110>>2]|0;$112=($111|0)==0;if($112){HEAP32[$110>>2]=$108}}$117=$gfp+56|0;$118=HEAP32[$117>>2]|0;$119=$1+152|0;HEAP32[$119>>2]=$118;$120=$gfp+96|0;$121=HEAP32[$120>>2]|0;$122=($121|0)==0;do{if($122){$123=$gfp+100|0;$124=+HEAPF32[$123>>2];$fabsf=+Math_abs(+$124);$125=$fabsf;$126=$124!=$124|0.0!=0.0|$124==0.0;if($126){$129=$124==0.0;if(!$129){break}}else{$127=$125*9.9999999747524271E-7;$128=!($125<=$127);if($128){break}}HEAPF32[$123>>2]=11.024999618530273}}while(0);$130=$gfp+100|0;$131=+HEAPF32[$130>>2];$132=$131>0.0;if($132){$133=$gfp+16|0;$134=HEAP32[$133>>2]|0;$135=($134|0)==0;if($135){$136=$gfp+12|0;$137=HEAP32[$136>>2]|0;$138=+($137|0);$139=$138*0.96999999999999997;$140=~~$139;$141=_map2MP3Frequency($140)|0;HEAP32[$133>>2]=$141;$$pre58=HEAP32[$142>>2]|0;$$pre59=+HEAPF32[$130>>2];$144=$141;$146=$$pre58;$149=$$pre59}else{$144=$134;$146=$1207;$149=$131}$143=$144<<4;$145=Math_imul($143,$146)|0;$147=+($145|0);$148=$149;$150=$148*1000.0;$151=$147/$150;$152=~~$151;HEAP32[$120>>2]=$152;$153=_SmpFrqIndex($144,$2)|0;$154=$1+20|0;HEAP32[$154>>2]=$153;$155=HEAP32[$119>>2]|0;$156=($155|0)==0;if($156){$157=HEAP32[$120>>2]|0;$158=HEAP32[$2>>2]|0;$159=HEAP32[$133>>2]|0;$160=_FindNearestBitrate($157,$158,$159)|0;HEAP32[$120>>2]=$160;$580=$119}else{$580=$119}}else{$580=$119}}else{$113=$gfp+56|0;HEAP32[$113>>2]=0;label=29}if((label|0)==29){$114=$gfp+56|0;$115=HEAP32[$114>>2]|0;$116=$1+152|0;HEAP32[$116>>2]=$115;$580=$116}$161=$gfp+16|0;$162=HEAP32[$161>>2]|0;$163=($162|0)==0;L57:do{if($163){$179=HEAP32[$105>>2]|0;if(($179|0)==4|($179|0)==1){$180=$gfp+164|0;$181=HEAP32[$180>>2]|0;$182=+($181|0);$183=$gfp+160|0;$184=+HEAPF32[$183>>2];$185=$182+$184;$186=$gfp+12|0;$187=HEAP32[$186>>2]|0;$i$040=2;while(1){$188=6560+($i$040*24|0)|0;$189=HEAP32[$188>>2]|0;$190=($187|0)==($189|0);if($190){$191=(6560+($i$040*24|0)|0)+4|0;$192=+HEAPF32[$191>>2];$193=$185<$192;if($193){$194=$185/$192;$195=$194;$196=(6560+($i$040*24|0)|0)+12|0;$197=+HEAPF32[$196>>2];$198=$197;$199=$198*$195;$200=~~$199;HEAP32[$180>>2]=$200;$201=+($200|0);$202=$199-$201;$203=$202;HEAPF32[$183>>2]=$203}}$204=($187|0)<($189|0);if(!$204){$205=(6560+($i$040*24|0)|0)+4|0;$206=+HEAPF32[$205>>2];$207=!($206<=$185);if(!$207){$208=(6560+($i$040*24|0)|0)+8|0;$209=+HEAPF32[$208>>2];$210=$185<$209;if($210){$$lcssa=$189;$$lcssa113=$206;$$lcssa114=$209;$i$040$lcssa=$i$040;break}}}$229=$i$040+1|0;$230=($229|0)<9;if($230){$i$040=$229}else{$1208=$162;break L57}}$211=$$lcssa114-$$lcssa113;$212=(6560+($i$040$lcssa*24|0)|0)+16|0;$213=+HEAPF32[$212>>2];$214=(6560+($i$040$lcssa*24|0)|0)+12|0;$215=+HEAPF32[$214>>2];$216=$213-$215;$217=$185-$$lcssa113;$218=$216*$217;$219=$218/$211;$220=$219+$215;$221=$220;$222=~~$220;HEAP32[$180>>2]=$222;$223=+($222|0);$224=$221-$223;$225=$224;HEAPF32[$183>>2]=$225;HEAP32[$161>>2]=$$lcssa;$226=$gfp+184|0;$227=HEAP32[$226>>2]|0;$228=($227|0)==0;if($228){HEAP32[$226>>2]=-1;$1208=$$lcssa}else{$1208=$$lcssa}}else{$1208=0}}else{$164=($162|0)<16000;if($164){$165=$gfp+168|0;$166=HEAP32[$165>>2]|0;$167=($166|0)>8;$$=$167?$166:8;$168=($$|0)<64;$169=$168?$$:64;HEAP32[$165>>2]=$169;$1208=$162;break}$170=($162|0)<32000;$171=$gfp+168|0;$172=HEAP32[$171>>2]|0;if($170){$173=($172|0)>8;$$5=$173?$172:8;$174=($$5|0)<160;$175=$174?$$5:160;HEAP32[$171>>2]=$175;$1208=$162;break}else{$176=($172|0)>32;$$6=$176?$172:32;$177=($$6|0)<320;$178=$177?$$6:320;HEAP32[$171>>2]=$178;$1208=$162;break}}}while(0);$231=$gfp+184|0;$232=HEAP32[$231>>2]|0;$233=($232|0)==0;if($233){$234=HEAP32[$105>>2]|0;switch($234|0){case 0:{$235=$gfp+96|0;$236=HEAP32[$235>>2]|0;$237=$236&65535;$238=_nearestBitrateFullIndex($237)|0;$239=(6776+($238<<3)|0)+4|0;$240=HEAP32[$239>>2]|0;$241=+($240|0);$301=$241;break}case 3:{$242=$gfp+168|0;$243=HEAP32[$242>>2]|0;$244=$243&65535;$245=_nearestBitrateFullIndex($244)|0;$246=(6776+($245<<3)|0)+4|0;$247=HEAP32[$246>>2]|0;$248=+($247|0);$301=$248;break}case 2:{$249=$gfp+164|0;$250=HEAP32[$249>>2]|0;$251=$250>>>0<10;if($251){$252=6912+($250<<2)|0;$253=HEAP32[$252>>2]|0;$254=+($253|0);$255=$250+1|0;$256=6912+($255<<2)|0;$257=HEAP32[$256>>2]|0;$258=+($257|0);$259=$gfp+160|0;$260=+HEAPF32[$259>>2];$261=$260;$262=$258-$254;$263=$262*$261;$264=$263+$254;$301=$264}else{$301=19500.0}break}case 1:case 4:{$265=$gfp+164|0;$266=HEAP32[$265>>2]|0;$267=$266>>>0<10;if($267){$268=6960+($266<<2)|0;$269=HEAP32[$268>>2]|0;$270=+($269|0);$271=$266+1|0;$272=6960+($271<<2)|0;$273=HEAP32[$272>>2]|0;$274=+($273|0);$275=$gfp+160|0;$276=+HEAPF32[$275>>2];$277=$276;$278=$274-$270;$279=$278*$277;$280=$279+$270;$301=$280}else{$301=21500.0}break}default:{$281=$gfp+164|0;$282=HEAP32[$281>>2]|0;$283=$282>>>0<10;if($283){$284=7008+($282<<2)|0;$285=HEAP32[$284>>2]|0;$286=+($285|0);$287=$282+1|0;$288=7008+($287<<2)|0;$289=HEAP32[$288>>2]|0;$290=+($289|0);$291=$gfp+160|0;$292=+HEAPF32[$291>>2];$293=$292;$294=$290-$286;$295=$294*$293;$296=$295+$286;$301=$296}else{$301=19500.0}}}$297=HEAP32[$97>>2]|0;$298=($297|0)==3;if($298){$299=HEAP32[$105>>2]|0;if(($299|0)==3|($299|0)==0){$300=$301*1.5;$303=$300}else{$303=$301}}else{$303=$301}$302=~~$303;HEAP32[$231>>2]=$302;$$pre60=HEAP32[$161>>2]|0;$304=$$pre60;$307=$302}else{$304=$1208;$307=$232}$305=($304|0)==0;if($305){$306=$307<<1;$308=$gfp+12|0;$309=HEAP32[$308>>2]|0;$310=($306|0)>($309|0);if($310){$311=($309|0)/2&-1;HEAP32[$231>>2]=$311;$321=$311}else{$321=$307}$312=($309|0)>47999;do{if($312){$suggested_samplefreq$0$i=48000}else{$313=($309|0)>44099;if($313){$suggested_samplefreq$0$i=44100}else{$314=($309|0)>31999;if($314){$suggested_samplefreq$0$i=32000}else{$315=($309|0)>23999;if($315){$suggested_samplefreq$0$i=24000}else{$316=($309|0)>22049;if($316){$suggested_samplefreq$0$i=22050}else{$317=($309|0)>15999;if($317){$suggested_samplefreq$0$i=16000}else{$318=($309|0)>11999;if($318){$suggested_samplefreq$0$i=12000;break}$319=($309|0)>11024;if($319){$suggested_samplefreq$0$i=11025;break}$320=($309|0)>7999;$$$i=$320?8000:44100;$suggested_samplefreq$0$i=$$$i}}}}}}}while(0);$322=($321|0)==-1;do{if($322){$$0$i13=$suggested_samplefreq$0$i}else{$323=($321|0)<15961;$$suggested_samplefreq$0$i=$323?44100:$suggested_samplefreq$0$i;$324=($321|0)<15251;$suggested_samplefreq$2$i=$324?32000:$$suggested_samplefreq$0$i;$325=($321|0)<11221;$$suggested_samplefreq$2$i=$325?24000:$suggested_samplefreq$2$i;$326=($321|0)<9971;$suggested_samplefreq$4$i=$326?22050:$$suggested_samplefreq$2$i;$327=($321|0)<7231;$$suggested_samplefreq$4$i=$327?16000:$suggested_samplefreq$4$i;$328=($321|0)<5421;$suggested_samplefreq$6$i=$328?12000:$$suggested_samplefreq$4$i;$329=($321|0)<4511;$$suggested_samplefreq$6$i=$329?11025:$suggested_samplefreq$6$i;$330=($321|0)<3971;$suggested_samplefreq$8$i=$330?8000:$$suggested_samplefreq$6$i;$331=($suggested_samplefreq$8$i|0)>($309|0);if($331){$332=($309|0)>44100;if($332){$$0$i13=48000}else{$333=($309|0)>32000;if($333){$$0$i13=44100}else{$334=($309|0)>24000;if($334){$$0$i13=32000}else{$335=($309|0)>22050;if($335){$$0$i13=24000;break}$336=($309|0)>16000;if($336){$$0$i13=22050;break}$337=($309|0)>12000;if($337){$$0$i13=16000;break}$338=($309|0)>11025;if($338){$$0$i13=12000;break}$339=($309|0)>8000;$$1$i=$339?11025:8000;$$0$i13=$$1$i}}}}else{$$0$i13=$suggested_samplefreq$8$i}}}while(0);HEAP32[$161>>2]=$$0$i13;$341=$321;$344=$$0$i13}else{$341=$307;$344=$304}$340=HEAP32[$105>>2]|0;do{if(($340|0)==4|($340|0)==1){$342=($341|0)>24000;$$9=$342?24000:$341;$343=($344|0)/2&-1;$345=($343|0)<($$9|0);$$storemerge91=$345?$343:$$9;HEAP32[$231>>2]=$$storemerge91;$346=($340|0)==3;if($346){label=98}}else{$347=($341|0)>20500;$$10=$347?20500:$341;$348=($344|0)/2&-1;$349=($348|0)<($$10|0);$$storemerge=$349?$348:$$10;HEAP32[$231>>2]=$$storemerge;if(($340|0)==3){label=98;break}else if(!(($340|0)==0)){break}$350=$344<<4;$351=HEAP32[$142>>2]|0;$352=Math_imul($350,$351)|0;$353=+($352|0);$354=$gfp+96|0;$355=HEAP32[$354>>2]|0;$356=+($355|0);$357=$356*1000.0;$358=$353/$357;$359=$358;$360=$gfp+100|0;HEAPF32[$360>>2]=$359}}while(0);if((label|0)==98){$361=$344<<4;$362=HEAP32[$142>>2]|0;$363=Math_imul($361,$362)|0;$364=+($363|0);$365=$gfp+168|0;$366=HEAP32[$365>>2]|0;$367=+($366|0);$368=$367*1000.0;$369=$364/$368;$370=$369;$371=$gfp+100|0;HEAPF32[$371>>2]=$370}$372=$gfp+36|0;$373=HEAP32[$372>>2]|0;$374=($373|0)==0;$375=$gfp+60|0;if($374){HEAP32[$375>>2]=0;$376=$gfp+64|0;HEAP32[$376>>2]=0;$377=$1+132|0;HEAP32[$377>>2]=0;$378=$1+128|0;HEAP32[$378>>2]=0;$379=$1+136|0;HEAP32[$379>>2]=0}else{$$pre63=HEAP32[$375>>2]|0;$$phi$trans$insert64=$gfp+64|0;$$pre65=HEAP32[$$phi$trans$insert64>>2]|0;$380=$1+128|0;HEAP32[$380>>2]=$$pre63;$381=$1+136|0;HEAP32[$381>>2]=$$pre65;$382=($$pre65|0)==0;if($382){$1209=0}else{$383=$1+132|0;HEAP32[$383>>2]=1;$1209=$$pre65}$384=($$pre63|0)==0;do{if($384){$388=$1209}else{$385=HEAP32[$73>>2]|0;$386=_InitGainAnalysis($385|0,$344|0)|0;$387=($386|0)==0;if(!$387){$$pre67=HEAP32[$381>>2]|0;$388=$$pre67;break}_freegfc($1);HEAP32[$0>>2]=0;$$0=-6;STACKTOP=sp;return $$0|0}}while(0);$389=($388|0)==0;if(!$389){$390=$gfp+40|0;$391=HEAP32[$390>>2]|0;$392=($391|0)==0;if($392){$393=$1+85808|0;$394=HEAP32[$393>>2]|0;$395=($394|0)==(0|0);if(!$395){_hip_decode_exit($394|0)|0}$396=_hip_decode_init()|0;HEAP32[$393>>2]=$396;$397=HEAP32[$21>>2]|0;_hip_set_errorf($396|0,$397|0);$398=HEAP32[$393>>2]|0;$399=HEAP32[$18>>2]|0;_hip_set_debugf($398|0,$399|0);$400=HEAP32[$393>>2]|0;$401=HEAP32[$15>>2]|0;_hip_set_msgf($400|0,$401|0)}}}$402=$gfp+128|0;$403=HEAP32[$402>>2]|0;$404=$1+144|0;HEAP32[$404>>2]=$403;$405=HEAP32[$231>>2]|0;$406=$1+52|0;HEAP32[$406>>2]=$405;$407=$gfp+188|0;$408=HEAP32[$407>>2]|0;$409=$1+56|0;HEAP32[$409>>2]=$408;$410=$gfp+12|0;$411=HEAP32[$410>>2]|0;$412=$1+60|0;HEAP32[$412>>2]=$411;$413=HEAP32[$161>>2]|0;$414=$1+64|0;HEAP32[$414>>2]=$413;$415=($413|0)<24001;$416=$415?1:2;$417=$1+76|0;HEAP32[$417>>2]=$416;$418=$1+84760|0;HEAP32[$418>>2]=576;$419=HEAP32[$105>>2]|0;if(($419|0)==4|($419|0)==2|($419|0)==1){$420=$gfp+164|0;$421=HEAP32[$420>>2]|0;$422=7056+($421<<2)|0;$423=HEAP32[$422>>2]|0;$424=$gfp+100|0;HEAP32[$424>>2]=$423}else if(($419|0)==3){$425=$413<<4;$426=HEAP32[$142>>2]|0;$427=Math_imul($425,$426)|0;$428=+($427|0);$429=$gfp+168|0;$430=HEAP32[$429>>2]|0;$431=+($430|0);$432=$431*1000.0;$433=$428/$432;$434=$433;$435=$gfp+100|0;HEAPF32[$435>>2]=$434}else{$436=$413<<4;$437=HEAP32[$142>>2]|0;$438=Math_imul($436,$437)|0;$439=+($438|0);$440=$gfp+96|0;$441=HEAP32[$440>>2]|0;$442=+($441|0);$443=$442*1000.0;$444=$439/$443;$445=$444;$446=$gfp+100|0;HEAPF32[$446>>2]=$445}$447=HEAP32[$97>>2]|0;$448=($447|0)==4;if($448){HEAP32[$97>>2]=1;$450=1}else{$450=$447}$449=$1+180|0;HEAP32[$449>>2]=$450;$451=($408|0)>0;if($451){$452=+($408|0);$453=$452*2.0;$454=$453;$455=$1+256|0;HEAPF32[$455>>2]=$454;$456=$gfp+196|0;$457=HEAP32[$456>>2]|0;$458=($457|0)>-1;if($458){$459=$408+$457|0;$460=+($459|0);$461=$460*2.0;$462=$461;$$sink=$462}else{$$sink=$454}$463=$1+260|0;$464=+($413|0);$465=$454/$464;HEAPF32[$455>>2]=$465;$466=$$sink/$464;HEAPF32[$463>>2]=$466;$507=$466}else{$467=$1+256|0;HEAPF32[$467>>2]=0.0;$468=$1+260|0;HEAPF32[$468>>2]=0.0;$507=0.0}$469=$1+248|0;HEAPF32[$469>>2]=0.0;$470=$1+252|0;HEAPF32[$470>>2]=0.0;$471=($405|0)>0;$472=($413|0)/2&-1;$473=($405|0)<($472|0);$or$cond=$471&$473;if($or$cond){$474=+($405|0);$475=$474*2.0;$476=$475;HEAPF32[$470>>2]=$476;$477=$gfp+192|0;$478=HEAP32[$477>>2]|0;$479=($478|0)>-1;if($479){$480=$405-$478|0;$481=+($480|0);$482=$481*2.0;$483=$482;HEAPF32[$469>>2]=$483;$484=$483<0.0;if($484){HEAPF32[$469>>2]=0.0;$487=0.0}else{$487=$483}}else{HEAPF32[$469>>2]=$476;$487=$476}$485=+($413|0);$486=$487/$485;HEAPF32[$469>>2]=$486;$488=$476/$485;HEAPF32[$470>>2]=$488;$489=$486>0.0;if($489){$band$011$i=0;$lowpass_band$013$i=32;$minband$012$i=999;while(1){$490=+($band$011$i|0);$491=$490*0.032258064516129031;$492=$491;$493=!($492>=$488);$494=($lowpass_band$013$i|0)<($band$011$i|0);$495=$494|$493;$lowpass_band$1$i=$495?$lowpass_band$013$i:$band$011$i;$496=$486<$492;$497=$492<$488;$or$cond4$i=$497&$496;$498=($minband$012$i|0)<($band$011$i|0);$499=$498?$minband$012$i:$band$011$i;$minband$1$i=$or$cond4$i?$499:$minband$012$i;$500=$band$011$i+1|0;$exitcond15$i=($500|0)==32;if($exitcond15$i){$lowpass_band$1$i$lcssa=$lowpass_band$1$i;$minband$1$i$lcssa=$minband$1$i;break}else{$band$011$i=$500;$lowpass_band$013$i=$lowpass_band$1$i;$minband$012$i=$minband$1$i}}$501=($minband$1$i$lcssa|0)==999;$lowpass_band$0$minband$0$i=$501?$lowpass_band$1$i$lcssa:$minband$1$i$lcssa;$storemerge$in$in$in$i=+($lowpass_band$0$minband$0$i|0);$storemerge$in$in$i=$storemerge$in$in$in$i+-0.75;$storemerge$in$i=$storemerge$in$in$i*0.032258064516129031;$storemerge$i=$storemerge$in$i;HEAPF32[$469>>2]=$storemerge$i;$502=+($lowpass_band$1$i$lcssa|0);$503=$502*0.032258064516129031;$504=$503;HEAPF32[$470>>2]=$504}}$505=$1+260|0;$506=$507>0.0;$508=$507;$509=$508<0.021774193548387097;$or$cond$i=$506&$509;$510=$1+256|0;if($or$cond$i){HEAPF32[$510>>2]=0.0;HEAPF32[$505>>2]=0.0;_lame_msgf($1,7096,$vararg_buffer);$$pr$i=+HEAPF32[$505>>2];$512=$$pr$i}else{$512=$507}$511=$512>0.0;do{if($511){$513=+HEAPF32[$510>>2];$band$18$i=0;$highpass_band$010$i=-1;$maxband$09$i=-1;while(1){$514=+($band$18$i|0);$515=$514*0.032258064516129031;$516=$515;$517=!($516<=$513);$518=($highpass_band$010$i|0)>($band$18$i|0);$519=$518|$517;$highpass_band$1$i=$519?$highpass_band$010$i:$band$18$i;$520=$513<$516;$521=$516<$512;$or$cond17$i=$520&$521;$522=($maxband$09$i|0)>($band$18$i|0);$523=$522?$maxband$09$i:$band$18$i;$maxband$1$i=$or$cond17$i?$523:$maxband$09$i;$524=$band$18$i+1|0;$exitcond14$i=($524|0)==32;if($exitcond14$i){$highpass_band$1$i$lcssa=$highpass_band$1$i;$maxband$1$i$lcssa=$maxband$1$i;break}else{$band$18$i=$524;$highpass_band$010$i=$highpass_band$1$i;$maxband$09$i=$maxband$1$i}}$525=+($highpass_band$1$i$lcssa|0);$526=$525*0.032258064516129031;$527=$526;HEAPF32[$510>>2]=$527;$528=($maxband$1$i$lcssa|0)==-1;if($528){$529=$525+0.75;$530=$529*0.032258064516129031;$531=$530;HEAPF32[$505>>2]=$531;$540=$531;$band$27$i=0;break}else{$532=+($maxband$1$i$lcssa|0);$533=$532+0.75;$534=$533*0.032258064516129031;$535=$534;HEAPF32[$505>>2]=$535;$540=$535;$band$27$i=0;break}}else{$540=$512;$band$27$i=0}}while(0);while(1){$536=+($band$27$i|0);$537=$536*0.032258063554763794;$538=+HEAPF32[$510>>2];$539=$540>$538;do{if($539){$541=$540-$537;$542=$541;$543=$540-$538;$544=$543;$545=$544+9.9999999999999995E-21;$546=$542/$545;$547=$546;$548=$547;$549=$547>1.0;if($549){$fc1$0$i=0.0;break}$550=!($547<=0.0);if(!$550){$fc1$0$i=1.0;break}$551=$548*1.5707963267948966;$552=+Math_cos(+$551);$553=$552;$fc1$0$i=$553}else{$fc1$0$i=1.0}}while(0);$554=+HEAPF32[$470>>2];$555=+HEAPF32[$469>>2];$556=$554>$555;do{if($556){$557=$537-$555;$558=$557;$559=$554-$555;$560=$559;$561=$560+9.9999999999999995E-21;$562=$558/$561;$563=$562;$564=$563;$565=$563>1.0;if($565){$fc2$0$i=0.0;break}$566=!($563<=0.0);if(!$566){$fc2$0$i=1.0;break}$567=$564*1.5707963267948966;$568=+Math_cos(+$567);$569=$568;$fc2$0$i=$569}else{$fc2$0$i=1.0}}while(0);$570=$fc2$0$i*$fc1$0$i;$571=($1+37040|0)+($band$27$i<<2)|0;HEAPF32[$571>>2]=$570;$572=$band$27$i+1|0;$exitcond$i=($572|0)==32;if($exitcond$i){break}$$pre$i=+HEAPF32[$505>>2];$540=$$pre$i;$band$27$i=$572}$573=HEAP32[$414>>2]|0;$574=_SmpFrqIndex($573,$2)|0;$575=$1+20|0;HEAP32[$575>>2]=$574;$576=($574|0)<0;if($576){_freegfc($1);HEAP32[$0>>2]=0;$$0=-1;STACKTOP=sp;return $$0|0}$577=HEAP32[$105>>2]|0;$578=($577|0)==0;do{if($578){$579=HEAP32[$580>>2]|0;$581=($579|0)==0;if(!$581){$582=$1+84744|0;HEAP32[$582>>2]=0;break}$583=$gfp+96|0;$584=HEAP32[$583>>2]|0;$585=HEAP32[$2>>2]|0;$586=HEAP32[$414>>2]|0;$587=_FindNearestBitrate($584,$585,$586)|0;HEAP32[$583>>2]=$587;$588=HEAP32[$2>>2]|0;$589=HEAP32[$414>>2]|0;$590=_BitrateIndex($587,$588,$589)|0;$591=$1+84744|0;HEAP32[$591>>2]=$590;$592=($590|0)<1;if(!$592){break}_freegfc($1);HEAP32[$0>>2]=0;$$0=-1;STACKTOP=sp;return $$0|0}else{$593=$1+84744|0;HEAP32[$593>>2]=1}}while(0);_init_bit_stream_w($1);$594=HEAP32[$575>>2]|0;$595=HEAP32[$2>>2]|0;$596=$595*3|0;$597=$596+$594|0;$598=HEAP32[$414>>2]|0;$599=($598|0)<16000;$600=$599?6:0;$601=$597+$600|0;$602=12200+($601*204|0)|0;$603=HEAP32[$602>>2]|0;$604=$1+21360|0;HEAP32[$604>>2]=$603;$605=(12200+($601*204|0)|0)+4|0;$606=HEAP32[$605>>2]|0;$607=$1+21364|0;HEAP32[$607>>2]=$606;$608=(12200+($601*204|0)|0)+8|0;$609=HEAP32[$608>>2]|0;$610=$1+21368|0;HEAP32[$610>>2]=$609;$611=(12200+($601*204|0)|0)+12|0;$612=HEAP32[$611>>2]|0;$613=$1+21372|0;HEAP32[$613>>2]=$612;$614=(12200+($601*204|0)|0)+16|0;$615=HEAP32[$614>>2]|0;$616=$1+21376|0;HEAP32[$616>>2]=$615;$617=(12200+($601*204|0)|0)+20|0;$618=HEAP32[$617>>2]|0;$619=$1+21380|0;HEAP32[$619>>2]=$618;$620=(12200+($601*204|0)|0)+24|0;$621=HEAP32[$620>>2]|0;$622=$1+21384|0;HEAP32[$622>>2]=$621;$623=(12200+($601*204|0)|0)+28|0;$624=HEAP32[$623>>2]|0;$625=$1+21388|0;HEAP32[$625>>2]=$624;$626=(12200+($601*204|0)|0)+32|0;$627=HEAP32[$626>>2]|0;$628=$1+21392|0;HEAP32[$628>>2]=$627;$629=(12200+($601*204|0)|0)+36|0;$630=HEAP32[$629>>2]|0;$631=$1+21396|0;HEAP32[$631>>2]=$630;$632=(12200+($601*204|0)|0)+40|0;$633=HEAP32[$632>>2]|0;$634=$1+21400|0;HEAP32[$634>>2]=$633;$635=(12200+($601*204|0)|0)+44|0;$636=HEAP32[$635>>2]|0;$637=$1+21404|0;HEAP32[$637>>2]=$636;$638=(12200+($601*204|0)|0)+48|0;$639=HEAP32[$638>>2]|0;$640=$1+21408|0;HEAP32[$640>>2]=$639;$641=(12200+($601*204|0)|0)+52|0;$642=HEAP32[$641>>2]|0;$643=$1+21412|0;HEAP32[$643>>2]=$642;$644=(12200+($601*204|0)|0)+56|0;$645=HEAP32[$644>>2]|0;$646=$1+21416|0;HEAP32[$646>>2]=$645;$647=(12200+($601*204|0)|0)+60|0;$648=HEAP32[$647>>2]|0;$649=$1+21420|0;HEAP32[$649>>2]=$648;$650=(12200+($601*204|0)|0)+64|0;$651=HEAP32[$650>>2]|0;$652=$1+21424|0;HEAP32[$652>>2]=$651;$653=(12200+($601*204|0)|0)+68|0;$654=HEAP32[$653>>2]|0;$655=$1+21428|0;HEAP32[$655>>2]=$654;$656=(12200+($601*204|0)|0)+72|0;$657=HEAP32[$656>>2]|0;$658=$1+21432|0;HEAP32[$658>>2]=$657;$659=(12200+($601*204|0)|0)+76|0;$660=HEAP32[$659>>2]|0;$661=$1+21436|0;HEAP32[$661>>2]=$660;$662=(12200+($601*204|0)|0)+80|0;$663=HEAP32[$662>>2]|0;$664=$1+21440|0;HEAP32[$664>>2]=$663;$665=(12200+($601*204|0)|0)+84|0;$666=HEAP32[$665>>2]|0;$667=$1+21444|0;HEAP32[$667>>2]=$666;$668=(12200+($601*204|0)|0)+88|0;$669=HEAP32[$668>>2]|0;$670=$1+21448|0;HEAP32[$670>>2]=$669;$671=$669-$666|0;$672=($671|0)/6&-1;$673=$1+21508|0;HEAP32[$673>>2]=$666;$674=$672+$666|0;$675=$1+21512|0;HEAP32[$675>>2]=$674;$676=$672<<1;$677=$676+$666|0;$678=$1+21516|0;HEAP32[$678>>2]=$677;$679=$672*3|0;$680=$679+$666|0;$681=$1+21520|0;HEAP32[$681>>2]=$680;$682=$672<<2;$683=$682+$666|0;$684=$1+21524|0;HEAP32[$684>>2]=$683;$685=$672*5|0;$686=$685+$666|0;$687=$1+21528|0;HEAP32[$687>>2]=$686;$688=$1+21532|0;HEAP32[$688>>2]=576;$689=(12200+($601*204|0)|0)+92|0;$690=HEAP32[$689>>2]|0;$691=$1+21452|0;HEAP32[$691>>2]=$690;$692=(12200+($601*204|0)|0)+96|0;$693=HEAP32[$692>>2]|0;$694=$1+21456|0;HEAP32[$694>>2]=$693;$695=(12200+($601*204|0)|0)+100|0;$696=HEAP32[$695>>2]|0;$697=$1+21460|0;HEAP32[$697>>2]=$696;$698=(12200+($601*204|0)|0)+104|0;$699=HEAP32[$698>>2]|0;$700=$1+21464|0;HEAP32[$700>>2]=$699;$701=(12200+($601*204|0)|0)+108|0;$702=HEAP32[$701>>2]|0;$703=$1+21468|0;HEAP32[$703>>2]=$702;$704=(12200+($601*204|0)|0)+112|0;$705=HEAP32[$704>>2]|0;$706=$1+21472|0;HEAP32[$706>>2]=$705;$707=(12200+($601*204|0)|0)+116|0;$708=HEAP32[$707>>2]|0;$709=$1+21476|0;HEAP32[$709>>2]=$708;$710=(12200+($601*204|0)|0)+120|0;$711=HEAP32[$710>>2]|0;$712=$1+21480|0;HEAP32[$712>>2]=$711;$713=(12200+($601*204|0)|0)+124|0;$714=HEAP32[$713>>2]|0;$715=$1+21484|0;HEAP32[$715>>2]=$714;$716=(12200+($601*204|0)|0)+128|0;$717=HEAP32[$716>>2]|0;$718=$1+21488|0;HEAP32[$718>>2]=$717;$719=(12200+($601*204|0)|0)+132|0;$720=HEAP32[$719>>2]|0;$721=$1+21492|0;HEAP32[$721>>2]=$720;$722=(12200+($601*204|0)|0)+136|0;$723=HEAP32[$722>>2]|0;$724=$1+21496|0;HEAP32[$724>>2]=$723;$725=(12200+($601*204|0)|0)+140|0;$726=HEAP32[$725>>2]|0;$727=$1+21500|0;HEAP32[$727>>2]=$726;$728=(12200+($601*204|0)|0)+144|0;$729=HEAP32[$728>>2]|0;$730=$1+21504|0;HEAP32[$730>>2]=$729;$731=$729-$726|0;$732=($731|0)/6&-1;$733=$1+21536|0;HEAP32[$733>>2]=$726;$734=$732+$726|0;$735=$1+21540|0;HEAP32[$735>>2]=$734;$736=$732<<1;$737=$736+$726|0;$738=$1+21544|0;HEAP32[$738>>2]=$737;$739=$732*3|0;$740=$739+$726|0;$741=$1+21548|0;HEAP32[$741>>2]=$740;$742=$732<<2;$743=$742+$726|0;$744=$1+21552|0;HEAP32[$744>>2]=$743;$745=$732*5|0;$746=$745+$726|0;$747=$1+21556|0;HEAP32[$747>>2]=$746;$748=$1+21560|0;HEAP32[$748>>2]=192;$749=HEAP32[$417>>2]|0;$750=($749|0)==2;$751=HEAP32[$142>>2]|0;$752=($751|0)==1;$753=$752?13:21;$754=$752?21:36;$755=$750?$754:$753;$756=$1+24|0;HEAP32[$756>>2]=$755;$757=HEAP32[$80>>2]|0;$758=($757|0)==0;if(!$758){$759=$755|2;HEAP32[$756>>2]=$759}HEAP32[$1>>2]=-487877;$760=$749*700|0;$761=Math_imul($760,$751)|0;$762=+($761|0);$763=$1+39756|0;HEAPF32[$763>>2]=$762;$$pre69=HEAP32[$417>>2]|0;$$pre70=HEAP32[$142>>2]|0;$764=$$pre69*700|0;$765=Math_imul($764,$$pre70)|0;$766=+($765|0);$767=$1+39760|0;HEAPF32[$767>>2]=$766;$$pre69$1=HEAP32[$417>>2]|0;$$pre70$1=HEAP32[$142>>2]|0;$768=$$pre69$1*700|0;$769=Math_imul($768,$$pre70$1)|0;$770=+($769|0);$771=$1+39764|0;HEAPF32[$771>>2]=$770;$$pre69$2=HEAP32[$417>>2]|0;$$pre70$2=HEAP32[$142>>2]|0;$772=$$pre69$2*700|0;$773=Math_imul($772,$$pre70$2)|0;$774=+($773|0);$775=$1+39768|0;HEAPF32[$775>>2]=$774;$$pre69$3=HEAP32[$417>>2]|0;$$pre70$3=HEAP32[$142>>2]|0;$776=$$pre69$3*700|0;$777=Math_imul($776,$$pre70$3)|0;$778=+($777|0);$779=$1+39772|0;HEAPF32[$779>>2]=$778;$$pre69$4=HEAP32[$417>>2]|0;$$pre70$4=HEAP32[$142>>2]|0;$780=$$pre69$4*700|0;$781=Math_imul($780,$$pre70$4)|0;$782=+($781|0);$783=$1+39776|0;HEAPF32[$783>>2]=$782;$$pre69$5=HEAP32[$417>>2]|0;$$pre70$5=HEAP32[$142>>2]|0;$784=$$pre69$5*700|0;$785=Math_imul($784,$$pre70$5)|0;$786=+($785|0);$787=$1+39780|0;HEAPF32[$787>>2]=$786;$$pre69$6=HEAP32[$417>>2]|0;$$pre70$6=HEAP32[$142>>2]|0;$788=$$pre69$6*700|0;$789=Math_imul($788,$$pre70$6)|0;$790=+($789|0);$791=$1+39784|0;HEAPF32[$791>>2]=$790;$$pre69$7=HEAP32[$417>>2]|0;$$pre70$7=HEAP32[$142>>2]|0;$792=$$pre69$7*700|0;$793=Math_imul($792,$$pre70$7)|0;$794=+($793|0);$795=$1+39788|0;HEAPF32[$795>>2]=$794;$$pre69$8=HEAP32[$417>>2]|0;$$pre70$8=HEAP32[$142>>2]|0;$796=$$pre69$8*700|0;$797=Math_imul($796,$$pre70$8)|0;$798=+($797|0);$799=$1+39792|0;HEAPF32[$799>>2]=$798;$$pre69$9=HEAP32[$417>>2]|0;$$pre70$9=HEAP32[$142>>2]|0;$800=$$pre69$9*700|0;$801=Math_imul($800,$$pre70$9)|0;$802=+($801|0);$803=$1+39796|0;HEAPF32[$803>>2]=$802;$$pre69$10=HEAP32[$417>>2]|0;$$pre70$10=HEAP32[$142>>2]|0;$804=$$pre69$10*700|0;$805=Math_imul($804,$$pre70$10)|0;$806=+($805|0);$807=$1+39800|0;HEAPF32[$807>>2]=$806;$$pre69$11=HEAP32[$417>>2]|0;$$pre70$11=HEAP32[$142>>2]|0;$808=$$pre69$11*700|0;$809=Math_imul($808,$$pre70$11)|0;$810=+($809|0);$811=$1+39804|0;HEAPF32[$811>>2]=$810;$$pre69$12=HEAP32[$417>>2]|0;$$pre70$12=HEAP32[$142>>2]|0;$812=$$pre69$12*700|0;$813=Math_imul($812,$$pre70$12)|0;$814=+($813|0);$815=$1+39808|0;HEAPF32[$815>>2]=$814;$$pre69$13=HEAP32[$417>>2]|0;$$pre70$13=HEAP32[$142>>2]|0;$816=$$pre69$13*700|0;$817=Math_imul($816,$$pre70$13)|0;$818=+($817|0);$819=$1+39812|0;HEAPF32[$819>>2]=$818;$$pre69$14=HEAP32[$417>>2]|0;$$pre70$14=HEAP32[$142>>2]|0;$820=$$pre69$14*700|0;$821=Math_imul($820,$$pre70$14)|0;$822=+($821|0);$823=$1+39816|0;HEAPF32[$823>>2]=$822;$$pre69$15=HEAP32[$417>>2]|0;$$pre70$15=HEAP32[$142>>2]|0;$824=$$pre69$15*700|0;$825=Math_imul($824,$$pre70$15)|0;$826=+($825|0);$827=$1+39820|0;HEAPF32[$827>>2]=$826;$$pre69$16=HEAP32[$417>>2]|0;$$pre70$16=HEAP32[$142>>2]|0;$828=$$pre69$16*700|0;$829=Math_imul($828,$$pre70$16)|0;$830=+($829|0);$831=$1+39824|0;HEAPF32[$831>>2]=$830;$$pre69$17=HEAP32[$417>>2]|0;$$pre70$17=HEAP32[$142>>2]|0;$832=$$pre69$17*700|0;$833=Math_imul($832,$$pre70$17)|0;$834=+($833|0);$835=$1+39828|0;HEAPF32[$835>>2]=$834;$836=$gfp+220|0;$837=HEAP32[$836>>2]|0;$838=($837|0)==-1;if($838){HEAP32[$836>>2]=4}$839=HEAP32[$105>>2]|0;do{if(($839|0)==4|($839|0)==1){$840=$gfp+124|0;$841=HEAP32[$840>>2]|0;$842=($841|0)<0;if($842){HEAP32[$840>>2]=2}$843=$gfp+244|0;$844=HEAP32[$843>>2]|0;$845=($844|0)<0;if($845){HEAP32[$843>>2]=0}$846=$gfp+164|0;$847=HEAP32[$846>>2]|0;$848=Math_imul($847,-10)|0;$849=$848+500|0;_apply_preset($gfp,$849,0)|0;$850=$gfp+44|0;$851=HEAP32[$850>>2]|0;$852=($851|0)<0;do{if($852){HEAP32[$850>>2]=3;label=169}else{$853=($851|0)<5;if($853){label=169;break}$854=($851|0)>7;if(!$854){break}HEAP32[$850>>2]=7}}while(0);if((label|0)==169){HEAP32[$850>>2]=0}$855=$gfp+140|0;$856=HEAP32[$855>>2]|0;$857=($856|0)==0;if($857){$858=HEAP32[$414>>2]|0;$859=($858|0)>44000;$860=$859&1;$$sink54=$860}else{$$sink54=0}$861=$1+85092|0;HEAP32[$861>>2]=$$sink54;$862=$1+85812|0;HEAP32[$862>>2]=1}else if(($839|0)==2){$863=$gfp+164|0;$864=HEAP32[$863>>2]|0;$865=Math_imul($864,-10)|0;$866=$865+500|0;_apply_preset($gfp,$866,0)|0;$867=$gfp+140|0;$868=HEAP32[$867>>2]|0;$869=($868|0)==0;if($869){$870=HEAP32[$414>>2]|0;$871=($870|0)>44000;$872=$871&1;$$sink55=$872}else{$$sink55=0}$873=$1+85092|0;HEAP32[$873>>2]=$$sink55;$874=$gfp+44|0;$875=HEAP32[$874>>2]|0;$876=($875|0)>6;do{if($876){HEAP32[$874>>2]=6}else{$877=($875|0)<0;if(!$877){break}HEAP32[$874>>2]=3}}while(0);$878=$1+85812|0;HEAP32[$878>>2]=2}else{$879=$1+85092|0;HEAP32[$879>>2]=0;$880=$gfp+44|0;$881=HEAP32[$880>>2]|0;$882=($881|0)<0;if($882){HEAP32[$880>>2]=3}$883=($839|0)==0;if($883){$884=$gfp+96|0;$885=HEAP32[$884>>2]|0;_lame_set_VBR_mean_bitrate_kbps($gfp,$885)|0}$886=$gfp+168|0;$887=HEAP32[$886>>2]|0;_apply_preset($gfp,$887,0)|0;HEAP32[$105>>2]=$839;$888=$1+85812|0;if($883){HEAP32[$888>>2]=3;break}else{HEAP32[$888>>2]=4;break}}}while(0);$889=$gfp+200|0;$890=HEAP32[$889>>2]|0;$891=$1+84912|0;HEAP32[$891>>2]=$890;$892=$gfp+204|0;$893=HEAP32[$892>>2]|0;$894=$1+84916|0;HEAP32[$894>>2]=$893;$895=$gfp+256|0;$896=HEAP32[$895>>2]|0;$897=($896|0)==0;if(!$897){$898=(HEAP32[tempDoublePtr>>2]=$893,+HEAPF32[tempDoublePtr>>2]);$899=(HEAP32[tempDoublePtr>>2]=$890,+HEAPF32[tempDoublePtr>>2]);$900=$gfp+260|0;$901=+HEAPF32[$900>>2];$902=$899+$901;HEAPF32[$891>>2]=$902;$903=$898+$901;HEAPF32[$894>>2]=$903}$904=HEAP32[$105>>2]|0;$905=($904|0)==0;if($905){$$phi$trans$insert77=$gfp+168|0;$$pre78=HEAP32[$$phi$trans$insert77>>2]|0;$947=0;$964=$$pre78}else{$906=$1+112|0;HEAP32[$906>>2]=1;$907=$1+116|0;$908=HEAP32[$414>>2]|0;$909=($908|0)<16000;$$11=$909?8:14;HEAP32[$907>>2]=$$11;$910=$gfp+172|0;$911=HEAP32[$910>>2]|0;$912=($911|0)==0;do{if($912){$1210=1}else{$913=HEAP32[$2>>2]|0;$914=_FindNearestBitrate($911,$913,$908)|0;HEAP32[$910>>2]=$914;$915=HEAP32[$2>>2]|0;$916=HEAP32[$414>>2]|0;$917=_BitrateIndex($914,$915,$916)|0;HEAP32[$906>>2]=$917;$918=($917|0)<0;if($918){$$0=-1}else{$1210=$917;break}STACKTOP=sp;return $$0|0}}while(0);$919=$gfp+176|0;$920=HEAP32[$919>>2]|0;$921=($920|0)==0;do{if($921){$$pre74=HEAP32[$907>>2]|0;$931=$1210;$934=$$pre74}else{$922=HEAP32[$2>>2]|0;$923=HEAP32[$414>>2]|0;$924=_FindNearestBitrate($920,$922,$923)|0;HEAP32[$919>>2]=$924;$925=HEAP32[$2>>2]|0;$926=HEAP32[$414>>2]|0;$927=_BitrateIndex($924,$925,$926)|0;HEAP32[$907>>2]=$927;$928=($927|0)<0;if($928){$$0=-1;STACKTOP=sp;return $$0|0}else{$$pre72=HEAP32[$906>>2]|0;$931=$$pre72;$934=$927;break}}}while(0);$929=HEAP32[$2>>2]|0;$930=(83944+($929<<6)|0)+($931<<2)|0;$932=HEAP32[$930>>2]|0;HEAP32[$910>>2]=$932;$933=(83944+($929<<6)|0)+($934<<2)|0;$935=HEAP32[$933>>2]|0;HEAP32[$919>>2]=$935;$936=$gfp+168|0;$937=HEAP32[$936>>2]|0;$938=($935|0)<($937|0);$$12=$938?$935:$937;$939=($932|0)>($$12|0);$940=$939?$932:$$12;HEAP32[$936>>2]=$940;$$pre75=HEAP32[$105>>2]|0;$947=$$pre75;$964=$940}$941=$gfp+152|0;$942=HEAP32[$941>>2]|0;$943=$1+100|0;HEAP32[$943>>2]=$942;$944=HEAP32[$372>>2]|0;$945=$1+156|0;HEAP32[$945>>2]=$944;$946=$1+104|0;HEAP32[$946>>2]=$947;$948=$gfp+80|0;$949=HEAP32[$948>>2]|0;$950=$1+85096|0;HEAP32[$950>>2]=$949;$951=$gfp+84|0;$952=HEAP32[$951>>2]|0;$953=$1+28|0;HEAP32[$953>>2]=$952;$954=$gfp+88|0;$955=HEAP32[$954>>2]|0;$956=$1+32|0;HEAP32[$956>>2]=$955;$957=$gfp+92|0;$958=HEAP32[$957>>2]|0;$959=$1+36|0;HEAP32[$959>>2]=$958;$960=$gfp+96|0;$961=HEAP32[$960>>2]|0;$962=$1+120|0;HEAP32[$962>>2]=$961;$963=$1+108|0;HEAP32[$963>>2]=$964;$965=$gfp+100|0;$966=HEAP32[$965>>2]|0;$967=$1+244|0;HEAP32[$967>>2]=$966;$968=HEAP32[$0>>2]|0;$969=$gfp+44|0;$970=HEAP32[$969>>2]|0;switch($970|0){case 6:{$977=$968+28|0;$978=HEAP32[$977>>2]|0;$979=($978|0)==0;if($979){HEAP32[$977>>2]=1}$980=$968+40|0;HEAP32[$980>>2]=0;$981=$968+44|0;HEAP32[$981>>2]=0;$982=$968+32|0;$983=HEAP32[$982>>2]|0;$984=($983|0)==-1;if($984){HEAP32[$982>>2]=1}$985=$968+36|0;HEAP32[$985>>2]=0;$986=$968+48|0;HEAP32[$986>>2]=0;break}case 5:{$987=$968+28|0;$988=HEAP32[$987>>2]|0;$989=($988|0)==0;if($989){HEAP32[$987>>2]=1}$990=$968+40|0;HEAP32[$990>>2]=0;$991=$968+44|0;HEAP32[$991>>2]=0;$992=$968+32|0;$993=HEAP32[$992>>2]|0;$994=($993|0)==-1;if($994){HEAP32[$992>>2]=1}$995=$968+36|0;HEAP32[$995>>2]=0;$996=$968+48|0;HEAP32[$996>>2]=0;break}case 8:{HEAP32[$969>>2]=7;label=203;break}case 7:{label=203;break}case 3:{$1007=$968+28|0;$1008=HEAP32[$1007>>2]|0;$1009=($1008|0)==0;if($1009){HEAP32[$1007>>2]=1}$1010=$968+40|0;HEAP32[$1010>>2]=1;$1011=$968+44|0;HEAP32[$1011>>2]=1;$1012=$968+32|0;$1013=HEAP32[$1012>>2]|0;$1014=($1013|0)==-1;if($1014){HEAP32[$1012>>2]=1}$1015=$968+36|0;HEAP32[$1015>>2]=1;$1016=$968+48|0;HEAP32[$1016>>2]=0;break}case 4:{$997=$968+28|0;$998=HEAP32[$997>>2]|0;$999=($998|0)==0;if($999){HEAP32[$997>>2]=1}$1000=$968+40|0;HEAP32[$1000>>2]=0;$1001=$968+44|0;HEAP32[$1001>>2]=0;$1002=$968+32|0;$1003=HEAP32[$1002>>2]|0;$1004=($1003|0)==-1;if($1004){HEAP32[$1002>>2]=1}$1005=$968+36|0;HEAP32[$1005>>2]=1;$1006=$968+48|0;HEAP32[$1006>>2]=0;break}case 1:{$1030=$968+28|0;$1031=HEAP32[$1030>>2]|0;$1032=($1031|0)==0;if($1032){HEAP32[$1030>>2]=1}$1033=$968+85096|0;$1034=HEAP32[$1033>>2]|0;$1035=($1034|0)==0;if($1035){HEAP32[$1033>>2]=2}$1036=$968+40|0;HEAP32[$1036>>2]=2;$1037=$968+44|0;HEAP32[$1037>>2]=1;$1038=$968+32|0;$1039=HEAP32[$1038>>2]|0;$1040=($1039|0)==-1;if($1040){HEAP32[$1038>>2]=1}$1041=$968+36|0;HEAP32[$1041>>2]=1;$1042=$968+48|0;HEAP32[$1042>>2]=0;break}case 2:{$1017=$968+28|0;$1018=HEAP32[$1017>>2]|0;$1019=($1018|0)==0;if($1019){HEAP32[$1017>>2]=1}$1020=$968+85096|0;$1021=HEAP32[$1020>>2]|0;$1022=($1021|0)==0;if($1022){HEAP32[$1020>>2]=2}$1023=$968+40|0;HEAP32[$1023>>2]=1;$1024=$968+44|0;HEAP32[$1024>>2]=1;$1025=$968+32|0;$1026=HEAP32[$1025>>2]|0;$1027=($1026|0)==-1;if($1027){HEAP32[$1025>>2]=1}$1028=$968+36|0;HEAP32[$1028>>2]=1;$1029=$968+48|0;HEAP32[$1029>>2]=0;break}case 0:{$1043=$968+28|0;$1044=HEAP32[$1043>>2]|0;$1045=($1044|0)==0;if($1045){HEAP32[$1043>>2]=1}$1046=$968+85096|0;$1047=HEAP32[$1046>>2]|0;$1048=($1047|0)==0;if($1048){HEAP32[$1046>>2]=2}$1049=$968+40|0;HEAP32[$1049>>2]=2;$1050=$968+44|0;HEAP32[$1050>>2]=1;$1051=$968+32|0;$1052=HEAP32[$1051>>2]|0;$1053=($1052|0)==-1;if($1053){HEAP32[$1051>>2]=1}$1054=$968+36|0;HEAP32[$1054>>2]=1;$1055=$968+48|0;HEAP32[$1055>>2]=1;break}default:{$971=$968+28|0;HEAP32[$971>>2]=0;$972=$968+36|0;HEAP32[$972>>2]=0|0;HEAP32[$972+4>>2]=0|0;HEAP32[$972+8>>2]=0|0;HEAP32[$972+12>>2]=0|0}}do{if((label|0)==203){$973=$968+28|0;HEAP32[$973>>2]=0;$974=$968+36|0;$975=$968+48|0;HEAP32[$974>>2]=0|0;HEAP32[$974+4>>2]=0|0;HEAP32[$974+8>>2]=0|0;HEAP32[$974+12>>2]=0|0;$976=HEAP32[$105>>2]|0;if(!(($976|0)==4|($976|0)==1)){break}HEAP32[$975>>2]=-1}}while(0);$1056=$gfp+232|0;$1057=HEAP32[$1056>>2]|0;$1058=($1057|0)<0;$1059=HEAP32[$68>>2]|0;$$30=$1058?3:$1057;HEAP32[$1059>>2]=$$30;$1060=$gfp+236|0;$1061=+HEAPF32[$1060>>2];$1062=$1061;$1063=$1062*-0.10000000000000001;$1064=+Math_pow(10.0,+$1063);$1065=$1064;$1066=$1059+4|0;HEAPF32[$1066>>2]=$1065;$1067=$gfp+240|0;$1068=HEAP32[$1067>>2]|0;if(($1068|0)==-1){HEAP32[$1067>>2]=0;label=248}else if(($1068|0)==0){label=248}else{$1071=$1068}do{if((label|0)==248){$1069=HEAP32[$449>>2]|0;$switch=$1069>>>0<2;if(!$switch){$1071=0;break}HEAP32[$1067>>2]=1;$1071=1}}while(0);$1070=$1+184|0;HEAP32[$1070>>2]=$1071;$1072=_lame_get_quant_comp($gfp)|0;$1073=($1072|0)<0;if($1073){_lame_set_quant_comp($gfp,1)|0}$1074=_lame_get_quant_comp_short($gfp)|0;$1075=($1074|0)<0;if($1075){_lame_set_quant_comp_short($gfp,0)|0}$1076=+_lame_get_msfix($gfp);$1077=$1076<0.0;if($1077){_lame_set_msfix($gfp,0.0)}$1078=_lame_get_exp_nspsytune($gfp)|0;$1079=$1078|1;_lame_set_exp_nspsytune($gfp,$1079)|0;$1080=HEAP32[$836>>2]|0;$1081=($1080|0)<0;if($1081){HEAP32[$836>>2]=4;$1108=4}else{$1108=$1080}$1082=$gfp+224|0;$1083=+HEAPF32[$1082>>2];$1084=$1083<0.0;$1085=(HEAPF32[tempDoublePtr>>2]=$1083,HEAP32[tempDoublePtr>>2]|0);if($1084){HEAPF32[$1082>>2]=4.0;$1106=1082130432}else{$1106=$1085}$1086=$gfp+248|0;$1087=+HEAPF32[$1086>>2];$1088=$1087<0.0;$1089=(HEAPF32[tempDoublePtr>>2]=$1087,HEAP32[tempDoublePtr>>2]|0);if($1088){HEAPF32[$1086>>2]=0.0;$1094=0}else{$1094=$1089}$1090=$gfp+244|0;$1091=HEAP32[$1090>>2]|0;$1092=($1091|0)<0;if($1092){HEAP32[$1090>>2]=1;$1125=1}else{$1125=$1091}$1093=$1+188|0;HEAP32[$1093>>2]=$1094;$1095=$gfp+252|0;$1096=HEAP32[$1095>>2]|0;$1097=$1+192|0;HEAP32[$1097>>2]=$1096;$1098=$gfp+228|0;$1099=+HEAPF32[$1098>>2];$1100=-$1099;$1101=$1+196|0;HEAPF32[$1101>>2]=$1100;$1102=$1099*-0.10000000149011612;$1103=+Math_pow(10.0,+$1102);$1104=$1+200|0;HEAPF32[$1104>>2]=$1103;$1105=$1+204|0;HEAP32[$1105>>2]=$1106;$1107=$1+208|0;HEAP32[$1107>>2]=$1108;$1109=$gfp+208|0;$1110=HEAP32[$1109>>2]|0;$1111=$1+212|0;HEAP32[$1111>>2]=$1110;$1112=$gfp+212|0;$1113=HEAP32[$1112>>2]|0;$1114=$1+216|0;HEAP32[$1114>>2]=$1113;$1115=$gfp+216|0;$1116=HEAP32[$1115>>2]|0;$1117=$1+220|0;HEAP32[$1117>>2]=$1116;$1118=$gfp+132|0;$1119=HEAP32[$1118>>2]|0;$1120=$1+84|0;HEAP32[$1120>>2]=$1119;$1121=$gfp+136|0;$1122=HEAP32[$1121>>2]|0;$1123=$1+88|0;HEAP32[$1123>>2]=$1122;$1124=$1+92|0;HEAP32[$1124>>2]=$1125;$1126=$gfp+148|0;$1127=HEAP32[$1126>>2]|0;$1128=$1127&2;$1129=$1+96|0;HEAP32[$1129>>2]=$1128;$1130=$1127>>>2;$1131=$1130&63;$1132=+($1131|0);$1133=$1+232|0;$1134=!($1132>=32.0);$1135=$1132+-64.0;$storemerge4=$1134?$1132:$1135;$1136=$storemerge4*0.25;HEAPF32[$1133>>2]=$1136;$1137=$1127>>>8;$1138=$1137&63;$1139=+($1138|0);$1140=$1+228|0;$1141=!($1139>=32.0);$1142=$1139+-64.0;$storemerge3=$1141?$1139:$1142;$1143=$storemerge3*0.25;HEAPF32[$1140>>2]=$1143;$1144=$1127>>>14;$1145=$1144&63;$1146=+($1145|0);$1147=$1+236|0;$1148=!($1146>=32.0);$1149=$1146+-64.0;$storemerge2=$1148?$1146:$1149;$1150=$storemerge2*0.25;HEAPF32[$1147>>2]=$1150;$1151=$1127>>>20;$1152=$1151&63;$1153=+($1152|0);$1154=$1+240|0;$1155=!($1153>=32.0);$1156=$1153+-64.0;$storemerge1=$1155?$1153:$1156;$1157=$storemerge1+$storemerge2;$1158=$1157*0.25;HEAPF32[$1154>>2]=$1158;$1159=$gfp+20|0;$1160=+HEAPF32[$1159>>2];$1161=$gfp+24|0;$1162=+HEAPF32[$1161>>2];$1163=$1162*$1160;$1164=$gfp+28|0;$1165=+HEAPF32[$1164>>2];$1166=$1165*$1160;$1167=HEAP32[$95>>2]|0;$1168=($1167|0)==2;do{if($1168){$1169=HEAP32[$142>>2]|0;$1170=($1169|0)==1;if(!$1170){$m10$sroa$0$0=$1163;$m10$sroa$22$0=$1166;$m10$sroa$8$0=0.0;break}$1171=$1163*0.5;$1172=$1166*0.5;$m10$sroa$0$0=$1171;$m10$sroa$22$0=0.0;$m10$sroa$8$0=$1172}else{$m10$sroa$0$0=$1163;$m10$sroa$22$0=$1166;$m10$sroa$8$0=0.0}}while(0);$1173=$1+264|0;HEAPF32[$1173>>2]=$m10$sroa$0$0;$1174=$1+268|0;HEAPF32[$1174>>2]=$m10$sroa$8$0;$1175=$1+272|0;HEAPF32[$1175>>2]=0.0;$1176=$1+276|0;HEAPF32[$1176>>2]=$m10$sroa$22$0;$1177=$1+39832|0;HEAP32[$1177>>2]=0;$1178=$1+39836|0;HEAP32[$1178>>2]=0;$1179=HEAP32[$946>>2]|0;$1180=($1179|0)==0;if($1180){$1181=HEAP32[$2>>2]|0;$1182=$1181*72000|0;$1183=$1182+72000|0;$1184=HEAP32[$962>>2]|0;$1185=Math_imul($1183,$1184)|0;$1186=HEAP32[$414>>2]|0;$1187=($1185|0)%($1186|0)&-1;HEAP32[$1177>>2]=$1187;HEAP32[$1178>>2]=$1187}$1188=HEAP32[$gfp>>2]|0;$1189=($1188|0)==-487877;do{if($1189){$1190=HEAP32[$0>>2]|0;$1191=($1190|0)==(0|0);if($1191){break}$1192=$1190+84040|0;$1193=$1190+84748|0;HEAP32[$1193>>2]=0;$1194=$gfp+68|0;$1195=HEAP32[$1194>>2]|0;$1196=($1195|0)==0;if(!$1196){_id3tag_write_v2($gfp)|0}$1197=$1190+85684|0;HEAPF32[$1197>>2]=0.0;$1198=$1190+156|0;_memset($1192|0,0,704)|0;$1199=HEAP32[$1198>>2]|0;$1200=($1199|0)==0;if($1200){break}_InitVbrTag($gfp)|0}}while(0);_iteration_init($1);_psymodel_init($gfp)|0;$1201=$gfp+124|0;$1202=HEAP32[$1201>>2]|0;$1203=_get_max_frame_buffer_size_by_constraint($2,$1202)|0;$1204=$1+148|0;HEAP32[$1204>>2]=$1203;$$0=0;STACKTOP=sp;return $$0|0}function _lame_encode_buffer_ieee_float($gfp,$pcm_l,$pcm_r,$nsamples,$mp3buf,$mp3buf_size){$gfp=$gfp|0;$pcm_l=$pcm_l|0;$pcm_r=$pcm_r|0;$nsamples=$nsamples|0;$mp3buf=$mp3buf|0;$mp3buf_size=$mp3buf_size|0;var $0=0,label=0,sp=0;sp=STACKTOP;$0=_lame_encode_buffer_template($gfp,$pcm_l,$pcm_r,$nsamples,$mp3buf,$mp3buf_size,3,1,32767.0)|0;return $0|0}function _lame_encode_flush($gfp,$mp3buffer,$mp3buffer_size){$gfp=$gfp|0;$mp3buffer=$mp3buffer|0;$mp3buffer_size=$mp3buffer_size|0;var $$=0,$$$=0,$$0=0,$$04$lcssa16=0,$$0411=0,$$1=0,$$2=0,$$3=0,$$5=0,$$6=0,$$lcssa=0,$$lcssa24=0,$$lcssa25=0,$$pre=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0;var $14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0.0,$22=0,$23=0,$24=0.0,$25=0.0,$26=0.0,$27=0.0,$28=0.0,$29=0,$3=0,$30=0,$31=0;var $32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0.0,$45=0.0,$46=0,$47=0,$48=0,$49=0,$5=0;var $50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0;var $69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$8=0,$9=0,$buffer=0,$frames_left$09=0,$mp3count$0$lcssa17=0,$mp3count$010=0,$resample_ratio$0=0.0,$samples_to_encode$0=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+4608|0;$buffer=sp;$0=($gfp|0)==(0|0);if($0){$$0=-3;STACKTOP=sp;return $$0|0}$1=HEAP32[$gfp>>2]|0;$2=($1|0)==-487877;if(!$2){$$0=-3;STACKTOP=sp;return $$0|0}$3=$gfp+288|0;$4=HEAP32[$3>>2]|0;$5=($4|0)==(0|0);if($5){$$0=-3;STACKTOP=sp;return $$0|0}$6=HEAP32[$4>>2]|0;$7=($6|0)==-487877;if(!$7){$$0=-3;STACKTOP=sp;return $$0|0}$8=$4+84032|0;$9=HEAP32[$8>>2]|0;$10=($9|0)<1;if($10){$$0=0;STACKTOP=sp;return $$0|0}$11=$4+16|0;$12=$4+76|0;$13=HEAP32[$12>>2]|0;$14=$13*576|0;$15=$14+752|0;$16=$9+-1152|0;_memset($buffer|0,0,4608)|0;$17=_isResamplingNecessary($11)|0;$18=($17|0)==0;if($18){$resample_ratio$0=1.0;$samples_to_encode$0=$16}else{$19=$4+60|0;$20=HEAP32[$19>>2]|0;$21=+($20|0);$22=$4+64|0;$23=HEAP32[$22>>2]|0;$24=+($23|0);$25=$21/$24;$26=16.0/$25;$27=+($16|0);$28=$26+$27;$29=~~$28;$resample_ratio$0=$25;$samples_to_encode$0=$29}$30=($samples_to_encode$0|0)%($14|0)&-1;$31=$14-$30|0;$32=($31|0)<576;$33=$32?$14:0;$$5=$33+$31|0;$34=$4+84764|0;HEAP32[$34>>2]=$$5;$35=$$5+$samples_to_encode$0|0;$36=($35|0)/($14|0)&-1;$37=($36|0)>0;if($37){$38=$4+84748|0;$39=$4+84036|0;$40=($mp3buffer_size|0)==0;$41=$buffer+2304|0;$$pre=HEAP32[$38>>2]|0;$$0411=$mp3buffer;$54=$$pre;$frames_left$09=$36;$mp3count$010=0;while(1){$42=HEAP32[$39>>2]|0;$43=$15-$42|0;$44=+($43|0);$45=$44*$resample_ratio$0;$46=~~$45;$47=($46|0)>1152;$$=$47?1152:$46;$48=($$|0)<1;$$$=$48?1:$$;$49=$mp3buffer_size-$mp3count$010|0;$$1=$40?0:$49;$50=_lame_encode_buffer_template($gfp,$buffer,$41,$$$,$$0411,$$1,0,1,1.0)|0;$51=$$0411+$50|0;$52=$50+$mp3count$010|0;$53=HEAP32[$38>>2]|0;$55=($54|0)!=($53|0);$56=$55&1;$57=$frames_left$09-$56|0;$58=($57|0)>0;$59=($50|0)>-1;$60=$58&$59;if($60){$$0411=$51;$54=$53;$frames_left$09=$57;$mp3count$010=$52}else{$$lcssa=$50;$$lcssa24=$51;$$lcssa25=$52;break}}HEAP32[$8>>2]=0;$61=($$lcssa|0)<0;if($61){$$0=$$lcssa;STACKTOP=sp;return $$0|0}else{$$04$lcssa16=$$lcssa24;$mp3count$0$lcssa17=$$lcssa25}}else{HEAP32[$8>>2]=0;$$04$lcssa16=$mp3buffer;$mp3count$0$lcssa17=0}$62=$mp3buffer_size-$mp3count$0$lcssa17|0;$63=($mp3buffer_size|0)==0;$$2=$63?0:$62;_flush_bitstream($4);$64=_copy_buffer($4,$$04$lcssa16,$$2,1)|0;_save_gain_values($4);$65=($64|0)<0;if($65){$$0=$64;STACKTOP=sp;return $$0|0}$66=$64+$mp3count$0$lcssa17|0;$67=$gfp+68|0;$68=HEAP32[$67>>2]|0;$69=($68|0)==0;if($69){$$0=$66;STACKTOP=sp;return $$0|0}$70=$mp3buffer_size-$66|0;$$3=$63?0:$70;$71=$$04$lcssa16+$64|0;_id3tag_write_v1($gfp)|0;$72=_copy_buffer($4,$71,$$3,0)|0;$73=($72|0)<0;$74=$73?0:$66;$$6=$74+$72|0;$$0=$$6;STACKTOP=sp;return $$0|0}function _lame_close($gfp){$gfp=$gfp|0;var $$=0,$0=0,$1=0,$10=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$ret$02=0,$ret$1=0,label=0,sp=0;sp=STACKTOP;$0=($gfp|0)==(0|0);if($0){$ret$1=0;return $ret$1|0}$1=HEAP32[$gfp>>2]|0;$2=($1|0)==-487877;if(!$2){$ret$1=0;return $ret$1|0}$3=$gfp+288|0;$4=HEAP32[$3>>2]|0;HEAP32[$gfp>>2]=0;$5=($4|0)==(0|0);if($5){$ret$02=-3}else{$6=HEAP32[$4>>2]|0;$7=($6|0)==-487877;$$=$7?0:-3;HEAP32[$4>>2]=0;_freegfc($4);HEAP32[$3>>2]=0;$ret$02=$$}$8=$gfp+284|0;$9=HEAP32[$8>>2]|0;$10=($9|0)==0;if($10){$ret$1=$ret$02;return $ret$1|0}_free($gfp);$ret$1=$ret$02;return $ret$1|0}function _lame_init(){var $$0=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0;var $26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0;var $44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0;var $62=0,$63=0,$64=0,$65=0,$7=0,$8=0,$9=0,label=0,sp=0;sp=STACKTOP;_init_log_table();$0=_calloc(1,304)|0;$1=($0|0)==(0|0);if($1){$$0=0;return $$0|0}_memset($0|0,0,304)|0;HEAP32[$0>>2]=-487877;$2=_calloc(1,85840)|0;$3=$0+288|0;HEAP32[$3>>2]=$2;$4=($2|0)==(0|0);if($4){_free($0);$$0=0;return $$0|0}else{$5=$0+124|0;HEAP32[$5>>2]=2;$6=$0+48|0;HEAP32[$6>>2]=4;$7=$0+108|0;HEAP32[$7>>2]=1;$8=$0+12|0;HEAP32[$8>>2]=44100;$9=$0+8|0;HEAP32[$9>>2]=2;$10=$0+4|0;HEAP32[$10>>2]=-1;$11=$0+36|0;HEAP32[$11>>2]=1;$12=$0+44|0;HEAP32[$12>>2]=-1;$13=$0+240|0;HEAP32[$13>>2]=-1;$14=$0+88|0;HEAP32[$14>>2]=-1;$15=$0+184|0;HEAP32[$15>>2]=0;$16=$0+188|0;HEAP32[$16>>2]=0;$17=$0+192|0;HEAP32[$17>>2]=-1;$18=$0+196|0;HEAP32[$18>>2]=-1;$19=$0+156|0;HEAP32[$19>>2]=0;$20=$0+164|0;HEAP32[$20>>2]=4;$21=$0+224|0;HEAPF32[$21>>2]=-1.0;$22=$0+168|0;HEAP32[$22>>2]=128;$23=$0+172|0;HEAP32[$23>>2]=0;$24=$0+176|0;HEAP32[$24>>2]=0;$25=$0+180|0;HEAP32[$25>>2]=0;$26=$2+112|0;HEAP32[$26>>2]=1;$27=$2+116|0;HEAP32[$27>>2]=13;$28=$0+132|0;HEAP32[$28>>2]=-1;$29=$0+136|0;HEAP32[$29>>2]=-1;$30=$0+252|0;HEAPF32[$30>>2]=-1.0;$31=$2+84920|0;HEAP32[$31>>2]=180;$32=$2+84924|0;HEAP32[$32>>2]=180;$33=$2+84928|0;HEAP32[$33>>2]=4;$34=$2+84932|0;HEAP32[$34>>2]=4;$35=$2+84908|0;HEAPF32[$35>>2]=1.0;$36=$0+264|0;HEAPF32[$36>>2]=-1.0;$37=$0+268|0;HEAPF32[$37>>2]=-1.0;$38=$0+20|0;HEAPF32[$38>>2]=1.0;$39=$0+24|0;HEAPF32[$39>>2]=1.0;$40=$0+28|0;HEAPF32[$40>>2]=1.0;$41=$0+232|0;HEAP32[$41>>2]=-1;$42=$0+220|0;HEAP32[$42>>2]=-1;$43=$0+236|0;HEAPF32[$43>>2]=0.0;$44=$0+244|0;HEAP32[$44>>2]=-1;$45=$0+248|0;HEAPF32[$45>>2]=-1.0;$46=$2+84032|0;HEAP32[$46>>2]=1728;$47=$2+84764|0;HEAP32[$47>>2]=0;$48=$2+84036|0;HEAP32[$48>>2]=528;$49=$0+60|0;HEAP32[$49>>2]=0;$50=$0+64|0;HEAP32[$50>>2]=0;$51=$2+136|0;HEAP32[$51>>2]=0;$52=$2+128|0;HEAP32[$52>>2]=0;$53=$2+132|0;HEAP32[$53>>2]=0;$54=$2+85680|0;$55=$2+85688|0;HEAP32[$55>>2]=0;$56=$2+85692|0;HEAP32[$56>>2]=0;HEAPF32[$54>>2]=-1.0;$57=$0+292|0;HEAP32[$57>>2]=1;$58=$0+296|0;HEAP32[$58>>2]=1;$59=$0+300|0;HEAP32[$59>>2]=1;$60=$0+152|0;HEAP32[$60>>2]=0;$61=$0+68|0;HEAP32[$61>>2]=1;$62=$0+276|0;HEAP32[$62>>2]=2;$63=$0+280|0;HEAP32[$63>>2]=2;$64=$0+272|0;HEAP32[$64>>2]=2;$65=$0+284|0;HEAP32[$65>>2]=1;$$0=$0;return $$0|0}return 0|0}function _lame_encode_buffer_template($gfp,$buffer_l,$buffer_r,$nsamples,$mp3buf,$mp3buf_size,$pcm_type,$aa,$norm){$gfp=$gfp|0;$buffer_l=$buffer_l|0;$buffer_r=$buffer_r|0;$nsamples=$nsamples|0;$mp3buf=$mp3buf|0;$mp3buf_size=$mp3buf_size|0;$pcm_type=$pcm_type|0;$aa=$aa|0;$norm=+$norm;var $$0=0,$$0$i3=0,$$01$i=0,$$01$i$us=0,$$01$ph$i=0,$$01$ph$i$us=0,$$02$ph$i=0,$$02$ph$i$us=0,$$idx$val$i=0,$$in_buffer$sroa$4$0$i=0,$$in_buffer$sroa$4$0$i$lcssa=0,$$in_buffer$sroa$4$0$i$us=0,$$in_buffer$sroa$4$0$i$us$lcssa=0,$$lcssa=0,$$lcssa46=0,$$lcssa48=0,$$lcssa49=0,$$phi$trans$insert=0,$$pr15$i=0,$$pre=0;var $$pre$phi$iZ2D=0,$$pre$phiZ2D=0,$$pre18=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0,$111=0,$112=0;var $113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0,$130=0;var $131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0;var $15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0;var $25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0;var $43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0;var $61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0;var $8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0;var $98=0,$99=0,$ch$011$us$i=0,$ch$011$us$i$us=0,$exitcond=0,$exitcond15=0,$exitcond16=0,$exitcond17=0,$i$010$us$i=0,$i$010$us$i$us=0,$in_buffer$sroa$0$0$i=0,$in_buffer$sroa$0$0$i$us=0,$in_buffer$sroa$0$0$ph$i=0,$in_buffer$sroa$0$0$ph$i$us=0,$in_buffer$sroa$4$0$i=0,$in_buffer$sroa$4$0$i$us=0,$in_buffer$sroa$4$0$ph$i=0,$in_buffer$sroa$4$0$ph$i$us=0,$in_buffer_ptr$i=0,$mfbuf$i=0;var $mp3size$0$ph$i=0,$mp3size$0$ph$i$us=0,$n_in$i=0,$n_out$i=0,$or$cond=0,$or$cond$i=0,$or$cond$i$us=0,$vararg_buffer=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+32|0;$vararg_buffer=sp;$mfbuf$i=sp+24|0;$in_buffer_ptr$i=sp+16|0;$n_in$i=sp+8|0;$n_out$i=sp+4|0;$0=($gfp|0)==(0|0);if($0){$$0=-3;STACKTOP=sp;return $$0|0}$1=HEAP32[$gfp>>2]|0;$2=($1|0)==-487877;if(!$2){$$0=-3;STACKTOP=sp;return $$0|0}$3=$gfp+288|0;$4=HEAP32[$3>>2]|0;$5=($4|0)==(0|0);if($5){$$0=-3;STACKTOP=sp;return $$0|0}$6=HEAP32[$4>>2]|0;$7=($6|0)==-487877;if(!$7){$$0=-3;STACKTOP=sp;return $$0|0}$8=($nsamples|0)==0;if($8){$$0=0;STACKTOP=sp;return $$0|0}$9=$4+52152|0;$10=HEAP32[$9>>2]|0;$11=($10|0)==(0|0);do{if($11){label=10}else{$12=$4+52148|0;$13=HEAP32[$12>>2]|0;$14=($13|0)<($nsamples|0);if($14){_free($10);label=10;break}else{$$phi$trans$insert=$4+52156|0;$$pre=HEAP32[$$phi$trans$insert>>2]|0;$$pr15$i=$10;$$pre$phiZ2D=$$phi$trans$insert;$22=$$pre;label=13;break}}}while(0);if((label|0)==10){$15=$4+52156|0;$16=HEAP32[$15>>2]|0;$17=($16|0)==(0|0);if(!$17){_free($16)}$18=_calloc($nsamples,4)|0;HEAP32[$9>>2]=$18;$19=_calloc($nsamples,4)|0;HEAP32[$15>>2]=$19;$20=$4+52148|0;HEAP32[$20>>2]=$nsamples;$21=($18|0)==(0|0);if($21){$$pre$phi$iZ2D=$15;$24=$19}else{$$pr15$i=$18;$$pre$phiZ2D=$15;$22=$19;label=13}}do{if((label|0)==13){$23=($22|0)==(0|0);if($23){_free($$pr15$i);$$pre18=HEAP32[$$pre$phiZ2D>>2]|0;$$pre$phi$iZ2D=$$pre$phiZ2D;$24=$$pre18;break}$27=$4+68|0;$28=HEAP32[$27>>2]|0;$29=($28|0)>1;$30=($buffer_l|0)==(0|0);do{if($29){$31=($buffer_r|0)==(0|0);$or$cond=$30|$31;if($or$cond){$$0=0;STACKTOP=sp;return $$0|0}else{_lame_copy_inbuffer($4,$buffer_l,$buffer_r,$nsamples,$pcm_type,$aa,$norm);break}}else{if($30){$$0=0;STACKTOP=sp;return $$0|0}else{_lame_copy_inbuffer($4,$buffer_l,$buffer_l,$nsamples,$pcm_type,$aa,$norm);break}}}while(0);$32=$4+76|0;$33=HEAP32[$32>>2]|0;$34=$33*576|0;$35=HEAP32[$4>>2]|0;$36=($35|0)==-487877;L41:do{if($36){$37=_copy_buffer($4,$mp3buf,$mp3buf_size,0)|0;$38=($37|0)<0;if($38){$$0$i3=$37}else{$39=$mp3buf+$37|0;$40=HEAP32[$9>>2]|0;$41=HEAP32[$$pre$phiZ2D>>2]|0;$$idx$val$i=HEAP32[$32>>2]|0;$42=$$idx$val$i*576|0;$43=$42+752|0;$44=$4+52160|0;HEAP32[$mfbuf$i>>2]=$44;$45=$4+68096|0;$46=$mfbuf$i+4|0;HEAP32[$46>>2]=$45;$47=$in_buffer_ptr$i+4|0;$48=$4+128|0;$49=$4+72|0;$50=$4+84036|0;$51=$4+84032|0;$52=$4+136|0;$53=$4+85676|0;$54=($mp3buf_size|0)==0;$55=Math_imul($33,-576)|0;if($54){$$01$ph$i$us=$nsamples;$$02$ph$i$us=$39;$in_buffer$sroa$0$0$ph$i$us=$40;$in_buffer$sroa$4$0$ph$i$us=$41;$mp3size$0$ph$i$us=$37;L65:while(1){$$01$i$us=$$01$ph$i$us;$in_buffer$sroa$0$0$i$us=$in_buffer$sroa$0$0$ph$i$us;$in_buffer$sroa$4$0$i$us=$in_buffer$sroa$4$0$ph$i$us;while(1){$56=($$01$i$us|0)>0;if(!$56){$$0$i3=$mp3size$0$ph$i$us;break L41}HEAP32[$n_in$i>>2]=0;HEAP32[$n_out$i>>2]=0;HEAP32[$in_buffer_ptr$i>>2]=$in_buffer$sroa$0$0$i$us;HEAP32[$47>>2]=$in_buffer$sroa$4$0$i$us;_fill_buffer($4,$mfbuf$i,$in_buffer_ptr$i,$$01$i$us,$n_in$i,$n_out$i);$57=HEAP32[$48>>2]|0;$58=($57|0)==0;if(!$58){$59=HEAP32[$52>>2]|0;$60=($59|0)==0;if($60){$61=HEAP32[$53>>2]|0;$62=HEAP32[$50>>2]|0;$63=HEAP32[$mfbuf$i>>2]|0;$64=$63+($62<<2)|0;$65=HEAP32[$46>>2]|0;$66=$65+($62<<2)|0;$67=HEAP32[$n_out$i>>2]|0;$68=HEAP32[$49>>2]|0;$69=_AnalyzeSamples($61|0,$64|0,$66|0,$67|0,$68|0)|0;$70=($69|0)==0;if($70){$$0$i3=-6;break L41}}}$71=HEAP32[$n_in$i>>2]|0;$72=$$01$i$us-$71|0;$73=$in_buffer$sroa$0$0$i$us+($71<<2)|0;$74=HEAP32[$49>>2]|0;$75=($74|0)==2;$76=$in_buffer$sroa$4$0$i$us+($71<<2)|0;$$in_buffer$sroa$4$0$i$us=$75?$76:$in_buffer$sroa$4$0$i$us;$77=HEAP32[$n_out$i>>2]|0;$78=HEAP32[$50>>2]|0;$79=$78+$77|0;HEAP32[$50>>2]=$79;$80=HEAP32[$51>>2]|0;$81=($80|0)<1;if($81){HEAP32[$51>>2]=1728;$83=1728}else{$83=$80}$82=$83+$77|0;HEAP32[$51>>2]=$82;$84=($79|0)<($43|0);if($84){$$01$i$us=$72;$in_buffer$sroa$0$0$i$us=$73;$in_buffer$sroa$4$0$i$us=$$in_buffer$sroa$4$0$i$us}else{$$in_buffer$sroa$4$0$i$us$lcssa=$$in_buffer$sroa$4$0$i$us;$$lcssa=$72;$$lcssa46=$73;break}}$85=HEAP32[$mfbuf$i>>2]|0;$86=HEAP32[$46>>2]|0;$87=_lame_encode_mp3_frame($4,$85,$86,$$02$ph$i$us,0)|0;$88=($87|0)<0;if($88){$$0$i3=$87;break L41}$89=$$02$ph$i$us+$87|0;$90=$87+$mp3size$0$ph$i$us|0;$91=HEAP32[$50>>2]|0;$92=$91-$34|0;HEAP32[$50>>2]=$92;$93=HEAP32[$51>>2]|0;$94=$93-$34|0;HEAP32[$51>>2]=$94;$95=HEAP32[$49>>2]|0;$96=($95|0)>0;$97=($92|0)>0;$or$cond$i$us=$97&$96;if(!$or$cond$i$us){$$01$ph$i$us=$$lcssa;$$02$ph$i$us=$89;$in_buffer$sroa$0$0$ph$i$us=$$lcssa46;$in_buffer$sroa$4$0$ph$i$us=$$in_buffer$sroa$4$0$i$us$lcssa;$mp3size$0$ph$i$us=$90;continue}$105=$55+$91|0;$ch$011$us$i$us=0;while(1){$98=$mfbuf$i+($ch$011$us$i$us<<2)|0;$99=HEAP32[$98>>2]|0;$i$010$us$i$us=0;while(1){$100=$i$010$us$i$us+$34|0;$101=$99+($100<<2)|0;$102=HEAP32[$101>>2]|0;$103=$99+($i$010$us$i$us<<2)|0;HEAP32[$103>>2]=$102;$104=$i$010$us$i$us+1|0;$exitcond16=($104|0)==($105|0);if($exitcond16){break}else{$i$010$us$i$us=$104}}$106=$ch$011$us$i$us+1|0;$exitcond17=($106|0)==($95|0);if($exitcond17){$$01$ph$i$us=$$lcssa;$$02$ph$i$us=$89;$in_buffer$sroa$0$0$ph$i$us=$$lcssa46;$in_buffer$sroa$4$0$ph$i$us=$$in_buffer$sroa$4$0$i$us$lcssa;$mp3size$0$ph$i$us=$90;continue L65}else{$ch$011$us$i$us=$106}}}}else{$$01$ph$i=$nsamples;$$02$ph$i=$39;$in_buffer$sroa$0$0$ph$i=$40;$in_buffer$sroa$4$0$ph$i=$41;$mp3size$0$ph$i=$37;L45:while(1){$$01$i=$$01$ph$i;$in_buffer$sroa$0$0$i=$in_buffer$sroa$0$0$ph$i;$in_buffer$sroa$4$0$i=$in_buffer$sroa$4$0$ph$i;while(1){$107=($$01$i|0)>0;if(!$107){$$0$i3=$mp3size$0$ph$i;break L41}HEAP32[$n_in$i>>2]=0;HEAP32[$n_out$i>>2]=0;HEAP32[$in_buffer_ptr$i>>2]=$in_buffer$sroa$0$0$i;HEAP32[$47>>2]=$in_buffer$sroa$4$0$i;_fill_buffer($4,$mfbuf$i,$in_buffer_ptr$i,$$01$i,$n_in$i,$n_out$i);$108=HEAP32[$48>>2]|0;$109=($108|0)==0;if(!$109){$110=HEAP32[$52>>2]|0;$111=($110|0)==0;if($111){$112=HEAP32[$53>>2]|0;$113=HEAP32[$50>>2]|0;$114=HEAP32[$mfbuf$i>>2]|0;$115=$114+($113<<2)|0;$116=HEAP32[$46>>2]|0;$117=$116+($113<<2)|0;$118=HEAP32[$n_out$i>>2]|0;$119=HEAP32[$49>>2]|0;$120=_AnalyzeSamples($112|0,$115|0,$117|0,$118|0,$119|0)|0;$121=($120|0)==0;if($121){$$0$i3=-6;break L41}}}$122=HEAP32[$n_in$i>>2]|0;$123=$$01$i-$122|0;$124=$in_buffer$sroa$0$0$i+($122<<2)|0;$125=HEAP32[$49>>2]|0;$126=($125|0)==2;$127=$in_buffer$sroa$4$0$i+($122<<2)|0;$$in_buffer$sroa$4$0$i=$126?$127:$in_buffer$sroa$4$0$i;$128=HEAP32[$n_out$i>>2]|0;$129=HEAP32[$50>>2]|0;$130=$129+$128|0;HEAP32[$50>>2]=$130;$131=HEAP32[$51>>2]|0;$132=($131|0)<1;if($132){HEAP32[$51>>2]=1728;$134=1728}else{$134=$131}$133=$134+$128|0;HEAP32[$51>>2]=$133;$135=($130|0)<($43|0);if($135){$$01$i=$123;$in_buffer$sroa$0$0$i=$124;$in_buffer$sroa$4$0$i=$$in_buffer$sroa$4$0$i}else{$$in_buffer$sroa$4$0$i$lcssa=$$in_buffer$sroa$4$0$i;$$lcssa48=$123;$$lcssa49=$124;break}}$136=$mp3buf_size-$mp3size$0$ph$i|0;$137=HEAP32[$mfbuf$i>>2]|0;$138=HEAP32[$46>>2]|0;$139=_lame_encode_mp3_frame($4,$137,$138,$$02$ph$i,$136)|0;$140=($139|0)<0;if($140){$$0$i3=$139;break L41}$141=$$02$ph$i+$139|0;$142=$139+$mp3size$0$ph$i|0;$143=HEAP32[$50>>2]|0;$144=$143-$34|0;HEAP32[$50>>2]=$144;$145=HEAP32[$51>>2]|0;$146=$145-$34|0;HEAP32[$51>>2]=$146;$147=HEAP32[$49>>2]|0;$148=($147|0)>0;$149=($144|0)>0;$or$cond$i=$149&$148;if(!$or$cond$i){$$01$ph$i=$$lcssa48;$$02$ph$i=$141;$in_buffer$sroa$0$0$ph$i=$$lcssa49;$in_buffer$sroa$4$0$ph$i=$$in_buffer$sroa$4$0$i$lcssa;$mp3size$0$ph$i=$142;continue}$150=$55+$143|0;$ch$011$us$i=0;while(1){$158=$mfbuf$i+($ch$011$us$i<<2)|0;$154=HEAP32[$158>>2]|0;$i$010$us$i=0;while(1){$152=$i$010$us$i+$34|0;$153=$154+($152<<2)|0;$155=HEAP32[$153>>2]|0;$156=$154+($i$010$us$i<<2)|0;HEAP32[$156>>2]=$155;$157=$i$010$us$i+1|0;$exitcond=($157|0)==($150|0);if($exitcond){break}else{$i$010$us$i=$157}}$151=$ch$011$us$i+1|0;$exitcond15=($151|0)==($147|0);if($exitcond15){$$01$ph$i=$$lcssa48;$$02$ph$i=$141;$in_buffer$sroa$0$0$ph$i=$$lcssa49;$in_buffer$sroa$4$0$ph$i=$$in_buffer$sroa$4$0$i$lcssa;$mp3size$0$ph$i=$142;continue L45}else{$ch$011$us$i=$151}}}}}}else{$$0$i3=-3}}while(0);$$0=$$0$i3;STACKTOP=sp;return $$0|0}}while(0);$25=($24|0)==(0|0);if(!$25){_free($24)}HEAP32[$9>>2]=0;HEAP32[$$pre$phi$iZ2D>>2]=0;$26=$4+52148|0;HEAP32[$26>>2]=0;_lame_errorf($4,7168,$vararg_buffer);$$0=-2;STACKTOP=sp;return $$0|0}function _save_gain_values($gfc){$gfc=$gfc|0;var $0=0,$1=0,$10=0.0,$11=0.0,$12=0.0,$13=0,$14=0,$15=0.0,$16=0.0,$17=0.0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0.0,$26=0.0;var $27=0.0,$28=0.0,$29=0.0,$3=0,$30=0.0,$31=0,$32=0,$33=0,$34=0.0,$35=0.0,$36=0.0,$37=0.0,$4=0,$5=0,$6=0.0,$7=0.0,$8=0,$9=0.0,$fabsf=0.0,$fabsf1=0.0;var $floorf=0.0,label=0,sp=0;sp=STACKTOP;$0=$gfc+85680|0;$1=$gfc+128|0;$2=HEAP32[$1>>2]|0;$3=($2|0)==0;do{if(!$3){$4=$gfc+85676|0;$5=HEAP32[$4>>2]|0;$6=+_GetTitleGain($5|0);$7=$6;$fabsf=+Math_abs(+$6);$8=$fabsf>24601.0;$9=$6+24601.0;$fabsf1=+Math_abs(+$9);$10=$fabsf1;if($8){$11=$fabsf;$12=$11*9.9999999747524271E-7;$13=!($10<=$12);if($13){label=5}else{label=6}}else{$14=!($10<=0.024600999937888446);if($14){label=5}else{label=6}}if((label|0)==5){$15=$7*10.0;$16=$15+0.5;$17=+Math_floor(+$16);$18=~~$17;$19=$gfc+85688|0;HEAP32[$19>>2]=$18;break}else if((label|0)==6){$20=$gfc+85688|0;HEAP32[$20>>2]=0;break}}}while(0);$21=$gfc+132|0;$22=HEAP32[$21>>2]|0;$23=($22|0)==0;if($23){return}$24=$gfc+85684|0;$25=+HEAPF32[$24>>2];$26=$25;$27=$26*3.0518509475997192E-5;$28=+_log10($27);$29=$28*200.0;$30=+Math_ceil(+$29);$31=~~$30;$32=$gfc+85692|0;HEAP32[$32>>2]=$31;$33=($31|0)>0;if($33){$34=3276700.0/$25;$floorf=+Math_floor(+$34);$35=$floorf;$36=$35*0.01;$37=$36;HEAPF32[$0>>2]=$37;return}else{HEAPF32[$0>>2]=-1.0;return}}function _lame_copy_inbuffer($gfc,$l,$r,$nsamples,$pcm_type,$jump,$s){$gfc=$gfc|0;$l=$l|0;$r=$r|0;$nsamples=$nsamples|0;$pcm_type=$pcm_type|0;$jump=$jump|0;$s=+$s;var $0=0,$1=0,$10=0,$11=0.0,$12=0.0,$13=0,$14=0.0,$15=0.0,$16=0,$17=0,$18=0.0,$19=0,$2=0,$20=0.0,$21=0.0,$22=0.0,$23=0.0,$24=0.0,$25=0.0,$26=0.0;var $27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0.0,$35=0,$36=0.0,$37=0.0,$38=0.0,$39=0.0,$4=0,$40=0.0,$41=0.0,$42=0.0,$43=0,$44=0;var $45=0,$46=0,$47=0,$48=0,$49=0,$5=0.0,$50=0.0,$51=0,$52=0.0,$53=0.0,$54=0.0,$55=0.0,$56=0.0,$57=0.0,$58=0.0,$59=0,$6=0.0,$60=0,$61=0,$62=0;var $63=0,$64=0,$65=0.0,$66=0.0,$67=0.0,$68=0.0,$69=0.0,$7=0,$70=0.0,$71=0.0,$72=0.0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0.0,$8=0.0,$80=0.0;var $81=0.0,$82=0.0,$83=0.0,$84=0.0,$85=0.0,$86=0.0,$87=0.0,$88=0.0,$89=0,$9=0.0,$90=0,$91=0,$92=0,$93=0,$bl$07=0,$bl1$010=0,$bl15$016=0,$bl22$020=0,$bl8$014=0,$br$06=0;var $br16$017=0,$br2$09=0,$br23$021=0,$br9$013=0,$exitcond=0,$exitcond24=0,$exitcond25=0,$exitcond26=0,$exitcond27=0,$i$05=0,$i10$012=0,$i17$018=0,$i24$022=0,$i3$08=0,label=0,sp=0;sp=STACKTOP;$0=$gfc+52152|0;$1=HEAP32[$0>>2]|0;$2=$gfc+52156|0;$3=HEAP32[$2>>2]|0;$4=$gfc+264|0;$5=+HEAPF32[$4>>2];$6=$5*$s;$7=$gfc+268|0;$8=+HEAPF32[$7>>2];$9=$8*$s;$10=$gfc+272|0;$11=+HEAPF32[$10>>2];$12=$11*$s;$13=$gfc+276|0;$14=+HEAPF32[$13>>2];$15=$14*$s;switch($pcm_type|0){case 4:{$78=($nsamples|0)>0;if(!$78){return}$bl22$020=$l;$br23$021=$r;$i24$022=0;while(1){$79=+HEAPF64[$bl22$020>>3];$80=$79;$81=+HEAPF64[$br23$021>>3];$82=$81;$83=$80*$6;$84=$82*$9;$85=$84+$83;$86=$80*$12;$87=$82*$15;$88=$87+$86;$89=$1+($i24$022<<2)|0;HEAPF32[$89>>2]=$85;$90=$3+($i24$022<<2)|0;HEAPF32[$90>>2]=$88;$91=$bl22$020+($jump<<3)|0;$92=$br23$021+($jump<<3)|0;$93=$i24$022+1|0;$exitcond27=($93|0)==($nsamples|0);if($exitcond27){break}else{$bl22$020=$91;$br23$021=$92;$i24$022=$93}}return;break}case 0:{$16=($nsamples|0)>0;if(!$16){return}$bl$07=$l;$br$06=$r;$i$05=0;while(1){$17=HEAP16[$bl$07>>1]|0;$18=+($17<<16>>16);$19=HEAP16[$br$06>>1]|0;$20=+($19<<16>>16);$21=$18*$6;$22=$20*$9;$23=$22+$21;$24=$18*$12;$25=$20*$15;$26=$25+$24;$27=$1+($i$05<<2)|0;HEAPF32[$27>>2]=$23;$28=$3+($i$05<<2)|0;HEAPF32[$28>>2]=$26;$29=$bl$07+($jump<<1)|0;$30=$br$06+($jump<<1)|0;$31=$i$05+1|0;$exitcond=($31|0)==($nsamples|0);if($exitcond){break}else{$bl$07=$29;$br$06=$30;$i$05=$31}}return;break}case 3:{$64=($nsamples|0)>0;if(!$64){return}$bl15$016=$l;$br16$017=$r;$i17$018=0;while(1){$65=+HEAPF32[$bl15$016>>2];$66=+HEAPF32[$br16$017>>2];$67=$65*$6;$68=$66*$9;$69=$68+$67;$70=$65*$12;$71=$66*$15;$72=$71+$70;$73=$1+($i17$018<<2)|0;HEAPF32[$73>>2]=$69;$74=$3+($i17$018<<2)|0;HEAPF32[$74>>2]=$72;$75=$bl15$016+($jump<<2)|0;$76=$br16$017+($jump<<2)|0;$77=$i17$018+1|0;$exitcond26=($77|0)==($nsamples|0);if($exitcond26){break}else{$bl15$016=$75;$br16$017=$76;$i17$018=$77}}return;break}case 2:{$48=($nsamples|0)>0;if(!$48){return}$bl8$014=$l;$br9$013=$r;$i10$012=0;while(1){$49=HEAP32[$bl8$014>>2]|0;$50=+($49|0);$51=HEAP32[$br9$013>>2]|0;$52=+($51|0);$53=$50*$6;$54=$52*$9;$55=$54+$53;$56=$50*$12;$57=$52*$15;$58=$57+$56;$59=$1+($i10$012<<2)|0;HEAPF32[$59>>2]=$55;$60=$3+($i10$012<<2)|0;HEAPF32[$60>>2]=$58;$61=$bl8$014+($jump<<2)|0;$62=$br9$013+($jump<<2)|0;$63=$i10$012+1|0;$exitcond25=($63|0)==($nsamples|0);if($exitcond25){break}else{$bl8$014=$61;$br9$013=$62;$i10$012=$63}}return;break}case 1:{$32=($nsamples|0)>0;if(!$32){return}$bl1$010=$l;$br2$09=$r;$i3$08=0;while(1){$33=HEAP32[$bl1$010>>2]|0;$34=+($33|0);$35=HEAP32[$br2$09>>2]|0;$36=+($35|0);$37=$34*$6;$38=$36*$9;$39=$38+$37;$40=$34*$12;$41=$36*$15;$42=$41+$40;$43=$1+($i3$08<<2)|0;HEAPF32[$43>>2]=$39;$44=$3+($i3$08<<2)|0;HEAPF32[$44>>2]=$42;$45=$bl1$010+($jump<<2)|0;$46=$br2$09+($jump<<2)|0;$47=$i3$08+1|0;$exitcond24=($47|0)==($nsamples|0);if($exitcond24){break}else{$bl1$010=$45;$br2$09=$46;$i3$08=$47}}return;break}default:{return}}}function _mdct_sub48($gfc,$w0,$w1){$gfc=$gfc|0;$w0=$w0|0;$w1=$w1|0;var $$=0,$$02$i=0,$$lcssa=0,$$neg11$i=0.0,$$neg13$i=0.0,$$neg3$i=0.0,$$sum=0,$$sum10=0,$$sum11=0,$$sum12=0,$$sum13=0,$$sum14=0,$$sum15=0,$$sum18$1=0,$$sum18$10=0,$$sum18$11=0,$$sum18$12=0,$$sum18$13=0,$$sum18$14=0,$$sum18$15=0;var $$sum18$16=0,$$sum18$17=0,$$sum18$2=0,$$sum18$3=0,$$sum18$4=0,$$sum18$5=0,$$sum18$6=0,$$sum18$7=0,$$sum18$8=0,$$sum18$9=0,$$sum4=0,$$sum5=0,$$sum6=0,$$sum9=0,$0=0,$1=0,$10=0,$100=0,$101=0.0,$102=0.0;var $103=0.0,$104=0,$105=0.0,$106=0.0,$107=0.0,$108=0,$109=0.0,$11=0,$110=0.0,$111=0.0,$112=0,$113=0.0,$114=0.0,$115=0.0,$116=0,$117=0.0,$118=0.0,$119=0.0,$12=0,$120=0;var $121=0.0,$122=0.0,$123=0.0,$124=0,$125=0.0,$126=0.0,$127=0.0,$128=0,$129=0.0,$13=0,$130=0.0,$131=0.0,$132=0,$133=0.0,$134=0.0,$135=0.0,$136=0,$137=0.0,$138=0.0,$139=0.0;var $14=0,$140=0,$141=0.0,$142=0.0,$143=0.0,$144=0,$145=0.0,$146=0.0,$147=0.0,$148=0,$149=0.0,$15=0,$150=0.0,$151=0.0,$152=0,$153=0.0,$154=0.0,$155=0.0,$156=0,$157=0.0;var $158=0.0,$159=0.0,$16=0,$160=0,$161=0.0,$162=0.0,$163=0,$164=0,$165=0,$166=0,$167=0,$168=0.0,$169=0,$17=0,$170=0,$171=0.0,$172=0.0,$173=0,$174=0,$175=0;var $176=0.0,$177=0.0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0,$184=0.0,$185=0.0,$186=0,$187=0.0,$188=0.0,$189=0,$19=0,$190=0,$191=0.0,$192=0.0,$193=0.0;var $194=0.0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0.0,$201=0.0,$202=0,$203=0,$204=0.0,$205=0.0,$206=0,$207=0,$208=0.0,$209=0.0,$21=0,$210=0.0;var $211=0.0,$212=0,$213=0,$214=0,$215=0.0,$216=0.0,$217=0,$218=0.0,$219=0.0,$22=0,$220=0,$221=0,$222=0,$223=0,$224=0.0,$225=0.0,$226=0,$227=0.0,$228=0.0,$229=0.0;var $23=0,$230=0.0,$231=0,$232=0.0,$233=0.0,$234=0.0,$235=0.0,$236=0.0,$237=0.0,$238=0.0,$239=0.0,$24=0,$240=0.0,$241=0.0,$242=0,$243=0.0,$244=0.0,$245=0,$246=0.0,$247=0.0;var $248=0.0,$249=0.0,$25=0,$250=0.0,$251=0.0,$252=0.0,$253=0.0,$254=0.0,$255=0.0,$256=0.0,$257=0.0,$258=0.0,$259=0.0,$26=0,$260=0.0,$261=0.0,$262=0.0,$263=0.0,$264=0.0,$265=0.0;var $266=0.0,$267=0.0,$268=0.0,$269=0.0,$27=0,$270=0.0,$271=0.0,$272=0.0,$273=0.0,$274=0.0,$275=0.0,$276=0.0,$277=0.0,$278=0.0,$279=0.0,$28=0,$280=0.0,$281=0.0,$282=0.0,$283=0.0;var $284=0,$285=0,$286=0,$287=0,$288=0.0,$289=0,$29=0,$290=0,$291=0,$292=0.0,$293=0.0,$294=0,$295=0,$296=0.0,$297=0,$298=0,$299=0,$3=0,$30=0,$300=0.0;var $301=0.0,$302=0.0,$303=0,$304=0.0,$305=0,$306=0.0,$307=0.0,$308=0,$309=0,$31=0,$310=0.0,$311=0,$312=0.0,$313=0.0,$314=0.0,$315=0,$316=0.0,$317=0.0,$318=0.0,$319=0;var $32=0.0,$320=0.0,$321=0.0,$322=0,$323=0,$324=0.0,$325=0.0,$326=0.0,$327=0.0,$328=0.0,$329=0.0,$33=0.0,$330=0.0,$331=0.0,$332=0.0,$333=0.0,$334=0.0,$335=0.0,$336=0.0,$337=0.0;var $338=0.0,$339=0.0,$34=0,$340=0.0,$341=0.0,$342=0.0,$343=0.0,$344=0.0,$345=0.0,$346=0.0,$347=0.0,$348=0.0,$349=0,$35=0.0,$350=0.0,$351=0.0,$352=0.0,$353=0.0,$354=0.0,$355=0.0;var $356=0.0,$357=0.0,$358=0,$359=0.0,$36=0.0,$360=0,$361=0.0,$362=0.0,$363=0.0,$364=0.0,$365=0.0,$366=0.0,$367=0.0,$368=0.0,$369=0.0,$37=0,$370=0.0,$371=0.0,$372=0.0,$373=0.0;var $374=0.0,$375=0.0,$376=0.0,$377=0.0,$378=0.0,$379=0.0,$38=0.0,$380=0.0,$381=0,$382=0.0,$383=0,$384=0.0,$385=0.0,$386=0.0,$387=0.0,$388=0.0,$389=0.0,$39=0.0,$390=0.0,$391=0.0;var $392=0.0,$393=0.0,$394=0.0,$395=0.0,$396=0.0,$397=0,$398=0.0,$399=0,$4=0,$40=0,$400=0.0,$401=0.0,$402=0.0,$403=0.0,$404=0.0,$405=0.0,$406=0.0,$407=0.0,$408=0.0,$409=0.0;var $41=0.0,$410=0.0,$411=0.0,$412=0.0,$413=0,$414=0.0,$415=0,$416=0.0,$417=0.0,$418=0.0,$419=0.0,$42=0.0,$420=0.0,$421=0.0,$422=0.0,$423=0.0,$424=0.0,$425=0.0,$426=0.0,$427=0.0;var $428=0.0,$429=0.0,$43=0,$430=0.0,$431=0.0,$432=0.0,$433=0.0,$434=0.0,$435=0.0,$436=0.0,$437=0.0,$438=0.0,$439=0.0,$44=0.0,$440=0.0,$441=0.0,$442=0.0,$443=0.0,$444=0.0,$445=0.0;var $446=0.0,$447=0.0,$448=0.0,$449=0,$45=0.0,$450=0.0,$451=0,$452=0.0,$453=0.0,$454=0.0,$455=0.0,$456=0.0,$457=0.0,$458=0.0,$459=0.0,$46=0,$460=0.0,$461=0.0,$462=0.0,$463=0.0;var $464=0.0,$465=0.0,$466=0.0,$467=0.0,$468=0.0,$469=0.0,$47=0.0,$470=0.0,$471=0.0,$472=0,$473=0.0,$474=0,$475=0.0,$476=0.0,$477=0.0,$478=0.0,$479=0.0,$48=0.0,$480=0.0,$481=0.0;var $482=0.0,$483=0.0,$484=0.0,$485=0.0,$486=0.0,$487=0.0,$488=0,$489=0.0,$49=0,$490=0,$491=0.0,$492=0.0,$493=0.0,$494=0.0,$495=0.0,$496=0.0,$497=0.0,$498=0.0,$499=0.0,$5=0;var $50=0.0,$500=0.0,$501=0.0,$502=0.0,$503=0.0,$504=0,$505=0.0,$506=0,$507=0,$508=0,$509=0,$51=0.0,$510=0.0,$511=0,$512=0.0,$513=0.0,$514=0,$515=0,$516=0.0,$517=0;var $518=0.0,$519=0.0,$52=0,$520=0.0,$521=0.0,$522=0.0,$523=0.0,$524=0,$525=0,$526=0,$527=0,$528=0,$529=0,$53=0.0,$530=0,$531=0,$532=0,$533=0,$534=0,$535=0;var $536=0,$54=0.0,$55=0,$56=0.0,$57=0.0,$58=0,$59=0.0,$6=0,$60=0.0,$61=0,$62=0.0,$63=0.0,$64=0,$65=0.0,$66=0.0,$67=0,$68=0.0,$69=0.0,$7=0,$70=0;var $71=0.0,$72=0.0,$73=0,$74=0.0,$75=0.0,$76=0,$77=0.0,$78=0.0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0.0,$89=0.0;var $9=0,$90=0,$91=0,$92=0,$93=0.0,$94=0.0,$95=0.0,$96=0,$97=0.0,$98=0.0,$99=0.0,$band$156=0,$ch$060=0,$exitcond=0,$exitcond$i=0,$exitcond69=0,$exitcond70=0,$exitcond71=0,$gr$058=0,$k$049=0;var $k$252=0,$k$351=0,$k$453=0,$l$01$i=0,$mdct_enc$054=0,$or$cond=0,$or$cond3=0,$samp$047=0,$scevgep=0,$w0$pn59=0,$wk$0=0,$wk$157=0,$wk$248=0,$work=0,dest=0,label=0,sp=0,stop=0;sp=STACKTOP;STACKTOP=STACKTOP+80|0;$work=sp;$0=$gfc+72|0;$1=HEAP32[$0>>2]|0;$2=($1|0)>0;if(!$2){STACKTOP=sp;return}$3=$gfc+76|0;$4=$work+68|0;$5=$work+36|0;$6=$work+60|0;$7=$work+44|0;$8=$work+56|0;$9=$work+48|0;$10=$work+32|0;$11=$work+4|0;$12=$work+28|0;$13=$work+8|0;$14=$work+24|0;$15=$work+12|0;$16=$work+20|0;$17=$work+16|0;$18=$work+64|0;$19=$work+40|0;$20=$work+52|0;$ch$060=0;$w0$pn59=$w0;while(1){$21=HEAP32[$3>>2]|0;$22=($21|0)>0;if($22){$wk$0=$w0$pn59+1144|0;$gr$058=0;$wk$157=$wk$0;while(1){$23=1-$gr$058|0;$24=(($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0;$k$049=0;$samp$047=$24;$wk$248=$wk$157;while(1){_window_subband($wk$248,$samp$047);$28=$wk$248+128|0;$29=$samp$047+128|0;_window_subband($28,$29);$30=$samp$047+256|0;$31=$samp$047+132|0;$32=+HEAPF32[$31>>2];$33=-$32;HEAPF32[$31>>2]=$33;$34=$samp$047+140|0;$35=+HEAPF32[$34>>2];$36=-$35;HEAPF32[$34>>2]=$36;$37=$samp$047+148|0;$38=+HEAPF32[$37>>2];$39=-$38;HEAPF32[$37>>2]=$39;$40=$samp$047+156|0;$41=+HEAPF32[$40>>2];$42=-$41;HEAPF32[$40>>2]=$42;$43=$samp$047+164|0;$44=+HEAPF32[$43>>2];$45=-$44;HEAPF32[$43>>2]=$45;$46=$samp$047+172|0;$47=+HEAPF32[$46>>2];$48=-$47;HEAPF32[$46>>2]=$48;$49=$samp$047+180|0;$50=+HEAPF32[$49>>2];$51=-$50;HEAPF32[$49>>2]=$51;$52=$samp$047+188|0;$53=+HEAPF32[$52>>2];$54=-$53;HEAPF32[$52>>2]=$54;$55=$samp$047+196|0;$56=+HEAPF32[$55>>2];$57=-$56;HEAPF32[$55>>2]=$57;$58=$samp$047+204|0;$59=+HEAPF32[$58>>2];$60=-$59;HEAPF32[$58>>2]=$60;$61=$samp$047+212|0;$62=+HEAPF32[$61>>2];$63=-$62;HEAPF32[$61>>2]=$63;$64=$samp$047+220|0;$65=+HEAPF32[$64>>2];$66=-$65;HEAPF32[$64>>2]=$66;$67=$samp$047+228|0;$68=+HEAPF32[$67>>2];$69=-$68;HEAPF32[$67>>2]=$69;$70=$samp$047+236|0;$71=+HEAPF32[$70>>2];$72=-$71;HEAPF32[$70>>2]=$72;$73=$samp$047+244|0;$74=+HEAPF32[$73>>2];$75=-$74;HEAPF32[$73>>2]=$75;$76=$samp$047+252|0;$77=+HEAPF32[$76>>2];$78=-$77;HEAPF32[$76>>2]=$78;$79=$wk$248+256|0;$80=$k$049+1|0;$exitcond=($80|0)==9;if($exitcond){break}else{$k$049=$80;$samp$047=$30;$wk$248=$79}}$25=(($gfc+304|0)+($gr$058*10504|0)|0)+($ch$060*5252|0)|0;$26=((($gfc+304|0)+($gr$058*10504|0)|0)+($ch$060*5252|0)|0)+4788|0;$27=((($gfc+304|0)+($gr$058*10504|0)|0)+($ch$060*5252|0)|0)+4792|0;$band$156=0;$mdct_enc$054=$25;while(1){$81=HEAP32[$26>>2]|0;$82=7208+($band$156<<2)|0;$83=HEAP32[$82>>2]|0;$84=HEAP32[$27>>2]|0;$85=($84|0)!=0;$86=($band$156|0)<2;$or$cond=$86&$85;$$=$or$cond?0:$81;$87=($gfc+37040|0)+($band$156<<2)|0;$88=+HEAPF32[$87>>2];$89=$88;$90=$89<9.9999999999999998E-13;do{if($90){dest=$mdct_enc$054;stop=dest+72|0;do{HEAP32[dest>>2]=0|0;dest=dest+4|0}while((dest|0)<(stop|0))}else{$91=$88<1.0;if($91){$92=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($83<<2)|0;$93=+HEAPF32[$92>>2];$94=$93*$88;HEAPF32[$92>>2]=$94;$95=+HEAPF32[$87>>2];$$sum18$1=$83+32|0;$96=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$1<<2)|0;$97=+HEAPF32[$96>>2];$98=$97*$95;HEAPF32[$96>>2]=$98;$99=+HEAPF32[$87>>2];$$sum18$2=$83+64|0;$100=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$2<<2)|0;$101=+HEAPF32[$100>>2];$102=$101*$99;HEAPF32[$100>>2]=$102;$103=+HEAPF32[$87>>2];$$sum18$3=$83+96|0;$104=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$3<<2)|0;$105=+HEAPF32[$104>>2];$106=$105*$103;HEAPF32[$104>>2]=$106;$107=+HEAPF32[$87>>2];$$sum18$4=$83+128|0;$108=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$4<<2)|0;$109=+HEAPF32[$108>>2];$110=$109*$107;HEAPF32[$108>>2]=$110;$111=+HEAPF32[$87>>2];$$sum18$5=$83+160|0;$112=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$5<<2)|0;$113=+HEAPF32[$112>>2];$114=$113*$111;HEAPF32[$112>>2]=$114;$115=+HEAPF32[$87>>2];$$sum18$6=$83+192|0;$116=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$6<<2)|0;$117=+HEAPF32[$116>>2];$118=$117*$115;HEAPF32[$116>>2]=$118;$119=+HEAPF32[$87>>2];$$sum18$7=$83+224|0;$120=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$7<<2)|0;$121=+HEAPF32[$120>>2];$122=$121*$119;HEAPF32[$120>>2]=$122;$123=+HEAPF32[$87>>2];$$sum18$8=$83+256|0;$124=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$8<<2)|0;$125=+HEAPF32[$124>>2];$126=$125*$123;HEAPF32[$124>>2]=$126;$127=+HEAPF32[$87>>2];$$sum18$9=$83+288|0;$128=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$9<<2)|0;$129=+HEAPF32[$128>>2];$130=$129*$127;HEAPF32[$128>>2]=$130;$131=+HEAPF32[$87>>2];$$sum18$10=$83+320|0;$132=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$10<<2)|0;$133=+HEAPF32[$132>>2];$134=$133*$131;HEAPF32[$132>>2]=$134;$135=+HEAPF32[$87>>2];$$sum18$11=$83+352|0;$136=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$11<<2)|0;$137=+HEAPF32[$136>>2];$138=$137*$135;HEAPF32[$136>>2]=$138;$139=+HEAPF32[$87>>2];$$sum18$12=$83+384|0;$140=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$12<<2)|0;$141=+HEAPF32[$140>>2];$142=$141*$139;HEAPF32[$140>>2]=$142;$143=+HEAPF32[$87>>2];$$sum18$13=$83+416|0;$144=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$13<<2)|0;$145=+HEAPF32[$144>>2];$146=$145*$143;HEAPF32[$144>>2]=$146;$147=+HEAPF32[$87>>2];$$sum18$14=$83+448|0;$148=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$14<<2)|0;$149=+HEAPF32[$148>>2];$150=$149*$147;HEAPF32[$148>>2]=$150;$151=+HEAPF32[$87>>2];$$sum18$15=$83+480|0;$152=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$15<<2)|0;$153=+HEAPF32[$152>>2];$154=$153*$151;HEAPF32[$152>>2]=$154;$155=+HEAPF32[$87>>2];$$sum18$16=$83+512|0;$156=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$16<<2)|0;$157=+HEAPF32[$156>>2];$158=$157*$155;HEAPF32[$156>>2]=$158;$159=+HEAPF32[$87>>2];$$sum18$17=$83+544|0;$160=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum18$17<<2)|0;$161=+HEAPF32[$160>>2];$162=$161*$159;HEAPF32[$160>>2]=$162}$163=($$|0)==2;if($163){$164=$83+288|0;$165=$83+480|0;$k$252=-3;while(1){$166=$k$252+3|0;$167=7624+($166<<2)|0;$168=+HEAPF32[$167>>2];$169=$k$252<<5;$$sum10=$164+$169|0;$170=((($gfc+27824|0)+($ch$060*4608|0)|0)+($gr$058*2304|0)|0)+($$sum10<<2)|0;$171=+HEAPF32[$170>>2];$172=$171*$168;$173=8-$k$252|0;$174=$173<<5;$$sum11=$174+$83|0;$175=((($gfc+27824|0)+($ch$060*4608|0)|0)+($gr$058*2304|0)|0)+($$sum11<<2)|0;$176=+HEAPF32[$175>>2];$177=$172-$176;$178=$k$252*3|0;$179=$178+9|0;$180=$mdct_enc$054+($179<<2)|0;HEAPF32[$180>>2]=$177;$181=14-$k$252|0;$182=$181<<5;$$sum12=$182+$83|0;$183=((($gfc+27824|0)+($ch$060*4608|0)|0)+($gr$058*2304|0)|0)+($$sum12<<2)|0;$184=+HEAPF32[$183>>2];$185=$184*$168;$$sum13=$165+$169|0;$186=((($gfc+27824|0)+($ch$060*4608|0)|0)+($gr$058*2304|0)|0)+($$sum13<<2)|0;$187=+HEAPF32[$186>>2];$188=$185+$187;$189=$178+18|0;$190=$mdct_enc$054+($189<<2)|0;HEAPF32[$190>>2]=$188;$191=+HEAPF32[$186>>2];$192=$191*$168;$193=+HEAPF32[$183>>2];$194=$192-$193;$195=$178+10|0;$196=$mdct_enc$054+($195<<2)|0;HEAPF32[$196>>2]=$194;$197=2-$k$252|0;$198=$197<<5;$$sum14=$198+$83|0;$199=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum14<<2)|0;$200=+HEAPF32[$199>>2];$201=$200*$168;$202=$166<<5;$$sum15=$202+$83|0;$203=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum15<<2)|0;$204=+HEAPF32[$203>>2];$205=$201+$204;$206=$178+19|0;$207=$mdct_enc$054+($206<<2)|0;HEAPF32[$207>>2]=$205;$208=+HEAPF32[$203>>2];$209=$208*$168;$210=+HEAPF32[$199>>2];$211=$209-$210;$212=$178+11|0;$213=$mdct_enc$054+($212<<2)|0;HEAPF32[$213>>2]=$211;$214=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum11<<2)|0;$215=+HEAPF32[$214>>2];$216=$215*$168;$217=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum10<<2)|0;$218=+HEAPF32[$217>>2];$219=$216+$218;$220=$178+20|0;$221=$mdct_enc$054+($220<<2)|0;HEAPF32[$221>>2]=$219;$222=$k$252+1|0;$exitcond70=($222|0)==0;if($exitcond70){$$02$i=$mdct_enc$054;$l$01$i=0;break}else{$k$252=$222}}while(1){$223=$$02$i+24|0;$224=+HEAPF32[$223>>2];$225=$224*0.13165250420570374;$226=$$02$i+60|0;$227=+HEAPF32[$226>>2];$228=$225-$227;$229=+HEAPF32[$$02$i>>2];$230=$229*0.76732701063156128;$231=$$02$i+36|0;$232=+HEAPF32[$231>>2];$233=$230-$232;$234=$233+$228;$235=$228-$233;$236=$227*0.13165250420570374;$237=$236+$224;$238=$232*0.76732701063156128;$239=$238+$229;$240=$239+$237;$241=$239-$237;$242=$$02$i+12|0;$243=+HEAPF32[$242>>2];$244=$243*0.41421356797218323;$245=$$02$i+48|0;$246=+HEAPF32[$245>>2];$247=$244-$246;$248=$247;$249=$248*2.0699781119530891E-11;$250=$249;$251=$246*0.41421356797218323;$252=$251+$243;$253=$252;$254=$253*2.0699781119530891E-11;$255=$254;$256=$234;$257=$256*1.9075251917372799E-11;$258=$250;$259=$258+$257;$260=$259;HEAPF32[$$02$i>>2]=$260;$261=-$240;$262=$261;$263=$262*1.9075251917372799E-11;$264=$255;$265=$264+$263;$266=$265;HEAPF32[$226>>2]=$266;$267=$235;$268=$267*1.6519652744032674E-11;$269=$268;$270=$240;$271=$270*9.5376259586864042E-12;$272=$264+$271;$273=$272;$274=$269-$273;HEAPF32[$242>>2]=$274;$275=$273+$269;HEAPF32[$223>>2]=$275;$276=$256*9.5376259586864042E-12;$277=$276-$258;$278=$277;$279=$241;$280=$279*1.6519652744032674E-11;$281=$280;$282=$278+$281;HEAPF32[$231>>2]=$282;$283=$278-$281;HEAPF32[$245>>2]=$283;$284=$$02$i+4|0;$285=$l$01$i+1|0;$exitcond$i=($285|0)==3;if($exitcond$i){break}else{$$02$i=$284;$l$01$i=$285}}}else{$k$351=-9;while(1){$286=$k$351+27|0;$287=(7336+($$*144|0)|0)+($286<<2)|0;$288=+HEAPF32[$287>>2];$289=$k$351+9|0;$290=$289<<5;$$sum5=$290+$83|0;$291=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum5<<2)|0;$292=+HEAPF32[$291>>2];$293=$292*$288;$294=$k$351+36|0;$295=(7336+($$*144|0)|0)+($294<<2)|0;$296=+HEAPF32[$295>>2];$297=8-$k$351|0;$298=$297<<5;$$sum6=$298+$83|0;$299=((($gfc+27824|0)+($ch$060*4608|0)|0)+($23*2304|0)|0)+($$sum6<<2)|0;$300=+HEAPF32[$299>>2];$301=$300*$296;$302=$301+$293;$303=(7336+($$*144|0)|0)+($289<<2)|0;$304=+HEAPF32[$303>>2];$305=((($gfc+27824|0)+($ch$060*4608|0)|0)+($gr$058*2304|0)|0)+($$sum5<<2)|0;$306=+HEAPF32[$305>>2];$307=$306*$304;$308=$k$351+18|0;$309=(7336+($$*144|0)|0)+($308<<2)|0;$310=+HEAPF32[$309>>2];$311=((($gfc+27824|0)+($ch$060*4608|0)|0)+($gr$058*2304|0)|0)+($$sum6<<2)|0;$312=+HEAPF32[$311>>2];$313=$312*$310;$314=$307-$313;$$sum9=$k$351+12|0;$315=7624+($$sum9<<2)|0;$316=+HEAPF32[$315>>2];$317=$314*$316;$318=$302-$317;$319=$work+($289<<2)|0;HEAPF32[$319>>2]=$318;$320=$316*$302;$321=$320+$314;$322=$work+($308<<2)|0;HEAPF32[$322>>2]=$321;$323=$k$351+1|0;$exitcond69=($323|0)==0;if($exitcond69){break}else{$k$351=$323}}$324=+HEAPF32[$4>>2];$325=+HEAPF32[$5>>2];$326=$324-$325;$327=+HEAPF32[$6>>2];$328=+HEAPF32[$7>>2];$329=$327-$328;$330=+HEAPF32[$8>>2];$331=+HEAPF32[$9>>2];$332=$330-$331;$333=+HEAPF32[$work>>2];$334=+HEAPF32[$10>>2];$335=$334+$333;$336=+HEAPF32[$11>>2];$337=+HEAPF32[$12>>2];$338=$337+$336;$339=+HEAPF32[$13>>2];$340=+HEAPF32[$14>>2];$341=$340+$339;$342=+HEAPF32[$15>>2];$343=+HEAPF32[$16>>2];$344=$343+$342;$345=$341+$335;$346=$345-$344;$347=+HEAPF32[$17>>2];$$neg3$i=$347-$338;$348=$$neg3$i+$346;$349=$mdct_enc$054+68|0;HEAPF32[$349>>2]=$348;$350=$346*0.5;$351=+HEAPF32[$17>>2];$352=$338-$351;$353=$350+$352;$354=$326-$329;$355=$354-$332;$356=$355*0.86602538824081421;$357=$353+$356;$358=$mdct_enc$054+20|0;HEAPF32[$358>>2]=$357;$359=$356-$353;$360=$mdct_enc$054+24|0;HEAPF32[$360>>2]=$359;$361=+HEAPF32[$18>>2];$362=+HEAPF32[$19>>2];$363=$361-$362;$364=$363*0.86602538824081421;$365=$338*0.5;$366=+HEAPF32[$17>>2];$367=$366+$365;$368=$326*0.98480772972106933;$369=$329*0.6427876353263855;$370=$332*0.34202015399932861;$371=$369+$368;$372=$371+$370;$373=$372+$364;$374=$335*0.1736481785774231;$375=$341*0.76604443788528442;$376=$344*0.93969261646270751;$377=$375+$374;$378=$377+$376;$379=$378+$367;$380=$373+$379;$381=$mdct_enc$054+4|0;HEAPF32[$381>>2]=$380;$382=$373-$379;$383=$mdct_enc$054+8|0;HEAPF32[$383>>2]=$382;$384=$326*0.6427876353263855;$385=$329*0.34202015399932861;$386=$332*0.98480772972106933;$387=$384-$385;$388=$387+$386;$389=$388-$364;$390=$335*0.76604443788528442;$391=$341*0.93969261646270751;$392=$344*0.1736481785774231;$393=$390-$391;$394=$393-$392;$395=$394+$367;$396=$389+$395;$397=$mdct_enc$054+36|0;HEAPF32[$397>>2]=$396;$398=$389-$395;$399=$mdct_enc$054+40|0;HEAPF32[$399>>2]=$398;$400=$326*0.34202015399932861;$401=$329*0.98480772972106933;$402=$332*0.6427876353263855;$403=$401+$400;$404=$403-$402;$405=$404-$364;$406=$335*0.93969261646270751;$407=$341*0.1736481785774231;$408=$344*0.76604443788528442;$409=$406-$407;$410=$409+$408;$411=$410-$367;$412=$411+$405;$413=$mdct_enc$054+52|0;HEAPF32[$413>>2]=$412;$414=$405-$411;$415=$mdct_enc$054+56|0;HEAPF32[$415>>2]=$414;$416=+HEAPF32[$10>>2];$417=+HEAPF32[$work>>2];$418=$416-$417;$419=+HEAPF32[$14>>2];$420=+HEAPF32[$13>>2];$421=$419-$420;$422=+HEAPF32[$16>>2];$423=+HEAPF32[$15>>2];$424=$422-$423;$425=+HEAPF32[$4>>2];$426=+HEAPF32[$5>>2];$427=$426+$425;$428=+HEAPF32[$18>>2];$429=+HEAPF32[$19>>2];$430=$429+$428;$431=+HEAPF32[$6>>2];$432=+HEAPF32[$7>>2];$433=$432+$431;$434=+HEAPF32[$8>>2];$435=+HEAPF32[$9>>2];$436=$435+$434;$437=$433+$427;$438=$437+$436;$439=+HEAPF32[$20>>2];$440=$439+$430;$441=$440+$438;HEAPF32[$mdct_enc$054>>2]=$441;$442=$438*0.5;$443=+HEAPF32[$20>>2];$$neg11$i=-$430;$$neg13$i=$$neg11$i-$443;$444=$$neg13$i+$442;$445=$418-$421;$446=$445+$424;$447=$446*0.86602538824081421;$448=$444+$447;$449=$mdct_enc$054+44|0;HEAPF32[$449>>2]=$448;$450=$444-$447;$451=$mdct_enc$054+48|0;HEAPF32[$451>>2]=$450;$452=+HEAPF32[$12>>2];$453=+HEAPF32[$11>>2];$454=$452-$453;$455=$454*0.86602538824081421;$456=+HEAPF32[$20>>2];$457=$430*0.5;$458=$456-$457;$459=$427*0.93969261646270751;$460=$433*0.1736481785774231;$461=$436*0.76604443788528442;$462=$459-$460;$463=$462-$461;$464=$463-$458;$465=$418*0.34202015399932861;$466=$421*0.98480772972106933;$467=$424*0.6427876353263855;$468=$466+$465;$469=$468+$467;$470=$469+$455;$471=$464+$470;$472=$mdct_enc$054+12|0;HEAPF32[$472>>2]=$471;$473=$464-$470;$474=$mdct_enc$054+16|0;HEAPF32[$474>>2]=$473;$475=$427*0.76604443788528442;$476=$433*0.93969261646270751;$477=$436*0.1736481785774231;$478=$475-$476;$479=$478+$477;$480=$479+$458;$481=$418*0.6427876353263855;$482=$421*0.34202015399932861;$483=$424*0.98480772972106933;$484=$481-$482;$485=$484-$483;$486=$485+$455;$487=$480+$486;$488=$mdct_enc$054+28|0;HEAPF32[$488>>2]=$487;$489=$480-$486;$490=$mdct_enc$054+32|0;HEAPF32[$490>>2]=$489;$491=$427*0.1736481785774231;$492=$433*0.76604443788528442;$493=$436*0.93969261646270751;$494=$492+$491;$495=$494-$493;$496=$495+$458;$497=$418*0.98480772972106933;$498=$421*0.6427876353263855;$499=$424*0.34202015399932861;$500=$498+$497;$501=$500-$499;$502=$501-$455;$503=$496+$502;$504=$mdct_enc$054+60|0;HEAPF32[$504>>2]=$503;$505=$496-$502;$506=$mdct_enc$054+64|0;HEAPF32[$506>>2]=$505;break}}}while(0);$507=($$|0)!=2;$508=($band$156|0)!=0;$or$cond3=$508&$507;if($or$cond3){$k$453=7;while(1){$509=$mdct_enc$054+($k$453<<2)|0;$510=+HEAPF32[$509>>2];$$sum=$k$453+20|0;$511=7624+($$sum<<2)|0;$512=+HEAPF32[$511>>2];$513=$512*$510;$514=$k$453^-1;$515=$mdct_enc$054+($514<<2)|0;$516=+HEAPF32[$515>>2];$$sum4=$k$453+28|0;$517=7624+($$sum4<<2)|0;$518=+HEAPF32[$517>>2];$519=$518*$516;$520=$519+$513;$521=$518*$510;$522=$516*$512;$523=$521-$522;HEAPF32[$515>>2]=$520;HEAPF32[$509>>2]=$523;$524=$k$453+-1|0;$525=($k$453|0)>0;if($525){$k$453=$524}else{break}}}$526=$band$156+1|0;$527=$mdct_enc$054+72|0;$exitcond71=($526|0)==32;if($exitcond71){break}else{$band$156=$526;$mdct_enc$054=$527}}$scevgep=$wk$157+2304|0;$528=$gr$058+1|0;$529=HEAP32[$3>>2]|0;$530=($528|0)<($529|0);if($530){$gr$058=$528;$wk$157=$scevgep}else{$$lcssa=$529;break}}$531=($$lcssa|0)==1;if($531){$532=($gfc+27824|0)+($ch$060*4608|0)|0;$533=(($gfc+27824|0)+($ch$060*4608|0)|0)+2304|0;_memcpy($532|0,$533|0,2304)|0}}$534=$ch$060+1|0;$535=HEAP32[$0>>2]|0;$536=($534|0)<($535|0);if($536){$ch$060=$534;$w0$pn59=$w1}else{break}}STACKTOP=sp;return}function _window_subband($x1,$a){$x1=$x1|0;$a=$a|0;var $$015=0,$0=0,$1=0,$10=0.0,$100=0,$101=0.0,$102=0.0,$103=0.0,$104=0,$105=0.0,$106=0.0,$107=0.0,$108=0,$109=0.0,$11=0,$110=0,$111=0.0,$112=0.0,$113=0.0,$114=0;var $115=0.0,$116=0.0,$117=0.0,$118=0,$119=0.0,$12=0.0,$120=0.0,$121=0.0,$122=0.0,$123=0.0,$124=0.0,$125=0.0,$126=0,$127=0.0,$128=0,$129=0.0,$13=0.0,$130=0.0,$131=0.0,$132=0;var $133=0.0,$134=0.0,$135=0.0,$136=0,$137=0.0,$138=0,$139=0.0,$14=0.0,$140=0.0,$141=0.0,$142=0,$143=0.0,$144=0.0,$145=0.0,$146=0,$147=0.0,$148=0,$149=0.0,$15=0,$150=0.0;var $151=0.0,$152=0,$153=0.0,$154=0.0,$155=0.0,$156=0,$157=0.0,$158=0.0,$159=0.0,$16=0.0,$160=0.0,$161=0,$162=0,$163=0,$164=0,$165=0.0,$166=0.0,$167=0,$168=0,$169=0;var $17=0.0,$170=0,$171=0,$172=0,$173=0,$174=0.0,$175=0.0,$176=0,$177=0.0,$178=0.0,$179=0,$18=0.0,$180=0.0,$181=0,$182=0.0,$183=0.0,$184=0.0,$185=0.0,$186=0,$187=0.0;var $188=0.0,$189=0.0,$19=0,$190=0,$191=0.0,$192=0,$193=0.0,$194=0.0,$195=0.0,$196=0.0,$197=0,$198=0.0,$199=0.0,$2=0.0,$20=0.0,$200=0.0,$201=0,$202=0.0,$203=0,$204=0.0;var $205=0.0,$206=0.0,$207=0.0,$208=0,$209=0.0,$21=0,$210=0.0,$211=0.0,$212=0,$213=0.0,$214=0,$215=0.0,$216=0.0,$217=0.0,$218=0.0,$219=0,$22=0.0,$220=0.0,$221=0.0,$222=0.0;var $223=0,$224=0.0,$225=0,$226=0.0,$227=0.0,$228=0.0,$229=0.0,$23=0.0,$230=0,$231=0.0,$232=0.0,$233=0.0,$234=0,$235=0.0,$236=0,$237=0.0,$238=0.0,$239=0.0,$24=0.0,$240=0.0;var $241=0,$242=0.0,$243=0.0,$244=0.0,$245=0,$246=0.0,$247=0,$248=0.0,$249=0.0,$25=0,$250=0.0,$251=0.0,$252=0,$253=0.0,$254=0.0,$255=0.0,$256=0.0,$257=0,$258=0.0,$259=0;var $26=0.0,$260=0.0,$261=0.0,$262=0.0,$263=0,$264=0.0,$265=0,$266=0.0,$267=0.0,$268=0,$269=0.0,$27=0.0,$270=0.0,$271=0.0,$272=0.0,$273=0.0,$274=0,$275=0.0,$276=0,$277=0.0;var $278=0.0,$279=0.0,$28=0.0,$280=0.0,$281=0,$282=0.0,$283=0,$284=0.0,$285=0.0,$286=0.0,$287=0.0,$288=0,$289=0.0,$29=0,$290=0,$291=0.0,$292=0.0,$293=0.0,$294=0.0,$295=0;var $296=0.0,$297=0,$298=0.0,$299=0.0,$3=0,$30=0.0,$300=0.0,$301=0.0,$302=0,$303=0.0,$304=0,$305=0.0,$306=0.0,$307=0.0,$308=0.0,$309=0,$31=0,$310=0.0,$311=0,$312=0.0;var $313=0.0,$314=0.0,$315=0.0,$316=0.0,$317=0.0,$318=0,$319=0.0,$32=0.0,$320=0,$321=0.0,$322=0.0,$323=0.0,$324=0.0,$325=0.0,$326=0.0,$327=0.0,$328=0.0,$329=0.0,$33=0.0,$330=0.0;var $331=0.0,$332=0.0,$333=0.0,$334=0.0,$335=0.0,$336=0.0,$337=0.0,$338=0.0,$339=0.0,$34=0.0,$340=0,$341=0.0,$342=0,$343=0.0,$344=0.0,$345=0.0,$346=0.0,$347=0,$348=0.0,$349=0;var $35=0,$350=0.0,$351=0.0,$352=0.0,$353=0.0,$354=0,$355=0.0,$356=0,$357=0.0,$358=0.0,$359=0.0,$36=0.0,$360=0.0,$361=0,$362=0.0,$363=0,$364=0.0,$365=0.0,$366=0.0,$367=0.0;var $368=0,$369=0.0,$37=0.0,$370=0,$371=0.0,$372=0.0,$373=0.0,$374=0.0,$375=0,$376=0.0,$377=0,$378=0.0,$379=0.0,$38=0.0,$380=0.0,$381=0.0,$382=0.0,$383=0.0,$384=0.0,$385=0.0;var $386=0.0,$387=0.0,$388=0.0,$389=0.0,$39=0,$390=0.0,$391=0.0,$392=0.0,$393=0.0,$394=0.0,$395=0.0,$396=0.0,$397=0.0,$398=0.0,$399=0.0,$4=0.0,$40=0.0,$400=0.0,$401=0.0,$402=0.0;var $403=0.0,$404=0.0,$405=0.0,$406=0.0,$407=0.0,$408=0.0,$409=0.0,$41=0,$410=0.0,$411=0.0,$412=0.0,$413=0.0,$414=0.0,$415=0.0,$416=0.0,$417=0.0,$418=0.0,$419=0.0,$42=0.0,$420=0.0;var $421=0.0,$422=0.0,$423=0.0,$424=0.0,$425=0.0,$426=0.0,$427=0.0,$428=0.0,$429=0.0,$43=0.0,$430=0.0,$431=0.0,$432=0.0,$433=0.0,$434=0.0,$435=0.0,$436=0.0,$437=0.0,$438=0.0,$439=0.0;var $44=0.0,$440=0.0,$441=0.0,$442=0.0,$443=0.0,$444=0.0,$445=0.0,$446=0.0,$447=0.0,$448=0.0,$449=0.0,$45=0,$450=0.0,$451=0.0,$452=0.0,$453=0.0,$454=0.0,$455=0.0,$456=0.0,$457=0.0;var $458=0.0,$459=0.0,$46=0.0,$460=0.0,$461=0.0,$462=0.0,$463=0.0,$464=0.0,$465=0.0,$466=0.0,$467=0.0,$468=0.0,$469=0.0,$47=0.0,$470=0.0,$471=0.0,$472=0.0,$473=0.0,$474=0.0,$475=0.0;var $476=0.0,$477=0.0,$478=0.0,$479=0.0,$48=0.0,$480=0.0,$481=0.0,$482=0.0,$483=0.0,$484=0.0,$485=0.0,$486=0.0,$487=0.0,$488=0.0,$489=0.0,$49=0,$490=0.0,$491=0.0,$492=0.0,$493=0.0;var $494=0.0,$495=0.0,$496=0.0,$497=0.0,$498=0.0,$499=0.0,$5=0.0,$50=0.0,$500=0.0,$501=0.0,$502=0.0,$503=0.0,$504=0.0,$505=0.0,$506=0.0,$507=0.0,$508=0.0,$509=0.0,$51=0,$510=0.0;var $511=0.0,$512=0.0,$513=0.0,$514=0.0,$515=0.0,$516=0.0,$517=0.0,$518=0.0,$519=0.0,$52=0.0,$520=0.0,$521=0.0,$522=0.0,$523=0.0,$524=0.0,$525=0.0,$526=0.0,$527=0.0,$528=0.0,$529=0.0;var $53=0.0,$530=0.0,$531=0.0,$532=0.0,$533=0.0,$534=0.0,$535=0.0,$536=0.0,$537=0.0,$538=0.0,$539=0.0,$54=0.0,$540=0.0,$541=0.0,$542=0.0,$543=0.0,$544=0.0,$545=0.0,$546=0.0,$547=0.0;var $548=0.0,$549=0.0,$55=0,$550=0.0,$551=0.0,$552=0.0,$553=0.0,$554=0.0,$555=0.0,$556=0.0,$557=0.0,$558=0.0,$559=0.0,$56=0.0,$560=0.0,$561=0.0,$562=0.0,$563=0.0,$564=0.0,$565=0.0;var $566=0.0,$567=0.0,$568=0.0,$569=0.0,$57=0.0,$570=0.0,$571=0.0,$572=0.0,$573=0.0,$574=0.0,$575=0.0,$576=0.0,$577=0.0,$578=0.0,$579=0.0,$58=0.0,$580=0.0,$581=0.0,$582=0.0,$583=0.0;var $584=0.0,$585=0.0,$586=0.0,$587=0.0,$588=0.0,$589=0.0,$59=0,$590=0.0,$591=0.0,$592=0.0,$593=0.0,$594=0.0,$595=0.0,$596=0.0,$597=0.0,$598=0.0,$599=0.0,$6=0,$60=0.0,$600=0.0;var $601=0.0,$602=0.0,$603=0.0,$604=0.0,$605=0.0,$606=0.0,$607=0.0,$608=0.0,$609=0.0,$61=0,$610=0.0,$611=0.0,$62=0.0,$63=0.0,$64=0.0,$65=0,$66=0.0,$67=0.0,$68=0.0,$69=0;var $7=0.0,$70=0.0,$71=0,$72=0.0,$73=0.0,$74=0.0,$75=0,$76=0.0,$77=0.0,$78=0.0,$79=0,$8=0.0,$80=0.0,$81=0,$82=0.0,$83=0.0,$84=0.0,$85=0,$86=0.0,$87=0.0;var $88=0.0,$89=0,$9=0,$90=0.0,$91=0,$92=0.0,$93=0.0,$94=0.0,$95=0,$96=0.0,$97=0.0,$98=0.0,$99=0.0,$exitcond=0,$i$014=0,$wp$013=0,$x2$012=0,label=0,sp=0;sp=STACKTOP;$0=$x1+-248|0;$$015=$x1;$i$014=-15;$wp$013=7952;$x2$012=$0;while(1){$1=$wp$013+-40|0;$2=+HEAPF32[$1>>2];$3=$x2$012+-896|0;$4=+HEAPF32[$3>>2];$5=$4*$2;$6=$$015+896|0;$7=+HEAPF32[$6>>2];$8=$7*$2;$9=$wp$013+-36|0;$10=+HEAPF32[$9>>2];$11=$x2$012+-640|0;$12=+HEAPF32[$11>>2];$13=$12*$10;$14=$13+$5;$15=$$015+640|0;$16=+HEAPF32[$15>>2];$17=$16*$10;$18=$17+$8;$19=$wp$013+-32|0;$20=+HEAPF32[$19>>2];$21=$x2$012+-384|0;$22=+HEAPF32[$21>>2];$23=$22*$20;$24=$14+$23;$25=$$015+384|0;$26=+HEAPF32[$25>>2];$27=$26*$20;$28=$18+$27;$29=$wp$013+-28|0;$30=+HEAPF32[$29>>2];$31=$x2$012+-128|0;$32=+HEAPF32[$31>>2];$33=$32*$30;$34=$24+$33;$35=$$015+128|0;$36=+HEAPF32[$35>>2];$37=$36*$30;$38=$28+$37;$39=$wp$013+-24|0;$40=+HEAPF32[$39>>2];$41=$x2$012+128|0;$42=+HEAPF32[$41>>2];$43=$42*$40;$44=$34+$43;$45=$$015+-128|0;$46=+HEAPF32[$45>>2];$47=$46*$40;$48=$38+$47;$49=$wp$013+-20|0;$50=+HEAPF32[$49>>2];$51=$x2$012+384|0;$52=+HEAPF32[$51>>2];$53=$52*$50;$54=$44+$53;$55=$$015+-384|0;$56=+HEAPF32[$55>>2];$57=$56*$50;$58=$48+$57;$59=$wp$013+-16|0;$60=+HEAPF32[$59>>2];$61=$x2$012+640|0;$62=+HEAPF32[$61>>2];$63=$62*$60;$64=$54+$63;$65=$$015+-640|0;$66=+HEAPF32[$65>>2];$67=$66*$60;$68=$58+$67;$69=$wp$013+-12|0;$70=+HEAPF32[$69>>2];$71=$x2$012+896|0;$72=+HEAPF32[$71>>2];$73=$72*$70;$74=$64+$73;$75=$$015+-896|0;$76=+HEAPF32[$75>>2];$77=$76*$70;$78=$68+$77;$79=$wp$013+-8|0;$80=+HEAPF32[$79>>2];$81=$$015+-1024|0;$82=+HEAPF32[$81>>2];$83=$82*$80;$84=$74+$83;$85=$x2$012+1024|0;$86=+HEAPF32[$85>>2];$87=$86*$80;$88=$78-$87;$89=$wp$013+-4|0;$90=+HEAPF32[$89>>2];$91=$$015+-768|0;$92=+HEAPF32[$91>>2];$93=$92*$90;$94=$84+$93;$95=$x2$012+768|0;$96=+HEAPF32[$95>>2];$97=$96*$90;$98=$88-$97;$99=+HEAPF32[$wp$013>>2];$100=$$015+-512|0;$101=+HEAPF32[$100>>2];$102=$101*$99;$103=$94+$102;$104=$x2$012+512|0;$105=+HEAPF32[$104>>2];$106=$105*$99;$107=$98-$106;$108=$wp$013+4|0;$109=+HEAPF32[$108>>2];$110=$$015+-256|0;$111=+HEAPF32[$110>>2];$112=$111*$109;$113=$103+$112;$114=$x2$012+256|0;$115=+HEAPF32[$114>>2];$116=$115*$109;$117=$107-$116;$118=$wp$013+8|0;$119=+HEAPF32[$118>>2];$120=+HEAPF32[$$015>>2];$121=$120*$119;$122=$113+$121;$123=+HEAPF32[$x2$012>>2];$124=$123*$119;$125=$117-$124;$126=$wp$013+12|0;$127=+HEAPF32[$126>>2];$128=$$015+256|0;$129=+HEAPF32[$128>>2];$130=$129*$127;$131=$122+$130;$132=$x2$012+-256|0;$133=+HEAPF32[$132>>2];$134=$133*$127;$135=$125-$134;$136=$wp$013+16|0;$137=+HEAPF32[$136>>2];$138=$$015+512|0;$139=+HEAPF32[$138>>2];$140=$139*$137;$141=$131+$140;$142=$x2$012+-512|0;$143=+HEAPF32[$142>>2];$144=$143*$137;$145=$135-$144;$146=$wp$013+20|0;$147=+HEAPF32[$146>>2];$148=$$015+768|0;$149=+HEAPF32[$148>>2];$150=$149*$147;$151=$141+$150;$152=$x2$012+-768|0;$153=+HEAPF32[$152>>2];$154=$153*$147;$155=$145-$154;$156=$wp$013+24|0;$157=+HEAPF32[$156>>2];$158=$151*$157;$159=$155-$158;$160=$155+$158;$161=$i$014<<1;$162=$161+30|0;$163=$a+($162<<2)|0;HEAPF32[$163>>2]=$160;$164=$wp$013+28|0;$165=+HEAPF32[$164>>2];$166=$159*$165;$167=$161+31|0;$168=$a+($167<<2)|0;HEAPF32[$168>>2]=$166;$169=$wp$013+72|0;$170=$$015+-4|0;$171=$x2$012+4|0;$172=$i$014+1|0;$exitcond=($172|0)==0;if($exitcond){break}else{$$015=$170;$i$014=$172;$wp$013=$169;$x2$012=$171}}$173=$x1+-124|0;$174=+HEAPF32[$173>>2];$175=$174*10612.802734375;$176=$x1+-188|0;$177=+HEAPF32[$176>>2];$178=$177*12804.7978515625;$179=$x1+-252|0;$180=+HEAPF32[$179>>2];$181=$x1+4|0;$182=+HEAPF32[$181>>2];$183=$180-$182;$184=$183*5302.158203125;$185=$184+$175;$186=$x1+-444|0;$187=+HEAPF32[$186>>2];$188=$187*1945.5516357421875;$189=$188+$178;$190=$x1+-380|0;$191=+HEAPF32[$190>>2];$192=$x1+132|0;$193=+HEAPF32[$192>>2];$194=$193+$191;$195=$194*929.77630615234375;$196=$185+$195;$197=$x1+-700|0;$198=+HEAPF32[$197>>2];$199=$198*313.42449951171875;$200=$189+$199;$201=$x1+-508|0;$202=+HEAPF32[$201>>2];$203=$x1+260|0;$204=+HEAPF32[$203>>2];$205=$202-$204;$206=$205*728.80108642578125;$207=$196+$206;$208=$x1+-956|0;$209=+HEAPF32[$208>>2];$210=$209*20.801593780517578;$211=$200+$210;$212=$x1+-636|0;$213=+HEAPF32[$212>>2];$214=$x1+388|0;$215=+HEAPF32[$214>>2];$216=$215+$213;$217=$216*288.09765625;$218=$207+$217;$219=$x1+68|0;$220=+HEAPF32[$219>>2];$221=$220*1995.1556396484375;$222=$211-$221;$223=$x1+-764|0;$224=+HEAPF32[$223>>2];$225=$x1+516|0;$226=+HEAPF32[$225>>2];$227=$224-$226;$228=$227*64.917388916015625;$229=$218+$228;$230=$x1+324|0;$231=+HEAPF32[$230>>2];$232=$231*9.0008392333984375;$233=$222-$232;$234=$x1+-892|0;$235=+HEAPF32[$234>>2];$236=$x1+644|0;$237=+HEAPF32[$236>>2];$238=$237+$235;$239=$238*30.125003814697266;$240=$229+$239;$241=$x1+580|0;$242=+HEAPF32[$241>>2];$243=$242*-29.202180862426758;$244=$233-$243;$245=$x1+-1020|0;$246=+HEAPF32[$245>>2];$247=$x1+772|0;$248=+HEAPF32[$247>>2];$249=$246-$248;$250=$249*4.1014566421508789;$251=$240+$250;$252=$x1+836|0;$253=+HEAPF32[$252>>2];$254=$244-$253;$255=$254-$251;$256=$254+$251;$257=$a+56|0;$258=+HEAPF32[$257>>2];$259=$a+60|0;$260=+HEAPF32[$259>>2];$261=$260-$258;$262=$256+$258;$263=$a+124|0;$264=$261+$255;$265=$a+120|0;$266=$255-$261;$267=$256-$258;$268=$a+112|0;$269=+HEAPF32[$268>>2];$270=+HEAPF32[$a>>2];$271=$269-$270;$272=$270+$269;HEAPF32[$a>>2]=$272;$273=$271*1.9615705013275146;HEAPF32[$268>>2]=$273;$274=$a+116|0;$275=+HEAPF32[$274>>2];$276=$a+4|0;$277=+HEAPF32[$276>>2];$278=$275-$277;$279=$277+$275;HEAPF32[$276>>2]=$279;$280=$278*1.9615705013275146;HEAPF32[$274>>2]=$280;$281=$a+104|0;$282=+HEAPF32[$281>>2];$283=$a+8|0;$284=+HEAPF32[$283>>2];$285=$282-$284;$286=$284+$282;HEAPF32[$283>>2]=$286;$287=$285*1.8477590084075928;HEAPF32[$281>>2]=$287;$288=$a+108|0;$289=+HEAPF32[$288>>2];$290=$a+12|0;$291=+HEAPF32[$290>>2];$292=$289-$291;$293=$291+$289;HEAPF32[$290>>2]=$293;$294=$292*1.8477590084075928;HEAPF32[$288>>2]=$294;$295=$a+96|0;$296=+HEAPF32[$295>>2];$297=$a+16|0;$298=+HEAPF32[$297>>2];$299=$296-$298;$300=$298+$296;HEAPF32[$297>>2]=$300;$301=$299*1.662939190864563;HEAPF32[$295>>2]=$301;$302=$a+100|0;$303=+HEAPF32[$302>>2];$304=$a+20|0;$305=+HEAPF32[$304>>2];$306=$303-$305;$307=$305+$303;HEAPF32[$304>>2]=$307;$308=$306*1.662939190864563;HEAPF32[$302>>2]=$308;$309=$a+88|0;$310=+HEAPF32[$309>>2];$311=$a+24|0;$312=+HEAPF32[$311>>2];$313=$310-$312;$314=$312+$310;$315=$313;$316=$315*1.4142135623730951;$317=$316;$318=$a+92|0;$319=+HEAPF32[$318>>2];$320=$a+28|0;$321=+HEAPF32[$320>>2];$322=$319-$321;$323=$321+$319;$324=$322;$325=$324*1.4142135623730951;$326=$323;$327=$325-$326;$328=$327;$329=$323-$314;$330=$317-$329;$331=$328-$330;$332=$262-$314;HEAPF32[$311>>2]=$332;$333=$262+$314;HEAPF32[$263>>2]=$333;$334=$264-$329;HEAPF32[$320>>2]=$334;$335=$264+$329;HEAPF32[$265>>2]=$335;$336=$266-$330;HEAPF32[$309>>2]=$336;$337=$266+$330;HEAPF32[$259>>2]=$337;$338=$267-$331;HEAPF32[$318>>2]=$338;$339=$267+$331;HEAPF32[$257>>2]=$339;$340=$a+80|0;$341=+HEAPF32[$340>>2];$342=$a+32|0;$343=+HEAPF32[$342>>2];$344=$341-$343;$345=$343+$341;$346=$344*1.1111404895782471;$347=$a+84|0;$348=+HEAPF32[$347>>2];$349=$a+36|0;$350=+HEAPF32[$349>>2];$351=$348-$350;$352=$350+$348;$353=$351*1.1111404895782471;$354=$a+72|0;$355=+HEAPF32[$354>>2];$356=$a+40|0;$357=+HEAPF32[$356>>2];$358=$355-$357;$359=$357+$355;$360=$358*0.76536685228347778;$361=$a+76|0;$362=+HEAPF32[$361>>2];$363=$a+44|0;$364=+HEAPF32[$363>>2];$365=$362-$364;$366=$364+$362;$367=$365*0.76536685228347778;$368=$a+64|0;$369=+HEAPF32[$368>>2];$370=$a+48|0;$371=+HEAPF32[$370>>2];$372=$369-$371;$373=$371+$369;$374=$372*0.39018064737319946;$375=$a+68|0;$376=+HEAPF32[$375>>2];$377=$a+52|0;$378=+HEAPF32[$377>>2];$379=$376-$378;$380=$378+$376;$381=$379*0.39018064737319946;$382=+HEAPF32[$295>>2];$383=$382-$346;$384=$382+$346;HEAPF32[$340>>2]=$384;$385=$383*0.76536685228347778;HEAPF32[$295>>2]=$385;$386=+HEAPF32[$302>>2];$387=$386-$353;$388=$386+$353;HEAPF32[$347>>2]=$388;$389=$387*0.76536685228347778;HEAPF32[$302>>2]=$389;$390=+HEAPF32[$297>>2];$391=$390-$345;$392=$345+$390;HEAPF32[$297>>2]=$392;$393=$391*0.76536685228347778;HEAPF32[$342>>2]=$393;$394=+HEAPF32[$304>>2];$395=$394-$352;$396=$352+$394;HEAPF32[$304>>2]=$396;$397=$395*0.76536685228347778;HEAPF32[$349>>2]=$397;$398=+HEAPF32[$a>>2];$399=$398-$373;$400=$373+$398;HEAPF32[$a>>2]=$400;$401=$399*1.8477590084075928;HEAPF32[$370>>2]=$401;$402=+HEAPF32[$276>>2];$403=$402-$380;$404=$380+$402;HEAPF32[$276>>2]=$404;$405=$403*1.8477590084075928;HEAPF32[$377>>2]=$405;$406=+HEAPF32[$268>>2];$407=$374-$406;$408=$406+$374;HEAPF32[$368>>2]=$408;$409=$407*1.8477590084075928;HEAPF32[$268>>2]=$409;$410=+HEAPF32[$274>>2];$411=$410-$381;$412=$410+$381;HEAPF32[$375>>2]=$412;$413=$411*1.8477590084075928;HEAPF32[$274>>2]=$413;$414=+HEAPF32[$283>>2];$415=$414-$359;$416=$415;$417=$416*1.4142135623730951;$418=$417;$419=$359+$414;$420=+HEAPF32[$290>>2];$421=$420-$366;$422=$421;$423=$422*1.4142135623730951;$424=$423;$425=$366+$420;$426=+HEAPF32[$281>>2];$427=$426-$360;$428=$427;$429=$428*1.4142135623730951;$430=$429;$431=$426+$360;$432=$430-$431;$433=+HEAPF32[$288>>2];$434=$433-$367;$435=$434;$436=$435*1.4142135623730951;$437=$436;$438=$433+$367;$439=$437-$438;$440=$438-$425;$441=$425-$419;$442=+HEAPF32[$263>>2];$443=$442-$419;HEAPF32[$283>>2]=$443;$444=$442+$419;HEAPF32[$263>>2]=$444;$445=$424-$440;$446=$431-$441;$447=+HEAPF32[$265>>2];$448=$447-$441;HEAPF32[$290>>2]=$448;$449=$447+$441;HEAPF32[$265>>2]=$449;$450=$439-$445;$451=$440-$446;$452=+HEAPF32[$259>>2];$453=$452-$446;HEAPF32[$354>>2]=$453;$454=$452+$446;HEAPF32[$259>>2]=$454;$455=$418-$451;$456=+HEAPF32[$257>>2];$457=$456-$451;HEAPF32[$361>>2]=$457;$458=$456+$451;HEAPF32[$257>>2]=$458;$459=$445-$455;$460=+HEAPF32[$318>>2];$461=$460-$455;HEAPF32[$356>>2]=$461;$462=$460+$455;HEAPF32[$318>>2]=$462;$463=$432-$459;$464=+HEAPF32[$309>>2];$465=$464-$459;HEAPF32[$363>>2]=$465;$466=$464+$459;HEAPF32[$309>>2]=$466;$467=$450-$463;$468=+HEAPF32[$320>>2];$469=$468-$463;HEAPF32[$281>>2]=$469;$470=$468+$463;HEAPF32[$320>>2]=$470;$471=+HEAPF32[$311>>2];$472=$471-$467;HEAPF32[$288>>2]=$472;$473=$471+$467;HEAPF32[$311>>2]=$473;$474=+HEAPF32[$a>>2];$475=+HEAPF32[$297>>2];$476=$474-$475;$477=$476;$478=$477*1.4142135623730951;$479=$478;$480=$475+$474;HEAPF32[$a>>2]=$480;HEAPF32[$297>>2]=$479;$481=+HEAPF32[$276>>2];$482=+HEAPF32[$304>>2];$483=$481-$482;$484=$483;$485=$484*1.4142135623730951;$486=$485;$487=$482+$481;$488=+HEAPF32[$368>>2];$489=+HEAPF32[$340>>2];$490=$488-$489;$491=$490;$492=$491*1.4142135623730951;$493=$492;$494=$489+$488;$495=+HEAPF32[$375>>2];$496=+HEAPF32[$347>>2];$497=$495-$496;$498=$497;$499=$498*1.4142135623730951;$500=$499;$501=$496+$495;$502=+HEAPF32[$342>>2];$503=+HEAPF32[$370>>2];$504=$502-$503;$505=$504;$506=$505*-1.4142135623730951;$507=$506;$508=$503+$502;$509=$507-$508;$510=+HEAPF32[$349>>2];$511=+HEAPF32[$377>>2];$512=$510-$511;$513=$512;$514=$513*-1.4142135623730951;$515=$514;$516=$511+$510;$517=$515-$516;$518=+HEAPF32[$302>>2];$519=+HEAPF32[$274>>2];$520=$518-$519;$521=$520;$522=$521*-1.4142135623730951;$523=$522;$524=$519+$518;$525=$523-$524;$526=+HEAPF32[$295>>2];$527=+HEAPF32[$268>>2];$528=$527+$526;$529=$528;$530=$529*-1.4142135623730951;$531=$530;$532=$526-$527;$533=$531-$532;$534=$532-$494;$535=$493-$534;$536=$533-$535;$537=$524-$501;$538=$500-$537;$539=$525-$538;$540=$501-$487;$541=$516-$540;$542=$537-$541;$543=$486-$542;$544=$538-$543;$545=$517-$544;$546=$539-$545;$547=$487-$480;$548=$494-$547;$549=$540-$548;$550=$508-$549;$551=$541-$550;$552=$534-$551;$553=$542-$552;$554=+HEAPF32[$297>>2];$555=$554-$553;$556=$543-$555;$557=$535-$556;$558=$544-$557;$559=$509-$558;$560=$545-$559;$561=$536-$560;$562=$546-$561;$563=+HEAPF32[$a>>2];$564=+HEAPF32[$263>>2];$565=$564+$563;HEAPF32[$a>>2]=$565;$566=$564-$563;HEAPF32[$263>>2]=$566;$567=+HEAPF32[$265>>2];$568=$567+$547;HEAPF32[$276>>2]=$568;$569=$567-$547;HEAPF32[$265>>2]=$569;$570=+HEAPF32[$259>>2];$571=$570+$548;HEAPF32[$368>>2]=$571;$572=$570-$548;HEAPF32[$259>>2]=$572;$573=+HEAPF32[$257>>2];$574=$573+$549;HEAPF32[$375>>2]=$574;$575=$573-$549;HEAPF32[$257>>2]=$575;$576=+HEAPF32[$318>>2];$577=$576+$550;HEAPF32[$342>>2]=$577;$578=$576-$550;HEAPF32[$318>>2]=$578;$579=+HEAPF32[$309>>2];$580=$579+$551;HEAPF32[$349>>2]=$580;$581=$579-$551;HEAPF32[$309>>2]=$581;$582=+HEAPF32[$320>>2];$583=$582+$552;HEAPF32[$295>>2]=$583;$584=$582-$552;HEAPF32[$320>>2]=$584;$585=+HEAPF32[$311>>2];$586=$585+$553;HEAPF32[$302>>2]=$586;$587=$585-$553;HEAPF32[$311>>2]=$587;$588=+HEAPF32[$288>>2];$589=$588+$555;HEAPF32[$297>>2]=$589;$590=$588-$555;HEAPF32[$288>>2]=$590;$591=+HEAPF32[$281>>2];$592=$591+$556;HEAPF32[$304>>2]=$592;$593=$591-$556;HEAPF32[$281>>2]=$593;$594=+HEAPF32[$363>>2];$595=$594+$557;HEAPF32[$340>>2]=$595;$596=$594-$557;HEAPF32[$363>>2]=$596;$597=+HEAPF32[$356>>2];$598=$597+$558;HEAPF32[$347>>2]=$598;$599=$597-$558;HEAPF32[$356>>2]=$599;$600=+HEAPF32[$361>>2];$601=$600+$559;HEAPF32[$370>>2]=$601;$602=$600-$559;HEAPF32[$361>>2]=$602;$603=+HEAPF32[$354>>2];$604=$603+$560;HEAPF32[$377>>2]=$604;$605=$603-$560;HEAPF32[$354>>2]=$605;$606=+HEAPF32[$290>>2];$607=$606+$561;HEAPF32[$268>>2]=$607;$608=$606-$561;HEAPF32[$290>>2]=$608;$609=+HEAPF32[$283>>2];$610=$609+$562;HEAPF32[$274>>2]=$610;$611=$609-$562;HEAPF32[$283>>2]=$611;return}function _apply_preset($gfp,$preset,$enforce){$gfp=$gfp|0;$preset=$preset|0;$enforce=$enforce|0;var $$0=0,$$02$off=0,$0=0,$1=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,label=0,sp=0;sp=STACKTOP;L1:do{switch($preset|0){case 1004:case 1001:{_lame_set_VBR($gfp,4)|0;$2=$gfp+152|0;HEAP32[$2>>2]=480;label=15;break}case 1007:case 1006:{_lame_set_VBR($gfp,4)|0;$1=$gfp+152|0;HEAP32[$1>>2]=460;label=13;break}case 1005:case 1002:{_lame_set_VBR($gfp,4)|0;$3=$gfp+152|0;HEAP32[$3>>2]=500;label=17;break}case 1003:{$4=$gfp+152|0;HEAP32[$4>>2]=320;_apply_abr_preset($gfp,320,$enforce)|0;_lame_set_VBR($gfp,0)|0;$$0=320;return $$0|0;break}case 1000:{_lame_set_VBR($gfp,4)|0;$0=$gfp+152|0;HEAP32[$0>>2]=470;label=14;break}default:{$5=$gfp+152|0;HEAP32[$5>>2]=$preset;switch($preset|0){case 490:{_apply_vbr_preset($gfp,1,$enforce);$$0=490;return $$0|0;break}case 470:{label=14;break L1;break}case 410:{_apply_vbr_preset($gfp,9,$enforce);$$0=410;return $$0|0;break}case 450:{_apply_vbr_preset($gfp,5,$enforce);$$0=450;return $$0|0;break}case 420:{_apply_vbr_preset($gfp,8,$enforce);$$0=420;return $$0|0;break}case 500:{label=17;break L1;break}case 440:{_apply_vbr_preset($gfp,6,$enforce);$$0=440;return $$0|0;break}case 480:{label=15;break L1;break}case 460:{label=13;break L1;break}case 430:{_apply_vbr_preset($gfp,7,$enforce);$$0=430;return $$0|0;break}default:{$$02$off=$preset+-8|0;$6=$$02$off>>>0<313;if($6){$7=_apply_abr_preset($gfp,$preset,$enforce)|0;$$0=$7;return $$0|0}else{HEAP32[$5>>2]=0;$$0=$preset;return $$0|0}}}}}}while(0);if((label|0)==13){_apply_vbr_preset($gfp,4,$enforce);$$0=460;return $$0|0}else if((label|0)==14){_apply_vbr_preset($gfp,3,$enforce);$$0=470;return $$0|0}else if((label|0)==15){_apply_vbr_preset($gfp,2,$enforce);$$0=480;return $$0|0}else if((label|0)==17){_apply_vbr_preset($gfp,0,$enforce);$$0=500;return $$0|0}return 0|0}function _apply_abr_preset($gfp,$preset,$enforce){$gfp=$gfp|0;$preset=$preset|0;$enforce=$enforce|0;var $0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0.0,$22=0.0,$23=0,$24=0,$25=0.0,$26=0.0;var $27=0.0,$28=0.0,$29=0,$3=0,$30=0,$31=0.0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0.0,$38=0.0,$39=0,$4=0,$40=0.0,$41=0,$42=0.0,$43=0.0,$44=0.0;var $45=0,$46=0,$47=0.0,$48=0.0,$49=0,$5=0,$50=0.0,$51=0.0,$52=0.0,$53=0,$54=0,$55=0.0,$56=0.0,$57=0,$58=0,$59=0.0,$6=0,$60=0.0,$61=0.0,$62=0.0;var $63=0.0,$64=0,$65=0,$66=0.0,$67=0.0,$68=0.0,$69=0,$7=0,$70=0,$71=0.0,$72=0,$73=0.0,$74=0.0,$75=0.0,$76=0.0,$77=0,$78=0.0,$79=0,$8=0,$80=0.0;var $81=0,$82=0.0,$83=0.0,$84=0.0,$85=0,$86=0,$87=0.0,$88=0,$89=0,$9=0,$90=0.0,$91=0.0,$92=0.0,$93=0,$94=0,$95=0,$a$$i=0,$a$$i1=0,label=0,sp=0;sp=STACKTOP;$0=$preset&65535;$1=_nearestBitrateFullIndex($0)|0;_lame_set_VBR($gfp,3)|0;_lame_set_VBR_mean_bitrate_kbps($gfp,$preset)|0;$2=_lame_get_VBR_mean_bitrate_kbps($gfp)|0;$3=($2|0)<320;$a$$i=$3?$2:320;_lame_set_VBR_mean_bitrate_kbps($gfp,$a$$i)|0;$4=_lame_get_VBR_mean_bitrate_kbps($gfp)|0;$5=($4|0)>8;$a$$i1=$5?$4:8;_lame_set_VBR_mean_bitrate_kbps($gfp,$a$$i1)|0;$6=_lame_get_VBR_mean_bitrate_kbps($gfp)|0;_lame_set_brate($gfp,$6)|0;$7=$1+-12|0;$8=$7>>>0<5;if($8){$9=_lame_get_exp_nspsytune($gfp)|0;$10=$9|2;_lame_set_exp_nspsytune($gfp,$10)|0}$11=$1>>>0<13;if($11){_lame_set_sfscale($gfp,1)|0}$12=($enforce|0)!=0;if($12){$32=(10560+($1*52|0)|0)+4|0;$33=HEAP32[$32>>2]|0;_lame_set_quant_comp($gfp,$33)|0;$34=(10560+($1*52|0)|0)+8|0;$35=HEAP32[$34>>2]|0;_lame_set_quant_comp_short($gfp,$35)|0;$36=(10560+($1*52|0)|0)+16|0;$37=+HEAPF32[$36>>2];$38=$37;_lame_set_msfix($gfp,$38);$39=(10560+($1*52|0)|0)+20|0;$40=+HEAPF32[$39>>2];_lame_set_short_threshold_lrm($gfp,$40)|0;$41=(10560+($1*52|0)|0)+24|0;$42=+HEAPF32[$41>>2];_lame_set_short_threshold_s($gfp,$42)|0}else{$13=_lame_get_quant_comp($gfp)|0;$14=($13|0)==-1;if($14){$15=(10560+($1*52|0)|0)+4|0;$16=HEAP32[$15>>2]|0;_lame_set_quant_comp($gfp,$16)|0}$17=_lame_get_quant_comp_short($gfp)|0;$18=($17|0)==-1;if($18){$19=(10560+($1*52|0)|0)+8|0;$20=HEAP32[$19>>2]|0;_lame_set_quant_comp_short($gfp,$20)|0}$21=+_lame_get_msfix($gfp);$22=$21+1.0;$23=$22!=$22|0.0!=0.0|$22==0.0;if($23){$24=(10560+($1*52|0)|0)+16|0;$25=+HEAPF32[$24>>2];$26=$25;_lame_set_msfix($gfp,$26)}$27=+_lame_get_short_threshold_lrm($gfp);$28=$27+1.0;$29=$28!=$28|0.0!=0.0|$28==0.0;if($29){$30=(10560+($1*52|0)|0)+20|0;$31=+HEAPF32[$30>>2];_lame_set_short_threshold_lrm($gfp,$31)|0}$43=+_lame_get_short_threshold_s($gfp);$44=$43+1.0;$45=$44!=$44|0.0!=0.0|$44==0.0;if($45){$46=(10560+($1*52|0)|0)+24|0;$47=+HEAPF32[$46>>2];_lame_set_short_threshold_s($gfp,$47)|0}}$48=+_lame_get_scale($gfp);$49=(10560+($1*52|0)|0)+28|0;$50=+HEAPF32[$49>>2];$51=$50*$48;_lame_set_scale($gfp,$51)|0;if($12){$72=(10560+($1*52|0)|0)+32|0;$73=+HEAPF32[$72>>2];_lame_set_maskingadjust($gfp,$73)|0;$74=$73;$75=$74*1.1000000000000001;$76=$75;_lame_set_maskingadjust_short($gfp,$76)|0;$77=(10560+($1*52|0)|0)+36|0;$78=+HEAPF32[$77>>2];_lame_set_ATHlower($gfp,$78)|0;$79=(10560+($1*52|0)|0)+40|0;$80=+HEAPF32[$79>>2];_lame_set_ATHcurve($gfp,$80)|0;$81=(10560+($1*52|0)|0)+44|0;$82=+HEAPF32[$81>>2];_lame_set_interChRatio($gfp,$82)|0;$88=10560+($1*52|0)|0;$89=HEAP32[$88>>2]|0;$90=+($89|0);$91=$90*0.015625;$92=$91;$93=$gfp+288|0;$94=HEAP32[$93>>2]|0;$95=$94+280|0;HEAPF32[$95>>2]=$92;return $preset|0}$52=+_lame_get_maskingadjust($gfp);$53=$52!=$52|0.0!=0.0|$52==0.0;if($53){$54=(10560+($1*52|0)|0)+32|0;$55=+HEAPF32[$54>>2];_lame_set_maskingadjust($gfp,$55)|0}$56=+_lame_get_maskingadjust_short($gfp);$57=$56!=$56|0.0!=0.0|$56==0.0;if($57){$58=(10560+($1*52|0)|0)+32|0;$59=+HEAPF32[$58>>2];$60=$59;$61=$60*1.1000000000000001;$62=$61;_lame_set_maskingadjust_short($gfp,$62)|0}$63=+_lame_get_ATHlower($gfp);$64=$63!=$63|0.0!=0.0|$63==0.0;if($64){$65=(10560+($1*52|0)|0)+36|0;$66=+HEAPF32[$65>>2];_lame_set_ATHlower($gfp,$66)|0}$67=+_lame_get_ATHcurve($gfp);$68=$67+1.0;$69=$68!=$68|0.0!=0.0|$68==0.0;if($69){$70=(10560+($1*52|0)|0)+40|0;$71=+HEAPF32[$70>>2];_lame_set_ATHcurve($gfp,$71)|0}$83=+_lame_get_interChRatio($gfp);$84=$83+1.0;$85=$84!=$84|0.0!=0.0|$84==0.0;if(!$85){$88=10560+($1*52|0)|0;$89=HEAP32[$88>>2]|0;$90=+($89|0);$91=$90*0.015625;$92=$91;$93=$gfp+288|0;$94=HEAP32[$93>>2]|0;$95=$94+280|0;HEAPF32[$95>>2]=$92;return $preset|0}$86=(10560+($1*52|0)|0)+44|0;$87=+HEAPF32[$86>>2];_lame_set_interChRatio($gfp,$87)|0;$88=10560+($1*52|0)|0;$89=HEAP32[$88>>2]|0;$90=+($89|0);$91=$90*0.015625;$92=$91;$93=$gfp+288|0;$94=HEAP32[$93>>2]|0;$95=$94+280|0;HEAPF32[$95>>2]=$92;return $preset|0}function _apply_vbr_preset($gfp,$a,$enforce){$gfp=$gfp|0;$a=$a|0;$enforce=$enforce|0;var $$0$i=0,$0=0,$1=0,$10=0,$100=0.0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0.0,$108=0.0,$109=0,$11=0,$110=0.0,$111=0.0,$112=0,$113=0.0,$114=0;var $115=0.0,$116=0,$117=0,$118=0,$119=0,$12=0.0,$120=0,$121=0.0,$122=0,$123=0.0,$124=0.0,$125=0,$126=0.0,$127=0,$128=0,$129=0.0,$13=0,$130=0.0,$131=0,$132=0;var $133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0.0,$140=0,$141=0.0,$142=0.0,$143=0,$144=0.0,$145=0.0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0;var $16=0.0,$17=0,$18=0.0,$19=0,$2=0.0,$20=0.0,$21=0,$22=0.0,$23=0,$24=0.0,$25=0,$26=0.0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0.0,$33=0;var $34=0.0,$35=0,$36=0.0,$37=0,$38=0,$39=0.0,$4=0,$40=0,$41=0.0,$42=0,$43=0.0,$44=0,$45=0.0,$46=0,$47=0.0,$48=0,$49=0.0,$5=0,$50=0,$51=0.0;var $52=0,$53=0.0,$54=0,$55=0,$56=0,$57=0.0,$58=0,$59=0.0,$6=0,$60=0,$61=0.0,$62=0.0,$63=0.0,$64=0.0,$65=0.0,$66=0.0,$67=0.0,$68=0.0,$69=0.0,$7=0;var $70=0.0,$71=0.0,$72=0.0,$73=0.0,$74=0.0,$75=0.0,$76=0.0,$77=0.0,$78=0.0,$79=0.0,$8=0,$80=0.0,$81=0.0,$82=0.0,$83=0.0,$84=0.0,$85=0.0,$86=0.0,$87=0,$88=0.0;var $89=0.0,$9=0,$90=0.0,$91=0,$92=0.0,$93=0.0,$94=0.0,$95=0.0,$96=0.0,$97=0.0,$98=0.0,$99=0.0,label=0,sp=0;sp=STACKTOP;$0=_lame_get_VBR($gfp)|0;if(($0|0)==1|($0|0)==4){$$0$i=9808}else{$$0$i=9056}$1=$gfp+160|0;$2=+HEAPF32[$1>>2];$3=$$0$i+($a*68|0)|0;$4=HEAP32[$3>>2]|0;$5=($$0$i+($a*68|0)|0)+4|0;$6=HEAP32[$5>>2]|0;$7=($$0$i+($a*68|0)|0)+8|0;$8=HEAP32[$7>>2]|0;$9=($$0$i+($a*68|0)|0)+12|0;$10=HEAP32[$9>>2]|0;$11=($$0$i+($a*68|0)|0)+16|0;$12=+HEAPF32[$11>>2];$13=($$0$i+($a*68|0)|0)+20|0;$14=+HEAPF32[$13>>2];$15=($$0$i+($a*68|0)|0)+24|0;$16=+HEAPF32[$15>>2];$17=($$0$i+($a*68|0)|0)+28|0;$18=+HEAPF32[$17>>2];$19=($$0$i+($a*68|0)|0)+32|0;$20=+HEAPF32[$19>>2];$21=($$0$i+($a*68|0)|0)+36|0;$22=+HEAPF32[$21>>2];$23=($$0$i+($a*68|0)|0)+40|0;$24=+HEAPF32[$23>>2];$25=($$0$i+($a*68|0)|0)+44|0;$26=+HEAPF32[$25>>2];$27=($$0$i+($a*68|0)|0)+48|0;$28=HEAP32[$27>>2]|0;$29=($$0$i+($a*68|0)|0)+52|0;$30=HEAP32[$29>>2]|0;$31=($$0$i+($a*68|0)|0)+56|0;$32=+HEAPF32[$31>>2];$33=($$0$i+($a*68|0)|0)+60|0;$34=+HEAPF32[$33>>2];$35=($$0$i+($a*68|0)|0)+64|0;$36=+HEAPF32[$35>>2];$37=$a+1|0;$38=($$0$i+($37*68|0)|0)+16|0;$39=+HEAPF32[$38>>2];$40=($$0$i+($37*68|0)|0)+20|0;$41=+HEAPF32[$40>>2];$42=($$0$i+($37*68|0)|0)+24|0;$43=+HEAPF32[$42>>2];$44=($$0$i+($37*68|0)|0)+28|0;$45=+HEAPF32[$44>>2];$46=($$0$i+($37*68|0)|0)+32|0;$47=+HEAPF32[$46>>2];$48=($$0$i+($37*68|0)|0)+36|0;$49=+HEAPF32[$48>>2];$50=($$0$i+($37*68|0)|0)+40|0;$51=+HEAPF32[$50>>2];$52=($$0$i+($37*68|0)|0)+44|0;$53=+HEAPF32[$52>>2];$54=($$0$i+($37*68|0)|0)+52|0;$55=HEAP32[$54>>2]|0;$56=($$0$i+($37*68|0)|0)+56|0;$57=+HEAPF32[$56>>2];$58=($$0$i+($37*68|0)|0)+60|0;$59=+HEAPF32[$58>>2];$60=($$0$i+($37*68|0)|0)+64|0;$61=+HEAPF32[$60>>2];$62=$39-$12;$63=$62*$2;$64=$63+$12;$65=$41-$14;$66=$65*$2;$67=$66+$14;$68=$43-$16;$69=$68*$2;$70=$69+$16;$71=$45-$18;$72=$71*$2;$73=$72+$18;$74=$47-$20;$75=$74*$2;$76=$75+$20;$77=$49-$22;$78=$77*$2;$79=$78+$22;$80=$51-$24;$81=$80*$2;$82=$81+$24;$83=$53-$26;$84=$83*$2;$85=$84+$26;$86=+($30|0);$87=$55-$30|0;$88=+($87|0);$89=$88*$2;$90=$89+$86;$91=~~$90;$92=$57-$32;$93=$92*$2;$94=$93+$32;$95=$59-$34;$96=$95*$2;$97=$96+$34;$98=$61-$36;$99=$98*$2;$100=$99+$36;_lame_set_VBR_q($gfp,$4)|0;$101=($enforce|0)!=0;if($101){_lame_set_quant_comp($gfp,$6)|0;_lame_set_quant_comp_short($gfp,$8)|0}else{$102=_lame_get_quant_comp($gfp)|0;$103=($102|0)==-1;if($103){_lame_set_quant_comp($gfp,$6)|0}$104=_lame_get_quant_comp_short($gfp)|0;$105=($104|0)==-1;if($105){_lame_set_quant_comp_short($gfp,$8)|0}}$106=($10|0)==0;if(!$106){_lame_set_experimentalY($gfp,$10)|0}if($101){_lame_set_short_threshold_lrm($gfp,$64)|0;_lame_set_short_threshold_s($gfp,$67)|0;_lame_set_maskingadjust($gfp,$70)|0;_lame_set_maskingadjust_short($gfp,$73)|0}else{$107=+_lame_get_short_threshold_lrm($gfp);$108=$107+1.0;$109=$108!=$108|0.0!=0.0|$108==0.0;if($109){_lame_set_short_threshold_lrm($gfp,$64)|0}$110=+_lame_get_short_threshold_s($gfp);$111=$110+1.0;$112=$111!=$111|0.0!=0.0|$111==0.0;if($112){_lame_set_short_threshold_s($gfp,$67)|0}$113=+_lame_get_maskingadjust($gfp);$114=$113!=$113|0.0!=0.0|$113==0.0;if($114){_lame_set_maskingadjust($gfp,$70)|0}$115=+_lame_get_maskingadjust_short($gfp);$116=$115!=$115|0.0!=0.0|$115==0.0;if($116){_lame_set_maskingadjust_short($gfp,$73)|0}}$117=_lame_get_VBR($gfp)|0;$118=($117|0)==1;if($118){label=23}else{$119=_lame_get_VBR($gfp)|0;$120=($119|0)==4;if($120){label=23}}if((label|0)==23){_lame_set_ATHtype($gfp,5)|0}if($101){_lame_set_ATHlower($gfp,$76)|0;_lame_set_ATHcurve($gfp,$79)|0;_lame_set_athaa_sensitivity($gfp,$82)|0}else{$121=+_lame_get_ATHlower($gfp);$122=$121!=$121|0.0!=0.0|$121==0.0;if($122){_lame_set_ATHlower($gfp,$76)|0}$123=+_lame_get_ATHcurve($gfp);$124=$123+1.0;$125=$124!=$124|0.0!=0.0|$124==0.0;if($125){_lame_set_ATHcurve($gfp,$79)|0}$126=+_lame_get_athaa_sensitivity($gfp);$127=$126!=$126|0.0!=0.0|$126==0.0;if($127){_lame_set_athaa_sensitivity($gfp,$82)|0}}$128=$85>0.0;do{if($128){if($101){_lame_set_interChRatio($gfp,$85)|0;break}$129=+_lame_get_interChRatio($gfp);$130=$129+1.0;$131=$130!=$130|0.0!=0.0|$130==0.0;if($131){_lame_set_interChRatio($gfp,$85)|0}}}while(0);$132=($28|0)>0;if($132){$133=_lame_get_exp_nspsytune($gfp)|0;$134=$133|2;_lame_set_exp_nspsytune($gfp,$134)|0}$135=($91|0)>0;if($135){$136=_lame_get_exp_nspsytune($gfp)|0;$137=$136&66060288;$138=($137|0)==0;if($138){$139=$91<<20;$140=$136|$139;_lame_set_exp_nspsytune($gfp,$140)|0}}if($101){$145=$94;_lame_set_msfix($gfp,$145);$147=$gfp+288|0;$148=HEAP32[$147>>2]|0;$149=$148+280|0;HEAPF32[$149>>2]=$97;$150=$148+224|0;HEAPF32[$150>>2]=$100;return}$141=+_lame_get_msfix($gfp);$142=$141+1.0;$143=$142!=$142|0.0!=0.0|$142==0.0;if($143){$144=$94;_lame_set_msfix($gfp,$144)}$146=$gfp+164|0;HEAP32[$146>>2]=$a;HEAPF32[$1>>2]=$2;$147=$gfp+288|0;$148=HEAP32[$147>>2]|0;$149=$148+280|0;HEAPF32[$149>>2]=$97;$150=$148+224|0;HEAPF32[$150>>2]=$100;return}function _L3psycho_anal_vbr($gfc,$buffer,$gr_out,$masking_ratio,$masking_MS_ratio,$percep_entropy,$percep_MS_entropy,$energy,$blocktype_d){$gfc=$gfc|0;$buffer=$buffer|0;$gr_out=$gr_out|0;$masking_ratio=$masking_ratio|0;$masking_MS_ratio=$masking_MS_ratio|0;$percep_entropy=$percep_entropy|0;$percep_MS_entropy=$percep_MS_entropy|0;$energy=$energy|0;$blocktype_d=$blocktype_d|0;var $$$i=0.0,$$$i67=0,$$01$i$i=0.0,$$01$i$i46=0.0,$$02$i$i=0.0,$$02$i$i47=0.0,$$1$i$i=0.0,$$1$i$i54=0.0,$$lcssa=0.0,$$lcssa$i$i=0,$$lcssa$i$i39=0,$$lcssa1$i$i=0.0,$$lcssa1$i$i38=0.0,$$lcssa226=0.0,$$lcssa227=0,$$lcssa228=0,$$lcssa229=0.0,$$lcssa230=0.0,$$lcssa231=0.0,$$lcssa232=0.0;var $$lcssa233=0,$$lcssa234=0,$$not=0,$$not203=0,$$phi$trans$insert$i=0,$$pre$i=0,$$pre$i12=0.0,$$pre$i27=0.0,$$pre$phi$iZ2D=0,$$pre$phi36$iZ2D=0,$$pre34$i=0.0,$$pre35$i=0,$$pre37$i=0,$$pre48$i=0.0,$$pre49$i=0,$$pre52$i=0,$$pre61$i=0,$$pre63$i=0,$$pre8$i=0,$$sink$i$i=0;var $$sink$i$i36=0,$$sink7$i$i=0,$$sink7$i$i43=0,$$sum=0,$$sum$i=0,$$sum$us$i=0,$$sum1$1$i=0,$$sum1$2$i=0,$$sum1$3$i=0,$$sum1$4$i=0,$$sum1$i=0,$$sum1$us$1$i=0,$$sum1$us$2$i=0,$$sum1$us$3$i=0,$$sum1$us$4$i=0,$$sum1$us$i=0,$$sum2$1$i=0,$$sum2$2$i=0,$$sum2$3$i=0,$$sum2$4$i=0;var $$sum2$i=0,$$sum2$us$1$i=0,$$sum2$us$2$i=0,$$sum2$us$3$i=0,$$sum2$us$4$i=0,$$sum2$us$i=0,$$sum3$1$i=0,$$sum3$2$i=0,$$sum3$3$i=0,$$sum3$4$i=0,$$sum3$i=0,$$sum3$us$1$i=0,$$sum3$us$2$i=0,$$sum3$us$3$i=0,$$sum3$us$4$i=0,$$sum3$us$i=0,$$sum4$1$i=0,$$sum4$2$i=0,$$sum4$3$i=0,$$sum4$4$i=0;var $$sum4$i=0,$$sum4$us$1$i=0,$$sum4$us$2$i=0,$$sum4$us$3$i=0,$$sum4$us$4$i=0,$$sum4$us$i=0,$$sum73=0,$0=0,$1=0,$10=0,$100=0,$1000=0,$1001=0,$1002=0.0,$1003=0.0,$1004=0,$1005=0,$1006=0.0,$1007=0,$1008=0.0;var $1009=0.0,$101=0.0,$1010=0.0,$1011=0.0,$1012=0,$1013=0.0,$1014=0,$1015=0.0,$1016=0.0,$1017=0.0,$1018=0,$1019=0.0,$102=0.0,$1020=0,$1021=0,$1022=0,$1023=0,$1024=0,$1025=0,$1026=0;var $1027=0,$1028=0,$1029=0.0,$103=0.0,$1030=0.0,$1031=0.0,$1032=0,$1033=0,$1034=0,$1035=0,$1036=0,$1037=0.0,$1038=0,$1039=0.0,$104=0.0,$1040=0.0,$1041=0.0,$1042=0,$1043=0,$1044=0.0;var $1045=0.0,$1046=0,$1047=0.0,$1048=0,$1049=0.0,$105=0.0,$1050=0,$1051=0.0,$1052=0.0,$1053=0,$1054=0,$1055=0,$1056=0,$1057=0,$1058=0,$1059=0,$106=0.0,$1060=0.0,$1061=0,$1062=0;var $1063=0,$1064=0,$1065=0,$1066=0,$1067=0,$1068=0,$1069=0,$107=0.0,$1070=0,$1071=0,$1072=0,$1073=0,$1074=0,$1075=0,$1076=0,$1077=0,$1078=0,$1079=0,$108=0.0,$1080=0;var $1081=0,$1082=0,$1083=0,$1084=0,$1085=0,$1086=0,$1087=0,$1088=0,$1089=0,$109=0.0,$1090=0,$1091=0,$1092=0,$1093=0,$1094=0,$1095=0,$1096=0,$1097=0,$1098=0,$1099=0;var $11=0.0,$110=0.0,$1100=0,$1101=0,$1102=0,$1103=0,$1104=0,$1105=0,$1106=0,$1107=0,$1108=0,$1109=0,$111=0.0,$1110=0,$1111=0,$1112=0,$1113=0,$1114=0,$1115=0,$1116=0;var $1117=0,$1118=0,$1119=0,$112=0.0,$1120=0,$1121=0,$1122=0,$1123=0,$1124=0,$1125=0,$1126=0,$1127=0,$1128=0,$1129=0.0,$113=0.0,$1130=0.0,$1131=0.0,$1132=0.0,$1133=0,$1134=0;var $1135=0,$1136=0,$1137=0,$1138=0,$1139=0,$114=0,$1140=0,$1141=0,$1142=0,$1143=0,$1144=0.0,$1145=0.0,$1146=0.0,$1147=0,$1148=0.0,$1149=0,$115=0,$1150=0,$1151=0.0,$1152=0.0;var $1153=0.0,$1154=0,$1155=0,$1156=0,$1157=0,$1158=0,$1159=0,$116=0,$1160=0.0,$1161=0.0,$1162=0.0,$1163=0,$1164=0.0,$1165=0.0,$1166=0.0,$1167=0,$1168=0.0,$1169=0,$117=0,$1170=0.0;var $1171=0.0,$1172=0,$1173=0,$1174=0,$1175=0,$1176=0,$1177=0,$1178=0,$1179=0,$118=0,$1180=0,$1181=0,$1182=0,$1183=0,$1184=0,$1185=0,$1186=0,$1187=0,$1188=0,$1189=0;var $119=0,$1190=0,$1191=0,$1192=0,$1193=0,$1194=0,$1195=0,$1196=0,$1197=0,$1198=0,$1199=0,$12=0,$120=0,$1200=0,$1201=0,$1202=0,$1203=0,$1204=0,$1205=0.0,$1206=0;var $1207=0,$1208=0.0,$1209=0,$121=0,$1210=0.0,$1211=0,$1212=0.0,$1213=0,$1214=0.0,$1215=0,$1216=0.0,$1217=0.0,$1218=0.0,$1219=0.0,$122=0,$1220=0.0,$1221=0.0,$1222=0.0,$1223=0.0,$1224=0.0;var $1225=0.0,$1226=0.0,$1227=0.0,$1228=0.0,$1229=0.0,$123=0,$1230=0,$1231=0.0,$1232=0,$1233=0.0,$1234=0,$1235=0.0,$1236=0,$1237=0.0,$1238=0,$1239=0.0,$124=0,$1240=0.0,$1241=0.0,$1242=0.0;var $1243=0.0,$1244=0.0,$1245=0.0,$1246=0.0,$1247=0.0,$1248=0.0,$1249=0.0,$125=0,$1250=0.0,$1251=0.0,$1252=0.0,$1253=0,$1254=0.0,$1255=0,$1256=0.0,$1257=0,$1258=0.0,$1259=0,$126=0,$1260=0.0;var $1261=0,$1262=0.0,$1263=0.0,$1264=0.0,$1265=0.0,$1266=0.0,$1267=0.0,$1268=0.0,$1269=0.0,$127=0,$1270=0.0,$1271=0.0,$1272=0.0,$1273=0.0,$1274=0.0,$1275=0.0,$1276=0,$1277=0,$1278=0,$1279=0.0;var $128=0,$1280=0,$1281=0.0,$1282=0,$1283=0.0,$1284=0,$1285=0.0,$1286=0,$1287=0,$1288=0.0,$1289=0.0,$129=0,$1290=0.0,$1291=0.0,$1292=0.0,$1293=0.0,$1294=0.0,$1295=0.0,$1296=0.0,$1297=0.0;var $1298=0.0,$1299=0.0,$13=0,$130=0,$1300=0.0,$1301=0.0,$1302=0,$1303=0,$1304=0.0,$1305=0.0,$1306=0,$1307=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0;var $139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0.0,$149=0,$15=0.0,$150=0.0,$151=0,$152=0.0,$153=0.0,$154=0.0,$155=0,$156=0.0;var $157=0,$158=0.0,$159=0.0,$16=0.0,$160=0.0,$161=0,$162=0.0,$163=0,$164=0.0,$165=0.0,$166=0.0,$167=0,$168=0.0,$169=0,$17=0,$170=0.0,$171=0.0,$172=0.0,$173=0,$174=0.0;var $175=0,$176=0.0,$177=0.0,$178=0.0,$179=0,$18=0,$180=0.0,$181=0,$182=0.0,$183=0.0,$184=0.0,$185=0,$186=0.0,$187=0,$188=0.0,$189=0.0,$19=0,$190=0.0,$191=0,$192=0.0;var $193=0,$194=0.0,$195=0.0,$196=0.0,$197=0,$198=0.0,$199=0,$2=0,$20=0,$200=0.0,$201=0.0,$202=0.0,$203=0,$204=0.0,$205=0,$206=0.0,$207=0.0,$208=0.0,$209=0.0,$21=0;var $210=0.0,$211=0.0,$212=0.0,$213=0.0,$214=0.0,$215=0.0,$216=0.0,$217=0.0,$218=0.0,$219=0,$22=0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0,$228=0;var $229=0,$23=0,$230=0.0,$231=0,$232=0.0,$233=0.0,$234=0,$235=0.0,$236=0,$237=0.0,$238=0.0,$239=0.0,$24=0,$240=0,$241=0.0,$242=0.0,$243=0.0,$244=0,$245=0.0,$246=0;var $247=0.0,$248=0.0,$249=0.0,$25=0,$250=0,$251=0.0,$252=0.0,$253=0.0,$254=0.0,$255=0.0,$256=0.0,$257=0,$258=0,$259=0.0,$26=0,$260=0,$261=0,$262=0,$263=0,$264=0;var $265=0,$266=0,$267=0,$268=0,$269=0.0,$27=0,$270=0.0,$271=0,$272=0,$273=0.0,$274=0,$275=0.0,$276=0.0,$277=0,$278=0.0,$279=0,$28=0,$280=0.0,$281=0,$282=0;var $283=0.0,$284=0.0,$285=0.0,$286=0.0,$287=0.0,$288=0.0,$289=0,$29=0,$290=0.0,$291=0.0,$292=0,$293=0.0,$294=0,$295=0.0,$296=0,$297=0.0,$298=0,$299=0.0,$3=0,$30=0;var $300=0,$301=0.0,$302=0,$303=0.0,$304=0,$305=0.0,$306=0,$307=0.0,$308=0,$309=0.0,$31=0,$310=0,$311=0.0,$312=0,$313=0,$314=0.0,$315=0,$316=0.0,$317=0,$318=0;var $319=0.0,$32=0,$320=0,$321=0.0,$322=0.0,$323=0,$324=0.0,$325=0,$326=0.0,$327=0,$328=0.0,$329=0,$33=0,$330=0,$331=0,$332=0,$333=0,$334=0,$335=0.0,$336=0;var $337=0,$338=0,$339=0,$34=0,$340=0,$341=0,$342=0,$343=0,$344=0.0,$345=0,$346=0.0,$347=0,$348=0.0,$349=0,$35=0,$350=0,$351=0,$352=0,$353=0,$354=0;var $355=0,$356=0,$357=0,$358=0,$359=0,$36=0,$360=0,$361=0,$362=0,$363=0,$364=0,$365=0,$366=0,$367=0,$368=0,$369=0,$37=0,$370=0,$371=0,$372=0;var $373=0,$374=0,$375=0,$376=0,$377=0,$378=0,$379=0.0,$38=0,$380=0,$381=0,$382=0.0,$383=0.0,$384=0.0,$385=0.0,$386=0.0,$387=0.0,$388=0,$389=0.0,$39=0,$390=0;var $391=0,$392=0.0,$393=0,$394=0.0,$395=0,$396=0.0,$397=0,$398=0,$399=0,$4=0,$40=0,$400=0,$401=0,$402=0,$403=0,$404=0,$405=0,$406=0,$407=0,$408=0;var $409=0,$41=0,$410=0,$411=0,$412=0,$413=0,$414=0,$415=0,$416=0,$417=0,$418=0,$419=0,$42=0,$420=0,$421=0,$422=0,$423=0,$424=0,$425=0,$426=0;var $427=0,$428=0,$429=0,$43=0.0,$430=0,$431=0.0,$432=0,$433=0.0,$434=0.0,$435=0.0,$436=0.0,$437=0.0,$438=0,$439=0,$44=0,$440=0.0,$441=0.0,$442=0,$443=0,$444=0.0;var $445=0,$446=0,$447=0.0,$448=0.0,$449=0.0,$45=0.0,$450=0.0,$451=0.0,$452=0,$453=0,$454=0,$455=0,$456=0.0,$457=0.0,$458=0,$459=0,$46=0,$460=0,$461=0,$462=0;var $463=0.0,$464=0,$465=0,$466=0.0,$467=0.0,$468=0,$469=0,$47=0.0,$470=0,$471=0,$472=0,$473=0,$474=0.0,$475=0,$476=0.0,$477=0.0,$478=0.0,$479=0,$48=0.0,$480=0.0;var $481=0.0,$482=0.0,$483=0,$484=0,$485=0,$486=0,$487=0,$488=0,$489=0,$49=0.0,$490=0,$491=0.0,$492=0.0,$493=0,$494=0,$495=0,$496=0,$497=0,$498=0,$499=0;var $5=0,$50=0,$500=0,$501=0.0,$502=0.0,$503=0,$504=0,$505=0.0,$506=0.0,$507=0.0,$508=0,$509=0.0,$51=0.0,$510=0.0,$511=0,$512=0.0,$513=0.0,$514=0.0,$515=0,$516=0;var $517=0,$518=0,$519=0,$52=0,$520=0,$521=0.0,$522=0.0,$523=0.0,$524=0,$525=0,$526=0,$527=0,$528=0,$529=0,$53=0.0,$530=0.0,$531=0.0,$532=0,$533=0,$534=0;var $535=0.0,$536=0.0,$537=0.0,$538=0,$539=0,$54=0.0,$540=0,$540$phi=0,$541=0.0,$542=0,$543=0.0,$544=0,$545=0,$546=0.0,$547=0,$548=0.0,$549=0.0,$55=0.0,$550=0.0,$551=0;var $552=0,$553=0,$554=0,$555=0,$556=0,$557=0,$558=0,$559=0,$56=0,$560=0.0,$561=0.0,$562=0.0,$563=0,$564=0,$565=0,$566=0,$567=0,$568=0.0,$569=0.0,$57=0.0;var $570=0,$571=0,$572=0,$573=0.0,$574=0,$575=0.0,$576=0,$577=0.0,$578=0.0,$579=0.0,$58=0,$580=0,$581=0,$582=0,$583=0,$584=0,$585=0,$586=0.0,$587=0.0,$588=0.0;var $589=0,$59=0.0,$590=0,$591=0,$592=0,$593=0,$594=0,$595=0,$596=0,$597=0,$598=0,$599=0,$6=0,$60=0.0,$600=0.0,$601=0.0,$602=0.0,$603=0,$604=0,$605=0;var $606=0,$607=0,$608=0,$609=0,$61=0.0,$610=0,$611=0,$612=0,$613=0,$614=0,$615=0,$616=0,$617=0.0,$618=0,$619=0.0,$62=0,$620=0.0,$621=0,$622=0.0,$623=0.0;var $624=0,$625=0,$626=0,$627=0,$628=0,$629=0,$63=0.0,$630=0,$631=0.0,$632=0,$633=0.0,$634=0.0,$635=0,$636=0.0,$637=0.0,$638=0,$639=0,$64=0,$640=0,$641=0;var $642=0,$643=0,$644=0.0,$645=0.0,$646=0,$647=0,$648=0.0,$649=0,$65=0.0,$650=0.0,$651=0.0,$652=0.0,$653=0.0,$654=0,$655=0.0,$656=0,$657=0.0,$658=0.0,$659=0.0,$66=0.0;var $660=0,$661=0.0,$662=0,$663=0,$664=0,$665=0,$666=0,$667=0,$668=0,$669=0,$67=0.0,$670=0,$671=0.0,$672=0.0,$673=0.0,$674=0,$675=0,$676=0,$677=0.0,$678=0.0;var $679=0,$68=0,$680=0,$681=0.0,$682=0,$683=0.0,$684=0,$685=0.0,$686=0.0,$687=0.0,$688=0,$689=0.0,$69=0.0,$690=0,$691=0,$692=0.0,$693=0.0,$694=0,$695=0.0,$696=0.0;var $697=0,$698=0,$699=0,$7=0,$70=0,$700=0,$701=0.0,$702=0,$703=0.0,$704=0,$705=0,$706=0,$707=0,$708=0.0,$709=0,$71=0.0,$710=0.0,$711=0.0,$712=0.0,$713=0;var $714=0.0,$715=0,$716=0.0,$717=0.0,$718=0,$719=0.0,$72=0.0,$720=0,$721=0.0,$722=0,$723=0.0,$724=0.0,$725=0,$726=0,$727=0,$728=0,$729=0,$73=0.0,$730=0,$731=0;var $732=0,$733=0,$734=0,$735=0,$736=0,$737=0,$738=0,$739=0,$74=0,$740=0.0,$741=0,$742=0,$743=0.0,$744=0,$745=0,$746=0,$747=0,$748=0,$749=0,$75=0.0;var $750=0,$751=0,$752=0,$753=0,$754=0.0,$755=0.0,$756=0,$757=0,$758=0,$759=0,$76=0,$760=0,$761=0,$762=0,$763=0,$764=0,$765=0,$766=0,$767=0,$768=0;var $769=0,$77=0.0,$770=0,$771=0,$772=0,$773=0,$774=0,$775=0,$776=0,$777=0,$778=0,$779=0,$78=0.0,$780=0,$781=0,$782=0,$783=0,$784=0,$785=0,$786=0;var $787=0,$788=0,$789=0,$79=0.0,$790=0,$791=0,$792=0,$793=0,$794=0,$795=0,$796=0,$797=0,$798=0,$799=0,$8=0.0,$80=0,$800=0,$801=0,$802=0,$803=0;var $804=0,$805=0,$806=0,$807=0,$808=0,$809=0,$81=0.0,$810=0,$811=0,$812=0,$813=0,$814=0,$815=0,$816=0,$817=0,$818=0,$819=0.0,$82=0,$820=0,$821=0.0;var $822=0.0,$823=0.0,$824=0.0,$825=0.0,$826=0,$827=0,$828=0,$829=0.0,$83=0.0,$830=0.0,$831=0,$832=0,$833=0.0,$834=0,$835=0,$836=0.0,$837=0.0,$838=0.0,$839=0.0,$84=0.0;var $840=0.0,$841=0,$842=0,$843=0,$844=0,$845=0,$846=0,$847=0,$848=0,$849=0,$85=0.0,$850=0,$851=0,$852=0.0,$853=0.0,$854=0,$855=0,$856=0,$857=0,$858=0;var $859=0,$86=0,$860=0,$861=0.0,$862=0.0,$863=0,$864=0,$865=0.0,$866=0.0,$867=0.0,$868=0,$869=0.0,$87=0.0,$870=0.0,$871=0,$872=0.0,$873=0.0,$874=0.0,$875=0,$876=0;var $877=0,$878=0,$879=0,$88=0,$880=0,$881=0.0,$882=0.0,$883=0.0,$884=0,$885=0,$886=0,$887=0,$888=0,$889=0,$89=0.0,$890=0.0,$891=0,$892=0,$893=0,$894=0.0;var $895=0.0,$896=0.0,$897=0,$898=0,$899=0,$899$phi=0,$9=0,$90=0.0,$900=0.0,$901=0,$902=0.0,$903=0,$904=0,$905=0.0,$906=0,$907=0.0,$908=0.0,$909=0.0,$91=0.0,$910=0;var $911=0,$912=0,$913=0,$914=0,$915=0,$916=0,$917=0,$918=0,$919=0.0,$92=0,$920=0.0,$921=0.0,$922=0,$923=0,$924=0,$925=0,$926=0,$927=0.0,$928=0.0,$929=0;var $93=0.0,$930=0,$931=0,$932=0.0,$933=0,$934=0.0,$935=0,$936=0.0,$937=0.0,$938=0.0,$939=0,$94=0,$940=0,$941=0,$942=0,$943=0,$944=0,$945=0.0,$946=0.0,$947=0.0;var $948=0,$949=0,$95=0.0,$950=0,$951=0,$952=0,$953=0,$954=0,$955=0,$956=0,$957=0,$958=0,$959=0,$96=0.0,$960=0,$961=0,$962=0,$963=0,$964=0,$965=0;var $966=0,$967=0.0,$968=0.0,$969=0.0,$97=0.0,$970=0,$971=0,$972=0,$973=0,$974=0,$975=0.0,$976=0,$977=0.0,$978=0.0,$979=0,$98=0,$980=0.0,$981=0.0,$982=0,$983=0;var $984=0,$985=0,$986=0,$987=0,$988=0,$989=0.0,$99=0.0,$990=0,$991=0.0,$992=0.0,$993=0,$994=0.0,$995=0.0,$996=0,$997=0,$998=0,$999=0,$avg$i=0,$b$0$lcssa$i$i=0,$b$0$lcssa$i$i40=0;var $b$01$i=0,$b$019$i=0,$b$02$i$i=0,$b$02$i$i32=0,$b$030$i=0,$b$08$i$i=0,$b$116$i=0,$b$16$i$ph=0,$b$23$i$ph=0,$blocktype$0$i=0,$brmerge=0,$chn$01$i$us=0,$chn$01$i65=0,$chn$01$us$i=0,$chn$0136=0,$chn$031$i=0,$chn$031$us$i=0,$chn$1133=0,$chn$125$i=0,$chn$2120=0;var $chn$3127=0,$chn$4119=0,$chn$5114=0,$chn$6112=0,$dd$0$lcssa$i=0,$dd$0$lcssa$i58=0,$dd$010$i=0,$dd$06$i=0,$dd_n$0$lcssa$i=0,$dd_n$0$lcssa$i57=0,$eb=0,$ebb$0$lcssa$i=0.0,$ebb$0$lcssa$i$i=0.0,$ebb$02$i$i=0.0,$ebb$021$i=0.0,$ecb$0$be$i=0.0,$ecb$0$be$i$lcssa=0.0,$ecb$0$be$i48=0.0,$ecb$0$be$i48$lcssa=0.0,$ecb$0$lcssa$i=0.0;var $ecb$0$lcssa$i56=0.0,$ecb$08$i=0.0,$ecb$09$i=0.0,$ecb_limit1$0$i=0.0,$ecb_limit_1$0$i=0.0,$ecb_limit_2$0$i=0.0,$en_short$i=0,$exitcond=0,$exitcond$i=0,$exitcond$i$i=0,$exitcond$i11=0,$exitcond$i17=0,$exitcond$i18=0,$exitcond$i68=0,$exitcond$i7=0,$exitcond$i8=0,$exitcond150=0,$exitcond151=0,$exitcond155=0,$exitcond156=0;var $exitcond159=0,$exitcond160=0,$exitcond167=0,$exitcond168=0,$exitcond169=0,$exitcond170=0,$exitcond173=0,$exitcond180=0,$exitcond31$i=0,$exitcond32$i=0,$exitcond33$i=0,$exitcond41$i=0,$exitcond44$i=0,$exitcond45$i=0,$exitcond46$i=0,$exitcond46$i25=0,$exitcond48$i=0,$exitcond49$i=0,$exitcond50$i=0,$exitcond51$i=0;var $exitcond9$i=0,$fabsf$i=0.0,$factor$0$1$i=0.0,$factor$0$2$i=0.0,$factor$0$i=0.0,$fftenergy=0,$fftenergy_s=0,$i$01$i$i=0,$i$023$i=0,$i$030$i=0,$i$030$us$i=0,$i$04$i$i=0,$i$114$i=0,$i$319$i=0,$i$623$i=0,$ispos$i$i=0,$ispos$i$i52=0,$j$03$i=0,$j$031$i=0,$j$07$i$i=0;var $j$08$i=0,$j$1$lcssa$i=0,$j$1$lcssa$i$i=0,$j$11$i$i=0,$j$12$i=0,$j$122$i=0,$j$17$i=0,$j$217$i=0,$j$25$i=0,$j$3$i=0,$j$3$lcssa$i=0,$j$34$i=0,$j$34$i45=0,$j$39$i=0,$k$020$i=0,$k$1$i=0,$k$1$lcssa$i=0,$k$112$i=0,$k$17$i=0,$kk$010$i=0;var $kk$010$in$i=0,$kk$013$i=0,$kk$013$in$i=0,$last_thm=0,$loudness_power$02$i$i=0.0,$m$0$i$i=0.0,$m$0$i$i29=0.0,$m$0$lcssa$i=0.0,$m$0$lcssa$i$i=0.0,$m$020$i=0.0,$m$03$i$i=0.0,$m$1$i=0.0,$m$1$i$i=0.0,$m$1$i$i$lcssa=0.0,$m$1$i$i34=0.0,$m$1$i$lcssa=0.0,$m$1$i2$i=0.0,$m$2$i$i=0.0,$m$2$i$i35=0.0,$m$3$i$i=0.0;var $m$3$i$i42=0.0,$mask_idx_s$i=0,$mr$0=0,$neg$i$i=0,$neg$i$i53=0,$new_thmm=0,$ns_attacks=0,$ns_uselongblock$0$i=0,$or$cond=0,$or$cond$1$i=0,$or$cond$2$i=0,$or$cond$i=0,$or$cond$i20=0,$or$cond3=0,$or$cond7$1$i=0,$or$cond7$2$i=0,$or$cond7$i=0,$or$cond75=0,$p$017$i=0.0,$p$1$i=0.0;var $p$1$i$lcssa=0.0,$p$2$i=0.0,$pe_l$02$i=0.0,$pe_l$1$i=0.0,$pe_l$1$i$lcssa=0.0,$pe_s$04$i=0.0,$pe_s$2$1$i=0.0,$pe_s$2$2$i=0.0,$pe_s$2$2$i$lcssa=0.0,$pe_s$2$i=0.0,$pf$018$i=0,$pf$116$i=0,$ppe$0=0,$prev_thm$0=0.0,$prev_thm$0$in=0,$prev_thm$1=0.0,$ratio$0$i$i=0.0,$ratio$0$i$i51=0.0,$sb$01$i=0,$sb$0118=0;var $sb$02$i=0,$sb$03$i=0,$sblock$0130=0,$sblock$1116=0,$scevgep=0,$scevgep162=0,$scevgep165=0,$scevgep175=0,$scevgep178=0,$smax$i=0,$smax$i$i=0,$smax$i31=0,$storemerge$i$i=0,$storemerge$i$i30=0,$sub_short_factor=0,$t1$0=0.0,$t2$0=0.0,$thm$i=0,$thr=0,$totalenergy$06$i=0.0;var $type$0=0,$type$1=0,$uselongblock=0,$wsamp_L=0,$wsamp_S=0,$x$1$1$i=0.0,$x$1$10$i=0.0,$x$1$2$i=0.0,$x$1$3$i=0.0,$x$1$4$i=0.0,$x$1$5$i=0.0,$x$1$6$i=0.0,$x$1$7$i=0.0,$x$1$8$i=0.0,$x$1$9$i=0.0,$x$1$i=0.0,dest=0,label=0,sp=0,stop=0;sp=STACKTOP;STACKTOP=STACKTOP+26240|0;$mask_idx_s$i=sp+21624|0;$thm$i=sp+21368|0;$avg$i=sp+21112|0;$en_short$i=sp+21096|0;$last_thm=sp+20120|0;$fftenergy=sp+18068|0;$fftenergy_s=sp+16520|0;$wsamp_L=sp+8328|0;$wsamp_S=sp+2184|0;$eb=sp+1160|0;$thr=sp+136|0;$sub_short_factor=sp+88|0;$ns_attacks=sp+24|0;$uselongblock=sp+16|0;$new_thmm=sp;$0=$gfc+85800|0;$1=HEAP32[$0>>2]|0;$2=$gfc+140|0;$3=HEAP32[$2>>2]|0;$4=($3|0)==0;if($4){$1192=0}else{$5=$gfc+85804|0;$6=HEAP32[$5>>2]|0;$1192=$6}$7=$gfc+192|0;$8=+HEAPF32[$7>>2];$9=$8>0.0;if($9){$10=$gfc+200|0;$11=+HEAPF32[$10>>2];$12=$gfc+85796|0;$13=HEAP32[$12>>2]|0;$14=$13+8|0;$15=+HEAPF32[$14>>2];$16=$15*$11;$743=$16}else{$743=1.0}dest=$ns_attacks;stop=dest+64|0;do{HEAP32[dest>>2]=0|0;dest=dest+4|0}while((dest|0)<(stop|0));$17=$gfc+180|0;$18=HEAP32[$17>>2]|0;$19=($18|0)==1;if($19){$417=4}else{$20=$gfc+72|0;$21=HEAP32[$20>>2]|0;$417=$21}$22=$gfc+25660|0;_memcpy($last_thm|0,$22|0,976)|0;if($4){$117=0}else{$23=$gfc+85804|0;$24=HEAP32[$23>>2]|0;$117=$24}$25=$gfc+72|0;$26=HEAP32[$25>>2]|0;$27=$19?4:$26;_memset($mask_idx_s$i|0,0,4608)|0;$28=($26|0)>0;if($28){$29=($27|0)>2;if($29){$chn$031$us$i=0;while(1){$30=$buffer+($chn$031$us$i<<2)|0;$31=HEAP32[$30>>2]|0;$i$030$us$i=0;while(1){$$sum$us$i=$i$030$us$i+407|0;$42=$31+($$sum$us$i<<2)|0;$43=+HEAPF32[$42>>2];$$sum1$us$i=$i$030$us$i+397|0;$44=$31+($$sum1$us$i<<2)|0;$45=+HEAPF32[$44>>2];$$sum2$us$i=$i$030$us$i+418|0;$46=$31+($$sum2$us$i<<2)|0;$47=+HEAPF32[$46>>2];$48=$47+$45;$49=$48*1.7303260184043527E-17;$$sum3$us$i=$i$030$us$i+398|0;$50=$31+($$sum3$us$i<<2)|0;$51=+HEAPF32[$50>>2];$$sum4$us$i=$i$030$us$i+417|0;$52=$31+($$sum4$us$i<<2)|0;$53=+HEAPF32[$52>>2];$54=$53+$51;$55=$54*0.017031719908118248;$$sum1$us$1$i=$i$030$us$i+399|0;$56=$31+($$sum1$us$1$i<<2)|0;$57=+HEAPF32[$56>>2];$$sum2$us$1$i=$i$030$us$i+416|0;$58=$31+($$sum2$us$1$i<<2)|0;$59=+HEAPF32[$58>>2];$60=$59+$57;$61=$60*1.3495279640235235E-17;$$sum3$us$1$i=$i$030$us$i+400|0;$62=$31+($$sum3$us$1$i<<2)|0;$63=+HEAPF32[$62>>2];$$sum4$us$1$i=$i$030$us$i+415|0;$64=$31+($$sum4$us$1$i<<2)|0;$65=+HEAPF32[$64>>2];$66=$65+$63;$67=$66*0.041807200759649277;$$sum1$us$2$i=$i$030$us$i+401|0;$68=$31+($$sum1$us$2$i<<2)|0;$69=+HEAPF32[$68>>2];$$sum2$us$2$i=$i$030$us$i+414|0;$70=$31+($$sum2$us$2$i<<2)|0;$71=+HEAPF32[$70>>2];$72=$71+$69;$73=$72*6.7327796858492251E-17;$$sum3$us$2$i=$i$030$us$i+402|0;$74=$31+($$sum3$us$2$i<<2)|0;$75=+HEAPF32[$74>>2];$$sum4$us$2$i=$i$030$us$i+413|0;$76=$31+($$sum4$us$2$i<<2)|0;$77=+HEAPF32[$76>>2];$78=$77+$75;$79=$78*0.087632402777671814;$$sum1$us$3$i=$i$030$us$i+403|0;$80=$31+($$sum1$us$3$i<<2)|0;$81=+HEAPF32[$80>>2];$$sum2$us$3$i=$i$030$us$i+412|0;$82=$31+($$sum2$us$3$i<<2)|0;$83=+HEAPF32[$82>>2];$84=$83+$81;$85=$84*3.0835000291318875E-17;$$sum3$us$3$i=$i$030$us$i+404|0;$86=$31+($$sum3$us$3$i<<2)|0;$87=+HEAPF32[$86>>2];$$sum4$us$3$i=$i$030$us$i+411|0;$88=$31+($$sum4$us$3$i<<2)|0;$89=+HEAPF32[$88>>2];$90=$89+$87;$91=$90*0.1863476037979126;$$sum1$us$4$i=$i$030$us$i+405|0;$92=$31+($$sum1$us$4$i<<2)|0;$93=+HEAPF32[$92>>2];$$sum2$us$4$i=$i$030$us$i+410|0;$94=$31+($$sum2$us$4$i<<2)|0;$95=+HEAPF32[$94>>2];$96=$95+$93;$97=$96*1.1044240253100168E-16;$$sum3$us$4$i=$i$030$us$i+406|0;$98=$31+($$sum3$us$4$i<<2)|0;$99=+HEAPF32[$98>>2];$$sum4$us$4$i=$i$030$us$i+409|0;$100=$31+($$sum4$us$4$i<<2)|0;$101=+HEAPF32[$100>>2];$102=$101+$99;$103=$102*0.62763798236846924;$104=$43-$49;$105=$104-$55;$106=$105-$61;$107=$106+$67;$108=$107-$73;$109=$108-$79;$110=$109-$85;$111=$110+$91;$112=$111-$97;$113=$112-$103;$114=($mask_idx_s$i+($chn$031$us$i*2304|0)|0)+($i$030$us$i<<2)|0;HEAPF32[$114>>2]=$113;$115=$i$030$us$i+1|0;$exitcond50$i=($115|0)==576;if($exitcond50$i){break}else{$i$030$us$i=$115}}$32=(($masking_ratio+($gr_out*976|0)|0)+($chn$031$us$i*488|0)|0)+244|0;$33=($gfc+26636|0)+($chn$031$us$i*244|0)|0;_memcpy($32|0,$33|0,244)|0;$34=($masking_ratio+($gr_out*976|0)|0)+($chn$031$us$i*488|0)|0;$35=($gfc+25660|0)+($chn$031$us$i*244|0)|0;_memcpy($34|0,$35|0,244)|0;$36=(($masking_MS_ratio+($gr_out*976|0)|0)+($chn$031$us$i*488|0)|0)+244|0;$37=$chn$031$us$i+2|0;$38=($gfc+26636|0)+($37*244|0)|0;_memcpy($36|0,$38|0,244)|0;$39=($masking_MS_ratio+($gr_out*976|0)|0)+($chn$031$us$i*488|0)|0;$40=($gfc+25660|0)+($37*244|0)|0;_memcpy($39|0,$40|0,244)|0;$41=$chn$031$us$i+1|0;$exitcond51$i=($41|0)==($26|0);if($exitcond51$i){break}else{$chn$031$us$i=$41}}}else{$chn$031$i=0;while(1){$145=$buffer+($chn$031$i<<2)|0;$146=HEAP32[$145>>2]|0;$i$030$i=0;while(1){$$sum$i=$i$030$i+407|0;$147=$146+($$sum$i<<2)|0;$148=+HEAPF32[$147>>2];$$sum1$i=$i$030$i+397|0;$149=$146+($$sum1$i<<2)|0;$150=+HEAPF32[$149>>2];$$sum2$i=$i$030$i+418|0;$151=$146+($$sum2$i<<2)|0;$152=+HEAPF32[$151>>2];$153=$152+$150;$154=$153*1.7303260184043527E-17;$$sum3$i=$i$030$i+398|0;$155=$146+($$sum3$i<<2)|0;$156=+HEAPF32[$155>>2];$$sum4$i=$i$030$i+417|0;$157=$146+($$sum4$i<<2)|0;$158=+HEAPF32[$157>>2];$159=$158+$156;$160=$159*0.017031719908118248;$$sum1$1$i=$i$030$i+399|0;$161=$146+($$sum1$1$i<<2)|0;$162=+HEAPF32[$161>>2];$$sum2$1$i=$i$030$i+416|0;$163=$146+($$sum2$1$i<<2)|0;$164=+HEAPF32[$163>>2];$165=$164+$162;$166=$165*1.3495279640235235E-17;$$sum3$1$i=$i$030$i+400|0;$167=$146+($$sum3$1$i<<2)|0;$168=+HEAPF32[$167>>2];$$sum4$1$i=$i$030$i+415|0;$169=$146+($$sum4$1$i<<2)|0;$170=+HEAPF32[$169>>2];$171=$170+$168;$172=$171*0.041807200759649277;$$sum1$2$i=$i$030$i+401|0;$173=$146+($$sum1$2$i<<2)|0;$174=+HEAPF32[$173>>2];$$sum2$2$i=$i$030$i+414|0;$175=$146+($$sum2$2$i<<2)|0;$176=+HEAPF32[$175>>2];$177=$176+$174;$178=$177*6.7327796858492251E-17;$$sum3$2$i=$i$030$i+402|0;$179=$146+($$sum3$2$i<<2)|0;$180=+HEAPF32[$179>>2];$$sum4$2$i=$i$030$i+413|0;$181=$146+($$sum4$2$i<<2)|0;$182=+HEAPF32[$181>>2];$183=$182+$180;$184=$183*0.087632402777671814;$$sum1$3$i=$i$030$i+403|0;$185=$146+($$sum1$3$i<<2)|0;$186=+HEAPF32[$185>>2];$$sum2$3$i=$i$030$i+412|0;$187=$146+($$sum2$3$i<<2)|0;$188=+HEAPF32[$187>>2];$189=$188+$186;$190=$189*3.0835000291318875E-17;$$sum3$3$i=$i$030$i+404|0;$191=$146+($$sum3$3$i<<2)|0;$192=+HEAPF32[$191>>2];$$sum4$3$i=$i$030$i+411|0;$193=$146+($$sum4$3$i<<2)|0;$194=+HEAPF32[$193>>2];$195=$194+$192;$196=$195*0.1863476037979126;$$sum1$4$i=$i$030$i+405|0;$197=$146+($$sum1$4$i<<2)|0;$198=+HEAPF32[$197>>2];$$sum2$4$i=$i$030$i+410|0;$199=$146+($$sum2$4$i<<2)|0;$200=+HEAPF32[$199>>2];$201=$200+$198;$202=$201*1.1044240253100168E-16;$$sum3$4$i=$i$030$i+406|0;$203=$146+($$sum3$4$i<<2)|0;$204=+HEAPF32[$203>>2];$$sum4$4$i=$i$030$i+409|0;$205=$146+($$sum4$4$i<<2)|0;$206=+HEAPF32[$205>>2];$207=$206+$204;$208=$207*0.62763798236846924;$209=$148-$154;$210=$209-$160;$211=$210-$166;$212=$211+$172;$213=$212-$178;$214=$213-$184;$215=$214-$190;$216=$215+$196;$217=$216-$202;$218=$217-$208;$219=($mask_idx_s$i+($chn$031$i*2304|0)|0)+($i$030$i<<2)|0;HEAPF32[$219>>2]=$218;$220=$i$030$i+1|0;$exitcond48$i=($220|0)==576;if($exitcond48$i){break}else{$i$030$i=$220}}$221=(($masking_ratio+($gr_out*976|0)|0)+($chn$031$i*488|0)|0)+244|0;$222=($gfc+26636|0)+($chn$031$i*244|0)|0;_memcpy($221|0,$222|0,244)|0;$223=($masking_ratio+($gr_out*976|0)|0)+($chn$031$i*488|0)|0;$224=($gfc+25660|0)+($chn$031$i*244|0)|0;_memcpy($223|0,$224|0,244)|0;$225=$chn$031$i+1|0;$exitcond49$i=($225|0)==($26|0);if($exitcond49$i){break}else{$chn$031$i=$225}}}}$116=($27|0)>0;if($116){$118=($117|0)==(0|0);$119=$uselongblock+4|0;$120=$avg$i+4|0;$121=$thm$i+4|0;$122=$avg$i+8|0;$123=$thm$i+8|0;$124=$avg$i+12|0;$125=$avg$i+16|0;$126=$avg$i+20|0;$127=$avg$i+24|0;$128=$avg$i+28|0;$129=$avg$i+32|0;$130=$avg$i+36|0;$131=$avg$i+40|0;$132=$avg$i+44|0;$133=$en_short$i+4|0;$134=$en_short$i+8|0;$135=$en_short$i+12|0;$136=$thm$i+12|0;$137=$thm$i+16|0;$138=$thm$i+20|0;$139=$thm$i+24|0;$140=$thm$i+28|0;$141=$thm$i+32|0;$142=$thm$i+36|0;$143=$thm$i+40|0;$144=$thm$i+44|0;$chn$125$i=0;while(1){HEAP32[$en_short$i>>2]=0|0;HEAP32[$en_short$i+4>>2]=0|0;HEAP32[$en_short$i+8>>2]=0|0;HEAP32[$en_short$i+12>>2]=0|0;$226=$chn$125$i&1;$227=$mask_idx_s$i+($226*2304|0)|0;$228=($chn$125$i|0)==2;if($228){$i$114$i=0;while(1){$244=$mask_idx_s$i+($i$114$i<<2)|0;$245=+HEAPF32[$244>>2];$246=($mask_idx_s$i+2304|0)+($i$114$i<<2)|0;$247=+HEAPF32[$246>>2];$248=$247+$245;HEAPF32[$244>>2]=$248;$249=$245-$247;HEAPF32[$246>>2]=$249;$250=$i$114$i+1|0;$exitcond$i=($250|0)==576;if($exitcond$i){break}else{$i$114$i=$250}}}$229=(($gfc+27636|0)+($chn$125$i*36|0)|0)+24|0;$230=+HEAPF32[$229>>2];HEAPF32[$avg$i>>2]=$230;$231=(($gfc+27636|0)+($chn$125$i*36|0)|0)+16|0;$232=+HEAPF32[$231>>2];$233=$230/$232;HEAPF32[$thm$i>>2]=$233;$234=(($gfc+27636|0)+($chn$125$i*36|0)|0)+28|0;$235=+HEAPF32[$234>>2];HEAPF32[$120>>2]=$235;$236=(($gfc+27636|0)+($chn$125$i*36|0)|0)+20|0;$237=+HEAPF32[$236>>2];$238=$235/$237;HEAPF32[$121>>2]=$238;$239=$235+$230;$240=(($gfc+27636|0)+($chn$125$i*36|0)|0)+32|0;$241=+HEAPF32[$240>>2];HEAPF32[$122>>2]=$241;$242=$241/$230;HEAPF32[$123>>2]=$242;$243=$239+$241;HEAPF32[$en_short$i>>2]=$243;$i$319$i=0;$pf$018$i=$227;while(1){$258=$pf$018$i+256|0;$p$017$i=1.0;$pf$116$i=$pf$018$i;while(1){$259=+HEAPF32[$pf$116$i>>2];$fabsf$i=+Math_abs(+$259);$260=$p$017$i<$fabsf$i;$p$1$i=$260?$fabsf$i:$p$017$i;$261=$pf$116$i+4|0;$262=$261>>>0<$258>>>0;if($262){$p$017$i=$p$1$i;$pf$116$i=$261}else{$p$1$i$lcssa=$p$1$i;break}}$263=$i$319$i+3|0;$264=$avg$i+($263<<2)|0;HEAPF32[$264>>2]=$p$1$i$lcssa;$265=(($gfc+27636|0)+($chn$125$i*36|0)|0)+($i$319$i<<2)|0;HEAPF32[$265>>2]=$p$1$i$lcssa;$266=($i$319$i|0)/3&-1;$267=$266+1|0;$268=$en_short$i+($267<<2)|0;$269=+HEAPF32[$268>>2];$270=$269+$p$1$i$lcssa;HEAPF32[$268>>2]=$270;$271=$i$319$i+1|0;$272=$avg$i+($271<<2)|0;$273=+HEAPF32[$272>>2];$274=$p$1$i$lcssa>$273;if($274){$275=$p$1$i$lcssa/$273;$p$2$i=$275}else{$276=$p$1$i$lcssa*10.0;$277=$273>$276;if($277){$278=$273/$276;$p$2$i=$278}else{$p$2$i=0.0}}$279=$thm$i+($263<<2)|0;HEAPF32[$279>>2]=$p$2$i;$exitcond41$i=($271|0)==9;if($exitcond41$i){break}else{$i$319$i=$271;$pf$018$i=$258}}$251=+HEAPF32[$124>>2];$252=+HEAPF32[$125>>2];$253=$252+$251;$254=+HEAPF32[$126>>2];$255=$253+$254;$256=$254*6.0;$257=$256<$255;if($257){$280=$252*6.0;$281=$280<$255;if($281){$factor$0$i=0.25}else{$factor$0$i=0.5}}else{$factor$0$i=1.0}$282=$sub_short_factor+($chn$125$i*12|0)|0;HEAPF32[$282>>2]=$factor$0$i;$283=+HEAPF32[$127>>2];$284=+HEAPF32[$128>>2];$285=$284+$283;$286=+HEAPF32[$129>>2];$287=$285+$286;$288=$286*6.0;$289=$288<$287;if($289){$379=$284*6.0;$380=$379<$287;if($380){$factor$0$1$i=0.25}else{$factor$0$1$i=0.5}}else{$factor$0$1$i=1.0}$381=($sub_short_factor+($chn$125$i*12|0)|0)+4|0;HEAPF32[$381>>2]=$factor$0$1$i;$382=+HEAPF32[$130>>2];$383=+HEAPF32[$131>>2];$384=$383+$382;$385=+HEAPF32[$132>>2];$386=$384+$385;$387=$385*6.0;$388=$387<$386;if($388){$389=$383*6.0;$390=$389<$386;if($390){$factor$0$2$i=0.25}else{$factor$0$2$i=0.5}}else{$factor$0$2$i=1.0}$391=($sub_short_factor+($chn$125$i*12|0)|0)+8|0;HEAPF32[$391>>2]=$factor$0$2$i;if(!$118){$290=+HEAPF32[$thm$i>>2];$291=+HEAPF32[$121>>2];$292=$290<$291;$x$1$i=$292?$291:$290;$293=+HEAPF32[$123>>2];$294=$x$1$i<$293;$x$1$1$i=$294?$293:$x$1$i;$295=+HEAPF32[$136>>2];$296=$x$1$1$i<$295;$x$1$2$i=$296?$295:$x$1$1$i;$297=+HEAPF32[$137>>2];$298=$x$1$2$i<$297;$x$1$3$i=$298?$297:$x$1$2$i;$299=+HEAPF32[$138>>2];$300=$x$1$3$i<$299;$x$1$4$i=$300?$299:$x$1$3$i;$301=+HEAPF32[$139>>2];$302=$x$1$4$i<$301;$x$1$5$i=$302?$301:$x$1$4$i;$303=+HEAPF32[$140>>2];$304=$x$1$5$i<$303;$x$1$6$i=$304?$303:$x$1$5$i;$305=+HEAPF32[$141>>2];$306=$x$1$6$i<$305;$x$1$7$i=$306?$305:$x$1$6$i;$307=+HEAPF32[$142>>2];$308=$x$1$7$i<$307;$x$1$8$i=$308?$307:$x$1$7$i;$309=+HEAPF32[$143>>2];$310=$x$1$8$i<$309;$x$1$9$i=$310?$309:$x$1$8$i;$311=+HEAPF32[$144>>2];$312=$x$1$9$i<$311;$x$1$10$i=$312?$311:$x$1$9$i;$313=($117+197112|0)+($chn$125$i<<3)|0;$314=+HEAPF64[$313>>3];$315=(($117+197144|0)+($gr_out<<5)|0)+($chn$125$i<<3)|0;HEAPF64[$315>>3]=$314;$316=$x$1$10$i;HEAPF64[$313>>3]=$316}$317=HEAP32[$0>>2]|0;$318=($317+6480|0)+($chn$125$i<<2)|0;$319=+HEAPF32[$318>>2];$i$623$i=0;while(1){$330=($i$623$i|0)/3&-1;$331=($ns_attacks+($chn$125$i<<4)|0)+($330<<2)|0;$332=HEAP32[$331>>2]|0;$333=($332|0)==0;if($333){$334=$thm$i+($i$623$i<<2)|0;$335=+HEAPF32[$334>>2];$336=$335>$319;if($336){$337=($i$623$i|0)%3&-1;$338=$337+1|0;HEAP32[$331>>2]=$338}}$339=$i$623$i+1|0;$exitcond44$i=($339|0)==12;if($exitcond44$i){break}else{$i$623$i=$339}}$320=$ns_attacks+($chn$125$i<<4)|0;$321=+HEAPF32[$en_short$i>>2];$322=+HEAPF32[$133>>2];$323=$321>$322;$324=$323?$321:$322;$325=$324<4.0E+4;$326=$322*1.7000000476837158;$327=$321<$326;$or$cond$i=$327&$325;$328=$321*1.7000000476837158;$329=$322<$328;$or$cond7$i=$329&$or$cond$i;if($or$cond7$i){$340=HEAP32[$320>>2]|0;$341=($ns_attacks+($chn$125$i<<4)|0)+4|0;$342=HEAP32[$341>>2]|0;$343=($340|0)>($342|0);if(!$343){HEAP32[$320>>2]=0}HEAP32[$341>>2]=0}$344=+HEAPF32[$134>>2];$345=$322>$344;$346=$345?$322:$344;$347=$346<4.0E+4;$348=$344*1.7000000476837158;$349=$322<$348;$or$cond$1$i=$349&$347;$350=$344<$326;$or$cond7$1$i=$350&$or$cond$1$i;if($or$cond7$1$i){$$pre61$i=($ns_attacks+($chn$125$i<<4)|0)+8|0;HEAP32[$$pre61$i>>2]=0}$392=+HEAPF32[$135>>2];$393=$344>$392;$394=$393?$344:$392;$395=$394<4.0E+4;$396=$392*1.7000000476837158;$397=$344<$396;$or$cond$2$i=$397&$395;$398=$392<$348;$or$cond7$2$i=$398&$or$cond$2$i;if($or$cond7$2$i){$$pre63$i=($ns_attacks+($chn$125$i<<4)|0)+12|0;HEAP32[$$pre63$i>>2]=0}$399=HEAP32[$320>>2]|0;$400=($gfc+27780|0)+($chn$125$i<<2)|0;$351=HEAP32[$400>>2]|0;$401=($399|0)>($351|0);if($401){$354=$399}else{HEAP32[$320>>2]=0;$354=0}$352=($351|0)==3;$$phi$trans$insert$i=($ns_attacks+($chn$125$i<<4)|0)+4|0;$$pre$i=HEAP32[$$phi$trans$insert$i>>2]|0;if($352){label=47}else{$353=$$pre$i+$354|0;$355=($ns_attacks+($chn$125$i<<4)|0)+8|0;$356=HEAP32[$355>>2]|0;$357=$353+$356|0;$358=($ns_attacks+($chn$125$i<<4)|0)+12|0;$359=HEAP32[$358>>2]|0;$360=0-$359|0;$361=($357|0)==($360|0);if($361){$ns_uselongblock$0$i=1}else{label=47}}do{if((label|0)==47){label=0;$362=($$pre$i|0)==0;do{if($362){$367=0}else{$363=($354|0)==0;if($363){$367=$$pre$i;break}HEAP32[$$phi$trans$insert$i>>2]=0;$367=0}}while(0);$364=($ns_attacks+($chn$125$i<<4)|0)+8|0;$365=HEAP32[$364>>2]|0;$366=($365|0)==0;if($366){$ns_uselongblock$0$i=0;break}$368=($367|0)==0;if(!$368){HEAP32[$364>>2]=0;$ns_uselongblock$0$i=0;break}$369=($ns_attacks+($chn$125$i<<4)|0)+12|0;$370=HEAP32[$369>>2]|0;$371=($370|0)==0;if($371){$ns_uselongblock$0$i=0;break}HEAP32[$369>>2]=0;$ns_uselongblock$0$i=0}}while(0);$372=($chn$125$i|0)<2;do{if($372){$373=$uselongblock+($chn$125$i<<2)|0;HEAP32[$373>>2]=$ns_uselongblock$0$i}else{$374=($ns_uselongblock$0$i|0)==0;if(!$374){break}HEAP32[$119>>2]=0;HEAP32[$uselongblock>>2]=0}}while(0);$375=($gfc+27620|0)+($chn$125$i<<2)|0;$376=HEAP32[$375>>2]|0;$377=$energy+($chn$125$i<<2)|0;HEAP32[$377>>2]=$376;$378=$chn$125$i+1|0;$exitcond46$i=($378|0)==($27|0);if($exitcond46$i){break}else{$chn$125$i=$378}}}$402=$gfc+184|0;$403=HEAP32[$402>>2]|0;$404=($403|0)==1;if($404){$405=HEAP32[$uselongblock>>2]|0;$406=($405|0)==0;$$pre8$i=$uselongblock+4|0;$407=HEAP32[$$pre8$i>>2]|0;$408=($407|0)==0;$or$cond75=$406|$408;if($or$cond75){HEAP32[$$pre8$i>>2]=0;HEAP32[$uselongblock>>2]=0}}$409=HEAP32[$25>>2]|0;$410=($409|0)>0;do{if($410){if(($403|0)==3){$chn$01$i$us=0;while(1){$411=$uselongblock+($chn$01$i$us<<2)|0;HEAP32[$411>>2]=0;$412=$chn$01$i$us+1|0;$413=($412|0)<($409|0);if($413){$chn$01$i$us=$412}else{break}}}else if(($403|0)==2){$chn$01$us$i=0;while(1){$414=$uselongblock+($chn$01$us$i<<2)|0;HEAP32[$414>>2]=1;$415=$chn$01$us$i+1|0;$416=($415|0)<($409|0);if($416){$chn$01$us$i=$415}else{break}}}else{break}}}while(0);$418=($417|0)>0;if($418){$419=$gfc+85796|0;$420=$thm$i+4|0;$421=$gfc+84908|0;$$pre37$i=$avg$i+4|0;$422=$gfc+85804|0;$chn$0136=0;while(1){$423=$chn$0136&1;$424=$wsamp_L+($423<<12)|0;$425=HEAP32[$2>>2]|0;$426=($425|0)==0;if($426){$460=0}else{$427=HEAP32[$422>>2]|0;$460=$427}$428=($chn$0136|0)<2;if($428){_fft_long($gfc,$424,$chn$0136,$buffer)}else{$429=($chn$0136|0)==2;if($429){$$sum73=$423+1|0;$j$08$i=1023;while(1){$430=($wsamp_L+($423<<12)|0)+($j$08$i<<2)|0;$431=+HEAPF32[$430>>2];$432=($wsamp_L+($$sum73<<12)|0)+($j$08$i<<2)|0;$433=+HEAPF32[$432>>2];$434=$433+$431;$435=$434*0.70710676908493042;HEAPF32[$430>>2]=$435;$436=$431-$433;$437=$436*0.70710676908493042;HEAPF32[$432>>2]=$437;$438=$j$08$i+-1|0;$439=($j$08$i|0)>0;if($439){$j$08$i=$438}else{break}}}}$440=+HEAPF32[$424>>2];$441=$440*$440;HEAPF32[$fftenergy>>2]=$441;$j$17$i=511;while(1){$442=512-$j$17$i|0;$443=($wsamp_L+($423<<12)|0)+($442<<2)|0;$444=+HEAPF32[$443>>2];$445=$j$17$i+512|0;$446=($wsamp_L+($423<<12)|0)+($445<<2)|0;$447=+HEAPF32[$446>>2];$448=$444*$444;$449=$447*$447;$450=$449+$448;$451=$450*0.5;$452=$fftenergy+($442<<2)|0;HEAPF32[$452>>2]=$451;$453=$j$17$i+-1|0;$454=($j$17$i|0)>0;if($454){$j$17$i=$453}else{$j$25$i=11;$totalenergy$06$i=0.0;break}}while(1){$455=$fftenergy+($j$25$i<<2)|0;$456=+HEAPF32[$455>>2];$457=$456+$totalenergy$06$i;$458=$j$25$i+1|0;$exitcond9$i=($458|0)==513;if($exitcond9$i){$$lcssa229=$457;break}else{$j$25$i=$458;$totalenergy$06$i=$457}}$459=($gfc+27620|0)+($chn$0136<<2)|0;HEAPF32[$459>>2]=$$lcssa229;$461=($460|0)==(0|0);if(!$461){$j$34$i=0;while(1){$462=(($460+90936|0)+($chn$0136<<13)|0)+($j$34$i<<3)|0;$463=+HEAPF64[$462>>3];$464=((($460+123704|0)+($gr_out<<15)|0)+($chn$0136<<13)|0)+($j$34$i<<3)|0;HEAPF64[$464>>3]=$463;$465=$fftenergy+($j$34$i<<2)|0;$466=+HEAPF32[$465>>2];$467=$466;HEAPF64[$462>>3]=$467;$468=$j$34$i+1|0;$exitcond$i8=($468|0)==513;if($exitcond$i8){break}else{$j$34$i=$468}}}if($428){$469=($gfc+27612|0)+($chn$0136<<2)|0;$470=HEAP32[$469>>2]|0;$471=(($gfc+27804|0)+($gr_out<<3)|0)+($chn$0136<<2)|0;HEAP32[$471>>2]=$470;$472=HEAP32[$419>>2]|0;$i$01$i$i=0;$loudness_power$02$i$i=0.0;while(1){$473=$fftenergy+($i$01$i$i<<2)|0;$474=+HEAPF32[$473>>2];$475=($472+724|0)+($i$01$i$i<<2)|0;$476=+HEAPF32[$475>>2];$477=$476*$474;$478=$477+$loudness_power$02$i$i;$479=$i$01$i$i+1|0;$exitcond$i$i=($479|0)==512;if($exitcond$i$i){$$lcssa230=$478;break}else{$i$01$i$i=$479;$loudness_power$02$i$i=$478}}$480=$$lcssa230;$481=$480*8.9748713435966334E-12;$482=$481;HEAPF32[$469>>2]=$482}$483=HEAP32[$0>>2]|0;$484=$483+2148|0;$485=HEAP32[$484>>2]|0;$486=($485|0)>0;if($486){$b$08$i$i=0;$j$07$i$i=0;while(1){$487=($483+1716|0)+($b$08$i$i<<2)|0;$488=HEAP32[$487>>2]|0;$489=($488|0)>0;if($489){$ebb$02$i$i=0.0;$i$04$i$i=0;$j$11$i$i=$j$07$i$i;$m$03$i$i=0.0;while(1){$490=$fftenergy+($j$11$i$i<<2)|0;$491=+HEAPF32[$490>>2];$492=$491+$ebb$02$i$i;$493=$m$03$i$i<$491;$m$1$i$i=$493?$491:$m$03$i$i;$494=$i$04$i$i+1|0;$495=$j$11$i$i+1|0;$exitcond32$i=($494|0)==($488|0);if($exitcond32$i){$$lcssa231=$492;$m$1$i$i$lcssa=$m$1$i$i;break}else{$ebb$02$i$i=$492;$i$04$i$i=$494;$j$11$i$i=$495;$m$03$i$i=$m$1$i$i}}$496=($488|0)>1;$smax$i$i=$496?$488:1;$497=$smax$i$i+$j$07$i$i|0;$ebb$0$lcssa$i$i=$$lcssa231;$j$1$lcssa$i$i=$497;$m$0$lcssa$i$i=$m$1$i$i$lcssa}else{$ebb$0$lcssa$i$i=0.0;$j$1$lcssa$i$i=$j$07$i$i;$m$0$lcssa$i$i=0.0}$498=($eb+($chn$0136<<8)|0)+($b$08$i$i<<2)|0;HEAPF32[$498>>2]=$ebb$0$lcssa$i$i;$499=$thm$i+($b$08$i$i<<2)|0;HEAPF32[$499>>2]=$m$0$lcssa$i$i;$500=($483+512|0)+($b$08$i$i<<2)|0;$501=+HEAPF32[$500>>2];$502=$501*$ebb$0$lcssa$i$i;$503=$avg$i+($b$08$i$i<<2)|0;HEAPF32[$503>>2]=$502;$504=$b$08$i$i+1|0;$exitcond33$i=($504|0)==($485|0);if($exitcond33$i){break}else{$b$08$i$i=$504;$j$07$i$i=$j$1$lcssa$i$i}}$$pre$i12=+HEAPF32[$avg$i>>2];$$pre34$i=+HEAPF32[$$pre37$i>>2];$506=$$pre34$i;$507=$$pre$i12}else{$506=0.0;$507=0.0}$505=$507+$506;$508=$505>0.0;if($508){$509=+HEAPF32[$thm$i>>2];$510=+HEAPF32[$420>>2];$511=$509<$510;$m$0$i$i=$511?$510:$509;$512=$m$0$i$i*2.0;$513=$512-$505;$514=$513*20.0;$515=$483+1716|0;$516=HEAP32[$515>>2]|0;$517=$483+1720|0;$518=HEAP32[$517>>2]|0;$519=$516+-1|0;$520=$519+$518|0;$521=+($520|0);$522=$521*$505;$523=$514/$522;$524=~~$523;$525=($524|0)>8;$526=$524&255;$527=$525?8:$526;$storemerge$i$i=$527}else{$storemerge$i$i=0}HEAP8[$mask_idx_s$i>>0]=$storemerge$i$i;$528=$485+-1|0;$529=($528|0)>1;$530=+HEAPF32[$$pre37$i>>2];$531=$530+$507;if($529){$532=($528|0)>2;$537=$531;$540=0;$569=$530;$b$02$i$i=1;while(1){$533=$b$02$i$i+1|0;$534=$avg$i+($533<<2)|0;$535=+HEAPF32[$534>>2];$536=$535+$537;$538=$536>0.0;if($538){$539=$thm$i+($540<<2)|0;$541=+HEAPF32[$539>>2];$542=$thm$i+($b$02$i$i<<2)|0;$543=+HEAPF32[$542>>2];$544=$541<$543;$m$1$i2$i=$544?$543:$541;$545=$thm$i+($533<<2)|0;$546=+HEAPF32[$545>>2];$547=$m$1$i2$i<$546;$m$2$i$i=$547?$546:$m$1$i2$i;$548=$m$2$i$i*3.0;$549=$548-$536;$550=$549*20.0;$551=($483+1716|0)+($540<<2)|0;$552=HEAP32[$551>>2]|0;$553=($483+1716|0)+($b$02$i$i<<2)|0;$554=HEAP32[$553>>2]|0;$555=($483+1716|0)+($533<<2)|0;$556=HEAP32[$555>>2]|0;$557=$552+-1|0;$558=$557+$554|0;$559=$558+$556|0;$560=+($559|0);$561=$560*$536;$562=$550/$561;$563=~~$562;$564=($563|0)>8;$565=$563&255;$566=$564?8:$565;$$sink$i$i=$566}else{$$sink$i$i=0}$567=$mask_idx_s$i+$b$02$i$i|0;HEAP8[$567>>0]=$$sink$i$i;$568=$535+$569;$exitcond173=($533|0)==($528|0);if($exitcond173){$$lcssa232=$568;break}else{$540$phi=$b$02$i$i;$537=$568;$569=$535;$b$02$i$i=$533;$540=$540$phi}}$smax$i=$532?$528:2;$570=$smax$i+-1|0;$$lcssa$i$i=$570;$$lcssa1$i$i=$$lcssa232;$b$0$lcssa$i$i=$smax$i}else{$$lcssa$i$i=0;$$lcssa1$i$i=$531;$b$0$lcssa$i$i=1}$571=$$lcssa1$i$i>0.0;if($571){$572=$thm$i+($$lcssa$i$i<<2)|0;$573=+HEAPF32[$572>>2];$574=$thm$i+($b$0$lcssa$i$i<<2)|0;$575=+HEAPF32[$574>>2];$576=$573<$575;$m$3$i$i=$576?$575:$573;$577=$m$3$i$i*2.0;$578=$577-$$lcssa1$i$i;$579=$578*20.0;$580=($483+1716|0)+($$lcssa$i$i<<2)|0;$581=HEAP32[$580>>2]|0;$582=($483+1716|0)+($b$0$lcssa$i$i<<2)|0;$583=HEAP32[$582>>2]|0;$584=$581+-1|0;$585=$584+$583|0;$586=+($585|0);$587=$586*$$lcssa1$i$i;$588=$579/$587;$589=~~$588;$590=($589|0)>8;$591=$589&255;$592=$590?8:$591;$$sink7$i$i=$592}else{$$sink7$i$i=0}$593=$mask_idx_s$i+$b$0$lcssa$i$i|0;HEAP8[$593>>0]=$$sink7$i$i;if($486){$594=$483+2156|0;$595=($gfc+27796|0)+($423<<2)|0;$b$019$i=0;$k$020$i=0;while(1){$599=$483+($b$019$i<<2)|0;$600=+HEAPF32[$599>>2];$601=+HEAPF32[$421>>2];$602=$601*$600;$603=($483+1204|0)+($b$019$i<<3)|0;$604=HEAP32[$603>>2]|0;$605=(($483+1204|0)+($b$019$i<<3)|0)+4|0;$606=HEAP32[$605>>2]|0;$607=$mask_idx_s$i+$b$019$i|0;$608=HEAP8[$607>>0]|0;$609=$608&255;$610=11448+($609<<2)|0;$611=HEAP32[$610>>2]|0;$612=$mask_idx_s$i+$604|0;$613=HEAP8[$612>>0]|0;$614=$613&255;$615=HEAP32[$594>>2]|0;$616=$615+($k$020$i<<2)|0;$617=+HEAPF32[$616>>2];$618=($eb+($chn$0136<<8)|0)+($604<<2)|0;$619=+HEAPF32[$618>>2];$620=$619*$617;$621=11488+($614<<2)|0;$622=+HEAPF32[$621>>2];$623=$620*$622;$k$17$i=$k$020$i+1|0;$624=($604|0)<($606|0);if($624){$630=$615;$dd$010$i=$614;$ecb$09$i=$623;$k$112$i=$k$17$i;$kk$013$in$i=$604;while(1){$kk$013$i=$kk$013$in$i+1|0;$625=$mask_idx_s$i+$kk$013$i|0;$626=HEAP8[$625>>0]|0;$627=$626&255;$628=$627+$dd$010$i|0;$629=$630+($k$112$i<<2)|0;$631=+HEAPF32[$629>>2];$632=($eb+($chn$0136<<8)|0)+($kk$013$i<<2)|0;$633=+HEAPF32[$632>>2];$634=$633*$631;$635=11488+($627<<2)|0;$636=+HEAPF32[$635>>2];$637=$634*$636;$638=$kk$013$i-$b$019$i|0;$639=$ecb$09$i<0.0;$$01$i$i=$639?0.0:$ecb$09$i;$640=$637<0.0;$$02$i$i=$640?0.0:$637;$641=!($$01$i$i<=0.0);do{if($641){$642=!($$02$i$i<=0.0);if(!$642){$ecb$0$be$i=$$01$i$i;break}$643=$$02$i$i>$$01$i$i;$644=$$02$i$i/$$01$i$i;$645=$$01$i$i/$$02$i$i;$ratio$0$i$i=$643?$644:$645;$ispos$i$i=($638|0)>-1;$neg$i$i=0-$638|0;$646=$ispos$i$i?$638:$neg$i$i;$647=($646|0)>($611|0);if($647){$659=+HEAPF32[11576>>2];$660=$ratio$0$i$i<$659;if($660){$661=$$02$i$i+$$01$i$i;$ecb$0$be$i=$661;break}else{$$1$i$i=$643?$$02$i$i:$$01$i$i;$ecb$0$be$i=$$1$i$i;break}}else{$648=+HEAPF32[11528>>2];$649=!($ratio$0$i$i>=$648);if($649){$651=+_fast_log2($ratio$0$i$i);$652=$651;$653=$652*4.8164799306236983;$654=~~$653;$655=$$02$i$i+$$01$i$i;$656=11536+($654<<2)|0;$657=+HEAPF32[$656>>2];$658=$657*$655;$ecb$0$be$i=$658;break}else{$650=$$02$i$i+$$01$i$i;$ecb$0$be$i=$650;break}}}else{$ecb$0$be$i=$$02$i$i}}while(0);$exitcond31$i=($kk$013$i|0)==($606|0);if($exitcond31$i){$$lcssa233=$628;$ecb$0$be$i$lcssa=$ecb$0$be$i;break}$k$1$i=$k$112$i+1|0;$$pre35$i=HEAP32[$594>>2]|0;$630=$$pre35$i;$dd$010$i=$628;$ecb$09$i=$ecb$0$be$i;$k$112$i=$k$1$i;$kk$013$in$i=$kk$013$i}$662=$k$17$i-$604|0;$663=$662+$606|0;$664=1-$604|0;$665=$664+$606|0;$dd$0$lcssa$i=$$lcssa233;$dd_n$0$lcssa$i=$665;$ecb$0$lcssa$i=$ecb$0$be$i$lcssa;$k$1$lcssa$i=$663}else{$dd$0$lcssa$i=$614;$dd_n$0$lcssa$i=1;$ecb$0$lcssa$i=$623;$k$1$lcssa$i=$k$17$i}$666=$dd$0$lcssa$i<<1;$667=$666|1;$668=$dd_n$0$lcssa$i<<1;$669=($667|0)/($668|0)&-1;$670=11488+($669<<2)|0;$671=+HEAPF32[$670>>2];$672=$671*0.5;$673=$672*$ecb$0$lcssa$i;$674=HEAP32[$595>>2]|0;$675=($674|0)==2;do{if($675){$676=(($gfc+21564|0)+($chn$0136<<8)|0)+($b$019$i<<2)|0;$677=+HEAPF32[$676>>2];$678=$677*2.0;$679=$678>0.0;if($679){$680=$673<$678;$681=$680?$673:$678;$682=($thr+($chn$0136<<8)|0)+($b$019$i<<2)|0;HEAPF32[$682>>2]=$681;$$pre$phi$iZ2D=$676;$$pre$phi36$iZ2D=$682;$714=$681;break}else{$683=$673;$684=($eb+($chn$0136<<8)|0)+($b$019$i<<2)|0;$685=+HEAPF32[$684>>2];$686=$685;$687=$686*0.29999999999999999;$688=$683<$687;$$$i=$688?$683:$687;$689=$$$i;$690=($thr+($chn$0136<<8)|0)+($b$019$i<<2)|0;HEAPF32[$690>>2]=$689;$$pre$phi$iZ2D=$676;$$pre$phi36$iZ2D=$690;$714=$689;break}}else{$691=(($gfc+22588|0)+($chn$0136<<8)|0)+($b$019$i<<2)|0;$692=+HEAPF32[$691>>2];$693=$692*16.0;$694=(($gfc+21564|0)+($chn$0136<<8)|0)+($b$019$i<<2)|0;$695=+HEAPF32[$694>>2];$696=$695*2.0;$697=!($693<=0.0);$ecb_limit_2$0$i=$697?$693:$673;$698=!($696<=0.0);$ecb_limit_1$0$i=$698?$696:$673;$699=($674|0)==0;$700=$ecb_limit_1$0$i<$ecb_limit_2$0$i;$701=$700?$ecb_limit_1$0$i:$ecb_limit_2$0$i;$ecb_limit1$0$i=$699?$701:$ecb_limit_1$0$i;$702=$673<$ecb_limit1$0$i;$703=$702?$673:$ecb_limit1$0$i;$704=($thr+($chn$0136<<8)|0)+($b$019$i<<2)|0;HEAPF32[$704>>2]=$703;$$pre$phi$iZ2D=$694;$$pre$phi36$iZ2D=$704;$714=$703}}while(0);$705=HEAP32[$$pre$phi$iZ2D>>2]|0;$706=(($gfc+22588|0)+($chn$0136<<8)|0)+($b$019$i<<2)|0;HEAP32[$706>>2]=$705;HEAPF32[$$pre$phi$iZ2D>>2]=$673;$707=$thm$i+($b$019$i<<2)|0;$708=+HEAPF32[$707>>2];$709=($483+256|0)+($b$019$i<<2)|0;$710=+HEAPF32[$709>>2];$711=$708*$672;$712=$711*$710;$713=$714>$712;if($713){HEAPF32[$$pre$phi36$iZ2D>>2]=$712;$717=$712}else{$717=$714}$715=$602>1.0;if($715){$716=$717*$602;HEAPF32[$$pre$phi36$iZ2D>>2]=$716;$721=$716}else{$721=$717}$718=($eb+($chn$0136<<8)|0)+($b$019$i<<2)|0;$719=+HEAPF32[$718>>2];$720=$721>$719;if($720){HEAPF32[$$pre$phi36$iZ2D>>2]=$719;$724=$719}else{$724=$721}$722=$602<1.0;if($722){$723=$724*$602;HEAPF32[$$pre$phi36$iZ2D>>2]=$723}$725=$b$019$i+1|0;$726=HEAP32[$484>>2]|0;$727=($725|0)<($726|0);if($727){$b$019$i=$725;$k$020$i=$k$1$lcssa$i}else{$$lcssa234=$725;break}}$596=($$lcssa234|0)<64;if($596){$b$16$i$ph=$$lcssa234;label=114}}else{$b$16$i$ph=0;label=114}if((label|0)==114){label=0;$scevgep175=($eb+($chn$0136<<8)|0)+($b$16$i$ph<<2)|0;$597=$b$16$i$ph<<2;$598=256-$597|0;_memset($scevgep175|0,0,$598|0)|0;$scevgep178=($thr+($chn$0136<<8)|0)+($b$16$i$ph<<2)|0;_memset($scevgep178|0,0,$598|0)|0}$728=$chn$0136+1|0;$exitcond180=($728|0)==($417|0);if($exitcond180){break}else{$chn$0136=$728}}}$729=HEAP32[$17>>2]|0;$730=($729|0)==1;if($730){$731=HEAP32[$uselongblock>>2]|0;$732=$uselongblock+4|0;$733=HEAP32[$732>>2]|0;$734=$733+$731|0;$735=($734|0)==2;if($735){$736=$1+768|0;$737=$gfc+85796|0;$738=HEAP32[$737>>2]|0;$739=$738+212|0;$740=+HEAPF32[$7>>2];$741=$1+2148|0;$742=HEAP32[$741>>2]|0;_vbrpsy_compute_MS_thresholds($eb,$thr,$736,$739,$743,$740,$742)}}if($418){$chn$1133=0;while(1){$744=$eb+($chn$1133<<8)|0;$745=$thr+($chn$1133<<8)|0;$746=HEAP32[$0>>2]|0;$747=($gfc+26636|0)+($chn$1133*244|0)|0;$748=($gfc+25660|0)+($chn$1133*244|0)|0;_convert_partition2scalefac($746,$744,$745,$747,$748);$749=HEAP32[$0>>2]|0;$750=$749+4320|0;_convert_partition2scalefac($750,$744,$745,$mask_idx_s$i,$thm$i);$sb$02$i=0;while(1){$751=$mask_idx_s$i+($sb$02$i<<2)|0;$752=HEAP32[$751>>2]|0;$753=$thm$i+($sb$02$i<<2)|0;$754=+HEAPF32[$753>>2];$755=$754*0.015625;$756=((($gfc+26636|0)+($chn$1133*244|0)|0)+88|0)+($sb$02$i*12|0)|0;HEAP32[$756>>2]=$752;$757=((($gfc+25660|0)+($chn$1133*244|0)|0)+88|0)+($sb$02$i*12|0)|0;HEAPF32[$757>>2]=$755;$758=(((($gfc+26636|0)+($chn$1133*244|0)|0)+88|0)+($sb$02$i*12|0)|0)+4|0;HEAP32[$758>>2]=$752;$759=(((($gfc+25660|0)+($chn$1133*244|0)|0)+88|0)+($sb$02$i*12|0)|0)+4|0;HEAPF32[$759>>2]=$755;$760=(((($gfc+26636|0)+($chn$1133*244|0)|0)+88|0)+($sb$02$i*12|0)|0)+8|0;HEAP32[$760>>2]=$752;$761=(((($gfc+25660|0)+($chn$1133*244|0)|0)+88|0)+($sb$02$i*12|0)|0)+8|0;HEAPF32[$761>>2]=$755;$762=$sb$02$i+1|0;$exitcond$i17=($762|0)==13;if($exitcond$i17){break}else{$sb$02$i=$762}}$763=$chn$1133+1|0;$exitcond170=($763|0)==($417|0);if($exitcond170){break}else{$chn$1133=$763}}}$764=HEAP32[$0>>2]|0;$765=$764+6500|0;$766=HEAP32[$765>>2]|0;$767=HEAP32[$uselongblock>>2]|0;$768=$uselongblock+4|0;$769=HEAP32[$768>>2]|0;$770=0-$769|0;$771=$1+2928|0;$772=$gfc+85796|0;$773=$1+4308|0;$774=($766|0)!=0;$775=$mask_idx_s$i+4|0;$776=$thm$i+4|0;$777=$mask_idx_s$i+8|0;$778=$thm$i+8|0;$779=$mask_idx_s$i+12|0;$780=$thm$i+12|0;$781=$mask_idx_s$i+16|0;$782=$thm$i+16|0;$783=$mask_idx_s$i+20|0;$784=$thm$i+20|0;$785=$mask_idx_s$i+24|0;$786=$thm$i+24|0;$787=$mask_idx_s$i+28|0;$788=$thm$i+28|0;$789=$mask_idx_s$i+32|0;$790=$thm$i+32|0;$791=$mask_idx_s$i+36|0;$792=$thm$i+36|0;$793=$mask_idx_s$i+40|0;$794=$thm$i+40|0;$795=$mask_idx_s$i+44|0;$796=$thm$i+44|0;$797=$mask_idx_s$i+48|0;$798=$thm$i+48|0;$799=$thm$i+4|0;$800=$gfc+84908|0;$$pre52$i=$avg$i+4|0;$$not203=($767|0)!=($770|0);$sblock$0130=0;while(1){if($418){$801=($sblock$0130|0)==0;$802=$fftenergy_s+($sblock$0130*516|0)|0;$chn$2120=0;while(1){$803=$chn$2120&1;$804=$uselongblock+($803<<2)|0;$805=HEAP32[$804>>2]|0;$806=($805|0)==0;$or$cond=$774|$806;if($or$cond){$815=($chn$2120|0)<2;$or$cond$i20=$801&$815;if($or$cond$i20){$816=$wsamp_S+($803*3072|0)|0;_fft_short($gfc,$816,$chn$2120,$buffer)}$817=($chn$2120|0)==2;if($817){$$sum=$803+1|0;$j$03$i=255;while(1){$818=(($wsamp_S+($803*3072|0)|0)+($sblock$0130<<10)|0)+($j$03$i<<2)|0;$819=+HEAPF32[$818>>2];$820=(($wsamp_S+($$sum*3072|0)|0)+($sblock$0130<<10)|0)+($j$03$i<<2)|0;$821=+HEAPF32[$820>>2];$822=$821+$819;$823=$822*0.70710676908493042;HEAPF32[$818>>2]=$823;$824=$819-$821;$825=$824*0.70710676908493042;HEAPF32[$820>>2]=$825;$826=$j$03$i+-1|0;$827=($j$03$i|0)>0;if($827){$j$03$i=$826}else{break}}}$828=($wsamp_S+($803*3072|0)|0)+($sblock$0130<<10)|0;$829=+HEAPF32[$828>>2];$830=$829*$829;HEAPF32[$802>>2]=$830;$j$12$i=127;while(1){$831=128-$j$12$i|0;$832=(($wsamp_S+($803*3072|0)|0)+($sblock$0130<<10)|0)+($831<<2)|0;$833=+HEAPF32[$832>>2];$834=$j$12$i+128|0;$835=(($wsamp_S+($803*3072|0)|0)+($sblock$0130<<10)|0)+($834<<2)|0;$836=+HEAPF32[$835>>2];$837=$833*$833;$838=$836*$836;$839=$838+$837;$840=$839*0.5;$841=($fftenergy_s+($sblock$0130*516|0)|0)+($831<<2)|0;HEAPF32[$841>>2]=$840;$842=$j$12$i+-1|0;$843=($j$12$i|0)>0;if($843){$j$12$i=$842}else{break}}$844=HEAP32[$0>>2]|0;_memset($thm$i|0,0,256)|0;_memset($avg$i|0,0,256)|0;$845=$844+4308|0;$846=HEAP32[$845>>2]|0;$847=($846|0)>0;if($847){$b$030$i=0;$j$031$i=0;while(1){$848=($844+3876|0)+($b$030$i<<2)|0;$849=HEAP32[$848>>2]|0;$850=($849|0)>0;if($850){$ebb$021$i=0.0;$i$023$i=0;$j$122$i=$j$031$i;$m$020$i=0.0;while(1){$851=($fftenergy_s+($sblock$0130*516|0)|0)+($j$122$i<<2)|0;$852=+HEAPF32[$851>>2];$853=$852+$ebb$021$i;$854=$m$020$i<$852;$m$1$i=$854?$852:$m$020$i;$855=$i$023$i+1|0;$856=$j$122$i+1|0;$exitcond46$i25=($855|0)==($849|0);if($exitcond46$i25){$$lcssa=$853;$m$1$i$lcssa=$m$1$i;break}else{$ebb$021$i=$853;$i$023$i=$855;$j$122$i=$856;$m$020$i=$m$1$i}}$857=$849+$j$031$i|0;$ebb$0$lcssa$i=$$lcssa;$j$1$lcssa$i=$857;$m$0$lcssa$i=$m$1$i$lcssa}else{$ebb$0$lcssa$i=0.0;$j$1$lcssa$i=$j$031$i;$m$0$lcssa$i=0.0}$858=($eb+($chn$2120<<8)|0)+($b$030$i<<2)|0;HEAPF32[$858>>2]=$ebb$0$lcssa$i;$859=$thm$i+($b$030$i<<2)|0;HEAPF32[$859>>2]=$m$0$lcssa$i;$860=($844+2672|0)+($b$030$i<<2)|0;$861=+HEAPF32[$860>>2];$862=$861*$ebb$0$lcssa$i;$863=$avg$i+($b$030$i<<2)|0;HEAPF32[$863>>2]=$862;$864=$b$030$i+1|0;$exitcond159=($864|0)==($846|0);if($exitcond159){break}else{$b$030$i=$864;$j$031$i=$j$1$lcssa$i}}$$pre$i27=+HEAPF32[$avg$i>>2];$$pre48$i=+HEAPF32[$$pre52$i>>2];$866=$$pre48$i;$867=$$pre$i27}else{$866=0.0;$867=0.0}$865=$867+$866;$868=$865>0.0;if($868){$869=+HEAPF32[$thm$i>>2];$870=+HEAPF32[$799>>2];$871=$869<$870;$m$0$i$i29=$871?$870:$869;$872=$m$0$i$i29*2.0;$873=$872-$865;$874=$873*20.0;$875=$844+3876|0;$876=HEAP32[$875>>2]|0;$877=$844+3880|0;$878=HEAP32[$877>>2]|0;$879=$876+-1|0;$880=$879+$878|0;$881=+($880|0);$882=$881*$865;$883=$874/$882;$884=~~$883;$885=($884|0)>8;$886=$884&255;$887=$885?8:$886;$storemerge$i$i30=$887}else{$storemerge$i$i30=0}HEAP8[$mask_idx_s$i>>0]=$storemerge$i$i30;$888=$846+-1|0;$889=($888|0)>1;$890=$866+$867;if($889){$891=($888|0)>2;$896=$890;$899=0;$928=$866;$b$02$i$i32=1;while(1){$892=$b$02$i$i32+1|0;$893=$avg$i+($892<<2)|0;$894=+HEAPF32[$893>>2];$895=$894+$896;$897=$895>0.0;if($897){$898=$thm$i+($899<<2)|0;$900=+HEAPF32[$898>>2];$901=$thm$i+($b$02$i$i32<<2)|0;$902=+HEAPF32[$901>>2];$903=$900<$902;$m$1$i$i34=$903?$902:$900;$904=$thm$i+($892<<2)|0;$905=+HEAPF32[$904>>2];$906=$m$1$i$i34<$905;$m$2$i$i35=$906?$905:$m$1$i$i34;$907=$m$2$i$i35*3.0;$908=$907-$895;$909=$908*20.0;$910=($844+3876|0)+($899<<2)|0;$911=HEAP32[$910>>2]|0;$912=($844+3876|0)+($b$02$i$i32<<2)|0;$913=HEAP32[$912>>2]|0;$914=($844+3876|0)+($892<<2)|0;$915=HEAP32[$914>>2]|0;$916=$911+-1|0;$917=$916+$913|0;$918=$917+$915|0;$919=+($918|0);$920=$919*$895;$921=$909/$920;$922=~~$921;$923=($922|0)>8;$924=$922&255;$925=$923?8:$924;$$sink$i$i36=$925}else{$$sink$i$i36=0}$926=$mask_idx_s$i+$b$02$i$i32|0;HEAP8[$926>>0]=$$sink$i$i36;$927=$894+$928;$exitcond160=($892|0)==($888|0);if($exitcond160){$$lcssa226=$927;break}else{$899$phi=$b$02$i$i32;$896=$927;$928=$894;$b$02$i$i32=$892;$899=$899$phi}}$smax$i31=$891?$888:2;$929=$smax$i31+-1|0;$$lcssa$i$i39=$929;$$lcssa1$i$i38=$$lcssa226;$b$0$lcssa$i$i40=$smax$i31}else{$$lcssa$i$i39=0;$$lcssa1$i$i38=$890;$b$0$lcssa$i$i40=1}$930=$$lcssa1$i$i38>0.0;if($930){$931=$thm$i+($$lcssa$i$i39<<2)|0;$932=+HEAPF32[$931>>2];$933=$thm$i+($b$0$lcssa$i$i40<<2)|0;$934=+HEAPF32[$933>>2];$935=$932<$934;$m$3$i$i42=$935?$934:$932;$936=$m$3$i$i42*2.0;$937=$936-$$lcssa1$i$i38;$938=$937*20.0;$939=($844+3876|0)+($$lcssa$i$i39<<2)|0;$940=HEAP32[$939>>2]|0;$941=($844+3876|0)+($b$0$lcssa$i$i40<<2)|0;$942=HEAP32[$941>>2]|0;$943=$940+-1|0;$944=$943+$942|0;$945=+($944|0);$946=$945*$$lcssa1$i$i38;$947=$938/$946;$948=~~$947;$949=($948|0)>8;$950=$948&255;$951=$949?8:$950;$$sink7$i$i43=$951}else{$$sink7$i$i43=0}$952=$mask_idx_s$i+$b$0$lcssa$i$i40|0;HEAP8[$952>>0]=$$sink7$i$i43;if($847){$953=$844+4316|0;$b$116$i=0;$j$217$i=0;while(1){$957=($844+3364|0)+($b$116$i<<3)|0;$958=HEAP32[$957>>2]|0;$959=(($844+3364|0)+($b$116$i<<3)|0)+4|0;$960=HEAP32[$959>>2]|0;$961=$mask_idx_s$i+$b$116$i|0;$962=HEAP8[$961>>0]|0;$963=$962&255;$964=11448+($963<<2)|0;$965=HEAP32[$964>>2]|0;$966=($844+2160|0)+($b$116$i<<2)|0;$967=+HEAPF32[$966>>2];$968=+HEAPF32[$800>>2];$969=$968*$967;$970=$mask_idx_s$i+$958|0;$971=HEAP8[$970>>0]|0;$972=$971&255;$973=HEAP32[$953>>2]|0;$974=$973+($j$217$i<<2)|0;$975=+HEAPF32[$974>>2];$976=($eb+($chn$2120<<8)|0)+($958<<2)|0;$977=+HEAPF32[$976>>2];$978=$977*$975;$979=11488+($972<<2)|0;$980=+HEAPF32[$979>>2];$981=$978*$980;$j$34$i45=$j$217$i+1|0;$982=($958|0)<($960|0);if($982){$988=$973;$dd$06$i=$972;$ecb$08$i=$981;$j$39$i=$j$34$i45;$kk$010$in$i=$958;while(1){$kk$010$i=$kk$010$in$i+1|0;$983=$mask_idx_s$i+$kk$010$i|0;$984=HEAP8[$983>>0]|0;$985=$984&255;$986=$985+$dd$06$i|0;$987=$988+($j$39$i<<2)|0;$989=+HEAPF32[$987>>2];$990=($eb+($chn$2120<<8)|0)+($kk$010$i<<2)|0;$991=+HEAPF32[$990>>2];$992=$991*$989;$993=11488+($985<<2)|0;$994=+HEAPF32[$993>>2];$995=$992*$994;$996=$kk$010$i-$b$116$i|0;$997=$ecb$08$i<0.0;$$01$i$i46=$997?0.0:$ecb$08$i;$998=$995<0.0;$$02$i$i47=$998?0.0:$995;$999=!($$01$i$i46<=0.0);do{if($999){$1000=!($$02$i$i47<=0.0);if(!$1000){$ecb$0$be$i48=$$01$i$i46;break}$1001=$$02$i$i47>$$01$i$i46;$1002=$$02$i$i47/$$01$i$i46;$1003=$$01$i$i46/$$02$i$i47;$ratio$0$i$i51=$1001?$1002:$1003;$ispos$i$i52=($996|0)>-1;$neg$i$i53=0-$996|0;$1004=$ispos$i$i52?$996:$neg$i$i53;$1005=($1004|0)>($965|0);if($1005){$1017=+HEAPF32[11576>>2];$1018=$ratio$0$i$i51<$1017;if($1018){$1019=$$02$i$i47+$$01$i$i46;$ecb$0$be$i48=$1019;break}else{$$1$i$i54=$1001?$$02$i$i47:$$01$i$i46;$ecb$0$be$i48=$$1$i$i54;break}}else{$1006=+HEAPF32[11528>>2];$1007=!($ratio$0$i$i51>=$1006);if($1007){$1009=+_fast_log2($ratio$0$i$i51);$1010=$1009;$1011=$1010*4.8164799306236983;$1012=~~$1011;$1013=$$02$i$i47+$$01$i$i46;$1014=11536+($1012<<2)|0;$1015=+HEAPF32[$1014>>2];$1016=$1015*$1013;$ecb$0$be$i48=$1016;break}else{$1008=$$02$i$i47+$$01$i$i46;$ecb$0$be$i48=$1008;break}}}else{$ecb$0$be$i48=$$02$i$i47}}while(0);$exitcond45$i=($kk$010$i|0)==($960|0);if($exitcond45$i){$$lcssa227=$986;$ecb$0$be$i48$lcssa=$ecb$0$be$i48;break}$j$3$i=$j$39$i+1|0;$$pre49$i=HEAP32[$953>>2]|0;$988=$$pre49$i;$dd$06$i=$986;$ecb$08$i=$ecb$0$be$i48;$j$39$i=$j$3$i;$kk$010$in$i=$kk$010$i}$1020=$j$34$i45-$958|0;$1021=$1020+$960|0;$1022=1-$958|0;$1023=$1022+$960|0;$dd$0$lcssa$i58=$$lcssa227;$dd_n$0$lcssa$i57=$1023;$ecb$0$lcssa$i56=$ecb$0$be$i48$lcssa;$j$3$lcssa$i=$1021}else{$dd$0$lcssa$i58=$972;$dd_n$0$lcssa$i57=1;$ecb$0$lcssa$i56=$981;$j$3$lcssa$i=$j$34$i45}$1024=$dd$0$lcssa$i58<<1;$1025=$1024|1;$1026=$dd_n$0$lcssa$i57<<1;$1027=($1025|0)/($1026|0)&-1;$1028=11488+($1027<<2)|0;$1029=+HEAPF32[$1028>>2];$1030=$1029*0.5;$1031=$1030*$ecb$0$lcssa$i56;$1032=($thr+($chn$2120<<8)|0)+($b$116$i<<2)|0;HEAPF32[$1032>>2]=$1031;$1033=(($gfc+23612|0)+($chn$2120<<8)|0)+($b$116$i<<2)|0;$1034=HEAP32[$1033>>2]|0;$1035=(($gfc+24636|0)+($chn$2120<<8)|0)+($b$116$i<<2)|0;HEAP32[$1035>>2]=$1034;HEAPF32[$1033>>2]=$1031;$1036=$thm$i+($b$116$i<<2)|0;$1037=+HEAPF32[$1036>>2];$1038=($844+2416|0)+($b$116$i<<2)|0;$1039=+HEAPF32[$1038>>2];$1040=$1037*$1030;$1041=$1040*$1039;$1042=$1031>$1041;if($1042){HEAPF32[$1032>>2]=$1041;$1045=$1041}else{$1045=$1031}$1043=$969>1.0;if($1043){$1044=$1045*$969;HEAPF32[$1032>>2]=$1044;$1049=$1044}else{$1049=$1045}$1046=($eb+($chn$2120<<8)|0)+($b$116$i<<2)|0;$1047=+HEAPF32[$1046>>2];$1048=$1049>$1047;if($1048){HEAPF32[$1032>>2]=$1047;$1052=$1047}else{$1052=$1049}$1050=$969<1.0;if($1050){$1051=$1052*$969;HEAPF32[$1032>>2]=$1051}$1053=$b$116$i+1|0;$1054=HEAP32[$845>>2]|0;$1055=($1053|0)<($1054|0);if($1055){$b$116$i=$1053;$j$217$i=$j$3$lcssa$i}else{$$lcssa228=$1053;break}}$954=($$lcssa228|0)<64;if($954){$b$23$i$ph=$$lcssa228;label=185}}else{$b$23$i$ph=0;label=185}if((label|0)==185){label=0;$scevgep162=($eb+($chn$2120<<8)|0)+($b$23$i$ph<<2)|0;$955=$b$23$i$ph<<2;$956=256-$955|0;_memset($scevgep162|0,0,$956|0)|0;$scevgep165=($thr+($chn$2120<<8)|0)+($b$23$i$ph<<2)|0;_memset($scevgep165|0,0,$956|0)|0}}else{if($801){$807=HEAP32[$0>>2]|0;$808=$807+4308|0;$809=HEAP32[$808>>2]|0;$810=($809|0)>0;if($810){$b$01$i=0;while(1){$811=(($gfc+23612|0)+($chn$2120<<8)|0)+($b$01$i<<2)|0;$812=HEAP32[$811>>2]|0;$813=(($gfc+24636|0)+($chn$2120<<8)|0)+($b$01$i<<2)|0;HEAP32[$813>>2]=$812;$814=$b$01$i+1|0;$exitcond$i18=($814|0)==($809|0);if($exitcond$i18){break}else{$b$01$i=$814}}}}}$1056=$chn$2120+1|0;$exitcond167=($1056|0)==($417|0);if($exitcond167){break}else{$chn$2120=$1056}}}$1057=HEAP32[$17>>2]|0;$$not=($1057|0)!=1;$brmerge=$$not|$$not203;if(!$brmerge){$1058=HEAP32[$772>>2]|0;$1059=$1058+468|0;$1060=+HEAPF32[$7>>2];$1061=HEAP32[$773>>2]|0;_vbrpsy_compute_MS_thresholds($eb,$thr,$771,$1059,$743,$1060,$1061)}if($418){$chn$3127=0;while(1){$1062=$chn$3127&1;$1063=$uselongblock+($1062<<2)|0;$1064=HEAP32[$1063>>2]|0;$1065=($1064|0)==0;$or$cond3=$774|$1065;if($or$cond3){$1066=$eb+($chn$3127<<8)|0;$1067=$thr+($chn$3127<<8)|0;$1068=HEAP32[$0>>2]|0;$1069=$1068+2160|0;_convert_partition2scalefac($1069,$1066,$1067,$mask_idx_s$i,$thm$i);$1070=HEAP32[$mask_idx_s$i>>2]|0;$1071=((($gfc+26636|0)+($chn$3127*244|0)|0)+88|0)+($sblock$0130<<2)|0;HEAP32[$1071>>2]=$1070;$1072=HEAP32[$thm$i>>2]|0;$1073=((($gfc+25660|0)+($chn$3127*244|0)|0)+88|0)+($sblock$0130<<2)|0;HEAP32[$1073>>2]=$1072;$1074=HEAP32[$775>>2]|0;$1075=((($gfc+26636|0)+($chn$3127*244|0)|0)+100|0)+($sblock$0130<<2)|0;HEAP32[$1075>>2]=$1074;$1076=HEAP32[$776>>2]|0;$1077=((($gfc+25660|0)+($chn$3127*244|0)|0)+100|0)+($sblock$0130<<2)|0;HEAP32[$1077>>2]=$1076;$1078=HEAP32[$777>>2]|0;$1079=((($gfc+26636|0)+($chn$3127*244|0)|0)+112|0)+($sblock$0130<<2)|0;HEAP32[$1079>>2]=$1078;$1080=HEAP32[$778>>2]|0;$1081=((($gfc+25660|0)+($chn$3127*244|0)|0)+112|0)+($sblock$0130<<2)|0;HEAP32[$1081>>2]=$1080;$1082=HEAP32[$779>>2]|0;$1083=((($gfc+26636|0)+($chn$3127*244|0)|0)+124|0)+($sblock$0130<<2)|0;HEAP32[$1083>>2]=$1082;$1084=HEAP32[$780>>2]|0;$1085=((($gfc+25660|0)+($chn$3127*244|0)|0)+124|0)+($sblock$0130<<2)|0;HEAP32[$1085>>2]=$1084;$1086=HEAP32[$781>>2]|0;$1087=((($gfc+26636|0)+($chn$3127*244|0)|0)+136|0)+($sblock$0130<<2)|0;HEAP32[$1087>>2]=$1086;$1088=HEAP32[$782>>2]|0;$1089=((($gfc+25660|0)+($chn$3127*244|0)|0)+136|0)+($sblock$0130<<2)|0;HEAP32[$1089>>2]=$1088;$1090=HEAP32[$783>>2]|0;$1091=((($gfc+26636|0)+($chn$3127*244|0)|0)+148|0)+($sblock$0130<<2)|0;HEAP32[$1091>>2]=$1090;$1092=HEAP32[$784>>2]|0;$1093=((($gfc+25660|0)+($chn$3127*244|0)|0)+148|0)+($sblock$0130<<2)|0;HEAP32[$1093>>2]=$1092;$1094=HEAP32[$785>>2]|0;$1095=((($gfc+26636|0)+($chn$3127*244|0)|0)+160|0)+($sblock$0130<<2)|0;HEAP32[$1095>>2]=$1094;$1096=HEAP32[$786>>2]|0;$1097=((($gfc+25660|0)+($chn$3127*244|0)|0)+160|0)+($sblock$0130<<2)|0;HEAP32[$1097>>2]=$1096;$1098=HEAP32[$787>>2]|0;$1099=((($gfc+26636|0)+($chn$3127*244|0)|0)+172|0)+($sblock$0130<<2)|0;HEAP32[$1099>>2]=$1098;$1100=HEAP32[$788>>2]|0;$1101=((($gfc+25660|0)+($chn$3127*244|0)|0)+172|0)+($sblock$0130<<2)|0;HEAP32[$1101>>2]=$1100;$1102=HEAP32[$789>>2]|0;$1103=((($gfc+26636|0)+($chn$3127*244|0)|0)+184|0)+($sblock$0130<<2)|0;HEAP32[$1103>>2]=$1102;$1104=HEAP32[$790>>2]|0;$1105=((($gfc+25660|0)+($chn$3127*244|0)|0)+184|0)+($sblock$0130<<2)|0;HEAP32[$1105>>2]=$1104;$1106=HEAP32[$791>>2]|0;$1107=((($gfc+26636|0)+($chn$3127*244|0)|0)+196|0)+($sblock$0130<<2)|0;HEAP32[$1107>>2]=$1106;$1108=HEAP32[$792>>2]|0;$1109=((($gfc+25660|0)+($chn$3127*244|0)|0)+196|0)+($sblock$0130<<2)|0;HEAP32[$1109>>2]=$1108;$1110=HEAP32[$793>>2]|0;$1111=((($gfc+26636|0)+($chn$3127*244|0)|0)+208|0)+($sblock$0130<<2)|0;HEAP32[$1111>>2]=$1110;$1112=HEAP32[$794>>2]|0;$1113=((($gfc+25660|0)+($chn$3127*244|0)|0)+208|0)+($sblock$0130<<2)|0;HEAP32[$1113>>2]=$1112;$1114=HEAP32[$795>>2]|0;$1115=((($gfc+26636|0)+($chn$3127*244|0)|0)+220|0)+($sblock$0130<<2)|0;HEAP32[$1115>>2]=$1114;$1116=HEAP32[$796>>2]|0;$1117=((($gfc+25660|0)+($chn$3127*244|0)|0)+220|0)+($sblock$0130<<2)|0;HEAP32[$1117>>2]=$1116;$1118=HEAP32[$797>>2]|0;$1119=((($gfc+26636|0)+($chn$3127*244|0)|0)+232|0)+($sblock$0130<<2)|0;HEAP32[$1119>>2]=$1118;$1120=HEAP32[$798>>2]|0;$1121=((($gfc+25660|0)+($chn$3127*244|0)|0)+232|0)+($sblock$0130<<2)|0;HEAP32[$1121>>2]=$1120}$1122=$chn$3127+1|0;$exitcond168=($1122|0)==($417|0);if($exitcond168){break}else{$chn$3127=$1122}}}$1123=$sblock$0130+1|0;$exitcond169=($1123|0)==3;if($exitcond169){break}else{$sblock$0130=$1123}}if($418){$chn$4119=0;while(1){$1124=($gfc+27780|0)+($chn$4119<<2)|0;$sb$0118=0;while(1){$scevgep=((($gfc+25660|0)+($chn$4119*244|0)|0)+88|0)+($sb$0118*12|0)|0;$1125=((($last_thm+($chn$4119*244|0)|0)+88|0)+($sb$0118*12|0)|0)+8|0;$1126=((($last_thm+($chn$4119*244|0)|0)+88|0)+($sb$0118*12|0)|0)+4|0;$sblock$1116=0;while(1){$1128=(((($gfc+25660|0)+($chn$4119*244|0)|0)+88|0)+($sb$0118*12|0)|0)+($sblock$1116<<2)|0;$1129=+HEAPF32[$1128>>2];$1130=$1129;$1131=$1130*0.80000000000000004;$1132=$1131;$1133=($sblock$1116|0)>0;$1134=$sblock$1116+-1|0;$1135=$new_thmm+($1134<<2)|0;$prev_thm$0$in=$1133?$1135:$1125;$prev_thm$0=+HEAPF32[$prev_thm$0$in>>2];$1136=($ns_attacks+($chn$4119<<4)|0)+($sblock$1116<<2)|0;$1137=HEAP32[$1136>>2]|0;$1138=($1137|0)>1;if($1138){label=223}else{$1139=$sblock$1116+1|0;$1140=($ns_attacks+($chn$4119<<4)|0)+($1139<<2)|0;$1141=HEAP32[$1140>>2]|0;$1142=($1141|0)==1;if($1142){label=223}else{$t1$0=$1132}}if((label|0)==223){label=0;$1143=$1132>0.0;if($1143){$1144=$prev_thm$0/$1132;$1145=+Math_pow(+$1144,0.36000001430511475);$1146=$1145*$1132;$t1$0=$1146}else{$t1$0=0.0}}$1147=$t1$0<$1132;$1148=$1147?$t1$0:$1132;$1149=($1137|0)==1;L341:do{if($1149){$1150=$1148>0.0;if($1150){$1151=$prev_thm$0/$1148;$1152=+Math_pow(+$1151,0.18000000715255737);$1153=$1152*$1148;$t2$0=$1153}else{$t2$0=0.0}}else{$1154=($sblock$1116|0)==0;if($1154){$1155=HEAP32[$1124>>2]|0;$1156=($1155|0)==3;if($1156){label=233}else{label=230}}else{label=230}do{if((label|0)==230){label=0;if(!$1133){$t2$0=$1132;break L341}$1157=($ns_attacks+($chn$4119<<4)|0)+($1134<<2)|0;$1158=HEAP32[$1157>>2]|0;$1159=($1158|0)==3;if(!$1159){$t2$0=$1132;break L341}if(($sblock$1116|0)==0){label=233;break}else if(($sblock$1116|0)==1){$1161=+HEAPF32[$1125>>2];$prev_thm$1=$1161;break}else if(($sblock$1116|0)==2){$1162=+HEAPF32[$new_thmm>>2];$prev_thm$1=$1162;break}else{$prev_thm$1=$prev_thm$0;break}}}while(0);if((label|0)==233){label=0;$1160=+HEAPF32[$1126>>2];$prev_thm$1=$1160}$1163=$1148>0.0;if(!$1163){$t2$0=0.0;break}$1164=$prev_thm$1/$1148;$1165=+Math_pow(+$1164,0.18000000715255737);$1166=$1165*$1148;$t2$0=$1166}}while(0);$1167=$t2$0<$1148;$1168=$1167?$t2$0:$1148;$1169=($sub_short_factor+($chn$4119*12|0)|0)+($sblock$1116<<2)|0;$1170=+HEAPF32[$1169>>2];$1171=$1168*$1170;$1172=$new_thmm+($sblock$1116<<2)|0;HEAPF32[$1172>>2]=$1171;$1173=$sblock$1116+1|0;$exitcond151=($1173|0)==3;if($exitcond151){break}else{$sblock$1116=$1173}}HEAP32[$scevgep>>2]=HEAP32[$new_thmm>>2]|0;HEAP32[$scevgep+4>>2]=HEAP32[$new_thmm+4>>2]|0;HEAP32[$scevgep+8>>2]=HEAP32[$new_thmm+8>>2]|0;$1127=$sb$0118+1|0;$exitcond155=($1127|0)==13;if($exitcond155){break}else{$sb$0118=$1127}}$1174=$chn$4119+1|0;$exitcond156=($1174|0)==($417|0);if($exitcond156){break}else{$chn$4119=$1174}}if($418){$chn$5114=0;while(1){$1175=($ns_attacks+($chn$5114<<4)|0)+8|0;$1176=HEAP32[$1175>>2]|0;$1177=($gfc+27780|0)+($chn$5114<<2)|0;HEAP32[$1177>>2]=$1176;$1178=$chn$5114+1|0;$exitcond150=($1178|0)==($417|0);if($exitcond150){break}else{$chn$5114=$1178}}}}$1179=HEAP32[$25>>2]|0;$1180=($1179|0)>0;if($1180){$chn$01$i65=0;while(1){$1181=$uselongblock+($chn$01$i65<<2)|0;$1182=HEAP32[$1181>>2]|0;$1183=($1182|0)==0;$1184=($gfc+27796|0)+($chn$01$i65<<2)|0;$1185=HEAP32[$1184>>2]|0;do{if($1183){if(($1185|0)==0){HEAP32[$1184>>2]=1;$1188=1;$blocktype$0$i=2;break}else if(($1185|0)==3){HEAP32[$1184>>2]=2;$1188=2;$blocktype$0$i=2;break}else{$1188=$1185;$blocktype$0$i=2;break}}else{$1186=($1185|0)==2;$$$i67=$1186?3:0;$1188=$1185;$blocktype$0$i=$$$i67}}while(0);$1187=$blocktype_d+($chn$01$i65<<2)|0;HEAP32[$1187>>2]=$1188;HEAP32[$1184>>2]=$blocktype$0$i;$1189=$chn$01$i65+1|0;$exitcond$i68=($1189|0)==($1179|0);if($exitcond$i68){break}else{$chn$01$i65=$1189}}}if(!$418){STACKTOP=sp;return 0}$1190=$percep_MS_entropy+-8|0;$1191=$blocktype_d+4|0;$1193=($1192|0)==(0|0);$chn$6112=0;while(1){$1194=($chn$6112|0)>1;if($1194){$1195=HEAP32[$blocktype_d>>2]|0;$1196=($1195|0)==2;if($1196){label=253}else{$1197=HEAP32[$1191>>2]|0;$1198=($1197|0)==2;if($1198){label=253}else{$type$0=0}}if((label|0)==253){label=0;$type$0=2}$1199=$chn$6112+-2|0;$1200=($masking_MS_ratio+($gr_out*976|0)|0)+($1199*488|0)|0;$mr$0=$1200;$ppe$0=$1190;$type$1=$type$0}else{$1201=$blocktype_d+($chn$6112<<2)|0;$1202=HEAP32[$1201>>2]|0;$1203=($masking_ratio+($gr_out*976|0)|0)+($chn$6112*488|0)|0;$mr$0=$1203;$ppe$0=$percep_entropy;$type$1=$1202}$1204=($type$1|0)==2;$1205=+HEAPF32[$800>>2];if($1204){$pe_s$04$i=309.07000732421875;$sb$03$i=0;while(1){$1206=11584+($sb$03$i<<2)|0;$1207=($mr$0+88|0)+($sb$03$i*12|0)|0;$1208=+HEAPF32[$1207>>2];$1209=$1208>0.0;do{if($1209){$1210=$1208*$1205;$1211=($mr$0+332|0)+($sb$03$i*12|0)|0;$1212=+HEAPF32[$1211>>2];$1213=$1212>$1210;if(!$1213){$pe_s$2$i=$pe_s$04$i;break}$1214=$1210*1.0E+10;$1215=$1212>$1214;$1216=+HEAPF32[$1206>>2];$1217=$1216;if($1215){$1218=$1217*23.025850929940461;$1219=$pe_s$04$i;$1220=$1218+$1219;$1221=$1220;$pe_s$2$i=$1221;break}else{$1222=$1212/$1210;$1223=+_fast_log2($1222);$1224=$1223;$1225=$1217*0.30102999566398114;$1226=$1225*$1224;$1227=$pe_s$04$i;$1228=$1226+$1227;$1229=$1228;$pe_s$2$i=$1229;break}}else{$pe_s$2$i=$pe_s$04$i}}while(0);$1230=(($mr$0+88|0)+($sb$03$i*12|0)|0)+4|0;$1231=+HEAPF32[$1230>>2];$1232=$1231>0.0;do{if($1232){$1233=$1231*$1205;$1234=(($mr$0+332|0)+($sb$03$i*12|0)|0)+4|0;$1235=+HEAPF32[$1234>>2];$1236=$1235>$1233;if(!$1236){$pe_s$2$1$i=$pe_s$2$i;break}$1237=$1233*1.0E+10;$1238=$1235>$1237;$1239=+HEAPF32[$1206>>2];$1240=$1239;if($1238){$1249=$1240*23.025850929940461;$1250=$pe_s$2$i;$1251=$1249+$1250;$1252=$1251;$pe_s$2$1$i=$1252;break}else{$1241=$1235/$1233;$1242=+_fast_log2($1241);$1243=$1242;$1244=$1240*0.30102999566398114;$1245=$1244*$1243;$1246=$pe_s$2$i;$1247=$1245+$1246;$1248=$1247;$pe_s$2$1$i=$1248;break}}else{$pe_s$2$1$i=$pe_s$2$i}}while(0);$1253=(($mr$0+88|0)+($sb$03$i*12|0)|0)+8|0;$1254=+HEAPF32[$1253>>2];$1255=$1254>0.0;do{if($1255){$1256=$1254*$1205;$1257=(($mr$0+332|0)+($sb$03$i*12|0)|0)+8|0;$1258=+HEAPF32[$1257>>2];$1259=$1258>$1256;if(!$1259){$pe_s$2$2$i=$pe_s$2$1$i;break}$1260=$1256*1.0E+10;$1261=$1258>$1260;$1262=+HEAPF32[$1206>>2];$1263=$1262;if($1261){$1272=$1263*23.025850929940461;$1273=$pe_s$2$1$i;$1274=$1272+$1273;$1275=$1274;$pe_s$2$2$i=$1275;break}else{$1264=$1258/$1256;$1265=+_fast_log2($1264);$1266=$1265;$1267=$1263*0.30102999566398114;$1268=$1267*$1266;$1269=$pe_s$2$1$i;$1270=$1268+$1269;$1271=$1270;$pe_s$2$2$i=$1271;break}}else{$pe_s$2$2$i=$pe_s$2$1$i}}while(0);$1276=$sb$03$i+1|0;$exitcond$i11=($1276|0)==12;if($exitcond$i11){$pe_s$2$2$i$lcssa=$pe_s$2$2$i;break}else{$pe_s$04$i=$pe_s$2$2$i;$sb$03$i=$1276}}$1277=$ppe$0+($chn$6112<<2)|0;HEAPF32[$1277>>2]=$pe_s$2$2$i$lcssa;$1305=$pe_s$2$2$i$lcssa}else{$pe_l$02$i=281.0574951171875;$sb$01$i=0;while(1){$1278=$mr$0+($sb$01$i<<2)|0;$1279=+HEAPF32[$1278>>2];$1280=$1279>0.0;do{if($1280){$1281=$1279*$1205;$1282=($mr$0+244|0)+($sb$01$i<<2)|0;$1283=+HEAPF32[$1282>>2];$1284=$1283>$1281;if(!$1284){$pe_l$1$i=$pe_l$02$i;break}$1285=$1281*1.0E+10;$1286=$1283>$1285;$1287=11632+($sb$01$i<<2)|0;$1288=+HEAPF32[$1287>>2];$1289=$1288;if($1286){$1290=$1289*23.025850929940461;$1291=$pe_l$02$i;$1292=$1290+$1291;$1293=$1292;$pe_l$1$i=$1293;break}else{$1294=$1283/$1281;$1295=+_fast_log2($1294);$1296=$1295;$1297=$1289*0.30102999566398114;$1298=$1297*$1296;$1299=$pe_l$02$i;$1300=$1298+$1299;$1301=$1300;$pe_l$1$i=$1301;break}}else{$pe_l$1$i=$pe_l$02$i}}while(0);$1302=$sb$01$i+1|0;$exitcond$i7=($1302|0)==21;if($exitcond$i7){$pe_l$1$i$lcssa=$pe_l$1$i;break}else{$pe_l$02$i=$pe_l$1$i;$sb$01$i=$1302}}$1303=$ppe$0+($chn$6112<<2)|0;HEAPF32[$1303>>2]=$pe_l$1$i$lcssa;$1305=$pe_l$1$i$lcssa}if(!$1193){$1304=$1305;$1306=(($1192+189240|0)+($gr_out<<5)|0)+($chn$6112<<3)|0;HEAPF64[$1306>>3]=$1304}$1307=$chn$6112+1|0;$exitcond=($1307|0)==($417|0);if($exitcond){break}else{$chn$6112=$1307}}STACKTOP=sp;return 0}function _psymodel_init($gfp){$gfp=$gfp|0;var $$=0.0,$$0=0,$$lcssa=0,$$lcssa133=0.0,$$lcssa20=0,$$pre=0,$$pre109=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0;var $11=0,$110=0.0,$111=0,$112=0.0,$113=0,$114=0,$115=0.0,$116=0.0,$117=0.0,$118=0,$119=0,$12=0,$120=0.0,$121=0.0,$122=0.0,$123=0.0,$124=0.0,$125=0,$126=0.0,$127=0.0;var $128=0.0,$129=0.0,$13=0,$130=0.0,$131=0.0,$132=0.0,$133=0.0,$134=0.0,$135=0.0,$136=0.0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0;var $146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0.0,$153=0,$154=0,$155=0,$156=0,$157=0.0,$158=0.0,$159=0.0,$16=0,$160=0.0,$161=0.0,$162=0.0,$163=0.0;var $164=0.0,$165=0.0,$166=0.0,$167=0.0,$168=0.0,$169=0,$17=0,$170=0.0,$171=0.0,$172=0.0,$173=0,$174=0,$175=0,$176=0,$177=0.0,$178=0,$179=0,$18=0,$180=0,$181=0.0;var $182=0.0,$183=0.0,$184=0.0,$185=0.0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0.0,$191=0.0,$192=0.0,$193=0,$194=0.0,$195=0.0,$196=0,$197=0,$198=0,$199=0,$2=0;var $20=0,$200=0,$201=0,$202=0,$203=0,$204=0.0,$205=0,$206=0.0,$207=0,$208=0,$209=0.0,$21=0,$210=0.0,$211=0.0,$212=0,$213=0,$214=0.0,$215=0.0,$216=0.0,$217=0.0;var $218=0.0,$219=0,$22=0,$220=0.0,$221=0.0,$222=0.0,$223=0.0,$224=0.0,$225=0.0,$226=0.0,$227=0.0,$228=0.0,$229=0.0,$23=0,$230=0.0,$231=0,$232=0,$233=0,$234=0,$235=0;var $236=0.0,$237=0,$238=0,$239=0.0,$24=0,$240=0,$241=0.0,$242=0.0,$243=0.0,$244=0.0,$245=0.0,$246=0.0,$247=0.0,$248=0.0,$249=0.0,$25=0,$250=0,$251=0,$252=0,$253=0;var $254=0.0,$255=0.0,$256=0.0,$257=0.0,$258=0.0,$259=0.0,$26=0,$260=0.0,$261=0.0,$262=0.0,$263=0.0,$264=0.0,$265=0.0,$266=0,$267=0.0,$268=0.0,$269=0.0,$27=0,$270=0,$271=0;var $272=0,$273=0,$274=0.0,$275=0,$276=0,$277=0.0,$278=0.0,$279=0.0,$28=0,$280=0.0,$281=0,$282=0.0,$283=0.0,$284=0.0,$285=0.0,$286=0.0,$287=0,$288=0.0,$289=0.0,$29=0;var $290=0.0,$291=0.0,$292=0.0,$293=0,$294=0,$295=0,$296=0,$297=0.0,$298=0.0,$299=0.0,$3=0,$30=0,$300=0,$301=0.0,$302=0.0,$303=0,$304=0,$305=0,$306=0,$307=0;var $308=0,$309=0,$31=0,$310=0,$311=0.0,$312=0.0,$313=0.0,$314=0.0,$315=0,$316=0,$317=0,$318=0,$319=0,$32=0,$320=0.0,$321=0,$322=0,$323=0,$324=0,$325=0;var $326=0,$327=0,$328=0,$329=0,$33=0,$330=0,$331=0,$332=0.0,$333=0.0,$334=0.0,$335=0.0,$336=0.0,$337=0.0,$338=0,$339=0,$34=0,$340=0,$341=0,$342=0,$343=0;var $344=0,$345=0,$346=0,$347=0.0,$348=0.0,$349=0.0,$35=0,$350=0.0,$351=0.0,$352=0.0,$353=0.0,$354=0.0,$355=0.0,$356=0,$357=0,$358=0.0,$359=0,$36=0,$360=0.0,$361=0;var $362=0,$363=0,$364=0.0,$365=0,$366=0.0,$367=0,$368=0,$369=0,$37=0,$370=0,$371=0,$372=0,$373=0,$374=0,$375=0,$376=0,$377=0,$378=0.0,$379=0.0,$38=0;var $380=0,$381=0,$382=0,$383=0.0,$384=0,$385=0.0,$386=0,$387=0,$388=0.0,$389=0.0,$39=0,$390=0.0,$391=0.0,$392=0,$393=0.0,$394=0,$395=0,$396=0.0,$397=0.0,$398=0.0;var $399=0.0,$4=0,$40=0,$400=0,$401=0,$402=0,$403=0,$404=0,$405=0,$406=0.0,$407=0,$408=0,$409=0,$41=0,$410=0,$411=0.0,$412=0.0,$413=0.0,$414=0.0,$415=0;var $416=0,$417=0,$418=0,$419=0,$42=0,$420=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0.0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0;var $56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0.0,$70=0,$71=0,$72=0,$73=0;var $74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0.0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0;var $92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$b$051=0,$b$3$lcssa110=0,$b$329=0,$b$427=0,$b$5$lcssa111=0,$b$525=0,$b$624=0,$bval=0,$bval_width=0,$eql_balance$049=0.0,$exitcond=0,$exitcond$i=0;var $exitcond$i4=0,$exitcond101=0,$exitcond102=0,$exitcond106=0,$exitcond108=0,$exitcond97=0,$freq5$048=0.0,$i$089=0,$i$180=0,$i$278=0,$i$365=0,$i$450=0,$j$01$i=0,$j$01$i3=0,$j$084=0,$j$187=0,$j$377=0,$j$4$lcssa=0,$j$471=0,$j$564=0;var $j$6$lcssa=0,$j$657=0,$k$02$i=0,$k$02$i2=0,$k$069=0,$k$155=0,$msfix$0=0.0,$norm=0,$phitmp=0.0,$sk_s$0=0.0,$snr2$0=0.0,$x$0$lcssa=0.0,$x$070=0.0,$x$1=0.0,$x$2=0.0,$x$3=0.0,$x$3$op=0.0,$x$3$op$op=0.0,$x1$0$lcssa=0.0,$x1$056=0.0;var $x1$1=0.0,$x1$2=0.0,$x1$3=0.0,$x1$4=0.0,$x1$5=0.0,$x1$5$op=0.0,$x1$5$op$op=0.0,$x6$0=0.0,$y$0=0.0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+768|0;$bval=sp+512|0;$bval_width=sp+256|0;$norm=sp;$0=$gfp+288|0;$1=HEAP32[$0>>2]|0;$2=$1+16|0;$3=$1+64|0;$4=HEAP32[$3>>2]|0;$5=+($4|0);$6=$1+280|0;$7=+HEAPF32[$6>>2];$8=-$7;$9=$1+85800|0;$10=HEAP32[$9>>2]|0;$11=($10|0)==(0|0);if(!$11){$$0=0;STACKTOP=sp;return $$0|0}_memset($norm|0,0,256)|0;$12=_calloc(1,6504)|0;HEAP32[$9>>2]=$12;$13=$gfp+144|0;$14=HEAP32[$13>>2]|0;$15=$12+6500|0;HEAP32[$15>>2]=$14;$16=$1+27800|0;HEAP32[$16>>2]=0;$17=$1+27796|0;HEAP32[$17>>2]=0;$i$089=0;while(1){$j$084=0;while(1){$63=(($1+21564|0)+($i$089<<8)|0)+($j$084<<2)|0;HEAPF32[$63>>2]=1.0000000200408773E+20;$64=(($1+22588|0)+($i$089<<8)|0)+($j$084<<2)|0;HEAPF32[$64>>2]=1.0000000200408773E+20;$65=(($1+24636|0)+($i$089<<8)|0)+($j$084<<2)|0;HEAPF32[$65>>2]=1.0;$66=(($1+23612|0)+($i$089<<8)|0)+($j$084<<2)|0;HEAPF32[$66>>2]=1.0;$67=$j$084+1|0;$exitcond102=($67|0)==64;if($exitcond102){break}else{$j$084=$67}}$18=($1+26636|0)+($i$089*244|0)|0;HEAPF32[$18>>2]=1.0000000200408773E+20;$19=($1+25660|0)+($i$089*244|0)|0;HEAPF32[$19>>2]=1.0000000200408773E+20;$20=(($1+26636|0)+($i$089*244|0)|0)+4|0;HEAPF32[$20>>2]=1.0000000200408773E+20;$21=(($1+25660|0)+($i$089*244|0)|0)+4|0;HEAPF32[$21>>2]=1.0000000200408773E+20;$22=(($1+26636|0)+($i$089*244|0)|0)+8|0;HEAPF32[$22>>2]=1.0000000200408773E+20;$23=(($1+25660|0)+($i$089*244|0)|0)+8|0;HEAPF32[$23>>2]=1.0000000200408773E+20;$24=(($1+26636|0)+($i$089*244|0)|0)+12|0;HEAPF32[$24>>2]=1.0000000200408773E+20;$25=(($1+25660|0)+($i$089*244|0)|0)+12|0;HEAPF32[$25>>2]=1.0000000200408773E+20;$26=(($1+26636|0)+($i$089*244|0)|0)+16|0;HEAPF32[$26>>2]=1.0000000200408773E+20;$27=(($1+25660|0)+($i$089*244|0)|0)+16|0;HEAPF32[$27>>2]=1.0000000200408773E+20;$28=(($1+26636|0)+($i$089*244|0)|0)+20|0;HEAPF32[$28>>2]=1.0000000200408773E+20;$29=(($1+25660|0)+($i$089*244|0)|0)+20|0;HEAPF32[$29>>2]=1.0000000200408773E+20;$30=(($1+26636|0)+($i$089*244|0)|0)+24|0;HEAPF32[$30>>2]=1.0000000200408773E+20;$31=(($1+25660|0)+($i$089*244|0)|0)+24|0;HEAPF32[$31>>2]=1.0000000200408773E+20;$32=(($1+26636|0)+($i$089*244|0)|0)+28|0;HEAPF32[$32>>2]=1.0000000200408773E+20;$33=(($1+25660|0)+($i$089*244|0)|0)+28|0;HEAPF32[$33>>2]=1.0000000200408773E+20;$34=(($1+26636|0)+($i$089*244|0)|0)+32|0;HEAPF32[$34>>2]=1.0000000200408773E+20;$35=(($1+25660|0)+($i$089*244|0)|0)+32|0;HEAPF32[$35>>2]=1.0000000200408773E+20;$36=(($1+26636|0)+($i$089*244|0)|0)+36|0;HEAPF32[$36>>2]=1.0000000200408773E+20;$37=(($1+25660|0)+($i$089*244|0)|0)+36|0;HEAPF32[$37>>2]=1.0000000200408773E+20;$38=(($1+26636|0)+($i$089*244|0)|0)+40|0;HEAPF32[$38>>2]=1.0000000200408773E+20;$39=(($1+25660|0)+($i$089*244|0)|0)+40|0;HEAPF32[$39>>2]=1.0000000200408773E+20;$40=(($1+26636|0)+($i$089*244|0)|0)+44|0;HEAPF32[$40>>2]=1.0000000200408773E+20;$41=(($1+25660|0)+($i$089*244|0)|0)+44|0;HEAPF32[$41>>2]=1.0000000200408773E+20;$42=(($1+26636|0)+($i$089*244|0)|0)+48|0;HEAPF32[$42>>2]=1.0000000200408773E+20;$43=(($1+25660|0)+($i$089*244|0)|0)+48|0;HEAPF32[$43>>2]=1.0000000200408773E+20;$44=(($1+26636|0)+($i$089*244|0)|0)+52|0;HEAPF32[$44>>2]=1.0000000200408773E+20;$45=(($1+25660|0)+($i$089*244|0)|0)+52|0;HEAPF32[$45>>2]=1.0000000200408773E+20;$46=(($1+26636|0)+($i$089*244|0)|0)+56|0;HEAPF32[$46>>2]=1.0000000200408773E+20;$47=(($1+25660|0)+($i$089*244|0)|0)+56|0;HEAPF32[$47>>2]=1.0000000200408773E+20;$48=(($1+26636|0)+($i$089*244|0)|0)+60|0;HEAPF32[$48>>2]=1.0000000200408773E+20;$49=(($1+25660|0)+($i$089*244|0)|0)+60|0;HEAPF32[$49>>2]=1.0000000200408773E+20;$50=(($1+26636|0)+($i$089*244|0)|0)+64|0;HEAPF32[$50>>2]=1.0000000200408773E+20;$51=(($1+25660|0)+($i$089*244|0)|0)+64|0;HEAPF32[$51>>2]=1.0000000200408773E+20;$52=(($1+26636|0)+($i$089*244|0)|0)+68|0;HEAPF32[$52>>2]=1.0000000200408773E+20;$53=(($1+25660|0)+($i$089*244|0)|0)+68|0;HEAPF32[$53>>2]=1.0000000200408773E+20;$54=(($1+26636|0)+($i$089*244|0)|0)+72|0;HEAPF32[$54>>2]=1.0000000200408773E+20;$55=(($1+25660|0)+($i$089*244|0)|0)+72|0;HEAPF32[$55>>2]=1.0000000200408773E+20;$56=(($1+26636|0)+($i$089*244|0)|0)+76|0;HEAPF32[$56>>2]=1.0000000200408773E+20;$57=(($1+25660|0)+($i$089*244|0)|0)+76|0;HEAPF32[$57>>2]=1.0000000200408773E+20;$58=(($1+26636|0)+($i$089*244|0)|0)+80|0;HEAPF32[$58>>2]=1.0000000200408773E+20;$59=(($1+25660|0)+($i$089*244|0)|0)+80|0;HEAPF32[$59>>2]=1.0000000200408773E+20;$60=(($1+26636|0)+($i$089*244|0)|0)+84|0;HEAPF32[$60>>2]=1.0000000200408773E+20;$61=(($1+25660|0)+($i$089*244|0)|0)+84|0;HEAPF32[$61>>2]=1.0000000200408773E+20;$62=($1+27780|0)+($i$089<<2)|0;$j$187=0;while(1){$78=((($1+26636|0)+($i$089*244|0)|0)+88|0)+($j$187<<2)|0;HEAPF32[$78>>2]=1.0000000200408773E+20;$79=((($1+25660|0)+($i$089*244|0)|0)+88|0)+($j$187<<2)|0;HEAPF32[$79>>2]=1.0000000200408773E+20;$80=((($1+26636|0)+($i$089*244|0)|0)+100|0)+($j$187<<2)|0;HEAPF32[$80>>2]=1.0000000200408773E+20;$81=((($1+25660|0)+($i$089*244|0)|0)+100|0)+($j$187<<2)|0;HEAPF32[$81>>2]=1.0000000200408773E+20;$82=((($1+26636|0)+($i$089*244|0)|0)+112|0)+($j$187<<2)|0;HEAPF32[$82>>2]=1.0000000200408773E+20;$83=((($1+25660|0)+($i$089*244|0)|0)+112|0)+($j$187<<2)|0;HEAPF32[$83>>2]=1.0000000200408773E+20;$84=((($1+26636|0)+($i$089*244|0)|0)+124|0)+($j$187<<2)|0;HEAPF32[$84>>2]=1.0000000200408773E+20;$85=((($1+25660|0)+($i$089*244|0)|0)+124|0)+($j$187<<2)|0;HEAPF32[$85>>2]=1.0000000200408773E+20;$86=((($1+26636|0)+($i$089*244|0)|0)+136|0)+($j$187<<2)|0;HEAPF32[$86>>2]=1.0000000200408773E+20;$87=((($1+25660|0)+($i$089*244|0)|0)+136|0)+($j$187<<2)|0;HEAPF32[$87>>2]=1.0000000200408773E+20;$88=((($1+26636|0)+($i$089*244|0)|0)+148|0)+($j$187<<2)|0;HEAPF32[$88>>2]=1.0000000200408773E+20;$89=((($1+25660|0)+($i$089*244|0)|0)+148|0)+($j$187<<2)|0;HEAPF32[$89>>2]=1.0000000200408773E+20;$90=((($1+26636|0)+($i$089*244|0)|0)+160|0)+($j$187<<2)|0;HEAPF32[$90>>2]=1.0000000200408773E+20;$91=((($1+25660|0)+($i$089*244|0)|0)+160|0)+($j$187<<2)|0;HEAPF32[$91>>2]=1.0000000200408773E+20;$92=((($1+26636|0)+($i$089*244|0)|0)+172|0)+($j$187<<2)|0;HEAPF32[$92>>2]=1.0000000200408773E+20;$93=((($1+25660|0)+($i$089*244|0)|0)+172|0)+($j$187<<2)|0;HEAPF32[$93>>2]=1.0000000200408773E+20;$94=((($1+26636|0)+($i$089*244|0)|0)+184|0)+($j$187<<2)|0;HEAPF32[$94>>2]=1.0000000200408773E+20;$95=((($1+25660|0)+($i$089*244|0)|0)+184|0)+($j$187<<2)|0;HEAPF32[$95>>2]=1.0000000200408773E+20;$96=((($1+26636|0)+($i$089*244|0)|0)+196|0)+($j$187<<2)|0;HEAPF32[$96>>2]=1.0000000200408773E+20;$97=((($1+25660|0)+($i$089*244|0)|0)+196|0)+($j$187<<2)|0;HEAPF32[$97>>2]=1.0000000200408773E+20;$98=((($1+26636|0)+($i$089*244|0)|0)+208|0)+($j$187<<2)|0;HEAPF32[$98>>2]=1.0000000200408773E+20;$99=((($1+25660|0)+($i$089*244|0)|0)+208|0)+($j$187<<2)|0;HEAPF32[$99>>2]=1.0000000200408773E+20;$100=((($1+26636|0)+($i$089*244|0)|0)+220|0)+($j$187<<2)|0;HEAPF32[$100>>2]=1.0000000200408773E+20;$101=((($1+25660|0)+($i$089*244|0)|0)+220|0)+($j$187<<2)|0;HEAPF32[$101>>2]=1.0000000200408773E+20;$102=((($1+26636|0)+($i$089*244|0)|0)+232|0)+($j$187<<2)|0;HEAPF32[$102>>2]=1.0000000200408773E+20;$103=((($1+25660|0)+($i$089*244|0)|0)+232|0)+($j$187<<2)|0;HEAPF32[$103>>2]=1.0000000200408773E+20;HEAP32[$62>>2]=0;$104=$j$187+1|0;$exitcond106=($104|0)==3;if($exitcond106){break}else{$j$187=$104}}$68=($1+27636|0)+($i$089*36|0)|0;HEAPF32[$68>>2]=10.0;$69=(($1+27636|0)+($i$089*36|0)|0)+4|0;HEAPF32[$69>>2]=10.0;$70=(($1+27636|0)+($i$089*36|0)|0)+8|0;HEAPF32[$70>>2]=10.0;$71=(($1+27636|0)+($i$089*36|0)|0)+12|0;HEAPF32[$71>>2]=10.0;$72=(($1+27636|0)+($i$089*36|0)|0)+16|0;HEAPF32[$72>>2]=10.0;$73=(($1+27636|0)+($i$089*36|0)|0)+20|0;HEAPF32[$73>>2]=10.0;$74=(($1+27636|0)+($i$089*36|0)|0)+24|0;HEAPF32[$74>>2]=10.0;$75=(($1+27636|0)+($i$089*36|0)|0)+28|0;HEAPF32[$75>>2]=10.0;$76=(($1+27636|0)+($i$089*36|0)|0)+32|0;HEAPF32[$76>>2]=10.0;$77=$i$089+1|0;$exitcond108=($77|0)==4;if($exitcond108){break}else{$i$089=$77}}$105=$1+27616|0;HEAPF32[$105>>2]=0.0;$106=$1+27612|0;HEAPF32[$106>>2]=0.0;$107=$1+21360|0;_init_numline($12,$5,1024,576,22,$107);$108=$12+2148|0;$109=HEAP32[$108>>2]|0;$110=$5*9.765625E-4;$111=($109|0)>0;if($111){$112=$110;$j$01$i=0;$k$02$i=0;while(1){$113=($12+1716|0)+($k$02$i<<2)|0;$114=HEAP32[$113>>2]|0;$115=+($j$01$i|0);$116=$115*$110;$117=+_freq2bark($116);$118=$114+$j$01$i|0;$119=$118+-1|0;$120=+($119|0);$121=$120*$110;$122=+_freq2bark($121);$123=$122+$117;$124=$123*0.5;$125=$bval+($k$02$i<<2)|0;HEAPF32[$125>>2]=$124;$126=+($j$01$i|0);$127=$126+-0.5;$128=$127*$112;$129=$128;$130=+_freq2bark($129);$131=+($118|0);$132=$131+-0.5;$133=$132*$112;$134=$133;$135=+_freq2bark($134);$136=$135-$130;$137=$bval_width+($k$02$i<<2)|0;HEAPF32[$137>>2]=$136;$138=$k$02$i+1|0;$exitcond$i=($138|0)==($109|0);if($exitcond$i){break}else{$j$01$i=$118;$k$02$i=$138}}$$pre=HEAP32[$108>>2]|0;$139=($$pre|0)>0;if($139){$i$180=0;while(1){$140=$norm+($i$180<<2)|0;HEAPF32[$140>>2]=1.0;$141=$i$180+1|0;$142=($141|0)<($$pre|0);if($142){$i$180=$141}else{$145=$$pre;break}}}else{$145=$$pre}}else{$145=$109}$143=$12+2156|0;$144=$12+1204|0;$146=_init_s3_values($143,$144,$145,$bval,$bval_width,$norm)|0;$147=($146|0)==0;if(!$147){$$0=$146;STACKTOP=sp;return $$0|0}$148=HEAP32[$108>>2]|0;$149=($148|0)>0;if($149){$150=$12+1716|0;$151=$1+85796|0;$152=$8;$153=$12+256|0;$i$278=0;$j$377=0;while(1){$154=$150+($i$278<<2)|0;$155=HEAP32[$154>>2]|0;$156=($155|0)>0;if($156){$j$471=$j$377;$k$069=0;$x$070=9.9999999999999995E+36;while(1){$157=+($j$471|0);$158=$157*$5;$159=$158;$160=$159*9.7656250000000002E-7;$161=$160;$162=$161*1000.0;$163=+_ATHformula($2,$162);$164=$163+-20.0;$165=$164;$166=$165*0.10000000000000001;$167=+Math_pow(10.0,+$166);$168=$167;$169=HEAP32[$154>>2]|0;$170=+($169|0);$171=$170*$168;$172=$171;$173=$x$070>$172;$x$1=$173?$172:$x$070;$174=$k$069+1|0;$175=$j$471+1|0;$176=($174|0)<($169|0);if($176){$j$471=$175;$k$069=$174;$x$070=$x$1}else{$193=$169;$j$4$lcssa=$175;$x$0$lcssa=$x$1;break}}}else{$193=$155;$j$4$lcssa=$j$377;$x$0$lcssa=9.9999999999999995E+36}$177=$x$0$lcssa;$178=HEAP32[$151>>2]|0;$179=($178+212|0)+($i$278<<2)|0;HEAPF32[$179>>2]=$177;$180=$bval+($i$278<<2)|0;$181=+HEAPF32[$180>>2];$182=$181*0.10000000149011612;$183=$182;$184=$183+-1.0;$185=$184*20.0;$186=$185>6.0;$x$2=$186?30.0:$185;$187=$x$2<$152;$x$3=$187?$152:$x$2;$188=HEAP32[$3>>2]|0;$189=($188|0)<44000;$x$3$op=$x$3+-8.0;$x$3$op$op=$x$3$op*0.10000000000000001;$190=$189?2.2000000000000002:$x$3$op$op;$191=+Math_pow(10.0,+$190);$192=+($193|0);$194=$192*$191;$195=$194;$196=$153+($i$278<<2)|0;HEAPF32[$196>>2]=$195;$197=$i$278+1|0;$198=HEAP32[$108>>2]|0;$199=($197|0)<($198|0);if($199){$i$278=$197;$j$377=$j$4$lcssa}else{break}}}$200=$12+2160|0;$201=$1+21452|0;_init_numline($200,$5,256,192,13,$201);$202=$12+4308|0;$203=HEAP32[$202>>2]|0;$204=$5*0.00390625;$205=($203|0)>0;if($205){$206=$204;$j$01$i3=0;$k$02$i2=0;while(1){$207=($200+1716|0)+($k$02$i2<<2)|0;$208=HEAP32[$207>>2]|0;$209=+($j$01$i3|0);$210=$209*$204;$211=+_freq2bark($210);$212=$208+$j$01$i3|0;$213=$212+-1|0;$214=+($213|0);$215=$214*$204;$216=+_freq2bark($215);$217=$216+$211;$218=$217*0.5;$219=$bval+($k$02$i2<<2)|0;HEAPF32[$219>>2]=$218;$220=+($j$01$i3|0);$221=$220+-0.5;$222=$221*$206;$223=$222;$224=+_freq2bark($223);$225=+($212|0);$226=$225+-0.5;$227=$226*$206;$228=$227;$229=+_freq2bark($228);$230=$229-$224;$231=$bval_width+($k$02$i2<<2)|0;HEAPF32[$231>>2]=$230;$232=$k$02$i2+1|0;$exitcond$i4=($232|0)==($203|0);if($exitcond$i4){break}else{$j$01$i3=$212;$k$02$i2=$232}}$$pre109=HEAP32[$202>>2]|0;$233=($$pre109|0)>0;if($233){$234=$12+3876|0;$235=$1+85796|0;$236=$8;$237=$12+2416|0;$i$365=0;$j$564=0;while(1){$238=$bval+($i$365<<2)|0;$239=+HEAPF32[$238>>2];$240=!($239>=13.0);if($240){$snr2$0=-8.25}else{$241=$239+-13.0;$242=$241*0.40909090638160706;$243=24.0-$239;$244=$243*-0.75;$245=$244-$242;$246=$245;$snr2$0=$246}$247=$snr2$0*0.10000000000000001;$248=+Math_pow(10.0,+$247);$249=$248;$250=$norm+($i$365<<2)|0;HEAPF32[$250>>2]=$249;$251=$234+($i$365<<2)|0;$252=HEAP32[$251>>2]|0;$253=($252|0)>0;if($253){$j$657=$j$564;$k$155=0;$x1$056=9.9999999999999995E+36;while(1){$254=+($j$657|0);$255=$254*$5;$256=$255;$257=$256*3.9062500000000001E-6;$258=$257;$259=$258*1000.0;$260=+_ATHformula($2,$259);$261=$260+-20.0;$262=$261;$263=$262*0.10000000000000001;$264=+Math_pow(10.0,+$263);$265=$264;$266=HEAP32[$251>>2]|0;$267=+($266|0);$268=$267*$265;$269=$268;$270=$x1$056>$269;$x1$1=$270?$269:$x1$056;$271=$k$155+1|0;$272=$j$657+1|0;$273=($271|0)<($266|0);if($273){$j$657=$272;$k$155=$271;$x1$056=$x1$1}else{$300=$266;$j$6$lcssa=$272;$x1$0$lcssa=$x1$1;break}}}else{$300=$252;$j$6$lcssa=$j$564;$x1$0$lcssa=9.9999999999999995E+36}$274=$x1$0$lcssa;$275=HEAP32[$235>>2]|0;$276=($275+468|0)+($i$365<<2)|0;HEAPF32[$276>>2]=$274;$277=$239*0.083333335816860198;$278=$277;$279=$278+-1.0;$280=$279*7.0;$281=$239>12.0;if($281){$282=$280+1.0;$283=+Math_log(+$282);$284=$283*3.1000000000000001;$285=$284+1.0;$286=$285*$280;$x1$2=$286}else{$x1$2=$280}$287=$239<12.0;if($287){$288=1.0-$x1$2;$289=+Math_log(+$288);$290=$289*2.2999999999999998;$291=$290+1.0;$292=$291*$x1$2;$x1$3=$292}else{$x1$3=$x1$2}$293=$x1$3>6.0;$x1$4=$293?30.0:$x1$3;$294=$x1$4<$236;$x1$5=$294?$236:$x1$4;$295=HEAP32[$3>>2]|0;$296=($295|0)<44000;$x1$5$op=$x1$5+-8.0;$x1$5$op$op=$x1$5$op*0.10000000000000001;$297=$296?2.2000000000000002:$x1$5$op$op;$298=+Math_pow(10.0,+$297);$299=+($300|0);$301=$299*$298;$302=$301;$303=$237+($i$365<<2)|0;HEAPF32[$303>>2]=$302;$304=$i$365+1|0;$305=HEAP32[$202>>2]|0;$306=($304|0)<($305|0);if($306){$i$365=$304;$j$564=$j$6$lcssa}else{$$lcssa20=$305;break}}}else{$$lcssa20=$$pre109}}else{$$lcssa20=$203}$307=$12+4316|0;$308=$12+3364|0;$309=_init_s3_values($307,$308,$$lcssa20,$bval,$bval_width,$norm)|0;$310=($309|0)==0;if(!$310){$$0=$309;STACKTOP=sp;return $$0|0}HEAPF32[11528>>2]=3.6517412662506104;HEAPF32[11576>>2]=31.622776031494141;_init_fft($1);$311=$5;$312=-44209.633785485676/$311;$313=+Math_exp(+$312);$314=$313;$315=$12+6496|0;HEAPF32[$315>>2]=$314;$316=$1+96|0;$317=HEAP32[$316>>2]|0;$318=($317|0)!=0;$$=$318?1.0:3.5;$319=$1+192|0;$320=+HEAPF32[$319>>2];$321=$320!=$320|0.0!=0.0|$320==0.0;$msfix$0=$321?$$:$320;HEAPF32[$319>>2]=$msfix$0;$322=HEAP32[$108>>2]|0;$323=($322|0)>0;if($323){$324=$322+-1|0;$b$051=0;while(1){$325=($144+($b$051<<3)|0)+4|0;$326=HEAP32[$325>>2]|0;$327=($326|0)>($324|0);if($327){HEAP32[$325>>2]=$324}$328=$b$051+1|0;$329=($328|0)<($322|0);if($329){$b$051=$328}else{break}}}$330=$1+76|0;$331=HEAP32[$330>>2]|0;$332=+($331|0);$333=$332*576.0;$334=$333/$311;$335=$334*-1.2;$336=+Math_pow(10.0,+$335);$337=$336;$338=$1+85796|0;$339=HEAP32[$338>>2]|0;$340=$339+16|0;HEAPF32[$340>>2]=$337;$341=$339+8|0;HEAPF32[$341>>2]=0.0099999997764825821;$342=$339+12|0;HEAPF32[$342>>2]=1.0;$343=$1+208|0;$344=HEAP32[$343>>2]|0;$345=($344|0)==-1;if(!$345){$346=HEAP32[$3>>2]|0;$347=+($346|0);$348=$347*9.765625E-4;$eql_balance$049=0.0;$freq5$048=0.0;$i$450=0;while(1){$349=$freq5$048+$348;$350=+_ATHformula($2,$349);$351=$350*0.10000000149011612;$352=$351;$353=+Math_pow(10.0,+$352);$354=1.0/$353;$355=$354;$356=HEAP32[$338>>2]|0;$357=($356+724|0)+($i$450<<2)|0;HEAPF32[$357>>2]=$355;$358=$355+$eql_balance$049;$359=$i$450+1|0;$exitcond101=($359|0)==512;if($exitcond101){$$lcssa=$356;$$lcssa133=$358;break}else{$eql_balance$049=$358;$freq5$048=$349;$i$450=$359}}$360=1.0/$$lcssa133;$377=511;while(1){$376=($$lcssa+724|0)+($377<<2)|0;$378=+HEAPF32[$376>>2];$379=$378*$360;HEAPF32[$376>>2]=$379;$380=$377+-1|0;$381=($377|0)>0;if($381){$377=$380}else{break}}}$361=HEAP32[$202>>2]|0;$362=($361|0)>0;$363=$gfp+264|0;$364=+HEAPF32[$363>>2];$365=$gfp+268|0;$366=+HEAPF32[$365>>2];$367=$364<0.0;$x6$0=$367?4.4000000953674316:$364;$368=$366<0.0;$y$0=$368?25.0:$366;$369=$12+6480|0;$370=$12+6488|0;HEAPF32[$370>>2]=$x6$0;$371=$12+6484|0;HEAPF32[$371>>2]=$x6$0;HEAPF32[$369>>2]=$x6$0;$372=$12+6492|0;HEAPF32[$372>>2]=$y$0;$373=$gfp+164|0;$374=HEAP32[$373>>2]|0;$375=($374|0)<4;if($375){$sk_s$0=-0.74000000953674316}else{$382=11720+($374<<2)|0;$383=+HEAPF32[$382>>2];$384=$gfp+160|0;$385=+HEAPF32[$384>>2];$386=$374+1|0;$387=11720+($386<<2)|0;$388=+HEAPF32[$387>>2];$389=$383-$388;$390=$389*$385;$391=$390+$383;$phitmp=$391*0.10000000149011612;$sk_s$0=$phitmp}if($362){$392=($361|0)>1;$393=+($361|0);$b$329=0;while(1){$395=$361-$b$329|0;$396=+($395|0);$397=$396/$393;$398=$sk_s$0*$397;$399=+Math_pow(10.0,+$398);$400=$200+($b$329<<2)|0;HEAPF32[$400>>2]=$399;$401=$b$329+1|0;$402=($361|0)>($401|0);if($402){$b$329=$401}else{break}}if($392){$394=($361|0)<64;if($394){$b$3$lcssa110=$361;label=50}}else{$b$3$lcssa110=1;label=50}}else{$b$3$lcssa110=0;label=50}if((label|0)==50){$b$427=$b$3$lcssa110;while(1){$407=$200+($b$427<<2)|0;HEAPF32[$407>>2]=1.0;$408=$b$427+1|0;$exitcond97=($408|0)==64;if($exitcond97){break}else{$b$427=$408}}}$403=HEAP32[$108>>2]|0;$404=($403|0)>0;if($404){$405=($403|0)>1;$406=+($403|0);$b$525=0;while(1){$410=$403-$b$525|0;$411=+($410|0);$412=$411/$406;$413=$sk_s$0*$412;$414=+Math_pow(10.0,+$413);$415=$12+($b$525<<2)|0;HEAPF32[$415>>2]=$414;$416=$b$525+1|0;$417=($403|0)>($416|0);if($417){$b$525=$416}else{break}}if($405){$409=($403|0)<64;if($409){$b$5$lcssa111=$403;label=57}}else{$b$5$lcssa111=1;label=57}}else{$b$5$lcssa111=0;label=57}if((label|0)==57){$b$624=$b$5$lcssa111;while(1){$418=$12+($b$624<<2)|0;HEAPF32[$418>>2]=1.0;$419=$b$624+1|0;$exitcond=($419|0)==64;if($exitcond){break}else{$b$624=$419}}}$420=$12+4320|0;_memcpy($420|0,$12|0,2160)|0;_init_numline($420,$5,1024,192,13,$201);$$0=0;STACKTOP=sp;return $$0|0}function _vbrpsy_compute_MS_thresholds($eb,$thr,$cb_mld,$ath_cb,$athlower,$msfix,$n){$eb=$eb|0;$thr=$thr|0;$cb_mld=$cb_mld|0;$ath_cb=$ath_cb|0;$athlower=+$athlower;$msfix=+$msfix;$n=$n|0;var $0=0.0,$1=0,$10=0.0,$11=0,$12=0.0,$13=0,$14=0.0,$15=0.0,$16=0,$17=0.0,$18=0,$19=0,$2=0,$20=0.0,$21=0.0,$22=0.0,$23=0,$24=0.0,$25=0,$26=0.0;var $27=0,$28=0.0,$29=0,$3=0,$30=0.0,$31=0,$32=0.0,$33=0.0,$34=0,$35=0.0,$36=0,$37=0.0,$38=0,$39=0.0,$4=0.0,$40=0,$41=0.0,$42=0.0,$43=0,$44=0;var $45=0.0,$46=0.0,$47=0,$48=0.0,$49=0.0,$5=0,$50=0.0,$51=0,$52=0.0,$53=0,$54=0.0,$55=0,$56=0,$57=0,$58=0,$59=0.0,$6=0.0,$60=0,$61=0.0,$62=0;var $63=0.0,$64=0,$65=0.0,$66=0,$67=0.0,$68=0,$69=0.0,$7=0,$70=0.0,$71=0,$72=0.0,$73=0,$74=0,$75=0.0,$76=0.0,$77=0.0,$78=0,$79=0.0,$8=0.0,$80=0;var $81=0.0,$82=0,$83=0.0,$84=0,$85=0.0,$86=0,$87=0,$88=0,$9=0,$b$02=0,$b$02$us=0,$exitcond=0,$exitcond3=0,$or$cond=0,$or$cond$us=0,$rmid$0=0.0,$rmid$0$us=0.0,$rmid$2=0.0,$rmid$2$us=0.0,$rside$0=0.0;var $rside$0$us=0.0,$rside$2=0.0,$rside$2$us=0.0,$thmM$0$us=0.0,$thmS$0$us=0.0,label=0,sp=0;sp=STACKTOP;$0=$msfix*2.0;$1=($n|0)>0;if(!$1){return}$2=$msfix>0.0;if($2){$b$02$us=0}else{$b$02=0;while(1){$58=($eb+512|0)+($b$02<<2)|0;$59=+HEAPF32[$58>>2];$60=($eb+768|0)+($b$02<<2)|0;$61=+HEAPF32[$60>>2];$62=$thr+($b$02<<2)|0;$63=+HEAPF32[$62>>2];$64=($thr+256|0)+($b$02<<2)|0;$65=+HEAPF32[$64>>2];$66=($thr+512|0)+($b$02<<2)|0;$67=+HEAPF32[$66>>2];$68=($thr+768|0)+($b$02<<2)|0;$69=+HEAPF32[$68>>2];$70=$65*1.5800000429153442;$71=!($63<=$70);$72=$63*1.5800000429153442;$73=!($65<=$72);$or$cond=$73|$71;if($or$cond){$rmid$0=$67;$rside$0=$69}else{$74=$cb_mld+($b$02<<2)|0;$75=+HEAPF32[$74>>2];$76=$75*$61;$77=$75*$59;$78=$69<$76;$79=$78?$69:$76;$80=$67<$77;$81=$80?$67:$77;$82=$67>$79;$83=$82?$67:$79;$84=$69>$81;$85=$84?$69:$81;$rmid$0=$83;$rside$0=$85}$86=$rmid$0>$59;$rmid$2=$86?$59:$rmid$0;$87=$rside$0>$61;$rside$2=$87?$61:$rside$0;HEAPF32[$66>>2]=$rmid$2;HEAPF32[$68>>2]=$rside$2;$88=$b$02+1|0;$exitcond=($88|0)==($n|0);if($exitcond){break}else{$b$02=$88}}return}while(1){$3=($eb+512|0)+($b$02$us<<2)|0;$4=+HEAPF32[$3>>2];$5=($eb+768|0)+($b$02$us<<2)|0;$6=+HEAPF32[$5>>2];$7=$thr+($b$02$us<<2)|0;$8=+HEAPF32[$7>>2];$9=($thr+256|0)+($b$02$us<<2)|0;$10=+HEAPF32[$9>>2];$11=($thr+512|0)+($b$02$us<<2)|0;$12=+HEAPF32[$11>>2];$13=($thr+768|0)+($b$02$us<<2)|0;$14=+HEAPF32[$13>>2];$15=$10*1.5800000429153442;$16=!($8<=$15);$17=$8*1.5800000429153442;$18=!($10<=$17);$or$cond$us=$18|$16;if($or$cond$us){$rmid$0$us=$12;$rside$0$us=$14}else{$19=$cb_mld+($b$02$us<<2)|0;$20=+HEAPF32[$19>>2];$21=$20*$6;$22=$20*$4;$23=$14<$21;$24=$23?$14:$21;$25=$12<$22;$26=$25?$12:$22;$27=$12>$24;$28=$27?$12:$24;$29=$14>$26;$30=$29?$14:$26;$rmid$0$us=$28;$rside$0$us=$30}$31=$ath_cb+($b$02$us<<2)|0;$32=+HEAPF32[$31>>2];$33=$32*$athlower;$34=$8>$33;$35=$34?$8:$33;$36=$10>$33;$37=$36?$10:$33;$38=$rmid$0$us>$33;$39=$38?$rmid$0$us:$33;$40=$rside$0$us>$33;$41=$40?$rside$0$us:$33;$42=$39+$41;$43=$42>0.0;if($43){$44=$35<$37;$45=$44?$35:$37;$46=$0*$45;$47=$46<$42;if($47){$48=$46/$42;$49=$48*$39;$50=$48*$41;$thmM$0$us=$49;$thmS$0$us=$50}else{$thmM$0$us=$39;$thmS$0$us=$41}}else{$thmM$0$us=$39;$thmS$0$us=$41}$51=$thmM$0$us<$rmid$0$us;$52=$51?$thmM$0$us:$rmid$0$us;$53=$thmS$0$us<$rside$0$us;$54=$53?$thmS$0$us:$rside$0$us;$55=$52>$4;$rmid$2$us=$55?$4:$52;$56=$54>$6;$rside$2$us=$56?$6:$54;HEAPF32[$11>>2]=$rmid$2$us;HEAPF32[$13>>2]=$rside$2$us;$57=$b$02$us+1|0;$exitcond3=($57|0)==($n|0);if($exitcond3){break}else{$b$02$us=$57}}return}function _convert_partition2scalefac($gd,$eb,$thr,$enn_out,$thm_out){$gd=$gd|0;$eb=$eb|0;$thr=$thr|0;$enn_out=$enn_out|0;$thm_out=$thm_out|0;var $$pre=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0.0,$14=0.0,$15=0,$16=0.0,$17=0.0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0.0,$25=0.0;var $26=0,$27=0.0,$28=0.0,$29=0.0,$3=0,$30=0,$31=0.0,$32=0.0,$33=0.0,$34=0,$35=0,$36=0.0,$37=0.0,$38=0.0,$39=0.0,$4=0,$40=0,$41=0,$42=0,$43=0;var $44=0,$45=0,$5=0,$6=0,$7=0,$8=0,$9=0,$b$011=0,$b$1$lcssa=0,$b$13=0,$enn$014=0.0,$enn$1$lcssa=0.0,$enn$1$lcssa$lcssa=0.0,$enn$15=0.0,$exitcond=0,$exitcond26=0,$sb$012=0,$sb$012$lcssa=0,$sb$1$ph=0,$sb$12=0;var $thmm$013=0.0,$thmm$1$lcssa=0.0,$thmm$1$lcssa$lcssa=0.0,$thmm$14=0.0,label=0,sp=0;sp=STACKTOP;$0=$gd+2152|0;$1=HEAP32[$0>>2]|0;$2=($1|0)>0;L1:do{if($2){$3=$gd+2148|0;$$pre=HEAP32[$3>>2]|0;$b$011=0;$enn$014=0.0;$sb$012=0;$thmm$013=0.0;while(1){$5=($gd+2060|0)+($sb$012<<2)|0;$6=HEAP32[$5>>2]|0;$7=($6|0)<($$pre|0);$8=$7?$6:$$pre;$9=($b$011|0)<($8|0);if($9){$10=($$pre|0)>($6|0);$11=$10?$6:$$pre;$b$13=$b$011;$enn$15=$enn$014;$thmm$14=$thmm$013;while(1){$12=$eb+($b$13<<2)|0;$13=+HEAPF32[$12>>2];$14=$13+$enn$15;$15=$thr+($b$13<<2)|0;$16=+HEAPF32[$15>>2];$17=$16+$thmm$14;$18=$b$13+1|0;$exitcond26=($18|0)==($11|0);if($exitcond26){$b$1$lcssa=$11;$enn$1$lcssa=$14;$thmm$1$lcssa=$17;break}else{$b$13=$18;$enn$15=$14;$thmm$14=$17}}}else{$b$1$lcssa=$b$011;$enn$1$lcssa=$enn$014;$thmm$1$lcssa=$thmm$013}$19=($b$1$lcssa|0)<($$pre|0);if(!$19){$enn$1$lcssa$lcssa=$enn$1$lcssa;$sb$012$lcssa=$sb$012;$thmm$1$lcssa$lcssa=$thmm$1$lcssa;break}$23=($gd+1112|0)+($sb$012<<2)|0;$24=+HEAPF32[$23>>2];$25=1.0-$24;$26=$eb+($b$1$lcssa<<2)|0;$27=+HEAPF32[$26>>2];$28=$27*$24;$29=$28+$enn$1$lcssa;$30=$thr+($b$1$lcssa<<2)|0;$31=+HEAPF32[$30>>2];$32=$31*$24;$33=$32+$thmm$1$lcssa;$34=$enn_out+($sb$012<<2)|0;HEAPF32[$34>>2]=$29;$35=$thm_out+($sb$012<<2)|0;HEAPF32[$35>>2]=$33;$36=+HEAPF32[$26>>2];$37=$36*$25;$38=+HEAPF32[$30>>2];$39=$38*$25;$40=$b$1$lcssa+1|0;$41=$sb$012+1|0;$42=($41|0)<($1|0);if($42){$b$011=$40;$enn$014=$37;$sb$012=$41;$thmm$013=$39}else{$sb$1$ph=$41;break L1}}$20=$enn_out+($sb$012$lcssa<<2)|0;HEAPF32[$20>>2]=$enn$1$lcssa$lcssa;$21=$thm_out+($sb$012$lcssa<<2)|0;HEAPF32[$21>>2]=$thmm$1$lcssa$lcssa;$22=$sb$012$lcssa+1|0;$sb$1$ph=$22}else{$sb$1$ph=0}}while(0);$4=($sb$1$ph|0)<($1|0);if($4){$sb$12=$sb$1$ph}else{return}while(1){$43=$enn_out+($sb$12<<2)|0;HEAPF32[$43>>2]=0.0;$44=$thm_out+($sb$12<<2)|0;HEAPF32[$44>>2]=0.0;$45=$sb$12+1|0;$exitcond=($45|0)==($1|0);if($exitcond){break}else{$sb$12=$45}}return}function _init_numline($gd,$sfreq,$fft_size,$mdct_size,$sbmax,$scalepos){$gd=$gd|0;$sfreq=+$sfreq;$fft_size=$fft_size|0;$mdct_size=$mdct_size|0;$sbmax=$sbmax|0;$scalepos=$scalepos|0;var $$=0,$$2=0,$$lcssa=0,$$op$op$i=0.0,$$op$op$i3=0.0,$0=0.0,$1=0.0,$10=0.0,$100=0.0,$101=0,$102=0,$103=0,$104=0.0,$105=0.0,$106=0.0,$107=0.0,$108=0,$109=0.0,$11=0,$110=0.0;var $111=0.0,$112=0.0,$113=0.0,$114=0.0,$115=0.0,$116=0,$12=0.0,$13=0.0,$14=0.0,$15=0.0,$16=0.0,$17=0,$18=0,$19=0,$2=0.0,$20=0,$21=0,$22=0,$23=0.0,$24=0.0;var $25=0.0,$26=0,$27=0,$28=0,$29=0,$3=0.0,$30=0,$31=0,$32=0.0,$33=0.0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0.0,$40=0,$41=0,$42=0;var $43=0.0,$44=0.0,$45=0.0,$46=0.0,$47=0,$48=0.0,$49=0.0,$5=0.0,$50=0.0,$51=0.0,$52=0.0,$53=0.0,$54=0.0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0;var $61=0.0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0.0,$7=0,$70=0.0,$71=0.0,$72=0.0,$73=0.0,$74=0,$75=0,$76=0.0,$77=0.0,$78=0.0,$79=0.0;var $8=0.0,$80=0.0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0.0,$90=0,$91=0.0,$92=0.0,$93=0,$94=0.0,$95=0.0,$96=0,$97=0;var $98=0.0,$99=0.0,$b_frq=0,$bo_w$0=0.0,$exitcond=0,$exitcond17=0,$exitcond18=0,$i$29=0,$i$36=0,$j$0=0,$j$1$lcssa=0,$j$112=0,$j$2=0,$j$38=0,$j2$0=0,$j2$0$lcssa=0,$ni$0=0,$ni$1=0,$or$cond=0,$partition=0;var $sfb$05=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+2320|0;$b_frq=sp+2052|0;$partition=sp;$0=+($mdct_size|0);$1=$0*2.0;$2=$sfreq/$1;$3=+($fft_size|0);$4=$3/$1;_memset($partition|0,0,2052)|0;$5=$sfreq/$3;$6=($fft_size|0)/2&-1;$j$0=0;$ni$0=0;while(1){$7=($ni$0|0)<64;if(!$7){$j$2=$j$0;$ni$1=$ni$0;break}$8=+($j$0|0);$9=$8*$5;$10=+_freq2bark($9);$11=$b_frq+($ni$0<<2)|0;HEAPF32[$11>>2]=$9;$j2$0=$j$0;while(1){$12=+($j2$0|0);$13=$12*$5;$14=+_freq2bark($13);$15=$14-$10;$16=$15;$17=!($16<0.34000000000000002);$18=($j2$0|0)>($6|0);$or$cond=$18|$17;$19=$j2$0+1|0;if($or$cond){$j2$0$lcssa=$j2$0;break}else{$j2$0=$19}}$20=$j2$0$lcssa-$j$0|0;$21=($gd+1716|0)+($ni$0<<2)|0;HEAP32[$21>>2]=$20;$22=($20|0)>0;$23=+($20|0);$24=1.0/$23;$25=$22?$24:0.0;$26=($gd+512|0)+($ni$0<<2)|0;HEAPF32[$26>>2]=$25;$27=$ni$0+1|0;$28=($j2$0$lcssa|0)>($j$0|0);if($28){$j$112=$j$0;while(1){$29=$j$112+1|0;$30=$partition+($j$112<<2)|0;HEAP32[$30>>2]=$ni$0;$exitcond18=($29|0)==($j2$0$lcssa|0);if($exitcond18){$j$1$lcssa=$j2$0$lcssa;break}else{$j$112=$29}}}else{$j$1$lcssa=$j$0}$31=($j$1$lcssa|0)>($6|0);if($31){$j$2=$6;$ni$1=$27;break}else{$j$0=$j$1$lcssa;$ni$0=$27}}$32=+($j$2|0);$33=$32*$5;$34=$b_frq+($ni$1<<2)|0;HEAPF32[$34>>2]=$33;$35=$gd+2152|0;HEAP32[$35>>2]=$sbmax;$36=$gd+2148|0;HEAP32[$36>>2]=$ni$1;$37=($ni$1|0)>0;if($37){$i$29=0;$j$38=0;while(1){$39=($gd+1716|0)+($i$29<<2)|0;$40=HEAP32[$39>>2]|0;$41=($40|0)/2&-1;$42=$41+$j$38|0;$43=+($42|0);$44=$43*$5;$45=+_freq2bark($44);$46=$45;$47=$45<15.5;$$op$op$i=$46*0.2026833970057931;$48=$47?$$op$op$i:3.1415926535897931;$49=+Math_cos(+$48);$50=1.0-$49;$51=$50*1.25;$52=$51+-2.5;$53=+Math_pow(10.0,+$52);$54=$53;$55=($gd+768|0)+($i$29<<2)|0;HEAPF32[$55>>2]=$54;$56=$40+$j$38|0;$57=$i$29+1|0;$58=HEAP32[$36>>2]|0;$59=($57|0)<($58|0);if($59){$i$29=$57;$j$38=$56}else{$$lcssa=$57;break}}$38=($$lcssa|0)<64;if($38){$i$36=$$lcssa;label=13}}else{$i$36=0;label=13}if((label|0)==13){while(1){label=0;$62=($gd+768|0)+($i$36<<2)|0;HEAPF32[$62>>2]=1.0;$63=$i$36+1|0;$exitcond17=($63|0)==64;if($exitcond17){break}else{$i$36=$63;label=13}}}$60=($sbmax|0)>0;if(!$60){STACKTOP=sp;return}$61=$4;$sfb$05=0;while(1){$64=$scalepos+($sfb$05<<2)|0;$65=HEAP32[$64>>2]|0;$66=$sfb$05+1|0;$67=$scalepos+($66<<2)|0;$68=HEAP32[$67>>2]|0;$69=+($65|0);$70=$69+-0.5;$71=$70*$61;$72=$71+0.5;$73=+Math_floor(+$72);$74=~~$73;$75=($74|0)<0;$$=$75?0:$74;$76=+($68|0);$77=$76+-0.5;$78=$77*$61;$79=$78+0.5;$80=+Math_floor(+$79);$81=~~$80;$82=($81|0)>($6|0);$$2=$82?$6:$81;$83=$partition+($$2<<2)|0;$84=HEAP32[$83>>2]|0;$85=$partition+($$<<2)|0;$86=HEAP32[$85>>2]|0;$87=$86+$84|0;$88=($87|0)/2&-1;$89=($gd+1972|0)+($sfb$05<<2)|0;HEAP32[$89>>2]=$88;$90=($gd+2060|0)+($sfb$05<<2)|0;HEAP32[$90>>2]=$84;$91=+($68|0);$92=$91*$2;$93=$b_frq+($84<<2)|0;$94=+HEAPF32[$93>>2];$95=$92-$94;$96=$84+1|0;$97=$b_frq+($96<<2)|0;$98=+HEAPF32[$97>>2];$99=$98-$94;$100=$95/$99;$101=$100<0.0;if($101){$bo_w$0=0.0}else{$102=$100>1.0;if($102){$bo_w$0=1.0}else{$bo_w$0=$100}}$103=($gd+1112|0)+($sfb$05<<2)|0;HEAPF32[$103>>2]=$bo_w$0;$104=+($65|0);$105=$104*$2;$106=+_freq2bark($105);$107=$106;$108=$106<15.5;$$op$op$i3=$107*0.2026833970057931;$109=$108?$$op$op$i3:3.1415926535897931;$110=+Math_cos(+$109);$111=1.0-$110;$112=$111*1.25;$113=$112+-2.5;$114=+Math_pow(10.0,+$113);$115=$114;$116=($gd+1024|0)+($sfb$05<<2)|0;HEAPF32[$116>>2]=$115;$exitcond=($66|0)==($sbmax|0);if($exitcond){break}else{$sfb$05=$66}}STACKTOP=sp;return}function _init_s3_values($p,$s3ind,$npart,$bval,$bval_width,$norm){$p=$p|0;$s3ind=$s3ind|0;$npart=$npart|0;$bval=$bval|0;$bval_width=$bval_width|0;$norm=$norm|0;var $$0=0,$$0$i=0.0,$$lcssa=0,$$mux=0,$$not=0,$0=0,$1=0,$10=0,$11=0,$12=0.0,$13=0.0,$14=0.0,$15=0.0,$16=0.0,$17=0.0,$18=0.0,$19=0.0,$2=0.0,$20=0.0,$21=0.0;var $22=0.0,$23=0.0,$24=0.0,$25=0.0,$26=0.0,$27=0.0,$28=0.0,$29=0.0,$3=0,$30=0.0,$31=0.0,$32=0,$33=0.0,$34=0.0,$35=0.0,$36=0.0,$37=0.0,$38=0.0,$39=0.0,$4=0.0;var $40=0.0,$41=0,$42=0.0,$43=0.0,$44=0.0,$45=0,$46=0,$47=0,$48=0,$49=0.0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0.0,$58=0;var $59=0,$6=0.0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0.0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0;var $77=0,$8=0,$9=0.0,$brmerge=0,$exitcond=0,$exitcond34=0,$exitcond35=0,$exitcond36=0,$i$024=0,$i$117=0,$i$27=0,$j$021=0,$j$111=0,$j$2=0,$j$2$in=0,$j$2$in$lcssa=0,$j$2$lcssa=0,$k$09=0,$k$1$lcssa=0,$numberOfNoneZero$0$lcssa=0;var $numberOfNoneZero$018=0,$or$cond$i=0,$phitmp=0,$s3=0,$scevgep=0,$scevgep31=0,$tempx$0$i=0.0,$tempx$0$v$i=0.0,$x$0$i=0.0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16384|0;$s3=sp;_memset($s3|0,0,16384)|0;$0=($npart|0)>0;if($0){$i$024=0;while(1){$1=$bval+($i$024<<2)|0;$2=+HEAPF32[$1>>2];$3=$norm+($i$024<<2)|0;$4=+HEAPF32[$3>>2];$j$021=0;while(1){$5=$bval+($j$021<<2)|0;$6=+HEAPF32[$5>>2];$7=$2-$6;$8=!($7>=0.0);$tempx$0$v$i=$8?1.5:3.0;$tempx$0$i=$7*$tempx$0$v$i;$9=$tempx$0$i;$10=!($tempx$0$i>=0.5);$11=!($tempx$0$i<=2.5);$or$cond$i=$10|$11;if($or$cond$i){$x$0$i=0.0}else{$12=$tempx$0$i+-0.5;$13=$12*$12;$14=$13;$15=$12;$16=$15*2.0;$17=$14-$16;$18=$17*8.0;$19=$18;$x$0$i=$19}$20=$9+0.47399999999999998;$21=$20;$22=$21;$23=$22*7.5;$24=$23+15.811389;$25=$21*$21;$26=$25;$27=$26+1.0;$28=+Math_sqrt(+$27);$29=$28*17.5;$30=$24-$29;$31=$30;$32=!($31<=-60.0);if($32){$33=$31+$x$0$i;$34=$33;$35=$34*0.23025850929940458;$36=+Math_exp(+$35);$37=$36;$38=$37;$39=$38*1.5130440282194817;$40=$39;$$0$i=$40}else{$$0$i=0.0}$41=$bval_width+($j$021<<2)|0;$42=+HEAPF32[$41>>2];$43=$42*$$0$i;$44=$43*$4;$45=($s3+($i$024<<8)|0)+($j$021<<2)|0;HEAPF32[$45>>2]=$44;$46=$j$021+1|0;$exitcond35=($46|0)==($npart|0);if($exitcond35){break}else{$j$021=$46}}$47=$i$024+1|0;$exitcond36=($47|0)==($npart|0);if($exitcond36){break}else{$i$024=$47}}if($0){$i$117=0;$numberOfNoneZero$018=0;while(1){$j$111=0;while(1){$48=($s3+($i$117<<8)|0)+($j$111<<2)|0;$49=+HEAPF32[$48>>2];$50=$49>0.0;if($50){$54=$j$111;break}$51=$j$111+1|0;$52=($51|0)<($npart|0);if($52){$j$111=$51}else{$54=$51;break}}$53=$s3ind+($i$117<<3)|0;HEAP32[$53>>2]=$54;$j$2$in=$npart;while(1){$j$2=$j$2$in+-1|0;$55=($j$2$in|0)>1;if(!$55){$j$2$in$lcssa=$j$2$in;$j$2$lcssa=$j$2;break}$56=($s3+($i$117<<8)|0)+($j$2<<2)|0;$57=+HEAPF32[$56>>2];$58=$57>0.0;if($58){$j$2$in$lcssa=$j$2$in;$j$2$lcssa=$j$2;break}else{$j$2$in=$j$2}}$59=($s3ind+($i$117<<3)|0)+4|0;HEAP32[$59>>2]=$j$2$lcssa;$60=$numberOfNoneZero$018+$j$2$in$lcssa|0;$61=$60-$54|0;$62=$i$117+1|0;$exitcond34=($62|0)==($npart|0);if($exitcond34){$$lcssa=$61;break}else{$i$117=$62;$numberOfNoneZero$018=$61}}$phitmp=$$lcssa<<2;$numberOfNoneZero$0$lcssa=$phitmp}else{$numberOfNoneZero$0$lcssa=0}}else{$numberOfNoneZero$0$lcssa=0}$63=_malloc($numberOfNoneZero$0$lcssa)|0;HEAP32[$p>>2]=$63;$64=($63|0)==(0|0);$$not=$0^1;$brmerge=$64|$$not;$$mux=$64<<31>>31;if($brmerge){$$0=$$mux;STACKTOP=sp;return $$0|0}else{$i$27=0;$k$09=0}while(1){$65=$s3ind+($i$27<<3)|0;$66=HEAP32[$65>>2]|0;$67=($s3ind+($i$27<<3)|0)+4|0;$68=HEAP32[$67>>2]|0;$69=($66|0)>($68|0);if($69){$k$1$lcssa=$k$09}else{$70=HEAP32[$p>>2]|0;$71=$k$09+1|0;$72=$71+$68|0;$scevgep=$70+($k$09<<2)|0;$scevgep31=($s3+($i$27<<8)|0)+($66<<2)|0;$73=$68+1|0;$74=$73-$66|0;$75=$74<<2;_memcpy($scevgep|0,$scevgep31|0,$75|0)|0;$76=$72-$66|0;$k$1$lcssa=$76}$77=$i$27+1|0;$exitcond=($77|0)==($npart|0);if($exitcond){$$0=0;break}else{$i$27=$77;$k$09=$k$1$lcssa}}STACKTOP=sp;return $$0|0}function _init_xrpow_core_init($gfc){$gfc=$gfc|0;var $0=0,$1=0,$2=0,$3=0,$4=0,$init_xrpow_core_c$init_xrpow_core_sse=0,label=0,sp=0;sp=STACKTOP;$0=$gfc+85824|0;$1=$gfc+85756|0;$2=HEAP32[$1>>2]|0;$3=$2&4;$4=($3|0)==0;$init_xrpow_core_c$init_xrpow_core_sse=$4?6:5;HEAP32[$0>>2]=$init_xrpow_core_c$init_xrpow_core_sse;return}function _VBR_old_iteration_loop($gfc,$pe,$ms_ener_ratio,$ratio){$gfc=$gfc|0;$pe=$pe|0;$ms_ener_ratio=$ms_ener_ratio|0;$ratio=$ratio|0;var $$$i=0,$$$i6=0.0,$$0$i1=0,$$01$i=0,$$1$i=0,$$12$i=0,$$lcssa=0,$$lcssa63=0,$$lobit$i=0,$$pre$i=0,$$pre$phiZ2D=0,$$pre$pre=0,$$pre$pre$pre=0,$$pre29$i=0,$$pre29$i$lcssa=0,$$pre34=0,$$pre35=0,$$pre38=0,$0=0,$1=0;var $10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0;var $118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0.0,$132=0,$133=0,$134=0,$135=0;var $136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0;var $154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0,$164=0,$165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0;var $172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0,$184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0;var $190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0,$201=0,$202=0,$203=0,$204=0,$205=0.0,$206=0.0,$207=0.0;var $208=0.0,$209=0,$21=0,$210=0.0,$211=0.0,$212=0.0,$213=0.0,$214=0,$215=0,$216=0,$217=0,$218=0,$219=0,$22=0,$220=0,$221=0.0,$222=0.0,$223=0.0,$224=0.0,$225=0;var $226=0.0,$227=0.0,$228=0.0,$229=0.0,$23=0,$230=0,$231=0.0,$232=0.0,$233=0.0,$234=0.0,$235=0,$236=0.0,$237=0.0,$238=0.0,$239=0.0,$24=0,$240=0,$241=0,$242=0,$243=0.0;var $244=0,$245=0,$246=0.0,$247=0.0,$248=0,$249=0,$25=0,$250=0,$251=0,$252=0,$253=0,$254=0,$255=0,$256=0,$257=0,$258=0,$259=0,$26=0,$260=0,$261=0;var $262=0,$263=0,$264=0,$265=0,$266=0,$267=0,$268=0,$269=0,$27=0,$270=0,$271=0,$272=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0;var $35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0.0,$5=0,$50=0,$51=0.0,$52=0.0;var $53=0.0,$54=0.0,$55=0.0,$56=0,$57=0,$58=0.0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0.0,$68=0.0,$69=0.0,$7=0,$70=0.0;var $71=0.0,$72=0.0,$73=0.0,$74=0.0,$75=0.0,$76=0.0,$77=0.0,$78=0.0,$79=0.0,$8=0,$80=0.0,$81=0.0,$82=0.0,$83=0.0,$84=0.0,$85=0.0,$86=0.0,$87=0,$88=0,$89=0;var $9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$analog_silence$0$lcssa34$i=0,$analog_silence$023$i=0,$analog_silence$1$$i=0,$analog_silence$1$lcssa$i=0,$analog_silence$1$lcssa$i$lcssa=0,$analog_silence$115$i=0,$bits$024$i=0,$bits$1$lcssa$i=0,$bits$1$lcssa$i$lcssa=0;var $bits$116$i=0,$bst_cod_info$i=0,$bst_xrpow$i=0,$ch$014$i=0,$ch$022=0,$ch$07$i=0,$ch$115=0,$ch$16$i=0,$ch$16$us$us$i=0,$dbits$0$i=0,$exitcond=0,$exitcond$i=0,$exitcond$i$i=0,$found$0$i=0,$found$1$i=0,$found$1$i$lcssa=0,$frameBits=0,$gr$0=0,$gr$010$i=0,$gr$020$i=0;var $gr$116=0,$gr$17$i=0,$gr$17$us$i=0,$i$01$i=0,$i$01$i$i=0,$i$01$i2$i=0,$indvars$iv$i=0,$indvars$iv13$i=0,$l3_xmin=0,$masking_lower_db$0$i=0.0,$max_bits=0,$mean_bits=0,$min_bits=0,$pxmin$0$lcssa$i=0,$pxmin$02$i=0,$pxmin$14$i=0,$scevgep$i=0,$scevgep14$i=0,$scevgep15$i=0,$sfb$01$i=0;var $sfb$13$i=0,$smax$i=0,$storemerge=0,$this_bits$0$i=0,$this_bits$1$i=0,$used_bits$0=0,$used_bits$1$lcssa=0,$used_bits$124=0,$used_bits$2=0,$used_bits$2$lcssa=0,$xrpow=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+10592|0;$bst_cod_info$i=sp+5336|0;$bst_xrpow$i=sp+3032|0;$l3_xmin=sp+2408|0;$xrpow=sp+104|0;$frameBits=sp+40|0;$min_bits=sp+24|0;$max_bits=sp+8|0;$mean_bits=sp;$0=$gfc+116|0;$1=HEAP32[$0>>2]|0;$2=$gfc+84744|0;HEAP32[$2>>2]=$1;$3=_ResvFrameBegin($gfc,$bst_xrpow$i)|0;$4=$gfc+76|0;$5=HEAP32[$4>>2]|0;$6=($3|0)/($5|0)&-1;HEAP32[$bst_xrpow$i>>2]=$6;$7=$gfc+112|0;$8=HEAP32[$7>>2]|0;HEAP32[$2>>2]=$8;HEAP32[$2>>2]=1;$9=_getframebits($gfc)|0;HEAP32[$bst_cod_info$i>>2]=$9;$10=HEAP32[$0>>2]|0;$11=($10|0)<1;if(!$11){$i$01$i$i=1;while(1){HEAP32[$2>>2]=$i$01$i$i;$12=_ResvFrameBegin($gfc,$bst_cod_info$i)|0;$13=$frameBits+($i$01$i$i<<2)|0;HEAP32[$13>>2]=$12;$14=$i$01$i$i+1|0;$15=HEAP32[$0>>2]|0;$16=($i$01$i$i|0)<($15|0);if($16){$i$01$i$i=$14}else{break}}}$17=HEAP32[$4>>2]|0;$18=($17|0)>0;L5:do{if($18){$19=$gfc+84756|0;$20=$gfc+72|0;$21=$gfc+84916|0;$22=$gfc+84908|0;$23=$gfc+84912|0;$analog_silence$023$i=1;$bits$024$i=0;$gr$020$i=0;while(1){$43=$max_bits+($gr$020$i<<3)|0;$44=HEAP32[$bst_xrpow$i>>2]|0;$45=_on_pe($gfc,$pe,$43,$44,$gr$020$i,0)|0;$46=HEAP32[$19>>2]|0;$47=($46|0)==2;if($47){$i$01$i2$i=0;while(1){$48=(($gfc+304|0)+($gr$020$i*10504|0)|0)+($i$01$i2$i<<2)|0;$49=+HEAPF32[$48>>2];$50=((($gfc+304|0)+($gr$020$i*10504|0)|0)+5252|0)+($i$01$i2$i<<2)|0;$51=+HEAPF32[$50>>2];$52=$51+$49;$53=$52*0.70710676908493042;HEAPF32[$48>>2]=$53;$54=$49-$51;$55=$54*0.70710676908493042;HEAPF32[$50>>2]=$55;$56=$i$01$i2$i+1|0;$exitcond$i$i=($56|0)==576;if($exitcond$i$i){break}else{$i$01$i2$i=$56}}$57=$ms_ener_ratio+($gr$020$i<<2)|0;$58=+HEAPF32[$57>>2];$59=HEAP32[$bst_xrpow$i>>2]|0;_reduce_side($43,$58,$59,$45)}$60=HEAP32[$20>>2]|0;$61=($60|0)>0;if($61){$analog_silence$115$i=$analog_silence$023$i;$bits$116$i=$bits$024$i;$ch$014$i=0;while(1){$62=(($gfc+304|0)+($gr$020$i*10504|0)|0)+($ch$014$i*5252|0)|0;$63=((($gfc+304|0)+($gr$020$i*10504|0)|0)+($ch$014$i*5252|0)|0)+4788|0;$64=HEAP32[$63>>2]|0;$65=($64|0)==2;$66=($pe+($gr$020$i<<3)|0)+($ch$014$i<<2)|0;$67=+HEAPF32[$66>>2];$68=$67;$69=$68*0.0033333333333333335;$70=3.5-$69;$71=+Math_exp(+$70);$72=$71+1.0;if($65){$78=2.5600000000000001/$72;$79=$78+-0.14000000000000001;$80=$79;$81=+HEAPF32[$21>>2];$82=$81-$80;$masking_lower_db$0$i=$82}else{$73=1.28/$72;$74=$73+-0.050000000000000003;$75=$74;$76=+HEAPF32[$23>>2];$77=$76-$75;$masking_lower_db$0$i=$77}$83=$masking_lower_db$0$i;$84=$83*0.10000000000000001;$85=+Math_pow(10.0,+$84);$86=$85;HEAPF32[$22>>2]=$86;_init_outer_loop($gfc,$62);$87=($ratio+($gr$020$i*976|0)|0)+($ch$014$i*488|0)|0;$88=($l3_xmin+($gr$020$i*312|0)|0)+($ch$014$i*156|0)|0;$89=_calc_xmin($gfc,$87,$62,$88)|0;$90=($89|0)==0;$analog_silence$1$$i=$90?$analog_silence$115$i:0;$91=($min_bits+($gr$020$i<<3)|0)+($ch$014$i<<2)|0;HEAP32[$91>>2]=126;$92=($max_bits+($gr$020$i<<3)|0)+($ch$014$i<<2)|0;$93=HEAP32[$92>>2]|0;$94=$93+$bits$116$i|0;$95=$ch$014$i+1|0;$96=HEAP32[$20>>2]|0;$97=($95|0)<($96|0);if($97){$analog_silence$115$i=$analog_silence$1$$i;$bits$116$i=$94;$ch$014$i=$95}else{$$pre29$i=$96;$analog_silence$1$lcssa$i=$analog_silence$1$$i;$bits$1$lcssa$i=$94;break}}}else{$$pre29$i=$60;$analog_silence$1$lcssa$i=$analog_silence$023$i;$bits$1$lcssa$i=$bits$024$i}$98=$gr$020$i+1|0;$99=HEAP32[$4>>2]|0;$100=($98|0)<($99|0);if($100){$analog_silence$023$i=$analog_silence$1$lcssa$i;$bits$024$i=$bits$1$lcssa$i;$gr$020$i=$98}else{$$lcssa63=$99;$$pre29$i$lcssa=$$pre29$i;$analog_silence$1$lcssa$i$lcssa=$analog_silence$1$lcssa$i;$bits$1$lcssa$i$lcssa=$bits$1$lcssa$i;break}}$24=($$lcssa63|0)>0;if($24){$25=($bits$1$lcssa$i$lcssa|0)>0;if(!$25){$101=$$pre29$i$lcssa;$267=$$pre29$i$lcssa;$gr$17$i=0;while(1){$102=($101|0)>0;if($102){$268=$267;$ch$16$i=0;while(1){$103=($min_bits+($gr$17$i<<3)|0)+($ch$16$i<<2)|0;$104=HEAP32[$103>>2]|0;$105=($max_bits+($gr$17$i<<3)|0)+($ch$16$i<<2)|0;$106=HEAP32[$105>>2]|0;$107=($104|0)>($106|0);if($107){HEAP32[$103>>2]=$106;$110=$$pre29$i$lcssa}else{$110=$268}$108=$ch$16$i+1|0;$109=($108|0)<($110|0);if($109){$268=$110;$ch$16$i=$108}else{$269=$110;$270=$110;break}}}else{$269=$267;$270=$101}$111=$gr$17$i+1|0;$112=($111|0)<($$lcssa63|0);if($112){$101=$270;$267=$269;$gr$17$i=$111}else{$$pre$phiZ2D=$20;$266=$$lcssa63;$analog_silence$0$lcssa34$i=$analog_silence$1$lcssa$i$lcssa;break L5}}}$26=($$pre29$i$lcssa|0)>0;$gr$17$us$i=0;while(1){if($26){$27=HEAP32[$0>>2]|0;$28=$frameBits+($27<<2)|0;$29=HEAP32[$28>>2]|0;$30=($bits$1$lcssa$i$lcssa|0)>($29|0);$ch$16$us$us$i=0;while(1){$33=($max_bits+($gr$17$us$i<<3)|0)+($ch$16$us$us$i<<2)|0;$34=HEAP32[$33>>2]|0;if($30){$35=Math_imul($34,$29)|0;$36=($35|0)/($bits$1$lcssa$i$lcssa|0)&-1;HEAP32[$33>>2]=$36;$40=$36}else{$40=$34}$37=($min_bits+($gr$17$us$i<<3)|0)+($ch$16$us$us$i<<2)|0;$38=HEAP32[$37>>2]|0;$39=($38|0)>($40|0);if($39){HEAP32[$37>>2]=$40}$41=$ch$16$us$us$i+1|0;$42=($41|0)<($$pre29$i$lcssa|0);if($42){$ch$16$us$us$i=$41}else{break}}}$31=$gr$17$us$i+1|0;$32=($31|0)<($$lcssa63|0);if($32){$gr$17$us$i=$31}else{$$pre$phiZ2D=$20;$266=$$lcssa63;$analog_silence$0$lcssa34$i=$analog_silence$1$lcssa$i$lcssa;break}}}else{$$pre$phiZ2D=$20;$266=$$lcssa63;$analog_silence$0$lcssa34$i=$analog_silence$1$lcssa$i$lcssa}}else{$$pre38=$gfc+72|0;$$pre$phiZ2D=$$pre38;$266=$17;$analog_silence$0$lcssa34$i=1}}while(0);$113=($analog_silence$0$lcssa34$i|0)==0;$114=$gfc+124|0;$115=$gfc+85824|0;$116=$gfc+85096|0;$117=$gfc+85092|0;$118=$bst_cod_info$i+2304|0;$120=$266;$gr$0=0;$used_bits$0=0;L50:while(1){$119=($gr$0|0)<($120|0);if(!$119){if($113){label=55}else{$182=HEAP32[$114>>2]|0;$183=($182|0)==0;if($183){$storemerge=1}else{label=55}}if((label|0)==55){label=0;$184=HEAP32[$7>>2]|0;$storemerge=$184}HEAP32[$2>>2]=$storemerge;$185=HEAP32[$0>>2]|0;$186=($storemerge|0)<($185|0);L59:do{if($186){$188=$storemerge;while(1){$187=$frameBits+($188<<2)|0;$189=HEAP32[$187>>2]|0;$190=($used_bits$0|0)>($189|0);if(!$190){break L59}$191=$188+1|0;HEAP32[$2>>2]=$191;$192=($191|0)<($185|0);if($192){$188=$191}else{break}}}}while(0);$193=_ResvFrameBegin($gfc,$mean_bits)|0;$194=($used_bits$0|0)>($193|0);$195=HEAP32[$4>>2]|0;$196=($195|0)>0;if(!$194){break}if(!$196){$120=$195;$gr$0=0;$used_bits$0=0;continue}$$pre$i=HEAP32[$$pre$phiZ2D>>2]|0;$199=($$pre$i|0)>0;$gr$010$i=0;$indvars$iv$i=$l3_xmin;while(1){if($199){$ch$07$i=0;$indvars$iv13$i=$indvars$iv$i;while(1){$200=($l3_xmin+($gr$010$i*312|0)|0)+($ch$07$i*156|0)|0;$201=((($gfc+304|0)+($gr$010$i*10504|0)|0)+($ch$07$i*5252|0)|0)+4856|0;$202=HEAP32[$201>>2]|0;$203=($202|0)>0;if($203){$204=($202|0)>1;$pxmin$02$i=$200;$sfb$01$i=0;while(1){$205=+($sfb$01$i|0);$206=$205*$205;$207=$206*5.9917355371900827E-5;$208=$207+1.0;$209=$pxmin$02$i+4|0;$210=+HEAPF32[$pxmin$02$i>>2];$211=$210;$212=$208*$211;$213=$212;HEAPF32[$pxmin$02$i>>2]=$213;$214=$sfb$01$i+1|0;$exitcond=($214|0)==($202|0);if($exitcond){break}else{$pxmin$02$i=$209;$sfb$01$i=$214}}$smax$i=$204?$202:1;$scevgep15$i=$indvars$iv13$i+($smax$i<<2)|0;$pxmin$0$lcssa$i=$scevgep15$i}else{$pxmin$0$lcssa$i=$200}$215=((($gfc+304|0)+($gr$010$i*10504|0)|0)+($ch$07$i*5252|0)|0)+4788|0;$216=HEAP32[$215>>2]|0;$217=($216|0)==2;if($217){$218=((($gfc+304|0)+($gr$010$i*10504|0)|0)+($ch$07$i*5252|0)|0)+4852|0;$219=HEAP32[$218>>2]|0;$220=($219|0)<13;if($220){$pxmin$14$i=$pxmin$0$lcssa$i;$sfb$13$i=$219;while(1){$221=+($sfb$13$i|0);$222=$221*$221;$223=$222*1.7159763313609469E-4;$224=$223+1.0;$225=$pxmin$14$i+4|0;$226=+HEAPF32[$pxmin$14$i>>2];$227=$226;$228=$224*$227;$229=$228;HEAPF32[$pxmin$14$i>>2]=$229;$230=$pxmin$14$i+8|0;$231=+HEAPF32[$225>>2];$232=$231;$233=$224*$232;$234=$233;HEAPF32[$225>>2]=$234;$235=$pxmin$14$i+12|0;$236=+HEAPF32[$230>>2];$237=$236;$238=$237*$224;$239=$238;HEAPF32[$230>>2]=$239;$240=$sfb$13$i+1|0;$exitcond$i=($240|0)==13;if($exitcond$i){break}else{$pxmin$14$i=$235;$sfb$13$i=$240}}}}$241=($min_bits+($gr$010$i<<3)|0)+($ch$07$i<<2)|0;$242=HEAP32[$241>>2]|0;$243=+($242|0);$244=($max_bits+($gr$010$i<<3)|0)+($ch$07$i<<2)|0;$245=HEAP32[$244>>2]|0;$246=+($245|0);$247=$246*0.90000000000000002;$248=$243>$247;$$$i6=$248?$243:$247;$249=~~$$$i6;HEAP32[$244>>2]=$249;$250=$ch$07$i+1|0;$251=($250|0)<($$pre$i|0);$scevgep14$i=$indvars$iv13$i+156|0;if($251){$ch$07$i=$250;$indvars$iv13$i=$scevgep14$i}else{break}}}$252=$gr$010$i+1|0;$253=($252|0)<($195|0);$scevgep$i=$indvars$iv$i+312|0;if($253){$gr$010$i=$252;$indvars$iv$i=$scevgep$i}else{$120=$195;$gr$0=0;$used_bits$0=0;continue L50}}}$121=HEAP32[$$pre$phiZ2D>>2]|0;$122=($121|0)>0;if($122){$ch$022=0;$used_bits$124=$used_bits$0;while(1){$123=(($gfc+304|0)+($gr$0*10504|0)|0)+($ch$022*5252|0)|0;HEAPF32[$bst_cod_info$i>>2]=0.0;$124=((($gfc+304|0)+($gr$0*10504|0)|0)+($ch$022*5252|0)|0)+5208|0;$125=HEAP32[$124>>2]|0;$126=((($gfc+304|0)+($gr$0*10504|0)|0)+($ch$022*5252|0)|0)+4764|0;HEAPF32[$126>>2]=0.0;$127=$xrpow+($125<<2)|0;$128=576-$125|0;$129=$128<<2;_memset($127|0,0,$129|0)|0;$130=HEAP32[$115>>2]|0;FUNCTION_TABLE_viiii[$130&7]($123,$xrpow,$125,$bst_cod_info$i);$131=+HEAPF32[$bst_cod_info$i>>2];$132=$131>9.9999996826552254E-21;if($132){$133=HEAP32[$116>>2]|0;$134=$133>>>1;$$lobit$i=$134&1;$135=((($gfc+304|0)+($gr$0*10504|0)|0)+($ch$022*5252|0)|0)+4864|0;$136=HEAP32[$135>>2]|0;$137=($136|0)>0;if($137){$i$01$i=0;while(1){$138=($gfc+84936|0)+($i$01$i<<2)|0;HEAP32[$138>>2]=$$lobit$i;$139=$i$01$i+1|0;$140=HEAP32[$135>>2]|0;$141=($139|0)<($140|0);if($141){$i$01$i=$139}else{break}}}$143=($max_bits+($gr$0<<3)|0)+($ch$022<<2)|0;$144=HEAP32[$143>>2]|0;$145=($144|0)==0;if($145){$used_bits$2=$used_bits$124}else{$146=($l3_xmin+($gr$0*312|0)|0)+($ch$022*156|0)|0;$147=($min_bits+($gr$0<<3)|0)+($ch$022<<2)|0;$148=HEAP32[$147>>2]|0;$149=$148+$144|0;$150=($149|0)/2&-1;$151=HEAP32[$117>>2]|0;_memset($118|0,0,2304)|0;$152=$144+-42|0;$153=((($gfc+304|0)+($gr$0*10504|0)|0)+($ch$022*5252|0)|0)+4768|0;$$0$i1=$148;$$01$i=$144;$found$0$i=0;$this_bits$0$i=$150;while(1){$154=($this_bits$0$i|0)>($152|0);$$$i=$154?0:$151;HEAP32[$117>>2]=$$$i;$155=_outer_loop($gfc,$123,$146,$xrpow,$ch$022,$this_bits$0$i)|0;$156=($155|0)<1;if($156){$157=HEAP32[$153>>2]|0;_memcpy($bst_cod_info$i|0,$123|0,5252)|0;_memcpy($bst_xrpow$i|0,$xrpow|0,2304)|0;$158=$157+-32|0;$159=$158-$$0$i1|0;$160=$158+$$0$i1|0;$161=($160|0)/2&-1;$$1$i=$$0$i1;$$12$i=$158;$dbits$0$i=$159;$found$1$i=1;$this_bits$1$i=$161}else{$162=$this_bits$0$i+32|0;$163=$$01$i-$162|0;$164=$$01$i+$162|0;$165=($164|0)/2&-1;$166=($found$0$i|0)==0;if($166){$$1$i=$162;$$12$i=$$01$i;$dbits$0$i=$163;$found$1$i=0;$this_bits$1$i=$165}else{_memcpy($123|0,$bst_cod_info$i|0,5252)|0;_memcpy($xrpow|0,$bst_xrpow$i|0,2304)|0;$$1$i=$162;$$12$i=$$01$i;$dbits$0$i=$163;$found$1$i=2;$this_bits$1$i=$165}}$167=($dbits$0$i|0)>12;if($167){$$0$i1=$$1$i;$$01$i=$$12$i;$found$0$i=$found$1$i;$this_bits$0$i=$this_bits$1$i}else{$found$1$i$lcssa=$found$1$i;break}}HEAP32[$117>>2]=$151;$168=($found$1$i$lcssa|0)==2;if($168){$169=((($gfc+304|0)+($gr$0*10504|0)|0)+($ch$022*5252|0)|0)+2304|0;_memcpy($169|0,$118|0,2304)|0}$170=HEAP32[$116>>2]|0;$171=$170&1;$172=($171|0)==0;if(!$172){_trancate_smallspectrums($gfc,$123,$146,$xrpow)}$173=HEAP32[$153>>2]|0;$174=((($gfc+304|0)+($gr$0*10504|0)|0)+($ch$022*5252|0)|0)+4844|0;$175=HEAP32[$174>>2]|0;$176=$173+$used_bits$124|0;$177=$176+$175|0;$used_bits$2=$177}}else{$142=((($gfc+304|0)+($gr$0*10504|0)|0)+($ch$022*5252|0)|0)+2304|0;_memset($142|0,0,2304)|0;$used_bits$2=$used_bits$124}$178=$ch$022+1|0;$179=HEAP32[$$pre$phiZ2D>>2]|0;$180=($178|0)<($179|0);if($180){$ch$022=$178;$used_bits$124=$used_bits$2}else{$used_bits$2$lcssa=$used_bits$2;break}}$$pre$pre$pre=HEAP32[$4>>2]|0;$$pre$pre=$$pre$pre$pre;$used_bits$1$lcssa=$used_bits$2$lcssa}else{$$pre$pre=$120;$used_bits$1$lcssa=$used_bits$0}$181=$gr$0+1|0;$120=$$pre$pre;$gr$0=$181;$used_bits$0=$used_bits$1$lcssa}if(!$196){$265=HEAP32[$mean_bits>>2]|0;_ResvFrameEnd($gfc,$265);STACKTOP=sp;return}$197=$gfc+304|0;$198=$gfc+36|0;$$pre34=HEAP32[$$pre$phiZ2D>>2]|0;$254=$$pre34;$271=$195;$gr$116=0;while(1){$255=($254|0)>0;if($255){$ch$115=0;while(1){$256=(($gfc+304|0)+($gr$116*10504|0)|0)+($ch$115*5252|0)|0;_best_scalefac_store($gfc,$gr$116,$ch$115,$197);$257=HEAP32[$198>>2]|0;$258=($257|0)==1;if($258){_best_huffman_divide($gfc,$256)}_ResvAdjust($gfc,$256);$259=$ch$115+1|0;$260=HEAP32[$$pre$phiZ2D>>2]|0;$261=($259|0)<($260|0);if($261){$ch$115=$259}else{$$lcssa=$260;break}}$$pre35=HEAP32[$4>>2]|0;$264=$$pre35;$272=$$lcssa}else{$264=$271;$272=$254}$262=$gr$116+1|0;$263=($262|0)<($264|0);if($263){$254=$272;$271=$264;$gr$116=$262}else{break}}$265=HEAP32[$mean_bits>>2]|0;_ResvFrameEnd($gfc,$265);STACKTOP=sp;return}function _VBR_new_iteration_loop($gfc,$pe,$ms_ener_ratio,$ratio){$gfc=$gfc|0;$pe=$pe|0;$ms_ener_ratio=$ms_ener_ratio|0;$ratio=$ratio|0;var $$i$0=0,$$lcssa=0,$$lcssa65=0,$$lcssa69=0,$$lobit$i=0,$$pre=0,$$pre$i=0,$$pre$i$lcssa=0,$$pre44=0,$$pre45=0,$$pre46=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0;var $106=0,$107=0,$108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0;var $124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0;var $142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0;var $160=0,$161=0,$162=0,$163=0,$164=0,$165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0;var $25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0.0,$41=0,$42=0.0;var $43=0.0,$44=0.0,$45=0.0,$46=0.0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0.0,$52=0.0,$53=0.0,$54=0.0,$55=0.0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0;var $61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0;var $8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0.0;var $98=0,$99=0,$analog_silence$0$lcssa2526$i=0,$analog_silence$0$lcssa2527$i=0,$analog_silence$014$i=0,$analog_silence$1$$i=0,$analog_silence$1$lcssa$i=0,$analog_silence$1$lcssa$i$lcssa=0,$analog_silence$110$i=0,$avg$i=0,$bits$015$i=0,$bits$1$lcssa$i=0,$bits$1$lcssa$i$lcssa=0,$bits$111$i=0,$ch$026=0,$ch$09$i=0,$ch$15$i=0,$ch$19=0,$exitcond$i$i=0,$frameBits=0;var $gr$016$i=0,$gr$029=0,$gr$110=0,$gr$16$i=0,$i$0$lcssa=0,$i$0$ph=0,$i$01$i=0,$i$01$i$i=0,$i$01$i2$i=0,$i$018=0,$j$0$lcssa=0,$j$013=0,$l3_xmin=0,$max_bits=0,$maximum_framebits$0$i=0,$mean_bits=0,$or$cond$i=0,$sum$i=0,$vararg_buffer=0,$xrpow=0;var label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+9936|0;$vararg_buffer=sp;$sum$i=sp+9932|0;$avg$i=sp+9928|0;$l3_xmin=sp+9304|0;$xrpow=sp+88|0;$frameBits=sp+24|0;$max_bits=sp+8|0;$mean_bits=sp+4|0;_memset($xrpow|0,0,9216)|0;$0=$gfc+152|0;$1=HEAP32[$0>>2]|0;$2=($1|0)==0;if($2){$3=$gfc+116|0;$4=HEAP32[$3>>2]|0;$5=$gfc+84744|0;HEAP32[$5>>2]=$4;_ResvFrameBegin($gfc,$avg$i)|0;$6=$gfc+52144|0;$7=HEAP32[$6>>2]|0;$8=$gfc+112|0;$9=HEAP32[$8>>2]|0;HEAP32[$5>>2]=$9;HEAP32[$5>>2]=1;$10=_getframebits($gfc)|0;HEAP32[$sum$i>>2]=$10;$11=HEAP32[$3>>2]|0;$12=($11|0)<1;if($12){$19=$11}else{$i$01$i$i=1;while(1){HEAP32[$5>>2]=$i$01$i$i;$13=_ResvFrameBegin($gfc,$sum$i)|0;$14=$frameBits+($i$01$i$i<<2)|0;HEAP32[$14>>2]=$13;$15=$i$01$i$i+1|0;$16=HEAP32[$3>>2]|0;$17=($i$01$i$i|0)<($16|0);if($17){$i$01$i$i=$15}else{$19=$16;break}}}$18=$frameBits+($19<<2)|0;$20=HEAP32[$18>>2]|0;$163=$7;$maximum_framebits$0$i=$20}else{$21=$gfc+84744|0;HEAP32[$21>>2]=0;$22=_ResvFrameBegin($gfc,$avg$i)|0;HEAP32[$frameBits>>2]=$22;$23=$gfc+52144|0;$24=HEAP32[$23>>2]|0;$163=$24;$maximum_framebits$0$i=$22}$25=$gfc+76|0;$26=HEAP32[$25>>2]|0;$27=($26|0)>0;if($27){$28=$gfc+84756|0;$29=$gfc+72|0;$30=$gfc+84912|0;$31=$gfc+84908|0;$analog_silence$014$i=1;$bits$015$i=0;$gr$016$i=0;while(1){$35=$max_bits+($gr$016$i<<3)|0;$36=HEAP32[$avg$i>>2]|0;_on_pe($gfc,$pe,$35,$36,$gr$016$i,0)|0;$37=HEAP32[$28>>2]|0;$38=($37|0)==2;if($38){$i$01$i2$i=0;while(1){$39=(($gfc+304|0)+($gr$016$i*10504|0)|0)+($i$01$i2$i<<2)|0;$40=+HEAPF32[$39>>2];$41=((($gfc+304|0)+($gr$016$i*10504|0)|0)+5252|0)+($i$01$i2$i<<2)|0;$42=+HEAPF32[$41>>2];$43=$42+$40;$44=$43*0.70710676908493042;HEAPF32[$39>>2]=$44;$45=$40-$42;$46=$45*0.70710676908493042;HEAPF32[$41>>2]=$46;$47=$i$01$i2$i+1|0;$exitcond$i$i=($47|0)==576;if($exitcond$i$i){break}else{$i$01$i2$i=$47}}}$48=HEAP32[$29>>2]|0;$49=($48|0)>0;if($49){$analog_silence$110$i=$analog_silence$014$i;$bits$111$i=$bits$015$i;$ch$09$i=0;while(1){$50=(($gfc+304|0)+($gr$016$i*10504|0)|0)+($ch$09$i*5252|0)|0;$51=+HEAPF32[$30>>2];$52=$51;$53=$52*0.10000000000000001;$54=+Math_pow(10.0,+$53);$55=$54;HEAPF32[$31>>2]=$55;_init_outer_loop($gfc,$50);$56=($ratio+($gr$016$i*976|0)|0)+($ch$09$i*488|0)|0;$57=($l3_xmin+($gr$016$i*312|0)|0)+($ch$09$i*156|0)|0;$58=_calc_xmin($gfc,$56,$50,$57)|0;$59=($58|0)==0;$analog_silence$1$$i=$59?$analog_silence$110$i:0;$60=($max_bits+($gr$016$i<<3)|0)+($ch$09$i<<2)|0;$61=HEAP32[$60>>2]|0;$62=$61+$bits$111$i|0;$63=$ch$09$i+1|0;$64=HEAP32[$29>>2]|0;$65=($63|0)<($64|0);if($65){$analog_silence$110$i=$analog_silence$1$$i;$bits$111$i=$62;$ch$09$i=$63}else{$$pre$i=$64;$analog_silence$1$lcssa$i=$analog_silence$1$$i;$bits$1$lcssa$i=$62;break}}}else{$$pre$i=$48;$analog_silence$1$lcssa$i=$analog_silence$014$i;$bits$1$lcssa$i=$bits$015$i}$66=$gr$016$i+1|0;$67=HEAP32[$25>>2]|0;$68=($66|0)<($67|0);if($68){$analog_silence$014$i=$analog_silence$1$lcssa$i;$bits$015$i=$bits$1$lcssa$i;$gr$016$i=$66}else{$$lcssa69=$67;$$pre$i$lcssa=$$pre$i;$analog_silence$1$lcssa$i$lcssa=$analog_silence$1$lcssa$i;$bits$1$lcssa$i$lcssa=$bits$1$lcssa$i;break}}$32=($$lcssa69|0)>0;if($32){$33=($bits$1$lcssa$i$lcssa|0)>($maximum_framebits$0$i|0);$34=($bits$1$lcssa$i$lcssa|0)>0;$or$cond$i=$33&$34;$69=$$pre$i$lcssa;$gr$16$i=0;while(1){$70=($69|0)>0;if($70){$165=$69;$ch$15$i=0;while(1){if($or$cond$i){$71=($max_bits+($gr$16$i<<3)|0)+($ch$15$i<<2)|0;$72=HEAP32[$71>>2]|0;$73=Math_imul($72,$maximum_framebits$0$i)|0;$74=($73|0)/($bits$1$lcssa$i$lcssa|0)&-1;HEAP32[$71>>2]=$74;$77=$$pre$i$lcssa}else{$77=$165}$75=$ch$15$i+1|0;$76=($75|0)<($77|0);if($76){$165=$77;$ch$15$i=$75}else{$166=$77;break}}}else{$166=$69}$78=$gr$16$i+1|0;$79=($78|0)<($$lcssa69|0);if($79){$69=$166;$gr$16$i=$78}else{break}}}$80=($analog_silence$1$lcssa$i$lcssa|0)==0;if($80){$134=$163;$81=$$lcssa69;$analog_silence$0$lcssa2527$i=0}else{$164=$$lcssa69;$analog_silence$0$lcssa2526$i=$analog_silence$1$lcssa$i$lcssa;label=21}}else{$164=$26;$analog_silence$0$lcssa2526$i=1;label=21}if((label|0)==21){$134=0;$81=$164;$analog_silence$0$lcssa2527$i=$analog_silence$0$lcssa2526$i}$82=($81|0)>0;if($82){$83=$gfc+72|0;$84=$gfc+85824|0;$85=$gfc+85096|0;$$pre=HEAP32[$83>>2]|0;$167=$81;$86=$$pre;$gr$029=0;while(1){$87=($86|0)>0;if($87){$ch$026=0;while(1){$88=(($gfc+304|0)+($gr$029*10504|0)|0)+($ch$026*5252|0)|0;$89=($xrpow+($gr$029*4608|0)|0)+($ch$026*2304|0)|0;HEAPF32[$sum$i>>2]=0.0;$90=((($gfc+304|0)+($gr$029*10504|0)|0)+($ch$026*5252|0)|0)+5208|0;$91=HEAP32[$90>>2]|0;$92=((($gfc+304|0)+($gr$029*10504|0)|0)+($ch$026*5252|0)|0)+4764|0;HEAPF32[$92>>2]=0.0;$93=(($xrpow+($gr$029*4608|0)|0)+($ch$026*2304|0)|0)+($91<<2)|0;$94=576-$91|0;$95=$94<<2;_memset($93|0,0,$95|0)|0;$96=HEAP32[$84>>2]|0;FUNCTION_TABLE_viiii[$96&7]($88,$89,$91,$sum$i);$97=+HEAPF32[$sum$i>>2];$98=$97>9.9999996826552254E-21;if($98){$99=HEAP32[$85>>2]|0;$100=$99>>>1;$$lobit$i=$100&1;$101=((($gfc+304|0)+($gr$029*10504|0)|0)+($ch$026*5252|0)|0)+4864|0;$102=HEAP32[$101>>2]|0;$103=($102|0)>0;if($103){$i$01$i=0;while(1){$104=($gfc+84936|0)+($i$01$i<<2)|0;HEAP32[$104>>2]=$$lobit$i;$105=$i$01$i+1|0;$106=HEAP32[$101>>2]|0;$107=($105|0)<($106|0);if($107){$i$01$i=$105}else{break}}}}else{$108=((($gfc+304|0)+($gr$029*10504|0)|0)+($ch$026*5252|0)|0)+2304|0;_memset($108|0,0,2304)|0;$109=($max_bits+($gr$029<<3)|0)+($ch$026<<2)|0;HEAP32[$109>>2]=0}$110=$ch$026+1|0;$111=HEAP32[$83>>2]|0;$112=($110|0)<($111|0);if($112){$ch$026=$110}else{$$lcssa65=$111;break}}$$pre44=HEAP32[$25>>2]|0;$115=$$pre44;$168=$$lcssa65}else{$115=$167;$168=$86}$113=$gr$029+1|0;$114=($113|0)<($115|0);if($114){$167=$115;$86=$168;$gr$029=$113}else{break}}}$116=_VBR_encode_frame($gfc|0,$xrpow|0,$l3_xmin|0,$max_bits|0)|0;$117=HEAP32[$0>>2]|0;$118=($117|0)==0;do{if($118){$119=($analog_silence$0$lcssa2527$i|0)==0;if($119){label=36}else{$120=$gfc+124|0;$121=HEAP32[$120>>2]|0;$122=($121|0)==0;if($122){$i$0$ph=1}else{label=36}}if((label|0)==36){$123=$gfc+112|0;$124=HEAP32[$123>>2]|0;$i$0$ph=$124}$125=$gfc+116|0;$126=HEAP32[$125>>2]|0;$127=($i$0$ph|0)<($126|0);L63:do{if($127){$i$018=$i$0$ph;while(1){$128=$frameBits+($i$018<<2)|0;$129=HEAP32[$128>>2]|0;$130=($116|0)>($129|0);if(!$130){$i$0$lcssa=$i$018;break L63}$131=$i$018+1|0;$132=($131|0)<($126|0);if($132){$i$018=$131}else{$i$0$lcssa=$131;break}}}else{$i$0$lcssa=$i$0$ph}}while(0);$133=($i$0$lcssa|0)>($126|0);$$i$0=$133?$126:$i$0$lcssa;$135=($134|0)>0;if(!$135){$144=$gfc+84744|0;HEAP32[$144>>2]=$$i$0;$147=$$i$0;break}$136=($126|0)>($$i$0|0);L71:do{if($136){$j$013=$126;while(1){$137=$frameBits+($j$013<<2)|0;$138=HEAP32[$137>>2]|0;$139=$138-$116|0;$140=($139|0)>($134|0);if(!$140){$j$0$lcssa=$j$013;break L71}$141=$j$013+-1|0;$142=($141|0)>($$i$0|0);if($142){$j$013=$141}else{$j$0$lcssa=$141;break}}}else{$j$0$lcssa=$126}}while(0);$143=$gfc+84744|0;HEAP32[$143>>2]=$j$0$lcssa;$147=$j$0$lcssa}else{$145=$gfc+84744|0;HEAP32[$145>>2]=0;$147=0}}while(0);$146=$frameBits+($147<<2)|0;$148=HEAP32[$146>>2]|0;$149=($116|0)>($148|0);if($149){_lame_errorf($gfc,11768,$vararg_buffer);_exit(-1)}_ResvFrameBegin($gfc,$mean_bits)|0;$150=HEAP32[$25>>2]|0;$151=($150|0)>0;if(!$151){$162=HEAP32[$mean_bits>>2]|0;_ResvFrameEnd($gfc,$162);STACKTOP=sp;return}$152=$gfc+72|0;$$pre45=HEAP32[$152>>2]|0;$153=$$pre45;$169=$150;$gr$110=0;while(1){$154=($153|0)>0;if($154){$ch$19=0;while(1){$155=(($gfc+304|0)+($gr$110*10504|0)|0)+($ch$19*5252|0)|0;_ResvAdjust($gfc,$155);$156=$ch$19+1|0;$157=HEAP32[$152>>2]|0;$158=($156|0)<($157|0);if($158){$ch$19=$156}else{$$lcssa=$157;break}}$$pre46=HEAP32[$25>>2]|0;$161=$$pre46;$170=$$lcssa}else{$161=$169;$170=$153}$159=$gr$110+1|0;$160=($159|0)<($161|0);if($160){$153=$170;$169=$161;$gr$110=$159}else{break}}$162=HEAP32[$mean_bits>>2]|0;_ResvFrameEnd($gfc,$162);STACKTOP=sp;return}function _ABR_iteration_loop($gfc,$pe,$ms_ener_ratio,$ratio){$gfc=$gfc|0;$pe=$pe|0;$ms_ener_ratio=$ms_ener_ratio|0;$ratio=$ratio|0;var $$add_bits$0$i=0,$$lcssa39=0,$$lobit$i=0,$$pre=0,$$pre$i=0,$$pre37$i=0,$$pre38$i=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0;var $11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0;var $128=0,$129=0,$13=0,$130=0,$131=0.0,$132=0,$133=0.0,$134=0.0,$135=0.0,$136=0.0,$137=0.0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0.0;var $146=0.0,$147=0.0,$148=0.0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0.0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0;var $164=0,$165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0;var $182=0,$183=0,$184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0.0,$26=0.0;var $27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0.0,$36=0.0,$37=0.0,$38=0.0,$39=0.0,$4=0,$40=0.0,$41=0.0,$42=0,$43=0,$44=0;var $45=0.0,$46=0.0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0.0,$55=0,$56=0.0,$57=0.0,$58=0.0,$59=0,$6=0,$60=0,$61=0,$62=0;var $63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0;var $81=0,$82=0,$83=0,$84=0,$85=0,$86=0.0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0.0,$97=0,$98=0,$99=0;var $add_bits$0$i=0,$add_bits$1$i=0,$ch$013=0,$ch$023$i=0,$ch$128$i=0,$ch$212$i=0,$ch$39$i=0,$exitcond$i=0,$gr$015=0,$gr$030$i=0,$gr$217$i=0,$gr$310$i=0,$i$01$i=0,$i$01$i1=0,$l3_xmin=0,$masking_lower_db$0=0.0,$masking_lower_db$0$in=0,$mean_bits=0,$or$cond$i=0,$res_factor$0$i=0.0;var $res_factor$1$i=0.0,$sum$024$i=0,$sum$i=0,$targ_bits=0,$totbits$016$i=0,$totbits$1$lcssa$i=0,$totbits$1$lcssa$i$lcssa=0,$totbits$113$i=0,$xrpow=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+2496|0;$sum$i=sp+2484|0;$l3_xmin=sp+2328|0;$xrpow=sp+24|0;$targ_bits=sp+8|0;$mean_bits=sp;$0=$gfc+304|0;HEAP32[$mean_bits>>2]=0;$1=$gfc+76|0;$2=HEAP32[$1>>2]|0;$3=$gfc+116|0;$4=HEAP32[$3>>2]|0;$5=$gfc+84744|0;HEAP32[$5>>2]=$4;$6=_ResvFrameBegin($gfc,$sum$i)|0;HEAP32[$5>>2]=1;$7=_getframebits($gfc)|0;$8=$gfc+24|0;$9=HEAP32[$8>>2]|0;$10=$9<<3;$11=$7-$10|0;$12=HEAP32[$1>>2]|0;$13=$gfc+72|0;$14=HEAP32[$13>>2]|0;$15=Math_imul($14,$12)|0;$16=($11|0)/($15|0)&-1;$17=$gfc+108|0;$18=HEAP32[$17>>2]|0;$19=$2*576000|0;$20=Math_imul($19,$18)|0;HEAP32[$sum$i>>2]=$20;$21=$gfc+85096|0;$22=HEAP32[$21>>2]|0;$23=$22&1;$24=($23|0)==0;if($24){$31=$20}else{$25=+($20|0);$26=$25*1.0900000000000001;$27=~~$26;HEAP32[$sum$i>>2]=$27;$31=$27}$28=$gfc+64|0;$29=HEAP32[$28>>2]|0;$30=($31|0)/($29|0)&-1;$32=$30-$10|0;$33=($32|0)/($15|0)&-1;HEAP32[$sum$i>>2]=$33;$34=$gfc+244|0;$35=+HEAPF32[$34>>2];$36=$35;$37=11.0-$36;$38=$37*0.012727272727272728;$39=$38+0.93000000000000005;$40=$39;$41=$40;$42=$41<0.90000000000000002;$res_factor$0$i=$42?0.89999997615814208:$40;$43=($12|0)>0;if($43){$44=$res_factor$0$i>1.0;$res_factor$1$i=$44?1.0:$res_factor$0$i;$45=+($33|0);$46=$res_factor$1$i*$45;$47=~~$46;$48=($33|0)/2&-1;$49=$33*3|0;$50=($49|0)/2&-1;$51=($14|0)>0;$gr$030$i=0;while(1){if($51){$ch$023$i=0;$sum$024$i=0;while(1){$52=($targ_bits+($gr$030$i<<3)|0)+($ch$023$i<<2)|0;HEAP32[$52>>2]=$47;$53=($pe+($gr$030$i<<3)|0)+($ch$023$i<<2)|0;$54=+HEAPF32[$53>>2];$55=$54>700.0;if($55){$56=$54+-700.0;$57=$56;$58=$57*0.7142857142857143;$59=~~$58;$60=((($gfc+304|0)+($gr$030$i*10504|0)|0)+($ch$023$i*5252|0)|0)+4788|0;$61=HEAP32[$60>>2]|0;$62=($61|0)==2;$63=($59|0)<($48|0);$64=$63&$62;$add_bits$0$i=$64?$48:$59;$65=($add_bits$0$i|0)>($50|0);$66=($add_bits$0$i|0)<0;$$add_bits$0$i=$66?0:$add_bits$0$i;$add_bits$1$i=$65?$50:$$add_bits$0$i;$67=$add_bits$1$i+$47|0;HEAP32[$52>>2]=$67;$68=$67}else{$68=$47}$69=($68|0)>4095;if($69){HEAP32[$52>>2]=4095;$71=4095}else{$71=$68}$70=$71+$sum$024$i|0;$72=$ch$023$i+1|0;$73=($72|0)<($14|0);if($73){$ch$023$i=$72;$sum$024$i=$70}else{$$lcssa39=$70;break}}$74=($$lcssa39|0)>7680;if($74){$ch$128$i=0;while(1){$75=($targ_bits+($gr$030$i<<3)|0)+($ch$128$i<<2)|0;$76=HEAP32[$75>>2]|0;$77=$76*7680|0;$78=($77|0)/($$lcssa39|0)&-1;HEAP32[$75>>2]=$78;$79=$ch$128$i+1|0;$80=($79|0)<($14|0);if($80){$ch$128$i=$79}else{break}}}}$81=$gr$030$i+1|0;$82=($81|0)<($12|0);if($82){$gr$030$i=$81}else{break}}}$83=$gfc+84756|0;$84=HEAP32[$83>>2]|0;$85=($84|0)==2;if($85){if($43){$86=+HEAPF32[$ms_ener_ratio>>2];$87=Math_imul($33,$14)|0;_reduce_side($targ_bits,$86,$87,7680);$88=HEAP32[$1>>2]|0;$89=($88|0)>1;if($89){$94=1;while(1){$$pre$i=HEAP32[$sum$i>>2]|0;$$pre37$i=HEAP32[$13>>2]|0;$93=$targ_bits+($94<<3)|0;$95=$ms_ener_ratio+($94<<2)|0;$96=+HEAPF32[$95>>2];$97=Math_imul($$pre$i,$$pre37$i)|0;_reduce_side($93,$96,$97,7680);$98=$94+1|0;$99=HEAP32[$1>>2]|0;$100=($98|0)<($99|0);if($100){$94=$98}else{$90=$99;label=17;break}}}else{$90=$88;label=17}}else{label=30}}else{$90=$12;label=17}if((label|0)==17){$91=($90|0)>0;if($91){$$pre38$i=HEAP32[$13>>2]|0;$92=($$pre38$i|0)>0;$gr$217$i=0;$totbits$016$i=0;while(1){if($92){$ch$212$i=0;$totbits$113$i=$totbits$016$i;while(1){$101=($targ_bits+($gr$217$i<<3)|0)+($ch$212$i<<2)|0;$102=HEAP32[$101>>2]|0;$103=($102|0)>4095;if($103){HEAP32[$101>>2]=4095;$105=4095}else{$105=$102}$104=$105+$totbits$113$i|0;$106=$ch$212$i+1|0;$107=($106|0)<($$pre38$i|0);if($107){$ch$212$i=$106;$totbits$113$i=$104}else{$totbits$1$lcssa$i=$104;break}}}else{$totbits$1$lcssa$i=$totbits$016$i}$108=$gr$217$i+1|0;$109=($108|0)<($90|0);if($109){$gr$217$i=$108;$totbits$016$i=$totbits$1$lcssa$i}else{$totbits$1$lcssa$i$lcssa=$totbits$1$lcssa$i;break}}$110=($totbits$1$lcssa$i$lcssa|0)>($6|0);$111=($totbits$1$lcssa$i$lcssa|0)>0;$or$cond$i=$111&$110;if($or$cond$i){$112=($$pre38$i|0)>0;$192=$90;$gr$310$i=0;while(1){if($112){$ch$39$i=0;while(1){$113=($targ_bits+($gr$310$i<<3)|0)+($ch$39$i<<2)|0;$114=HEAP32[$113>>2]|0;$115=Math_imul($114,$6)|0;$116=($115|0)/($totbits$1$lcssa$i$lcssa|0)&-1;HEAP32[$113>>2]=$116;$117=$ch$39$i+1|0;$118=($117|0)<($$pre38$i|0);if($118){$ch$39$i=$117}else{$121=$90;break}}}else{$121=$192}$119=$gr$310$i+1|0;$120=($119|0)<($121|0);if($120){$192=$121;$gr$310$i=$119}else{break}}}$122=($90|0)>0;if($122){$123=$gfc+84912|0;$124=$gfc+84916|0;$125=$gfc+84908|0;$126=$gfc+85824|0;$127=$gfc+36|0;$gr$015=0;while(1){$128=HEAP32[$83>>2]|0;$129=($128|0)==2;if($129){$i$01$i=0;while(1){$130=(($gfc+304|0)+($gr$015*10504|0)|0)+($i$01$i<<2)|0;$131=+HEAPF32[$130>>2];$132=((($gfc+304|0)+($gr$015*10504|0)|0)+5252|0)+($i$01$i<<2)|0;$133=+HEAPF32[$132>>2];$134=$133+$131;$135=$134*0.70710676908493042;HEAPF32[$130>>2]=$135;$136=$131-$133;$137=$136*0.70710676908493042;HEAPF32[$132>>2]=$137;$138=$i$01$i+1|0;$exitcond$i=($138|0)==576;if($exitcond$i){break}else{$i$01$i=$138}}}$139=HEAP32[$13>>2]|0;$140=($139|0)>0;if($140){$ch$013=0;while(1){$141=(($gfc+304|0)+($gr$015*10504|0)|0)+($ch$013*5252|0)|0;$142=((($gfc+304|0)+($gr$015*10504|0)|0)+($ch$013*5252|0)|0)+4788|0;$143=HEAP32[$142>>2]|0;$144=($143|0)==2;$masking_lower_db$0$in=$144?$124:$123;$masking_lower_db$0=+HEAPF32[$masking_lower_db$0$in>>2];$145=$masking_lower_db$0;$146=$145*0.10000000000000001;$147=+Math_pow(10.0,+$146);$148=$147;HEAPF32[$125>>2]=$148;_init_outer_loop($gfc,$141);HEAPF32[$sum$i>>2]=0.0;$149=((($gfc+304|0)+($gr$015*10504|0)|0)+($ch$013*5252|0)|0)+5208|0;$150=HEAP32[$149>>2]|0;$151=((($gfc+304|0)+($gr$015*10504|0)|0)+($ch$013*5252|0)|0)+4764|0;HEAPF32[$151>>2]=0.0;$152=$xrpow+($150<<2)|0;$153=576-$150|0;$154=$153<<2;_memset($152|0,0,$154|0)|0;$155=HEAP32[$126>>2]|0;FUNCTION_TABLE_viiii[$155&7]($141,$xrpow,$150,$sum$i);$156=+HEAPF32[$sum$i>>2];$157=$156>9.9999996826552254E-21;if($157){$158=HEAP32[$21>>2]|0;$159=$158>>>1;$$lobit$i=$159&1;$160=((($gfc+304|0)+($gr$015*10504|0)|0)+($ch$013*5252|0)|0)+4864|0;$161=HEAP32[$160>>2]|0;$162=($161|0)>0;if($162){$i$01$i1=0;while(1){$163=($gfc+84936|0)+($i$01$i1<<2)|0;HEAP32[$163>>2]=$$lobit$i;$164=$i$01$i1+1|0;$165=HEAP32[$160>>2]|0;$166=($164|0)<($165|0);if($166){$i$01$i1=$164}else{break}}}$168=($ratio+($gr$015*976|0)|0)+($ch$013*488|0)|0;$169=_calc_xmin($gfc,$168,$141,$l3_xmin)|0;$170=($169|0)==0;$171=($targ_bits+($gr$015<<3)|0)+($ch$013<<2)|0;if($170){HEAP32[$171>>2]=$16;$172=$16}else{$$pre=HEAP32[$171>>2]|0;$172=$$pre}_outer_loop($gfc,$141,$l3_xmin,$xrpow,$ch$013,$172)|0}else{$167=((($gfc+304|0)+($gr$015*10504|0)|0)+($ch$013*5252|0)|0)+2304|0;_memset($167|0,0,2304)|0}_best_scalefac_store($gfc,$gr$015,$ch$013,$0);$173=HEAP32[$127>>2]|0;$174=($173|0)==1;if($174){_best_huffman_divide($gfc,$141)}_ResvAdjust($gfc,$141);$175=$ch$013+1|0;$176=HEAP32[$13>>2]|0;$177=($175|0)<($176|0);if($177){$ch$013=$175}else{break}}}$178=$gr$015+1|0;$179=HEAP32[$1>>2]|0;$180=($178|0)<($179|0);if($180){$gr$015=$178}else{break}}}}else{label=30}}if((label|0)==30){}$181=$gfc+112|0;$182=HEAP32[$181>>2]|0;HEAP32[$5>>2]=$182;$183=HEAP32[$3>>2]|0;$184=($182|0)>($183|0);if($184){$191=HEAP32[$mean_bits>>2]|0;_ResvFrameEnd($gfc,$191);STACKTOP=sp;return}while(1){$185=_ResvFrameBegin($gfc,$mean_bits)|0;$186=($185|0)>-1;if($186){label=51;break}$187=HEAP32[$5>>2]|0;$188=$187+1|0;HEAP32[$5>>2]=$188;$189=HEAP32[$3>>2]|0;$190=($187|0)<($189|0);if(!$190){label=51;break}}if((label|0)==51){$191=HEAP32[$mean_bits>>2]|0;_ResvFrameEnd($gfc,$191);STACKTOP=sp;return}}function _CBR_iteration_loop($gfc,$pe,$ms_ener_ratio,$ratio){$gfc=$gfc|0;$pe=$pe|0;$ms_ener_ratio=$ms_ener_ratio|0;$ratio=$ratio|0;var $$lobit$i=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0.0,$18=0,$19=0.0,$2=0,$20=0.0,$21=0.0,$22=0.0,$23=0.0,$24=0,$25=0;var $26=0.0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0.0,$35=0.0,$36=0.0,$37=0.0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0;var $44=0,$45=0.0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0;var $62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$7=0,$8=0,$9=0,$ch$03=0,$exitcond$i=0,$gr$04=0,$i$01$i=0,$i$01$i1=0,$l3_xmin=0,$masking_lower_db$0=0.0,$masking_lower_db$0$in=0,$mean_bits=0,$sum$i=0;var $targ_bits=0,$xrpow=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+2480|0;$sum$i=sp+2476|0;$l3_xmin=sp+2320|0;$xrpow=sp+16|0;$targ_bits=sp+8|0;$mean_bits=sp;$0=$gfc+304|0;_ResvFrameBegin($gfc,$mean_bits)|0;$1=$gfc+76|0;$2=HEAP32[$1>>2]|0;$3=($2|0)>0;if(!$3){$68=HEAP32[$mean_bits>>2]|0;_ResvFrameEnd($gfc,$68);STACKTOP=sp;return}$4=$gfc+84756|0;$5=$gfc+72|0;$6=$gfc+84912|0;$7=$gfc+84916|0;$8=$gfc+84908|0;$9=$gfc+85824|0;$10=$gfc+85096|0;$11=$gfc+36|0;$gr$04=0;while(1){$12=HEAP32[$mean_bits>>2]|0;$13=_on_pe($gfc,$pe,$targ_bits,$12,$gr$04,$gr$04)|0;$14=HEAP32[$4>>2]|0;$15=($14|0)==2;if($15){$i$01$i=0;while(1){$16=(($gfc+304|0)+($gr$04*10504|0)|0)+($i$01$i<<2)|0;$17=+HEAPF32[$16>>2];$18=((($gfc+304|0)+($gr$04*10504|0)|0)+5252|0)+($i$01$i<<2)|0;$19=+HEAPF32[$18>>2];$20=$19+$17;$21=$20*0.70710676908493042;HEAPF32[$16>>2]=$21;$22=$17-$19;$23=$22*0.70710676908493042;HEAPF32[$18>>2]=$23;$24=$i$01$i+1|0;$exitcond$i=($24|0)==576;if($exitcond$i){break}else{$i$01$i=$24}}$25=$ms_ener_ratio+($gr$04<<2)|0;$26=+HEAPF32[$25>>2];$27=HEAP32[$mean_bits>>2]|0;_reduce_side($targ_bits,$26,$27,$13)}$28=HEAP32[$5>>2]|0;$29=($28|0)>0;if($29){$ch$03=0;while(1){$30=(($gfc+304|0)+($gr$04*10504|0)|0)+($ch$03*5252|0)|0;$31=((($gfc+304|0)+($gr$04*10504|0)|0)+($ch$03*5252|0)|0)+4788|0;$32=HEAP32[$31>>2]|0;$33=($32|0)==2;$masking_lower_db$0$in=$33?$7:$6;$masking_lower_db$0=+HEAPF32[$masking_lower_db$0$in>>2];$34=$masking_lower_db$0;$35=$34*0.10000000000000001;$36=+Math_pow(10.0,+$35);$37=$36;HEAPF32[$8>>2]=$37;_init_outer_loop($gfc,$30);HEAPF32[$sum$i>>2]=0.0;$38=((($gfc+304|0)+($gr$04*10504|0)|0)+($ch$03*5252|0)|0)+5208|0;$39=HEAP32[$38>>2]|0;$40=((($gfc+304|0)+($gr$04*10504|0)|0)+($ch$03*5252|0)|0)+4764|0;HEAPF32[$40>>2]=0.0;$41=$xrpow+($39<<2)|0;$42=576-$39|0;$43=$42<<2;_memset($41|0,0,$43|0)|0;$44=HEAP32[$9>>2]|0;FUNCTION_TABLE_viiii[$44&7]($30,$xrpow,$39,$sum$i);$45=+HEAPF32[$sum$i>>2];$46=$45>9.9999996826552254E-21;if($46){$47=HEAP32[$10>>2]|0;$48=$47>>>1;$$lobit$i=$48&1;$49=((($gfc+304|0)+($gr$04*10504|0)|0)+($ch$03*5252|0)|0)+4864|0;$50=HEAP32[$49>>2]|0;$51=($50|0)>0;if($51){$i$01$i1=0;while(1){$52=($gfc+84936|0)+($i$01$i1<<2)|0;HEAP32[$52>>2]=$$lobit$i;$53=$i$01$i1+1|0;$54=HEAP32[$49>>2]|0;$55=($53|0)<($54|0);if($55){$i$01$i1=$53}else{break}}}$57=($ratio+($gr$04*976|0)|0)+($ch$03*488|0)|0;_calc_xmin($gfc,$57,$30,$l3_xmin)|0;$58=$targ_bits+($ch$03<<2)|0;$59=HEAP32[$58>>2]|0;_outer_loop($gfc,$30,$l3_xmin,$xrpow,$ch$03,$59)|0}else{$56=((($gfc+304|0)+($gr$04*10504|0)|0)+($ch$03*5252|0)|0)+2304|0;_memset($56|0,0,2304)|0}_best_scalefac_store($gfc,$gr$04,$ch$03,$0);$60=HEAP32[$11>>2]|0;$61=($60|0)==1;if($61){_best_huffman_divide($gfc,$30)}_ResvAdjust($gfc,$30);$62=$ch$03+1|0;$63=HEAP32[$5>>2]|0;$64=($62|0)<($63|0);if($64){$ch$03=$62}else{break}}}$65=$gr$04+1|0;$66=HEAP32[$1>>2]|0;$67=($65|0)<($66|0);if($67){$gr$04=$65}else{break}}$68=HEAP32[$mean_bits>>2]|0;_ResvFrameEnd($gfc,$68);STACKTOP=sp;return}function _init_xrpow_core_c($cod_info,$xrpow,$upper,$sum){$cod_info=$cod_info|0;$xrpow=$xrpow|0;$upper=$upper|0;$sum=$sum|0;var $$pre=0.0,$0=0,$1=0,$10=0.0,$11=0,$12=0.0,$13=0,$14=0,$2=0,$3=0.0,$4=0.0,$5=0.0,$6=0.0,$7=0.0,$8=0.0,$9=0.0,$exitcond=0,$fabsf=0.0,$i$01=0,label=0;var sp=0;sp=STACKTOP;HEAPF32[$sum>>2]=0.0;$0=($upper|0)<0;if($0){return}$1=$cod_info+4764|0;$5=0.0;$i$01=0;while(1){$2=$cod_info+($i$01<<2)|0;$3=+HEAPF32[$2>>2];$fabsf=+Math_abs(+$3);$4=$5+$fabsf;HEAPF32[$sum>>2]=$4;$6=$fabsf;$7=+Math_sqrt(+$6);$8=$7*$6;$9=+Math_sqrt(+$8);$10=$9;$11=$xrpow+($i$01<<2)|0;HEAPF32[$11>>2]=$10;$12=+HEAPF32[$1>>2];$13=$10>$12;if($13){HEAPF32[$1>>2]=$10}$exitcond=($i$01|0)==($upper|0);if($exitcond){break}$14=$i$01+1|0;$$pre=+HEAPF32[$sum>>2];$5=$$pre;$i$01=$14}return}function _init_outer_loop($gfc,$cod_info){$gfc=$gfc|0;$cod_info=$cod_info|0;var $$phi$trans$insert=0,$$pre=0,$$sink=0,$$sink27=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0.0,$111=0;var $112=0.0,$113=0.0,$114=0.0,$115=0.0,$116=0,$117=0.0,$118=0,$119=0,$12=0,$120=0.0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0;var $130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0.0,$137=0,$138=0.0,$139=0.0,$14=0,$140=0.0,$141=0.0,$142=0,$143=0.0,$144=0,$145=0,$146=0,$147=0.0,$148=0;var $149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0,$164=0,$165=0,$166=0.0;var $167=0,$168=0.0,$169=0.0,$17=0,$170=0.0,$171=0.0,$172=0,$173=0.0,$174=0,$175=0,$176=0,$177=0.0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0,$184=0;var $185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0.0,$198=0,$199=0.0,$2=0,$20=0,$200=0.0,$201=0.0;var $202=0.0,$203=0,$204=0.0,$205=0,$206=0,$207=0,$208=0.0,$209=0,$21=0,$210=0,$211=0,$212=0,$213=0,$214=0,$215=0,$216=0,$217=0,$218=0,$219=0,$22=0;var $220=0,$221=0,$222=0,$223=0,$224=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0;var $37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0;var $55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0;var $73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0;var $91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$ath12$0$i=0.0,$ath12$0$i$1=0.0,$ath12$0$i$2=0.0,$ath21$0$i=0.0,$exitcond=0,$exitcond20=0,$exitcond20$1=0,$exitcond20$2=0,$exitcond25=0,$exitcond26=0,$fabsf$i=0.0;var $fabsf$i$1=0.0,$fabsf$i$2=0.0,$fabsf2$i=0.0,$gsfb$022$i=0,$gsfb1$011$i=0,$gsfb1$011$i$1=0,$gsfb1$011$i$2=0,$ix$013=0,$ix$1$lcssa=0,$ix$26$us=0,$ix$26$us$1=0,$ix$26$us$2=0,$ixwork=0,$j$015$i=0,$j$015$in$i=0,$j$04=0,$j5$08$i=0,$j5$08$i$1=0,$j5$08$i$2=0,$j5$08$in$i=0;var $j5$08$in$i$1=0,$j5$08$in$i$2=0,$l$07$us=0,$l$07$us$1=0,$l$07$us$2=0,$scevgep=0,$scevgep$1=0,$scevgep$1$sum=0,$scevgep$2=0,$scevgep$sum=0,$sfb$018=0,$sfb$114=0,$sfb$25=0,$storemerge=0,dest=0,label=0,sp=0,stop=0;sp=STACKTOP;STACKTOP=STACKTOP+2304|0;$ixwork=sp;$0=$cod_info+4768|0;HEAP32[$0>>2]=0;$1=$cod_info+4772|0;HEAP32[$1>>2]=0;$2=$cod_info+4776|0;HEAP32[$2>>2]=0;$3=$cod_info+4780|0;HEAP32[$3>>2]=210;$4=$cod_info+4784|0;HEAP32[$4>>2]=0;$5=$cod_info+4796|0;$6=$gfc+64|0;dest=$5;stop=dest+52|0;do{HEAP32[dest>>2]=0|0;dest=dest+4|0}while((dest|0)<(stop|0));$7=HEAP32[$6>>2]|0;$8=($7|0)<8001;$9=$cod_info+4848|0;if($8){HEAP32[$9>>2]=17;$$sink=17;$$sink27=9;$18=17}else{HEAP32[$9>>2]=21;$10=$gfc+85092|0;$11=HEAP32[$10>>2]|0;$12=($11|0)!=0;$13=$12?22:21;$$sink=$13;$$sink27=12;$18=21}$14=$cod_info+4852|0;HEAP32[$14>>2]=$$sink27;$15=$cod_info+4856|0;HEAP32[$15>>2]=$$sink;$16=$cod_info+4864|0;HEAP32[$16>>2]=$$sink;$17=$cod_info+4860|0;HEAP32[$17>>2]=$18;$19=$cod_info+4868|0;HEAP32[$19>>2]=11;$sfb$018=0;while(1){$20=$sfb$018+1|0;$21=($gfc+21360|0)+($20<<2)|0;$22=HEAP32[$21>>2]|0;$23=($gfc+21360|0)+($sfb$018<<2)|0;$24=HEAP32[$23>>2]|0;$25=$22-$24|0;$26=($cod_info+4872|0)+($sfb$018<<2)|0;HEAP32[$26>>2]=$25;$27=($cod_info+5028|0)+($sfb$018<<2)|0;HEAP32[$27>>2]=3;$exitcond26=($20|0)==22;if($exitcond26){break}else{$sfb$018=$20}}$28=$cod_info+4788|0;$29=HEAP32[$28>>2]|0;$30=($29|0)==2;if($30){HEAP32[$14>>2]=0;HEAP32[$9>>2]=0;$31=$cod_info+4792|0;$32=HEAP32[$31>>2]|0;$33=($32|0)==0;if($33){$41=0;$44=0}else{HEAP32[$14>>2]=3;$34=$gfc+76|0;$35=HEAP32[$34>>2]|0;$36=$35<<1;$37=$36+4|0;HEAP32[$9>>2]=$37;$41=3;$44=$37}$38=HEAP32[$6>>2]|0;$39=($38|0)<8001;if($39){$40=9-$41|0;$42=$40*3|0;$43=$42+$44|0;HEAP32[$16>>2]=$43;$storemerge=$43}else{$45=$gfc+85092|0;$46=HEAP32[$45>>2]|0;$47=($46|0)!=0;$48=$47?13:12;$49=$48-$41|0;$50=$49*3|0;$51=$50+$44|0;HEAP32[$16>>2]=$51;$52=12-$41|0;$53=$52*3|0;$54=$53+$44|0;$storemerge=$54}HEAP32[$17>>2]=$storemerge;$55=$storemerge+-18|0;HEAP32[$19>>2]=$55;HEAP32[$15>>2]=$44;$56=($gfc+21360|0)+($44<<2)|0;$57=HEAP32[$56>>2]|0;_memcpy($ixwork|0,$cod_info|0,2304)|0;$58=$cod_info+($57<<2)|0;$$phi$trans$insert=($gfc+21452|0)+($41<<2)|0;$$pre=HEAP32[$$phi$trans$insert>>2]|0;$63=$$pre;$ix$013=$58;$sfb$114=$41;while(1){$59=$sfb$114+1|0;$60=($gfc+21452|0)+($59<<2)|0;$61=HEAP32[$60>>2]|0;$62=($61|0)>($63|0);if($62){$69=$61-$63|0;$ix$26$us=$ix$013;$l$07$us=$63;while(1){$64=$l$07$us*3|0;$65=$ixwork+($64<<2)|0;$66=HEAP32[$65>>2]|0;$67=$ix$26$us+4|0;HEAP32[$ix$26$us>>2]=$66;$68=$l$07$us+1|0;$exitcond20=($68|0)==($61|0);if($exitcond20){break}else{$ix$26$us=$67;$l$07$us=$68}}$scevgep=$ix$013+($69<<2)|0;$ix$26$us$1=$scevgep;$l$07$us$1=$63;while(1){$213=$l$07$us$1*3|0;$214=$213+1|0;$215=$ixwork+($214<<2)|0;$216=HEAP32[$215>>2]|0;$217=$ix$26$us$1+4|0;HEAP32[$ix$26$us$1>>2]=$216;$218=$l$07$us$1+1|0;$exitcond20$1=($218|0)==($61|0);if($exitcond20$1){break}else{$ix$26$us$1=$217;$l$07$us$1=$218}}$scevgep$sum=$69<<1;$scevgep$1=$ix$013+($scevgep$sum<<2)|0;$ix$26$us$2=$scevgep$1;$l$07$us$2=$63;while(1){$219=$l$07$us$2*3|0;$220=$219+2|0;$221=$ixwork+($220<<2)|0;$222=HEAP32[$221>>2]|0;$223=$ix$26$us$2+4|0;HEAP32[$ix$26$us$2>>2]=$222;$224=$l$07$us$2+1|0;$exitcond20$2=($224|0)==($61|0);if($exitcond20$2){break}else{$ix$26$us$2=$223;$l$07$us$2=$224}}$scevgep$1$sum=$69*3|0;$scevgep$2=$ix$013+($scevgep$1$sum<<2)|0;$ix$1$lcssa=$scevgep$2}else{$ix$1$lcssa=$ix$013}$exitcond25=($59|0)==13;if($exitcond25){$j$04=$44;$sfb$25=$41;break}else{$63=$61;$ix$013=$ix$1$lcssa;$sfb$114=$59}}while(1){$70=$sfb$25+1|0;$71=($gfc+21452|0)+($70<<2)|0;$72=HEAP32[$71>>2]|0;$73=($gfc+21452|0)+($sfb$25<<2)|0;$74=HEAP32[$73>>2]|0;$75=$72-$74|0;$76=$j$04+2|0;$77=($cod_info+4872|0)+($76<<2)|0;HEAP32[$77>>2]=$75;$78=$j$04+1|0;$79=($cod_info+4872|0)+($78<<2)|0;HEAP32[$79>>2]=$75;$80=($cod_info+4872|0)+($j$04<<2)|0;HEAP32[$80>>2]=$75;$81=($cod_info+5028|0)+($j$04<<2)|0;HEAP32[$81>>2]=0;$82=($cod_info+5028|0)+($78<<2)|0;HEAP32[$82>>2]=1;$83=($cod_info+5028|0)+($76<<2)|0;HEAP32[$83>>2]=2;$84=$j$04+3|0;$exitcond=($70|0)==13;if($exitcond){break}else{$j$04=$84;$sfb$25=$70}}}$85=$cod_info+5184|0;HEAP32[$85>>2]=0;$86=$cod_info+5188|0;HEAP32[$86>>2]=11824;$87=$cod_info+5192|0;$88=$cod_info+5208|0;HEAP32[$87>>2]=0|0;HEAP32[$87+4>>2]=0|0;HEAP32[$87+8>>2]=0|0;HEAP32[$87+12>>2]=0|0;HEAP32[$88>>2]=575;$89=$cod_info+4608|0;_memset($89|0,0,156)|0;$90=$gfc+104|0;$91=HEAP32[$90>>2]|0;if(($91|0)==0|($91|0)==3|($91|0)==4|($91|0)==1){STACKTOP=sp;return}$92=$gfc+85796|0;$93=HEAP32[$92>>2]|0;$94=HEAP32[$28>>2]|0;$95=($94|0)==2;if(!$95){$96=$93+8|0;$97=$93+20|0;$98=$gfc+84852|0;$gsfb$022$i=5;L40:while(1){$105=($gfc+21508|0)+($gsfb$022$i<<2)|0;$106=HEAP32[$105>>2]|0;$107=$gsfb$022$i+1|0;$108=($gfc+21508|0)+($107<<2)|0;$109=HEAP32[$108>>2]|0;$110=+HEAPF32[$96>>2];$111=($93+164|0)+($gsfb$022$i<<2)|0;$112=+HEAPF32[$111>>2];$113=+HEAPF32[$97>>2];$114=+_athAdjust($110,$112,$113,0.0);$115=+HEAPF32[$98>>2];$116=$115>9.999999960041972E-13;$117=$115*$114;$ath21$0$i=$116?$117:$114;$118=($109|0)>($106|0);if($118){$j$015$in$i=$109;while(1){$j$015$i=$j$015$in$i+-1|0;$119=$cod_info+($j$015$i<<2)|0;$120=+HEAPF32[$119>>2];$fabsf2$i=+Math_abs(+$120);$121=$fabsf2$i<$ath21$0$i;if(!$121){label=32;break L40}HEAPF32[$119>>2]=0.0;$122=($j$015$i|0)>($106|0);if($122){$j$015$in$i=$j$015$i}else{break}}}$123=$gsfb$022$i+-1|0;$124=($gsfb$022$i|0)>0;if($124){$gsfb$022$i=$123}else{label=32;break}}if((label|0)==32){STACKTOP=sp;return}}$99=$gfc+21500|0;$100=$gfc+21504|0;$101=$gfc+21536|0;$102=$93+8|0;$103=$93+20|0;$104=$gfc+84904|0;$gsfb1$011$i=5;L51:while(1){$125=HEAP32[$99>>2]|0;$126=$125*3|0;$127=($gfc+21536|0)+($gsfb1$011$i<<2)|0;$128=HEAP32[$127>>2]|0;$129=HEAP32[$101>>2]|0;$130=$128-$129|0;$131=$126+$130|0;$132=$gsfb1$011$i+1|0;$133=($gfc+21536|0)+($132<<2)|0;$134=HEAP32[$133>>2]|0;$135=$134-$128|0;$136=+HEAPF32[$102>>2];$137=($93+188|0)+($gsfb1$011$i<<2)|0;$138=+HEAPF32[$137>>2];$139=+HEAPF32[$103>>2];$140=+_athAdjust($136,$138,$139,0.0);$141=+HEAPF32[$104>>2];$142=$141>9.999999960041972E-13;$143=$141*$140;$ath12$0$i=$142?$143:$140;$144=($135|0)>0;if($144){$145=$135+$131|0;$j5$08$in$i=$145;while(1){$j5$08$i=$j5$08$in$i+-1|0;$146=$cod_info+($j5$08$i<<2)|0;$147=+HEAPF32[$146>>2];$fabsf$i=+Math_abs(+$147);$148=$fabsf$i<$ath12$0$i;if(!$148){$gsfb1$011$i$1=5;break L51}HEAPF32[$146>>2]=0.0;$149=($j5$08$i|0)>($131|0);if($149){$j5$08$in$i=$j5$08$i}else{break}}}$150=$gsfb1$011$i+-1|0;$151=($gsfb1$011$i|0)>0;if($151){$gsfb1$011$i=$150}else{$gsfb1$011$i$1=5;break}}L59:while(1){$152=HEAP32[$99>>2]|0;$153=$152*3|0;$154=HEAP32[$100>>2]|0;$155=$154-$152|0;$156=$155+$153|0;$157=($gfc+21536|0)+($gsfb1$011$i$1<<2)|0;$158=HEAP32[$157>>2]|0;$159=HEAP32[$101>>2]|0;$160=$158-$159|0;$161=$156+$160|0;$162=$gsfb1$011$i$1+1|0;$163=($gfc+21536|0)+($162<<2)|0;$164=HEAP32[$163>>2]|0;$165=$164-$158|0;$166=+HEAPF32[$102>>2];$167=($93+188|0)+($gsfb1$011$i$1<<2)|0;$168=+HEAPF32[$167>>2];$169=+HEAPF32[$103>>2];$170=+_athAdjust($166,$168,$169,0.0);$171=+HEAPF32[$104>>2];$172=$171>9.999999960041972E-13;$173=$171*$170;$ath12$0$i$1=$172?$173:$170;$174=($165|0)>0;if($174){$175=$165+$161|0;$j5$08$in$i$1=$175;while(1){$j5$08$i$1=$j5$08$in$i$1+-1|0;$176=$cod_info+($j5$08$i$1<<2)|0;$177=+HEAPF32[$176>>2];$fabsf$i$1=+Math_abs(+$177);$178=$fabsf$i$1<$ath12$0$i$1;if(!$178){$gsfb1$011$i$2=5;break L59}HEAPF32[$176>>2]=0.0;$179=($j5$08$i$1|0)>($161|0);if($179){$j5$08$in$i$1=$j5$08$i$1}else{break}}}$180=$gsfb1$011$i$1+-1|0;$181=($gsfb1$011$i$1|0)>0;if($181){$gsfb1$011$i$1=$180}else{$gsfb1$011$i$2=5;break}}L67:while(1){$182=HEAP32[$99>>2]|0;$183=$182*3|0;$184=HEAP32[$100>>2]|0;$185=$184-$182|0;$186=$185<<1;$187=$186+$183|0;$188=($gfc+21536|0)+($gsfb1$011$i$2<<2)|0;$189=HEAP32[$188>>2]|0;$190=HEAP32[$101>>2]|0;$191=$189-$190|0;$192=$187+$191|0;$193=$gsfb1$011$i$2+1|0;$194=($gfc+21536|0)+($193<<2)|0;$195=HEAP32[$194>>2]|0;$196=$195-$189|0;$197=+HEAPF32[$102>>2];$198=($93+188|0)+($gsfb1$011$i$2<<2)|0;$199=+HEAPF32[$198>>2];$200=+HEAPF32[$103>>2];$201=+_athAdjust($197,$199,$200,0.0);$202=+HEAPF32[$104>>2];$203=$202>9.999999960041972E-13;$204=$202*$201;$ath12$0$i$2=$203?$204:$201;$205=($196|0)>0;if($205){$206=$196+$192|0;$j5$08$in$i$2=$206;while(1){$j5$08$i$2=$j5$08$in$i$2+-1|0;$207=$cod_info+($j5$08$i$2<<2)|0;$208=+HEAPF32[$207>>2];$fabsf$i$2=+Math_abs(+$208);$209=$fabsf$i$2<$ath12$0$i$2;if(!$209){label=32;break L67}HEAPF32[$207>>2]=0.0;$210=($j5$08$i$2|0)>($192|0);if($210){$j5$08$in$i$2=$j5$08$i$2}else{break}}}$211=$gsfb1$011$i$2+-1|0;$212=($gsfb1$011$i$2|0)>0;if($212){$gsfb1$011$i$2=$211}else{label=32;break}}if((label|0)==32){STACKTOP=sp;return}}function _outer_loop($gfc,$cod_info,$l3_xmin,$xrpow,$ch,$targ_bits){$gfc=$gfc|0;$cod_info=$cod_info|0;$l3_xmin=$l3_xmin|0;$xrpow=$xrpow|0;$ch=$ch|0;$targ_bits=$targ_bits|0;var $$=0,$$$$i=0,$$$flag_GoneOver$3$i=0,$$$i=0,$$$i$i=0.0,$$0=0,$$1$i$i=0,$$6=0,$$flag_GoneOver$0$i=0,$$flag_GoneOver$01$i=0,$$lcssa$i=0,$$lcssa120=0,$$lcssa26=0,$$lcssa27=0,$$not=0,$$not84=0,$$pre=0,$$pre$i=0,$$pre$i$i=0,$$pre$i10=0.0;var $$pre$i13$i=0,$$pre$phi$i$iZ2D=0,$$pre41$i$i=0,$$pre61=0.0,$$pre62=0.0,$$pre63=0.0,$$pre64=0.0,$$pre65=0,$$s1$0$i$i=0,$$s1$0$i$i$lcssa=0,$$s2$0$i$i=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0.0,$104=0,$105=0;var $106=0.0,$107=0.0,$108=0.0,$109=0.0,$11=0,$110=0,$111=0.0,$112=0.0,$113=0.0,$114=0,$115=0,$116=0,$117=0,$118=0.0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0;var $124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0.0,$137=0.0,$138=0,$139=0.0,$14=0,$140=0,$141=0;var $142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0;var $160=0,$161=0,$162=0,$163=0,$164=0,$165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0;var $179=0,$18=0,$180=0,$181=0,$182=0,$183=0.0,$184=0.0,$185=0,$186=0.0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0;var $197=0,$198=0,$199=0,$2=0,$20=0,$200=0,$201=0,$202=0,$203=0,$204=0,$205=0,$206=0,$207=0,$208=0,$209=0,$21=0,$210=0,$211=0,$212=0,$213=0;var $214=0,$215=0,$216=0,$217=0,$218=0,$219=0,$22=0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0,$231=0;var $232=0,$233=0,$234=0,$235=0,$236=0,$237=0,$238=0,$239=0,$24=0,$240=0,$241=0,$242=0,$243=0,$244=0,$245=0,$246=0,$247=0,$248=0,$249=0,$25=0;var $250=0,$251=0,$252=0,$253=0,$254=0,$255=0,$256=0.0,$257=0,$258=0,$259=0,$26=0,$260=0,$261=0,$262=0,$263=0.0,$264=0.0,$265=0,$266=0.0,$267=0,$268=0;var $269=0,$27=0,$270=0,$271=0,$272=0,$273=0,$274=0.0,$275=0,$276=0,$277=0,$278=0,$279=0,$28=0,$280=0,$281=0,$282=0,$283=0.0,$284=0.0,$285=0,$286=0.0;var $287=0,$288=0,$289=0,$29=0,$290=0,$291=0,$292=0,$293=0,$294=0,$295=0,$296=0,$297=0,$298=0,$299=0,$3=0,$30=0,$300=0,$301=0,$302=0,$303=0;var $304=0,$305=0,$306=0,$307=0,$308=0,$309=0,$31=0,$310=0,$311=0,$312=0,$313=0,$314=0,$315=0,$316=0,$317=0,$318=0,$319=0,$32=0,$320=0,$321=0;var $322=0,$323=0,$324=0,$325=0,$326=0,$327=0,$328=0,$329=0,$33=0,$330=0,$331=0,$332=0,$333=0,$334=0,$335=0,$336=0,$337=0,$338=0,$339=0,$34=0;var $340=0,$341=0,$342=0,$343=0,$344=0,$345=0,$346=0,$347=0,$348=0,$349=0.0,$35=0,$350=0,$351=0.0,$352=0.0,$353=0.0,$354=0.0,$355=0.0,$356=0,$357=0.0,$358=0.0;var $359=0,$36=0,$360=0,$361=0,$362=0,$363=0,$364=0,$365=0,$366=0.0,$367=0.0,$368=0,$369=0,$37=0,$370=0.0,$371=0.0,$372=0.0,$373=0.0,$374=0,$375=0.0,$376=0.0;var $377=0,$378=0.0,$379=0.0,$38=0,$380=0,$381=0,$382=0,$383=0,$384=0,$385=0,$386=0.0,$387=0.0,$388=0.0,$389=0.0,$39=0,$390=0.0,$391=0.0,$392=0.0,$393=0.0,$394=0.0;var $395=0.0,$396=0.0,$397=0,$398=0,$399=0,$4=0,$40=0,$400=0,$401=0.0,$402=0.0,$403=0.0,$404=0,$405=0.0,$406=0,$407=0.0,$408=0.0,$409=0,$41=0,$410=0,$411=0.0;var $412=0.0,$413=0,$414=0.0,$415=0.0,$416=0,$417=0,$418=0,$419=0.0,$42=0,$420=0,$421=0.0,$422=0.0,$423=0.0,$424=0,$425=0.0,$426=0,$427=0.0,$428=0,$429=0.0,$43=0;var $430=0.0,$431=0,$432=0.0,$433=0.0,$434=0.0,$435=0.0,$436=0,$437=0,$438=0.0,$439=0.0,$44=0,$440=0,$441=0.0,$442=0.0,$443=0,$444=0.0,$445=0.0,$446=0.0,$447=0.0,$448=0.0;var $449=0.0,$45=0,$450=0,$451=0,$452=0.0,$453=0,$454=0.0,$455=0.0,$456=0.0,$457=0.0,$458=0.0,$459=0.0,$46=0,$460=0,$461=0,$462=0,$463=0.0,$464=0.0,$465=0,$466=0;var $467=0.0,$468=0.0,$469=0.0,$47=0,$470=0.0,$471=0,$472=0.0,$473=0.0,$474=0,$475=0.0,$476=0.0,$477=0,$478=0,$479=0,$48=0,$480=0.0,$481=0.0,$482=0,$483=0,$484=0.0;var $485=0.0,$486=0.0,$487=0.0,$488=0,$489=0.0,$49=0,$490=0.0,$491=0,$492=0.0,$493=0.0,$494=0,$495=0,$496=0.0,$497=0.0,$498=0.0,$499=0.0,$5=0,$50=0,$500=0,$501=0.0;var $502=0.0,$503=0,$504=0.0,$505=0.0,$506=0,$507=0,$508=0,$509=0,$51=0,$510=0,$511=0,$512=0.0,$513=0.0,$514=0,$515=0,$516=0,$517=0,$518=0,$519=0,$52=0;var $520=0,$521=0,$522=0,$523=0,$524=0,$525=0,$526=0,$527=0,$528=0,$529=0,$53=0,$530=0,$531=0,$532=0,$533=0,$534=0,$535=0,$536=0,$537=0,$538=0;var $539=0,$54=0,$540=0,$541=0,$542=0,$543=0,$544=0,$545=0,$546=0,$547=0,$548=0,$549=0,$55=0,$550=0,$551=0,$552=0,$553=0,$554=0,$555=0.0,$556=0.0;var $557=0,$558=0,$559=0.0,$56=0,$560=0.0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0;var $70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0.0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0.0;var $89=0,$9=0,$90=0,$91=0,$92=0.0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0.0,$99=0,$CurrentStep$06$i=0,$CurrentStep$1$i=0,$CurrentStep$2$i=0,$CurrentStep$3$i=0,$Direction$08$i=0,$Direction$1$i=0,$age$1=0,$age$2=0;var $bRefine$041=0,$best_ggain_pass1$042=0,$best_noise_info=0,$best_part2_3_length$040=0,$best_part2_3_length$1=0,$best_part2_3_length$2=0,$best_part2_3_length$3=0,$best_part2_3_length$3$ph=0,$better$0=0,$better$0$i=0,$better$0$in=0,$better$1$i=0,$brmerge=0,$cod_info_w=0,$distort=0,$exitcond$i=0,$fabs$i$i=0.0,$fabsf$i=0.0,$fabsf1$i=0.0,$fabsf10$i=0.0;var $fabsf11$i=0.0,$fabsf2$i=0.0,$fabsf3$i=0.0,$fabsf4$i=0.0,$fabsf5$i=0.0,$fabsf6$i=0.0,$fabsf7$i=0.0,$fabsf8$i=0.0,$fabsf9$i=0.0,$factor$i=0.0,$factor17$i=0.0,$flag_GoneOver$07$i=0,$flag_GoneOver$3$i=0,$indvars$iv$i$i=0,$indvars$iv$next$i$i=0,$indvars$iv$next37$i$i=0,$indvars$iv36$i$i=0,$j$0$lcssa$i$i=0,$j$019$i$i=0,$j$03$i$i=0;var $j$05$i$i=0,$j$1$i$i=0,$klemm_noise$0$lcssa$i$i=0.0,$klemm_noise$02$i$i=0.0,$l$01$i$i=0,$l$015$i$i=0,$l$02$i$i=0,$l$126$i$i=0,$nBits$0$lcssa$i=0,$nBits$02$i=0,$noise_info=0,$noise_shaping_amp$0$i$i=0,$or$cond=0,$or$cond$i=0,$or$cond$i$i=0,$or$cond$i13=0,$or$cond14$i=0,$or$cond16=0,$or$cond3=0,$or$cond5$i=0;var $or$cond8=0,$or$cond9=0,$prev_noise=0,$s$0$i$i=0,$s$1$i$i=0,$s1$0$lcssa$i$i=0,$s1$07$i$i=0,$s2$0$lcssa$i$i=0,$s2$010$i$i=0,$save_xrpow=0,$sfb$01$i$i=0,$sfb$01$i$i11=0,$sfb$01$i5$i=0,$sfb$011$i$i=0,$sfb$02$i$i=0,$sfb$031$i$i=0,$sfb$1$lcssa$i$i=0,$sfb$13$i$i=0,$sfb$18$i$i=0,$sfb$211$i$i=0;var $sfb$3$lcssa$i$i=0,$sfb$320$i$i=0,$smax$i$i=0,$sqrt$i$i=0.0,$step$0$i=0,$trigger$0$lcssa$i$i=0.0,$trigger$012$i$i=0.0,$trigger$1$i$i=0.0,$trigger$2$i$i=0.0,$window$029$i$i=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+8256|0;$cod_info_w=sp+2992|0;$save_xrpow=sp+688|0;$distort=sp+528|0;$best_noise_info=sp+504|0;$prev_noise=sp+24|0;$noise_info=sp;$0=($gfc+84928|0)+($ch<<2)|0;$1=HEAP32[$0>>2]|0;$2=($gfc+84920|0)+($ch<<2)|0;$3=HEAP32[$2>>2]|0;$4=$cod_info+4780|0;HEAP32[$4>>2]=$3;$5=$cod_info+4844|0;$6=HEAP32[$5>>2]|0;$7=$targ_bits-$6|0;$8=_count_bits($gfc,$xrpow,$cod_info,0)|0;$9=($1|0)==1;$10=($8|0)==($7|0);$or$cond5$i=$9|$10;if($or$cond5$i){$$lcssa$i=$8}else{$12=$8;$CurrentStep$06$i=$1;$Direction$08$i=0;$flag_GoneOver$07$i=0;while(1){$13=($12|0)>($7|0);if($13){$14=($Direction$08$i|0)==2;$$flag_GoneOver$0$i=$14?1:$flag_GoneOver$07$i;$15=($$flag_GoneOver$0$i|0)==0;$16=($CurrentStep$06$i|0)/2&-1;$CurrentStep$1$i=$15?$CurrentStep$06$i:$16;$CurrentStep$3$i=$CurrentStep$1$i;$Direction$1$i=1;$flag_GoneOver$3$i=$$flag_GoneOver$0$i;$step$0$i=$CurrentStep$1$i}else{$17=($Direction$08$i|0)==1;$$flag_GoneOver$01$i=$17?1:$flag_GoneOver$07$i;$18=($$flag_GoneOver$01$i|0)==0;$19=($CurrentStep$06$i|0)/2&-1;$CurrentStep$2$i=$18?$CurrentStep$06$i:$19;$20=0-$CurrentStep$2$i|0;$CurrentStep$3$i=$CurrentStep$2$i;$Direction$1$i=2;$flag_GoneOver$3$i=$$flag_GoneOver$01$i;$step$0$i=$20}$21=HEAP32[$4>>2]|0;$22=$21+$step$0$i|0;$23=($22|0)<0;$$$i=$23?0:$22;$24=($$$i|0)>255;$$$$i=$24?255:$$$i;HEAP32[$4>>2]=$$$$i;$25=$23|$24;$$$flag_GoneOver$3$i=$25?1:$flag_GoneOver$3$i;$26=_count_bits($gfc,$xrpow,$cod_info,0)|0;$27=($CurrentStep$3$i|0)==1;$28=($26|0)==($7|0);$or$cond$i=$27|$28;if($or$cond$i){$$lcssa$i=$26;break}else{$12=$26;$CurrentStep$06$i=$CurrentStep$3$i;$Direction$08$i=$Direction$1$i;$flag_GoneOver$07$i=$$$flag_GoneOver$3$i}}}$11=($$lcssa$i|0)>($7|0);L9:do{if($11){$nBits$02$i=$$lcssa$i;while(1){$29=HEAP32[$4>>2]|0;$30=($29|0)<255;if(!$30){$nBits$0$lcssa$i=$nBits$02$i;break L9}$31=$29+1|0;HEAP32[$4>>2]=$31;$32=_count_bits($gfc,$xrpow,$cod_info,0)|0;$33=($32|0)>($7|0);if($33){$nBits$02$i=$32}else{$nBits$0$lcssa$i=$32;break}}}else{$nBits$0$lcssa$i=$$lcssa$i}}while(0);$34=HEAP32[$4>>2]|0;$35=$3-$34|0;$36=($35|0)>3;$37=$36?4:2;HEAP32[$0>>2]=$37;$38=HEAP32[$4>>2]|0;HEAP32[$2>>2]=$38;$39=$cod_info+4768|0;HEAP32[$39>>2]=$nBits$0$lcssa$i;$40=$gfc+28|0;$41=HEAP32[$40>>2]|0;$42=($41|0)==0;if($42){$$0=100;STACKTOP=sp;return $$0|0}_memset($prev_noise|0,0,476)|0;_calc_noise($cod_info,$l3_xmin,$distort,$best_noise_info,$prev_noise)|0;$43=HEAP32[$39>>2]|0;$44=$best_noise_info+20|0;HEAP32[$44>>2]=$43;_memcpy($cod_info_w|0,$cod_info|0,5252)|0;_memcpy($save_xrpow|0,$xrpow|0,2304)|0;$45=$gfc+85096|0;$46=$gfc+85092|0;$47=$cod_info_w+4836|0;$48=$cod_info_w+4860|0;$49=$gfc+40|0;$50=$cod_info_w+4764|0;$51=$cod_info_w+4844|0;$52=$cod_info_w+4768|0;$53=$cod_info_w+4780|0;$54=$best_noise_info+12|0;$55=$noise_info+20|0;$56=$cod_info+4788|0;$57=$gfc+84|0;$58=$gfc+88|0;$59=$noise_info+16|0;$60=$best_noise_info+16|0;$61=$noise_info+8|0;$62=$best_noise_info+8|0;$63=$gfc+48|0;$64=$noise_info+12|0;$65=$noise_info+4|0;$66=$best_noise_info+4|0;$67=$cod_info_w+4864|0;$68=$gfc+84936|0;$69=$cod_info_w+4832|0;$70=$cod_info_w+4788|0;$71=$gfc+32|0;$72=$cod_info_w+4848|0;$73=$cod_info_w+4868|0;$bRefine$041=0;$best_ggain_pass1$042=0;$best_part2_3_length$040=9999999;while(1){$74=($bRefine$041|0)==1;$$1$i$i=$74?2:1;$75=($bRefine$041|0)!=0;$age$1=0;$best_part2_3_length$1=$best_part2_3_length$040;L19:while(1){$76=HEAP32[$45>>2]|0;$77=$76&2;$78=($77|0)==0;$$=$78?3:20;$79=HEAP32[$46>>2]|0;$80=($79|0)==0;$$pre=HEAP32[$48>>2]|0;if(!$80){$81=$distort+($$pre<<2)|0;$82=+HEAPF32[$81>>2];$83=$82>1.0;if($83){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}$84=HEAP32[$70>>2]|0;$85=($84|0)==2;if($85){$86=$$pre+1|0;$87=$distort+($86<<2)|0;$88=+HEAPF32[$87>>2];$89=$88>1.0;if($89){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}$90=$$pre+2|0;$91=$distort+($90<<2)|0;$92=+HEAPF32[$91>>2];$93=$92>1.0;if($93){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}}}$94=HEAP32[$47>>2]|0;$95=($94|0)==0;$$$i$i=$95?1.2968395948410034:1.6817928552627563;$96=($$pre|0)>0;if($96){$sfb$011$i$i=0;$trigger$012$i$i=0.0;while(1){$97=$distort+($sfb$011$i$i<<2)|0;$98=+HEAPF32[$97>>2];$99=$trigger$012$i$i<$98;$trigger$1$i$i=$99?$98:$trigger$012$i$i;$100=$sfb$011$i$i+1|0;$exitcond$i=($100|0)==($$pre|0);if($exitcond$i){$trigger$0$lcssa$i$i=$trigger$1$i$i;break}else{$sfb$011$i$i=$100;$trigger$012$i$i=$trigger$1$i$i}}}else{$trigger$0$lcssa$i$i=0.0}$101=HEAP32[$49>>2]|0;$102=($101|0)==3;$noise_shaping_amp$0$i$i=$102?$$1$i$i:$101;do{if(($noise_shaping_amp$0$i$i|0)==1){$103=$trigger$0$lcssa$i$i;$104=$trigger$0$lcssa$i$i>1.0;if($104){$sqrt$i$i=+Math_sqrt(+$103);$fabs$i$i=+Math_abs(+$sqrt$i$i);$105=$trigger$0$lcssa$i$i==-inf;$106=$fabs$i$i;$107=$105?inf:$106;$trigger$2$i$i=$107;break}else{$108=$103*0.94999999999999996;$109=$108;$trigger$2$i$i=$109;break}}else if(($noise_shaping_amp$0$i$i|0)==2){$trigger$2$i$i=$trigger$0$lcssa$i$i}else{$110=$trigger$0$lcssa$i$i>1.0;if($110){$trigger$2$i$i=1.0}else{$111=$trigger$0$lcssa$i$i;$112=$111*0.94999999999999996;$113=$112;$trigger$2$i$i=$113}}}while(0);if($96){$551=$101;$552=$$pre;$j$05$i$i=0;$sfb$13$i$i=0}else{$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}while(1){$114=($cod_info_w+4872|0)+($sfb$13$i$i<<2)|0;$115=HEAP32[$114>>2]|0;$116=$115+$j$05$i$i|0;$117=$distort+($sfb$13$i$i<<2)|0;$118=+HEAPF32[$117>>2];$119=$118<$trigger$2$i$i;if($119){$146=$552;$553=$551}else{$120=HEAP32[$45>>2]|0;$121=$120&2;$122=($121|0)==0;if(!$122){$123=($gfc+84936|0)+($sfb$13$i$i<<2)|0;$124=HEAP32[$123>>2]|0;$125=($124|0)==0;$126=$125&1;HEAP32[$123>>2]=$126;if(!$125){$127=HEAP32[$49>>2]|0;$128=($127|0)==2;if($128){$554=2;break}}}$129=($cod_info_w+4608|0)+($sfb$13$i$i<<2)|0;$130=HEAP32[$129>>2]|0;$131=$130+1|0;HEAP32[$129>>2]=$131;$132=($115|0)>0;if($132){$133=0-$115|0;$$pre61=+HEAPF32[$50>>2];$139=$$pre61;$l$02$i$i=$133;while(1){$134=$l$02$i$i+$116|0;$135=$xrpow+($134<<2)|0;$136=+HEAPF32[$135>>2];$137=$136*$$$i$i;HEAPF32[$135>>2]=$137;$138=$137>$139;if($138){HEAPF32[$50>>2]=$137;$555=$137}else{$555=$139}$140=$l$02$i$i+1|0;$141=($l$02$i$i|0)<-1;if($141){$139=$555;$l$02$i$i=$140}else{break}}}$142=HEAP32[$49>>2]|0;$143=($142|0)==2;if($143){$554=2;break}$$pre$i$i=HEAP32[$48>>2]|0;$146=$$pre$i$i;$553=$142}$144=$sfb$13$i$i+1|0;$145=($144|0)<($146|0);if($145){$551=$553;$552=$146;$j$05$i$i=$116;$sfb$13$i$i=$144}else{$554=$553;break}}$$pre$i=HEAP32[$48>>2]|0;$147=($$pre$i|0)>0;if($147){$sfb$01$i$i=0}else{$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}while(1){$150=($cod_info_w+4608|0)+($sfb$01$i$i<<2)|0;$151=HEAP32[$150>>2]|0;$152=($cod_info_w+5028|0)+($sfb$01$i$i<<2)|0;$153=HEAP32[$152>>2]|0;$154=($cod_info_w+4808|0)+($153<<2)|0;$155=HEAP32[$154>>2]|0;$156=0-$155|0;$157=($151|0)==($156|0);$148=$sfb$01$i$i+1|0;if($157){break}$149=($148|0)<($$pre$i|0);if($149){$sfb$01$i$i=$148}else{$541=$554;$best_part2_3_length$3=$best_part2_3_length$1;break L19}}$158=_scale_bitcount($gfc,$cod_info_w)|0;$159=($158|0)==0;if(!$159){$160=HEAP32[$40>>2]|0;$161=($160|0)>1;if(!$161){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}_memset($68|0,0,156)|0;$162=HEAP32[$47>>2]|0;$163=($162|0)==0;L65:do{if($163){$164=HEAP32[$48>>2]|0;$165=($164|0)>0;if($165){$j$03$i$i=0;$sfb$02$i$i=0;while(1){$166=($cod_info_w+4872|0)+($sfb$02$i$i<<2)|0;$167=HEAP32[$166>>2]|0;$168=($cod_info_w+4608|0)+($sfb$02$i$i<<2)|0;$169=HEAP32[$168>>2]|0;$170=HEAP32[$69>>2]|0;$171=($170|0)==0;if($171){$s$0$i$i=$169}else{$172=12112+($sfb$02$i$i<<2)|0;$173=HEAP32[$172>>2]|0;$174=$173+$169|0;$s$0$i$i=$174}$175=$167+$j$03$i$i|0;$176=$s$0$i$i&1;$177=($176|0)==0;do{if($177){$s$1$i$i=$s$0$i$i}else{$178=$s$0$i$i+1|0;$179=($167|0)>0;if(!$179){$s$1$i$i=$178;break}$180=0-$167|0;$$pre64=+HEAPF32[$50>>2];$186=$$pre64;$l$01$i$i=$180;while(1){$181=$l$01$i$i+$175|0;$182=$xrpow+($181<<2)|0;$183=+HEAPF32[$182>>2];$184=$183*1.2968395948410034;HEAPF32[$182>>2]=$184;$185=$184>$186;if($185){HEAPF32[$50>>2]=$184;$556=$184}else{$556=$186}$187=$l$01$i$i+1|0;$188=($l$01$i$i|0)<-1;if($188){$186=$556;$l$01$i$i=$187}else{$s$1$i$i=$178;break}}}}while(0);$189=$s$1$i$i>>1;HEAP32[$168>>2]=$189;$190=$sfb$02$i$i+1|0;$191=HEAP32[$48>>2]|0;$192=($190|0)<($191|0);if($192){$j$03$i$i=$175;$sfb$02$i$i=$190}else{break}}}HEAP32[$69>>2]=0;HEAP32[$47>>2]=1}else{$193=HEAP32[$70>>2]|0;$194=($193|0)==2;if(!$194){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break L19}$195=HEAP32[$71>>2]|0;$196=($195|0)>0;if(!$196){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break L19}$197=HEAP32[$72>>2]|0;$198=($197|0)>0;if($198){$sfb$031$i$i=0;while(1){$201=($cod_info_w+4608|0)+($sfb$031$i$i<<2)|0;$202=HEAP32[$201>>2]|0;$203=($202|0)>15;$199=$sfb$031$i$i+1|0;if($203){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break L19}$200=($199|0)<($197|0);if($200){$sfb$031$i$i=$199}else{$205=$197;$indvars$iv$i$i=3;$indvars$iv36$i$i=-1;$window$029$i$i=0;break}}}else{$205=$197;$indvars$iv$i$i=3;$indvars$iv36$i$i=-1;$window$029$i$i=0}while(1){$204=$window$029$i$i+$205|0;$206=HEAP32[$73>>2]|0;$207=($204|0)<($206|0);if($207){$208=$indvars$iv$i$i+$205|0;$209=($206|0)>($208|0);$210=$indvars$iv36$i$i-$205|0;$s1$07$i$i=0;$sfb$18$i$i=$204;while(1){$217=($cod_info_w+4608|0)+($sfb$18$i$i<<2)|0;$218=HEAP32[$217>>2]|0;$219=($s1$07$i$i|0)<($218|0);$$s1$0$i$i=$219?$218:$s1$07$i$i;$220=$sfb$18$i$i+3|0;$221=($220|0)<($206|0);if($221){$s1$07$i$i=$$s1$0$i$i;$sfb$18$i$i=$220}else{$$s1$0$i$i$lcssa=$$s1$0$i$i;break}}$smax$i$i=$209?$206:$208;$211=$smax$i$i+$210|0;$212=($211>>>0)%3&-1;$213=$211+$208|0;$214=$213-$212|0;$s1$0$lcssa$i$i=$$s1$0$i$i$lcssa;$sfb$1$lcssa$i$i=$214}else{$s1$0$lcssa$i$i=0;$sfb$1$lcssa$i$i=$204}$215=HEAP32[$48>>2]|0;$216=($sfb$1$lcssa$i$i|0)<($215|0);if($216){$s2$010$i$i=0;$sfb$211$i$i=$sfb$1$lcssa$i$i;while(1){$222=($cod_info_w+4608|0)+($sfb$211$i$i<<2)|0;$223=HEAP32[$222>>2]|0;$224=($s2$010$i$i|0)<($223|0);$$s2$0$i$i=$224?$223:$s2$010$i$i;$225=$sfb$211$i$i+3|0;$226=($225|0)<($215|0);if($226){$s2$010$i$i=$$s2$0$i$i;$sfb$211$i$i=$225}else{$s2$0$lcssa$i$i=$$s2$0$i$i;break}}}else{$s2$0$lcssa$i$i=0}$227=($s1$0$lcssa$i$i|0)<16;$228=($s2$0$lcssa$i$i|0)<8;$or$cond$i$i=$227&$228;do{if($or$cond$i$i){$$pre41$i$i=$window$029$i$i+1|0;$$pre$phi$i$iZ2D=$$pre41$i$i;$557=$215}else{$229=($cod_info_w+4808|0)+($window$029$i$i<<2)|0;$230=HEAP32[$229>>2]|0;$231=($230|0)>6;if($231){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break L19}$232=$230+1|0;HEAP32[$229>>2]=$232;$233=HEAP32[$72>>2]|0;$234=($gfc+21360|0)+($233<<2)|0;$235=HEAP32[$234>>2]|0;$236=$233+$window$029$i$i|0;$237=HEAP32[$48>>2]|0;$238=($236|0)<($237|0);$239=$window$029$i$i+1|0;if($238){$240=2-$window$029$i$i|0;$j$019$i$i=$235;$sfb$320$i$i=$236;while(1){$241=($cod_info_w+4872|0)+($sfb$320$i$i<<2)|0;$242=HEAP32[$241>>2]|0;$243=($cod_info_w+4608|0)+($sfb$320$i$i<<2)|0;$244=HEAP32[$243>>2]|0;$245=HEAP32[$47>>2]|0;$246=4>>>$245;$247=$244-$246|0;$248=($247|0)>-1;if($248){HEAP32[$243>>2]=$247;$249=$242*3|0;$250=$249+$j$019$i$i|0;$j$1$i$i=$250}else{HEAP32[$243>>2]=0;$251=HEAP32[$47>>2]|0;$252=$251+1|0;$253=$247<<$252;$254=$253+210|0;$255=79704+($254<<2)|0;$256=+HEAPF32[$255>>2];$257=Math_imul($242,$239)|0;$258=$257+$j$019$i$i|0;$259=($242|0)>0;if($259){$260=0-$242|0;$$pre62=+HEAPF32[$50>>2];$266=$$pre62;$l$015$i$i=$260;while(1){$261=$l$015$i$i+$258|0;$262=$xrpow+($261<<2)|0;$263=+HEAPF32[$262>>2];$264=$263*$256;HEAPF32[$262>>2]=$264;$265=$264>$266;if($265){HEAPF32[$50>>2]=$264;$559=$264}else{$559=$266}$267=$l$015$i$i+1|0;$268=($l$015$i$i|0)<-1;if($268){$266=$559;$l$015$i$i=$267}else{break}}}$269=Math_imul($242,$240)|0;$270=$258+$269|0;$j$1$i$i=$270}$271=$sfb$320$i$i+3|0;$272=HEAP32[$48>>2]|0;$273=($271|0)<($272|0);if($273){$j$019$i$i=$j$1$i$i;$sfb$320$i$i=$271}else{$558=$272;$j$0$lcssa$i$i=$j$1$i$i;$sfb$3$lcssa$i$i=$271;break}}}else{$558=$237;$j$0$lcssa$i$i=$235;$sfb$3$lcssa$i$i=$236}$274=+HEAPF32[80512>>2];$275=($cod_info_w+4872|0)+($sfb$3$lcssa$i$i<<2)|0;$276=HEAP32[$275>>2]|0;$277=Math_imul($276,$239)|0;$278=$277+$j$0$lcssa$i$i|0;$279=($276|0)>0;if(!$279){$$pre$phi$i$iZ2D=$239;$557=$558;break}$280=0-$276|0;$$pre63=+HEAPF32[$50>>2];$286=$$pre63;$l$126$i$i=$280;while(1){$281=$278+$l$126$i$i|0;$282=$xrpow+($281<<2)|0;$283=+HEAPF32[$282>>2];$284=$283*$274;HEAPF32[$282>>2]=$284;$285=$284>$286;if($285){HEAPF32[$50>>2]=$284;$560=$284}else{$560=$286}$287=$l$126$i$i+1|0;$288=($l$126$i$i|0)<-1;if($288){$286=$560;$l$126$i$i=$287}else{$$pre$phi$i$iZ2D=$239;$557=$558;break}}}}while(0);$289=($$pre$phi$i$iZ2D|0)<3;if(!$289){$$lcssa120=$557;break}$indvars$iv$next37$i$i=$indvars$iv36$i$i+-1|0;$indvars$iv$next$i$i=$indvars$iv$i$i+1|0;$$pre$i13$i=HEAP32[$72>>2]|0;$205=$$pre$i13$i;$indvars$iv$i$i=$indvars$iv$next$i$i;$indvars$iv36$i$i=$indvars$iv$next37$i$i;$window$029$i$i=$$pre$phi$i$iZ2D}$290=($$lcssa120|0)>0;if($290){$sfb$01$i5$i=0}else{$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break L19}while(1){$293=($cod_info_w+4608|0)+($sfb$01$i5$i<<2)|0;$294=HEAP32[$293>>2]|0;$295=($cod_info_w+5028|0)+($sfb$01$i5$i<<2)|0;$296=HEAP32[$295>>2]|0;$297=($cod_info_w+4808|0)+($296<<2)|0;$298=HEAP32[$297>>2]|0;$299=0-$298|0;$300=($294|0)==($299|0);$291=$sfb$01$i5$i+1|0;if($300){break L65}$292=($291|0)<($$lcssa120|0);if($292){$sfb$01$i5$i=$291}else{$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break L19}}}}while(0);$301=_scale_bitcount($gfc,$cod_info_w)|0;$302=($301|0)==0;if(!$302){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}}$303=HEAP32[$47>>2]|0;$304=($303|0)==0;$$6=$304?255:254;$305=HEAP32[$51>>2]|0;$306=$targ_bits-$305|0;$307=($306|0)<1;if($307){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}$308=_count_bits($gfc,$xrpow,$cod_info_w,$prev_noise)|0;HEAP32[$52>>2]=$308;$309=($308|0)>($306|0);$310=HEAP32[$53>>2]|0;$311=($310|0)<=($$6|0);$312=$309&$311;if($312){$314=$310;while(1){$313=$314+1|0;HEAP32[$53>>2]=$313;$315=_count_bits($gfc,$xrpow,$cod_info_w,$prev_noise)|0;HEAP32[$52>>2]=$315;$316=($315|0)>($306|0);$317=HEAP32[$53>>2]|0;$318=($317|0)<=($$6|0);$319=$316&$318;if($319){$314=$317}else{$$lcssa26=$317;break}}}else{$$lcssa26=$310}$320=($$lcssa26|0)>($$6|0);if($320){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}$321=HEAP32[$54>>2]|0;$322=($321|0)==0;if($322){$323=_count_bits($gfc,$xrpow,$cod_info_w,$prev_noise)|0;HEAP32[$52>>2]=$323;$324=($323|0)>($best_part2_3_length$1|0);$325=HEAP32[$53>>2]|0;$326=($325|0)<=($$6|0);$327=$324&$326;if($327){$329=$325;while(1){$328=$329+1|0;HEAP32[$53>>2]=$328;$330=_count_bits($gfc,$xrpow,$cod_info_w,$prev_noise)|0;HEAP32[$52>>2]=$330;$331=($330|0)>($best_part2_3_length$1|0);$332=HEAP32[$53>>2]|0;$333=($332|0)<=($$6|0);$334=$331&$333;if($334){$329=$332}else{$$lcssa27=$332;break}}}else{$$lcssa27=$325}$335=($$lcssa27|0)>($$6|0);if($335){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break}}_calc_noise($cod_info_w,$l3_xmin,$distort,$noise_info,$prev_noise)|0;$336=HEAP32[$52>>2]|0;HEAP32[$55>>2]=$336;$337=HEAP32[$56>>2]|0;$338=($337|0)==2;$better$0$in=$338?$58:$57;$better$0=HEAP32[$better$0$in>>2]|0;L150:do{switch($better$0|0){case 2:{$407=+HEAPF32[$65>>2];$408=+HEAPF32[$66>>2];$409=$407<$408;$410=$409&1;$better$0$i=$410;break}case 3:{$411=+HEAPF32[$65>>2];$412=+HEAPF32[$66>>2];$413=$411<$412;if($413){$414=+HEAPF32[$61>>2];$415=+HEAPF32[$62>>2];$416=$414<$415;$418=$416}else{$418=0}$417=$418&1;$better$0$i=$417;break}case 8:{$383=HEAP32[$67>>2]|0;$384=($383|0)>0;if($384){$klemm_noise$02$i$i=1.0000000000000001E-37;$sfb$01$i$i11=0;while(1){$385=$distort+($sfb$01$i$i11<<2)|0;$386=+HEAPF32[$385>>2];$387=$386;$388=$387*$387;$389=$388*0.63200000000000001;$390=$389*$387;$391=$390+0.36799999999999999;$392=$391;$393=+_fast_log2($392);$394=$393;$395=$394*0.30102999566398114;$396=$395+$klemm_noise$02$i$i;$397=$sfb$01$i$i11+1|0;$398=HEAP32[$67>>2]|0;$399=($397|0)<($398|0);if($399){$klemm_noise$02$i$i=$396;$sfb$01$i$i11=$397}else{$klemm_noise$0$lcssa$i$i=$396;break}}}else{$klemm_noise$0$lcssa$i$i=1.0000000000000001E-37}$400=$klemm_noise$0$lcssa$i$i<9.9999999999999995E-21;$401=$klemm_noise$0$lcssa$i$i;$402=$400?9.9999996826552254E-21:$401;HEAPF32[$61>>2]=$402;$405=$402;label=118;break}case 1:{$$pre$i10=+HEAPF32[$61>>2];$405=$$pre$i10;label=118;break}case 0:{$362=HEAP32[$64>>2]|0;$363=HEAP32[$54>>2]|0;$364=($362|0)<($363|0);do{if($364){$382=1}else{$365=($362|0)==($363|0);if($365){$366=+HEAPF32[$noise_info>>2];$367=+HEAPF32[$best_noise_info>>2];$368=$366<$367;if($368){$382=1}else{$fabsf9$i=+Math_abs(+$366);$fabsf10$i=+Math_abs(+$367);$369=$fabsf9$i>$fabsf10$i;$370=$366-$367;$fabsf11$i=+Math_abs(+$370);$371=$fabsf11$i;if($369){$372=$fabsf9$i;$373=$372*9.9999999747524271E-7;$374=!($371<=$373);if($374){$382=0;break}}else{$375=$fabsf10$i;$376=$375*9.9999999747524271E-7;$377=!($371<=$376);if($377){$382=0;break}}$378=+HEAPF32[$65>>2];$379=+HEAPF32[$66>>2];$380=$378<$379;$382=$380}}else{$382=0}}}while(0);$381=$382&1;$better$0$i=$381;break}case 5:{$463=+HEAPF32[$noise_info>>2];$464=+HEAPF32[$best_noise_info>>2];$465=$463<$464;do{if($465){$479=1}else{$fabsf6$i=+Math_abs(+$463);$fabsf7$i=+Math_abs(+$464);$466=$fabsf6$i>$fabsf7$i;$467=$463-$464;$fabsf8$i=+Math_abs(+$467);$468=$fabsf8$i;if($466){$469=$fabsf6$i;$470=$469*9.9999999747524271E-7;$471=!($468<=$470);if($471){$479=0;break}}else{$472=$fabsf7$i;$473=$472*9.9999999747524271E-7;$474=!($468<=$473);if($474){$479=0;break}}$475=+HEAPF32[$65>>2];$476=+HEAPF32[$66>>2];$477=$475<$476;$479=$477}}while(0);$478=$479&1;$better$0$i=$478;break}case 4:{$419=+HEAPF32[$61>>2];$420=!($419<=0.0);do{if($420){$421=$419;$442=$421;label=130}else{$422=+HEAPF32[$62>>2];$423=$422;$424=$423>0.20000000000000001;if($424){$462=1}else{$425=$419;$426=$422<0.0;$427=$425+-0.20000000000000001;$428=$423>$427;$or$cond16=$426&$428;if($or$cond16){$429=+HEAPF32[$65>>2];$430=+HEAPF32[$66>>2];$431=$429<$430;if($431){$462=1;break}}$$not=!($422>0.0);$$not84=$428^1;$brmerge=$$not|$$not84;if($brmerge){$442=$425;label=130}else{$432=+HEAPF32[$65>>2];$433=+HEAPF32[$66>>2];$434=+HEAPF32[$best_noise_info>>2];$435=$434+$433;$436=$432<$435;if($436){$462=1}else{$442=$425;label=130}}}}}while(0);do{if((label|0)==130){label=0;$437=$419>0.0;if($437){$438=+HEAPF32[$62>>2];$439=$438;$440=$439>-0.050000000000000003;$441=$442+-0.10000000000000001;$443=$439>$441;$or$cond$i13=$440&$443;if($or$cond$i13){$444=+HEAPF32[$65>>2];$445=+HEAPF32[$noise_info>>2];$446=$445+$444;$447=+HEAPF32[$66>>2];$448=+HEAPF32[$best_noise_info>>2];$449=$448+$447;$450=$446<$449;if($450){$462=1;break}}$451=$439>-0.10000000000000001;$452=$442+-0.14999999999999999;$453=$439>$452;$or$cond14$i=$451&$453;if($or$cond14$i){$454=+HEAPF32[$65>>2];$455=+HEAPF32[$noise_info>>2];$factor$i=$455*2.0;$456=$factor$i+$454;$457=+HEAPF32[$66>>2];$458=+HEAPF32[$best_noise_info>>2];$factor17$i=$458*2.0;$459=$factor17$i+$457;$460=$456<$459;$462=$460}else{$462=0}}else{$462=0}}}while(0);$461=$462&1;$better$0$i=$461;break}case 7:{$509=HEAP32[$64>>2]|0;$510=HEAP32[$54>>2]|0;$511=($509|0)<($510|0);if($511){$516=1}else{$512=+HEAPF32[$noise_info>>2];$513=+HEAPF32[$best_noise_info>>2];$514=$512<$513;$516=$514}$515=$516&1;$better$0$i=$515;break}case 6:{$480=+HEAPF32[$noise_info>>2];$481=+HEAPF32[$best_noise_info>>2];$482=$480<$481;do{if($482){$508=1}else{$fabsf$i=+Math_abs(+$480);$fabsf1$i=+Math_abs(+$481);$483=$fabsf$i>$fabsf1$i;$484=$480-$481;$fabsf2$i=+Math_abs(+$484);$485=$fabsf2$i;if($483){$486=$fabsf$i;$487=$486*9.9999999747524271E-7;$488=!($485<=$487);if($488){$508=0;break}}else{$489=$fabsf1$i;$490=$489*9.9999999747524271E-7;$491=!($485<=$490);if($491){$508=0;break}}$492=+HEAPF32[$61>>2];$493=+HEAPF32[$62>>2];$494=$492<$493;if($494){$508=1}else{$fabsf3$i=+Math_abs(+$492);$fabsf4$i=+Math_abs(+$493);$495=$fabsf3$i>$fabsf4$i;$496=$492-$493;$fabsf5$i=+Math_abs(+$496);$497=$fabsf5$i;if($495){$498=$fabsf3$i;$499=$498*9.9999999747524271E-7;$500=!($497<=$499);if($500){$508=0;break}}else{$501=$fabsf4$i;$502=$501*9.9999999747524271E-7;$503=!($497<=$502);if($503){$508=0;break}}$504=+HEAPF32[$65>>2];$505=+HEAPF32[$66>>2];$506=$504<=$505;$508=$506}}}while(0);$507=$508&1;$better$0$i=$507;break}default:{$339=HEAP32[$54>>2]|0;$340=($339|0)>0;if($340){$341=HEAP32[$59>>2]|0;$342=HEAP32[$60>>2]|0;$343=($341|0)<=($342|0);$344=$343&1;$345=($341|0)==($342|0);if(!$345){$better$0$i=$344;break L150}$346=HEAP32[$44>>2]|0;$347=($336|0)<($346|0);$348=$347&1;$better$0$i=$348;break L150}$349=+HEAPF32[$61>>2];$350=$349<0.0;if($350){$351=$349*10.0;$352=+($336|0);$353=$351+$352;$354=+HEAPF32[$62>>2];$355=$354*10.0;$356=HEAP32[$44>>2]|0;$357=+($356|0);$358=$357+$355;$359=$353<=$358;$361=$359}else{$361=0}$360=$361&1;$better$0$i=$360}}}while(0);if((label|0)==118){label=0;$403=+HEAPF32[$62>>2];$404=$405<$403;$406=$404&1;$better$0$i=$406}$517=HEAP32[$54>>2]|0;$518=($517|0)==0;if($518){$519=($better$0$i|0)==0;if($519){$524=0}else{$520=HEAP32[$55>>2]|0;$521=HEAP32[$44>>2]|0;$522=($520|0)<($521|0);$524=$522}$523=$524&1;$better$1$i=$523}else{$better$1$i=$better$0$i}$525=($better$1$i|0)==0;do{if($525){$527=HEAP32[$63>>2]|0;$528=($527|0)==0;if($528){$529=$age$1+1|0;$530=($age$1|0)>=($$|0);$or$cond8=$530&$518;if($or$cond8){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break L19}$531=HEAP32[$49>>2]|0;$532=($531|0)==3;$or$cond=$75&$532;$533=($age$1|0)>29;$or$cond3=$533&$or$cond;if($or$cond3){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break L19}if(!$or$cond){$age$2=$529;$best_part2_3_length$2=$best_part2_3_length$1;break}$534=HEAP32[$53>>2]|0;$535=$534-$best_ggain_pass1$042|0;$536=($535|0)>15;if($536){$best_part2_3_length$3$ph=$best_part2_3_length$1;label=167;break L19}else{$age$2=$529;$best_part2_3_length$2=$best_part2_3_length$1}}else{$age$2=$age$1;$best_part2_3_length$2=$best_part2_3_length$1}}else{$526=HEAP32[$39>>2]|0;HEAP32[$best_noise_info>>2]=HEAP32[$noise_info>>2]|0;HEAP32[$best_noise_info+4>>2]=HEAP32[$noise_info+4>>2]|0;HEAP32[$best_noise_info+8>>2]=HEAP32[$noise_info+8>>2]|0;HEAP32[$best_noise_info+12>>2]=HEAP32[$noise_info+12>>2]|0;HEAP32[$best_noise_info+16>>2]=HEAP32[$noise_info+16>>2]|0;HEAP32[$best_noise_info+20>>2]=HEAP32[$noise_info+20>>2]|0;_memcpy($cod_info|0,$cod_info_w|0,5252)|0;_memcpy($save_xrpow|0,$xrpow|0,2304)|0;$age$2=0;$best_part2_3_length$2=$526}}while(0);$537=HEAP32[$53>>2]|0;$538=HEAP32[$47>>2]|0;$539=$538+$537|0;$540=($539|0)<255;if($540){$age$1=$age$2;$best_part2_3_length$1=$best_part2_3_length$2}else{$best_part2_3_length$3$ph=$best_part2_3_length$2;label=167;break}}if((label|0)==167){label=0;$$pre65=HEAP32[$49>>2]|0;$541=$$pre65;$best_part2_3_length$3=$best_part2_3_length$3$ph}$542=($541|0)==3;$543=($bRefine$041|0)==0;$or$cond9=$543&$542;if(!$or$cond9){break}_memcpy($cod_info_w|0,$cod_info|0,5252)|0;_memcpy($xrpow|0,$save_xrpow|0,2304)|0;$544=HEAP32[$53>>2]|0;$bRefine$041=1;$best_ggain_pass1$042=$544;$best_part2_3_length$040=$best_part2_3_length$3}$545=$gfc+104|0;$546=HEAP32[$545>>2]|0;if(($546|0)==1|($546|0)==4|($546|0)==2){_memcpy($xrpow|0,$save_xrpow|0,2304)|0}else{$547=HEAP32[$45>>2]|0;$548=$547&1;$549=($548|0)==0;if(!$549){_trancate_smallspectrums($gfc,$cod_info,$l3_xmin,$xrpow)}}$550=HEAP32[$54>>2]|0;$$0=$550;STACKTOP=sp;return $$0|0}function _trancate_smallspectrums($gfc,$gi,$l3_xmin,$work){$gfc=$gfc|0;$gi=$gi|0;$l3_xmin=$l3_xmin|0;$work=$work|0;var $$=0,$$lcssa=0,$$lcssa12=0,$$old=0,$$old46=0,$$pre=0,$$pre$phi$lcssaZ2D=0,$$pre$phiZ2D=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0.0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0;var $2=0,$20=0,$21=0,$22=0,$23=0,$24=0.0,$25=0,$26=0,$27=0,$28=0,$29=0.0,$3=0,$30=0.0,$31=0,$32=0.0,$33=0,$34=0,$35=0.0,$36=0.0,$37=0.0;var $38=0,$39=0.0,$4=0,$40=0.0,$41=0.0,$42=0.0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0.0,$49=0,$5=0,$50=0.0,$51=0.0,$52=0,$53=0,$54=0.0,$55=0;var $56=0.0,$57=0.0,$58=0,$59=0.0,$6=0,$60=0.0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0.0,$67=0.0,$68=0.0,$69=0.0,$7=0,$70=0,$71=0,$72=0.0,$73=0;var $74=0,$75=0.0,$76=0.0,$77=0,$78=0.0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0.0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0;var $92=0,$93=0,$allowedNoise$0=0.0,$distort=0,$dummy=0,$exitcond=0,$fabsf=0.0,$fabsf1=0.0,$fabsf2=0.0,$fabsf3=0.0,$fabsf4=0.0,$fabsf5=0.0,$fabsf6=0.0,$j$027=0,$j$1=0,$nsame$0$lcssa=0,$nsame$016=0,$or$cond=0,$sfb$0=0,$start$0=0;var $start$0$lcssa=0,$width$0=0,$xr$0=0.0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+192|0;$distort=sp+24|0;$dummy=sp;$0=$gfc+85096|0;$1=HEAP32[$0>>2]|0;$2=$1&4;$3=($2|0)==0;if($3){$4=$gi+4788|0;$5=HEAP32[$4>>2]|0;$6=($5|0)!=2;$7=$1&128;$8=($7|0)==0;$or$cond=$6&$8;if(!$or$cond){STACKTOP=sp;return}}else{$$old=$1&128;$$old46=($$old|0)==0;if(!$$old46){STACKTOP=sp;return}}_calc_noise($gi,$l3_xmin,$distort,$dummy,0)|0;$j$027=0;while(1){$9=($gi+2304|0)+($j$027<<2)|0;$10=HEAP32[$9>>2]|0;$11=($10|0)==0;if($11){$xr$0=0.0}else{$12=$gi+($j$027<<2)|0;$13=+HEAPF32[$12>>2];$fabsf6=+Math_abs(+$13);$xr$0=$fabsf6}$14=$work+($j$027<<2)|0;HEAPF32[$14>>2]=$xr$0;$15=$j$027+1|0;$exitcond=($15|0)==576;if($exitcond){break}else{$j$027=$15}}$16=$gi+4788|0;$17=HEAP32[$16>>2]|0;$18=($17|0)==2;$$=$18?6:8;$19=$gi+4864|0;$j$1=0;$sfb$0=$$;while(1){$20=($gi+4872|0)+($sfb$0<<2)|0;$21=HEAP32[$20>>2]|0;$22=$21+$j$1|0;$23=$distort+($sfb$0<<2)|0;$24=+HEAPF32[$23>>2];$25=!($24>=1.0);L15:do{if($25){$26=$work+($j$1<<2)|0;_qsort($26,$21,4,1);$27=$22+-1|0;$28=$work+($27<<2)|0;$29=+HEAPF32[$28>>2];$fabsf=+Math_abs(+$29);$30=$fabsf;$31=$29!=$29|0.0!=0.0|$29==0.0;if($31){$34=$29==0.0;if($34){break}}else{$32=$30*9.9999999747524271E-7;$33=!($30<=$32);if(!$33){break}}$35=+HEAPF32[$23>>2];$36=$35;$37=1.0-$36;$38=$l3_xmin+($sfb$0<<2)|0;$39=+HEAPF32[$38>>2];$40=$39;$41=$37*$40;$42=$41;$allowedNoise$0=$42;$start$0=0;while(1){$43=$start$0+1|0;$44=($43|0)<($21|0);L23:do{if($44){$45=$start$0+$22|0;$46=$45-$21|0;$47=$work+($46<<2)|0;$48=+HEAPF32[$47>>2];$fabsf3=+Math_abs(+$48);$49=$start$0+$j$1|0;$50=$fabsf3;$51=$50*9.9999999747524271E-7;$93=$43;$nsame$016=1;while(1){$52=$49+$nsame$016|0;$53=$work+($52<<2)|0;$54=+HEAPF32[$53>>2];$fabsf4=+Math_abs(+$54);$55=$fabsf3>$fabsf4;$56=$48-$54;$fabsf5=+Math_abs(+$56);$57=$fabsf5;if($55){$58=!($57<=$51);if($58){$$lcssa=$93;$$lcssa12=1;$$pre$phiZ2D=$49;$nsame$0$lcssa=$nsame$016;break L23}}else{$59=$fabsf4;$60=$59*9.9999999747524271E-7;$61=!($57<=$60);if($61){$$lcssa=$93;$$lcssa12=1;$$pre$phiZ2D=$49;$nsame$0$lcssa=$nsame$016;break L23}}$62=$nsame$016+1|0;$63=$62+$start$0|0;$64=($63|0)<($21|0);if($64){$93=$63;$nsame$016=$62}else{$$lcssa=$63;$$lcssa12=0;$$pre$phiZ2D=$49;$nsame$0$lcssa=$62;break}}}else{$$pre=$j$1+$start$0|0;$$lcssa=$43;$$lcssa12=0;$$pre$phiZ2D=$$pre;$nsame$0$lcssa=1}}while(0);$65=$work+($$pre$phiZ2D<<2)|0;$66=+HEAPF32[$65>>2];$67=+($nsame$0$lcssa|0);$68=$66*$66;$69=$68*$67;$70=$allowedNoise$0<$69;if($70){$$pre$phi$lcssaZ2D=$$pre$phiZ2D;$start$0$lcssa=$start$0;break}$72=$allowedNoise$0-$69;if($$lcssa12){$allowedNoise$0=$72;$start$0=$$lcssa}else{break L15}}$71=($start$0$lcssa|0)==0;if(!$71){$73=$$pre$phi$lcssaZ2D+-1|0;$74=$work+($73<<2)|0;$75=+HEAPF32[$74>>2];$fabsf1=+Math_abs(+$75);$76=$fabsf1;$77=$75!=$75|0.0!=0.0|$75==0.0;if($77){$80=$75==0.0;if($80){break}else{$width$0=$21}}else{$78=$76*9.9999999747524271E-7;$79=!($76<=$78);if($79){$width$0=$21}else{break}}while(1){$81=$22-$width$0|0;$82=$gi+($81<<2)|0;$83=+HEAPF32[$82>>2];$fabsf2=+Math_abs(+$83);$84=!($fabsf2<=$75);if(!$84){$85=($gi+2304|0)+($81<<2)|0;HEAP32[$85>>2]=0}$86=$width$0+-1|0;$87=($width$0|0)>1;if($87){$width$0=$86}else{break}}}}}while(0);$88=$sfb$0+1|0;$89=HEAP32[$19>>2]|0;$90=($88|0)<($89|0);if($90){$j$1=$22;$sfb$0=$88}else{break}}$91=_noquant_count_bits($gfc,$gi,0)|0;$92=$gi+4768|0;HEAP32[$92>>2]=$91;STACKTOP=sp;return}function _floatcompare($v1,$v2){$v1=$v1|0;$v2=$v2|0;var $$=0,$$0=0,$0=0.0,$1=0.0,$2=0,$3=0,label=0,sp=0;sp=STACKTOP;$0=+HEAPF32[$v1>>2];$1=+HEAPF32[$v2>>2];$2=$0>$1;$3=$0<$1;$$=$3<<31>>31;$$0=$2?1:$$;return $$0|0}function _iteration_init($gfc){$gfc=$gfc|0;var $$$i=0.0,$$1$i=0.0,$$2$i=0.0,$$2$i$lcssa=0.0,$$3$i=0.0,$$phi$trans$insert$i=0,$$pre=0.0,$$pre$i=0,$$pre50$i=0,$0=0,$1=0,$10=0.0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0.0,$106=0.0,$107=0.0;var $108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0;var $126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0;var $144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0.0,$159=0.0,$16=0,$160=0,$161=0.0;var $162=0.0,$163=0.0,$164=0.0,$165=0.0,$166=0.0,$167=0.0,$168=0.0,$169=0.0,$17=0,$170=0,$171=0,$172=0.0,$173=0.0,$174=0.0,$175=0.0,$176=0,$177=0,$178=0.0,$179=0.0,$18=0;var $180=0,$181=0.0,$182=0.0,$183=0.0,$184=0.0,$185=0.0,$186=0.0,$187=0.0,$188=0.0,$189=0,$19=0,$190=0,$191=0,$192=0.0,$193=0.0,$194=0.0,$195=0,$196=0,$197=0,$198=0.0;var $199=0.0,$2=0,$20=0.0,$200=0.0,$201=0,$202=0,$203=0,$204=0.0,$205=0.0,$206=0.0,$207=0.0,$208=0,$209=0,$21=0.0,$210=0,$211=0,$212=0,$213=0,$214=0,$215=0;var $216=0.0,$217=0.0,$218=0.0,$219=0.0,$22=0.0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0,$228=0.0,$229=0.0,$23=0.0,$230=0.0,$231=0.0,$232=0,$233=0;var $234=0,$235=0,$236=0,$237=0,$238=0,$239=0,$24=0,$240=0.0,$241=0.0,$242=0.0,$243=0.0,$244=0,$245=0.0,$246=0.0,$247=0.0,$248=0.0,$249=0,$25=0.0,$250=0,$251=0;var $252=0.0,$253=0.0,$254=0.0,$255=0.0,$256=0,$257=0,$258=0,$259=0,$26=0.0,$260=0.0,$261=0.0,$262=0.0,$263=0.0,$264=0,$265=0,$266=0,$267=0,$268=0,$269=0.0,$27=0.0;var $270=0.0,$271=0.0,$272=0.0,$273=0,$28=0.0,$29=0.0,$3=0,$30=0.0,$31=0,$32=0,$33=0,$34=0.0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0.0;var $42=0.0,$43=0.0,$44=0.0,$45=0,$46=0.0,$47=0.0,$48=0.0,$49=0.0,$5=0,$50=0.0,$51=0.0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0;var $60=0,$61=0,$62=0,$63=0.0,$64=0.0,$65=0.0,$66=0.0,$67=0,$68=0.0,$69=0.0,$7=0,$70=0.0,$71=0.0,$72=0.0,$73=0.0,$74=0,$75=0,$76=0,$77=0,$78=0;var $79=0.0,$8=0,$80=0.0,$81=0.0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0.0,$9=0.0,$90=0.0,$91=0.0,$92=0.0,$93=0,$94=0.0,$95=0.0,$96=0.0;var $97=0.0,$98=0.0,$99=0.0,$ath$0$i$i=0.0,$ath$0$i11$i=0.0,$ath$0$i5$i=0.0,$ath$0$i7$i=0.0,$ath$0$i9$i=0.0,$ath$0$p$i$i=0.0,$ath$0$p$i10$i=0.0,$ath$0$p$i4$i=0.0,$ath$0$p$i6$i=0.0,$ath$0$p$i8$i=0.0,$exitcond$i=0,$exitcond43=0,$exitcond43$i=0,$exitcond44=0,$exitcond44$i=0,$exitcond45=0,$exitcond45$i=0;var $exitcond46=0,$exitcond46$i=0,$exitcond47$i=0,$exitcond48$i=0,$exitcond49$i=0,$exp2=0.0,$exp21=0.0,$i$030=0,$i$035$i=0,$i$129=0,$i$131$i=0,$i$226$i=0,$i$228=0,$i$324$i=0,$i$327=0,$sfb$038$i=0,$sfb$134$i=0,$sfb$230$i=0,$sfb$325$i=0,label=0;var sp=0;sp=STACKTOP;$0=$gfc+8|0;$1=HEAP32[$0>>2]|0;$2=($1|0)==0;if(!$2){return}HEAP32[$0>>2]=1;$3=$gfc+21312|0;HEAP32[$3>>2]=0;$4=$gfc+16|0;$5=$gfc+85796|0;$6=HEAP32[$5>>2]|0;$7=$gfc+64|0;$8=HEAP32[$7>>2]|0;$9=+($8|0);$10=$9*8.6805556202307343E-4;$11=$gfc+224|0;$12=$gfc+196|0;$sfb$038$i=0;while(1){$14=($gfc+21360|0)+($sfb$038$i<<2)|0;$15=HEAP32[$14>>2]|0;$13=$sfb$038$i+1|0;$16=($gfc+21360|0)+($13<<2)|0;$17=HEAP32[$16>>2]|0;$18=($6+24|0)+($sfb$038$i<<2)|0;HEAPF32[$18>>2]=9.9999999338158125E+36;$19=($15|0)<($17|0);if($19){$i$035$i=$15;while(1){$20=+($i$035$i|0);$21=$20*$10;$22=+_ATHformula($4,$21);$23=+HEAPF32[$11>>2];$24=$23>0.0;$25=-$23;$ath$0$p$i$i=$24?$25:-100.0;$26=+HEAPF32[$12>>2];$ath$0$i$i=$26+$22;$27=$ath$0$i$i+$ath$0$p$i$i;$28=$27*0.10000000149011612;$29=+Math_pow(10.0,+$28);$30=+HEAPF32[$18>>2];$31=$30<$29;$$$i=$31?$30:$29;HEAPF32[$18>>2]=$$$i;$32=$i$035$i+1|0;$exitcond48$i=($32|0)==($17|0);if($exitcond48$i){break}else{$i$035$i=$32}}}$exitcond49$i=($13|0)==22;if($exitcond49$i){$sfb$134$i=0;break}else{$sfb$038$i=$13}}while(1){$35=($gfc+21508|0)+($sfb$134$i<<2)|0;$36=HEAP32[$35>>2]|0;$33=$sfb$134$i+1|0;$37=($gfc+21508|0)+($33<<2)|0;$38=HEAP32[$37>>2]|0;$39=($6+164|0)+($sfb$134$i<<2)|0;HEAPF32[$39>>2]=9.9999999338158125E+36;$40=($36|0)<($38|0);if($40){$i$131$i=$36;while(1){$41=+($i$131$i|0);$42=$41*$10;$43=+_ATHformula($4,$42);$44=+HEAPF32[$11>>2];$45=$44>0.0;$46=-$44;$ath$0$p$i4$i=$45?$46:-100.0;$47=+HEAPF32[$12>>2];$ath$0$i5$i=$47+$43;$48=$ath$0$i5$i+$ath$0$p$i4$i;$49=$48*0.10000000149011612;$50=+Math_pow(10.0,+$49);$51=+HEAPF32[$39>>2];$52=$51<$50;$$1$i=$52?$51:$50;HEAPF32[$39>>2]=$$1$i;$53=$i$131$i+1|0;$exitcond46$i=($53|0)==($38|0);if($exitcond46$i){break}else{$i$131$i=$53}}}$exitcond47$i=($33|0)==6;if($exitcond47$i){break}else{$sfb$134$i=$33}}$34=$9*0.0026041667442768812;$$phi$trans$insert$i=$gfc+21452|0;$$pre$i=HEAP32[$$phi$trans$insert$i>>2]|0;$61=$$pre$i;$sfb$230$i=0;while(1){$56=($gfc+21452|0)+($sfb$230$i<<2)|0;$57=$sfb$230$i+1|0;$58=($gfc+21452|0)+($57<<2)|0;$59=HEAP32[$58>>2]|0;$60=($6+112|0)+($sfb$230$i<<2)|0;HEAPF32[$60>>2]=9.9999999338158125E+36;$62=($61|0)<($59|0);if($62){$i$226$i=$61;while(1){$63=+($i$226$i|0);$64=$63*$34;$65=+_ATHformula($4,$64);$66=+HEAPF32[$11>>2];$67=$66>0.0;$68=-$66;$ath$0$p$i6$i=$67?$68:-100.0;$69=+HEAPF32[$12>>2];$ath$0$i7$i=$69+$65;$70=$ath$0$i7$i+$ath$0$p$i6$i;$71=$70*0.10000000149011612;$72=+Math_pow(10.0,+$71);$73=+HEAPF32[$60>>2];$74=$73<$72;$$2$i=$74?$73:$72;HEAPF32[$60>>2]=$$2$i;$75=$i$226$i+1|0;$exitcond44$i=($75|0)==($59|0);if($exitcond44$i){$$2$i$lcssa=$$2$i;break}else{$i$226$i=$75}}$$pre50$i=HEAP32[$58>>2]|0;$78=$$pre50$i;$81=$$2$i$lcssa}else{$78=$59;$81=9.9999999338158125E+36}$76=HEAP32[$56>>2]|0;$77=$78-$76|0;$79=+($77|0);$80=$79*$81;HEAPF32[$60>>2]=$80;$exitcond45$i=($57|0)==13;if($exitcond45$i){break}else{$61=$78;$sfb$230$i=$57}}$54=$gfc+21504|0;$55=$gfc+21500|0;$sfb$325$i=0;while(1){$82=($gfc+21536|0)+($sfb$325$i<<2)|0;$83=HEAP32[$82>>2]|0;$84=$sfb$325$i+1|0;$85=($gfc+21536|0)+($84<<2)|0;$86=HEAP32[$85>>2]|0;$87=($6+188|0)+($sfb$325$i<<2)|0;HEAPF32[$87>>2]=9.9999999338158125E+36;$88=($83|0)<($86|0);if($88){$i$324$i=$83;while(1){$89=+($i$324$i|0);$90=$89*$34;$91=+_ATHformula($4,$90);$92=+HEAPF32[$11>>2];$93=$92>0.0;$94=-$92;$ath$0$p$i8$i=$93?$94:-100.0;$95=+HEAPF32[$12>>2];$ath$0$i9$i=$95+$91;$96=$ath$0$i9$i+$ath$0$p$i8$i;$97=$96*0.10000000149011612;$98=+Math_pow(10.0,+$97);$99=+HEAPF32[$87>>2];$100=$99<$98;$$3$i=$100?$99:$98;HEAPF32[$87>>2]=$$3$i;$101=$i$324$i+1|0;$exitcond$i=($101|0)==($86|0);if($exitcond$i){$107=$$3$i;break}else{$i$324$i=$101}}}else{$107=9.9999999338158125E+36}$102=HEAP32[$54>>2]|0;$103=HEAP32[$55>>2]|0;$104=$102-$103|0;$105=+($104|0);$106=$105*$107;HEAPF32[$87>>2]=$106;$exitcond43$i=($84|0)==6;if($exitcond43$i){break}else{$sfb$325$i=$84}}$108=$gfc+220|0;$109=HEAP32[$108>>2]|0;$110=($109|0)==0;if(!$110){$111=$6+24|0;HEAPF32[$111>>2]=9.9999996826552254E-21;$112=$6+28|0;HEAPF32[$112>>2]=9.9999996826552254E-21;$113=$6+32|0;HEAPF32[$113>>2]=9.9999996826552254E-21;$114=$6+36|0;HEAPF32[$114>>2]=9.9999996826552254E-21;$115=$6+40|0;HEAPF32[$115>>2]=9.9999996826552254E-21;$116=$6+44|0;HEAPF32[$116>>2]=9.9999996826552254E-21;$117=$6+48|0;HEAPF32[$117>>2]=9.9999996826552254E-21;$118=$6+52|0;HEAPF32[$118>>2]=9.9999996826552254E-21;$119=$6+56|0;HEAPF32[$119>>2]=9.9999996826552254E-21;$120=$6+60|0;HEAPF32[$120>>2]=9.9999996826552254E-21;$121=$6+64|0;HEAPF32[$121>>2]=9.9999996826552254E-21;$122=$6+68|0;HEAPF32[$122>>2]=9.9999996826552254E-21;$123=$6+72|0;HEAPF32[$123>>2]=9.9999996826552254E-21;$124=$6+76|0;HEAPF32[$124>>2]=9.9999996826552254E-21;$125=$6+80|0;HEAPF32[$125>>2]=9.9999996826552254E-21;$126=$6+84|0;HEAPF32[$126>>2]=9.9999996826552254E-21;$127=$6+88|0;HEAPF32[$127>>2]=9.9999996826552254E-21;$128=$6+92|0;HEAPF32[$128>>2]=9.9999996826552254E-21;$129=$6+96|0;HEAPF32[$129>>2]=9.9999996826552254E-21;$130=$6+100|0;HEAPF32[$130>>2]=9.9999996826552254E-21;$131=$6+104|0;HEAPF32[$131>>2]=9.9999996826552254E-21;$132=$6+108|0;HEAPF32[$132>>2]=9.9999996826552254E-21;$133=$6+164|0;HEAPF32[$133>>2]=9.9999996826552254E-21;$134=$6+168|0;HEAPF32[$134>>2]=9.9999996826552254E-21;$135=$6+172|0;HEAPF32[$135>>2]=9.9999996826552254E-21;$136=$6+176|0;HEAPF32[$136>>2]=9.9999996826552254E-21;$137=$6+180|0;HEAPF32[$137>>2]=9.9999996826552254E-21;$138=$6+184|0;HEAPF32[$138>>2]=9.9999996826552254E-21;$139=$6+112|0;HEAPF32[$139>>2]=9.9999996826552254E-21;$140=$6+116|0;HEAPF32[$140>>2]=9.9999996826552254E-21;$141=$6+120|0;HEAPF32[$141>>2]=9.9999996826552254E-21;$142=$6+124|0;HEAPF32[$142>>2]=9.9999996826552254E-21;$143=$6+128|0;HEAPF32[$143>>2]=9.9999996826552254E-21;$144=$6+132|0;HEAPF32[$144>>2]=9.9999996826552254E-21;$145=$6+136|0;HEAPF32[$145>>2]=9.9999996826552254E-21;$146=$6+140|0;HEAPF32[$146>>2]=9.9999996826552254E-21;$147=$6+144|0;HEAPF32[$147>>2]=9.9999996826552254E-21;$148=$6+148|0;HEAPF32[$148>>2]=9.9999996826552254E-21;$149=$6+152|0;HEAPF32[$149>>2]=9.9999996826552254E-21;$150=$6+156|0;HEAPF32[$150>>2]=9.9999996826552254E-21;$151=$6+160|0;HEAPF32[$151>>2]=9.9999996826552254E-21;$152=$6+188|0;HEAPF32[$152>>2]=9.9999996826552254E-21;$153=$6+192|0;HEAPF32[$153>>2]=9.9999996826552254E-21;$154=$6+196|0;HEAPF32[$154>>2]=9.9999996826552254E-21;$155=$6+200|0;HEAPF32[$155>>2]=9.9999996826552254E-21;$156=$6+204|0;HEAPF32[$156>>2]=9.9999996826552254E-21;$157=$6+208|0;HEAPF32[$157>>2]=9.9999996826552254E-21}$158=+_ATHformula($4,-1.0);$159=+HEAPF32[$11>>2];$160=$159>0.0;$161=-$159;$ath$0$p$i10$i=$160?$161:-100.0;$162=+HEAPF32[$12>>2];$ath$0$i11$i=$162+$158;$163=$ath$0$i11$i+$ath$0$p$i10$i;$164=$163*0.10000000149011612;$165=+Math_pow(10.0,+$164);$166=$165;$167=+_log10($166);$168=$167*10.0;$169=$168;$170=HEAP32[$5>>2]|0;$171=$170+20|0;HEAPF32[$171>>2]=$169;HEAPF32[14040>>2]=0.0;$i$030=1;while(1){$172=+($i$030|0);$173=$172;$174=+Math_pow(+$173,1.3333333333333333);$175=$174;$176=14040+($i$030<<2)|0;HEAPF32[$176>>2]=$175;$177=$i$030+1|0;$exitcond46=($177|0)==8208;if($exitcond46){break}else{$i$030=$177}}HEAPF32[46872>>2]=0.0;$$pre=+HEAPF32[14040>>2];$183=$$pre;$i$129=1;while(1){$178=+($i$129|0);$179=$178+-0.5;$180=14040+($i$129<<2)|0;$181=+HEAPF32[$180>>2];$182=$181+$183;$184=$182;$185=$184*0.5;$186=+Math_pow(+$185,0.75);$187=$179-$186;$188=$187;$189=46872+($i$129<<2)|0;HEAPF32[$189>>2]=$188;$190=$i$129+1|0;$exitcond45=($190|0)==8208;if($exitcond45){$i$228=0;break}else{$183=$181;$i$129=$190}}while(1){$191=$i$228+-210|0;$192=+($191|0);$193=$192*-0.1875;$exp21=+_exp2($193);$194=$exp21;$195=79704+($i$228<<2)|0;HEAPF32[$195>>2]=$194;$196=$i$228+1|0;$exitcond44=($196|0)==257;if($exitcond44){$i$327=0;break}else{$i$228=$196}}while(1){$197=$i$327+-326|0;$198=+($197|0);$199=$198*0.25;$exp2=+_exp2($199);$200=$exp2;$201=80736+($i$327<<2)|0;HEAPF32[$201>>2]=$200;$202=$i$327+1|0;$exitcond43=($202|0)==374;if($exitcond43){break}else{$i$327=$202}}_huffman_init($gfc);_init_xrpow_core_init($gfc);$203=$gfc+232|0;$204=+HEAPF32[$203>>2];$205=$204+-0.5;$206=$205*0.10000000149011612;$207=+Math_pow(10.0,+$206);$208=$gfc+84768|0;HEAPF32[$208>>2]=$207;$209=$gfc+84772|0;HEAPF32[$209>>2]=$207;$210=$gfc+84776|0;HEAPF32[$210>>2]=$207;$211=$gfc+84780|0;HEAPF32[$211>>2]=$207;$212=$gfc+84784|0;HEAPF32[$212>>2]=$207;$213=$gfc+84788|0;HEAPF32[$213>>2]=$207;$214=$gfc+84792|0;HEAPF32[$214>>2]=$207;$215=$gfc+228|0;$216=+HEAPF32[$215>>2];$217=$216+-0.25;$218=$217*0.10000000149011612;$219=+Math_pow(10.0,+$218);$220=$gfc+84796|0;HEAPF32[$220>>2]=$219;$221=$gfc+84800|0;HEAPF32[$221>>2]=$219;$222=$gfc+84804|0;HEAPF32[$222>>2]=$219;$223=$gfc+84808|0;HEAPF32[$223>>2]=$219;$224=$gfc+84812|0;HEAPF32[$224>>2]=$219;$225=$gfc+84816|0;HEAPF32[$225>>2]=$219;$226=$gfc+84820|0;HEAPF32[$226>>2]=$219;$227=$gfc+236|0;$228=+HEAPF32[$227>>2];$229=$228+-0.02500000037252903;$230=$229*0.10000000149011612;$231=+Math_pow(10.0,+$230);$232=$gfc+84824|0;HEAPF32[$232>>2]=$231;$233=$gfc+84828|0;HEAPF32[$233>>2]=$231;$234=$gfc+84832|0;HEAPF32[$234>>2]=$231;$235=$gfc+84836|0;HEAPF32[$235>>2]=$231;$236=$gfc+84840|0;HEAPF32[$236>>2]=$231;$237=$gfc+84844|0;HEAPF32[$237>>2]=$231;$238=$gfc+84848|0;HEAPF32[$238>>2]=$231;$239=$gfc+240|0;$240=+HEAPF32[$239>>2];$241=$240+0.5;$242=$241*0.10000000149011612;$243=+Math_pow(10.0,+$242);$244=$gfc+84852|0;HEAPF32[$244>>2]=$243;$245=+HEAPF32[$203>>2];$246=$245+-2.0;$247=$246*0.10000000149011612;$248=+Math_pow(10.0,+$247);$249=$gfc+84856|0;HEAPF32[$249>>2]=$248;$250=$gfc+84860|0;HEAPF32[$250>>2]=$248;$251=$gfc+84864|0;HEAPF32[$251>>2]=$248;$252=+HEAPF32[$215>>2];$253=$252+-1.0;$254=$253*0.10000000149011612;$255=+Math_pow(10.0,+$254);$256=$gfc+84868|0;HEAPF32[$256>>2]=$255;$257=$gfc+84872|0;HEAPF32[$257>>2]=$255;$258=$gfc+84876|0;HEAPF32[$258>>2]=$255;$259=$gfc+84880|0;HEAPF32[$259>>2]=$255;$260=+HEAPF32[$227>>2];$261=$260+-0.05000000074505806;$262=$261*0.10000000149011612;$263=+Math_pow(10.0,+$262);$264=$gfc+84884|0;HEAPF32[$264>>2]=$263;$265=$gfc+84888|0;HEAPF32[$265>>2]=$263;$266=$gfc+84892|0;HEAPF32[$266>>2]=$263;$267=$gfc+84896|0;HEAPF32[$267>>2]=$263;$268=$gfc+84900|0;HEAPF32[$268>>2]=$263;$269=+HEAPF32[$239>>2];$270=$269+0.5;$271=$270*0.10000000149011612;$272=+Math_pow(10.0,+$271);$273=$gfc+84904|0;HEAPF32[$273>>2]=$272;return}function _on_pe($gfc,$pe,$targ_bits,$mean_bits,$gr,$cbr){$gfc=$gfc|0;$pe=$pe|0;$targ_bits=$targ_bits|0;$mean_bits=$mean_bits|0;$gr=$gr|0;$cbr=$cbr|0;var $$=0,$$3=0,$$4=0,$$lcssa=0,$$lcssa43=0,$$lcssa44=0,$$lcssa45=0,$$lcssa46=0,$$not=0,$$not34=0,$$storemerge=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0;var $17=0.0,$18=0,$19=0.0,$2=0,$20=0.0,$21=0.0,$22=0.0,$23=0.0,$24=0.0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0;var $35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0;var $53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$8=0;var $9=0,$add_bits=0,$bits$017=0,$bits$19=0,$brmerge=0,$ch$018=0,$ch$115=0,$ch$212=0,$ch$310=0,$ch$48=0,$extra_bits=0,$or$cond=0,$storemerge=0,$storemerge26=0,$tbits=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$extra_bits=sp+12|0;$tbits=sp+8|0;$add_bits=sp;HEAP32[$extra_bits>>2]=0;$0=$add_bits;$1=$0;HEAP32[$1>>2]=0;$2=$0+4|0;$3=$2;HEAP32[$3>>2]=0;_ResvMaxBits($gfc,$mean_bits,$tbits,$extra_bits,$cbr);$4=HEAP32[$tbits>>2]|0;$5=HEAP32[$extra_bits>>2]|0;$6=$5+$4|0;$7=($6|0)>7680;$$=$7?7680:$6;$8=$gfc+72|0;$9=HEAP32[$8>>2]|0;$10=($9|0)>0;if(!$10){STACKTOP=sp;return $$|0}$11=$mean_bits*3|0;$12=($11|0)/4&-1;$14=$9;$bits$017=0;$ch$018=0;while(1){$13=($4|0)/($14|0)&-1;$15=($13|0)>4095;$$3=$15?4095:$13;$16=$targ_bits+($ch$018<<2)|0;HEAP32[$16>>2]=$$3;$17=+($$3|0);$18=($pe+($gr<<3)|0)+($ch$018<<2)|0;$19=+HEAPF32[$18>>2];$20=$17*$19;$21=$20;$22=$21*0.0014285714285714286;$23=+($$3|0);$24=$22-$23;$25=~~$24;$26=$add_bits+($ch$018<<2)|0;$27=($25|0)>($12|0);$storemerge=$27?$12:$25;$28=($storemerge|0)<0;$$storemerge=$28?0:$storemerge;$29=$$storemerge+$$3|0;$30=($29|0)>4095;if($30){$31=4095-$$3|0;$32=($31|0)<0;$$4=$32?0:$31;$storemerge26=$$4}else{$storemerge26=$$storemerge}HEAP32[$26>>2]=$storemerge26;$33=$storemerge26+$bits$017|0;$34=$ch$018+1|0;$35=HEAP32[$8>>2]|0;$36=($34|0)<($35|0);if($36){$14=$35;$bits$017=$33;$ch$018=$34}else{$$lcssa45=$33;$$lcssa46=$35;break}}$37=($$lcssa45|0)>($5|0);$38=($$lcssa45|0)>0;$or$cond=$38&$37;if($or$cond){$39=($$lcssa46|0)>0;if($39){$ch$115=0;while(1){$41=$add_bits+($ch$115<<2)|0;$42=HEAP32[$41>>2]|0;$43=Math_imul($42,$5)|0;$44=($43|0)/($$lcssa45|0)&-1;HEAP32[$41>>2]=$44;$45=$ch$115+1|0;$46=($45|0)<($$lcssa46|0);if($46){$ch$115=$45}else{break}}}else{STACKTOP=sp;return $$|0}}$40=($$lcssa46|0)>0;if($40){$54=$5;$ch$212=0}else{STACKTOP=sp;return $$|0}while(1){$48=$add_bits+($ch$212<<2)|0;$49=HEAP32[$48>>2]|0;$50=$targ_bits+($ch$212<<2)|0;$51=HEAP32[$50>>2]|0;$52=$51+$49|0;HEAP32[$50>>2]=$52;$53=$54-$49|0;$55=$ch$212+1|0;$56=HEAP32[$8>>2]|0;$57=($55|0)<($56|0);if($57){$54=$53;$ch$212=$55}else{$$lcssa43=$53;$$lcssa44=$56;break}}HEAP32[$extra_bits>>2]=$$lcssa43;$47=($$lcssa44|0)>0;if($47){$bits$19=0;$ch$310=0}else{STACKTOP=sp;return $$|0}while(1){$58=$targ_bits+($ch$310<<2)|0;$59=HEAP32[$58>>2]|0;$60=$59+$bits$19|0;$61=$ch$310+1|0;$62=($61|0)<($$lcssa44|0);if($62){$bits$19=$60;$ch$310=$61}else{$$lcssa=$60;break}}$$not=($$lcssa|0)<7681;$$not34=$47^1;$brmerge=$$not|$$not34;if($brmerge){STACKTOP=sp;return $$|0}else{$ch$48=0}while(1){$63=$targ_bits+($ch$48<<2)|0;$64=HEAP32[$63>>2]|0;$65=$64*7680|0;$66=($65|0)/($$lcssa|0)&-1;HEAP32[$63>>2]=$66;$67=$ch$48+1|0;$68=HEAP32[$8>>2]|0;$69=($67|0)<($68|0);if($69){$ch$48=$67}else{break}}STACKTOP=sp;return $$|0}function _reduce_side($targ_bits,$ms_ener_ratio,$mean_bits,$max_bits){$targ_bits=$targ_bits|0;$ms_ener_ratio=+$ms_ener_ratio;$mean_bits=$mean_bits|0;$max_bits=$max_bits|0;var $$=0,$$op=0.0,$0=0.0,$1=0.0,$10=0,$11=0,$12=0.0,$13=0.0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0.0,$20=0,$21=0,$22=0,$23=0,$24=0;var $25=0,$26=0,$27=0,$28=0,$29=0,$3=0.0,$30=0,$31=0,$32=0,$33=0,$4=0,$5=0,$6=0.0,$7=0.0,$8=0,$9=0,$fac$0=0.0,$move_bits$1=0,label=0,sp=0;sp=STACKTOP;$0=$ms_ener_ratio;$1=0.5-$0;$2=$1*0.66000000000000003;$3=$2;$4=$3<0.0;$fac$0=$4?0.0:$3;$5=$fac$0>0.5;$6=$fac$0;$$op=$6*0.5;$7=$5?0.25:$$op;$8=HEAP32[$targ_bits>>2]|0;$9=$targ_bits+4|0;$10=HEAP32[$9>>2]|0;$11=$10+$8|0;$12=+($11|0);$13=$12*$7;$14=~~$13;$15=4095-$8|0;$16=($14|0)>($15|0);$$=$16?$15:$14;$17=($$|0)<0;$move_bits$1=$17?0:$$;$18=($10|0)>124;do{if($18){$19=$10-$move_bits$1|0;$20=($19|0)>125;if(!$20){$23=$8+-125|0;$24=$23+$10|0;HEAP32[$targ_bits>>2]=$24;HEAP32[$9>>2]=125;$26=$24;$27=125;break}$21=($8|0)<($mean_bits|0);if($21){$22=$move_bits$1+$8|0;HEAP32[$targ_bits>>2]=$22;$33=$22}else{$33=$8}HEAP32[$9>>2]=$19;$26=$33;$27=$19}else{$26=$8;$27=$10}}while(0);$25=$27+$26|0;$28=($25|0)>($max_bits|0);if(!$28){return}$29=Math_imul($26,$max_bits)|0;$30=($29|0)/($25|0)&-1;HEAP32[$targ_bits>>2]=$30;$31=Math_imul($27,$max_bits)|0;$32=($31|0)/($25|0)&-1;HEAP32[$9>>2]=$32;return}function _athAdjust($a,$x,$athFloor,$ATHfixpoint){$a=+$a;$x=+$x;$athFloor=+$athFloor;$ATHfixpoint=+$ATHfixpoint;var $$neg=0.0,$0=0,$1=0.0,$10=0.0,$11=0.0,$12=0.0,$13=0,$14=0.0,$15=0.0,$16=0.0,$17=0.0,$18=0.0,$19=0.0,$2=0.0,$3=0.0,$4=0.0,$5=0.0,$6=0.0,$7=0,$8=0.0;var $9=0.0,$ATHfixpoint$op=0.0,$w$0=0.0,$w$1=0.0,label=0,sp=0;sp=STACKTOP;$0=$ATHfixpoint<1.0;$1=+_fast_log2($x);$2=$1;$3=$2*3.0102999566398116;$4=$3;$5=$a*$a;$6=$4-$athFloor;$7=$5>9.9999996826552254E-21;if($7){$8=+_fast_log2($5);$9=$8;$10=$9*0.03333343265598758;$11=$10+1.0;$12=$11;$w$0=$12}else{$w$0=0.0}$13=$w$0<0.0;$w$1=$13?0.0:$w$0;$14=$w$1*$6;$15=$athFloor+90.308731079101563;$ATHfixpoint$op=-$ATHfixpoint;$$neg=$0?-94.824447631835938:$ATHfixpoint$op;$16=$15+$$neg;$17=$16+$14;$18=$17*0.10000000149011612;$19=+Math_pow(10.0,+$18);return+$19}function _calc_xmin($gfc,$ratio,$cod_info,$pxmin){$gfc=$gfc|0;$ratio=$ratio|0;$cod_info=$cod_info|0;$pxmin=$pxmin|0;var $$0$lcssa=0,$$040=0,$$122=0,$$2$lcssa=0,$$lcssa=0.0,$$lcssa93=0.0,$$lcssa94=0.0,$$lcssa95=0.0,$$lcssa96=0.0,$$lcssa97=0.0,$$lcssa98=0.0,$$lcssa99=0.0,$$neg$i=0.0,$$neg$i4=0.0,$$pre=0.0,$$rh2$0=0.0,$$rh26$0=0.0,$$rh26$0$us=0.0,$$rh26$0$us$1=0.0,$$rh26$0$us$2=0.0;var $0=0,$1=0,$10=0.0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0.0,$110=0,$111=0,$112=0.0,$113=0,$114=0.0,$115=0.0;var $116=0.0,$117=0,$118=0.0,$119=0.0,$12=0.0,$120=0.0,$121=0.0,$122=0.0,$123=0.0,$124=0,$125=0.0,$126=0.0,$127=0.0,$128=0.0,$129=0.0,$13=0,$130=0,$131=0.0,$132=0.0,$133=0.0;var $134=0.0,$135=0.0,$136=0.0,$137=0,$138=0.0,$139=0.0,$14=0.0,$140=0,$141=0,$142=0.0,$143=0.0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0.0,$150=0,$151=0.0;var $152=0,$153=0,$154=0.0,$155=0.0,$156=0.0,$157=0.0,$158=0,$159=0,$16=0.0,$160=0,$161=0.0,$162=0.0,$163=0.0,$164=0,$165=0.0,$166=0.0,$167=0,$168=0,$169=0,$17=0.0;var $170=0,$171=0,$172=0,$173=0.0,$174=0,$175=0,$176=0,$177=0.0,$178=0.0,$179=0,$18=0.0,$180=0,$181=0,$182=0,$183=0,$184=0.0,$185=0,$186=0,$187=0,$188=0.0;var $189=0.0,$19=0.0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0.0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0.0,$201=0.0,$202=0,$203=0,$204=0,$205=0;var $206=0,$207=0,$208=0,$209=0.0,$21=0.0,$210=0,$211=0.0,$212=0,$213=0.0,$214=0,$215=0,$216=0.0,$217=0.0,$218=0.0,$219=0,$22=0.0,$220=0.0,$221=0.0,$222=0.0,$223=0;var $224=0,$225=0.0,$226=0.0,$227=0.0,$228=0,$229=0,$23=0.0,$230=0,$231=0,$232=0,$233=0.0,$234=0.0,$235=0,$236=0,$237=0,$238=0,$239=0,$24=0.0,$240=0,$241=0.0;var $242=0.0,$243=0.0,$244=0,$245=0.0,$246=0.0,$247=0,$248=0,$249=0,$25=0.0,$250=0,$251=0,$252=0,$253=0,$254=0.0,$255=0,$256=0,$257=0.0,$258=0.0,$259=0.0,$26=0;var $260=0.0,$261=0.0,$262=0,$263=0,$264=0.0,$265=0.0,$266=0,$267=0,$268=0,$269=0,$27=0.0,$270=0,$271=0,$272=0,$273=0.0,$274=0.0,$275=0.0,$276=0,$277=0.0,$278=0.0;var $279=0,$28=0.0,$280=0,$281=0,$282=0,$283=0,$284=0,$285=0,$286=0.0,$287=0,$288=0,$289=0.0,$29=0.0,$290=0.0,$291=0.0,$292=0.0,$293=0.0,$294=0,$295=0,$296=0.0;var $297=0.0,$298=0,$299=0,$3=0,$30=0.0,$300=0,$301=0,$302=0.0,$31=0.0,$32=0.0,$33=0,$34=0.0,$35=0.0,$36=0,$37=0,$38=0.0,$39=0.0,$4=0,$40=0,$41=0;var $42=0,$43=0.0,$44=0.0,$45=0.0,$46=0,$47=0.0,$48=0.0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0.0,$57=0,$58=0,$59=0.0,$6=0;var $60=0.0,$61=0.0,$62=0.0,$63=0,$64=0,$65=0.0,$66=0.0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0.0,$76=0,$77=0,$78=0;var $79=0,$8=0.0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0;var $97=0,$98=0,$99=0,$ATHfixpoint$op$i=0.0,$ATHfixpoint$op$i3=0.0,$ath_over$0$lcssa=0,$ath_over$037=0,$ath_over$1=0,$ath_over$2$lcssa=0,$ath_over$216=0,$ath_over$3$lcssa=0,$ath_over$4=0,$ath_over$4$1=0,$ath_over$4$2=0,$ath_over$4$us=0,$ath_over$4$us$1=0,$ath_over$4$us$2=0,$en0$0$lcssa=0.0,$en0$030=0.0,$en03$07$us=0.0;var $en03$07$us$1=0.0,$en03$07$us$2=0.0,$exitcond=0,$exitcond$1=0,$exitcond$2=0,$exitcond62=0,$fabsf=0.0,$gsfb$0$lcssa=0,$gsfb$039=0,$gsfb$118=0,$j$0$lcssa=0,$j$038=0,$j$1$lcssa=0,$j$131=0,$j$217=0,$j$3$lcssa=0,$j$48$us=0,$j$48$us$1=0,$j$48$us$2=0,$k$027=0;var $l$028=0,$l2$06$us=0,$l2$06$us$1=0,$l2$06$us$2=0,$limit$0=0,$limit$0$in=0,$limit$0$max_nonzero$1=0,$max_nonzero$0=0,$max_nonzero$1=0,$max_nonzero$2=0,$or$cond=0,$or$cond73=0,$or$cond74=0,$rh2$0$lcssa=0.0,$rh2$029=0.0,$rh26$09$us=0.0,$rh26$09$us$1=0.0,$rh26$09$us$2=0.0,$rh3$0=0.0,$rh37$0=0.0;var $rh37$0$us=0.0,$rh37$0$us$1=0.0,$rh37$0$us$2=0.0,$sfb$020=0,$w$0$i=0.0,$w$0$i1=0.0,$w$1$i=0.0,$w$1$i2=0.0,$xmin$0=0.0,$xmin4$0=0.0,$xmin4$0$1=0.0,$xmin4$0$2=0.0,$xmin4$0$us=0.0,$xmin4$0$us$1=0.0,$xmin4$0$us$2=0.0,label=0,sp=0;sp=STACKTOP;$0=$gfc+85796|0;$1=HEAP32[$0>>2]|0;$2=$cod_info+4856|0;$3=HEAP32[$2>>2]|0;$4=($3|0)>0;if($4){$5=$1+8|0;$6=$1+20|0;$7=$gfc+224|0;$$040=$pxmin;$ath_over$037=0;$gsfb$039=0;$j$038=0;while(1){$8=+HEAPF32[$5>>2];$9=($1+24|0)+($gsfb$039<<2)|0;$10=+HEAPF32[$9>>2];$11=+HEAPF32[$6>>2];$12=+HEAPF32[$7>>2];$13=$12<1.0;$14=+_fast_log2($10);$15=$14;$16=$15*3.0102999566398116;$17=$16;$18=$8*$8;$19=$17-$11;$20=$18>9.9999996826552254E-21;if($20){$21=+_fast_log2($18);$22=$21;$23=$22*0.03333343265598758;$24=$23+1.0;$25=$24;$w$0$i=$25}else{$w$0$i=0.0}$26=$w$0$i<0.0;$w$1$i=$26?0.0:$w$0$i;$27=$w$1$i*$19;$28=$11+90.308731079101563;$ATHfixpoint$op$i=-$12;$$neg$i=$13?-94.824447631835938:$ATHfixpoint$op$i;$29=$28+$$neg$i;$30=$29+$27;$31=$30*0.10000000149011612;$32=+Math_pow(10.0,+$31);$33=($gfc+84768|0)+($gsfb$039<<2)|0;$34=+HEAPF32[$33>>2];$35=$34*$32;$36=($cod_info+4872|0)+($gsfb$039<<2)|0;$37=HEAP32[$36>>2]|0;$38=+($37|0);$39=$35/$38;$40=($37|0)>0;if($40){$en0$030=0.0;$j$131=$j$038;$l$028=0;$rh2$029=2.2204460492503131E-16;while(1){$41=$j$131+1|0;$42=$cod_info+($j$131<<2)|0;$43=+HEAPF32[$42>>2];$44=$43*$43;$45=$44+$en0$030;$46=$44<$39;$47=$46?$44:$39;$48=$47+$rh2$029;$49=$l$028+1|0;$exitcond62=($49|0)==($37|0);if($exitcond62){$$lcssa98=$45;$$lcssa99=$48;break}else{$en0$030=$45;$j$131=$41;$l$028=$49;$rh2$029=$48}}$50=$j$038+$37|0;$en0$0$lcssa=$$lcssa98;$j$1$lcssa=$50;$rh2$0$lcssa=$$lcssa99}else{$en0$0$lcssa=0.0;$j$1$lcssa=$j$038;$rh2$0$lcssa=2.2204460492503131E-16}$51=$en0$0$lcssa>$35;$52=$51&1;$ath_over$1=$52+$ath_over$037|0;$53=$en0$0$lcssa<$35;$54=$rh2$0$lcssa<$35;$$rh2$0=$54?$35:$rh2$0$lcssa;$rh3$0=$53?$en0$0$lcssa:$$rh2$0;$55=($ratio+244|0)+($gsfb$039<<2)|0;$56=+HEAPF32[$55>>2];$57=$56>9.999999960041972E-13;if($57){$58=$ratio+($gsfb$039<<2)|0;$59=+HEAPF32[$58>>2];$60=$59*$en0$0$lcssa;$61=$60/$56;$62=$34*$61;$63=$rh3$0<$62;if($63){$xmin$0=$62}else{$xmin$0=$rh3$0}}else{$xmin$0=$rh3$0}$64=$xmin$0>2.2204460492503131E-16;$65=$64?$xmin$0:2.2204460492503131E-16;$66=$65+9.9999998245167004E-15;$67=$en0$0$lcssa>$66;$68=$67&1;$69=($cod_info+5212|0)+$gsfb$039|0;HEAP8[$69>>0]=$68;$70=$$040+4|0;HEAPF32[$$040>>2]=$65;$71=$gsfb$039+1|0;$72=HEAP32[$2>>2]|0;$73=($71|0)<($72|0);if($73){$$040=$70;$ath_over$037=$ath_over$1;$gsfb$039=$71;$j$038=$j$1$lcssa}else{$$0$lcssa=$70;$ath_over$0$lcssa=$ath_over$1;$gsfb$0$lcssa=$71;$j$0$lcssa=$j$1$lcssa;break}}}else{$$0$lcssa=$pxmin;$ath_over$0$lcssa=0;$gsfb$0$lcssa=0;$j$0$lcssa=0}$k$027=575;while(1){$74=$cod_info+($k$027<<2)|0;$75=+HEAPF32[$74>>2];$fabsf=+Math_abs(+$75);$76=$fabsf>9.999999960041972E-13;if($76){$max_nonzero$0=$k$027;break}$77=$k$027+-1|0;$78=($k$027|0)>1;if($78){$k$027=$77}else{$max_nonzero$0=0;break}}$79=$cod_info+4788|0;$80=HEAP32[$79>>2]|0;$81=($80|0)==2;if($81){$83=($max_nonzero$0|0)%6&-1;$84=$max_nonzero$0+5|0;$85=$84-$83|0;$max_nonzero$1=$85}else{$82=$max_nonzero$0|1;$max_nonzero$1=$82}$86=$gfc+85092|0;$87=HEAP32[$86>>2]|0;$88=($87|0)==0;if($88){$89=$gfc+64|0;$90=HEAP32[$89>>2]|0;$91=($90|0)<44000;if($91){$92=($90|0)<8001;if($81){$96=$92?9:12;$97=($gfc+21452|0)+($96<<2)|0;$98=HEAP32[$97>>2]|0;$99=$98*3|0;$limit$0$in=$99}else{$93=$92?17:21;$94=($gfc+21360|0)+($93<<2)|0;$95=HEAP32[$94>>2]|0;$limit$0$in=$95}$limit$0=$limit$0$in+-1|0;$100=($max_nonzero$1|0)>($limit$0|0);$limit$0$max_nonzero$1=$100?$limit$0:$max_nonzero$1;$max_nonzero$2=$limit$0$max_nonzero$1}else{$max_nonzero$2=$max_nonzero$1}}else{$max_nonzero$2=$max_nonzero$1}$101=$cod_info+5208|0;HEAP32[$101>>2]=$max_nonzero$2;$102=$cod_info+4864|0;$103=HEAP32[$102>>2]|0;$104=($gsfb$0$lcssa|0)<($103|0);if(!$104){$ath_over$2$lcssa=$ath_over$0$lcssa;return $ath_over$2$lcssa|0}$105=$cod_info+4852|0;$106=HEAP32[$105>>2]|0;$107=$1+8|0;$108=$1+20|0;$109=$gfc+224|0;$110=$gfc+92|0;$111=$gfc+85800|0;$$122=$$0$lcssa;$ath_over$216=$ath_over$0$lcssa;$gsfb$118=$gsfb$0$lcssa;$j$217=$j$0$lcssa;$sfb$020=$106;while(1){$112=+HEAPF32[$107>>2];$113=($1+112|0)+($sfb$020<<2)|0;$114=+HEAPF32[$113>>2];$115=+HEAPF32[$108>>2];$116=+HEAPF32[$109>>2];$117=$116<1.0;$118=+_fast_log2($114);$119=$118;$120=$119*3.0102999566398116;$121=$120;$122=$112*$112;$123=$121-$115;$124=$122>9.9999996826552254E-21;if($124){$125=+_fast_log2($122);$126=$125;$127=$126*0.03333343265598758;$128=$127+1.0;$129=$128;$w$0$i1=$129}else{$w$0$i1=0.0}$130=$w$0$i1<0.0;$w$1$i2=$130?0.0:$w$0$i1;$131=$w$1$i2*$123;$132=$115+90.308731079101563;$ATHfixpoint$op$i3=-$116;$$neg$i4=$117?-94.824447631835938:$ATHfixpoint$op$i3;$133=$132+$$neg$i4;$134=$133+$131;$135=$134*0.10000000149011612;$136=+Math_pow(10.0,+$135);$137=($gfc+84856|0)+($sfb$020<<2)|0;$138=+HEAPF32[$137>>2];$139=$138*$136;$140=($cod_info+4872|0)+($gsfb$118<<2)|0;$141=HEAP32[$140>>2]|0;$142=+($141|0);$143=$139/$142;$144=($141|0)>0;if($144){$en03$07$us=0.0;$j$48$us=$j$217;$l2$06$us=0;$rh26$09$us=2.2204460492503131E-16;while(1){$159=$j$48$us+1|0;$160=$cod_info+($j$48$us<<2)|0;$161=+HEAPF32[$160>>2];$162=$161*$161;$163=$162+$en03$07$us;$164=$162<$143;$165=$164?$162:$143;$166=$165+$rh26$09$us;$167=$l2$06$us+1|0;$exitcond=($167|0)==($141|0);if($exitcond){$$lcssa=$163;$$lcssa93=$166;break}else{$en03$07$us=$163;$j$48$us=$159;$l2$06$us=$167;$rh26$09$us=$166}}$145=$141+$j$217|0;$146=$$lcssa>$139;$147=$146&1;$ath_over$4$us=$147+$ath_over$216|0;$148=$$lcssa<$139;$149=$$lcssa93<$139;$$rh26$0$us=$149?$139:$$lcssa93;$rh37$0$us=$148?$$lcssa:$$rh26$0$us;$150=($ratio+332|0)+($sfb$020*12|0)|0;$151=+HEAPF32[$150>>2];$152=$151>9.999999960041972E-13;if($152){$153=($ratio+88|0)+($sfb$020*12|0)|0;$154=+HEAPF32[$153>>2];$155=$154*$$lcssa;$156=$155/$151;$157=$138*$156;$158=$rh37$0$us<$157;if($158){$xmin4$0$us=$157}else{$xmin4$0$us=$rh37$0$us}}else{$xmin4$0$us=$rh37$0$us}$232=$xmin4$0$us>2.2204460492503131E-16;$233=$232?$xmin4$0$us:2.2204460492503131E-16;$234=$233+9.9999998245167004E-15;$235=$$lcssa>$234;$236=$235&1;$237=($cod_info+5212|0)+$gsfb$118|0;HEAP8[$237>>0]=$236;$238=$$122+4|0;HEAPF32[$$122>>2]=$233;$en03$07$us$1=0.0;$j$48$us$1=$145;$l2$06$us$1=0;$rh26$09$us$1=2.2204460492503131E-16;while(1){$239=$j$48$us$1+1|0;$240=$cod_info+($j$48$us$1<<2)|0;$241=+HEAPF32[$240>>2];$242=$241*$241;$243=$242+$en03$07$us$1;$244=$242<$143;$245=$244?$242:$143;$246=$245+$rh26$09$us$1;$247=$l2$06$us$1+1|0;$exitcond$1=($247|0)==($141|0);if($exitcond$1){$$lcssa94=$243;$$lcssa95=$246;break}else{$en03$07$us$1=$243;$j$48$us$1=$239;$l2$06$us$1=$247;$rh26$09$us$1=$246}}$248=$141+$145|0;$249=$$lcssa94>$139;$250=$249&1;$ath_over$4$us$1=$250+$ath_over$4$us|0;$251=$$lcssa94<$139;$252=$$lcssa95<$139;$$rh26$0$us$1=$252?$139:$$lcssa95;$rh37$0$us$1=$251?$$lcssa94:$$rh26$0$us$1;$253=(($ratio+332|0)+($sfb$020*12|0)|0)+4|0;$254=+HEAPF32[$253>>2];$255=$254>9.999999960041972E-13;if($255){$256=(($ratio+88|0)+($sfb$020*12|0)|0)+4|0;$257=+HEAPF32[$256>>2];$258=$257*$$lcssa94;$259=$258/$254;$260=+HEAPF32[$137>>2];$261=$260*$259;$262=$rh37$0$us$1<$261;if($262){$xmin4$0$us$1=$261}else{$xmin4$0$us$1=$rh37$0$us$1}}else{$xmin4$0$us$1=$rh37$0$us$1}$263=$xmin4$0$us$1>2.2204460492503131E-16;$264=$263?$xmin4$0$us$1:2.2204460492503131E-16;$265=$264+9.9999998245167004E-15;$266=$$lcssa94>$265;$267=$266&1;$268=$gsfb$118+1|0;$269=($cod_info+5212|0)+$268|0;HEAP8[$269>>0]=$267;$270=$$122+8|0;HEAPF32[$238>>2]=$264;$en03$07$us$2=0.0;$j$48$us$2=$248;$l2$06$us$2=0;$rh26$09$us$2=2.2204460492503131E-16;while(1){$271=$j$48$us$2+1|0;$272=$cod_info+($j$48$us$2<<2)|0;$273=+HEAPF32[$272>>2];$274=$273*$273;$275=$274+$en03$07$us$2;$276=$274<$143;$277=$276?$274:$143;$278=$277+$rh26$09$us$2;$279=$l2$06$us$2+1|0;$exitcond$2=($279|0)==($141|0);if($exitcond$2){$$lcssa96=$275;$$lcssa97=$278;break}else{$en03$07$us$2=$275;$j$48$us$2=$271;$l2$06$us$2=$279;$rh26$09$us$2=$278}}$280=$141+$248|0;$281=$$lcssa96>$139;$282=$281&1;$ath_over$4$us$2=$282+$ath_over$4$us$1|0;$283=$$lcssa96<$139;$284=$$lcssa97<$139;$$rh26$0$us$2=$284?$139:$$lcssa97;$rh37$0$us$2=$283?$$lcssa96:$$rh26$0$us$2;$285=(($ratio+332|0)+($sfb$020*12|0)|0)+8|0;$286=+HEAPF32[$285>>2];$287=$286>9.999999960041972E-13;if($287){$288=(($ratio+88|0)+($sfb$020*12|0)|0)+8|0;$289=+HEAPF32[$288>>2];$290=$289*$$lcssa96;$291=$290/$286;$292=+HEAPF32[$137>>2];$293=$292*$291;$294=$rh37$0$us$2<$293;if($294){$xmin4$0$us$2=$293}else{$xmin4$0$us$2=$rh37$0$us$2}}else{$xmin4$0$us$2=$rh37$0$us$2}$295=$xmin4$0$us$2>2.2204460492503131E-16;$296=$295?$xmin4$0$us$2:2.2204460492503131E-16;$297=$296+9.9999998245167004E-15;$298=$$lcssa96>$297;$299=$298&1;$300=$gsfb$118+2|0;$301=($cod_info+5212|0)+$300|0;HEAP8[$301>>0]=$299;HEAPF32[$270>>2]=$296;$302=$296;$ath_over$3$lcssa=$ath_over$4$us$2;$j$3$lcssa=$280}else{$168=$139<0.0;$169=$168&1;$ath_over$4=$169+$ath_over$216|0;$170=$139>0.0;$171=$139>2.2204460492503131E-16;$$rh26$0=$171?$139:2.2204460492503131E-16;$rh37$0=$170?0.0:$$rh26$0;$172=($ratio+332|0)+($sfb$020*12|0)|0;$173=+HEAPF32[$172>>2];$174=$173>9.999999960041972E-13;$175=$rh37$0<0.0;$or$cond=$174&$175;$xmin4$0=$or$cond?0.0:$rh37$0;$176=$xmin4$0>2.2204460492503131E-16;$177=$176?$xmin4$0:2.2204460492503131E-16;$178=$177+9.9999998245167004E-15;$179=$178<0.0;$180=$179&1;$181=($cod_info+5212|0)+$gsfb$118|0;HEAP8[$181>>0]=$180;$182=$$122+4|0;HEAPF32[$$122>>2]=$177;$ath_over$4$1=$169+$ath_over$4|0;$183=(($ratio+332|0)+($sfb$020*12|0)|0)+4|0;$184=+HEAPF32[$183>>2];$185=$184>9.999999960041972E-13;$186=$rh37$0<0.0;$or$cond73=$185&$186;$xmin4$0$1=$or$cond73?0.0:$rh37$0;$187=$xmin4$0$1>2.2204460492503131E-16;$188=$187?$xmin4$0$1:2.2204460492503131E-16;$189=$188+9.9999998245167004E-15;$190=$189<0.0;$191=$190&1;$192=$gsfb$118+1|0;$193=($cod_info+5212|0)+$192|0;HEAP8[$193>>0]=$191;$194=$$122+8|0;HEAPF32[$182>>2]=$188;$ath_over$4$2=$169+$ath_over$4$1|0;$195=(($ratio+332|0)+($sfb$020*12|0)|0)+8|0;$196=+HEAPF32[$195>>2];$197=$196>9.999999960041972E-13;$198=$rh37$0<0.0;$or$cond74=$197&$198;$xmin4$0$2=$or$cond74?0.0:$rh37$0;$199=$xmin4$0$2>2.2204460492503131E-16;$200=$199?$xmin4$0$2:2.2204460492503131E-16;$201=$200+9.9999998245167004E-15;$202=$201<0.0;$203=$202&1;$204=$gsfb$118+2|0;$205=($cod_info+5212|0)+$204|0;HEAP8[$205>>0]=$203;HEAPF32[$194>>2]=$200;$302=$200;$ath_over$3$lcssa=$ath_over$4$2;$j$3$lcssa=$j$217}$206=$$122+8|0;$$2$lcssa=$$122+12|0;$207=HEAP32[$110>>2]|0;$208=($207|0)==0;if(!$208){$209=+HEAPF32[$$122>>2];$210=$$122+4|0;$211=+HEAPF32[$210>>2];$212=$209>$211;if($212){$213=$209-$211;$214=HEAP32[$111>>2]|0;$215=$214+6496|0;$216=+HEAPF32[$215>>2];$217=$216*$213;$218=$217+$211;HEAPF32[$210>>2]=$218;$$pre=+HEAPF32[$206>>2];$220=$$pre;$221=$218}else{$220=$302;$221=$211}$219=$221>$220;if($219){$222=$221-$220;$223=HEAP32[$111>>2]|0;$224=$223+6496|0;$225=+HEAPF32[$224>>2];$226=$225*$222;$227=$226+$220;HEAPF32[$206>>2]=$227}}$228=$sfb$020+1|0;$229=$gsfb$118+3|0;$230=HEAP32[$102>>2]|0;$231=($229|0)<($230|0);if($231){$$122=$$2$lcssa;$ath_over$216=$ath_over$3$lcssa;$gsfb$118=$229;$j$217=$j$3$lcssa;$sfb$020=$228}else{$ath_over$2$lcssa=$ath_over$3$lcssa;break}}return $ath_over$2$lcssa|0}function _calc_noise($cod_info,$l3_xmin,$distort,$res,$prev_noise){$cod_info=$cod_info|0;$l3_xmin=$l3_xmin|0;$distort=$distort|0;$res=$res|0;$prev_noise=$prev_noise|0;var $$=0,$$0114=0,$$015=0,$$09$i=0,$$113$i=0,$$219$i=0,$$lcssa=0.0,$$lcssa35=0.0,$$lcssa36=0.0,$$ph=0,$$pre=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0.0,$104=0,$105=0;var $106=0,$107=0.0,$108=0.0,$109=0.0,$11=0,$110=0,$111=0.0,$112=0.0,$113=0,$114=0.0,$115=0,$116=0,$117=0,$118=0.0,$119=0.0,$12=0,$120=0.0,$121=0,$122=0.0,$123=0.0;var $124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0.0,$134=0,$135=0.0,$136=0.0,$137=0.0,$138=0.0,$139=0.0,$14=0,$140=0,$141=0;var $142=0,$143=0.0,$144=0,$145=0.0,$146=0.0,$147=0.0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0.0,$155=0,$156=0.0,$157=0,$158=0,$159=0,$16=0;var $160=0,$161=0,$162=0,$163=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0;var $31=0,$32=0,$33=0.0,$34=0.0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0.0,$44=0.0,$45=0,$46=0.0,$47=0,$48=0,$49=0.0;var $5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0.0,$66=0,$67=0.0;var $68=0.0,$69=0,$7=0,$70=0.0,$71=0,$72=0.0,$73=0.0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0.0,$82=0,$83=0,$84=0,$85=0.0;var $86=0.0,$87=0,$88=0.0,$89=0.0,$9=0,$90=0,$91=0.0,$92=0,$93=0,$94=0,$95=0.0,$96=0.0,$97=0,$98=0.0,$99=0.0,$distort_$0$ph=0.0,$fabsf$i=0.0,$fabsf1$i=0.0,$fabsf2$i=0.0,$fabsf3$i=0.0;var $ix01$i=0,$j$07$i=0,$j$111$i=0,$j$217$i=0,$j$3$i=0,$l$0=0,$max_noise$0$lcssa=0.0,$max_noise$08=0.0,$noise$0$ph=0.0,$noise$02=0.0,$noise$08$i=0.0,$noise$112$i=0.0,$noise$218$i=0.0,$noise$3$i=0.0,$over$0$lcssa=0,$over$010=0,$over$1=0,$over_noise_db$0$lcssa=0.0,$over_noise_db$06=0.0,$over_noise_db$1=0.0;var $scalefac$09=0,$sfb$011=0,$tot_noise_db$0$lcssa=0.0,$tot_noise_db$07=0.0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$ix01$i=sp;$0=$res+16|0;HEAP32[$0>>2]=0;$1=$cod_info+4864|0;$2=HEAP32[$1>>2]|0;$3=($2|0)>0;if(!$3){$max_noise$0$lcssa=-20.0;$over$0$lcssa=0;$over_noise_db$0$lcssa=0.0;$tot_noise_db$0$lcssa=0.0;$160=$res+12|0;HEAP32[$160>>2]=$over$0$lcssa;$161=$res+4|0;HEAPF32[$161>>2]=$tot_noise_db$0$lcssa;HEAPF32[$res>>2]=$over_noise_db$0$lcssa;$162=$res+8|0;HEAPF32[$162>>2]=$max_noise$0$lcssa;STACKTOP=sp;return $over$0$lcssa|0}$4=$cod_info+4608|0;$5=$cod_info+4780|0;$6=$cod_info+4832|0;$7=$cod_info+4836|0;$8=($prev_noise|0)!=(0|0);$9=$cod_info+5208|0;$10=$cod_info+4776|0;$11=$cod_info+4772|0;$12=$ix01$i+4|0;$$0114=$distort;$$015=$l3_xmin;$41=0;$max_noise$08=-20.0;$over$010=0;$over_noise_db$06=0.0;$scalefac$09=$4;$sfb$011=0;$tot_noise_db$07=0.0;while(1){$13=HEAP32[$5>>2]|0;$14=$scalefac$09+4|0;$15=HEAP32[$scalefac$09>>2]|0;$16=HEAP32[$6>>2]|0;$17=($16|0)==0;if($17){$21=0}else{$18=12112+($sfb$011<<2)|0;$19=HEAP32[$18>>2]|0;$21=$19}$20=$21+$15|0;$22=HEAP32[$7>>2]|0;$23=$22+1|0;$24=$20<<$23;$25=$13-$24|0;$26=($cod_info+5028|0)+($sfb$011<<2)|0;$27=HEAP32[$26>>2]|0;$28=($cod_info+4808|0)+($27<<2)|0;$29=HEAP32[$28>>2]|0;$30=$29<<3;$31=$25-$30|0;$32=$$015+4|0;$33=+HEAPF32[$$015>>2];$34=1.0/$33;if($8){$35=($prev_noise+8|0)+($sfb$011<<2)|0;$36=HEAP32[$35>>2]|0;$37=($36|0)==($31|0);if($37){$38=($cod_info+4872|0)+($sfb$011<<2)|0;$39=HEAP32[$38>>2]|0;$40=$39+$41|0;$42=($prev_noise+164|0)+($sfb$011<<2)|0;$43=+HEAPF32[$42>>2];$44=$43*$34;$45=($prev_noise+320|0)+($sfb$011<<2)|0;$46=+HEAPF32[$45>>2];$$ph=$40;$141=$13;$distort_$0$ph=$44;$noise$0$ph=$46;label=27}else{label=8}}else{label=8}do{if((label|0)==8){label=0;$47=$31+116|0;$48=80736+($47<<2)|0;$49=+HEAPF32[$48>>2];$50=($cod_info+4872|0)+($sfb$011<<2)|0;$51=HEAP32[$50>>2]|0;$52=$51>>1;$53=$51+$41|0;$54=HEAP32[$9>>2]|0;$55=($53|0)>($54|0);if($55){$56=$54-$41|0;$57=($56|0)>-1;if($57){$58=$56+1|0;$59=$58>>1;$l$0=$59}else{$l$0=0}}else{$l$0=$52}$60=HEAP32[$10>>2]|0;$61=($41|0)>($60|0);do{if($61){$62=($l$0|0)==0;if($62){$j$3$i=$41;$noise$3$i=0.0}else{$$09$i=$l$0;$j$07$i=$41;$noise$08$i=0.0;while(1){$63=$$09$i+-1|0;$64=$cod_info+($j$07$i<<2)|0;$65=+HEAPF32[$64>>2];$66=$j$07$i+1|0;$67=$65*$65;$68=$67+$noise$08$i;$69=$cod_info+($66<<2)|0;$70=+HEAPF32[$69>>2];$71=$j$07$i+2|0;$72=$70*$70;$73=$68+$72;$74=($63|0)==0;if($74){$$lcssa36=$73;break}else{$$09$i=$63;$j$07$i=$71;$noise$08$i=$73}}$125=$l$0<<1;$126=$125+$41|0;$j$3$i=$126;$noise$3$i=$$lcssa36}}else{$75=HEAP32[$11>>2]|0;$76=($41|0)>($75|0);if($76){HEAPF32[$ix01$i>>2]=0.0;HEAPF32[$12>>2]=$49;$78=($l$0|0)==0;if($78){$j$3$i=$41;$noise$3$i=0.0;break}else{$$113$i=$l$0;$j$111$i=$41;$noise$112$i=0.0}while(1){$79=$$113$i+-1|0;$80=$cod_info+($j$111$i<<2)|0;$81=+HEAPF32[$80>>2];$fabsf2$i=+Math_abs(+$81);$82=($cod_info+2304|0)+($j$111$i<<2)|0;$83=HEAP32[$82>>2]|0;$84=$ix01$i+($83<<2)|0;$85=+HEAPF32[$84>>2];$86=$fabsf2$i-$85;$87=$j$111$i+1|0;$88=$86*$86;$89=$88+$noise$112$i;$90=$cod_info+($87<<2)|0;$91=+HEAPF32[$90>>2];$fabsf3$i=+Math_abs(+$91);$92=($cod_info+2304|0)+($87<<2)|0;$93=HEAP32[$92>>2]|0;$94=$ix01$i+($93<<2)|0;$95=+HEAPF32[$94>>2];$96=$fabsf3$i-$95;$97=$j$111$i+2|0;$98=$96*$96;$99=$89+$98;$100=($79|0)==0;if($100){$$lcssa35=$99;break}else{$$113$i=$79;$j$111$i=$97;$noise$112$i=$99}}$127=$l$0<<1;$128=$127+$41|0;$j$3$i=$128;$noise$3$i=$$lcssa35;break}else{$77=($l$0|0)==0;if($77){$j$3$i=$41;$noise$3$i=0.0;break}else{$$219$i=$l$0;$j$217$i=$41;$noise$218$i=0.0}while(1){$101=$$219$i+-1|0;$102=$cod_info+($j$217$i<<2)|0;$103=+HEAPF32[$102>>2];$fabsf$i=+Math_abs(+$103);$104=($cod_info+2304|0)+($j$217$i<<2)|0;$105=HEAP32[$104>>2]|0;$106=14040+($105<<2)|0;$107=+HEAPF32[$106>>2];$108=$107*$49;$109=$fabsf$i-$108;$110=$j$217$i+1|0;$111=$109*$109;$112=$111+$noise$218$i;$113=$cod_info+($110<<2)|0;$114=+HEAPF32[$113>>2];$fabsf1$i=+Math_abs(+$114);$115=($cod_info+2304|0)+($110<<2)|0;$116=HEAP32[$115>>2]|0;$117=14040+($116<<2)|0;$118=+HEAPF32[$117>>2];$119=$118*$49;$120=$fabsf1$i-$119;$121=$j$217$i+2|0;$122=$120*$120;$123=$112+$122;$124=($101|0)==0;if($124){$$lcssa=$123;break}else{$$219$i=$101;$j$217$i=$121;$noise$218$i=$123}}$129=$l$0<<1;$130=$129+$41|0;$j$3$i=$130;$noise$3$i=$$lcssa;break}}}while(0);if($8){$131=($prev_noise+8|0)+($sfb$011<<2)|0;HEAP32[$131>>2]=$31;$132=($prev_noise+164|0)+($sfb$011<<2)|0;HEAPF32[$132>>2]=$noise$3$i}$133=$noise$3$i*$34;$134=$133>9.9999996826552254E-21;$135=$134?$133:9.9999996826552254E-21;$136=+_fast_log2($135);$137=$136;$138=$137*0.30102999566398114;$139=$138;if($8){$140=($prev_noise+320|0)+($sfb$011<<2)|0;HEAPF32[$140>>2]=$139;$$pre=HEAP32[$5>>2]|0;$$ph=$j$3$i;$141=$$pre;$distort_$0$ph=$133;$noise$0$ph=$139;label=27;break}else{HEAPF32[$$0114>>2]=$133;$163=$j$3$i;$noise$02=$139;break}}}while(0);if((label|0)==27){label=0;HEAPF32[$$0114>>2]=$distort_$0$ph;HEAP32[$prev_noise>>2]=$141;$163=$$ph;$noise$02=$noise$0$ph}$142=$$0114+4|0;$143=$noise$02+$tot_noise_db$07;$144=$noise$02>0.0;if($144){$145=$noise$02*10.0;$146=$145;$147=$146+0.5;$148=~~$147;$149=($148|0)>1;$$=$149?$148:1;$150=Math_imul($$,$$)|0;$151=HEAP32[$0>>2]|0;$152=$151+$150|0;HEAP32[$0>>2]=$152;$153=$over$010+1|0;$154=$noise$02+$over_noise_db$06;$over$1=$153;$over_noise_db$1=$154}else{$over$1=$over$010;$over_noise_db$1=$over_noise_db$06}$155=$max_noise$08>$noise$02;$156=$155?$max_noise$08:$noise$02;$157=$sfb$011+1|0;$158=HEAP32[$1>>2]|0;$159=($157|0)<($158|0);if($159){$$0114=$142;$$015=$32;$41=$163;$max_noise$08=$156;$over$010=$over$1;$over_noise_db$06=$over_noise_db$1;$scalefac$09=$14;$sfb$011=$157;$tot_noise_db$07=$143}else{$max_noise$0$lcssa=$156;$over$0$lcssa=$over$1;$over_noise_db$0$lcssa=$over_noise_db$1;$tot_noise_db$0$lcssa=$143;break}}$160=$res+12|0;HEAP32[$160>>2]=$over$0$lcssa;$161=$res+4|0;HEAPF32[$161>>2]=$tot_noise_db$0$lcssa;HEAPF32[$res>>2]=$over_noise_db$0$lcssa;$162=$res+8|0;HEAPF32[$162>>2]=$max_noise$0$lcssa;STACKTOP=sp;return $over$0$lcssa|0}function _set_frame_pinfo($gfc,$ratio){$gfc=$gfc|0;$ratio=$ratio|0;var $$2$i=0.0,$$3$i=0.0,$$3$i$1=0.0,$$3$i$2=0.0,$$3$us$i=0.0,$$4$i=0.0,$$lcssa27=0.0,$$lcssa28=0,$$phi$trans$insert$i=0,$$phi$trans$insert43$i=0,$$pre=0,$$pre$i=0,$$pre19=0,$$pre20=0,$$pre44$i=0,$0=0,$1=0,$10=0,$100=0.0,$101=0.0;var $102=0.0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0;var $120=0,$121=0,$122=0,$123=0.0,$124=0,$125=0,$126=0.0,$127=0,$128=0,$129=0,$13=0,$130=0.0,$131=0.0,$132=0,$133=0.0,$134=0.0,$135=0.0,$136=0.0,$137=0,$138=0;var $139=0.0,$14=0,$140=0,$141=0.0,$142=0.0,$143=0,$144=0.0,$145=0.0,$146=0.0,$147=0,$148=0,$149=0,$15=0,$150=0.0,$151=0.0,$152=0,$153=0.0,$154=0.0,$155=0.0,$156=0.0;var $157=0,$158=0,$159=0.0,$16=0,$160=0,$161=0.0,$162=0,$163=0,$164=0,$165=0.0,$166=0.0,$167=0,$168=0.0,$169=0.0,$17=0,$170=0,$171=0,$172=0,$173=0.0,$174=0.0;var $175=0,$176=0,$177=0,$178=0.0,$179=0.0,$18=0,$180=0.0,$181=0.0,$182=0,$183=0,$184=0,$185=0.0,$186=0.0,$187=0.0,$188=0,$189=0,$19=0,$190=0,$191=0.0,$192=0;var $193=0,$194=0,$195=0.0,$196=0.0,$197=0,$198=0.0,$199=0.0,$2=0,$20=0,$200=0,$201=0,$202=0.0,$203=0.0,$204=0,$205=0,$206=0,$207=0.0,$208=0.0,$209=0.0,$21=0;var $210=0.0,$211=0,$212=0,$213=0,$214=0,$215=0.0,$216=0.0,$217=0,$218=0.0,$219=0.0,$22=0,$220=0.0,$221=0.0,$222=0,$223=0,$224=0.0,$225=0,$226=0,$227=0,$228=0;var $229=0,$23=0,$230=0,$231=0,$232=0,$233=0,$234=0,$235=0,$236=0,$237=0,$238=0,$239=0.0,$24=0,$240=0.0,$241=0.0,$242=0,$243=0.0,$244=0.0,$245=0.0,$246=0;var $247=0.0,$248=0.0,$249=0.0,$25=0,$250=0,$251=0,$252=0,$253=0,$254=0,$255=0,$256=0,$257=0,$258=0,$259=0,$26=0,$260=0.0,$261=0,$262=0,$263=0,$264=0.0;var $265=0.0,$266=0,$267=0.0,$268=0.0,$269=0,$27=0,$270=0,$271=0.0,$272=0.0,$273=0,$274=0,$275=0,$276=0.0,$277=0.0,$278=0.0,$279=0.0,$28=0,$280=0,$281=0,$282=0;var $283=0,$284=0.0,$285=0.0,$286=0,$287=0.0,$288=0.0,$289=0.0,$29=0,$290=0.0,$291=0,$292=0,$293=0.0,$294=0,$295=0.0,$296=0,$297=0,$298=0,$299=0.0,$3=0,$30=0;var $300=0.0,$301=0,$302=0.0,$303=0.0,$304=0,$305=0,$306=0.0,$307=0.0,$308=0,$309=0,$31=0,$310=0,$311=0.0,$312=0.0,$313=0.0,$314=0.0,$315=0,$316=0,$317=0,$32=0.0;var $33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0;var $51=0,$52=0,$53=0,$54=0.0,$55=0.0,$56=0.0,$57=0,$58=0.0,$59=0.0,$6=0,$60=0.0,$61=0.0,$62=0,$63=0,$64=0.0,$65=0.0,$66=0,$67=0.0,$68=0.0,$69=0.0;var $7=0,$70=0.0,$71=0,$72=0,$73=0.0,$74=0,$75=0,$76=0,$77=0.0,$78=0,$79=0.0,$8=0,$80=0.0,$81=0,$82=0.0,$83=0,$84=0.0,$85=0.0,$86=0,$87=0;var $88=0,$89=0,$9=0,$90=0,$91=0.0,$92=0.0,$93=0.0,$94=0.0,$95=0,$96=0,$97=0,$98=0.0,$99=0.0,$ch$06=0,$en0$0$lcssa$i=0.0,$en0$019$i=0.0,$en0$1$i=0.0,$en0$28$us$i=0.0,$en0$3$i=0.0,$en0$3$i$1=0.0;var $en0$3$i$2=0.0,$en0$3$us$i=0.0,$en0$4$i=0.0,$en0$4$i$1=0.0,$en0$4$i$2=0.0,$en0$4$us$i=0.0,$exitcond38$i=0,$exitcond39$i=0,$exitcond40$i=0,$exitcond41$i=0,$exitcond42$i=0,$gr$010=0,$i$011$us$i=0,$j$0$lcssa$i=0,$j$025$i=0,$j$1$lcssa$i=0,$j$118$i=0,$j$213$i=0,$j$3$lcssa$i=0,$j$310$us$i=0;var $j$46$us$i=0,$l$07$us$i=0,$l3_xmin$i=0,$noise$i=0,$or$cond$i=0,$scalefac_sav=0,$sfb$0$lcssa$i=0,$sfb$026$i=0,$sfb$05=0,$sfb$115$i=0,$sfb2$045$i=0,$sfb2$114$i=0,$sfb2$2$lcssa$i=0,$sfb2$212$us$i=0,$xfsf$i=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+496|0;$l3_xmin$i=sp+340|0;$xfsf$i=sp+184|0;$noise$i=sp+160|0;$scalefac_sav=sp;$0=$gfc+76|0;$1=HEAP32[$0>>2]|0;$2=($1|0)>0;if(!$2){STACKTOP=sp;return}$3=$gfc+72|0;$4=$gfc+85804|0;$5=$gfc+212|0;$6=$gfc+85796|0;$$phi$trans$insert$i=$gfc+21360|0;$7=$gfc+216|0;$8=$noise$i+12|0;$9=$noise$i+8|0;$10=$noise$i+4|0;$11=$noise$i+16|0;$$pre=HEAP32[$3>>2]|0;$12=$$pre;$315=$1;$gr$010=0;while(1){$13=($12|0)>0;if($13){$14=($gr$010|0)==1;$ch$06=0;while(1){$15=(($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0;$16=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4608|0;_memcpy($scalefac_sav|0,$16|0,156)|0;if($14){$17=(($gfc+10808|0)+($ch$06*5252|0)|0)+4848|0;$18=HEAP32[$17>>2]|0;$19=($18|0)>0;if($19){$317=$18;$sfb$05=0;while(1){$20=((($gfc+10808|0)+($ch$06*5252|0)|0)+4608|0)+($sfb$05<<2)|0;$21=HEAP32[$20>>2]|0;$22=($21|0)<0;if($22){$23=((($gfc+304|0)+($ch$06*5252|0)|0)+4608|0)+($sfb$05<<2)|0;$24=HEAP32[$23>>2]|0;HEAP32[$20>>2]=$24;$$pre19=HEAP32[$17>>2]|0;$27=$$pre19}else{$27=$317}$25=$sfb$05+1|0;$26=($25|0)<($27|0);if($26){$317=$27;$sfb$05=$25}else{break}}}}$28=($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0;$29=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4836|0;$30=HEAP32[$29>>2]|0;$31=($30|0)==0;$32=$31?0.5:1.0;_calc_xmin($gfc,$28,$15,$l3_xmin$i)|0;_calc_noise($15,$l3_xmin$i,$xfsf$i,$noise$i,0)|0;$33=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4848|0;$34=HEAP32[$33>>2]|0;$35=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4788|0;$36=HEAP32[$35>>2]|0;$37=($36|0)==2;if($37){label=12}else{$38=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4792|0;$39=HEAP32[$38>>2]|0;$40=($39|0)==0;if($40){$sfb2$045$i=22;label=13}else{label=12}}if((label|0)==12){label=0;$41=($34|0)>0;if($41){$sfb2$045$i=$34;label=13}else{$j$0$lcssa$i=0;$sfb$0$lcssa$i=0}}if((label|0)==13){label=0;$42=HEAP32[$4>>2]|0;$43=HEAP32[$6>>2]|0;$44=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4832|0;$45=HEAP32[$44>>2]|0;$46=($45|0)!=0;$$pre$i=HEAP32[$$phi$trans$insert$i>>2]|0;$51=$$pre$i;$j$025$i=0;$sfb$026$i=0;while(1){$47=$sfb$026$i+1|0;$48=($gfc+21360|0)+($47<<2)|0;$49=HEAP32[$48>>2]|0;$50=$49-$51|0;$52=($j$025$i|0)<($49|0);if($52){$en0$019$i=0.0;$j$118$i=$j$025$i;while(1){$53=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+($j$118$i<<2)|0;$54=+HEAPF32[$53>>2];$55=$54*$54;$56=$55+$en0$019$i;$57=$j$118$i+1|0;$exitcond41$i=($57|0)==($49|0);if($exitcond41$i){$en0$0$lcssa$i=$56;$j$1$lcssa$i=$49;break}else{$en0$019$i=$56;$j$118$i=$57}}}else{$en0$0$lcssa$i=0.0;$j$1$lcssa$i=$j$025$i}$58=+($50|0);$59=$en0$0$lcssa$i/$58;$60=$59*999999986991104.0;$61=$60;$62=((($42+190712|0)+($gr$010*704|0)|0)+($ch$06*176|0)|0)+($sfb$026$i<<3)|0;HEAPF64[$62>>3]=$61;$63=$l3_xmin$i+($sfb$026$i<<2)|0;$64=+HEAPF32[$63>>2];$65=$64*999999986991104.0;$66=$xfsf$i+($sfb$026$i<<2)|0;$67=+HEAPF32[$66>>2];$68=$65*$67;$69=$68/$58;$70=$69;$71=((($42+201208|0)+($gr$010*352|0)|0)+($ch$06*176|0)|0)+($sfb$026$i<<3)|0;HEAPF64[$71>>3]=$70;$72=((($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+244|0)+($sfb$026$i<<2)|0;$73=+HEAPF32[$72>>2];$74=$73>0.0;if($74){$75=HEAP32[$5>>2]|0;$76=($75|0)==0;$77=$59/$73;$$4$i=$76?$77:0.0;$en0$1$i=$$4$i}else{$en0$1$i=0.0}$78=(($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+($sfb$026$i<<2)|0;$79=+HEAPF32[$78>>2];$80=$79*$en0$1$i;$81=($43+24|0)+($sfb$026$i<<2)|0;$82=+HEAPF32[$81>>2];$83=$80>$82;$$2$i=$83?$80:$82;$84=$$2$i*999999986991104.0;$85=$84;$86=((($42+189304|0)+($gr$010*704|0)|0)+($ch$06*176|0)|0)+($sfb$026$i<<3)|0;HEAPF64[$86>>3]=$85;$87=((($42+199160|0)+($gr$010*352|0)|0)+($ch$06*176|0)|0)+($sfb$026$i<<3)|0;HEAPF64[$87>>3]=0.0;$88=($sfb$026$i|0)>10;$or$cond$i=$46&$88;if($or$cond$i){$89=12112+($sfb$026$i<<2)|0;$90=HEAP32[$89>>2]|0;$91=+($90|0);$92=$32*$91;$93=-$92;$94=$93;HEAPF64[$87>>3]=$94;$102=$94}else{$102=0.0}$95=($sfb$026$i|0)<21;if($95){$96=(((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4608|0)+($sfb$026$i<<2)|0;$97=HEAP32[$96>>2]|0;$98=+($97|0);$99=$98*$32;$100=$99;$101=$102-$100;HEAPF64[$87>>3]=$101}$exitcond42$i=($47|0)==($sfb2$045$i|0);if($exitcond42$i){$j$0$lcssa$i=$j$1$lcssa$i;$sfb$0$lcssa$i=$sfb2$045$i;break}else{$51=$49;$j$025$i=$j$1$lcssa$i;$sfb$026$i=$47}}}if($37){$103=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4852|0;$104=HEAP32[$103>>2]|0;$105=($104|0)<13;if($105){$106=HEAP32[$4>>2]|0;$107=HEAP32[$5>>2]|0;$108=($107|0)==0;$109=HEAP32[$6>>2]|0;$$phi$trans$insert43$i=($gfc+21452|0)+($104<<2)|0;$$pre44$i=HEAP32[$$phi$trans$insert43$i>>2]|0;$110=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4808|0;$111=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4812|0;$112=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4816|0;$116=$$pre44$i;$j$213$i=$j$0$lcssa$i;$sfb$115$i=$104;$sfb2$114$i=$sfb$0$lcssa$i;while(1){$118=$sfb$115$i+1|0;$119=($gfc+21452|0)+($118<<2)|0;$120=HEAP32[$119>>2]|0;$121=$120-$116|0;$122=($120|0)>($116|0);$123=+($121|0);$124=$sfb$115$i*3|0;$125=($109+112|0)+($sfb$115$i<<2)|0;$126=+HEAPF32[$125>>2];$127=($sfb$115$i|0)<12;if($122){$114=$120*3|0;$i$011$us$i=0;$j$310$us$i=$j$213$i;$sfb2$212$us$i=$sfb2$114$i;while(1){$en0$28$us$i=0.0;$j$46$us$i=$j$310$us$i;$l$07$us$i=$116;while(1){$184=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+($j$46$us$i<<2)|0;$185=+HEAPF32[$184>>2];$186=$185*$185;$187=$186+$en0$28$us$i;$188=$j$46$us$i+1|0;$189=$l$07$us$i+1|0;$exitcond38$i=($189|0)==($120|0);if($exitcond38$i){$$lcssa27=$187;break}else{$en0$28$us$i=$187;$j$46$us$i=$188;$l$07$us$i=$189}}$140=$j$310$us$i+$121|0;$141=$$lcssa27/$123;$142=$141;$143=$142>9.9999999999999995E-21;$144=$143?$141:9.9999996826552254E-21;$145=$144*999999986991104.0;$146=$145;$147=$i$011$us$i+$124|0;$148=((($106+194616|0)+($gr$010*1248|0)|0)+($ch$06*312|0)|0)+($147<<3)|0;HEAPF64[$148>>3]=$146;$149=$l3_xmin$i+($sfb2$212$us$i<<2)|0;$150=+HEAPF32[$149>>2];$151=$150*999999986991104.0;$152=$xfsf$i+($sfb2$212$us$i<<2)|0;$153=+HEAPF32[$152>>2];$154=$151*$153;$155=$154/$123;$156=$155;$157=((($106+201912|0)+($gr$010*624|0)|0)+($ch$06*312|0)|0)+($147<<3)|0;HEAPF64[$157>>3]=$156;$158=(((($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+332|0)+($sfb$115$i*12|0)|0)+($i$011$us$i<<2)|0;$159=+HEAPF32[$158>>2];if($108){$160=$159>0.0;$161=$144/$159;$en0$3$us$i=$160?$161:0.0;$162=HEAP32[$7>>2]|0;$163=($162|0)==0;if($163){$en0$4$us$i=$en0$3$us$i}else{label=33}}else{label=33}if((label|0)==33){label=0;$en0$4$us$i=0.0}$164=(((($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+88|0)+($sfb$115$i*12|0)|0)+($i$011$us$i<<2)|0;$165=+HEAPF32[$164>>2];$166=$165*$en0$4$us$i;$167=$166>$126;$$3$us$i=$167?$166:$126;$168=$$3$us$i*999999986991104.0;$169=$168;$170=((($106+192120|0)+($gr$010*1248|0)|0)+($ch$06*312|0)|0)+($147<<3)|0;HEAPF64[$170>>3]=$169;$171=(((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4808|0)+($i$011$us$i<<2)|0;$172=HEAP32[$171>>2]|0;$173=+($172|0);$174=$173*-2.0;$175=((($106+199864|0)+($gr$010*624|0)|0)+($ch$06*312|0)|0)+($147<<3)|0;HEAPF64[$175>>3]=$174;if($127){$176=(((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4608|0)+($sfb2$212$us$i<<2)|0;$177=HEAP32[$176>>2]|0;$178=+($177|0);$179=$178*$32;$180=$179;$181=$174-$180;HEAPF64[$175>>3]=$181}$182=$sfb2$212$us$i+1|0;$183=$i$011$us$i+1|0;$exitcond39$i=($183|0)==3;if($exitcond39$i){break}else{$i$011$us$i=$183;$j$310$us$i=$140;$sfb2$212$us$i=$182}}$113=$j$213$i+$114|0;$115=Math_imul($116,-3)|0;$117=$113+$115|0;$j$3$lcssa$i=$117}else{$128=((($106+194616|0)+($gr$010*1248|0)|0)+($ch$06*312|0)|0)+($124<<3)|0;HEAPF64[$128>>3]=9.9999997473787516E-6;$129=$l3_xmin$i+($sfb2$114$i<<2)|0;$130=+HEAPF32[$129>>2];$131=$130*999999986991104.0;$132=$xfsf$i+($sfb2$114$i<<2)|0;$133=+HEAPF32[$132>>2];$134=$131*$133;$135=$134/$123;$136=$135;$137=((($106+201912|0)+($gr$010*624|0)|0)+($ch$06*312|0)|0)+($124<<3)|0;HEAPF64[$137>>3]=$136;$138=((($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+332|0)+($sfb$115$i*12|0)|0;$139=+HEAPF32[$138>>2];if($108){$190=$139>0.0;$191=9.9999996826552254E-21/$139;$en0$3$i=$190?$191:0.0;$192=HEAP32[$7>>2]|0;$193=($192|0)==0;if($193){$en0$4$i=$en0$3$i}else{label=40}}else{label=40}if((label|0)==40){label=0;$en0$4$i=0.0}$194=((($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+88|0)+($sfb$115$i*12|0)|0;$195=+HEAPF32[$194>>2];$196=$195*$en0$4$i;$197=$196>$126;$$3$i=$197?$196:$126;$198=$$3$i*999999986991104.0;$199=$198;$200=((($106+192120|0)+($gr$010*1248|0)|0)+($ch$06*312|0)|0)+($124<<3)|0;HEAPF64[$200>>3]=$199;$201=HEAP32[$110>>2]|0;$202=+($201|0);$203=$202*-2.0;$204=((($106+199864|0)+($gr$010*624|0)|0)+($ch$06*312|0)|0)+($124<<3)|0;HEAPF64[$204>>3]=$203;if($127){$205=(((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4608|0)+($sfb2$114$i<<2)|0;$206=HEAP32[$205>>2]|0;$207=+($206|0);$208=$207*$32;$209=$208;$210=$203-$209;HEAPF64[$204>>3]=$210}$211=$sfb2$114$i+1|0;$212=$124+1|0;$213=((($106+194616|0)+($gr$010*1248|0)|0)+($ch$06*312|0)|0)+($212<<3)|0;HEAPF64[$213>>3]=9.9999997473787516E-6;$214=$l3_xmin$i+($211<<2)|0;$215=+HEAPF32[$214>>2];$216=$215*999999986991104.0;$217=$xfsf$i+($211<<2)|0;$218=+HEAPF32[$217>>2];$219=$216*$218;$220=$219/$123;$221=$220;$222=((($106+201912|0)+($gr$010*624|0)|0)+($ch$06*312|0)|0)+($212<<3)|0;HEAPF64[$222>>3]=$221;$223=(((($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+332|0)+($sfb$115$i*12|0)|0)+4|0;$224=+HEAPF32[$223>>2];if($108){$259=$224>0.0;$260=9.9999996826552254E-21/$224;$en0$3$i$1=$259?$260:0.0;$261=HEAP32[$7>>2]|0;$262=($261|0)==0;if($262){$en0$4$i$1=$en0$3$i$1}else{label=49}}else{label=49}if((label|0)==49){label=0;$en0$4$i$1=0.0}$263=(((($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+88|0)+($sfb$115$i*12|0)|0)+4|0;$264=+HEAPF32[$263>>2];$265=$264*$en0$4$i$1;$266=$265>$126;$$3$i$1=$266?$265:$126;$267=$$3$i$1*999999986991104.0;$268=$267;$269=((($106+192120|0)+($gr$010*1248|0)|0)+($ch$06*312|0)|0)+($212<<3)|0;HEAPF64[$269>>3]=$268;$270=HEAP32[$111>>2]|0;$271=+($270|0);$272=$271*-2.0;$273=((($106+199864|0)+($gr$010*624|0)|0)+($ch$06*312|0)|0)+($212<<3)|0;HEAPF64[$273>>3]=$272;if($127){$274=(((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4608|0)+($211<<2)|0;$275=HEAP32[$274>>2]|0;$276=+($275|0);$277=$276*$32;$278=$277;$279=$272-$278;HEAPF64[$273>>3]=$279}$280=$sfb2$114$i+2|0;$281=$124+2|0;$282=((($106+194616|0)+($gr$010*1248|0)|0)+($ch$06*312|0)|0)+($281<<3)|0;HEAPF64[$282>>3]=9.9999997473787516E-6;$283=$l3_xmin$i+($280<<2)|0;$284=+HEAPF32[$283>>2];$285=$284*999999986991104.0;$286=$xfsf$i+($280<<2)|0;$287=+HEAPF32[$286>>2];$288=$285*$287;$289=$288/$123;$290=$289;$291=((($106+201912|0)+($gr$010*624|0)|0)+($ch$06*312|0)|0)+($281<<3)|0;HEAPF64[$291>>3]=$290;$292=(((($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+332|0)+($sfb$115$i*12|0)|0)+8|0;$293=+HEAPF32[$292>>2];if($108){$294=$293>0.0;$295=9.9999996826552254E-21/$293;$en0$3$i$2=$294?$295:0.0;$296=HEAP32[$7>>2]|0;$297=($296|0)==0;if($297){$en0$4$i$2=$en0$3$i$2}else{label=54}}else{label=54}if((label|0)==54){label=0;$en0$4$i$2=0.0}$298=(((($ratio+($gr$010*976|0)|0)+($ch$06*488|0)|0)+88|0)+($sfb$115$i*12|0)|0)+8|0;$299=+HEAPF32[$298>>2];$300=$299*$en0$4$i$2;$301=$300>$126;$$3$i$2=$301?$300:$126;$302=$$3$i$2*999999986991104.0;$303=$302;$304=((($106+192120|0)+($gr$010*1248|0)|0)+($ch$06*312|0)|0)+($281<<3)|0;HEAPF64[$304>>3]=$303;$305=HEAP32[$112>>2]|0;$306=+($305|0);$307=$306*-2.0;$308=((($106+199864|0)+($gr$010*624|0)|0)+($ch$06*312|0)|0)+($281<<3)|0;HEAPF64[$308>>3]=$307;if($127){$309=(((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4608|0)+($280<<2)|0;$310=HEAP32[$309>>2]|0;$311=+($310|0);$312=$311*$32;$313=$312;$314=$307-$313;HEAPF64[$308>>3]=$314;$j$3$lcssa$i=$j$213$i}else{$j$3$lcssa$i=$j$213$i}}$sfb2$2$lcssa$i=$sfb2$114$i+3|0;$exitcond40$i=($118|0)==13;if($exitcond40$i){break}else{$116=$120;$j$213$i=$j$3$lcssa$i;$sfb$115$i=$118;$sfb2$114$i=$sfb2$2$lcssa$i}}}}$225=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4780|0;$226=HEAP32[$225>>2]|0;$227=HEAP32[$4>>2]|0;$228=(($227+201112|0)+($gr$010<<3)|0)+($ch$06<<2)|0;HEAP32[$228>>2]=$226;$229=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4768|0;$230=HEAP32[$229>>2]|0;$231=((($gfc+304|0)+($gr$010*10504|0)|0)+($ch$06*5252|0)|0)+4844|0;$232=HEAP32[$231>>2]|0;$233=$232+$230|0;$234=(($227+203400|0)+($gr$010<<3)|0)+($ch$06<<2)|0;HEAP32[$234>>2]=$233;$235=HEAP32[$231>>2]|0;$236=(($227+203416|0)+($gr$010<<3)|0)+($ch$06<<2)|0;HEAP32[$236>>2]=$235;$237=HEAP32[$8>>2]|0;$238=(($227+203160|0)+($gr$010<<3)|0)+($ch$06<<2)|0;HEAP32[$238>>2]=$237;$239=+HEAPF32[$9>>2];$240=$239;$241=$240*10.0;$242=(($227+203208|0)+($gr$010<<4)|0)+($ch$06<<3)|0;HEAPF64[$242>>3]=$241;$243=+HEAPF32[$noise$i>>2];$244=$243;$245=$244*10.0;$246=(($227+203240|0)+($gr$010<<4)|0)+($ch$06<<3)|0;HEAPF64[$246>>3]=$245;$247=+HEAPF32[$10>>2];$248=$247;$249=$248*10.0;$250=(($227+203176|0)+($gr$010<<4)|0)+($ch$06<<3)|0;HEAPF64[$250>>3]=$249;$251=HEAP32[$11>>2]|0;$252=(($227+203272|0)+($gr$010<<3)|0)+($ch$06<<2)|0;HEAP32[$252>>2]=$251;_memcpy($16|0,$scalefac_sav|0,156)|0;$253=$ch$06+1|0;$254=HEAP32[$3>>2]|0;$255=($253|0)<($254|0);if($255){$ch$06=$253}else{$$lcssa28=$254;break}}$$pre20=HEAP32[$0>>2]|0;$258=$$pre20;$316=$$lcssa28}else{$258=$315;$316=$12}$256=$gr$010+1|0;$257=($256|0)<($258|0);if($257){$12=$316;$315=$258;$gr$010=$256}else{break}}STACKTOP=sp;return}function _ResvFrameBegin($gfc,$mean_bits){$gfc=$gfc|0;$mean_bits=$mean_bits|0;var $$=0,$$1=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0;var $25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$fullFrameBits$0=0,label=0,sp=0;sp=STACKTOP;$0=_getframebits($gfc)|0;$1=$gfc+24|0;$2=HEAP32[$1>>2]|0;$3=$2<<3;$4=$0-$3|0;$5=$gfc+76|0;$6=HEAP32[$5>>2]|0;$7=($4|0)/($6|0)&-1;$8=$6<<11;$9=$8+-8|0;$10=$gfc+148|0;$11=HEAP32[$10>>2]|0;$12=$11-$0|0;$13=$gfc+52144|0;$14=($12|0)>($9|0);$$=$14?$9:$12;HEAP32[$13>>2]=$$;$15=($$|0)<0;if($15){label=3}else{$16=$gfc+144|0;$17=HEAP32[$16>>2]|0;$18=($17|0)==0;if($18){$23=$$}else{label=3}}if((label|0)==3){HEAP32[$13>>2]=0;$23=0}$19=Math_imul($6,$7)|0;$20=$gfc+52140|0;$21=HEAP32[$20>>2]|0;$22=($21|0)<($23|0);$$1=$22?$21:$23;$24=$$1+$19|0;$25=($24|0)>($11|0);$fullFrameBits$0=$25?$11:$24;$26=$gfc+21320|0;HEAP32[$26>>2]=0;$27=$gfc+85804|0;$28=HEAP32[$27>>2]|0;$29=($28|0)==(0|0);if($29){HEAP32[$mean_bits>>2]=$7;return $fullFrameBits$0|0}$30=($7|0)/2&-1;$31=$28+203484|0;HEAP32[$31>>2]=$30;$32=$28+203488|0;HEAP32[$32>>2]=$21;HEAP32[$mean_bits>>2]=$7;return $fullFrameBits$0|0}function _ResvMaxBits($gfc,$mean_bits,$targ_bits,$extra_bits,$cbr){$gfc=$gfc|0;$mean_bits=$mean_bits|0;$targ_bits=$targ_bits|0;$extra_bits=$extra_bits|0;$cbr=$cbr|0;var $$=0,$$1=0,$$1$=0,$0=0,$1=0,$10=0.0,$11=0.0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0;var $24=0,$25=0.0,$26=0.0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$ResvMax$0=0,$add_bits$0=0,$targBits$0=0,label=0;var sp=0;sp=STACKTOP;$0=$gfc+52140|0;$1=HEAP32[$0>>2]|0;$2=$gfc+52144|0;$3=HEAP32[$2>>2]|0;$4=($cbr|0)==0;$5=$4?0:$mean_bits;$$1=$1+$5|0;$6=$gfc+85096|0;$7=HEAP32[$6>>2]|0;$8=$7&1;$9=($8|0)==0;if($9){$ResvMax$0=$3}else{$10=+($3|0);$11=$10*0.90000000000000002;$12=~~$11;$ResvMax$0=$12}$13=$$1*10|0;$14=$ResvMax$0*9|0;$15=($13|0)>($14|0);if($15){$16=($14|0)/10&-1;$17=$$1-$16|0;$18=$17+$mean_bits|0;$19=$7|128;HEAP32[$6>>2]=$19;$add_bits$0=$17;$targBits$0=$18}else{$20=$7&127;HEAP32[$6>>2]=$20;$21=$gfc+144|0;$22=HEAP32[$21>>2]|0;$23=$22|$8;$24=($23|0)==0;if($24){$25=+($mean_bits|0);$26=$25*0.90000000000000002;$27=~~$26;$add_bits$0=0;$targBits$0=$27}else{$add_bits$0=0;$targBits$0=$mean_bits}}$28=$3*6|0;$29=($28|0)/10&-1;$30=($$1|0)<($29|0);$$1$=$30?$$1:$29;$31=$$1$-$add_bits$0|0;$32=($31|0)<0;$$=$32?0:$31;HEAP32[$targ_bits>>2]=$targBits$0;HEAP32[$extra_bits>>2]=$$;return}function _ResvAdjust($gfc,$gi){$gfc=$gfc|0;$gi=$gi|0;var $0=0,$1=0,$2=0,$3=0,$4=0,$5=0,$6=0,$sum=0,label=0,sp=0;sp=STACKTOP;$0=$gi+4768|0;$1=HEAP32[$0>>2]|0;$2=$gi+4844|0;$3=HEAP32[$2>>2]|0;$4=$gfc+52140|0;$5=HEAP32[$4>>2]|0;$sum=$3+$1|0;$6=$5-$sum|0;HEAP32[$4>>2]=$6;return}function _ResvFrameEnd($gfc,$mean_bits){$gfc=$gfc|0;$mean_bits=$mean_bits|0;var $$stuffingBits$1=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$3=0;var $4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$stuffingBits$1=0,label=0,sp=0;sp=STACKTOP;$0=$gfc+76|0;$1=HEAP32[$0>>2]|0;$2=Math_imul($1,$mean_bits)|0;$3=$gfc+52140|0;$4=HEAP32[$3>>2]|0;$5=$4+$2|0;$6=$gfc+21324|0;$7=$gfc+21320|0;$8=($5|0)%8&-1;$9=$5-$8|0;$10=$gfc+52144|0;$11=HEAP32[$10>>2]|0;$12=$9-$11|0;$13=($12|0)>0;$14=$13?$12:0;$stuffingBits$1=$14+$8|0;$15=$gfc+21312|0;$16=HEAP32[$15>>2]|0;$17=$16<<3;$18=($17|0)<($stuffingBits$1|0);$$stuffingBits$1=$18?$17:$stuffingBits$1;$19=($$stuffingBits$1|0)/8&-1;$20=$19<<3;HEAP32[$7>>2]=$20;$21=$stuffingBits$1-$20|0;$22=$5-$20|0;$23=$16-$19|0;HEAP32[$15>>2]=$23;HEAP32[$6>>2]=$21;$24=$22-$21|0;HEAP32[$3>>2]=$24;return}function _lame_set_in_samplerate($gfp,$in_samplerate){$gfp=$gfp|0;$in_samplerate=$in_samplerate|0;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+12|0;HEAP32[$2>>2]=$in_samplerate;$$0=0;return $$0|0}function _lame_set_num_channels($gfp,$num_channels){$gfp=$gfp|0;$num_channels=$num_channels|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,$4=0,$or$cond=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=($num_channels|0)>2;$3=($num_channels|0)==0;$or$cond=$2|$3;if($or$cond){$$0=-1;return $$0|0}$4=$gfp+8|0;HEAP32[$4>>2]=$num_channels;$$0=0;return $$0|0}function _lame_set_scale($gfp,$scale){$gfp=$gfp|0;$scale=+$scale;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+20|0;HEAPF32[$2>>2]=$scale;$$0=0;return $$0|0}function _lame_get_scale($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+20|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _lame_set_mode($gfp,$mode){$gfp=$gfp|0;$mode=$mode|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,$or$cond=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;$2=$mode>>>0>4;$or$cond=$2|$1;if($or$cond){$$0=-1;return $$0|0}$3=$gfp+48|0;HEAP32[$3>>2]=$mode;$$0=0;return $$0|0}function _lame_set_brate($gfp,$brate){$gfp=$gfp|0;$brate=$brate|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,$4=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+96|0;HEAP32[$2>>2]=$brate;$3=($brate|0)>320;if(!$3){$$0=0;return $$0|0}$4=$gfp+128|0;HEAP32[$4>>2]=1;$$0=0;return $$0|0}function _lame_set_quant_comp($gfp,$quant_type){$gfp=$gfp|0;$quant_type=$quant_type|0;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+132|0;HEAP32[$2>>2]=$quant_type;$$0=0;return $$0|0}function _lame_set_quant_comp_short($gfp,$quant_type){$gfp=$gfp|0;$quant_type=$quant_type|0;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+136|0;HEAP32[$2>>2]=$quant_type;$$0=0;return $$0|0}function _lame_get_quant_comp($gfp){$gfp=$gfp|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0;return $$0|0}$2=$gfp+132|0;$3=HEAP32[$2>>2]|0;$$0=$3;return $$0|0}function _lame_get_quant_comp_short($gfp){$gfp=$gfp|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0;return $$0|0}$2=$gfp+136|0;$3=HEAP32[$2>>2]|0;$$0=$3;return $$0|0}function _lame_set_experimentalY($gfp,$experimentalY){$gfp=$gfp|0;$experimentalY=$experimentalY|0;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+140|0;HEAP32[$2>>2]=$experimentalY;$$0=0;return $$0|0}function _lame_set_exp_nspsytune($gfp,$exp_nspsytune){$gfp=$gfp|0;$exp_nspsytune=$exp_nspsytune|0;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+148|0;HEAP32[$2>>2]=$exp_nspsytune;$$0=0;return $$0|0}function _lame_get_exp_nspsytune($gfp){$gfp=$gfp|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0;return $$0|0}$2=$gfp+148|0;$3=HEAP32[$2>>2]|0;$$0=$3;return $$0|0}function _lame_set_VBR($gfp,$VBR){$gfp=$gfp|0;$VBR=$VBR|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,$or$cond=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;$2=$VBR>>>0>4;$or$cond=$2|$1;if($or$cond){$$0=-1;return $$0|0}$3=$gfp+156|0;HEAP32[$3>>2]=$VBR;$$0=0;return $$0|0}function _lame_get_VBR($gfp){$gfp=$gfp|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0;return $$0|0}$2=$gfp+156|0;$3=HEAP32[$2>>2]|0;$$0=$3;return $$0|0}function _lame_set_VBR_q($gfp,$VBR_q){$gfp=$gfp|0;$VBR_q=$VBR_q|0;var $$01=0,$$1=0,$$VBR_q=0,$0=0,$1=0,$2=0,$3=0,$4=0,$5=0,$VBR_q$lobit=0,$ret$1=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$01=-1;return $$01|0}$2=($VBR_q|0)<0;$$VBR_q=$2?0:$VBR_q;$VBR_q$lobit=$VBR_q>>31;$3=($$VBR_q|0)>9;$$1=$3?9:$$VBR_q;$ret$1=$3?-1:$VBR_q$lobit;$4=$gfp+164|0;HEAP32[$4>>2]=$$1;$5=$gfp+160|0;HEAPF32[$5>>2]=0.0;$$01=$ret$1;return $$01|0}function _lame_set_VBR_mean_bitrate_kbps($gfp,$VBR_mean_bitrate_kbps){$gfp=$gfp|0;$VBR_mean_bitrate_kbps=$VBR_mean_bitrate_kbps|0;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+168|0;HEAP32[$2>>2]=$VBR_mean_bitrate_kbps;$$0=0;return $$0|0}function _lame_get_VBR_mean_bitrate_kbps($gfp){$gfp=$gfp|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0;return $$0|0}$2=$gfp+168|0;$3=HEAP32[$2>>2]|0;$$0=$3;return $$0|0}function _lame_set_maskingadjust($gfp,$adjust){$gfp=$gfp|0;$adjust=+$adjust;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+200|0;HEAPF32[$2>>2]=$adjust;$$0=0;return $$0|0}function _lame_get_maskingadjust($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+200|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _lame_set_maskingadjust_short($gfp,$adjust){$gfp=$gfp|0;$adjust=+$adjust;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+204|0;HEAPF32[$2>>2]=$adjust;$$0=0;return $$0|0}function _lame_get_maskingadjust_short($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+204|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _lame_set_ATHtype($gfp,$ATHtype){$gfp=$gfp|0;$ATHtype=$ATHtype|0;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+220|0;HEAP32[$2>>2]=$ATHtype;$$0=0;return $$0|0}function _lame_set_ATHcurve($gfp,$ATHcurve){$gfp=$gfp|0;$ATHcurve=+$ATHcurve;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+224|0;HEAPF32[$2>>2]=$ATHcurve;$$0=0;return $$0|0}function _lame_get_ATHcurve($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+224|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _lame_set_ATHlower($gfp,$ATHlower){$gfp=$gfp|0;$ATHlower=+$ATHlower;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+228|0;HEAPF32[$2>>2]=$ATHlower;$$0=0;return $$0|0}function _lame_get_ATHlower($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+228|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _lame_set_athaa_sensitivity($gfp,$athaa_sensitivity){$gfp=$gfp|0;$athaa_sensitivity=+$athaa_sensitivity;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+236|0;HEAPF32[$2>>2]=$athaa_sensitivity;$$0=0;return $$0|0}function _lame_get_athaa_sensitivity($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+236|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _lame_set_interChRatio($gfp,$ratio){$gfp=$gfp|0;$ratio=+$ratio;var $$0=0,$0=0,$1=0,$2=0,$notlhs=0,$notrhs=0,$or$cond$not=0,$or$cond2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$notlhs=($0|0)==0;$notrhs=!($ratio>=0.0);$or$cond$not=$notrhs|$notlhs;$1=!($ratio<=1.0);$or$cond2=$1|$or$cond$not;if($or$cond2){$$0=-1;return $$0|0}$2=$gfp+248|0;HEAPF32[$2>>2]=$ratio;$$0=0;return $$0|0}function _lame_get_interChRatio($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+248|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _lame_set_sfscale($gfp,$val){$gfp=$gfp|0;$val=$val|0;var $$0=0,$0=0,$1=0,$2=0,$3=0,$4=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=($val|0)!=0;$3=$2?2:1;$4=$gfp+84|0;HEAP32[$4>>2]=$3;$$0=0;return $$0|0}function _lame_set_short_threshold_lrm($gfp,$lrm){$gfp=$gfp|0;$lrm=+$lrm;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+264|0;HEAPF32[$2>>2]=$lrm;$$0=0;return $$0|0}function _lame_get_short_threshold_lrm($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+264|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _lame_set_short_threshold_s($gfp,$s){$gfp=$gfp|0;$s=+$s;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=-1;return $$0|0}$2=$gfp+268|0;HEAPF32[$2>>2]=$s;$$0=0;return $$0|0}function _lame_get_short_threshold_s($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+268|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _lame_set_msfix($gfp,$msfix){$gfp=$gfp|0;$msfix=+$msfix;var $0=0,$1=0,$2=0.0,$3=0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){return}$2=$msfix;$3=$gfp+252|0;HEAPF32[$3>>2]=$2;return}function _lame_get_msfix($gfp){$gfp=$gfp|0;var $$0=0.0,$0=0,$1=0,$2=0,$3=0.0,label=0,sp=0;sp=STACKTOP;$0=_is_lame_global_flags_valid($gfp)|0;$1=($0|0)==0;if($1){$$0=0.0;return+$$0}$2=$gfp+252|0;$3=+HEAPF32[$2>>2];$$0=$3;return+$$0}function _noquant_count_bits($gfc,$gi,$prev_noise){$gfc=$gfc|0;$gi=$gi|0;$prev_noise=$prev_noise|0;var $$=0,$$0=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0;var $114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0;var $21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0;var $4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0;var $58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0;var $76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0;var $94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$a1$0$lcssa=0,$a1$04=0,$a1$2=0,$a2$0$lcssa=0,$a2$03=0,$a2$1=0,$bits=0,$i$0=0,$i$0$lcssa=0,$i$0$lcssa24=0,$i$025=0,$i$1$=0,$i$1$1=0,$i$1$lcssa=0;var $i$1$lcssa17=0,$i$15=0,$sfb$0=0,$sfb$0$lcssa=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$bits=sp;HEAP32[$bits>>2]=0;$0=$gi+2304|0;$1=$gi+5208|0;$2=HEAP32[$1>>2]|0;$3=$2+2|0;$4=$3&-2;$5=($4|0)>576;$$=$5?576:$4;$6=($prev_noise|0)!=(0|0);if($6){$7=$prev_noise+4|0;HEAP32[$7>>2]=0;$i$0=$$}else{$i$0=$$}while(1){$8=($i$0|0)>1;if(!$8){$i$0$lcssa=$i$0;label=4;break}$10=$i$0+-1|0;$11=($gi+2304|0)+($10<<2)|0;$12=HEAP32[$11>>2]|0;$13=$i$0+-2|0;$14=($gi+2304|0)+($13<<2)|0;$15=HEAP32[$14>>2]|0;$16=$15|$12;$17=($16|0)==0;if($17){$i$0=$13}else{$i$0$lcssa24=$i$0;label=6;break}}if((label|0)==4){$9=$gi+4776|0;HEAP32[$9>>2]=$i$0$lcssa;$i$025=$i$0$lcssa;label=9}else if((label|0)==6){$18=$gi+4776|0;HEAP32[$18>>2]=$i$0$lcssa24;$19=($i$0$lcssa24|0)>3;if($19){$a1$04=0;$a2$03=0;$i$15=$i$0$lcssa24;while(1){$20=$i$15+-4|0;$21=($gi+2304|0)+($20<<2)|0;$22=HEAP32[$21>>2]|0;$23=$i$15+-3|0;$24=($gi+2304|0)+($23<<2)|0;$25=HEAP32[$24>>2]|0;$26=$i$15+-2|0;$27=($gi+2304|0)+($26<<2)|0;$28=HEAP32[$27>>2]|0;$29=$i$15+-1|0;$30=($gi+2304|0)+($29<<2)|0;$31=HEAP32[$30>>2]|0;$32=$25|$22;$33=$32|$28;$34=$33|$31;$35=$34>>>0>1;if($35){$a1$0$lcssa=$a1$04;$a2$0$lcssa=$a2$03;$i$1$lcssa=$i$15;break}$36=$22<<1;$37=$36+$25|0;$38=$37<<1;$39=$38+$28|0;$40=$39<<1;$41=$40+$31|0;$42=82240+$41|0;$43=HEAP8[$42>>0]|0;$44=$43&255;$45=$44+$a1$04|0;$46=82256+$41|0;$47=HEAP8[$46>>0]|0;$48=$47&255;$49=$48+$a2$03|0;$50=($20|0)>3;if($50){$a1$04=$45;$a2$03=$49;$i$15=$20}else{$a1$0$lcssa=$45;$a2$0$lcssa=$49;$i$1$lcssa=$20;break}}HEAP32[$bits>>2]=$a1$0$lcssa;$52=$gi+4840|0;HEAP32[$52>>2]=0;$53=($a1$0$lcssa|0)>($a2$0$lcssa|0);if($53){HEAP32[$bits>>2]=$a2$0$lcssa;HEAP32[$52>>2]=1;$55=$a2$0$lcssa;$i$1$lcssa17=$i$1$lcssa}else{$55=$a1$0$lcssa;$i$1$lcssa17=$i$1$lcssa}}else{$i$025=$i$0$lcssa24;label=9}}if((label|0)==9){HEAP32[$bits>>2]=0;$51=$gi+4840|0;HEAP32[$51>>2]=0;$55=0;$i$1$lcssa17=$i$025}$54=$gi+5184|0;HEAP32[$54>>2]=$55;$56=$gi+4772|0;HEAP32[$56>>2]=$i$1$lcssa17;$57=($i$1$lcssa17|0)==0;if($57){$$0=HEAP32[$bits>>2]|0;STACKTOP=sp;return $$0|0}$58=$gi+4788|0;$59=HEAP32[$58>>2]|0;if(($59|0)==2){$60=$gfc+21464|0;$61=HEAP32[$60>>2]|0;$62=$61*3|0;$63=($62|0)>($i$1$lcssa17|0);$i$1$=$63?$i$1$lcssa17:$62;$a1$2=$i$1$;$a2$1=$i$1$lcssa17}else if(($59|0)==0){$64=$i$1$lcssa17+-2|0;$65=($gfc+85100|0)+$64|0;$66=HEAP8[$65>>0]|0;$67=$66<<24>>24;$68=$gi+4824|0;HEAP32[$68>>2]=$67;$69=$i$1$lcssa17+-1|0;$70=($gfc+85100|0)+$69|0;$71=HEAP8[$70>>0]|0;$72=$71<<24>>24;$73=$gi+4828|0;HEAP32[$73>>2]=$72;$74=$67+2|0;$75=$74+$72|0;$76=($gfc+21360|0)+($75<<2)|0;$77=HEAP32[$76>>2]|0;$78=$67+1|0;$79=($gfc+21360|0)+($78<<2)|0;$80=HEAP32[$79>>2]|0;$81=($77|0)<($i$1$lcssa17|0);if($81){$82=$gfc+85816|0;$83=HEAP32[$82>>2]|0;$84=($gi+2304|0)+($77<<2)|0;$85=($gi+2304|0)+($i$1$lcssa17<<2)|0;$86=FUNCTION_TABLE_iiii[$83&3]($84,$85,$bits)|0;$87=$gi+4804|0;HEAP32[$87>>2]=$86;$a1$2=$80;$a2$1=$77}else{$a1$2=$80;$a2$1=$77}}else{$88=$gi+4824|0;HEAP32[$88>>2]=7;$89=$gi+4828|0;HEAP32[$89>>2]=13;$90=$gfc+21392|0;$91=HEAP32[$90>>2]|0;$92=($91|0)>($i$1$lcssa17|0);$i$1$1=$92?$i$1$lcssa17:$91;$a1$2=$i$1$1;$a2$1=$i$1$lcssa17}$93=($a1$2|0)<($i$1$lcssa17|0);$94=$93?$a1$2:$i$1$lcssa17;$95=($a2$1|0)<($i$1$lcssa17|0);$96=$95?$a2$1:$i$1$lcssa17;$97=($94|0)>0;if($97){$98=$gfc+85816|0;$99=HEAP32[$98>>2]|0;$100=($gi+2304|0)+($94<<2)|0;$101=FUNCTION_TABLE_iiii[$99&3]($0,$100,$bits)|0;$102=$gi+4796|0;HEAP32[$102>>2]=$101}$103=($94|0)<($96|0);if($103){$104=$gfc+85816|0;$105=HEAP32[$104>>2]|0;$106=($gi+2304|0)+($94<<2)|0;$107=($gi+2304|0)+($96<<2)|0;$108=FUNCTION_TABLE_iiii[$105&3]($106,$107,$bits)|0;$109=$gi+4800|0;HEAP32[$109>>2]=$108}$110=$gfc+36|0;$111=HEAP32[$110>>2]|0;$112=($111|0)==2;if($112){$113=HEAP32[$bits>>2]|0;$114=$gi+4768|0;HEAP32[$114>>2]=$113;_best_huffman_divide($gfc,$gi);$115=HEAP32[$114>>2]|0;HEAP32[$bits>>2]=$115}if(!$6){$$0=HEAP32[$bits>>2]|0;STACKTOP=sp;return $$0|0}$116=HEAP32[$58>>2]|0;$117=($116|0)==0;if(!$117){$$0=HEAP32[$bits>>2]|0;STACKTOP=sp;return $$0|0}$118=HEAP32[$56>>2]|0;$sfb$0=0;while(1){$119=($gfc+21360|0)+($sfb$0<<2)|0;$120=HEAP32[$119>>2]|0;$121=($120|0)<($118|0);$122=$sfb$0+1|0;if($121){$sfb$0=$122}else{$sfb$0$lcssa=$sfb$0;break}}$123=$prev_noise+4|0;HEAP32[$123>>2]=$sfb$0$lcssa;$$0=HEAP32[$bits>>2]|0;STACKTOP=sp;return $$0|0}function _best_huffman_divide($gfc,$gi){$gfc=$gfc|0;$gi=$gi|0;var $$=0,$$lcssa=0,$$lcssa16=0,$$pre=0,$$pre$phiZ2D=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0;var $111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0,$128=0,$129=0;var $13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0;var $148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0,$164=0,$165=0;var $166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0;var $184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0;var $201=0,$202=0,$203=0,$204=0,$205=0,$206=0,$207=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0;var $33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0;var $51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0;var $7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0;var $88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$a1$0$lcssa=0,$a1$06=0,$a2$0$a1$0=0,$a2$0$lcssa=0,$a2$05=0,$bits$i2=0,$cod_info2=0;var $gi$idx=0,$gi$idx$val=0,$i$0$=0,$i$07=0,$r0$12$i=0,$r01_bits=0,$r01_div=0,$r0_tbl=0,$r0bits$i=0,$r1$01$i=0,$r1_tbl=0,$r2$01$i=0,$r2$01$i3=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+5632|0;$bits$i2=sp+5624|0;$r0bits$i=sp+5620|0;$cod_info2=sp+368|0;$r01_bits=sp+276|0;$r01_div=sp+184|0;$r0_tbl=sp+92|0;$r1_tbl=sp;$0=$gi+2304|0;$1=$gi+4788|0;$2=HEAP32[$1>>2]|0;$3=($2|0)==2;do{if($3){$4=$gfc+76|0;$5=HEAP32[$4>>2]|0;$6=($5|0)==1;if($6){STACKTOP=sp;return}else{_memcpy($cod_info2|0,$gi|0,5252)|0;$207=$gi;label=5;break}}else{_memcpy($cod_info2|0,$gi|0,5252)|0;$7=($2|0)==0;if($7){$gi$idx=$gi+4772|0;$gi$idx$val=HEAP32[$gi$idx>>2]|0;HEAP32[$r01_bits>>2]=100000;$8=$r01_bits+4|0;HEAP32[$8>>2]=100000;$9=$r01_bits+8|0;HEAP32[$9>>2]=100000;$10=$r01_bits+12|0;HEAP32[$10>>2]=100000;$11=$r01_bits+16|0;HEAP32[$11>>2]=100000;$12=$r01_bits+20|0;HEAP32[$12>>2]=100000;$13=$r01_bits+24|0;HEAP32[$13>>2]=100000;$14=$r01_bits+28|0;HEAP32[$14>>2]=100000;$15=$r01_bits+32|0;HEAP32[$15>>2]=100000;$16=$r01_bits+36|0;HEAP32[$16>>2]=100000;$17=$r01_bits+40|0;HEAP32[$17>>2]=100000;$18=$r01_bits+44|0;HEAP32[$18>>2]=100000;$19=$r01_bits+48|0;HEAP32[$19>>2]=100000;$20=$r01_bits+52|0;HEAP32[$20>>2]=100000;$21=$r01_bits+56|0;HEAP32[$21>>2]=100000;$22=$r01_bits+60|0;HEAP32[$22>>2]=100000;$23=$r01_bits+64|0;HEAP32[$23>>2]=100000;$24=$r01_bits+68|0;HEAP32[$24>>2]=100000;$25=$r01_bits+72|0;HEAP32[$25>>2]=100000;$26=$r01_bits+76|0;HEAP32[$26>>2]=100000;$27=$r01_bits+80|0;HEAP32[$27>>2]=100000;$28=$r01_bits+84|0;HEAP32[$28>>2]=100000;$29=$r01_bits+88|0;HEAP32[$29>>2]=100000;$30=$gfc+85816|0;$r0$12$i=0;while(1){$31=$r0$12$i+1|0;$33=($gfc+21360|0)+($31<<2)|0;$34=HEAP32[$33>>2]|0;$35=($34|0)<($gi$idx$val|0);if(!$35){break}HEAP32[$r0bits$i>>2]=0;$36=HEAP32[$30>>2]|0;$37=($gi+2304|0)+($34<<2)|0;$38=FUNCTION_TABLE_iiii[$36&3]($0,$37,$r0bits$i)|0;$r1$01$i=0;while(1){$39=$r1$01$i+$r0$12$i|0;$40=$39+2|0;$41=($gfc+21360|0)+($40<<2)|0;$42=HEAP32[$41>>2]|0;$43=($42|0)<($gi$idx$val|0);if(!$43){break}$44=HEAP32[$r0bits$i>>2]|0;HEAP32[$bits$i2>>2]=$44;$45=HEAP32[$30>>2]|0;$46=($gi+2304|0)+($42<<2)|0;$47=FUNCTION_TABLE_iiii[$45&3]($37,$46,$bits$i2)|0;$48=$r01_bits+($39<<2)|0;$49=HEAP32[$48>>2]|0;$50=HEAP32[$bits$i2>>2]|0;$51=($49|0)>($50|0);if($51){HEAP32[$48>>2]=$50;$52=$r01_div+($39<<2)|0;HEAP32[$52>>2]=$r0$12$i;$53=$r0_tbl+($39<<2)|0;HEAP32[$53>>2]=$38;$54=$r1_tbl+($39<<2)|0;HEAP32[$54>>2]=$47}$55=$r1$01$i+1|0;$56=($55|0)<8;if($56){$r1$01$i=$55}else{break}}$32=($31|0)<16;if($32){$r0$12$i=$31}else{break}}$57=$cod_info2+4772|0;$58=HEAP32[$57>>2]|0;$59=$cod_info2+5184|0;$60=$gi+4768|0;$61=($gi+2304|0)+($58<<2)|0;$62=$gi+4824|0;$63=$gi+4828|0;$64=$gi+4796|0;$65=$gi+4800|0;$66=$gi+4804|0;$r2$01$i=2;while(1){$67=($gfc+21360|0)+($r2$01$i<<2)|0;$68=HEAP32[$67>>2]|0;$69=($68|0)<($58|0);if(!$69){break}$70=$r2$01$i+-2|0;$71=$r01_bits+($70<<2)|0;$72=HEAP32[$71>>2]|0;$73=HEAP32[$59>>2]|0;$74=$73+$72|0;HEAP32[$bits$i2>>2]=$74;$75=HEAP32[$60>>2]|0;$76=($75|0)>($74|0);if(!$76){break}$77=HEAP32[$30>>2]|0;$78=($gi+2304|0)+($68<<2)|0;$79=FUNCTION_TABLE_iiii[$77&3]($78,$61,$bits$i2)|0;$80=HEAP32[$60>>2]|0;$81=HEAP32[$bits$i2>>2]|0;$82=($80|0)>($81|0);if($82){_memcpy($gi|0,$cod_info2|0,5252)|0;HEAP32[$60>>2]=$81;$83=$r01_div+($70<<2)|0;$84=HEAP32[$83>>2]|0;HEAP32[$62>>2]=$84;$85=$70-$84|0;HEAP32[$63>>2]=$85;$86=$r0_tbl+($70<<2)|0;$87=HEAP32[$86>>2]|0;HEAP32[$64>>2]=$87;$88=$r1_tbl+($70<<2)|0;$89=HEAP32[$88>>2]|0;HEAP32[$65>>2]=$89;HEAP32[$66>>2]=$79}$90=$r2$01$i+1|0;$91=($90|0)<23;if($91){$r2$01$i=$90}else{break}}$$pre$phiZ2D=$57;$106=$gi}else{$207=$gi;label=5}}}while(0);if((label|0)==5){$$pre=$cod_info2+4772|0;$$pre$phiZ2D=$$pre;$106=$207}$92=HEAP32[$$pre$phiZ2D>>2]|0;$93=($92|0)==0;if($93){STACKTOP=sp;return}$94=$92+-2|0;$95=($gi+2304|0)+($94<<2)|0;$96=HEAP32[$95>>2]|0;$97=$92+-1|0;$98=($gi+2304|0)+($97<<2)|0;$99=HEAP32[$98>>2]|0;$100=$99|$96;$101=$100>>>0>1;if($101){STACKTOP=sp;return}$102=$gi+4776|0;$103=HEAP32[$102>>2]|0;$104=$103+2|0;$105=($104|0)>576;if($105){STACKTOP=sp;return}_memcpy($cod_info2|0,$106|0,5252)|0;$107=$cod_info2+4776|0;HEAP32[$107>>2]=$104;$108=HEAP32[$$pre$phiZ2D>>2]|0;$109=($104|0)>($108|0);if($109){$110=$103+-2|0;$111=($108|0)>($110|0);$112=$111?$110:$108;$113=$112^-1;$114=$103+$113|0;$115=$114+2|0;$116=$115&-4;$a1$06=0;$a2$05=0;$i$07=$104;while(1){$117=$i$07+-4|0;$118=($gi+2304|0)+($117<<2)|0;$119=HEAP32[$118>>2]|0;$120=$119<<1;$121=$i$07+-3|0;$122=($gi+2304|0)+($121<<2)|0;$123=HEAP32[$122>>2]|0;$124=$120+$123|0;$125=$124<<1;$126=$i$07+-2|0;$127=($gi+2304|0)+($126<<2)|0;$128=HEAP32[$127>>2]|0;$129=$125+$128|0;$130=$129<<1;$131=$i$07+-1|0;$132=($gi+2304|0)+($131<<2)|0;$133=HEAP32[$132>>2]|0;$134=$130+$133|0;$135=82240+$134|0;$136=HEAP8[$135>>0]|0;$137=$136&255;$138=$137+$a1$06|0;$139=82256+$134|0;$140=HEAP8[$139>>0]|0;$141=$140&255;$142=$141+$a2$05|0;$143=($117|0)>($108|0);if($143){$a1$06=$138;$a2$05=$142;$i$07=$117}else{$$lcssa=$138;$$lcssa16=$142;break}}$144=$103+-2|0;$145=$144-$116|0;$146=$145;$a1$0$lcssa=$$lcssa;$a2$0$lcssa=$$lcssa16}else{$146=$104;$a1$0$lcssa=0;$a2$0$lcssa=0}HEAP32[$$pre$phiZ2D>>2]=$146;$147=$cod_info2+4840|0;$148=($a1$0$lcssa|0)>($a2$0$lcssa|0);$$=$148&1;$a2$0$a1$0=$148?$a2$0$lcssa:$a1$0$lcssa;HEAP32[$147>>2]=$$;$149=$cod_info2+5184|0;HEAP32[$149>>2]=$a2$0$a1$0;$150=$cod_info2+4788|0;$151=HEAP32[$150>>2]|0;$152=($151|0)==0;if($152){$153=$gi+4768|0;$154=$gfc+85816|0;$155=($gi+2304|0)+($146<<2)|0;$156=$gi+4824|0;$157=$gi+4828|0;$158=$gi+4796|0;$159=$gi+4800|0;$160=$gi+4804|0;$r2$01$i3=2;while(1){$161=($gfc+21360|0)+($r2$01$i3<<2)|0;$162=HEAP32[$161>>2]|0;$163=($162|0)<($146|0);if(!$163){break}$164=$r2$01$i3+-2|0;$165=$r01_bits+($164<<2)|0;$166=HEAP32[$165>>2]|0;$167=HEAP32[$149>>2]|0;$168=$167+$166|0;HEAP32[$bits$i2>>2]=$168;$169=HEAP32[$153>>2]|0;$170=($169|0)>($168|0);if(!$170){break}$171=HEAP32[$154>>2]|0;$172=($gi+2304|0)+($162<<2)|0;$173=FUNCTION_TABLE_iiii[$171&3]($172,$155,$bits$i2)|0;$174=HEAP32[$153>>2]|0;$175=HEAP32[$bits$i2>>2]|0;$176=($174|0)>($175|0);if($176){_memcpy($106|0,$cod_info2|0,5252)|0;HEAP32[$153>>2]=$175;$177=$r01_div+($164<<2)|0;$178=HEAP32[$177>>2]|0;HEAP32[$156>>2]=$178;$179=$164-$178|0;HEAP32[$157>>2]=$179;$180=$r0_tbl+($164<<2)|0;$181=HEAP32[$180>>2]|0;HEAP32[$158>>2]=$181;$182=$r1_tbl+($164<<2)|0;$183=HEAP32[$182>>2]|0;HEAP32[$159>>2]=$183;HEAP32[$160>>2]=$173}$184=$r2$01$i3+1|0;$185=($184|0)<23;if($185){$r2$01$i3=$184}else{break}}STACKTOP=sp;return}else{$186=$cod_info2+4768|0;HEAP32[$186>>2]=$a2$0$a1$0;$187=$gfc+21392|0;$188=HEAP32[$187>>2]|0;$189=($188|0)>($146|0);$i$0$=$189?$146:$188;$190=($i$0$|0)>0;if($190){$191=$gfc+85816|0;$192=HEAP32[$191>>2]|0;$193=($gi+2304|0)+($i$0$<<2)|0;$194=FUNCTION_TABLE_iiii[$192&3]($0,$193,$186)|0;$195=$cod_info2+4796|0;HEAP32[$195>>2]=$194}$196=($146|0)>($i$0$|0);if($196){$197=$gfc+85816|0;$198=HEAP32[$197>>2]|0;$199=($gi+2304|0)+($i$0$<<2)|0;$200=($gi+2304|0)+($146<<2)|0;$201=FUNCTION_TABLE_iiii[$198&3]($199,$200,$186)|0;$202=$cod_info2+4800|0;HEAP32[$202>>2]=$201}$203=$gi+4768|0;$204=HEAP32[$203>>2]|0;$205=HEAP32[$186>>2]|0;$206=($204|0)>($205|0);if(!$206){STACKTOP=sp;return}_memcpy($106|0,$cod_info2|0,5252)|0;STACKTOP=sp;return}}function _count_bits($gfc,$xr,$gi,$prev_noise){$gfc=$gfc|0;$xr=$xr|0;$gi=$gi|0;$prev_noise=$prev_noise|0;var $$$i=0,$$0=0,$$0$acc_xp$0$i=0,$$041$i=0,$$1$i=0,$$2$i=0,$$pre$pre=0,$$pre7=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0;var $109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0.0,$119=0,$12=0,$120=0,$121=0.0,$122=0,$123=0,$124=0,$125=0,$126=0;var $127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0.0,$137=0.0,$138=0.0,$139=0.0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0;var $145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0.0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0;var $17=0.0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0.0,$30=0,$31=0,$32=0,$33=0,$34=0;var $35=0,$36=0,$37=0,$38=0,$39=0,$4=0.0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0.0,$49=0,$5=0,$50=0,$51=0.0,$52=0;var $53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0.0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0;var $71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0.0,$83=0,$84=0,$85=0.0,$86=0,$87=0,$88=0,$89=0;var $9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0.0,$97=0,$98=0,$99=0.0,$acc_iData$037$i=0,$acc_iData$2$i=0,$acc_iData$3$i=0,$acc_iData$4$i=0,$acc_iData$4$i$lcssa=0,$acc_iData$5$i=0,$acc_iData$5$i$lcssa=0,$acc_xp$039$i=0,$acc_xp$2$i=0;var $acc_xp$3$i=0,$acc_xp$4$i=0,$acc_xp$4$i$lcssa=0,$acc_xp$5$i=0,$acc_xp$5$i$lcssa=0,$accumulate$035$i=0,$accumulate$3$i=0,$accumulate$3$i$lcssa=0,$accumulate$4$i=0,$accumulate$4$i$lcssa=0,$accumulate01$036$i=0,$accumulate01$2$i=0,$accumulate01$2$i$lcssa=0,$accumulate01$4$i=0,$accumulate01$4$i$lcssa=0,$i$02$i$i=0,$i$02$i14$i=0,$i$02$i4$i=0,$i$02$i9$i=0,$iData$0$acc_iData$0$i=0;var $iData$031$i=0,$iData$1$i=0,$j$028$i=0,$j$03=0,$j$1$i=0,$k$02=0,$l$0$i=0,$not$$i$i=0,$not$$i10$i=0,$not$$i15$i=0,$not$$i5$i=0,$not$1$i$i=0,$not$1$i11$i=0,$not$1$i16$i=0,$not$1$i6$i=0,$or$cond=0,$or$cond$i=0,$or$cond3$i=0,$sfb$029$i=0,$sfb$04=0;var $sfb$1$i=0,$sfb$2$i=0,$step$019$i=0,label=0,sp=0;sp=STACKTOP;$0=$gi+4780|0;$1=HEAP32[$0>>2]|0;$2=79704+($1<<2)|0;$3=+HEAPF32[$2>>2];$4=8206.0/$3;$5=$gi+4764|0;$6=+HEAPF32[$5>>2];$7=$6>$4;if($7){$$0=100000;return $$0|0}$8=$gi+2304|0;$9=($prev_noise|0)!=(0|0);if($9){$10=HEAP32[$prev_noise>>2]|0;$11=($1|0)==($10|0);$161=$11}else{$161=0}$12=$gi+4788|0;$13=HEAP32[$12>>2]|0;$14=($13|0)==2;$$2$i=$14?38:21;$15=$gi+4832|0;$16=$gi+4836|0;$17=0.59459996223449707/$3;$18=$gi+5208|0;$19=$$2$i+1|0;$20=$prev_noise+4|0;$$041$i=$xr;$acc_iData$037$i=$8;$acc_xp$039$i=$xr;$accumulate$035$i=0;$accumulate01$036$i=0;$iData$031$i=$8;$j$028$i=0;$sfb$029$i=0;while(1){if($161){label=7}else{$21=HEAP32[$12>>2]|0;$22=($21|0)==0;if($22){label=7}else{$step$019$i=-1;label=15}}if((label|0)==7){label=0;$23=HEAP32[$0>>2]|0;$24=($gi+4608|0)+($sfb$029$i<<2)|0;$25=HEAP32[$24>>2]|0;$26=HEAP32[$15>>2]|0;$27=($26|0)==0;if($27){$31=0}else{$28=12112+($sfb$029$i<<2)|0;$29=HEAP32[$28>>2]|0;$31=$29}$30=$31+$25|0;$32=HEAP32[$16>>2]|0;$33=$32+1|0;$34=$30<<$33;$35=$23-$34|0;$36=($gi+5028|0)+($sfb$029$i<<2)|0;$37=HEAP32[$36>>2]|0;$38=($gi+4808|0)+($37<<2)|0;$39=HEAP32[$38>>2]|0;$40=$39<<3;$41=$35-$40|0;if($161){$42=($prev_noise+8|0)+($sfb$029$i<<2)|0;$43=HEAP32[$42>>2]|0;$44=($43|0)==($41|0);if($44){$45=($accumulate$035$i|0)==0;if(!$45){_quantize_lines_xrpow($accumulate$035$i,$3,$acc_xp$039$i,$acc_iData$037$i)}$46=($accumulate01$036$i|0)==0;if($46){$acc_iData$5$i=$acc_iData$037$i;$acc_xp$5$i=$acc_xp$039$i;$accumulate$4$i=0;$accumulate01$4$i=0;$sfb$2$i=$sfb$029$i}else{$i$02$i$i=0;while(1){$47=$acc_xp$039$i+($i$02$i$i<<2)|0;$48=+HEAPF32[$47>>2];$49=$i$02$i$i|1;$50=$acc_xp$039$i+($49<<2)|0;$51=+HEAPF32[$50>>2];$not$$i$i=!($17>$48);$52=$not$$i$i&1;$not$1$i$i=!($17>$51);$53=$not$1$i$i&1;$54=$acc_iData$037$i+($i$02$i$i<<2)|0;HEAP32[$54>>2]=$52;$55=$acc_iData$037$i+($49<<2)|0;HEAP32[$55>>2]=$53;$56=$i$02$i$i+2|0;$57=$56>>>0<$accumulate01$036$i>>>0;if($57){$i$02$i$i=$56}else{$acc_iData$5$i=$acc_iData$037$i;$acc_xp$5$i=$acc_xp$039$i;$accumulate$4$i=0;$accumulate01$4$i=0;$sfb$2$i=$sfb$029$i;break}}}}else{$step$019$i=$41;label=15}}else{$step$019$i=$41;label=15}}if((label|0)==15){label=0;$58=($gi+4872|0)+($sfb$029$i<<2)|0;$59=HEAP32[$58>>2]|0;$60=$59+$j$028$i|0;$61=HEAP32[$18>>2]|0;$62=($60|0)>($61|0);if($62){$63=$61-$j$028$i|0;$64=$63+1|0;$65=($gi+2304|0)+($61<<2)|0;$66=576-$61|0;$67=$66<<2;_memset($65|0,0,$67|0)|0;$68=($64|0)<0;$$$i=$68?0:$64;$l$0$i=$$$i;$sfb$1$i=$19}else{$l$0$i=$59;$sfb$1$i=$sfb$029$i}$69=($accumulate$035$i|0)==0;$70=($accumulate01$036$i|0)==0;$71=$accumulate$035$i|$accumulate01$036$i;$72=($71|0)==0;$iData$0$acc_iData$0$i=$72?$iData$031$i:$acc_iData$037$i;$$0$acc_xp$0$i=$72?$$041$i:$acc_xp$039$i;if($9){$73=HEAP32[$20>>2]|0;$74=($73|0)<1;$75=($sfb$1$i|0)<($73|0);$or$cond$i=$74|$75;if($or$cond$i){label=23}else{$76=($prev_noise+8|0)+($sfb$1$i<<2)|0;$77=HEAP32[$76>>2]|0;$78=($77|0)<1;$79=($step$019$i|0)<($77|0);$or$cond3$i=$78|$79;if($or$cond3$i){label=23}else{if($69){$acc_iData$2$i=$iData$0$acc_iData$0$i;$acc_xp$2$i=$$0$acc_xp$0$i}else{_quantize_lines_xrpow($accumulate$035$i,$3,$$0$acc_xp$0$i,$iData$0$acc_iData$0$i);$acc_iData$2$i=$iData$031$i;$acc_xp$2$i=$$041$i}$80=$l$0$i+$accumulate01$036$i|0;$acc_iData$4$i=$acc_iData$2$i;$acc_xp$4$i=$acc_xp$2$i;$accumulate$3$i=0;$accumulate01$2$i=$80}}}else{label=23}if((label|0)==23){label=0;if($70){$acc_iData$3$i=$iData$0$acc_iData$0$i;$acc_xp$3$i=$$0$acc_xp$0$i}else{$i$02$i9$i=0;while(1){$81=$$0$acc_xp$0$i+($i$02$i9$i<<2)|0;$82=+HEAPF32[$81>>2];$83=$i$02$i9$i|1;$84=$$0$acc_xp$0$i+($83<<2)|0;$85=+HEAPF32[$84>>2];$not$$i10$i=!($17>$82);$86=$not$$i10$i&1;$not$1$i11$i=!($17>$85);$87=$not$1$i11$i&1;$88=$iData$0$acc_iData$0$i+($i$02$i9$i<<2)|0;HEAP32[$88>>2]=$86;$89=$iData$0$acc_iData$0$i+($83<<2)|0;HEAP32[$89>>2]=$87;$90=$i$02$i9$i+2|0;$91=$90>>>0<$accumulate01$036$i>>>0;if($91){$i$02$i9$i=$90}else{$acc_iData$3$i=$iData$031$i;$acc_xp$3$i=$$041$i;break}}}$92=$l$0$i+$accumulate$035$i|0;$acc_iData$4$i=$acc_iData$3$i;$acc_xp$4$i=$acc_xp$3$i;$accumulate$3$i=$92;$accumulate01$2$i=0}$93=($l$0$i|0)<1;if($93){$acc_iData$4$i$lcssa=$acc_iData$4$i;$acc_xp$4$i$lcssa=$acc_xp$4$i;$accumulate$3$i$lcssa=$accumulate$3$i;$accumulate01$2$i$lcssa=$accumulate01$2$i;label=27;break}else{$acc_iData$5$i=$acc_iData$4$i;$acc_xp$5$i=$acc_xp$4$i;$accumulate$4$i=$accumulate$3$i;$accumulate01$4$i=$accumulate01$2$i;$sfb$2$i=$sfb$1$i}}$107=($sfb$2$i|0)>($$2$i|0);if($107){$$1$i=$$041$i;$iData$1$i=$iData$031$i;$j$1$i=$j$028$i}else{$108=($gi+4872|0)+($sfb$2$i<<2)|0;$109=HEAP32[$108>>2]|0;$110=$iData$031$i+($109<<2)|0;$111=$$041$i+($109<<2)|0;$112=$109+$j$028$i|0;$$1$i=$111;$iData$1$i=$110;$j$1$i=$112}$113=$sfb$2$i+1|0;$114=($sfb$2$i|0)<($$2$i|0);if($114){$$041$i=$$1$i;$acc_iData$037$i=$acc_iData$5$i;$acc_xp$039$i=$acc_xp$5$i;$accumulate$035$i=$accumulate$4$i;$accumulate01$036$i=$accumulate01$4$i;$iData$031$i=$iData$1$i;$j$028$i=$j$1$i;$sfb$029$i=$113}else{$acc_iData$5$i$lcssa=$acc_iData$5$i;$acc_xp$5$i$lcssa=$acc_xp$5$i;$accumulate$4$i$lcssa=$accumulate$4$i;$accumulate01$4$i$lcssa=$accumulate01$4$i;label=34;break}}if((label|0)==27){$94=($accumulate01$2$i$lcssa|0)==0;if(!$94){$i$02$i14$i=0;while(1){$95=$acc_xp$4$i$lcssa+($i$02$i14$i<<2)|0;$96=+HEAPF32[$95>>2];$97=$i$02$i14$i|1;$98=$acc_xp$4$i$lcssa+($97<<2)|0;$99=+HEAPF32[$98>>2];$not$$i15$i=!($17>$96);$100=$not$$i15$i&1;$not$1$i16$i=!($17>$99);$101=$not$1$i16$i&1;$102=$acc_iData$4$i$lcssa+($i$02$i14$i<<2)|0;HEAP32[$102>>2]=$100;$103=$acc_iData$4$i$lcssa+($97<<2)|0;HEAP32[$103>>2]=$101;$104=$i$02$i14$i+2|0;$105=$104>>>0<$accumulate01$2$i$lcssa>>>0;if($105){$i$02$i14$i=$104}else{break}}}$106=($accumulate$3$i$lcssa|0)==0;if(!$106){_quantize_lines_xrpow($accumulate$3$i$lcssa,$3,$acc_xp$4$i$lcssa,$acc_iData$4$i$lcssa)}}else if((label|0)==34){$115=($accumulate$4$i$lcssa|0)==0;if(!$115){_quantize_lines_xrpow($accumulate$4$i$lcssa,$3,$acc_xp$5$i$lcssa,$acc_iData$5$i$lcssa)}$116=($accumulate01$4$i$lcssa|0)==0;if(!$116){$i$02$i4$i=0;while(1){$117=$acc_xp$5$i$lcssa+($i$02$i4$i<<2)|0;$118=+HEAPF32[$117>>2];$119=$i$02$i4$i|1;$120=$acc_xp$5$i$lcssa+($119<<2)|0;$121=+HEAPF32[$120>>2];$not$$i5$i=!($17>$118);$122=$not$$i5$i&1;$not$1$i6$i=!($17>$121);$123=$not$1$i6$i&1;$124=$acc_iData$5$i$lcssa+($i$02$i4$i<<2)|0;HEAP32[$124>>2]=$122;$125=$acc_iData$5$i$lcssa+($119<<2)|0;HEAP32[$125>>2]=$123;$126=$i$02$i4$i+2|0;$127=$126>>>0<$accumulate01$4$i$lcssa>>>0;if($127){$i$02$i4$i=$126}else{break}}}}$128=$gfc+85096|0;$129=HEAP32[$128>>2]|0;$130=$129&2;$131=($130|0)==0;if(!$131){$132=HEAP32[$0>>2]|0;$133=HEAP32[$16>>2]|0;$134=$133+$132|0;$135=79704+($134<<2)|0;$136=+HEAPF32[$135>>2];$137=$136;$138=0.63452168224243899/$137;$139=$138;$140=$gi+4860|0;$141=HEAP32[$140>>2]|0;$142=($141|0)>0;if($142){$162=$141;$j$03=0;$sfb$04=0;while(1){$143=($gi+4872|0)+($sfb$04<<2)|0;$144=HEAP32[$143>>2]|0;$145=($gfc+84936|0)+($sfb$04<<2)|0;$146=HEAP32[$145>>2]|0;$147=($146|0)!=0;$148=$144+$j$03|0;$149=($144|0)>0;$or$cond=$147&$149;if($or$cond){$k$02=$j$03;while(1){$150=$xr+($k$02<<2)|0;$151=+HEAPF32[$150>>2];$152=!($151>=$139);$$pre7=($gi+2304|0)+($k$02<<2)|0;if($152){$154=0}else{$153=HEAP32[$$pre7>>2]|0;$154=$153}HEAP32[$$pre7>>2]=$154;$155=$k$02+1|0;$156=($155|0)<($148|0);if($156){$k$02=$155}else{break}}$$pre$pre=HEAP32[$140>>2]|0;$159=$$pre$pre}else{$159=$162}$157=$sfb$04+1|0;$158=($157|0)<($159|0);if($158){$162=$159;$j$03=$148;$sfb$04=$157}else{break}}}}$160=_noquant_count_bits($gfc,$gi,$prev_noise)|0;$$0=$160;return $$0|0}function _best_scalefac_store($gfc,$gr,$ch,$l3_side){$gfc=$gfc|0;$gr=$gr|0;$ch=$ch|0;$l3_side=$l3_side|0;var $$pre=0,$$pre$i=0,$$pre42=0,$$pre43=0,$$s$0=0,$$s$0$lcssa=0,$$s1$0$1$i=0,$$s1$0$10$i=0,$$s1$0$2$i=0,$$s1$0$3$i=0,$$s1$0$4$i=0,$$s1$0$5$i=0,$$s1$0$6$i=0,$$s1$0$7$i=0,$$s1$0$8$i=0,$$s1$0$9$i=0,$$s1$0$i=0,$$s2$0$i=0,$$s2$0$i$1=0,$$s2$0$i$2=0;var $$s2$0$i$3=0,$$s2$0$i$4=0,$$s2$0$i$5=0,$$s2$0$i$6=0,$$s2$0$i$7=0,$$s2$0$i$8=0,$$s2$0$i$9=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0;var $11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0;var $128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0;var $146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0;var $164=0,$165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0;var $182=0,$183=0,$184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0;var $20=0,$200=0,$201=0,$202=0,$203=0,$204=0,$205=0,$206=0,$207=0,$208=0,$209=0,$21=0,$210=0,$211=0,$212=0,$213=0,$214=0,$215=0,$216=0,$217=0;var $218=0,$219=0,$22=0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0,$231=0,$232=0,$233=0,$234=0,$235=0;var $236=0,$237=0,$238=0,$239=0,$24=0,$240=0,$241=0,$242=0,$243=0,$244=0,$245=0,$246=0,$247=0,$248=0,$249=0,$25=0,$250=0,$251=0,$252=0,$253=0;var $254=0,$255=0,$256=0,$257=0,$258=0,$259=0,$26=0,$260=0,$261=0,$262=0,$263=0,$264=0,$265=0,$266=0,$267=0,$268=0,$269=0,$27=0,$270=0,$271=0;var $272=0,$273=0,$274=0,$275=0,$276=0,$277=0,$278=0,$279=0,$28=0,$280=0,$281=0,$282=0,$283=0,$284=0,$285=0,$286=0,$287=0,$288=0,$289=0,$29=0;var $290=0,$291=0,$292=0,$293=0,$294=0,$295=0,$296=0,$297=0,$298=0,$299=0,$3=0,$30=0,$300=0,$301=0,$302=0,$303=0,$304=0,$305=0,$306=0,$307=0;var $308=0,$309=0,$31=0,$310=0,$311=0,$312=0,$313=0,$314=0,$315=0,$316=0,$317=0,$318=0,$319=0,$32=0,$320=0,$321=0,$33=0,$34=0,$35=0,$36=0;var $37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0;var $55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0;var $73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0;var $91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$c1$1$1$i=0,$c1$1$10$i=0,$c1$1$2$i=0,$c1$1$3$i=0,$c1$1$4$i=0,$c1$1$5$i=0,$c1$1$6$i=0,$c1$1$7$i=0,$c1$1$8$i=0,$c1$1$9$i=0,$c1$1$i=0;var $c2$1$i=0,$c2$1$i$1=0,$c2$1$i$2=0,$c2$1$i$3=0,$c2$1$i$4=0,$c2$1$i$5=0,$c2$1$i$6=0,$c2$1$i$7=0,$c2$1$i$8=0,$c2$1$i$9=0,$exitcond$i=0,$i$14$i=0,$j$027=0,$l$0$lcssa=0,$l$020=0,$or$cond=0,$or$cond$i=0,$or$cond$i$1=0,$or$cond$i$2=0,$or$cond$i$3=0;var $or$cond3=0,$or$cond4=0,$or$cond4$1=0,$or$cond4$2=0,$or$cond4$3=0,$or$cond4$4=0,$or$cond4$5=0,$or$cond4$6=0,$or$cond4$7=0,$or$cond4$8=0,$or$cond4$9=0,$recalc$0$lcssa=0,$recalc$028=0,$recalc$1=0,$recalc$2=0,$recalc$3=0,$recalc$4=0,$s$017=0,$s1$1$1$i=0,$s1$1$10$i=0;var $s1$1$2$i=0,$s1$1$3$i=0,$s1$1$4$i=0,$s1$1$5$i=0,$s1$1$6$i=0,$s1$1$7$i=0,$s1$1$8$i=0,$s1$1$9$i=0,$s1$1$i=0,$s2$1$i=0,$s2$1$i$1=0,$s2$1$i$2=0,$s2$1$i$3=0,$s2$1$i$4=0,$s2$1$i$5=0,$s2$1$i$6=0,$s2$1$i$7=0,$s2$1$i$8=0,$s2$1$i$9=0,$scevgep=0;var $scevgep38=0,$scevgep38$1=0,$scevgep38$2=0,$scevgep38$3=0,$scevgep40=0,$sfb$0$lcssa$i=0,$sfb$0$lcssa$i$1=0,$sfb$0$lcssa$i$2=0,$sfb$0$lcssa$i$3=0,$sfb$012$i=0,$sfb$012$i$1=0,$sfb$012$i$2=0,$sfb$012$i$3=0,$sfb$029=0,$sfb$116=0,$sfb$213=0,$sfb$59=0,label=0,sp=0;sp=STACKTOP;$0=($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0;$1=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4860|0;$2=HEAP32[$1>>2]|0;$3=($2|0)>0;if($3){$319=$2;$j$027=0;$recalc$028=0;$sfb$029=0;while(1){$4=((($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4872|0)+($sfb$029<<2)|0;$5=HEAP32[$4>>2]|0;$6=$5+$j$027|0;$7=($5|0)>0;L4:do{if($7){$l$020=$j$027;while(1){$8=((($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+2304|0)+($l$020<<2)|0;$9=HEAP32[$8>>2]|0;$10=($9|0)==0;if(!$10){$l$0$lcssa=$l$020;break L4}$11=$l$020+1|0;$12=($11|0)<($6|0);if($12){$l$020=$11}else{$l$0$lcssa=$11;break}}}else{$l$0$lcssa=$j$027}}while(0);$13=($l$0$lcssa|0)==($6|0);if($13){$14=((($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4608|0)+($sfb$029<<2)|0;HEAP32[$14>>2]=-2;$$pre=HEAP32[$1>>2]|0;$17=$$pre;$recalc$1=-2}else{$17=$319;$recalc$1=$recalc$028}$15=$sfb$029+1|0;$16=($15|0)<($17|0);if($16){$319=$17;$j$027=$6;$recalc$028=$recalc$1;$sfb$029=$15}else{$24=$17;$recalc$0$lcssa=$recalc$1;break}}}else{$24=$2;$recalc$0$lcssa=0}$18=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4836|0;$19=HEAP32[$18>>2]|0;$20=($19|0)==0;$21=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4832|0;if($20){$22=HEAP32[$21>>2]|0;$23=($22|0)==0;if($23){$25=($24|0)>0;if($25){$s$017=0;$sfb$116=0;while(1){$26=((($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4608|0)+($sfb$116<<2)|0;$27=HEAP32[$26>>2]|0;$28=($27|0)>0;$29=$28?$27:0;$$s$0=$29|$s$017;$30=$sfb$116+1|0;$31=($30|0)<($24|0);if($31){$s$017=$$s$0;$sfb$116=$30}else{$$s$0$lcssa=$$s$0;break}}$32=$$s$0$lcssa&1;$33=($32|0)==0;$34=($$s$0$lcssa|0)!=0;$or$cond=$34&$33;if($or$cond){if($25){$320=$24;$sfb$213=0;while(1){$35=((($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4608|0)+($sfb$213<<2)|0;$36=HEAP32[$35>>2]|0;$37=($36|0)>0;if($37){$38=$36>>1;HEAP32[$35>>2]=$38;$$pre42=HEAP32[$1>>2]|0;$41=$$pre42}else{$41=$320}$39=$sfb$213+1|0;$40=($39|0)<($41|0);if($40){$320=$41;$sfb$213=$39}else{break}}}HEAP32[$18>>2]=1;$recalc$2=1}else{$recalc$2=$recalc$0$lcssa}}else{$recalc$2=$recalc$0$lcssa}}else{$recalc$2=$recalc$0$lcssa}}else{$recalc$2=$recalc$0$lcssa}$42=HEAP32[$21>>2]|0;$43=($42|0)==0;if($43){$44=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4788|0;$45=HEAP32[$44>>2]|0;$46=($45|0)==2;if($46){$recalc$3=$recalc$2}else{$47=$gfc+76|0;$48=HEAP32[$47>>2]|0;$49=($48|0)==2;if($49){$50=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4652|0;$51=HEAP32[$50>>2]|0;$52=HEAP32[12156>>2]|0;$53=($51|0)>=($52|0);$54=($51|0)==-2;$or$cond4=$54|$53;if($or$cond4){$55=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4656|0;$56=HEAP32[$55>>2]|0;$57=HEAP32[12160>>2]|0;$58=($56|0)>=($57|0);$59=($56|0)==-2;$or$cond4$1=$59|$58;if($or$cond4$1){$267=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4660|0;$263=HEAP32[$267>>2]|0;$266=HEAP32[12164>>2]|0;$303=($263|0)>=($266|0);$304=($263|0)==-2;$or$cond4$2=$304|$303;if($or$cond4$2){$272=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4664|0;$268=HEAP32[$272>>2]|0;$271=HEAP32[12168>>2]|0;$305=($268|0)>=($271|0);$306=($268|0)==-2;$or$cond4$3=$306|$305;if($or$cond4$3){$277=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4668|0;$273=HEAP32[$277>>2]|0;$276=HEAP32[12172>>2]|0;$307=($273|0)>=($276|0);$308=($273|0)==-2;$or$cond4$4=$308|$307;if($or$cond4$4){$282=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4672|0;$278=HEAP32[$282>>2]|0;$281=HEAP32[12176>>2]|0;$309=($278|0)>=($281|0);$310=($278|0)==-2;$or$cond4$5=$310|$309;if($or$cond4$5){$287=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4676|0;$283=HEAP32[$287>>2]|0;$286=HEAP32[12180>>2]|0;$311=($283|0)>=($286|0);$312=($283|0)==-2;$or$cond4$6=$312|$311;if($or$cond4$6){$292=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4680|0;$288=HEAP32[$292>>2]|0;$291=HEAP32[12184>>2]|0;$313=($288|0)>=($291|0);$314=($288|0)==-2;$or$cond4$7=$314|$313;if($or$cond4$7){$297=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4684|0;$293=HEAP32[$297>>2]|0;$296=HEAP32[12188>>2]|0;$315=($293|0)>=($296|0);$316=($293|0)==-2;$or$cond4$8=$316|$315;if($or$cond4$8){$302=(($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4688|0;$298=HEAP32[$302>>2]|0;$301=HEAP32[12192>>2]|0;$317=($298|0)>=($301|0);$318=($298|0)==-2;$or$cond4$9=$318|$317;if($or$cond4$9){$60=($51|0)>0;if($60){$61=$51-$52|0;HEAP32[$50>>2]=$61}$62=($56|0)>0;if($62){$262=$56-$57|0;HEAP32[$55>>2]=$262}$264=($263|0)>0;if($264){$265=$263-$266|0;HEAP32[$267>>2]=$265}$269=($268|0)>0;if($269){$270=$268-$271|0;HEAP32[$272>>2]=$270}$274=($273|0)>0;if($274){$275=$273-$276|0;HEAP32[$277>>2]=$275}$279=($278|0)>0;if($279){$280=$278-$281|0;HEAP32[$282>>2]=$280}$284=($283|0)>0;if($284){$285=$283-$286|0;HEAP32[$287>>2]=$285}$289=($288|0)>0;if($289){$290=$288-$291|0;HEAP32[$292>>2]=$290}$294=($293|0)>0;if($294){$295=$293-$296|0;HEAP32[$297>>2]=$295}$299=($298|0)>0;if($299){$300=$298-$301|0;HEAP32[$302>>2]=$300}HEAP32[$21>>2]=1;$recalc$3=1}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}else{$recalc$3=$recalc$2}}}else{$recalc$3=$recalc$2}$63=$ch<<2;$64=$63+4|0;$scevgep40=($l3_side+21008|0)+($64<<2)|0;HEAP32[$scevgep40>>2]=0|0;HEAP32[$scevgep40+4>>2]=0|0;HEAP32[$scevgep40+8>>2]=0|0;HEAP32[$scevgep40+12>>2]=0|0;$65=$gfc+76|0;$66=HEAP32[$65>>2]|0;$67=($66|0)==2;$68=($gr|0)==1;$or$cond3=$68&$67;if($or$cond3){$69=($l3_side+($ch*5252|0)|0)+4788|0;$70=HEAP32[$69>>2]|0;$71=($70|0)==2;if($71){$recalc$4=$recalc$3}else{$72=(($l3_side+10504|0)+($ch*5252|0)|0)+4788|0;$73=HEAP32[$72>>2]|0;$74=($73|0)==2;if($74){$recalc$4=$recalc$3}else{$$pre$i=HEAP32[84136>>2]|0;$scevgep=(($l3_side+10504|0)+($ch*5252|0)|0)+4608|0;$75=HEAP32[84140>>2]|0;$76=($75|0)>($$pre$i|0);L77:do{if($76){$sfb$012$i=$$pre$i;while(1){$77=(($l3_side+($ch*5252|0)|0)+4608|0)+($sfb$012$i<<2)|0;$78=HEAP32[$77>>2]|0;$79=((($l3_side+10504|0)+($ch*5252|0)|0)+4608|0)+($sfb$012$i<<2)|0;$80=HEAP32[$79>>2]|0;$81=($78|0)!=($80|0);$82=($80|0)>-1;$or$cond$i=$81&$82;if($or$cond$i){$sfb$0$lcssa$i=$sfb$012$i;break L77}$83=$sfb$012$i+1|0;$84=($83|0)<($75|0);if($84){$sfb$012$i=$83}else{$sfb$0$lcssa$i=$83;break}}}else{$sfb$0$lcssa$i=$$pre$i}}while(0);$85=($sfb$0$lcssa$i|0)==($75|0);if($85){if($76){$scevgep38=((($l3_side+10504|0)+($ch*5252|0)|0)+4608|0)+($$pre$i<<2)|0;$88=$75-$$pre$i|0;$89=$88<<2;_memset($scevgep38|0,-1,$89|0)|0}$90=($l3_side+21024|0)+($ch<<4)|0;HEAP32[$90>>2]=1}$86=HEAP32[84144>>2]|0;$87=($86|0)>($75|0);L88:do{if($87){$sfb$012$i$1=$75;while(1){$216=(($l3_side+($ch*5252|0)|0)+4608|0)+($sfb$012$i$1<<2)|0;$217=HEAP32[$216>>2]|0;$218=((($l3_side+10504|0)+($ch*5252|0)|0)+4608|0)+($sfb$012$i$1<<2)|0;$219=HEAP32[$218>>2]|0;$220=($217|0)!=($219|0);$221=($219|0)>-1;$or$cond$i$1=$220&$221;if($or$cond$i$1){$sfb$0$lcssa$i$1=$sfb$012$i$1;break L88}$222=$sfb$012$i$1+1|0;$223=($222|0)<($86|0);if($223){$sfb$012$i$1=$222}else{$sfb$0$lcssa$i$1=$222;break}}}else{$sfb$0$lcssa$i$1=$75}}while(0);$224=($sfb$0$lcssa$i$1|0)==($86|0);if($224){if($87){$scevgep38$1=((($l3_side+10504|0)+($ch*5252|0)|0)+4608|0)+($75<<2)|0;$225=$86-$75|0;$226=$225<<2;_memset($scevgep38$1|0,-1,$226|0)|0}$227=(($l3_side+21024|0)+($ch<<4)|0)+4|0;HEAP32[$227>>2]=1}$228=HEAP32[84148>>2]|0;$229=($228|0)>($86|0);L99:do{if($229){$sfb$012$i$2=$86;while(1){$230=(($l3_side+($ch*5252|0)|0)+4608|0)+($sfb$012$i$2<<2)|0;$231=HEAP32[$230>>2]|0;$232=((($l3_side+10504|0)+($ch*5252|0)|0)+4608|0)+($sfb$012$i$2<<2)|0;$233=HEAP32[$232>>2]|0;$234=($231|0)!=($233|0);$235=($233|0)>-1;$or$cond$i$2=$234&$235;if($or$cond$i$2){$sfb$0$lcssa$i$2=$sfb$012$i$2;break L99}$236=$sfb$012$i$2+1|0;$237=($236|0)<($228|0);if($237){$sfb$012$i$2=$236}else{$sfb$0$lcssa$i$2=$236;break}}}else{$sfb$0$lcssa$i$2=$86}}while(0);$238=($sfb$0$lcssa$i$2|0)==($228|0);if($238){if($229){$scevgep38$2=((($l3_side+10504|0)+($ch*5252|0)|0)+4608|0)+($86<<2)|0;$239=$228-$86|0;$240=$239<<2;_memset($scevgep38$2|0,-1,$240|0)|0}$241=(($l3_side+21024|0)+($ch<<4)|0)+8|0;HEAP32[$241>>2]=1}$242=HEAP32[84152>>2]|0;$243=($242|0)>($228|0);L110:do{if($243){$sfb$012$i$3=$228;while(1){$244=(($l3_side+($ch*5252|0)|0)+4608|0)+($sfb$012$i$3<<2)|0;$245=HEAP32[$244>>2]|0;$246=((($l3_side+10504|0)+($ch*5252|0)|0)+4608|0)+($sfb$012$i$3<<2)|0;$247=HEAP32[$246>>2]|0;$248=($245|0)!=($247|0);$249=($247|0)>-1;$or$cond$i$3=$248&$249;if($or$cond$i$3){$sfb$0$lcssa$i$3=$sfb$012$i$3;break L110}$250=$sfb$012$i$3+1|0;$251=($250|0)<($242|0);if($251){$sfb$012$i$3=$250}else{$sfb$0$lcssa$i$3=$250;break}}}else{$sfb$0$lcssa$i$3=$228}}while(0);$252=($sfb$0$lcssa$i$3|0)==($242|0);if($252){if($243){$scevgep38$3=((($l3_side+10504|0)+($ch*5252|0)|0)+4608|0)+($228<<2)|0;$253=$242-$228|0;$254=$253<<2;_memset($scevgep38$3|0,-1,$254|0)|0}$255=(($l3_side+21024|0)+($ch<<4)|0)+12|0;HEAP32[$255>>2]=1}$256=HEAP32[$scevgep>>2]|0;$257=($256|0)==-1;$258=($256|0)>0;$$s1$0$i=$258?$256:0;$259=$257&1;$c1$1$i=$259^1;$s1$1$i=$257?0:$$s1$0$i;$260=(($l3_side+10504|0)+($ch*5252|0)|0)+4612|0;$119=HEAP32[$260>>2]|0;$261=($119|0)==-1;if($261){$c1$1$1$i=$c1$1$i;$s1$1$1$i=$s1$1$i}else{$117=$c1$1$i+1|0;$118=($s1$1$i|0)<($119|0);$$s1$0$1$i=$118?$119:$s1$1$i;$c1$1$1$i=$117;$s1$1$1$i=$$s1$0$1$i}$120=(($l3_side+10504|0)+($ch*5252|0)|0)+4616|0;$121=HEAP32[$120>>2]|0;$122=($121|0)==-1;if($122){$c1$1$2$i=$c1$1$1$i;$s1$1$2$i=$s1$1$1$i}else{$123=$c1$1$1$i+1|0;$124=($s1$1$1$i|0)<($121|0);$$s1$0$2$i=$124?$121:$s1$1$1$i;$c1$1$2$i=$123;$s1$1$2$i=$$s1$0$2$i}$125=(($l3_side+10504|0)+($ch*5252|0)|0)+4620|0;$126=HEAP32[$125>>2]|0;$127=($126|0)==-1;if($127){$c1$1$3$i=$c1$1$2$i;$s1$1$3$i=$s1$1$2$i}else{$128=$c1$1$2$i+1|0;$129=($s1$1$2$i|0)<($126|0);$$s1$0$3$i=$129?$126:$s1$1$2$i;$c1$1$3$i=$128;$s1$1$3$i=$$s1$0$3$i}$130=(($l3_side+10504|0)+($ch*5252|0)|0)+4624|0;$131=HEAP32[$130>>2]|0;$132=($131|0)==-1;if($132){$c1$1$4$i=$c1$1$3$i;$s1$1$4$i=$s1$1$3$i}else{$133=$c1$1$3$i+1|0;$134=($s1$1$3$i|0)<($131|0);$$s1$0$4$i=$134?$131:$s1$1$3$i;$c1$1$4$i=$133;$s1$1$4$i=$$s1$0$4$i}$135=(($l3_side+10504|0)+($ch*5252|0)|0)+4628|0;$136=HEAP32[$135>>2]|0;$137=($136|0)==-1;if($137){$c1$1$5$i=$c1$1$4$i;$s1$1$5$i=$s1$1$4$i}else{$138=$c1$1$4$i+1|0;$139=($s1$1$4$i|0)<($136|0);$$s1$0$5$i=$139?$136:$s1$1$4$i;$c1$1$5$i=$138;$s1$1$5$i=$$s1$0$5$i}$140=(($l3_side+10504|0)+($ch*5252|0)|0)+4632|0;$141=HEAP32[$140>>2]|0;$142=($141|0)==-1;if($142){$c1$1$6$i=$c1$1$5$i;$s1$1$6$i=$s1$1$5$i}else{$143=$c1$1$5$i+1|0;$144=($s1$1$5$i|0)<($141|0);$$s1$0$6$i=$144?$141:$s1$1$5$i;$c1$1$6$i=$143;$s1$1$6$i=$$s1$0$6$i}$145=(($l3_side+10504|0)+($ch*5252|0)|0)+4636|0;$146=HEAP32[$145>>2]|0;$147=($146|0)==-1;if($147){$c1$1$7$i=$c1$1$6$i;$s1$1$7$i=$s1$1$6$i}else{$148=$c1$1$6$i+1|0;$149=($s1$1$6$i|0)<($146|0);$$s1$0$7$i=$149?$146:$s1$1$6$i;$c1$1$7$i=$148;$s1$1$7$i=$$s1$0$7$i}$150=(($l3_side+10504|0)+($ch*5252|0)|0)+4640|0;$151=HEAP32[$150>>2]|0;$152=($151|0)==-1;if($152){$c1$1$8$i=$c1$1$7$i;$s1$1$8$i=$s1$1$7$i}else{$153=$c1$1$7$i+1|0;$154=($s1$1$7$i|0)<($151|0);$$s1$0$8$i=$154?$151:$s1$1$7$i;$c1$1$8$i=$153;$s1$1$8$i=$$s1$0$8$i}$155=(($l3_side+10504|0)+($ch*5252|0)|0)+4644|0;$156=HEAP32[$155>>2]|0;$157=($156|0)==-1;if($157){$c1$1$9$i=$c1$1$8$i;$s1$1$9$i=$s1$1$8$i}else{$158=$c1$1$8$i+1|0;$159=($s1$1$8$i|0)<($156|0);$$s1$0$9$i=$159?$156:$s1$1$8$i;$c1$1$9$i=$158;$s1$1$9$i=$$s1$0$9$i}$160=(($l3_side+10504|0)+($ch*5252|0)|0)+4648|0;$161=HEAP32[$160>>2]|0;$162=($161|0)==-1;if($162){$c1$1$10$i=$c1$1$9$i;$s1$1$10$i=$s1$1$9$i}else{$163=$c1$1$9$i+1|0;$164=($s1$1$9$i|0)<($161|0);$$s1$0$10$i=$164?$161:$s1$1$9$i;$c1$1$10$i=$163;$s1$1$10$i=$$s1$0$10$i}$91=(($l3_side+10504|0)+($ch*5252|0)|0)+4652|0;$92=HEAP32[$91>>2]|0;$93=($92|0)==-1;$94=($92|0)>0;$$s2$0$i=$94?$92:0;$95=$93&1;$c2$1$i=$95^1;$s2$1$i=$93?0:$$s2$0$i;$96=(($l3_side+10504|0)+($ch*5252|0)|0)+4656|0;$97=HEAP32[$96>>2]|0;$98=($97|0)==-1;if($98){$c2$1$i$1=$c2$1$i;$s2$1$i$1=$s2$1$i}else{$174=$c2$1$i+1|0;$175=($s2$1$i|0)<($97|0);$$s2$0$i$1=$175?$97:$s2$1$i;$c2$1$i$1=$174;$s2$1$i$1=$$s2$0$i$1}$176=(($l3_side+10504|0)+($ch*5252|0)|0)+4660|0;$177=HEAP32[$176>>2]|0;$178=($177|0)==-1;if($178){$c2$1$i$2=$c2$1$i$1;$s2$1$i$2=$s2$1$i$1}else{$179=$c2$1$i$1+1|0;$180=($s2$1$i$1|0)<($177|0);$$s2$0$i$2=$180?$177:$s2$1$i$1;$c2$1$i$2=$179;$s2$1$i$2=$$s2$0$i$2}$181=(($l3_side+10504|0)+($ch*5252|0)|0)+4664|0;$182=HEAP32[$181>>2]|0;$183=($182|0)==-1;if($183){$c2$1$i$3=$c2$1$i$2;$s2$1$i$3=$s2$1$i$2}else{$184=$c2$1$i$2+1|0;$185=($s2$1$i$2|0)<($182|0);$$s2$0$i$3=$185?$182:$s2$1$i$2;$c2$1$i$3=$184;$s2$1$i$3=$$s2$0$i$3}$186=(($l3_side+10504|0)+($ch*5252|0)|0)+4668|0;$187=HEAP32[$186>>2]|0;$188=($187|0)==-1;if($188){$c2$1$i$4=$c2$1$i$3;$s2$1$i$4=$s2$1$i$3}else{$189=$c2$1$i$3+1|0;$190=($s2$1$i$3|0)<($187|0);$$s2$0$i$4=$190?$187:$s2$1$i$3;$c2$1$i$4=$189;$s2$1$i$4=$$s2$0$i$4}$191=(($l3_side+10504|0)+($ch*5252|0)|0)+4672|0;$192=HEAP32[$191>>2]|0;$193=($192|0)==-1;if($193){$c2$1$i$5=$c2$1$i$4;$s2$1$i$5=$s2$1$i$4}else{$194=$c2$1$i$4+1|0;$195=($s2$1$i$4|0)<($192|0);$$s2$0$i$5=$195?$192:$s2$1$i$4;$c2$1$i$5=$194;$s2$1$i$5=$$s2$0$i$5}$196=(($l3_side+10504|0)+($ch*5252|0)|0)+4676|0;$197=HEAP32[$196>>2]|0;$198=($197|0)==-1;if($198){$c2$1$i$6=$c2$1$i$5;$s2$1$i$6=$s2$1$i$5}else{$199=$c2$1$i$5+1|0;$200=($s2$1$i$5|0)<($197|0);$$s2$0$i$6=$200?$197:$s2$1$i$5;$c2$1$i$6=$199;$s2$1$i$6=$$s2$0$i$6}$201=(($l3_side+10504|0)+($ch*5252|0)|0)+4680|0;$202=HEAP32[$201>>2]|0;$203=($202|0)==-1;if($203){$c2$1$i$7=$c2$1$i$6;$s2$1$i$7=$s2$1$i$6}else{$204=$c2$1$i$6+1|0;$205=($s2$1$i$6|0)<($202|0);$$s2$0$i$7=$205?$202:$s2$1$i$6;$c2$1$i$7=$204;$s2$1$i$7=$$s2$0$i$7}$206=(($l3_side+10504|0)+($ch*5252|0)|0)+4684|0;$207=HEAP32[$206>>2]|0;$208=($207|0)==-1;if($208){$c2$1$i$8=$c2$1$i$7;$s2$1$i$8=$s2$1$i$7}else{$209=$c2$1$i$7+1|0;$210=($s2$1$i$7|0)<($207|0);$$s2$0$i$8=$210?$207:$s2$1$i$7;$c2$1$i$8=$209;$s2$1$i$8=$$s2$0$i$8}$211=(($l3_side+10504|0)+($ch*5252|0)|0)+4688|0;$212=HEAP32[$211>>2]|0;$213=($212|0)==-1;if($213){$c2$1$i$9=$c2$1$i$8;$s2$1$i$9=$s2$1$i$8}else{$214=$c2$1$i$8+1|0;$215=($s2$1$i$8|0)<($212|0);$$s2$0$i$9=$215?$212:$s2$1$i$8;$c2$1$i$9=$214;$s2$1$i$9=$$s2$0$i$9}$113=(($l3_side+10504|0)+($ch*5252|0)|0)+4844|0;$115=(($l3_side+10504|0)+($ch*5252|0)|0)+4784|0;$i$14$i=0;while(1){$99=88776+($i$14$i<<2)|0;$100=HEAP32[$99>>2]|0;$101=($s1$1$10$i|0)<($100|0);do{if($101){$102=88840+($i$14$i<<2)|0;$103=HEAP32[$102>>2]|0;$104=($s2$1$i$9|0)<($103|0);if(!$104){break}$105=88648+($i$14$i<<2)|0;$106=HEAP32[$105>>2]|0;$107=Math_imul($106,$c1$1$10$i)|0;$108=88712+($i$14$i<<2)|0;$109=HEAP32[$108>>2]|0;$110=Math_imul($109,$c2$1$i$9)|0;$111=$110+$107|0;$112=HEAP32[$113>>2]|0;$114=($112|0)>($111|0);if(!$114){break}HEAP32[$113>>2]=$111;HEAP32[$115>>2]=$i$14$i}}while(0);$116=$i$14$i+1|0;$exitcond$i=($116|0)==16;if($exitcond$i){$recalc$4=0;break}else{$i$14$i=$116}}}}}else{$recalc$4=$recalc$3}$165=HEAP32[$1>>2]|0;$166=($165|0)>0;if($166){$321=$165;$sfb$59=0;while(1){$167=((($l3_side+($gr*10504|0)|0)+($ch*5252|0)|0)+4608|0)+($sfb$59<<2)|0;$168=HEAP32[$167>>2]|0;$169=($168|0)==-2;if($169){HEAP32[$167>>2]=0;$$pre43=HEAP32[$1>>2]|0;$172=$$pre43}else{$172=$321}$170=$sfb$59+1|0;$171=($170|0)<($172|0);if($171){$321=$172;$sfb$59=$170}else{break}}}$173=($recalc$4|0)==0;if($173){return}_scale_bitcount($gfc,$0)|0;return}function _scale_bitcount($gfc,$cod_info){$gfc=$gfc|0;$cod_info=$cod_info|0;var $$$i=0,$$$i1=0,$$0=0,$$lcssa=0,$$lcssa30=0,$$lcssa31=0,$$max_slen1$0$i=0,$$max_slen1$0$i$lcssa=0,$$max_slen2$0$i=0,$$over$0$1$i=0,$$over$0$2$i=0,$$over$0$3$i=0,$$phi$trans$insert29$i=0,$$phi$trans$insert31$i=0,$$phi$trans$insert33$i=0,$$pre$i=0,$$pre28$i=0,$$pre30$i=0,$$pre32$i=0,$$pre34$i=0;var $$sink$i=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0;var $115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0;var $133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0;var $151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0,$164=0,$165=0,$166=0,$167=0,$168=0,$169=0;var $17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0,$184=0,$185=0,$186=0,$187=0;var $188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0,$201=0,$202=0,$203=0,$204=0;var $205=0,$206=0,$207=0,$208=0,$209=0,$21=0,$210=0,$211=0,$212=0,$213=0,$214=0,$215=0,$216=0,$217=0,$218=0,$219=0,$22=0,$220=0,$221=0,$222=0;var $223=0,$224=0,$225=0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0,$231=0,$232=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0;var $32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0;var $50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0;var $69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0;var $87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$exitcond=0,$exitcond$i=0,$exitcond$i6=0,$exitcond16=0,$exitcond23$1$i=0,$exitcond23$2$i=0;var $exitcond23$3$i=0,$exitcond23$i=0,$i$19$i=0,$i$213$1$i=0,$i$213$2$i=0,$i$213$3$i=0,$k$04$i=0,$max_sfac$i=0,$max_slen1$0$lcssa$i=0,$max_slen1$08$i=0,$max_slen2$0$lcssa$i=0,$max_slen2$06$i=0,$partition$012$i=0,$row_in_table$0$i=0,$sfb$011$i=0,$sfb$1$lcssa$i=0,$sfb$110$i=0,$sfb$2$lcssa$i=0,$sfb$27$i=0,$sfb$3$lcssa$1$i=0;var $sfb$3$lcssa$2$i=0,$sfb$3$lcssa$i=0,$sfb$314$1$i=0,$sfb$314$2$i=0,$sfb$314$3$i=0,$sfb$314$i=0,$sfb$35$i=0,$smax$i=0,$smax$i3=0,$tab$0$i=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$max_sfac$i=sp;$0=$gfc+76|0;$1=HEAP32[$0>>2]|0;$2=($1|0)==2;if($2){$3=$cod_info+4788|0;$4=HEAP32[$3>>2]|0;$5=($4|0)==2;if($5){$6=$cod_info+4792|0;$7=HEAP32[$6>>2]|0;$8=($7|0)!=0;$$$i=$8?88904:88968;$tab$0$i=$$$i}else{$9=$cod_info+4832|0;$10=HEAP32[$9>>2]|0;$11=($10|0)==0;if($11){$12=$cod_info+4652|0;$13=HEAP32[$12>>2]|0;$14=HEAP32[12156>>2]|0;$15=($13|0)<($14|0);if($15){$tab$0$i=89032}else{$16=$cod_info+4656|0;$17=HEAP32[$16>>2]|0;$18=HEAP32[12160>>2]|0;$19=($17|0)<($18|0);if($19){$tab$0$i=89032}else{$25=$cod_info+4660|0;$24=HEAP32[$25>>2]|0;$23=HEAP32[12164>>2]|0;$82=($24|0)<($23|0);if($82){$tab$0$i=89032}else{$29=$cod_info+4664|0;$28=HEAP32[$29>>2]|0;$27=HEAP32[12168>>2]|0;$83=($28|0)<($27|0);if($83){$tab$0$i=89032}else{$33=$cod_info+4668|0;$32=HEAP32[$33>>2]|0;$31=HEAP32[12172>>2]|0;$84=($32|0)<($31|0);if($84){$tab$0$i=89032}else{$37=$cod_info+4672|0;$36=HEAP32[$37>>2]|0;$35=HEAP32[12176>>2]|0;$85=($36|0)<($35|0);if($85){$tab$0$i=89032}else{$41=$cod_info+4676|0;$40=HEAP32[$41>>2]|0;$39=HEAP32[12180>>2]|0;$86=($40|0)<($39|0);if($86){$tab$0$i=89032}else{$45=$cod_info+4680|0;$44=HEAP32[$45>>2]|0;$43=HEAP32[12184>>2]|0;$87=($44|0)<($43|0);if($87){$tab$0$i=89032}else{$49=$cod_info+4684|0;$48=HEAP32[$49>>2]|0;$47=HEAP32[12188>>2]|0;$88=($48|0)<($47|0);if($88){$tab$0$i=89032}else{$53=$cod_info+4688|0;$52=HEAP32[$53>>2]|0;$51=HEAP32[12192>>2]|0;$89=($52|0)<($51|0);if($89){$tab$0$i=89032}else{HEAP32[$9>>2]=1;$20=$13-$14|0;HEAP32[$12>>2]=$20;$21=$17-$18|0;HEAP32[$16>>2]=$21;$22=$24-$23|0;HEAP32[$25>>2]=$22;$26=$28-$27|0;HEAP32[$29>>2]=$26;$30=$32-$31|0;HEAP32[$33>>2]=$30;$34=$36-$35|0;HEAP32[$37>>2]=$34;$38=$40-$39|0;HEAP32[$41>>2]=$38;$42=$44-$43|0;HEAP32[$45>>2]=$42;$46=$48-$47|0;HEAP32[$49>>2]=$46;$50=$52-$51|0;HEAP32[$53>>2]=$50;$tab$0$i=89032}}}}}}}}}}}else{$tab$0$i=89032}}$54=$cod_info+4868|0;$55=HEAP32[$54>>2]|0;$56=($55|0)>0;if($56){$max_slen1$08$i=0;$sfb$27$i=0;while(1){$61=($cod_info+4608|0)+($sfb$27$i<<2)|0;$62=HEAP32[$61>>2]|0;$63=($max_slen1$08$i|0)<($62|0);$$max_slen1$0$i=$63?$62:$max_slen1$08$i;$64=$sfb$27$i+1|0;$exitcond16=($64|0)==($55|0);if($exitcond16){$$max_slen1$0$i$lcssa=$$max_slen1$0$i;break}else{$max_slen1$08$i=$$max_slen1$0$i;$sfb$27$i=$64}}$57=($55|0)>1;$smax$i=$57?$55:1;$max_slen1$0$lcssa$i=$$max_slen1$0$i$lcssa;$sfb$2$lcssa$i=$smax$i}else{$max_slen1$0$lcssa$i=0;$sfb$2$lcssa$i=0}$58=$cod_info+4860|0;$59=HEAP32[$58>>2]|0;$60=($sfb$2$lcssa$i|0)<($59|0);if($60){$max_slen2$06$i=0;$sfb$35$i=$sfb$2$lcssa$i;while(1){$65=($cod_info+4608|0)+($sfb$35$i<<2)|0;$66=HEAP32[$65>>2]|0;$67=($max_slen2$06$i|0)<($66|0);$$max_slen2$0$i=$67?$66:$max_slen2$06$i;$68=$sfb$35$i+1|0;$exitcond=($68|0)==($59|0);if($exitcond){$max_slen2$0$lcssa$i=$$max_slen2$0$i;break}else{$max_slen2$06$i=$$max_slen2$0$i;$sfb$35$i=$68}}}else{$max_slen2$0$lcssa$i=0}$69=$cod_info+4844|0;HEAP32[$69>>2]=100000;$70=$cod_info+4784|0;$79=100000;$k$04$i=0;while(1){$71=88776+($k$04$i<<2)|0;$72=HEAP32[$71>>2]|0;$73=($max_slen1$0$lcssa$i|0)<($72|0);if($73){$74=88840+($k$04$i<<2)|0;$75=HEAP32[$74>>2]|0;$76=($max_slen2$0$lcssa$i|0)<($75|0);if($76){$77=$tab$0$i+($k$04$i<<2)|0;$78=HEAP32[$77>>2]|0;$80=($79|0)>($78|0);if($80){HEAP32[$69>>2]=$78;HEAP32[$70>>2]=$k$04$i;$224=$78}else{$224=$79}}else{$224=$79}}else{$224=$79}$81=$k$04$i+1|0;$exitcond$i=($81|0)==16;if($exitcond$i){$$lcssa=$224;break}else{$79=$224;$k$04$i=$81}}$90=($$lcssa|0)==100000;$91=$90&1;$$0=$91;STACKTOP=sp;return $$0|0}$92=$cod_info+4832|0;$93=HEAP32[$92>>2]|0;$94=($93|0)==0;HEAP32[$max_sfac$i>>2]=0|0;HEAP32[$max_sfac$i+4>>2]=0|0;HEAP32[$max_sfac$i+8>>2]=0|0;HEAP32[$max_sfac$i+12>>2]=0|0;$$$i1=$94?0:2;$95=$cod_info+4788|0;$96=HEAP32[$95>>2]|0;$97=($96|0)==2;if($97){$partition$012$i=0;$sfb$011$i=0;while(1){$101=((11824+($$$i1*48|0)|0)+16|0)+($partition$012$i<<2)|0;$102=HEAP32[$101>>2]|0;$103=($102|0)/3&-1;$104=($102|0)>2;if($104){$105=$max_sfac$i+($partition$012$i<<2)|0;$106=($103|0)>1;$$pre$i=HEAP32[$105>>2]|0;$111=$$pre$i;$i$19$i=0;$sfb$110$i=$sfb$011$i;while(1){$107=$sfb$110$i*3|0;$108=($cod_info+4608|0)+($107<<2)|0;$109=HEAP32[$108>>2]|0;$110=($109|0)>($111|0);if($110){HEAP32[$105>>2]=$109;$116=$109}else{$116=$111}$112=$107+1|0;$113=($cod_info+4608|0)+($112<<2)|0;$114=HEAP32[$113>>2]|0;$115=($114|0)>($116|0);if($115){HEAP32[$105>>2]=$114;$191=$114}else{$191=$116}$187=$107+2|0;$188=($cod_info+4608|0)+($187<<2)|0;$189=HEAP32[$188>>2]|0;$190=($189|0)>($191|0);if($190){HEAP32[$105>>2]=$189;$228=$189}else{$228=$191}$192=$i$19$i+1|0;$193=$sfb$110$i+1|0;$194=($192|0)<($103|0);if($194){$111=$228;$i$19$i=$192;$sfb$110$i=$193}else{break}}$smax$i3=$106?$103:1;$117=$smax$i3+$sfb$011$i|0;$sfb$1$lcssa$i=$117}else{$sfb$1$lcssa$i=$sfb$011$i}$118=$partition$012$i+1|0;$exitcond$i6=($118|0)==4;if($exitcond$i6){break}else{$partition$012$i=$118;$sfb$011$i=$sfb$1$lcssa$i}}$$pre28$i=HEAP32[$max_sfac$i>>2]|0;$$phi$trans$insert29$i=$max_sfac$i+4|0;$$pre30$i=HEAP32[$$phi$trans$insert29$i>>2]|0;$$phi$trans$insert31$i=$max_sfac$i+8|0;$$pre32$i=HEAP32[$$phi$trans$insert31$i>>2]|0;$$phi$trans$insert33$i=$max_sfac$i+12|0;$$pre34$i=HEAP32[$$phi$trans$insert33$i>>2]|0;$129=$$pre28$i;$134=$$pre30$i;$139=$$pre32$i;$144=$$pre34$i;$row_in_table$0$i=1}else{$98=11824+($$$i1*48|0)|0;$99=HEAP32[$98>>2]|0;$100=($99|0)>0;if($100){$122=0;$sfb$314$i=0;while(1){$119=($cod_info+4608|0)+($sfb$314$i<<2)|0;$120=HEAP32[$119>>2]|0;$121=($120|0)>($122|0);if($121){HEAP32[$max_sfac$i>>2]=$120;$226=$120}else{$226=$122}$123=$sfb$314$i+1|0;$exitcond23$i=($123|0)==($99|0);if($exitcond23$i){$225=$226;$sfb$3$lcssa$i=$99;break}else{$122=$226;$sfb$314$i=$123}}}else{$225=0;$sfb$3$lcssa$i=0}$124=(11824+($$$i1*48|0)|0)+4|0;$125=HEAP32[$124>>2]|0;$126=($125|0)>0;if($126){$195=$max_sfac$i+4|0;$199=0;$i$213$1$i=0;$sfb$314$1$i=$sfb$3$lcssa$i;while(1){$196=($cod_info+4608|0)+($sfb$314$1$i<<2)|0;$197=HEAP32[$196>>2]|0;$198=($197|0)>($199|0);if($198){HEAP32[$195>>2]=$197;$229=$197}else{$229=$199}$200=$i$213$1$i+1|0;$201=$sfb$314$1$i+1|0;$exitcond23$1$i=($200|0)==($125|0);if($exitcond23$1$i){$$lcssa31=$229;break}else{$199=$229;$i$213$1$i=$200;$sfb$314$1$i=$201}}$202=$125+$sfb$3$lcssa$i|0;$227=$$lcssa31;$sfb$3$lcssa$1$i=$202}else{$227=0;$sfb$3$lcssa$1$i=$sfb$3$lcssa$i}$203=(11824+($$$i1*48|0)|0)+8|0;$204=HEAP32[$203>>2]|0;$205=($204|0)>0;if($205){$206=$max_sfac$i+8|0;$210=0;$i$213$2$i=0;$sfb$314$2$i=$sfb$3$lcssa$1$i;while(1){$207=($cod_info+4608|0)+($sfb$314$2$i<<2)|0;$208=HEAP32[$207>>2]|0;$209=($208|0)>($210|0);if($209){HEAP32[$206>>2]=$208;$231=$208}else{$231=$210}$211=$i$213$2$i+1|0;$212=$sfb$314$2$i+1|0;$exitcond23$2$i=($211|0)==($204|0);if($exitcond23$2$i){$$lcssa30=$231;break}else{$210=$231;$i$213$2$i=$211;$sfb$314$2$i=$212}}$213=$204+$sfb$3$lcssa$1$i|0;$230=$$lcssa30;$sfb$3$lcssa$2$i=$213}else{$230=0;$sfb$3$lcssa$2$i=$sfb$3$lcssa$1$i}$214=(11824+($$$i1*48|0)|0)+12|0;$215=HEAP32[$214>>2]|0;$216=($215|0)>0;if($216){$217=$max_sfac$i+12|0;$221=0;$i$213$3$i=0;$sfb$314$3$i=$sfb$3$lcssa$2$i;while(1){$218=($cod_info+4608|0)+($sfb$314$3$i<<2)|0;$219=HEAP32[$218>>2]|0;$220=($219|0)>($221|0);if($220){HEAP32[$217>>2]=$219;$232=$219}else{$232=$221}$222=$i$213$3$i+1|0;$223=$sfb$314$3$i+1|0;$exitcond23$3$i=($222|0)==($215|0);if($exitcond23$3$i){$129=$225;$134=$227;$139=$230;$144=$232;$row_in_table$0$i=0;break}else{$221=$232;$i$213$3$i=$222;$sfb$314$3$i=$223}}}else{$129=$225;$134=$227;$139=$230;$144=0;$row_in_table$0$i=0}}$127=89096+($$$i1<<4)|0;$128=HEAP32[$127>>2]|0;$130=($129|0)>($128|0);$131=$130&1;$132=(89096+($$$i1<<4)|0)+4|0;$133=HEAP32[$132>>2]|0;$135=($134|0)>($133|0);$136=$135&1;$$over$0$1$i=$136+$131|0;$137=(89096+($$$i1<<4)|0)+8|0;$138=HEAP32[$137>>2]|0;$140=($139|0)>($138|0);$141=$140&1;$$over$0$2$i=$$over$0$1$i+$141|0;$142=(89096+($$$i1<<4)|0)+12|0;$143=HEAP32[$142>>2]|0;$145=($144|0)>($143|0);$146=$145&1;$$over$0$3$i=$$over$0$2$i+$146|0;$147=($$over$0$3$i|0)==0;if($147){$148=(11824+($$$i1*48|0)|0)+($row_in_table$0$i<<4)|0;$149=$cod_info+5188|0;HEAP32[$149>>2]=$148;$150=89192+($129<<2)|0;$151=HEAP32[$150>>2]|0;$152=$cod_info+5192|0;HEAP32[$152>>2]=$151;$153=89192+($134<<2)|0;$154=HEAP32[$153>>2]|0;$155=$cod_info+5196|0;HEAP32[$155>>2]=$154;$156=89192+($139<<2)|0;$157=HEAP32[$156>>2]|0;$158=$cod_info+5200|0;HEAP32[$158>>2]=$157;$159=89192+($144<<2)|0;$160=HEAP32[$159>>2]|0;$161=$cod_info+5204|0;HEAP32[$161>>2]=$160;if($94){$162=$151*5|0;$163=$162+$154|0;$164=$163<<4;$165=$157<<2;$166=$165+$164|0;$167=$166+$160|0;$$sink$i=$167}else{$168=$151*3|0;$169=$168+500|0;$170=$169+$154|0;$$sink$i=$170}$171=$cod_info+4784|0;HEAP32[$171>>2]=$$sink$i;$172=$cod_info+4844|0;$173=HEAP32[$148>>2]|0;$174=Math_imul($173,$151)|0;$175=((11824+($$$i1*48|0)|0)+($row_in_table$0$i<<4)|0)+4|0;$176=HEAP32[$175>>2]|0;$177=Math_imul($176,$154)|0;$178=$177+$174|0;$179=((11824+($$$i1*48|0)|0)+($row_in_table$0$i<<4)|0)+8|0;$180=HEAP32[$179>>2]|0;$181=Math_imul($180,$157)|0;$182=$178+$181|0;$183=((11824+($$$i1*48|0)|0)+($row_in_table$0$i<<4)|0)+12|0;$184=HEAP32[$183>>2]|0;$185=Math_imul($184,$160)|0;$186=$182+$185|0;HEAP32[$172>>2]=$186}$$0=$$over$0$3$i;STACKTOP=sp;return $$0|0}function _huffman_init($gfc){$gfc=$gfc|0;var $$bv_index$0$lcssa=0,$$bv_index$2$lcssa=0,$$lcssa=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0;var $24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$bv_index$0=0,$bv_index$0$lcssa=0,$bv_index$2=0,$bv_index$2$lcssa=0,$i$01=0,$scfb_anz$0=0;var $sext=0,label=0,sp=0;sp=STACKTOP;$0=$gfc+85816|0;HEAP32[$0>>2]=2;$i$01=2;while(1){$scfb_anz$0=0;while(1){$1=$scfb_anz$0+1|0;$2=($gfc+21360|0)+($1<<2)|0;$3=HEAP32[$2>>2]|0;$4=($3|0)<($i$01|0);if($4){$scfb_anz$0=$1}else{$$lcssa=$1;break}}$5=89256+($$lcssa<<3)|0;$6=HEAP32[$5>>2]|0;$bv_index$0=$6;while(1){$7=$bv_index$0+1|0;$8=($gfc+21360|0)+($7<<2)|0;$9=HEAP32[$8>>2]|0;$10=($9|0)>($i$01|0);$11=$bv_index$0+-1|0;if($10){$bv_index$0=$11}else{$bv_index$0$lcssa=$bv_index$0;break}}$12=($bv_index$0$lcssa|0)<0;$$bv_index$0$lcssa=$12?$6:$bv_index$0$lcssa;$13=$$bv_index$0$lcssa&255;$14=$i$01+-2|0;$15=($gfc+85100|0)+$14|0;HEAP8[$15>>0]=$13;$16=(89256+($$lcssa<<3)|0)+4|0;$17=HEAP32[$16>>2]|0;$sext=$$bv_index$0$lcssa<<24;$18=$sext>>24;$bv_index$2=$17;while(1){$19=$bv_index$2+2|0;$20=$19+$18|0;$21=($gfc+21360|0)+($20<<2)|0;$22=HEAP32[$21>>2]|0;$23=($22|0)>($i$01|0);$24=$bv_index$2+-1|0;if($23){$bv_index$2=$24}else{$bv_index$2$lcssa=$bv_index$2;break}}$25=($bv_index$2$lcssa|0)<0;$$bv_index$2$lcssa=$25?$17:$bv_index$2$lcssa;$26=$$bv_index$2$lcssa&255;$27=$i$01+-1|0;$28=($gfc+85100|0)+$27|0;HEAP8[$28>>0]=$26;$29=$i$01+2|0;$30=($29|0)<577;if($30){$i$01=$29}else{break}}return}function _quantize_lines_xrpow($l,$istep,$xp,$pi){$l=$l|0;$istep=+$istep;$xp=$xp|0;$pi=$pi|0;var $$01$lcssa=0,$$013=0,$$04=0,$0=0,$1=0,$10=0.0,$100=0,$11=0.0,$12=0,$13=0.0,$14=0.0,$15=0.0,$16=0,$17=0.0,$18=0.0,$19=0.0,$2=0,$20=0.0,$21=0.0,$22=0.0;var $23=0.0,$24=0,$25=0.0,$26=0.0,$27=0,$28=0.0,$29=0.0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0.0,$35=0.0,$36=0.0,$37=0.0,$38=0,$39=0,$4=0,$40=0;var $41=0.0,$42=0.0,$43=0.0,$44=0.0,$45=0,$46=0,$47=0,$48=0.0,$49=0.0,$5=0.0,$50=0.0,$51=0.0,$52=0,$53=0,$54=0,$55=0.0,$56=0.0,$57=0.0,$58=0.0,$59=0;var $6=0.0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0.0,$70=0,$71=0.0,$72=0.0,$73=0.0,$74=0,$75=0.0,$76=0.0,$77=0.0;var $78=0.0,$79=0.0,$8=0,$80=0.0,$81=0.0,$82=0,$83=0,$84=0,$85=0,$86=0.0,$87=0.0,$88=0.0,$89=0.0,$9=0.0,$90=0,$91=0,$92=0,$93=0.0,$94=0.0,$95=0.0;var $96=0.0,$97=0,$98=0,$99=0,$fi$0$lcssa=0,$fi$02=0,$scevgep=0,$scevgep7=0,label=0,sp=0;sp=STACKTOP;$0=$l&2;$1=$l>>>2;$2=($1|0)==0;if($2){$$01$lcssa=$xp;$fi$0$lcssa=$pi}else{$3=$1<<2;$scevgep7=$pi+($3<<2)|0;$$013=$xp;$$04=$1;$fi$02=$pi;while(1){$4=$$04+-1|0;$5=+HEAPF32[$$013>>2];$6=$5*$istep;$7=$6;$8=$$013+4|0;$9=+HEAPF32[$8>>2];$10=$9*$istep;$11=$10;$12=$$013+8|0;$13=+HEAPF32[$12>>2];$14=$13*$istep;$15=$14;$16=$$013+12|0;$17=+HEAPF32[$16>>2];$18=$17*$istep;$19=$18;$20=$7+8388608.0;$21=$20;$22=$11+8388608.0;$23=$22;$24=$fi$02+4|0;$25=$15+8388608.0;$26=$25;$27=$fi$02+8|0;$28=$19+8388608.0;$29=$28;$30=$fi$02+12|0;$31=(HEAPF32[tempDoublePtr>>2]=$21,HEAP32[tempDoublePtr>>2]|0);$32=$31+-1258291200|0;$33=46872+($32<<2)|0;$34=+HEAPF32[$33>>2];$35=$34;$36=$35+$20;$37=$36;$38=(HEAPF32[tempDoublePtr>>2]=$23,HEAP32[tempDoublePtr>>2]|0);$39=$38+-1258291200|0;$40=46872+($39<<2)|0;$41=+HEAPF32[$40>>2];$42=$41;$43=$42+$22;$44=$43;$45=(HEAPF32[tempDoublePtr>>2]=$26,HEAP32[tempDoublePtr>>2]|0);$46=$45+-1258291200|0;$47=46872+($46<<2)|0;$48=+HEAPF32[$47>>2];$49=$48;$50=$49+$25;$51=$50;$52=(HEAPF32[tempDoublePtr>>2]=$29,HEAP32[tempDoublePtr>>2]|0);$53=$52+-1258291200|0;$54=46872+($53<<2)|0;$55=+HEAPF32[$54>>2];$56=$55;$57=$56+$28;$58=$57;$59=(HEAPF32[tempDoublePtr>>2]=$37,HEAP32[tempDoublePtr>>2]|0);$60=$59+-1258291200|0;HEAP32[$fi$02>>2]=$60;$61=(HEAPF32[tempDoublePtr>>2]=$44,HEAP32[tempDoublePtr>>2]|0);$62=$61+-1258291200|0;HEAP32[$24>>2]=$62;$63=(HEAPF32[tempDoublePtr>>2]=$51,HEAP32[tempDoublePtr>>2]|0);$64=$63+-1258291200|0;HEAP32[$27>>2]=$64;$65=(HEAPF32[tempDoublePtr>>2]=$58,HEAP32[tempDoublePtr>>2]|0);$66=$65+-1258291200|0;HEAP32[$30>>2]=$66;$67=$fi$02+16|0;$68=$$013+16|0;$69=($4|0)==0;if($69){break}else{$$013=$68;$$04=$4;$fi$02=$67}}$scevgep=$xp+($3<<2)|0;$$01$lcssa=$scevgep;$fi$0$lcssa=$scevgep7}$70=($0|0)==0;if($70){return}$71=+HEAPF32[$$01$lcssa>>2];$72=$71*$istep;$73=$72;$74=$$01$lcssa+4|0;$75=+HEAPF32[$74>>2];$76=$75*$istep;$77=$76;$78=$73+8388608.0;$79=$78;$80=$77+8388608.0;$81=$80;$82=$fi$0$lcssa+4|0;$83=(HEAPF32[tempDoublePtr>>2]=$79,HEAP32[tempDoublePtr>>2]|0);$84=$83+-1258291200|0;$85=46872+($84<<2)|0;$86=+HEAPF32[$85>>2];$87=$86;$88=$87+$78;$89=$88;$90=(HEAPF32[tempDoublePtr>>2]=$81,HEAP32[tempDoublePtr>>2]|0);$91=$90+-1258291200|0;$92=46872+($91<<2)|0;$93=+HEAPF32[$92>>2];$94=$93;$95=$94+$80;$96=$95;$97=(HEAPF32[tempDoublePtr>>2]=$89,HEAP32[tempDoublePtr>>2]|0);$98=$97+-1258291200|0;HEAP32[$fi$0$lcssa>>2]=$98;$99=(HEAPF32[tempDoublePtr>>2]=$96,HEAP32[tempDoublePtr>>2]|0);$100=$99+-1258291200|0;HEAP32[$82>>2]=$100;return}function _choose_table_nonMMX($ix,$end,$_s){$ix=$ix|0;$end=$end|0;$_s=$_s|0;var $$0=0,$$0$i=0,$$0$i1=0,$$2$i=0,$$lcssa=0,$$max1$0$i=0,$$max1$0$i$lcssa=0,$$op$i=0,$$sum$0$i=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0;var $19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0;var $37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0;var $55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$7=0,$8=0,$9=0,$choice$0$lcssa=0,$choice$02=0,$choice2$0$lcssa$ph=0,$choice2$0$lcssa8=0,$max1$0$i=0,$max2$0$i=0,$max2$1$$max1$0$i=0,$max2$1$i=0,$max2$1$i$lcssa=0,$sum$0$i=0;var $sum$2$i=0,$t2$t1$i=0,$y$0$i=0,label=0,sp=0;sp=STACKTOP;$$0$i=$ix;$max1$0$i=0;$max2$0$i=0;while(1){$0=$$0$i+4|0;$1=HEAP32[$$0$i>>2]|0;$2=$$0$i+8|0;$3=HEAP32[$0>>2]|0;$4=($max1$0$i|0)<($1|0);$$max1$0$i=$4?$1:$max1$0$i;$5=($max2$0$i|0)<($3|0);$max2$1$i=$5?$3:$max2$0$i;$6=$2>>>0<$end>>>0;if($6){$$0$i=$2;$max1$0$i=$$max1$0$i;$max2$0$i=$max2$1$i}else{$$max1$0$i$lcssa=$$max1$0$i;$max2$1$i$lcssa=$max2$1$i;break}}$7=($$max1$0$i$lcssa|0)<($max2$1$i$lcssa|0);$max2$1$$max1$0$i=$7?$max2$1$i$lcssa:$$max1$0$i$lcssa;$8=$max2$1$$max1$0$i>>>0<16;if($8){$9=89440+($max2$1$$max1$0$i<<2)|0;$10=HEAP32[$9>>2]|0;$11=FUNCTION_TABLE_iiiii[$10&7]($ix,$end,$max2$1$$max1$0$i,$_s)|0;$$0=$11;return $$0|0}$12=$max2$1$$max1$0$i>>>0>8206;if($12){HEAP32[$_s>>2]=100000;$$0=-1;return $$0|0}$13=$max2$1$$max1$0$i+-15|0;$14=HEAP32[82660>>2]|0;$15=$14>>>0<$13>>>0;if($15){$16=HEAP32[82676>>2]|0;$17=$16>>>0<$13>>>0;if($17){$49=HEAP32[82692>>2]|0;$50=$49>>>0<$13>>>0;if($50){$51=HEAP32[82708>>2]|0;$52=$51>>>0<$13>>>0;if($52){$53=HEAP32[82724>>2]|0;$54=$53>>>0<$13>>>0;if($54){$55=HEAP32[82740>>2]|0;$56=$55>>>0<$13>>>0;if($56){$57=HEAP32[82756>>2]|0;$58=$57>>>0<$13>>>0;if($58){$59=HEAP32[82772>>2]|0;$60=$59>>>0<$13>>>0;if($60){$choice$0$lcssa=24;$choice2$0$lcssa8=32}else{$choice2$0$lcssa$ph=31;label=9}}else{$choice2$0$lcssa$ph=30;label=9}}else{$choice2$0$lcssa$ph=29;label=9}}else{$choice2$0$lcssa$ph=28;label=9}}else{$choice2$0$lcssa$ph=27;label=9}}else{$choice2$0$lcssa$ph=26;label=9}}else{$choice2$0$lcssa$ph=25;label=9}}else{$choice2$0$lcssa$ph=24;label=9}L20:do{if((label|0)==9){$18=$choice2$0$lcssa$ph+-8|0;$choice$02=$18;while(1){$19=(82272+($choice$02<<4)|0)+4|0;$20=HEAP32[$19>>2]|0;$21=$20>>>0<$13>>>0;if(!$21){$choice$0$lcssa=$choice$02;$choice2$0$lcssa8=$choice2$0$lcssa$ph;break L20}$22=$choice$02+1|0;$23=($22|0)<24;if($23){$choice$02=$22}else{$choice$0$lcssa=$22;$choice2$0$lcssa8=$choice2$0$lcssa$ph;break}}}}while(0);$24=82272+($choice$0$lcssa<<4)|0;$25=HEAP32[$24>>2]|0;$26=$25<<16;$27=82272+($choice2$0$lcssa8<<4)|0;$28=HEAP32[$27>>2]|0;$29=$26+$28|0;$$0$i1=$ix;$sum$0$i=0;while(1){$30=$$0$i1+4|0;$31=HEAP32[$$0$i1>>2]|0;$32=$$0$i1+8|0;$33=HEAP32[$30>>2]|0;$34=$31>>>0>14;$35=$34?$29:0;$$sum$0$i=$35+$sum$0$i|0;$36=$33>>>0>14;$37=$36?$29:0;$y$0$i=$36?15:$33;$$op$i=$31<<4;$38=$34?240:$$op$i;$39=$y$0$i+$38|0;$40=82816+($39<<2)|0;$41=HEAP32[$40>>2]|0;$sum$2$i=$$sum$0$i+$41|0;$42=$sum$2$i+$37|0;$43=$32>>>0<$end>>>0;if($43){$$0$i1=$32;$sum$0$i=$42}else{$$lcssa=$42;break}}$44=$$lcssa&65535;$45=$$lcssa>>>16;$46=$45>>>0>$44>>>0;$t2$t1$i=$46?$choice2$0$lcssa8:$choice$0$lcssa;$$2$i=$46?$44:$45;$47=HEAP32[$_s>>2]|0;$48=$47+$$2$i|0;HEAP32[$_s>>2]=$48;$$0=$t2$t1$i;return $$0|0}function _count_bit_null($ix,$end,$max,$s){$ix=$ix|0;$end=$end|0;$max=$max|0;$s=$s|0;var label=0,sp=0;sp=STACKTOP;return 0}function _count_bit_noESC($ix,$end,$mx,$s){$ix=$ix|0;$end=$end|0;$mx=$mx|0;$s=$s|0;var $$0=0,$$lcssa=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$sum1$0=0,label=0,sp=0;sp=STACKTOP;$0=HEAP32[82300>>2]|0;$$0=$ix;$sum1$0=0;while(1){$1=$$0+4|0;$2=HEAP32[$$0>>2]|0;$3=$$0+8|0;$4=HEAP32[$1>>2]|0;$5=$2<<1;$6=$5+$4|0;$7=$0+$6|0;$8=HEAP8[$7>>0]|0;$9=$8&255;$10=$9+$sum1$0|0;$11=$3>>>0<$end>>>0;if($11){$$0=$3;$sum1$0=$10}else{$$lcssa=$10;break}}$12=HEAP32[$s>>2]|0;$13=$12+$$lcssa|0;HEAP32[$s>>2]=$13;return 1}function _count_bit_noESC_from2($ix,$end,$max,$s){$ix=$ix|0;$end=$end|0;$max=$max|0;$s=$s|0;var $$=0,$$0=0,$$1=0,$$lcssa=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0;var $3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$sum$0=0,label=0,sp=0;sp=STACKTOP;$0=$max+-1|0;$1=89504+($0<<2)|0;$2=HEAP32[$1>>2]|0;$3=82272+($2<<4)|0;$4=HEAP32[$3>>2]|0;$5=($0|0)==1;$6=$5?83840:83880;$$0=$ix;$sum$0=0;while(1){$7=$$0+4|0;$8=HEAP32[$$0>>2]|0;$9=$$0+8|0;$10=HEAP32[$7>>2]|0;$11=Math_imul($8,$4)|0;$12=$11+$10|0;$13=$6+($12<<2)|0;$14=HEAP32[$13>>2]|0;$15=$14+$sum$0|0;$16=$9>>>0<$end>>>0;if($16){$$0=$9;$sum$0=$15}else{$$lcssa=$15;break}}$17=$$lcssa&65535;$18=$$lcssa>>>16;$19=$18>>>0>$17>>>0;$$=$19?$17:$18;$20=$19&1;$$1=$20+$2|0;$21=HEAP32[$s>>2]|0;$22=$21+$$|0;HEAP32[$s>>2]=$22;return $$1|0}function _count_bit_noESC_from3($ix,$end,$max,$s){$ix=$ix|0;$end=$end|0;$max=$max|0;$s=$s|0;var $$=0,$$0=0,$$1=0,$$lcssa=0,$$lcssa12=0,$$lcssa13=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0;var $21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$4=0,$5=0,$6=0,$7=0;var $8=0,$9=0,$sum1$0=0,$sum1$2=0,$sum2$0=0,$sum3$0=0,$t$1=0,label=0,sp=0;sp=STACKTOP;$0=$max+-1|0;$1=89504+($0<<2)|0;$2=HEAP32[$1>>2]|0;$3=82272+($2<<4)|0;$4=HEAP32[$3>>2]|0;$5=(82272+($2<<4)|0)+12|0;$6=HEAP32[$5>>2]|0;$7=$2+1|0;$8=(82272+($7<<4)|0)+12|0;$9=HEAP32[$8>>2]|0;$10=$2+2|0;$11=(82272+($10<<4)|0)+12|0;$12=HEAP32[$11>>2]|0;$$0=$ix;$sum1$0=0;$sum2$0=0;$sum3$0=0;while(1){$13=$$0+4|0;$14=HEAP32[$$0>>2]|0;$15=$$0+8|0;$16=HEAP32[$13>>2]|0;$17=Math_imul($14,$4)|0;$18=$17+$16|0;$19=$6+$18|0;$20=HEAP8[$19>>0]|0;$21=$20&255;$22=$21+$sum1$0|0;$23=$9+$18|0;$24=HEAP8[$23>>0]|0;$25=$24&255;$26=$25+$sum2$0|0;$27=$12+$18|0;$28=HEAP8[$27>>0]|0;$29=$28&255;$30=$29+$sum3$0|0;$31=$15>>>0<$end>>>0;if($31){$$0=$15;$sum1$0=$22;$sum2$0=$26;$sum3$0=$30}else{$$lcssa=$22;$$lcssa12=$26;$$lcssa13=$30;break}}$32=$$lcssa>>>0>$$lcssa12>>>0;$$=$32?$7:$2;$$1=$32?$$lcssa12:$$lcssa;$33=$$1>>>0>$$lcssa13>>>0;$t$1=$33?$10:$$;$sum1$2=$33?$$lcssa13:$$1;$34=HEAP32[$s>>2]|0;$35=$34+$sum1$2|0;HEAP32[$s>>2]=$35;return $t$1|0}function _free_id3tag($gfc){$gfc=$gfc|0;var $0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0;var $3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$node$0=0,label=0,sp=0;sp=STACKTOP;$0=$gfc+85704|0;$1=HEAP32[$0>>2]|0;$2=($1|0)==(0|0);if(!$2){_free($1);HEAP32[$0>>2]=0}$3=$gfc+85708|0;$4=HEAP32[$3>>2]|0;$5=($4|0)==(0|0);if(!$5){_free($4);HEAP32[$3>>2]=0}$6=$gfc+85712|0;$7=HEAP32[$6>>2]|0;$8=($7|0)==(0|0);if(!$8){_free($7);HEAP32[$6>>2]=0}$9=$gfc+85716|0;$10=HEAP32[$9>>2]|0;$11=($10|0)==(0|0);if(!$11){_free($10);HEAP32[$9>>2]=0}$12=$gfc+85728|0;$13=HEAP32[$12>>2]|0;$14=($13|0)==(0|0);if(!$14){_free($13);HEAP32[$12>>2]=0;$15=$gfc+85732|0;HEAP32[$15>>2]=0;$16=$gfc+85740|0;HEAP32[$16>>2]=0}$17=$gfc+85744|0;$18=HEAP32[$17>>2]|0;$19=($18|0)==(0|0);if($19){return}else{$node$0=$18}while(1){$20=$node$0+12|0;$21=HEAP32[$20>>2]|0;$22=$node$0+24|0;$23=HEAP32[$22>>2]|0;$24=HEAP32[$node$0>>2]|0;_free($21);_free($23);_free($node$0);$25=($24|0)==(0|0);if($25){break}else{$node$0=$24}}HEAP32[$17>>2]=0;$26=$gfc+85748|0;HEAP32[$26>>2]=0;return}function _freegfc($gfc){$gfc=$gfc|0;var $$in$i=0,$$pre$i=0,$$pre1$i=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0;var $24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0;var $5=0,$6=0,$7=0,$8=0,$9=0,$exitcond=0,$i$01=0,label=0,sp=0;sp=STACKTOP;$i$01=0;while(1){$0=($gfc+37192|0)+($i$01<<2)|0;$1=HEAP32[$0>>2]|0;$2=($1|0)==(0|0);if(!$2){_free($1);HEAP32[$0>>2]=0}$3=$i$01+1|0;$exitcond=($3|0)==641;if($exitcond){break}else{$i$01=$3}}$4=$gfc+37184|0;$5=HEAP32[$4>>2]|0;$6=($5|0)==(0|0);if(!$6){_free($5);HEAP32[$4>>2]=0}$7=$gfc+37188|0;$8=HEAP32[$7>>2]|0;$9=($8|0)==(0|0);if(!$9){_free($8);HEAP32[$7>>2]=0}$10=$gfc+284|0;$11=HEAP32[$10>>2]|0;$12=($11|0)==(0|0);if(!$12){_free($11);HEAP32[$10>>2]=0}$13=$gfc+85780|0;$14=HEAP32[$13>>2]|0;$15=($14|0)==(0|0);if(!$15){_free($14);HEAP32[$13>>2]=0;$16=$gfc+85776|0;HEAP32[$16>>2]=0}$17=$gfc+85796|0;$18=HEAP32[$17>>2]|0;$19=($18|0)==(0|0);if(!$19){_free($18)}$20=$gfc+85676|0;$21=HEAP32[$20>>2]|0;$22=($21|0)==(0|0);if(!$22){_free($21)}$23=$gfc+52152|0;$24=HEAP32[$23>>2]|0;$25=($24|0)==(0|0);if(!$25){_free($24)}$26=$gfc+52156|0;$27=HEAP32[$26>>2]|0;$28=($27|0)==(0|0);if(!$28){_free($27)}_free_id3tag($gfc);$29=$gfc+85808|0;$30=HEAP32[$29>>2]|0;$31=($30|0)==(0|0);if(!$31){_hip_decode_exit($30|0)|0;HEAP32[$29>>2]=0}$32=$gfc+85800|0;$33=HEAP32[$32>>2]|0;$34=($33|0)==(0|0);if($34){_free($gfc);return}$35=$33+2156|0;$36=HEAP32[$35>>2]|0;$37=($36|0)==(0|0);if($37){$$in$i=$33}else{_free($36);$$pre$i=HEAP32[$32>>2]|0;$$in$i=$$pre$i}$38=$$in$i+4316|0;$39=HEAP32[$38>>2]|0;$40=($39|0)==(0|0);if($40){$41=$$in$i}else{_free($39);$$pre1$i=HEAP32[$32>>2]|0;$41=$$pre1$i}_free($41);_free($gfc);return}function _ATHformula($cfg,$f){$cfg=$cfg|0;$f=+$f;var $0=0,$1=0,$10=0.0,$100=0.0,$101=0.0,$102=0,$103=0.0,$104=0,$105=0.0,$106=0,$107=0.0,$108=0.0,$109=0.0,$11=0.0,$110=0.0,$111=0.0,$112=0.0,$113=0.0,$114=0.0,$115=0.0;var $116=0.0,$117=0.0,$118=0.0,$119=0.0,$12=0.0,$120=0.0,$121=0.0,$122=0.0,$123=0.0,$124=0.0,$125=0.0,$126=0.0,$127=0.0,$128=0,$129=0.0,$13=0.0,$130=0.0,$131=0,$132=0.0,$133=0;var $134=0.0,$135=0,$136=0.0,$137=0.0,$138=0.0,$139=0.0,$14=0.0,$140=0.0,$141=0.0,$142=0.0,$143=0.0,$144=0.0,$145=0.0,$146=0.0,$147=0.0,$148=0.0,$149=0.0,$15=0.0,$150=0.0,$151=0.0;var $152=0.0,$153=0.0,$154=0.0,$155=0.0,$156=0.0,$157=0.0,$158=0,$159=0.0,$16=0.0,$160=0,$161=0.0,$162=0,$163=0.0,$164=0.0,$165=0.0,$166=0.0,$167=0.0,$168=0.0,$169=0.0,$17=0.0;var $170=0.0,$171=0.0,$172=0.0,$173=0.0,$174=0.0,$175=0.0,$176=0.0,$177=0.0,$178=0.0,$179=0.0,$18=0.0,$180=0.0,$19=0.0,$2=0.0,$20=0.0,$21=0.0,$22=0.0,$23=0.0,$24=0.0,$25=0.0;var $26=0.0,$27=0,$28=0.0,$29=0,$3=0,$30=0.0,$31=0,$32=0.0,$33=0.0,$34=0.0,$35=0.0,$36=0.0,$37=0.0,$38=0.0,$39=0.0,$4=0.0,$40=0.0,$41=0.0,$42=0.0,$43=0.0;var $44=0.0,$45=0.0,$46=0.0,$47=0.0,$48=0.0,$49=0.0,$5=0,$50=0.0,$51=0,$52=0.0,$53=0,$54=0.0,$55=0,$56=0.0,$57=0.0,$58=0.0,$59=0.0,$6=0.0,$60=0.0,$61=0.0;var $62=0.0,$63=0.0,$64=0.0,$65=0.0,$66=0.0,$67=0.0,$68=0.0,$69=0.0,$7=0,$70=0.0,$71=0.0,$72=0.0,$73=0.0,$74=0.0,$75=0,$76=0.0,$77=0,$78=0.0,$79=0,$8=0.0;var $80=0.0,$81=0.0,$82=0.0,$83=0.0,$84=0.0,$85=0.0,$86=0.0,$87=0.0,$88=0.0,$89=0.0,$9=0.0,$90=0.0,$91=0.0,$92=0.0,$93=0.0,$94=0.0,$95=0.0,$96=0.0,$97=0.0,$98=0.0;var $99=0,$ath$0=0.0,$f$op$i=0.0,$f$op$i1=0.0,$f$op$i10=0.0,$f$op$i13=0.0,$f$op$i16=0.0,$f$op$i4=0.0,$f$op$i7=0.0,$pow2$i=0.0,$pow2$i11=0.0,$pow2$i14=0.0,$pow2$i17=0.0,$pow2$i2=0.0,$pow2$i5=0.0,$pow2$i8=0.0,$pow21$i=0.0,$pow21$i12=0.0,$pow21$i15=0.0,$pow21$i18=0.0;var $pow21$i3=0.0,$pow21$i6=0.0,$pow21$i9=0.0,label=0,sp=0;sp=STACKTOP;$0=$cfg+192|0;$1=HEAP32[$0>>2]|0;switch($1|0){case 5:{$128=$cfg+188|0;$129=+HEAPF32[$128>>2];$130=$f;$131=$130<-0.29999999999999999;$f$op$i13=$f*0.0010000000474974513;$132=$131?3.4100000858306885:$f$op$i13;$133=$132<3.4100000858306885;$134=$133?3.4100000858306885:$132;$135=$134>16.100000381469727;$136=$134;$137=$135?16.100000381469727:$136;$138=+Math_pow(+$137,-0.80000000000000004);$139=$138*3.6400000000000001;$140=$137+-3.3999999999999999;$pow2$i14=$140*$140;$141=$pow2$i14*-0.59999999999999998;$142=+Math_exp(+$141);$143=$142*6.7999999999999998;$144=$139-$143;$145=$137+-8.6999999999999993;$pow21$i15=$145*$145;$146=$pow21$i15*-0.14999999999999999;$147=+Math_exp(+$146);$148=$147*6.0;$149=$144+$148;$150=$129;$151=$150*4.0000000000000003E-5;$152=$151+5.9999999999999995E-4;$153=+Math_pow(+$137,4.0);$154=$153*$152;$155=$149+$154;$156=$155;$ath$0=$156;return+$ath$0;break}case 1:{$26=$f;$27=$26<-0.29999999999999999;$f$op$i1=$f*0.0010000000474974513;$28=$27?3.4100000858306885:$f$op$i1;$29=$28<0.10000000149011612;$30=$29?0.10000000149011612:$28;$31=$30>24.0;$32=$30;$33=$31?24.0:$32;$34=+Math_pow(+$33,-0.80000000000000004);$35=$34*3.6400000000000001;$36=$33+-3.3999999999999999;$pow2$i2=$36*$36;$37=$pow2$i2*-0.59999999999999998;$38=+Math_exp(+$37);$39=$38*6.7999999999999998;$40=$35-$39;$41=$33+-8.6999999999999993;$pow21$i3=$41*$41;$42=$pow21$i3*-0.14999999999999999;$43=+Math_exp(+$42);$44=$43*6.0;$45=$40+$44;$46=+Math_pow(+$33,4.0);$47=$46*5.5999999999999995E-4;$48=$45+$47;$49=$48;$ath$0=$49;return+$ath$0;break}case 0:{$2=$f;$3=$2<-0.29999999999999999;$f$op$i=$f*0.0010000000474974513;$4=$3?3.4100000858306885:$f$op$i;$5=$4<0.10000000149011612;$6=$5?0.10000000149011612:$4;$7=$6>24.0;$8=$6;$9=$7?24.0:$8;$10=+Math_pow(+$9,-0.80000000000000004);$11=$10*3.6400000000000001;$12=$9+-3.3999999999999999;$pow2$i=$12*$12;$13=$pow2$i*-0.59999999999999998;$14=+Math_exp(+$13);$15=$14*6.7999999999999998;$16=$11-$15;$17=$9+-8.6999999999999993;$pow21$i=$17*$17;$18=$pow21$i*-0.14999999999999999;$19=+Math_exp(+$18);$20=$19*6.0;$21=$16+$20;$22=+Math_pow(+$9,4.0);$23=$22*9.5999999999999991E-4;$24=$21+$23;$25=$24;$ath$0=$25;return+$ath$0;break}case 3:{$74=$f;$75=$74<-0.29999999999999999;$f$op$i7=$f*0.0010000000474974513;$76=$75?3.4100000858306885:$f$op$i7;$77=$76<0.10000000149011612;$78=$77?0.10000000149011612:$76;$79=$78>24.0;$80=$78;$81=$79?24.0:$80;$82=+Math_pow(+$81,-0.80000000000000004);$83=$82*3.6400000000000001;$84=$81+-3.3999999999999999;$pow2$i8=$84*$84;$85=$pow2$i8*-0.59999999999999998;$86=+Math_exp(+$85);$87=$86*6.7999999999999998;$88=$83-$87;$89=$81+-8.6999999999999993;$pow21$i9=$89*$89;$90=$pow21$i9*-0.14999999999999999;$91=+Math_exp(+$90);$92=$91*6.0;$93=$88+$92;$94=+Math_pow(+$81,4.0);$95=$94*6.3999999999999994E-4;$96=$93+$95;$97=$96;$98=$97+6.0;$ath$0=$98;return+$ath$0;break}case 4:{$99=$cfg+188|0;$100=+HEAPF32[$99>>2];$101=$f;$102=$101<-0.29999999999999999;$f$op$i10=$f*0.0010000000474974513;$103=$102?3.4100000858306885:$f$op$i10;$104=$103<0.10000000149011612;$105=$104?0.10000000149011612:$103;$106=$105>24.0;$107=$105;$108=$106?24.0:$107;$109=+Math_pow(+$108,-0.80000000000000004);$110=$109*3.6400000000000001;$111=$108+-3.3999999999999999;$pow2$i11=$111*$111;$112=$pow2$i11*-0.59999999999999998;$113=+Math_exp(+$112);$114=$113*6.7999999999999998;$115=$110-$114;$116=$108+-8.6999999999999993;$pow21$i12=$116*$116;$117=$pow21$i12*-0.14999999999999999;$118=+Math_exp(+$117);$119=$118*6.0;$120=$115+$119;$121=$100;$122=$121*4.0000000000000003E-5;$123=$122+5.9999999999999995E-4;$124=+Math_pow(+$108,4.0);$125=$124*$123;$126=$120+$125;$127=$126;$ath$0=$127;return+$ath$0;break}case 2:{$50=$f;$51=$50<-0.29999999999999999;$f$op$i4=$f*0.0010000000474974513;$52=$51?3.4100000858306885:$f$op$i4;$53=$52<0.10000000149011612;$54=$53?0.10000000149011612:$52;$55=$54>24.0;$56=$54;$57=$55?24.0:$56;$58=+Math_pow(+$57,-0.80000000000000004);$59=$58*3.6400000000000001;$60=$57+-3.3999999999999999;$pow2$i5=$60*$60;$61=$pow2$i5*-0.59999999999999998;$62=+Math_exp(+$61);$63=$62*6.7999999999999998;$64=$59-$63;$65=$57+-8.6999999999999993;$pow21$i6=$65*$65;$66=$pow21$i6*-0.14999999999999999;$67=+Math_exp(+$66);$68=$67*6.0;$69=$64+$68;$70=+Math_pow(+$57,4.0);$71=$70*5.9999999999999995E-4;$72=$69+$71;$73=$72;$ath$0=$73;return+$ath$0;break}default:{$157=$f;$158=$157<-0.29999999999999999;$f$op$i16=$f*0.0010000000474974513;$159=$158?3.4100000858306885:$f$op$i16;$160=$159<0.10000000149011612;$161=$160?0.10000000149011612:$159;$162=$161>24.0;$163=$161;$164=$162?24.0:$163;$165=+Math_pow(+$164,-0.80000000000000004);$166=$165*3.6400000000000001;$167=$164+-3.3999999999999999;$pow2$i17=$167*$167;$168=$pow2$i17*-0.59999999999999998;$169=+Math_exp(+$168);$170=$169*6.7999999999999998;$171=$166-$170;$172=$164+-8.6999999999999993;$pow21$i18=$172*$172;$173=$pow21$i18*-0.14999999999999999;$174=+Math_exp(+$173);$175=$174*6.0;$176=$171+$175;$177=+Math_pow(+$164,4.0);$178=$177*5.9999999999999995E-4;$179=$176+$178;$180=$179;$ath$0=$180;return+$ath$0}}return+0.0}function _freq2bark($freq){$freq=+$freq;var $$op=0.0,$0=0,$1=0.0,$10=0.0,$11=0.0,$12=0.0,$13=0.0,$14=0.0,$2=0.0,$3=0.0,$4=0.0,$5=0.0,$6=0.0,$7=0.0,$8=0.0,$9=0.0,label=0,sp=0;sp=STACKTOP;$0=$freq<0.0;$1=$freq;$$op=$1*0.001;$2=$$op;$3=$0?0.0:$2;$4=$3;$5=$4*0.76000000000000001;$6=+Math_atan(+$5);$7=$6*13.0;$8=$3*$3;$9=$8;$10=$9*0.017777777777777778;$11=+Math_atan(+$10);$12=$11*3.5;$13=$12+$7;$14=$13;return+$14}function _FindNearestBitrate($bRate,$version,$samplerate){$bRate=$bRate|0;$version=$version|0;$samplerate=$samplerate|0;var $$bitrate$0=0,$$version=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$bitrate$01=0,$bitrate$1=0;var $bitrate$1$lcssa=0,$exitcond=0,$i$02=0,label=0,sp=0;sp=STACKTOP;$0=($samplerate|0)<16000;$$version=$0?2:$version;$1=(83944+($$version<<6)|0)+4|0;$2=HEAP32[$1>>2]|0;$bitrate$01=$2;$i$02=2;while(1){$3=(83944+($$version<<6)|0)+($i$02<<2)|0;$4=HEAP32[$3>>2]|0;$5=($4|0)>0;if($5){$6=$4-$bRate|0;$7=($6|0)>0;$8=0-$6|0;$9=$7?$6:$8;$10=$bitrate$01-$bRate|0;$11=($10|0)>0;$12=0-$10|0;$13=$11?$10:$12;$14=($9|0)<($13|0);$$bitrate$0=$14?$4:$bitrate$01;$bitrate$1=$$bitrate$0}else{$bitrate$1=$bitrate$01}$15=$i$02+1|0;$exitcond=($15|0)==15;if($exitcond){$bitrate$1$lcssa=$bitrate$1;break}else{$bitrate$01=$bitrate$1;$i$02=$15}}return $bitrate$1$lcssa|0}function _nearestBitrateFullIndex($bitrate){$bitrate=$bitrate|0;var $$=0,$$lcssa=0,$$lcssa12=0,$0=0,$1=0,$10=0,$11=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$b$0=0,$b$0$lcssa11=0,$lower_range$0=0,$lower_range$0$upper_range$0=0,$lower_range_kbps$0=0;var $upper_range$0=0,$upper_range_kbps$0=0,label=0,sp=0;sp=STACKTOP;$0=$bitrate&65535;$b$0=0;while(1){$1=($b$0|0)<16;if(!$1){$lower_range$0=16;$lower_range_kbps$0=320;$upper_range$0=16;$upper_range_kbps$0=320;break}$2=$b$0+1|0;$3=89568+($2<<2)|0;$4=HEAP32[$3>>2]|0;$5=($0|0)>($4|0);$$=$5?$0:$4;$6=($$|0)==($0|0);if($6){$b$0=$2}else{$$lcssa=$2;$$lcssa12=$4;$b$0$lcssa11=$b$0;label=4;break}}if((label|0)==4){$7=89568+($b$0$lcssa11<<2)|0;$8=HEAP32[$7>>2]|0;$lower_range$0=$b$0$lcssa11;$lower_range_kbps$0=$8;$upper_range$0=$$lcssa;$upper_range_kbps$0=$$lcssa12}$9=$upper_range_kbps$0-$0|0;$10=$0-$lower_range_kbps$0|0;$11=($9|0)>($10|0);$lower_range$0$upper_range$0=$11?$lower_range$0:$upper_range$0;return $lower_range$0$upper_range$0|0}function _map2MP3Frequency($freq){$freq=$freq|0;var $$=0,$$0=0,$0=0,$1=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,label=0,sp=0;sp=STACKTOP;$0=($freq|0)<8001;if($0){$$0=8000}else{$1=($freq|0)<11026;if($1){$$0=11025}else{$2=($freq|0)<12001;if($2){$$0=12000}else{$3=($freq|0)<16001;if($3){$$0=16000}else{$4=($freq|0)<22051;if($4){$$0=22050}else{$5=($freq|0)<24001;if($5){$$0=24000}else{$6=($freq|0)<32001;if($6){$$0=32000}else{$7=($freq|0)<44101;$$=$7?44100:48000;$$0=$$}}}}}}}return $$0|0}function _BitrateIndex($bRate,$version,$samplerate){$bRate=$bRate|0;$version=$version|0;$samplerate=$samplerate|0;var $$=0,$$0=0,$$version=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0;var $24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0;var $42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0;var $60=0,$7=0,$8=0,$9=0,$or$cond=0,$or$cond$1=0,$or$cond$10=0,$or$cond$11=0,$or$cond$12=0,$or$cond$13=0,$or$cond$14=0,$or$cond$2=0,$or$cond$3=0,$or$cond$4=0,$or$cond$5=0,$or$cond$6=0,$or$cond$7=0,$or$cond$8=0,$or$cond$9=0,label=0;var sp=0;sp=STACKTOP;$0=($samplerate|0)<16000;$$version=$0?2:$version;$1=83944+($$version<<6)|0;$2=HEAP32[$1>>2]|0;$3=($2|0)>0;$4=($2|0)==($bRate|0);$or$cond=$3&$4;if($or$cond){$$0=0;return $$0|0}$5=(83944+($$version<<6)|0)+4|0;$6=HEAP32[$5>>2]|0;$7=($6|0)>0;$8=($6|0)==($bRate|0);$or$cond$1=$7&$8;if($or$cond$1){$$0=1;return $$0|0}$9=(83944+($$version<<6)|0)+8|0;$10=HEAP32[$9>>2]|0;$11=($10|0)>0;$12=($10|0)==($bRate|0);$or$cond$2=$11&$12;if($or$cond$2){$$0=2;return $$0|0}$13=(83944+($$version<<6)|0)+12|0;$14=HEAP32[$13>>2]|0;$15=($14|0)>0;$16=($14|0)==($bRate|0);$or$cond$3=$15&$16;if($or$cond$3){$$0=3;return $$0|0}$17=(83944+($$version<<6)|0)+16|0;$18=HEAP32[$17>>2]|0;$19=($18|0)>0;$20=($18|0)==($bRate|0);$or$cond$4=$19&$20;if($or$cond$4){$$0=4;return $$0|0}$21=(83944+($$version<<6)|0)+20|0;$22=HEAP32[$21>>2]|0;$23=($22|0)>0;$24=($22|0)==($bRate|0);$or$cond$5=$23&$24;if($or$cond$5){$$0=5;return $$0|0}$25=(83944+($$version<<6)|0)+24|0;$26=HEAP32[$25>>2]|0;$27=($26|0)>0;$28=($26|0)==($bRate|0);$or$cond$6=$27&$28;if($or$cond$6){$$0=6;return $$0|0}$29=(83944+($$version<<6)|0)+28|0;$30=HEAP32[$29>>2]|0;$31=($30|0)>0;$32=($30|0)==($bRate|0);$or$cond$7=$31&$32;if($or$cond$7){$$0=7;return $$0|0}$33=(83944+($$version<<6)|0)+32|0;$34=HEAP32[$33>>2]|0;$35=($34|0)>0;$36=($34|0)==($bRate|0);$or$cond$8=$35&$36;if($or$cond$8){$$0=8;return $$0|0}$37=(83944+($$version<<6)|0)+36|0;$38=HEAP32[$37>>2]|0;$39=($38|0)>0;$40=($38|0)==($bRate|0);$or$cond$9=$39&$40;if($or$cond$9){$$0=9;return $$0|0}$41=(83944+($$version<<6)|0)+40|0;$42=HEAP32[$41>>2]|0;$43=($42|0)>0;$44=($42|0)==($bRate|0);$or$cond$10=$43&$44;if($or$cond$10){$$0=10;return $$0|0}$45=(83944+($$version<<6)|0)+44|0;$46=HEAP32[$45>>2]|0;$47=($46|0)>0;$48=($46|0)==($bRate|0);$or$cond$11=$47&$48;if($or$cond$11){$$0=11;return $$0|0}$49=(83944+($$version<<6)|0)+48|0;$50=HEAP32[$49>>2]|0;$51=($50|0)>0;$52=($50|0)==($bRate|0);$or$cond$12=$51&$52;if($or$cond$12){$$0=12;return $$0|0}$53=(83944+($$version<<6)|0)+52|0;$54=HEAP32[$53>>2]|0;$55=($54|0)>0;$56=($54|0)==($bRate|0);$or$cond$13=$55&$56;if($or$cond$13){$$0=13;return $$0|0}else{$57=(83944+($$version<<6)|0)+56|0;$58=HEAP32[$57>>2]|0;$59=($58|0)>0;$60=($58|0)==($bRate|0);$or$cond$14=$59&$60;$$=$or$cond$14?14:-1;return $$|0}return 0|0}function _SmpFrqIndex($sample_freq,$version){$sample_freq=$sample_freq|0;$version=$version|0;var $$0=0,label=0,sp=0;sp=STACKTOP;do{if(($sample_freq|0)==12000){HEAP32[$version>>2]=0;$$0=1}else if(($sample_freq|0)==44100){HEAP32[$version>>2]=1;$$0=0}else if(($sample_freq|0)==11025){HEAP32[$version>>2]=0;$$0=0}else if(($sample_freq|0)==16000){HEAP32[$version>>2]=0;$$0=2}else if(($sample_freq|0)==48000){HEAP32[$version>>2]=1;$$0=1}else if(($sample_freq|0)==22050){HEAP32[$version>>2]=0;$$0=0}else if(($sample_freq|0)==24000){HEAP32[$version>>2]=0;$$0=1}else if(($sample_freq|0)==8000){HEAP32[$version>>2]=0;$$0=2}else if(($sample_freq|0)==32000){HEAP32[$version>>2]=1;$$0=2}else{HEAP32[$version>>2]=0;$$0=-1}}while(0);return $$0|0}function _isResamplingNecessary($cfg){$cfg=$cfg|0;var $0=0,$1=0,$10=0,$11=0,$12=0,$2=0.0,$3=0.0,$4=0,$5=0,$6=0,$7=0,$8=0.0,$9=0,label=0,sp=0;sp=STACKTOP;$0=$cfg+48|0;$1=HEAP32[$0>>2]|0;$2=+($1|0);$3=$2*0.99949997663497925;$4=~~$3;$5=$cfg+44|0;$6=HEAP32[$5>>2]|0;$7=($6|0)<($4|0);if($7){$12=1;$11=$12&1;return $11|0}$8=$2*1.000499963760376;$9=~~$8;$10=($9|0)<($6|0);$12=$10;$11=$12&1;return $11|0}function _fill_buffer($gfc,$mfbuf,$in_buffer,$nsamples,$n_in,$n_out){$gfc=$gfc|0;$mfbuf=$mfbuf|0;$in_buffer=$in_buffer|0;$nsamples=$nsamples|0;$n_in=$n_in|0;$n_out=$n_out|0;var $$$i=0,$$0$i$i=0.0,$$0$in$i$i=0.0,$$01$i$i=0.0,$$1$i$i=0.0,$$in$i=0,$$lcssa=0.0,$$lcssa20=0.0,$$neg4$i=0.0,$$neg7$i=0,$$op$i=0.0,$$op54$i=0,$$op54$op$i=0,$$op54$op$op$i=0,$$op55$i=0,$$pre=0,$$pre$i=0.0,$$pre$phi52$iZ2D=0,$$pre10=0,$$pre49$i=0.0;var $$pre50$i=0,$$pre51$i=0,$$sum=0,$0=0,$1=0,$10=0.0,$100=0.0,$101=0.0,$102=0.0,$103=0.0,$104=0.0,$105=0,$106=0.0,$107=0,$108=0,$109=0,$11=0,$110=0.0,$111=0.0,$112=0;var $113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0.0,$125=0.0,$126=0.0,$127=0.0,$128=0.0,$129=0.0,$13=0,$130=0.0;var $131=0.0,$132=0,$133=0,$134=0,$135=0.0,$136=0.0,$137=0.0,$138=0.0,$139=0.0,$14=0,$140=0.0,$141=0.0,$142=0.0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0;var $15=0.0,$150=0,$151=0,$152=0.0,$153=0,$154=0.0,$155=0.0,$156=0.0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0,$164=0.0,$165=0.0,$166=0.0,$167=0.0;var $168=0.0,$169=0.0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0,$184=0,$185=0;var $186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0,$201=0,$202=0;var $203=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0.0,$28=0,$29=0.0,$3=0,$30=0,$31=0.0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0.0,$38=0.0;var $39=0.0,$4=0,$40=0.0,$41=0,$42=0.0,$43=0.0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0;var $57=0.0,$58=0.0,$59=0.0,$6=0,$60=0.0,$61=0.0,$62=0.0,$63=0.0,$64=0.0,$65=0.0,$66=0.0,$67=0.0,$68=0,$69=0,$7=0,$70=0,$71=0.0,$72=0.0,$73=0.0,$74=0;var $75=0,$76=0.0,$77=0.0,$78=0.0,$79=0,$8=0,$80=0,$81=0.0,$82=0.0,$83=0,$84=0.0,$85=0.0,$86=0.0,$87=0.0,$88=0.0,$89=0.0,$9=0.0,$90=0.0,$91=0.0,$92=0.0;var $93=0.0,$94=0.0,$95=0.0,$96=0.0,$97=0.0,$98=0.0,$99=0.0,$ch$0=0,$ch$1=0,$exitcond$i=0,$exitcond46$i=0,$fabsf$i$i=0.0,$i$033$i=0,$i$126$i=0,$i$227$i=0,$i$316$i=0,$i$411$i=0,$i$5$lcssa$i=0,$i$514$i=0,$i$613$i=0;var $i$tr$lcssa$i$i=0,$i$tr1$i$i=0,$i$tr1$i$i$phi=0,$j$0$lcssa$i=0,$j$028$i=0,$j$1$i=0,$j$3$i=0,$j$412$i=0,$j$tr2$i$i=0,$k$0$lcssa$i=0,$k$0$lcssa$i$lcssa=0,$k$018$i=0,$len$$i=0,$sum$025$i=0.0,$xvalue$017$i=0.0,label=0,sp=0;sp=STACKTOP;$0=$gfc+84036|0;$1=HEAP32[$0>>2]|0;$2=$gfc+76|0;$3=HEAP32[$2>>2]|0;$4=$3*576|0;$5=$gfc+72|0;$6=HEAP32[$5>>2]|0;$7=$gfc+64|0;$8=HEAP32[$7>>2]|0;$9=+($8|0);$10=$9*0.99949997663497925;$11=~~$10;$12=$gfc+60|0;$13=HEAP32[$12>>2]|0;$14=($13|0)<($11|0);if(!$14){$15=$9*1.000499963760376;$16=~~$15;$17=($16|0)<($13|0);if(!$17){$194=($4|0)<($nsamples|0);$195=$194?$4:$nsamples;$196=$195<<2;$ch$1=0;while(1){$197=$mfbuf+($ch$1<<2)|0;$198=HEAP32[$197>>2]|0;$199=$198+($1<<2)|0;$200=$in_buffer+($ch$1<<2)|0;$201=HEAP32[$200>>2]|0;_memcpy($199|0,$201|0,$196|0)|0;$202=$ch$1+1|0;$203=($202|0)<($6|0);if($203){$ch$1=$202}else{break}}HEAP32[$n_out>>2]=$195;HEAP32[$n_in>>2]=$195;return}}$18=$gfc+12|0;$19=$gfc+37184|0;$20=$gfc+37188|0;$21=$gfc+37168|0;$22=($3|0)>0;$28=$13;$30=$8;$ch$0=0;while(1){$23=$mfbuf+($ch$0<<2)|0;$24=HEAP32[$23>>2]|0;$25=$in_buffer+($ch$0<<2)|0;$26=HEAP32[$25>>2]|0;$27=+($28|0);$29=+($30|0);$31=$27/$29;$32=($28|0)==0;if($32){$i$tr$lcssa$i$i=$30}else{$i$tr1$i$i=$30;$j$tr2$i$i=$28;while(1){$33=($i$tr1$i$i|0)%($j$tr2$i$i|0)&-1;$34=($33|0)==0;if($34){$i$tr$lcssa$i$i=$j$tr2$i$i;break}else{$i$tr1$i$i$phi=$j$tr2$i$i;$j$tr2$i$i=$33;$i$tr1$i$i=$i$tr1$i$i$phi}}}$35=($30|0)/($i$tr$lcssa$i$i|0)&-1;$36=($35|0)>320;$$$i=$36?320:$35;$37=$31+0.5;$38=+Math_floor(+$37);$39=$31-$38;$40=+Math_abs(+$39);$41=$40<1.0E-4;$42=1.0/$31;$43=$42;$44=$43>1.0;$45=$41?32:31;$46=$45+1|0;$47=HEAP32[$18>>2]|0;$48=($47|0)==0;if($48){$49=_calloc($46,4)|0;HEAP32[$19>>2]=$49;$50=_calloc($46,4)|0;HEAP32[$20>>2]=$50;$51=$$$i<<1;$52=($$$i|0)<0;if($52){HEAP32[$21>>2]=0|0;HEAP32[$21+4>>2]=0|0;HEAP32[$21+8>>2]=0|0;HEAP32[$21+12>>2]=0|0;$j$0$lcssa$i=0}else{$i$033$i=0;while(1){$53=_calloc($46,4)|0;$54=($gfc+37192|0)+($i$033$i<<2)|0;HEAP32[$54>>2]=$53;$55=$i$033$i+1|0;$56=($i$033$i|0)<($51|0);if($56){$i$033$i=$55}else{break}}HEAP32[$21>>2]=0|0;HEAP32[$21+4>>2]=0|0;HEAP32[$21+8>>2]=0|0;HEAP32[$21+12>>2]=0|0;$57=+($$$i|0);$58=$57*2.0;$59=$43;$$op$i=$59*3.1415926535897931;$60=$$op$i;$61=$44?3.1415927410125732:$60;$62=+($45|0);$63=$61;$64=$63*0.31830988618379069;$65=$61*$62;$66=+($45|0);$67=$66*3.1415926535897931;$68=($35|0)<320;$$op54$i=$35<<1;$$op54$op$i=$$op54$i^-2;$$op54$op$op$i=-2-$$op54$op$i|0;$69=$68?$$op54$op$op$i:640;$j$028$i=0;while(1){$70=$j$028$i-$$$i|0;$71=+($70|0);$72=$71/$58;$73=$72;$74=($gfc+37192|0)+($j$028$i<<2)|0;$75=HEAP32[$74>>2]|0;$i$126$i=0;$sum$025$i=0.0;while(1){$76=+($i$126$i|0);$77=$76-$73;$78=$77/$62;$79=$78<0.0;$$01$i$i=$79?0.0:$78;$80=$$01$i$i>1.0;$$1$i$i=$80?1.0:$$01$i$i;$81=$$1$i$i+-0.5;$fabsf$i$i=+Math_abs(+$81);$82=$fabsf$i$i;$83=$82<1.0000000000000001E-9;if($83){$$0$in$i$i=$64}else{$84=$81;$85=$$1$i$i*2.0;$86=$85;$87=$86*3.1415926535897931;$88=+Math_cos(+$87);$89=$88*0.5;$90=0.41999999999999998-$89;$91=$$1$i$i*4.0;$92=$91;$93=$92*3.1415926535897931;$94=+Math_cos(+$93);$95=$94*0.080000000000000002;$96=$90+$95;$97=$96;$98=$97;$99=$65*$81;$100=$99;$101=+Math_sin(+$100);$102=$98*$101;$103=$67*$84;$104=$102/$103;$$0$in$i$i=$104}$$0$i$i=$$0$in$i$i;$105=$75+($i$126$i<<2)|0;HEAPF32[$105>>2]=$$0$i$i;$106=$$0$i$i+$sum$025$i;$107=$i$126$i+1|0;$108=($i$126$i|0)<($45|0);if($108){$i$126$i=$107;$sum$025$i=$106}else{$$lcssa=$106;break}}$i$227$i=0;while(1){$109=$75+($i$227$i<<2)|0;$110=+HEAPF32[$109>>2];$111=$110/$$lcssa;HEAPF32[$109>>2]=$111;$112=$i$227$i+1|0;$113=($i$227$i|0)<($45|0);if($113){$i$227$i=$112}else{break}}$114=$j$028$i+1|0;$115=($j$028$i|0)<($51|0);if($115){$j$028$i=$114}else{break}}$116=($69|0)>0;$$op55$i=$69|1;$117=$116?$$op55$i:1;$j$0$lcssa$i=$117}HEAP32[$18>>2]=1;$j$1$i=$j$0$lcssa$i}else{$j$1$i=0}$118=($gfc+37184|0)+($ch$0<<2)|0;$119=HEAP32[$118>>2]|0;$120=($gfc+37168|0)+($ch$0<<3)|0;L36:do{if($22){$121=$45>>>1;$122=$45-$121|0;$123=$45&1;$124=+($123|0);$125=$124*0.5;$126=+($$$i|0);$127=$126*2.0;$$pre$i=+HEAPF64[$120>>3];$k$018$i=0;while(1){$128=+($k$018$i|0);$129=$128*$31;$130=$129-$$pre$i;$131=+Math_floor(+$130);$132=~~$131;$133=$132+$122|0;$134=($133|0)<($nsamples|0);if(!$134){$$pre$phi52$iZ2D=$122;$168=$$pre$i;$j$3$i=$132;$k$0$lcssa$i=$k$018$i;break L36}$135=+($132|0);$$neg4$i=$130-$125;$136=$$neg4$i-$135;$137=$136;$138=$127*$137;$139=$138+$126;$140=$139;$141=$140+0.5;$142=+Math_floor(+$141);$143=~~$142;$144=$132-$121|0;$145=($gfc+37192|0)+($143<<2)|0;$146=HEAP32[$145>>2]|0;$i$316$i=0;$xvalue$017$i=0.0;while(1){$147=$i$316$i+$144|0;$148=($147|0)<0;$149=$147+$46|0;$150=$119+($149<<2)|0;$151=$26+($147<<2)|0;$$in$i=$148?$150:$151;$152=+HEAPF32[$$in$i>>2];$153=$146+($i$316$i<<2)|0;$154=+HEAPF32[$153>>2];$155=$154*$152;$156=$155+$xvalue$017$i;$157=$i$316$i+1|0;$158=($i$316$i|0)<($45|0);if($158){$i$316$i=$157;$xvalue$017$i=$156}else{$$lcssa20=$156;break}}$$sum=$k$018$i+$1|0;$159=$24+($$sum<<2)|0;HEAPF32[$159>>2]=$$lcssa20;$160=$k$018$i+1|0;$161=($160|0)<($4|0);if($161){$k$018$i=$160}else{$$pre$phi52$iZ2D=$122;$168=$$pre$i;$j$3$i=$132;$k$0$lcssa$i=$160;break}}}else{$$pre49$i=+HEAPF64[$120>>3];$$pre50$i=$45>>>1;$$pre51$i=$45-$$pre50$i|0;$$pre$phi52$iZ2D=$$pre51$i;$168=$$pre49$i;$j$3$i=$j$1$i;$k$0$lcssa$i=0}}while(0);$162=$j$3$i+$$pre$phi52$iZ2D|0;$163=($162|0)>($nsamples|0);$len$$i=$163?$nsamples:$162;HEAP32[$n_in>>2]=$len$$i;$164=+($len$$i|0);$165=+($k$0$lcssa$i|0);$166=$165*$31;$167=$168-$166;$169=$167+$164;HEAPF64[$120>>3]=$169;$170=($45|0)<($len$$i|0);if($170){$$neg7$i=$45^-1;$171=$len$$i+$$neg7$i|0;$i$411$i=0;while(1){$172=$171+$i$411$i|0;$173=$26+($172<<2)|0;$174=HEAP32[$173>>2]|0;$175=$119+($i$411$i<<2)|0;HEAP32[$175>>2]=$174;$176=$i$411$i+1|0;$177=($176|0)<($46|0);if($177){$i$411$i=$176}else{break}}}else{$178=$46-$len$$i|0;$179=($178|0)>0;if($179){$i$514$i=0;while(1){$182=$i$514$i+$len$$i|0;$183=$119+($182<<2)|0;$184=HEAP32[$183>>2]|0;$185=$119+($i$514$i<<2)|0;HEAP32[$185>>2]=$184;$186=$i$514$i+1|0;$exitcond46$i=($186|0)==($178|0);if($exitcond46$i){$i$5$lcssa$i=$178;break}else{$i$514$i=$186}}}else{$i$5$lcssa$i=0}$180=($45|0)<($i$5$lcssa$i|0);if(!$180){$181=$46-$i$5$lcssa$i|0;$i$613$i=$i$5$lcssa$i;$j$412$i=0;while(1){$187=$26+($j$412$i<<2)|0;$188=HEAP32[$187>>2]|0;$189=$119+($i$613$i<<2)|0;HEAP32[$189>>2]=$188;$190=$i$613$i+1|0;$191=$j$412$i+1|0;$exitcond$i=($191|0)==($181|0);if($exitcond$i){break}else{$i$613$i=$190;$j$412$i=$191}}}}$192=$ch$0+1|0;$193=($192|0)<($6|0);if(!$193){$k$0$lcssa$i$lcssa=$k$0$lcssa$i;break}$$pre=HEAP32[$12>>2]|0;$$pre10=HEAP32[$7>>2]|0;$28=$$pre;$30=$$pre10;$ch$0=$192}HEAP32[$n_out>>2]=$k$0$lcssa$i$lcssa;return}function _lame_report_def($format,$args){$format=$format|0;$args=$args|0;var $0=0,label=0,sp=0;sp=STACKTOP;$0=HEAP32[_stderr>>2]|0;_vfprintf($0|0,$format|0,$args|0)|0;_fflush($0|0)|0;return}function _lame_msgf($gfc,$format,$varargs){$gfc=$gfc|0;$format=$format|0;$varargs=$varargs|0;var $0=0,$1=0,$2=0,$3=0,$4=0,$args=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$args=sp;$0=($gfc|0)==(0|0);if($0){STACKTOP=sp;return}$1=$gfc+85828|0;$2=HEAP32[$1>>2]|0;$3=($2|0)==(0|0);if($3){STACKTOP=sp;return}HEAP32[$args>>2]=$varargs;$4=HEAP32[$1>>2]|0;FUNCTION_TABLE_vii[$4&3]($format,$args);STACKTOP=sp;return}function _lame_errorf($gfc,$format,$varargs){$gfc=$gfc|0;$format=$format|0;$varargs=$varargs|0;var $0=0,$1=0,$2=0,$3=0,$4=0,$args=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$args=sp;$0=($gfc|0)==(0|0);if($0){STACKTOP=sp;return}$1=$gfc+85836|0;$2=HEAP32[$1>>2]|0;$3=($2|0)==(0|0);if($3){STACKTOP=sp;return}HEAP32[$args>>2]=$varargs;$4=HEAP32[$1>>2]|0;FUNCTION_TABLE_vii[$4&3]($format,$args);STACKTOP=sp;return}function _has_MMX(){var label=0,sp=0;sp=STACKTOP;return 0}function _has_3DNow(){var label=0,sp=0;sp=STACKTOP;return 0}function _has_SSE(){var label=0,sp=0;sp=STACKTOP;return 0}function _has_SSE2(){var label=0,sp=0;sp=STACKTOP;return 0}function _disable_FPE(){var label=0,sp=0;sp=STACKTOP;return}function _init_log_table(){var $0=0,$1=0,$10=0,$2=0.0,$3=0.0,$4=0.0,$5=0.0,$6=0.0,$7=0.0,$8=0.0,$9=0,$exitcond=0,$j$01=0,label=0,sp=0;sp=STACKTOP;$0=HEAP32[89640>>2]|0;$1=($0|0)==0;if($1){$j$01=0}else{HEAP32[89640>>2]=1;return}while(1){$2=+($j$01|0);$3=$2*0.001953125;$4=$3+1.0;$5=$4;$6=+Math_log(+$5);$7=$6*1.4426950408889634;$8=$7;$9=89648+($j$01<<2)|0;HEAPF32[$9>>2]=$8;$10=$j$01+1|0;$exitcond=($10|0)==513;if($exitcond){break}else{$j$01=$10}}HEAP32[89640>>2]=1;return}function _fast_log2($x){$x=+$x;var $0=0,$1=0,$10=0,$11=0.0,$12=0.0,$13=0.0,$14=0,$15=0,$16=0.0,$17=0.0,$18=0.0,$19=0.0,$2=0,$3=0,$4=0.0,$5=0,$6=0.0,$7=0.0,$8=0,$9=0;var label=0,sp=0;sp=STACKTOP;$0=(HEAPF32[tempDoublePtr>>2]=$x,HEAP32[tempDoublePtr>>2]|0);$1=$0>>>23;$2=$1&255;$3=$2+-127|0;$4=+($3|0);$5=$0&16383;$6=+($5|0);$7=$6*6.103515625E-5;$8=$0>>>14;$9=$8&511;$10=89648+($9<<2)|0;$11=+HEAPF32[$10>>2];$12=1.0-$7;$13=$11*$12;$14=$9+1|0;$15=89648+($14<<2)|0;$16=+HEAPF32[$15>>2];$17=$16*$7;$18=$13+$4;$19=$18+$17;return+$19}function _get_lame_short_version(){var label=0,sp=0;sp=STACKTOP;return 91704|0}function _qsort($base,$nel,$width,$cmp){$base=$base|0;$nel=$nel|0;$width=$width|0;$cmp=$cmp|0;var $$=0,$$0$be$i=0,$$0$be$i19=0,$$0$i44=0,$$01$be$i=0,$$01$be$i18=0,$$012$i=0,$$012$i15=0,$$02$i$i=0,$$02$i3$i=0,$$02$us$i=0,$$02$us$i30=0,$$03$i=0,$$03$i14=0,$$66=0,$$67=0,$$lcssa=0,$$lcssa102=0,$$lcssa70=0,$$lcssa71=0;var $$pre=0,$$pre$i=0,$$pre$i21=0,$$pre6$i=0,$$pre6$i26=0,$$sum=0,$$sum$i=0,$$sum$i17=0,$$sum2=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0;var $108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0;var $126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0;var $144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0;var $162=0,$163=0,$164=0,$165=0,$166=0,$167=0,$168=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0;var $29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$4$phi=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0;var $46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0;var $64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0;var $82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$ar$i=0;var $exitcond$i=0,$exitcond$i29=0,$head$0$lcssa=0,$head$076=0,$head$174=0,$i$0=0,$i$0$lcssa$i=0,$i$0$lcssa$i23=0,$i$01$us$i=0,$i$01$us$i28=0,$i$04$i=0,$i$04$i13=0,$lp=0,$nTrailingZeros$03$i$i=0,$nTrailingZeros$03$i2$i=0,$nTrailingZeros$03$i2$i$lcssa=0,$or$cond=0,$or$cond68=0,$or$cond6873=0,$or$cond72=0;var $pshift$0$lcssa=0,$pshift$077=0,$pshift$1=0,$pshift$275=0,$sum=0,$sum$i=0,$sum$i16=0,$tmp$i25=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+688|0;$tmp$i25=sp+424|0;$ar$i=sp+192|0;$lp=sp;$0=Math_imul($width,$nel)|0;$1=($0|0)==0;if($1){STACKTOP=sp;return}$$sum=$0-$width|0;$2=$lp+4|0;HEAP32[$2>>2]=$width;HEAP32[$lp>>2]=$width;$4=$width;$6=$width;$i$0=2;while(1){$3=$4+$width|0;$5=$3+$6|0;$7=$lp+($i$0<<2)|0;HEAP32[$7>>2]=$5;$8=$5>>>0<$0>>>0;$9=$i$0+1|0;if($8){$4$phi=$6;$6=$5;$i$0=$9;$4=$4$phi}else{break}}$10=0-$width|0;$11=$base+$$sum|0;$12=($$sum|0)>0;if($12){$13=($width|0)==0;$14=$11;$16=1;$51=0;$head$076=$base;$pshift$077=1;while(1){$15=$16&3;$17=($15|0)==3;do{if($17){HEAP32[$ar$i>>2]=$head$076;$18=($pshift$077|0)>1;L13:do{if($18){$$012$i=$pshift$077;$$03$i=$head$076;$24=$head$076;$i$04$i=1;while(1){$19=$$03$i+$10|0;$20=$$012$i+-2|0;$21=$lp+($20<<2)|0;$22=HEAP32[$21>>2]|0;$sum$i=$22+$width|0;$$sum$i=0-$sum$i|0;$23=$$03$i+$$sum$i|0;$25=FUNCTION_TABLE_iii[$cmp&1]($24,$23)|0;$26=($25|0)>-1;if($26){$27=FUNCTION_TABLE_iii[$cmp&1]($24,$19)|0;$28=($27|0)>-1;if($28){$i$0$lcssa$i=$i$04$i;break}}$29=FUNCTION_TABLE_iii[$cmp&1]($23,$19)|0;$30=($29|0)>-1;$31=$i$04$i+1|0;$32=$ar$i+($i$04$i<<2)|0;if($30){HEAP32[$32>>2]=$23;$33=$$012$i+-1|0;$$0$be$i=$23;$$01$be$i=$33}else{HEAP32[$32>>2]=$19;$$0$be$i=$19;$$01$be$i=$20}$34=($$01$be$i|0)>1;if(!$34){$i$0$lcssa$i=$31;break}$$pre$i=HEAP32[$ar$i>>2]|0;$$012$i=$$01$be$i;$$03$i=$$0$be$i;$24=$$pre$i;$i$04$i=$31}$35=($i$0$lcssa$i|0)<2;if(!$35){$36=$ar$i+($i$0$lcssa$i<<2)|0;HEAP32[$36>>2]=$tmp$i25;if(!$13){$$02$us$i=$width;$48=$tmp$i25;while(1){$46=$$02$us$i>>>0>256;$38=$46?256:$$02$us$i;$47=HEAP32[$ar$i>>2]|0;_memcpy($48|0,$47|0,$38|0)|0;$44=$47;$i$01$us$i=0;while(1){$40=$ar$i+($i$01$us$i<<2)|0;$41=$i$01$us$i+1|0;$42=$ar$i+($41<<2)|0;$43=HEAP32[$42>>2]|0;_memcpy($44|0,$43|0,$38|0)|0;$45=$44+$38|0;HEAP32[$40>>2]=$45;$exitcond$i=($41|0)==($i$0$lcssa$i|0);if($exitcond$i){break}else{$44=$43;$i$01$us$i=$41}}$37=($$02$us$i|0)==($38|0);if($37){break L13}$39=$$02$us$i-$38|0;$$pre6$i=HEAP32[$36>>2]|0;$$02$us$i=$39;$48=$$pre6$i}}}}else{}}while(0);$49=$16>>>2;$50=$51<<30;$52=$49|$50;$53=$51>>>2;$54=$pshift$077+2|0;$105=$52;$168=$53;$pshift$1=$54}else{$55=$pshift$077+-1|0;$56=$lp+($55<<2)|0;$57=HEAP32[$56>>2]|0;$58=$head$076;$59=$14-$58|0;$60=$57>>>0<$59>>>0;if($60){HEAP32[$ar$i>>2]=$head$076;$61=($pshift$077|0)>1;L38:do{if($61){$$012$i15=$pshift$077;$$03$i14=$head$076;$67=$head$076;$i$04$i13=1;while(1){$62=$$03$i14+$10|0;$63=$$012$i15+-2|0;$64=$lp+($63<<2)|0;$65=HEAP32[$64>>2]|0;$sum$i16=$65+$width|0;$$sum$i17=0-$sum$i16|0;$66=$$03$i14+$$sum$i17|0;$68=FUNCTION_TABLE_iii[$cmp&1]($67,$66)|0;$69=($68|0)>-1;if($69){$70=FUNCTION_TABLE_iii[$cmp&1]($67,$62)|0;$71=($70|0)>-1;if($71){$i$0$lcssa$i23=$i$04$i13;break}}$72=FUNCTION_TABLE_iii[$cmp&1]($66,$62)|0;$73=($72|0)>-1;$74=$i$04$i13+1|0;$75=$ar$i+($i$04$i13<<2)|0;if($73){HEAP32[$75>>2]=$66;$76=$$012$i15+-1|0;$$0$be$i19=$66;$$01$be$i18=$76}else{HEAP32[$75>>2]=$62;$$0$be$i19=$62;$$01$be$i18=$63}$77=($$01$be$i18|0)>1;if(!$77){$i$0$lcssa$i23=$74;break}$$pre$i21=HEAP32[$ar$i>>2]|0;$$012$i15=$$01$be$i18;$$03$i14=$$0$be$i19;$67=$$pre$i21;$i$04$i13=$74}$78=($i$0$lcssa$i23|0)<2;if(!$78){$79=$ar$i+($i$0$lcssa$i23<<2)|0;HEAP32[$79>>2]=$tmp$i25;if(!$13){$$02$us$i30=$width;$91=$tmp$i25;while(1){$89=$$02$us$i30>>>0>256;$81=$89?256:$$02$us$i30;$90=HEAP32[$ar$i>>2]|0;_memcpy($91|0,$90|0,$81|0)|0;$87=$90;$i$01$us$i28=0;while(1){$83=$ar$i+($i$01$us$i28<<2)|0;$84=$i$01$us$i28+1|0;$85=$ar$i+($84<<2)|0;$86=HEAP32[$85>>2]|0;_memcpy($87|0,$86|0,$81|0)|0;$88=$87+$81|0;HEAP32[$83>>2]=$88;$exitcond$i29=($84|0)==($i$0$lcssa$i23|0);if($exitcond$i29){break}else{$87=$86;$i$01$us$i28=$84}}$80=($$02$us$i30|0)==($81|0);if($80){break L38}$82=$$02$us$i30-$81|0;$$pre6$i26=HEAP32[$79>>2]|0;$$02$us$i30=$82;$91=$$pre6$i26}}}}else{}}while(0)}else{_trinkle($head$076,$width,$cmp,$16,$51,$pshift$077,0,$lp)}$92=($pshift$077|0)==1;if($92){$93=$51<<1;$94=$16>>>31;$95=$94|$93;$96=$16<<1;$105=$96;$168=$95;$pshift$1=0;break}else{$97=$55>>>0>31;$98=$pshift$077+-33|0;$$=$97?0:$16;$$66=$97?$16:$51;$$67=$97?$98:$55;$99=$$66<<$$67;$100=32-$$67|0;$101=$$>>>$100;$102=$101|$99;$103=$$<<$$67;$105=$103;$168=$102;$pshift$1=1;break}}}while(0);$104=$105|1;$106=$head$076+$width|0;$107=$106>>>0<$11>>>0;if($107){$16=$104;$51=$168;$head$076=$106;$pshift$077=$pshift$1}else{$$lcssa70=$168;$$lcssa71=$104;$head$0$lcssa=$106;$pshift$0$lcssa=$pshift$1;break}}}else{$$lcssa70=0;$$lcssa71=1;$head$0$lcssa=$base;$pshift$0$lcssa=1}_trinkle($head$0$lcssa,$width,$cmp,$$lcssa71,$$lcssa70,$pshift$0$lcssa,0,$lp);$108=($pshift$0$lcssa|0)==1;$109=($$lcssa71|0)==1;$or$cond72=$109&$108;$110=($$lcssa70|0)==0;$or$cond6873=$110&$or$cond72;if($or$cond6873){STACKTOP=sp;return}else{$113=$$lcssa71;$122=$$lcssa70;$head$174=$head$0$lcssa;$pshift$275=$pshift$0$lcssa}while(1){$111=($pshift$275|0)<2;if(!$111){$136=$122<<2;$137=$113>>>30;$138=$137|$136;$139=$pshift$275+-2|0;$140=$113<<1;$141=$140&2147483646;$142=$137<<31;$143=$141|$142;$144=$143^3;$145=$138>>>1;$146=$lp+($139<<2)|0;$147=HEAP32[$146>>2]|0;$sum=$147+$width|0;$$sum2=0-$sum|0;$148=$head$174+$$sum2|0;$149=$pshift$275+-1|0;_trinkle($148,$width,$cmp,$144,$145,$149,1,$lp);$150=$145<<1;$151=$137&1;$152=$150|$151;$153=$144<<1;$154=$153|1;$155=$head$174+$10|0;_trinkle($155,$width,$cmp,$154,$152,$139,1,$lp);$113=$154;$122=$152;$head$174=$155;$pshift$275=$139;continue}$112=$113+-1|0;$114=($112|0)==0;do{if($114){$135=32;label=56}else{$115=$112&1;$116=($115|0)==0;if($116){$$02$i$i=$112;$nTrailingZeros$03$i$i=0;while(1){$117=$nTrailingZeros$03$i$i+1|0;$118=$$02$i$i>>>1;$119=$118&1;$120=($119|0)==0;if($120){$$02$i$i=$118;$nTrailingZeros$03$i$i=$117}else{$$lcssa=$117;break}}$121=($$lcssa|0)==0;if($121){label=51}else{$132=$$lcssa}}else{label=51}if((label|0)==51){label=0;$123=($122|0)==0;if($123){$135=64;label=56;break}$124=$122&1;$125=($124|0)==0;if($125){$$02$i3$i=$122;$nTrailingZeros$03$i2$i=0}else{$$0$i44=0;$157=$113;$160=$122;$164=0;break}while(1){$126=$nTrailingZeros$03$i2$i+1|0;$127=$$02$i3$i>>>1;$128=$127&1;$129=($128|0)==0;if($129){$$02$i3$i=$127;$nTrailingZeros$03$i2$i=$126}else{$$lcssa102=$126;$nTrailingZeros$03$i2$i$lcssa=$nTrailingZeros$03$i2$i;break}}$130=$nTrailingZeros$03$i2$i$lcssa+33|0;$131=($$lcssa102|0)==0;if($131){$$0$i44=0;$157=$113;$160=$122;$164=0;break}else{$132=$130}}$133=$132>>>0>31;if($133){$135=$132;label=56}else{$$0$i44=$132;$157=$113;$160=$122;$164=$132}}}while(0);if((label|0)==56){label=0;$134=$135+-32|0;$$0$i44=$134;$157=$122;$160=0;$164=$135}$156=$157>>>$$0$i44;$158=32-$$0$i44|0;$159=$160<<$158;$161=$159|$156;$162=$160>>>$$0$i44;$163=$164+$pshift$275|0;$$pre=$head$174+$10|0;$165=($163|0)==1;$166=($161|0)==1;$or$cond=$166&$165;$167=($162|0)==0;$or$cond68=$167&$or$cond;if($or$cond68){break}else{$113=$161;$122=$162;$head$174=$$pre;$pshift$275=$163}}STACKTOP=sp;return}function _trinkle($head,$width,$cmp,$pp$val,$pp$1$val,$pshift,$trusty,$lp){$head=$head|0;$width=$width|0;$cmp=$cmp|0;$pp$val=$pp$val|0;$pp$1$val=$pp$1$val|0;$pshift=$pshift|0;$trusty=$trusty|0;$lp=$lp|0;var $$0$be$i=0,$$0$i=0,$$0$lcssa=0,$$0$lcssa49=0,$$01$be$i=0,$$01162=0,$$01162$phi=0,$$012$i=0,$$02$i$i=0,$$02$i3$i=0,$$02$lcssa=0,$$02$lcssa51=0,$$02$us$i=0,$$02$us$i10=0,$$02964=0,$$03$i=0,$$03$lcssa=0,$$03865=0,$$lcssa=0,$$lcssa76=0;var $$pre=0,$$pre$i=0,$$pre6$i=0,$$pre6$i6=0,$$sum=0,$$sum$i=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0,$105=0,$106=0,$107=0,$108=0,$109=0,$11=0;var $110=0,$111=0,$112=0,$113=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0;var $27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0;var $45=0,$46=0,$47=0,$48=0,$49=0,$5=0,$50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0;var $63=0,$64=0,$65=0,$66=0,$67=0,$68=0,$69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0;var $81=0,$82=0,$83=0,$84=0,$85=0,$86=0,$87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0;var $ar=0,$ar$i=0,$exitcond$i=0,$exitcond$i9=0,$i$0$lcssa=0,$i$0$lcssa$i=0,$i$0$lcssa50=0,$i$01$us$i=0,$i$01$us$i8=0,$i$01063=0,$i$04$i=0,$nTrailingZeros$03$i$i=0,$nTrailingZeros$03$i2$i=0,$nTrailingZeros$03$i2$i$lcssa=0,$or$cond=0,$pp$val1666=0,$sum=0,$sum$i=0,$tmp$i5=0,label=0;var sp=0;sp=STACKTOP;STACKTOP=STACKTOP+720|0;$tmp$i5=sp+456|0;$ar$i=sp+228|0;$ar=sp;HEAP32[$ar>>2]=$head;$0=0-$width|0;$1=($pp$val|0)!=1;$2=($pp$1$val|0)!=0;$3=$2|$1;L1:do{if($3){$4=$lp+($pshift<<2)|0;$5=HEAP32[$4>>2]|0;$6=0-$5|0;$7=$head+$6|0;$8=FUNCTION_TABLE_iii[$cmp&1]($7,$head)|0;$9=($8|0)<1;if($9){$$0$lcssa=$head;$$02$lcssa=$pshift;$$03$lcssa=$trusty;$i$0$lcssa=1;label=18}else{$$01162=$head;$$02964=$pshift;$$03865=$trusty;$16=$7;$33=$pp$1$val;$i$01063=1;$pp$val1666=$pp$val;while(1){$10=($$03865|0)==0;$11=($$02964|0)>1;$or$cond=$10&$11;if($or$cond){$12=$$01162+$0|0;$13=$$02964+-2|0;$14=$lp+($13<<2)|0;$15=HEAP32[$14>>2]|0;$17=FUNCTION_TABLE_iii[$cmp&1]($12,$16)|0;$18=($17|0)>-1;if($18){$$0$lcssa49=$$01162;$$02$lcssa51=$$02964;$i$0$lcssa50=$i$01063;break L1}$sum=$15+$width|0;$$sum=0-$sum|0;$19=$$01162+$$sum|0;$20=FUNCTION_TABLE_iii[$cmp&1]($19,$16)|0;$21=($20|0)>-1;if($21){$$0$lcssa49=$$01162;$$02$lcssa51=$$02964;$i$0$lcssa50=$i$01063;break L1}}$22=$i$01063+1|0;$23=$ar+($i$01063<<2)|0;HEAP32[$23>>2]=$16;$24=$pp$val1666+-1|0;$25=($24|0)==0;do{if($25){$46=32;label=15}else{$26=$24&1;$27=($26|0)==0;if($27){$$02$i$i=$24;$nTrailingZeros$03$i$i=0;while(1){$28=$nTrailingZeros$03$i$i+1|0;$29=$$02$i$i>>>1;$30=$29&1;$31=($30|0)==0;if($31){$$02$i$i=$29;$nTrailingZeros$03$i$i=$28}else{$$lcssa=$28;break}}$32=($$lcssa|0)==0;if($32){label=10}else{$43=$$lcssa}}else{label=10}if((label|0)==10){label=0;$34=($33|0)==0;if($34){$46=64;label=15;break}$35=$33&1;$36=($35|0)==0;if($36){$$02$i3$i=$33;$nTrailingZeros$03$i2$i=0}else{$$0$i=0;$48=$pp$val1666;$51=$33;$55=0;break}while(1){$37=$nTrailingZeros$03$i2$i+1|0;$38=$$02$i3$i>>>1;$39=$38&1;$40=($39|0)==0;if($40){$$02$i3$i=$38;$nTrailingZeros$03$i2$i=$37}else{$$lcssa76=$37;$nTrailingZeros$03$i2$i$lcssa=$nTrailingZeros$03$i2$i;break}}$41=$nTrailingZeros$03$i2$i$lcssa+33|0;$42=($$lcssa76|0)==0;if($42){$$0$i=0;$48=$pp$val1666;$51=$33;$55=0;break}else{$43=$41}}$44=$43>>>0>31;if($44){$46=$43;label=15}else{$$0$i=$43;$48=$pp$val1666;$51=$33;$55=$43}}}while(0);if((label|0)==15){label=0;$45=$46+-32|0;$$0$i=$45;$48=$33;$51=0;$55=$46}$47=$48>>>$$0$i;$49=32-$$0$i|0;$50=$51<<$49;$52=$50|$47;$53=$51>>>$$0$i;$54=$55+$$02964|0;$56=($52|0)!=1;$57=($53|0)!=0;$58=$57|$56;if(!$58){$$0$lcssa49=$16;$$02$lcssa51=$54;$i$0$lcssa50=$22;break L1}$$pre=HEAP32[$ar>>2]|0;$59=$lp+($54<<2)|0;$60=HEAP32[$59>>2]|0;$61=0-$60|0;$62=$16+$61|0;$63=FUNCTION_TABLE_iii[$cmp&1]($62,$$pre)|0;$64=($63|0)<1;if($64){$$0$lcssa=$16;$$02$lcssa=$54;$$03$lcssa=0;$i$0$lcssa=$22;label=18;break}else{$$01162$phi=$16;$$02964=$54;$$03865=0;$16=$62;$33=$53;$i$01063=$22;$pp$val1666=$52;$$01162=$$01162$phi}}}}else{$$0$lcssa=$head;$$02$lcssa=$pshift;$$03$lcssa=$trusty;$i$0$lcssa=1;label=18}}while(0);if((label|0)==18){$65=($$03$lcssa|0)==0;if($65){$$0$lcssa49=$$0$lcssa;$$02$lcssa51=$$02$lcssa;$i$0$lcssa50=$i$0$lcssa}else{STACKTOP=sp;return}}$66=($i$0$lcssa50|0)<2;L30:do{if(!$66){$67=$ar+($i$0$lcssa50<<2)|0;HEAP32[$67>>2]=$tmp$i5;$68=($width|0)==0;if(!$68){$$02$us$i10=$width;$80=$tmp$i5;while(1){$78=$$02$us$i10>>>0>256;$70=$78?256:$$02$us$i10;$79=HEAP32[$ar>>2]|0;_memcpy($80|0,$79|0,$70|0)|0;$76=$79;$i$01$us$i8=0;while(1){$72=$ar+($i$01$us$i8<<2)|0;$73=$i$01$us$i8+1|0;$74=$ar+($73<<2)|0;$75=HEAP32[$74>>2]|0;_memcpy($76|0,$75|0,$70|0)|0;$77=$76+$70|0;HEAP32[$72>>2]=$77;$exitcond$i9=($73|0)==($i$0$lcssa50|0);if($exitcond$i9){break}else{$76=$75;$i$01$us$i8=$73}}$69=($$02$us$i10|0)==($70|0);if($69){break L30}$71=$$02$us$i10-$70|0;$$pre6$i6=HEAP32[$67>>2]|0;$$02$us$i10=$71;$80=$$pre6$i6}}}}while(0);HEAP32[$ar$i>>2]=$$0$lcssa49;$81=($$02$lcssa51|0)>1;L39:do{if($81){$$012$i=$$02$lcssa51;$$03$i=$$0$lcssa49;$87=$$0$lcssa49;$i$04$i=1;while(1){$82=$$03$i+$0|0;$83=$$012$i+-2|0;$84=$lp+($83<<2)|0;$85=HEAP32[$84>>2]|0;$sum$i=$85+$width|0;$$sum$i=0-$sum$i|0;$86=$$03$i+$$sum$i|0;$88=FUNCTION_TABLE_iii[$cmp&1]($87,$86)|0;$89=($88|0)>-1;if($89){$90=FUNCTION_TABLE_iii[$cmp&1]($87,$82)|0;$91=($90|0)>-1;if($91){$i$0$lcssa$i=$i$04$i;break}}$92=FUNCTION_TABLE_iii[$cmp&1]($86,$82)|0;$93=($92|0)>-1;$94=$i$04$i+1|0;$95=$ar$i+($i$04$i<<2)|0;if($93){HEAP32[$95>>2]=$86;$96=$$012$i+-1|0;$$0$be$i=$86;$$01$be$i=$96}else{HEAP32[$95>>2]=$82;$$0$be$i=$82;$$01$be$i=$83}$97=($$01$be$i|0)>1;if(!$97){$i$0$lcssa$i=$94;break}$$pre$i=HEAP32[$ar$i>>2]|0;$$012$i=$$01$be$i;$$03$i=$$0$be$i;$87=$$pre$i;$i$04$i=$94}$98=($i$0$lcssa$i|0)<2;if($98){$113=$tmp$i5}else{$99=$ar$i+($i$0$lcssa$i<<2)|0;HEAP32[$99>>2]=$tmp$i5;$100=($width|0)==0;if($100){$113=$tmp$i5}else{$$02$us$i=$width;$112=$tmp$i5;while(1){$110=$$02$us$i>>>0>256;$102=$110?256:$$02$us$i;$111=HEAP32[$ar$i>>2]|0;_memcpy($112|0,$111|0,$102|0)|0;$108=$111;$i$01$us$i=0;while(1){$104=$ar$i+($i$01$us$i<<2)|0;$105=$i$01$us$i+1|0;$106=$ar$i+($105<<2)|0;$107=HEAP32[$106>>2]|0;_memcpy($108|0,$107|0,$102|0)|0;$109=$108+$102|0;HEAP32[$104>>2]=$109;$exitcond$i=($105|0)==($i$0$lcssa$i|0);if($exitcond$i){break}else{$108=$107;$i$01$us$i=$105}}$101=($$02$us$i|0)==($102|0);if($101){$113=$tmp$i5;break L39}$103=$$02$us$i-$102|0;$$pre6$i=HEAP32[$99>>2]|0;$$02$us$i=$103;$112=$$pre6$i}}}}else{$113=$tmp$i5}}while(0);STACKTOP=sp;return}function _isupper($c){$c=$c|0;var $0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=$c+-65|0;$1=$0>>>0<26;$2=$1&1;return $2|0}function _tolower($c){$c=$c|0;var $$0=0,$0=0,$1=0,$2=0,label=0,sp=0;sp=STACKTOP;$0=_isupper($c)|0;$1=($0|0)==0;$2=$c|32;$$0=$1?$c:$2;return $$0|0}function _exp2($x){$x=+$x;var $$0=0.0,$0=0,$1=0,$10=0.0,$11=0,$12=0.0,$13=0,$14=0,$15=0.0,$16=0.0,$17=0.0,$18=0.0,$19=0,$2=0,$20=0.0,$21=0.0,$22=0,$23=0.0,$24=0.0,$25=0;var $26=0,$27=0,$28=0,$29=0,$3=0,$30=0.0,$31=0.0,$32=0,$33=0,$34=0,$35=0.0,$36=0,$37=0,$38=0.0,$39=0.0,$4=0,$40=0.0,$41=0.0,$42=0.0,$43=0.0;var $44=0.0,$45=0.0,$46=0.0,$47=0.0,$48=0.0,$49=0.0,$5=0,$50=0.0,$51=0.0,$6=0,$7=0,$8=0,$9=0,$__x=0,$or$cond=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$__x=sp;HEAPF64[tempDoublePtr>>3]=$x;$0=HEAP32[tempDoublePtr>>2]|0;$1=HEAP32[tempDoublePtr+4>>2]|0;$2=$1&2147483647;$3=$2>>>0>1083174911;do{if($3){$4=$2>>>0>1083179007;$5=($1|0)>-1;$6=$0>>>0>4294967295;$7=($1|0)==-1;$8=$7&$6;$9=$5|$8;$or$cond=$9&$4;if($or$cond){$10=$x*8.9884656743115795E+307;$$0=$10;STACKTOP=sp;return+$$0}$11=$2>>>0>2146435071;if($11){$12=-1.0/$x;$$0=$12;STACKTOP=sp;return+$$0}$13=($1|0)<0;if($13){$14=!($x<=-1075.0);if($14){$17=$x+-4503599627370496.0;$18=$17+4503599627370496.0;$19=$18!=$x;if(!$19){break}$20=-1.4012984643248171E-45/$x;$21=$20;HEAPF32[$__x>>2]=$21;break}else{$15=-1.4012984643248171E-45/$x;$16=$15;HEAPF32[$__x>>2]=$16;$$0=0.0;STACKTOP=sp;return+$$0}}}else{$22=$2>>>0<1016070144;if($22){$23=$x+1.0;$$0=$23;STACKTOP=sp;return+$$0}}}while(0);$24=$x+26388279066624.0;HEAPF64[tempDoublePtr>>3]=$24;$25=HEAP32[tempDoublePtr>>2]|0;$26=HEAP32[tempDoublePtr+4>>2]|0;$27=$25+128|0;$28=$27&-256;$29=($28|0)/256&-1;$30=$24+-26388279066624.0;$31=$x-$30;$32=$27<<1;$33=$32&510;$34=91712+($33<<3)|0;$35=+HEAPF64[$34>>3];$36=$33|1;$37=91712+($36<<3)|0;$38=+HEAPF64[$37>>3];$39=$31-$38;$40=$35*$39;$41=$39*0.0013333559164630223;$42=$41+0.0096181298421260663;$43=$39*$42;$44=$43+0.055504108664821403;$45=$39*$44;$46=$45+0.2402265069591;$47=$39*$46;$48=$47+0.69314718055994529;$49=$40*$48;$50=$35+$49;$51=+_scalbn($50,$29);$$0=$51;STACKTOP=sp;return+$$0}function _frexp($x,$e){$x=+$x;$e=$e|0;var $$0=0.0,$$01=0.0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0.0,$2=0,$3=0,$4=0,$5=0,$6=0.0,$7=0.0,$8=0,$9=0,$storemerge=0,label=0,sp=0;sp=STACKTOP;HEAPF64[tempDoublePtr>>3]=$x;$0=HEAP32[tempDoublePtr>>2]|0;$1=HEAP32[tempDoublePtr+4>>2]|0;$2=_bitshift64Lshr($0|0,$1|0,52)|0;$3=tempRet0;$4=$2&2047;if(($4|0)==0){$5=$x!=0.0;if($5){$6=$x*1.8446744073709552E+19;$7=+_frexp($6,$e);$8=HEAP32[$e>>2]|0;$9=$8+-64|0;$$01=$7;$storemerge=$9}else{$$01=$x;$storemerge=0}HEAP32[$e>>2]=$storemerge;$$0=$$01;return+$$0}else if(($4|0)==2047){$$0=$x;return+$$0}else{$10=$4+-1022|0;HEAP32[$e>>2]=$10;$11=$1&-2146435073;$12=$11|1071644672;HEAP32[tempDoublePtr>>2]=$0;HEAP32[tempDoublePtr+4>>2]=$12;$13=+HEAPF64[tempDoublePtr>>3];$$0=$13;return+$$0}return+0.0}function _frexpl($x,$e){$x=+$x;$e=$e|0;var $0=0.0,label=0,sp=0;sp=STACKTOP;$0=+_frexp($x,$e);return+$0}function _log10($x){$x=+$x;var $$0=0.0,$0=0,$1=0,$10=0.0,$11=0.0,$12=0.0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0.0;var $26=0,$27=0.0,$28=0.0,$29=0.0,$3=0,$30=0.0,$31=0.0,$32=0.0,$33=0.0,$34=0.0,$35=0.0,$36=0.0,$37=0.0,$38=0.0,$39=0.0,$4=0,$40=0.0,$41=0.0,$42=0.0,$43=0.0;var $44=0.0,$45=0.0,$46=0.0,$47=0.0,$48=0,$49=0,$5=0,$50=0.0,$51=0.0,$52=0.0,$53=0.0,$54=0.0,$55=0.0,$56=0.0,$57=0.0,$58=0.0,$59=0.0,$6=0,$60=0.0,$61=0.0;var $62=0.0,$63=0.0,$64=0.0,$65=0.0,$66=0.0,$67=0.0,$68=0.0,$69=0.0,$7=0,$70=0,$8=0.0,$9=0.0,$hx$0=0,$k$0=0,$or$cond=0,$or$cond4=0,label=0,sp=0;sp=STACKTOP;HEAPF64[tempDoublePtr>>3]=$x;$0=HEAP32[tempDoublePtr>>2]|0;$1=HEAP32[tempDoublePtr+4>>2]|0;$2=$1>>>0<1048576;$3=($1|0)<0;$or$cond=$3|$2;do{if($or$cond){$4=$1&2147483647;$5=($0|0)==0;$6=($4|0)==0;$7=$5&$6;if($7){$8=$x*$x;$9=-1.0/$8;$$0=$9;return+$$0}if(!$3){$12=$x*18014398509481984.0;HEAPF64[tempDoublePtr>>3]=$12;$13=HEAP32[tempDoublePtr>>2]|0;$14=HEAP32[tempDoublePtr+4>>2]|0;$26=$13;$70=$14;$hx$0=$14;$k$0=-1077;break}$10=$x-$x;$11=$10/0.0;$$0=$11;return+$$0}else{$15=$1>>>0>2146435071;if($15){$$0=$x;return+$$0}$16=($1|0)==1072693248;$17=($0|0)==0;$18=0==0;$19=$17&$18;$or$cond4=$19&$16;if($or$cond4){$$0=0.0;return+$$0}else{$26=$0;$70=$1;$hx$0=$1;$k$0=-1023}}}while(0);$20=$hx$0+614242|0;$21=$20>>>20;$22=$k$0+$21|0;$23=$20&1048575;$24=$23+1072079006|0;HEAP32[tempDoublePtr>>2]=$26;HEAP32[tempDoublePtr+4>>2]=$24;$25=+HEAPF64[tempDoublePtr>>3];$27=$25+-1.0;$28=$27*0.5;$29=$27*$28;$30=$27+2.0;$31=$27/$30;$32=$31*$31;$33=$32*$32;$34=$33*0.15313837699209373;$35=$34+0.22222198432149784;$36=$33*$35;$37=$36+0.39999999999409419;$38=$33*$37;$39=$33*0.14798198605116586;$40=$39+0.1818357216161805;$41=$33*$40;$42=$41+0.28571428743662391;$43=$33*$42;$44=$43+0.66666666666667351;$45=$32*$44;$46=$38+$45;$47=$27-$29;HEAPF64[tempDoublePtr>>3]=$47;$48=HEAP32[tempDoublePtr>>2]|0;$49=HEAP32[tempDoublePtr+4>>2]|0;HEAP32[tempDoublePtr>>2]=0;HEAP32[tempDoublePtr+4>>2]=$49;$50=+HEAPF64[tempDoublePtr>>3];$51=$27-$50;$52=$51-$29;$53=$29+$46;$54=$31*$53;$55=$54+$52;$56=$50*0.43429448187816888;$57=+($22|0);$58=$57*0.30102999566361177;$59=$57*3.6942390771589308E-13;$60=$50+$55;$61=$60*2.5082946711645275E-11;$62=$59+$61;$63=$55*0.43429448187816888;$64=$63+$62;$65=$58+$56;$66=$58-$65;$67=$56+$66;$68=$67+$64;$69=$65+$68;$$0=$69;return+$$0}function _scalbn($x,$n){$x=+$x;$n=$n|0;var $$=0,$$0=0,$$1=0,$0=0,$1=0.0,$10=0,$11=0.0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0.0,$18=0.0,$2=0,$3=0,$4=0.0,$5=0,$6=0,$7=0;var $8=0.0,$9=0,$y$0=0.0,label=0,sp=0;sp=STACKTOP;$0=($n|0)>1023;if($0){$1=$x*8.9884656743115795E+307;$2=$n+-1023|0;$3=($2|0)>1023;if($3){$4=$1*8.9884656743115795E+307;$5=$n+-2046|0;$6=($5|0)>1023;$$=$6?1023:$5;$$0=$$;$y$0=$4}else{$$0=$2;$y$0=$1}}else{$7=($n|0)<-1022;if($7){$8=$x*2.2250738585072014E-308;$9=$n+1022|0;$10=($9|0)<-1022;if($10){$11=$8*2.2250738585072014E-308;$12=$n+2044|0;$13=($12|0)<-1022;$$1=$13?-1022:$12;$$0=$$1;$y$0=$11}else{$$0=$9;$y$0=$8}}else{$$0=$n;$y$0=$x}}$14=$$0+1023|0;$15=_bitshift64Shl($14|0,0,52)|0;$16=tempRet0;HEAP32[tempDoublePtr>>2]=$15;HEAP32[tempDoublePtr+4>>2]=$16;$17=+HEAPF64[tempDoublePtr>>3];$18=$y$0*$17;return+$18}function _wctomb($s,$wc){$s=$s|0;$wc=$wc|0;var $$0=0,$0=0,$1=0,label=0,sp=0;sp=STACKTOP;$0=($s|0)==(0|0);if($0){$$0=0}else{$1=_wcrtomb($s,$wc,0)|0;$$0=$1}return $$0|0}function _wcrtomb($s,$wc,$st){$s=$s|0;$wc=$wc|0;$st=$st|0;var $$0=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0;var $26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0;var $44=0,$45=0,$5=0,$6=0,$7=0,$8=0,$9=0,$or$cond=0,label=0,sp=0;sp=STACKTOP;$0=($s|0)==(0|0);if($0){$$0=1;return $$0|0}$1=$wc>>>0<128;if($1){$2=$wc&255;HEAP8[$s>>0]=$2;$$0=1;return $$0|0}$3=$wc>>>0<2048;if($3){$4=$wc>>>6;$5=$4|192;$6=$5&255;$7=$s+1|0;HEAP8[$s>>0]=$6;$8=$wc&63;$9=$8|128;$10=$9&255;HEAP8[$7>>0]=$10;$$0=2;return $$0|0}$11=$wc>>>0<55296;$12=$wc&-8192;$13=($12|0)==57344;$or$cond=$11|$13;if($or$cond){$14=$wc>>>12;$15=$14|224;$16=$15&255;$17=$s+1|0;HEAP8[$s>>0]=$16;$18=$wc>>>6;$19=$18&63;$20=$19|128;$21=$20&255;$22=$s+2|0;HEAP8[$17>>0]=$21;$23=$wc&63;$24=$23|128;$25=$24&255;HEAP8[$22>>0]=$25;$$0=3;return $$0|0}$26=$wc+-65536|0;$27=$26>>>0<1048576;if($27){$28=$wc>>>18;$29=$28|240;$30=$29&255;$31=$s+1|0;HEAP8[$s>>0]=$30;$32=$wc>>>12;$33=$32&63;$34=$33|128;$35=$34&255;$36=$s+2|0;HEAP8[$31>>0]=$35;$37=$wc>>>6;$38=$37&63;$39=$38|128;$40=$39&255;$41=$s+3|0;HEAP8[$36>>0]=$40;$42=$wc&63;$43=$42|128;$44=$43&255;HEAP8[$41>>0]=$44;$$0=4;return $$0|0}else{$45=___errno_location()|0;HEAP32[$45>>2]=84;$$0=-1;return $$0|0}return 0|0}function ___towrite($f){$f=$f|0;var $$0=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$3=0,$4=0,$5=0,$6=0,$7=0;var $8=0,$9=0,label=0,sp=0;sp=STACKTOP;$0=$f+74|0;$1=HEAP8[$0>>0]|0;$2=$1<<24>>24;$3=$2+255|0;$4=$3|$2;$5=$4&255;HEAP8[$0>>0]=$5;$6=HEAP32[$f>>2]|0;$7=$6&8;$8=($7|0)==0;if($8){$10=$f+8|0;HEAP32[$10>>2]=0;$11=$f+4|0;HEAP32[$11>>2]=0;$12=$f+44|0;$13=HEAP32[$12>>2]|0;$14=$f+28|0;HEAP32[$14>>2]=$13;$15=$f+20|0;HEAP32[$15>>2]=$13;$16=$13;$17=$f+48|0;$18=HEAP32[$17>>2]|0;$19=$16+$18|0;$20=$f+16|0;HEAP32[$20>>2]=$19;$$0=0;return $$0|0}else{$9=$6|32;HEAP32[$f>>2]=$9;$$0=-1;return $$0|0}return 0|0}function ___fwritex($s,$l,$f){$s=$s|0;$l=$l|0;$f=$f|0;var $$0=0,$$01=0,$$02=0,$$pre=0,$$pre6=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$20=0,$21=0;var $22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$i$0=0,$i$0$lcssa10=0;var $i$1=0,label=0,sp=0;sp=STACKTOP;$0=$f+16|0;$1=HEAP32[$0>>2]|0;$2=($1|0)==(0|0);do{if($2){$3=___towrite($f)|0;$4=($3|0)==0;if($4){$$pre=HEAP32[$0>>2]|0;$7=$$pre;break}else{$$0=0;return $$0|0}}else{$7=$1}}while(0);$5=$f+20|0;$6=HEAP32[$5>>2]|0;$8=$7;$9=$6;$10=$8-$9|0;$11=$10>>>0<$l>>>0;if($11){$12=$f+36|0;$13=HEAP32[$12>>2]|0;$14=FUNCTION_TABLE_iiii[$13&3]($f,$s,$l)|0;$$0=$14;return $$0|0}$15=$f+75|0;$16=HEAP8[$15>>0]|0;$17=$16<<24>>24>-1;L11:do{if($17){$i$0=$l;while(1){$18=($i$0|0)==0;if($18){$$01=$l;$$02=$s;$29=$6;$i$1=0;break L11}$19=$i$0+-1|0;$20=$s+$19|0;$21=HEAP8[$20>>0]|0;$22=$21<<24>>24==10;if($22){$i$0$lcssa10=$i$0;break}else{$i$0=$19}}$23=$f+36|0;$24=HEAP32[$23>>2]|0;$25=FUNCTION_TABLE_iiii[$24&3]($f,$s,$i$0$lcssa10)|0;$26=$25>>>0<$i$0$lcssa10>>>0;if($26){$$0=$i$0$lcssa10;return $$0|0}else{$27=$s+$i$0$lcssa10|0;$28=$l-$i$0$lcssa10|0;$$pre6=HEAP32[$5>>2]|0;$$01=$28;$$02=$27;$29=$$pre6;$i$1=$i$0$lcssa10;break}}else{$$01=$l;$$02=$s;$29=$6;$i$1=0}}while(0);_memcpy($29|0,$$02|0,$$01|0)|0;$30=HEAP32[$5>>2]|0;$31=$30+$$01|0;HEAP32[$5>>2]=$31;$32=$i$1+$$01|0;$$0=$32;return $$0|0}function _sprintf($s,$fmt,$varargs){$s=$s|0;$fmt=$fmt|0;$varargs=$varargs|0;var $0=0,$ap=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+16|0;$ap=sp;HEAP32[$ap>>2]=$varargs;$0=_vsprintf($s,$fmt,$ap)|0;STACKTOP=sp;return $0|0}function _MUSL_vfprintf($f,$fmt,$ap){$f=$f|0;$fmt=$fmt|0;$ap=$ap|0;var $$=0,$$0=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0;var $ap2=0,$internal_buf=0,$nl_arg=0,$nl_type=0,$ret$1=0,$vacopy_currentptr=0,dest=0,label=0,sp=0,stop=0;sp=STACKTOP;STACKTOP=STACKTOP+224|0;$ap2=sp+120|0;$nl_type=sp+80|0;$nl_arg=sp;$internal_buf=sp+136|0;dest=$nl_type;stop=dest+40|0;do{HEAP32[dest>>2]=0|0;dest=dest+4|0}while((dest|0)<(stop|0));$vacopy_currentptr=HEAP32[$ap>>2]|0;HEAP32[$ap2>>2]=$vacopy_currentptr;$0=_printf_core(0,$fmt,$ap2,$nl_arg,$nl_type)|0;$1=($0|0)<0;if($1){$$0=-1;STACKTOP=sp;return $$0|0}$2=$f+48|0;$3=HEAP32[$2>>2]|0;$4=($3|0)==0;if($4){$6=$f+44|0;$7=HEAP32[$6>>2]|0;HEAP32[$6>>2]=$internal_buf;$8=$f+28|0;HEAP32[$8>>2]=$internal_buf;$9=$f+20|0;HEAP32[$9>>2]=$internal_buf;HEAP32[$2>>2]=80;$10=$internal_buf+80|0;$11=$f+16|0;HEAP32[$11>>2]=$10;$12=_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0;$13=($7|0)==(0|0);if($13){$ret$1=$12}else{$14=$f+36|0;$15=HEAP32[$14>>2]|0;FUNCTION_TABLE_iiii[$15&3]($f,0,0)|0;$16=HEAP32[$9>>2]|0;$17=($16|0)==(0|0);$$=$17?-1:$12;HEAP32[$6>>2]=$7;HEAP32[$2>>2]=0;HEAP32[$11>>2]=0;HEAP32[$8>>2]=0;HEAP32[$9>>2]=0;$ret$1=$$}}else{$5=_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0;$ret$1=$5}$$0=$ret$1;STACKTOP=sp;return $$0|0}function _vsnprintf($s,$n,$fmt,$ap){$s=$s|0;$n=$n|0;$fmt=$fmt|0;$ap=$ap|0;var $$$02=0,$$0=0,$$01=0,$$02=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0,$19=0,$2=0,$3=0,$4=0,$5=0;var $6=0,$7=0,$8=0,$9=0,$b=0,$f=0,dest=0,label=0,sp=0,src=0,stop=0;sp=STACKTOP;STACKTOP=STACKTOP+128|0;$b=sp+112|0;$f=sp;dest=$f;src=95808;stop=dest+112|0;do{HEAP32[dest>>2]=HEAP32[src>>2]|0;dest=dest+4|0;src=src+4|0}while((dest|0)<(stop|0));$0=$n+-1|0;$1=$0>>>0>2147483646;if($1){$2=($n|0)==0;if($2){$$01=$b;$$02=1}else{$3=___errno_location()|0;HEAP32[$3>>2]=75;$$0=-1;STACKTOP=sp;return $$0|0}}else{$$01=$s;$$02=$n}$4=$$01;$5=-2-$4|0;$6=$$02>>>0>$5>>>0;$$$02=$6?$5:$$02;$7=$f+48|0;HEAP32[$7>>2]=$$$02;$8=$f+20|0;HEAP32[$8>>2]=$$01;$9=$f+44|0;HEAP32[$9>>2]=$$01;$10=$$01+$$$02|0;$11=$f+16|0;HEAP32[$11>>2]=$10;$12=$f+28|0;HEAP32[$12>>2]=$10;$13=_MUSL_vfprintf($f,$fmt,$ap)|0;$14=($$$02|0)==0;if($14){$$0=$13;STACKTOP=sp;return $$0|0}$15=HEAP32[$8>>2]|0;$16=HEAP32[$11>>2]|0;$17=($15|0)==($16|0);$18=$17<<31>>31;$19=$15+$18|0;HEAP8[$19>>0]=0;$$0=$13;STACKTOP=sp;return $$0|0}function _vsprintf($s,$fmt,$ap){$s=$s|0;$fmt=$fmt|0;$ap=$ap|0;var $0=0,label=0,sp=0;sp=STACKTOP;$0=_vsnprintf($s,2147483647,$fmt,$ap)|0;return $0|0}function _memchr($src,$c,$n){$src=$src|0;$c=$c|0;$n=$n|0;var $$0$lcssa=0,$$0$lcssa44=0,$$019=0,$$1$lcssa=0,$$110=0,$$110$lcssa=0,$$24=0,$$3=0,$$lcssa=0,$0=0,$1=0,$10=0,$11=0,$12=0,$13=0,$14=0,$15=0,$16=0,$17=0,$18=0;var $19=0,$2=0,$20=0,$21=0,$22=0,$23=0,$24=0,$25=0,$26=0,$27=0,$28=0,$29=0,$3=0,$30=0,$31=0,$32=0,$33=0,$34=0,$35=0,$36=0;var $4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$or$cond=0,$or$cond18=0,$s$0$lcssa=0,$s$0$lcssa43=0,$s$020=0,$s$15=0,$s$2=0,$w$0$lcssa=0,$w$011=0,$w$011$lcssa=0,label=0,sp=0;sp=STACKTOP;$0=$c&255;$1=$src;$2=$1&3;$3=($2|0)!=0;$4=($n|0)!=0;$or$cond18=$4&$3;L1:do{if($or$cond18){$5=$c&255;$$019=$n;$s$020=$src;while(1){$6=HEAP8[$s$020>>0]|0;$7=$6<<24>>24==$5<<24>>24;if($7){$$0$lcssa44=$$019;$s$0$lcssa43=$s$020;label=6;break L1}$8=$s$020+1|0;$9=$$019+-1|0;$10=$8;$11=$10&3;$12=($11|0)!=0;$13=($9|0)!=0;$or$cond=$13&$12;if($or$cond){$$019=$9;$s$020=$8}else{$$0$lcssa=$9;$$lcssa=$13;$s$0$lcssa=$8;label=5;break}}}else{$$0$lcssa=$n;$$lcssa=$4;$s$0$lcssa=$src;label=5}}while(0);if((label|0)==5){if($$lcssa){$$0$lcssa44=$$0$lcssa;$s$0$lcssa43=$s$0$lcssa;label=6}else{$$3=0;$s$2=$s$0$lcssa}}L8:do{if((label|0)==6){$14=HEAP8[$s$0$lcssa43>>0]|0;$15=$c&255;$16=$14<<24>>24==$15<<24>>24;if($16){$$3=$$0$lcssa44;$s$2=$s$0$lcssa43}else{$17=Math_imul($0,16843009)|0;$18=$$0$lcssa44>>>0>3;L11:do{if($18){$$110=$$0$lcssa44;$w$011=$s$0$lcssa43;while(1){$19=HEAP32[$w$011>>2]|0;$20=$19^$17;$21=$20+-16843009|0;$22=$20&-2139062144;$23=$22^-2139062144;$24=$23&$21;$25=($24|0)==0;if(!$25){$$110$lcssa=$$110;$w$011$lcssa=$w$011;break}$26=$w$011+4|0;$27=$$110+-4|0;$28=$27>>>0>3;if($28){$$110=$27;$w$011=$26}else{$$1$lcssa=$27;$w$0$lcssa=$26;label=11;break L11}}$$24=$$110$lcssa;$s$15=$w$011$lcssa}else{$$1$lcssa=$$0$lcssa44;$w$0$lcssa=$s$0$lcssa43;label=11}}while(0);if((label|0)==11){$29=($$1$lcssa|0)==0;if($29){$$3=0;$s$2=$w$0$lcssa;break}else{$$24=$$1$lcssa;$s$15=$w$0$lcssa}}while(1){$30=HEAP8[$s$15>>0]|0;$31=$30<<24>>24==$15<<24>>24;if($31){$$3=$$24;$s$2=$s$15;break L8}$32=$s$15+1|0;$33=$$24+-1|0;$34=($33|0)==0;if($34){$$3=0;$s$2=$32;break}else{$$24=$33;$s$15=$32}}}}}while(0);$35=($$3|0)!=0;$36=$35?$s$2:0;return $36|0}function _printf_core($f,$fmt,$ap,$nl_arg,$nl_type){$f=$f|0;$fmt=$fmt|0;$ap=$ap|0;$nl_arg=$nl_arg|0;$nl_type=$nl_type|0;var $$=0,$$$i=0,$$0=0,$$0$i=0,$$0$lcssa$i=0,$$0$lcssa$i$i=0,$$0$lcssa$i104$i=0,$$0$lcssa$i128$i=0,$$0$lcssa$i143$i=0,$$0$lcssa$i39$i=0,$$0$lcssa$i46=0,$$0$lcssa$i46$i=0,$$0$lcssa$i48$i=0,$$0$lcssa$i51=0,$$0$lcssa$i53=0,$$0$lcssa$i56$i=0,$$0$lcssa$i61=0,$$0$lcssa$i63$i=0,$$0$lcssa$i68=0,$$0$lcssa$i69$i=0;var $$0$lcssa$i75=0,$$0$lcssa$i76$i=0,$$0$lcssa$i84$i=0,$$0$lcssa$i85=0,$$0$lcssa$i97$i=0,$$01$i=0,$$01$i$i=0,$$01$i102$i=0,$$01$i126$i=0,$$01$i141$i=0,$$01$i37$i=0,$$01$i44=0,$$01$i44$i=0,$$01$i54$i=0,$$01$i59=0,$$01$i61$i=0,$$01$i66=0,$$01$i67$i=0,$$01$i73=0,$$01$i74$i=0;var $$01$i83=0,$$01$i95$i=0,$$01$lcssa$off0$i=0,$$01$lcssa$off0$i$i=0,$$01$lcssa$off0$i85$i=0,$$012$i=0,$$013$i=0,$$03$i48=0,$$05$i=0,$$05$i$i=0,$$05$i79$i=0,$$07$i=0.0,$$1$i=0.0,$$1$lcssa$i$i=0,$$1$lcssa$i112$i=0,$$114$i=0,$$12$i=0,$$12$i$i=0,$$12$i110$i=0,$$12$i119$i=0;var $$12$i134$i=0,$$12$i134$i$lcssa=0,$$12$i87$i=0,$$2$i=0.0,$$2$us$i=0.0,$$2$us$us$i=0.0,$$20$i=0.0,$$21$i=0,$$210$$22$i=0,$$210$$24$i=0,$$210$i=0,$$23$i=0,$$24=0,$$25=0,$$3$i=0.0,$$31$i=0,$$311$i=0,$$4$i=0.0,$$412$lcssa$i=0,$$412184$i=0;var $$5196$i=0,$$92=0,$$a$3$i=0,$$a$3$us$i=0,$$a$3$us303$i=0,$$a$3$us304$i=0,$$a$3305$i=0,$$a$3306$i=0,$$fl$4=0,$$l10n$0=0,$$lcssa106=0,$$lcssa275$i=0,$$lcssa450=0,$$lcssa451=0,$$lcssa455=0,$$lcssa457=0,$$lcssa458=0,$$lcssa459=0,$$lcssa460=0,$$lcssa461=0;var $$lcssa463=0,$$lcssa464=0,$$lcssa470=0,$$lcssa474=0,$$lcssa476=0,$$lcssa479=0,$$lcssa480=0,$$lcssa483=0.0,$$lcssa484=0,$$lcssa487=0,$$lcssa491=0,$$mask$i=0,$$mask$i38=0,$$mask1$i=0,$$mask1$i37=0,$$neg151$i=0,$$neg152$i=0,$$p$$i=0,$$p$5=0,$$p$i=0;var $$pn$i=0,$$pr$i=0,$$pr146$i=0,$$pre=0,$$pre$i=0,$$pre$phi302$iZ2D=0,$$pre270=0,$$pre300$i=0,$$pre301$i=0,$$sum$i=0,$$sum15$i=0,$$sum16$i=0,$$z$3$i=0,$$z$4$i=0,$$z$4$us$i=0,$0=0,$1=0,$10=0,$100=0,$1000=0;var $1001=0,$1002=0,$1003=0,$1004=0,$1005=0,$1006=0,$1007=0,$1008=0,$1009=0,$101=0,$1010=0,$1011=0,$1012=0,$1013=0,$1014=0,$1015=0,$1016=0,$1017=0,$1018=0,$1019=0;var $102=0,$1020=0,$1021=0,$1022=0,$1023=0,$1024=0,$1025=0,$1026=0,$1027=0,$1028=0,$1029=0,$103=0,$1030=0,$1031=0,$1032=0,$1033=0,$1034=0,$1035=0,$1036=0,$1037=0;var $1038=0,$1039=0,$104=0,$1040=0,$1041=0,$1042=0,$1043=0,$1044=0,$1045=0,$1046=0,$1047=0,$1048=0,$1049=0,$105=0,$1050=0,$1051=0,$1052=0,$1053=0,$1054=0,$1055=0;var $1056=0,$1057=0,$1058=0,$1059=0,$106=0,$1060=0,$1061=0,$1062=0,$1063=0,$1064=0,$1065=0,$1066=0,$1067=0,$1068=0,$1069=0,$107=0,$1070=0,$1071=0,$1072=0,$1073=0;var $1074=0,$1075=0,$1076=0,$1077=0,$1078=0,$1079=0,$108=0,$1080=0,$1081=0,$1082=0,$1083=0,$1084=0,$1085=0,$1086=0,$1087=0,$1088=0,$1089=0,$109=0,$1090=0,$1091=0;var $1092=0,$1093=0,$1094=0,$1095=0,$1096=0,$1097=0,$1098=0,$1099=0,$11=0,$110=0,$1100=0,$1101=0,$1102=0,$1103=0,$1104=0,$1105=0,$1106=0,$1107=0,$1108=0,$1109=0;var $111=0,$1110=0,$1111=0,$1112=0,$1113=0,$1114=0,$1115=0,$1116=0,$1117=0,$1118=0,$1119=0,$112=0,$1120=0,$1121=0,$1122=0,$1123=0,$1124=0,$1125=0,$1126=0,$1127=0;var $1128=0,$1129=0,$113=0,$1130=0,$1131=0,$1132=0,$1133=0,$1134=0,$1135=0,$1136=0,$1137=0,$1138=0,$1139=0,$114=0,$1140=0,$1141=0,$1142=0,$1143=0,$1144=0,$1145=0;var $1146=0,$1147=0,$1148=0,$1149=0,$115=0,$1150=0,$1151=0,$1152=0,$1153=0,$1154=0.0,$1155=0,$1156=0,$1157=0,$1158=0,$1159=0,$116=0,$1160=0,$1161=0.0,$1162=0,$1163=0;var $1164=0,$1165=0,$1166=0,$1167=0,$1168=0,$1169=0,$1169$phi=0,$117=0,$1170=0,$1170$phi=0,$1171=0,$1172=0,$1173=0,$1174=0,$1175=0,$1176=0,$1177=0,$1178=0,$1179=0,$118=0;var $1180=0,$1181=0,$1182=0,$1183=0,$1184=0,$1185=0,$1186=0,$1187=0,$119=0,$12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0,$128=0,$129=0;var $13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0;var $148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0,$164=0,$165=0;var $166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0;var $184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0;var $201=0,$202=0,$203=0,$204=0,$205=0,$206=0,$207=0,$208=0,$209=0,$21=0,$210=0,$211=0,$212=0,$213=0,$214=0,$215=0,$216=0,$217=0,$218=0,$219=0;var $22=0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0,$231=0,$232=0,$233=0,$234=0,$235=0,$236=0,$237=0;var $238=0,$239=0,$24=0,$240=0,$241=0,$242=0,$243=0.0,$244=0,$245=0,$246=0,$247=0,$248=0,$249=0,$25=0,$250=0,$251=0,$252=0.0,$253=0,$254=0,$255=0;var $256=0,$257=0,$258=0,$259=0,$26=0,$260=0,$261=0,$262=0,$263=0,$264=0,$265=0,$266=0,$267=0,$268=0,$269=0,$27=0,$270=0,$271=0,$272=0,$273=0;var $274=0,$275=0,$276=0,$277=0,$278=0,$279=0,$28=0,$280=0,$281=0,$282=0,$283=0,$284=0,$285=0,$286=0,$287=0,$288=0,$289=0,$29=0,$290=0,$291=0;var $292=0,$293=0,$294=0,$295=0,$296=0,$297=0,$298=0,$299=0,$3=0,$30=0,$300=0,$301=0,$302=0,$303=0,$304=0,$305=0,$306=0,$307=0,$308=0,$309=0;var $31=0,$310=0,$311=0,$312=0,$313=0,$314=0,$315=0,$316=0,$317=0,$318=0,$319=0,$32=0,$320=0,$321=0,$322=0,$323=0,$324=0,$325=0,$326=0,$327=0;var $328=0,$329=0,$33=0,$330=0,$331=0,$332=0,$333=0,$334=0,$335=0,$336=0,$337=0,$338=0,$339=0,$34=0,$340=0,$341=0,$342=0,$343=0,$344=0,$345=0;var $346=0,$347=0,$348=0,$349=0,$35=0,$350=0,$351=0,$352=0,$353=0,$354=0,$355=0,$356=0,$357=0,$358=0,$359=0,$36=0,$360=0,$361=0,$362=0,$363=0;var $364=0,$365=0,$366=0,$367=0,$368=0,$369=0,$37=0,$370=0,$371=0,$372=0,$373=0,$374=0,$375=0,$376=0,$377=0,$378=0,$379=0,$38=0,$380=0,$381=0;var $382=0,$383=0,$384=0,$385=0,$386=0,$387=0,$388=0,$389=0,$39=0,$390=0,$391=0,$392=0,$393=0,$394=0,$395=0,$396=0,$397=0,$398=0,$399=0,$4=0;var $40=0,$400=0,$401=0,$402=0,$403=0,$404=0,$405=0,$406=0,$407=0,$408=0,$409=0,$41=0,$410=0,$411=0,$412=0,$413=0,$414=0,$415=0,$416=0,$417=0;var $418=0,$419=0,$42=0,$420=0,$421=0,$422=0,$423=0,$424=0,$425=0,$426=0,$427=0,$428=0,$429=0,$43=0,$430=0.0,$431=0,$432=0.0,$433=0,$434=0,$435=0;var $436=0,$437=0,$438=0,$439=0,$44=0,$440=0,$441=0,$442=0,$443=0,$444=0,$445=0,$446=0,$447=0,$448=0,$449=0,$45=0,$450=0,$451=0,$452=0,$453=0;var $454=0,$455=0,$456=0,$457=0,$458=0,$459=0,$46=0,$460=0,$461=0,$462=0,$463=0,$464=0,$465=0,$466=0,$467=0,$468=0,$469=0,$47=0,$470=0,$471=0.0;var $472=0.0,$473=0,$474=0,$475=0,$476=0,$477=0,$478=0,$479=0,$48=0,$480=0,$481=0,$482=0,$483=0,$484=0,$485=0,$486=0,$487=0.0,$488=0,$489=0,$49=0;var $490=0,$491=0.0,$492=0.0,$493=0.0,$494=0.0,$495=0.0,$496=0.0,$497=0,$498=0,$499=0,$5=0,$50=0,$500=0,$501=0,$502=0,$503=0,$504=0,$505=0,$506=0,$507=0;var $508=0,$509=0,$51=0,$510=0,$511=0,$512=0,$513=0,$514=0,$515=0,$516=0,$517=0,$518=0,$519=0,$52=0,$520=0,$521=0,$522=0,$523=0,$524=0,$525=0;var $526=0,$527=0,$528=0,$529=0,$53=0,$530=0,$531=0,$532=0,$533=0,$534=0,$535=0,$536=0,$537=0,$538=0,$539=0,$54=0,$540=0,$541=0,$542=0,$543=0;var $544=0.0,$545=0.0,$546=0.0,$547=0,$548=0,$549=0,$55=0,$550=0,$551=0,$552=0,$553=0,$554=0,$555=0,$556=0,$557=0,$558=0,$559=0.0,$56=0,$560=0.0,$561=0.0;var $562=0,$563=0,$564=0,$565=0,$566=0,$567=0,$568=0,$569=0,$57=0,$570=0,$571=0,$572=0,$573=0,$574=0.0,$575=0.0,$576=0.0,$577=0,$578=0,$579=0,$58=0;var $580=0,$581=0,$582=0,$583=0,$584=0,$585=0,$586=0,$587=0,$588=0,$589=0,$59=0,$590=0,$591=0,$592=0,$593=0,$594=0,$595=0,$596=0,$597=0,$598=0;var $599=0,$6=0,$60=0,$600=0,$601=0,$602=0,$603=0,$604=0,$605=0,$606=0,$607=0,$608=0,$609=0,$61=0,$610=0,$611=0,$612=0,$613=0,$614=0,$615=0;var $616=0,$617=0,$618=0,$619=0,$62=0,$620=0,$621=0,$622=0,$623=0,$624=0,$625=0,$626=0,$627=0,$628=0,$629=0,$63=0,$630=0,$631=0.0,$632=0,$633=0;var $634=0,$635=0,$636=0,$637=0,$638=0,$639=0.0,$64=0,$640=0.0,$641=0.0,$642=0,$643=0,$644=0,$645=0,$646=0,$647=0,$648=0,$649=0,$65=0,$650=0,$651=0;var $652=0,$653=0,$654=0,$655=0,$656=0,$657=0,$658=0,$659=0,$66=0,$660=0,$661=0,$662=0,$663=0,$664=0,$665=0,$666=0,$667=0,$668=0,$669=0,$67=0;var $670=0,$671=0,$672=0,$673=0,$674=0,$675=0,$676=0,$677=0,$678=0,$679=0,$68=0,$680=0,$681=0,$682=0,$683=0,$684=0,$685=0,$686=0,$687=0,$688=0;var $689=0,$69=0,$690=0,$691=0,$692=0,$693=0,$694=0,$695=0,$696=0,$697=0,$698=0,$699=0,$7=0,$70=0,$700=0,$701=0,$702=0,$703=0,$704=0,$705=0;var $706=0,$707=0,$708=0,$709=0,$71=0,$710=0,$711=0,$712=0,$713=0,$714=0,$715=0,$716=0,$717=0,$718=0,$719=0,$72=0,$720=0,$721=0,$722=0,$723=0;var $724=0,$725=0,$726=0,$727=0,$728=0,$729=0,$73=0,$730=0,$731=0,$732=0,$733=0,$734=0,$735=0,$736=0,$737=0,$738=0,$739=0,$74=0,$740=0,$741=0;var $742=0,$743=0,$744=0,$745=0,$746=0,$747=0,$748=0,$749=0,$75=0,$750=0,$751=0,$752=0,$753=0,$754=0,$755=0,$756=0,$757=0,$758=0,$759=0,$76=0;var $760=0,$761=0,$762=0,$763=0,$764=0,$765=0,$766=0,$767=0,$768=0,$769=0,$77=0,$770=0,$771=0,$772=0,$773=0,$774=0,$775=0,$776=0,$777=0,$778=0;var $779=0,$78=0,$780=0.0,$781=0.0,$782=0,$783=0.0,$784=0,$785=0,$786=0,$787=0,$788=0,$789=0,$79=0,$790=0,$791=0,$792=0,$793=0,$794=0,$795=0,$796=0;var $797=0,$798=0,$799=0,$8=0,$80=0,$800=0,$801=0,$802=0,$803=0,$804=0,$805=0,$806=0,$807=0,$808=0,$809=0,$81=0,$810=0,$811=0,$812=0,$813=0;var $814=0,$815=0,$816=0,$817=0,$818=0,$819=0,$82=0,$820=0,$821=0,$822=0,$823=0,$824=0,$825=0,$826=0,$827=0,$828=0,$829=0,$83=0,$830=0,$831=0;var $832=0,$833=0,$834=0,$835=0,$836=0,$837=0,$838=0,$839=0,$84=0,$840=0,$841=0,$842=0,$843=0,$844=0,$845=0,$846=0,$847=0,$848=0,$849=0,$85=0;var $850=0,$851=0,$852=0,$853=0,$854=0,$855=0,$856=0,$857=0,$858=0,$859=0,$86=0,$860=0,$861=0,$862=0,$863=0,$864=0,$865=0,$866=0,$867=0,$868=0;var $869=0,$87=0,$870=0,$871=0,$872=0,$873=0,$874=0,$875=0,$876=0,$877=0,$878=0,$879=0,$88=0,$880=0,$881=0,$882=0,$883=0,$884=0,$885=0,$886=0;var $887=0,$888=0,$889=0,$89=0,$890=0,$891=0,$892=0,$893=0,$894=0,$895=0,$896=0,$897=0,$898=0,$899=0,$9=0,$90=0,$900=0,$901=0,$902=0,$903=0;var $904=0,$905=0,$906=0,$907=0,$908=0,$909=0,$91=0,$910=0,$911=0,$912=0,$913=0,$914=0,$915=0,$916=0,$917=0,$918=0,$919=0,$92=0,$920=0,$921=0;var $922=0,$923=0,$924=0,$925=0,$926=0,$927=0,$928=0,$929=0,$93=0,$930=0,$931=0,$932=0,$933=0,$934=0,$935=0,$936=0,$937=0,$938=0,$939=0,$94=0;var $940=0,$941=0,$942=0,$943=0,$944=0,$945=0,$946=0,$947=0,$948=0,$949=0,$95=0,$950=0,$951=0,$952=0,$953=0,$954=0,$955=0,$956=0,$957=0,$958=0;var $959=0,$96=0,$960=0,$961=0,$962=0,$963=0,$964=0,$965=0,$966=0,$967=0,$968=0,$969=0,$97=0,$970=0,$971=0,$972=0,$973=0,$974=0,$975=0,$976=0;var $977=0,$978=0,$979=0,$98=0,$980=0,$981=0,$982=0,$983=0,$984=0,$985=0,$986=0,$987=0,$988=0,$989=0,$99=0,$990=0,$991=0,$992=0,$993=0,$994=0;var $995=0,$996=0,$997=0,$998=0,$999=0,$a$0=0,$a$1=0,$a$1$lcssa$i=0,$a$1253$i=0,$a$2=0,$a$2$ph$i=0,$a$3$lcssa$i=0,$a$3240$i=0,$a$3240$us$i=0,$a$5$lcssa$i=0,$a$5215$i=0,$a$6$i=0,$a$7$i=0,$a$8$ph$i=0,$arglist_current=0;var $arglist_current11=0,$arglist_current14=0,$arglist_current17=0,$arglist_current2=0,$arglist_current20=0,$arglist_current23=0,$arglist_current26=0,$arglist_current29=0,$arglist_current32=0,$arglist_current35=0,$arglist_current38=0,$arglist_current41=0,$arglist_current44=0,$arglist_current47=0,$arglist_current5=0,$arglist_current50=0,$arglist_current53=0,$arglist_current56=0,$arglist_current59=0,$arglist_current62=0;var $arglist_current8=0,$arglist_next=0,$arglist_next12=0,$arglist_next15=0,$arglist_next18=0,$arglist_next21=0,$arglist_next24=0,$arglist_next27=0,$arglist_next3=0,$arglist_next30=0,$arglist_next33=0,$arglist_next36=0,$arglist_next39=0,$arglist_next42=0,$arglist_next45=0,$arglist_next48=0,$arglist_next51=0,$arglist_next54=0,$arglist_next57=0,$arglist_next6=0;var $arglist_next60=0,$arglist_next63=0,$arglist_next9=0,$argpos$0=0,$big$i=0,$buf=0,$buf$i=0,$carry$0246$i=0,$carry3$0234$i=0,$carry3$0234$us$i=0,$cnt$0=0,$cnt$1=0,$cnt$1$lcssa=0,$d$0$i=0,$d$0245$i=0,$d$0247$i=0,$d$1233$i=0,$d$1233$us$i=0,$d$2$lcssa$i=0,$d$2214$i=0;var $d$3$i=0,$d$4191$i=0,$d$5183$i=0,$d$6195$i=0,$e$0229$i=0,$e$1$i=0,$e$2210$i=0,$e$3$i=0,$e$4$ph$i=0,$e2$i=0,$ebuf0$i=0,$estr$0$i=0,$estr$1$lcssa$i=0,$estr$1$ph$i=0,$estr$1201$i=0,$estr$2$i=0,$exitcond$i=0,$expanded=0,$expanded101=0,$expanded102=0;var $expanded103=0,$expanded105=0,$expanded106=0,$expanded108=0,$expanded109=0,$expanded110=0,$expanded112=0,$expanded113=0,$expanded115=0,$expanded116=0,$expanded117=0,$expanded119=0,$expanded120=0,$expanded122=0,$expanded123=0,$expanded124=0,$expanded126=0,$expanded127=0,$expanded129=0,$expanded130=0;var $expanded131=0,$expanded133=0,$expanded134=0,$expanded136=0,$expanded137=0,$expanded138=0,$expanded140=0,$expanded141=0,$expanded143=0,$expanded144=0,$expanded145=0,$expanded147=0,$expanded148=0,$expanded150=0,$expanded151=0,$expanded152=0,$expanded154=0,$expanded155=0,$expanded157=0,$expanded158=0;var $expanded159=0,$expanded161=0,$expanded162=0,$expanded164=0,$expanded165=0,$expanded166=0,$expanded168=0,$expanded169=0,$expanded171=0,$expanded172=0,$expanded173=0,$expanded175=0,$expanded176=0,$expanded178=0,$expanded179=0,$expanded180=0,$expanded182=0,$expanded183=0,$expanded185=0,$expanded186=0;var $expanded187=0,$expanded189=0,$expanded190=0,$expanded192=0,$expanded193=0,$expanded194=0,$expanded196=0,$expanded197=0,$expanded199=0,$expanded200=0,$expanded201=0,$expanded203=0,$expanded204=0,$expanded206=0,$expanded207=0,$expanded208=0,$expanded210=0,$expanded211=0,$expanded213=0,$expanded214=0;var $expanded215=0,$expanded64=0,$expanded66=0,$expanded67=0,$expanded68=0,$expanded70=0,$expanded71=0,$expanded73=0,$expanded74=0,$expanded75=0,$expanded77=0,$expanded78=0,$expanded80=0,$expanded81=0,$expanded82=0,$expanded84=0,$expanded85=0,$expanded87=0,$expanded88=0,$expanded89=0;var $expanded91=0,$expanded92=0,$expanded94=0,$expanded95=0,$expanded96=0,$expanded98=0,$expanded99=0,$fl$0110=0,$fl$0170=0,$fl$1=0,$fl$1$=0,$fl$3=0,$fl$4=0,$fl$6=0,$i$0$lcssa=0,$i$0$lcssa273=0,$i$0175=0,$i$0228$i=0,$i$03$i=0,$i$03$i30=0;var $i$1$lcssa$i=0,$i$1186=0,$i$1222$i=0,$i$2162=0,$i$2162$lcssa=0,$i$2209$i=0,$i$3160=0,$i$3205$i=0,$isdigit=0,$isdigit$i=0,$isdigit$i32=0,$isdigit10=0,$isdigit12=0,$isdigit2$i=0,$isdigit2$i28=0,$isdigittmp=0,$isdigittmp$=0,$isdigittmp$i=0,$isdigittmp$i31=0,$isdigittmp1$i=0;var $isdigittmp1$i27=0,$isdigittmp11=0,$isdigittmp4$i=0,$isdigittmp4$i29=0,$isdigittmp9=0,$j$0$i=0,$j$0221$i=0,$j$0223$i=0,$j$1206$i=0,$j$2$i=0,$l$0=0,$l$0$i=0,$l$1$i=0,$l$1174=0,$l$2=0,$l10n$0=0,$l10n$0$lcssa=0,$l10n$0$phi=0,$l10n$1=0,$l10n$2=0;var $l10n$3=0,$mb=0,$notlhs$us$us$i=0,$notrhs$i=0,$or$cond=0,$or$cond$i=0,$or$cond$i$i=0,$or$cond$i100$i=0,$or$cond$i35$i=0,$or$cond$i42$i=0,$or$cond$i52$i=0,$or$cond$i57=0,$or$cond$i59$i=0,$or$cond$i64=0,$or$cond$i71=0,$or$cond$i72$i=0,$or$cond$i79=0,$or$cond$i81=0,$or$cond$i93$i=0,$or$cond15=0;var $or$cond19=0,$or$cond22=0,$or$cond29$i=0,$or$cond332=0,$or$cond6$i=0,$p$0=0,$p$1=0,$p$2=0,$p$2$=0,$p$3=0,$p$4272=0,$p$5=0,$pad$i=0,$pl$0=0,$pl$0$i=0,$pl$1=0,$pl$1$i=0,$pl$2=0,$prefix$0=0,$prefix$0$$i=0;var $prefix$0$i=0,$prefix$1=0,$prefix$2=0,$r$0$a$8$i=0,$re$1179$i=0,$round$0178$i=0.0,$round6$1$i=0.0,$s$0$i=0,$s$0$us$i=0,$s$0$us$us$i=0,$s$1$i=0,$s$1$lcssa$i=0,$s$1$us$i=0,$s$1$us$us$i=0,$s1$0$i=0,$s7$0188$i=0,$s7$1$i=0,$s8$0$lcssa$i=0,$s8$0180$i=0,$s9$0$i=0;var $s9$1192$i=0,$s9$2$i=0,$sext=0,$sext93=0,$small$0$i=0.0,$small$1$i=0.0,$st$0=0,$st$0$lcssa456=0,$storemerge=0,$storemerge13=0,$storemerge8108=0,$storemerge8169=0,$t$0=0,$t$1=0,$w$$i=0,$w$0=0,$w$1=0,$w$2=0,$w$30$i=0,$wc=0;var $ws$0176=0,$ws$1187=0,$y$03$i=0,$y$03$i$i=0,$y$03$i109$i=0,$y$03$i118$i=0,$y$03$i133$i=0,$y$03$i86$i=0,$z$0$i=0,$z$0$lcssa=0,$z$0163=0,$z$1=0,$z$1$lcssa$i=0,$z$1252$i=0,$z$2=0,$z$2$i=0,$z$2$i$lcssa=0,$z$3$lcssa$i=0,$z$3239$i=0,$z$3239$us$i=0;var $z$4$i=0,$z$4$us$i=0,$z$6$$i=0,$z$6$i=0,$z$6$i$lcssa=0,$z$6$ph$i=0,label=0,sp=0;sp=STACKTOP;STACKTOP=STACKTOP+864|0;$big$i=sp+16|0;$e2$i=sp+8|0;$buf$i=sp+836|0;$0=$buf$i;$ebuf0$i=sp+824|0;$pad$i=sp+568|0;$buf=sp+528|0;$wc=sp;$mb=sp+520|0;$1=($f|0)!=(0|0);$2=$buf+40|0;$3=$2;$4=$buf+39|0;$5=$wc+4|0;$6=$wc;$7=$ebuf0$i+12|0;$8=$ebuf0$i+11|0;$9=$7;$10=$9-$0|0;$11=-2-$0|0;$12=$9+2|0;$13=$big$i+288|0;$14=$buf$i+9|0;$15=$14;$16=$buf$i+8|0;$1169=0;$1170=0;$23=$fmt;$cnt$0=0;$l$0=0;$l10n$0=0;L1:while(1){$17=($cnt$0|0)>-1;do{if($17){$18=2147483647-$cnt$0|0;$19=($l$0|0)>($18|0);if($19){$20=___errno_location()|0;HEAP32[$20>>2]=75;$cnt$1=-1;break}else{$21=$l$0+$cnt$0|0;$cnt$1=$21;break}}else{$cnt$1=$cnt$0}}while(0);$22=HEAP8[$23>>0]|0;$24=$22<<24>>24==0;if($24){$cnt$1$lcssa=$cnt$1;$l10n$0$lcssa=$l10n$0;label=344;break}else{$1171=$22;$26=$23}while(1){if($1171<<24>>24==0){$$lcssa106=$26;$z$0$lcssa=$26;break}else if($1171<<24>>24==37){$28=$26;$z$0163=$26;label=9;break}$25=$26+1|0;$$pre=HEAP8[$25>>0]|0;$1171=$$pre;$26=$25}L12:do{if((label|0)==9){while(1){label=0;$27=$28+1|0;$29=HEAP8[$27>>0]|0;$30=$29<<24>>24==37;if(!$30){$$lcssa106=$28;$z$0$lcssa=$z$0163;break L12}$31=$z$0163+1|0;$32=$28+2|0;$33=HEAP8[$32>>0]|0;$34=$33<<24>>24==37;if($34){$28=$32;$z$0163=$31;label=9}else{$$lcssa106=$32;$z$0$lcssa=$31;break}}}}while(0);$35=$z$0$lcssa;$36=$23;$37=$35-$36|0;if($1){___fwritex($23,$37,$f)|0}$38=($z$0$lcssa|0)==($23|0);if(!$38){$l10n$0$phi=$l10n$0;$1170$phi=$1170;$1169$phi=$1169;$23=$$lcssa106;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$0$phi;$1170=$1170$phi;$1169=$1169$phi;continue}$39=$$lcssa106+1|0;$40=HEAP8[$39>>0]|0;$41=$40<<24>>24;$isdigittmp=$41+-48|0;$isdigit=$isdigittmp>>>0<10;if($isdigit){$42=$$lcssa106+2|0;$43=HEAP8[$42>>0]|0;$44=$43<<24>>24==36;$45=$$lcssa106+3|0;$$92=$44?$45:$39;$$l10n$0=$44?1:$l10n$0;$isdigittmp$=$44?$isdigittmp:-1;$$pre270=HEAP8[$$92>>0]|0;$47=$$pre270;$argpos$0=$isdigittmp$;$l10n$1=$$l10n$0;$storemerge=$$92}else{$47=$40;$argpos$0=-1;$l10n$1=$l10n$0;$storemerge=$39}$46=$47<<24>>24;$48=$46&-32;$49=($48|0)==32;L24:do{if($49){$51=$46;$56=$47;$fl$0170=0;$storemerge8169=$storemerge;while(1){$50=$51+-32|0;$52=1<<$50;$53=$52&75913;$54=($53|0)==0;if($54){$65=$56;$fl$0110=$fl$0170;$storemerge8108=$storemerge8169;break L24}$55=$56<<24>>24;$57=$55+-32|0;$58=1<<$57;$59=$58|$fl$0170;$60=$storemerge8169+1|0;$61=HEAP8[$60>>0]|0;$62=$61<<24>>24;$63=$62&-32;$64=($63|0)==32;if($64){$51=$62;$56=$61;$fl$0170=$59;$storemerge8169=$60}else{$65=$61;$fl$0110=$59;$storemerge8108=$60;break}}}else{$65=$47;$fl$0110=0;$storemerge8108=$storemerge}}while(0);$66=$65<<24>>24==42;do{if($66){$67=$storemerge8108+1|0;$68=HEAP8[$67>>0]|0;$69=$68<<24>>24;$isdigittmp11=$69+-48|0;$isdigit12=$isdigittmp11>>>0<10;if($isdigit12){$70=$storemerge8108+2|0;$71=HEAP8[$70>>0]|0;$72=$71<<24>>24==36;if($72){$73=$nl_type+($isdigittmp11<<2)|0;HEAP32[$73>>2]=10;$74=HEAP8[$67>>0]|0;$75=$74<<24>>24;$76=$75+-48|0;$77=$nl_arg+($76<<3)|0;$78=$77;$79=$78;$80=HEAP32[$79>>2]|0;$81=$78+4|0;$82=$81;$83=HEAP32[$82>>2]|0;$84=$storemerge8108+3|0;$l10n$2=1;$storemerge13=$84;$w$0=$80}else{label=23}}else{label=23}if((label|0)==23){label=0;$85=($l10n$1|0)==0;if(!$85){$$0=-1;label=363;break L1}if(!$1){$105=$67;$fl$1=$fl$0110;$l10n$3=0;$w$1=0;break}$arglist_current=HEAP32[$ap>>2]|0;$86=$arglist_current;$87=0+4|0;$expanded64=$87;$expanded=$expanded64-1|0;$88=$86+$expanded|0;$89=0+4|0;$expanded68=$89;$expanded67=$expanded68-1|0;$expanded66=$expanded67^-1;$90=$88&$expanded66;$91=$90;$92=HEAP32[$91>>2]|0;$arglist_next=$91+4|0;HEAP32[$ap>>2]=$arglist_next;$l10n$2=0;$storemerge13=$67;$w$0=$92}$93=($w$0|0)<0;if($93){$94=$fl$0110|8192;$95=0-$w$0|0;$105=$storemerge13;$fl$1=$94;$l10n$3=$l10n$2;$w$1=$95}else{$105=$storemerge13;$fl$1=$fl$0110;$l10n$3=$l10n$2;$w$1=$w$0}}else{$96=$65<<24>>24;$isdigittmp1$i=$96+-48|0;$isdigit2$i=$isdigittmp1$i>>>0<10;if($isdigit2$i){$100=$storemerge8108;$i$03$i=0;$isdigittmp4$i=$isdigittmp1$i;while(1){$97=$i$03$i*10|0;$98=$97+$isdigittmp4$i|0;$99=$100+1|0;$101=HEAP8[$99>>0]|0;$102=$101<<24>>24;$isdigittmp$i=$102+-48|0;$isdigit$i=$isdigittmp$i>>>0<10;if($isdigit$i){$100=$99;$i$03$i=$98;$isdigittmp4$i=$isdigittmp$i}else{$$lcssa450=$98;$$lcssa451=$99;break}}$103=($$lcssa450|0)<0;if($103){$$0=-1;label=363;break L1}else{$105=$$lcssa451;$fl$1=$fl$0110;$l10n$3=$l10n$1;$w$1=$$lcssa450}}else{$105=$storemerge8108;$fl$1=$fl$0110;$l10n$3=$l10n$1;$w$1=0}}}while(0);$104=HEAP8[$105>>0]|0;$106=$104<<24>>24==46;L45:do{if($106){$107=$105+1|0;$108=HEAP8[$107>>0]|0;$109=$108<<24>>24==42;if(!$109){$136=$108<<24>>24;$isdigittmp1$i27=$136+-48|0;$isdigit2$i28=$isdigittmp1$i27>>>0<10;if($isdigit2$i28){$140=$107;$i$03$i30=0;$isdigittmp4$i29=$isdigittmp1$i27}else{$1172=$107;$p$0=0;break}while(1){$137=$i$03$i30*10|0;$138=$137+$isdigittmp4$i29|0;$139=$140+1|0;$141=HEAP8[$139>>0]|0;$142=$141<<24>>24;$isdigittmp$i31=$142+-48|0;$isdigit$i32=$isdigittmp$i31>>>0<10;if($isdigit$i32){$140=$139;$i$03$i30=$138;$isdigittmp4$i29=$isdigittmp$i31}else{$1172=$139;$p$0=$138;break L45}}}$110=$105+2|0;$111=HEAP8[$110>>0]|0;$112=$111<<24>>24;$isdigittmp9=$112+-48|0;$isdigit10=$isdigittmp9>>>0<10;if($isdigit10){$113=$105+3|0;$114=HEAP8[$113>>0]|0;$115=$114<<24>>24==36;if($115){$116=$nl_type+($isdigittmp9<<2)|0;HEAP32[$116>>2]=10;$117=HEAP8[$110>>0]|0;$118=$117<<24>>24;$119=$118+-48|0;$120=$nl_arg+($119<<3)|0;$121=$120;$122=$121;$123=HEAP32[$122>>2]|0;$124=$121+4|0;$125=$124;$126=HEAP32[$125>>2]|0;$127=$105+4|0;$1172=$127;$p$0=$123;break}}$128=($l10n$3|0)==0;if(!$128){$$0=-1;label=363;break L1}if($1){$arglist_current2=HEAP32[$ap>>2]|0;$129=$arglist_current2;$130=0+4|0;$expanded71=$130;$expanded70=$expanded71-1|0;$131=$129+$expanded70|0;$132=0+4|0;$expanded75=$132;$expanded74=$expanded75-1|0;$expanded73=$expanded74^-1;$133=$131&$expanded73;$134=$133;$135=HEAP32[$134>>2]|0;$arglist_next3=$134+4|0;HEAP32[$ap>>2]=$arglist_next3;$1172=$110;$p$0=$135}else{$1172=$110;$p$0=0}}else{$1172=$105;$p$0=-1}}while(0);$144=$1172;$st$0=0;while(1){$143=HEAP8[$144>>0]|0;$145=$143<<24>>24;$146=$145+-65|0;$147=$146>>>0>57;if($147){$$0=-1;label=363;break L1}$148=$144+1|0;$149=(95920+($st$0*58|0)|0)+$146|0;$150=HEAP8[$149>>0]|0;$151=$150&255;$152=$151+-1|0;$153=$152>>>0<8;if($153){$144=$148;$st$0=$151}else{$$lcssa455=$144;$$lcssa457=$148;$$lcssa458=$150;$$lcssa459=$151;$st$0$lcssa456=$st$0;break}}$154=$$lcssa458<<24>>24==0;if($154){$$0=-1;label=363;break}$155=$$lcssa458<<24>>24==19;$156=($argpos$0|0)>-1;L64:do{if($155){if($156){$$0=-1;label=363;break L1}else{$1173=$1169;$1174=$1170;label=62}}else{if($156){$157=$nl_type+($argpos$0<<2)|0;HEAP32[$157>>2]=$$lcssa459;$158=$nl_arg+($argpos$0<<3)|0;$159=HEAP32[$158>>2]|0;$160=$158+4|0;$161=HEAP32[$160>>2]|0;$1173=$161;$1174=$159;label=62;break}if(!$1){$$0=0;label=363;break L1}$162=($$lcssa458&255)>20;if($162){$264=$1170;$291=$1169}else{do{switch($$lcssa459|0){case 15:{$arglist_current23=HEAP32[$ap>>2]|0;$218=$arglist_current23;$219=0+4|0;$expanded120=$219;$expanded119=$expanded120-1|0;$220=$218+$expanded119|0;$221=0+4|0;$expanded124=$221;$expanded123=$expanded124-1|0;$expanded122=$expanded123^-1;$222=$220&$expanded122;$223=$222;$224=HEAP32[$223>>2]|0;$arglist_next24=$223+4|0;HEAP32[$ap>>2]=$arglist_next24;$225=$224&255;$226=$225<<24>>24;$227=($226|0)<0;$228=$227<<31>>31;$sext=$224<<24;$229=$sext>>24;$264=$229;$291=$228;break L64;break}case 12:{$arglist_current14=HEAP32[$ap>>2]|0;$187=$arglist_current14;$188=0+8|0;$expanded99=$188;$expanded98=$expanded99-1|0;$189=$187+$expanded98|0;$190=0+8|0;$expanded103=$190;$expanded102=$expanded103-1|0;$expanded101=$expanded102^-1;$191=$189&$expanded101;$192=$191;$193=$192;$194=$193;$195=HEAP32[$194>>2]|0;$196=$193+4|0;$197=$196;$198=HEAP32[$197>>2]|0;$arglist_next15=$192+8|0;HEAP32[$ap>>2]=$arglist_next15;$264=$195;$291=$198;break L64;break}case 17:{$arglist_current29=HEAP32[$ap>>2]|0;$237=$arglist_current29;$238=0+8|0;$expanded134=$238;$expanded133=$expanded134-1|0;$239=$237+$expanded133|0;$240=0+8|0;$expanded138=$240;$expanded137=$expanded138-1|0;$expanded136=$expanded137^-1;$241=$239&$expanded136;$242=$241;$243=+HEAPF64[$242>>3];$arglist_next30=$242+8|0;HEAP32[$ap>>2]=$arglist_next30;HEAPF64[tempDoublePtr>>3]=$243;$244=HEAP32[tempDoublePtr>>2]|0;$245=HEAP32[tempDoublePtr+4>>2]|0;$264=$244;$291=$245;break L64;break}case 11:{$arglist_current11=HEAP32[$ap>>2]|0;$180=$arglist_current11;$181=0+4|0;$expanded92=$181;$expanded91=$expanded92-1|0;$182=$180+$expanded91|0;$183=0+4|0;$expanded96=$183;$expanded95=$expanded96-1|0;$expanded94=$expanded95^-1;$184=$182&$expanded94;$185=$184;$186=HEAP32[$185>>2]|0;$arglist_next12=$185+4|0;HEAP32[$ap>>2]=$arglist_next12;$264=$186;$291=0;break L64;break}case 10:{$arglist_current8=HEAP32[$ap>>2]|0;$171=$arglist_current8;$172=0+4|0;$expanded85=$172;$expanded84=$expanded85-1|0;$173=$171+$expanded84|0;$174=0+4|0;$expanded89=$174;$expanded88=$expanded89-1|0;$expanded87=$expanded88^-1;$175=$173&$expanded87;$176=$175;$177=HEAP32[$176>>2]|0;$arglist_next9=$176+4|0;HEAP32[$ap>>2]=$arglist_next9;$178=($177|0)<0;$179=$178<<31>>31;$264=$177;$291=$179;break L64;break}case 9:{$arglist_current5=HEAP32[$ap>>2]|0;$163=$arglist_current5;$164=0+4|0;$expanded78=$164;$expanded77=$expanded78-1|0;$165=$163+$expanded77|0;$166=0+4|0;$expanded82=$166;$expanded81=$expanded82-1|0;$expanded80=$expanded81^-1;$167=$165&$expanded80;$168=$167;$169=HEAP32[$168>>2]|0;$arglist_next6=$168+4|0;HEAP32[$ap>>2]=$arglist_next6;$170=$169;$264=$170;$291=$1169;break L64;break}case 13:{$arglist_current17=HEAP32[$ap>>2]|0;$199=$arglist_current17;$200=0+4|0;$expanded106=$200;$expanded105=$expanded106-1|0;$201=$199+$expanded105|0;$202=0+4|0;$expanded110=$202;$expanded109=$expanded110-1|0;$expanded108=$expanded109^-1;$203=$201&$expanded108;$204=$203;$205=HEAP32[$204>>2]|0;$arglist_next18=$204+4|0;HEAP32[$ap>>2]=$arglist_next18;$206=$205&65535;$207=$206<<16>>16;$208=($207|0)<0;$209=$208<<31>>31;$sext93=$205<<16;$210=$sext93>>16;$264=$210;$291=$209;break L64;break}case 16:{$arglist_current26=HEAP32[$ap>>2]|0;$230=$arglist_current26;$231=0+4|0;$expanded127=$231;$expanded126=$expanded127-1|0;$232=$230+$expanded126|0;$233=0+4|0;$expanded131=$233;$expanded130=$expanded131-1|0;$expanded129=$expanded130^-1;$234=$232&$expanded129;$235=$234;$236=HEAP32[$235>>2]|0;$arglist_next27=$235+4|0;HEAP32[$ap>>2]=$arglist_next27;$$mask$i38=$236&255;$264=$$mask$i38;$291=0;break L64;break}case 18:{$arglist_current32=HEAP32[$ap>>2]|0;$246=$arglist_current32;$247=0+8|0;$expanded141=$247;$expanded140=$expanded141-1|0;$248=$246+$expanded140|0;$249=0+8|0;$expanded145=$249;$expanded144=$expanded145-1|0;$expanded143=$expanded144^-1;$250=$248&$expanded143;$251=$250;$252=+HEAPF64[$251>>3];$arglist_next33=$251+8|0;HEAP32[$ap>>2]=$arglist_next33;HEAPF64[tempDoublePtr>>3]=$252;$253=HEAP32[tempDoublePtr>>2]|0;$254=HEAP32[tempDoublePtr+4>>2]|0;$264=$253;$291=$254;break L64;break}case 14:{$arglist_current20=HEAP32[$ap>>2]|0;$211=$arglist_current20;$212=0+4|0;$expanded113=$212;$expanded112=$expanded113-1|0;$213=$211+$expanded112|0;$214=0+4|0;$expanded117=$214;$expanded116=$expanded117-1|0;$expanded115=$expanded116^-1;$215=$213&$expanded115;$216=$215;$217=HEAP32[$216>>2]|0;$arglist_next21=$216+4|0;HEAP32[$ap>>2]=$arglist_next21;$$mask1$i37=$217&65535;$264=$$mask1$i37;$291=0;break L64;break}default:{$264=$1170;$291=$1169;break L64}}}while(0)}}}while(0);if((label|0)==62){label=0;if($1){$264=$1174;$291=$1173}else{$1169=$1173;$1170=$1174;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$3;continue}}$255=HEAP8[$$lcssa455>>0]|0;$256=$255<<24>>24;$257=($st$0$lcssa456|0)!=0;$258=$256&15;$259=($258|0)==3;$or$cond15=$257&$259;$260=$256&-33;$t$0=$or$cond15?$260:$256;$261=$fl$1&8192;$262=($261|0)==0;$263=$fl$1&-65537;$fl$1$=$262?$fl$1:$263;L86:do{switch($t$0|0){case 117:{$336=$291;$338=$264;$pl$0=0;$prefix$0=96400;label=84;break}case 111:{$312=($264|0)==0;$313=($291|0)==0;$314=$312&$313;if($314){$$0$lcssa$i51=$2}else{$$03$i48=$2;$316=$264;$320=$291;while(1){$315=$316&7;$317=$315|48;$318=$317&255;$319=$$03$i48+-1|0;HEAP8[$319>>0]=$318;$321=_bitshift64Lshr($316|0,$320|0,3)|0;$322=tempRet0;$323=($321|0)==0;$324=($322|0)==0;$325=$323&$324;if($325){$$0$lcssa$i51=$319;break}else{$$03$i48=$319;$316=$321;$320=$322}}}$326=$fl$1$&8;$327=($326|0)==0;$or$cond19=$327|$314;$$24=$or$cond19?96400:96405;$328=$or$cond19&1;$$25=$328^1;$366=$264;$368=$291;$a$0=$$0$lcssa$i51;$fl$4=$fl$1$;$p$2=$p$0;$pl$1=$$25;$prefix$1=$$24;label=89;break}case 67:{HEAP32[$wc>>2]=$264;HEAP32[$5>>2]=0;$1179=$wc;$1180=$6;$p$4272=-1;label=97;break}case 83:{$391=$264;$392=($p$0|0)==0;if($392){$1181=$264;$1182=$391;$i$0$lcssa273=0;label=102}else{$1179=$391;$1180=$264;$p$4272=$p$0;label=97}break}case 110:{switch($st$0$lcssa456|0){case 7:{$279=($cnt$1|0)<0;$280=$279<<31>>31;$281=$264;$282=$281;$283=$282;HEAP32[$283>>2]=$cnt$1;$284=$282+4|0;$285=$284;HEAP32[$285>>2]=$280;$1169=$291;$1170=$264;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$3;continue L1;break}case 0:{$265=$264;HEAP32[$265>>2]=$cnt$1;$1169=$291;$1170=$264;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$3;continue L1;break}case 1:{$266=$264;HEAP32[$266>>2]=$cnt$1;$1169=$291;$1170=$264;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$3;continue L1;break}case 2:{$267=($cnt$1|0)<0;$268=$267<<31>>31;$269=$264;$270=$269;$271=$270;HEAP32[$271>>2]=$cnt$1;$272=$270+4|0;$273=$272;HEAP32[$273>>2]=$268;$1169=$291;$1170=$264;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$3;continue L1;break}case 3:{$274=$cnt$1&65535;$275=$264;HEAP16[$275>>1]=$274;$1169=$291;$1170=$264;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$3;continue L1;break}case 4:{$276=$cnt$1&255;$277=$264;HEAP8[$277>>0]=$276;$1169=$291;$1170=$264;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$3;continue L1;break}case 6:{$278=$264;HEAP32[$278>>2]=$cnt$1;$1169=$291;$1170=$264;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$3;continue L1;break}default:{$1169=$291;$1170=$264;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$37;$l10n$0=$l10n$3;continue L1}}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{HEAP32[tempDoublePtr>>2]=$264;HEAP32[tempDoublePtr+4>>2]=$291;$430=+HEAPF64[tempDoublePtr>>3];HEAP32[$e2$i>>2]=0;$431=($291|0)<0;if($431){$432=-$430;$$07$i=$432;$pl$0$i=1;$prefix$0$i=96424}else{$433=$fl$1$&2048;$434=($433|0)==0;if($434){$435=$fl$1$&1;$436=($435|0)==0;$$$i=$436?96425:96430;$$07$i=$430;$pl$0$i=$435;$prefix$0$i=$$$i}else{$$07$i=$430;$pl$0$i=1;$prefix$0$i=96427}}HEAPF64[tempDoublePtr>>3]=$$07$i;$437=HEAP32[tempDoublePtr>>2]|0;$438=HEAP32[tempDoublePtr+4>>2]|0;$439=$438&2146435072;$440=$439>>>0<2146435072;$441=0<0;$442=($439|0)==2146435072;$443=$442&$441;$444=$440|$443;do{if($444){$471=+_frexpl($$07$i,$e2$i);$472=$471*2.0;$473=$472!=0.0;if($473){$474=HEAP32[$e2$i>>2]|0;$475=$474+-1|0;HEAP32[$e2$i>>2]=$475}$476=$t$0|32;$477=($476|0)==97;if($477){$478=$t$0&32;$479=($478|0)==0;$480=$prefix$0$i+9|0;$prefix$0$$i=$479?$prefix$0$i:$480;$481=$pl$0$i|2;$482=$p$0>>>0>11;$483=12-$p$0|0;$484=($483|0)==0;$485=$482|$484;do{if($485){$$1$i=$472}else{$re$1179$i=$483;$round$0178$i=8.0;while(1){$486=$re$1179$i+-1|0;$487=$round$0178$i*16.0;$488=($486|0)==0;if($488){$$lcssa483=$487;break}else{$re$1179$i=$486;$round$0178$i=$487}}$489=HEAP8[$prefix$0$$i>>0]|0;$490=$489<<24>>24==45;if($490){$491=-$472;$492=$491-$$lcssa483;$493=$$lcssa483+$492;$494=-$493;$$1$i=$494;break}else{$495=$472+$$lcssa483;$496=$495-$$lcssa483;$$1$i=$496;break}}}while(0);$497=HEAP32[$e2$i>>2]|0;$498=($497|0)<0;$499=0-$497|0;$500=$498?$499:$497;$501=($500|0)<0;if($501){$502=($500|0)<0;$503=$502<<31>>31;$$05$i$i=$7;$504=$500;$505=$503;while(1){$506=___uremdi3($504|0,$505|0,10,0)|0;$507=tempRet0;$508=$506|48;$509=$508&255;$510=$$05$i$i+-1|0;HEAP8[$510>>0]=$509;$511=___udivdi3($504|0,$505|0,10,0)|0;$512=tempRet0;$513=$505>>>0>9;$514=$504>>>0>4294967295;$515=($505|0)==9;$516=$515&$514;$517=$513|$516;if($517){$$05$i$i=$510;$504=$511;$505=$512}else{$$lcssa484=$510;$1183=$511;$1184=$512;break}}$$0$lcssa$i48$i=$$lcssa484;$$01$lcssa$off0$i$i=$1183}else{$$0$lcssa$i48$i=$7;$$01$lcssa$off0$i$i=$500}$518=($$01$lcssa$off0$i$i|0)==0;if($518){$$1$lcssa$i$i=$$0$lcssa$i48$i}else{$$12$i$i=$$0$lcssa$i48$i;$y$03$i$i=$$01$lcssa$off0$i$i;while(1){$519=($y$03$i$i>>>0)%10&-1;$520=$519|48;$521=$520&255;$522=$$12$i$i+-1|0;HEAP8[$522>>0]=$521;$523=($y$03$i$i>>>0)/10&-1;$524=$y$03$i$i>>>0<10;if($524){$$1$lcssa$i$i=$522;break}else{$$12$i$i=$522;$y$03$i$i=$523}}}$525=($$1$lcssa$i$i|0)==($7|0);if($525){HEAP8[$8>>0]=48;$estr$0$i=$8}else{$estr$0$i=$$1$lcssa$i$i}$526=HEAP32[$e2$i>>2]|0;$527=$526>>31;$528=$527&2;$529=$528+43|0;$530=$529&255;$531=$estr$0$i+-1|0;HEAP8[$531>>0]=$530;$532=$t$0+15|0;$533=$532&255;$534=$estr$0$i+-2|0;HEAP8[$534>>0]=$533;$535=$fl$1$&8;$536=($535|0)==0;if($536){$notrhs$i=($p$0|0)<1;if($notrhs$i){$$2$us$us$i=$$1$i;$s$0$us$us$i=$buf$i;while(1){$537=~~$$2$us$us$i;$538=96384+$537|0;$539=HEAP8[$538>>0]|0;$540=$539&255;$541=$540|$478;$542=$541&255;$543=$s$0$us$us$i+1|0;HEAP8[$s$0$us$us$i>>0]=$542;$544=+($537|0);$545=$$2$us$us$i-$544;$546=$545*16.0;$547=$543;$548=$547-$0|0;$549=($548|0)!=1;$notlhs$us$us$i=$546==0.0;$or$cond$i79=$549|$notlhs$us$us$i;if($or$cond$i79){$s$1$us$us$i=$543}else{$550=$s$0$us$us$i+2|0;HEAP8[$543>>0]=46;$s$1$us$us$i=$550}$551=$546!=0.0;if($551){$$2$us$us$i=$546;$s$0$us$us$i=$s$1$us$us$i}else{$s$1$lcssa$i=$s$1$us$us$i;break}}}else{$$2$us$i=$$1$i;$s$0$us$i=$buf$i;while(1){$552=~~$$2$us$i;$553=96384+$552|0;$554=HEAP8[$553>>0]|0;$555=$554&255;$556=$555|$478;$557=$556&255;$558=$s$0$us$i+1|0;HEAP8[$s$0$us$i>>0]=$557;$559=+($552|0);$560=$$2$us$i-$559;$561=$560*16.0;$562=$558;$563=$562-$0|0;$564=($563|0)==1;if($564){$565=$s$0$us$i+2|0;HEAP8[$558>>0]=46;$s$1$us$i=$565}else{$s$1$us$i=$558}$566=$561!=0.0;if($566){$$2$us$i=$561;$s$0$us$i=$s$1$us$i}else{$s$1$lcssa$i=$s$1$us$i;break}}}}else{$$2$i=$$1$i;$s$0$i=$buf$i;while(1){$567=~~$$2$i;$568=96384+$567|0;$569=HEAP8[$568>>0]|0;$570=$569&255;$571=$570|$478;$572=$571&255;$573=$s$0$i+1|0;HEAP8[$s$0$i>>0]=$572;$574=+($567|0);$575=$$2$i-$574;$576=$575*16.0;$577=$573;$578=$577-$0|0;$579=($578|0)==1;if($579){$580=$s$0$i+2|0;HEAP8[$573>>0]=46;$s$1$i=$580}else{$s$1$i=$573}$581=$576!=0.0;if($581){$$2$i=$576;$s$0$i=$s$1$i}else{$s$1$lcssa$i=$s$1$i;break}}}$582=($p$0|0)!=0;$$pre300$i=$s$1$lcssa$i;$583=$11+$$pre300$i|0;$584=($583|0)<($p$0|0);$or$cond332=$582&$584;$585=$534;$586=$12+$p$0|0;$587=$586-$585|0;$588=$534;$589=$10-$588|0;$590=$589+$$pre300$i|0;$l$0$i=$or$cond332?$587:$590;$591=$l$0$i+$481|0;$592=$fl$1$&73728;$593=($592|0)==0;$594=($w$1|0)>($591|0);$or$cond$i52$i=$593&$594;if($or$cond$i52$i){$595=$w$1-$591|0;$596=$595>>>0>256;$597=$596?256:$595;_memset($pad$i|0,32,$597|0)|0;$598=$595>>>0>255;if($598){$$01$i54$i=$595;while(1){___fwritex($pad$i,256,$f)|0;$599=$$01$i54$i+-256|0;$600=$599>>>0>255;if($600){$$01$i54$i=$599}else{break}}$601=$595&255;$$0$lcssa$i56$i=$601}else{$$0$lcssa$i56$i=$595}___fwritex($pad$i,$$0$lcssa$i56$i,$f)|0}___fwritex($prefix$0$$i,$481,$f)|0;$602=($592|0)==65536;$or$cond$i59$i=$602&$594;if($or$cond$i59$i){$603=$w$1-$591|0;$604=$603>>>0>256;$605=$604?256:$603;_memset($pad$i|0,48,$605|0)|0;$606=$603>>>0>255;if($606){$$01$i61$i=$603;while(1){___fwritex($pad$i,256,$f)|0;$607=$$01$i61$i+-256|0;$608=$607>>>0>255;if($608){$$01$i61$i=$607}else{break}}$609=$603&255;$$0$lcssa$i63$i=$609}else{$$0$lcssa$i63$i=$603}___fwritex($pad$i,$$0$lcssa$i63$i,$f)|0}$610=$$pre300$i-$0|0;___fwritex($buf$i,$610,$f)|0;$611=$534;$612=$9-$611|0;$613=$l$0$i-$612|0;$614=$613-$610|0;$615=($614|0)>0;if($615){$616=$614>>>0>256;$617=$616?256:$614;_memset($pad$i|0,48,$617|0)|0;$618=$614>>>0>255;if($618){$$01$i67$i=$614;while(1){___fwritex($pad$i,256,$f)|0;$619=$$01$i67$i+-256|0;$620=$619>>>0>255;if($620){$$01$i67$i=$619}else{break}}$621=$614&255;$$0$lcssa$i69$i=$621}else{$$0$lcssa$i69$i=$614}___fwritex($pad$i,$$0$lcssa$i69$i,$f)|0}___fwritex($534,$612,$f)|0;$622=($592|0)==8192;$or$cond$i72$i=$622&$594;if($or$cond$i72$i){$623=$w$1-$591|0;$624=$623>>>0>256;$625=$624?256:$623;_memset($pad$i|0,32,$625|0)|0;$626=$623>>>0>255;if($626){$$01$i74$i=$623;while(1){___fwritex($pad$i,256,$f)|0;$627=$$01$i74$i+-256|0;$628=$627>>>0>255;if($628){$$01$i74$i=$627}else{break}}$629=$623&255;$$0$lcssa$i76$i=$629}else{$$0$lcssa$i76$i=$623}___fwritex($pad$i,$$0$lcssa$i76$i,$f)|0}$w$$i=$594?$w$1:$591;$$0$i=$w$$i;break}$630=($p$0|0)<0;$$p$i=$630?6:$p$0;if($473){$631=$472*268435456.0;$632=HEAP32[$e2$i>>2]|0;$633=$632+-28|0;HEAP32[$e2$i>>2]=$633;$$3$i=$631;$634=$633}else{$$pre$i=HEAP32[$e2$i>>2]|0;$$3$i=$472;$634=$$pre$i}$635=($634|0)<0;$$31$i=$635?$big$i:$13;$636=$$31$i;$$4$i=$$3$i;$z$0$i=$$31$i;while(1){$637=~~$$4$i>>>0;HEAP32[$z$0$i>>2]=$637;$638=$z$0$i+4|0;$639=+($637>>>0);$640=$$4$i-$639;$641=$640*1.0E+9;$642=$641!=0.0;if($642){$$4$i=$641;$z$0$i=$638}else{$$lcssa460=$638;break}}$$pr$i=HEAP32[$e2$i>>2]|0;$643=($$pr$i|0)>0;if($643){$644=$$pr$i;$a$1253$i=$$31$i;$z$1252$i=$$lcssa460;while(1){$645=($644|0)>29;$646=$645?29:$644;$d$0245$i=$z$1252$i+-4|0;$647=$d$0245$i>>>0<$a$1253$i>>>0;do{if($647){$a$2$ph$i=$a$1253$i}else{$carry$0246$i=0;$d$0247$i=$d$0245$i;while(1){$648=HEAP32[$d$0247$i>>2]|0;$649=_bitshift64Shl($648|0,0,$646|0)|0;$650=tempRet0;$651=_i64Add($649|0,$650|0,$carry$0246$i|0,0)|0;$652=tempRet0;$653=___uremdi3($651|0,$652|0,1000000000,0)|0;$654=tempRet0;HEAP32[$d$0247$i>>2]=$653;$655=___udivdi3($651|0,$652|0,1000000000,0)|0;$656=tempRet0;$d$0$i=$d$0247$i+-4|0;$657=$d$0$i>>>0<$a$1253$i>>>0;if($657){$$lcssa461=$655;break}else{$carry$0246$i=$655;$d$0247$i=$d$0$i}}$658=($$lcssa461|0)==0;if($658){$a$2$ph$i=$a$1253$i;break}$659=$a$1253$i+-4|0;HEAP32[$659>>2]=$$lcssa461;$a$2$ph$i=$659}}while(0);$z$2$i=$z$1252$i;while(1){$660=$z$2$i>>>0>$a$2$ph$i>>>0;if(!$660){$z$2$i$lcssa=$z$2$i;break}$661=$z$2$i+-4|0;$662=HEAP32[$661>>2]|0;$663=($662|0)==0;if($663){$z$2$i=$661}else{$z$2$i$lcssa=$z$2$i;break}}$664=HEAP32[$e2$i>>2]|0;$665=$664-$646|0;HEAP32[$e2$i>>2]=$665;$666=($665|0)>0;if($666){$644=$665;$a$1253$i=$a$2$ph$i;$z$1252$i=$z$2$i$lcssa}else{$$pr146$i=$665;$a$1$lcssa$i=$a$2$ph$i;$z$1$lcssa$i=$z$2$i$lcssa;break}}}else{$$pr146$i=$$pr$i;$a$1$lcssa$i=$$31$i;$z$1$lcssa$i=$$lcssa460}$667=($$pr146$i|0)<0;L228:do{if($667){$668=$$p$i+25|0;$669=($668|0)/9&-1;$670=$669+1|0;$671=($476|0)==102;if(!$671){$704=$$pr146$i;$a$3240$i=$a$1$lcssa$i;$z$3239$i=$z$1$lcssa$i;while(1){$703=0-$704|0;$705=($703|0)>9;$706=$705?9:$703;$707=$a$3240$i>>>0<$z$3239$i>>>0;do{if($707){$711=1<<$706;$712=$711+-1|0;$713=1000000000>>>$706;$carry3$0234$i=0;$d$1233$i=$a$3240$i;while(1){$714=HEAP32[$d$1233$i>>2]|0;$715=$714&$712;$716=$714>>>$706;$717=$716+$carry3$0234$i|0;HEAP32[$d$1233$i>>2]=$717;$718=Math_imul($715,$713)|0;$719=$d$1233$i+4|0;$720=$719>>>0<$z$3239$i>>>0;if($720){$carry3$0234$i=$718;$d$1233$i=$719}else{$$lcssa463=$718;break}}$721=HEAP32[$a$3240$i>>2]|0;$722=($721|0)==0;$723=$a$3240$i+4|0;$$a$3$i=$722?$723:$a$3240$i;$724=($$lcssa463|0)==0;if($724){$$a$3306$i=$$a$3$i;$z$4$i=$z$3239$i;break}$725=$z$3239$i+4|0;HEAP32[$z$3239$i>>2]=$$lcssa463;$$a$3306$i=$$a$3$i;$z$4$i=$725}else{$708=HEAP32[$a$3240$i>>2]|0;$709=($708|0)==0;$710=$a$3240$i+4|0;$$a$3305$i=$709?$710:$a$3240$i;$$a$3306$i=$$a$3305$i;$z$4$i=$z$3239$i}}while(0);$726=$z$4$i;$727=$$a$3306$i;$728=$726-$727|0;$729=$728>>2;$730=($729|0)>($670|0);$731=$$a$3306$i+($670<<2)|0;$$z$4$i=$730?$731:$z$4$i;$732=HEAP32[$e2$i>>2]|0;$733=$732+$706|0;HEAP32[$e2$i>>2]=$733;$734=($733|0)<0;if($734){$704=$733;$a$3240$i=$$a$3306$i;$z$3239$i=$$z$4$i}else{$a$3$lcssa$i=$$a$3306$i;$z$3$lcssa$i=$$z$4$i;break L228}}}$672=$$31$i+($670<<2)|0;$674=$$pr146$i;$a$3240$us$i=$a$1$lcssa$i;$z$3239$us$i=$z$1$lcssa$i;while(1){$673=0-$674|0;$675=($673|0)>9;$676=$675?9:$673;$677=$a$3240$us$i>>>0<$z$3239$us$i>>>0;do{if($677){$702=1<<$676;$695=$702+-1|0;$699=1000000000>>>$676;$carry3$0234$us$i=0;$d$1233$us$i=$a$3240$us$i;while(1){$693=HEAP32[$d$1233$us$i>>2]|0;$694=$693&$695;$696=$693>>>$676;$697=$696+$carry3$0234$us$i|0;HEAP32[$d$1233$us$i>>2]=$697;$698=Math_imul($694,$699)|0;$700=$d$1233$us$i+4|0;$701=$700>>>0<$z$3239$us$i>>>0;if($701){$carry3$0234$us$i=$698;$d$1233$us$i=$700}else{$$lcssa464=$698;break}}$681=HEAP32[$a$3240$us$i>>2]|0;$682=($681|0)==0;$683=$a$3240$us$i+4|0;$$a$3$us$i=$682?$683:$a$3240$us$i;$684=($$lcssa464|0)==0;if($684){$$a$3$us304$i=$$a$3$us$i;$z$4$us$i=$z$3239$us$i;break}$685=$z$3239$us$i+4|0;HEAP32[$z$3239$us$i>>2]=$$lcssa464;$$a$3$us304$i=$$a$3$us$i;$z$4$us$i=$685}else{$678=HEAP32[$a$3240$us$i>>2]|0;$679=($678|0)==0;$680=$a$3240$us$i+4|0;$$a$3$us303$i=$679?$680:$a$3240$us$i;$$a$3$us304$i=$$a$3$us303$i;$z$4$us$i=$z$3239$us$i}}while(0);$686=$z$4$us$i;$687=$686-$636|0;$688=$687>>2;$689=($688|0)>($670|0);$$z$4$us$i=$689?$672:$z$4$us$i;$690=HEAP32[$e2$i>>2]|0;$691=$690+$676|0;HEAP32[$e2$i>>2]=$691;$692=($691|0)<0;if($692){$674=$691;$a$3240$us$i=$$a$3$us304$i;$z$3239$us$i=$$z$4$us$i}else{$a$3$lcssa$i=$$a$3$us304$i;$z$3$lcssa$i=$$z$4$us$i;break}}}else{$a$3$lcssa$i=$a$1$lcssa$i;$z$3$lcssa$i=$z$1$lcssa$i}}while(0);$735=$a$3$lcssa$i>>>0<$z$3$lcssa$i>>>0;do{if($735){$736=$a$3$lcssa$i;$737=$636-$736|0;$738=$737>>2;$739=$738*9|0;$740=HEAP32[$a$3$lcssa$i>>2]|0;$741=$740>>>0<10;if($741){$e$1$i=$739;break}else{$e$0229$i=$739;$i$0228$i=10}while(1){$742=$i$0228$i*10|0;$743=$e$0229$i+1|0;$744=$740>>>0<$742>>>0;if($744){$e$1$i=$743;break}else{$e$0229$i=$743;$i$0228$i=$742}}}else{$e$1$i=0}}while(0);$745=($476|0)!=102;$746=$745?$e$1$i:0;$747=$$p$i-$746|0;$748=($476|0)==103;$749=($$p$i|0)!=0;$750=$749&$748;$$neg151$i=$750<<31>>31;$751=$747+$$neg151$i|0;$752=$z$3$lcssa$i;$753=$752-$636|0;$754=$753>>2;$755=$754*9|0;$756=$755+-9|0;$757=($751|0)<($756|0);if($757){$758=$751+9216|0;$759=($758|0)/9&-1;$$sum$i=$759+-1023|0;$760=$$31$i+($$sum$i<<2)|0;$761=($758|0)%9&-1;$j$0221$i=$761+1|0;$762=($j$0221$i|0)<9;if($762){$i$1222$i=10;$j$0223$i=$j$0221$i;while(1){$763=$i$1222$i*10|0;$j$0$i=$j$0223$i+1|0;$exitcond$i=($j$0$i|0)==9;if($exitcond$i){$i$1$lcssa$i=$763;break}else{$i$1222$i=$763;$j$0223$i=$j$0$i}}}else{$i$1$lcssa$i=10}$764=HEAP32[$760>>2]|0;$765=($764>>>0)%($i$1$lcssa$i>>>0)&-1;$766=($765|0)==0;if($766){$$sum15$i=$759+-1022|0;$767=$$31$i+($$sum15$i<<2)|0;$768=($767|0)==($z$3$lcssa$i|0);if($768){$a$7$i=$a$3$lcssa$i;$d$3$i=$760;$e$3$i=$e$1$i}else{label=221}}else{label=221}do{if((label|0)==221){label=0;$769=($764>>>0)/($i$1$lcssa$i>>>0)&-1;$770=$769&1;$771=($770|0)==0;$$20$i=$771?9007199254740992.0:9007199254740994.0;$772=($i$1$lcssa$i|0)/2&-1;$773=$765>>>0<$772>>>0;do{if($773){$small$0$i=0.5}else{$774=($765|0)==($772|0);if($774){$$sum16$i=$759+-1022|0;$775=$$31$i+($$sum16$i<<2)|0;$776=($775|0)==($z$3$lcssa$i|0);if($776){$small$0$i=1.0;break}}$small$0$i=1.5}}while(0);$777=($pl$0$i|0)==0;do{if($777){$round6$1$i=$$20$i;$small$1$i=$small$0$i}else{$778=HEAP8[$prefix$0$i>>0]|0;$779=$778<<24>>24==45;if(!$779){$round6$1$i=$$20$i;$small$1$i=$small$0$i;break}$780=-$$20$i;$781=-$small$0$i;$round6$1$i=$780;$small$1$i=$781}}while(0);$782=$764-$765|0;HEAP32[$760>>2]=$782;$783=$round6$1$i+$small$1$i;$784=$783!=$round6$1$i;if(!$784){$a$7$i=$a$3$lcssa$i;$d$3$i=$760;$e$3$i=$e$1$i;break}$785=$782+$i$1$lcssa$i|0;HEAP32[$760>>2]=$785;$786=$785>>>0>999999999;if($786){$a$5215$i=$a$3$lcssa$i;$d$2214$i=$760;while(1){$787=$d$2214$i+-4|0;HEAP32[$d$2214$i>>2]=0;$788=$787>>>0<$a$5215$i>>>0;if($788){$789=$a$5215$i+-4|0;HEAP32[$789>>2]=0;$a$6$i=$789}else{$a$6$i=$a$5215$i}$790=HEAP32[$787>>2]|0;$791=$790+1|0;HEAP32[$787>>2]=$791;$792=$791>>>0>999999999;if($792){$a$5215$i=$a$6$i;$d$2214$i=$787}else{$a$5$lcssa$i=$a$6$i;$d$2$lcssa$i=$787;break}}}else{$a$5$lcssa$i=$a$3$lcssa$i;$d$2$lcssa$i=$760}$793=$a$5$lcssa$i;$794=$636-$793|0;$795=$794>>2;$796=$795*9|0;$797=HEAP32[$a$5$lcssa$i>>2]|0;$798=$797>>>0<10;if($798){$a$7$i=$a$5$lcssa$i;$d$3$i=$d$2$lcssa$i;$e$3$i=$796;break}else{$e$2210$i=$796;$i$2209$i=10}while(1){$799=$i$2209$i*10|0;$800=$e$2210$i+1|0;$801=$797>>>0<$799>>>0;if($801){$a$7$i=$a$5$lcssa$i;$d$3$i=$d$2$lcssa$i;$e$3$i=$800;break}else{$e$2210$i=$800;$i$2209$i=$799}}}}while(0);$802=$d$3$i+4|0;$803=$z$3$lcssa$i>>>0>$802>>>0;$$z$3$i=$803?$802:$z$3$lcssa$i;$a$8$ph$i=$a$7$i;$e$4$ph$i=$e$3$i;$z$6$ph$i=$$z$3$i}else{$a$8$ph$i=$a$3$lcssa$i;$e$4$ph$i=$e$1$i;$z$6$ph$i=$z$3$lcssa$i}$804=0-$e$4$ph$i|0;$z$6$i=$z$6$ph$i;while(1){$805=$z$6$i>>>0>$a$8$ph$i>>>0;if(!$805){$$lcssa275$i=0;$z$6$i$lcssa=$z$6$i;break}$806=$z$6$i+-4|0;$807=HEAP32[$806>>2]|0;$808=($807|0)==0;if($808){$z$6$i=$806}else{$$lcssa275$i=1;$z$6$i$lcssa=$z$6$i;break}}do{if($748){$809=$749&1;$810=$809^1;$$p$$i=$810+$$p$i|0;$811=($$p$$i|0)>($e$4$ph$i|0);$812=($e$4$ph$i|0)>-5;$or$cond6$i=$811&$812;if($or$cond6$i){$813=$t$0+-1|0;$$neg152$i=$$p$$i+-1|0;$814=$$neg152$i-$e$4$ph$i|0;$$013$i=$813;$$210$i=$814}else{$815=$t$0+-2|0;$816=$$p$$i+-1|0;$$013$i=$815;$$210$i=$816}$817=$fl$1$&8;$818=($817|0)==0;if(!$818){$$114$i=$$013$i;$$311$i=$$210$i;$$pre$phi302$iZ2D=$817;break}do{if($$lcssa275$i){$819=$z$6$i$lcssa+-4|0;$820=HEAP32[$819>>2]|0;$821=($820|0)==0;if($821){$j$2$i=9;break}$822=($820>>>0)%10&-1;$823=($822|0)==0;if($823){$i$3205$i=10;$j$1206$i=0}else{$j$2$i=0;break}while(1){$824=$i$3205$i*10|0;$825=$j$1206$i+1|0;$826=($820>>>0)%($824>>>0)&-1;$827=($826|0)==0;if($827){$i$3205$i=$824;$j$1206$i=$825}else{$j$2$i=$825;break}}}else{$j$2$i=9}}while(0);$828=$$013$i|32;$829=($828|0)==102;$830=$z$6$i$lcssa;$831=$830-$636|0;$832=$831>>2;$833=$832*9|0;$834=$833+-9|0;if($829){$835=$834-$j$2$i|0;$836=($835|0)<0;$$21$i=$836?0:$835;$837=($$210$i|0)<($$21$i|0);$$210$$22$i=$837?$$210$i:$$21$i;$$114$i=$$013$i;$$311$i=$$210$$22$i;$$pre$phi302$iZ2D=0;break}else{$838=$834+$e$4$ph$i|0;$839=$838-$j$2$i|0;$840=($839|0)<0;$$23$i=$840?0:$839;$841=($$210$i|0)<($$23$i|0);$$210$$24$i=$841?$$210$i:$$23$i;$$114$i=$$013$i;$$311$i=$$210$$24$i;$$pre$phi302$iZ2D=0;break}}else{$$pre301$i=$fl$1$&8;$$114$i=$t$0;$$311$i=$$p$i;$$pre$phi302$iZ2D=$$pre301$i}}while(0);$842=$$311$i|$$pre$phi302$iZ2D;$843=($842|0)!=0;$844=$843&1;$845=$$114$i|32;$846=($845|0)==102;if($846){$847=($e$4$ph$i|0)>0;$848=$847?$e$4$ph$i:0;$$pn$i=$848;$estr$2$i=0}else{$849=($e$4$ph$i|0)<0;$850=$849?$804:$e$4$ph$i;$851=($850|0)<0;if($851){$852=($850|0)<0;$853=$852<<31>>31;$$05$i79$i=$7;$854=$850;$855=$853;while(1){$856=___uremdi3($854|0,$855|0,10,0)|0;$857=tempRet0;$858=$856|48;$859=$858&255;$860=$$05$i79$i+-1|0;HEAP8[$860>>0]=$859;$861=___udivdi3($854|0,$855|0,10,0)|0;$862=tempRet0;$863=$855>>>0>9;$864=$854>>>0>4294967295;$865=($855|0)==9;$866=$865&$864;$867=$863|$866;if($867){$$05$i79$i=$860;$854=$861;$855=$862}else{$$lcssa470=$860;$1185=$861;$1186=$862;break}}$$0$lcssa$i84$i=$$lcssa470;$$01$lcssa$off0$i85$i=$1185}else{$$0$lcssa$i84$i=$7;$$01$lcssa$off0$i85$i=$850}$868=($$01$lcssa$off0$i85$i|0)==0;if($868){$estr$1$ph$i=$$0$lcssa$i84$i}else{$$12$i87$i=$$0$lcssa$i84$i;$y$03$i86$i=$$01$lcssa$off0$i85$i;while(1){$869=($y$03$i86$i>>>0)%10&-1;$870=$869|48;$871=$870&255;$872=$$12$i87$i+-1|0;HEAP8[$872>>0]=$871;$873=($y$03$i86$i>>>0)/10&-1;$874=$y$03$i86$i>>>0<10;if($874){$estr$1$ph$i=$872;break}else{$$12$i87$i=$872;$y$03$i86$i=$873}}}$875=$estr$1$ph$i;$876=$9-$875|0;$877=($876|0)<2;if($877){$estr$1201$i=$estr$1$ph$i;while(1){$878=$estr$1201$i+-1|0;HEAP8[$878>>0]=48;$879=$878;$880=$9-$879|0;$881=($880|0)<2;if($881){$estr$1201$i=$878}else{$estr$1$lcssa$i=$878;break}}}else{$estr$1$lcssa$i=$estr$1$ph$i}$882=$e$4$ph$i>>31;$883=$882&2;$884=$883+43|0;$885=$884&255;$886=$estr$1$lcssa$i+-1|0;HEAP8[$886>>0]=$885;$887=$$114$i&255;$888=$estr$1$lcssa$i+-2|0;HEAP8[$888>>0]=$887;$889=$888;$890=$9-$889|0;$$pn$i=$890;$estr$2$i=$888}$891=$pl$0$i+1|0;$892=$891+$$311$i|0;$l$1$i=$892+$844|0;$893=$l$1$i+$$pn$i|0;$894=$fl$1$&73728;$895=($894|0)==0;$896=($w$1|0)>($893|0);$or$cond$i93$i=$895&$896;if($or$cond$i93$i){$897=$w$1-$893|0;$898=$897>>>0>256;$899=$898?256:$897;_memset($pad$i|0,32,$899|0)|0;$900=$897>>>0>255;if($900){$$01$i95$i=$897;while(1){___fwritex($pad$i,256,$f)|0;$901=$$01$i95$i+-256|0;$902=$901>>>0>255;if($902){$$01$i95$i=$901}else{break}}$903=$897&255;$$0$lcssa$i97$i=$903}else{$$0$lcssa$i97$i=$897}___fwritex($pad$i,$$0$lcssa$i97$i,$f)|0}___fwritex($prefix$0$i,$pl$0$i,$f)|0;$904=($894|0)==65536;$or$cond$i100$i=$904&$896;if($or$cond$i100$i){$905=$w$1-$893|0;$906=$905>>>0>256;$907=$906?256:$905;_memset($pad$i|0,48,$907|0)|0;$908=$905>>>0>255;if($908){$$01$i102$i=$905;while(1){___fwritex($pad$i,256,$f)|0;$909=$$01$i102$i+-256|0;$910=$909>>>0>255;if($910){$$01$i102$i=$909}else{break}}$911=$905&255;$$0$lcssa$i104$i=$911}else{$$0$lcssa$i104$i=$905}___fwritex($pad$i,$$0$lcssa$i104$i,$f)|0}if($846){$912=$a$8$ph$i>>>0>$$31$i>>>0;$r$0$a$8$i=$912?$$31$i:$a$8$ph$i;$d$4191$i=$r$0$a$8$i;while(1){$913=HEAP32[$d$4191$i>>2]|0;$914=($913|0)==0;if($914){$$1$lcssa$i112$i=$14}else{$$12$i110$i=$14;$y$03$i109$i=$913;while(1){$915=($y$03$i109$i>>>0)%10&-1;$916=$915|48;$917=$916&255;$918=$$12$i110$i+-1|0;HEAP8[$918>>0]=$917;$919=($y$03$i109$i>>>0)/10&-1;$920=$y$03$i109$i>>>0<10;if($920){$$1$lcssa$i112$i=$918;break}else{$$12$i110$i=$918;$y$03$i109$i=$919}}}$921=($d$4191$i|0)==($r$0$a$8$i|0);do{if($921){$925=($$1$lcssa$i112$i|0)==($14|0);if(!$925){$s7$1$i=$$1$lcssa$i112$i;break}HEAP8[$16>>0]=48;$s7$1$i=$16}else{$922=$$1$lcssa$i112$i>>>0>$buf$i>>>0;if($922){$s7$0188$i=$$1$lcssa$i112$i}else{$s7$1$i=$$1$lcssa$i112$i;break}while(1){$923=$s7$0188$i+-1|0;HEAP8[$923>>0]=48;$924=$923>>>0>$buf$i>>>0;if($924){$s7$0188$i=$923}else{$s7$1$i=$923;break}}}}while(0);$926=$s7$1$i;$927=$15-$926|0;___fwritex($s7$1$i,$927,$f)|0;$928=$d$4191$i+4|0;$929=$928>>>0>$$31$i>>>0;if($929){$$lcssa479=$928;break}else{$d$4191$i=$928}}$930=($842|0)==0;if(!$930){___fwritex(96480,1,$f)|0}$931=$$lcssa479>>>0<$z$6$i$lcssa>>>0;$932=($$311$i|0)>0;$933=$932&$931;if($933){$$412184$i=$$311$i;$d$5183$i=$$lcssa479;while(1){$934=HEAP32[$d$5183$i>>2]|0;$935=($934|0)==0;if($935){$s8$0180$i=$14;label=289}else{$$12$i119$i=$14;$y$03$i118$i=$934;while(1){$936=($y$03$i118$i>>>0)%10&-1;$937=$936|48;$938=$937&255;$939=$$12$i119$i+-1|0;HEAP8[$939>>0]=$938;$940=($y$03$i118$i>>>0)/10&-1;$941=$y$03$i118$i>>>0<10;if($941){$$lcssa480=$939;break}else{$$12$i119$i=$939;$y$03$i118$i=$940}}$942=$$lcssa480>>>0>$buf$i>>>0;if($942){$s8$0180$i=$$lcssa480;label=289}else{$s8$0$lcssa$i=$$lcssa480}}if((label|0)==289){while(1){label=0;$943=$s8$0180$i+-1|0;HEAP8[$943>>0]=48;$944=$943>>>0>$buf$i>>>0;if($944){$s8$0180$i=$943;label=289}else{$s8$0$lcssa$i=$943;break}}}$945=($$412184$i|0)>9;$946=$945?9:$$412184$i;___fwritex($s8$0$lcssa$i,$946,$f)|0;$947=$d$5183$i+4|0;$948=$$412184$i+-9|0;$949=$947>>>0<$z$6$i$lcssa>>>0;$950=$945&$949;if($950){$$412184$i=$948;$d$5183$i=$947}else{$$412$lcssa$i=$948;break}}}else{$$412$lcssa$i=$$311$i}$951=($$412$lcssa$i|0)>0;if($951){$952=$$412$lcssa$i>>>0>256;$953=$952?256:$$412$lcssa$i;_memset($pad$i|0,48,$953|0)|0;$954=$$412$lcssa$i>>>0>255;if($954){$$01$i126$i=$$412$lcssa$i;while(1){___fwritex($pad$i,256,$f)|0;$955=$$01$i126$i+-256|0;$956=$955>>>0>255;if($956){$$01$i126$i=$955}else{break}}$957=$$412$lcssa$i&255;$$0$lcssa$i128$i=$957}else{$$0$lcssa$i128$i=$$412$lcssa$i}___fwritex($pad$i,$$0$lcssa$i128$i,$f)|0}}else{$958=$a$8$ph$i+4|0;$z$6$$i=$$lcssa275$i?$z$6$i$lcssa:$958;$959=($$311$i|0)>-1;do{if($959){$960=($$pre$phi302$iZ2D|0)==0;$$5196$i=$$311$i;$d$6195$i=$a$8$ph$i;while(1){$961=HEAP32[$d$6195$i>>2]|0;$962=($961|0)==0;if($962){label=303}else{$$12$i134$i=$14;$y$03$i133$i=$961;while(1){$963=($y$03$i133$i>>>0)%10&-1;$964=$963|48;$965=$964&255;$966=$$12$i134$i+-1|0;HEAP8[$966>>0]=$965;$967=($y$03$i133$i>>>0)/10&-1;$968=$y$03$i133$i>>>0<10;if($968){$$12$i134$i$lcssa=$$12$i134$i;$$lcssa474=$966;break}else{$$12$i134$i=$966;$y$03$i133$i=$967}}$969=($$lcssa474|0)==($14|0);if($969){label=303}else{$1187=$$12$i134$i$lcssa;$s9$0$i=$$lcssa474}}if((label|0)==303){label=0;HEAP8[$16>>0]=48;$1187=$14;$s9$0$i=$16}$970=($d$6195$i|0)==($a$8$ph$i|0);do{if($970){___fwritex($s9$0$i,1,$f)|0;$974=($$5196$i|0)<1;$or$cond29$i=$960&$974;if($or$cond29$i){$s9$2$i=$1187;break}___fwritex(96480,1,$f)|0;$s9$2$i=$1187}else{$971=$s9$0$i>>>0>$buf$i>>>0;if($971){$s9$1192$i=$s9$0$i}else{$s9$2$i=$s9$0$i;break}while(1){$972=$s9$1192$i+-1|0;HEAP8[$972>>0]=48;$973=$972>>>0>$buf$i>>>0;if($973){$s9$1192$i=$972}else{$s9$2$i=$972;break}}}}while(0);$975=$s9$2$i;$976=$15-$975|0;$977=($$5196$i|0)>($976|0);$978=$977?$976:$$5196$i;___fwritex($s9$2$i,$978,$f)|0;$979=$$5196$i-$976|0;$980=$d$6195$i+4|0;$981=$980>>>0<$z$6$$i>>>0;$982=($979|0)>-1;$983=$981&$982;if($983){$$5196$i=$979;$d$6195$i=$980}else{$$lcssa476=$979;break}}$984=($$lcssa476|0)>0;if(!$984){break}$985=$$lcssa476>>>0>256;$986=$985?256:$$lcssa476;_memset($pad$i|0,48,$986|0)|0;$987=$$lcssa476>>>0>255;if($987){$$01$i141$i=$$lcssa476;while(1){___fwritex($pad$i,256,$f)|0;$988=$$01$i141$i+-256|0;$989=$988>>>0>255;if($989){$$01$i141$i=$988}else{break}}$990=$$lcssa476&255;$$0$lcssa$i143$i=$990}else{$$0$lcssa$i143$i=$$lcssa476}___fwritex($pad$i,$$0$lcssa$i143$i,$f)|0}else{}}while(0);$991=$estr$2$i;$992=$9-$991|0;___fwritex($estr$2$i,$992,$f)|0}$993=($894|0)==8192;$or$cond$i$i=$993&$896;if($or$cond$i$i){$994=$w$1-$893|0;$995=$994>>>0>256;$996=$995?256:$994;_memset($pad$i|0,32,$996|0)|0;$997=$994>>>0>255;if($997){$$01$i$i=$994;while(1){___fwritex($pad$i,256,$f)|0;$998=$$01$i$i+-256|0;$999=$998>>>0>255;if($999){$$01$i$i=$998}else{break}}$1000=$994&255;$$0$lcssa$i$i=$1000}else{$$0$lcssa$i$i=$994}___fwritex($pad$i,$$0$lcssa$i$i,$f)|0}$w$30$i=$896?$w$1:$893;$$0$i=$w$30$i}else{$445=$t$0&32;$446=($445|0)!=0;$447=$446?96448:96456;$448=$$07$i!=$$07$i|0.0!=0.0;$449=$446?96464:96472;$pl$1$i=$448?0:$pl$0$i;$s1$0$i=$448?$449:$447;$450=$pl$1$i+3|0;$451=$fl$1$&8192;$452=($451|0)==0;$453=($w$1|0)>($450|0);$or$cond$i35$i=$452&$453;if($or$cond$i35$i){$454=$w$1-$450|0;$455=$454>>>0>256;$456=$455?256:$454;_memset($pad$i|0,32,$456|0)|0;$457=$454>>>0>255;if($457){$$01$i37$i=$454;while(1){___fwritex($pad$i,256,$f)|0;$458=$$01$i37$i+-256|0;$459=$458>>>0>255;if($459){$$01$i37$i=$458}else{break}}$460=$454&255;$$0$lcssa$i39$i=$460}else{$$0$lcssa$i39$i=$454}___fwritex($pad$i,$$0$lcssa$i39$i,$f)|0}___fwritex($prefix$0$i,$pl$1$i,$f)|0;___fwritex($s1$0$i,3,$f)|0;$461=$fl$1$&73728;$462=($461|0)==8192;$or$cond$i42$i=$462&$453;if($or$cond$i42$i){$463=$w$1-$450|0;$464=$463>>>0>256;$465=$464?256:$463;_memset($pad$i|0,32,$465|0)|0;$466=$463>>>0>255;if($466){$$01$i44$i=$463;while(1){___fwritex($pad$i,256,$f)|0;$467=$$01$i44$i+-256|0;$468=$467>>>0>255;if($468){$$01$i44$i=$467}else{break}}$469=$463&255;$$0$lcssa$i46$i=$469}else{$$0$lcssa$i46$i=$463}___fwritex($pad$i,$$0$lcssa$i46$i,$f)|0}$470=$453?$w$1:$450;$$0$i=$470}}while(0);$1169=$291;$1170=$264;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$$0$i;$l10n$0=$l10n$3;continue L1;break}case 112:{$286=$p$0>>>0>8;$287=$286?$p$0:8;$288=$fl$1$|8;$fl$3=$288;$p$1=$287;$t$1=120;label=73;break}case 88:case 120:{$fl$3=$fl$1$;$p$1=$p$0;$t$1=$t$0;label=73;break}case 105:case 100:{$329=($291|0)<0;if($329){$330=_i64Subtract(0,0,$264|0,$291|0)|0;$331=tempRet0;$336=$331;$338=$330;$pl$0=1;$prefix$0=96400;label=84;break L86}$332=$fl$1$&2048;$333=($332|0)==0;if($333){$334=$fl$1$&1;$335=($334|0)==0;$$=$335?96400:96402;$336=$291;$338=$264;$pl$0=$334;$prefix$0=$$;label=84}else{$336=$291;$338=$264;$pl$0=1;$prefix$0=96401;label=84}break}case 99:{$378=$264&255;HEAP8[$4>>0]=$378;$1175=$291;$1176=$264;$a$2=$4;$fl$6=$263;$p$5=1;$pl$2=0;$prefix$2=96400;$z$2=$2;break}case 109:{$379=___errno_location()|0;$380=HEAP32[$379>>2]|0;$381=_strerror($380|0)|0;$a$1=$381;label=94;break}case 115:{$382=$264;$383=($264|0)!=0;$384=$383?$382:96416;$a$1=$384;label=94;break}default:{$1175=$291;$1176=$264;$a$2=$23;$fl$6=$fl$1$;$p$5=$p$0;$pl$2=0;$prefix$2=96400;$z$2=$2}}}while(0);if((label|0)==73){label=0;$289=$t$1&32;$290=($264|0)==0;$292=($291|0)==0;$293=$290&$292;if($293){$366=$264;$368=$291;$a$0=$2;$fl$4=$fl$3;$p$2=$p$1;$pl$1=0;$prefix$1=96400;label=89}else{$$012$i=$2;$295=$264;$302=$291;while(1){$294=$295&15;$296=96384+$294|0;$297=HEAP8[$296>>0]|0;$298=$297&255;$299=$298|$289;$300=$299&255;$301=$$012$i+-1|0;HEAP8[$301>>0]=$300;$303=_bitshift64Lshr($295|0,$302|0,4)|0;$304=tempRet0;$305=($303|0)==0;$306=($304|0)==0;$307=$305&$306;if($307){$$lcssa491=$301;break}else{$$012$i=$301;$295=$303;$302=$304}}$308=$fl$3&8;$309=($308|0)==0;if($309){$366=$264;$368=$291;$a$0=$$lcssa491;$fl$4=$fl$3;$p$2=$p$1;$pl$1=0;$prefix$1=96400;label=89}else{$310=$t$1>>4;$311=96400+$310|0;$366=$264;$368=$291;$a$0=$$lcssa491;$fl$4=$fl$3;$p$2=$p$1;$pl$1=2;$prefix$1=$311;label=89}}}else if((label|0)==84){label=0;$337=$336>>>0>0;$339=$338>>>0>4294967295;$340=($336|0)==0;$341=$340&$339;$342=$337|$341;if($342){$$05$i=$2;$343=$338;$344=$336;while(1){$345=___uremdi3($343|0,$344|0,10,0)|0;$346=tempRet0;$347=$345|48;$348=$347&255;$349=$$05$i+-1|0;HEAP8[$349>>0]=$348;$350=___udivdi3($343|0,$344|0,10,0)|0;$351=tempRet0;$352=$344>>>0>9;$353=$343>>>0>4294967295;$354=($344|0)==9;$355=$354&$353;$356=$352|$355;if($356){$$05$i=$349;$343=$350;$344=$351}else{$$lcssa487=$349;$1177=$350;$1178=$351;break}}$$0$lcssa$i53=$$lcssa487;$$01$lcssa$off0$i=$1177}else{$$0$lcssa$i53=$2;$$01$lcssa$off0$i=$338}$357=($$01$lcssa$off0$i|0)==0;if($357){$366=$338;$368=$336;$a$0=$$0$lcssa$i53;$fl$4=$fl$1$;$p$2=$p$0;$pl$1=$pl$0;$prefix$1=$prefix$0;label=89}else{$$12$i=$$0$lcssa$i53;$y$03$i=$$01$lcssa$off0$i;while(1){$358=($y$03$i>>>0)%10&-1;$359=$358|48;$360=$359&255;$361=$$12$i+-1|0;HEAP8[$361>>0]=$360;$362=($y$03$i>>>0)/10&-1;$363=$y$03$i>>>0<10;if($363){$366=$338;$368=$336;$a$0=$361;$fl$4=$fl$1$;$p$2=$p$0;$pl$1=$pl$0;$prefix$1=$prefix$0;label=89;break}else{$$12$i=$361;$y$03$i=$362}}}}else if((label|0)==94){label=0;$385=_memchr($a$1,0,$p$0)|0;$386=($385|0)==(0|0);$387=$385;$388=$a$1;$389=$387-$388|0;$390=$a$1+$p$0|0;$z$1=$386?$390:$385;$p$3=$386?$p$0:$389;$1175=$291;$1176=$264;$a$2=$a$1;$fl$6=$263;$p$5=$p$3;$pl$2=0;$prefix$2=96400;$z$2=$z$1}else if((label|0)==97){label=0;$i$0175=0;$l$1174=0;$ws$0176=$1179;while(1){$393=HEAP32[$ws$0176>>2]|0;$394=($393|0)==0;if($394){$i$0$lcssa=$i$0175;$l$2=$l$1174;break}$395=_wctomb($mb,$393)|0;$396=($395|0)<0;$397=$p$4272-$i$0175|0;$398=$395>>>0>$397>>>0;$or$cond22=$396|$398;if($or$cond22){$i$0$lcssa=$i$0175;$l$2=$395;break}$399=$ws$0176+4|0;$400=$395+$i$0175|0;$401=$p$4272>>>0>$400>>>0;if($401){$i$0175=$400;$l$1174=$395;$ws$0176=$399}else{$i$0$lcssa=$400;$l$2=$395;break}}$402=($l$2|0)<0;if($402){$$0=-1;label=363;break}else{$1181=$1180;$1182=$1179;$i$0$lcssa273=$i$0$lcssa;label=102}}if((label|0)==89){label=0;$364=($p$2|0)>-1;$365=$fl$4&-65537;$$fl$4=$364?$365:$fl$4;$367=($366|0)!=0;$369=($368|0)!=0;$370=$367|$369;$371=($p$2|0)!=0;$or$cond=$370|$371;if($or$cond){$372=$a$0;$373=$3-$372|0;$374=$370&1;$375=$374^1;$376=$375+$373|0;$377=($p$2|0)>($376|0);$p$2$=$377?$p$2:$376;$1175=$368;$1176=$366;$a$2=$a$0;$fl$6=$$fl$4;$p$5=$p$2$;$pl$2=$pl$1;$prefix$2=$prefix$1;$z$2=$2}else{$1175=$368;$1176=$366;$a$2=$2;$fl$6=$$fl$4;$p$5=0;$pl$2=$pl$1;$prefix$2=$prefix$1;$z$2=$2}}else if((label|0)==102){label=0;$403=$fl$1$&73728;$404=($403|0)==0;$405=($w$1|0)>($i$0$lcssa273|0);$or$cond$i64=$404&$405;if($or$cond$i64){$406=$w$1-$i$0$lcssa273|0;$407=$406>>>0>256;$408=$407?256:$406;_memset($pad$i|0,32,$408|0)|0;$409=$406>>>0>255;if($409){$$01$i66=$406;while(1){___fwritex($pad$i,256,$f)|0;$410=$$01$i66+-256|0;$411=$410>>>0>255;if($411){$$01$i66=$410}else{break}}$412=$406&255;$$0$lcssa$i68=$412}else{$$0$lcssa$i68=$406}___fwritex($pad$i,$$0$lcssa$i68,$f)|0}$413=($i$0$lcssa273|0)==0;L465:do{if(!$413){$i$1186=0;$ws$1187=$1182;while(1){$414=HEAP32[$ws$1187>>2]|0;$415=($414|0)==0;if($415){break L465}$416=_wctomb($mb,$414)|0;$417=$416+$i$1186|0;$418=($417|0)>($i$0$lcssa273|0);if($418){break L465}$419=$ws$1187+4|0;___fwritex($mb,$416,$f)|0;$420=$417>>>0<$i$0$lcssa273>>>0;if($420){$i$1186=$417;$ws$1187=$419}else{break}}}}while(0);$421=($403|0)==8192;$or$cond$i71=$421&$405;if($or$cond$i71){$422=$w$1-$i$0$lcssa273|0;$423=$422>>>0>256;$424=$423?256:$422;_memset($pad$i|0,32,$424|0)|0;$425=$422>>>0>255;if($425){$$01$i73=$422;while(1){___fwritex($pad$i,256,$f)|0;$426=$$01$i73+-256|0;$427=$426>>>0>255;if($427){$$01$i73=$426}else{break}}$428=$422&255;$$0$lcssa$i75=$428}else{$$0$lcssa$i75=$422}___fwritex($pad$i,$$0$lcssa$i75,$f)|0}$429=$405?$w$1:$i$0$lcssa273;$1169=$291;$1170=$1181;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$429;$l10n$0=$l10n$3;continue}$1001=$z$2;$1002=$a$2;$1003=$1001-$1002|0;$1004=($p$5|0)<($1003|0);$$p$5=$1004?$1003:$p$5;$1005=$pl$2+$$p$5|0;$1006=($w$1|0)<($1005|0);$w$2=$1006?$1005:$w$1;$1007=$fl$6&73728;$1008=($1007|0)==0;$1009=($w$2|0)>($1005|0);$or$cond$i81=$1008&$1009;if($or$cond$i81){$1010=$w$2-$1005|0;$1011=$1010>>>0>256;$1012=$1011?256:$1010;_memset($pad$i|0,32,$1012|0)|0;$1013=$1010>>>0>255;if($1013){$$01$i83=$1010;while(1){___fwritex($pad$i,256,$f)|0;$1014=$$01$i83+-256|0;$1015=$1014>>>0>255;if($1015){$$01$i83=$1014}else{break}}$1016=$1010&255;$$0$lcssa$i85=$1016}else{$$0$lcssa$i85=$1010}___fwritex($pad$i,$$0$lcssa$i85,$f)|0}___fwritex($prefix$2,$pl$2,$f)|0;$1017=($1007|0)==65536;$or$cond$i57=$1017&$1009;if($or$cond$i57){$1018=$w$2-$1005|0;$1019=$1018>>>0>256;$1020=$1019?256:$1018;_memset($pad$i|0,48,$1020|0)|0;$1021=$1018>>>0>255;if($1021){$$01$i59=$1018;while(1){___fwritex($pad$i,256,$f)|0;$1022=$$01$i59+-256|0;$1023=$1022>>>0>255;if($1023){$$01$i59=$1022}else{break}}$1024=$1018&255;$$0$lcssa$i61=$1024}else{$$0$lcssa$i61=$1018}___fwritex($pad$i,$$0$lcssa$i61,$f)|0}$1025=($$p$5|0)>($1003|0);if($1025){$1026=$$p$5-$1003|0;$1027=$1026>>>0>256;$1028=$1027?256:$1026;_memset($pad$i|0,48,$1028|0)|0;$1029=$1026>>>0>255;if($1029){$$01$i44=$1026;while(1){___fwritex($pad$i,256,$f)|0;$1030=$$01$i44+-256|0;$1031=$1030>>>0>255;if($1031){$$01$i44=$1030}else{break}}$1032=$1026&255;$$0$lcssa$i46=$1032}else{$$0$lcssa$i46=$1026}___fwritex($pad$i,$$0$lcssa$i46,$f)|0}___fwritex($a$2,$1003,$f)|0;$1033=($1007|0)==8192;$or$cond$i=$1033&$1009;if($or$cond$i){$1034=$w$2-$1005|0;$1035=$1034>>>0>256;$1036=$1035?256:$1034;_memset($pad$i|0,32,$1036|0)|0;$1037=$1034>>>0>255;if($1037){$$01$i=$1034;while(1){___fwritex($pad$i,256,$f)|0;$1038=$$01$i+-256|0;$1039=$1038>>>0>255;if($1039){$$01$i=$1038}else{break}}$1040=$1034&255;$$0$lcssa$i=$1040}else{$$0$lcssa$i=$1034}___fwritex($pad$i,$$0$lcssa$i,$f)|0}$1169=$1175;$1170=$1176;$23=$$lcssa457;$cnt$0=$cnt$1;$l$0=$w$2;$l10n$0=$l10n$3}if((label|0)==344){$1041=($f|0)==(0|0);if(!$1041){$$0=$cnt$1$lcssa;STACKTOP=sp;return $$0|0}$1042=($l10n$0$lcssa|0)==0;if($1042){$$0=0;STACKTOP=sp;return $$0|0}else{$i$2162=1}while(1){$1043=$nl_type+($i$2162<<2)|0;$1044=HEAP32[$1043>>2]|0;$1045=($1044|0)==0;if($1045){$i$2162$lcssa=$i$2162;break}$1047=$nl_arg+($i$2162<<3)|0;$1048=$1044>>>0>20;L530:do{if(!$1048){do{switch($1044|0){case 9:{$arglist_current35=HEAP32[$ap>>2]|0;$1049=$arglist_current35;$1050=0+4|0;$expanded148=$1050;$expanded147=$expanded148-1|0;$1051=$1049+$expanded147|0;$1052=0+4|0;$expanded152=$1052;$expanded151=$expanded152-1|0;$expanded150=$expanded151^-1;$1053=$1051&$expanded150;$1054=$1053;$1055=HEAP32[$1054>>2]|0;$arglist_next36=$1054+4|0;HEAP32[$ap>>2]=$arglist_next36;HEAP32[$1047>>2]=$1055;break L530;break}case 10:{$arglist_current38=HEAP32[$ap>>2]|0;$1056=$arglist_current38;$1057=0+4|0;$expanded155=$1057;$expanded154=$expanded155-1|0;$1058=$1056+$expanded154|0;$1059=0+4|0;$expanded159=$1059;$expanded158=$expanded159-1|0;$expanded157=$expanded158^-1;$1060=$1058&$expanded157;$1061=$1060;$1062=HEAP32[$1061>>2]|0;$arglist_next39=$1061+4|0;HEAP32[$ap>>2]=$arglist_next39;$1063=($1062|0)<0;$1064=$1063<<31>>31;$1065=$1047;$1066=$1065;HEAP32[$1066>>2]=$1062;$1067=$1065+4|0;$1068=$1067;HEAP32[$1068>>2]=$1064;break L530;break}case 11:{$arglist_current41=HEAP32[$ap>>2]|0;$1069=$arglist_current41;$1070=0+4|0;$expanded162=$1070;$expanded161=$expanded162-1|0;$1071=$1069+$expanded161|0;$1072=0+4|0;$expanded166=$1072;$expanded165=$expanded166-1|0;$expanded164=$expanded165^-1;$1073=$1071&$expanded164;$1074=$1073;$1075=HEAP32[$1074>>2]|0;$arglist_next42=$1074+4|0;HEAP32[$ap>>2]=$arglist_next42;$1076=$1047;$1077=$1076;HEAP32[$1077>>2]=$1075;$1078=$1076+4|0;$1079=$1078;HEAP32[$1079>>2]=0;break L530;break}case 12:{$arglist_current44=HEAP32[$ap>>2]|0;$1080=$arglist_current44;$1081=0+8|0;$expanded169=$1081;$expanded168=$expanded169-1|0;$1082=$1080+$expanded168|0;$1083=0+8|0;$expanded173=$1083;$expanded172=$expanded173-1|0;$expanded171=$expanded172^-1;$1084=$1082&$expanded171;$1085=$1084;$1086=$1085;$1087=$1086;$1088=HEAP32[$1087>>2]|0;$1089=$1086+4|0;$1090=$1089;$1091=HEAP32[$1090>>2]|0;$arglist_next45=$1085+8|0;HEAP32[$ap>>2]=$arglist_next45;$1092=$1047;$1093=$1092;HEAP32[$1093>>2]=$1088;$1094=$1092+4|0;$1095=$1094;HEAP32[$1095>>2]=$1091;break L530;break}case 13:{$arglist_current47=HEAP32[$ap>>2]|0;$1096=$arglist_current47;$1097=0+4|0;$expanded176=$1097;$expanded175=$expanded176-1|0;$1098=$1096+$expanded175|0;$1099=0+4|0;$expanded180=$1099;$expanded179=$expanded180-1|0;$expanded178=$expanded179^-1;$1100=$1098&$expanded178;$1101=$1100;$1102=HEAP32[$1101>>2]|0;$arglist_next48=$1101+4|0;HEAP32[$ap>>2]=$arglist_next48;$1103=$1102&65535;$1104=$1103<<16>>16;$1105=($1104|0)<0;$1106=$1105<<31>>31;$1107=$1047;$1108=$1107;HEAP32[$1108>>2]=$1104;$1109=$1107+4|0;$1110=$1109;HEAP32[$1110>>2]=$1106;break L530;break}case 14:{$arglist_current50=HEAP32[$ap>>2]|0;$1111=$arglist_current50;$1112=0+4|0;$expanded183=$1112;$expanded182=$expanded183-1|0;$1113=$1111+$expanded182|0;$1114=0+4|0;$expanded187=$1114;$expanded186=$expanded187-1|0;$expanded185=$expanded186^-1;$1115=$1113&$expanded185;$1116=$1115;$1117=HEAP32[$1116>>2]|0;$arglist_next51=$1116+4|0;HEAP32[$ap>>2]=$arglist_next51;$$mask1$i=$1117&65535;$1118=$1047;$1119=$1118;HEAP32[$1119>>2]=$$mask1$i;$1120=$1118+4|0;$1121=$1120;HEAP32[$1121>>2]=0;break L530;break}case 15:{$arglist_current53=HEAP32[$ap>>2]|0;$1122=$arglist_current53;$1123=0+4|0;$expanded190=$1123;$expanded189=$expanded190-1|0;$1124=$1122+$expanded189|0;$1125=0+4|0;$expanded194=$1125;$expanded193=$expanded194-1|0;$expanded192=$expanded193^-1;$1126=$1124&$expanded192;$1127=$1126;$1128=HEAP32[$1127>>2]|0;$arglist_next54=$1127+4|0;HEAP32[$ap>>2]=$arglist_next54;$1129=$1128&255;$1130=$1129<<24>>24;$1131=($1130|0)<0;$1132=$1131<<31>>31;$1133=$1047;$1134=$1133;HEAP32[$1134>>2]=$1130;$1135=$1133+4|0;$1136=$1135;HEAP32[$1136>>2]=$1132;break L530;break}case 16:{$arglist_current56=HEAP32[$ap>>2]|0;$1137=$arglist_current56;$1138=0+4|0;$expanded197=$1138;$expanded196=$expanded197-1|0;$1139=$1137+$expanded196|0;$1140=0+4|0;$expanded201=$1140;$expanded200=$expanded201-1|0;$expanded199=$expanded200^-1;$1141=$1139&$expanded199;$1142=$1141;$1143=HEAP32[$1142>>2]|0;$arglist_next57=$1142+4|0;HEAP32[$ap>>2]=$arglist_next57;$$mask$i=$1143&255;$1144=$1047;$1145=$1144;HEAP32[$1145>>2]=$$mask$i;$1146=$1144+4|0;$1147=$1146;HEAP32[$1147>>2]=0;break L530;break}case 17:{$arglist_current59=HEAP32[$ap>>2]|0;$1148=$arglist_current59;$1149=0+8|0;$expanded204=$1149;$expanded203=$expanded204-1|0;$1150=$1148+$expanded203|0;$1151=0+8|0;$expanded208=$1151;$expanded207=$expanded208-1|0;$expanded206=$expanded207^-1;$1152=$1150&$expanded206;$1153=$1152;$1154=+HEAPF64[$1153>>3];$arglist_next60=$1153+8|0;HEAP32[$ap>>2]=$arglist_next60;HEAPF64[$1047>>3]=$1154;break L530;break}case 18:{$arglist_current62=HEAP32[$ap>>2]|0;$1155=$arglist_current62;$1156=0+8|0;$expanded211=$1156;$expanded210=$expanded211-1|0;$1157=$1155+$expanded210|0;$1158=0+8|0;$expanded215=$1158;$expanded214=$expanded215-1|0;$expanded213=$expanded214^-1;$1159=$1157&$expanded213;$1160=$1159;$1161=+HEAPF64[$1160>>3];$arglist_next63=$1160+8|0;HEAP32[$ap>>2]=$arglist_next63;HEAPF64[$1047>>3]=$1161;break L530;break}default:{break L530}}}while(0)}}while(0);$1162=$i$2162+1|0;$1163=($1162|0)<10;if($1163){$i$2162=$1162}else{$$0=1;label=363;break}}if((label|0)==363){STACKTOP=sp;return $$0|0}$1046=($i$2162$lcssa|0)<10;if($1046){$i$3160=$i$2162$lcssa}else{$$0=1;STACKTOP=sp;return $$0|0}while(1){$1166=$nl_type+($i$3160<<2)|0;$1167=HEAP32[$1166>>2]|0;$1168=($1167|0)==0;$1164=$i$3160+1|0;if(!$1168){$$0=-1;label=363;break}$1165=($1164|0)<10;if($1165){$i$3160=$1164}else{$$0=1;label=363;break}}if((label|0)==363){STACKTOP=sp;return $$0|0}}else if((label|0)==363){STACKTOP=sp;return $$0|0}return 0|0}function _sn_write($f,$s,$l){$f=$f|0;$s=$s|0;$l=$l|0;var $0=0,$1=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$l$=0,label=0,sp=0;sp=STACKTOP;$0=$f+16|0;$1=HEAP32[$0>>2]|0;$2=$f+20|0;$3=HEAP32[$2>>2]|0;$4=$1;$5=$3;$6=$4-$5|0;$7=$6>>>0>$l>>>0;$l$=$7?$l:$6;_memcpy($3|0,$s|0,$l$|0)|0;$8=HEAP32[$2>>2]|0;$9=$8+$l$|0;HEAP32[$2>>2]=$9;return $l|0}function _malloc($bytes){$bytes=$bytes|0;var $$3$i=0,$$lcssa=0,$$lcssa211=0,$$lcssa215=0,$$lcssa216=0,$$lcssa217=0,$$lcssa219=0,$$lcssa222=0,$$lcssa224=0,$$lcssa226=0,$$lcssa228=0,$$lcssa230=0,$$lcssa232=0,$$pre=0,$$pre$i=0,$$pre$i$i=0,$$pre$i22$i=0,$$pre$i25=0,$$pre$phi$i$iZ2D=0,$$pre$phi$i23$iZ2D=0;var $$pre$phi$i26Z2D=0,$$pre$phi$iZ2D=0,$$pre$phi58$i$iZ2D=0,$$pre$phiZ2D=0,$$pre105=0,$$pre106=0,$$pre14$i$i=0,$$pre43$i=0,$$pre56$i$i=0,$$pre57$i$i=0,$$pre8$i=0,$$rsize$0$i=0,$$rsize$3$i=0,$$sum=0,$$sum$i$i=0,$$sum$i$i$i=0,$$sum$i13$i=0,$$sum$i14$i=0,$$sum$i17$i=0,$$sum$i19$i=0;var $$sum$i2334=0,$$sum$i32=0,$$sum$i35=0,$$sum1=0,$$sum1$i=0,$$sum1$i$i=0,$$sum1$i15$i=0,$$sum1$i20$i=0,$$sum1$i24=0,$$sum10=0,$$sum10$i=0,$$sum10$i$i=0,$$sum11$i=0,$$sum11$i$i=0,$$sum1112=0,$$sum112$i=0,$$sum113$i=0,$$sum114$i=0,$$sum115$i=0,$$sum116$i=0;var $$sum117$i=0,$$sum118$i=0,$$sum119$i=0,$$sum12$i=0,$$sum12$i$i=0,$$sum120$i=0,$$sum121$i=0,$$sum122$i=0,$$sum123$i=0,$$sum124$i=0,$$sum125$i=0,$$sum13$i=0,$$sum13$i$i=0,$$sum14$i$i=0,$$sum15$i=0,$$sum15$i$i=0,$$sum16$i=0,$$sum16$i$i=0,$$sum17$i=0,$$sum17$i$i=0;var $$sum18$i=0,$$sum1819$i$i=0,$$sum2=0,$$sum2$i=0,$$sum2$i$i=0,$$sum2$i$i$i=0,$$sum2$i16$i=0,$$sum2$i18$i=0,$$sum2$i21$i=0,$$sum20$i$i=0,$$sum21$i$i=0,$$sum22$i$i=0,$$sum23$i$i=0,$$sum24$i$i=0,$$sum25$i$i=0,$$sum27$i$i=0,$$sum28$i$i=0,$$sum29$i$i=0,$$sum3$i=0,$$sum3$i27=0;var $$sum30$i$i=0,$$sum3132$i$i=0,$$sum34$i$i=0,$$sum3536$i$i=0,$$sum3738$i$i=0,$$sum39$i$i=0,$$sum4=0,$$sum4$i=0,$$sum4$i$i=0,$$sum4$i28=0,$$sum40$i$i=0,$$sum41$i$i=0,$$sum42$i$i=0,$$sum5$i=0,$$sum5$i$i=0,$$sum56=0,$$sum6$i=0,$$sum67$i$i=0,$$sum7$i=0,$$sum8$i=0;var $$sum9=0,$$sum9$i=0,$$sum9$i$i=0,$$tsize$1$i=0,$$v$0$i=0,$0=0,$1=0,$10=0,$100=0,$1000=0,$1001=0,$1002=0,$1003=0,$1004=0,$1005=0,$1006=0,$1007=0,$1008=0,$1009=0,$101=0;var $1010=0,$1011=0,$1012=0,$1013=0,$1014=0,$1015=0,$1016=0,$1017=0,$1018=0,$1019=0,$102=0,$1020=0,$1021=0,$1022=0,$1023=0,$1024=0,$1025=0,$1026=0,$1027=0,$1028=0;var $1029=0,$103=0,$1030=0,$1031=0,$1032=0,$1033=0,$1034=0,$1035=0,$1036=0,$1037=0,$1038=0,$1039=0,$104=0,$1040=0,$1041=0,$1042=0,$1043=0,$1044=0,$1045=0,$1046=0;var $1047=0,$1048=0,$1049=0,$105=0,$1050=0,$1051=0,$1052=0,$1053=0,$1054=0,$1055=0,$1056=0,$1057=0,$1058=0,$1059=0,$106=0,$1060=0,$1061=0,$1062=0,$1063=0,$1064=0;var $1065=0,$1066=0,$1067=0,$1068=0,$1069=0,$107=0,$1070=0,$108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0;var $12=0,$120=0,$121=0,$122=0,$123=0,$124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0;var $138=0,$139=0,$14=0,$140=0,$141=0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0;var $156=0,$157=0,$158=0,$159=0,$16=0,$160=0,$161=0,$162=0,$163=0,$164=0,$165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0;var $174=0,$175=0,$176=0,$177=0,$178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0,$184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0;var $192=0,$193=0,$194=0,$195=0,$196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0,$201=0,$202=0,$203=0,$204=0,$205=0,$206=0,$207=0,$208=0,$209=0;var $21=0,$210=0,$211=0,$212=0,$213=0,$214=0,$215=0,$216=0,$217=0,$218=0,$219=0,$22=0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0;var $228=0,$229=0,$23=0,$230=0,$231=0,$232=0,$233=0,$234=0,$235=0,$236=0,$237=0,$238=0,$239=0,$24=0,$240=0,$241=0,$242=0,$243=0,$244=0,$245=0;var $246=0,$247=0,$248=0,$249=0,$25=0,$250=0,$251=0,$252=0,$253=0,$254=0,$255=0,$256=0,$257=0,$258=0,$259=0,$26=0,$260=0,$261=0,$262=0,$263=0;var $264=0,$265=0,$266=0,$267=0,$268=0,$269=0,$27=0,$270=0,$271=0,$272=0,$273=0,$274=0,$275=0,$276=0,$277=0,$278=0,$279=0,$28=0,$280=0,$281=0;var $282=0,$283=0,$284=0,$285=0,$286=0,$287=0,$288=0,$289=0,$29=0,$290=0,$291=0,$292=0,$293=0,$294=0,$295=0,$296=0,$297=0,$298=0,$299=0,$3=0;var $30=0,$300=0,$301=0,$302=0,$303=0,$304=0,$305=0,$306=0,$307=0,$308=0,$309=0,$31=0,$310=0,$311=0,$312=0,$313=0,$314=0,$315=0,$316=0,$317=0;var $318=0,$319=0,$32=0,$320=0,$321=0,$322=0,$323=0,$324=0,$325=0,$326=0,$327=0,$328=0,$329=0,$33=0,$330=0,$331=0,$332=0,$333=0,$334=0,$335=0;var $336=0,$337=0,$338=0,$339=0,$34=0,$340=0,$341=0,$342=0,$343=0,$344=0,$345=0,$346=0,$347=0,$348=0,$349=0,$35=0,$350=0,$351=0,$352=0,$353=0;var $354=0,$355=0,$356=0,$357=0,$358=0,$359=0,$36=0,$360=0,$361=0,$362=0,$363=0,$364=0,$365=0,$366=0,$367=0,$368=0,$369=0,$37=0,$370=0,$371=0;var $372=0,$373=0,$374=0,$375=0,$376=0,$377=0,$378=0,$379=0,$38=0,$380=0,$381=0,$382=0,$383=0,$384=0,$385=0,$386=0,$387=0,$388=0,$389=0,$39=0;var $390=0,$391=0,$392=0,$393=0,$394=0,$395=0,$396=0,$397=0,$398=0,$399=0,$4=0,$40=0,$400=0,$401=0,$402=0,$403=0,$404=0,$405=0,$406=0,$407=0;var $408=0,$409=0,$41=0,$410=0,$411=0,$412=0,$413=0,$414=0,$415=0,$416=0,$417=0,$418=0,$419=0,$42=0,$420=0,$421=0,$422=0,$423=0,$424=0,$425=0;var $426=0,$427=0,$428=0,$429=0,$43=0,$430=0,$431=0,$432=0,$433=0,$434=0,$435=0,$436=0,$437=0,$438=0,$439=0,$44=0,$440=0,$441=0,$442=0,$443=0;var $444=0,$445=0,$446=0,$447=0,$448=0,$449=0,$45=0,$450=0,$451=0,$452=0,$453=0,$454=0,$455=0,$456=0,$457=0,$458=0,$459=0,$46=0,$460=0,$461=0;var $462=0,$463=0,$464=0,$465=0,$466=0,$467=0,$468=0,$469=0,$47=0,$470=0,$471=0,$472=0,$473=0,$474=0,$475=0,$476=0,$477=0,$478=0,$479=0,$48=0;var $480=0,$481=0,$482=0,$483=0,$484=0,$485=0,$486=0,$487=0,$488=0,$489=0,$49=0,$490=0,$491=0,$492=0,$493=0,$494=0,$495=0,$496=0,$497=0,$498=0;var $499=0,$5=0,$50=0,$500=0,$501=0,$502=0,$503=0,$504=0,$505=0,$506=0,$507=0,$508=0,$509=0,$51=0,$510=0,$511=0,$512=0,$513=0,$514=0,$515=0;var $516=0,$517=0,$518=0,$519=0,$52=0,$520=0,$521=0,$522=0,$523=0,$524=0,$525=0,$526=0,$527=0,$528=0,$529=0,$53=0,$530=0,$531=0,$532=0,$533=0;var $534=0,$535=0,$536=0,$537=0,$538=0,$539=0,$54=0,$540=0,$541=0,$542=0,$543=0,$544=0,$545=0,$546=0,$547=0,$548=0,$549=0,$55=0,$550=0,$551=0;var $552=0,$553=0,$554=0,$555=0,$556=0,$557=0,$558=0,$559=0,$56=0,$560=0,$561=0,$562=0,$563=0,$564=0,$565=0,$566=0,$567=0,$568=0,$569=0,$57=0;var $570=0,$571=0,$572=0,$573=0,$574=0,$575=0,$576=0,$577=0,$578=0,$579=0,$58=0,$580=0,$581=0,$582=0,$583=0,$584=0,$585=0,$586=0,$587=0,$588=0;var $589=0,$59=0,$590=0,$591=0,$592=0,$593=0,$594=0,$595=0,$596=0,$597=0,$598=0,$599=0,$6=0,$60=0,$600=0,$601=0,$602=0,$603=0,$604=0,$605=0;var $606=0,$607=0,$608=0,$609=0,$61=0,$610=0,$611=0,$612=0,$613=0,$614=0,$615=0,$616=0,$617=0,$618=0,$619=0,$62=0,$620=0,$621=0,$622=0,$623=0;var $624=0,$625=0,$626=0,$627=0,$628=0,$629=0,$63=0,$630=0,$631=0,$632=0,$633=0,$634=0,$635=0,$636=0,$637=0,$638=0,$639=0,$64=0,$640=0,$641=0;var $642=0,$643=0,$644=0,$645=0,$646=0,$647=0,$648=0,$649=0,$65=0,$650=0,$651=0,$652=0,$653=0,$654=0,$655=0,$656=0,$657=0,$658=0,$659=0,$66=0;var $660=0,$661=0,$662=0,$663=0,$664=0,$665=0,$666=0,$667=0,$668=0,$669=0,$67=0,$670=0,$671=0,$672=0,$673=0,$674=0,$675=0,$676=0,$677=0,$678=0;var $679=0,$68=0,$680=0,$681=0,$682=0,$683=0,$684=0,$685=0,$686=0,$687=0,$688=0,$689=0,$69=0,$690=0,$691=0,$692=0,$693=0,$694=0,$695=0,$696=0;var $697=0,$698=0,$699=0,$7=0,$70=0,$700=0,$701=0,$702=0,$703=0,$704=0,$705=0,$706=0,$707=0,$708=0,$709=0,$71=0,$710=0,$711=0,$712=0,$713=0;var $714=0,$715=0,$716=0,$717=0,$718=0,$719=0,$72=0,$720=0,$721=0,$722=0,$723=0,$724=0,$725=0,$726=0,$727=0,$728=0,$729=0,$73=0,$730=0,$731=0;var $732=0,$733=0,$734=0,$735=0,$736=0,$737=0,$738=0,$739=0,$74=0,$740=0,$741=0,$742=0,$743=0,$744=0,$745=0,$746=0,$747=0,$748=0,$749=0,$75=0;var $750=0,$751=0,$752=0,$753=0,$754=0,$755=0,$756=0,$757=0,$758=0,$759=0,$76=0,$760=0,$761=0,$762=0,$763=0,$764=0,$765=0,$766=0,$767=0,$768=0;var $769=0,$77=0,$770=0,$771=0,$772=0,$773=0,$774=0,$775=0,$776=0,$777=0,$778=0,$779=0,$78=0,$780=0,$781=0,$782=0,$783=0,$784=0,$785=0,$786=0;var $787=0,$788=0,$789=0,$79=0,$790=0,$791=0,$792=0,$793=0,$794=0,$795=0,$796=0,$797=0,$798=0,$799=0,$8=0,$80=0,$800=0,$801=0,$802=0,$803=0;var $804=0,$805=0,$806=0,$807=0,$808=0,$809=0,$81=0,$810=0,$811=0,$812=0,$813=0,$814=0,$815=0,$816=0,$817=0,$818=0,$819=0,$82=0,$820=0,$821=0;var $822=0,$823=0,$824=0,$825=0,$826=0,$827=0,$828=0,$829=0,$83=0,$830=0,$831=0,$832=0,$833=0,$834=0,$835=0,$836=0,$837=0,$838=0,$839=0,$84=0;var $840=0,$841=0,$842=0,$843=0,$844=0,$845=0,$846=0,$847=0,$848=0,$849=0,$85=0,$850=0,$851=0,$852=0,$853=0,$854=0,$855=0,$856=0,$857=0,$858=0;var $859=0,$86=0,$860=0,$861=0,$862=0,$863=0,$864=0,$865=0,$866=0,$867=0,$868=0,$869=0,$87=0,$870=0,$871=0,$872=0,$873=0,$874=0,$875=0,$876=0;var $877=0,$878=0,$879=0,$88=0,$880=0,$881=0,$882=0,$883=0,$884=0,$885=0,$886=0,$887=0,$888=0,$889=0,$89=0,$890=0,$891=0,$892=0,$893=0,$894=0;var $895=0,$896=0,$897=0,$898=0,$899=0,$9=0,$90=0,$900=0,$901=0,$902=0,$903=0,$904=0,$905=0,$906=0,$907=0,$908=0,$909=0,$91=0,$910=0,$911=0;var $912=0,$913=0,$914=0,$915=0,$916=0,$917=0,$918=0,$919=0,$92=0,$920=0,$921=0,$922=0,$923=0,$924=0,$925=0,$926=0,$927=0,$928=0,$929=0,$93=0;var $930=0,$931=0,$932=0,$933=0,$934=0,$935=0,$936=0,$937=0,$938=0,$939=0,$94=0,$940=0,$941=0,$942=0,$943=0,$944=0,$945=0,$946=0,$947=0,$948=0;var $949=0,$95=0,$950=0,$951=0,$952=0,$953=0,$954=0,$955=0,$956=0,$957=0,$958=0,$959=0,$96=0,$960=0,$961=0,$962=0,$963=0,$964=0,$965=0,$966=0;var $967=0,$968=0,$969=0,$97=0,$970=0,$971=0,$972=0,$973=0,$974=0,$975=0,$976=0,$977=0,$978=0,$979=0,$98=0,$980=0,$981=0,$982=0,$983=0,$984=0;var $985=0,$986=0,$987=0,$988=0,$989=0,$99=0,$990=0,$991=0,$992=0,$993=0,$994=0,$995=0,$996=0,$997=0,$998=0,$999=0,$F$0$i$i=0,$F1$0$i=0,$F4$0=0,$F4$0$i$i=0;var $F5$0$i=0,$I1$0$i$i=0,$I7$0$i=0,$I7$0$i$i=0,$K12$029$i=0,$K2$07$i$i=0,$K8$051$i$i=0,$R$0$i=0,$R$0$i$i=0,$R$0$i$i$lcssa=0,$R$0$i$lcssa=0,$R$0$i18=0,$R$0$i18$lcssa=0,$R$1$i=0,$R$1$i$i=0,$R$1$i20=0,$RP$0$i=0,$RP$0$i$i=0,$RP$0$i$i$lcssa=0,$RP$0$i$lcssa=0;var $RP$0$i17=0,$RP$0$i17$lcssa=0,$T$0$lcssa$i=0,$T$0$lcssa$i$i=0,$T$0$lcssa$i25$i=0,$T$028$i=0,$T$028$i$lcssa=0,$T$050$i$i=0,$T$050$i$i$lcssa=0,$T$06$i$i=0,$T$06$i$i$lcssa=0,$br$0$ph$i=0,$cond$i=0,$cond$i$i=0,$cond$i21=0,$exitcond$i$i=0,$i$02$i$i=0,$idx$0$i=0,$mem$0=0,$nb$0=0;var $not$$i=0,$not$$i$i=0,$not$$i26$i=0,$oldfirst$0$i$i=0,$or$cond$i=0,$or$cond$i30=0,$or$cond1$i=0,$or$cond19$i=0,$or$cond2$i=0,$or$cond3$i=0,$or$cond5$i=0,$or$cond57$i=0,$or$cond6$i=0,$or$cond8$i=0,$or$cond9$i=0,$qsize$0$i$i=0,$rsize$0$i=0,$rsize$0$i$lcssa=0,$rsize$0$i15=0,$rsize$1$i=0;var $rsize$2$i=0,$rsize$3$lcssa$i=0,$rsize$331$i=0,$rst$0$i=0,$rst$1$i=0,$sizebits$0$i=0,$sp$0$i$i=0,$sp$0$i$i$i=0,$sp$084$i=0,$sp$084$i$lcssa=0,$sp$183$i=0,$sp$183$i$lcssa=0,$ssize$0$$i=0,$ssize$0$i=0,$ssize$1$ph$i=0,$ssize$2$i=0,$t$0$i=0,$t$0$i14=0,$t$1$i=0,$t$2$ph$i=0;var $t$2$v$3$i=0,$t$230$i=0,$tbase$255$i=0,$tsize$0$ph$i=0,$tsize$0323944$i=0,$tsize$1$i=0,$tsize$254$i=0,$v$0$i=0,$v$0$i$lcssa=0,$v$0$i16=0,$v$1$i=0,$v$2$i=0,$v$3$lcssa$i=0,$v$3$ph$i=0,$v$332$i=0,label=0,sp=0;sp=STACKTOP;$0=$bytes>>>0<245;do{if($0){$1=$bytes>>>0<11;$2=$bytes+11|0;$3=$2&-8;$4=$1?16:$3;$5=$4>>>3;$6=HEAP32[96488>>2]|0;$7=$6>>>$5;$8=$7&3;$9=($8|0)==0;if(!$9){$10=$7&1;$11=$10^1;$12=$11+$5|0;$13=$12<<1;$14=96528+($13<<2)|0;$$sum10=$13+2|0;$15=96528+($$sum10<<2)|0;$16=HEAP32[$15>>2]|0;$17=$16+8|0;$18=HEAP32[$17>>2]|0;$19=($14|0)==($18|0);do{if($19){$20=1<<$12;$21=$20^-1;$22=$6&$21;HEAP32[96488>>2]=$22}else{$23=HEAP32[96504>>2]|0;$24=$18>>>0<$23>>>0;if($24){_abort()}$25=$18+12|0;$26=HEAP32[$25>>2]|0;$27=($26|0)==($16|0);if($27){HEAP32[$25>>2]=$14;HEAP32[$15>>2]=$18;break}else{_abort()}}}while(0);$28=$12<<3;$29=$28|3;$30=$16+4|0;HEAP32[$30>>2]=$29;$$sum1112=$28|4;$31=$16+$$sum1112|0;$32=HEAP32[$31>>2]|0;$33=$32|1;HEAP32[$31>>2]=$33;$mem$0=$17;return $mem$0|0}$34=HEAP32[96496>>2]|0;$35=$4>>>0>$34>>>0;if($35){$36=($7|0)==0;if(!$36){$37=$7<<$5;$38=2<<$5;$39=0-$38|0;$40=$38|$39;$41=$37&$40;$42=0-$41|0;$43=$41&$42;$44=$43+-1|0;$45=$44>>>12;$46=$45&16;$47=$44>>>$46;$48=$47>>>5;$49=$48&8;$50=$49|$46;$51=$47>>>$49;$52=$51>>>2;$53=$52&4;$54=$50|$53;$55=$51>>>$53;$56=$55>>>1;$57=$56&2;$58=$54|$57;$59=$55>>>$57;$60=$59>>>1;$61=$60&1;$62=$58|$61;$63=$59>>>$61;$64=$62+$63|0;$65=$64<<1;$66=96528+($65<<2)|0;$$sum4=$65+2|0;$67=96528+($$sum4<<2)|0;$68=HEAP32[$67>>2]|0;$69=$68+8|0;$70=HEAP32[$69>>2]|0;$71=($66|0)==($70|0);do{if($71){$72=1<<$64;$73=$72^-1;$74=$6&$73;HEAP32[96488>>2]=$74;$88=$34}else{$75=HEAP32[96504>>2]|0;$76=$70>>>0<$75>>>0;if($76){_abort()}$77=$70+12|0;$78=HEAP32[$77>>2]|0;$79=($78|0)==($68|0);if($79){HEAP32[$77>>2]=$66;HEAP32[$67>>2]=$70;$$pre=HEAP32[96496>>2]|0;$88=$$pre;break}else{_abort()}}}while(0);$80=$64<<3;$81=$80-$4|0;$82=$4|3;$83=$68+4|0;HEAP32[$83>>2]=$82;$84=$68+$4|0;$85=$81|1;$$sum56=$4|4;$86=$68+$$sum56|0;HEAP32[$86>>2]=$85;$87=$68+$80|0;HEAP32[$87>>2]=$81;$89=($88|0)==0;if(!$89){$90=HEAP32[96508>>2]|0;$91=$88>>>3;$92=$91<<1;$93=96528+($92<<2)|0;$94=HEAP32[96488>>2]|0;$95=1<<$91;$96=$94&$95;$97=($96|0)==0;if($97){$98=$94|$95;HEAP32[96488>>2]=$98;$$pre105=$92+2|0;$$pre106=96528+($$pre105<<2)|0;$$pre$phiZ2D=$$pre106;$F4$0=$93}else{$$sum9=$92+2|0;$99=96528+($$sum9<<2)|0;$100=HEAP32[$99>>2]|0;$101=HEAP32[96504>>2]|0;$102=$100>>>0<$101>>>0;if($102){_abort()}else{$$pre$phiZ2D=$99;$F4$0=$100}}HEAP32[$$pre$phiZ2D>>2]=$90;$103=$F4$0+12|0;HEAP32[$103>>2]=$90;$104=$90+8|0;HEAP32[$104>>2]=$F4$0;$105=$90+12|0;HEAP32[$105>>2]=$93}HEAP32[96496>>2]=$81;HEAP32[96508>>2]=$84;$mem$0=$69;return $mem$0|0}$106=HEAP32[96492>>2]|0;$107=($106|0)==0;if($107){$nb$0=$4}else{$108=0-$106|0;$109=$106&$108;$110=$109+-1|0;$111=$110>>>12;$112=$111&16;$113=$110>>>$112;$114=$113>>>5;$115=$114&8;$116=$115|$112;$117=$113>>>$115;$118=$117>>>2;$119=$118&4;$120=$116|$119;$121=$117>>>$119;$122=$121>>>1;$123=$122&2;$124=$120|$123;$125=$121>>>$123;$126=$125>>>1;$127=$126&1;$128=$124|$127;$129=$125>>>$127;$130=$128+$129|0;$131=96792+($130<<2)|0;$132=HEAP32[$131>>2]|0;$133=$132+4|0;$134=HEAP32[$133>>2]|0;$135=$134&-8;$136=$135-$4|0;$rsize$0$i=$136;$t$0$i=$132;$v$0$i=$132;while(1){$137=$t$0$i+16|0;$138=HEAP32[$137>>2]|0;$139=($138|0)==(0|0);if($139){$140=$t$0$i+20|0;$141=HEAP32[$140>>2]|0;$142=($141|0)==(0|0);if($142){$rsize$0$i$lcssa=$rsize$0$i;$v$0$i$lcssa=$v$0$i;break}else{$144=$141}}else{$144=$138}$143=$144+4|0;$145=HEAP32[$143>>2]|0;$146=$145&-8;$147=$146-$4|0;$148=$147>>>0<$rsize$0$i>>>0;$$rsize$0$i=$148?$147:$rsize$0$i;$$v$0$i=$148?$144:$v$0$i;$rsize$0$i=$$rsize$0$i;$t$0$i=$144;$v$0$i=$$v$0$i}$149=HEAP32[96504>>2]|0;$150=$v$0$i$lcssa>>>0<$149>>>0;if($150){_abort()}$151=$v$0$i$lcssa+$4|0;$152=$v$0$i$lcssa>>>0<$151>>>0;if(!$152){_abort()}$153=$v$0$i$lcssa+24|0;$154=HEAP32[$153>>2]|0;$155=$v$0$i$lcssa+12|0;$156=HEAP32[$155>>2]|0;$157=($156|0)==($v$0$i$lcssa|0);do{if($157){$167=$v$0$i$lcssa+20|0;$168=HEAP32[$167>>2]|0;$169=($168|0)==(0|0);if($169){$170=$v$0$i$lcssa+16|0;$171=HEAP32[$170>>2]|0;$172=($171|0)==(0|0);if($172){$R$1$i=0;break}else{$R$0$i=$171;$RP$0$i=$170}}else{$R$0$i=$168;$RP$0$i=$167}while(1){$173=$R$0$i+20|0;$174=HEAP32[$173>>2]|0;$175=($174|0)==(0|0);if(!$175){$R$0$i=$174;$RP$0$i=$173;continue}$176=$R$0$i+16|0;$177=HEAP32[$176>>2]|0;$178=($177|0)==(0|0);if($178){$R$0$i$lcssa=$R$0$i;$RP$0$i$lcssa=$RP$0$i;break}else{$R$0$i=$177;$RP$0$i=$176}}$179=$RP$0$i$lcssa>>>0<$149>>>0;if($179){_abort()}else{HEAP32[$RP$0$i$lcssa>>2]=0;$R$1$i=$R$0$i$lcssa;break}}else{$158=$v$0$i$lcssa+8|0;$159=HEAP32[$158>>2]|0;$160=$159>>>0<$149>>>0;if($160){_abort()}$161=$159+12|0;$162=HEAP32[$161>>2]|0;$163=($162|0)==($v$0$i$lcssa|0);if(!$163){_abort()}$164=$156+8|0;$165=HEAP32[$164>>2]|0;$166=($165|0)==($v$0$i$lcssa|0);if($166){HEAP32[$161>>2]=$156;HEAP32[$164>>2]=$159;$R$1$i=$156;break}else{_abort()}}}while(0);$180=($154|0)==(0|0);do{if(!$180){$181=$v$0$i$lcssa+28|0;$182=HEAP32[$181>>2]|0;$183=96792+($182<<2)|0;$184=HEAP32[$183>>2]|0;$185=($v$0$i$lcssa|0)==($184|0);if($185){HEAP32[$183>>2]=$R$1$i;$cond$i=($R$1$i|0)==(0|0);if($cond$i){$186=1<<$182;$187=$186^-1;$188=HEAP32[96492>>2]|0;$189=$188&$187;HEAP32[96492>>2]=$189;break}}else{$190=HEAP32[96504>>2]|0;$191=$154>>>0<$190>>>0;if($191){_abort()}$192=$154+16|0;$193=HEAP32[$192>>2]|0;$194=($193|0)==($v$0$i$lcssa|0);if($194){HEAP32[$192>>2]=$R$1$i}else{$195=$154+20|0;HEAP32[$195>>2]=$R$1$i}$196=($R$1$i|0)==(0|0);if($196){break}}$197=HEAP32[96504>>2]|0;$198=$R$1$i>>>0<$197>>>0;if($198){_abort()}$199=$R$1$i+24|0;HEAP32[$199>>2]=$154;$200=$v$0$i$lcssa+16|0;$201=HEAP32[$200>>2]|0;$202=($201|0)==(0|0);do{if(!$202){$203=$201>>>0<$197>>>0;if($203){_abort()}else{$204=$R$1$i+16|0;HEAP32[$204>>2]=$201;$205=$201+24|0;HEAP32[$205>>2]=$R$1$i;break}}}while(0);$206=$v$0$i$lcssa+20|0;$207=HEAP32[$206>>2]|0;$208=($207|0)==(0|0);if(!$208){$209=HEAP32[96504>>2]|0;$210=$207>>>0<$209>>>0;if($210){_abort()}else{$211=$R$1$i+20|0;HEAP32[$211>>2]=$207;$212=$207+24|0;HEAP32[$212>>2]=$R$1$i;break}}}}while(0);$213=$rsize$0$i$lcssa>>>0<16;if($213){$214=$rsize$0$i$lcssa+$4|0;$215=$214|3;$216=$v$0$i$lcssa+4|0;HEAP32[$216>>2]=$215;$$sum4$i=$214+4|0;$217=$v$0$i$lcssa+$$sum4$i|0;$218=HEAP32[$217>>2]|0;$219=$218|1;HEAP32[$217>>2]=$219}else{$220=$4|3;$221=$v$0$i$lcssa+4|0;HEAP32[$221>>2]=$220;$222=$rsize$0$i$lcssa|1;$$sum$i35=$4|4;$223=$v$0$i$lcssa+$$sum$i35|0;HEAP32[$223>>2]=$222;$$sum1$i=$rsize$0$i$lcssa+$4|0;$224=$v$0$i$lcssa+$$sum1$i|0;HEAP32[$224>>2]=$rsize$0$i$lcssa;$225=HEAP32[96496>>2]|0;$226=($225|0)==0;if(!$226){$227=HEAP32[96508>>2]|0;$228=$225>>>3;$229=$228<<1;$230=96528+($229<<2)|0;$231=HEAP32[96488>>2]|0;$232=1<<$228;$233=$231&$232;$234=($233|0)==0;if($234){$235=$231|$232;HEAP32[96488>>2]=$235;$$pre$i=$229+2|0;$$pre8$i=96528+($$pre$i<<2)|0;$$pre$phi$iZ2D=$$pre8$i;$F1$0$i=$230}else{$$sum3$i=$229+2|0;$236=96528+($$sum3$i<<2)|0;$237=HEAP32[$236>>2]|0;$238=HEAP32[96504>>2]|0;$239=$237>>>0<$238>>>0;if($239){_abort()}else{$$pre$phi$iZ2D=$236;$F1$0$i=$237}}HEAP32[$$pre$phi$iZ2D>>2]=$227;$240=$F1$0$i+12|0;HEAP32[$240>>2]=$227;$241=$227+8|0;HEAP32[$241>>2]=$F1$0$i;$242=$227+12|0;HEAP32[$242>>2]=$230}HEAP32[96496>>2]=$rsize$0$i$lcssa;HEAP32[96508>>2]=$151}$243=$v$0$i$lcssa+8|0;$mem$0=$243;return $mem$0|0}}else{$nb$0=$4}}else{$244=$bytes>>>0>4294967231;if($244){$nb$0=-1}else{$245=$bytes+11|0;$246=$245&-8;$247=HEAP32[96492>>2]|0;$248=($247|0)==0;if($248){$nb$0=$246}else{$249=0-$246|0;$250=$245>>>8;$251=($250|0)==0;if($251){$idx$0$i=0}else{$252=$246>>>0>16777215;if($252){$idx$0$i=31}else{$253=$250+1048320|0;$254=$253>>>16;$255=$254&8;$256=$250<<$255;$257=$256+520192|0;$258=$257>>>16;$259=$258&4;$260=$259|$255;$261=$256<<$259;$262=$261+245760|0;$263=$262>>>16;$264=$263&2;$265=$260|$264;$266=14-$265|0;$267=$261<<$264;$268=$267>>>15;$269=$266+$268|0;$270=$269<<1;$271=$269+7|0;$272=$246>>>$271;$273=$272&1;$274=$273|$270;$idx$0$i=$274}}$275=96792+($idx$0$i<<2)|0;$276=HEAP32[$275>>2]|0;$277=($276|0)==(0|0);L123:do{if($277){$rsize$2$i=$249;$t$1$i=0;$v$2$i=0;label=86}else{$278=($idx$0$i|0)==31;$279=$idx$0$i>>>1;$280=25-$279|0;$281=$278?0:$280;$282=$246<<$281;$rsize$0$i15=$249;$rst$0$i=0;$sizebits$0$i=$282;$t$0$i14=$276;$v$0$i16=0;while(1){$283=$t$0$i14+4|0;$284=HEAP32[$283>>2]|0;$285=$284&-8;$286=$285-$246|0;$287=$286>>>0<$rsize$0$i15>>>0;if($287){$288=($285|0)==($246|0);if($288){$rsize$331$i=$286;$t$230$i=$t$0$i14;$v$332$i=$t$0$i14;label=90;break L123}else{$rsize$1$i=$286;$v$1$i=$t$0$i14}}else{$rsize$1$i=$rsize$0$i15;$v$1$i=$v$0$i16}$289=$t$0$i14+20|0;$290=HEAP32[$289>>2]|0;$291=$sizebits$0$i>>>31;$292=($t$0$i14+16|0)+($291<<2)|0;$293=HEAP32[$292>>2]|0;$294=($290|0)==(0|0);$295=($290|0)==($293|0);$or$cond19$i=$294|$295;$rst$1$i=$or$cond19$i?$rst$0$i:$290;$296=($293|0)==(0|0);$297=$sizebits$0$i<<1;if($296){$rsize$2$i=$rsize$1$i;$t$1$i=$rst$1$i;$v$2$i=$v$1$i;label=86;break}else{$rsize$0$i15=$rsize$1$i;$rst$0$i=$rst$1$i;$sizebits$0$i=$297;$t$0$i14=$293;$v$0$i16=$v$1$i}}}}while(0);if((label|0)==86){$298=($t$1$i|0)==(0|0);$299=($v$2$i|0)==(0|0);$or$cond$i=$298&$299;if($or$cond$i){$300=2<<$idx$0$i;$301=0-$300|0;$302=$300|$301;$303=$247&$302;$304=($303|0)==0;if($304){$nb$0=$246;break}$305=0-$303|0;$306=$303&$305;$307=$306+-1|0;$308=$307>>>12;$309=$308&16;$310=$307>>>$309;$311=$310>>>5;$312=$311&8;$313=$312|$309;$314=$310>>>$312;$315=$314>>>2;$316=$315&4;$317=$313|$316;$318=$314>>>$316;$319=$318>>>1;$320=$319&2;$321=$317|$320;$322=$318>>>$320;$323=$322>>>1;$324=$323&1;$325=$321|$324;$326=$322>>>$324;$327=$325+$326|0;$328=96792+($327<<2)|0;$329=HEAP32[$328>>2]|0;$t$2$ph$i=$329;$v$3$ph$i=0}else{$t$2$ph$i=$t$1$i;$v$3$ph$i=$v$2$i}$330=($t$2$ph$i|0)==(0|0);if($330){$rsize$3$lcssa$i=$rsize$2$i;$v$3$lcssa$i=$v$3$ph$i}else{$rsize$331$i=$rsize$2$i;$t$230$i=$t$2$ph$i;$v$332$i=$v$3$ph$i;label=90}}if((label|0)==90){while(1){label=0;$331=$t$230$i+4|0;$332=HEAP32[$331>>2]|0;$333=$332&-8;$334=$333-$246|0;$335=$334>>>0<$rsize$331$i>>>0;$$rsize$3$i=$335?$334:$rsize$331$i;$t$2$v$3$i=$335?$t$230$i:$v$332$i;$336=$t$230$i+16|0;$337=HEAP32[$336>>2]|0;$338=($337|0)==(0|0);if(!$338){$rsize$331$i=$$rsize$3$i;$t$230$i=$337;$v$332$i=$t$2$v$3$i;label=90;continue}$339=$t$230$i+20|0;$340=HEAP32[$339>>2]|0;$341=($340|0)==(0|0);if($341){$rsize$3$lcssa$i=$$rsize$3$i;$v$3$lcssa$i=$t$2$v$3$i;break}else{$rsize$331$i=$$rsize$3$i;$t$230$i=$340;$v$332$i=$t$2$v$3$i;label=90}}}$342=($v$3$lcssa$i|0)==(0|0);if($342){$nb$0=$246}else{$343=HEAP32[96496>>2]|0;$344=$343-$246|0;$345=$rsize$3$lcssa$i>>>0<$344>>>0;if($345){$346=HEAP32[96504>>2]|0;$347=$v$3$lcssa$i>>>0<$346>>>0;if($347){_abort()}$348=$v$3$lcssa$i+$246|0;$349=$v$3$lcssa$i>>>0<$348>>>0;if(!$349){_abort()}$350=$v$3$lcssa$i+24|0;$351=HEAP32[$350>>2]|0;$352=$v$3$lcssa$i+12|0;$353=HEAP32[$352>>2]|0;$354=($353|0)==($v$3$lcssa$i|0);do{if($354){$364=$v$3$lcssa$i+20|0;$365=HEAP32[$364>>2]|0;$366=($365|0)==(0|0);if($366){$367=$v$3$lcssa$i+16|0;$368=HEAP32[$367>>2]|0;$369=($368|0)==(0|0);if($369){$R$1$i20=0;break}else{$R$0$i18=$368;$RP$0$i17=$367}}else{$R$0$i18=$365;$RP$0$i17=$364}while(1){$370=$R$0$i18+20|0;$371=HEAP32[$370>>2]|0;$372=($371|0)==(0|0);if(!$372){$R$0$i18=$371;$RP$0$i17=$370;continue}$373=$R$0$i18+16|0;$374=HEAP32[$373>>2]|0;$375=($374|0)==(0|0);if($375){$R$0$i18$lcssa=$R$0$i18;$RP$0$i17$lcssa=$RP$0$i17;break}else{$R$0$i18=$374;$RP$0$i17=$373}}$376=$RP$0$i17$lcssa>>>0<$346>>>0;if($376){_abort()}else{HEAP32[$RP$0$i17$lcssa>>2]=0;$R$1$i20=$R$0$i18$lcssa;break}}else{$355=$v$3$lcssa$i+8|0;$356=HEAP32[$355>>2]|0;$357=$356>>>0<$346>>>0;if($357){_abort()}$358=$356+12|0;$359=HEAP32[$358>>2]|0;$360=($359|0)==($v$3$lcssa$i|0);if(!$360){_abort()}$361=$353+8|0;$362=HEAP32[$361>>2]|0;$363=($362|0)==($v$3$lcssa$i|0);if($363){HEAP32[$358>>2]=$353;HEAP32[$361>>2]=$356;$R$1$i20=$353;break}else{_abort()}}}while(0);$377=($351|0)==(0|0);do{if(!$377){$378=$v$3$lcssa$i+28|0;$379=HEAP32[$378>>2]|0;$380=96792+($379<<2)|0;$381=HEAP32[$380>>2]|0;$382=($v$3$lcssa$i|0)==($381|0);if($382){HEAP32[$380>>2]=$R$1$i20;$cond$i21=($R$1$i20|0)==(0|0);if($cond$i21){$383=1<<$379;$384=$383^-1;$385=HEAP32[96492>>2]|0;$386=$385&$384;HEAP32[96492>>2]=$386;break}}else{$387=HEAP32[96504>>2]|0;$388=$351>>>0<$387>>>0;if($388){_abort()}$389=$351+16|0;$390=HEAP32[$389>>2]|0;$391=($390|0)==($v$3$lcssa$i|0);if($391){HEAP32[$389>>2]=$R$1$i20}else{$392=$351+20|0;HEAP32[$392>>2]=$R$1$i20}$393=($R$1$i20|0)==(0|0);if($393){break}}$394=HEAP32[96504>>2]|0;$395=$R$1$i20>>>0<$394>>>0;if($395){_abort()}$396=$R$1$i20+24|0;HEAP32[$396>>2]=$351;$397=$v$3$lcssa$i+16|0;$398=HEAP32[$397>>2]|0;$399=($398|0)==(0|0);do{if(!$399){$400=$398>>>0<$394>>>0;if($400){_abort()}else{$401=$R$1$i20+16|0;HEAP32[$401>>2]=$398;$402=$398+24|0;HEAP32[$402>>2]=$R$1$i20;break}}}while(0);$403=$v$3$lcssa$i+20|0;$404=HEAP32[$403>>2]|0;$405=($404|0)==(0|0);if(!$405){$406=HEAP32[96504>>2]|0;$407=$404>>>0<$406>>>0;if($407){_abort()}else{$408=$R$1$i20+20|0;HEAP32[$408>>2]=$404;$409=$404+24|0;HEAP32[$409>>2]=$R$1$i20;break}}}}while(0);$410=$rsize$3$lcssa$i>>>0<16;L199:do{if($410){$411=$rsize$3$lcssa$i+$246|0;$412=$411|3;$413=$v$3$lcssa$i+4|0;HEAP32[$413>>2]=$412;$$sum18$i=$411+4|0;$414=$v$3$lcssa$i+$$sum18$i|0;$415=HEAP32[$414>>2]|0;$416=$415|1;HEAP32[$414>>2]=$416}else{$417=$246|3;$418=$v$3$lcssa$i+4|0;HEAP32[$418>>2]=$417;$419=$rsize$3$lcssa$i|1;$$sum$i2334=$246|4;$420=$v$3$lcssa$i+$$sum$i2334|0;HEAP32[$420>>2]=$419;$$sum1$i24=$rsize$3$lcssa$i+$246|0;$421=$v$3$lcssa$i+$$sum1$i24|0;HEAP32[$421>>2]=$rsize$3$lcssa$i;$422=$rsize$3$lcssa$i>>>3;$423=$rsize$3$lcssa$i>>>0<256;if($423){$424=$422<<1;$425=96528+($424<<2)|0;$426=HEAP32[96488>>2]|0;$427=1<<$422;$428=$426&$427;$429=($428|0)==0;if($429){$430=$426|$427;HEAP32[96488>>2]=$430;$$pre$i25=$424+2|0;$$pre43$i=96528+($$pre$i25<<2)|0;$$pre$phi$i26Z2D=$$pre43$i;$F5$0$i=$425}else{$$sum17$i=$424+2|0;$431=96528+($$sum17$i<<2)|0;$432=HEAP32[$431>>2]|0;$433=HEAP32[96504>>2]|0;$434=$432>>>0<$433>>>0;if($434){_abort()}else{$$pre$phi$i26Z2D=$431;$F5$0$i=$432}}HEAP32[$$pre$phi$i26Z2D>>2]=$348;$435=$F5$0$i+12|0;HEAP32[$435>>2]=$348;$$sum15$i=$246+8|0;$436=$v$3$lcssa$i+$$sum15$i|0;HEAP32[$436>>2]=$F5$0$i;$$sum16$i=$246+12|0;$437=$v$3$lcssa$i+$$sum16$i|0;HEAP32[$437>>2]=$425;break}$438=$rsize$3$lcssa$i>>>8;$439=($438|0)==0;if($439){$I7$0$i=0}else{$440=$rsize$3$lcssa$i>>>0>16777215;if($440){$I7$0$i=31}else{$441=$438+1048320|0;$442=$441>>>16;$443=$442&8;$444=$438<<$443;$445=$444+520192|0;$446=$445>>>16;$447=$446&4;$448=$447|$443;$449=$444<<$447;$450=$449+245760|0;$451=$450>>>16;$452=$451&2;$453=$448|$452;$454=14-$453|0;$455=$449<<$452;$456=$455>>>15;$457=$454+$456|0;$458=$457<<1;$459=$457+7|0;$460=$rsize$3$lcssa$i>>>$459;$461=$460&1;$462=$461|$458;$I7$0$i=$462}}$463=96792+($I7$0$i<<2)|0;$$sum2$i=$246+28|0;$464=$v$3$lcssa$i+$$sum2$i|0;HEAP32[$464>>2]=$I7$0$i;$$sum3$i27=$246+16|0;$465=$v$3$lcssa$i+$$sum3$i27|0;$$sum4$i28=$246+20|0;$466=$v$3$lcssa$i+$$sum4$i28|0;HEAP32[$466>>2]=0;HEAP32[$465>>2]=0;$467=HEAP32[96492>>2]|0;$468=1<<$I7$0$i;$469=$467&$468;$470=($469|0)==0;if($470){$471=$467|$468;HEAP32[96492>>2]=$471;HEAP32[$463>>2]=$348;$$sum5$i=$246+24|0;$472=$v$3$lcssa$i+$$sum5$i|0;HEAP32[$472>>2]=$463;$$sum6$i=$246+12|0;$473=$v$3$lcssa$i+$$sum6$i|0;HEAP32[$473>>2]=$348;$$sum7$i=$246+8|0;$474=$v$3$lcssa$i+$$sum7$i|0;HEAP32[$474>>2]=$348;break}$475=HEAP32[$463>>2]|0;$476=$475+4|0;$477=HEAP32[$476>>2]|0;$478=$477&-8;$479=($478|0)==($rsize$3$lcssa$i|0);L217:do{if($479){$T$0$lcssa$i=$475}else{$480=($I7$0$i|0)==31;$481=$I7$0$i>>>1;$482=25-$481|0;$483=$480?0:$482;$484=$rsize$3$lcssa$i<<$483;$K12$029$i=$484;$T$028$i=$475;while(1){$491=$K12$029$i>>>31;$492=($T$028$i+16|0)+($491<<2)|0;$487=HEAP32[$492>>2]|0;$493=($487|0)==(0|0);if($493){$$lcssa232=$492;$T$028$i$lcssa=$T$028$i;break}$485=$K12$029$i<<1;$486=$487+4|0;$488=HEAP32[$486>>2]|0;$489=$488&-8;$490=($489|0)==($rsize$3$lcssa$i|0);if($490){$T$0$lcssa$i=$487;break L217}else{$K12$029$i=$485;$T$028$i=$487}}$494=HEAP32[96504>>2]|0;$495=$$lcssa232>>>0<$494>>>0;if($495){_abort()}else{HEAP32[$$lcssa232>>2]=$348;$$sum11$i=$246+24|0;$496=$v$3$lcssa$i+$$sum11$i|0;HEAP32[$496>>2]=$T$028$i$lcssa;$$sum12$i=$246+12|0;$497=$v$3$lcssa$i+$$sum12$i|0;HEAP32[$497>>2]=$348;$$sum13$i=$246+8|0;$498=$v$3$lcssa$i+$$sum13$i|0;HEAP32[$498>>2]=$348;break L199}}}while(0);$499=$T$0$lcssa$i+8|0;$500=HEAP32[$499>>2]|0;$501=HEAP32[96504>>2]|0;$502=$500>>>0>=$501>>>0;$not$$i=$T$0$lcssa$i>>>0>=$501>>>0;$503=$502&$not$$i;if($503){$504=$500+12|0;HEAP32[$504>>2]=$348;HEAP32[$499>>2]=$348;$$sum8$i=$246+8|0;$505=$v$3$lcssa$i+$$sum8$i|0;HEAP32[$505>>2]=$500;$$sum9$i=$246+12|0;$506=$v$3$lcssa$i+$$sum9$i|0;HEAP32[$506>>2]=$T$0$lcssa$i;$$sum10$i=$246+24|0;$507=$v$3$lcssa$i+$$sum10$i|0;HEAP32[$507>>2]=0;break}else{_abort()}}}while(0);$508=$v$3$lcssa$i+8|0;$mem$0=$508;return $mem$0|0}else{$nb$0=$246}}}}}}while(0);$509=HEAP32[96496>>2]|0;$510=$509>>>0<$nb$0>>>0;if(!$510){$511=$509-$nb$0|0;$512=HEAP32[96508>>2]|0;$513=$511>>>0>15;if($513){$514=$512+$nb$0|0;HEAP32[96508>>2]=$514;HEAP32[96496>>2]=$511;$515=$511|1;$$sum2=$nb$0+4|0;$516=$512+$$sum2|0;HEAP32[$516>>2]=$515;$517=$512+$509|0;HEAP32[$517>>2]=$511;$518=$nb$0|3;$519=$512+4|0;HEAP32[$519>>2]=$518}else{HEAP32[96496>>2]=0;HEAP32[96508>>2]=0;$520=$509|3;$521=$512+4|0;HEAP32[$521>>2]=$520;$$sum1=$509+4|0;$522=$512+$$sum1|0;$523=HEAP32[$522>>2]|0;$524=$523|1;HEAP32[$522>>2]=$524}$525=$512+8|0;$mem$0=$525;return $mem$0|0}$526=HEAP32[96500>>2]|0;$527=$526>>>0>$nb$0>>>0;if($527){$528=$526-$nb$0|0;HEAP32[96500>>2]=$528;$529=HEAP32[96512>>2]|0;$530=$529+$nb$0|0;HEAP32[96512>>2]=$530;$531=$528|1;$$sum=$nb$0+4|0;$532=$529+$$sum|0;HEAP32[$532>>2]=$531;$533=$nb$0|3;$534=$529+4|0;HEAP32[$534>>2]=$533;$535=$529+8|0;$mem$0=$535;return $mem$0|0}$536=HEAP32[96960>>2]|0;$537=($536|0)==0;do{if($537){$538=_sysconf(30)|0;$539=$538+-1|0;$540=$539&$538;$541=($540|0)==0;if($541){HEAP32[96968>>2]=$538;HEAP32[96964>>2]=$538;HEAP32[96972>>2]=-1;HEAP32[96976>>2]=-1;HEAP32[96980>>2]=0;HEAP32[96932>>2]=0;$542=_time(0|0)|0;$543=$542&-16;$544=$543^1431655768;HEAP32[96960>>2]=$544;break}else{_abort()}}}while(0);$545=$nb$0+48|0;$546=HEAP32[96968>>2]|0;$547=$nb$0+47|0;$548=$546+$547|0;$549=0-$546|0;$550=$548&$549;$551=$550>>>0>$nb$0>>>0;if(!$551){$mem$0=0;return $mem$0|0}$552=HEAP32[96928>>2]|0;$553=($552|0)==0;if(!$553){$554=HEAP32[96920>>2]|0;$555=$554+$550|0;$556=$555>>>0<=$554>>>0;$557=$555>>>0>$552>>>0;$or$cond1$i=$556|$557;if($or$cond1$i){$mem$0=0;return $mem$0|0}}$558=HEAP32[96932>>2]|0;$559=$558&4;$560=($559|0)==0;L258:do{if($560){$561=HEAP32[96512>>2]|0;$562=($561|0)==(0|0);L260:do{if($562){label=174}else{$sp$0$i$i=96936;while(1){$563=HEAP32[$sp$0$i$i>>2]|0;$564=$563>>>0>$561>>>0;if(!$564){$565=$sp$0$i$i+4|0;$566=HEAP32[$565>>2]|0;$567=$563+$566|0;$568=$567>>>0>$561>>>0;if($568){$$lcssa228=$sp$0$i$i;$$lcssa230=$565;break}}$569=$sp$0$i$i+8|0;$570=HEAP32[$569>>2]|0;$571=($570|0)==(0|0);if($571){label=174;break L260}else{$sp$0$i$i=$570}}$594=HEAP32[96500>>2]|0;$595=$548-$594|0;$596=$595&$549;$597=$596>>>0<2147483647;if($597){$598=_sbrk($596|0)|0;$599=HEAP32[$$lcssa228>>2]|0;$600=HEAP32[$$lcssa230>>2]|0;$601=$599+$600|0;$602=($598|0)==($601|0);$$3$i=$602?$596:0;if($602){$603=($598|0)==(-1|0);if($603){$tsize$0323944$i=$$3$i}else{$tbase$255$i=$598;$tsize$254$i=$$3$i;label=194;break L258}}else{$br$0$ph$i=$598;$ssize$1$ph$i=$596;$tsize$0$ph$i=$$3$i;label=184}}else{$tsize$0323944$i=0}}}while(0);do{if((label|0)==174){$572=_sbrk(0)|0;$573=($572|0)==(-1|0);if($573){$tsize$0323944$i=0}else{$574=$572;$575=HEAP32[96964>>2]|0;$576=$575+-1|0;$577=$576&$574;$578=($577|0)==0;if($578){$ssize$0$i=$550}else{$579=$576+$574|0;$580=0-$575|0;$581=$579&$580;$582=$550-$574|0;$583=$582+$581|0;$ssize$0$i=$583}$584=HEAP32[96920>>2]|0;$585=$584+$ssize$0$i|0;$586=$ssize$0$i>>>0>$nb$0>>>0;$587=$ssize$0$i>>>0<2147483647;$or$cond$i30=$586&$587;if($or$cond$i30){$588=HEAP32[96928>>2]|0;$589=($588|0)==0;if(!$589){$590=$585>>>0<=$584>>>0;$591=$585>>>0>$588>>>0;$or$cond2$i=$590|$591;if($or$cond2$i){$tsize$0323944$i=0;break}}$592=_sbrk($ssize$0$i|0)|0;$593=($592|0)==($572|0);$ssize$0$$i=$593?$ssize$0$i:0;if($593){$tbase$255$i=$572;$tsize$254$i=$ssize$0$$i;label=194;break L258}else{$br$0$ph$i=$592;$ssize$1$ph$i=$ssize$0$i;$tsize$0$ph$i=$ssize$0$$i;label=184}}else{$tsize$0323944$i=0}}}}while(0);L280:do{if((label|0)==184){$604=0-$ssize$1$ph$i|0;$605=($br$0$ph$i|0)!=(-1|0);$606=$ssize$1$ph$i>>>0<2147483647;$or$cond5$i=$606&$605;$607=$545>>>0>$ssize$1$ph$i>>>0;$or$cond6$i=$607&$or$cond5$i;do{if($or$cond6$i){$608=HEAP32[96968>>2]|0;$609=$547-$ssize$1$ph$i|0;$610=$609+$608|0;$611=0-$608|0;$612=$610&$611;$613=$612>>>0<2147483647;if($613){$614=_sbrk($612|0)|0;$615=($614|0)==(-1|0);if($615){_sbrk($604|0)|0;$tsize$0323944$i=$tsize$0$ph$i;break L280}else{$616=$612+$ssize$1$ph$i|0;$ssize$2$i=$616;break}}else{$ssize$2$i=$ssize$1$ph$i}}else{$ssize$2$i=$ssize$1$ph$i}}while(0);$617=($br$0$ph$i|0)==(-1|0);if($617){$tsize$0323944$i=$tsize$0$ph$i}else{$tbase$255$i=$br$0$ph$i;$tsize$254$i=$ssize$2$i;label=194;break L258}}}while(0);$618=HEAP32[96932>>2]|0;$619=$618|4;HEAP32[96932>>2]=$619;$tsize$1$i=$tsize$0323944$i;label=191}else{$tsize$1$i=0;label=191}}while(0);if((label|0)==191){$620=$550>>>0<2147483647;if($620){$621=_sbrk($550|0)|0;$622=_sbrk(0)|0;$623=($621|0)!=(-1|0);$624=($622|0)!=(-1|0);$or$cond3$i=$623&$624;$625=$621>>>0<$622>>>0;$or$cond8$i=$625&$or$cond3$i;if($or$cond8$i){$626=$622;$627=$621;$628=$626-$627|0;$629=$nb$0+40|0;$630=$628>>>0>$629>>>0;$$tsize$1$i=$630?$628:$tsize$1$i;if($630){$tbase$255$i=$621;$tsize$254$i=$$tsize$1$i;label=194}}}}if((label|0)==194){$631=HEAP32[96920>>2]|0;$632=$631+$tsize$254$i|0;HEAP32[96920>>2]=$632;$633=HEAP32[96924>>2]|0;$634=$632>>>0>$633>>>0;if($634){HEAP32[96924>>2]=$632}$635=HEAP32[96512>>2]|0;$636=($635|0)==(0|0);L299:do{if($636){$637=HEAP32[96504>>2]|0;$638=($637|0)==(0|0);$639=$tbase$255$i>>>0<$637>>>0;$or$cond9$i=$638|$639;if($or$cond9$i){HEAP32[96504>>2]=$tbase$255$i}HEAP32[96936>>2]=$tbase$255$i;HEAP32[96940>>2]=$tsize$254$i;HEAP32[96948>>2]=0;$640=HEAP32[96960>>2]|0;HEAP32[96524>>2]=$640;HEAP32[96520>>2]=-1;$i$02$i$i=0;while(1){$641=$i$02$i$i<<1;$642=96528+($641<<2)|0;$$sum$i$i=$641+3|0;$643=96528+($$sum$i$i<<2)|0;HEAP32[$643>>2]=$642;$$sum1$i$i=$641+2|0;$644=96528+($$sum1$i$i<<2)|0;HEAP32[$644>>2]=$642;$645=$i$02$i$i+1|0;$exitcond$i$i=($645|0)==32;if($exitcond$i$i){break}else{$i$02$i$i=$645}}$646=$tsize$254$i+-40|0;$647=$tbase$255$i+8|0;$648=$647;$649=$648&7;$650=($649|0)==0;$651=0-$648|0;$652=$651&7;$653=$650?0:$652;$654=$tbase$255$i+$653|0;$655=$646-$653|0;HEAP32[96512>>2]=$654;HEAP32[96500>>2]=$655;$656=$655|1;$$sum$i13$i=$653+4|0;$657=$tbase$255$i+$$sum$i13$i|0;HEAP32[$657>>2]=$656;$$sum2$i$i=$tsize$254$i+-36|0;$658=$tbase$255$i+$$sum2$i$i|0;HEAP32[$658>>2]=40;$659=HEAP32[96976>>2]|0;HEAP32[96516>>2]=$659}else{$sp$084$i=96936;while(1){$660=HEAP32[$sp$084$i>>2]|0;$661=$sp$084$i+4|0;$662=HEAP32[$661>>2]|0;$663=$660+$662|0;$664=($tbase$255$i|0)==($663|0);if($664){$$lcssa222=$660;$$lcssa224=$661;$$lcssa226=$662;$sp$084$i$lcssa=$sp$084$i;label=204;break}$665=$sp$084$i+8|0;$666=HEAP32[$665>>2]|0;$667=($666|0)==(0|0);if($667){break}else{$sp$084$i=$666}}if((label|0)==204){$668=$sp$084$i$lcssa+12|0;$669=HEAP32[$668>>2]|0;$670=$669&8;$671=($670|0)==0;if($671){$672=$635>>>0>=$$lcssa222>>>0;$673=$635>>>0<$tbase$255$i>>>0;$or$cond57$i=$673&$672;if($or$cond57$i){$674=$$lcssa226+$tsize$254$i|0;HEAP32[$$lcssa224>>2]=$674;$675=HEAP32[96500>>2]|0;$676=$675+$tsize$254$i|0;$677=$635+8|0;$678=$677;$679=$678&7;$680=($679|0)==0;$681=0-$678|0;$682=$681&7;$683=$680?0:$682;$684=$635+$683|0;$685=$676-$683|0;HEAP32[96512>>2]=$684;HEAP32[96500>>2]=$685;$686=$685|1;$$sum$i17$i=$683+4|0;$687=$635+$$sum$i17$i|0;HEAP32[$687>>2]=$686;$$sum2$i18$i=$676+4|0;$688=$635+$$sum2$i18$i|0;HEAP32[$688>>2]=40;$689=HEAP32[96976>>2]|0;HEAP32[96516>>2]=$689;break}}}$690=HEAP32[96504>>2]|0;$691=$tbase$255$i>>>0<$690>>>0;if($691){HEAP32[96504>>2]=$tbase$255$i;$755=$tbase$255$i}else{$755=$690}$692=$tbase$255$i+$tsize$254$i|0;$sp$183$i=96936;while(1){$693=HEAP32[$sp$183$i>>2]|0;$694=($693|0)==($692|0);if($694){$$lcssa219=$sp$183$i;$sp$183$i$lcssa=$sp$183$i;label=212;break}$695=$sp$183$i+8|0;$696=HEAP32[$695>>2]|0;$697=($696|0)==(0|0);if($697){$sp$0$i$i$i=96936;break}else{$sp$183$i=$696}}if((label|0)==212){$698=$sp$183$i$lcssa+12|0;$699=HEAP32[$698>>2]|0;$700=$699&8;$701=($700|0)==0;if($701){HEAP32[$$lcssa219>>2]=$tbase$255$i;$702=$sp$183$i$lcssa+4|0;$703=HEAP32[$702>>2]|0;$704=$703+$tsize$254$i|0;HEAP32[$702>>2]=$704;$705=$tbase$255$i+8|0;$706=$705;$707=$706&7;$708=($707|0)==0;$709=0-$706|0;$710=$709&7;$711=$708?0:$710;$712=$tbase$255$i+$711|0;$$sum112$i=$tsize$254$i+8|0;$713=$tbase$255$i+$$sum112$i|0;$714=$713;$715=$714&7;$716=($715|0)==0;$717=0-$714|0;$718=$717&7;$719=$716?0:$718;$$sum113$i=$719+$tsize$254$i|0;$720=$tbase$255$i+$$sum113$i|0;$721=$720;$722=$712;$723=$721-$722|0;$$sum$i19$i=$711+$nb$0|0;$724=$tbase$255$i+$$sum$i19$i|0;$725=$723-$nb$0|0;$726=$nb$0|3;$$sum1$i20$i=$711+4|0;$727=$tbase$255$i+$$sum1$i20$i|0;HEAP32[$727>>2]=$726;$728=($720|0)==($635|0);L324:do{if($728){$729=HEAP32[96500>>2]|0;$730=$729+$725|0;HEAP32[96500>>2]=$730;HEAP32[96512>>2]=$724;$731=$730|1;$$sum42$i$i=$$sum$i19$i+4|0;$732=$tbase$255$i+$$sum42$i$i|0;HEAP32[$732>>2]=$731}else{$733=HEAP32[96508>>2]|0;$734=($720|0)==($733|0);if($734){$735=HEAP32[96496>>2]|0;$736=$735+$725|0;HEAP32[96496>>2]=$736;HEAP32[96508>>2]=$724;$737=$736|1;$$sum40$i$i=$$sum$i19$i+4|0;$738=$tbase$255$i+$$sum40$i$i|0;HEAP32[$738>>2]=$737;$$sum41$i$i=$736+$$sum$i19$i|0;$739=$tbase$255$i+$$sum41$i$i|0;HEAP32[$739>>2]=$736;break}$$sum2$i21$i=$tsize$254$i+4|0;$$sum114$i=$$sum2$i21$i+$719|0;$740=$tbase$255$i+$$sum114$i|0;$741=HEAP32[$740>>2]|0;$742=$741&3;$743=($742|0)==1;if($743){$744=$741&-8;$745=$741>>>3;$746=$741>>>0<256;L331:do{if($746){$$sum3738$i$i=$719|8;$$sum124$i=$$sum3738$i$i+$tsize$254$i|0;$747=$tbase$255$i+$$sum124$i|0;$748=HEAP32[$747>>2]|0;$$sum39$i$i=$tsize$254$i+12|0;$$sum125$i=$$sum39$i$i+$719|0;$749=$tbase$255$i+$$sum125$i|0;$750=HEAP32[$749>>2]|0;$751=$745<<1;$752=96528+($751<<2)|0;$753=($748|0)==($752|0);do{if(!$753){$754=$748>>>0<$755>>>0;if($754){_abort()}$756=$748+12|0;$757=HEAP32[$756>>2]|0;$758=($757|0)==($720|0);if($758){break}_abort()}}while(0);$759=($750|0)==($748|0);if($759){$760=1<<$745;$761=$760^-1;$762=HEAP32[96488>>2]|0;$763=$762&$761;HEAP32[96488>>2]=$763;break}$764=($750|0)==($752|0);do{if($764){$$pre57$i$i=$750+8|0;$$pre$phi58$i$iZ2D=$$pre57$i$i}else{$765=$750>>>0<$755>>>0;if($765){_abort()}$766=$750+8|0;$767=HEAP32[$766>>2]|0;$768=($767|0)==($720|0);if($768){$$pre$phi58$i$iZ2D=$766;break}_abort()}}while(0);$769=$748+12|0;HEAP32[$769>>2]=$750;HEAP32[$$pre$phi58$i$iZ2D>>2]=$748}else{$$sum34$i$i=$719|24;$$sum115$i=$$sum34$i$i+$tsize$254$i|0;$770=$tbase$255$i+$$sum115$i|0;$771=HEAP32[$770>>2]|0;$$sum5$i$i=$tsize$254$i+12|0;$$sum116$i=$$sum5$i$i+$719|0;$772=$tbase$255$i+$$sum116$i|0;$773=HEAP32[$772>>2]|0;$774=($773|0)==($720|0);do{if($774){$$sum67$i$i=$719|16;$$sum122$i=$$sum2$i21$i+$$sum67$i$i|0;$784=$tbase$255$i+$$sum122$i|0;$785=HEAP32[$784>>2]|0;$786=($785|0)==(0|0);if($786){$$sum123$i=$$sum67$i$i+$tsize$254$i|0;$787=$tbase$255$i+$$sum123$i|0;$788=HEAP32[$787>>2]|0;$789=($788|0)==(0|0);if($789){$R$1$i$i=0;break}else{$R$0$i$i=$788;$RP$0$i$i=$787}}else{$R$0$i$i=$785;$RP$0$i$i=$784}while(1){$790=$R$0$i$i+20|0;$791=HEAP32[$790>>2]|0;$792=($791|0)==(0|0);if(!$792){$R$0$i$i=$791;$RP$0$i$i=$790;continue}$793=$R$0$i$i+16|0;$794=HEAP32[$793>>2]|0;$795=($794|0)==(0|0);if($795){$R$0$i$i$lcssa=$R$0$i$i;$RP$0$i$i$lcssa=$RP$0$i$i;break}else{$R$0$i$i=$794;$RP$0$i$i=$793}}$796=$RP$0$i$i$lcssa>>>0<$755>>>0;if($796){_abort()}else{HEAP32[$RP$0$i$i$lcssa>>2]=0;$R$1$i$i=$R$0$i$i$lcssa;break}}else{$$sum3536$i$i=$719|8;$$sum117$i=$$sum3536$i$i+$tsize$254$i|0;$775=$tbase$255$i+$$sum117$i|0;$776=HEAP32[$775>>2]|0;$777=$776>>>0<$755>>>0;if($777){_abort()}$778=$776+12|0;$779=HEAP32[$778>>2]|0;$780=($779|0)==($720|0);if(!$780){_abort()}$781=$773+8|0;$782=HEAP32[$781>>2]|0;$783=($782|0)==($720|0);if($783){HEAP32[$778>>2]=$773;HEAP32[$781>>2]=$776;$R$1$i$i=$773;break}else{_abort()}}}while(0);$797=($771|0)==(0|0);if($797){break}$$sum30$i$i=$tsize$254$i+28|0;$$sum118$i=$$sum30$i$i+$719|0;$798=$tbase$255$i+$$sum118$i|0;$799=HEAP32[$798>>2]|0;$800=96792+($799<<2)|0;$801=HEAP32[$800>>2]|0;$802=($720|0)==($801|0);do{if($802){HEAP32[$800>>2]=$R$1$i$i;$cond$i$i=($R$1$i$i|0)==(0|0);if(!$cond$i$i){break}$803=1<<$799;$804=$803^-1;$805=HEAP32[96492>>2]|0;$806=$805&$804;HEAP32[96492>>2]=$806;break L331}else{$807=HEAP32[96504>>2]|0;$808=$771>>>0<$807>>>0;if($808){_abort()}$809=$771+16|0;$810=HEAP32[$809>>2]|0;$811=($810|0)==($720|0);if($811){HEAP32[$809>>2]=$R$1$i$i}else{$812=$771+20|0;HEAP32[$812>>2]=$R$1$i$i}$813=($R$1$i$i|0)==(0|0);if($813){break L331}}}while(0);$814=HEAP32[96504>>2]|0;$815=$R$1$i$i>>>0<$814>>>0;if($815){_abort()}$816=$R$1$i$i+24|0;HEAP32[$816>>2]=$771;$$sum3132$i$i=$719|16;$$sum119$i=$$sum3132$i$i+$tsize$254$i|0;$817=$tbase$255$i+$$sum119$i|0;$818=HEAP32[$817>>2]|0;$819=($818|0)==(0|0);do{if(!$819){$820=$818>>>0<$814>>>0;if($820){_abort()}else{$821=$R$1$i$i+16|0;HEAP32[$821>>2]=$818;$822=$818+24|0;HEAP32[$822>>2]=$R$1$i$i;break}}}while(0);$$sum120$i=$$sum2$i21$i+$$sum3132$i$i|0;$823=$tbase$255$i+$$sum120$i|0;$824=HEAP32[$823>>2]|0;$825=($824|0)==(0|0);if($825){break}$826=HEAP32[96504>>2]|0;$827=$824>>>0<$826>>>0;if($827){_abort()}else{$828=$R$1$i$i+20|0;HEAP32[$828>>2]=$824;$829=$824+24|0;HEAP32[$829>>2]=$R$1$i$i;break}}}while(0);$$sum9$i$i=$744|$719;$$sum121$i=$$sum9$i$i+$tsize$254$i|0;$830=$tbase$255$i+$$sum121$i|0;$831=$744+$725|0;$oldfirst$0$i$i=$830;$qsize$0$i$i=$831}else{$oldfirst$0$i$i=$720;$qsize$0$i$i=$725}$832=$oldfirst$0$i$i+4|0;$833=HEAP32[$832>>2]|0;$834=$833&-2;HEAP32[$832>>2]=$834;$835=$qsize$0$i$i|1;$$sum10$i$i=$$sum$i19$i+4|0;$836=$tbase$255$i+$$sum10$i$i|0;HEAP32[$836>>2]=$835;$$sum11$i$i=$qsize$0$i$i+$$sum$i19$i|0;$837=$tbase$255$i+$$sum11$i$i|0;HEAP32[$837>>2]=$qsize$0$i$i;$838=$qsize$0$i$i>>>3;$839=$qsize$0$i$i>>>0<256;if($839){$840=$838<<1;$841=96528+($840<<2)|0;$842=HEAP32[96488>>2]|0;$843=1<<$838;$844=$842&$843;$845=($844|0)==0;do{if($845){$846=$842|$843;HEAP32[96488>>2]=$846;$$pre$i22$i=$840+2|0;$$pre56$i$i=96528+($$pre$i22$i<<2)|0;$$pre$phi$i23$iZ2D=$$pre56$i$i;$F4$0$i$i=$841}else{$$sum29$i$i=$840+2|0;$847=96528+($$sum29$i$i<<2)|0;$848=HEAP32[$847>>2]|0;$849=HEAP32[96504>>2]|0;$850=$848>>>0<$849>>>0;if(!$850){$$pre$phi$i23$iZ2D=$847;$F4$0$i$i=$848;break}_abort()}}while(0);HEAP32[$$pre$phi$i23$iZ2D>>2]=$724;$851=$F4$0$i$i+12|0;HEAP32[$851>>2]=$724;$$sum27$i$i=$$sum$i19$i+8|0;$852=$tbase$255$i+$$sum27$i$i|0;HEAP32[$852>>2]=$F4$0$i$i;$$sum28$i$i=$$sum$i19$i+12|0;$853=$tbase$255$i+$$sum28$i$i|0;HEAP32[$853>>2]=$841;break}$854=$qsize$0$i$i>>>8;$855=($854|0)==0;do{if($855){$I7$0$i$i=0}else{$856=$qsize$0$i$i>>>0>16777215;if($856){$I7$0$i$i=31;break}$857=$854+1048320|0;$858=$857>>>16;$859=$858&8;$860=$854<<$859;$861=$860+520192|0;$862=$861>>>16;$863=$862&4;$864=$863|$859;$865=$860<<$863;$866=$865+245760|0;$867=$866>>>16;$868=$867&2;$869=$864|$868;$870=14-$869|0;$871=$865<<$868;$872=$871>>>15;$873=$870+$872|0;$874=$873<<1;$875=$873+7|0;$876=$qsize$0$i$i>>>$875;$877=$876&1;$878=$877|$874;$I7$0$i$i=$878}}while(0);$879=96792+($I7$0$i$i<<2)|0;$$sum12$i$i=$$sum$i19$i+28|0;$880=$tbase$255$i+$$sum12$i$i|0;HEAP32[$880>>2]=$I7$0$i$i;$$sum13$i$i=$$sum$i19$i+16|0;$881=$tbase$255$i+$$sum13$i$i|0;$$sum14$i$i=$$sum$i19$i+20|0;$882=$tbase$255$i+$$sum14$i$i|0;HEAP32[$882>>2]=0;HEAP32[$881>>2]=0;$883=HEAP32[96492>>2]|0;$884=1<<$I7$0$i$i;$885=$883&$884;$886=($885|0)==0;if($886){$887=$883|$884;HEAP32[96492>>2]=$887;HEAP32[$879>>2]=$724;$$sum15$i$i=$$sum$i19$i+24|0;$888=$tbase$255$i+$$sum15$i$i|0;HEAP32[$888>>2]=$879;$$sum16$i$i=$$sum$i19$i+12|0;$889=$tbase$255$i+$$sum16$i$i|0;HEAP32[$889>>2]=$724;$$sum17$i$i=$$sum$i19$i+8|0;$890=$tbase$255$i+$$sum17$i$i|0;HEAP32[$890>>2]=$724;break}$891=HEAP32[$879>>2]|0;$892=$891+4|0;$893=HEAP32[$892>>2]|0;$894=$893&-8;$895=($894|0)==($qsize$0$i$i|0);L417:do{if($895){$T$0$lcssa$i25$i=$891}else{$896=($I7$0$i$i|0)==31;$897=$I7$0$i$i>>>1;$898=25-$897|0;$899=$896?0:$898;$900=$qsize$0$i$i<<$899;$K8$051$i$i=$900;$T$050$i$i=$891;while(1){$907=$K8$051$i$i>>>31;$908=($T$050$i$i+16|0)+($907<<2)|0;$903=HEAP32[$908>>2]|0;$909=($903|0)==(0|0);if($909){$$lcssa=$908;$T$050$i$i$lcssa=$T$050$i$i;break}$901=$K8$051$i$i<<1;$902=$903+4|0;$904=HEAP32[$902>>2]|0;$905=$904&-8;$906=($905|0)==($qsize$0$i$i|0);if($906){$T$0$lcssa$i25$i=$903;break L417}else{$K8$051$i$i=$901;$T$050$i$i=$903}}$910=HEAP32[96504>>2]|0;$911=$$lcssa>>>0<$910>>>0;if($911){_abort()}else{HEAP32[$$lcssa>>2]=$724;$$sum23$i$i=$$sum$i19$i+24|0;$912=$tbase$255$i+$$sum23$i$i|0;HEAP32[$912>>2]=$T$050$i$i$lcssa;$$sum24$i$i=$$sum$i19$i+12|0;$913=$tbase$255$i+$$sum24$i$i|0;HEAP32[$913>>2]=$724;$$sum25$i$i=$$sum$i19$i+8|0;$914=$tbase$255$i+$$sum25$i$i|0;HEAP32[$914>>2]=$724;break L324}}}while(0);$915=$T$0$lcssa$i25$i+8|0;$916=HEAP32[$915>>2]|0;$917=HEAP32[96504>>2]|0;$918=$916>>>0>=$917>>>0;$not$$i26$i=$T$0$lcssa$i25$i>>>0>=$917>>>0;$919=$918&$not$$i26$i;if($919){$920=$916+12|0;HEAP32[$920>>2]=$724;HEAP32[$915>>2]=$724;$$sum20$i$i=$$sum$i19$i+8|0;$921=$tbase$255$i+$$sum20$i$i|0;HEAP32[$921>>2]=$916;$$sum21$i$i=$$sum$i19$i+12|0;$922=$tbase$255$i+$$sum21$i$i|0;HEAP32[$922>>2]=$T$0$lcssa$i25$i;$$sum22$i$i=$$sum$i19$i+24|0;$923=$tbase$255$i+$$sum22$i$i|0;HEAP32[$923>>2]=0;break}else{_abort()}}}while(0);$$sum1819$i$i=$711|8;$924=$tbase$255$i+$$sum1819$i$i|0;$mem$0=$924;return $mem$0|0}else{$sp$0$i$i$i=96936}}while(1){$925=HEAP32[$sp$0$i$i$i>>2]|0;$926=$925>>>0>$635>>>0;if(!$926){$927=$sp$0$i$i$i+4|0;$928=HEAP32[$927>>2]|0;$929=$925+$928|0;$930=$929>>>0>$635>>>0;if($930){$$lcssa215=$925;$$lcssa216=$928;$$lcssa217=$929;break}}$931=$sp$0$i$i$i+8|0;$932=HEAP32[$931>>2]|0;$sp$0$i$i$i=$932}$$sum$i14$i=$$lcssa216+-47|0;$$sum1$i15$i=$$lcssa216+-39|0;$933=$$lcssa215+$$sum1$i15$i|0;$934=$933;$935=$934&7;$936=($935|0)==0;$937=0-$934|0;$938=$937&7;$939=$936?0:$938;$$sum2$i16$i=$$sum$i14$i+$939|0;$940=$$lcssa215+$$sum2$i16$i|0;$941=$635+16|0;$942=$940>>>0<$941>>>0;$943=$942?$635:$940;$944=$943+8|0;$945=$tsize$254$i+-40|0;$946=$tbase$255$i+8|0;$947=$946;$948=$947&7;$949=($948|0)==0;$950=0-$947|0;$951=$950&7;$952=$949?0:$951;$953=$tbase$255$i+$952|0;$954=$945-$952|0;HEAP32[96512>>2]=$953;HEAP32[96500>>2]=$954;$955=$954|1;$$sum$i$i$i=$952+4|0;$956=$tbase$255$i+$$sum$i$i$i|0;HEAP32[$956>>2]=$955;$$sum2$i$i$i=$tsize$254$i+-36|0;$957=$tbase$255$i+$$sum2$i$i$i|0;HEAP32[$957>>2]=40;$958=HEAP32[96976>>2]|0;HEAP32[96516>>2]=$958;$959=$943+4|0;HEAP32[$959>>2]=27;HEAP32[$944>>2]=HEAP32[96936>>2]|0;HEAP32[$944+4>>2]=HEAP32[96936+4>>2]|0;HEAP32[$944+8>>2]=HEAP32[96936+8>>2]|0;HEAP32[$944+12>>2]=HEAP32[96936+12>>2]|0;HEAP32[96936>>2]=$tbase$255$i;HEAP32[96940>>2]=$tsize$254$i;HEAP32[96948>>2]=0;HEAP32[96944>>2]=$944;$960=$943+28|0;HEAP32[$960>>2]=7;$961=$943+32|0;$962=$961>>>0<$$lcssa217>>>0;if($962){$964=$960;while(1){$963=$964+4|0;HEAP32[$963>>2]=7;$965=$964+8|0;$966=$965>>>0<$$lcssa217>>>0;if($966){$964=$963}else{break}}}$967=($943|0)==($635|0);if(!$967){$968=$943;$969=$635;$970=$968-$969|0;$971=HEAP32[$959>>2]|0;$972=$971&-2;HEAP32[$959>>2]=$972;$973=$970|1;$974=$635+4|0;HEAP32[$974>>2]=$973;HEAP32[$943>>2]=$970;$975=$970>>>3;$976=$970>>>0<256;if($976){$977=$975<<1;$978=96528+($977<<2)|0;$979=HEAP32[96488>>2]|0;$980=1<<$975;$981=$979&$980;$982=($981|0)==0;if($982){$983=$979|$980;HEAP32[96488>>2]=$983;$$pre$i$i=$977+2|0;$$pre14$i$i=96528+($$pre$i$i<<2)|0;$$pre$phi$i$iZ2D=$$pre14$i$i;$F$0$i$i=$978}else{$$sum4$i$i=$977+2|0;$984=96528+($$sum4$i$i<<2)|0;$985=HEAP32[$984>>2]|0;$986=HEAP32[96504>>2]|0;$987=$985>>>0<$986>>>0;if($987){_abort()}else{$$pre$phi$i$iZ2D=$984;$F$0$i$i=$985}}HEAP32[$$pre$phi$i$iZ2D>>2]=$635;$988=$F$0$i$i+12|0;HEAP32[$988>>2]=$635;$989=$635+8|0;HEAP32[$989>>2]=$F$0$i$i;$990=$635+12|0;HEAP32[$990>>2]=$978;break}$991=$970>>>8;$992=($991|0)==0;if($992){$I1$0$i$i=0}else{$993=$970>>>0>16777215;if($993){$I1$0$i$i=31}else{$994=$991+1048320|0;$995=$994>>>16;$996=$995&8;$997=$991<<$996;$998=$997+520192|0;$999=$998>>>16;$1000=$999&4;$1001=$1000|$996;$1002=$997<<$1000;$1003=$1002+245760|0;$1004=$1003>>>16;$1005=$1004&2;$1006=$1001|$1005;$1007=14-$1006|0;$1008=$1002<<$1005;$1009=$1008>>>15;$1010=$1007+$1009|0;$1011=$1010<<1;$1012=$1010+7|0;$1013=$970>>>$1012;$1014=$1013&1;$1015=$1014|$1011;$I1$0$i$i=$1015}}$1016=96792+($I1$0$i$i<<2)|0;$1017=$635+28|0;HEAP32[$1017>>2]=$I1$0$i$i;$1018=$635+20|0;HEAP32[$1018>>2]=0;HEAP32[$941>>2]=0;$1019=HEAP32[96492>>2]|0;$1020=1<<$I1$0$i$i;$1021=$1019&$1020;$1022=($1021|0)==0;if($1022){$1023=$1019|$1020;HEAP32[96492>>2]=$1023;HEAP32[$1016>>2]=$635;$1024=$635+24|0;HEAP32[$1024>>2]=$1016;$1025=$635+12|0;HEAP32[$1025>>2]=$635;$1026=$635+8|0;HEAP32[$1026>>2]=$635;break}$1027=HEAP32[$1016>>2]|0;$1028=$1027+4|0;$1029=HEAP32[$1028>>2]|0;$1030=$1029&-8;$1031=($1030|0)==($970|0);L459:do{if($1031){$T$0$lcssa$i$i=$1027}else{$1032=($I1$0$i$i|0)==31;$1033=$I1$0$i$i>>>1;$1034=25-$1033|0;$1035=$1032?0:$1034;$1036=$970<<$1035;$K2$07$i$i=$1036;$T$06$i$i=$1027;while(1){$1043=$K2$07$i$i>>>31;$1044=($T$06$i$i+16|0)+($1043<<2)|0;$1039=HEAP32[$1044>>2]|0;$1045=($1039|0)==(0|0);if($1045){$$lcssa211=$1044;$T$06$i$i$lcssa=$T$06$i$i;break}$1037=$K2$07$i$i<<1;$1038=$1039+4|0;$1040=HEAP32[$1038>>2]|0;$1041=$1040&-8;$1042=($1041|0)==($970|0);if($1042){$T$0$lcssa$i$i=$1039;break L459}else{$K2$07$i$i=$1037;$T$06$i$i=$1039}}$1046=HEAP32[96504>>2]|0;$1047=$$lcssa211>>>0<$1046>>>0;if($1047){_abort()}else{HEAP32[$$lcssa211>>2]=$635;$1048=$635+24|0;HEAP32[$1048>>2]=$T$06$i$i$lcssa;$1049=$635+12|0;HEAP32[$1049>>2]=$635;$1050=$635+8|0;HEAP32[$1050>>2]=$635;break L299}}}while(0);$1051=$T$0$lcssa$i$i+8|0;$1052=HEAP32[$1051>>2]|0;$1053=HEAP32[96504>>2]|0;$1054=$1052>>>0>=$1053>>>0;$not$$i$i=$T$0$lcssa$i$i>>>0>=$1053>>>0;$1055=$1054&$not$$i$i;if($1055){$1056=$1052+12|0;HEAP32[$1056>>2]=$635;HEAP32[$1051>>2]=$635;$1057=$635+8|0;HEAP32[$1057>>2]=$1052;$1058=$635+12|0;HEAP32[$1058>>2]=$T$0$lcssa$i$i;$1059=$635+24|0;HEAP32[$1059>>2]=0;break}else{_abort()}}}}while(0);$1060=HEAP32[96500>>2]|0;$1061=$1060>>>0>$nb$0>>>0;if($1061){$1062=$1060-$nb$0|0;HEAP32[96500>>2]=$1062;$1063=HEAP32[96512>>2]|0;$1064=$1063+$nb$0|0;HEAP32[96512>>2]=$1064;$1065=$1062|1;$$sum$i32=$nb$0+4|0;$1066=$1063+$$sum$i32|0;HEAP32[$1066>>2]=$1065;$1067=$nb$0|3;$1068=$1063+4|0;HEAP32[$1068>>2]=$1067;$1069=$1063+8|0;$mem$0=$1069;return $mem$0|0}}$1070=___errno_location()|0;HEAP32[$1070>>2]=12;$mem$0=0;return $mem$0|0}function _free($mem){$mem=$mem|0;var $$lcssa=0,$$pre=0,$$pre$phi59Z2D=0,$$pre$phi61Z2D=0,$$pre$phiZ2D=0,$$pre57=0,$$pre58=0,$$pre60=0,$$sum=0,$$sum11=0,$$sum12=0,$$sum13=0,$$sum14=0,$$sum1718=0,$$sum19=0,$$sum2=0,$$sum20=0,$$sum22=0,$$sum23=0,$$sum24=0;var $$sum25=0,$$sum26=0,$$sum27=0,$$sum28=0,$$sum29=0,$$sum3=0,$$sum30=0,$$sum31=0,$$sum5=0,$$sum67=0,$$sum8=0,$$sum9=0,$0=0,$1=0,$10=0,$100=0,$101=0,$102=0,$103=0,$104=0;var $105=0,$106=0,$107=0,$108=0,$109=0,$11=0,$110=0,$111=0,$112=0,$113=0,$114=0,$115=0,$116=0,$117=0,$118=0,$119=0,$12=0,$120=0,$121=0,$122=0;var $123=0,$124=0,$125=0,$126=0,$127=0,$128=0,$129=0,$13=0,$130=0,$131=0,$132=0,$133=0,$134=0,$135=0,$136=0,$137=0,$138=0,$139=0,$14=0,$140=0;var $141=0,$142=0,$143=0,$144=0,$145=0,$146=0,$147=0,$148=0,$149=0,$15=0,$150=0,$151=0,$152=0,$153=0,$154=0,$155=0,$156=0,$157=0,$158=0,$159=0;var $16=0,$160=0,$161=0,$162=0,$163=0,$164=0,$165=0,$166=0,$167=0,$168=0,$169=0,$17=0,$170=0,$171=0,$172=0,$173=0,$174=0,$175=0,$176=0,$177=0;var $178=0,$179=0,$18=0,$180=0,$181=0,$182=0,$183=0,$184=0,$185=0,$186=0,$187=0,$188=0,$189=0,$19=0,$190=0,$191=0,$192=0,$193=0,$194=0,$195=0;var $196=0,$197=0,$198=0,$199=0,$2=0,$20=0,$200=0,$201=0,$202=0,$203=0,$204=0,$205=0,$206=0,$207=0,$208=0,$209=0,$21=0,$210=0,$211=0,$212=0;var $213=0,$214=0,$215=0,$216=0,$217=0,$218=0,$219=0,$22=0,$220=0,$221=0,$222=0,$223=0,$224=0,$225=0,$226=0,$227=0,$228=0,$229=0,$23=0,$230=0;var $231=0,$232=0,$233=0,$234=0,$235=0,$236=0,$237=0,$238=0,$239=0,$24=0,$240=0,$241=0,$242=0,$243=0,$244=0,$245=0,$246=0,$247=0,$248=0,$249=0;var $25=0,$250=0,$251=0,$252=0,$253=0,$254=0,$255=0,$256=0,$257=0,$258=0,$259=0,$26=0,$260=0,$261=0,$262=0,$263=0,$264=0,$265=0,$266=0,$267=0;var $268=0,$269=0,$27=0,$270=0,$271=0,$272=0,$273=0,$274=0,$275=0,$276=0,$277=0,$278=0,$279=0,$28=0,$280=0,$281=0,$282=0,$283=0,$284=0,$285=0;var $286=0,$287=0,$288=0,$289=0,$29=0,$290=0,$291=0,$292=0,$293=0,$294=0,$295=0,$296=0,$297=0,$298=0,$299=0,$3=0,$30=0,$300=0,$301=0,$302=0;var $303=0,$304=0,$305=0,$306=0,$307=0,$308=0,$309=0,$31=0,$310=0,$311=0,$312=0,$313=0,$314=0,$315=0,$316=0,$317=0,$318=0,$319=0,$32=0,$320=0;var $321=0,$33=0,$34=0,$35=0,$36=0,$37=0,$38=0,$39=0,$4=0,$40=0,$41=0,$42=0,$43=0,$44=0,$45=0,$46=0,$47=0,$48=0,$49=0,$5=0;var $50=0,$51=0,$52=0,$53=0,$54=0,$55=0,$56=0,$57=0,$58=0,$59=0,$6=0,$60=0,$61=0,$62=0,$63=0,$64=0,$65=0,$66=0,$67=0,$68=0;var $69=0,$7=0,$70=0,$71=0,$72=0,$73=0,$74=0,$75=0,$76=0,$77=0,$78=0,$79=0,$8=0,$80=0,$81=0,$82=0,$83=0,$84=0,$85=0,$86=0;var $87=0,$88=0,$89=0,$9=0,$90=0,$91=0,$92=0,$93=0,$94=0,$95=0,$96=0,$97=0,$98=0,$99=0,$F16$0=0,$I18$0=0,$K19$052=0,$R$0=0,$R$0$lcssa=0,$R$1=0;var $R7$0=0,$R7$0$lcssa=0,$R7$1=0,$RP$0=0,$RP$0$lcssa=0,$RP9$0=0,$RP9$0$lcssa=0,$T$0$lcssa=0,$T$051=0,$T$051$lcssa=0,$cond=0,$cond47=0,$not$=0,$p$0=0,$psize$0=0,$psize$1=0,$sp$0$i=0,$sp$0$in$i=0,label=0,sp=0;sp=STACKTOP;$0=($mem|0)==(0|0);if($0){return}$1=$mem+-8|0;$2=HEAP32[96504>>2]|0;$3=$1>>>0<$2>>>0;if($3){_abort()}$4=$mem+-4|0;$5=HEAP32[$4>>2]|0;$6=$5&3;$7=($6|0)==1;if($7){_abort()}$8=$5&-8;$$sum=$8+-8|0;$9=$mem+$$sum|0;$10=$5&1;$11=($10|0)==0;do{if($11){$12=HEAP32[$1>>2]|0;$13=($6|0)==0;if($13){return}$$sum2=-8-$12|0;$14=$mem+$$sum2|0;$15=$12+$8|0;$16=$14>>>0<$2>>>0;if($16){_abort()}$17=HEAP32[96508>>2]|0;$18=($14|0)==($17|0);if($18){$$sum3=$8+-4|0;$103=$mem+$$sum3|0;$104=HEAP32[$103>>2]|0;$105=$104&3;$106=($105|0)==3;if(!$106){$p$0=$14;$psize$0=$15;break}HEAP32[96496>>2]=$15;$107=$104&-2;HEAP32[$103>>2]=$107;$108=$15|1;$$sum20=$$sum2+4|0;$109=$mem+$$sum20|0;HEAP32[$109>>2]=$108;HEAP32[$9>>2]=$15;return}$19=$12>>>3;$20=$12>>>0<256;if($20){$$sum30=$$sum2+8|0;$21=$mem+$$sum30|0;$22=HEAP32[$21>>2]|0;$$sum31=$$sum2+12|0;$23=$mem+$$sum31|0;$24=HEAP32[$23>>2]|0;$25=$19<<1;$26=96528+($25<<2)|0;$27=($22|0)==($26|0);if(!$27){$28=$22>>>0<$2>>>0;if($28){_abort()}$29=$22+12|0;$30=HEAP32[$29>>2]|0;$31=($30|0)==($14|0);if(!$31){_abort()}}$32=($24|0)==($22|0);if($32){$33=1<<$19;$34=$33^-1;$35=HEAP32[96488>>2]|0;$36=$35&$34;HEAP32[96488>>2]=$36;$p$0=$14;$psize$0=$15;break}$37=($24|0)==($26|0);if($37){$$pre60=$24+8|0;$$pre$phi61Z2D=$$pre60}else{$38=$24>>>0<$2>>>0;if($38){_abort()}$39=$24+8|0;$40=HEAP32[$39>>2]|0;$41=($40|0)==($14|0);if($41){$$pre$phi61Z2D=$39}else{_abort()}}$42=$22+12|0;HEAP32[$42>>2]=$24;HEAP32[$$pre$phi61Z2D>>2]=$22;$p$0=$14;$psize$0=$15;break}$$sum22=$$sum2+24|0;$43=$mem+$$sum22|0;$44=HEAP32[$43>>2]|0;$$sum23=$$sum2+12|0;$45=$mem+$$sum23|0;$46=HEAP32[$45>>2]|0;$47=($46|0)==($14|0);do{if($47){$$sum25=$$sum2+20|0;$57=$mem+$$sum25|0;$58=HEAP32[$57>>2]|0;$59=($58|0)==(0|0);if($59){$$sum24=$$sum2+16|0;$60=$mem+$$sum24|0;$61=HEAP32[$60>>2]|0;$62=($61|0)==(0|0);if($62){$R$1=0;break}else{$R$0=$61;$RP$0=$60}}else{$R$0=$58;$RP$0=$57}while(1){$63=$R$0+20|0;$64=HEAP32[$63>>2]|0;$65=($64|0)==(0|0);if(!$65){$R$0=$64;$RP$0=$63;continue}$66=$R$0+16|0;$67=HEAP32[$66>>2]|0;$68=($67|0)==(0|0);if($68){$R$0$lcssa=$R$0;$RP$0$lcssa=$RP$0;break}else{$R$0=$67;$RP$0=$66}}$69=$RP$0$lcssa>>>0<$2>>>0;if($69){_abort()}else{HEAP32[$RP$0$lcssa>>2]=0;$R$1=$R$0$lcssa;break}}else{$$sum29=$$sum2+8|0;$48=$mem+$$sum29|0;$49=HEAP32[$48>>2]|0;$50=$49>>>0<$2>>>0;if($50){_abort()}$51=$49+12|0;$52=HEAP32[$51>>2]|0;$53=($52|0)==($14|0);if(!$53){_abort()}$54=$46+8|0;$55=HEAP32[$54>>2]|0;$56=($55|0)==($14|0);if($56){HEAP32[$51>>2]=$46;HEAP32[$54>>2]=$49;$R$1=$46;break}else{_abort()}}}while(0);$70=($44|0)==(0|0);if($70){$p$0=$14;$psize$0=$15}else{$$sum26=$$sum2+28|0;$71=$mem+$$sum26|0;$72=HEAP32[$71>>2]|0;$73=96792+($72<<2)|0;$74=HEAP32[$73>>2]|0;$75=($14|0)==($74|0);if($75){HEAP32[$73>>2]=$R$1;$cond=($R$1|0)==(0|0);if($cond){$76=1<<$72;$77=$76^-1;$78=HEAP32[96492>>2]|0;$79=$78&$77;HEAP32[96492>>2]=$79;$p$0=$14;$psize$0=$15;break}}else{$80=HEAP32[96504>>2]|0;$81=$44>>>0<$80>>>0;if($81){_abort()}$82=$44+16|0;$83=HEAP32[$82>>2]|0;$84=($83|0)==($14|0);if($84){HEAP32[$82>>2]=$R$1}else{$85=$44+20|0;HEAP32[$85>>2]=$R$1}$86=($R$1|0)==(0|0);if($86){$p$0=$14;$psize$0=$15;break}}$87=HEAP32[96504>>2]|0;$88=$R$1>>>0<$87>>>0;if($88){_abort()}$89=$R$1+24|0;HEAP32[$89>>2]=$44;$$sum27=$$sum2+16|0;$90=$mem+$$sum27|0;$91=HEAP32[$90>>2]|0;$92=($91|0)==(0|0);do{if(!$92){$93=$91>>>0<$87>>>0;if($93){_abort()}else{$94=$R$1+16|0;HEAP32[$94>>2]=$91;$95=$91+24|0;HEAP32[$95>>2]=$R$1;break}}}while(0);$$sum28=$$sum2+20|0;$96=$mem+$$sum28|0;$97=HEAP32[$96>>2]|0;$98=($97|0)==(0|0);if($98){$p$0=$14;$psize$0=$15}else{$99=HEAP32[96504>>2]|0;$100=$97>>>0<$99>>>0;if($100){_abort()}else{$101=$R$1+20|0;HEAP32[$101>>2]=$97;$102=$97+24|0;HEAP32[$102>>2]=$R$1;$p$0=$14;$psize$0=$15;break}}}}else{$p$0=$1;$psize$0=$8}}while(0);$110=$p$0>>>0<$9>>>0;if(!$110){_abort()}$$sum19=$8+-4|0;$111=$mem+$$sum19|0;$112=HEAP32[$111>>2]|0;$113=$112&1;$114=($113|0)==0;if($114){_abort()}$115=$112&2;$116=($115|0)==0;if($116){$117=HEAP32[96512>>2]|0;$118=($9|0)==($117|0);if($118){$119=HEAP32[96500>>2]|0;$120=$119+$psize$0|0;HEAP32[96500>>2]=$120;HEAP32[96512>>2]=$p$0;$121=$120|1;$122=$p$0+4|0;HEAP32[$122>>2]=$121;$123=HEAP32[96508>>2]|0;$124=($p$0|0)==($123|0);if(!$124){return}HEAP32[96508>>2]=0;HEAP32[96496>>2]=0;return}$125=HEAP32[96508>>2]|0;$126=($9|0)==($125|0);if($126){$127=HEAP32[96496>>2]|0;$128=$127+$psize$0|0;HEAP32[96496>>2]=$128;HEAP32[96508>>2]=$p$0;$129=$128|1;$130=$p$0+4|0;HEAP32[$130>>2]=$129;$131=$p$0+$128|0;HEAP32[$131>>2]=$128;return}$132=$112&-8;$133=$132+$psize$0|0;$134=$112>>>3;$135=$112>>>0<256;do{if($135){$136=$mem+$8|0;$137=HEAP32[$136>>2]|0;$$sum1718=$8|4;$138=$mem+$$sum1718|0;$139=HEAP32[$138>>2]|0;$140=$134<<1;$141=96528+($140<<2)|0;$142=($137|0)==($141|0);if(!$142){$143=HEAP32[96504>>2]|0;$144=$137>>>0<$143>>>0;if($144){_abort()}$145=$137+12|0;$146=HEAP32[$145>>2]|0;$147=($146|0)==($9|0);if(!$147){_abort()}}$148=($139|0)==($137|0);if($148){$149=1<<$134;$150=$149^-1;$151=HEAP32[96488>>2]|0;$152=$151&$150;HEAP32[96488>>2]=$152;break}$153=($139|0)==($141|0);if($153){$$pre58=$139+8|0;$$pre$phi59Z2D=$$pre58}else{$154=HEAP32[96504>>2]|0;$155=$139>>>0<$154>>>0;if($155){_abort()}$156=$139+8|0;$157=HEAP32[$156>>2]|0;$158=($157|0)==($9|0);if($158){$$pre$phi59Z2D=$156}else{_abort()}}$159=$137+12|0;HEAP32[$159>>2]=$139;HEAP32[$$pre$phi59Z2D>>2]=$137}else{$$sum5=$8+16|0;$160=$mem+$$sum5|0;$161=HEAP32[$160>>2]|0;$$sum67=$8|4;$162=$mem+$$sum67|0;$163=HEAP32[$162>>2]|0;$164=($163|0)==($9|0);do{if($164){$$sum9=$8+12|0;$175=$mem+$$sum9|0;$176=HEAP32[$175>>2]|0;$177=($176|0)==(0|0);if($177){$$sum8=$8+8|0;$178=$mem+$$sum8|0;$179=HEAP32[$178>>2]|0;$180=($179|0)==(0|0);if($180){$R7$1=0;break}else{$R7$0=$179;$RP9$0=$178}}else{$R7$0=$176;$RP9$0=$175}while(1){$181=$R7$0+20|0;$182=HEAP32[$181>>2]|0;$183=($182|0)==(0|0);if(!$183){$R7$0=$182;$RP9$0=$181;continue}$184=$R7$0+16|0;$185=HEAP32[$184>>2]|0;$186=($185|0)==(0|0);if($186){$R7$0$lcssa=$R7$0;$RP9$0$lcssa=$RP9$0;break}else{$R7$0=$185;$RP9$0=$184}}$187=HEAP32[96504>>2]|0;$188=$RP9$0$lcssa>>>0<$187>>>0;if($188){_abort()}else{HEAP32[$RP9$0$lcssa>>2]=0;$R7$1=$R7$0$lcssa;break}}else{$165=$mem+$8|0;$166=HEAP32[$165>>2]|0;$167=HEAP32[96504>>2]|0;$168=$166>>>0<$167>>>0;if($168){_abort()}$169=$166+12|0;$170=HEAP32[$169>>2]|0;$171=($170|0)==($9|0);if(!$171){_abort()}$172=$163+8|0;$173=HEAP32[$172>>2]|0;$174=($173|0)==($9|0);if($174){HEAP32[$169>>2]=$163;HEAP32[$172>>2]=$166;$R7$1=$163;break}else{_abort()}}}while(0);$189=($161|0)==(0|0);if(!$189){$$sum12=$8+20|0;$190=$mem+$$sum12|0;$191=HEAP32[$190>>2]|0;$192=96792+($191<<2)|0;$193=HEAP32[$192>>2]|0;$194=($9|0)==($193|0);if($194){HEAP32[$192>>2]=$R7$1;$cond47=($R7$1|0)==(0|0);if($cond47){$195=1<<$191;$196=$195^-1;$197=HEAP32[96492>>2]|0;$198=$197&$196;HEAP32[96492>>2]=$198;break}}else{$199=HEAP32[96504>>2]|0;$200=$161>>>0<$199>>>0;if($200){_abort()}$201=$161+16|0;$202=HEAP32[$201>>2]|0;$203=($202|0)==($9|0);if($203){HEAP32[$201>>2]=$R7$1}else{$204=$161+20|0;HEAP32[$204>>2]=$R7$1}$205=($R7$1|0)==(0|0);if($205){break}}$206=HEAP32[96504>>2]|0;$207=$R7$1>>>0<$206>>>0;if($207){_abort()}$208=$R7$1+24|0;HEAP32[$208>>2]=$161;$$sum13=$8+8|0;$209=$mem+$$sum13|0;$210=HEAP32[$209>>2]|0;$211=($210|0)==(0|0);do{if(!$211){$212=$210>>>0<$206>>>0;if($212){_abort()}else{$213=$R7$1+16|0;HEAP32[$213>>2]=$210;$214=$210+24|0;HEAP32[$214>>2]=$R7$1;break}}}while(0);$$sum14=$8+12|0;$215=$mem+$$sum14|0;$216=HEAP32[$215>>2]|0;$217=($216|0)==(0|0);if(!$217){$218=HEAP32[96504>>2]|0;$219=$216>>>0<$218>>>0;if($219){_abort()}else{$220=$R7$1+20|0;HEAP32[$220>>2]=$216;$221=$216+24|0;HEAP32[$221>>2]=$R7$1;break}}}}}while(0);$222=$133|1;$223=$p$0+4|0;HEAP32[$223>>2]=$222;$224=$p$0+$133|0;HEAP32[$224>>2]=$133;$225=HEAP32[96508>>2]|0;$226=($p$0|0)==($225|0);if($226){HEAP32[96496>>2]=$133;return}else{$psize$1=$133}}else{$227=$112&-2;HEAP32[$111>>2]=$227;$228=$psize$0|1;$229=$p$0+4|0;HEAP32[$229>>2]=$228;$230=$p$0+$psize$0|0;HEAP32[$230>>2]=$psize$0;$psize$1=$psize$0}$231=$psize$1>>>3;$232=$psize$1>>>0<256;if($232){$233=$231<<1;$234=96528+($233<<2)|0;$235=HEAP32[96488>>2]|0;$236=1<<$231;$237=$235&$236;$238=($237|0)==0;if($238){$239=$235|$236;HEAP32[96488>>2]=$239;$$pre=$233+2|0;$$pre57=96528+($$pre<<2)|0;$$pre$phiZ2D=$$pre57;$F16$0=$234}else{$$sum11=$233+2|0;$240=96528+($$sum11<<2)|0;$241=HEAP32[$240>>2]|0;$242=HEAP32[96504>>2]|0;$243=$241>>>0<$242>>>0;if($243){_abort()}else{$$pre$phiZ2D=$240;$F16$0=$241}}HEAP32[$$pre$phiZ2D>>2]=$p$0;$244=$F16$0+12|0;HEAP32[$244>>2]=$p$0;$245=$p$0+8|0;HEAP32[$245>>2]=$F16$0;$246=$p$0+12|0;HEAP32[$246>>2]=$234;return}$247=$psize$1>>>8;$248=($247|0)==0;if($248){$I18$0=0}else{$249=$psize$1>>>0>16777215;if($249){$I18$0=31}else{$250=$247+1048320|0;$251=$250>>>16;$252=$251&8;$253=$247<<$252;$254=$253+520192|0;$255=$254>>>16;$256=$255&4;$257=$256|$252;$258=$253<<$256;$259=$258+245760|0;$260=$259>>>16;$261=$260&2;$262=$257|$261;$263=14-$262|0;$264=$258<<$261;$265=$264>>>15;$266=$263+$265|0;$267=$266<<1;$268=$266+7|0;$269=$psize$1>>>$268;$270=$269&1;$271=$270|$267;$I18$0=$271}}$272=96792+($I18$0<<2)|0;$273=$p$0+28|0;HEAP32[$273>>2]=$I18$0;$274=$p$0+16|0;$275=$p$0+20|0;HEAP32[$275>>2]=0;HEAP32[$274>>2]=0;$276=HEAP32[96492>>2]|0;$277=1<<$I18$0;$278=$276&$277;$279=($278|0)==0;L199:do{if($279){$280=$276|$277;HEAP32[96492>>2]=$280;HEAP32[$272>>2]=$p$0;$281=$p$0+24|0;HEAP32[$281>>2]=$272;$282=$p$0+12|0;HEAP32[$282>>2]=$p$0;$283=$p$0+8|0;HEAP32[$283>>2]=$p$0}else{$284=HEAP32[$272>>2]|0;$285=$284+4|0;$286=HEAP32[$285>>2]|0;$287=$286&-8;$288=($287|0)==($psize$1|0);L201:do{if($288){$T$0$lcssa=$284}else{$289=($I18$0|0)==31;$290=$I18$0>>>1;$291=25-$290|0;$292=$289?0:$291;$293=$psize$1<<$292;$K19$052=$293;$T$051=$284;while(1){$300=$K19$052>>>31;$301=($T$051+16|0)+($300<<2)|0;$296=HEAP32[$301>>2]|0;$302=($296|0)==(0|0);if($302){$$lcssa=$301;$T$051$lcssa=$T$051;break}$294=$K19$052<<1;$295=$296+4|0;$297=HEAP32[$295>>2]|0;$298=$297&-8;$299=($298|0)==($psize$1|0);if($299){$T$0$lcssa=$296;break L201}else{$K19$052=$294;$T$051=$296}}$303=HEAP32[96504>>2]|0;$304=$$lcssa>>>0<$303>>>0;if($304){_abort()}else{HEAP32[$$lcssa>>2]=$p$0;$305=$p$0+24|0;HEAP32[$305>>2]=$T$051$lcssa;$306=$p$0+12|0;HEAP32[$306>>2]=$p$0;$307=$p$0+8|0;HEAP32[$307>>2]=$p$0;break L199}}}while(0);$308=$T$0$lcssa+8|0;$309=HEAP32[$308>>2]|0;$310=HEAP32[96504>>2]|0;$311=$309>>>0>=$310>>>0;$not$=$T$0$lcssa>>>0>=$310>>>0;$312=$311&$not$;if($312){$313=$309+12|0;HEAP32[$313>>2]=$p$0;HEAP32[$308>>2]=$p$0;$314=$p$0+8|0;HEAP32[$314>>2]=$309;$315=$p$0+12|0;HEAP32[$315>>2]=$T$0$lcssa;$316=$p$0+24|0;HEAP32[$316>>2]=0;break}else{_abort()}}}while(0);$317=HEAP32[96520>>2]|0;$318=$317+-1|0;HEAP32[96520>>2]=$318;$319=($318|0)==0;if($319){$sp$0$in$i=96944}else{return}while(1){$sp$0$i=HEAP32[$sp$0$in$i>>2]|0;$320=($sp$0$i|0)==(0|0);$321=$sp$0$i+8|0;if($320){break}else{$sp$0$in$i=$321}}HEAP32[96520>>2]=-1;return}function _calloc($n_elements,$elem_size){$n_elements=$n_elements|0;$elem_size=$elem_size|0;var $$=0,$0=0,$1=0,$10=0,$11=0,$2=0,$3=0,$4=0,$5=0,$6=0,$7=0,$8=0,$9=0,$req$0=0,label=0,sp=0;sp=STACKTOP;$0=($n_elements|0)==0;if($0){$req$0=0}else{$1=Math_imul($elem_size,$n_elements)|0;$2=$elem_size|$n_elements;$3=$2>>>0>65535;if($3){$4=($1>>>0)/($n_elements>>>0)&-1;$5=($4|0)==($elem_size|0);$$=$5?$1:-1;$req$0=$$}else{$req$0=$1}}$6=_malloc($req$0)|0;$7=($6|0)==(0|0);if($7){return $6|0}$8=$6+-4|0;$9=HEAP32[$8>>2]|0;$10=$9&3;$11=($10|0)==0;if($11){return $6|0}_memset($6|0,0,$req$0|0)|0;return $6|0}function runPostSets(){}function _i64Subtract(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var l=0,h=0;l=a-c>>>0;h=b-d>>>0;h=b-d-(c>>>0>a>>>0|0)>>>0;return(tempRet0=h,l|0)|0}function _memset(ptr,value,num){ptr=ptr|0;value=value|0;num=num|0;var stop=0,value4=0,stop4=0,unaligned=0;stop=ptr+num|0;if((num|0)>=20){value=value&0xff;unaligned=ptr&3;value4=value|value<<8|value<<16|value<<24;stop4=stop&~3;if(unaligned){unaligned=ptr+4-unaligned|0;while((ptr|0)<(unaligned|0)){HEAP8[ptr>>0]=value;ptr=ptr+1|0}}while((ptr|0)<(stop4|0)){HEAP32[ptr>>2]=value4;ptr=ptr+4|0}}while((ptr|0)<(stop|0)){HEAP8[ptr>>0]=value;ptr=ptr+1|0}return ptr-num|0}function _strlen(ptr){ptr=ptr|0;var curr=0;curr=ptr;while(HEAP8[curr>>0]|0){curr=curr+1|0}return curr-ptr|0}function _i64Add(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var l=0,h=0;l=a+c>>>0;h=b+d+(l>>>0>>0|0)>>>0;return(tempRet0=h,l|0)|0}function _bitshift64Lshr(low,high,bits){low=low|0;high=high|0;bits=bits|0;var ander=0;if((bits|0)<32){ander=(1<>>bits;return low>>>bits|(high&ander)<<32-bits}tempRet0=0;return high>>>bits-32|0}function _memcpy(dest,src,num){dest=dest|0;src=src|0;num=num|0;var ret=0;if((num|0)>=4096)return _emscripten_memcpy_big(dest|0,src|0,num|0)|0;ret=dest|0;if((dest&3)==(src&3)){while(dest&3){if((num|0)==0)return ret|0;HEAP8[dest>>0]=HEAP8[src>>0]|0;dest=dest+1|0;src=src+1|0;num=num-1|0}while((num|0)>=4){HEAP32[dest>>2]=HEAP32[src>>2]|0;dest=dest+4|0;src=src+4|0;num=num-4|0}}while((num|0)>0){HEAP8[dest>>0]=HEAP8[src>>0]|0;dest=dest+1|0;src=src+1|0;num=num-1|0}return ret|0}function _bitshift64Shl(low,high,bits){low=low|0;high=high|0;bits=bits|0;var ander=0;if((bits|0)<32){ander=(1<>>32-bits;return low<>bits;return low>>>bits|(high&ander)<<32-bits}tempRet0=(high|0)<0?-1:0;return high>>bits-32|0}function _llvm_cttz_i32(x){x=x|0;var ret=0;ret=HEAP8[cttz_i8+(x&0xff)>>0]|0;if((ret|0)<8)return ret|0;ret=HEAP8[cttz_i8+(x>>8&0xff)>>0]|0;if((ret|0)<8)return ret+8|0;ret=HEAP8[cttz_i8+(x>>16&0xff)>>0]|0;if((ret|0)<8)return ret+16|0;return(HEAP8[cttz_i8+(x>>>24)>>0]|0)+24|0}function ___muldsi3($a,$b){$a=$a|0;$b=$b|0;var $1=0,$2=0,$3=0,$6=0,$8=0,$11=0,$12=0;$1=$a&65535;$2=$b&65535;$3=Math_imul($2,$1)|0;$6=$a>>>16;$8=($3>>>16)+(Math_imul($2,$6)|0)|0;$11=$b>>>16;$12=Math_imul($11,$1)|0;return(tempRet0=(($8>>>16)+(Math_imul($11,$6)|0)|0)+((($8&65535)+$12|0)>>>16)|0,0|($8+$12<<16|$3&65535))|0}function ___divdi3($a$0,$a$1,$b$0,$b$1){$a$0=$a$0|0;$a$1=$a$1|0;$b$0=$b$0|0;$b$1=$b$1|0;var $1$0=0,$1$1=0,$2$0=0,$2$1=0,$4$0=0,$4$1=0,$6$0=0,$7$0=0,$7$1=0,$8$0=0,$10$0=0;$1$0=$a$1>>31|(($a$1|0)<0?-1:0)<<1;$1$1=(($a$1|0)<0?-1:0)>>31|(($a$1|0)<0?-1:0)<<1;$2$0=$b$1>>31|(($b$1|0)<0?-1:0)<<1;$2$1=(($b$1|0)<0?-1:0)>>31|(($b$1|0)<0?-1:0)<<1;$4$0=_i64Subtract($1$0^$a$0,$1$1^$a$1,$1$0,$1$1)|0;$4$1=tempRet0;$6$0=_i64Subtract($2$0^$b$0,$2$1^$b$1,$2$0,$2$1)|0;$7$0=$2$0^$1$0;$7$1=$2$1^$1$1;$8$0=___udivmoddi4($4$0,$4$1,$6$0,tempRet0,0)|0;$10$0=_i64Subtract($8$0^$7$0,tempRet0^$7$1,$7$0,$7$1)|0;return $10$0|0}function ___remdi3($a$0,$a$1,$b$0,$b$1){$a$0=$a$0|0;$a$1=$a$1|0;$b$0=$b$0|0;$b$1=$b$1|0;var $rem=0,$1$0=0,$1$1=0,$2$0=0,$2$1=0,$4$0=0,$4$1=0,$6$0=0,$10$0=0,$10$1=0,__stackBase__=0;__stackBase__=STACKTOP;STACKTOP=STACKTOP+8|0;$rem=__stackBase__|0;$1$0=$a$1>>31|(($a$1|0)<0?-1:0)<<1;$1$1=(($a$1|0)<0?-1:0)>>31|(($a$1|0)<0?-1:0)<<1;$2$0=$b$1>>31|(($b$1|0)<0?-1:0)<<1;$2$1=(($b$1|0)<0?-1:0)>>31|(($b$1|0)<0?-1:0)<<1;$4$0=_i64Subtract($1$0^$a$0,$1$1^$a$1,$1$0,$1$1)|0;$4$1=tempRet0;$6$0=_i64Subtract($2$0^$b$0,$2$1^$b$1,$2$0,$2$1)|0;___udivmoddi4($4$0,$4$1,$6$0,tempRet0,$rem)|0;$10$0=_i64Subtract(HEAP32[$rem>>2]^$1$0,HEAP32[$rem+4>>2]^$1$1,$1$0,$1$1)|0;$10$1=tempRet0;STACKTOP=__stackBase__;return(tempRet0=$10$1,$10$0)|0}function ___muldi3($a$0,$a$1,$b$0,$b$1){$a$0=$a$0|0;$a$1=$a$1|0;$b$0=$b$0|0;$b$1=$b$1|0;var $x_sroa_0_0_extract_trunc=0,$y_sroa_0_0_extract_trunc=0,$1$0=0,$1$1=0,$2=0;$x_sroa_0_0_extract_trunc=$a$0;$y_sroa_0_0_extract_trunc=$b$0;$1$0=___muldsi3($x_sroa_0_0_extract_trunc,$y_sroa_0_0_extract_trunc)|0;$1$1=tempRet0;$2=Math_imul($a$1,$y_sroa_0_0_extract_trunc)|0;return(tempRet0=((Math_imul($b$1,$x_sroa_0_0_extract_trunc)|0)+$2|0)+$1$1|$1$1&0,0|$1$0&-1)|0}function ___udivdi3($a$0,$a$1,$b$0,$b$1){$a$0=$a$0|0;$a$1=$a$1|0;$b$0=$b$0|0;$b$1=$b$1|0;var $1$0=0;$1$0=___udivmoddi4($a$0,$a$1,$b$0,$b$1,0)|0;return $1$0|0}function ___uremdi3($a$0,$a$1,$b$0,$b$1){$a$0=$a$0|0;$a$1=$a$1|0;$b$0=$b$0|0;$b$1=$b$1|0;var $rem=0,__stackBase__=0;__stackBase__=STACKTOP;STACKTOP=STACKTOP+8|0;$rem=__stackBase__|0;___udivmoddi4($a$0,$a$1,$b$0,$b$1,$rem)|0;STACKTOP=__stackBase__;return(tempRet0=HEAP32[$rem+4>>2]|0,HEAP32[$rem>>2]|0)|0}function ___udivmoddi4($a$0,$a$1,$b$0,$b$1,$rem){$a$0=$a$0|0;$a$1=$a$1|0;$b$0=$b$0|0;$b$1=$b$1|0;$rem=$rem|0;var $n_sroa_0_0_extract_trunc=0,$n_sroa_1_4_extract_shift$0=0,$n_sroa_1_4_extract_trunc=0,$d_sroa_0_0_extract_trunc=0,$d_sroa_1_4_extract_shift$0=0,$d_sroa_1_4_extract_trunc=0,$4=0,$17=0,$37=0,$49=0,$51=0,$57=0,$58=0,$66=0,$78=0,$86=0,$88=0,$89=0,$91=0,$92=0,$95=0,$105=0,$117=0,$119=0,$125=0,$126=0,$130=0,$q_sroa_1_1_ph=0,$q_sroa_0_1_ph=0,$r_sroa_1_1_ph=0,$r_sroa_0_1_ph=0,$sr_1_ph=0,$d_sroa_0_0_insert_insert99$0=0,$d_sroa_0_0_insert_insert99$1=0,$137$0=0,$137$1=0,$carry_0203=0,$sr_1202=0,$r_sroa_0_1201=0,$r_sroa_1_1200=0,$q_sroa_0_1199=0,$q_sroa_1_1198=0,$147=0,$149=0,$r_sroa_0_0_insert_insert42$0=0,$r_sroa_0_0_insert_insert42$1=0,$150$1=0,$151$0=0,$152=0,$154$0=0,$r_sroa_0_0_extract_trunc=0,$r_sroa_1_4_extract_trunc=0,$155=0,$carry_0_lcssa$0=0,$carry_0_lcssa$1=0,$r_sroa_0_1_lcssa=0,$r_sroa_1_1_lcssa=0,$q_sroa_0_1_lcssa=0,$q_sroa_1_1_lcssa=0,$q_sroa_0_0_insert_ext75$0=0,$q_sroa_0_0_insert_ext75$1=0,$q_sroa_0_0_insert_insert77$1=0,$_0$0=0,$_0$1=0;$n_sroa_0_0_extract_trunc=$a$0;$n_sroa_1_4_extract_shift$0=$a$1;$n_sroa_1_4_extract_trunc=$n_sroa_1_4_extract_shift$0;$d_sroa_0_0_extract_trunc=$b$0;$d_sroa_1_4_extract_shift$0=$b$1;$d_sroa_1_4_extract_trunc=$d_sroa_1_4_extract_shift$0;if(($n_sroa_1_4_extract_trunc|0)==0){$4=($rem|0)!=0;if(($d_sroa_1_4_extract_trunc|0)==0){if($4){HEAP32[$rem>>2]=($n_sroa_0_0_extract_trunc>>>0)%($d_sroa_0_0_extract_trunc>>>0);HEAP32[$rem+4>>2]=0}$_0$1=0;$_0$0=($n_sroa_0_0_extract_trunc>>>0)/($d_sroa_0_0_extract_trunc>>>0)>>>0;return(tempRet0=$_0$1,$_0$0)|0}else{if(!$4){$_0$1=0;$_0$0=0;return(tempRet0=$_0$1,$_0$0)|0}HEAP32[$rem>>2]=$a$0&-1;HEAP32[$rem+4>>2]=$a$1&0;$_0$1=0;$_0$0=0;return(tempRet0=$_0$1,$_0$0)|0}}$17=($d_sroa_1_4_extract_trunc|0)==0;do{if(($d_sroa_0_0_extract_trunc|0)==0){if($17){if(($rem|0)!=0){HEAP32[$rem>>2]=($n_sroa_1_4_extract_trunc>>>0)%($d_sroa_0_0_extract_trunc>>>0);HEAP32[$rem+4>>2]=0}$_0$1=0;$_0$0=($n_sroa_1_4_extract_trunc>>>0)/($d_sroa_0_0_extract_trunc>>>0)>>>0;return(tempRet0=$_0$1,$_0$0)|0}if(($n_sroa_0_0_extract_trunc|0)==0){if(($rem|0)!=0){HEAP32[$rem>>2]=0;HEAP32[$rem+4>>2]=($n_sroa_1_4_extract_trunc>>>0)%($d_sroa_1_4_extract_trunc>>>0)}$_0$1=0;$_0$0=($n_sroa_1_4_extract_trunc>>>0)/($d_sroa_1_4_extract_trunc>>>0)>>>0;return(tempRet0=$_0$1,$_0$0)|0}$37=$d_sroa_1_4_extract_trunc-1|0;if(($37&$d_sroa_1_4_extract_trunc|0)==0){if(($rem|0)!=0){HEAP32[$rem>>2]=0|$a$0&-1;HEAP32[$rem+4>>2]=$37&$n_sroa_1_4_extract_trunc|$a$1&0}$_0$1=0;$_0$0=$n_sroa_1_4_extract_trunc>>>((_llvm_cttz_i32($d_sroa_1_4_extract_trunc|0)|0)>>>0);return(tempRet0=$_0$1,$_0$0)|0}$49=Math_clz32($d_sroa_1_4_extract_trunc|0)|0;$51=$49-(Math_clz32($n_sroa_1_4_extract_trunc|0)|0)|0;if($51>>>0<=30){$57=$51+1|0;$58=31-$51|0;$sr_1_ph=$57;$r_sroa_0_1_ph=$n_sroa_1_4_extract_trunc<<$58|$n_sroa_0_0_extract_trunc>>>($57>>>0);$r_sroa_1_1_ph=$n_sroa_1_4_extract_trunc>>>($57>>>0);$q_sroa_0_1_ph=0;$q_sroa_1_1_ph=$n_sroa_0_0_extract_trunc<<$58;break}if(($rem|0)==0){$_0$1=0;$_0$0=0;return(tempRet0=$_0$1,$_0$0)|0}HEAP32[$rem>>2]=0|$a$0&-1;HEAP32[$rem+4>>2]=$n_sroa_1_4_extract_shift$0|$a$1&0;$_0$1=0;$_0$0=0;return(tempRet0=$_0$1,$_0$0)|0}else{if(!$17){$117=Math_clz32($d_sroa_1_4_extract_trunc|0)|0;$119=$117-(Math_clz32($n_sroa_1_4_extract_trunc|0)|0)|0;if($119>>>0<=31){$125=$119+1|0;$126=31-$119|0;$130=$119-31>>31;$sr_1_ph=$125;$r_sroa_0_1_ph=$n_sroa_0_0_extract_trunc>>>($125>>>0)&$130|$n_sroa_1_4_extract_trunc<<$126;$r_sroa_1_1_ph=$n_sroa_1_4_extract_trunc>>>($125>>>0)&$130;$q_sroa_0_1_ph=0;$q_sroa_1_1_ph=$n_sroa_0_0_extract_trunc<<$126;break}if(($rem|0)==0){$_0$1=0;$_0$0=0;return(tempRet0=$_0$1,$_0$0)|0}HEAP32[$rem>>2]=0|$a$0&-1;HEAP32[$rem+4>>2]=$n_sroa_1_4_extract_shift$0|$a$1&0;$_0$1=0;$_0$0=0;return(tempRet0=$_0$1,$_0$0)|0}$66=$d_sroa_0_0_extract_trunc-1|0;if(($66&$d_sroa_0_0_extract_trunc|0)!=0){$86=(Math_clz32($d_sroa_0_0_extract_trunc|0)|0)+33|0;$88=$86-(Math_clz32($n_sroa_1_4_extract_trunc|0)|0)|0;$89=64-$88|0;$91=32-$88|0;$92=$91>>31;$95=$88-32|0;$105=$95>>31;$sr_1_ph=$88;$r_sroa_0_1_ph=$91-1>>31&$n_sroa_1_4_extract_trunc>>>($95>>>0)|($n_sroa_1_4_extract_trunc<<$91|$n_sroa_0_0_extract_trunc>>>($88>>>0))&$105;$r_sroa_1_1_ph=$105&$n_sroa_1_4_extract_trunc>>>($88>>>0);$q_sroa_0_1_ph=$n_sroa_0_0_extract_trunc<<$89&$92;$q_sroa_1_1_ph=($n_sroa_1_4_extract_trunc<<$89|$n_sroa_0_0_extract_trunc>>>($95>>>0))&$92|$n_sroa_0_0_extract_trunc<<$91&$88-33>>31;break}if(($rem|0)!=0){HEAP32[$rem>>2]=$66&$n_sroa_0_0_extract_trunc;HEAP32[$rem+4>>2]=0}if(($d_sroa_0_0_extract_trunc|0)==1){$_0$1=$n_sroa_1_4_extract_shift$0|$a$1&0;$_0$0=0|$a$0&-1;return(tempRet0=$_0$1,$_0$0)|0}else{$78=_llvm_cttz_i32($d_sroa_0_0_extract_trunc|0)|0;$_0$1=0|$n_sroa_1_4_extract_trunc>>>($78>>>0);$_0$0=$n_sroa_1_4_extract_trunc<<32-$78|$n_sroa_0_0_extract_trunc>>>($78>>>0)|0;return(tempRet0=$_0$1,$_0$0)|0}}}while(0);if(($sr_1_ph|0)==0){$q_sroa_1_1_lcssa=$q_sroa_1_1_ph;$q_sroa_0_1_lcssa=$q_sroa_0_1_ph;$r_sroa_1_1_lcssa=$r_sroa_1_1_ph;$r_sroa_0_1_lcssa=$r_sroa_0_1_ph;$carry_0_lcssa$1=0;$carry_0_lcssa$0=0}else{$d_sroa_0_0_insert_insert99$0=0|$b$0&-1;$d_sroa_0_0_insert_insert99$1=$d_sroa_1_4_extract_shift$0|$b$1&0;$137$0=_i64Add($d_sroa_0_0_insert_insert99$0|0,$d_sroa_0_0_insert_insert99$1|0,-1,-1)|0;$137$1=tempRet0;$q_sroa_1_1198=$q_sroa_1_1_ph;$q_sroa_0_1199=$q_sroa_0_1_ph;$r_sroa_1_1200=$r_sroa_1_1_ph;$r_sroa_0_1201=$r_sroa_0_1_ph;$sr_1202=$sr_1_ph;$carry_0203=0;while(1){$147=$q_sroa_0_1199>>>31|$q_sroa_1_1198<<1;$149=$carry_0203|$q_sroa_0_1199<<1;$r_sroa_0_0_insert_insert42$0=0|($r_sroa_0_1201<<1|$q_sroa_1_1198>>>31);$r_sroa_0_0_insert_insert42$1=$r_sroa_0_1201>>>31|$r_sroa_1_1200<<1|0;_i64Subtract($137$0,$137$1,$r_sroa_0_0_insert_insert42$0,$r_sroa_0_0_insert_insert42$1)|0;$150$1=tempRet0;$151$0=$150$1>>31|(($150$1|0)<0?-1:0)<<1;$152=$151$0&1;$154$0=_i64Subtract($r_sroa_0_0_insert_insert42$0,$r_sroa_0_0_insert_insert42$1,$151$0&$d_sroa_0_0_insert_insert99$0,((($150$1|0)<0?-1:0)>>31|(($150$1|0)<0?-1:0)<<1)&$d_sroa_0_0_insert_insert99$1)|0;$r_sroa_0_0_extract_trunc=$154$0;$r_sroa_1_4_extract_trunc=tempRet0;$155=$sr_1202-1|0;if(($155|0)==0){break}else{$q_sroa_1_1198=$147;$q_sroa_0_1199=$149;$r_sroa_1_1200=$r_sroa_1_4_extract_trunc;$r_sroa_0_1201=$r_sroa_0_0_extract_trunc;$sr_1202=$155;$carry_0203=$152}}$q_sroa_1_1_lcssa=$147;$q_sroa_0_1_lcssa=$149;$r_sroa_1_1_lcssa=$r_sroa_1_4_extract_trunc;$r_sroa_0_1_lcssa=$r_sroa_0_0_extract_trunc;$carry_0_lcssa$1=0;$carry_0_lcssa$0=$152}$q_sroa_0_0_insert_ext75$0=$q_sroa_0_1_lcssa;$q_sroa_0_0_insert_ext75$1=0;$q_sroa_0_0_insert_insert77$1=$q_sroa_1_1_lcssa|$q_sroa_0_0_insert_ext75$1;if(($rem|0)!=0){HEAP32[$rem>>2]=0|$r_sroa_0_1_lcssa;HEAP32[$rem+4>>2]=$r_sroa_1_1_lcssa|0}$_0$1=(0|$q_sroa_0_0_insert_ext75$0)>>>31|$q_sroa_0_0_insert_insert77$1<<1|($q_sroa_0_0_insert_ext75$1<<1|$q_sroa_0_0_insert_ext75$0>>>31)&0|$carry_0_lcssa$1;$_0$0=($q_sroa_0_0_insert_ext75$0<<1|0>>>31)&-2|$carry_0_lcssa$0;return(tempRet0=$_0$1,$_0$0)|0}function dynCall_iiii(index,a1,a2,a3){index=index|0;a1=a1|0;a2=a2|0;a3=a3|0;return FUNCTION_TABLE_iiii[index&3](a1|0,a2|0,a3|0)|0}function dynCall_iiiii(index,a1,a2,a3,a4){index=index|0;a1=a1|0;a2=a2|0;a3=a3|0;a4=a4|0;return FUNCTION_TABLE_iiiii[index&7](a1|0,a2|0,a3|0,a4|0)|0}function dynCall_vii(index,a1,a2){index=index|0;a1=a1|0;a2=a2|0;FUNCTION_TABLE_vii[index&3](a1|0,a2|0)}function dynCall_iii(index,a1,a2){index=index|0;a1=a1|0;a2=a2|0;return FUNCTION_TABLE_iii[index&1](a1|0,a2|0)|0}function dynCall_viiii(index,a1,a2,a3,a4){index=index|0;a1=a1|0;a2=a2|0;a3=a3|0;a4=a4|0;FUNCTION_TABLE_viiii[index&7](a1|0,a2|0,a3|0,a4|0)}function b0(p0,p1,p2){p0=p0|0;p1=p1|0;p2=p2|0;abort(0);return 0}function b1(p0,p1,p2,p3){p0=p0|0;p1=p1|0;p2=p2|0;p3=p3|0;abort(1);return 0}function b2(p0,p1){p0=p0|0;p1=p1|0;abort(2)}function b3(p0,p1){p0=p0|0;p1=p1|0;abort(3);return 0}function b4(p0,p1,p2,p3){p0=p0|0;p1=p1|0;p2=p2|0;p3=p3|0;abort(4)}function _init_xrpow_core_sse__wrapper(p0,p1,p2,p3){p0=p0|0;p1=p1|0;p2=p2|0;p3=p3|0;_init_xrpow_core_sse(p0|0,p1|0,p2|0,p3|0)}var FUNCTION_TABLE_iiii=[b0,_sn_write,_choose_table_nonMMX,b0];var FUNCTION_TABLE_iiiii=[b1,_count_bit_null,_count_bit_noESC,_count_bit_noESC_from2,_count_bit_noESC_from3,b1,b1,b1];var FUNCTION_TABLE_vii=[b2,_fht,_lame_report_def,b2];var FUNCTION_TABLE_iii=[b3,_floatcompare];var FUNCTION_TABLE_viiii=[b4,_VBR_new_iteration_loop,_VBR_old_iteration_loop,_CBR_iteration_loop,_ABR_iteration_loop,_init_xrpow_core_sse__wrapper,_init_xrpow_core_c,b4];return{_i64Subtract:_i64Subtract,_lame_set_brate:_lame_set_brate,_lame_encode_buffer_ieee_float:_lame_encode_buffer_ieee_float,_lame_close:_lame_close,_lame_set_in_samplerate:_lame_set_in_samplerate,_i64Add:_i64Add,_lame_set_num_channels:_lame_set_num_channels,_strlen:_strlen,_memset:_memset,_malloc:_malloc,_memcpy:_memcpy,_lame_init:_lame_init,_bitshift64Lshr:_bitshift64Lshr,_free:_free,_lame_init_params:_lame_init_params,_lame_encode_flush:_lame_encode_flush,_bitshift64Shl:_bitshift64Shl,_lame_set_mode:_lame_set_mode,runPostSets:runPostSets,stackAlloc:stackAlloc,stackSave:stackSave,stackRestore:stackRestore,establishStackSpace:establishStackSpace,setThrew:setThrew,setTempRet0:setTempRet0,getTempRet0:getTempRet0,dynCall_iiii:dynCall_iiii,dynCall_iiiii:dynCall_iiiii,dynCall_vii:dynCall_vii,dynCall_iii:dynCall_iii,dynCall_viiii:dynCall_viiii}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_i64Subtract=Module._i64Subtract=asm._i64Subtract,_lame_set_brate=Module._lame_set_brate=asm._lame_set_brate,_lame_encode_buffer_ieee_float=Module._lame_encode_buffer_ieee_float=asm._lame_encode_buffer_ieee_float,runPostSets=Module.runPostSets=asm.runPostSets,_lame_close=Module._lame_close=asm._lame_close,_lame_set_in_samplerate=Module._lame_set_in_samplerate=asm._lame_set_in_samplerate,_i64Add=Module._i64Add=asm._i64Add,_lame_set_num_channels=Module._lame_set_num_channels=asm._lame_set_num_channels,_strlen=Module._strlen=asm._strlen,_memset=Module._memset=asm._memset,_malloc=Module._malloc=asm._malloc,_lame_set_mode=Module._lame_set_mode=asm._lame_set_mode,_memcpy=Module._memcpy=asm._memcpy,_lame_init=Module._lame_init=asm._lame_init,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_free=Module._free=asm._free,_lame_init_params=Module._lame_init_params=asm._lame_init_params,_lame_encode_flush=Module._lame_encode_flush=asm._lame_encode_flush,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_iiiii=Module.dynCall_iiiii=asm.dynCall_iiiii,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=asm.stackAlloc,Runtime.stackSave=asm.stackSave,Runtime.stackRestore=asm.stackRestore,Runtime.establishStackSpace=asm.establishStackSpace,Runtime.setTempRet0=asm.setTempRet0,Runtime.getTempRet0=asm.getTempRet0;var i64Math=function(){var goog={math:{}};goog.math.Long=function(low,high){this.low_=0|low,this.high_=0|high},goog.math.Long.IntCache_={},goog.math.Long.fromInt=function(value){if(-128<=value&&value<128){var cachedObj=goog.math.Long.IntCache_[value];if(cachedObj)return cachedObj}var obj=new goog.math.Long(0|value,value<0?-1:0);return-128<=value&&value<128&&(goog.math.Long.IntCache_[value]=obj),obj},goog.math.Long.fromNumber=function(value){return isNaN(value)||!isFinite(value)?goog.math.Long.ZERO:value<=-goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MIN_VALUE:value+1>=goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MAX_VALUE:value<0?goog.math.Long.fromNumber(-value).negate():new goog.math.Long(value%goog.math.Long.TWO_PWR_32_DBL_|0,value/goog.math.Long.TWO_PWR_32_DBL_|0)},goog.math.Long.fromBits=function(lowBits,highBits){return new goog.math.Long(lowBits,highBits)},goog.math.Long.fromString=function(str,opt_radix){if(0==str.length)throw Error("number format error: empty string");var radix=opt_radix||10;if(radix<2||36=0)throw Error('number format error: interior "-" character: '+str);for(var radixToPower=goog.math.Long.fromNumber(Math.pow(radix,8)),result=goog.math.Long.ZERO,i=0;i=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_},goog.math.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(goog.math.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var val=0!=this.high_?this.high_:this.low_,bit=31;bit>0&&!(val&1<0},goog.math.Long.prototype.greaterThanOrEqual=function(other){return this.compare(other)>=0},goog.math.Long.prototype.compare=function(other){if(this.equals(other))return 0;var thisNeg=this.isNegative(),otherNeg=other.isNegative();return thisNeg&&!otherNeg?-1:!thisNeg&&otherNeg?1:this.subtract(other).isNegative()?-1:1},goog.math.Long.prototype.negate=function(){return this.equals(goog.math.Long.MIN_VALUE)?goog.math.Long.MIN_VALUE:this.not().add(goog.math.Long.ONE)},goog.math.Long.prototype.add=function(other){var a48=this.high_>>>16,a32=65535&this.high_,a16=this.low_>>>16,a00=65535&this.low_,b48=other.high_>>>16,b32=65535&other.high_,b16=other.low_>>>16,c48=0,c32=0,c16=0,c00=0;return c16+=(c00+=a00+(65535&other.low_))>>>16,c00&=65535,c32+=(c16+=a16+b16)>>>16,c16&=65535,c48+=(c32+=a32+b32)>>>16,c32&=65535,c48+=a48+b48,c48&=65535,goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)},goog.math.Long.prototype.subtract=function(other){return this.add(other.negate())},goog.math.Long.prototype.multiply=function(other){if(this.isZero())return goog.math.Long.ZERO;if(other.isZero())return goog.math.Long.ZERO;if(this.equals(goog.math.Long.MIN_VALUE))return other.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO;if(other.equals(goog.math.Long.MIN_VALUE))return this.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO;if(this.isNegative())return other.isNegative()?this.negate().multiply(other.negate()):this.negate().multiply(other).negate();if(other.isNegative())return this.multiply(other.negate()).negate();if(this.lessThan(goog.math.Long.TWO_PWR_24_)&&other.lessThan(goog.math.Long.TWO_PWR_24_))return goog.math.Long.fromNumber(this.toNumber()*other.toNumber());var a48=this.high_>>>16,a32=65535&this.high_,a16=this.low_>>>16,a00=65535&this.low_,b48=other.high_>>>16,b32=65535&other.high_,b16=other.low_>>>16,b00=65535&other.low_,c48=0,c32=0,c16=0,c00=0;return c16+=(c00+=a00*b00)>>>16,c00&=65535,c32+=(c16+=a16*b00)>>>16,c16&=65535,c32+=(c16+=a00*b16)>>>16,c16&=65535,c48+=(c32+=a32*b00)>>>16,c32&=65535,c48+=(c32+=a16*b16)>>>16,c32&=65535,c48+=(c32+=a00*b32)>>>16,c32&=65535,c48+=a48*b00+a32*b16+a16*b32+a00*b48,c48&=65535,goog.math.Long.fromBits(c16<<16|c00,c48<<16|c32)},goog.math.Long.prototype.div=function(other){if(other.isZero())throw Error("division by zero");if(this.isZero())return goog.math.Long.ZERO;if(this.equals(goog.math.Long.MIN_VALUE)){if(other.equals(goog.math.Long.ONE)||other.equals(goog.math.Long.NEG_ONE))return goog.math.Long.MIN_VALUE;if(other.equals(goog.math.Long.MIN_VALUE))return goog.math.Long.ONE;if((approx=this.shiftRight(1).div(other).shiftLeft(1)).equals(goog.math.Long.ZERO))return other.isNegative()?goog.math.Long.ONE:goog.math.Long.NEG_ONE;var rem=this.subtract(other.multiply(approx));return approx.add(rem.div(other))}if(other.equals(goog.math.Long.MIN_VALUE))return goog.math.Long.ZERO;if(this.isNegative())return other.isNegative()?this.negate().div(other.negate()):this.negate().div(other).negate();if(other.isNegative())return this.div(other.negate()).negate();var res=goog.math.Long.ZERO;for(rem=this;rem.greaterThanOrEqual(other);){for(var approx=Math.max(1,Math.floor(rem.toNumber()/other.toNumber())),log2=Math.ceil(Math.log(approx)/Math.LN2),delta=log2<=48?1:Math.pow(2,log2-48),approxRes=goog.math.Long.fromNumber(approx),approxRem=approxRes.multiply(other);approxRem.isNegative()||approxRem.greaterThan(rem);)approx-=delta,approxRem=(approxRes=goog.math.Long.fromNumber(approx)).multiply(other);approxRes.isZero()&&(approxRes=goog.math.Long.ONE),res=res.add(approxRes),rem=rem.subtract(approxRem)}return res},goog.math.Long.prototype.modulo=function(other){return this.subtract(this.div(other).multiply(other))},goog.math.Long.prototype.not=function(){return goog.math.Long.fromBits(~this.low_,~this.high_)},goog.math.Long.prototype.and=function(other){return goog.math.Long.fromBits(this.low_&other.low_,this.high_&other.high_)},goog.math.Long.prototype.or=function(other){return goog.math.Long.fromBits(this.low_|other.low_,this.high_|other.high_)},goog.math.Long.prototype.xor=function(other){return goog.math.Long.fromBits(this.low_^other.low_,this.high_^other.high_)},goog.math.Long.prototype.shiftLeft=function(numBits){if(0==(numBits&=63))return this;var low=this.low_;if(numBits<32){var high=this.high_;return goog.math.Long.fromBits(low<>>32-numBits)}return goog.math.Long.fromBits(0,low<>>numBits|high<<32-numBits,high>>numBits)}return goog.math.Long.fromBits(high>>numBits-32,high>=0?0:-1)},goog.math.Long.prototype.shiftRightUnsigned=function(numBits){if(0==(numBits&=63))return this;var high=this.high_;if(numBits<32){var low=this.low_;return goog.math.Long.fromBits(low>>>numBits|high<<32-numBits,high>>>numBits)}return 32==numBits?goog.math.Long.fromBits(high,0):goog.math.Long.fromBits(high>>>numBits-32,0)};var dbits,navigator_appName="Modern Browser";function BigInteger(a,b,c){null!=a&&("number"==typeof a?this.fromNumber(a,b,c):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function nbi(){return new BigInteger(null)}"Microsoft Internet Explorer"==navigator_appName?(BigInteger.prototype.am=function(i,x,w,j,c,n){for(var xl=32767&x,xh=x>>15;--n>=0;){var l=32767&this[i],h=this[i++]>>15,m=xh*l+h*xl;c=((l=xl*l+((32767&m)<<15)+w[j]+(1073741823&c))>>>30)+(m>>>15)+xh*h+(c>>>30),w[j++]=1073741823&l}return c},dbits=30):"Netscape"!=navigator_appName?(BigInteger.prototype.am=function(i,x,w,j,c,n){for(;--n>=0;){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864),w[j++]=67108863&v}return c},dbits=26):(BigInteger.prototype.am=function(i,x,w,j,c,n){for(var xl=16383&x,xh=x>>14;--n>=0;){var l=16383&this[i],h=this[i++]>>14,m=xh*l+h*xl;c=((l=xl*l+((16383&m)<<14)+w[j]+c)>>28)+(m>>14)+xh*h,w[j++]=268435455&l}return c},dbits=28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1<>>16)&&(x=t,r+=16),0!=(t=x>>8)&&(x=t,r+=8),0!=(t=x>>4)&&(x=t,r+=4),0!=(t=x>>2)&&(x=t,r+=2),0!=(t=x>>1)&&(x=t,r+=1),r}function Classic(m){this.m=m}function Montgomery(m){this.m=m,this.mp=m.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<=0?x.mod(this.m):x},Classic.prototype.revert=function(x){return x},Classic.prototype.reduce=function(x){x.divRemTo(this.m,null,x)},Classic.prototype.mulTo=function(x,y,r){x.multiplyTo(y,r),this.reduce(r)},Classic.prototype.sqrTo=function(x,r){x.squareTo(r),this.reduce(r)},Montgomery.prototype.convert=function(x){var r=nbi();return x.abs().dlShiftTo(this.m.t,r),r.divRemTo(this.m,null,r),x.s<0&&r.compareTo(BigInteger.ZERO)>0&&this.m.subTo(r,r),r},Montgomery.prototype.revert=function(x){var r=nbi();return x.copyTo(r),this.reduce(r),r},Montgomery.prototype.reduce=function(x){for(;x.t<=this.mt2;)x[x.t++]=0;for(var i=0;i>15)*this.mpl&this.um)<<15)&x.DM;for(x[j=i+this.m.t]+=this.m.am(0,u0,x,i,0,this.m.t);x[j]>=x.DV;)x[j]-=x.DV,x[++j]++}x.clamp(),x.drShiftTo(this.m.t,x),x.compareTo(this.m)>=0&&x.subTo(this.m,x)},Montgomery.prototype.mulTo=function(x,y,r){x.multiplyTo(y,r),this.reduce(r)},Montgomery.prototype.sqrTo=function(x,r){x.squareTo(r),this.reduce(r)},BigInteger.prototype.copyTo=function(r){for(var i=this.t-1;i>=0;--i)r[i]=this[i];r.t=this.t,r.s=this.s},BigInteger.prototype.fromInt=function(x){this.t=1,this.s=x<0?-1:0,x>0?this[0]=x:x<-1?this[0]=x+DV:this.t=0},BigInteger.prototype.fromString=function(s,b){var k;if(16==b)k=4;else if(8==b)k=3;else if(256==b)k=8;else if(2==b)k=1;else if(32==b)k=5;else{if(4!=b)return void this.fromRadix(s,b);k=2}this.t=0,this.s=0;for(var i=s.length,mi=!1,sh=0;--i>=0;){var x=8==k?255&s[i]:intAt(s,i);x<0?"-"==s.charAt(i)&&(mi=!0):(mi=!1,0==sh?this[this.t++]=x:sh+k>this.DB?(this[this.t-1]|=(x&(1<>this.DB-sh):this[this.t-1]|=x<=this.DB&&(sh-=this.DB))}8==k&&128&s[0]&&(this.s=-1,sh>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==c;)--this.t},BigInteger.prototype.dlShiftTo=function(n,r){var i;for(i=this.t-1;i>=0;--i)r[i+n]=this[i];for(i=n-1;i>=0;--i)r[i]=0;r.t=this.t+n,r.s=this.s},BigInteger.prototype.drShiftTo=function(n,r){for(var i=n;i=0;--i)r[i+ds+1]=this[i]>>cbs|c,c=(this[i]&bm)<=0;--i)r[i]=0;r[ds]=c,r.t=this.t+ds+1,r.s=this.s,r.clamp()},BigInteger.prototype.rShiftTo=function(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t)r.t=0;else{var bs=n%this.DB,cbs=this.DB-bs,bm=(1<>bs;for(var i=ds+1;i>bs;bs>0&&(r[this.t-ds-1]|=(this.s&bm)<>=this.DB;if(a.t>=this.DB;c+=this.s}else{for(c+=this.s;i>=this.DB;c-=a.s}r.s=c<0?-1:0,c<-1?r[i++]=this.DV+c:c>0&&(r[i++]=c),r.t=i,r.clamp()},BigInteger.prototype.multiplyTo=function(a,r){var x=this.abs(),y=a.abs(),i=x.t;for(r.t=i+y.t;--i>=0;)r[i]=0;for(i=0;i=0;)r[i]=0;for(i=0;i=x.DV&&(r[i+x.t]-=x.DV,r[i+x.t+1]=1)}r.t>0&&(r[r.t-1]+=x.am(i,x[i],r,2*i,0,1)),r.s=0,r.clamp()},BigInteger.prototype.divRemTo=function(m,q,r){var pm=m.abs();if(!(pm.t<=0)){var pt=this.abs();if(pt.t0?(pm.lShiftTo(nsh,y),pt.lShiftTo(nsh,r)):(pm.copyTo(y),pt.copyTo(r));var ys=y.t,y0=y[ys-1];if(0!=y0){var yt=y0*(1<1?y[ys-2]>>this.F2:0),d1=this.FV/yt,d2=(1<=0&&(r[r.t++]=1,r.subTo(t,r)),BigInteger.ONE.dlShiftTo(ys,t),t.subTo(y,y);y.t=0;){var qd=r[--i]==y0?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))0&&r.rShiftTo(nsh,r),ts<0&&BigInteger.ZERO.subTo(r,r)}}},BigInteger.prototype.invDigit=function(){if(this.t<1)return 0;var x=this[0];if(!(1&x))return 0;var y=3&x;return(y=(y=(y=(y=y*(2-(15&x)*y)&15)*(2-(255&x)*y)&255)*(2-((65535&x)*y&65535))&65535)*(2-x*y%this.DV)%this.DV)>0?this.DV-y:-y},BigInteger.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},BigInteger.prototype.exp=function(e,z){if(e>4294967295||e<1)return BigInteger.ONE;var r=nbi(),r2=nbi(),g=z.convert(this),i=nbits(e)-1;for(g.copyTo(r);--i>=0;)if(z.sqrTo(r,r2),(e&1<0)z.mulTo(r2,g,r);else{var t=r;r=r2,r2=t}return z.revert(r)},BigInteger.prototype.toString=function(b){if(this.s<0)return"-"+this.negate().toString(b);var k;if(16==b)k=4;else if(8==b)k=3;else if(2==b)k=1;else if(32==b)k=5;else{if(4!=b)return this.toRadix(b);k=2}var d,km=(1<0)for(p>p)>0&&(m=!0,r=int2char(d));i>=0;)p>(p+=this.DB-k)):(d=this[i]>>(p-=k)&km,p<=0&&(p+=this.DB,--i)),d>0&&(m=!0),m&&(r+=int2char(d));return m?r:"0"},BigInteger.prototype.negate=function(){var r=nbi();return BigInteger.ZERO.subTo(this,r),r},BigInteger.prototype.abs=function(){return this.s<0?this.negate():this},BigInteger.prototype.compareTo=function(a){var r=this.s-a.s;if(0!=r)return r;var i=this.t;if(0!=(r=i-a.t))return this.s<0?-r:r;for(;--i>=0;)if(0!=(r=this[i]-a[i]))return r;return 0},BigInteger.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)},BigInteger.prototype.mod=function(a){var r=nbi();return this.abs().divRemTo(a,null,r),this.s<0&&r.compareTo(BigInteger.ZERO)>0&&a.subTo(r,r),r},BigInteger.prototype.modPowInt=function(e,m){var z;return z=e<256||m.isEven()?new Classic(m):new Montgomery(m),this.exp(e,z)},BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1),BigInteger.prototype.fromRadix=function(s,b){this.fromInt(0),null==b&&(b=10);for(var cs=this.chunkSize(b),d=Math.pow(b,cs),mi=!1,j=0,w=0,i=0;i=cs&&(this.dMultiply(d),this.dAddOffset(w,0),j=0,w=0))}j>0&&(this.dMultiply(Math.pow(b,j)),this.dAddOffset(w,0)),mi&&BigInteger.ZERO.subTo(this,this)},BigInteger.prototype.chunkSize=function(r){return Math.floor(Math.LN2*this.DB/Math.log(r))},BigInteger.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},BigInteger.prototype.dMultiply=function(n){this[this.t]=this.am(0,n-1,this,0,0,this.t),++this.t,this.clamp()},BigInteger.prototype.dAddOffset=function(n,w){if(0!=n){for(;this.t<=w;)this[this.t++]=0;for(this[w]+=n;this[w]>=this.DV;)this[w]-=this.DV,++w>=this.t&&(this[this.t++]=0),++this[w]}},BigInteger.prototype.toRadix=function(b){if(null==b&&(b=10),0==this.signum()||b<2||b>36)return"0";var cs=this.chunkSize(b),a=Math.pow(b,cs),d=nbv(a),y=nbi(),z=nbi(),r="";for(this.divRemTo(d,y,z);y.signum()>0;)r=(a+z.intValue()).toString(b).substr(1)+r,y.divRemTo(d,y,z);return z.intValue().toString(b)+r},BigInteger.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>=this.DB;if(a.t>=this.DB;c+=this.s}else{for(c+=this.s;i>=this.DB;c+=a.s}r.s=c<0?-1:0,c>0?r[i++]=c:c<-1&&(r[i++]=this.DV+c),r.t=i,r.clamp()};var Wrapper={abs:function(l,h){var ret,x=new goog.math.Long(l,h);ret=x.isNegative()?x.negate():x,HEAP32[tempDoublePtr>>2]=ret.low_,HEAP32[tempDoublePtr+4>>2]=ret.high_},ensureTemps:function(){Wrapper.ensuredTemps||(Wrapper.ensuredTemps=!0,Wrapper.two32=new BigInteger,Wrapper.two32.fromString("4294967296",10),Wrapper.two64=new BigInteger,Wrapper.two64.fromString("18446744073709551616",10),Wrapper.temp1=new BigInteger,Wrapper.temp2=new BigInteger)},lh2bignum:function(l,h){var a=new BigInteger;a.fromString(h.toString(),10);var b=new BigInteger;a.multiplyTo(Wrapper.two32,b);var c=new BigInteger;c.fromString(l.toString(),10);var d=new BigInteger;return c.addTo(b,d),d},stringify:function(l,h,unsigned){var ret=new goog.math.Long(l,h).toString();if(unsigned&&"-"==ret[0]){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(ret,10),ret=new BigInteger,Wrapper.two64.addTo(bignum,ret),ret=ret.toString(10)}return ret},fromString:function(str,base,min,max,unsigned){Wrapper.ensureTemps();var bignum=new BigInteger;bignum.fromString(str,base);var bigmin=new BigInteger;bigmin.fromString(min,10);var bigmax=new BigInteger;if(bigmax.fromString(max,10),unsigned&&bignum.compareTo(BigInteger.ZERO)<0){var temp=new BigInteger;bignum.addTo(Wrapper.two64,temp),bignum=temp}var error=!1;bignum.compareTo(bigmin)<0?(bignum=bigmin,error=!0):bignum.compareTo(bigmax)>0&&(bignum=bigmax,error=!0);var ret=goog.math.Long.fromString(bignum.toString());if(HEAP32[tempDoublePtr>>2]=ret.low_,HEAP32[tempDoublePtr+4>>2]=ret.high_,error)throw"range error"}};return Wrapper}(),initialStackTop;function ExitStatus(status){this.name="ExitStatus",this.message="Program terminated with exit("+status+")",this.status=status}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var preloadStartTime=null,calledMain=!1;function run(args){function doRun(){Module.calledRun||(Module.calledRun=!0,ABORT||(ensureInitRuntime(),preMain(),ENVIRONMENT_IS_WEB&&null!==preloadStartTime&&Module.printErr("pre-main prep time: "+(Date.now()-preloadStartTime)+" ms"),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(args),postRun()))}args=args||Module.arguments,null===preloadStartTime&&(preloadStartTime=Date.now()),runDependencies>0||(preRun(),runDependencies>0||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),doRun()},1)):doRun()))}function exit(status,implicit){if(!implicit||!Module.noExitRuntime)throw Module.noExitRuntime||(ABORT=!0,EXITSTATUS=status,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(status)),ENVIRONMENT_IS_NODE?(process.stdout.once("drain",function(){process.exit(status)}),console.log(" "),setTimeout(function(){process.exit(status)},500)):ENVIRONMENT_IS_SHELL&&"function"==typeof quit&&quit(status),new ExitStatus(status)}dependenciesFulfilled=function runCaller(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=runCaller)},Module.callMain=Module.callMain=function(args){assert(0==runDependencies,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(0==__ATPRERUN__.length,"cannot call main when preRun functions remain to be called"),args=args||[],ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<3;i++)argv.push(0)}var argv=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];pad();for(var i=0;i0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();var NUM_CH=2,HEAPU8=Module.HEAPU8,malloc=Module._malloc,free=Module._free,lame_init=Module._lame_init,lame_set_mode=Module._lame_set_mode,lame_set_num_channels=Module._lame_set_num_channels,lame_set_in_samplerate=Module._lame_set_in_samplerate,lame_set_brate=Module._lame_set_brate,lame_init_params=Module._lame_init_params,lame_encode_buffer_ieee_float=Module._lame_encode_buffer_ieee_float,lame_encode_flush=Module._lame_encode_flush,lame_close=Module._lame_close,Encoder=function(sampleRate,bitRate){this.gfp=lame_init(),lame_set_mode(this.gfp,1),lame_set_num_channels(this.gfp,NUM_CH),lame_set_in_samplerate(this.gfp,sampleRate),lame_set_brate(this.gfp,bitRate),lame_init_params(this.gfp),this.allocBuffers(8192),this.mp3Buffers=[]};Encoder.prototype.encode=function(buffers){var length=buffers[0].length;length>this.srcLen&&(this.freeBuffers(),this.allocBuffers(length));for(var ch=0;ch0;){encoder.encode(recBuffers.shift());var now=Date.now();now>timeout&&(postProgress((bufferCount-recBuffers.length)/bufferCount),timeout=now+options.progressInterval)}postProgress(1)}self.postMessage({command:"complete",blob:encoder.finish(options.mp3.mimeType)}),cleanup()}function cleanup(){encoder=recBuffers=void 0,bufferCount=0}self.onmessage=function(event){var data=event.data;switch(data.command){case"init":init(data);break;case"options":setOptions(data.options);break;case"start":start(data.bufferSize);break;case"record":record(data.buffer);break;case"finish":finish();break;case"cancel":cleanup()}},self.postMessage({command:"loaded"}); \ No newline at end of file diff --git a/loading.html b/loading.html index 951128d1e5..563ef60f36 100644 --- a/loading.html +++ b/loading.html @@ -31,6 +31,6 @@
- + diff --git a/package.json b/package.json index fea0582b77..9936753507 100644 --- a/package.json +++ b/package.json @@ -13,62 +13,61 @@ "email": "support@signal.org" }, "browserslist": "last 1 chrome versions", - "main": "app/main.main.js", + "main": "bundles/main.js", "scripts": { "postinstall": "pnpm run build:acknowledgments && pnpm run electron:install-app-deps", "postuninstall": "pnpm run build:acknowledgments", "start": "electron .", "generate": "run-s generate:phase-0 generate:phase-1", - "generate:phase-0": "run-p build:esbuild:scripts", - "generate:phase-1": "run-p --aggregate-output --print-label generate:phase-1:bundle build:icu-types build:compact-locales build:styles get-expire-time copy-components build:policy-files", - "generate:phase-1:bundle": "run-s build:protobuf build:esbuild:bundle", + "generate:phase-0": "run-s build:protobuf build:rolldown:prod", + "generate:phase-1": "run-p --aggregate-output --print-label build:icu-types build:compact-locales build:styles:prod get-expire-time build:webaudio-recorder build:policy-files", "build-release": "pnpm run build", "notarize": "echo 'No longer necessary'", - "get-strings": "ts-node ts/scripts/get-strings.node.ts && ts-node ts/scripts/gen-nsis-script.node.ts && ts-node ts/scripts/gen-locales-config.node.ts && run-p get-strings:locales get-strings:countries get-strings:emoji mark-unusued-strings-deleted && run-p build:compact-locales", - "get-strings:locales": "ts-node ./ts/scripts/build-localized-display-names.node.ts locales ts/scripts/locale-data/locale-display-names.csv build/locale-display-names.json", - "get-strings:countries": "ts-node ./ts/scripts/build-localized-display-names.node.ts countries ts/scripts/locale-data/country-display-names.csv build/country-display-names.json", - "get-strings:emoji": "ts-node ./ts/scripts/get-emoji-locales.node.ts", - "push-strings": "node ts/scripts/remove-strings.node.js && node ts/scripts/push-strings.node.js", - "mark-unusued-strings-deleted": "ts-node ./ts/scripts/mark-unused-strings-deleted.node.ts", - "get-expire-time": "node ts/scripts/get-expire-time.node.js", - "copy-components": "node ts/scripts/copy.node.js", + "get-strings": "tsx ts/scripts/get-strings.node.ts && tsx ts/scripts/gen-nsis-script.node.ts && tsx ts/scripts/gen-locales-config.node.ts && run-p get-strings:locales get-strings:countries get-strings:emoji mark-unusued-strings-deleted && run-p build:compact-locales", + "get-strings:locales": "tsx ./ts/scripts/build-localized-display-names.node.ts locales ts/scripts/locale-data/locale-display-names.csv build/locale-display-names.json", + "get-strings:countries": "tsx ./ts/scripts/build-localized-display-names.node.ts countries ts/scripts/locale-data/country-display-names.csv build/country-display-names.json", + "get-strings:emoji": "tsx ./ts/scripts/get-emoji-locales.node.ts", + "push-strings": "tsx ts/scripts/remove-strings.node.ts && tsx ts/scripts/push-strings.node.ts", + "mark-unusued-strings-deleted": "tsx ./ts/scripts/mark-unused-strings-deleted.node.ts", + "get-expire-time": "tsx ts/scripts/get-expire-time.node.ts", + "build:webaudio-recorder": "terser --compress ecma=2025 --toplevel components/mp3lameencoder/lib/Mp3LameEncoder.js components/webaudiorecorder/lib/WebAudioRecorderMp3.js -o js/WebAudioRecorderMp3.js", "build:protobuf": "protopiler --module cjs --output ts/protobuf/compiled.std.js --typedefs ts/protobuf/compiled.std.d.ts protos", "clean:protobuf": "rm -f ts/protobuf/compiled.std.d.ts ts/protobuf/compiled.std.js", - "prepare-beta-build": "node scripts/prepare_beta_build.js", - "prepare-alpha-build": "node scripts/prepare_alpha_build.js", - "prepare-alpha-version": "node scripts/prepare_tagged_version.js alpha", - "prepare-axolotl-build": "node scripts/prepare_axolotl_build.js", - "prepare-axolotl-version": "node scripts/prepare_tagged_version.js axolotl", - "prepare-adhoc-build": "node scripts/prepare_adhoc_build.js", - "prepare-adhoc-version": "node scripts/prepare_tagged_version.js adhoc", - "prepare-staging-build": "node scripts/prepare_staging_build.js", - "prepare-linux-build": "node scripts/prepare_linux_build.js", + "prepare-beta-build": "tsx scripts/prepare_beta_build.js", + "prepare-alpha-build": "tsx scripts/prepare_alpha_build.js", + "prepare-alpha-version": "tsx scripts/prepare_tagged_version.js alpha", + "prepare-axolotl-build": "tsx scripts/prepare_axolotl_build.js", + "prepare-axolotl-version": "tsx scripts/prepare_tagged_version.js axolotl", + "prepare-adhoc-build": "tsx scripts/prepare_adhoc_build.js", + "prepare-adhoc-version": "tsx scripts/prepare_tagged_version.js adhoc", + "prepare-staging-build": "tsx scripts/prepare_staging_build.js", + "prepare-linux-build": "tsx scripts/prepare_linux_build.js", "test": "run-s test-node test-electron test-lint-intl test-oxlint", - "test-electron": "node ts/scripts/test-electron.node.js", - "test-release": "node ts/scripts/test-release.node.js", - "test-node": "cross-env NODE_ENV=test LANG=en-us electron-mocha --timeout 10000 --file test/setup-test-node.js --recursive ts/test-node", - "test-mock": "node ts/scripts/mocha-separator.node.js --require ts/test-mock/setup-ci.node.js -- ts/test-mock/**/*_test.node.js", - "test-mock-docker": "mocha --require ts/test-mock/setup-ci.node.js ts/test-mock/**/*_test.docker.node.js", + "test-electron": "tsx ts/scripts/test-electron.node.ts", + "test-release": "tsx ts/scripts/test-release.node.ts", + "test-node": "cross-env NODE_ENV=test NODE_OPTIONS='--import=tsx' LANG=en-us electron-mocha --timeout 10000 --file ts/test-node/setup.preload.ts --recursive ts/test-node/**/*.ts ts/test-node/**/*.tsx", + "test-mock": "tsx ts/scripts/mocha-separator.node.ts --require ts/test-mock/setup-ci.node.ts -- ts/test-mock/**/*_test.node.ts", + "test-mock-docker": "mocha --require ts/test-mock/setup-ci.node.ts ts/test-mock/**/*_test.docker.node.ts", "test-oxlint": "mocha --require .oxlint/test-setup.mjs .oxlint/rules/**/*.test.mjs", - "test-lint-intl": "ts-node ./build/intl-linter/linter.node.ts --test", + "test-lint-intl": "tsx ./build/intl-linter/linter.node.ts --test", "oxlint": "oxlint", "lint": "run-p --aggregate-output --print-label lint-prettier lint-css check:types oxlint", - "lint-deps": "node ts/util/lint/linter.node.js", - "lint-license-comments": "ts-node ts/util/lint/license_comments.node.ts", + "lint-deps": "tsx ts/util/lint/linter.node.ts", + "lint-license-comments": "tsx ts/util/lint/license_comments.node.ts", "lint-prettier": "pprettier --check '**/*.{ts,tsx,d.ts,js,json,html,scss,md,yml,yaml}' '!node_modules/**'", - "lint-intl": "ts-node ./build/intl-linter/linter.node.ts", + "lint-intl": "tsx ./build/intl-linter/linter.node.ts", "lint-css": "stylelint '**/*.scss' --cache", "danger:local": "./danger/danger.sh local --base main", "danger:ci": "./danger/danger.sh ci --base origin/main", "format": "pprettier --write '**/*.{ts,tsx,d.ts,js,json,html,scss,md,yml,yaml}' '!node_modules/**'", "svgo": "svgo --multipass images/**/*.svg images/*.svg", - "transpile": "run-p check:types build:esbuild", + "transpile": "run-p check:types build:rolldown", "check:types": "tsgo --noEmit", "clean-transpile": "node ./scripts/clean-transpile.js", "ready": "npm-run-all --print-label clean-transpile generate --parallel lint lint-deps lint-intl test-node test-electron", "dev": "pnpm run build:protobuf && cross-env SIGNAL_ENV=storybook storybook dev --port 6006", - "dev:transpile": "run-p \"check:types --watch\" dev:esbuild dev:icu-types dev:protobuf", - "dev:esbuild": "node scripts/esbuild.js --watch", + "dev:transpile": "run-p \"check:types --watch\" dev:rolldown dev:icu-types dev:protobuf", + "dev:rolldown": "pnpm build:rolldown --watch", "dev:styles": "pnpm run '/^dev:styles:(sass|tailwind)$/'", "dev:styles:sass": "pnpm run build:styles:sass --watch", "dev:styles:tailwind": "pnpm run build:styles:tailwind --watch", @@ -78,33 +77,35 @@ "test:storybook": "pnpm run build:storybook && run-p --race test:storybook:*", "test:storybook:serve": "http-server storybook-static --port 6006 --silent", "test:storybook:test": "wait-on http://127.0.0.1:6006/ --timeout 5000 && test-storybook --testTimeout 60000", - "build": "run-s --print-label generate build:esbuild:prod build:release", - "build-win32-all": "run-s --print-label generate build:esbuild:prod build:release-win32-all", - "build-linux": "run-s build:policy-files generate build:esbuild:prod && pnpm run build:release --publish=never", + "build": "run-s --print-label generate build:rolldown:prod build:release", + "build-win32-all": "run-s --print-label generate build:rolldown:prod build:release-win32-all", + "build-linux": "run-s build:policy-files generate build:rolldown:prod && pnpm run build:release --publish=never", "build:acknowledgments": "node scripts/generate-acknowledgments.js", - "build:dns-fallback": "node ts/scripts/generate-dns-fallback.node.js", - "build:icu-types": "node ts/scripts/generate-icu-types.node.js", - "build:compact-locales": "node ts/scripts/generate-compact-locales.node.js", - "build:tray-icons": "ts-node ts/scripts/generate-tray-icons.node.ts", - "build:dev": "run-s --print-label generate build:esbuild:prod", - "build:esbuild": "node scripts/esbuild.js", - "build:esbuild:scripts": "node scripts/esbuild.js --no-bundle", - "build:esbuild:bundle": "node scripts/esbuild.js --no-scripts", - "build:esbuild:prod": "node scripts/esbuild.js --prod", - "build:policy-files": "node ts/scripts/gen-policy-files.node.js", - "build:styles": "pnpm run \"/^build:styles:.*/\"", - "build:styles:sass": "sass stylesheets/manifest.scss:stylesheets/manifest.css stylesheets/manifest_bridge.scss:stylesheets/manifest_bridge.css --fatal-deprecation=1.80.7", + "build:dns-fallback": "tsx ts/scripts/generate-dns-fallback.node.ts", + "build:icu-types": "tsx ts/scripts/generate-icu-types.node.ts", + "build:compact-locales": "tsx ts/scripts/generate-compact-locales.node.ts", + "build:tray-icons": "tsx ts/scripts/generate-tray-icons.node.ts", + "build:dev": "run-s --print-label generate build:rolldown:prod", + "build:rolldown": "rolldown -c", + "build:rolldown:prod": "pnpm build:rolldown --minify", + "build:esbuild:prod": "pnpm build:rolldown:prod", + "build:policy-files": "tsx ts/scripts/gen-policy-files.node.ts", + "build:styles": "pnpm run \"/^build:styles:(sass|tailwind)$/\"", + "build:styles:prod": "pnpm run \"/^build:styles:(sass|tailwind):prod$/\"", + "build:styles:sass": "sass stylesheets/manifest.scss:stylesheets/manifest.css stylesheets/manifest_bridge.scss:stylesheets/manifest_bridge.css node_modules/@signalapp/quill-cjs/dist/quill.core.css:stylesheets/quill.css --fatal-deprecation=1.80.7", "build:styles:tailwind": "tailwindcss -i ./stylesheets/tailwind-config.css -o ./stylesheets/tailwind.css", - "build:electron": "electron-builder --config.extraMetadata.environment=$SIGNAL_ENV", + "build:styles:sass:prod": "pnpm run build:styles:sass --style=compressed", + "build:styles:tailwind:prod": "pnpm run build:styles:tailwind --minify", + "build:electron": "cross-env NODE_OPTIONS='--import=tsx' electron-builder --config.extraMetadata.environment=$SIGNAL_ENV", "build:release": "cross-env SIGNAL_ENV=production pnpm run build:electron --config.directories.output=release", "build:mas-dev": "bash ./scripts/build-mas-dev.sh", "build:release-win32-all": "pnpm run build:release --arm64 --x64", - "build:preload-cache": "node ts/scripts/generate-preload-cache.node.js", + "build:preload-cache": "tsx ts/scripts/generate-preload-cache.node.ts", "build:emoji": "run-p build:emoji:32 build:emoji:64", "build:emoji:32": "cwebp -progress -mt -preset icon -alpha_filter best -alpha_q 20 -pass 10 -q 75 ./node_modules/emoji-datasource-apple/img/apple/sheets/32.png -o ./images/emoji-sheet-32.webp", "build:emoji:64": "cwebp -progress -mt -preset icon -alpha_filter best -alpha_q 20 -pass 10 -q 75 ./node_modules/emoji-datasource-apple/img/apple/sheets/64.png -o ./images/emoji-sheet-64.webp", "electron:install-app-deps": "electron-builder install-app-deps", - "check-upgradeable-deps": "ts-node ts/scripts/check-upgradeable-deps.node.ts", + "check-upgradeable-deps": "tsx ts/scripts/check-upgradeable-deps.node.ts", "react-devtools": "react-devtools", "run-with-devtools": "cross-env REACT_DEVTOOLS=1 run-p --print-label react-devtools start" }, @@ -112,113 +113,25 @@ "fs-xattr": "0.3.0" }, "dependencies": { - "@electron/asar": "3.4.1", - "@formatjs/fast-memoize": "2.2.3", - "@formatjs/icu-messageformat-parser": "2.9.3", - "@formatjs/intl-localematcher": "0.2.32", - "@indutny/dicer": "0.3.2", "@indutny/mac-screen-share": "1.0.13", - "@indutny/protopiler": "3.2.4", - "@indutny/range-finder": "1.3.4", "@indutny/simple-windows-notifications": "2.0.16", - "@indutny/sneequals": "4.0.0", - "@internationalized/date": "3.12.0", - "@popperjs/core": "2.11.8", - "@react-aria/focus": "3.21.5", - "@react-aria/interactions": "3.27.1", - "@react-aria/utils": "3.33.1", - "@react-spring/web": "10.0.3", - "@react-types/shared": "3.33.1", "@signalapp/libsignal-client": "0.90.0", - "@signalapp/minimask": "1.0.1", "@signalapp/mute-state-change": "workspace:1.0.0", - "@signalapp/quill-cjs": "2.1.2", "@signalapp/ringrtc": "2.67.0", "@signalapp/sqlcipher": "3.2.1", "@signalapp/windows-ucv": "1.0.1", - "@tanstack/react-virtual": "3.11.2", - "@types/dom-mediacapture-transform": "0.1.11", - "@types/fabric": "4.5.3", - "@typescript/native-preview": "7.0.0-dev.20260303.1", - "blob-util": "2.0.2", - "blueimp-load-image": "5.16.0", - "blurhash": "2.0.5", - "buffer": "6.0.3", - "card-validator": "10.0.3", - "changedpi": "1.0.4", - "cirbuf": "1.0.2", - "classnames": "2.5.1", - "config": "3.3.12", - "copy-text-to-clipboard": "2.1.0", - "country-codes-list": "2.0.0", - "credit-card-type": "10.0.2", - "dashdash": "2.0.0", - "direction": "1.0.4", - "dom-accessibility-api": "0.7.0", "emoji-datasource": "16.0.0", "emoji-datasource-apple": "16.0.0", - "emoji-regex": "10.4.0", - "encoding": "0.1.13", - "fabric": "4.6.0", - "fast-glob": "3.3.2", - "filesize": "9.0.11", - "firstline": "2.0.2", - "focus-trap-react": "10.3.1", - "form-data": "4.0.1", "fs-extra": "11.2.0", - "fuse.js": "6.5.3", "google-libphonenumber": "3.2.39", "got": "11.8.5", - "growing-file": "0.1.3", - "heic-convert": "2.1.0", - "humanize-duration": "3.27.1", "intl-tel-input": "24.7.0", - "js-yaml": "4.1.0", - "linkify-it": "5.0.0", - "lodash": "4.17.21", - "lru-cache": "11.0.2", - "memoizee": "0.4.17", - "moment": "2.30.1", - "motion": "12.35.1", - "mp4box": "0.5.3", "node-fetch": "2.6.7", - "nop": "1.0.0", - "normalize-path": "3.0.0", - "p-map": "7.0.4", - "p-queue": "6.6.2", - "p-timeout": "4.1.0", - "parsecurrency": "1.1.1", - "pify": "3.0.0", "pino": "9.8.0", - "proxy-agent": "6.4.0", - "qrcode-generator": "1.4.4", - "radix-ui": "1.4.3", - "react": "19.2.4", - "react-aria": "3.47.0", - "react-aria-components": "1.16.0", - "react-blurhash": "0.3.0", - "react-dom": "19.2.4", - "react-intl": "7.1.11", - "react-popper": "2.3.0", - "react-redux": "9.2.0", - "react-virtualized": "9.22.6", - "read-last-lines": "1.8.0", - "redux": "5.0.1", - "redux-logger": "3.0.6", - "redux-promise-middleware": "6.2.0", - "redux-thunk": "3.1.0", - "reselect": "5.1.1", - "semver": "7.6.3", - "split2": "4.2.0", - "tinykeys": "3.0.0", - "type-fest": "4.26.1", - "url": "0.11.4", - "urlpattern-polyfill": "10.0.0", - "uuid": "11.0.2", - "write-file-atomic": "6.0.0", - "zod": "3.23.8" + "proxy-agent": "6.4.0" }, "devDependencies": { + "linkify-it": "5.0.0", "@babel/core": "7.26.0", "@babel/plugin-proposal-class-properties": "7.18.6", "@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6", @@ -227,14 +140,31 @@ "@babel/plugin-transform-typescript": "7.25.9", "@babel/preset-react": "7.25.9", "@babel/preset-typescript": "7.26.0", + "@electron/asar": "3.4.1", "@electron/fuses": "1.5.0", "@electron/notarize": "2.1.0", "@electron/symbolicate-mac": "2.3.1", + "@formatjs/fast-memoize": "2.2.3", + "@formatjs/icu-messageformat-parser": "2.9.3", "@formatjs/intl": "2.10.14", + "@formatjs/intl-localematcher": "0.2.32", + "@indutny/dicer": "0.3.2", "@indutny/parallel-prettier": "3.0.0", + "@indutny/protopiler": "3.2.4", + "@indutny/range-finder": "1.3.4", "@indutny/rezip-electron": "3.0.2", + "@indutny/sneequals": "4.0.0", + "@internationalized/date": "3.12.0", "@napi-rs/canvas": "0.1.61", + "@popperjs/core": "2.11.8", + "@react-aria/focus": "3.21.5", + "@react-aria/interactions": "3.27.1", + "@react-aria/utils": "3.33.1", + "@react-spring/web": "10.0.3", + "@react-types/shared": "3.33.1", + "@signalapp/minimask": "1.0.1", "@signalapp/mock-server": "18.3.0", + "@signalapp/quill-cjs": "2.1.2", "@storybook/addon-a11y": "8.4.4", "@storybook/addon-actions": "8.4.4", "@storybook/addon-controls": "8.4.4", @@ -253,6 +183,7 @@ "@storybook/types": "8.1.11", "@tailwindcss/cli": "4.1.7", "@tailwindcss/postcss": "4.1.7", + "@tanstack/react-virtual": "3.11.2", "@types/blueimp-load-image": "5.16.6", "@types/chai": "4.3.16", "@types/chai-as-promised": "7.1.4", @@ -260,6 +191,8 @@ "@types/dashdash": "1.14.3", "@types/debug": "4.1.12", "@types/direction": "1.0.0", + "@types/dom-mediacapture-transform": "0.1.11", + "@types/fabric": "4.5.3", "@types/fs-extra": "11.0.4", "@types/google-libphonenumber": "7.4.30", "@types/humanize-duration": "3.18.1", @@ -294,46 +227,87 @@ "@typescript-eslint/parser": "8.57.2", "@typescript-eslint/rule-tester": "8.57.2", "@typescript-eslint/utils": "8.57.2", + "@typescript/native-preview": "7.0.0-dev.20260303.1", "axe-core": "4.10.2", "babel-core": "7.0.0-bridge.0", "babel-loader": "9.2.1", "babel-plugin-lodash": "3.3.4", "better-blockmap": "2.0.1", + "blob-util": "2.0.2", + "blueimp-load-image": "5.16.0", + "blurhash": "2.0.5", + "buffer": "6.0.3", + "card-validator": "10.0.3", "casual": "1.6.2", "chai": "4.4.1", "chai-as-promised": "7.1.1", "chalk": "4.1.2", + "changedpi": "1.0.4", "chokidar-cli": "3.0.0", + "cirbuf": "1.0.2", + "classnames": "2.5.1", + "config": "3.3.12", + "copy-text-to-clipboard": "2.1.0", + "country-codes-list": "2.0.0", + "credit-card-type": "10.0.2", "cross-env": "7.0.3", "css-loader": "7.1.2", "csv-parse": "5.5.6", "danger": "12.3.3", + "dashdash": "2.0.0", "debug": "4.3.7", + "direction": "1.0.4", + "dom-accessibility-api": "0.7.0", "electron": "40.8.5", "electron-builder": "26.0.14", "electron-mocha": "13.0.1", + "emoji-regex": "10.4.0", + "encoding": "0.1.13", "endanger": "7.0.4", "enhanced-resolve": "5.18.3", "enquirer": "2.4.1", - "esbuild": "0.25.9", "eslint": "10.1.0", "eslint-plugin-better-tailwindcss": "4.3.2", "execa": "5.1.1", + "fabric": "4.6.0", + "fast-glob": "3.3.2", + "filesize": "9.0.11", + "firstline": "2.0.2", + "focus-trap-react": "10.3.1", + "form-data": "4.0.1", + "fuse.js": "6.5.3", + "growing-file": "0.1.3", + "heic-convert": "2.1.0", "html-webpack-plugin": "5.6.3", "http-server": "14.1.1", + "humanize-duration": "3.27.1", "is-glob": "4.0.3", + "js-yaml": "4.1.0", "json-to-ast": "2.1.0", + "lodash": "4.17.21", "log-symbols": "4.1.0", + "lru-cache": "11.0.2", + "memoizee": "0.4.17", "micromatch": "4.0.8", "mini-css-extract-plugin": "2.9.2", "mocha": "10.8.2", + "moment": "2.30.1", + "motion": "12.35.1", + "mp4box": "0.5.3", "node-gyp": "11.0.0", "node-gyp-build": "4.8.4", + "nop": "1.0.0", + "normalize-path": "3.0.0", "npm-run-all": "4.1.5", "oxlint": "1.57.0", "oxlint-tsgolint": "0.17.4", "p-limit": "3.1.0", + "p-map": "7.0.4", + "p-queue": "6.6.2", + "p-timeout": "4.1.0", + "parsecurrency": "1.1.1", "pe-library": "2.0.1", + "pify": "3.0.0", "pixelmatch": "5.3.0", "playwright": "1.58.2", "pngjs": "7.0.0", @@ -341,12 +315,32 @@ "postcss-loader": "8.1.1", "prettier": "3.7.4", "prettier-plugin-tailwindcss": "0.7.2", + "qrcode-generator": "1.4.4", + "radix-ui": "1.4.3", + "react": "19.2.4", + "react-aria": "3.47.0", + "react-aria-components": "1.16.0", + "react-blurhash": "0.3.0", "react-devtools": "6.0.1", "react-devtools-core": "6.0.1", + "react-dom": "19.2.4", + "react-intl": "7.1.11", + "react-popper": "2.3.0", + "react-redux": "9.2.0", + "react-virtualized": "9.22.6", + "read-last-lines": "1.8.0", + "redux": "5.0.1", + "redux-logger": "3.0.6", + "redux-promise-middleware": "6.2.0", + "redux-thunk": "3.1.0", + "reselect": "5.1.1", "resolve-url-loader": "5.0.0", + "rolldown": "1.0.0-rc.9", "sass": "1.80.7", "sass-loader": "16.0.3", + "semver": "7.6.3", "sinon": "19.0.2", + "split2": "4.2.0", "storybook": "8.4.4", "style-loader": "4.0.0", "stylelint": "16.10.0", @@ -356,13 +350,21 @@ "svgo": "3.3.2", "synckit": "0.11.11", "tailwindcss": "4.2.1", + "terser": "5.46.1", "terser-webpack-plugin": "5.3.10", - "ts-node": "10.9.2", + "tinykeys": "3.0.0", + "tsx": "4.21.0", + "type-fest": "4.26.1", "typescript": "5.9.3", + "url": "0.11.4", + "urlpattern-polyfill": "10.0.0", + "uuid": "11.0.2", "wait-on": "8.0.1", "webpack": "5.96.1", "webpack-cli": "5.1.4", - "webpack-dev-server": "5.1.0" + "webpack-dev-server": "5.1.0", + "write-file-atomic": "6.0.0", + "zod": "3.23.8" }, "pnpm": { "overrides": { @@ -392,7 +394,8 @@ "fs-xattr": "patches/fs-xattr.patch", "@types/chai": "patches/@types__chai.patch", "@napi-rs/canvas@0.1.61": "patches/@napi-rs__canvas@0.1.61.patch", - "playwright-core@1.58.2": "patches/playwright-core@1.58.2.patch" + "playwright-core@1.58.2": "patches/playwright-core@1.58.2.patch", + "tsx": "patches/tsx.patch" }, "onlyBuiltDependencies": [ "@indutny/mac-screen-share", @@ -405,7 +408,6 @@ "@swc/core", "@tailwindcss/oxide", "electron", - "esbuild", "fs-xattr" ], "ignoredBuiltDependencies": [ @@ -435,7 +437,7 @@ } ], "mergeASARs": true, - "sign": "./ts/scripts/sign-macos.node.js", + "sign": "./ts/scripts/sign-macos.node.ts", "releaseInfo": { "vendor": { "minOSVersion": "21.0.1" @@ -503,7 +505,7 @@ "certificateSubjectName": "Signal Messenger, LLC", "certificateSha1": "8D5E3CD800736C5E1FE459A1F5AA48287D4F6EC6", "publisherName": "Signal Messenger, LLC", - "sign": "./ts/scripts/sign-windows.node.js", + "sign": "./ts/scripts/sign-windows.node.ts", "signingHashAlgorithms": [ "sha256" ] @@ -601,10 +603,10 @@ "signalcaptcha" ] }, - "artifactBuildCompleted": "ts/scripts/artifact-build-completed.node.js", - "afterSign": "ts/scripts/after-sign.node.js", - "afterPack": "ts/scripts/after-pack.node.js", - "afterAllArtifactBuild": "ts/scripts/after-all-artifact-build.node.js", + "artifactBuildCompleted": "ts/scripts/artifact-build-completed.node.ts", + "afterSign": "ts/scripts/after-sign.node.ts", + "afterPack": "ts/scripts/after-pack.node.ts", + "afterAllArtifactBuild": "ts/scripts/after-all-artifact-build.node.ts", "asar": { "smartUnpack": false }, @@ -635,8 +637,6 @@ }, "js/**", "libtextsecure/**", - "ts/**/*.js", - "ts/*.js", "!ts/scripts/**", "!build", "!ts/{storybook,test-helpers,test-node,test-mock,test-electron}", @@ -658,17 +658,12 @@ "!js/register.js", "!fixtures", "stylesheets/*.css", - "app/*", - "!app/*.ts", - "preload.bundle.js", - "preload.wrapper.js", "preload.bundle.cache", - "preload_utils.js", - "main.js", "images/**", "fonts/**", "sounds/*", - "build/icons", + "build/icons/png/512x512.png", + "build/icons/win/icon.ico", "build/available-locales.json", "build/locale-display-names.json", "build/country-display-names.json", @@ -701,8 +696,8 @@ "!node_modules/@signalapp/ringrtc/scripts/*", "node_modules/@signalapp/ringrtc/build/${platform}/*${arch}*.node", "node_modules/@signalapp/windows-ucv/build/Release/*.node", + "!node_modules/@signalapp/mute-state-change/build/Release/*.mm", "node_modules/@signalapp/mute-state-change/build/Release/*.node", - "node_modules/@signalapp/mute-state-change/build/Release/*.mm", "node_modules/@indutny/simple-windows-notifications/prebuilds/${platform}-${arch}/*.node", "node_modules/@indutny/mac-screen-share/build/Release/*.node", "node_modules/fs-xattr/build/Release/*.node", @@ -721,8 +716,6 @@ "!node_modules/mp4box/**", "node_modules/mp4box/package.json", "node_modules/mp4box/dist/mp4box.all.js", - "!node_modules/@signalapp/quill-cjs/**", - "node_modules/@signalapp/quill-cjs/dist/*.css", "!node_modules/node_modules/fabric/src/**", "!node_modules/react-blurhash/docs/**", "!node_modules/motion/**", diff --git a/patches/tsx.patch b/patches/tsx.patch new file mode 100644 index 0000000000..03ea366765 --- /dev/null +++ b/patches/tsx.patch @@ -0,0 +1,51 @@ +diff --git a/dist/index-7AaEi15b.mjs b/dist/index-7AaEi15b.mjs +index 4a5eb3479bc219b46142e63dea6dc81b4ec4d076..299b24fc9fa11a0d26232e864feec75803dd58ca 100644 +--- a/dist/index-7AaEi15b.mjs ++++ b/dist/index-7AaEi15b.mjs +@@ -1,14 +1,14 @@ +-var Pt=Object.defineProperty;var f=(s,e)=>Pt(s,"name",{value:e,configurable:!0});import{fileURLToPath as Jt,pathToFileURL as Gt}from"node:url";import{version as Ae,transformSync as qt,transform as zt}from"esbuild";import Ht from"node:crypto";import U from"node:fs";import X from"node:path";import Xt from"node:os";import{t as Kt}from"./temporary-directory-CwHp0_NW.mjs";const Ne=f(s=>Ht.createHash("sha1").update(s).digest("hex"),"sha1"),Ie=44,Yt=59,Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$e=new Uint8Array(64),Ue=new Uint8Array(128);for(let s=0;s>>=1,p&&(o=-2147483648|-o),n[i]+=o,e}f(K,"decodeInteger");function je(s,e,n){return e>=n?!1:s.charCodeAt(e)!==Ie}f(je,"hasMoreVlq");function Vt(s){s.sort(en)}f(Vt,"sort");function en(s,e){return s[0]-e[0]}f(en,"sortComparator$1");function De(s){const e=new Int32Array(5),n=1024*16,i=n-36,o=new Uint8Array(n),c=o.subarray(0,i);let u=0,p="";for(let g=0;g0&&(u===n&&(p+=me.decode(o),u=0),o[u++]=Yt),b.length!==0){e[0]=0;for(let d=0;di&&(p+=me.decode(c),o.copyWithin(0,i,u),u-=i),d>0&&(o[u++]=Ie),u=Y(o,u,e,r,0),r.length!==1&&(u=Y(o,u,e,r,1),u=Y(o,u,e,r,2),u=Y(o,u,e,r,3),r.length!==4&&(u=Y(o,u,e,r,4)))}}}return p+me.decode(o.subarray(0,u))}f(De,"encode");function Y(s,e,n,i,o){const c=i[o];let u=c-n[o];n[o]=c,u=u<0?-u<<1|1:u<<1;do{let p=u&31;u>>>=5,u>0&&(p|=32),s[e++]=$e[p]}while(u>0);return e}f(Y,"encodeInteger");class ae{static{f(this,"BitSet")}constructor(e){this.bits=e instanceof ae?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class ee{static{f(this,"Chunk")}constructor(e,n,i){this.start=e,this.end=n,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new ee(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.startglobalThis.btoa(unescape(encodeURIComponent(s))):typeof Buffer=="function"?s=>Buffer.from(s,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}f(tn,"getBtoa");const nn=tn();let rn=class{static{f(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=De(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+nn(this.toString())}};function sn(s){const e=s.split(` +-`),n=e.filter(c=>/^\t+/.test(c)),i=e.filter(c=>/^ {2,}/.test(c));if(n.length===0&&i.length===0)return null;if(n.length>=i.length)return" ";const o=i.reduce((c,u)=>{const p=/^ +/.exec(u)[0].length;return Math.min(p,c)},1/0);return new Array(o+1).join(" ")}f(sn,"guessIndent");function on(s,e){const n=s.split(/[/\\]/),i=e.split(/[/\\]/);for(n.pop();n[0]===i[0];)n.shift(),i.shift();if(n.length){let o=n.length;for(;o--;)n[o]=".."}return n.concat(i).join("/")}f(on,"getRelativePath");const an=Object.prototype.toString;function cn(s){return an.call(s)==="[object Object]"}f(cn,"isObject");function Te(s){const e=s.split(` +-`),n=[];for(let i=0,o=0;i>1;oBt(s,"name",{value:e,configurable:!0});import{fileURLToPath as Pt,pathToFileURL as Gt}from"node:url";import X,{dirname as qt}from"node:path";import{version as Ae,transformSync as zt,transform as Ht}from"esbuild";import Xt from"node:crypto";import U from"node:fs";import Kt from"node:os";import{t as Yt}from"./temporary-directory-CwHp0_NW.mjs";const Ne=h(s=>Xt.createHash("sha1").update(s).digest("hex"),"sha1"),Ie=44,Qt=59,Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$e=new Uint8Array(64),Ue=new Uint8Array(128);for(let s=0;s>>=1,p&&(o=-2147483648|-o),n[i]+=o,e}h(K,"decodeInteger");function je(s,e,n){return e>=n?!1:s.charCodeAt(e)!==Ie}h(je,"hasMoreVlq");function en(s){s.sort(tn)}h(en,"sort");function tn(s,e){return s[0]-e[0]}h(tn,"sortComparator$1");function De(s){const e=new Int32Array(5),n=1024*16,i=n-36,o=new Uint8Array(n),c=o.subarray(0,i);let u=0,p="";for(let g=0;g0&&(u===n&&(p+=we.decode(o),u=0),o[u++]=Qt),b.length!==0){e[0]=0;for(let d=0;di&&(p+=we.decode(c),o.copyWithin(0,i,u),u-=i),d>0&&(o[u++]=Ie),u=Y(o,u,e,r,0),r.length!==1&&(u=Y(o,u,e,r,1),u=Y(o,u,e,r,2),u=Y(o,u,e,r,3),r.length!==4&&(u=Y(o,u,e,r,4)))}}}return p+we.decode(o.subarray(0,u))}h(De,"encode");function Y(s,e,n,i,o){const c=i[o];let u=c-n[o];n[o]=c,u=u<0?-u<<1|1:u<<1;do{let p=u&31;u>>>=5,u>0&&(p|=32),s[e++]=$e[p]}while(u>0);return e}h(Y,"encodeInteger");class ae{static{h(this,"BitSet")}constructor(e){this.bits=e instanceof ae?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class ee{static{h(this,"Chunk")}constructor(e,n,i){this.start=e,this.end=n,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new ee(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.startglobalThis.btoa(unescape(encodeURIComponent(s))):typeof Buffer=="function"?s=>Buffer.from(s,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}h(nn,"getBtoa");const rn=nn();let sn=class{static{h(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=De(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+rn(this.toString())}};function on(s){const e=s.split(` ++`),n=e.filter(c=>/^\t+/.test(c)),i=e.filter(c=>/^ {2,}/.test(c));if(n.length===0&&i.length===0)return null;if(n.length>=i.length)return" ";const o=i.reduce((c,u)=>{const p=/^ +/.exec(u)[0].length;return Math.min(p,c)},1/0);return new Array(o+1).join(" ")}h(on,"guessIndent");function an(s,e){const n=s.split(/[/\\]/),i=e.split(/[/\\]/);for(n.pop();n[0]===i[0];)n.shift(),i.shift();if(n.length){let o=n.length;for(;o--;)n[o]=".."}return n.concat(i).join("/")}h(an,"getRelativePath");const cn=Object.prototype.toString;function un(s){return cn.call(s)==="[object Object]"}h(un,"isObject");function Te(s){const e=s.split(` ++`),n=[];for(let i=0,o=0;i>1;o=0&&c>u;){const b=[this.generatedCodeColumn,e,i.line,i.column];o>=0&&b.push(o),this.rawSegments.push(b),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,p=u,u=n.indexOf(` +-`,u+1)}const g=[this.generatedCodeColumn,e,i.line,i.column];o>=0&&g.push(o),this.rawSegments.push(g),this.advance(n.slice(p+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null}addUneditedChunk(e,n,i,o,c){let u=n.start,p=!0,g=!1;for(;u=0&&g.push(o),this.rawSegments.push(g),this.advance(n.slice(p+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null}addUneditedChunk(e,n,i,o,c){let u=n.start,p=!0,g=!1;for(;u1){for(let i=0;i{const p=c(u.start);u.intro.length&&o.advance(u.intro),u.edited?o.addEdit(n,u.content,p,u.storeName?i.indexOf(u.original):-1):o.addUneditedChunk(n,u,this.original,p,this.sourcemapLocations),u.outro.length&&o.advance(u.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?on(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:i,mappings:o.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(e){return new rn(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=sn(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,n){const i=/^[^\r\n]/gm;if(cn(e)&&(n=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;n=n||{};const o={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(d=>{for(let r=d[0];rc?`${e}${b}`:(c=!0,b),"replacer");this.intro=this.intro.replace(i,u);let p=0,g=this.firstChunk;for(;g;){const b=g.end;if(g.edited)o[p]||(g.content=g.content.replace(i,u),g.content.length&&(c=g.content[g.content.length-1]===` ++`,P={insertLeft:!1,insertRight:!1,storeName:!1};class _e{static{h(this,"MagicString")}constructor(e,n={}){const i=new ee(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:n.filename},indentExclusionRanges:{writable:!0,value:n.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new ae},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:n.ignoreList}}),this.byStart[0]=i,this.byEnd[e.length]=i}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,n){if(typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.appendLeft(n):this.intro+=n,this}appendRight(e,n){if(typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.appendRight(n):this.outro+=n,this}clone(){const e=new _e(this.original,{filename:this.filename});let n=this.firstChunk,i=e.firstChunk=e.lastSearchedChunk=n.clone();for(;n;){e.byStart[i.start]=i,e.byEnd[i.end]=i;const o=n.next,c=o&&o.clone();c&&(i.next=c,c.previous=i,i=c),n=o}return e.lastChunk=i,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new ae(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const n=0,i=Object.keys(this.storedNames),o=new fn(e.hires),c=Te(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(u=>{const p=c(u.start);u.intro.length&&o.advance(u.intro),u.edited?o.addEdit(n,u.content,p,u.storeName?i.indexOf(u.original):-1):o.addUneditedChunk(n,u,this.original,p,this.sourcemapLocations),u.outro.length&&o.advance(u.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?an(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:i,mappings:o.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(e){return new sn(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=on(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,n){const i=/^[^\r\n]/gm;if(un(e)&&(n=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;n=n||{};const o={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(d=>{for(let r=d[0];rc?`${e}${b}`:(c=!0,b),"replacer");this.intro=this.intro.replace(i,u);let p=0,g=this.firstChunk;for(;g;){const b=g.end;if(g.edited)o[p]||(g.content=g.content.replace(i,u),g.content.length&&(c=g.content[g.content.length-1]===` + `));else for(p=g.start;p=e&&i<=n)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(n),this._split(i);const o=this.byStart[e],c=this.byEnd[n],u=o.previous,p=c.next,g=this.byStart[i];if(!g&&c===this.lastChunk)return this;const b=g?g.previous:this.lastChunk;return u&&(u.next=p),p&&(p.previous=u),b&&(b.next=o),g&&(g.previous=c),o.previous||(this.firstChunk=c.next),c.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=b,c.next=g||null,b||(this.firstChunk=o),g||(this.lastChunk=c),this}overwrite(e,n,i,o){return o=o||{},this.update(e,n,i,{...o,overwrite:!o.contentOnly})}update(e,n,i,o){if(typeof i!="string")throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length;if(n>this.original.length)throw new Error("end is out of bounds");if(e===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(n),o===!0&&(J.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),J.storeName=!0),o={storeName:!0});const c=o!==void 0?o.storeName:!1,u=o!==void 0?o.overwrite:!1;if(c){const b=this.original.slice(e,n);Object.defineProperty(this.storedNames,b,{writable:!0,value:!0,enumerable:!0})}const p=this.byStart[e],g=this.byEnd[n];if(p){let b=p;for(;b!==g;){if(b.next!==this.byStart[b.end])throw new Error("Cannot overwrite across a split point");b=b.next,b.edit("",!1)}p.edit(i,c,!u)}else{const b=new ee(e,n,"").edit(i,c);g.next=b,b.previous=g}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,n){if(typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.prependLeft(n):this.intro=n+this.intro,this}prependRight(e,n){if(typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.prependRight(n):this.outro=n+this.outro,this}remove(e,n){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length;if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let i=this.byStart[e];for(;i;)i.intro="",i.outro="",i.edit(""),i=n>i.end?this.byStart[i.end]:null;return this}reset(e,n){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length;if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let i=this.byStart[e];for(;i;)i.reset(),i=n>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(Q);if(e!==-1)return this.outro.substr(e+1);let n=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(e=i.outro.lastIndexOf(Q),e!==-1)return i.outro.substr(e+1)+n;n=i.outro+n}if(i.content.length>0){if(e=i.content.lastIndexOf(Q),e!==-1)return i.content.substr(e+1)+n;n=i.content+n}if(i.intro.length>0){if(e=i.intro.lastIndexOf(Q),e!==-1)return i.intro.substr(e+1)+n;n=i.intro+n}}while(i=i.previous);return e=this.intro.lastIndexOf(Q),e!==-1?this.intro.substr(e+1)+n:this.intro+n}slice(e=0,n=this.original.length){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length;let i="",o=this.firstChunk;for(;o&&(o.start>e||o.end<=e);){if(o.start=n)return i;o=o.next}if(o&&o.edited&&o.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const c=o;for(;o;){o.intro&&(c!==o||o.start===e)&&(i+=o.intro);const u=o.start=n;if(u&&o.edited&&o.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);const p=c===o?e-o.start:0,g=u?o.content.length+n-o.end:o.content.length;if(i+=o.content.slice(p,g),o.outro&&(!u||o.end===n)&&(i+=o.outro),u)break;o=o.next}return i}snip(e,n){const i=this.clone();return i.remove(0,e),i.remove(n,i.original.length),i}_split(e){if(this.byStart[e]||this.byEnd[e])return;let n=this.lastSearchedChunk;const i=e>n.end;for(;n;){if(n.contains(e))return this._splitChunk(n,e);n=i?this.byStart[n.end]:this.byEnd[n.start]}}_splitChunk(e,n){if(e.edited&&e.content.length){const o=Te(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${e.original}")`)}const i=e.split(n);return this.byEnd[n]=e,this.byStart[n]=i,this.byEnd[i.end]=i,e===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,n=this.firstChunk;for(;n;)e+=n.toString(),n=n.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,n=0;do n+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const n=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return!0;let i=this.lastChunk;do{const o=i.end,c=i.trimEnd(n);if(i.end!==o&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.previous}while(i);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const n=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return!0;let i=this.firstChunk;do{const o=i.end,c=i.trimStart(n);if(i.end!==o&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.next}while(i);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,n){function i(c,u){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(p,g)=>g==="$"?"$":g==="&"?c[0]:+g{if(u.index!=null){const p=i(u,this.original);p!==u[0]&&this.overwrite(u.index,u.index+u[0].length,p)}});else{const c=this.original.match(e);if(c&&c.index!=null){const u=i(c,this.original);u!==c[0]&&this.overwrite(c.index,c.index+c[0].length,u)}}return this}_replaceString(e,n){const{original:i}=this,o=i.indexOf(e);return o!==-1&&this.overwrite(o,o+e.length,n),this}replace(e,n){return typeof e=="string"?this._replaceString(e,n):this._replaceRegexp(e,n)}_replaceAllString(e,n){const{original:i}=this,o=e.length;for(let c=i.indexOf(e);c!==-1;c=i.indexOf(e,c+o))i.slice(c,c+o)!==n&&this.overwrite(c,c+o,n);return this}replaceAll(e,n){if(typeof e=="string")return this._replaceAllString(e,n);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,n)}}let v,re,ke,Z=2<<19;const Fe=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(s,e){const n=s.length;let i=0;for(;i>>8}},hn="xportmportlassforetaourceromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileifcatcfinallels";let _,We,y;function fn(s,e="@"){_=s,We=e;const n=2*_.length+(2<<18);if(n>Z||!v){for(;n>Z;)Z*=2;re=new ArrayBuffer(Z),Fe(hn,new Uint16Array(re,16,110)),v=function(u,p,g){var b=new u.Int8Array(g),d=new u.Int16Array(g),r=new u.Int32Array(g),R=new u.Uint8Array(g),L=new u.Uint16Array(g),E=1040;function N(){var t=0,a=0,h=0,l=0,w=0,m=0,C=0;C=E,E=E+10240|0,b[804]=1,b[803]=0,d[399]=0,d[400]=0,r[69]=r[2],b[805]=0,r[68]=0,b[802]=0,r[70]=C+2048,r[71]=C,b[806]=0,t=(r[3]|0)+-2|0,r[72]=t,a=t+(r[66]<<1)|0,r[73]=a;e:for(;;){if(h=t+2|0,r[72]=h,t>>>0>=a>>>0){l=18;break}t:do switch(d[h>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(!(d[400]|0)&&z(h)|0&&!(A(t+4|0,16,10)|0)&&($(),(b[804]|0)==0)){l=9;break e}else l=17;break}case 105:{z(h)|0&&!(A(t+4|0,26,10)|0)&&W(),l=17;break}case 59:{l=17;break}case 47:switch(d[t+4>>1]|0){case 47:{fe();break t}case 42:{le(1);break t}default:{l=16;break e}}default:{l=16;break e}}while(!1);(l|0)==17&&(l=0,r[69]=r[72]),t=r[72]|0,a=r[73]|0}(l|0)==9?(t=r[72]|0,r[69]=t,l=19):(l|0)==16?(b[804]=0,r[72]=t,l=19):(l|0)==18&&(b[802]|0?t=0:(t=h,l=19));do if((l|0)==19){e:for(;;){if(a=t+2|0,r[72]=a,t>>>0>=(r[73]|0)>>>0){l=92;break}t:do switch(d[a>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{!(d[400]|0)&&z(a)|0&&!(A(t+4|0,16,10)|0)&&$(),l=91;break}case 105:{z(a)|0&&!(A(t+4|0,26,10)|0)&&W(),l=91;break}case 99:{z(a)|0&&!(A(t+4|0,36,8)|0)&&P(d[t+12>>1]|0)|0&&(b[806]=1),l=91;break}case 40:{h=r[70]|0,t=d[400]|0,l=t&65535,r[h+(l<<3)>>2]=1,a=r[69]|0,d[400]=t+1<<16>>16,r[h+(l<<3)+4>>2]=a,l=91;break}case 41:{if(a=d[400]|0,!(a<<16>>16)){l=36;break e}h=a+-1<<16>>16,d[400]=h,l=d[399]|0,a=l&65535,l<<16>>16&&(r[(r[70]|0)+((h&65535)<<3)>>2]|0)==5&&(a=r[(r[71]|0)+(a+-1<<2)>>2]|0,h=a+4|0,r[h>>2]|0||(r[h>>2]=(r[69]|0)+2),r[a+12>>2]=t+4,d[399]=l+-1<<16>>16),l=91;break}case 123:{l=r[69]|0,h=r[63]|0,t=l;do if((d[l>>1]|0)==41&(h|0)!=0&&(r[h+4>>2]|0)==(l|0))if(a=r[64]|0,r[63]=a,a){r[a+32>>2]=0;break}else{r[59]=0;break}while(!1);h=r[70]|0,a=d[400]|0,l=a&65535,r[h+(l<<3)>>2]=b[806]|0?6:2,d[400]=a+1<<16>>16,r[h+(l<<3)+4>>2]=t,b[806]=0,l=91;break}case 125:{if(t=d[400]|0,!(t<<16>>16)){l=49;break e}h=r[70]|0,l=t+-1<<16>>16,d[400]=l,(r[h+((l&65535)<<3)>>2]|0)==4&&Ee(),l=91;break}case 39:{I(39),l=91;break}case 34:{I(34),l=91;break}case 47:switch(d[t+4>>1]|0){case 47:{fe();break t}case 42:{le(1);break t}default:{t=r[69]|0,a=d[t>>1]|0;n:do if(!(kt(a)|0))a<<16>>16==41?(h=d[400]|0,xt(r[(r[70]|0)+((h&65535)<<3)+4>>2]|0)|0||(l=65)):l=64;else switch(a<<16>>16){case 46:if(((d[t+-2>>1]|0)+-48&65535)<10){l=64;break n}else break n;case 43:if((d[t+-2>>1]|0)==43){l=64;break n}else break n;case 45:if((d[t+-2>>1]|0)==45){l=64;break n}else break n;default:break n}while(!1);(l|0)==64&&(h=d[400]|0,l=65);n:do if((l|0)==65){if(l=0,h<<16>>16&&(w=r[70]|0,m=(h&65535)+-1|0,a<<16>>16==102?(r[w+(m<<3)>>2]|0)==1:0)){if((d[t+-2>>1]|0)==111&&O(r[w+(m<<3)+4>>2]|0,44,3)|0)break}else l=69;if((l|0)==69&&a<<16>>16==125&&(l=r[70]|0,h=h&65535,mt(r[l+(h<<3)+4>>2]|0)|0||(r[l+(h<<3)>>2]|0)==6))break;if(!(pt(t)|0)){switch(a<<16>>16){case 0:break n;case 47:{if(b[805]|0)break n;break}default:}if(l=r[65]|0,l|0&&t>>>0>=(r[l>>2]|0)>>>0&&t>>>0<=(r[l+4>>2]|0)>>>0){ue(),b[805]=0,l=91;break t}h=r[3]|0;do{if(t>>>0<=h>>>0)break;t=t+-2|0,r[69]=t,a=d[t>>1]|0}while(!(he(a)|0));if(ne(a)|0){do{if(t>>>0<=h>>>0)break;t=t+-2|0,r[69]=t}while(ne(d[t>>1]|0)|0);if(Ct(t)|0){ue(),b[805]=0,l=91;break t}}b[805]=1,l=91;break t}}while(!1);ue(),b[805]=0,l=91;break t}}case 96:{h=r[70]|0,a=d[400]|0,l=a&65535,r[h+(l<<3)+4>>2]=r[69],d[400]=a+1<<16>>16,r[h+(l<<3)>>2]=3,Ee(),l=91;break}default:l=91}while(!1);(l|0)==91&&(l=0,r[69]=r[72]),t=r[72]|0}if((l|0)==36){M(),t=0;break}else if((l|0)==49){M(),t=0;break}else if((l|0)==92){t=b[802]|0?0:(d[399]|d[400])<<16>>16==0;break}}while(!1);return E=C,t|0}f(N,"b");function $(){var t=0,a=0,h=0,l=0,w=0,m=0,C=0,T=0,ge=0,be=0,pe=0,we=0,S=0,x=0;T=r[72]|0,ge=r[65]|0,x=T+12|0,r[72]=x,h=k(1)|0,t=r[72]|0,(t|0)==(x|0)&&!(te(h)|0)||(S=3);e:do if((S|0)==3){t:do switch(h<<16>>16){case 123:{for(r[72]=t+2,t=k(1)|0,a=r[72]|0;;){if(H(t)|0?(I(t),t=(r[72]|0)+2|0,r[72]=t):(j(t)|0,t=r[72]|0),k(1)|0,t=Le(a,t)|0,t<<16>>16==44&&(r[72]=(r[72]|0)+2,t=k(1)|0),t<<16>>16==125){S=15;break}if(x=a,a=r[72]|0,(a|0)==(x|0)){S=12;break}if(a>>>0>(r[73]|0)>>>0){S=14;break}}if((S|0)==12){M();break e}else if((S|0)==14){M();break e}else if((S|0)==15){b[803]=1,r[72]=(r[72]|0)+2;break t}break}case 42:{r[72]=t+2,k(1)|0,x=r[72]|0,Le(x,x)|0;break}default:{switch(b[804]=0,h<<16>>16){case 100:{switch(T=t+14|0,r[72]=T,(k(1)|0)<<16>>16){case 97:{a=r[72]|0,!(A(a+2|0,72,8)|0)&&(w=a+10|0,ne(d[w>>1]|0)|0)&&(r[72]=w,k(0)|0,S=22);break}case 102:{S=22;break}case 99:{a=r[72]|0,!(A(a+2|0,36,8)|0)&&(l=a+10|0,x=d[l>>1]|0,P(x)|0|x<<16>>16==123)&&(r[72]=l,m=k(1)|0,m<<16>>16!=123)&&(we=m,S=31);break}default:}n:do if((S|0)==22&&(C=r[72]|0,(A(C+2|0,80,14)|0)==0)){if(h=C+16|0,a=d[h>>1]|0,!(P(a)|0))switch(a<<16>>16){case 40:case 42:break;default:break n}r[72]=h,a=k(1)|0,a<<16>>16==42&&(r[72]=(r[72]|0)+2,a=k(1)|0),a<<16>>16!=40&&(we=a,S=31)}while(!1);if((S|0)==31&&(be=r[72]|0,j(we)|0,pe=r[72]|0,pe>>>0>be>>>0)){B(t,T,be,pe),r[72]=(r[72]|0)+-2;break e}B(t,T,0,0),r[72]=t+12;break e}case 97:{r[72]=t+10,k(0)|0,t=r[72]|0,S=35;break}case 102:{S=35;break}case 99:{if(!(A(t+2|0,36,8)|0)&&(a=t+10|0,he(d[a>>1]|0)|0)){r[72]=a,x=k(1)|0,S=r[72]|0,j(x)|0,x=r[72]|0,B(S,x,S,x),r[72]=(r[72]|0)+-2;break e}t=t+4|0,r[72]=t;break}case 108:case 118:break;default:break e}if((S|0)==35){r[72]=t+16,t=k(1)|0,t<<16>>16==42&&(r[72]=(r[72]|0)+2,t=k(1)|0),S=r[72]|0,j(t)|0,x=r[72]|0,B(S,x,S,x),r[72]=(r[72]|0)+-2;break e}r[72]=t+6,b[804]=0,h=k(1)|0,t=r[72]|0,h=(j(h)|0|32)<<16>>16==123,l=r[72]|0,h&&(r[72]=l+2,x=k(1)|0,t=r[72]|0,j(x)|0);n:for(;a=r[72]|0,(a|0)!=(t|0);){if(B(t,a,t,a),a=k(1)|0,h)switch(a<<16>>16){case 93:case 125:break e;default:}if(t=r[72]|0,a<<16>>16!=44){S=51;break}switch(r[72]=t+2,a=k(1)|0,t=r[72]|0,a<<16>>16){case 91:case 123:{S=51;break n}default:}j(a)|0}if((S|0)==51&&(r[72]=t+-2),!h)break e;r[72]=l+-2;break e}}while(!1);if(x=(k(1)|0)<<16>>16==102,t=r[72]|0,x&&!(A(t+2|0,66,6)|0))for(r[72]=t+8,G(T,k(1)|0,0),t=ge|0?ge+16|0:240;;){if(t=r[t>>2]|0,!t)break e;r[t+12>>2]=0,r[t+8>>2]=0,t=t+16|0}r[72]=t+-2}while(!1)}f($,"k");function W(){var t=0,a=0,h=0,l=0,w=0,m=0,C=0;w=r[72]|0,h=w+12|0,r[72]=h,l=k(1)|0,a=r[72]|0;e:do if(l<<16>>16!=46)l<<16>>16==115&a>>>0>h>>>0?!(A(a+2|0,56,10)|0)&&(t=a+12|0,P(d[t>>1]|0)|0)?m=14:(a=6,h=0,m=46):(t=l,h=0,m=15);else switch(r[72]=a+2,(k(1)|0)<<16>>16){case 109:{if(t=r[72]|0,A(t+2|0,50,6)|0||(a=r[69]|0,!(de(a)|0)&&(d[a>>1]|0)==46))break e;ce(w,w,t+8|0,2);break e}case 115:{if(t=r[72]|0,A(t+2|0,56,10)|0||(a=r[69]|0,!(de(a)|0)&&(d[a>>1]|0)==46))break e;t=t+12|0,m=14;break e}default:break e}while(!1);(m|0)==14&&(r[72]=t,t=k(1)|0,h=1,m=15);e:do if((m|0)==15)switch(t<<16>>16){case 40:{if(a=r[70]|0,C=d[400]|0,l=C&65535,r[a+(l<<3)>>2]=5,t=r[72]|0,d[400]=C+1<<16>>16,r[a+(l<<3)+4>>2]=t,(d[r[69]>>1]|0)==46)break e;switch(r[72]=t+2,a=k(1)|0,ce(w,r[72]|0,0,t),h?(t=r[63]|0,r[t+28>>2]=5):t=r[63]|0,w=r[71]|0,C=d[399]|0,d[399]=C+1<<16>>16,r[w+((C&65535)<<2)>>2]=t,a<<16>>16){case 39:{I(39);break}case 34:{I(34);break}default:{r[72]=(r[72]|0)+-2;break e}}switch(t=(r[72]|0)+2|0,r[72]=t,(k(1)|0)<<16>>16){case 44:{r[72]=(r[72]|0)+2,k(1)|0,w=r[63]|0,r[w+4>>2]=t,C=r[72]|0,r[w+16>>2]=C,b[w+24>>0]=1,r[72]=C+-2;break e}case 41:{d[400]=(d[400]|0)+-1<<16>>16,C=r[63]|0,r[C+4>>2]=t,r[C+12>>2]=(r[72]|0)+2,b[C+24>>0]=1,d[399]=(d[399]|0)+-1<<16>>16;break e}default:{r[72]=(r[72]|0)+-2;break e}}}case 123:{if(h){a=12,h=1,m=46;break e}if(t=r[72]|0,d[400]|0){r[72]=t+-2;break e}for(;!(t>>>0>=(r[73]|0)>>>0);){if(t=k(1)|0,H(t)|0)I(t);else if(t<<16>>16==125){m=36;break}t=(r[72]|0)+2|0,r[72]=t}if((m|0)==36&&(r[72]=(r[72]|0)+2),C=(k(1)|0)<<16>>16==102,t=r[72]|0,C&&A(t+2|0,66,6)|0){M();break e}if(r[72]=t+8,t=k(1)|0,H(t)|0){G(w,t,0);break e}else{M();break e}}default:{if(h){a=12,h=1,m=46;break e}switch(t<<16>>16){case 42:case 39:case 34:{h=0,m=48;break e}default:{a=6,h=0,m=46;break e}}}}while(!1);(m|0)==46&&(t=r[72]|0,(t|0)==(w+(a<<1)|0)?r[72]=t+-2:m=48);do if((m|0)==48){if(d[400]|0){r[72]=(r[72]|0)+-2;break}for(t=r[73]|0,a=r[72]|0;;){if(a>>>0>=t>>>0){m=55;break}if(l=d[a>>1]|0,H(l)|0){m=53;break}C=a+2|0,r[72]=C,a=C}if((m|0)==53){G(w,l,h);break}else if((m|0)==55){M();break}}while(!1)}f(W,"l");function G(t,a,h){t=t|0,a=a|0,h=h|0;var l=0,w=0;switch(l=(r[72]|0)+2|0,a<<16>>16){case 39:{I(39),w=5;break}case 34:{I(34),w=5;break}default:M()}do if((w|0)==5){if(ce(t,l,r[72]|0,1),h&&(r[(r[63]|0)+28>>2]=4),r[72]=(r[72]|0)+2,a=k(0)|0,h=a<<16>>16==97,h?(l=r[72]|0,A(l+2|0,94,10)|0&&(w=13)):(l=r[72]|0,a<<16>>16==119&&(d[l+2>>1]|0)==105&&(d[l+4>>1]|0)==116&&(d[l+6>>1]|0)==104||(w=13)),(w|0)==13){r[72]=l+-2;break}if(r[72]=l+((h?6:4)<<1),(k(1)|0)<<16>>16!=123){r[72]=l;break}h=r[72]|0,a=h;e:for(;;){switch(r[72]=a+2,a=k(1)|0,a<<16>>16){case 39:{I(39),r[72]=(r[72]|0)+2,a=k(1)|0;break}case 34:{I(34),r[72]=(r[72]|0)+2,a=k(1)|0;break}default:a=j(a)|0}if(a<<16>>16!=58){w=22;break}switch(r[72]=(r[72]|0)+2,(k(1)|0)<<16>>16){case 39:{I(39);break}case 34:{I(34);break}default:{w=26;break e}}switch(r[72]=(r[72]|0)+2,(k(1)|0)<<16>>16){case 125:{w=31;break e}case 44:break;default:{w=30;break e}}if(r[72]=(r[72]|0)+2,(k(1)|0)<<16>>16==125){w=31;break}a=r[72]|0}if((w|0)==22){r[72]=l;break}else if((w|0)==26){r[72]=l;break}else if((w|0)==30){r[72]=l;break}else if((w|0)==31){w=r[63]|0,r[w+16>>2]=h,r[w+12>>2]=(r[72]|0)+2;break}}while(!1)}f(G,"u");function pt(t){t=t|0;e:do switch(d[t>>1]|0){case 100:switch(d[t+-2>>1]|0){case 105:{t=O(t+-4|0,104,2)|0;break e}case 108:{t=O(t+-4|0,108,3)|0;break e}default:{t=0;break e}}case 101:switch(d[t+-2>>1]|0){case 115:switch(d[t+-4>>1]|0){case 108:{t=q(t+-6|0,101)|0;break e}case 97:{t=q(t+-6|0,99)|0;break e}default:{t=0;break e}}case 116:{t=O(t+-4|0,114,4)|0;break e}case 117:{t=O(t+-4|0,122,6)|0;break e}default:{t=0;break e}}case 102:{if((d[t+-2>>1]|0)==111&&(d[t+-4>>1]|0)==101)switch(d[t+-6>>1]|0){case 99:{t=O(t+-8|0,134,6)|0;break e}case 112:{t=O(t+-8|0,146,2)|0;break e}default:{t=0;break e}}else t=0;break}case 107:{t=O(t+-2|0,150,4)|0;break}case 110:{t=t+-2|0,q(t,105)|0?t=1:t=O(t,158,5)|0;break}case 111:{t=q(t+-2|0,100)|0;break}case 114:{t=O(t+-2|0,168,7)|0;break}case 116:{t=O(t+-2|0,182,4)|0;break}case 119:switch(d[t+-2>>1]|0){case 101:{t=q(t+-4|0,110)|0;break e}case 111:{t=O(t+-4|0,190,3)|0;break e}default:{t=0;break e}}default:t=0}while(!1);return t|0}f(pt,"o");function Ee(){var t=0,a=0,h=0,l=0;a=r[73]|0,h=r[72]|0;e:for(;;){if(t=h+2|0,h>>>0>=a>>>0){a=10;break}switch(d[t>>1]|0){case 96:{a=7;break e}case 36:{if((d[h+4>>1]|0)==123){a=6;break e}break}case 92:{t=h+4|0;break}default:}h=t}(a|0)==6?(t=h+4|0,r[72]=t,a=r[70]|0,l=d[400]|0,h=l&65535,r[a+(h<<3)>>2]=4,d[400]=l+1<<16>>16,r[a+(h<<3)+4>>2]=t):(a|0)==7?(r[72]=t,h=r[70]|0,l=(d[400]|0)+-1<<16>>16,d[400]=l,(r[h+((l&65535)<<3)>>2]|0)!=3&&M()):(a|0)==10&&(r[72]=t,M())}f(Ee,"h");function k(t){t=t|0;var a=0,h=0,l=0;h=r[72]|0;e:do{a=d[h>>1]|0;t:do if(a<<16>>16!=47)if(t){if(P(a)|0)break;break e}else{if(ne(a)|0)break;break e}else switch(d[h+2>>1]|0){case 47:{fe();break t}case 42:{le(t);break t}default:{a=47;break e}}while(!1);l=r[72]|0,h=l+2|0,r[72]=h}while(l>>>0<(r[73]|0)>>>0);return a|0}f(k,"w");function ce(t,a,h,l){t=t|0,a=a|0,h=h|0,l=l|0;var w=0,m=0;m=r[67]|0,r[67]=m+36,w=r[63]|0,r[(w|0?w+32|0:236)>>2]=m,r[64]=w,r[63]=m,r[m+8>>2]=t,(l|0)==2?(t=3,w=h):(w=(l|0)==1,t=w?1:2,w=w?h+2|0:0),r[m+12>>2]=w,r[m+28>>2]=t,r[m>>2]=a,r[m+4>>2]=h,r[m+16>>2]=0,r[m+20>>2]=l,a=(l|0)==1,b[m+24>>0]=a&1,r[m+32>>2]=0,a|(l|0)==2&&(b[803]=1)}f(ce,"d");function I(t){t=t|0;var a=0,h=0,l=0,w=0;for(w=r[73]|0,a=r[72]|0;;){if(l=a+2|0,a>>>0>=w>>>0){a=9;break}if(h=d[l>>1]|0,h<<16>>16==t<<16>>16){a=10;break}if(h<<16>>16==92)h=a+4|0,(d[h>>1]|0)==13?(a=a+6|0,a=(d[a>>1]|0)==10?a:h):a=h;else if(Re(h)|0){a=9;break}else a=l}(a|0)==9?(r[72]=l,M()):(a|0)==10&&(r[72]=l)}f(I,"v");function Le(t,a){t=t|0,a=a|0;var h=0,l=0,w=0,m=0;return h=r[72]|0,l=d[h>>1]|0,m=(t|0)==(a|0),w=m?0:t,m=m?0:a,l<<16>>16==97&&(r[72]=h+4,h=k(1)|0,t=r[72]|0,H(h)|0?(I(h),a=(r[72]|0)+2|0,r[72]=a):(j(h)|0,a=r[72]|0),l=k(1)|0,h=r[72]|0),(h|0)!=(t|0)&&B(t,a,w,m),l|0}f(Le,"A");function wt(){var t=0,a=0,h=0;h=r[73]|0,a=r[72]|0;e:for(;;){if(t=a+2|0,a>>>0>=h>>>0){a=6;break}switch(d[t>>1]|0){case 13:case 10:{a=6;break e}case 93:{a=7;break e}case 92:{t=a+4|0;break}default:}a=t}return(a|0)==6?(r[72]=t,M(),t=0):(a|0)==7&&(r[72]=t,t=93),t|0}f(wt,"C");function ue(){var t=0,a=0,h=0;e:for(;;){if(t=r[72]|0,a=t+2|0,r[72]=a,t>>>0>=(r[73]|0)>>>0){h=7;break}switch(d[a>>1]|0){case 13:case 10:{h=7;break e}case 47:break e;case 91:{wt()|0;break}case 92:{r[72]=t+4;break}default:}}(h|0)==7&&M()}f(ue,"g");function mt(t){switch(t=t|0,d[t>>1]|0){case 62:{t=(d[t+-2>>1]|0)==61;break}case 41:case 59:{t=1;break}case 104:{t=O(t+-2|0,210,4)|0;break}case 121:{t=O(t+-2|0,218,6)|0;break}case 101:{t=O(t+-2|0,230,3)|0;break}default:t=0}return t|0}f(mt,"p");function le(t){t=t|0;var a=0,h=0,l=0,w=0,m=0;for(w=(r[72]|0)+2|0,r[72]=w,h=r[73]|0;a=w+2|0,!(w>>>0>=h>>>0||(l=d[a>>1]|0,!t&&Re(l)|0));){if(l<<16>>16==42&&(d[w+4>>1]|0)==47){m=8;break}w=a}(m|0)==8&&(r[72]=a,a=w+4|0),r[72]=a}f(le,"y");function A(t,a,h){t=t|0,a=a|0,h=h|0;var l=0,w=0;e:do if(!h)t=0;else{for(;l=b[t>>0]|0,w=b[a>>0]|0,l<<24>>24==w<<24>>24;)if(h=h+-1|0,h)t=t+1|0,a=a+1|0;else{t=0;break e}t=(l&255)-(w&255)|0}while(!1);return t|0}f(A,"m");function te(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:{t=1;break}default:if((t&-8)<<16>>16==40|(t+-58&65535)<6)t=1;else{switch(t<<16>>16){case 91:case 93:case 94:{t=1;break e}default:}t=(t+-123&65535)<4}}while(!1);return t|0}f(te,"I");function kt(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:break;default:if(!((t+-58&65535)<6|(t+-40&65535)<7&t<<16>>16!=41)){switch(t<<16>>16){case 91:case 94:break e;default:}return t<<16>>16!=125&(t+-123&65535)<4|0}}while(!1);return 1}f(kt,"U");function Oe(t){t=t|0;var a=0;a=d[t>>1]|0;e:do if((a+-9&65535)>=5){switch(a<<16>>16){case 160:case 32:{a=1;break e}default:}if(te(a)|0)return a<<16>>16!=46|(de(t)|0)|0;a=0}else a=1;while(!1);return a|0}f(Oe,"x");function yt(t){t=t|0;var a=0,h=0,l=0,w=0;return h=E,E=E+16|0,l=h,r[l>>2]=0,r[66]=t,a=r[3]|0,w=a+(t<<1)|0,t=w+2|0,d[w>>1]=0,r[l>>2]=t,r[67]=t,r[59]=0,r[63]=0,r[61]=0,r[60]=0,r[65]=0,r[62]=0,E=h,a|0}f(yt,"S");function B(t,a,h,l){t=t|0,a=a|0,h=h|0,l=l|0;var w=0,m=0;w=r[67]|0,r[67]=w+20,m=r[65]|0,r[(m|0?m+16|0:240)>>2]=w,r[65]=w,r[w>>2]=t,r[w+4>>2]=a,r[w+8>>2]=h,r[w+12>>2]=l,r[w+16>>2]=0,b[803]=1}f(B,"O");function O(t,a,h){t=t|0,a=a|0,h=h|0;var l=0,w=0;return l=t+(0-h<<1)|0,w=l+2|0,t=r[3]|0,w>>>0>=t>>>0&&!(A(w,a,h<<1)|0)?(w|0)==(t|0)?t=1:t=Oe(l)|0:t=0,t|0}f(O,"$");function Ct(t){switch(t=t|0,d[t>>1]|0){case 107:{t=O(t+-2|0,150,4)|0;break}case 101:{(d[t+-2>>1]|0)==117?t=O(t+-4|0,122,6)|0:t=0;break}default:t=0}return t|0}f(Ct,"j");function q(t,a){t=t|0,a=a|0;var h=0;return h=r[3]|0,h>>>0<=t>>>0&&(d[t>>1]|0)==a<<16>>16?(h|0)==(t|0)?h=1:h=he(d[t+-2>>1]|0)|0:h=0,h|0}f(q,"B");function he(t){t=t|0;e:do if((t+-9&65535)<5)t=1;else{switch(t<<16>>16){case 32:case 160:{t=1;break e}default:}t=t<<16>>16!=46&(te(t)|0)}while(!1);return t|0}f(he,"E");function fe(){var t=0,a=0,h=0;t=r[73]|0,h=r[72]|0;e:for(;a=h+2|0,!(h>>>0>=t>>>0);)switch(d[a>>1]|0){case 13:case 10:break e;default:h=a}r[72]=a}f(fe,"P");function j(t){for(t=t|0;!(P(t)|0||te(t)|0);)if(t=(r[72]|0)+2|0,r[72]=t,t=d[t>>1]|0,!(t<<16>>16)){t=0;break}return t|0}f(j,"q");function St(){var t=0;switch(t=r[(r[61]|0)+20>>2]|0,t|0){case 1:{t=-1;break}case 2:{t=-2;break}default:t=t-(r[3]|0)>>1}return t|0}f(St,"z");function xt(t){return t=t|0,!(O(t,196,5)|0)&&!(O(t,44,3)|0)?t=O(t,206,2)|0:t=1,t|0}f(xt,"D");function ne(t){switch(t=t|0,t<<16>>16){case 160:case 32:case 12:case 11:case 9:{t=1;break}default:t=0}return t|0}f(ne,"F");function de(t){return t=t|0,(d[t>>1]|0)==46&&(d[t+-2>>1]|0)==46?t=(d[t+-4>>1]|0)==46:t=0,t|0}f(de,"G");function z(t){return t=t|0,(r[3]|0)==(t|0)?t=1:t=Oe(t+-2|0)|0,t|0}f(z,"H");function vt(){var t=0;return t=r[(r[62]|0)+12>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f(vt,"J");function _t(){var t=0;return t=r[(r[61]|0)+12>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f(_t,"K");function Et(){var t=0;return t=r[(r[62]|0)+8>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f(Et,"L");function Lt(){var t=0;return t=r[(r[61]|0)+16>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f(Lt,"M");function Ot(){var t=0;return t=r[(r[61]|0)+4>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f(Ot,"N");function Rt(){var t=0;return t=r[61]|0,t=r[(t|0?t+32|0:236)>>2]|0,r[61]=t,(t|0)!=0|0}f(Rt,"Q");function At(){var t=0;return t=r[62]|0,t=r[(t|0?t+16|0:240)>>2]|0,r[62]=t,(t|0)!=0|0}f(At,"R");function M(){b[802]=1,r[68]=(r[72]|0)-(r[3]|0)>>1,r[72]=(r[73]|0)+2}f(M,"T");function P(t){return t=t|0,(t|128)<<16>>16==160|(t+-9&65535)<5|0}f(P,"V");function H(t){return t=t|0,t<<16>>16==39|t<<16>>16==34|0}f(H,"W");function Nt(){return(r[(r[61]|0)+8>>2]|0)-(r[3]|0)>>1|0}f(Nt,"X");function It(){return(r[(r[62]|0)+4>>2]|0)-(r[3]|0)>>1|0}f(It,"Y");function Re(t){return t=t|0,t<<16>>16==13|t<<16>>16==10|0}f(Re,"Z");function Mt(){return(r[r[61]>>2]|0)-(r[3]|0)>>1|0}f(Mt,"_");function $t(){return(r[r[62]>>2]|0)-(r[3]|0)>>1|0}f($t,"ee");function Ut(){return R[(r[61]|0)+24>>0]|0|0}f(Ut,"ae");function jt(t){t=t|0,r[3]=t}f(jt,"re");function Dt(){return r[(r[61]|0)+28>>2]|0}f(Dt,"ie");function Tt(){return(b[803]|0)!=0|0}f(Tt,"se");function Ft(){return(b[804]|0)!=0|0}f(Ft,"fe");function Wt(){return r[68]|0}f(Wt,"te");function Bt(t){return t=t|0,E=t+992+15&-16,992}return f(Bt,"ce"),{su:Bt,ai:Lt,e:Wt,ee:It,ele:vt,els:Et,es:$t,f:Ft,id:St,ie:Ot,ip:Ut,is:Mt,it:Dt,ms:Tt,p:N,re:At,ri:Rt,sa:yt,se:_t,ses:jt,ss:Nt}}(typeof self<"u"?self:global,{},re),ke=v.su(Z-(2<<17))}const i=_.length+1;v.ses(ke),v.sa(i-1),Fe(_,new Uint16Array(re,ke,i)),v.p()||(y=v.e(),D());const o=[],c=[];for(;v.ri();){const u=v.is(),p=v.ie(),g=v.ai(),b=v.id(),d=v.ss(),r=v.se(),R=v.it();let L;v.ip()&&(L=ye(b===-1?u:u+1,_.charCodeAt(b===-1?u-1:u))),o.push({t:R,n:L,s:u,e:p,ss:d,se:r,d:b,a:g})}for(;v.re();){const u=v.es(),p=v.ee(),g=v.els(),b=v.ele(),d=_.charCodeAt(u),r=g>=0?_.charCodeAt(g):-1;c.push({s:u,e:p,ls:g,le:b,n:d===34||d===39?ye(u+1,d):_.slice(u,p),ln:g<0?void 0:r===34||r===39?ye(g+1,r):_.slice(g,b)})}return[o,c,!!v.f(),!!v.ms()]}f(fn,"parse");function ye(s,e){y=s;let n="",i=y;for(;;){y>=_.length&&D();const o=_.charCodeAt(y);if(o===e)break;o===92?(n+=_.slice(i,y),n+=dn(),i=y):(o===8232||o===8233||Be(o)&&D(),++y)}return n+=_.slice(i,y++),n}f(ye,"b");function dn(){let s=_.charCodeAt(++y);switch(++y,s){case 110:return` +-`;case 114:return"\r";case 120:return String.fromCharCode(Ce(2));case 117:return function(){const e=_.charCodeAt(y);let n;return e===123?(++y,n=Ce(_.indexOf("}",y)-y),++y,n>1114111&&D()):n=Ce(4),n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:_.charCodeAt(y)===10&&++y;case 10:return"";case 56:case 57:D();default:if(s>=48&&s<=55){let e=_.substr(y-1,3).match(/^[0-7]+/)[0],n=parseInt(e,8);return n>255&&(e=e.slice(0,-1),n=parseInt(e,8)),y+=e.length-1,s=_.charCodeAt(y),e==="0"&&s!==56&&s!==57||D(),String.fromCharCode(n)}return Be(s)?"":String.fromCharCode(s)}}f(dn,"k");function Ce(s){const e=y;let n=0,i=0;for(let o=0;o=97)c=u-97+10;else if(u>=65)c=u-65+10;else{if(!(u>=48&&u<=57))break;c=u-48}if(c>=16)break;i=u,n=16*n+c}else i!==95&&o!==0||D(),i=u}return i!==95&&y-e===s||D(),n}f(Ce,"l");function Be(s){return s===13||s===10}f(Be,"u");function D(){throw Object.assign(Error(`Parse error ${We}:${_.slice(0,y).split(` ++`?c=!0:d!=="\r"&&c&&(c=!1,p===g.start||(this._splitChunk(g,p),g=g.next),g.prependRight(e))}p+=1}p=g.end,g=g.next}return this.outro=this.outro.replace(i,u),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,n){return P.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),P.insertLeft=!0),this.appendLeft(e,n)}insertRight(e,n){return P.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),P.insertRight=!0),this.prependRight(e,n)}move(e,n,i){if(i>=e&&i<=n)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(n),this._split(i);const o=this.byStart[e],c=this.byEnd[n],u=o.previous,p=c.next,g=this.byStart[i];if(!g&&c===this.lastChunk)return this;const b=g?g.previous:this.lastChunk;return u&&(u.next=p),p&&(p.previous=u),b&&(b.next=o),g&&(g.previous=c),o.previous||(this.firstChunk=c.next),c.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=b,c.next=g||null,b||(this.firstChunk=o),g||(this.lastChunk=c),this}overwrite(e,n,i,o){return o=o||{},this.update(e,n,i,{...o,overwrite:!o.contentOnly})}update(e,n,i,o){if(typeof i!="string")throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length;if(n>this.original.length)throw new Error("end is out of bounds");if(e===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(n),o===!0&&(P.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),P.storeName=!0),o={storeName:!0});const c=o!==void 0?o.storeName:!1,u=o!==void 0?o.overwrite:!1;if(c){const b=this.original.slice(e,n);Object.defineProperty(this.storedNames,b,{writable:!0,value:!0,enumerable:!0})}const p=this.byStart[e],g=this.byEnd[n];if(p){let b=p;for(;b!==g;){if(b.next!==this.byStart[b.end])throw new Error("Cannot overwrite across a split point");b=b.next,b.edit("",!1)}p.edit(i,c,!u)}else{const b=new ee(e,n,"").edit(i,c);g.next=b,b.previous=g}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,n){if(typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.prependLeft(n):this.intro=n+this.intro,this}prependRight(e,n){if(typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.prependRight(n):this.outro=n+this.outro,this}remove(e,n){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length;if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let i=this.byStart[e];for(;i;)i.intro="",i.outro="",i.edit(""),i=n>i.end?this.byStart[i.end]:null;return this}reset(e,n){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length;if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let i=this.byStart[e];for(;i;)i.reset(),i=n>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(Q);if(e!==-1)return this.outro.substr(e+1);let n=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(e=i.outro.lastIndexOf(Q),e!==-1)return i.outro.substr(e+1)+n;n=i.outro+n}if(i.content.length>0){if(e=i.content.lastIndexOf(Q),e!==-1)return i.content.substr(e+1)+n;n=i.content+n}if(i.intro.length>0){if(e=i.intro.lastIndexOf(Q),e!==-1)return i.intro.substr(e+1)+n;n=i.intro+n}}while(i=i.previous);return e=this.intro.lastIndexOf(Q),e!==-1?this.intro.substr(e+1)+n:this.intro+n}slice(e=0,n=this.original.length){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length;let i="",o=this.firstChunk;for(;o&&(o.start>e||o.end<=e);){if(o.start=n)return i;o=o.next}if(o&&o.edited&&o.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const c=o;for(;o;){o.intro&&(c!==o||o.start===e)&&(i+=o.intro);const u=o.start=n;if(u&&o.edited&&o.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);const p=c===o?e-o.start:0,g=u?o.content.length+n-o.end:o.content.length;if(i+=o.content.slice(p,g),o.outro&&(!u||o.end===n)&&(i+=o.outro),u)break;o=o.next}return i}snip(e,n){const i=this.clone();return i.remove(0,e),i.remove(n,i.original.length),i}_split(e){if(this.byStart[e]||this.byEnd[e])return;let n=this.lastSearchedChunk;const i=e>n.end;for(;n;){if(n.contains(e))return this._splitChunk(n,e);n=i?this.byStart[n.end]:this.byEnd[n.start]}}_splitChunk(e,n){if(e.edited&&e.content.length){const o=Te(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${e.original}")`)}const i=e.split(n);return this.byEnd[n]=e,this.byStart[n]=i,this.byEnd[i.end]=i,e===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,n=this.firstChunk;for(;n;)e+=n.toString(),n=n.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,n=0;do n+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const n=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return!0;let i=this.lastChunk;do{const o=i.end,c=i.trimEnd(n);if(i.end!==o&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.previous}while(i);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const n=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return!0;let i=this.firstChunk;do{const o=i.end,c=i.trimStart(n);if(i.end!==o&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.next}while(i);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,n){function i(c,u){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(p,g)=>g==="$"?"$":g==="&"?c[0]:+g{if(u.index!=null){const p=i(u,this.original);p!==u[0]&&this.overwrite(u.index,u.index+u[0].length,p)}});else{const c=this.original.match(e);if(c&&c.index!=null){const u=i(c,this.original);u!==c[0]&&this.overwrite(c.index,c.index+c[0].length,u)}}return this}_replaceString(e,n){const{original:i}=this,o=i.indexOf(e);return o!==-1&&this.overwrite(o,o+e.length,n),this}replace(e,n){return typeof e=="string"?this._replaceString(e,n):this._replaceRegexp(e,n)}_replaceAllString(e,n){const{original:i}=this,o=e.length;for(let c=i.indexOf(e);c!==-1;c=i.indexOf(e,c+o))i.slice(c,c+o)!==n&&this.overwrite(c,c+o,n);return this}replaceAll(e,n){if(typeof e=="string")return this._replaceAllString(e,n);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,n)}}let v,re,ke,Z=2<<19;const Fe=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(s,e){const n=s.length;let i=0;for(;i>>8}},hn="xportmportlassforetaourceromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileifcatcfinallels";let _,Je,y;function dn(s,e="@"){_=s,Je=e;const n=2*_.length+(2<<18);if(n>Z||!v){for(;n>Z;)Z*=2;re=new ArrayBuffer(Z),Fe(hn,new Uint16Array(re,16,110)),v=function(u,p,g){var b=new u.Int8Array(g),d=new u.Int16Array(g),r=new u.Int32Array(g),R=new u.Uint8Array(g),L=new u.Uint16Array(g),E=1040;function N(){var t=0,a=0,f=0,l=0,m=0,w=0,C=0;C=E,E=E+10240|0,b[804]=1,b[803]=0,d[399]=0,d[400]=0,r[69]=r[2],b[805]=0,r[68]=0,b[802]=0,r[70]=C+2048,r[71]=C,b[806]=0,t=(r[3]|0)+-2|0,r[72]=t,a=t+(r[66]<<1)|0,r[73]=a;e:for(;;){if(f=t+2|0,r[72]=f,t>>>0>=a>>>0){l=18;break}t:do switch(d[f>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(!(d[400]|0)&&z(f)|0&&!(A(t+4|0,16,10)|0)&&($(),(b[804]|0)==0)){l=9;break e}else l=17;break}case 105:{z(f)|0&&!(A(t+4|0,26,10)|0)&&J(),l=17;break}case 59:{l=17;break}case 47:switch(d[t+4>>1]|0){case 47:{he();break t}case 42:{le(1);break t}default:{l=16;break e}}default:{l=16;break e}}while(!1);(l|0)==17&&(l=0,r[69]=r[72]),t=r[72]|0,a=r[73]|0}(l|0)==9?(t=r[72]|0,r[69]=t,l=19):(l|0)==16?(b[804]=0,r[72]=t,l=19):(l|0)==18&&(b[802]|0?t=0:(t=f,l=19));do if((l|0)==19){e:for(;;){if(a=t+2|0,r[72]=a,t>>>0>=(r[73]|0)>>>0){l=92;break}t:do switch(d[a>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{!(d[400]|0)&&z(a)|0&&!(A(t+4|0,16,10)|0)&&$(),l=91;break}case 105:{z(a)|0&&!(A(t+4|0,26,10)|0)&&J(),l=91;break}case 99:{z(a)|0&&!(A(t+4|0,36,8)|0)&&B(d[t+12>>1]|0)|0&&(b[806]=1),l=91;break}case 40:{f=r[70]|0,t=d[400]|0,l=t&65535,r[f+(l<<3)>>2]=1,a=r[69]|0,d[400]=t+1<<16>>16,r[f+(l<<3)+4>>2]=a,l=91;break}case 41:{if(a=d[400]|0,!(a<<16>>16)){l=36;break e}f=a+-1<<16>>16,d[400]=f,l=d[399]|0,a=l&65535,l<<16>>16&&(r[(r[70]|0)+((f&65535)<<3)>>2]|0)==5&&(a=r[(r[71]|0)+(a+-1<<2)>>2]|0,f=a+4|0,r[f>>2]|0||(r[f>>2]=(r[69]|0)+2),r[a+12>>2]=t+4,d[399]=l+-1<<16>>16),l=91;break}case 123:{l=r[69]|0,f=r[63]|0,t=l;do if((d[l>>1]|0)==41&(f|0)!=0&&(r[f+4>>2]|0)==(l|0))if(a=r[64]|0,r[63]=a,a){r[a+32>>2]=0;break}else{r[59]=0;break}while(!1);f=r[70]|0,a=d[400]|0,l=a&65535,r[f+(l<<3)>>2]=b[806]|0?6:2,d[400]=a+1<<16>>16,r[f+(l<<3)+4>>2]=t,b[806]=0,l=91;break}case 125:{if(t=d[400]|0,!(t<<16>>16)){l=49;break e}f=r[70]|0,l=t+-1<<16>>16,d[400]=l,(r[f+((l&65535)<<3)>>2]|0)==4&&Ee(),l=91;break}case 39:{I(39),l=91;break}case 34:{I(34),l=91;break}case 47:switch(d[t+4>>1]|0){case 47:{he();break t}case 42:{le(1);break t}default:{t=r[69]|0,a=d[t>>1]|0;n:do if(!(kt(a)|0))a<<16>>16==41?(f=d[400]|0,xt(r[(r[70]|0)+((f&65535)<<3)+4>>2]|0)|0||(l=65)):l=64;else switch(a<<16>>16){case 46:if(((d[t+-2>>1]|0)+-48&65535)<10){l=64;break n}else break n;case 43:if((d[t+-2>>1]|0)==43){l=64;break n}else break n;case 45:if((d[t+-2>>1]|0)==45){l=64;break n}else break n;default:break n}while(!1);(l|0)==64&&(f=d[400]|0,l=65);n:do if((l|0)==65){if(l=0,f<<16>>16&&(m=r[70]|0,w=(f&65535)+-1|0,a<<16>>16==102?(r[m+(w<<3)>>2]|0)==1:0)){if((d[t+-2>>1]|0)==111&&O(r[m+(w<<3)+4>>2]|0,44,3)|0)break}else l=69;if((l|0)==69&&a<<16>>16==125&&(l=r[70]|0,f=f&65535,wt(r[l+(f<<3)+4>>2]|0)|0||(r[l+(f<<3)>>2]|0)==6))break;if(!(pt(t)|0)){switch(a<<16>>16){case 0:break n;case 47:{if(b[805]|0)break n;break}default:}if(l=r[65]|0,l|0&&t>>>0>=(r[l>>2]|0)>>>0&&t>>>0<=(r[l+4>>2]|0)>>>0){ue(),b[805]=0,l=91;break t}f=r[3]|0;do{if(t>>>0<=f>>>0)break;t=t+-2|0,r[69]=t,a=d[t>>1]|0}while(!(fe(a)|0));if(ne(a)|0){do{if(t>>>0<=f>>>0)break;t=t+-2|0,r[69]=t}while(ne(d[t>>1]|0)|0);if(Ct(t)|0){ue(),b[805]=0,l=91;break t}}b[805]=1,l=91;break t}}while(!1);ue(),b[805]=0,l=91;break t}}case 96:{f=r[70]|0,a=d[400]|0,l=a&65535,r[f+(l<<3)+4>>2]=r[69],d[400]=a+1<<16>>16,r[f+(l<<3)>>2]=3,Ee(),l=91;break}default:l=91}while(!1);(l|0)==91&&(l=0,r[69]=r[72]),t=r[72]|0}if((l|0)==36){M(),t=0;break}else if((l|0)==49){M(),t=0;break}else if((l|0)==92){t=b[802]|0?0:(d[399]|d[400])<<16>>16==0;break}}while(!1);return E=C,t|0}h(N,"b");function $(){var t=0,a=0,f=0,l=0,m=0,w=0,C=0,T=0,ge=0,be=0,pe=0,me=0,S=0,x=0;T=r[72]|0,ge=r[65]|0,x=T+12|0,r[72]=x,f=k(1)|0,t=r[72]|0,(t|0)==(x|0)&&!(te(f)|0)||(S=3);e:do if((S|0)==3){t:do switch(f<<16>>16){case 123:{for(r[72]=t+2,t=k(1)|0,a=r[72]|0;;){if(H(t)|0?(I(t),t=(r[72]|0)+2|0,r[72]=t):(j(t)|0,t=r[72]|0),k(1)|0,t=Le(a,t)|0,t<<16>>16==44&&(r[72]=(r[72]|0)+2,t=k(1)|0),t<<16>>16==125){S=15;break}if(x=a,a=r[72]|0,(a|0)==(x|0)){S=12;break}if(a>>>0>(r[73]|0)>>>0){S=14;break}}if((S|0)==12){M();break e}else if((S|0)==14){M();break e}else if((S|0)==15){b[803]=1,r[72]=(r[72]|0)+2;break t}break}case 42:{r[72]=t+2,k(1)|0,x=r[72]|0,Le(x,x)|0;break}default:{switch(b[804]=0,f<<16>>16){case 100:{switch(T=t+14|0,r[72]=T,(k(1)|0)<<16>>16){case 97:{a=r[72]|0,!(A(a+2|0,72,8)|0)&&(m=a+10|0,ne(d[m>>1]|0)|0)&&(r[72]=m,k(0)|0,S=22);break}case 102:{S=22;break}case 99:{a=r[72]|0,!(A(a+2|0,36,8)|0)&&(l=a+10|0,x=d[l>>1]|0,B(x)|0|x<<16>>16==123)&&(r[72]=l,w=k(1)|0,w<<16>>16!=123)&&(me=w,S=31);break}default:}n:do if((S|0)==22&&(C=r[72]|0,(A(C+2|0,80,14)|0)==0)){if(f=C+16|0,a=d[f>>1]|0,!(B(a)|0))switch(a<<16>>16){case 40:case 42:break;default:break n}r[72]=f,a=k(1)|0,a<<16>>16==42&&(r[72]=(r[72]|0)+2,a=k(1)|0),a<<16>>16!=40&&(me=a,S=31)}while(!1);if((S|0)==31&&(be=r[72]|0,j(me)|0,pe=r[72]|0,pe>>>0>be>>>0)){W(t,T,be,pe),r[72]=(r[72]|0)+-2;break e}W(t,T,0,0),r[72]=t+12;break e}case 97:{r[72]=t+10,k(0)|0,t=r[72]|0,S=35;break}case 102:{S=35;break}case 99:{if(!(A(t+2|0,36,8)|0)&&(a=t+10|0,fe(d[a>>1]|0)|0)){r[72]=a,x=k(1)|0,S=r[72]|0,j(x)|0,x=r[72]|0,W(S,x,S,x),r[72]=(r[72]|0)+-2;break e}t=t+4|0,r[72]=t;break}case 108:case 118:break;default:break e}if((S|0)==35){r[72]=t+16,t=k(1)|0,t<<16>>16==42&&(r[72]=(r[72]|0)+2,t=k(1)|0),S=r[72]|0,j(t)|0,x=r[72]|0,W(S,x,S,x),r[72]=(r[72]|0)+-2;break e}r[72]=t+6,b[804]=0,f=k(1)|0,t=r[72]|0,f=(j(f)|0|32)<<16>>16==123,l=r[72]|0,f&&(r[72]=l+2,x=k(1)|0,t=r[72]|0,j(x)|0);n:for(;a=r[72]|0,(a|0)!=(t|0);){if(W(t,a,t,a),a=k(1)|0,f)switch(a<<16>>16){case 93:case 125:break e;default:}if(t=r[72]|0,a<<16>>16!=44){S=51;break}switch(r[72]=t+2,a=k(1)|0,t=r[72]|0,a<<16>>16){case 91:case 123:{S=51;break n}default:}j(a)|0}if((S|0)==51&&(r[72]=t+-2),!f)break e;r[72]=l+-2;break e}}while(!1);if(x=(k(1)|0)<<16>>16==102,t=r[72]|0,x&&!(A(t+2|0,66,6)|0))for(r[72]=t+8,G(T,k(1)|0,0),t=ge|0?ge+16|0:240;;){if(t=r[t>>2]|0,!t)break e;r[t+12>>2]=0,r[t+8>>2]=0,t=t+16|0}r[72]=t+-2}while(!1)}h($,"k");function J(){var t=0,a=0,f=0,l=0,m=0,w=0,C=0;m=r[72]|0,f=m+12|0,r[72]=f,l=k(1)|0,a=r[72]|0;e:do if(l<<16>>16!=46)l<<16>>16==115&a>>>0>f>>>0?!(A(a+2|0,56,10)|0)&&(t=a+12|0,B(d[t>>1]|0)|0)?w=14:(a=6,f=0,w=46):(t=l,f=0,w=15);else switch(r[72]=a+2,(k(1)|0)<<16>>16){case 109:{if(t=r[72]|0,A(t+2|0,50,6)|0||(a=r[69]|0,!(de(a)|0)&&(d[a>>1]|0)==46))break e;ce(m,m,t+8|0,2);break e}case 115:{if(t=r[72]|0,A(t+2|0,56,10)|0||(a=r[69]|0,!(de(a)|0)&&(d[a>>1]|0)==46))break e;t=t+12|0,w=14;break e}default:break e}while(!1);(w|0)==14&&(r[72]=t,t=k(1)|0,f=1,w=15);e:do if((w|0)==15)switch(t<<16>>16){case 40:{if(a=r[70]|0,C=d[400]|0,l=C&65535,r[a+(l<<3)>>2]=5,t=r[72]|0,d[400]=C+1<<16>>16,r[a+(l<<3)+4>>2]=t,(d[r[69]>>1]|0)==46)break e;switch(r[72]=t+2,a=k(1)|0,ce(m,r[72]|0,0,t),f?(t=r[63]|0,r[t+28>>2]=5):t=r[63]|0,m=r[71]|0,C=d[399]|0,d[399]=C+1<<16>>16,r[m+((C&65535)<<2)>>2]=t,a<<16>>16){case 39:{I(39);break}case 34:{I(34);break}default:{r[72]=(r[72]|0)+-2;break e}}switch(t=(r[72]|0)+2|0,r[72]=t,(k(1)|0)<<16>>16){case 44:{r[72]=(r[72]|0)+2,k(1)|0,m=r[63]|0,r[m+4>>2]=t,C=r[72]|0,r[m+16>>2]=C,b[m+24>>0]=1,r[72]=C+-2;break e}case 41:{d[400]=(d[400]|0)+-1<<16>>16,C=r[63]|0,r[C+4>>2]=t,r[C+12>>2]=(r[72]|0)+2,b[C+24>>0]=1,d[399]=(d[399]|0)+-1<<16>>16;break e}default:{r[72]=(r[72]|0)+-2;break e}}}case 123:{if(f){a=12,f=1,w=46;break e}if(t=r[72]|0,d[400]|0){r[72]=t+-2;break e}for(;!(t>>>0>=(r[73]|0)>>>0);){if(t=k(1)|0,H(t)|0)I(t);else if(t<<16>>16==125){w=36;break}t=(r[72]|0)+2|0,r[72]=t}if((w|0)==36&&(r[72]=(r[72]|0)+2),C=(k(1)|0)<<16>>16==102,t=r[72]|0,C&&A(t+2|0,66,6)|0){M();break e}if(r[72]=t+8,t=k(1)|0,H(t)|0){G(m,t,0);break e}else{M();break e}}default:{if(f){a=12,f=1,w=46;break e}switch(t<<16>>16){case 42:case 39:case 34:{f=0,w=48;break e}default:{a=6,f=0,w=46;break e}}}}while(!1);(w|0)==46&&(t=r[72]|0,(t|0)==(m+(a<<1)|0)?r[72]=t+-2:w=48);do if((w|0)==48){if(d[400]|0){r[72]=(r[72]|0)+-2;break}for(t=r[73]|0,a=r[72]|0;;){if(a>>>0>=t>>>0){w=55;break}if(l=d[a>>1]|0,H(l)|0){w=53;break}C=a+2|0,r[72]=C,a=C}if((w|0)==53){G(m,l,f);break}else if((w|0)==55){M();break}}while(!1)}h(J,"l");function G(t,a,f){t=t|0,a=a|0,f=f|0;var l=0,m=0;switch(l=(r[72]|0)+2|0,a<<16>>16){case 39:{I(39),m=5;break}case 34:{I(34),m=5;break}default:M()}do if((m|0)==5){if(ce(t,l,r[72]|0,1),f&&(r[(r[63]|0)+28>>2]=4),r[72]=(r[72]|0)+2,a=k(0)|0,f=a<<16>>16==97,f?(l=r[72]|0,A(l+2|0,94,10)|0&&(m=13)):(l=r[72]|0,a<<16>>16==119&&(d[l+2>>1]|0)==105&&(d[l+4>>1]|0)==116&&(d[l+6>>1]|0)==104||(m=13)),(m|0)==13){r[72]=l+-2;break}if(r[72]=l+((f?6:4)<<1),(k(1)|0)<<16>>16!=123){r[72]=l;break}f=r[72]|0,a=f;e:for(;;){switch(r[72]=a+2,a=k(1)|0,a<<16>>16){case 39:{I(39),r[72]=(r[72]|0)+2,a=k(1)|0;break}case 34:{I(34),r[72]=(r[72]|0)+2,a=k(1)|0;break}default:a=j(a)|0}if(a<<16>>16!=58){m=22;break}switch(r[72]=(r[72]|0)+2,(k(1)|0)<<16>>16){case 39:{I(39);break}case 34:{I(34);break}default:{m=26;break e}}switch(r[72]=(r[72]|0)+2,(k(1)|0)<<16>>16){case 125:{m=31;break e}case 44:break;default:{m=30;break e}}if(r[72]=(r[72]|0)+2,(k(1)|0)<<16>>16==125){m=31;break}a=r[72]|0}if((m|0)==22){r[72]=l;break}else if((m|0)==26){r[72]=l;break}else if((m|0)==30){r[72]=l;break}else if((m|0)==31){m=r[63]|0,r[m+16>>2]=f,r[m+12>>2]=(r[72]|0)+2;break}}while(!1)}h(G,"u");function pt(t){t=t|0;e:do switch(d[t>>1]|0){case 100:switch(d[t+-2>>1]|0){case 105:{t=O(t+-4|0,104,2)|0;break e}case 108:{t=O(t+-4|0,108,3)|0;break e}default:{t=0;break e}}case 101:switch(d[t+-2>>1]|0){case 115:switch(d[t+-4>>1]|0){case 108:{t=q(t+-6|0,101)|0;break e}case 97:{t=q(t+-6|0,99)|0;break e}default:{t=0;break e}}case 116:{t=O(t+-4|0,114,4)|0;break e}case 117:{t=O(t+-4|0,122,6)|0;break e}default:{t=0;break e}}case 102:{if((d[t+-2>>1]|0)==111&&(d[t+-4>>1]|0)==101)switch(d[t+-6>>1]|0){case 99:{t=O(t+-8|0,134,6)|0;break e}case 112:{t=O(t+-8|0,146,2)|0;break e}default:{t=0;break e}}else t=0;break}case 107:{t=O(t+-2|0,150,4)|0;break}case 110:{t=t+-2|0,q(t,105)|0?t=1:t=O(t,158,5)|0;break}case 111:{t=q(t+-2|0,100)|0;break}case 114:{t=O(t+-2|0,168,7)|0;break}case 116:{t=O(t+-2|0,182,4)|0;break}case 119:switch(d[t+-2>>1]|0){case 101:{t=q(t+-4|0,110)|0;break e}case 111:{t=O(t+-4|0,190,3)|0;break e}default:{t=0;break e}}default:t=0}while(!1);return t|0}h(pt,"o");function Ee(){var t=0,a=0,f=0,l=0;a=r[73]|0,f=r[72]|0;e:for(;;){if(t=f+2|0,f>>>0>=a>>>0){a=10;break}switch(d[t>>1]|0){case 96:{a=7;break e}case 36:{if((d[f+4>>1]|0)==123){a=6;break e}break}case 92:{t=f+4|0;break}default:}f=t}(a|0)==6?(t=f+4|0,r[72]=t,a=r[70]|0,l=d[400]|0,f=l&65535,r[a+(f<<3)>>2]=4,d[400]=l+1<<16>>16,r[a+(f<<3)+4>>2]=t):(a|0)==7?(r[72]=t,f=r[70]|0,l=(d[400]|0)+-1<<16>>16,d[400]=l,(r[f+((l&65535)<<3)>>2]|0)!=3&&M()):(a|0)==10&&(r[72]=t,M())}h(Ee,"h");function k(t){t=t|0;var a=0,f=0,l=0;f=r[72]|0;e:do{a=d[f>>1]|0;t:do if(a<<16>>16!=47)if(t){if(B(a)|0)break;break e}else{if(ne(a)|0)break;break e}else switch(d[f+2>>1]|0){case 47:{he();break t}case 42:{le(t);break t}default:{a=47;break e}}while(!1);l=r[72]|0,f=l+2|0,r[72]=f}while(l>>>0<(r[73]|0)>>>0);return a|0}h(k,"w");function ce(t,a,f,l){t=t|0,a=a|0,f=f|0,l=l|0;var m=0,w=0;w=r[67]|0,r[67]=w+36,m=r[63]|0,r[(m|0?m+32|0:236)>>2]=w,r[64]=m,r[63]=w,r[w+8>>2]=t,(l|0)==2?(t=3,m=f):(m=(l|0)==1,t=m?1:2,m=m?f+2|0:0),r[w+12>>2]=m,r[w+28>>2]=t,r[w>>2]=a,r[w+4>>2]=f,r[w+16>>2]=0,r[w+20>>2]=l,a=(l|0)==1,b[w+24>>0]=a&1,r[w+32>>2]=0,a|(l|0)==2&&(b[803]=1)}h(ce,"d");function I(t){t=t|0;var a=0,f=0,l=0,m=0;for(m=r[73]|0,a=r[72]|0;;){if(l=a+2|0,a>>>0>=m>>>0){a=9;break}if(f=d[l>>1]|0,f<<16>>16==t<<16>>16){a=10;break}if(f<<16>>16==92)f=a+4|0,(d[f>>1]|0)==13?(a=a+6|0,a=(d[a>>1]|0)==10?a:f):a=f;else if(Re(f)|0){a=9;break}else a=l}(a|0)==9?(r[72]=l,M()):(a|0)==10&&(r[72]=l)}h(I,"v");function Le(t,a){t=t|0,a=a|0;var f=0,l=0,m=0,w=0;return f=r[72]|0,l=d[f>>1]|0,w=(t|0)==(a|0),m=w?0:t,w=w?0:a,l<<16>>16==97&&(r[72]=f+4,f=k(1)|0,t=r[72]|0,H(f)|0?(I(f),a=(r[72]|0)+2|0,r[72]=a):(j(f)|0,a=r[72]|0),l=k(1)|0,f=r[72]|0),(f|0)!=(t|0)&&W(t,a,m,w),l|0}h(Le,"A");function mt(){var t=0,a=0,f=0;f=r[73]|0,a=r[72]|0;e:for(;;){if(t=a+2|0,a>>>0>=f>>>0){a=6;break}switch(d[t>>1]|0){case 13:case 10:{a=6;break e}case 93:{a=7;break e}case 92:{t=a+4|0;break}default:}a=t}return(a|0)==6?(r[72]=t,M(),t=0):(a|0)==7&&(r[72]=t,t=93),t|0}h(mt,"C");function ue(){var t=0,a=0,f=0;e:for(;;){if(t=r[72]|0,a=t+2|0,r[72]=a,t>>>0>=(r[73]|0)>>>0){f=7;break}switch(d[a>>1]|0){case 13:case 10:{f=7;break e}case 47:break e;case 91:{mt()|0;break}case 92:{r[72]=t+4;break}default:}}(f|0)==7&&M()}h(ue,"g");function wt(t){switch(t=t|0,d[t>>1]|0){case 62:{t=(d[t+-2>>1]|0)==61;break}case 41:case 59:{t=1;break}case 104:{t=O(t+-2|0,210,4)|0;break}case 121:{t=O(t+-2|0,218,6)|0;break}case 101:{t=O(t+-2|0,230,3)|0;break}default:t=0}return t|0}h(wt,"p");function le(t){t=t|0;var a=0,f=0,l=0,m=0,w=0;for(m=(r[72]|0)+2|0,r[72]=m,f=r[73]|0;a=m+2|0,!(m>>>0>=f>>>0||(l=d[a>>1]|0,!t&&Re(l)|0));){if(l<<16>>16==42&&(d[m+4>>1]|0)==47){w=8;break}m=a}(w|0)==8&&(r[72]=a,a=m+4|0),r[72]=a}h(le,"y");function A(t,a,f){t=t|0,a=a|0,f=f|0;var l=0,m=0;e:do if(!f)t=0;else{for(;l=b[t>>0]|0,m=b[a>>0]|0,l<<24>>24==m<<24>>24;)if(f=f+-1|0,f)t=t+1|0,a=a+1|0;else{t=0;break e}t=(l&255)-(m&255)|0}while(!1);return t|0}h(A,"m");function te(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:{t=1;break}default:if((t&-8)<<16>>16==40|(t+-58&65535)<6)t=1;else{switch(t<<16>>16){case 91:case 93:case 94:{t=1;break e}default:}t=(t+-123&65535)<4}}while(!1);return t|0}h(te,"I");function kt(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:break;default:if(!((t+-58&65535)<6|(t+-40&65535)<7&t<<16>>16!=41)){switch(t<<16>>16){case 91:case 94:break e;default:}return t<<16>>16!=125&(t+-123&65535)<4|0}}while(!1);return 1}h(kt,"U");function Oe(t){t=t|0;var a=0;a=d[t>>1]|0;e:do if((a+-9&65535)>=5){switch(a<<16>>16){case 160:case 32:{a=1;break e}default:}if(te(a)|0)return a<<16>>16!=46|(de(t)|0)|0;a=0}else a=1;while(!1);return a|0}h(Oe,"x");function yt(t){t=t|0;var a=0,f=0,l=0,m=0;return f=E,E=E+16|0,l=f,r[l>>2]=0,r[66]=t,a=r[3]|0,m=a+(t<<1)|0,t=m+2|0,d[m>>1]=0,r[l>>2]=t,r[67]=t,r[59]=0,r[63]=0,r[61]=0,r[60]=0,r[65]=0,r[62]=0,E=f,a|0}h(yt,"S");function W(t,a,f,l){t=t|0,a=a|0,f=f|0,l=l|0;var m=0,w=0;m=r[67]|0,r[67]=m+20,w=r[65]|0,r[(w|0?w+16|0:240)>>2]=m,r[65]=m,r[m>>2]=t,r[m+4>>2]=a,r[m+8>>2]=f,r[m+12>>2]=l,r[m+16>>2]=0,b[803]=1}h(W,"O");function O(t,a,f){t=t|0,a=a|0,f=f|0;var l=0,m=0;return l=t+(0-f<<1)|0,m=l+2|0,t=r[3]|0,m>>>0>=t>>>0&&!(A(m,a,f<<1)|0)?(m|0)==(t|0)?t=1:t=Oe(l)|0:t=0,t|0}h(O,"$");function Ct(t){switch(t=t|0,d[t>>1]|0){case 107:{t=O(t+-2|0,150,4)|0;break}case 101:{(d[t+-2>>1]|0)==117?t=O(t+-4|0,122,6)|0:t=0;break}default:t=0}return t|0}h(Ct,"j");function q(t,a){t=t|0,a=a|0;var f=0;return f=r[3]|0,f>>>0<=t>>>0&&(d[t>>1]|0)==a<<16>>16?(f|0)==(t|0)?f=1:f=fe(d[t+-2>>1]|0)|0:f=0,f|0}h(q,"B");function fe(t){t=t|0;e:do if((t+-9&65535)<5)t=1;else{switch(t<<16>>16){case 32:case 160:{t=1;break e}default:}t=t<<16>>16!=46&(te(t)|0)}while(!1);return t|0}h(fe,"E");function he(){var t=0,a=0,f=0;t=r[73]|0,f=r[72]|0;e:for(;a=f+2|0,!(f>>>0>=t>>>0);)switch(d[a>>1]|0){case 13:case 10:break e;default:f=a}r[72]=a}h(he,"P");function j(t){for(t=t|0;!(B(t)|0||te(t)|0);)if(t=(r[72]|0)+2|0,r[72]=t,t=d[t>>1]|0,!(t<<16>>16)){t=0;break}return t|0}h(j,"q");function St(){var t=0;switch(t=r[(r[61]|0)+20>>2]|0,t|0){case 1:{t=-1;break}case 2:{t=-2;break}default:t=t-(r[3]|0)>>1}return t|0}h(St,"z");function xt(t){return t=t|0,!(O(t,196,5)|0)&&!(O(t,44,3)|0)?t=O(t,206,2)|0:t=1,t|0}h(xt,"D");function ne(t){switch(t=t|0,t<<16>>16){case 160:case 32:case 12:case 11:case 9:{t=1;break}default:t=0}return t|0}h(ne,"F");function de(t){return t=t|0,(d[t>>1]|0)==46&&(d[t+-2>>1]|0)==46?t=(d[t+-4>>1]|0)==46:t=0,t|0}h(de,"G");function z(t){return t=t|0,(r[3]|0)==(t|0)?t=1:t=Oe(t+-2|0)|0,t|0}h(z,"H");function vt(){var t=0;return t=r[(r[62]|0)+12>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}h(vt,"J");function _t(){var t=0;return t=r[(r[61]|0)+12>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}h(_t,"K");function Et(){var t=0;return t=r[(r[62]|0)+8>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}h(Et,"L");function Lt(){var t=0;return t=r[(r[61]|0)+16>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}h(Lt,"M");function Ot(){var t=0;return t=r[(r[61]|0)+4>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}h(Ot,"N");function Rt(){var t=0;return t=r[61]|0,t=r[(t|0?t+32|0:236)>>2]|0,r[61]=t,(t|0)!=0|0}h(Rt,"Q");function At(){var t=0;return t=r[62]|0,t=r[(t|0?t+16|0:240)>>2]|0,r[62]=t,(t|0)!=0|0}h(At,"R");function M(){b[802]=1,r[68]=(r[72]|0)-(r[3]|0)>>1,r[72]=(r[73]|0)+2}h(M,"T");function B(t){return t=t|0,(t|128)<<16>>16==160|(t+-9&65535)<5|0}h(B,"V");function H(t){return t=t|0,t<<16>>16==39|t<<16>>16==34|0}h(H,"W");function Nt(){return(r[(r[61]|0)+8>>2]|0)-(r[3]|0)>>1|0}h(Nt,"X");function It(){return(r[(r[62]|0)+4>>2]|0)-(r[3]|0)>>1|0}h(It,"Y");function Re(t){return t=t|0,t<<16>>16==13|t<<16>>16==10|0}h(Re,"Z");function Mt(){return(r[r[61]>>2]|0)-(r[3]|0)>>1|0}h(Mt,"_");function $t(){return(r[r[62]>>2]|0)-(r[3]|0)>>1|0}h($t,"ee");function Ut(){return R[(r[61]|0)+24>>0]|0|0}h(Ut,"ae");function jt(t){t=t|0,r[3]=t}h(jt,"re");function Dt(){return r[(r[61]|0)+28>>2]|0}h(Dt,"ie");function Tt(){return(b[803]|0)!=0|0}h(Tt,"se");function Ft(){return(b[804]|0)!=0|0}h(Ft,"fe");function Jt(){return r[68]|0}h(Jt,"te");function Wt(t){return t=t|0,E=t+992+15&-16,992}return h(Wt,"ce"),{su:Wt,ai:Lt,e:Jt,ee:It,ele:vt,els:Et,es:$t,f:Ft,id:St,ie:Ot,ip:Ut,is:Mt,it:Dt,ms:Tt,p:N,re:At,ri:Rt,sa:yt,se:_t,ses:jt,ss:Nt}}(typeof self<"u"?self:global,{},re),ke=v.su(Z-(2<<17))}const i=_.length+1;v.ses(ke),v.sa(i-1),Fe(_,new Uint16Array(re,ke,i)),v.p()||(y=v.e(),D());const o=[],c=[];for(;v.ri();){const u=v.is(),p=v.ie(),g=v.ai(),b=v.id(),d=v.ss(),r=v.se(),R=v.it();let L;v.ip()&&(L=ye(b===-1?u:u+1,_.charCodeAt(b===-1?u-1:u))),o.push({t:R,n:L,s:u,e:p,ss:d,se:r,d:b,a:g})}for(;v.re();){const u=v.es(),p=v.ee(),g=v.els(),b=v.ele(),d=_.charCodeAt(u),r=g>=0?_.charCodeAt(g):-1;c.push({s:u,e:p,ls:g,le:b,n:d===34||d===39?ye(u+1,d):_.slice(u,p),ln:g<0?void 0:r===34||r===39?ye(g+1,r):_.slice(g,b)})}return[o,c,!!v.f(),!!v.ms()]}h(dn,"parse");function ye(s,e){y=s;let n="",i=y;for(;;){y>=_.length&&D();const o=_.charCodeAt(y);if(o===e)break;o===92?(n+=_.slice(i,y),n+=gn(),i=y):(o===8232||o===8233||We(o)&&D(),++y)}return n+=_.slice(i,y++),n}h(ye,"b");function gn(){let s=_.charCodeAt(++y);switch(++y,s){case 110:return` ++`;case 114:return"\r";case 120:return String.fromCharCode(Ce(2));case 117:return function(){const e=_.charCodeAt(y);let n;return e===123?(++y,n=Ce(_.indexOf("}",y)-y),++y,n>1114111&&D()):n=Ce(4),n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:_.charCodeAt(y)===10&&++y;case 10:return"";case 56:case 57:D();default:if(s>=48&&s<=55){let e=_.substr(y-1,3).match(/^[0-7]+/)[0],n=parseInt(e,8);return n>255&&(e=e.slice(0,-1),n=parseInt(e,8)),y+=e.length-1,s=_.charCodeAt(y),e==="0"&&s!==56&&s!==57||D(),String.fromCharCode(n)}return We(s)?"":String.fromCharCode(s)}}h(gn,"k");function Ce(s){const e=y;let n=0,i=0;for(let o=0;o=97)c=u-97+10;else if(u>=65)c=u-65+10;else{if(!(u>=48&&u<=57))break;c=u-48}if(c>=16)break;i=u,n=16*n+c}else i!==95&&o!==0||D(),i=u}return i!==95&&y-e===s||D(),n}h(Ce,"l");function We(s){return s===13||s===10}h(We,"u");function D(){throw Object.assign(Error(`Parse error ${Je}:${_.slice(0,y).split(` + `).length}:${y-_.lastIndexOf(` +-`,y-1)}`),{idx:y})}f(D,"o");let Se;typeof WebAssembly<"u"&&(async()=>{const{parse:s,init:e}=await import("./lexer-DQCqS3nf.mjs");await e,Se=s})();const Pe=f((s,e)=>Se?Se(s,e):fn(s,e),"parseEsm"),gn=f(s=>{if(!s.includes("import")&&!s.includes("export"))return!1;try{return Pe(s)[3]}catch{return!0}},"isESM"),Je="2",bn=(s=>{const e="default";return s[e]&&typeof s[e]=="object"&&"__esModule"in s[e]?s[e]:s}).toString(),pn=`.then(${bn})`,xe=f((s,e,n)=>{if(n){if(!e.includes("import("))return}else if(!e.includes("import"))return;const o=Pe(e,s)[0].filter(g=>g.d>-1);if(o.length===0)return;const c=new _e(e);for(const g of o)c.appendRight(g.se,pn);const u=c.toString(),p=c.generateMap({source:s,includeContent:!1,hires:"boundary"});return{code:u,map:p}},"transformDynamicImport"),Ge=f(s=>{try{const e=U.readFileSync(s,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),qe=f(()=>{},"noop"),ze=f(()=>Math.floor(Date.now()/1e8),"getTime");class wn extends Map{static{f(this,"FileCache")}cacheDirectory=Kt;oldCacheDirectory=X.join(Xt.tmpdir(),"tsx");cacheFiles;constructor(){super(),U.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=U.readdirSync(this.cacheDirectory).map(e=>{const[n,i]=e.split("-");return{time:Number(n),key:i,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){const n=super.get(e);if(n)return n;const i=this.cacheFiles.find(u=>u.key===e);if(!i)return;const o=X.join(this.cacheDirectory,i.fileName),c=Ge(o);if(!c){U.promises.unlink(o).then(()=>{const u=this.cacheFiles.indexOf(i);this.cacheFiles.splice(u,1)},()=>{});return}return super.set(e,c),c}set(e,n){if(super.set(e,n),n){const i=ze();U.promises.writeFile(X.join(this.cacheDirectory,`${i}-${e}`),JSON.stringify(n)).catch(qe)}return this}expireDiskCache(){const e=ze();for(const n of this.cacheFiles)e-n.time>7&&U.promises.unlink(X.join(this.cacheDirectory,n.fileName)).catch(qe)}async removeOldCacheDirectory(){try{await U.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in U.promises?await U.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await U.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var ie=process.env.TSX_DISABLE_CACHE?new Map:new wn;const mn=/^[\w+.-]+:\/\//,kn=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,yn=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function Cn(s){return mn.test(s)}f(Cn,"isAbsoluteUrl");function Sn(s){return s.startsWith("//")}f(Sn,"isSchemeRelativeUrl");function He(s){return s.startsWith("/")}f(He,"isAbsolutePath");function xn(s){return s.startsWith("file:")}f(xn,"isFileUrl");function Xe(s){return/^[.?#]/.test(s)}f(Xe,"isRelative");function se(s){const e=kn.exec(s);return Ke(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}f(se,"parseAbsoluteUrl");function vn(s){const e=yn.exec(s),n=e[2];return Ke("file:","",e[1]||"","",He(n)?n:"/"+n,e[3]||"",e[4]||"")}f(vn,"parseFileUrl");function Ke(s,e,n,i,o,c,u){return{scheme:s,user:e,host:n,port:i,path:o,query:c,hash:u,type:7}}f(Ke,"makeUrl");function Ye(s){if(Sn(s)){const n=se("http:"+s);return n.scheme="",n.type=6,n}if(He(s)){const n=se("http://foo.com"+s);return n.scheme="",n.host="",n.type=5,n}if(xn(s))return vn(s);if(Cn(s))return se(s);const e=se("http://foo.com/"+s);return e.scheme="",e.host="",e.type=s?s.startsWith("?")?3:s.startsWith("#")?2:4:1,e}f(Ye,"parseUrl");function _n(s){if(s.endsWith("/.."))return s;const e=s.lastIndexOf("/");return s.slice(0,e+1)}f(_n,"stripPathFilename");function En(s,e){Qe(e,e.type),s.path==="/"?s.path=e.path:s.path=_n(e.path)+s.path}f(En,"mergePaths");function Qe(s,e){const n=e<=4,i=s.path.split("/");let o=1,c=0,u=!1;for(let g=1;gi&&(i=u)}Qe(n,i);const o=n.query+n.hash;switch(i){case 2:case 3:return o;case 4:{const c=n.path.slice(1);return c?Xe(e||s)&&!Xe(c)?"./"+c+o:c+o:o||"."}case 5:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}f(Ln,"resolve$1");function Ze(s,e){return e&&!e.endsWith("/")&&(e+="/"),Ln(s,e)}f(Ze,"resolve");function On(s){if(!s)return"";const e=s.lastIndexOf("/");return s.slice(0,e+1)}f(On,"stripFilename");const F=0;function Rn(s,e){const n=Ve(s,0);if(n===s.length)return s;e||(s=s.slice());for(let i=n;i>1),c=s[o][F]-e;if(c===0)return oe=!0,o;c<0?n=o+1:i=o-1}return oe=!1,n-1}f(Mn,"binarySearch");function $n(s,e,n){for(let i=n-1;i>=0&&s[i][F]===e;n=i--);return n}f($n,"lowerBound");function Un(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}f(Un,"memoizedState");function jn(s,e,n,i){const{lastKey:o,lastNeedle:c,lastIndex:u}=n;let p=0,g=s.length-1;if(i===o){if(e===c)return oe=u!==-1&&s[u][F]===e,u;e>=c?p=u===-1?0:u:g=u}return n.lastKey=i,n.lastNeedle=e,n.lastIndex=Mn(s,e,p,g)}f(jn,"memoizedBinarySearch");class et{static{f(this,"TraceMap")}constructor(e,n){const i=typeof e=="string";if(!i&&e._decodedMemo)return e;const o=i?JSON.parse(e):e,{version:c,file:u,names:p,sourceRoot:g,sources:b,sourcesContent:d}=o;this.version=c,this.file=u,this.names=p||[],this.sourceRoot=g,this.sources=b,this.sourcesContent=d,this.ignoreList=o.ignoreList||o.x_google_ignoreList||void 0;const r=Ze(g||"",On(n));this.resolvedSources=b.map(L=>Ze(L||"",r));const{mappings:R}=o;typeof R=="string"?(this._encoded=R,this._decoded=void 0):(this._encoded=void 0,this._decoded=Rn(R,i)),this._decodedMemo=Un(),this._bySources=void 0,this._bySourceMemos=void 0}}function vr(s){return s}f(vr,"cast$2");function tt(s){var e;return(e=s)._decoded||(e._decoded=Qt(s._encoded))}f(tt,"decodedMappings");function Dn(s,e,n){const i=tt(s);if(e>=i.length)return null;const o=i[e],c=Tn(o,s._decodedMemo,e,n);return c===-1?null:o[c]}f(Dn,"traceSegment");function Tn(s,e,n,i,o){let c=jn(s,i,e,n);return oe&&(c=$n(s,i,c)),c===-1||c===s.length?-1:c}f(Tn,"traceSegmentInternal");class ve{static{f(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}}function _r(s){return s}f(_r,"cast$1");function nt(s,e){return s._indexes[e]}f(nt,"get");function V(s,e){const n=nt(s,e);if(n!==void 0)return n;const{array:i,_indexes:o}=s,c=i.push(e);return o[e]=c-1}f(V,"put");function Fn(s,e){const n=nt(s,e);if(n===void 0)return;const{array:i,_indexes:o}=s;for(let c=n+1;cYn(!0,s,e,n,i,o,c,u),"maybeAddSegment");function Hn(s,e,n){const{_sources:i,_sourcesContent:o}=s,c=V(i,e);o[c]=n}f(Hn,"setSourceContent");function Xn(s,e,n=!0){const{_sources:i,_sourcesContent:o,_ignoreList:c}=s,u=V(i,e);u===o.length&&(o[u]=null),n?V(c,u):Fn(c,u)}f(Xn,"setIgnore");function it(s){const{_mappings:e,_sources:n,_sourcesContent:i,_names:o,_ignoreList:c}=s;return Vn(e),{version:3,file:s.file||void 0,names:o.array,sourceRoot:s.sourceRoot||void 0,sources:n.array,sourcesContent:i,mappings:e,ignoreList:c.array}}f(it,"toDecodedMap");function Kn(s){const e=it(s);return Object.assign(Object.assign({},e),{mappings:De(e.mappings)})}f(Kn,"toEncodedMap");function Yn(s,e,n,i,o,c,u,p,g){const{_mappings:b,_sources:d,_sourcesContent:r,_names:R}=e,L=Qn(b,n),E=Zn(L,i);if(!o)return er(L,E)?void 0:st(L,E,[i]);const N=V(d,o),$=p?V(R,p):rt;if(N===r.length&&(r[N]=null),!tr(L,E,N,c,u,$))return st(L,E,p?[i,N,c,u,$]:[i,N,c,u])}f(Yn,"addSegmentInternal");function Qn(s,e){for(let n=s.length;n<=e;n++)s[n]=[];return s[e]}f(Qn,"getLine");function Zn(s,e){let n=s.length;for(let i=n-1;i>=0;n=i--){const o=s[i];if(e>=o[Wn])break}return n}f(Zn,"getColumnIndex");function st(s,e,n){for(let i=s.length;i>e;i--)s[i]=s[i-1];s[e]=n}f(st,"insert");function Vn(s){const{length:e}=s;let n=e;for(let i=n-1;i>=0&&!(s[i].length>0);n=i,i--);nnew et(c,"")),i=n.pop();for(let c=0;c1)throw new Error(`Transformation map ${c} must have exactly one source file. +-Did you specify these with the most recent transformation maps first?`);let o=ht(i,e,"",0);for(let c=n.length-1;c>=0;c--)o=ut(n[c],[o]);return o}f(or,"buildSourceMapTree");function ht(s,e,n,i){const{resolvedSources:o,sourcesContent:c,ignoreList:u}=s,p=i+1,g=o.map((b,d)=>{const r={importer:n,depth:p,source:b||"",content:void 0,ignore:void 0},R=e(r.source,r),{source:L,content:E,ignore:N}=r;if(R)return ht(new et(R,L),e,L,p);const $=E!==void 0?E:c?c[d]:null,W=N!==void 0?N:u?u.includes(d):!1;return rr(L,$,W)});return ut(s,g)}f(ht,"build");class ar{static{f(this,"SourceMap")}constructor(e,n){const i=n.decodedMappings?it(e):Kn(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,n.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function ft(s,e,n){const i={excludeContent:!!n,decodedMappings:!1},o=or(s,e);return new ar(ir(o),i)}f(ft,"remapping");const cr=f((s,e,n)=>{const i=[],o={code:e};for(const c of n){const u=c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:ft(i,()=>null)}},"applyTransformersSync"),ur=f(async(s,e,n)=>{const i=[],o={code:e};for(const c of n){const u=await c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:ft(i,()=>null)}},"applyTransformers"),lr=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),hr=/^--inspect(?:-brk|-port|-publish-uid|-wait)?(?:=|$)/,fr=process.execArgv.some(s=>hr.test(s)),dt={...lr,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE||fr,minifyWhitespace:!0,keepNames:!0},gt=f(s=>{const e=s.sourcefile;if(e){const n=X.extname(e.split("?")[0]);n?n===".cts"||n===".mts"?s.sourcefile=`${e.slice(0,-3)}ts`:n===".mjs"&&(s.sourcefile=`${e.slice(0,-3)}js`):s.sourcefile+=".js"}return n=>(n.map&&(s.sourcefile!==e&&(n.map=n.map.replace(JSON.stringify(s.sourcefile),JSON.stringify(e))),n.map=JSON.parse(n.map)),n)},"patchOptions"),bt=f(s=>{throw s.name="TransformError",delete s.errors,delete s.warnings,s},"formatEsbuildError"),dr=f((s,e,n)=>{const i={};let o,c,u;if(e.startsWith("file://")){o=e;const d=new URL(e);c=Jt(d)}else[c,u]=e.split("?"),o=Gt(c)+(u?`?${u}`:"");c.endsWith(".cjs")||c.endsWith(".cts")||(i["import.meta.url"]=JSON.stringify(o));const p={...dt,format:"cjs",sourcefile:c,define:i,banner:`__filename=${JSON.stringify(c)};(()=>{`,footer:"})()",platform:"node",...n},g=Ne([s,JSON.stringify(p),Ae,Je].join("-"));let b=ie.get(g);return b||(b=cr(e,s,[(d,r)=>{const R=gt(p);let L;try{L=qt(r,p)}catch(E){throw bt(E)}return R(L)},(d,r)=>xe(d,r,!0)]),ie.set(g,b)),b},"transformSync"),gr=f(async(s,e,n)=>{const i={...dt,format:"esm",sourcefile:e,...n},o=Ne([s,JSON.stringify(i),Ae,Je].join("-"));let c=ie.get(o);return c||(c=await ur(e,s,[async(u,p)=>{const g=gt(i);let b;try{b=await zt(p,i)}catch(d){throw bt(d)}return g(b)},(u,p)=>xe(u,p,!0)]),ie.set(o,c)),c},"transform");export{dr as a,xe as b,gn as i,Ge as r,gr as t}; ++`,y-1)}`),{idx:y})}h(D,"o");let Se;typeof WebAssembly<"u"&&(async()=>{const{parse:s,init:e}=await import("./lexer-DQCqS3nf.mjs");await e,Se=s})();const Be=h((s,e)=>Se?Se(s,e):dn(s,e),"parseEsm"),bn=h(s=>{if(!s.includes("import")&&!s.includes("export"))return!1;try{return Be(s)[3]}catch{return!0}},"isESM"),Pe="2",pn=(s=>{const e="default";return s[e]&&typeof s[e]=="object"&&"__esModule"in s[e]?s[e]:s}).toString(),mn=`.then(${pn})`,xe=h((s,e,n)=>{if(n){if(!e.includes("import("))return}else if(!e.includes("import"))return;const o=Be(e,s)[0].filter(g=>g.d>-1);if(o.length===0)return;const c=new _e(e);for(const g of o)c.appendRight(g.se,mn);const u=c.toString(),p=c.generateMap({source:s,includeContent:!1,hires:"boundary"});return{code:u,map:p}},"transformDynamicImport"),Ge=h(s=>{try{const e=U.readFileSync(s,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),qe=h(()=>{},"noop"),ze=h(()=>Math.floor(Date.now()/1e8),"getTime");class wn extends Map{static{h(this,"FileCache")}cacheDirectory=Yt;oldCacheDirectory=X.join(Kt.tmpdir(),"tsx");cacheFiles;constructor(){super(),U.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=U.readdirSync(this.cacheDirectory).map(e=>{const[n,i]=e.split("-");return{time:Number(n),key:i,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){const n=super.get(e);if(n)return n;const i=this.cacheFiles.find(u=>u.key===e);if(!i)return;const o=X.join(this.cacheDirectory,i.fileName),c=Ge(o);if(!c){U.promises.unlink(o).then(()=>{const u=this.cacheFiles.indexOf(i);this.cacheFiles.splice(u,1)},()=>{});return}return super.set(e,c),c}set(e,n){if(super.set(e,n),n){const i=ze();U.promises.writeFile(X.join(this.cacheDirectory,`${i}-${e}`),JSON.stringify(n)).catch(qe)}return this}expireDiskCache(){const e=ze();for(const n of this.cacheFiles)e-n.time>7&&U.promises.unlink(X.join(this.cacheDirectory,n.fileName)).catch(qe)}async removeOldCacheDirectory(){try{await U.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in U.promises?await U.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await U.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var ie=process.env.TSX_DISABLE_CACHE?new Map:new wn;const kn=/^[\w+.-]+:\/\//,yn=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Cn=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function Sn(s){return kn.test(s)}h(Sn,"isAbsoluteUrl");function xn(s){return s.startsWith("//")}h(xn,"isSchemeRelativeUrl");function He(s){return s.startsWith("/")}h(He,"isAbsolutePath");function vn(s){return s.startsWith("file:")}h(vn,"isFileUrl");function Xe(s){return/^[.?#]/.test(s)}h(Xe,"isRelative");function se(s){const e=yn.exec(s);return Ke(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}h(se,"parseAbsoluteUrl");function _n(s){const e=Cn.exec(s),n=e[2];return Ke("file:","",e[1]||"","",He(n)?n:"/"+n,e[3]||"",e[4]||"")}h(_n,"parseFileUrl");function Ke(s,e,n,i,o,c,u){return{scheme:s,user:e,host:n,port:i,path:o,query:c,hash:u,type:7}}h(Ke,"makeUrl");function Ye(s){if(xn(s)){const n=se("http:"+s);return n.scheme="",n.type=6,n}if(He(s)){const n=se("http://foo.com"+s);return n.scheme="",n.host="",n.type=5,n}if(vn(s))return _n(s);if(Sn(s))return se(s);const e=se("http://foo.com/"+s);return e.scheme="",e.host="",e.type=s?s.startsWith("?")?3:s.startsWith("#")?2:4:1,e}h(Ye,"parseUrl");function En(s){if(s.endsWith("/.."))return s;const e=s.lastIndexOf("/");return s.slice(0,e+1)}h(En,"stripPathFilename");function Ln(s,e){Qe(e,e.type),s.path==="/"?s.path=e.path:s.path=En(e.path)+s.path}h(Ln,"mergePaths");function Qe(s,e){const n=e<=4,i=s.path.split("/");let o=1,c=0,u=!1;for(let g=1;gi&&(i=u)}Qe(n,i);const o=n.query+n.hash;switch(i){case 2:case 3:return o;case 4:{const c=n.path.slice(1);return c?Xe(e||s)&&!Xe(c)?"./"+c+o:c+o:o||"."}case 5:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}h(On,"resolve$1");function Ze(s,e){return e&&!e.endsWith("/")&&(e+="/"),On(s,e)}h(Ze,"resolve");function Rn(s){if(!s)return"";const e=s.lastIndexOf("/");return s.slice(0,e+1)}h(Rn,"stripFilename");const F=0;function An(s,e){const n=Ve(s,0);if(n===s.length)return s;e||(s=s.slice());for(let i=n;i>1),c=s[o][F]-e;if(c===0)return oe=!0,o;c<0?n=o+1:i=o-1}return oe=!1,n-1}h($n,"binarySearch");function Un(s,e,n){for(let i=n-1;i>=0&&s[i][F]===e;n=i--);return n}h(Un,"lowerBound");function jn(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}h(jn,"memoizedState");function Dn(s,e,n,i){const{lastKey:o,lastNeedle:c,lastIndex:u}=n;let p=0,g=s.length-1;if(i===o){if(e===c)return oe=u!==-1&&s[u][F]===e,u;e>=c?p=u===-1?0:u:g=u}return n.lastKey=i,n.lastNeedle=e,n.lastIndex=$n(s,e,p,g)}h(Dn,"memoizedBinarySearch");class et{static{h(this,"TraceMap")}constructor(e,n){const i=typeof e=="string";if(!i&&e._decodedMemo)return e;const o=i?JSON.parse(e):e,{version:c,file:u,names:p,sourceRoot:g,sources:b,sourcesContent:d}=o;this.version=c,this.file=u,this.names=p||[],this.sourceRoot=g,this.sources=b,this.sourcesContent=d,this.ignoreList=o.ignoreList||o.x_google_ignoreList||void 0;const r=Ze(g||"",Rn(n));this.resolvedSources=b.map(L=>Ze(L||"",r));const{mappings:R}=o;typeof R=="string"?(this._encoded=R,this._decoded=void 0):(this._encoded=void 0,this._decoded=An(R,i)),this._decodedMemo=jn(),this._bySources=void 0,this._bySourceMemos=void 0}}function _r(s){return s}h(_r,"cast$2");function tt(s){var e;return(e=s)._decoded||(e._decoded=Zt(s._encoded))}h(tt,"decodedMappings");function Tn(s,e,n){const i=tt(s);if(e>=i.length)return null;const o=i[e],c=Fn(o,s._decodedMemo,e,n);return c===-1?null:o[c]}h(Tn,"traceSegment");function Fn(s,e,n,i,o){let c=Dn(s,i,e,n);return oe&&(c=Un(s,i,c)),c===-1||c===s.length?-1:c}h(Fn,"traceSegmentInternal");class ve{static{h(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}}function Er(s){return s}h(Er,"cast$1");function nt(s,e){return s._indexes[e]}h(nt,"get");function V(s,e){const n=nt(s,e);if(n!==void 0)return n;const{array:i,_indexes:o}=s,c=i.push(e);return o[e]=c-1}h(V,"put");function Jn(s,e){const n=nt(s,e);if(n===void 0)return;const{array:i,_indexes:o}=s;for(let c=n+1;cQn(!0,s,e,n,i,o,c,u),"maybeAddSegment");function Xn(s,e,n){const{_sources:i,_sourcesContent:o}=s,c=V(i,e);o[c]=n}h(Xn,"setSourceContent");function Kn(s,e,n=!0){const{_sources:i,_sourcesContent:o,_ignoreList:c}=s,u=V(i,e);u===o.length&&(o[u]=null),n?V(c,u):Jn(c,u)}h(Kn,"setIgnore");function it(s){const{_mappings:e,_sources:n,_sourcesContent:i,_names:o,_ignoreList:c}=s;return er(e),{version:3,file:s.file||void 0,names:o.array,sourceRoot:s.sourceRoot||void 0,sources:n.array,sourcesContent:i,mappings:e,ignoreList:c.array}}h(it,"toDecodedMap");function Yn(s){const e=it(s);return Object.assign(Object.assign({},e),{mappings:De(e.mappings)})}h(Yn,"toEncodedMap");function Qn(s,e,n,i,o,c,u,p,g){const{_mappings:b,_sources:d,_sourcesContent:r,_names:R}=e,L=Zn(b,n),E=Vn(L,i);if(!o)return tr(L,E)?void 0:st(L,E,[i]);const N=V(d,o),$=p?V(R,p):rt;if(N===r.length&&(r[N]=null),!nr(L,E,N,c,u,$))return st(L,E,p?[i,N,c,u,$]:[i,N,c,u])}h(Qn,"addSegmentInternal");function Zn(s,e){for(let n=s.length;n<=e;n++)s[n]=[];return s[e]}h(Zn,"getLine");function Vn(s,e){let n=s.length;for(let i=n-1;i>=0;n=i--){const o=s[i];if(e>=o[Wn])break}return n}h(Vn,"getColumnIndex");function st(s,e,n){for(let i=s.length;i>e;i--)s[i]=s[i-1];s[e]=n}h(st,"insert");function er(s){const{length:e}=s;let n=e;for(let i=n-1;i>=0&&!(s[i].length>0);n=i,i--);nnew et(c,"")),i=n.pop();for(let c=0;c1)throw new Error(`Transformation map ${c} must have exactly one source file. ++Did you specify these with the most recent transformation maps first?`);let o=ft(i,e,"",0);for(let c=n.length-1;c>=0;c--)o=ut(n[c],[o]);return o}h(ar,"buildSourceMapTree");function ft(s,e,n,i){const{resolvedSources:o,sourcesContent:c,ignoreList:u}=s,p=i+1,g=o.map((b,d)=>{const r={importer:n,depth:p,source:b||"",content:void 0,ignore:void 0},R=e(r.source,r),{source:L,content:E,ignore:N}=r;if(R)return ft(new et(R,L),e,L,p);const $=E!==void 0?E:c?c[d]:null,J=N!==void 0?N:u?u.includes(d):!1;return ir(L,$,J)});return ut(s,g)}h(ft,"build");class cr{static{h(this,"SourceMap")}constructor(e,n){const i=n.decodedMappings?it(e):Yn(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,n.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function ht(s,e,n){const i={excludeContent:!!n,decodedMappings:!1},o=ar(s,e);return new cr(sr(o),i)}h(ht,"remapping");const ur=h((s,e,n)=>{const i=[],o={code:e};for(const c of n){const u=c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:ht(i,()=>null)}},"applyTransformersSync"),lr=h(async(s,e,n)=>{const i=[],o={code:e};for(const c of n){const u=await c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:ht(i,()=>null)}},"applyTransformers"),fr=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),hr=/^--inspect(?:-brk|-port|-publish-uid|-wait)?(?:=|$)/,dr=process.execArgv.some(s=>hr.test(s)),dt={...fr,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE||dr,minifyWhitespace:!0,keepNames:!0},gt=h(s=>{const e=s.sourcefile;if(e){const n=X.extname(e.split("?")[0]);n?n===".cts"||n===".mts"?s.sourcefile=`${e.slice(0,-3)}ts`:n===".mjs"&&(s.sourcefile=`${e.slice(0,-3)}js`):s.sourcefile+=".js"}return n=>(n.map&&(s.sourcefile!==e&&(n.map=n.map.replace(JSON.stringify(s.sourcefile),JSON.stringify(e))),n.map=JSON.parse(n.map)),n)},"patchOptions"),bt=h(s=>{throw s.name="TransformError",delete s.errors,delete s.warnings,s},"formatEsbuildError"),gr=h((s,e,n)=>{const i={};let o,c,u;if(e.startsWith("file://")){o=e;const d=new URL(e);c=Pt(d)}else[c,u]=e.split("?"),o=Gt(c)+(u?`?${u}`:"");c.endsWith(".cjs")||c.endsWith(".cts")||(i["import.meta.url"]=JSON.stringify(o),i["import.meta.dirname"]=JSON.stringify(qt(c)),i["import.meta.filename"]=JSON.stringify(c));const p={...dt,format:"cjs",sourcefile:c,define:i,banner:`__filename=${JSON.stringify(c)};(()=>{`,footer:"})()",platform:"node",...n},g=Ne([s,JSON.stringify(p),Ae,Pe].join("-"));let b=ie.get(g);return b||(b=ur(e,s,[(d,r)=>{const R=gt(p);let L;try{L=zt(r,p)}catch(E){throw bt(E)}return R(L)},(d,r)=>xe(d,r,!0)]),ie.set(g,b)),b},"transformSync"),br=h(async(s,e,n)=>{const i={...dt,format:"esm",sourcefile:e,...n},o=Ne([s,JSON.stringify(i),Ae,Pe].join("-"));let c=ie.get(o);return c||(c=await lr(e,s,[async(u,p)=>{const g=gt(i);let b;try{b=await Ht(p,i)}catch(d){throw bt(d)}return g(b)},(u,p)=>xe(u,p,!0)]),ie.set(o,c)),c},"transform");export{gr as a,xe as b,bn as i,Ge as r,br as t}; +diff --git a/dist/index-gckBtVBf.cjs b/dist/index-gckBtVBf.cjs +index 0e0ab035723a233390e2329a23a3a6aead3804b5..29c7331bf03638a1eb2956b1939822b0eaf092e5 100644 +--- a/dist/index-gckBtVBf.cjs ++++ b/dist/index-gckBtVBf.cjs +@@ -1,4 +1,4 @@ +-"use strict";var Bt=Object.defineProperty;var f=(s,e)=>Bt(s,"name",{value:e,configurable:!0});var Ne=require("node:url"),ne=require("esbuild"),Jt=require("node:crypto"),j=require("node:fs"),X=require("node:path"),Gt=require("node:os"),zt=require("./temporary-directory-B83uKxJF.cjs");const Ie=f(s=>Jt.createHash("sha1").update(s).digest("hex"),"sha1"),Me=44,Ht=59,Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",je=new Uint8Array(64),$e=new Uint8Array(128);for(let s=0;s>>=1,p&&(o=-2147483648|-o),r[i]+=o,e}f(K,"decodeInteger");function De(s,e,r){return e>=r?!1:s.charCodeAt(e)!==Me}f(De,"hasMoreVlq");function Yt(s){s.sort(Qt)}f(Yt,"sort");function Qt(s,e){return s[0]-e[0]}f(Qt,"sortComparator$1");function Te(s){const e=new Int32Array(5),r=1024*16,i=r-36,o=new Uint8Array(r),c=o.subarray(0,i);let u=0,p="";for(let g=0;g0&&(u===r&&(p+=ke.decode(o),u=0),o[u++]=Ht),b.length!==0){e[0]=0;for(let d=0;di&&(p+=ke.decode(c),o.copyWithin(0,i,u),u-=i),d>0&&(o[u++]=Me),u=Y(o,u,e,n,0),n.length!==1&&(u=Y(o,u,e,n,1),u=Y(o,u,e,n,2),u=Y(o,u,e,n,3),n.length!==4&&(u=Y(o,u,e,n,4)))}}}return p+ke.decode(o.subarray(0,u))}f(Te,"encode");function Y(s,e,r,i,o){const c=i[o];let u=c-r[o];r[o]=c,u=u<0?-u<<1|1:u<<1;do{let p=u&31;u>>>=5,u>0&&(p|=32),s[e++]=je[p]}while(u>0);return e}f(Y,"encodeInteger");class ce{static{f(this,"BitSet")}constructor(e){this.bits=e instanceof ce?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class ee{static{f(this,"Chunk")}constructor(e,r,i){this.start=e,this.end=r,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new ee(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.startglobalThis.btoa(unescape(encodeURIComponent(s))):typeof Buffer=="function"?s=>Buffer.from(s,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}f(Zt,"getBtoa");const Vt=Zt();let er=class{static{f(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Te(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Vt(this.toString())}};function tr(s){const e=s.split(` ++"use strict";var qt=Object.defineProperty;var f=(s,e)=>qt(s,"name",{value:e,configurable:!0});var Ne=require("node:url"),q=require("node:path"),ne=require("esbuild"),Bt=require("node:crypto"),j=require("node:fs"),Gt=require("node:os"),zt=require("./temporary-directory-B83uKxJF.cjs");const Ie=f(s=>Bt.createHash("sha1").update(s).digest("hex"),"sha1"),Me=44,Ht=59,Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",je=new Uint8Array(64),$e=new Uint8Array(128);for(let s=0;s>>=1,p&&(o=-2147483648|-o),r[i]+=o,e}f(K,"decodeInteger");function De(s,e,r){return e>=r?!1:s.charCodeAt(e)!==Me}f(De,"hasMoreVlq");function Yt(s){s.sort(Qt)}f(Yt,"sort");function Qt(s,e){return s[0]-e[0]}f(Qt,"sortComparator$1");function Te(s){const e=new Int32Array(5),r=1024*16,i=r-36,o=new Uint8Array(r),c=o.subarray(0,i);let u=0,p="";for(let g=0;g0&&(u===r&&(p+=ke.decode(o),u=0),o[u++]=Ht),b.length!==0){e[0]=0;for(let d=0;di&&(p+=ke.decode(c),o.copyWithin(0,i,u),u-=i),d>0&&(o[u++]=Me),u=Y(o,u,e,n,0),n.length!==1&&(u=Y(o,u,e,n,1),u=Y(o,u,e,n,2),u=Y(o,u,e,n,3),n.length!==4&&(u=Y(o,u,e,n,4)))}}}return p+ke.decode(o.subarray(0,u))}f(Te,"encode");function Y(s,e,r,i,o){const c=i[o];let u=c-r[o];r[o]=c,u=u<0?-u<<1|1:u<<1;do{let p=u&31;u>>>=5,u>0&&(p|=32),s[e++]=je[p]}while(u>0);return e}f(Y,"encodeInteger");class ce{static{f(this,"BitSet")}constructor(e){this.bits=e instanceof ce?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class ee{static{f(this,"Chunk")}constructor(e,r,i){this.start=e,this.end=r,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new ee(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.startglobalThis.btoa(unescape(encodeURIComponent(s))):typeof Buffer=="function"?s=>Buffer.from(s,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}f(Zt,"getBtoa");const Vt=Zt();let er=class{static{f(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Te(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Vt(this.toString())}};function tr(s){const e=s.split(` + `),r=e.filter(c=>/^\t+/.test(c)),i=e.filter(c=>/^ {2,}/.test(c));if(r.length===0&&i.length===0)return null;if(r.length>=i.length)return" ";const o=i.reduce((c,u)=>{const p=/^ +/.exec(u)[0].length;return Math.min(p,c)},1/0);return new Array(o+1).join(" ")}f(tr,"guessIndent");function rr(s,e){const r=s.split(/[/\\]/),i=e.split(/[/\\]/);for(r.pop();r[0]===i[0];)r.shift(),i.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(i).join("/")}f(rr,"getRelativePath");const nr=Object.prototype.toString;function ir(s){return nr.call(s)==="[object Object]"}f(ir,"isObject");function Fe(s){const e=s.split(` + `),r=[];for(let i=0,o=0;i>1;o=0&&c>u;){const b=[this.generatedCodeColumn,e,i.line,i.column];o>=0&&b.push(o),this.rawSegments.push(b),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,p=u,u=r.indexOf(` +@@ -7,8 +7,8 @@ + `);if(r.length>1){for(let i=0;i{const p=c(u.start);u.intro.length&&o.advance(u.intro),u.edited?o.addEdit(r,u.content,p,u.storeName?i.indexOf(u.original):-1):o.addUneditedChunk(r,u,this.original,p,this.sourcemapLocations),u.outro.length&&o.advance(u.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?rr(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:i,mappings:o.raw,x_google_ignoreList:this.ignoreList?[r]:void 0}}generateMap(e){return new er(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=tr(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,r){const i=/^[^\r\n]/gm;if(ir(e)&&(r=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;r=r||{};const o={};r.exclude&&(typeof r.exclude[0]=="number"?[r.exclude]:r.exclude).forEach(d=>{for(let n=d[0];nc?`${e}${b}`:(c=!0,b),"replacer");this.intro=this.intro.replace(i,u);let p=0,g=this.firstChunk;for(;g;){const b=g.end;if(g.edited)o[p]||(g.content=g.content.replace(i,u),g.content.length&&(c=g.content[g.content.length-1]===` + `));else for(p=g.start;p=e&&i<=r)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(r),this._split(i);const o=this.byStart[e],c=this.byEnd[r],u=o.previous,p=c.next,g=this.byStart[i];if(!g&&c===this.lastChunk)return this;const b=g?g.previous:this.lastChunk;return u&&(u.next=p),p&&(p.previous=u),b&&(b.next=o),g&&(g.previous=c),o.previous||(this.firstChunk=c.next),c.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=b,c.next=g||null,b||(this.firstChunk=o),g||(this.lastChunk=c),this}overwrite(e,r,i,o){return o=o||{},this.update(e,r,i,{...o,overwrite:!o.contentOnly})}update(e,r,i,o){if(typeof i!="string")throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;if(r>this.original.length)throw new Error("end is out of bounds");if(e===r)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(r),o===!0&&(B.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),B.storeName=!0),o={storeName:!0});const c=o!==void 0?o.storeName:!1,u=o!==void 0?o.overwrite:!1;if(c){const b=this.original.slice(e,r);Object.defineProperty(this.storedNames,b,{writable:!0,value:!0,enumerable:!0})}const p=this.byStart[e],g=this.byEnd[r];if(p){let b=p;for(;b!==g;){if(b.next!==this.byStart[b.end])throw new Error("Cannot overwrite across a split point");b=b.next,b.edit("",!1)}p.edit(i,c,!u)}else{const b=new ee(e,r,"").edit(i,c);g.next=b,b.previous=g}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.prependLeft(r):this.intro=r+this.intro,this}prependRight(e,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.prependRight(r):this.outro=r+this.outro,this}remove(e,r){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let i=this.byStart[e];for(;i;)i.intro="",i.outro="",i.edit(""),i=r>i.end?this.byStart[i.end]:null;return this}reset(e,r){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let i=this.byStart[e];for(;i;)i.reset(),i=r>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(Q);if(e!==-1)return this.outro.substr(e+1);let r=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(e=i.outro.lastIndexOf(Q),e!==-1)return i.outro.substr(e+1)+r;r=i.outro+r}if(i.content.length>0){if(e=i.content.lastIndexOf(Q),e!==-1)return i.content.substr(e+1)+r;r=i.content+r}if(i.intro.length>0){if(e=i.intro.lastIndexOf(Q),e!==-1)return i.intro.substr(e+1)+r;r=i.intro+r}}while(i=i.previous);return e=this.intro.lastIndexOf(Q),e!==-1?this.intro.substr(e+1)+r:this.intro+r}slice(e=0,r=this.original.length){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;let i="",o=this.firstChunk;for(;o&&(o.start>e||o.end<=e);){if(o.start=r)return i;o=o.next}if(o&&o.edited&&o.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const c=o;for(;o;){o.intro&&(c!==o||o.start===e)&&(i+=o.intro);const u=o.start=r;if(u&&o.edited&&o.end!==r)throw new Error(`Cannot use replaced character ${r} as slice end anchor.`);const p=c===o?e-o.start:0,g=u?o.content.length+r-o.end:o.content.length;if(i+=o.content.slice(p,g),o.outro&&(!u||o.end===r)&&(i+=o.outro),u)break;o=o.next}return i}snip(e,r){const i=this.clone();return i.remove(0,e),i.remove(r,i.original.length),i}_split(e){if(this.byStart[e]||this.byEnd[e])return;let r=this.lastSearchedChunk;const i=e>r.end;for(;r;){if(r.contains(e))return this._splitChunk(r,e);r=i?this.byStart[r.end]:this.byEnd[r.start]}}_splitChunk(e,r){if(e.edited&&e.content.length){const o=Fe(this.original)(r);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${e.original}")`)}const i=e.split(r);return this.byEnd[r]=e,this.byStart[r]=i,this.byEnd[i.end]=i,e===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,r=this.firstChunk;for(;r;)e+=r.toString(),r=r.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,r=0;do r+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return r}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const r=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(r,""),this.outro.length)return!0;let i=this.lastChunk;do{const o=i.end,c=i.trimEnd(r);if(i.end!==o&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.previous}while(i);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const r=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(r,""),this.intro.length)return!0;let i=this.firstChunk;do{const o=i.end,c=i.trimStart(r);if(i.end!==o&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.next}while(i);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,r){function i(c,u){return typeof r=="string"?r.replace(/\$(\$|&|\d+)/g,(p,g)=>g==="$"?"$":g==="&"?c[0]:+g{if(u.index!=null){const p=i(u,this.original);p!==u[0]&&this.overwrite(u.index,u.index+u[0].length,p)}});else{const c=this.original.match(e);if(c&&c.index!=null){const u=i(c,this.original);u!==c[0]&&this.overwrite(c.index,c.index+c[0].length,u)}}return this}_replaceString(e,r){const{original:i}=this,o=i.indexOf(e);return o!==-1&&this.overwrite(o,o+e.length,r),this}replace(e,r){return typeof e=="string"?this._replaceString(e,r):this._replaceRegexp(e,r)}_replaceAllString(e,r){const{original:i}=this,o=e.length;for(let c=i.indexOf(e);c!==-1;c=i.indexOf(e,c+o))i.slice(c,c+o)!==r&&this.overwrite(c,c+o,r);return this}replaceAll(e,r){if(typeof e=="string")return this._replaceAllString(e,r);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,r)}}let x,ie,ye,Z=2<<19;const Pe=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(s,e){const r=s.length;let i=0;for(;i>>8}},ar="xportmportlassforetaourceromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileifcatcfinallels";let _,We,y;function cr(s,e="@"){_=s,We=e;const r=2*_.length+(2<<18);if(r>Z||!x){for(;r>Z;)Z*=2;ie=new ArrayBuffer(Z),Pe(ar,new Uint16Array(ie,16,110)),x=function(u,p,g){var b=new u.Int8Array(g),d=new u.Int16Array(g),n=new u.Int32Array(g),R=new u.Uint8Array(g),L=new u.Uint16Array(g),E=1040;function N(){var t=0,a=0,h=0,l=0,w=0,m=0,C=0;C=E,E=E+10240|0,b[804]=1,b[803]=0,d[399]=0,d[400]=0,n[69]=n[2],b[805]=0,n[68]=0,b[802]=0,n[70]=C+2048,n[71]=C,b[806]=0,t=(n[3]|0)+-2|0,n[72]=t,a=t+(n[66]<<1)|0,n[73]=a;e:for(;;){if(h=t+2|0,n[72]=h,t>>>0>=a>>>0){l=18;break}t:do switch(d[h>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(!(d[400]|0)&&z(h)|0&&!(A(t+4|0,16,10)|0)&&(U(),(b[804]|0)==0)){l=9;break e}else l=17;break}case 105:{z(h)|0&&!(A(t+4|0,26,10)|0)&&P(),l=17;break}case 59:{l=17;break}case 47:switch(d[t+4>>1]|0){case 47:{de();break t}case 42:{he(1);break t}default:{l=16;break e}}default:{l=16;break e}}while(!1);(l|0)==17&&(l=0,n[69]=n[72]),t=n[72]|0,a=n[73]|0}(l|0)==9?(t=n[72]|0,n[69]=t,l=19):(l|0)==16?(b[804]=0,n[72]=t,l=19):(l|0)==18&&(b[802]|0?t=0:(t=h,l=19));do if((l|0)==19){e:for(;;){if(a=t+2|0,n[72]=a,t>>>0>=(n[73]|0)>>>0){l=92;break}t:do switch(d[a>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{!(d[400]|0)&&z(a)|0&&!(A(t+4|0,16,10)|0)&&U(),l=91;break}case 105:{z(a)|0&&!(A(t+4|0,26,10)|0)&&P(),l=91;break}case 99:{z(a)|0&&!(A(t+4|0,36,8)|0)&&q(d[t+12>>1]|0)|0&&(b[806]=1),l=91;break}case 40:{h=n[70]|0,t=d[400]|0,l=t&65535,n[h+(l<<3)>>2]=1,a=n[69]|0,d[400]=t+1<<16>>16,n[h+(l<<3)+4>>2]=a,l=91;break}case 41:{if(a=d[400]|0,!(a<<16>>16)){l=36;break e}h=a+-1<<16>>16,d[400]=h,l=d[399]|0,a=l&65535,l<<16>>16&&(n[(n[70]|0)+((h&65535)<<3)>>2]|0)==5&&(a=n[(n[71]|0)+(a+-1<<2)>>2]|0,h=a+4|0,n[h>>2]|0||(n[h>>2]=(n[69]|0)+2),n[a+12>>2]=t+4,d[399]=l+-1<<16>>16),l=91;break}case 123:{l=n[69]|0,h=n[63]|0,t=l;do if((d[l>>1]|0)==41&(h|0)!=0&&(n[h+4>>2]|0)==(l|0))if(a=n[64]|0,n[63]=a,a){n[a+32>>2]=0;break}else{n[59]=0;break}while(!1);h=n[70]|0,a=d[400]|0,l=a&65535,n[h+(l<<3)>>2]=b[806]|0?6:2,d[400]=a+1<<16>>16,n[h+(l<<3)+4>>2]=t,b[806]=0,l=91;break}case 125:{if(t=d[400]|0,!(t<<16>>16)){l=49;break e}h=n[70]|0,l=t+-1<<16>>16,d[400]=l,(n[h+((l&65535)<<3)>>2]|0)==4&&Le(),l=91;break}case 39:{I(39),l=91;break}case 34:{I(34),l=91;break}case 47:switch(d[t+4>>1]|0){case 47:{de();break t}case 42:{he(1);break t}default:{t=n[69]|0,a=d[t>>1]|0;r:do if(!(yt(a)|0))a<<16>>16==41?(h=d[400]|0,xt(n[(n[70]|0)+((h&65535)<<3)+4>>2]|0)|0||(l=65)):l=64;else switch(a<<16>>16){case 46:if(((d[t+-2>>1]|0)+-48&65535)<10){l=64;break r}else break r;case 43:if((d[t+-2>>1]|0)==43){l=64;break r}else break r;case 45:if((d[t+-2>>1]|0)==45){l=64;break r}else break r;default:break r}while(!1);(l|0)==64&&(h=d[400]|0,l=65);r:do if((l|0)==65){if(l=0,h<<16>>16&&(w=n[70]|0,m=(h&65535)+-1|0,a<<16>>16==102?(n[w+(m<<3)>>2]|0)==1:0)){if((d[t+-2>>1]|0)==111&&O(n[w+(m<<3)+4>>2]|0,44,3)|0)break}else l=69;if((l|0)==69&&a<<16>>16==125&&(l=n[70]|0,h=h&65535,kt(n[l+(h<<3)+4>>2]|0)|0||(n[l+(h<<3)>>2]|0)==6))break;if(!(wt(t)|0)){switch(a<<16>>16){case 0:break r;case 47:{if(b[805]|0)break r;break}default:}if(l=n[65]|0,l|0&&t>>>0>=(n[l>>2]|0)>>>0&&t>>>0<=(n[l+4>>2]|0)>>>0){le(),b[805]=0,l=91;break t}h=n[3]|0;do{if(t>>>0<=h>>>0)break;t=t+-2|0,n[69]=t,a=d[t>>1]|0}while(!(fe(a)|0));if(re(a)|0){do{if(t>>>0<=h>>>0)break;t=t+-2|0,n[69]=t}while(re(d[t>>1]|0)|0);if(St(t)|0){le(),b[805]=0,l=91;break t}}b[805]=1,l=91;break t}}while(!1);le(),b[805]=0,l=91;break t}}case 96:{h=n[70]|0,a=d[400]|0,l=a&65535,n[h+(l<<3)+4>>2]=n[69],d[400]=a+1<<16>>16,n[h+(l<<3)>>2]=3,Le(),l=91;break}default:l=91}while(!1);(l|0)==91&&(l=0,n[69]=n[72]),t=n[72]|0}if((l|0)==36){M(),t=0;break}else if((l|0)==49){M(),t=0;break}else if((l|0)==92){t=b[802]|0?0:(d[399]|d[400])<<16>>16==0;break}}while(!1);return E=C,t|0}f(N,"b");function U(){var t=0,a=0,h=0,l=0,w=0,m=0,C=0,T=0,be=0,pe=0,we=0,me=0,S=0,v=0;T=n[72]|0,be=n[65]|0,v=T+12|0,n[72]=v,h=k(1)|0,t=n[72]|0,(t|0)==(v|0)&&!(te(h)|0)||(S=3);e:do if((S|0)==3){t:do switch(h<<16>>16){case 123:{for(n[72]=t+2,t=k(1)|0,a=n[72]|0;;){if(H(t)|0?(I(t),t=(n[72]|0)+2|0,n[72]=t):($(t)|0,t=n[72]|0),k(1)|0,t=Oe(a,t)|0,t<<16>>16==44&&(n[72]=(n[72]|0)+2,t=k(1)|0),t<<16>>16==125){S=15;break}if(v=a,a=n[72]|0,(a|0)==(v|0)){S=12;break}if(a>>>0>(n[73]|0)>>>0){S=14;break}}if((S|0)==12){M();break e}else if((S|0)==14){M();break e}else if((S|0)==15){b[803]=1,n[72]=(n[72]|0)+2;break t}break}case 42:{n[72]=t+2,k(1)|0,v=n[72]|0,Oe(v,v)|0;break}default:{switch(b[804]=0,h<<16>>16){case 100:{switch(T=t+14|0,n[72]=T,(k(1)|0)<<16>>16){case 97:{a=n[72]|0,!(A(a+2|0,72,8)|0)&&(w=a+10|0,re(d[w>>1]|0)|0)&&(n[72]=w,k(0)|0,S=22);break}case 102:{S=22;break}case 99:{a=n[72]|0,!(A(a+2|0,36,8)|0)&&(l=a+10|0,v=d[l>>1]|0,q(v)|0|v<<16>>16==123)&&(n[72]=l,m=k(1)|0,m<<16>>16!=123)&&(me=m,S=31);break}default:}r:do if((S|0)==22&&(C=n[72]|0,(A(C+2|0,80,14)|0)==0)){if(h=C+16|0,a=d[h>>1]|0,!(q(a)|0))switch(a<<16>>16){case 40:case 42:break;default:break r}n[72]=h,a=k(1)|0,a<<16>>16==42&&(n[72]=(n[72]|0)+2,a=k(1)|0),a<<16>>16!=40&&(me=a,S=31)}while(!1);if((S|0)==31&&(pe=n[72]|0,$(me)|0,we=n[72]|0,we>>>0>pe>>>0)){W(t,T,pe,we),n[72]=(n[72]|0)+-2;break e}W(t,T,0,0),n[72]=t+12;break e}case 97:{n[72]=t+10,k(0)|0,t=n[72]|0,S=35;break}case 102:{S=35;break}case 99:{if(!(A(t+2|0,36,8)|0)&&(a=t+10|0,fe(d[a>>1]|0)|0)){n[72]=a,v=k(1)|0,S=n[72]|0,$(v)|0,v=n[72]|0,W(S,v,S,v),n[72]=(n[72]|0)+-2;break e}t=t+4|0,n[72]=t;break}case 108:case 118:break;default:break e}if((S|0)==35){n[72]=t+16,t=k(1)|0,t<<16>>16==42&&(n[72]=(n[72]|0)+2,t=k(1)|0),S=n[72]|0,$(t)|0,v=n[72]|0,W(S,v,S,v),n[72]=(n[72]|0)+-2;break e}n[72]=t+6,b[804]=0,h=k(1)|0,t=n[72]|0,h=($(h)|0|32)<<16>>16==123,l=n[72]|0,h&&(n[72]=l+2,v=k(1)|0,t=n[72]|0,$(v)|0);r:for(;a=n[72]|0,(a|0)!=(t|0);){if(W(t,a,t,a),a=k(1)|0,h)switch(a<<16>>16){case 93:case 125:break e;default:}if(t=n[72]|0,a<<16>>16!=44){S=51;break}switch(n[72]=t+2,a=k(1)|0,t=n[72]|0,a<<16>>16){case 91:case 123:{S=51;break r}default:}$(a)|0}if((S|0)==51&&(n[72]=t+-2),!h)break e;n[72]=l+-2;break e}}while(!1);if(v=(k(1)|0)<<16>>16==102,t=n[72]|0,v&&!(A(t+2|0,66,6)|0))for(n[72]=t+8,J(T,k(1)|0,0),t=be|0?be+16|0:240;;){if(t=n[t>>2]|0,!t)break e;n[t+12>>2]=0,n[t+8>>2]=0,t=t+16|0}n[72]=t+-2}while(!1)}f(U,"k");function P(){var t=0,a=0,h=0,l=0,w=0,m=0,C=0;w=n[72]|0,h=w+12|0,n[72]=h,l=k(1)|0,a=n[72]|0;e:do if(l<<16>>16!=46)l<<16>>16==115&a>>>0>h>>>0?!(A(a+2|0,56,10)|0)&&(t=a+12|0,q(d[t>>1]|0)|0)?m=14:(a=6,h=0,m=46):(t=l,h=0,m=15);else switch(n[72]=a+2,(k(1)|0)<<16>>16){case 109:{if(t=n[72]|0,A(t+2|0,50,6)|0||(a=n[69]|0,!(ge(a)|0)&&(d[a>>1]|0)==46))break e;ue(w,w,t+8|0,2);break e}case 115:{if(t=n[72]|0,A(t+2|0,56,10)|0||(a=n[69]|0,!(ge(a)|0)&&(d[a>>1]|0)==46))break e;t=t+12|0,m=14;break e}default:break e}while(!1);(m|0)==14&&(n[72]=t,t=k(1)|0,h=1,m=15);e:do if((m|0)==15)switch(t<<16>>16){case 40:{if(a=n[70]|0,C=d[400]|0,l=C&65535,n[a+(l<<3)>>2]=5,t=n[72]|0,d[400]=C+1<<16>>16,n[a+(l<<3)+4>>2]=t,(d[n[69]>>1]|0)==46)break e;switch(n[72]=t+2,a=k(1)|0,ue(w,n[72]|0,0,t),h?(t=n[63]|0,n[t+28>>2]=5):t=n[63]|0,w=n[71]|0,C=d[399]|0,d[399]=C+1<<16>>16,n[w+((C&65535)<<2)>>2]=t,a<<16>>16){case 39:{I(39);break}case 34:{I(34);break}default:{n[72]=(n[72]|0)+-2;break e}}switch(t=(n[72]|0)+2|0,n[72]=t,(k(1)|0)<<16>>16){case 44:{n[72]=(n[72]|0)+2,k(1)|0,w=n[63]|0,n[w+4>>2]=t,C=n[72]|0,n[w+16>>2]=C,b[w+24>>0]=1,n[72]=C+-2;break e}case 41:{d[400]=(d[400]|0)+-1<<16>>16,C=n[63]|0,n[C+4>>2]=t,n[C+12>>2]=(n[72]|0)+2,b[C+24>>0]=1,d[399]=(d[399]|0)+-1<<16>>16;break e}default:{n[72]=(n[72]|0)+-2;break e}}}case 123:{if(h){a=12,h=1,m=46;break e}if(t=n[72]|0,d[400]|0){n[72]=t+-2;break e}for(;!(t>>>0>=(n[73]|0)>>>0);){if(t=k(1)|0,H(t)|0)I(t);else if(t<<16>>16==125){m=36;break}t=(n[72]|0)+2|0,n[72]=t}if((m|0)==36&&(n[72]=(n[72]|0)+2),C=(k(1)|0)<<16>>16==102,t=n[72]|0,C&&A(t+2|0,66,6)|0){M();break e}if(n[72]=t+8,t=k(1)|0,H(t)|0){J(w,t,0);break e}else{M();break e}}default:{if(h){a=12,h=1,m=46;break e}switch(t<<16>>16){case 42:case 39:case 34:{h=0,m=48;break e}default:{a=6,h=0,m=46;break e}}}}while(!1);(m|0)==46&&(t=n[72]|0,(t|0)==(w+(a<<1)|0)?n[72]=t+-2:m=48);do if((m|0)==48){if(d[400]|0){n[72]=(n[72]|0)+-2;break}for(t=n[73]|0,a=n[72]|0;;){if(a>>>0>=t>>>0){m=55;break}if(l=d[a>>1]|0,H(l)|0){m=53;break}C=a+2|0,n[72]=C,a=C}if((m|0)==53){J(w,l,h);break}else if((m|0)==55){M();break}}while(!1)}f(P,"l");function J(t,a,h){t=t|0,a=a|0,h=h|0;var l=0,w=0;switch(l=(n[72]|0)+2|0,a<<16>>16){case 39:{I(39),w=5;break}case 34:{I(34),w=5;break}default:M()}do if((w|0)==5){if(ue(t,l,n[72]|0,1),h&&(n[(n[63]|0)+28>>2]=4),n[72]=(n[72]|0)+2,a=k(0)|0,h=a<<16>>16==97,h?(l=n[72]|0,A(l+2|0,94,10)|0&&(w=13)):(l=n[72]|0,a<<16>>16==119&&(d[l+2>>1]|0)==105&&(d[l+4>>1]|0)==116&&(d[l+6>>1]|0)==104||(w=13)),(w|0)==13){n[72]=l+-2;break}if(n[72]=l+((h?6:4)<<1),(k(1)|0)<<16>>16!=123){n[72]=l;break}h=n[72]|0,a=h;e:for(;;){switch(n[72]=a+2,a=k(1)|0,a<<16>>16){case 39:{I(39),n[72]=(n[72]|0)+2,a=k(1)|0;break}case 34:{I(34),n[72]=(n[72]|0)+2,a=k(1)|0;break}default:a=$(a)|0}if(a<<16>>16!=58){w=22;break}switch(n[72]=(n[72]|0)+2,(k(1)|0)<<16>>16){case 39:{I(39);break}case 34:{I(34);break}default:{w=26;break e}}switch(n[72]=(n[72]|0)+2,(k(1)|0)<<16>>16){case 125:{w=31;break e}case 44:break;default:{w=30;break e}}if(n[72]=(n[72]|0)+2,(k(1)|0)<<16>>16==125){w=31;break}a=n[72]|0}if((w|0)==22){n[72]=l;break}else if((w|0)==26){n[72]=l;break}else if((w|0)==30){n[72]=l;break}else if((w|0)==31){w=n[63]|0,n[w+16>>2]=h,n[w+12>>2]=(n[72]|0)+2;break}}while(!1)}f(J,"u");function wt(t){t=t|0;e:do switch(d[t>>1]|0){case 100:switch(d[t+-2>>1]|0){case 105:{t=O(t+-4|0,104,2)|0;break e}case 108:{t=O(t+-4|0,108,3)|0;break e}default:{t=0;break e}}case 101:switch(d[t+-2>>1]|0){case 115:switch(d[t+-4>>1]|0){case 108:{t=G(t+-6|0,101)|0;break e}case 97:{t=G(t+-6|0,99)|0;break e}default:{t=0;break e}}case 116:{t=O(t+-4|0,114,4)|0;break e}case 117:{t=O(t+-4|0,122,6)|0;break e}default:{t=0;break e}}case 102:{if((d[t+-2>>1]|0)==111&&(d[t+-4>>1]|0)==101)switch(d[t+-6>>1]|0){case 99:{t=O(t+-8|0,134,6)|0;break e}case 112:{t=O(t+-8|0,146,2)|0;break e}default:{t=0;break e}}else t=0;break}case 107:{t=O(t+-2|0,150,4)|0;break}case 110:{t=t+-2|0,G(t,105)|0?t=1:t=O(t,158,5)|0;break}case 111:{t=G(t+-2|0,100)|0;break}case 114:{t=O(t+-2|0,168,7)|0;break}case 116:{t=O(t+-2|0,182,4)|0;break}case 119:switch(d[t+-2>>1]|0){case 101:{t=G(t+-4|0,110)|0;break e}case 111:{t=O(t+-4|0,190,3)|0;break e}default:{t=0;break e}}default:t=0}while(!1);return t|0}f(wt,"o");function Le(){var t=0,a=0,h=0,l=0;a=n[73]|0,h=n[72]|0;e:for(;;){if(t=h+2|0,h>>>0>=a>>>0){a=10;break}switch(d[t>>1]|0){case 96:{a=7;break e}case 36:{if((d[h+4>>1]|0)==123){a=6;break e}break}case 92:{t=h+4|0;break}default:}h=t}(a|0)==6?(t=h+4|0,n[72]=t,a=n[70]|0,l=d[400]|0,h=l&65535,n[a+(h<<3)>>2]=4,d[400]=l+1<<16>>16,n[a+(h<<3)+4>>2]=t):(a|0)==7?(n[72]=t,h=n[70]|0,l=(d[400]|0)+-1<<16>>16,d[400]=l,(n[h+((l&65535)<<3)>>2]|0)!=3&&M()):(a|0)==10&&(n[72]=t,M())}f(Le,"h");function k(t){t=t|0;var a=0,h=0,l=0;h=n[72]|0;e:do{a=d[h>>1]|0;t:do if(a<<16>>16!=47)if(t){if(q(a)|0)break;break e}else{if(re(a)|0)break;break e}else switch(d[h+2>>1]|0){case 47:{de();break t}case 42:{he(t);break t}default:{a=47;break e}}while(!1);l=n[72]|0,h=l+2|0,n[72]=h}while(l>>>0<(n[73]|0)>>>0);return a|0}f(k,"w");function ue(t,a,h,l){t=t|0,a=a|0,h=h|0,l=l|0;var w=0,m=0;m=n[67]|0,n[67]=m+36,w=n[63]|0,n[(w|0?w+32|0:236)>>2]=m,n[64]=w,n[63]=m,n[m+8>>2]=t,(l|0)==2?(t=3,w=h):(w=(l|0)==1,t=w?1:2,w=w?h+2|0:0),n[m+12>>2]=w,n[m+28>>2]=t,n[m>>2]=a,n[m+4>>2]=h,n[m+16>>2]=0,n[m+20>>2]=l,a=(l|0)==1,b[m+24>>0]=a&1,n[m+32>>2]=0,a|(l|0)==2&&(b[803]=1)}f(ue,"d");function I(t){t=t|0;var a=0,h=0,l=0,w=0;for(w=n[73]|0,a=n[72]|0;;){if(l=a+2|0,a>>>0>=w>>>0){a=9;break}if(h=d[l>>1]|0,h<<16>>16==t<<16>>16){a=10;break}if(h<<16>>16==92)h=a+4|0,(d[h>>1]|0)==13?(a=a+6|0,a=(d[a>>1]|0)==10?a:h):a=h;else if(Ae(h)|0){a=9;break}else a=l}(a|0)==9?(n[72]=l,M()):(a|0)==10&&(n[72]=l)}f(I,"v");function Oe(t,a){t=t|0,a=a|0;var h=0,l=0,w=0,m=0;return h=n[72]|0,l=d[h>>1]|0,m=(t|0)==(a|0),w=m?0:t,m=m?0:a,l<<16>>16==97&&(n[72]=h+4,h=k(1)|0,t=n[72]|0,H(h)|0?(I(h),a=(n[72]|0)+2|0,n[72]=a):($(h)|0,a=n[72]|0),l=k(1)|0,h=n[72]|0),(h|0)!=(t|0)&&W(t,a,w,m),l|0}f(Oe,"A");function mt(){var t=0,a=0,h=0;h=n[73]|0,a=n[72]|0;e:for(;;){if(t=a+2|0,a>>>0>=h>>>0){a=6;break}switch(d[t>>1]|0){case 13:case 10:{a=6;break e}case 93:{a=7;break e}case 92:{t=a+4|0;break}default:}a=t}return(a|0)==6?(n[72]=t,M(),t=0):(a|0)==7&&(n[72]=t,t=93),t|0}f(mt,"C");function le(){var t=0,a=0,h=0;e:for(;;){if(t=n[72]|0,a=t+2|0,n[72]=a,t>>>0>=(n[73]|0)>>>0){h=7;break}switch(d[a>>1]|0){case 13:case 10:{h=7;break e}case 47:break e;case 91:{mt()|0;break}case 92:{n[72]=t+4;break}default:}}(h|0)==7&&M()}f(le,"g");function kt(t){switch(t=t|0,d[t>>1]|0){case 62:{t=(d[t+-2>>1]|0)==61;break}case 41:case 59:{t=1;break}case 104:{t=O(t+-2|0,210,4)|0;break}case 121:{t=O(t+-2|0,218,6)|0;break}case 101:{t=O(t+-2|0,230,3)|0;break}default:t=0}return t|0}f(kt,"p");function he(t){t=t|0;var a=0,h=0,l=0,w=0,m=0;for(w=(n[72]|0)+2|0,n[72]=w,h=n[73]|0;a=w+2|0,!(w>>>0>=h>>>0||(l=d[a>>1]|0,!t&&Ae(l)|0));){if(l<<16>>16==42&&(d[w+4>>1]|0)==47){m=8;break}w=a}(m|0)==8&&(n[72]=a,a=w+4|0),n[72]=a}f(he,"y");function A(t,a,h){t=t|0,a=a|0,h=h|0;var l=0,w=0;e:do if(!h)t=0;else{for(;l=b[t>>0]|0,w=b[a>>0]|0,l<<24>>24==w<<24>>24;)if(h=h+-1|0,h)t=t+1|0,a=a+1|0;else{t=0;break e}t=(l&255)-(w&255)|0}while(!1);return t|0}f(A,"m");function te(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:{t=1;break}default:if((t&-8)<<16>>16==40|(t+-58&65535)<6)t=1;else{switch(t<<16>>16){case 91:case 93:case 94:{t=1;break e}default:}t=(t+-123&65535)<4}}while(!1);return t|0}f(te,"I");function yt(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:break;default:if(!((t+-58&65535)<6|(t+-40&65535)<7&t<<16>>16!=41)){switch(t<<16>>16){case 91:case 94:break e;default:}return t<<16>>16!=125&(t+-123&65535)<4|0}}while(!1);return 1}f(yt,"U");function Re(t){t=t|0;var a=0;a=d[t>>1]|0;e:do if((a+-9&65535)>=5){switch(a<<16>>16){case 160:case 32:{a=1;break e}default:}if(te(a)|0)return a<<16>>16!=46|(ge(t)|0)|0;a=0}else a=1;while(!1);return a|0}f(Re,"x");function Ct(t){t=t|0;var a=0,h=0,l=0,w=0;return h=E,E=E+16|0,l=h,n[l>>2]=0,n[66]=t,a=n[3]|0,w=a+(t<<1)|0,t=w+2|0,d[w>>1]=0,n[l>>2]=t,n[67]=t,n[59]=0,n[63]=0,n[61]=0,n[60]=0,n[65]=0,n[62]=0,E=h,a|0}f(Ct,"S");function W(t,a,h,l){t=t|0,a=a|0,h=h|0,l=l|0;var w=0,m=0;w=n[67]|0,n[67]=w+20,m=n[65]|0,n[(m|0?m+16|0:240)>>2]=w,n[65]=w,n[w>>2]=t,n[w+4>>2]=a,n[w+8>>2]=h,n[w+12>>2]=l,n[w+16>>2]=0,b[803]=1}f(W,"O");function O(t,a,h){t=t|0,a=a|0,h=h|0;var l=0,w=0;return l=t+(0-h<<1)|0,w=l+2|0,t=n[3]|0,w>>>0>=t>>>0&&!(A(w,a,h<<1)|0)?(w|0)==(t|0)?t=1:t=Re(l)|0:t=0,t|0}f(O,"$");function St(t){switch(t=t|0,d[t>>1]|0){case 107:{t=O(t+-2|0,150,4)|0;break}case 101:{(d[t+-2>>1]|0)==117?t=O(t+-4|0,122,6)|0:t=0;break}default:t=0}return t|0}f(St,"j");function G(t,a){t=t|0,a=a|0;var h=0;return h=n[3]|0,h>>>0<=t>>>0&&(d[t>>1]|0)==a<<16>>16?(h|0)==(t|0)?h=1:h=fe(d[t+-2>>1]|0)|0:h=0,h|0}f(G,"B");function fe(t){t=t|0;e:do if((t+-9&65535)<5)t=1;else{switch(t<<16>>16){case 32:case 160:{t=1;break e}default:}t=t<<16>>16!=46&(te(t)|0)}while(!1);return t|0}f(fe,"E");function de(){var t=0,a=0,h=0;t=n[73]|0,h=n[72]|0;e:for(;a=h+2|0,!(h>>>0>=t>>>0);)switch(d[a>>1]|0){case 13:case 10:break e;default:h=a}n[72]=a}f(de,"P");function $(t){for(t=t|0;!(q(t)|0||te(t)|0);)if(t=(n[72]|0)+2|0,n[72]=t,t=d[t>>1]|0,!(t<<16>>16)){t=0;break}return t|0}f($,"q");function vt(){var t=0;switch(t=n[(n[61]|0)+20>>2]|0,t|0){case 1:{t=-1;break}case 2:{t=-2;break}default:t=t-(n[3]|0)>>1}return t|0}f(vt,"z");function xt(t){return t=t|0,!(O(t,196,5)|0)&&!(O(t,44,3)|0)?t=O(t,206,2)|0:t=1,t|0}f(xt,"D");function re(t){switch(t=t|0,t<<16>>16){case 160:case 32:case 12:case 11:case 9:{t=1;break}default:t=0}return t|0}f(re,"F");function ge(t){return t=t|0,(d[t>>1]|0)==46&&(d[t+-2>>1]|0)==46?t=(d[t+-4>>1]|0)==46:t=0,t|0}f(ge,"G");function z(t){return t=t|0,(n[3]|0)==(t|0)?t=1:t=Re(t+-2|0)|0,t|0}f(z,"H");function _t(){var t=0;return t=n[(n[62]|0)+12>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(_t,"J");function Et(){var t=0;return t=n[(n[61]|0)+12>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(Et,"K");function Lt(){var t=0;return t=n[(n[62]|0)+8>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(Lt,"L");function Ot(){var t=0;return t=n[(n[61]|0)+16>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(Ot,"M");function Rt(){var t=0;return t=n[(n[61]|0)+4>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(Rt,"N");function At(){var t=0;return t=n[61]|0,t=n[(t|0?t+32|0:236)>>2]|0,n[61]=t,(t|0)!=0|0}f(At,"Q");function Nt(){var t=0;return t=n[62]|0,t=n[(t|0?t+16|0:240)>>2]|0,n[62]=t,(t|0)!=0|0}f(Nt,"R");function M(){b[802]=1,n[68]=(n[72]|0)-(n[3]|0)>>1,n[72]=(n[73]|0)+2}f(M,"T");function q(t){return t=t|0,(t|128)<<16>>16==160|(t+-9&65535)<5|0}f(q,"V");function H(t){return t=t|0,t<<16>>16==39|t<<16>>16==34|0}f(H,"W");function It(){return(n[(n[61]|0)+8>>2]|0)-(n[3]|0)>>1|0}f(It,"X");function Mt(){return(n[(n[62]|0)+4>>2]|0)-(n[3]|0)>>1|0}f(Mt,"Y");function Ae(t){return t=t|0,t<<16>>16==13|t<<16>>16==10|0}f(Ae,"Z");function Ut(){return(n[n[61]>>2]|0)-(n[3]|0)>>1|0}f(Ut,"_");function jt(){return(n[n[62]>>2]|0)-(n[3]|0)>>1|0}f(jt,"ee");function $t(){return R[(n[61]|0)+24>>0]|0|0}f($t,"ae");function Dt(t){t=t|0,n[3]=t}f(Dt,"re");function Tt(){return n[(n[61]|0)+28>>2]|0}f(Tt,"ie");function Ft(){return(b[803]|0)!=0|0}f(Ft,"se");function Pt(){return(b[804]|0)!=0|0}f(Pt,"fe");function Wt(){return n[68]|0}f(Wt,"te");function qt(t){return t=t|0,E=t+992+15&-16,992}return f(qt,"ce"),{su:qt,ai:Ot,e:Wt,ee:Mt,ele:_t,els:Lt,es:jt,f:Pt,id:vt,ie:Rt,ip:$t,is:Ut,it:Tt,ms:Ft,p:N,re:Nt,ri:At,sa:Ct,se:Et,ses:Dt,ss:It}}(typeof self<"u"?self:global,{},ie),ye=x.su(Z-(2<<17))}const i=_.length+1;x.ses(ye),x.sa(i-1),Pe(_,new Uint16Array(ie,ye,i)),x.p()||(y=x.e(),D());const o=[],c=[];for(;x.ri();){const u=x.is(),p=x.ie(),g=x.ai(),b=x.id(),d=x.ss(),n=x.se(),R=x.it();let L;x.ip()&&(L=Ce(b===-1?u:u+1,_.charCodeAt(b===-1?u-1:u))),o.push({t:R,n:L,s:u,e:p,ss:d,se:n,d:b,a:g})}for(;x.re();){const u=x.es(),p=x.ee(),g=x.els(),b=x.ele(),d=_.charCodeAt(u),n=g>=0?_.charCodeAt(g):-1;c.push({s:u,e:p,ls:g,le:b,n:d===34||d===39?Ce(u+1,d):_.slice(u,p),ln:g<0?void 0:n===34||n===39?Ce(g+1,n):_.slice(g,b)})}return[o,c,!!x.f(),!!x.ms()]}f(cr,"parse");function Ce(s,e){y=s;let r="",i=y;for(;;){y>=_.length&&D();const o=_.charCodeAt(y);if(o===e)break;o===92?(r+=_.slice(i,y),r+=ur(),i=y):(o===8232||o===8233||qe(o)&&D(),++y)}return r+=_.slice(i,y++),r}f(Ce,"b");function ur(){let s=_.charCodeAt(++y);switch(++y,s){case 110:return` +-`;case 114:return"\r";case 120:return String.fromCharCode(Se(2));case 117:return function(){const e=_.charCodeAt(y);let r;return e===123?(++y,r=Se(_.indexOf("}",y)-y),++y,r>1114111&&D()):r=Se(4),r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:_.charCodeAt(y)===10&&++y;case 10:return"";case 56:case 57:D();default:if(s>=48&&s<=55){let e=_.substr(y-1,3).match(/^[0-7]+/)[0],r=parseInt(e,8);return r>255&&(e=e.slice(0,-1),r=parseInt(e,8)),y+=e.length-1,s=_.charCodeAt(y),e==="0"&&s!==56&&s!==57||D(),String.fromCharCode(r)}return qe(s)?"":String.fromCharCode(s)}}f(ur,"k");function Se(s){const e=y;let r=0,i=0;for(let o=0;o=97)c=u-97+10;else if(u>=65)c=u-65+10;else{if(!(u>=48&&u<=57))break;c=u-48}if(c>=16)break;i=u,r=16*r+c}else i!==95&&o!==0||D(),i=u}return i!==95&&y-e===s||D(),r}f(Se,"l");function qe(s){return s===13||s===10}f(qe,"u");function D(){throw Object.assign(Error(`Parse error ${We}:${_.slice(0,y).split(` ++`?c=!0:d!=="\r"&&c&&(c=!1,p===g.start||(this._splitChunk(g,p),g=g.next),g.prependRight(e))}p+=1}p=g.end,g=g.next}return this.outro=this.outro.replace(i,u),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,r){return B.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),B.insertLeft=!0),this.appendLeft(e,r)}insertRight(e,r){return B.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),B.insertRight=!0),this.prependRight(e,r)}move(e,r,i){if(i>=e&&i<=r)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(r),this._split(i);const o=this.byStart[e],c=this.byEnd[r],u=o.previous,p=c.next,g=this.byStart[i];if(!g&&c===this.lastChunk)return this;const b=g?g.previous:this.lastChunk;return u&&(u.next=p),p&&(p.previous=u),b&&(b.next=o),g&&(g.previous=c),o.previous||(this.firstChunk=c.next),c.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=b,c.next=g||null,b||(this.firstChunk=o),g||(this.lastChunk=c),this}overwrite(e,r,i,o){return o=o||{},this.update(e,r,i,{...o,overwrite:!o.contentOnly})}update(e,r,i,o){if(typeof i!="string")throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;if(r>this.original.length)throw new Error("end is out of bounds");if(e===r)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(r),o===!0&&(B.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),B.storeName=!0),o={storeName:!0});const c=o!==void 0?o.storeName:!1,u=o!==void 0?o.overwrite:!1;if(c){const b=this.original.slice(e,r);Object.defineProperty(this.storedNames,b,{writable:!0,value:!0,enumerable:!0})}const p=this.byStart[e],g=this.byEnd[r];if(p){let b=p;for(;b!==g;){if(b.next!==this.byStart[b.end])throw new Error("Cannot overwrite across a split point");b=b.next,b.edit("",!1)}p.edit(i,c,!u)}else{const b=new ee(e,r,"").edit(i,c);g.next=b,b.previous=g}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.prependLeft(r):this.intro=r+this.intro,this}prependRight(e,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.prependRight(r):this.outro=r+this.outro,this}remove(e,r){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let i=this.byStart[e];for(;i;)i.intro="",i.outro="",i.edit(""),i=r>i.end?this.byStart[i.end]:null;return this}reset(e,r){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let i=this.byStart[e];for(;i;)i.reset(),i=r>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(Q);if(e!==-1)return this.outro.substr(e+1);let r=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(e=i.outro.lastIndexOf(Q),e!==-1)return i.outro.substr(e+1)+r;r=i.outro+r}if(i.content.length>0){if(e=i.content.lastIndexOf(Q),e!==-1)return i.content.substr(e+1)+r;r=i.content+r}if(i.intro.length>0){if(e=i.intro.lastIndexOf(Q),e!==-1)return i.intro.substr(e+1)+r;r=i.intro+r}}while(i=i.previous);return e=this.intro.lastIndexOf(Q),e!==-1?this.intro.substr(e+1)+r:this.intro+r}slice(e=0,r=this.original.length){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;let i="",o=this.firstChunk;for(;o&&(o.start>e||o.end<=e);){if(o.start=r)return i;o=o.next}if(o&&o.edited&&o.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const c=o;for(;o;){o.intro&&(c!==o||o.start===e)&&(i+=o.intro);const u=o.start=r;if(u&&o.edited&&o.end!==r)throw new Error(`Cannot use replaced character ${r} as slice end anchor.`);const p=c===o?e-o.start:0,g=u?o.content.length+r-o.end:o.content.length;if(i+=o.content.slice(p,g),o.outro&&(!u||o.end===r)&&(i+=o.outro),u)break;o=o.next}return i}snip(e,r){const i=this.clone();return i.remove(0,e),i.remove(r,i.original.length),i}_split(e){if(this.byStart[e]||this.byEnd[e])return;let r=this.lastSearchedChunk;const i=e>r.end;for(;r;){if(r.contains(e))return this._splitChunk(r,e);r=i?this.byStart[r.end]:this.byEnd[r.start]}}_splitChunk(e,r){if(e.edited&&e.content.length){const o=Fe(this.original)(r);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${e.original}")`)}const i=e.split(r);return this.byEnd[r]=e,this.byStart[r]=i,this.byEnd[i.end]=i,e===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,r=this.firstChunk;for(;r;)e+=r.toString(),r=r.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,r=0;do r+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return r}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const r=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(r,""),this.outro.length)return!0;let i=this.lastChunk;do{const o=i.end,c=i.trimEnd(r);if(i.end!==o&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.previous}while(i);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const r=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(r,""),this.intro.length)return!0;let i=this.firstChunk;do{const o=i.end,c=i.trimStart(r);if(i.end!==o&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.next}while(i);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,r){function i(c,u){return typeof r=="string"?r.replace(/\$(\$|&|\d+)/g,(p,g)=>g==="$"?"$":g==="&"?c[0]:+g{if(u.index!=null){const p=i(u,this.original);p!==u[0]&&this.overwrite(u.index,u.index+u[0].length,p)}});else{const c=this.original.match(e);if(c&&c.index!=null){const u=i(c,this.original);u!==c[0]&&this.overwrite(c.index,c.index+c[0].length,u)}}return this}_replaceString(e,r){const{original:i}=this,o=i.indexOf(e);return o!==-1&&this.overwrite(o,o+e.length,r),this}replace(e,r){return typeof e=="string"?this._replaceString(e,r):this._replaceRegexp(e,r)}_replaceAllString(e,r){const{original:i}=this,o=e.length;for(let c=i.indexOf(e);c!==-1;c=i.indexOf(e,c+o))i.slice(c,c+o)!==r&&this.overwrite(c,c+o,r);return this}replaceAll(e,r){if(typeof e=="string")return this._replaceAllString(e,r);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,r)}}let x,ie,ye,Z=2<<19;const Je=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(s,e){const r=s.length;let i=0;for(;i>>8}},ar="xportmportlassforetaourceromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileifcatcfinallels";let _,Pe,y;function cr(s,e="@"){_=s,Pe=e;const r=2*_.length+(2<<18);if(r>Z||!x){for(;r>Z;)Z*=2;ie=new ArrayBuffer(Z),Je(ar,new Uint16Array(ie,16,110)),x=function(u,p,g){var b=new u.Int8Array(g),d=new u.Int16Array(g),n=new u.Int32Array(g),R=new u.Uint8Array(g),L=new u.Uint16Array(g),E=1040;function N(){var t=0,a=0,h=0,l=0,w=0,m=0,C=0;C=E,E=E+10240|0,b[804]=1,b[803]=0,d[399]=0,d[400]=0,n[69]=n[2],b[805]=0,n[68]=0,b[802]=0,n[70]=C+2048,n[71]=C,b[806]=0,t=(n[3]|0)+-2|0,n[72]=t,a=t+(n[66]<<1)|0,n[73]=a;e:for(;;){if(h=t+2|0,n[72]=h,t>>>0>=a>>>0){l=18;break}t:do switch(d[h>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(!(d[400]|0)&&H(h)|0&&!(A(t+4|0,16,10)|0)&&(U(),(b[804]|0)==0)){l=9;break e}else l=17;break}case 105:{H(h)|0&&!(A(t+4|0,26,10)|0)&&J(),l=17;break}case 59:{l=17;break}case 47:switch(d[t+4>>1]|0){case 47:{de();break t}case 42:{he(1);break t}default:{l=16;break e}}default:{l=16;break e}}while(!1);(l|0)==17&&(l=0,n[69]=n[72]),t=n[72]|0,a=n[73]|0}(l|0)==9?(t=n[72]|0,n[69]=t,l=19):(l|0)==16?(b[804]=0,n[72]=t,l=19):(l|0)==18&&(b[802]|0?t=0:(t=h,l=19));do if((l|0)==19){e:for(;;){if(a=t+2|0,n[72]=a,t>>>0>=(n[73]|0)>>>0){l=92;break}t:do switch(d[a>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{!(d[400]|0)&&H(a)|0&&!(A(t+4|0,16,10)|0)&&U(),l=91;break}case 105:{H(a)|0&&!(A(t+4|0,26,10)|0)&&J(),l=91;break}case 99:{H(a)|0&&!(A(t+4|0,36,8)|0)&&W(d[t+12>>1]|0)|0&&(b[806]=1),l=91;break}case 40:{h=n[70]|0,t=d[400]|0,l=t&65535,n[h+(l<<3)>>2]=1,a=n[69]|0,d[400]=t+1<<16>>16,n[h+(l<<3)+4>>2]=a,l=91;break}case 41:{if(a=d[400]|0,!(a<<16>>16)){l=36;break e}h=a+-1<<16>>16,d[400]=h,l=d[399]|0,a=l&65535,l<<16>>16&&(n[(n[70]|0)+((h&65535)<<3)>>2]|0)==5&&(a=n[(n[71]|0)+(a+-1<<2)>>2]|0,h=a+4|0,n[h>>2]|0||(n[h>>2]=(n[69]|0)+2),n[a+12>>2]=t+4,d[399]=l+-1<<16>>16),l=91;break}case 123:{l=n[69]|0,h=n[63]|0,t=l;do if((d[l>>1]|0)==41&(h|0)!=0&&(n[h+4>>2]|0)==(l|0))if(a=n[64]|0,n[63]=a,a){n[a+32>>2]=0;break}else{n[59]=0;break}while(!1);h=n[70]|0,a=d[400]|0,l=a&65535,n[h+(l<<3)>>2]=b[806]|0?6:2,d[400]=a+1<<16>>16,n[h+(l<<3)+4>>2]=t,b[806]=0,l=91;break}case 125:{if(t=d[400]|0,!(t<<16>>16)){l=49;break e}h=n[70]|0,l=t+-1<<16>>16,d[400]=l,(n[h+((l&65535)<<3)>>2]|0)==4&&Le(),l=91;break}case 39:{I(39),l=91;break}case 34:{I(34),l=91;break}case 47:switch(d[t+4>>1]|0){case 47:{de();break t}case 42:{he(1);break t}default:{t=n[69]|0,a=d[t>>1]|0;r:do if(!(yt(a)|0))a<<16>>16==41?(h=d[400]|0,xt(n[(n[70]|0)+((h&65535)<<3)+4>>2]|0)|0||(l=65)):l=64;else switch(a<<16>>16){case 46:if(((d[t+-2>>1]|0)+-48&65535)<10){l=64;break r}else break r;case 43:if((d[t+-2>>1]|0)==43){l=64;break r}else break r;case 45:if((d[t+-2>>1]|0)==45){l=64;break r}else break r;default:break r}while(!1);(l|0)==64&&(h=d[400]|0,l=65);r:do if((l|0)==65){if(l=0,h<<16>>16&&(w=n[70]|0,m=(h&65535)+-1|0,a<<16>>16==102?(n[w+(m<<3)>>2]|0)==1:0)){if((d[t+-2>>1]|0)==111&&O(n[w+(m<<3)+4>>2]|0,44,3)|0)break}else l=69;if((l|0)==69&&a<<16>>16==125&&(l=n[70]|0,h=h&65535,kt(n[l+(h<<3)+4>>2]|0)|0||(n[l+(h<<3)>>2]|0)==6))break;if(!(wt(t)|0)){switch(a<<16>>16){case 0:break r;case 47:{if(b[805]|0)break r;break}default:}if(l=n[65]|0,l|0&&t>>>0>=(n[l>>2]|0)>>>0&&t>>>0<=(n[l+4>>2]|0)>>>0){le(),b[805]=0,l=91;break t}h=n[3]|0;do{if(t>>>0<=h>>>0)break;t=t+-2|0,n[69]=t,a=d[t>>1]|0}while(!(fe(a)|0));if(re(a)|0){do{if(t>>>0<=h>>>0)break;t=t+-2|0,n[69]=t}while(re(d[t>>1]|0)|0);if(St(t)|0){le(),b[805]=0,l=91;break t}}b[805]=1,l=91;break t}}while(!1);le(),b[805]=0,l=91;break t}}case 96:{h=n[70]|0,a=d[400]|0,l=a&65535,n[h+(l<<3)+4>>2]=n[69],d[400]=a+1<<16>>16,n[h+(l<<3)>>2]=3,Le(),l=91;break}default:l=91}while(!1);(l|0)==91&&(l=0,n[69]=n[72]),t=n[72]|0}if((l|0)==36){M(),t=0;break}else if((l|0)==49){M(),t=0;break}else if((l|0)==92){t=b[802]|0?0:(d[399]|d[400])<<16>>16==0;break}}while(!1);return E=C,t|0}f(N,"b");function U(){var t=0,a=0,h=0,l=0,w=0,m=0,C=0,T=0,be=0,pe=0,we=0,me=0,S=0,v=0;T=n[72]|0,be=n[65]|0,v=T+12|0,n[72]=v,h=k(1)|0,t=n[72]|0,(t|0)==(v|0)&&!(te(h)|0)||(S=3);e:do if((S|0)==3){t:do switch(h<<16>>16){case 123:{for(n[72]=t+2,t=k(1)|0,a=n[72]|0;;){if(X(t)|0?(I(t),t=(n[72]|0)+2|0,n[72]=t):($(t)|0,t=n[72]|0),k(1)|0,t=Oe(a,t)|0,t<<16>>16==44&&(n[72]=(n[72]|0)+2,t=k(1)|0),t<<16>>16==125){S=15;break}if(v=a,a=n[72]|0,(a|0)==(v|0)){S=12;break}if(a>>>0>(n[73]|0)>>>0){S=14;break}}if((S|0)==12){M();break e}else if((S|0)==14){M();break e}else if((S|0)==15){b[803]=1,n[72]=(n[72]|0)+2;break t}break}case 42:{n[72]=t+2,k(1)|0,v=n[72]|0,Oe(v,v)|0;break}default:{switch(b[804]=0,h<<16>>16){case 100:{switch(T=t+14|0,n[72]=T,(k(1)|0)<<16>>16){case 97:{a=n[72]|0,!(A(a+2|0,72,8)|0)&&(w=a+10|0,re(d[w>>1]|0)|0)&&(n[72]=w,k(0)|0,S=22);break}case 102:{S=22;break}case 99:{a=n[72]|0,!(A(a+2|0,36,8)|0)&&(l=a+10|0,v=d[l>>1]|0,W(v)|0|v<<16>>16==123)&&(n[72]=l,m=k(1)|0,m<<16>>16!=123)&&(me=m,S=31);break}default:}r:do if((S|0)==22&&(C=n[72]|0,(A(C+2|0,80,14)|0)==0)){if(h=C+16|0,a=d[h>>1]|0,!(W(a)|0))switch(a<<16>>16){case 40:case 42:break;default:break r}n[72]=h,a=k(1)|0,a<<16>>16==42&&(n[72]=(n[72]|0)+2,a=k(1)|0),a<<16>>16!=40&&(me=a,S=31)}while(!1);if((S|0)==31&&(pe=n[72]|0,$(me)|0,we=n[72]|0,we>>>0>pe>>>0)){P(t,T,pe,we),n[72]=(n[72]|0)+-2;break e}P(t,T,0,0),n[72]=t+12;break e}case 97:{n[72]=t+10,k(0)|0,t=n[72]|0,S=35;break}case 102:{S=35;break}case 99:{if(!(A(t+2|0,36,8)|0)&&(a=t+10|0,fe(d[a>>1]|0)|0)){n[72]=a,v=k(1)|0,S=n[72]|0,$(v)|0,v=n[72]|0,P(S,v,S,v),n[72]=(n[72]|0)+-2;break e}t=t+4|0,n[72]=t;break}case 108:case 118:break;default:break e}if((S|0)==35){n[72]=t+16,t=k(1)|0,t<<16>>16==42&&(n[72]=(n[72]|0)+2,t=k(1)|0),S=n[72]|0,$(t)|0,v=n[72]|0,P(S,v,S,v),n[72]=(n[72]|0)+-2;break e}n[72]=t+6,b[804]=0,h=k(1)|0,t=n[72]|0,h=($(h)|0|32)<<16>>16==123,l=n[72]|0,h&&(n[72]=l+2,v=k(1)|0,t=n[72]|0,$(v)|0);r:for(;a=n[72]|0,(a|0)!=(t|0);){if(P(t,a,t,a),a=k(1)|0,h)switch(a<<16>>16){case 93:case 125:break e;default:}if(t=n[72]|0,a<<16>>16!=44){S=51;break}switch(n[72]=t+2,a=k(1)|0,t=n[72]|0,a<<16>>16){case 91:case 123:{S=51;break r}default:}$(a)|0}if((S|0)==51&&(n[72]=t+-2),!h)break e;n[72]=l+-2;break e}}while(!1);if(v=(k(1)|0)<<16>>16==102,t=n[72]|0,v&&!(A(t+2|0,66,6)|0))for(n[72]=t+8,G(T,k(1)|0,0),t=be|0?be+16|0:240;;){if(t=n[t>>2]|0,!t)break e;n[t+12>>2]=0,n[t+8>>2]=0,t=t+16|0}n[72]=t+-2}while(!1)}f(U,"k");function J(){var t=0,a=0,h=0,l=0,w=0,m=0,C=0;w=n[72]|0,h=w+12|0,n[72]=h,l=k(1)|0,a=n[72]|0;e:do if(l<<16>>16!=46)l<<16>>16==115&a>>>0>h>>>0?!(A(a+2|0,56,10)|0)&&(t=a+12|0,W(d[t>>1]|0)|0)?m=14:(a=6,h=0,m=46):(t=l,h=0,m=15);else switch(n[72]=a+2,(k(1)|0)<<16>>16){case 109:{if(t=n[72]|0,A(t+2|0,50,6)|0||(a=n[69]|0,!(ge(a)|0)&&(d[a>>1]|0)==46))break e;ue(w,w,t+8|0,2);break e}case 115:{if(t=n[72]|0,A(t+2|0,56,10)|0||(a=n[69]|0,!(ge(a)|0)&&(d[a>>1]|0)==46))break e;t=t+12|0,m=14;break e}default:break e}while(!1);(m|0)==14&&(n[72]=t,t=k(1)|0,h=1,m=15);e:do if((m|0)==15)switch(t<<16>>16){case 40:{if(a=n[70]|0,C=d[400]|0,l=C&65535,n[a+(l<<3)>>2]=5,t=n[72]|0,d[400]=C+1<<16>>16,n[a+(l<<3)+4>>2]=t,(d[n[69]>>1]|0)==46)break e;switch(n[72]=t+2,a=k(1)|0,ue(w,n[72]|0,0,t),h?(t=n[63]|0,n[t+28>>2]=5):t=n[63]|0,w=n[71]|0,C=d[399]|0,d[399]=C+1<<16>>16,n[w+((C&65535)<<2)>>2]=t,a<<16>>16){case 39:{I(39);break}case 34:{I(34);break}default:{n[72]=(n[72]|0)+-2;break e}}switch(t=(n[72]|0)+2|0,n[72]=t,(k(1)|0)<<16>>16){case 44:{n[72]=(n[72]|0)+2,k(1)|0,w=n[63]|0,n[w+4>>2]=t,C=n[72]|0,n[w+16>>2]=C,b[w+24>>0]=1,n[72]=C+-2;break e}case 41:{d[400]=(d[400]|0)+-1<<16>>16,C=n[63]|0,n[C+4>>2]=t,n[C+12>>2]=(n[72]|0)+2,b[C+24>>0]=1,d[399]=(d[399]|0)+-1<<16>>16;break e}default:{n[72]=(n[72]|0)+-2;break e}}}case 123:{if(h){a=12,h=1,m=46;break e}if(t=n[72]|0,d[400]|0){n[72]=t+-2;break e}for(;!(t>>>0>=(n[73]|0)>>>0);){if(t=k(1)|0,X(t)|0)I(t);else if(t<<16>>16==125){m=36;break}t=(n[72]|0)+2|0,n[72]=t}if((m|0)==36&&(n[72]=(n[72]|0)+2),C=(k(1)|0)<<16>>16==102,t=n[72]|0,C&&A(t+2|0,66,6)|0){M();break e}if(n[72]=t+8,t=k(1)|0,X(t)|0){G(w,t,0);break e}else{M();break e}}default:{if(h){a=12,h=1,m=46;break e}switch(t<<16>>16){case 42:case 39:case 34:{h=0,m=48;break e}default:{a=6,h=0,m=46;break e}}}}while(!1);(m|0)==46&&(t=n[72]|0,(t|0)==(w+(a<<1)|0)?n[72]=t+-2:m=48);do if((m|0)==48){if(d[400]|0){n[72]=(n[72]|0)+-2;break}for(t=n[73]|0,a=n[72]|0;;){if(a>>>0>=t>>>0){m=55;break}if(l=d[a>>1]|0,X(l)|0){m=53;break}C=a+2|0,n[72]=C,a=C}if((m|0)==53){G(w,l,h);break}else if((m|0)==55){M();break}}while(!1)}f(J,"l");function G(t,a,h){t=t|0,a=a|0,h=h|0;var l=0,w=0;switch(l=(n[72]|0)+2|0,a<<16>>16){case 39:{I(39),w=5;break}case 34:{I(34),w=5;break}default:M()}do if((w|0)==5){if(ue(t,l,n[72]|0,1),h&&(n[(n[63]|0)+28>>2]=4),n[72]=(n[72]|0)+2,a=k(0)|0,h=a<<16>>16==97,h?(l=n[72]|0,A(l+2|0,94,10)|0&&(w=13)):(l=n[72]|0,a<<16>>16==119&&(d[l+2>>1]|0)==105&&(d[l+4>>1]|0)==116&&(d[l+6>>1]|0)==104||(w=13)),(w|0)==13){n[72]=l+-2;break}if(n[72]=l+((h?6:4)<<1),(k(1)|0)<<16>>16!=123){n[72]=l;break}h=n[72]|0,a=h;e:for(;;){switch(n[72]=a+2,a=k(1)|0,a<<16>>16){case 39:{I(39),n[72]=(n[72]|0)+2,a=k(1)|0;break}case 34:{I(34),n[72]=(n[72]|0)+2,a=k(1)|0;break}default:a=$(a)|0}if(a<<16>>16!=58){w=22;break}switch(n[72]=(n[72]|0)+2,(k(1)|0)<<16>>16){case 39:{I(39);break}case 34:{I(34);break}default:{w=26;break e}}switch(n[72]=(n[72]|0)+2,(k(1)|0)<<16>>16){case 125:{w=31;break e}case 44:break;default:{w=30;break e}}if(n[72]=(n[72]|0)+2,(k(1)|0)<<16>>16==125){w=31;break}a=n[72]|0}if((w|0)==22){n[72]=l;break}else if((w|0)==26){n[72]=l;break}else if((w|0)==30){n[72]=l;break}else if((w|0)==31){w=n[63]|0,n[w+16>>2]=h,n[w+12>>2]=(n[72]|0)+2;break}}while(!1)}f(G,"u");function wt(t){t=t|0;e:do switch(d[t>>1]|0){case 100:switch(d[t+-2>>1]|0){case 105:{t=O(t+-4|0,104,2)|0;break e}case 108:{t=O(t+-4|0,108,3)|0;break e}default:{t=0;break e}}case 101:switch(d[t+-2>>1]|0){case 115:switch(d[t+-4>>1]|0){case 108:{t=z(t+-6|0,101)|0;break e}case 97:{t=z(t+-6|0,99)|0;break e}default:{t=0;break e}}case 116:{t=O(t+-4|0,114,4)|0;break e}case 117:{t=O(t+-4|0,122,6)|0;break e}default:{t=0;break e}}case 102:{if((d[t+-2>>1]|0)==111&&(d[t+-4>>1]|0)==101)switch(d[t+-6>>1]|0){case 99:{t=O(t+-8|0,134,6)|0;break e}case 112:{t=O(t+-8|0,146,2)|0;break e}default:{t=0;break e}}else t=0;break}case 107:{t=O(t+-2|0,150,4)|0;break}case 110:{t=t+-2|0,z(t,105)|0?t=1:t=O(t,158,5)|0;break}case 111:{t=z(t+-2|0,100)|0;break}case 114:{t=O(t+-2|0,168,7)|0;break}case 116:{t=O(t+-2|0,182,4)|0;break}case 119:switch(d[t+-2>>1]|0){case 101:{t=z(t+-4|0,110)|0;break e}case 111:{t=O(t+-4|0,190,3)|0;break e}default:{t=0;break e}}default:t=0}while(!1);return t|0}f(wt,"o");function Le(){var t=0,a=0,h=0,l=0;a=n[73]|0,h=n[72]|0;e:for(;;){if(t=h+2|0,h>>>0>=a>>>0){a=10;break}switch(d[t>>1]|0){case 96:{a=7;break e}case 36:{if((d[h+4>>1]|0)==123){a=6;break e}break}case 92:{t=h+4|0;break}default:}h=t}(a|0)==6?(t=h+4|0,n[72]=t,a=n[70]|0,l=d[400]|0,h=l&65535,n[a+(h<<3)>>2]=4,d[400]=l+1<<16>>16,n[a+(h<<3)+4>>2]=t):(a|0)==7?(n[72]=t,h=n[70]|0,l=(d[400]|0)+-1<<16>>16,d[400]=l,(n[h+((l&65535)<<3)>>2]|0)!=3&&M()):(a|0)==10&&(n[72]=t,M())}f(Le,"h");function k(t){t=t|0;var a=0,h=0,l=0;h=n[72]|0;e:do{a=d[h>>1]|0;t:do if(a<<16>>16!=47)if(t){if(W(a)|0)break;break e}else{if(re(a)|0)break;break e}else switch(d[h+2>>1]|0){case 47:{de();break t}case 42:{he(t);break t}default:{a=47;break e}}while(!1);l=n[72]|0,h=l+2|0,n[72]=h}while(l>>>0<(n[73]|0)>>>0);return a|0}f(k,"w");function ue(t,a,h,l){t=t|0,a=a|0,h=h|0,l=l|0;var w=0,m=0;m=n[67]|0,n[67]=m+36,w=n[63]|0,n[(w|0?w+32|0:236)>>2]=m,n[64]=w,n[63]=m,n[m+8>>2]=t,(l|0)==2?(t=3,w=h):(w=(l|0)==1,t=w?1:2,w=w?h+2|0:0),n[m+12>>2]=w,n[m+28>>2]=t,n[m>>2]=a,n[m+4>>2]=h,n[m+16>>2]=0,n[m+20>>2]=l,a=(l|0)==1,b[m+24>>0]=a&1,n[m+32>>2]=0,a|(l|0)==2&&(b[803]=1)}f(ue,"d");function I(t){t=t|0;var a=0,h=0,l=0,w=0;for(w=n[73]|0,a=n[72]|0;;){if(l=a+2|0,a>>>0>=w>>>0){a=9;break}if(h=d[l>>1]|0,h<<16>>16==t<<16>>16){a=10;break}if(h<<16>>16==92)h=a+4|0,(d[h>>1]|0)==13?(a=a+6|0,a=(d[a>>1]|0)==10?a:h):a=h;else if(Ae(h)|0){a=9;break}else a=l}(a|0)==9?(n[72]=l,M()):(a|0)==10&&(n[72]=l)}f(I,"v");function Oe(t,a){t=t|0,a=a|0;var h=0,l=0,w=0,m=0;return h=n[72]|0,l=d[h>>1]|0,m=(t|0)==(a|0),w=m?0:t,m=m?0:a,l<<16>>16==97&&(n[72]=h+4,h=k(1)|0,t=n[72]|0,X(h)|0?(I(h),a=(n[72]|0)+2|0,n[72]=a):($(h)|0,a=n[72]|0),l=k(1)|0,h=n[72]|0),(h|0)!=(t|0)&&P(t,a,w,m),l|0}f(Oe,"A");function mt(){var t=0,a=0,h=0;h=n[73]|0,a=n[72]|0;e:for(;;){if(t=a+2|0,a>>>0>=h>>>0){a=6;break}switch(d[t>>1]|0){case 13:case 10:{a=6;break e}case 93:{a=7;break e}case 92:{t=a+4|0;break}default:}a=t}return(a|0)==6?(n[72]=t,M(),t=0):(a|0)==7&&(n[72]=t,t=93),t|0}f(mt,"C");function le(){var t=0,a=0,h=0;e:for(;;){if(t=n[72]|0,a=t+2|0,n[72]=a,t>>>0>=(n[73]|0)>>>0){h=7;break}switch(d[a>>1]|0){case 13:case 10:{h=7;break e}case 47:break e;case 91:{mt()|0;break}case 92:{n[72]=t+4;break}default:}}(h|0)==7&&M()}f(le,"g");function kt(t){switch(t=t|0,d[t>>1]|0){case 62:{t=(d[t+-2>>1]|0)==61;break}case 41:case 59:{t=1;break}case 104:{t=O(t+-2|0,210,4)|0;break}case 121:{t=O(t+-2|0,218,6)|0;break}case 101:{t=O(t+-2|0,230,3)|0;break}default:t=0}return t|0}f(kt,"p");function he(t){t=t|0;var a=0,h=0,l=0,w=0,m=0;for(w=(n[72]|0)+2|0,n[72]=w,h=n[73]|0;a=w+2|0,!(w>>>0>=h>>>0||(l=d[a>>1]|0,!t&&Ae(l)|0));){if(l<<16>>16==42&&(d[w+4>>1]|0)==47){m=8;break}w=a}(m|0)==8&&(n[72]=a,a=w+4|0),n[72]=a}f(he,"y");function A(t,a,h){t=t|0,a=a|0,h=h|0;var l=0,w=0;e:do if(!h)t=0;else{for(;l=b[t>>0]|0,w=b[a>>0]|0,l<<24>>24==w<<24>>24;)if(h=h+-1|0,h)t=t+1|0,a=a+1|0;else{t=0;break e}t=(l&255)-(w&255)|0}while(!1);return t|0}f(A,"m");function te(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:{t=1;break}default:if((t&-8)<<16>>16==40|(t+-58&65535)<6)t=1;else{switch(t<<16>>16){case 91:case 93:case 94:{t=1;break e}default:}t=(t+-123&65535)<4}}while(!1);return t|0}f(te,"I");function yt(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:break;default:if(!((t+-58&65535)<6|(t+-40&65535)<7&t<<16>>16!=41)){switch(t<<16>>16){case 91:case 94:break e;default:}return t<<16>>16!=125&(t+-123&65535)<4|0}}while(!1);return 1}f(yt,"U");function Re(t){t=t|0;var a=0;a=d[t>>1]|0;e:do if((a+-9&65535)>=5){switch(a<<16>>16){case 160:case 32:{a=1;break e}default:}if(te(a)|0)return a<<16>>16!=46|(ge(t)|0)|0;a=0}else a=1;while(!1);return a|0}f(Re,"x");function Ct(t){t=t|0;var a=0,h=0,l=0,w=0;return h=E,E=E+16|0,l=h,n[l>>2]=0,n[66]=t,a=n[3]|0,w=a+(t<<1)|0,t=w+2|0,d[w>>1]=0,n[l>>2]=t,n[67]=t,n[59]=0,n[63]=0,n[61]=0,n[60]=0,n[65]=0,n[62]=0,E=h,a|0}f(Ct,"S");function P(t,a,h,l){t=t|0,a=a|0,h=h|0,l=l|0;var w=0,m=0;w=n[67]|0,n[67]=w+20,m=n[65]|0,n[(m|0?m+16|0:240)>>2]=w,n[65]=w,n[w>>2]=t,n[w+4>>2]=a,n[w+8>>2]=h,n[w+12>>2]=l,n[w+16>>2]=0,b[803]=1}f(P,"O");function O(t,a,h){t=t|0,a=a|0,h=h|0;var l=0,w=0;return l=t+(0-h<<1)|0,w=l+2|0,t=n[3]|0,w>>>0>=t>>>0&&!(A(w,a,h<<1)|0)?(w|0)==(t|0)?t=1:t=Re(l)|0:t=0,t|0}f(O,"$");function St(t){switch(t=t|0,d[t>>1]|0){case 107:{t=O(t+-2|0,150,4)|0;break}case 101:{(d[t+-2>>1]|0)==117?t=O(t+-4|0,122,6)|0:t=0;break}default:t=0}return t|0}f(St,"j");function z(t,a){t=t|0,a=a|0;var h=0;return h=n[3]|0,h>>>0<=t>>>0&&(d[t>>1]|0)==a<<16>>16?(h|0)==(t|0)?h=1:h=fe(d[t+-2>>1]|0)|0:h=0,h|0}f(z,"B");function fe(t){t=t|0;e:do if((t+-9&65535)<5)t=1;else{switch(t<<16>>16){case 32:case 160:{t=1;break e}default:}t=t<<16>>16!=46&(te(t)|0)}while(!1);return t|0}f(fe,"E");function de(){var t=0,a=0,h=0;t=n[73]|0,h=n[72]|0;e:for(;a=h+2|0,!(h>>>0>=t>>>0);)switch(d[a>>1]|0){case 13:case 10:break e;default:h=a}n[72]=a}f(de,"P");function $(t){for(t=t|0;!(W(t)|0||te(t)|0);)if(t=(n[72]|0)+2|0,n[72]=t,t=d[t>>1]|0,!(t<<16>>16)){t=0;break}return t|0}f($,"q");function vt(){var t=0;switch(t=n[(n[61]|0)+20>>2]|0,t|0){case 1:{t=-1;break}case 2:{t=-2;break}default:t=t-(n[3]|0)>>1}return t|0}f(vt,"z");function xt(t){return t=t|0,!(O(t,196,5)|0)&&!(O(t,44,3)|0)?t=O(t,206,2)|0:t=1,t|0}f(xt,"D");function re(t){switch(t=t|0,t<<16>>16){case 160:case 32:case 12:case 11:case 9:{t=1;break}default:t=0}return t|0}f(re,"F");function ge(t){return t=t|0,(d[t>>1]|0)==46&&(d[t+-2>>1]|0)==46?t=(d[t+-4>>1]|0)==46:t=0,t|0}f(ge,"G");function H(t){return t=t|0,(n[3]|0)==(t|0)?t=1:t=Re(t+-2|0)|0,t|0}f(H,"H");function _t(){var t=0;return t=n[(n[62]|0)+12>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(_t,"J");function Et(){var t=0;return t=n[(n[61]|0)+12>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(Et,"K");function Lt(){var t=0;return t=n[(n[62]|0)+8>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(Lt,"L");function Ot(){var t=0;return t=n[(n[61]|0)+16>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(Ot,"M");function Rt(){var t=0;return t=n[(n[61]|0)+4>>2]|0,t?t=t-(n[3]|0)>>1:t=-1,t|0}f(Rt,"N");function At(){var t=0;return t=n[61]|0,t=n[(t|0?t+32|0:236)>>2]|0,n[61]=t,(t|0)!=0|0}f(At,"Q");function Nt(){var t=0;return t=n[62]|0,t=n[(t|0?t+16|0:240)>>2]|0,n[62]=t,(t|0)!=0|0}f(Nt,"R");function M(){b[802]=1,n[68]=(n[72]|0)-(n[3]|0)>>1,n[72]=(n[73]|0)+2}f(M,"T");function W(t){return t=t|0,(t|128)<<16>>16==160|(t+-9&65535)<5|0}f(W,"V");function X(t){return t=t|0,t<<16>>16==39|t<<16>>16==34|0}f(X,"W");function It(){return(n[(n[61]|0)+8>>2]|0)-(n[3]|0)>>1|0}f(It,"X");function Mt(){return(n[(n[62]|0)+4>>2]|0)-(n[3]|0)>>1|0}f(Mt,"Y");function Ae(t){return t=t|0,t<<16>>16==13|t<<16>>16==10|0}f(Ae,"Z");function Ut(){return(n[n[61]>>2]|0)-(n[3]|0)>>1|0}f(Ut,"_");function jt(){return(n[n[62]>>2]|0)-(n[3]|0)>>1|0}f(jt,"ee");function $t(){return R[(n[61]|0)+24>>0]|0|0}f($t,"ae");function Dt(t){t=t|0,n[3]=t}f(Dt,"re");function Tt(){return n[(n[61]|0)+28>>2]|0}f(Tt,"ie");function Ft(){return(b[803]|0)!=0|0}f(Ft,"se");function Jt(){return(b[804]|0)!=0|0}f(Jt,"fe");function Pt(){return n[68]|0}f(Pt,"te");function Wt(t){return t=t|0,E=t+992+15&-16,992}return f(Wt,"ce"),{su:Wt,ai:Ot,e:Pt,ee:Mt,ele:_t,els:Lt,es:jt,f:Jt,id:vt,ie:Rt,ip:$t,is:Ut,it:Tt,ms:Ft,p:N,re:Nt,ri:At,sa:Ct,se:Et,ses:Dt,ss:It}}(typeof self<"u"?self:global,{},ie),ye=x.su(Z-(2<<17))}const i=_.length+1;x.ses(ye),x.sa(i-1),Je(_,new Uint16Array(ie,ye,i)),x.p()||(y=x.e(),D());const o=[],c=[];for(;x.ri();){const u=x.is(),p=x.ie(),g=x.ai(),b=x.id(),d=x.ss(),n=x.se(),R=x.it();let L;x.ip()&&(L=Ce(b===-1?u:u+1,_.charCodeAt(b===-1?u-1:u))),o.push({t:R,n:L,s:u,e:p,ss:d,se:n,d:b,a:g})}for(;x.re();){const u=x.es(),p=x.ee(),g=x.els(),b=x.ele(),d=_.charCodeAt(u),n=g>=0?_.charCodeAt(g):-1;c.push({s:u,e:p,ls:g,le:b,n:d===34||d===39?Ce(u+1,d):_.slice(u,p),ln:g<0?void 0:n===34||n===39?Ce(g+1,n):_.slice(g,b)})}return[o,c,!!x.f(),!!x.ms()]}f(cr,"parse");function Ce(s,e){y=s;let r="",i=y;for(;;){y>=_.length&&D();const o=_.charCodeAt(y);if(o===e)break;o===92?(r+=_.slice(i,y),r+=ur(),i=y):(o===8232||o===8233||We(o)&&D(),++y)}return r+=_.slice(i,y++),r}f(Ce,"b");function ur(){let s=_.charCodeAt(++y);switch(++y,s){case 110:return` ++`;case 114:return"\r";case 120:return String.fromCharCode(Se(2));case 117:return function(){const e=_.charCodeAt(y);let r;return e===123?(++y,r=Se(_.indexOf("}",y)-y),++y,r>1114111&&D()):r=Se(4),r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:_.charCodeAt(y)===10&&++y;case 10:return"";case 56:case 57:D();default:if(s>=48&&s<=55){let e=_.substr(y-1,3).match(/^[0-7]+/)[0],r=parseInt(e,8);return r>255&&(e=e.slice(0,-1),r=parseInt(e,8)),y+=e.length-1,s=_.charCodeAt(y),e==="0"&&s!==56&&s!==57||D(),String.fromCharCode(r)}return We(s)?"":String.fromCharCode(s)}}f(ur,"k");function Se(s){const e=y;let r=0,i=0;for(let o=0;o=97)c=u-97+10;else if(u>=65)c=u-65+10;else{if(!(u>=48&&u<=57))break;c=u-48}if(c>=16)break;i=u,r=16*r+c}else i!==95&&o!==0||D(),i=u}return i!==95&&y-e===s||D(),r}f(Se,"l");function We(s){return s===13||s===10}f(We,"u");function D(){throw Object.assign(Error(`Parse error ${Pe}:${_.slice(0,y).split(` + `).length}:${y-_.lastIndexOf(` +-`,y-1)}`),{idx:y})}f(D,"o");let ve;typeof WebAssembly<"u"&&(async()=>{const{parse:s,init:e}=await Promise.resolve().then(function(){return require("./lexer-DgIbo0BU.cjs")});await e,ve=s})();const Be=f((s,e)=>ve?ve(s,e):cr(s,e),"parseEsm"),lr=f(s=>{if(!s.includes("import")&&!s.includes("export"))return!1;try{return Be(s)[3]}catch{return!0}},"isESM"),Je="2",hr=(s=>{const e="default";return s[e]&&typeof s[e]=="object"&&"__esModule"in s[e]?s[e]:s}).toString(),fr=`.then(${hr})`,xe=f((s,e,r)=>{if(r){if(!e.includes("import("))return}else if(!e.includes("import"))return;const o=Be(e,s)[0].filter(g=>g.d>-1);if(o.length===0)return;const c=new Ee(e);for(const g of o)c.appendRight(g.se,fr);const u=c.toString(),p=c.generateMap({source:s,includeContent:!1,hires:"boundary"});return{code:u,map:p}},"transformDynamicImport"),Ge=f(s=>{try{const e=j.readFileSync(s,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),ze=f(()=>{},"noop"),He=f(()=>Math.floor(Date.now()/1e8),"getTime");class dr extends Map{static{f(this,"FileCache")}cacheDirectory=zt.tmpdir;oldCacheDirectory=X.join(Gt.tmpdir(),"tsx");cacheFiles;constructor(){super(),j.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=j.readdirSync(this.cacheDirectory).map(e=>{const[r,i]=e.split("-");return{time:Number(r),key:i,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){const r=super.get(e);if(r)return r;const i=this.cacheFiles.find(u=>u.key===e);if(!i)return;const o=X.join(this.cacheDirectory,i.fileName),c=Ge(o);if(!c){j.promises.unlink(o).then(()=>{const u=this.cacheFiles.indexOf(i);this.cacheFiles.splice(u,1)},()=>{});return}return super.set(e,c),c}set(e,r){if(super.set(e,r),r){const i=He();j.promises.writeFile(X.join(this.cacheDirectory,`${i}-${e}`),JSON.stringify(r)).catch(ze)}return this}expireDiskCache(){const e=He();for(const r of this.cacheFiles)e-r.time>7&&j.promises.unlink(X.join(this.cacheDirectory,r.fileName)).catch(ze)}async removeOldCacheDirectory(){try{await j.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in j.promises?await j.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await j.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var se=process.env.TSX_DISABLE_CACHE?new Map:new dr;const gr=/^[\w+.-]+:\/\//,br=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,pr=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function wr(s){return gr.test(s)}f(wr,"isAbsoluteUrl");function mr(s){return s.startsWith("//")}f(mr,"isSchemeRelativeUrl");function Xe(s){return s.startsWith("/")}f(Xe,"isAbsolutePath");function kr(s){return s.startsWith("file:")}f(kr,"isFileUrl");function Ke(s){return/^[.?#]/.test(s)}f(Ke,"isRelative");function oe(s){const e=br.exec(s);return Ye(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}f(oe,"parseAbsoluteUrl");function yr(s){const e=pr.exec(s),r=e[2];return Ye("file:","",e[1]||"","",Xe(r)?r:"/"+r,e[3]||"",e[4]||"")}f(yr,"parseFileUrl");function Ye(s,e,r,i,o,c,u){return{scheme:s,user:e,host:r,port:i,path:o,query:c,hash:u,type:7}}f(Ye,"makeUrl");function Qe(s){if(mr(s)){const r=oe("http:"+s);return r.scheme="",r.type=6,r}if(Xe(s)){const r=oe("http://foo.com"+s);return r.scheme="",r.host="",r.type=5,r}if(kr(s))return yr(s);if(wr(s))return oe(s);const e=oe("http://foo.com/"+s);return e.scheme="",e.host="",e.type=s?s.startsWith("?")?3:s.startsWith("#")?2:4:1,e}f(Qe,"parseUrl");function Cr(s){if(s.endsWith("/.."))return s;const e=s.lastIndexOf("/");return s.slice(0,e+1)}f(Cr,"stripPathFilename");function Sr(s,e){Ze(e,e.type),s.path==="/"?s.path=e.path:s.path=Cr(e.path)+s.path}f(Sr,"mergePaths");function Ze(s,e){const r=e<=4,i=s.path.split("/");let o=1,c=0,u=!1;for(let g=1;gi&&(i=u)}Ze(r,i);const o=r.query+r.hash;switch(i){case 2:case 3:return o;case 4:{const c=r.path.slice(1);return c?Ke(e||s)&&!Ke(c)?"./"+c+o:c+o:o||"."}case 5:return r.path+o;default:return r.scheme+"//"+r.user+r.host+r.port+r.path+o}}f(vr,"resolve$1");function Ve(s,e){return e&&!e.endsWith("/")&&(e+="/"),vr(s,e)}f(Ve,"resolve");function xr(s){if(!s)return"";const e=s.lastIndexOf("/");return s.slice(0,e+1)}f(xr,"stripFilename");const F=0;function _r(s,e){const r=et(s,0);if(r===s.length)return s;e||(s=s.slice());for(let i=r;i>1),c=s[o][F]-e;if(c===0)return ae=!0,o;c<0?r=o+1:i=o-1}return ae=!1,r-1}f(Rr,"binarySearch");function Ar(s,e,r){for(let i=r-1;i>=0&&s[i][F]===e;r=i--);return r}f(Ar,"lowerBound");function Nr(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}f(Nr,"memoizedState");function Ir(s,e,r,i){const{lastKey:o,lastNeedle:c,lastIndex:u}=r;let p=0,g=s.length-1;if(i===o){if(e===c)return ae=u!==-1&&s[u][F]===e,u;e>=c?p=u===-1?0:u:g=u}return r.lastKey=i,r.lastNeedle=e,r.lastIndex=Rr(s,e,p,g)}f(Ir,"memoizedBinarySearch");class tt{static{f(this,"TraceMap")}constructor(e,r){const i=typeof e=="string";if(!i&&e._decodedMemo)return e;const o=i?JSON.parse(e):e,{version:c,file:u,names:p,sourceRoot:g,sources:b,sourcesContent:d}=o;this.version=c,this.file=u,this.names=p||[],this.sourceRoot=g,this.sources=b,this.sourcesContent=d,this.ignoreList=o.ignoreList||o.x_google_ignoreList||void 0;const n=Ve(g||"",xr(r));this.resolvedSources=b.map(L=>Ve(L||"",n));const{mappings:R}=o;typeof R=="string"?(this._encoded=R,this._decoded=void 0):(this._encoded=void 0,this._decoded=_r(R,i)),this._decodedMemo=Nr(),this._bySources=void 0,this._bySourceMemos=void 0}}function gn(s){return s}f(gn,"cast$2");function rt(s){var e;return(e=s)._decoded||(e._decoded=Xt(s._encoded))}f(rt,"decodedMappings");function Mr(s,e,r){const i=rt(s);if(e>=i.length)return null;const o=i[e],c=Ur(o,s._decodedMemo,e,r);return c===-1?null:o[c]}f(Mr,"traceSegment");function Ur(s,e,r,i,o){let c=Ir(s,i,e,r);return ae&&(c=Ar(s,i,c)),c===-1||c===s.length?-1:c}f(Ur,"traceSegmentInternal");class _e{static{f(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}}function bn(s){return s}f(bn,"cast$1");function nt(s,e){return s._indexes[e]}f(nt,"get");function V(s,e){const r=nt(s,e);if(r!==void 0)return r;const{array:i,_indexes:o}=s,c=i.push(e);return o[e]=c-1}f(V,"put");function jr(s,e){const r=nt(s,e);if(r===void 0)return;const{array:i,_indexes:o}=s;for(let c=r+1;czr(!0,s,e,r,i,o,c,u),"maybeAddSegment");function Br(s,e,r){const{_sources:i,_sourcesContent:o}=s,c=V(i,e);o[c]=r}f(Br,"setSourceContent");function Jr(s,e,r=!0){const{_sources:i,_sourcesContent:o,_ignoreList:c}=s,u=V(i,e);u===o.length&&(o[u]=null),r?V(c,u):jr(c,u)}f(Jr,"setIgnore");function st(s){const{_mappings:e,_sources:r,_sourcesContent:i,_names:o,_ignoreList:c}=s;return Kr(e),{version:3,file:s.file||void 0,names:o.array,sourceRoot:s.sourceRoot||void 0,sources:r.array,sourcesContent:i,mappings:e,ignoreList:c.array}}f(st,"toDecodedMap");function Gr(s){const e=st(s);return Object.assign(Object.assign({},e),{mappings:Te(e.mappings)})}f(Gr,"toEncodedMap");function zr(s,e,r,i,o,c,u,p,g){const{_mappings:b,_sources:d,_sourcesContent:n,_names:R}=e,L=Hr(b,r),E=Xr(L,i);if(!o)return Yr(L,E)?void 0:ot(L,E,[i]);const N=V(d,o),U=p?V(R,p):it;if(N===n.length&&(n[N]=null),!Qr(L,E,N,c,u,U))return ot(L,E,p?[i,N,c,u,U]:[i,N,c,u])}f(zr,"addSegmentInternal");function Hr(s,e){for(let r=s.length;r<=e;r++)s[r]=[];return s[e]}f(Hr,"getLine");function Xr(s,e){let r=s.length;for(let i=r-1;i>=0;r=i--){const o=s[i];if(e>=o[$r])break}return r}f(Xr,"getColumnIndex");function ot(s,e,r){for(let i=s.length;i>e;i--)s[i]=s[i-1];s[e]=r}f(ot,"insert");function Kr(s){const{length:e}=s;let r=e;for(let i=r-1;i>=0&&!(s[i].length>0);r=i,i--);rnew tt(c,"")),i=r.pop();for(let c=0;c1)throw new Error(`Transformation map ${c} must have exactly one source file. +-Did you specify these with the most recent transformation maps first?`);let o=ft(i,e,"",0);for(let c=r.length-1;c>=0;c--)o=lt(r[c],[o]);return o}f(rn,"buildSourceMapTree");function ft(s,e,r,i){const{resolvedSources:o,sourcesContent:c,ignoreList:u}=s,p=i+1,g=o.map((b,d)=>{const n={importer:r,depth:p,source:b||"",content:void 0,ignore:void 0},R=e(n.source,n),{source:L,content:E,ignore:N}=n;if(R)return ft(new tt(R,L),e,L,p);const U=E!==void 0?E:c?c[d]:null,P=N!==void 0?N:u?u.includes(d):!1;return Vr(L,U,P)});return lt(s,g)}f(ft,"build");class nn{static{f(this,"SourceMap")}constructor(e,r){const i=r.decodedMappings?st(e):Gr(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,r.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function dt(s,e,r){const i={excludeContent:!!r,decodedMappings:!1},o=rn(s,e);return new nn(en(o),i)}f(dt,"remapping");const sn=f((s,e,r)=>{const i=[],o={code:e};for(const c of r){const u=c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:dt(i,()=>null)}},"applyTransformersSync"),on=f(async(s,e,r)=>{const i=[],o={code:e};for(const c of r){const u=await c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:dt(i,()=>null)}},"applyTransformers"),an=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),cn=/^--inspect(?:-brk|-port|-publish-uid|-wait)?(?:=|$)/,un=process.execArgv.some(s=>cn.test(s)),gt={...an,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE||un,minifyWhitespace:!0,keepNames:!0},bt=f(s=>{const e=s.sourcefile;if(e){const r=X.extname(e.split("?")[0]);r?r===".cts"||r===".mts"?s.sourcefile=`${e.slice(0,-3)}ts`:r===".mjs"&&(s.sourcefile=`${e.slice(0,-3)}js`):s.sourcefile+=".js"}return r=>(r.map&&(s.sourcefile!==e&&(r.map=r.map.replace(JSON.stringify(s.sourcefile),JSON.stringify(e))),r.map=JSON.parse(r.map)),r)},"patchOptions"),pt=f(s=>{throw s.name="TransformError",delete s.errors,delete s.warnings,s},"formatEsbuildError"),ln=f((s,e,r)=>{const i={};let o,c,u;if(e.startsWith("file://")){o=e;const d=new URL(e);c=Ne.fileURLToPath(d)}else[c,u]=e.split("?"),o=Ne.pathToFileURL(c)+(u?`?${u}`:"");c.endsWith(".cjs")||c.endsWith(".cts")||(i["import.meta.url"]=JSON.stringify(o));const p={...gt,format:"cjs",sourcefile:c,define:i,banner:`__filename=${JSON.stringify(c)};(()=>{`,footer:"})()",platform:"node",...r},g=Ie([s,JSON.stringify(p),ne.version,Je].join("-"));let b=se.get(g);return b||(b=sn(e,s,[(d,n)=>{const R=bt(p);let L;try{L=ne.transformSync(n,p)}catch(E){throw pt(E)}return R(L)},(d,n)=>xe(d,n,!0)]),se.set(g,b)),b},"transformSync"),hn=f(async(s,e,r)=>{const i={...gt,format:"esm",sourcefile:e,...r},o=Ie([s,JSON.stringify(i),ne.version,Je].join("-"));let c=se.get(o);return c||(c=await on(e,s,[async(u,p)=>{const g=bt(i);let b;try{b=await ne.transform(p,i)}catch(d){throw pt(d)}return g(b)},(u,p)=>xe(u,p,!0)]),se.set(o,c)),c},"transform");exports.isESM=lr,exports.readJsonFile=Ge,exports.transform=hn,exports.transformDynamicImport=xe,exports.transformSync=ln; ++`,y-1)}`),{idx:y})}f(D,"o");let ve;typeof WebAssembly<"u"&&(async()=>{const{parse:s,init:e}=await Promise.resolve().then(function(){return require("./lexer-DgIbo0BU.cjs")});await e,ve=s})();const qe=f((s,e)=>ve?ve(s,e):cr(s,e),"parseEsm"),lr=f(s=>{if(!s.includes("import")&&!s.includes("export"))return!1;try{return qe(s)[3]}catch{return!0}},"isESM"),Be="2",hr=(s=>{const e="default";return s[e]&&typeof s[e]=="object"&&"__esModule"in s[e]?s[e]:s}).toString(),fr=`.then(${hr})`,xe=f((s,e,r)=>{if(r){if(!e.includes("import("))return}else if(!e.includes("import"))return;const o=qe(e,s)[0].filter(g=>g.d>-1);if(o.length===0)return;const c=new Ee(e);for(const g of o)c.appendRight(g.se,fr);const u=c.toString(),p=c.generateMap({source:s,includeContent:!1,hires:"boundary"});return{code:u,map:p}},"transformDynamicImport"),Ge=f(s=>{try{const e=j.readFileSync(s,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),ze=f(()=>{},"noop"),He=f(()=>Math.floor(Date.now()/1e8),"getTime");class dr extends Map{static{f(this,"FileCache")}cacheDirectory=zt.tmpdir;oldCacheDirectory=q.join(Gt.tmpdir(),"tsx");cacheFiles;constructor(){super(),j.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=j.readdirSync(this.cacheDirectory).map(e=>{const[r,i]=e.split("-");return{time:Number(r),key:i,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){const r=super.get(e);if(r)return r;const i=this.cacheFiles.find(u=>u.key===e);if(!i)return;const o=q.join(this.cacheDirectory,i.fileName),c=Ge(o);if(!c){j.promises.unlink(o).then(()=>{const u=this.cacheFiles.indexOf(i);this.cacheFiles.splice(u,1)},()=>{});return}return super.set(e,c),c}set(e,r){if(super.set(e,r),r){const i=He();j.promises.writeFile(q.join(this.cacheDirectory,`${i}-${e}`),JSON.stringify(r)).catch(ze)}return this}expireDiskCache(){const e=He();for(const r of this.cacheFiles)e-r.time>7&&j.promises.unlink(q.join(this.cacheDirectory,r.fileName)).catch(ze)}async removeOldCacheDirectory(){try{await j.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in j.promises?await j.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await j.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var se=process.env.TSX_DISABLE_CACHE?new Map:new dr;const gr=/^[\w+.-]+:\/\//,br=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,pr=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function wr(s){return gr.test(s)}f(wr,"isAbsoluteUrl");function mr(s){return s.startsWith("//")}f(mr,"isSchemeRelativeUrl");function Xe(s){return s.startsWith("/")}f(Xe,"isAbsolutePath");function kr(s){return s.startsWith("file:")}f(kr,"isFileUrl");function Ke(s){return/^[.?#]/.test(s)}f(Ke,"isRelative");function oe(s){const e=br.exec(s);return Ye(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}f(oe,"parseAbsoluteUrl");function yr(s){const e=pr.exec(s),r=e[2];return Ye("file:","",e[1]||"","",Xe(r)?r:"/"+r,e[3]||"",e[4]||"")}f(yr,"parseFileUrl");function Ye(s,e,r,i,o,c,u){return{scheme:s,user:e,host:r,port:i,path:o,query:c,hash:u,type:7}}f(Ye,"makeUrl");function Qe(s){if(mr(s)){const r=oe("http:"+s);return r.scheme="",r.type=6,r}if(Xe(s)){const r=oe("http://foo.com"+s);return r.scheme="",r.host="",r.type=5,r}if(kr(s))return yr(s);if(wr(s))return oe(s);const e=oe("http://foo.com/"+s);return e.scheme="",e.host="",e.type=s?s.startsWith("?")?3:s.startsWith("#")?2:4:1,e}f(Qe,"parseUrl");function Cr(s){if(s.endsWith("/.."))return s;const e=s.lastIndexOf("/");return s.slice(0,e+1)}f(Cr,"stripPathFilename");function Sr(s,e){Ze(e,e.type),s.path==="/"?s.path=e.path:s.path=Cr(e.path)+s.path}f(Sr,"mergePaths");function Ze(s,e){const r=e<=4,i=s.path.split("/");let o=1,c=0,u=!1;for(let g=1;gi&&(i=u)}Ze(r,i);const o=r.query+r.hash;switch(i){case 2:case 3:return o;case 4:{const c=r.path.slice(1);return c?Ke(e||s)&&!Ke(c)?"./"+c+o:c+o:o||"."}case 5:return r.path+o;default:return r.scheme+"//"+r.user+r.host+r.port+r.path+o}}f(vr,"resolve$1");function Ve(s,e){return e&&!e.endsWith("/")&&(e+="/"),vr(s,e)}f(Ve,"resolve");function xr(s){if(!s)return"";const e=s.lastIndexOf("/");return s.slice(0,e+1)}f(xr,"stripFilename");const F=0;function _r(s,e){const r=et(s,0);if(r===s.length)return s;e||(s=s.slice());for(let i=r;i>1),c=s[o][F]-e;if(c===0)return ae=!0,o;c<0?r=o+1:i=o-1}return ae=!1,r-1}f(Rr,"binarySearch");function Ar(s,e,r){for(let i=r-1;i>=0&&s[i][F]===e;r=i--);return r}f(Ar,"lowerBound");function Nr(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}f(Nr,"memoizedState");function Ir(s,e,r,i){const{lastKey:o,lastNeedle:c,lastIndex:u}=r;let p=0,g=s.length-1;if(i===o){if(e===c)return ae=u!==-1&&s[u][F]===e,u;e>=c?p=u===-1?0:u:g=u}return r.lastKey=i,r.lastNeedle=e,r.lastIndex=Rr(s,e,p,g)}f(Ir,"memoizedBinarySearch");class tt{static{f(this,"TraceMap")}constructor(e,r){const i=typeof e=="string";if(!i&&e._decodedMemo)return e;const o=i?JSON.parse(e):e,{version:c,file:u,names:p,sourceRoot:g,sources:b,sourcesContent:d}=o;this.version=c,this.file=u,this.names=p||[],this.sourceRoot=g,this.sources=b,this.sourcesContent=d,this.ignoreList=o.ignoreList||o.x_google_ignoreList||void 0;const n=Ve(g||"",xr(r));this.resolvedSources=b.map(L=>Ve(L||"",n));const{mappings:R}=o;typeof R=="string"?(this._encoded=R,this._decoded=void 0):(this._encoded=void 0,this._decoded=_r(R,i)),this._decodedMemo=Nr(),this._bySources=void 0,this._bySourceMemos=void 0}}function gn(s){return s}f(gn,"cast$2");function rt(s){var e;return(e=s)._decoded||(e._decoded=Xt(s._encoded))}f(rt,"decodedMappings");function Mr(s,e,r){const i=rt(s);if(e>=i.length)return null;const o=i[e],c=Ur(o,s._decodedMemo,e,r);return c===-1?null:o[c]}f(Mr,"traceSegment");function Ur(s,e,r,i,o){let c=Ir(s,i,e,r);return ae&&(c=Ar(s,i,c)),c===-1||c===s.length?-1:c}f(Ur,"traceSegmentInternal");class _e{static{f(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}}function bn(s){return s}f(bn,"cast$1");function nt(s,e){return s._indexes[e]}f(nt,"get");function V(s,e){const r=nt(s,e);if(r!==void 0)return r;const{array:i,_indexes:o}=s,c=i.push(e);return o[e]=c-1}f(V,"put");function jr(s,e){const r=nt(s,e);if(r===void 0)return;const{array:i,_indexes:o}=s;for(let c=r+1;czr(!0,s,e,r,i,o,c,u),"maybeAddSegment");function qr(s,e,r){const{_sources:i,_sourcesContent:o}=s,c=V(i,e);o[c]=r}f(qr,"setSourceContent");function Br(s,e,r=!0){const{_sources:i,_sourcesContent:o,_ignoreList:c}=s,u=V(i,e);u===o.length&&(o[u]=null),r?V(c,u):jr(c,u)}f(Br,"setIgnore");function st(s){const{_mappings:e,_sources:r,_sourcesContent:i,_names:o,_ignoreList:c}=s;return Kr(e),{version:3,file:s.file||void 0,names:o.array,sourceRoot:s.sourceRoot||void 0,sources:r.array,sourcesContent:i,mappings:e,ignoreList:c.array}}f(st,"toDecodedMap");function Gr(s){const e=st(s);return Object.assign(Object.assign({},e),{mappings:Te(e.mappings)})}f(Gr,"toEncodedMap");function zr(s,e,r,i,o,c,u,p,g){const{_mappings:b,_sources:d,_sourcesContent:n,_names:R}=e,L=Hr(b,r),E=Xr(L,i);if(!o)return Yr(L,E)?void 0:ot(L,E,[i]);const N=V(d,o),U=p?V(R,p):it;if(N===n.length&&(n[N]=null),!Qr(L,E,N,c,u,U))return ot(L,E,p?[i,N,c,u,U]:[i,N,c,u])}f(zr,"addSegmentInternal");function Hr(s,e){for(let r=s.length;r<=e;r++)s[r]=[];return s[e]}f(Hr,"getLine");function Xr(s,e){let r=s.length;for(let i=r-1;i>=0;r=i--){const o=s[i];if(e>=o[$r])break}return r}f(Xr,"getColumnIndex");function ot(s,e,r){for(let i=s.length;i>e;i--)s[i]=s[i-1];s[e]=r}f(ot,"insert");function Kr(s){const{length:e}=s;let r=e;for(let i=r-1;i>=0&&!(s[i].length>0);r=i,i--);rnew tt(c,"")),i=r.pop();for(let c=0;c1)throw new Error(`Transformation map ${c} must have exactly one source file. ++Did you specify these with the most recent transformation maps first?`);let o=ft(i,e,"",0);for(let c=r.length-1;c>=0;c--)o=lt(r[c],[o]);return o}f(rn,"buildSourceMapTree");function ft(s,e,r,i){const{resolvedSources:o,sourcesContent:c,ignoreList:u}=s,p=i+1,g=o.map((b,d)=>{const n={importer:r,depth:p,source:b||"",content:void 0,ignore:void 0},R=e(n.source,n),{source:L,content:E,ignore:N}=n;if(R)return ft(new tt(R,L),e,L,p);const U=E!==void 0?E:c?c[d]:null,J=N!==void 0?N:u?u.includes(d):!1;return Vr(L,U,J)});return lt(s,g)}f(ft,"build");class nn{static{f(this,"SourceMap")}constructor(e,r){const i=r.decodedMappings?st(e):Gr(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,r.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function dt(s,e,r){const i={excludeContent:!!r,decodedMappings:!1},o=rn(s,e);return new nn(en(o),i)}f(dt,"remapping");const sn=f((s,e,r)=>{const i=[],o={code:e};for(const c of r){const u=c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:dt(i,()=>null)}},"applyTransformersSync"),on=f(async(s,e,r)=>{const i=[],o={code:e};for(const c of r){const u=await c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:dt(i,()=>null)}},"applyTransformers"),an=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),cn=/^--inspect(?:-brk|-port|-publish-uid|-wait)?(?:=|$)/,un=process.execArgv.some(s=>cn.test(s)),gt={...an,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE||un,minifyWhitespace:!0,keepNames:!0},bt=f(s=>{const e=s.sourcefile;if(e){const r=q.extname(e.split("?")[0]);r?r===".cts"||r===".mts"?s.sourcefile=`${e.slice(0,-3)}ts`:r===".mjs"&&(s.sourcefile=`${e.slice(0,-3)}js`):s.sourcefile+=".js"}return r=>(r.map&&(s.sourcefile!==e&&(r.map=r.map.replace(JSON.stringify(s.sourcefile),JSON.stringify(e))),r.map=JSON.parse(r.map)),r)},"patchOptions"),pt=f(s=>{throw s.name="TransformError",delete s.errors,delete s.warnings,s},"formatEsbuildError"),ln=f((s,e,r)=>{const i={};let o,c,u;if(e.startsWith("file://")){o=e;const d=new URL(e);c=Ne.fileURLToPath(d)}else[c,u]=e.split("?"),o=Ne.pathToFileURL(c)+(u?`?${u}`:"");c.endsWith(".cjs")||c.endsWith(".cts")||(i["import.meta.url"]=JSON.stringify(o),i["import.meta.dirname"]=JSON.stringify(q.dirname(c)),i["import.meta.filename"]=JSON.stringify(c));const p={...gt,format:"cjs",sourcefile:c,define:i,banner:`__filename=${JSON.stringify(c)};(()=>{`,footer:"})()",platform:"node",...r},g=Ie([s,JSON.stringify(p),ne.version,Be].join("-"));let b=se.get(g);return b||(b=sn(e,s,[(d,n)=>{const R=bt(p);let L;try{L=ne.transformSync(n,p)}catch(E){throw pt(E)}return R(L)},(d,n)=>xe(d,n,!0)]),se.set(g,b)),b},"transformSync"),hn=f(async(s,e,r)=>{const i={...gt,format:"esm",sourcefile:e,...r},o=Ie([s,JSON.stringify(i),ne.version,Be].join("-"));let c=se.get(o);return c||(c=await on(e,s,[async(u,p)=>{const g=bt(i);let b;try{b=await ne.transform(p,i)}catch(d){throw pt(d)}return g(b)},(u,p)=>xe(u,p,!0)]),se.set(o,c)),c},"transform");exports.isESM=lr,exports.readJsonFile=Ge,exports.transform=hn,exports.transformDynamicImport=xe,exports.transformSync=ln; diff --git a/permissions_popup.html b/permissions_popup.html index 9b3754c6da..6d2acd6976 100644 --- a/permissions_popup.html +++ b/permissions_popup.html @@ -20,6 +20,6 @@
- + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca91951049..86ec45c42c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -65,6 +65,9 @@ patchedDependencies: qrcode-generator@1.4.4: hash: 1f10c592d849ed4cfc9f81301196d39857b79240997ef5772138218cb3717e80 path: patches/qrcode-generator+1.4.4.patch + tsx: + hash: 251027c4cc25615da4cf5b54757ba1af5ecae4256a23772bcc2c1284f6aa1251 + path: patches/tsx.patch zod@3.23.8: hash: 239818e5d88990616205c8cdc1de1660bf5e18b157d00c4a5f726dde6094af4d path: patches/zod+3.23.8.patch @@ -73,69 +76,18 @@ importers: .: dependencies: - '@electron/asar': - specifier: 3.4.1 - version: 3.4.1 - '@formatjs/fast-memoize': - specifier: 2.2.3 - version: 2.2.3 - '@formatjs/icu-messageformat-parser': - specifier: 2.9.3 - version: 2.9.3 - '@formatjs/intl-localematcher': - specifier: 0.2.32 - version: 0.2.32 - '@indutny/dicer': - specifier: 0.3.2 - version: 0.3.2 '@indutny/mac-screen-share': specifier: 1.0.13 version: 1.0.13 - '@indutny/protopiler': - specifier: 3.2.4 - version: 3.2.4 - '@indutny/range-finder': - specifier: 1.3.4 - version: 1.3.4 '@indutny/simple-windows-notifications': specifier: 2.0.16 version: 2.0.16 - '@indutny/sneequals': - specifier: 4.0.0 - version: 4.0.0 - '@internationalized/date': - specifier: 3.12.0 - version: 3.12.0 - '@popperjs/core': - specifier: 2.11.8 - version: 2.11.8 - '@react-aria/focus': - specifier: 3.21.5 - version: 3.21.5(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@react-aria/interactions': - specifier: 3.27.1 - version: 3.27.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@react-aria/utils': - specifier: 3.33.1 - version: 3.33.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@react-spring/web': - specifier: 10.0.3 - version: 10.0.3(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@react-types/shared': - specifier: 3.33.1 - version: 3.33.1(react@19.2.4) '@signalapp/libsignal-client': specifier: 0.90.0 version: 0.90.0 - '@signalapp/minimask': - specifier: 1.0.1 - version: 1.0.1 '@signalapp/mute-state-change': specifier: workspace:1.0.0 version: link:packages/mute-state-change - '@signalapp/quill-cjs': - specifier: 2.1.2 - version: 2.1.2 '@signalapp/ringrtc': specifier: 2.67.0 version: 2.67.0 @@ -145,249 +97,33 @@ importers: '@signalapp/windows-ucv': specifier: 1.0.1 version: 1.0.1 - '@tanstack/react-virtual': - specifier: 3.11.2 - version: 3.11.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@types/dom-mediacapture-transform': - specifier: 0.1.11 - version: 0.1.11 - '@types/fabric': - specifier: 4.5.3 - version: 4.5.3(patch_hash=e5f339ecf72fbab1c91505e7713e127a7184bfe8164aa3a9afe9bf45a0ad6b89) - '@typescript/native-preview': - specifier: 7.0.0-dev.20260303.1 - version: 7.0.0-dev.20260303.1 - blob-util: - specifier: 2.0.2 - version: 2.0.2 - blueimp-load-image: - specifier: 5.16.0 - version: 5.16.0 - blurhash: - specifier: 2.0.5 - version: 2.0.5 - buffer: - specifier: 6.0.3 - version: 6.0.3 - card-validator: - specifier: 10.0.3 - version: 10.0.3 - changedpi: - specifier: 1.0.4 - version: 1.0.4 - cirbuf: - specifier: 1.0.2 - version: 1.0.2 - classnames: - specifier: 2.5.1 - version: 2.5.1 - config: - specifier: 3.3.12 - version: 3.3.12 - copy-text-to-clipboard: - specifier: 2.1.0 - version: 2.1.0 - country-codes-list: - specifier: 2.0.0 - version: 2.0.0 - credit-card-type: - specifier: 10.0.2 - version: 10.0.2 - dashdash: - specifier: 2.0.0 - version: 2.0.0 - direction: - specifier: 1.0.4 - version: 1.0.4 - dom-accessibility-api: - specifier: 0.7.0 - version: 0.7.0 emoji-datasource: specifier: 16.0.0 version: 16.0.0 emoji-datasource-apple: specifier: 16.0.0 version: 16.0.0 - emoji-regex: - specifier: 10.4.0 - version: 10.4.0 - encoding: - specifier: 0.1.13 - version: 0.1.13 - fabric: - specifier: 4.6.0 - version: 4.6.0(patch_hash=259e6eff3d60c4a453f7815fca6aa0d3a81842f4efdc4051836812fc1e711e00) - fast-glob: - specifier: 3.3.2 - version: 3.3.2 - filesize: - specifier: 9.0.11 - version: 9.0.11 - firstline: - specifier: 2.0.2 - version: 2.0.2 - focus-trap-react: - specifier: 10.3.1 - version: 10.3.1(prop-types@15.8.1)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - form-data: - specifier: 4.0.1 - version: 4.0.1 fs-extra: specifier: 11.2.0 version: 11.2.0 - fuse.js: - specifier: 6.5.3 - version: 6.5.3 google-libphonenumber: specifier: 3.2.39 version: 3.2.39 got: specifier: 11.8.5 version: 11.8.5(patch_hash=cfe393dc1cca8970377087e9555a285d1121f75d57223ddd872b1a8d3f8c909b) - growing-file: - specifier: 0.1.3 - version: 0.1.3(patch_hash=1bb085e3fda38f2983114beedc229acf8b0c539736fe73e2e8183dab2df074b4) - heic-convert: - specifier: 2.1.0 - version: 2.1.0 - humanize-duration: - specifier: 3.27.1 - version: 3.27.1 intl-tel-input: specifier: 24.7.0 version: 24.7.0 - js-yaml: - specifier: 4.1.0 - version: 4.1.0 - linkify-it: - specifier: 5.0.0 - version: 5.0.0 - lodash: - specifier: 4.17.21 - version: 4.17.21 - lru-cache: - specifier: 11.0.2 - version: 11.0.2 - memoizee: - specifier: 0.4.17 - version: 0.4.17 - moment: - specifier: 2.30.1 - version: 2.30.1 - motion: - specifier: 12.35.1 - version: 12.35.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - mp4box: - specifier: 0.5.3 - version: 0.5.3 node-fetch: specifier: 2.6.7 version: 2.6.7(patch_hash=94385e2da301d6873723275386bb0c70da98cf56487f2431668d8fd79623818d)(encoding@0.1.13) - nop: - specifier: 1.0.0 - version: 1.0.0 - normalize-path: - specifier: 3.0.0 - version: 3.0.0 - p-map: - specifier: 7.0.4 - version: 7.0.4 - p-queue: - specifier: 6.6.2 - version: 6.6.2 - p-timeout: - specifier: 4.1.0 - version: 4.1.0 - parsecurrency: - specifier: 1.1.1 - version: 1.1.1 - pify: - specifier: 3.0.0 - version: 3.0.0 pino: specifier: 9.8.0 version: 9.8.0 proxy-agent: specifier: 6.4.0 version: 6.4.0 - qrcode-generator: - specifier: 1.4.4 - version: 1.4.4(patch_hash=1f10c592d849ed4cfc9f81301196d39857b79240997ef5772138218cb3717e80) - radix-ui: - specifier: 1.4.3 - version: 1.4.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - react: - specifier: 19.2.4 - version: 19.2.4 - react-aria: - specifier: 3.47.0 - version: 3.47.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - react-aria-components: - specifier: 1.16.0 - version: 1.16.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - react-blurhash: - specifier: 0.3.0 - version: 0.3.0(blurhash@2.0.5)(react@19.2.4) - react-dom: - specifier: 19.2.4 - version: 19.2.4(react@19.2.4) - react-intl: - specifier: 7.1.11 - version: 7.1.11(react@19.2.4)(typescript@5.9.3) - react-popper: - specifier: 2.3.0 - version: 2.3.0(@popperjs/core@2.11.8)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - react-redux: - specifier: 9.2.0 - version: 9.2.0(@types/react@19.2.14)(react@19.2.4)(redux@5.0.1) - react-virtualized: - specifier: 9.22.6 - version: 9.22.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - read-last-lines: - specifier: 1.8.0 - version: 1.8.0 - redux: - specifier: 5.0.1 - version: 5.0.1 - redux-logger: - specifier: 3.0.6 - version: 3.0.6 - redux-promise-middleware: - specifier: 6.2.0 - version: 6.2.0(redux@5.0.1) - redux-thunk: - specifier: 3.1.0 - version: 3.1.0(redux@5.0.1) - reselect: - specifier: 5.1.1 - version: 5.1.1 - semver: - specifier: 7.6.3 - version: 7.6.3 - split2: - specifier: 4.2.0 - version: 4.2.0 - tinykeys: - specifier: 3.0.0 - version: 3.0.0 - type-fest: - specifier: 4.26.1 - version: 4.26.1 - url: - specifier: 0.11.4 - version: 0.11.4 - urlpattern-polyfill: - specifier: 10.0.0 - version: 10.0.0 - uuid: - specifier: 11.0.2 - version: 11.0.2 - write-file-atomic: - specifier: 6.0.0 - version: 6.0.0 - zod: - specifier: 3.23.8 - version: 3.23.8(patch_hash=239818e5d88990616205c8cdc1de1660bf5e18b157d00c4a5f726dde6094af4d) devDependencies: '@babel/core': specifier: 7.26.0 @@ -413,6 +149,9 @@ importers: '@babel/preset-typescript': specifier: 7.26.0 version: 7.26.0(@babel/core@7.26.0) + '@electron/asar': + specifier: 3.4.1 + version: 3.4.1 '@electron/fuses': specifier: 1.5.0 version: 1.5.0 @@ -422,21 +161,69 @@ importers: '@electron/symbolicate-mac': specifier: 2.3.1 version: 2.3.1 + '@formatjs/fast-memoize': + specifier: 2.2.3 + version: 2.2.3 + '@formatjs/icu-messageformat-parser': + specifier: 2.9.3 + version: 2.9.3 '@formatjs/intl': specifier: 2.10.14 version: 2.10.14(typescript@5.9.3) + '@formatjs/intl-localematcher': + specifier: 0.2.32 + version: 0.2.32 + '@indutny/dicer': + specifier: 0.3.2 + version: 0.3.2 '@indutny/parallel-prettier': specifier: 3.0.0 version: 3.0.0(prettier@3.7.4) + '@indutny/protopiler': + specifier: 3.2.4 + version: 3.2.4 + '@indutny/range-finder': + specifier: 1.3.4 + version: 1.3.4 '@indutny/rezip-electron': specifier: 3.0.2 version: 3.0.2 + '@indutny/sneequals': + specifier: 4.0.0 + version: 4.0.0 + '@internationalized/date': + specifier: 3.12.0 + version: 3.12.0 '@napi-rs/canvas': specifier: 0.1.61 version: 0.1.61(patch_hash=d232c1154bffd88fa8df40fc91dc36098b29aba725d826c24ce74cfac7803919) + '@popperjs/core': + specifier: 2.11.8 + version: 2.11.8 + '@react-aria/focus': + specifier: 3.21.5 + version: 3.21.5(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + '@react-aria/interactions': + specifier: 3.27.1 + version: 3.27.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + '@react-aria/utils': + specifier: 3.33.1 + version: 3.33.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + '@react-spring/web': + specifier: 10.0.3 + version: 10.0.3(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + '@react-types/shared': + specifier: 3.33.1 + version: 3.33.1(react@19.2.4) + '@signalapp/minimask': + specifier: 1.0.1 + version: 1.0.1 '@signalapp/mock-server': specifier: 18.3.0 version: 18.3.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@signalapp/quill-cjs': + specifier: 2.1.2 + version: 2.1.2 '@storybook/addon-a11y': specifier: 8.4.4 version: 8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)) @@ -475,7 +262,7 @@ importers: version: 8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3) '@storybook/react-webpack5': specifier: 8.4.4 - version: 8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4) + version: 8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4) '@storybook/test': specifier: 8.4.4 version: 8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)) @@ -491,6 +278,9 @@ importers: '@tailwindcss/postcss': specifier: 4.1.7 version: 4.1.7 + '@tanstack/react-virtual': + specifier: 3.11.2 + version: 3.11.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4) '@types/blueimp-load-image': specifier: 5.16.6 version: 5.16.6 @@ -512,6 +302,12 @@ importers: '@types/direction': specifier: 1.0.0 version: 1.0.0 + '@types/dom-mediacapture-transform': + specifier: 0.1.11 + version: 0.1.11 + '@types/fabric': + specifier: 4.5.3 + version: 4.5.3(patch_hash=e5f339ecf72fbab1c91505e7713e127a7184bfe8164aa3a9afe9bf45a0ad6b89) '@types/fs-extra': specifier: 11.0.4 version: 11.0.4 @@ -614,6 +410,9 @@ importers: '@typescript-eslint/utils': specifier: 8.57.2 version: 8.57.2(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + '@typescript/native-preview': + specifier: 7.0.0-dev.20260303.1 + version: 7.0.0-dev.20260303.1 axe-core: specifier: 4.10.2 version: 4.10.2 @@ -629,6 +428,21 @@ importers: better-blockmap: specifier: 2.0.1 version: 2.0.1 + blob-util: + specifier: 2.0.2 + version: 2.0.2 + blueimp-load-image: + specifier: 5.16.0 + version: 5.16.0 + blurhash: + specifier: 2.0.5 + version: 2.0.5 + buffer: + specifier: 6.0.3 + version: 6.0.3 + card-validator: + specifier: 10.0.3 + version: 10.0.3 casual: specifier: 1.6.2 version: 1.6.2(patch_hash=b88b5052437cbdc1882137778b76ca5037f71b2a030ae9ef39dc97f51670d599) @@ -641,9 +455,30 @@ importers: chalk: specifier: 4.1.2 version: 4.1.2 + changedpi: + specifier: 1.0.4 + version: 1.0.4 chokidar-cli: specifier: 3.0.0 version: 3.0.0 + cirbuf: + specifier: 1.0.2 + version: 1.0.2 + classnames: + specifier: 2.5.1 + version: 2.5.1 + config: + specifier: 3.3.12 + version: 3.3.12 + copy-text-to-clipboard: + specifier: 2.1.0 + version: 2.1.0 + country-codes-list: + specifier: 2.0.0 + version: 2.0.0 + credit-card-type: + specifier: 10.0.2 + version: 10.0.2 cross-env: specifier: 7.0.3 version: 7.0.3 @@ -656,9 +491,18 @@ importers: danger: specifier: 12.3.3 version: 12.3.3(encoding@0.1.13) + dashdash: + specifier: 2.0.0 + version: 2.0.0 debug: specifier: 4.3.7 version: 4.3.7(supports-color@8.1.1) + direction: + specifier: 1.0.4 + version: 1.0.4 + dom-accessibility-api: + specifier: 0.7.0 + version: 0.7.0 electron: specifier: 40.8.5 version: 40.8.5 @@ -668,6 +512,12 @@ importers: electron-mocha: specifier: 13.0.1 version: 13.0.1 + emoji-regex: + specifier: 10.4.0 + version: 10.4.0 + encoding: + specifier: 0.1.13 + version: 0.1.13 endanger: specifier: 7.0.4 version: 7.0.4(danger@12.3.3(encoding@0.1.13)) @@ -677,9 +527,6 @@ importers: enquirer: specifier: 2.4.1 version: 2.4.1 - esbuild: - specifier: 0.25.9 - version: 0.25.9 eslint: specifier: 10.1.0 version: 10.1.0(jiti@2.6.1) @@ -689,21 +536,66 @@ importers: execa: specifier: 5.1.1 version: 5.1.1 + fabric: + specifier: 4.6.0 + version: 4.6.0(patch_hash=259e6eff3d60c4a453f7815fca6aa0d3a81842f4efdc4051836812fc1e711e00) + fast-glob: + specifier: 3.3.2 + version: 3.3.2 + filesize: + specifier: 9.0.11 + version: 9.0.11 + firstline: + specifier: 2.0.2 + version: 2.0.2 + focus-trap-react: + specifier: 10.3.1 + version: 10.3.1(prop-types@15.8.1)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + form-data: + specifier: 4.0.1 + version: 4.0.1 + fuse.js: + specifier: 6.5.3 + version: 6.5.3 + growing-file: + specifier: 0.1.3 + version: 0.1.3(patch_hash=1bb085e3fda38f2983114beedc229acf8b0c539736fe73e2e8183dab2df074b4) + heic-convert: + specifier: 2.1.0 + version: 2.1.0 html-webpack-plugin: specifier: 5.6.3 version: 5.6.3(webpack@5.96.1) http-server: specifier: 14.1.1 version: 14.1.1(debug@4.3.7) + humanize-duration: + specifier: 3.27.1 + version: 3.27.1 is-glob: specifier: 4.0.3 version: 4.0.3 + js-yaml: + specifier: 4.1.0 + version: 4.1.0 json-to-ast: specifier: 2.1.0 version: 2.1.0 + linkify-it: + specifier: 5.0.0 + version: 5.0.0 + lodash: + specifier: 4.17.21 + version: 4.17.21 log-symbols: specifier: 4.1.0 version: 4.1.0 + lru-cache: + specifier: 11.0.2 + version: 11.0.2 + memoizee: + specifier: 0.4.17 + version: 0.4.17 micromatch: specifier: 4.0.8 version: 4.0.8 @@ -713,12 +605,27 @@ importers: mocha: specifier: 10.8.2 version: 10.8.2 + moment: + specifier: 2.30.1 + version: 2.30.1 + motion: + specifier: 12.35.1 + version: 12.35.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + mp4box: + specifier: 0.5.3 + version: 0.5.3 node-gyp: specifier: 11.0.0 version: 11.0.0 node-gyp-build: specifier: 4.8.4 version: 4.8.4 + nop: + specifier: 1.0.0 + version: 1.0.0 + normalize-path: + specifier: 3.0.0 + version: 3.0.0 npm-run-all: specifier: 4.1.5 version: 4.1.5 @@ -731,9 +638,24 @@ importers: p-limit: specifier: 3.1.0 version: 3.1.0 + p-map: + specifier: 7.0.4 + version: 7.0.4 + p-queue: + specifier: 6.6.2 + version: 6.6.2 + p-timeout: + specifier: 4.1.0 + version: 4.1.0 + parsecurrency: + specifier: 1.1.1 + version: 1.1.1 pe-library: specifier: 2.0.1 version: 2.0.1 + pify: + specifier: 3.0.0 + version: 3.0.0 pixelmatch: specifier: 5.3.0 version: 5.3.0 @@ -755,24 +677,84 @@ importers: prettier-plugin-tailwindcss: specifier: 0.7.2 version: 0.7.2(prettier@3.7.4) + qrcode-generator: + specifier: 1.4.4 + version: 1.4.4(patch_hash=1f10c592d849ed4cfc9f81301196d39857b79240997ef5772138218cb3717e80) + radix-ui: + specifier: 1.4.3 + version: 1.4.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + react: + specifier: 19.2.4 + version: 19.2.4 + react-aria: + specifier: 3.47.0 + version: 3.47.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + react-aria-components: + specifier: 1.16.0 + version: 1.16.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + react-blurhash: + specifier: 0.3.0 + version: 0.3.0(blurhash@2.0.5)(react@19.2.4) react-devtools: specifier: 6.0.1 version: 6.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) react-devtools-core: specifier: 6.0.1 version: 6.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + react-dom: + specifier: 19.2.4 + version: 19.2.4(react@19.2.4) + react-intl: + specifier: 7.1.11 + version: 7.1.11(react@19.2.4)(typescript@5.9.3) + react-popper: + specifier: 2.3.0 + version: 2.3.0(@popperjs/core@2.11.8)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + react-redux: + specifier: 9.2.0 + version: 9.2.0(@types/react@19.2.14)(react@19.2.4)(redux@5.0.1) + react-virtualized: + specifier: 9.22.6 + version: 9.22.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + read-last-lines: + specifier: 1.8.0 + version: 1.8.0 + redux: + specifier: 5.0.1 + version: 5.0.1 + redux-logger: + specifier: 3.0.6 + version: 3.0.6 + redux-promise-middleware: + specifier: 6.2.0 + version: 6.2.0(redux@5.0.1) + redux-thunk: + specifier: 3.1.0 + version: 3.1.0(redux@5.0.1) + reselect: + specifier: 5.1.1 + version: 5.1.1 resolve-url-loader: specifier: 5.0.0 version: 5.0.0 + rolldown: + specifier: 1.0.0-rc.9 + version: 1.0.0-rc.9 sass: specifier: 1.80.7 version: 1.80.7 sass-loader: specifier: 16.0.3 version: 16.0.3(sass@1.80.7)(webpack@5.96.1) + semver: + specifier: 7.6.3 + version: 7.6.3 sinon: specifier: 19.0.2 version: 19.0.2 + split2: + specifier: 4.2.0 + version: 4.2.0 storybook: specifier: 8.4.4 version: 8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10) @@ -800,27 +782,51 @@ importers: tailwindcss: specifier: 4.2.1 version: 4.2.1 + terser: + specifier: 5.46.1 + version: 5.46.1 terser-webpack-plugin: specifier: 5.3.10 - version: 5.3.10(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack@5.96.1) - ts-node: - specifier: 10.9.2 - version: 10.9.2(@swc/core@1.10.16(@swc/helpers@0.5.15))(@types/node@24.12.0)(typescript@5.9.3) + version: 5.3.10(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack@5.96.1) + tinykeys: + specifier: 3.0.0 + version: 3.0.0 + tsx: + specifier: 4.21.0 + version: 4.21.0(patch_hash=251027c4cc25615da4cf5b54757ba1af5ecae4256a23772bcc2c1284f6aa1251) + type-fest: + specifier: 4.26.1 + version: 4.26.1 typescript: specifier: 5.9.3 version: 5.9.3 + url: + specifier: 0.11.4 + version: 0.11.4 + urlpattern-polyfill: + specifier: 10.0.0 + version: 10.0.0 + uuid: + specifier: 11.0.2 + version: 11.0.2 wait-on: specifier: 8.0.1 version: 8.0.1(debug@4.3.7) webpack: specifier: 5.96.1 - version: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + version: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-cli: specifier: 5.1.4 version: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.96.1) webpack-dev-server: specifier: 5.1.0 version: 5.1.0(bufferutil@4.0.9)(debug@4.3.7)(utf-8-validate@5.0.10)(webpack-cli@5.1.4)(webpack@5.96.1) + write-file-atomic: + specifier: 6.0.0 + version: 6.0.0 + zod: + specifier: 3.23.8 + version: 3.23.8(patch_hash=239818e5d88990616205c8cdc1de1660bf5e18b157d00c4a5f726dde6094af4d) optionalDependencies: fs-xattr: specifier: 0.3.0 @@ -1220,14 +1226,23 @@ packages: engines: {node: '>=14.14'} hasBin: true + '@emnapi/core@1.9.0': + resolution: {integrity: sha512-0DQ98G9ZQZOxfUcQn1waV2yS8aWdZ6kJMbYCJB3oUBecjWYO1fqJ+a1DRfPF3O5JEkwqwP1A9QEN/9mYm2Yd0w==} + + '@emnapi/runtime@1.9.0': + resolution: {integrity: sha512-QN75eB0IH2ywSpRpNddCRfQIhmJYBCJ1x5Lb3IscKAL8bMnVAKnRg8dCoXbHzVLLH7P38N2Z3mtulB7W0J0FKw==} + + '@emnapi/wasi-threads@1.2.0': + resolution: {integrity: sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==} + '@esbuild/aix-ppc64@0.24.0': resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.9': - resolution: {integrity: sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==} + '@esbuild/aix-ppc64@0.27.4': + resolution: {integrity: sha512-cQPwL2mp2nSmHHJlCyoXgHGhbEPMrEEU5xhkcy3Hs/O7nGZqEpZ2sUtLaL9MORLtDfRvVl2/3PAuEkYZH0Ty8Q==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -1238,8 +1253,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.9': - resolution: {integrity: sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==} + '@esbuild/android-arm64@0.27.4': + resolution: {integrity: sha512-gdLscB7v75wRfu7QSm/zg6Rx29VLdy9eTr2t44sfTW7CxwAtQghZ4ZnqHk3/ogz7xao0QAgrkradbBzcqFPasw==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -1250,8 +1265,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.9': - resolution: {integrity: sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==} + '@esbuild/android-arm@0.27.4': + resolution: {integrity: sha512-X9bUgvxiC8CHAGKYufLIHGXPJWnr0OCdR0anD2e21vdvgCI8lIfqFbnoeOz7lBjdrAGUhqLZLcQo6MLhTO2DKQ==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -1262,8 +1277,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.9': - resolution: {integrity: sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==} + '@esbuild/android-x64@0.27.4': + resolution: {integrity: sha512-PzPFnBNVF292sfpfhiyiXCGSn9HZg5BcAz+ivBuSsl6Rk4ga1oEXAamhOXRFyMcjwr2DVtm40G65N3GLeH1Lvw==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -1274,8 +1289,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.9': - resolution: {integrity: sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==} + '@esbuild/darwin-arm64@0.27.4': + resolution: {integrity: sha512-b7xaGIwdJlht8ZFCvMkpDN6uiSmnxxK56N2GDTMYPr2/gzvfdQN8rTfBsvVKmIVY/X7EM+/hJKEIbbHs9oA4tQ==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -1286,8 +1301,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.9': - resolution: {integrity: sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==} + '@esbuild/darwin-x64@0.27.4': + resolution: {integrity: sha512-sR+OiKLwd15nmCdqpXMnuJ9W2kpy0KigzqScqHI3Hqwr7IXxBp3Yva+yJwoqh7rE8V77tdoheRYataNKL4QrPw==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -1298,8 +1313,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.9': - resolution: {integrity: sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==} + '@esbuild/freebsd-arm64@0.27.4': + resolution: {integrity: sha512-jnfpKe+p79tCnm4GVav68A7tUFeKQwQyLgESwEAUzyxk/TJr4QdGog9sqWNcUbr/bZt/O/HXouspuQDd9JxFSw==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -1310,8 +1325,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.9': - resolution: {integrity: sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==} + '@esbuild/freebsd-x64@0.27.4': + resolution: {integrity: sha512-2kb4ceA/CpfUrIcTUl1wrP/9ad9Atrp5J94Lq69w7UwOMolPIGrfLSvAKJp0RTvkPPyn6CIWrNy13kyLikZRZQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -1322,8 +1337,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.9': - resolution: {integrity: sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==} + '@esbuild/linux-arm64@0.27.4': + resolution: {integrity: sha512-7nQOttdzVGth1iz57kxg9uCz57dxQLHWxopL6mYuYthohPKEK0vU0C3O21CcBK6KDlkYVcnDXY099HcCDXd9dA==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -1334,8 +1349,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.9': - resolution: {integrity: sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==} + '@esbuild/linux-arm@0.27.4': + resolution: {integrity: sha512-aBYgcIxX/wd5n2ys0yESGeYMGF+pv6g0DhZr3G1ZG4jMfruU9Tl1i2Z+Wnj9/KjGz1lTLCcorqE2viePZqj4Eg==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -1346,8 +1361,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.9': - resolution: {integrity: sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==} + '@esbuild/linux-ia32@0.27.4': + resolution: {integrity: sha512-oPtixtAIzgvzYcKBQM/qZ3R+9TEUd1aNJQu0HhGyqtx6oS7qTpvjheIWBbes4+qu1bNlo2V4cbkISr8q6gRBFA==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -1358,8 +1373,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.9': - resolution: {integrity: sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==} + '@esbuild/linux-loong64@0.27.4': + resolution: {integrity: sha512-8mL/vh8qeCoRcFH2nM8wm5uJP+ZcVYGGayMavi8GmRJjuI3g1v6Z7Ni0JJKAJW+m0EtUuARb6Lmp4hMjzCBWzA==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -1370,8 +1385,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.9': - resolution: {integrity: sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==} + '@esbuild/linux-mips64el@0.27.4': + resolution: {integrity: sha512-1RdrWFFiiLIW7LQq9Q2NES+HiD4NyT8Itj9AUeCl0IVCA459WnPhREKgwrpaIfTOe+/2rdntisegiPWn/r/aAw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -1382,8 +1397,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.9': - resolution: {integrity: sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==} + '@esbuild/linux-ppc64@0.27.4': + resolution: {integrity: sha512-tLCwNG47l3sd9lpfyx9LAGEGItCUeRCWeAx6x2Jmbav65nAwoPXfewtAdtbtit/pJFLUWOhpv0FpS6GQAmPrHA==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -1394,8 +1409,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.9': - resolution: {integrity: sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==} + '@esbuild/linux-riscv64@0.27.4': + resolution: {integrity: sha512-BnASypppbUWyqjd1KIpU4AUBiIhVr6YlHx/cnPgqEkNoVOhHg+YiSVxM1RLfiy4t9cAulbRGTNCKOcqHrEQLIw==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -1406,8 +1421,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.9': - resolution: {integrity: sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==} + '@esbuild/linux-s390x@0.27.4': + resolution: {integrity: sha512-+eUqgb/Z7vxVLezG8bVB9SfBie89gMueS+I0xYh2tJdw3vqA/0ImZJ2ROeWwVJN59ihBeZ7Tu92dF/5dy5FttA==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -1418,14 +1433,14 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.9': - resolution: {integrity: sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==} + '@esbuild/linux-x64@0.27.4': + resolution: {integrity: sha512-S5qOXrKV8BQEzJPVxAwnryi2+Iq5pB40gTEIT69BQONqR7JH1EPIcQ/Uiv9mCnn05jff9umq/5nqzxlqTOg9NA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.9': - resolution: {integrity: sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==} + '@esbuild/netbsd-arm64@0.27.4': + resolution: {integrity: sha512-xHT8X4sb0GS8qTqiwzHqpY00C95DPAq7nAwX35Ie/s+LO9830hrMd3oX0ZMKLvy7vsonee73x0lmcdOVXFzd6Q==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -1436,8 +1451,8 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.9': - resolution: {integrity: sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==} + '@esbuild/netbsd-x64@0.27.4': + resolution: {integrity: sha512-RugOvOdXfdyi5Tyv40kgQnI0byv66BFgAqjdgtAKqHoZTbTF2QqfQrFwa7cHEORJf6X2ht+l9ABLMP0dnKYsgg==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] @@ -1448,8 +1463,8 @@ packages: cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-arm64@0.25.9': - resolution: {integrity: sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==} + '@esbuild/openbsd-arm64@0.27.4': + resolution: {integrity: sha512-2MyL3IAaTX+1/qP0O1SwskwcwCoOI4kV2IBX1xYnDDqthmq5ArrW94qSIKCAuRraMgPOmG0RDTA74mzYNQA9ow==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -1460,14 +1475,14 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.9': - resolution: {integrity: sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==} + '@esbuild/openbsd-x64@0.27.4': + resolution: {integrity: sha512-u8fg/jQ5aQDfsnIV6+KwLOf1CmJnfu1ShpwqdwC0uA7ZPwFws55Ngc12vBdeUdnuWoQYx/SOQLGDcdlfXhYmXQ==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.25.9': - resolution: {integrity: sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==} + '@esbuild/openharmony-arm64@0.27.4': + resolution: {integrity: sha512-JkTZrl6VbyO8lDQO3yv26nNr2RM2yZzNrNHEsj9bm6dOwwu9OYN28CjzZkH57bh4w0I2F7IodpQvUAEd1mbWXg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] @@ -1478,8 +1493,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.9': - resolution: {integrity: sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==} + '@esbuild/sunos-x64@0.27.4': + resolution: {integrity: sha512-/gOzgaewZJfeJTlsWhvUEmUG4tWEY2Spp5M20INYRg2ZKl9QPO3QEEgPeRtLjEWSW8FilRNacPOg8R1uaYkA6g==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -1490,8 +1505,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.9': - resolution: {integrity: sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==} + '@esbuild/win32-arm64@0.27.4': + resolution: {integrity: sha512-Z9SExBg2y32smoDQdf1HRwHRt6vAHLXcxD2uGgO/v2jK7Y718Ix4ndsbNMU/+1Qiem9OiOdaqitioZwxivhXYg==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -1502,8 +1517,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.9': - resolution: {integrity: sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==} + '@esbuild/win32-ia32@0.27.4': + resolution: {integrity: sha512-DAyGLS0Jz5G5iixEbMHi5KdiApqHBWMGzTtMiJ72ZOLhbu/bzxgAe8Ue8CTS3n3HbIUHQz/L51yMdGMeoxXNJw==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -1514,8 +1529,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.9': - resolution: {integrity: sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==} + '@esbuild/win32-x64@0.27.4': + resolution: {integrity: sha512-+knoa0BDoeXgkNvvV1vvbZX4+hizelrkwmGJBdT17t8FNPwG2lKemmuMZlmaNQ3ws3DKKCxpb4zRZEIp3UxFCg==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -1950,6 +1965,9 @@ packages: resolution: {integrity: sha512-IJDok7OsGQ+Wd9QOWaOnFszw1mxNtJuynD+tBAhWMV6QJr7fWZx83eYS9xSl+3XR2tUa9oiHc44APcHBgdErmA==} engines: {node: '>= 10'} + '@napi-rs/wasm-runtime@1.1.1': + resolution: {integrity: sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2021,6 +2039,9 @@ packages: '@octokit/types@6.41.0': resolution: {integrity: sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==} + '@oxc-project/types@0.115.0': + resolution: {integrity: sha512-4n91DKnebUS4yjUHl2g3/b2T+IUdCfmoZGhmwsovZCDaJSs+QkVAM+0AqqTxHSsHfeiMuueT75cZaZcT/m0pSw==} + '@oxlint-tsgolint/darwin-arm64@0.17.4': resolution: {integrity: sha512-XEA7vl/T1+wiVnMq2MR6u5OYr2pwKHiAPgklxpK8tPrjQ1ci/amNmwI8ECn6TPXSCsC8SJsSN5xvzXm5H3dTfw==} cpu: [arm64] @@ -3579,6 +3600,104 @@ packages: resolution: {integrity: sha512-/KCsg3xSlR+nCK8/8ZYSknYxvXHwubJrU82F3Lm1Fp6789VQ0/3RJKfsmRXjqfaTA++23CvC3hqmqe/2GEt6Kw==} engines: {node: '>=14'} + '@rolldown/binding-android-arm64@1.0.0-rc.9': + resolution: {integrity: sha512-lcJL0bN5hpgJfSIz/8PIf02irmyL43P+j1pTCfbD1DbLkmGRuFIA4DD3B3ZOvGqG0XiVvRznbKtN0COQVaKUTg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.0.0-rc.9': + resolution: {integrity: sha512-J7Zk3kLYFsLtuH6U+F4pS2sYVzac0qkjcO5QxHS7OS7yZu2LRs+IXo+uvJ/mvpyUljDJ3LROZPoQfgBIpCMhdQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.0-rc.9': + resolution: {integrity: sha512-iwtmmghy8nhfRGeNAIltcNXzD0QMNaaA5U/NyZc1Ia4bxrzFByNMDoppoC+hl7cDiUq5/1CnFthpT9n+UtfFyg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.0-rc.9': + resolution: {integrity: sha512-DLFYI78SCiZr5VvdEplsVC2Vx53lnA4/Ga5C65iyldMVaErr86aiqCoNBLl92PXPfDtUYjUh+xFFor40ueNs4Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.9': + resolution: {integrity: sha512-CsjTmTwd0Hri6iTw/DRMK7kOZ7FwAkrO4h8YWKoX/kcj833e4coqo2wzIFywtch/8Eb5enQ/lwLM7w6JX1W5RQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-2x9O2JbSPxpxMDhP9Z74mahAStibTlrBMW0520+epJH5sac7/LwZW5Bmg/E6CXuEF53JJFW509uP+lSedaUNxg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.9': + resolution: {integrity: sha512-JA1QRW31ogheAIRhIg9tjMfsYbglXXYGNPLdPEYrwFxdbkQCAzvpSCSHCDWNl4hTtrol8WeboCSEpjdZK8qrCg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-aOKU9dJheda8Kj8Y3w9gnt9QFOO+qKPAl8SWd7JPHP+Cu0EuDAE5wokQubLzIDQWg2myXq2XhTpOVS07qqvT+w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-OalO94fqj7IWRn3VdXWty75jC5dk4C197AWEuMhIpvVv2lw9fiPhud0+bW2ctCxb3YoBZor71QHbY+9/WToadA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-cVEl1vZtBsBZna3YMjGXNvnYYrOJ7RzuWvZU0ffvJUexWkukMaDuGhUXn0rjnV0ptzGVkvc+vW9Yqy6h8YX4pg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.0.0-rc.9': + resolution: {integrity: sha512-UzYnKCIIc4heAKgI4PZ3dfBGUZefGCJ1TPDuLHoCzgrMYPb5Rv6TLFuYtyM4rWyHM7hymNdsg5ik2C+UD9VDbA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.0.0-rc.9': + resolution: {integrity: sha512-+6zoiF+RRyf5cdlFQP7nm58mq7+/2PFaY2DNQeD4B87N36JzfF/l9mdBkkmTvSYcYPE8tMh/o3cRlsx1ldLfog==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.0.0-rc.9': + resolution: {integrity: sha512-rgFN6sA/dyebil3YTlL2evvi/M+ivhfnyxec7AccTpRPccno/rPoNlqybEZQBkcbZu8Hy+eqNJCqfBR8P7Pg8g==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.9': + resolution: {integrity: sha512-lHVNUG/8nlF1IQk1C0Ci574qKYyty2goMiPlRqkC5R+3LkXDkL5Dhx8ytbxq35m+pkHVIvIxviD+TWLdfeuadA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.9': + resolution: {integrity: sha512-G0oA4+w1iY5AGi5HcDTxWsoxF509hrFIPB2rduV5aDqS9FtDg1CAfa7V34qImbjfhIcA8C+RekocJZA96EarwQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.0-rc.9': + resolution: {integrity: sha512-w6oiRWgEBl04QkFZgmW+jnU1EC9b57Oihi2ot3HNWIQRqgHp5PnYDia5iZ5FF7rpa4EQdiqMDXjlqKGXBhsoXw==} + '@sideway/address@4.1.5': resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==} @@ -4066,6 +4185,9 @@ packages: resolution: {integrity: sha512-2crDHBKX0hKZfQXgTF5QIQSccg5fzn8L+oxpVRWAuBbeAdAkBIm4zVXV/LfyuQ1FO5zXW7iV/BI9zNWG5merHQ==} engines: {node: '>=16'} + '@tybys/wasm-util@0.10.1': + resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} + '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} @@ -6098,8 +6220,8 @@ packages: engines: {node: '>=18'} hasBin: true - esbuild@0.25.9: - resolution: {integrity: sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==} + esbuild@0.27.4: + resolution: {integrity: sha512-Rq4vbHnYkK5fws5NF7MYTU68FPRE1ajX7heQ/8QXXWqNgqqJ/GkmmyxIzUnf2Sr/bakf8l54716CcMGHYhMrrQ==} engines: {node: '>=18'} hasBin: true @@ -6616,6 +6738,9 @@ packages: resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} + get-tsconfig@4.13.6: + resolution: {integrity: sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==} + get-uri@6.0.4: resolution: {integrity: sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==} engines: {node: '>= 14'} @@ -9369,6 +9494,9 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + resolve-url-loader@5.0.0: resolution: {integrity: sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==} engines: {node: '>=12'} @@ -9415,6 +9543,11 @@ packages: resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} engines: {node: '>=8.0'} + rolldown@1.0.0-rc.9: + resolution: {integrity: sha512-9EbgWge7ZH+yqb4d2EnELAntgPTWbfL8ajiTW+SyhJEC4qhBbkCKbqFV4Ge4zmu5ziQuVbWxb/XwLZ+RIO7E8Q==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + run-applescript@7.0.0: resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==} engines: {node: '>=18'} @@ -10027,8 +10160,8 @@ packages: uglify-js: optional: true - terser@5.39.0: - resolution: {integrity: sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==} + terser@5.46.1: + resolution: {integrity: sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ==} engines: {node: '>=10'} hasBin: true @@ -10179,6 +10312,11 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsx@4.21.0: + resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==} + engines: {node: '>=18.0.0'} + hasBin: true + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -11158,6 +11296,7 @@ snapshots: '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 + optional: true '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': dependencies: @@ -11308,154 +11447,170 @@ snapshots: - supports-color optional: true + '@emnapi/core@1.9.0': + dependencies: + '@emnapi/wasi-threads': 1.2.0 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.9.0': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.0': + dependencies: + tslib: 2.8.1 + optional: true + '@esbuild/aix-ppc64@0.24.0': optional: true - '@esbuild/aix-ppc64@0.25.9': + '@esbuild/aix-ppc64@0.27.4': optional: true '@esbuild/android-arm64@0.24.0': optional: true - '@esbuild/android-arm64@0.25.9': + '@esbuild/android-arm64@0.27.4': optional: true '@esbuild/android-arm@0.24.0': optional: true - '@esbuild/android-arm@0.25.9': + '@esbuild/android-arm@0.27.4': optional: true '@esbuild/android-x64@0.24.0': optional: true - '@esbuild/android-x64@0.25.9': + '@esbuild/android-x64@0.27.4': optional: true '@esbuild/darwin-arm64@0.24.0': optional: true - '@esbuild/darwin-arm64@0.25.9': + '@esbuild/darwin-arm64@0.27.4': optional: true '@esbuild/darwin-x64@0.24.0': optional: true - '@esbuild/darwin-x64@0.25.9': + '@esbuild/darwin-x64@0.27.4': optional: true '@esbuild/freebsd-arm64@0.24.0': optional: true - '@esbuild/freebsd-arm64@0.25.9': + '@esbuild/freebsd-arm64@0.27.4': optional: true '@esbuild/freebsd-x64@0.24.0': optional: true - '@esbuild/freebsd-x64@0.25.9': + '@esbuild/freebsd-x64@0.27.4': optional: true '@esbuild/linux-arm64@0.24.0': optional: true - '@esbuild/linux-arm64@0.25.9': + '@esbuild/linux-arm64@0.27.4': optional: true '@esbuild/linux-arm@0.24.0': optional: true - '@esbuild/linux-arm@0.25.9': + '@esbuild/linux-arm@0.27.4': optional: true '@esbuild/linux-ia32@0.24.0': optional: true - '@esbuild/linux-ia32@0.25.9': + '@esbuild/linux-ia32@0.27.4': optional: true '@esbuild/linux-loong64@0.24.0': optional: true - '@esbuild/linux-loong64@0.25.9': + '@esbuild/linux-loong64@0.27.4': optional: true '@esbuild/linux-mips64el@0.24.0': optional: true - '@esbuild/linux-mips64el@0.25.9': + '@esbuild/linux-mips64el@0.27.4': optional: true '@esbuild/linux-ppc64@0.24.0': optional: true - '@esbuild/linux-ppc64@0.25.9': + '@esbuild/linux-ppc64@0.27.4': optional: true '@esbuild/linux-riscv64@0.24.0': optional: true - '@esbuild/linux-riscv64@0.25.9': + '@esbuild/linux-riscv64@0.27.4': optional: true '@esbuild/linux-s390x@0.24.0': optional: true - '@esbuild/linux-s390x@0.25.9': + '@esbuild/linux-s390x@0.27.4': optional: true '@esbuild/linux-x64@0.24.0': optional: true - '@esbuild/linux-x64@0.25.9': + '@esbuild/linux-x64@0.27.4': optional: true - '@esbuild/netbsd-arm64@0.25.9': + '@esbuild/netbsd-arm64@0.27.4': optional: true '@esbuild/netbsd-x64@0.24.0': optional: true - '@esbuild/netbsd-x64@0.25.9': + '@esbuild/netbsd-x64@0.27.4': optional: true '@esbuild/openbsd-arm64@0.24.0': optional: true - '@esbuild/openbsd-arm64@0.25.9': + '@esbuild/openbsd-arm64@0.27.4': optional: true '@esbuild/openbsd-x64@0.24.0': optional: true - '@esbuild/openbsd-x64@0.25.9': + '@esbuild/openbsd-x64@0.27.4': optional: true - '@esbuild/openharmony-arm64@0.25.9': + '@esbuild/openharmony-arm64@0.27.4': optional: true '@esbuild/sunos-x64@0.24.0': optional: true - '@esbuild/sunos-x64@0.25.9': + '@esbuild/sunos-x64@0.27.4': optional: true '@esbuild/win32-arm64@0.24.0': optional: true - '@esbuild/win32-arm64@0.25.9': + '@esbuild/win32-arm64@0.27.4': optional: true '@esbuild/win32-ia32@0.24.0': optional: true - '@esbuild/win32-ia32@0.25.9': + '@esbuild/win32-ia32@0.27.4': optional: true '@esbuild/win32-x64@0.24.0': optional: true - '@esbuild/win32-x64@0.25.9': + '@esbuild/win32-x64@0.27.4': optional: true '@eslint-community/eslint-utils@4.9.1(eslint@10.1.0(jiti@2.6.1))': @@ -11956,6 +12111,7 @@ snapshots: dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 + optional: true '@jsonjoy.com/base64@1.1.2(tslib@2.8.1)': dependencies: @@ -12027,6 +12183,13 @@ snapshots: '@napi-rs/canvas-linux-x64-musl': 0.1.61 '@napi-rs/canvas-win32-x64-msvc': 0.1.61 + '@napi-rs/wasm-runtime@1.1.1': + dependencies: + '@emnapi/core': 1.9.0 + '@emnapi/runtime': 1.9.0 + '@tybys/wasm-util': 0.10.1 + optional: true + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -12140,6 +12303,8 @@ snapshots: dependencies: '@octokit/openapi-types': 12.11.0 + '@oxc-project/types@0.115.0': {} + '@oxlint-tsgolint/darwin-arm64@0.17.4': optional: true @@ -14113,6 +14278,55 @@ snapshots: yallist: 4.0.0 optional: true + '@rolldown/binding-android-arm64@1.0.0-rc.9': + optional: true + + '@rolldown/binding-darwin-arm64@1.0.0-rc.9': + optional: true + + '@rolldown/binding-darwin-x64@1.0.0-rc.9': + optional: true + + '@rolldown/binding-freebsd-x64@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-x64-musl@1.0.0-rc.9': + optional: true + + '@rolldown/binding-openharmony-arm64@1.0.0-rc.9': + optional: true + + '@rolldown/binding-wasm32-wasi@1.0.0-rc.9': + dependencies: + '@napi-rs/wasm-runtime': 1.1.1 + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.9': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.9': + optional: true + + '@rolldown/pluginutils@1.0.0-rc.9': {} + '@sideway/address@4.1.5': dependencies: '@hapi/hoek': 9.3.0 @@ -14274,7 +14488,7 @@ snapshots: - '@swc/helpers' - webpack - '@storybook/builder-webpack5@8.4.4(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4)': + '@storybook/builder-webpack5@8.4.4(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4)': dependencies: '@storybook/core-webpack': 8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)) '@types/node': 22.19.1 @@ -14293,12 +14507,12 @@ snapshots: semver: 7.6.3 storybook: 8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10) style-loader: 3.3.4(webpack@5.96.1) - terser-webpack-plugin: 5.3.10(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack@5.96.1) + terser-webpack-plugin: 5.3.10(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack@5.96.1) ts-dedent: 2.2.0 url: 0.11.4 util: 0.12.5 util-deprecate: 1.0.2 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-dev-middleware: 6.1.3(webpack@5.96.1) webpack-hot-middleware: 2.26.1 webpack-virtual-modules: 0.6.2 @@ -14374,7 +14588,7 @@ snapshots: dependencies: storybook: 8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10) - '@storybook/preset-react-webpack@8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4)': + '@storybook/preset-react-webpack@8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4)': dependencies: '@storybook/core-webpack': 8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)) '@storybook/react': 8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3) @@ -14390,7 +14604,7 @@ snapshots: semver: 7.6.3 storybook: 8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10) tsconfig-paths: 4.2.0 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: @@ -14415,7 +14629,7 @@ snapshots: react-docgen-typescript: 2.2.2(typescript@5.9.3) tslib: 2.8.1 typescript: 5.9.3 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) transitivePeerDependencies: - supports-color @@ -14425,10 +14639,10 @@ snapshots: react-dom: 19.2.4(react@19.2.4) storybook: 8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10) - '@storybook/react-webpack5@8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4)': + '@storybook/react-webpack5@8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4)': dependencies: - '@storybook/builder-webpack5': 8.4.4(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4) - '@storybook/preset-react-webpack': 8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4) + '@storybook/builder-webpack5': 8.4.4(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4) + '@storybook/preset-react-webpack': 8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3)(webpack-cli@5.1.4) '@storybook/react': 8.4.4(@storybook/test@8.4.4(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10)))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(storybook@8.4.4(bufferutil@4.0.9)(prettier@3.7.4)(utf-8-validate@5.0.10))(typescript@5.9.3) '@types/node': 22.19.1 react: 19.2.4 @@ -14702,13 +14916,17 @@ snapshots: '@trysound/sax@0.2.0': {} - '@tsconfig/node10@1.0.11': {} + '@tsconfig/node10@1.0.11': + optional: true - '@tsconfig/node12@1.0.11': {} + '@tsconfig/node12@1.0.11': + optional: true - '@tsconfig/node14@1.0.3': {} + '@tsconfig/node14@1.0.3': + optional: true - '@tsconfig/node16@1.0.4': {} + '@tsconfig/node16@1.0.4': + optional: true '@tus/file-store@1.5.1': dependencies: @@ -14732,6 +14950,11 @@ snapshots: '@tus/utils@0.5.1': {} + '@tybys/wasm-util@0.10.1': + dependencies: + tslib: 2.8.1 + optional: true + '@types/aria-query@5.0.4': {} '@types/babel__core@7.20.5': @@ -15376,17 +15599,17 @@ snapshots: '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.96.1) '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.96.1) '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack-dev-server@5.1.0)(webpack@5.96.1)': dependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.96.1) optionalDependencies: webpack-dev-server: 5.1.0(bufferutil@4.0.9)(debug@4.3.7)(utf-8-validate@5.0.10)(webpack-cli@5.1.4)(webpack@5.96.1) @@ -15416,7 +15639,8 @@ snapshots: acorn-walk@8.3.4: dependencies: - acorn: 8.14.0 + acorn: 8.16.0 + optional: true acorn@8.14.0: {} @@ -15563,7 +15787,8 @@ snapshots: arg@4.1.0: {} - arg@4.1.3: {} + arg@4.1.3: + optional: true argparse@1.0.10: dependencies: @@ -15672,7 +15897,7 @@ snapshots: '@babel/core': 7.26.0 find-cache-dir: 4.0.0 schema-utils: 4.3.0 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) babel-plugin-istanbul@6.1.1: dependencies: @@ -16359,7 +16584,8 @@ snapshots: - supports-color - ts-node - create-require@1.1.1: {} + create-require@1.1.1: + optional: true credit-card-type@10.0.2: {} @@ -16405,7 +16631,7 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.6.3 optionalDependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) css-loader@7.1.2(webpack@5.96.1): dependencies: @@ -16418,7 +16644,7 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.6.3 optionalDependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) css-select@4.3.0: dependencies: @@ -16658,7 +16884,8 @@ snapshots: diff-sequences@29.6.3: {} - diff@4.0.2: {} + diff@4.0.2: + optional: true diff@5.2.0: {} @@ -17124,34 +17351,34 @@ snapshots: '@esbuild/win32-ia32': 0.24.0 '@esbuild/win32-x64': 0.24.0 - esbuild@0.25.9: + esbuild@0.27.4: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.9 - '@esbuild/android-arm': 0.25.9 - '@esbuild/android-arm64': 0.25.9 - '@esbuild/android-x64': 0.25.9 - '@esbuild/darwin-arm64': 0.25.9 - '@esbuild/darwin-x64': 0.25.9 - '@esbuild/freebsd-arm64': 0.25.9 - '@esbuild/freebsd-x64': 0.25.9 - '@esbuild/linux-arm': 0.25.9 - '@esbuild/linux-arm64': 0.25.9 - '@esbuild/linux-ia32': 0.25.9 - '@esbuild/linux-loong64': 0.25.9 - '@esbuild/linux-mips64el': 0.25.9 - '@esbuild/linux-ppc64': 0.25.9 - '@esbuild/linux-riscv64': 0.25.9 - '@esbuild/linux-s390x': 0.25.9 - '@esbuild/linux-x64': 0.25.9 - '@esbuild/netbsd-arm64': 0.25.9 - '@esbuild/netbsd-x64': 0.25.9 - '@esbuild/openbsd-arm64': 0.25.9 - '@esbuild/openbsd-x64': 0.25.9 - '@esbuild/openharmony-arm64': 0.25.9 - '@esbuild/sunos-x64': 0.25.9 - '@esbuild/win32-arm64': 0.25.9 - '@esbuild/win32-ia32': 0.25.9 - '@esbuild/win32-x64': 0.25.9 + '@esbuild/aix-ppc64': 0.27.4 + '@esbuild/android-arm': 0.27.4 + '@esbuild/android-arm64': 0.27.4 + '@esbuild/android-x64': 0.27.4 + '@esbuild/darwin-arm64': 0.27.4 + '@esbuild/darwin-x64': 0.27.4 + '@esbuild/freebsd-arm64': 0.27.4 + '@esbuild/freebsd-x64': 0.27.4 + '@esbuild/linux-arm': 0.27.4 + '@esbuild/linux-arm64': 0.27.4 + '@esbuild/linux-ia32': 0.27.4 + '@esbuild/linux-loong64': 0.27.4 + '@esbuild/linux-mips64el': 0.27.4 + '@esbuild/linux-ppc64': 0.27.4 + '@esbuild/linux-riscv64': 0.27.4 + '@esbuild/linux-s390x': 0.27.4 + '@esbuild/linux-x64': 0.27.4 + '@esbuild/netbsd-arm64': 0.27.4 + '@esbuild/netbsd-x64': 0.27.4 + '@esbuild/openbsd-arm64': 0.27.4 + '@esbuild/openbsd-x64': 0.27.4 + '@esbuild/openharmony-arm64': 0.27.4 + '@esbuild/sunos-x64': 0.27.4 + '@esbuild/win32-arm64': 0.27.4 + '@esbuild/win32-ia32': 0.27.4 + '@esbuild/win32-x64': 0.27.4 escalade@3.2.0: {} @@ -17589,7 +17816,7 @@ snapshots: semver: 7.6.3 tapable: 2.2.1 typescript: 5.9.3 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) form-data@4.0.1: dependencies: @@ -17736,6 +17963,10 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.7 + get-tsconfig@4.13.6: + dependencies: + resolve-pkg-maps: 1.0.0 + get-uri@6.0.4: dependencies: basic-ftp: 5.0.5 @@ -17979,7 +18210,7 @@ snapshots: he: 1.2.0 param-case: 3.0.4 relateurl: 0.2.7 - terser: 5.39.0 + terser: 5.46.1 html-tags@3.3.1: {} @@ -17991,7 +18222,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) htmlparser2@3.10.1: dependencies: @@ -19256,7 +19487,8 @@ snapshots: dependencies: semver: 7.6.3 - make-error@1.3.6: {} + make-error@1.3.6: + optional: true make-fetch-happen@10.2.1: dependencies: @@ -19516,7 +19748,7 @@ snapshots: dependencies: schema-utils: 4.3.0 tapable: 2.2.1 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) minimalistic-assert@1.0.1: {} @@ -20230,7 +20462,7 @@ snapshots: postcss: 8.5.3 semver: 7.6.3 optionalDependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) transitivePeerDependencies: - typescript @@ -20947,6 +21179,8 @@ snapshots: resolve-from@5.0.0: {} + resolve-pkg-maps@1.0.0: {} + resolve-url-loader@5.0.0: dependencies: adjust-sourcemap-loader: 4.0.0 @@ -20996,6 +21230,27 @@ snapshots: sprintf-js: 1.1.3 optional: true + rolldown@1.0.0-rc.9: + dependencies: + '@oxc-project/types': 0.115.0 + '@rolldown/pluginutils': 1.0.0-rc.9 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.0-rc.9 + '@rolldown/binding-darwin-arm64': 1.0.0-rc.9 + '@rolldown/binding-darwin-x64': 1.0.0-rc.9 + '@rolldown/binding-freebsd-x64': 1.0.0-rc.9 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.9 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.9 + '@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-x64-musl': 1.0.0-rc.9 + '@rolldown/binding-openharmony-arm64': 1.0.0-rc.9 + '@rolldown/binding-wasm32-wasi': 1.0.0-rc.9 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.9 + '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.9 + run-applescript@7.0.0: {} run-parallel@1.2.0: @@ -21046,7 +21301,7 @@ snapshots: neo-async: 2.6.2 optionalDependencies: sass: 1.80.7 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) sass@1.80.7: dependencies: @@ -21507,11 +21762,11 @@ snapshots: style-loader@3.3.4(webpack@5.96.1): dependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) style-loader@4.0.0(webpack@5.96.1): dependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) stylelint-config-css-modules@4.4.0(stylelint@16.10.0(typescript@5.9.3)): dependencies: @@ -21638,7 +21893,7 @@ snapshots: dependencies: '@swc/core': 1.10.16(@swc/helpers@0.5.15) '@swc/counter': 0.1.3 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) synckit@0.11.11: dependencies: @@ -21712,22 +21967,22 @@ snapshots: dependencies: execa: 0.7.0 - terser-webpack-plugin@5.3.10(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack@5.96.1): + terser-webpack-plugin@5.3.10(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack@5.96.1): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 - terser: 5.39.0 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + terser: 5.46.1 + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) optionalDependencies: '@swc/core': 1.10.16(@swc/helpers@0.5.15) - esbuild: 0.25.9 + esbuild: 0.24.0 - terser@5.39.0: + terser@5.46.1: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.14.0 + acorn: 8.16.0 commander: 2.20.3 source-map-support: 0.5.21 @@ -21842,7 +22097,7 @@ snapshots: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 '@types/node': 24.12.0 - acorn: 8.14.0 + acorn: 8.16.0 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 @@ -21853,6 +22108,7 @@ snapshots: yn: 3.1.1 optionalDependencies: '@swc/core': 1.10.16(@swc/helpers@0.5.15) + optional: true tsconfig-paths-webpack-plugin@4.2.0: dependencies: @@ -21871,6 +22127,13 @@ snapshots: tslib@2.8.1: {} + tsx@4.21.0(patch_hash=251027c4cc25615da4cf5b54757ba1af5ecae4256a23772bcc2c1284f6aa1251): + dependencies: + esbuild: 0.27.4 + get-tsconfig: 4.13.6 + optionalDependencies: + fsevents: 2.3.3 + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -22111,7 +22374,8 @@ snapshots: uuid@9.0.1: {} - v8-compile-cache-lib@3.0.1: {} + v8-compile-cache-lib@3.0.1: + optional: true v8-to-istanbul@9.3.0: dependencies: @@ -22214,7 +22478,7 @@ snapshots: import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-merge: 5.10.0 optionalDependencies: webpack-dev-server: 5.1.0(bufferutil@4.0.9)(debug@4.3.7)(utf-8-validate@5.0.10)(webpack-cli@5.1.4)(webpack@5.96.1) @@ -22227,7 +22491,7 @@ snapshots: range-parser: 1.2.1 schema-utils: 4.3.0 optionalDependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-dev-middleware@7.4.2(webpack@5.96.1): dependencies: @@ -22238,7 +22502,7 @@ snapshots: range-parser: 1.2.1 schema-utils: 4.3.0 optionalDependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-dev-server@5.1.0(bufferutil@4.0.9)(debug@4.3.7)(utf-8-validate@5.0.10)(webpack-cli@5.1.4)(webpack@5.96.1): dependencies: @@ -22271,7 +22535,7 @@ snapshots: webpack-dev-middleware: 7.4.2(webpack@5.96.1) ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: - webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4) + webpack: 5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.96.1) transitivePeerDependencies: - bufferutil @@ -22295,7 +22559,7 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack-cli@5.1.4): + webpack@5.96.1(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack-cli@5.1.4): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -22317,7 +22581,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.25.9)(webpack@5.96.1) + terser-webpack-plugin: 5.3.10(@swc/core@1.10.16(@swc/helpers@0.5.15))(esbuild@0.24.0)(webpack@5.96.1) watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: @@ -22578,7 +22842,8 @@ snapshots: buffer-crc32: 0.2.13 pend: 1.2.0 - yn@3.1.1: {} + yn@3.1.1: + optional: true yocto-queue@0.1.0: {} diff --git a/preload.wrapper.ts b/preload.wrapper.ts index b34f4df3aa..3631d6cfa6 100644 --- a/preload.wrapper.ts +++ b/preload.wrapper.ts @@ -6,8 +6,10 @@ import { join } from 'node:path'; import { Script, constants } from 'node:vm'; import { ipcRenderer } from 'electron'; -const srcPath = join(__dirname, 'preload.bundle.js'); -const cachePath = join(__dirname, 'preload.bundle.cache'); +// This file is in root dir, but the bundled file that we run is in +// bundles/preload +const srcPath = join(__dirname, 'main.js'); +const cachePath = join(__dirname, '..', '..', 'preload.bundle.cache'); let cachedData: Buffer | undefined; try { @@ -40,7 +42,7 @@ const filename = process.env.GENERATE_PRELOAD_CACHE : srcPath; const script = new Script( - `(function(require, __dirname){${source.toString()}})`, + `(function(require, __dirname, exports){${source.toString()}})`, { filename, lineOffset: 0, @@ -63,13 +65,13 @@ const fn = script.runInThisContext({ if (process.env.GENERATE_PRELOAD_CACHE) { // Use hottest cache possible in CI if (process.env.CI) { - fn(require, __dirname); + fn(require, __dirname, {}); window.startApp(); } writeFileSync(cachePath, script.createCachedData()); ipcRenderer.send('shutdown'); } else { - fn(require, __dirname); + fn(require, __dirname, {}); window.SignalCI?.setPreloadCacheHit( cachedData != null && !cachedDataRejected ); diff --git a/rolldown.config.ts b/rolldown.config.ts new file mode 100644 index 0000000000..6b98b42755 --- /dev/null +++ b/rolldown.config.ts @@ -0,0 +1,142 @@ +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +import { rmSync } from 'node:fs'; +import { join } from 'node:path'; +import { defineConfig } from 'rolldown'; + +const external = [ + // Native libraries + '@signalapp/libsignal-client', + /^@signalapp\/libsignal-client\/.*/, + '@signalapp/ringrtc', + '@signalapp/sqlcipher', + '@signalapp/mute-state-change', + '@signalapp/windows-ucv', + '@indutny/simple-windows-notifications', + '@indutny/mac-screen-share', + '@napi-rs/canvas', + 'electron', + 'fs-xattr', + 'fsevents', + 'mac-screen-capture-permissions', + 'sass', + + // Things that don't bundle well + 'got', + 'node-fetch', + 'pino', + 'proxy-agent', + + // Large libraries (3.7mb total) + // See: https://esbuild.github.io/api/#analyze + 'emoji-datasource', + 'google-libphonenumber', + + // Imported, but not used in production builds + 'mocha', + + // Electron's internal module + 'original-fs', + + // Uses fast-glob and dynamic requires + './preload_test.preload.ts', +]; + +const isProd = process.argv.some(arg => arg === '--minify'); + +const transform = { + define: { + 'process.env.NODE_ENV': isProd ? '"production"' : '"development"', + 'process.env.IS_BUNDLED': 'true', + }, +}; + +const nonIsolated = { + // Preloads + 'preload/wrapper': 'preload.wrapper.ts', + 'preload/main': 'ts/windows/main/preload.preload.ts', + + // Workers + 'workers/sql': 'ts/sql/mainWorker.node.ts', + 'workers/heic': 'ts/workers/heicConverterWorker.node.ts', +}; + +const contextIsolated = { + // Preload + 'preload/about': 'ts/windows/about/preload.preload.ts', + 'preload/calldiagnostic': 'ts/windows/calldiagnostic/preload.preload.ts', + 'preload/debuglog': 'ts/windows/debuglog/preload.preload.ts', + 'preload/permissions': 'ts/windows/permissions/preload.preload.ts', + 'preload/screenShare': 'ts/windows/screenShare/preload.preload.ts', + 'preload/sticker-creator': 'ts/windows/sticker-creator/preload.preload.ts', + + // DOM + 'dom/about': 'ts/windows/about/app.dom.tsx', + 'dom/calldiagnostic': 'ts/windows/calldiagnostic/app.dom.tsx', + 'dom/debuglog': 'ts/windows/debuglog/app.dom.tsx', + 'dom/loading': 'ts/windows/loading/start.dom.ts', + 'dom/permissions': 'ts/windows/permissions/app.dom.tsx', + 'dom/screenShare': 'ts/windows/screenShare/app.dom.tsx', +}; + +const defaults = { + transform, + external, + output: { + format: 'cjs', + dir: 'bundles', + exports: 'named', + chunkFileNames: 'chunks/[name]-[hash].js', + generatedCode: { + symbols: false, + }, + }, +}; + +if (isProd) { + try { + rmSync(join(__dirname, 'bundles'), { recursive: true }); + } catch (error) { + if (error.code !== 'ENOENT') { + throw error; + } + } +} + +export default defineConfig([ + { + ...defaults, + input: nonIsolated, + }, + // Each context isolated bundle has to be separate from the rest since + // they cannot use `require()` + ...Object.entries(contextIsolated).map(([key, value]) => { + return { + ...defaults, + external: ['electron'], + platform: 'browser', + input: { [key]: value }, + output: { + ...defaults.output, + codeSplitting: false, + }, + }; + }), + { + ...defaults, + + // Main + input: { + main: 'app/main.main.ts', + config: 'app/config.main.js', + }, + + // Do not override process.env.NODE_ENV in main process + transform: { + define: { + 'process.env.IS_BUNDLED': 'true', + }, + }, + }, +]); diff --git a/screenShare.html b/screenShare.html index 63dfa86bad..959daf4f62 100644 --- a/screenShare.html +++ b/screenShare.html @@ -20,6 +20,6 @@
- + diff --git a/scripts/clean-transpile.js b/scripts/clean-transpile.js index 18f219d675..cff9762fc9 100644 --- a/scripts/clean-transpile.js +++ b/scripts/clean-transpile.js @@ -9,6 +9,7 @@ const repoRoot = join(__dirname, '..'); const PATTERNS = [ 'sticker-creator/dist', + 'build/**/*.js', 'app/**/*.js', 'app/*.js', 'ts/**/*.js', @@ -18,6 +19,8 @@ const PATTERNS = [ 'preload.bundle.cache', ]; +const EXCEPTIONS = new Set(['ts/windows/main/tsx.preload.js']); + async function main() { const readable = fastGlob.stream(PATTERNS, { cwd: repoRoot, @@ -26,6 +29,9 @@ async function main() { const promises = []; let count = 0; for await (const entry of readable) { + if (EXCEPTIONS.has(entry)) { + continue; + } count += 1; promises.push(rm(entry, { recursive: true, force: true })); } diff --git a/scripts/esbuild.js b/scripts/esbuild.js deleted file mode 100644 index 5e98badc39..0000000000 --- a/scripts/esbuild.js +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2022 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -const esbuild = require('esbuild'); -const path = require('node:path'); -const fs = require('node:fs'); -const fastGlob = require('fast-glob'); - -const ROOT_DIR = path.join(__dirname, '..'); -const BUNDLES_DIR = 'bundles'; -const NODE_MODULES_DIR = path.join(ROOT_DIR, 'node_modules'); - -const watch = process.argv.some(argv => argv === '-w' || argv === '--watch'); -const isProd = process.argv.some(argv => argv === '-prod' || argv === '--prod'); -const noBundle = process.argv.some(argv => argv === '--no-bundle'); -const noScripts = process.argv.some(argv => argv === '--no-scripts'); - -const nodeDefaults = { - platform: 'node', - target: 'es2023', - // Disabled even in dev because the debugger is broken - sourcemap: false, - logLevel: 'info', - plugins: [ - { - name: 'resolve-ts', - setup(b) { - b.onResolve({ filter: /\.js$/ }, args => { - if (!args.path.startsWith('.')) { - return undefined; - } - - const targetPath = path.join(args.resolveDir, args.path); - if (targetPath.startsWith(NODE_MODULES_DIR)) { - return undefined; - } - const tsPath = targetPath.replace(/\.js$/, '.ts'); - const tsxPath = targetPath.replace(/\.js$/, '.tsx'); - if (fs.existsSync(tsPath)) { - return { path: tsPath }; - } - if (fs.existsSync(tsxPath)) { - return { path: tsxPath }; - } - - return undefined; - }); - }, - }, - ], -}; - -const bundleDefaults = { - ...nodeDefaults, - define: { - 'process.env.NODE_ENV': isProd ? '"production"' : '"development"', - }, - bundle: true, - minify: isProd, - external: [ - // Native libraries - '@signalapp/libsignal-client', - '@signalapp/libsignal-client/zkgroup', - '@signalapp/ringrtc', - '@signalapp/sqlcipher', - '@signalapp/mute-state-change', - '@indutny/mac-screen-share', - 'electron', - 'fs-xattr', - 'fsevents', - 'mac-screen-capture-permissions', - 'sass', - - // Things that don't bundle well - 'got', - 'node-fetch', - 'pino', - 'proxy-agent', - - // Large libraries (3.7mb total) - // See: https://esbuild.github.io/api/#analyze - 'emoji-datasource', - 'fabric', - 'google-libphonenumber', - 'moment', - 'quill', - - // Imported, but not used in production builds - 'mocha', - - // Uses fast-glob and dynamic requires - './preload_test.preload.js', - ], -}; - -const sandboxedPreloadDefaults = { - ...nodeDefaults, - define: { - 'process.env.NODE_ENV': isProd ? '"production"' : '"development"', - }, - external: ['electron'], - bundle: true, - minify: isProd, -}; - -const sandboxedBrowserDefaults = { - ...sandboxedPreloadDefaults, - chunkNames: 'chunks/[name]-[hash]', - format: 'esm', - outdir: path.join(ROOT_DIR, BUNDLES_DIR), - platform: 'browser', - splitting: true, -}; - -async function build(config) { - const instance = await esbuild.context(config); - - if (watch) { - await instance.watch(); - } else { - await instance.rebuild(); - await instance.dispose(); - } -} - -async function main() { - await Promise.all([ - !noScripts && - build({ - ...nodeDefaults, - format: 'cjs', - mainFields: ['browser', 'main'], - entryPoints: [ - 'preload.wrapper.ts', - ...fastGlob - .sync('{app,ts,build}/**/*.{ts,tsx}', { - onlyFiles: true, - cwd: ROOT_DIR, - }) - .filter(file => !file.endsWith('.d.ts')), - ], - outdir: path.join(ROOT_DIR), - }), - !noBundle && - build({ - ...bundleDefaults, - mainFields: ['browser', 'main'], - entryPoints: [ - path.join(ROOT_DIR, 'ts', 'windows', 'main', 'preload.preload.ts'), - ], - outfile: path.join(ROOT_DIR, 'preload.bundle.js'), - }), - !noBundle && - build({ - ...sandboxedBrowserDefaults, - mainFields: ['browser', 'main'], - entryPoints: [ - path.join(ROOT_DIR, 'ts', 'windows', 'about', 'app.dom.tsx'), - path.join(ROOT_DIR, 'ts', 'windows', 'calldiagnostic', 'app.dom.tsx'), - path.join(ROOT_DIR, 'ts', 'windows', 'debuglog', 'app.dom.tsx'), - path.join(ROOT_DIR, 'ts', 'windows', 'loading', 'start.dom.ts'), - path.join(ROOT_DIR, 'ts', 'windows', 'permissions', 'app.dom.tsx'), - path.join(ROOT_DIR, 'ts', 'windows', 'screenShare', 'app.dom.tsx'), - ], - }), - !noBundle && - build({ - ...sandboxedPreloadDefaults, - mainFields: ['browser', 'main'], - entryPoints: [ - path.join(ROOT_DIR, 'ts', 'windows', 'about', 'preload.preload.ts'), - path.join( - ROOT_DIR, - 'ts', - 'windows', - 'calldiagnostic', - 'preload.preload.ts' - ), - path.join( - ROOT_DIR, - 'ts', - 'windows', - 'debuglog', - 'preload.preload.ts' - ), - path.join(ROOT_DIR, 'ts', 'windows', 'loading', 'preload.preload.ts'), - path.join( - ROOT_DIR, - 'ts', - 'windows', - 'permissions', - 'preload.preload.ts' - ), - path.join( - ROOT_DIR, - 'ts', - 'windows', - 'screenShare', - 'preload.preload.ts' - ), - ], - format: 'cjs', - outdir: 'bundles', - }), - ]); -} - -// oxlint-disable-next-line promise/prefer-await-to-then -main().catch(error => { - console.error(error.stack); - process.exit(1); -}); diff --git a/scripts/generate-acknowledgments.js b/scripts/generate-acknowledgments.js index 774893e7bc..f141f4f10c 100644 --- a/scripts/generate-acknowledgments.js +++ b/scripts/generate-acknowledgments.js @@ -14,7 +14,11 @@ const { default: packageJson } = require('./packageJson.js'); // Enable this flag to throw an error. const REQUIRE_SIGNAL_LIB_FILES = Boolean(process.env.REQUIRE_SIGNAL_LIB_FILES); -const { dependencies = {}, optionalDependencies = {} } = packageJson; +const { + dependencies = {}, + devDependencies = {}, + optionalDependencies = {}, +} = packageJson; const SIGNAL_LIBS = [ '@signalapp/libsignal-client', @@ -117,6 +121,7 @@ async function main() { const dependencyNames = [ ...Object.keys(dependencies), + ...Object.keys(devDependencies), ...Object.keys(optionalDependencies), ] .filter(name => !SKIPPED_DEPENDENCIES.has(name)) diff --git a/scripts/prepare_adhoc_build.js b/scripts/prepare_adhoc_build.js index 71633690f9..b863a313ac 100644 --- a/scripts/prepare_adhoc_build.js +++ b/scripts/prepare_adhoc_build.js @@ -4,7 +4,7 @@ const fs = require('node:fs'); const _ = require('lodash'); const { execSync } = require('node:child_process'); -const { isAdhoc } = require('../ts/util/version.std.js'); +const { isAdhoc } = require('../ts/util/version.std.ts'); const { default: packageJson, version } = require('./packageJson.js'); // You might be wondering why this file is necessary. It comes down to our desire to allow diff --git a/scripts/prepare_alpha_build.js b/scripts/prepare_alpha_build.js index 0e4c89660c..fd238b275d 100644 --- a/scripts/prepare_alpha_build.js +++ b/scripts/prepare_alpha_build.js @@ -4,7 +4,7 @@ const fs = require('node:fs'); const _ = require('lodash'); -const { isAlpha } = require('../ts/util/version.std.js'); +const { isAlpha } = require('../ts/util/version.std.ts'); const { default: packageJson, version } = require('./packageJson.js'); // You might be wondering why this file is necessary. It comes down to our desire to allow diff --git a/scripts/prepare_axolotl_build.js b/scripts/prepare_axolotl_build.js index 6d38f7cd04..6958464ffd 100644 --- a/scripts/prepare_axolotl_build.js +++ b/scripts/prepare_axolotl_build.js @@ -4,7 +4,7 @@ const fs = require('node:fs'); const _ = require('lodash'); -const { isAxolotl } = require('../ts/util/version.std.js'); +const { isAxolotl } = require('../ts/util/version.std.ts'); const { default: packageJson, version } = require('./packageJson.js'); // You might be wondering why this file is necessary. It comes down to our desire to allow diff --git a/scripts/prepare_beta_build.js b/scripts/prepare_beta_build.js index a2b39df072..3cdbbbe836 100644 --- a/scripts/prepare_beta_build.js +++ b/scripts/prepare_beta_build.js @@ -4,7 +4,7 @@ const fs = require('node:fs'); const _ = require('lodash'); -const { isBeta } = require('../ts/util/version.std.js'); +const { isBeta } = require('../ts/util/version.std.ts'); const { default: packageJson, version } = require('./packageJson.js'); // You might be wondering why this file is necessary. It comes down to our desire to allow diff --git a/scripts/prepare_staging_build.js b/scripts/prepare_staging_build.js index 22b59800d0..97eac37e0f 100644 --- a/scripts/prepare_staging_build.js +++ b/scripts/prepare_staging_build.js @@ -4,7 +4,7 @@ const fs = require('node:fs'); const _ = require('lodash'); -const { isAlpha } = require('../ts/util/version.std.js'); +const { isAlpha } = require('../ts/util/version.std.ts'); const { default: packageJson, version } = require('./packageJson.js'); // You might be wondering why this file is necessary. It comes down to our desire to allow diff --git a/scripts/prepare_tagged_version.js b/scripts/prepare_tagged_version.js index 5acac533f8..0f869fa789 100644 --- a/scripts/prepare_tagged_version.js +++ b/scripts/prepare_tagged_version.js @@ -16,7 +16,7 @@ if (release !== 'alpha' && release !== 'axolotl' && release !== 'adhoc') { process.exit(1); } -const { generateTaggedVersion } = require('../ts/util/version.std.js'); +const { generateTaggedVersion } = require('../ts/util/version.std.ts'); const shortSha = execSync('git rev-parse --short=9 HEAD') .toString('utf8') diff --git a/test/setup-test-node.js b/test/setup-test-node.js deleted file mode 100644 index b39f84587d..0000000000 --- a/test/setup-test-node.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2021 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -const chai = require('chai'); -const chaiAsPromised = require('chai-as-promised'); - -const { Crypto } = require('../ts/context/Crypto.node.js'); -const { setEnvironment, Environment } = require('../ts/environment.std.js'); -const { HourCyclePreference } = require('../ts/types/I18N.std.js'); -const { packageJson } = require('../ts/util/packageJson.node.js'); - -chai.use(chaiAsPromised); - -setEnvironment(Environment.Test, true); - -// To replicate logic we have on the client side -global.window = { - Date, - performance, - SignalContext: { - i18n: key => `i18n(${key})`, - getPath: () => '/tmp', - getVersion: () => packageJson.version, - config: { - serverUrl: 'https://127.0.0.1:9', - storageUrl: 'https://127.0.0.1:9', - updatesUrl: 'https://127.0.0.1:9', - resourcesUrl: 'https://127.0.0.1:9', - certificateAuthority: packageJson.certificateAuthority, - version: packageJson.version, - }, - crypto: new Crypto(), - getResolvedMessagesLocale: () => 'en', - getResolvedMessagesLocaleDirection: () => 'ltr', - getHourCyclePreference: () => HourCyclePreference.UnknownPreference, - getPreferredSystemLocales: () => ['en'], - getLocaleOverride: () => null, - }, -}; - -// For ducks/network.getEmptyState() -global.navigator = {}; -global.WebSocket = {}; - -// For GlobalAudioContext.tsx -global.AudioContext = class {}; -// oxlint-disable-next-line max-classes-per-file -global.Audio = class { - // oxlint-disable-next-line typescript/no-empty-function - pause() {} - // oxlint-disable-next-line typescript/no-empty-function - addEventListener() {} -}; diff --git a/ts/AttachmentCrypto.node.ts b/ts/AttachmentCrypto.node.ts index 28389ef0be..23a6660d68 100644 --- a/ts/AttachmentCrypto.node.ts +++ b/ts/AttachmentCrypto.node.ts @@ -26,7 +26,7 @@ import { import type { ChunkSizeChoice } from '@signalapp/libsignal-client/dist/incremental_mac.js'; import { isAbsolute } from 'node:path'; -import { createLogger } from './logging/log.std.js'; +import { createLogger } from './logging/log.std.ts'; import { HashType, CipherType, @@ -36,24 +36,24 @@ import { DIGEST_LENGTH, ATTACHMENT_MAC_LENGTH, AES_KEY_LENGTH, -} from './types/Crypto.std.js'; -import { constantTimeEqual } from './Crypto.node.js'; -import { createName, getRelativePath } from './util/attachmentPath.node.js'; -import { appendPaddingStream } from './util/logPadding.node.js'; -import { prependStream } from './util/prependStream.node.js'; -import { appendMacStream } from './util/appendMacStream.node.js'; -import { finalStream } from './util/finalStream.node.js'; -import { getMacAndUpdateHmac } from './util/getMacAndUpdateHmac.node.js'; -import { trimPadding } from './util/trimPadding.node.js'; -import { assertDev, strictAssert } from './util/assert.std.js'; -import * as Errors from './types/errors.std.js'; -import { isNotNil } from './util/isNotNil.std.js'; -import { missingCaseError } from './util/missingCaseError.std.js'; -import { getEnvironment, Environment } from './environment.std.js'; -import { isNotEmpty, toBase64, toHex } from './Bytes.std.js'; -import { decipherWithAesKey } from './util/decipherWithAesKey.node.js'; -import { getAttachmentCiphertextSize } from './util/AttachmentCrypto.std.js'; -import { MediaTier } from './types/AttachmentDownload.std.js'; +} from './types/Crypto.std.ts'; +import { constantTimeEqual } from './Crypto.node.ts'; +import { createName, getRelativePath } from './util/attachmentPath.node.ts'; +import { appendPaddingStream } from './util/logPadding.node.ts'; +import { prependStream } from './util/prependStream.node.ts'; +import { appendMacStream } from './util/appendMacStream.node.ts'; +import { finalStream } from './util/finalStream.node.ts'; +import { getMacAndUpdateHmac } from './util/getMacAndUpdateHmac.node.ts'; +import { trimPadding } from './util/trimPadding.node.ts'; +import { assertDev, strictAssert } from './util/assert.std.ts'; +import * as Errors from './types/errors.std.ts'; +import { isNotNil } from './util/isNotNil.std.ts'; +import { missingCaseError } from './util/missingCaseError.std.ts'; +import { getEnvironment, Environment } from './environment.std.ts'; +import { isNotEmpty, toBase64, toHex } from './Bytes.std.ts'; +import { decipherWithAesKey } from './util/decipherWithAesKey.node.ts'; +import { getAttachmentCiphertextSize } from './util/AttachmentCrypto.std.ts'; +import { MediaTier } from './types/AttachmentDownload.std.ts'; const { ensureFile } = fsExtra; diff --git a/ts/Bytes.std.ts b/ts/Bytes.std.ts index b2546b5934..bbb66fb730 100644 --- a/ts/Bytes.std.ts +++ b/ts/Bytes.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { Bytes } from './context/Bytes.std.js'; +import { Bytes } from './context/Bytes.std.ts'; const bytes = globalThis.window?.SignalContext?.bytes || new Bytes(); diff --git a/ts/CI.preload.ts b/ts/CI.preload.ts index 25009f7893..3a4d962592 100644 --- a/ts/CI.preload.ts +++ b/ts/CI.preload.ts @@ -4,23 +4,23 @@ import { format } from 'node:util'; import { ipcRenderer } from 'electron'; -import type { IPCResponse as ChallengeResponseType } from './challenge.dom.js'; +import type { IPCResponse as ChallengeResponseType } from './challenge.dom.ts'; import type { MessageAttributesType } from './model-types.d.ts'; -import { createLogger } from './logging/log.std.js'; -import { explodePromise } from './util/explodePromise.std.js'; -import { AccessType, ipcInvoke } from './sql/channels.preload.js'; -import { backupsService } from './services/backups/index.preload.js'; -import { notificationService } from './services/notifications.preload.js'; -import { challengeHandler } from './services/challengeHandler.preload.js'; -import { AttachmentBackupManager } from './jobs/AttachmentBackupManager.preload.js'; -import { migrateAllMessages } from './messages/migrateMessageData.preload.js'; -import { SECOND } from './util/durations/index.std.js'; -import { isSignalRoute } from './util/signalRoutes.std.js'; -import { strictAssert } from './util/assert.std.js'; -import { MessageModel } from './models/messages.preload.js'; -import type { SocketStatuses } from './textsecure/SocketManager.preload.js'; -import { itemStorage } from './textsecure/Storage.preload.js'; -import { BackupLevel } from './services/backups/types.std.js'; +import { createLogger } from './logging/log.std.ts'; +import { explodePromise } from './util/explodePromise.std.ts'; +import { AccessType, ipcInvoke } from './sql/channels.preload.ts'; +import { backupsService } from './services/backups/index.preload.ts'; +import { notificationService } from './services/notifications.preload.ts'; +import { challengeHandler } from './services/challengeHandler.preload.ts'; +import { AttachmentBackupManager } from './jobs/AttachmentBackupManager.preload.ts'; +import { migrateAllMessages } from './messages/migrateMessageData.preload.ts'; +import { SECOND } from './util/durations/index.std.ts'; +import { isSignalRoute } from './util/signalRoutes.std.ts'; +import { strictAssert } from './util/assert.std.ts'; +import { MessageModel } from './models/messages.preload.ts'; +import type { SocketStatuses } from './textsecure/SocketManager.preload.ts'; +import { itemStorage } from './textsecure/Storage.preload.ts'; +import { BackupLevel } from './services/backups/types.std.ts'; const log = createLogger('CI'); diff --git a/ts/CI/benchmarkConversationOpen.preload.ts b/ts/CI/benchmarkConversationOpen.preload.ts index 72256f4148..6a4d3c2725 100644 --- a/ts/CI/benchmarkConversationOpen.preload.ts +++ b/ts/CI/benchmarkConversationOpen.preload.ts @@ -3,23 +3,23 @@ import { v4 as uuid } from 'uuid'; -import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { BodyRange } from '../types/BodyRange.std.js'; -import { CURRENT_SCHEMA_VERSION } from '../types/Message2.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { MINUTE } from '../util/durations/index.std.js'; -import { isOlderThan } from '../util/timestamp.std.js'; -import { sleep } from '../util/sleep.std.js'; -import { stats } from '../util/benchmark/stats.std.js'; -import type { StatsType } from '../util/benchmark/stats.std.js'; +import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { BodyRange } from '../types/BodyRange.std.ts'; +import { CURRENT_SCHEMA_VERSION } from '../types/Message2.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { MINUTE } from '../util/durations/index.std.ts'; +import { isOlderThan } from '../util/timestamp.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { stats } from '../util/benchmark/stats.std.ts'; +import type { StatsType } from '../util/benchmark/stats.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import { createLogger } from '../logging/log.std.js'; -import { postSaveUpdates } from '../util/cleanup.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { getSelectedConversationId } from '../state/selectors/nav.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { postSaveUpdates } from '../util/cleanup.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { getSelectedConversationId } from '../state/selectors/nav.std.ts'; const log = createLogger('benchmarkConversationOpen'); diff --git a/ts/ConversationController.preload.ts b/ts/ConversationController.preload.ts index 1457380ffb..d4a46a1893 100644 --- a/ts/ConversationController.preload.ts +++ b/ts/ConversationController.preload.ts @@ -5,53 +5,53 @@ import lodash from 'lodash'; import PQueue from 'p-queue'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from './sql/Client.preload.js'; -import { createLogger } from './logging/log.std.js'; -import * as Errors from './types/errors.std.js'; -import { getAuthorId } from './messages/sources.preload.js'; -import { maybeDeriveGroupV2Id } from './groups.preload.js'; -import { assertDev, strictAssert } from './util/assert.std.js'; -import { drop } from './util/drop.std.js'; +import { DataReader, DataWriter } from './sql/Client.preload.ts'; +import { createLogger } from './logging/log.std.ts'; +import * as Errors from './types/errors.std.ts'; +import { getAuthorId } from './messages/sources.preload.ts'; +import { maybeDeriveGroupV2Id } from './groups.preload.ts'; +import { assertDev, strictAssert } from './util/assert.std.ts'; +import { drop } from './util/drop.std.ts'; import { isDirectConversation, isGroup, isGroupV1, isGroupV2, -} from './util/whatTypeOfConversation.dom.js'; +} from './util/whatTypeOfConversation.dom.ts'; import { doesAttachmentExist, maybeDeleteAttachmentFile, -} from './util/migrations.preload.js'; +} from './util/migrations.preload.ts'; import { isServiceIdString, normalizePni, normalizeServiceId, -} from './types/ServiceId.std.js'; -import { normalizeAci } from './util/normalizeAci.std.js'; -import { sleep } from './util/sleep.std.js'; -import { isNotNil } from './util/isNotNil.std.js'; -import { MINUTE, SECOND } from './util/durations/index.std.js'; -import { getServiceIdsForE164s } from './util/getServiceIdsForE164s.dom.js'; +} from './types/ServiceId.std.ts'; +import { normalizeAci } from './util/normalizeAci.std.ts'; +import { sleep } from './util/sleep.std.ts'; +import { isNotNil } from './util/isNotNil.std.ts'; +import { MINUTE, SECOND } from './util/durations/index.std.ts'; +import { getServiceIdsForE164s } from './util/getServiceIdsForE164s.dom.ts'; import { SIGNAL_ACI, SIGNAL_AVATAR_PATH, -} from './types/SignalConversation.std.js'; -import { getTitleNoDefault } from './util/getTitle.preload.js'; -import * as StorageService from './services/storage.preload.js'; -import { cdsLookup } from './textsecure/WebAPI.preload.js'; -import type { ConversationPropsForUnreadStats } from './util/countUnreadStats.std.js'; -import { countAllConversationsUnreadStats } from './util/countUnreadStats.std.js'; -import { isTestOrMockEnvironment } from './environment.std.js'; -import { isConversationAccepted } from './util/isConversationAccepted.preload.js'; -import { areWePending } from './util/groupMembershipUtils.preload.js'; -import { conversationJobQueue } from './jobs/conversationJobQueue.preload.js'; -import { createBatcher } from './util/batcher.std.js'; -import { validateConversation } from './util/validateConversation.dom.js'; -import { ConversationModel } from './models/conversations.preload.js'; -import { INITIAL_EXPIRE_TIMER_VERSION } from './util/expirationTimer.std.js'; -import { missingCaseError } from './util/missingCaseError.std.js'; -import { removeConversation } from './util/Conversation.preload.js'; -import { signalProtocolStore } from './SignalProtocolStore.preload.js'; +} from './types/SignalConversation.std.ts'; +import { getTitleNoDefault } from './util/getTitle.preload.ts'; +import * as StorageService from './services/storage.preload.ts'; +import { cdsLookup } from './textsecure/WebAPI.preload.ts'; +import type { ConversationPropsForUnreadStats } from './util/countUnreadStats.std.ts'; +import { countAllConversationsUnreadStats } from './util/countUnreadStats.std.ts'; +import { isTestOrMockEnvironment } from './environment.std.ts'; +import { isConversationAccepted } from './util/isConversationAccepted.preload.ts'; +import { areWePending } from './util/groupMembershipUtils.preload.ts'; +import { conversationJobQueue } from './jobs/conversationJobQueue.preload.ts'; +import { createBatcher } from './util/batcher.std.ts'; +import { validateConversation } from './util/validateConversation.dom.ts'; +import { ConversationModel } from './models/conversations.preload.ts'; +import { INITIAL_EXPIRE_TIMER_VERSION } from './util/expirationTimer.std.ts'; +import { missingCaseError } from './util/missingCaseError.std.ts'; +import { removeConversation } from './util/Conversation.preload.ts'; +import { signalProtocolStore } from './SignalProtocolStore.preload.ts'; import type { ConversationAttributesType, @@ -63,10 +63,10 @@ import type { ServiceIdString, AciString, PniString, -} from './types/ServiceId.std.js'; -import { itemStorage } from './textsecure/Storage.preload.js'; -import { getSelectedConversationId } from './state/selectors/nav.std.js'; -import { unencodeNumber } from './util/unencodeNumber.std.js'; +} from './types/ServiceId.std.ts'; +import { itemStorage } from './textsecure/Storage.preload.ts'; +import { getSelectedConversationId } from './state/selectors/nav.std.ts'; +import { unencodeNumber } from './util/unencodeNumber.std.ts'; const { debounce, pick, uniq, without } = lodash; diff --git a/ts/Crypto.node.ts b/ts/Crypto.node.ts index 868f02d902..d8e0abe47b 100644 --- a/ts/Crypto.node.ts +++ b/ts/Crypto.node.ts @@ -6,19 +6,19 @@ import { Aci, Pni, hkdf } from '@signalapp/libsignal-client'; import type { PublicKey, PrivateKey } from '@signalapp/libsignal-client'; import { AccountEntropyPool } from '@signalapp/libsignal-client/dist/AccountKeys.js'; -import * as Bytes from './Bytes.std.js'; -import { Crypto } from './context/Crypto.node.js'; -import { calculateAgreement, generateKeyPair } from './Curve.node.js'; -import { HashType, CipherType } from './types/Crypto.std.js'; -import { AVATAR_COLOR_COUNT, AvatarColors } from './types/Colors.std.js'; -import { ProfileDecryptError } from './types/errors.std.js'; -import { getBytesSubarray } from './util/uuidToBytes.std.js'; -import { logPadSize } from './util/logPadSize.std.js'; -import { Environment, getEnvironment } from './environment.std.js'; -import { toWebSafeBase64 } from './util/webSafeBase64.std.js'; +import * as Bytes from './Bytes.std.ts'; +import { Crypto } from './context/Crypto.node.ts'; +import { calculateAgreement, generateKeyPair } from './Curve.node.ts'; +import { HashType, CipherType } from './types/Crypto.std.ts'; +import { AVATAR_COLOR_COUNT, AvatarColors } from './types/Colors.std.ts'; +import { ProfileDecryptError } from './types/errors.std.ts'; +import { getBytesSubarray } from './util/uuidToBytes.std.ts'; +import { logPadSize } from './util/logPadSize.std.ts'; +import { Environment, getEnvironment } from './environment.std.ts'; +import { toWebSafeBase64 } from './util/webSafeBase64.std.ts'; -import type { AciString, PniString } from './types/ServiceId.std.js'; -import type { AvatarColorType } from './types/Colors.std.js'; +import type { AciString, PniString } from './types/ServiceId.std.ts'; +import type { AvatarColorType } from './types/Colors.std.ts'; const { sample } = lodash; diff --git a/ts/Curve.node.ts b/ts/Curve.node.ts index f7ce3970c7..497e36866c 100644 --- a/ts/Curve.node.ts +++ b/ts/Curve.node.ts @@ -4,14 +4,14 @@ import * as client from '@signalapp/libsignal-client'; import type { KyberPreKeyRecord } from '@signalapp/libsignal-client'; -import * as Bytes from './Bytes.std.js'; -import { constantTimeEqual } from './Crypto.node.js'; +import * as Bytes from './Bytes.std.ts'; +import { constantTimeEqual } from './Crypto.node.ts'; import type { KeyPairType, CompatPreKeyType, CompatSignedPreKeyType, } from './textsecure/Types.d.ts'; -import { createLogger } from './logging/log.std.js'; +import { createLogger } from './logging/log.std.ts'; const log = createLogger('Curve'); diff --git a/ts/IdleDetector.preload.ts b/ts/IdleDetector.preload.ts index a70fb91810..d409db14ad 100644 --- a/ts/IdleDetector.preload.ts +++ b/ts/IdleDetector.preload.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import EventEmitter from 'node:events'; -import { createLogger } from './logging/log.std.js'; -import { clearTimeoutIfNecessary } from './util/clearTimeoutIfNecessary.std.js'; +import { createLogger } from './logging/log.std.ts'; +import { clearTimeoutIfNecessary } from './util/clearTimeoutIfNecessary.std.ts'; const log = createLogger('IdleDetector'); diff --git a/ts/LibSignalStores.node.ts b/ts/LibSignalStores.node.ts index dc981feb56..7631c3988b 100644 --- a/ts/LibSignalStores.node.ts +++ b/ts/LibSignalStores.node.ts @@ -26,13 +26,13 @@ import { SignedPreKeyStore, } from '@signalapp/libsignal-client'; import type { Store as KeyTransparencyStoreInterface } from '@signalapp/libsignal-client/dist/net/KeyTransparency.d.ts'; -import { Address } from './types/Address.std.js'; -import { QualifiedAddress } from './types/QualifiedAddress.std.js'; -import type { ServiceIdString } from './types/ServiceId.std.js'; -import { normalizeServiceId } from './types/ServiceId.std.js'; -import type { SignalProtocolStore } from './SignalProtocolStore.preload.js'; +import { Address } from './types/Address.std.ts'; +import { QualifiedAddress } from './types/QualifiedAddress.std.ts'; +import type { ServiceIdString } from './types/ServiceId.std.ts'; +import { normalizeServiceId } from './types/ServiceId.std.ts'; +import type { SignalProtocolStore } from './SignalProtocolStore.preload.ts'; -import type { Zone } from './util/Zone.std.js'; +import type { Zone } from './util/Zone.std.ts'; const { isNumber } = lodash; diff --git a/ts/LibsignalNetRemoteConfig.preload.ts b/ts/LibsignalNetRemoteConfig.preload.ts index 2b4f21c6fd..970dbfe1f0 100644 --- a/ts/LibsignalNetRemoteConfig.preload.ts +++ b/ts/LibsignalNetRemoteConfig.preload.ts @@ -6,10 +6,10 @@ import { REMOTE_CONFIG_KEYS as KeysExpectedByLibsignalNet, } from '@signalapp/libsignal-client/dist/net.js'; -import { isProduction } from './util/version.std.js'; -import * as RemoteConfig from './RemoteConfig.dom.js'; -import type { AddPrefix, ArrayValues } from './types/Util.std.js'; -import { createLogger } from './logging/log.std.js'; +import { isProduction } from './util/version.std.ts'; +import * as RemoteConfig from './RemoteConfig.dom.ts'; +import type { AddPrefix, ArrayValues } from './types/Util.std.ts'; +import { createLogger } from './logging/log.std.ts'; const log = createLogger('LibsignalNetRemoteConfig'); diff --git a/ts/RemoteConfig.dom.ts b/ts/RemoteConfig.dom.ts index 1e183b33e8..585fdd2bea 100644 --- a/ts/RemoteConfig.dom.ts +++ b/ts/RemoteConfig.dom.ts @@ -5,24 +5,24 @@ import lodash from 'lodash'; import semver from 'semver'; import type { REMOTE_CONFIG_KEYS as KeysExpectedByLibsignalNet } from '@signalapp/libsignal-client/dist/net.js'; -import type { getConfig } from './textsecure/WebAPI.preload.js'; -import { createLogger } from './logging/log.std.js'; -import type { AciString } from './types/ServiceId.std.js'; -import { parseIntOrThrow } from './util/parseIntOrThrow.std.js'; -import { HOUR } from './util/durations/index.std.js'; -import * as Bytes from './Bytes.std.js'; -import { uuidToBytes } from './util/uuidToBytes.std.js'; -import { HashType } from './types/Crypto.std.js'; -import { getCountryCode } from './types/PhoneNumber.std.js'; -import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration.dom.js'; +import type { getConfig } from './textsecure/WebAPI.preload.ts'; +import { createLogger } from './logging/log.std.ts'; +import type { AciString } from './types/ServiceId.std.ts'; +import { parseIntOrThrow } from './util/parseIntOrThrow.std.ts'; +import { HOUR } from './util/durations/index.std.ts'; +import * as Bytes from './Bytes.std.ts'; +import { uuidToBytes } from './util/uuidToBytes.std.ts'; +import { HashType } from './types/Crypto.std.ts'; +import { getCountryCode } from './types/PhoneNumber.std.ts'; +import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration.dom.ts'; import type { StorageInterface } from './types/Storage.d.ts'; -import { ToastType } from './types/Toast.dom.js'; -import { assertDev, strictAssert } from './util/assert.std.js'; +import { ToastType } from './types/Toast.dom.tsx'; +import { assertDev, strictAssert } from './util/assert.std.ts'; import type { ArrayValues, AssertSameMembers, StripPrefix, -} from './types/Util.std.js'; +} from './types/Util.std.ts'; const { get, throttle } = lodash; diff --git a/ts/SignalProtocolStore.preload.ts b/ts/SignalProtocolStore.preload.ts index 9ed545ec08..a313a9c685 100644 --- a/ts/SignalProtocolStore.preload.ts +++ b/ts/SignalProtocolStore.preload.ts @@ -20,15 +20,15 @@ import { SignedPreKeyRecord, } from '@signalapp/libsignal-client'; -import { DataReader, DataWriter } from './sql/Client.preload.js'; -import type { ItemType, KyberPreKeyTripleType } from './sql/Interface.std.js'; -import * as Bytes from './Bytes.std.js'; -import { constantTimeEqual, sha256 } from './Crypto.node.js'; -import { assertDev, strictAssert } from './util/assert.std.js'; -import { isNotNil } from './util/isNotNil.std.js'; -import { drop } from './util/drop.std.js'; -import { Zone } from './util/Zone.std.js'; -import { isMoreRecentThan } from './util/timestamp.std.js'; +import { DataReader, DataWriter } from './sql/Client.preload.ts'; +import type { ItemType, KyberPreKeyTripleType } from './sql/Interface.std.ts'; +import * as Bytes from './Bytes.std.ts'; +import { constantTimeEqual, sha256 } from './Crypto.node.ts'; +import { assertDev, strictAssert } from './util/assert.std.ts'; +import { isNotNil } from './util/isNotNil.std.ts'; +import { drop } from './util/drop.std.ts'; +import { Zone } from './util/Zone.std.ts'; +import { isMoreRecentThan } from './util/timestamp.std.ts'; import type { DeviceType, IdentityKeyType, @@ -54,26 +54,26 @@ import type { ServiceIdString, PniString, AciString, -} from './types/ServiceId.std.js'; +} from './types/ServiceId.std.ts'; import { isServiceIdString, ServiceIdKind, fromAciObject, -} from './types/ServiceId.std.js'; -import type { Address } from './types/Address.std.js'; -import type { QualifiedAddressStringType } from './types/QualifiedAddress.std.js'; -import { QualifiedAddress } from './types/QualifiedAddress.std.js'; -import { createLogger } from './logging/log.std.js'; -import * as Errors from './types/errors.std.js'; -import { MINUTE } from './util/durations/index.std.js'; +} from './types/ServiceId.std.ts'; +import type { Address } from './types/Address.std.ts'; +import type { QualifiedAddressStringType } from './types/QualifiedAddress.std.ts'; +import { QualifiedAddress } from './types/QualifiedAddress.std.ts'; +import { createLogger } from './logging/log.std.ts'; +import * as Errors from './types/errors.std.ts'; +import { MINUTE } from './util/durations/index.std.ts'; import { KYBER_KEY_ID_KEY, SIGNED_PRE_KEY_ID_KEY, -} from './textsecure/AccountManager.preload.js'; -import { formatGroups, groupWhile } from './util/groupWhile.std.js'; -import { parseUnknown } from './util/schemas.std.js'; -import { wrappingAdd24 } from './util/wrappingAdd.std.js'; -import { itemStorage } from './textsecure/Storage.preload.js'; +} from './textsecure/AccountManager.preload.ts'; +import { formatGroups, groupWhile } from './util/groupWhile.std.ts'; +import { parseUnknown } from './util/schemas.std.ts'; +import { wrappingAdd24 } from './util/wrappingAdd.std.ts'; +import { itemStorage } from './textsecure/Storage.preload.ts'; const { omit } = lodash; diff --git a/ts/Timers.preload.ts b/ts/Timers.preload.ts index cc4f95ae72..d0838dae50 100644 --- a/ts/Timers.preload.ts +++ b/ts/Timers.preload.ts @@ -3,7 +3,7 @@ const { timers } = window.SignalContext; -export type { Timeout } from './context/Timers.node.js'; +export type { Timeout } from './context/Timers.node.ts'; export function setTimeout( ...args: Parameters diff --git a/ts/axo/AriaClickable.dom.stories.tsx b/ts/axo/AriaClickable.dom.stories.tsx index 46ec21e892..dce374144b 100644 --- a/ts/axo/AriaClickable.dom.stories.tsx +++ b/ts/axo/AriaClickable.dom.stories.tsx @@ -4,9 +4,9 @@ import type { ReactNode } from 'react'; import React, { useId } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { AriaClickable } from './AriaClickable.dom.js'; -import { AxoButton } from './AxoButton.dom.js'; -import { tw } from './tw.dom.js'; +import { AriaClickable } from './AriaClickable.dom.tsx'; +import { AxoButton } from './AxoButton.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AriaClickable', diff --git a/ts/axo/AriaClickable.dom.tsx b/ts/axo/AriaClickable.dom.tsx index 4398039b80..ed714df6c6 100644 --- a/ts/axo/AriaClickable.dom.tsx +++ b/ts/axo/AriaClickable.dom.tsx @@ -11,13 +11,13 @@ import React, { import type { ReactNode, MouseEvent, FC, ForwardedRef } from 'react'; import { useLayoutEffect, mergeRefs } from '@react-aria/utils'; import { computeAccessibleName } from 'dom-accessibility-api'; -import { tw } from './tw.dom.js'; -import { assert } from './_internal/assert.std.js'; +import { tw } from './tw.dom.tsx'; +import { assert } from './_internal/assert.std.tsx'; import { createStrictContext, useStrictContext, -} from './_internal/StrictContext.dom.js'; -import { isTestOrMockEnvironment } from '../environment.std.js'; +} from './_internal/StrictContext.dom.tsx'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; const Namespace = 'AriaClickable'; diff --git a/ts/axo/AxoAlertDialog.dom.stories.tsx b/ts/axo/AxoAlertDialog.dom.stories.tsx index 1b60a0a45b..b79a765e7a 100644 --- a/ts/axo/AxoAlertDialog.dom.stories.tsx +++ b/ts/axo/AxoAlertDialog.dom.stories.tsx @@ -4,8 +4,8 @@ import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import React, { useState } from 'react'; -import { AxoAlertDialog } from './AxoAlertDialog.dom.js'; -import { AxoButton } from './AxoButton.dom.js'; +import { AxoAlertDialog } from './AxoAlertDialog.dom.tsx'; +import { AxoButton } from './AxoButton.dom.tsx'; export default { title: 'Axo/AxoAlertDialog', diff --git a/ts/axo/AxoAlertDialog.dom.tsx b/ts/axo/AxoAlertDialog.dom.tsx index 55bcd602b0..5cdeac264f 100644 --- a/ts/axo/AxoAlertDialog.dom.tsx +++ b/ts/axo/AxoAlertDialog.dom.tsx @@ -4,12 +4,12 @@ import { AlertDialog } from 'radix-ui'; import type { FC, MouseEvent, ReactNode } from 'react'; import React, { memo } from 'react'; -import { AxoButton } from './AxoButton.dom.js'; -import { tw } from './tw.dom.js'; -import { AxoBaseDialog } from './_internal/AxoBaseDialog.dom.js'; -import { AxoScrollArea } from './AxoScrollArea.dom.js'; -import type { AxoSymbol } from './AxoSymbol.dom.js'; -import { FlexWrapDetector } from './_internal/FlexWrapDetector.dom.js'; +import { AxoButton } from './AxoButton.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { AxoBaseDialog } from './_internal/AxoBaseDialog.dom.tsx'; +import { AxoScrollArea } from './AxoScrollArea.dom.tsx'; +import type { AxoSymbol } from './AxoSymbol.dom.tsx'; +import { FlexWrapDetector } from './_internal/FlexWrapDetector.dom.tsx'; const Namespace = 'AxoAlertDialog'; diff --git a/ts/axo/AxoAvatar.dom.stories.tsx b/ts/axo/AxoAvatar.dom.stories.tsx index 079490e678..3db4003c65 100644 --- a/ts/axo/AxoAvatar.dom.stories.tsx +++ b/ts/axo/AxoAvatar.dom.stories.tsx @@ -4,11 +4,11 @@ import type { Meta } from '@storybook/react'; import type { JSX, ReactNode } from 'react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import { AxoAvatar } from './AxoAvatar.dom.js'; -import { tw } from './tw.dom.js'; -import { BADGES_FIXTURE } from './_internal/storybook-fixtures.std.js'; -import { _getAllAxoSymbolIconNames } from './_internal/AxoSymbolDefs.generated.std.js'; -import { AxoTokens } from './AxoTokens.std.js'; +import { AxoAvatar } from './AxoAvatar.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { BADGES_FIXTURE } from './_internal/storybook-fixtures.std.tsx'; +import { _getAllAxoSymbolIconNames } from './_internal/AxoSymbolDefs.generated.std.ts'; +import { AxoTokens } from './AxoTokens.std.ts'; export default { title: 'Axo/AxoAvatar', diff --git a/ts/axo/AxoAvatar.dom.tsx b/ts/axo/AxoAvatar.dom.tsx index 7ae835339f..9ba8e00c2e 100644 --- a/ts/axo/AxoAvatar.dom.tsx +++ b/ts/axo/AxoAvatar.dom.tsx @@ -9,15 +9,15 @@ import type { ReactNode, } from 'react'; import React, { memo, useCallback, useMemo, useRef, useState } from 'react'; -import { AxoSymbol } from './AxoSymbol.dom.js'; -import type { TailwindStyles } from './tw.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; +import type { TailwindStyles } from './tw.dom.tsx'; +import { tw } from './tw.dom.tsx'; import { createStrictContext, useStrictContext, -} from './_internal/StrictContext.dom.js'; -import { assert } from './_internal/assert.std.js'; -import { AxoTokens } from './AxoTokens.std.js'; +} from './_internal/StrictContext.dom.tsx'; +import { assert } from './_internal/assert.std.tsx'; +import { AxoTokens } from './AxoTokens.std.ts'; const Namespace = 'AxoAvatar'; diff --git a/ts/axo/AxoBadge.dom.stories.tsx b/ts/axo/AxoBadge.dom.stories.tsx index e8439c14fa..c395c0777f 100644 --- a/ts/axo/AxoBadge.dom.stories.tsx +++ b/ts/axo/AxoBadge.dom.stories.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { Meta } from '@storybook/react'; import React from 'react'; -import { ExperimentalAxoBadge } from './AxoBadge.dom.js'; -import { tw } from './tw.dom.js'; +import { ExperimentalAxoBadge } from './AxoBadge.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AriaBadge (Experimental)', diff --git a/ts/axo/AxoBadge.dom.tsx b/ts/axo/AxoBadge.dom.tsx index 68df53c580..134c16e850 100644 --- a/ts/axo/AxoBadge.dom.tsx +++ b/ts/axo/AxoBadge.dom.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { FC } from 'react'; import React, { memo, useMemo } from 'react'; -import { AxoSymbol } from './AxoSymbol.dom.js'; -import type { TailwindStyles } from './tw.dom.js'; -import { tw } from './tw.dom.js'; -import { unreachable } from './_internal/assert.std.js'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; +import type { TailwindStyles } from './tw.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { unreachable } from './_internal/assert.std.tsx'; const Namespace = 'AxoBadge'; diff --git a/ts/axo/AxoButton.dom.stories.tsx b/ts/axo/AxoButton.dom.stories.tsx index 3654457233..682b35c783 100644 --- a/ts/axo/AxoButton.dom.stories.tsx +++ b/ts/axo/AxoButton.dom.stories.tsx @@ -8,9 +8,9 @@ import { _getAllAxoButtonVariants, _getAllAxoButtonSizes, AxoButton, -} from './AxoButton.dom.js'; -import { tw } from './tw.dom.js'; -import { AxoSwitch } from './AxoSwitch.dom.js'; +} from './AxoButton.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { AxoSwitch } from './AxoSwitch.dom.tsx'; export default { title: 'Axo/AxoButton', diff --git a/ts/axo/AxoButton.dom.tsx b/ts/axo/AxoButton.dom.tsx index e8fd038518..1e94b87a79 100644 --- a/ts/axo/AxoButton.dom.tsx +++ b/ts/axo/AxoButton.dom.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, forwardRef } from 'react'; import type { ButtonHTMLAttributes, FC, ForwardedRef, ReactNode } from 'react'; -import type { TailwindStyles } from './tw.dom.js'; -import { tw } from './tw.dom.js'; -import { AxoSymbol } from './AxoSymbol.dom.js'; -import { assert } from './_internal/assert.std.js'; -import type { SpinnerVariant } from '../components/SpinnerV2.dom.js'; -import { SpinnerV2 } from '../components/SpinnerV2.dom.js'; +import type { TailwindStyles } from './tw.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; +import { assert } from './_internal/assert.std.tsx'; +import type { SpinnerVariant } from '../components/SpinnerV2.dom.tsx'; +import { SpinnerV2 } from '../components/SpinnerV2.dom.tsx'; const Namespace = 'AxoButton'; diff --git a/ts/axo/AxoCheckbox.dom.stories.tsx b/ts/axo/AxoCheckbox.dom.stories.tsx index 11b182159b..6ed2b228e2 100644 --- a/ts/axo/AxoCheckbox.dom.stories.tsx +++ b/ts/axo/AxoCheckbox.dom.stories.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; -import { AxoCheckbox } from './AxoCheckbox.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoCheckbox } from './AxoCheckbox.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AxoCheckbox', diff --git a/ts/axo/AxoCheckbox.dom.tsx b/ts/axo/AxoCheckbox.dom.tsx index 96a22ef06b..7cee9c2fd5 100644 --- a/ts/axo/AxoCheckbox.dom.tsx +++ b/ts/axo/AxoCheckbox.dom.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { Checkbox } from 'radix-ui'; -import { AxoSymbol } from './AxoSymbol.dom.js'; -import type { TailwindStyles } from './tw.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; +import type { TailwindStyles } from './tw.dom.tsx'; +import { tw } from './tw.dom.tsx'; const Namespace = 'AxoCheckbox'; diff --git a/ts/axo/AxoContextMenu.dom.stories.tsx b/ts/axo/AxoContextMenu.dom.stories.tsx index dc41a61720..b6a34f24d3 100644 --- a/ts/axo/AxoContextMenu.dom.stories.tsx +++ b/ts/axo/AxoContextMenu.dom.stories.tsx @@ -3,8 +3,8 @@ import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { AxoContextMenu } from './AxoContextMenu.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoContextMenu } from './AxoContextMenu.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AxoContextMenu', diff --git a/ts/axo/AxoContextMenu.dom.tsx b/ts/axo/AxoContextMenu.dom.tsx index 64d5029649..dac29e09c3 100644 --- a/ts/axo/AxoContextMenu.dom.tsx +++ b/ts/axo/AxoContextMenu.dom.tsx @@ -15,14 +15,14 @@ import type { KeyboardEventHandler, MouseEvent as ReactMouseEvent, } from 'react'; -import { AxoSymbol } from './AxoSymbol.dom.js'; -import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.js'; -import { tw } from './tw.dom.js'; -import { assert } from './_internal/assert.std.js'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; +import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { assert } from './_internal/assert.std.tsx'; import { createStrictContext, useStrictContext, -} from './_internal/StrictContext.dom.js'; +} from './_internal/StrictContext.dom.tsx'; const Namespace = 'AxoContextMenu'; diff --git a/ts/axo/AxoDialog.dom.stories.tsx b/ts/axo/AxoDialog.dom.stories.tsx index 3d735c9c14..1d109fc906 100644 --- a/ts/axo/AxoDialog.dom.stories.tsx +++ b/ts/axo/AxoDialog.dom.stories.tsx @@ -4,10 +4,10 @@ import type { ReactNode } from 'react'; import React, { useId, useMemo, useState } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { AxoDialog } from './AxoDialog.dom.js'; -import { AxoButton } from './AxoButton.dom.js'; -import { tw } from './tw.dom.js'; -import { AxoCheckbox } from './AxoCheckbox.dom.js'; +import { AxoDialog } from './AxoDialog.dom.tsx'; +import { AxoButton } from './AxoButton.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { AxoCheckbox } from './AxoCheckbox.dom.tsx'; export default { title: 'Axo/AxoDialog', diff --git a/ts/axo/AxoDialog.dom.tsx b/ts/axo/AxoDialog.dom.tsx index f274a3e650..d43ce7cef1 100644 --- a/ts/axo/AxoDialog.dom.tsx +++ b/ts/axo/AxoDialog.dom.tsx @@ -4,13 +4,13 @@ import { Dialog } from 'radix-ui'; import type { CSSProperties, FC, ReactNode } from 'react'; import React, { memo, useMemo, useState } from 'react'; -import { AxoBaseDialog } from './_internal/AxoBaseDialog.dom.js'; -import type { AxoSymbol } from './AxoSymbol.dom.js'; -import { tw } from './tw.dom.js'; -import { AxoScrollArea } from './AxoScrollArea.dom.js'; -import { AxoButton } from './AxoButton.dom.js'; -import { AxoIconButton } from './AxoIconButton.dom.js'; -import { AxoTooltip } from './AxoTooltip.dom.js'; +import { AxoBaseDialog } from './_internal/AxoBaseDialog.dom.tsx'; +import type { AxoSymbol } from './AxoSymbol.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { AxoScrollArea } from './AxoScrollArea.dom.tsx'; +import { AxoButton } from './AxoButton.dom.tsx'; +import { AxoIconButton } from './AxoIconButton.dom.tsx'; +import { AxoTooltip } from './AxoTooltip.dom.tsx'; const Namespace = 'AxoDialog'; diff --git a/ts/axo/AxoDropdownMenu.dom.stories.tsx b/ts/axo/AxoDropdownMenu.dom.stories.tsx index bcf346baa3..67205c2355 100644 --- a/ts/axo/AxoDropdownMenu.dom.stories.tsx +++ b/ts/axo/AxoDropdownMenu.dom.stories.tsx @@ -4,9 +4,9 @@ import type { ReactNode } from 'react'; import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { AxoDropdownMenu } from './AxoDropdownMenu.dom.js'; -import { AxoButton } from './AxoButton.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoDropdownMenu } from './AxoDropdownMenu.dom.tsx'; +import { AxoButton } from './AxoButton.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AxoDropdownMenu', diff --git a/ts/axo/AxoDropdownMenu.dom.tsx b/ts/axo/AxoDropdownMenu.dom.tsx index 2378e58da1..a6a80afe99 100644 --- a/ts/axo/AxoDropdownMenu.dom.tsx +++ b/ts/axo/AxoDropdownMenu.dom.tsx @@ -12,24 +12,24 @@ import React, { import { DropdownMenu } from 'radix-ui'; import type { FC, ReactNode } from 'react'; import { computeAccessibleName } from 'dom-accessibility-api'; -import { AxoSymbol } from './AxoSymbol.dom.js'; -import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; +import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.tsx'; +import { tw } from './tw.dom.tsx'; import { AriaLabellingProvider, useAriaLabellingContext, useCreateAriaLabellingContext, -} from './_internal/AriaLabellingContext.dom.js'; -import { assert } from './_internal/assert.std.js'; +} from './_internal/AriaLabellingContext.dom.tsx'; +import { assert } from './_internal/assert.std.tsx'; import { getElementAriaRole, isAriaWidgetRole, -} from './_internal/ariaRoles.dom.js'; +} from './_internal/ariaRoles.dom.tsx'; import { createStrictContext, useStrictContext, -} from './_internal/StrictContext.dom.js'; -import { isTestOrMockEnvironment } from '../environment.std.js'; +} from './_internal/StrictContext.dom.tsx'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; const Namespace = 'AxoDropdownMenu'; diff --git a/ts/axo/AxoIconButton.dom.stories.tsx b/ts/axo/AxoIconButton.dom.stories.tsx index a415b454f8..de1ec76f06 100644 --- a/ts/axo/AxoIconButton.dom.stories.tsx +++ b/ts/axo/AxoIconButton.dom.stories.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { Fragment } from 'react'; import type { Meta } from '@storybook/react'; -import { AxoIconButton } from './AxoIconButton.dom.js'; -import type { TailwindStyles } from './tw.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoIconButton } from './AxoIconButton.dom.tsx'; +import type { TailwindStyles } from './tw.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AxoIconButton', diff --git a/ts/axo/AxoIconButton.dom.tsx b/ts/axo/AxoIconButton.dom.tsx index 889cd3bd07..c833693994 100644 --- a/ts/axo/AxoIconButton.dom.tsx +++ b/ts/axo/AxoIconButton.dom.tsx @@ -3,12 +3,12 @@ import type { ButtonHTMLAttributes, FC, ForwardedRef } from 'react'; import React, { forwardRef, memo, useMemo } from 'react'; -import { AxoSymbol } from './AxoSymbol.dom.js'; -import type { TailwindStyles } from './tw.dom.js'; -import { tw } from './tw.dom.js'; -import type { SpinnerVariant } from '../components/SpinnerV2.dom.js'; -import { SpinnerV2 } from '../components/SpinnerV2.dom.js'; -import { AxoTooltip } from './AxoTooltip.dom.js'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; +import type { TailwindStyles } from './tw.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import type { SpinnerVariant } from '../components/SpinnerV2.dom.tsx'; +import { SpinnerV2 } from '../components/SpinnerV2.dom.tsx'; +import { AxoTooltip } from './AxoTooltip.dom.tsx'; const Namespace = 'AxoIconButton'; diff --git a/ts/axo/AxoMenuBuilder.dom.stories.tsx b/ts/axo/AxoMenuBuilder.dom.stories.tsx index df68401bb9..600ea94c8d 100644 --- a/ts/axo/AxoMenuBuilder.dom.stories.tsx +++ b/ts/axo/AxoMenuBuilder.dom.stories.tsx @@ -4,9 +4,9 @@ import type { ReactNode } from 'react'; import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { AxoMenuBuilder } from './AxoMenuBuilder.dom.js'; -import { AxoButton } from './AxoButton.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoMenuBuilder } from './AxoMenuBuilder.dom.tsx'; +import { AxoButton } from './AxoButton.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AxoMenuBuilder', diff --git a/ts/axo/AxoMenuBuilder.dom.tsx b/ts/axo/AxoMenuBuilder.dom.tsx index 34af963c56..11331c3d98 100644 --- a/ts/axo/AxoMenuBuilder.dom.tsx +++ b/ts/axo/AxoMenuBuilder.dom.tsx @@ -3,14 +3,14 @@ import type { FC } from 'react'; import React, { memo } from 'react'; -import type { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.js'; -import { unreachable } from './_internal/assert.std.js'; -import { AxoDropdownMenu } from './AxoDropdownMenu.dom.js'; -import { AxoContextMenu } from './AxoContextMenu.dom.js'; +import type { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.tsx'; +import { unreachable } from './_internal/assert.std.tsx'; +import { AxoDropdownMenu } from './AxoDropdownMenu.dom.tsx'; +import { AxoContextMenu } from './AxoContextMenu.dom.tsx'; import { createStrictContext, useStrictContext, -} from './_internal/StrictContext.dom.js'; +} from './_internal/StrictContext.dom.tsx'; const Namespace = 'AxoMenuBuilder'; diff --git a/ts/axo/AxoProvider.dom.tsx b/ts/axo/AxoProvider.dom.tsx index acbc0e2ab0..39d0f42078 100644 --- a/ts/axo/AxoProvider.dom.tsx +++ b/ts/axo/AxoProvider.dom.tsx @@ -3,7 +3,7 @@ import type { FC, ReactNode } from 'react'; import React, { memo, useInsertionEffect } from 'react'; import { Direction, Tooltip } from 'radix-ui'; -import { createScrollbarGutterCssProperties } from './_internal/scrollbars.dom.js'; +import { createScrollbarGutterCssProperties } from './_internal/scrollbars.dom.tsx'; type AxoProviderProps = Readonly<{ dir: 'ltr' | 'rtl'; diff --git a/ts/axo/AxoRadioGroup.dom.stories.tsx b/ts/axo/AxoRadioGroup.dom.stories.tsx index d876caaf75..bbafe77448 100644 --- a/ts/axo/AxoRadioGroup.dom.stories.tsx +++ b/ts/axo/AxoRadioGroup.dom.stories.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; -import { AxoRadioGroup } from './AxoRadioGroup.dom.js'; +import { AxoRadioGroup } from './AxoRadioGroup.dom.tsx'; export default { title: 'Axo/AxoRadioGroup', diff --git a/ts/axo/AxoRadioGroup.dom.tsx b/ts/axo/AxoRadioGroup.dom.tsx index 98cd4bd741..3e01de4fee 100644 --- a/ts/axo/AxoRadioGroup.dom.tsx +++ b/ts/axo/AxoRadioGroup.dom.tsx @@ -4,11 +4,11 @@ import { RadioGroup } from 'radix-ui'; import type { FC, ReactNode } from 'react'; import React, { memo, useId, useMemo } from 'react'; -import { tw } from './tw.dom.js'; +import { tw } from './tw.dom.tsx'; import { createStrictContext, useStrictContext, -} from './_internal/StrictContext.dom.js'; +} from './_internal/StrictContext.dom.tsx'; export const Namespace = 'AxoRadioGroup'; diff --git a/ts/axo/AxoScrollArea.dom.stories.tsx b/ts/axo/AxoScrollArea.dom.stories.tsx index 2ef802b0b3..512f7f61d6 100644 --- a/ts/axo/AxoScrollArea.dom.stories.tsx +++ b/ts/axo/AxoScrollArea.dom.stories.tsx @@ -3,9 +3,9 @@ import type { ReactNode } from 'react'; import React from 'react'; import type { Meta } from '@storybook/react'; -import { AxoScrollArea } from './AxoScrollArea.dom.js'; -import { tw } from './tw.dom.js'; -import { AxoSymbol } from './AxoSymbol.dom.js'; +import { AxoScrollArea } from './AxoScrollArea.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; export default { title: 'Axo/AxoScrollArea', diff --git a/ts/axo/AxoScrollArea.dom.tsx b/ts/axo/AxoScrollArea.dom.tsx index b8df197334..a2476e8819 100644 --- a/ts/axo/AxoScrollArea.dom.tsx +++ b/ts/axo/AxoScrollArea.dom.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useMemo, useState } from 'react'; import type { CSSProperties, FC, ReactNode } from 'react'; -import type { TailwindStyles } from './tw.dom.js'; -import { tw } from './tw.dom.js'; +import type { TailwindStyles } from './tw.dom.tsx'; +import { tw } from './tw.dom.tsx'; import { createStrictContext, useStrictContext, -} from './_internal/StrictContext.dom.js'; -import { AxoTooltip } from './AxoTooltip.dom.js'; +} from './_internal/StrictContext.dom.tsx'; +import { AxoTooltip } from './AxoTooltip.dom.tsx'; const Namespace = 'AxoScrollArea'; diff --git a/ts/axo/AxoSegmentedControl.dom.stories.tsx b/ts/axo/AxoSegmentedControl.dom.stories.tsx index 6fa85891c7..a856db4b37 100644 --- a/ts/axo/AxoSegmentedControl.dom.stories.tsx +++ b/ts/axo/AxoSegmentedControl.dom.stories.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { Meta } from '@storybook/react'; import React, { useState } from 'react'; -import { ExperimentalAxoSegmentedControl } from './AxoSegmentedControl.dom.js'; -import { tw } from './tw.dom.js'; +import { ExperimentalAxoSegmentedControl } from './AxoSegmentedControl.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AxoSegmentedControl (Experimental)', diff --git a/ts/axo/AxoSegmentedControl.dom.tsx b/ts/axo/AxoSegmentedControl.dom.tsx index 59d8560749..f4b98f3d7e 100644 --- a/ts/axo/AxoSegmentedControl.dom.tsx +++ b/ts/axo/AxoSegmentedControl.dom.tsx @@ -3,7 +3,7 @@ import type { ButtonHTMLAttributes, FC, ForwardedRef, ReactNode } from 'react'; import React, { forwardRef, memo, useCallback } from 'react'; import { ToggleGroup } from 'radix-ui'; -import { ExperimentalAxoBaseSegmentedControl } from './_internal/AxoBaseSegmentedControl.dom.js'; +import { ExperimentalAxoBaseSegmentedControl } from './_internal/AxoBaseSegmentedControl.dom.tsx'; const Namespace = 'AxoSegmentedControl'; diff --git a/ts/axo/AxoSelect.dom.stories.tsx b/ts/axo/AxoSelect.dom.stories.tsx index d1a753dcb3..8a75c6d2d2 100644 --- a/ts/axo/AxoSelect.dom.stories.tsx +++ b/ts/axo/AxoSelect.dom.stories.tsx @@ -3,8 +3,8 @@ import type { ReactNode } from 'react'; import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; -import { AxoSelect } from './AxoSelect.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoSelect } from './AxoSelect.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AxoSelect', diff --git a/ts/axo/AxoSelect.dom.tsx b/ts/axo/AxoSelect.dom.tsx index 25d59150e6..2e797f09cb 100644 --- a/ts/axo/AxoSelect.dom.tsx +++ b/ts/axo/AxoSelect.dom.tsx @@ -3,11 +3,11 @@ import React, { memo } from 'react'; import type { FC, ReactNode } from 'react'; import { Select } from 'radix-ui'; -import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.js'; -import { AxoSymbol } from './AxoSymbol.dom.js'; -import type { TailwindStyles } from './tw.dom.js'; -import { tw } from './tw.dom.js'; -import { ExperimentalAxoBadge } from './AxoBadge.dom.js'; +import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.tsx'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; +import type { TailwindStyles } from './tw.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { ExperimentalAxoBadge } from './AxoBadge.dom.tsx'; const Namespace = 'AxoSelect'; diff --git a/ts/axo/AxoSwitch.dom.stories.tsx b/ts/axo/AxoSwitch.dom.stories.tsx index cb5f5b2332..214dd62d61 100644 --- a/ts/axo/AxoSwitch.dom.stories.tsx +++ b/ts/axo/AxoSwitch.dom.stories.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; -import { AxoSwitch } from './AxoSwitch.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoSwitch } from './AxoSwitch.dom.tsx'; +import { tw } from './tw.dom.tsx'; export default { title: 'Axo/AxoSwitch', diff --git a/ts/axo/AxoSwitch.dom.tsx b/ts/axo/AxoSwitch.dom.tsx index 646ddec3fb..93f1071d0e 100644 --- a/ts/axo/AxoSwitch.dom.tsx +++ b/ts/axo/AxoSwitch.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { Switch } from 'radix-ui'; -import { tw } from './tw.dom.js'; -import { AxoSymbol } from './AxoSymbol.dom.js'; +import { tw } from './tw.dom.tsx'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; const Namespace = 'AxoSwitch'; diff --git a/ts/axo/AxoSymbol.dom.stories.tsx b/ts/axo/AxoSymbol.dom.stories.tsx index 9647d5b4bc..2c542c78a3 100644 --- a/ts/axo/AxoSymbol.dom.stories.tsx +++ b/ts/axo/AxoSymbol.dom.stories.tsx @@ -4,12 +4,12 @@ import React, { memo, useMemo, useState } from 'react'; import type { Meta } from '@storybook/react'; import { Direction } from 'radix-ui'; import Fuse from 'fuse.js'; -import { AxoSymbol } from './AxoSymbol.dom.js'; -import { tw } from './tw.dom.js'; +import { AxoSymbol } from './AxoSymbol.dom.tsx'; +import { tw } from './tw.dom.tsx'; import { _getAllAxoSymbolInlineGlyphNames, getAxoSymbolInlineGlyph, -} from './_internal/AxoSymbolDefs.generated.std.js'; +} from './_internal/AxoSymbolDefs.generated.std.ts'; export default { title: 'Axo/AxoSymbol', diff --git a/ts/axo/AxoSymbol.dom.tsx b/ts/axo/AxoSymbol.dom.tsx index ad51f6308e..7faf5672ea 100644 --- a/ts/axo/AxoSymbol.dom.tsx +++ b/ts/axo/AxoSymbol.dom.tsx @@ -4,16 +4,16 @@ import type { FC } from 'react'; import React, { memo, useMemo } from 'react'; import { Direction } from 'radix-ui'; import { VisuallyHidden } from 'react-aria'; -import type { TailwindStyles } from './tw.dom.js'; -import { tw } from './tw.dom.js'; +import type { TailwindStyles } from './tw.dom.tsx'; +import { tw } from './tw.dom.tsx'; import { getAxoSymbolIcon, getAxoSymbolInlineGlyph, -} from './_internal/AxoSymbolDefs.generated.std.js'; +} from './_internal/AxoSymbolDefs.generated.std.ts'; import type { AxoSymbolIconName, AxoSymbolInlineGlyphName, -} from './_internal/AxoSymbolDefs.generated.std.js'; +} from './_internal/AxoSymbolDefs.generated.std.ts'; const { useDirection } = Direction; diff --git a/ts/axo/AxoTokens.std.ts b/ts/axo/AxoTokens.std.ts index 0d49ea93b1..24aa8d2c90 100644 --- a/ts/axo/AxoTokens.std.ts +++ b/ts/axo/AxoTokens.std.ts @@ -1,7 +1,7 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { assert } from './_internal/assert.std.js'; +import { assert } from './_internal/assert.std.tsx'; export namespace AxoTokens { export type HexColor = `#${string}` & { HexColor: never }; diff --git a/ts/axo/AxoTooltip.dom.stories.tsx b/ts/axo/AxoTooltip.dom.stories.tsx index dbf85a921f..911065a918 100644 --- a/ts/axo/AxoTooltip.dom.stories.tsx +++ b/ts/axo/AxoTooltip.dom.stories.tsx @@ -4,11 +4,11 @@ import type { JSX, ReactNode } from 'react'; import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { AxoTooltip } from './AxoTooltip.dom.js'; -import { AxoButton } from './AxoButton.dom.js'; -import { tw } from './tw.dom.js'; -import { AxoScrollArea } from './AxoScrollArea.dom.js'; -import { AxoDialog } from './AxoDialog.dom.js'; +import { AxoTooltip } from './AxoTooltip.dom.tsx'; +import { AxoButton } from './AxoButton.dom.tsx'; +import { tw } from './tw.dom.tsx'; +import { AxoScrollArea } from './AxoScrollArea.dom.tsx'; +import { AxoDialog } from './AxoDialog.dom.tsx'; export default { title: 'Axo/AxoTooltip', diff --git a/ts/axo/AxoTooltip.dom.tsx b/ts/axo/AxoTooltip.dom.tsx index eedb5d3d50..b724abf228 100644 --- a/ts/axo/AxoTooltip.dom.tsx +++ b/ts/axo/AxoTooltip.dom.tsx @@ -11,13 +11,13 @@ import React, { } from 'react'; import { Tooltip, Direction } from 'radix-ui'; import { computeAccessibleName } from 'dom-accessibility-api'; -import { tw } from './tw.dom.js'; -import { assert } from './_internal/assert.std.js'; +import { tw } from './tw.dom.tsx'; +import { assert } from './_internal/assert.std.tsx'; import { getElementAriaRole, isAriaWidgetRole, -} from './_internal/ariaRoles.dom.js'; -import { isTestOrMockEnvironment } from '../environment.std.js'; +} from './_internal/ariaRoles.dom.tsx'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; const { useDirection } = Direction; diff --git a/ts/axo/_internal/AriaLabellingContext.dom.tsx b/ts/axo/_internal/AriaLabellingContext.dom.tsx index 9c49c834ea..e4aaed3000 100644 --- a/ts/axo/_internal/AriaLabellingContext.dom.tsx +++ b/ts/axo/_internal/AriaLabellingContext.dom.tsx @@ -3,7 +3,7 @@ import type { RefCallback } from 'react'; import { useMemo, useState } from 'react'; -import { createStrictContext, useStrictContext } from './StrictContext.dom.js'; +import { createStrictContext, useStrictContext } from './StrictContext.dom.tsx'; type AriaLabellingContextType = Readonly<{ labelRef: RefCallback; diff --git a/ts/axo/_internal/AxoBaseDialog.dom.tsx b/ts/axo/_internal/AxoBaseDialog.dom.tsx index f6a4f0dcb7..b5b39b758c 100644 --- a/ts/axo/_internal/AxoBaseDialog.dom.tsx +++ b/ts/axo/_internal/AxoBaseDialog.dom.tsx @@ -3,7 +3,7 @@ import { useCallback } from 'react'; import type { ReactNode } from 'react'; -import { tw } from '../tw.dom.js'; +import { tw } from '../tw.dom.tsx'; export namespace AxoBaseDialog { /** diff --git a/ts/axo/_internal/AxoBaseMenu.dom.tsx b/ts/axo/_internal/AxoBaseMenu.dom.tsx index 73e570e7c6..fb81c4be92 100644 --- a/ts/axo/_internal/AxoBaseMenu.dom.tsx +++ b/ts/axo/_internal/AxoBaseMenu.dom.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import type { ReactNode } from 'react'; -import { tw } from '../tw.dom.js'; -import { AxoSymbol } from '../AxoSymbol.dom.js'; -import { isTestOrMockEnvironment } from '../../environment.std.js'; +import { tw } from '../tw.dom.tsx'; +import { AxoSymbol } from '../AxoSymbol.dom.tsx'; +import { isTestOrMockEnvironment } from '../../environment.std.ts'; // In the future we should be relying more on insert order of // dialogs/popovers/menus into portals diff --git a/ts/axo/_internal/AxoBaseSegmentedControl.dom.tsx b/ts/axo/_internal/AxoBaseSegmentedControl.dom.tsx index efbe64ddb9..b3abf460d2 100644 --- a/ts/axo/_internal/AxoBaseSegmentedControl.dom.tsx +++ b/ts/axo/_internal/AxoBaseSegmentedControl.dom.tsx @@ -11,10 +11,10 @@ import type { import React, { forwardRef, memo, useId, useMemo } from 'react'; import type { Transition } from 'motion/react'; import { motion } from 'motion/react'; -import type { TailwindStyles } from '../tw.dom.js'; -import { tw } from '../tw.dom.js'; -import { ExperimentalAxoBadge } from '../AxoBadge.dom.js'; -import { createStrictContext, useStrictContext } from './StrictContext.dom.js'; +import type { TailwindStyles } from '../tw.dom.tsx'; +import { tw } from '../tw.dom.tsx'; +import { ExperimentalAxoBadge } from '../AxoBadge.dom.tsx'; +import { createStrictContext, useStrictContext } from './StrictContext.dom.tsx'; const Namespace = 'AxoBaseSegmentedControl'; diff --git a/ts/axo/_internal/FlexWrapDetector.dom.tsx b/ts/axo/_internal/FlexWrapDetector.dom.tsx index 1e6ea0fe4a..979b0db8ee 100644 --- a/ts/axo/_internal/FlexWrapDetector.dom.tsx +++ b/ts/axo/_internal/FlexWrapDetector.dom.tsx @@ -1,7 +1,7 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, type ReactNode } from 'react'; -import { tw } from '../tw.dom.js'; +import { tw } from '../tw.dom.tsx'; export type FlexWrapDetectorProps = Readonly<{ children: ReactNode; diff --git a/ts/axo/_internal/ariaRoles.dom.tsx b/ts/axo/_internal/ariaRoles.dom.tsx index abad72aa09..2d72175c16 100644 --- a/ts/axo/_internal/ariaRoles.dom.tsx +++ b/ts/axo/_internal/ariaRoles.dom.tsx @@ -3,7 +3,7 @@ import type { AriaRole as ReactAriaRole } from 'react'; import { getRole } from 'dom-accessibility-api'; -import { assert } from './assert.std.js'; +import { assert } from './assert.std.tsx'; const AbstractRoles = { /** Abstract Roles: https://www.w3.org/TR/wai-aria-1.2/#abstract_roles */ diff --git a/ts/axo/_internal/scrollbars.dom.tsx b/ts/axo/_internal/scrollbars.dom.tsx index 226e5807f8..d21afe3347 100644 --- a/ts/axo/_internal/scrollbars.dom.tsx +++ b/ts/axo/_internal/scrollbars.dom.tsx @@ -1,6 +1,6 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { assert } from './assert.std.js'; +import { assert } from './assert.std.tsx'; export type ScrollbarWidth = 'auto' | 'thin' | 'none'; diff --git a/ts/background.preload.ts b/ts/background.preload.ts index 89cc253f71..c2d4a136d6 100644 --- a/ts/background.preload.ts +++ b/ts/background.preload.ts @@ -7,96 +7,96 @@ import PQueue from 'p-queue'; import pMap from 'p-map'; import { v7 as generateUuid } from 'uuid'; -import * as Registration from './util/registration.preload.js'; -import MessageReceiver from './textsecure/MessageReceiver.preload.js'; -import { signalProtocolStore } from './SignalProtocolStore.preload.js'; +import * as Registration from './util/registration.preload.ts'; +import MessageReceiver from './textsecure/MessageReceiver.preload.ts'; +import { signalProtocolStore } from './SignalProtocolStore.preload.ts'; import type { SessionResetsType, ProcessedDataMessage, } from './textsecure/Types.d.ts'; -import { HTTPError } from './types/HTTPError.std.js'; +import { HTTPError } from './types/HTTPError.std.ts'; import { runTaskWithTimeout, suspendTasksWithTimeout, resumeTasksWithTimeout, reportLongRunningTasks, -} from './textsecure/TaskWithTimeout.std.js'; +} from './textsecure/TaskWithTimeout.std.ts'; import type { MessageAttributesType } from './model-types.d.ts'; -import * as Bytes from './Bytes.std.js'; -import * as Timers from './Timers.preload.js'; -import * as indexedDb from './indexeddb.dom.js'; -import type { MenuOptionsType } from './types/menu.std.js'; -import { SocketStatus } from './types/SocketStatus.std.js'; -import { DEFAULT_CONVERSATION_COLOR } from './types/Colors.std.js'; -import { ThemeType } from './types/Util.std.js'; -import * as durations from './util/durations/index.std.js'; -import { drop } from './util/drop.std.js'; -import { explodePromise } from './util/explodePromise.std.js'; -import { deliveryReceiptQueue } from './util/deliveryReceipt.preload.js'; -import type { ExplodePromiseResultType } from './util/explodePromise.std.js'; -import { isWindowDragElement } from './util/isWindowDragElement.std.js'; -import { assertDev, strictAssert } from './util/assert.std.js'; -import { filter } from './util/iterables.std.js'; -import { isNotNil } from './util/isNotNil.std.js'; -import { isAdminDeleteReceiveEnabled } from './util/isAdminDeleteEnabled.dom.js'; -import { areRemoteBackupsTurnedOn } from './util/isBackupEnabled.preload.js'; -import { lightSessionResetQueue } from './util/lightSessionResetQueue.std.js'; -import { setAppLoadingScreenMessage } from './setAppLoadingScreenMessage.dom.js'; -import { IdleDetector } from './IdleDetector.preload.js'; -import { challengeHandler } from './services/challengeHandler.preload.js'; +import * as Bytes from './Bytes.std.ts'; +import * as Timers from './Timers.preload.ts'; +import * as indexedDb from './indexeddb.dom.ts'; +import type { MenuOptionsType } from './types/menu.std.ts'; +import { SocketStatus } from './types/SocketStatus.std.ts'; +import { DEFAULT_CONVERSATION_COLOR } from './types/Colors.std.ts'; +import { ThemeType } from './types/Util.std.ts'; +import * as durations from './util/durations/index.std.ts'; +import { drop } from './util/drop.std.ts'; +import { explodePromise } from './util/explodePromise.std.ts'; +import { deliveryReceiptQueue } from './util/deliveryReceipt.preload.ts'; +import type { ExplodePromiseResultType } from './util/explodePromise.std.ts'; +import { isWindowDragElement } from './util/isWindowDragElement.std.ts'; +import { assertDev, strictAssert } from './util/assert.std.ts'; +import { filter } from './util/iterables.std.ts'; +import { isNotNil } from './util/isNotNil.std.ts'; +import { isAdminDeleteReceiveEnabled } from './util/isAdminDeleteEnabled.dom.ts'; +import { areRemoteBackupsTurnedOn } from './util/isBackupEnabled.preload.ts'; +import { lightSessionResetQueue } from './util/lightSessionResetQueue.std.ts'; +import { setAppLoadingScreenMessage } from './setAppLoadingScreenMessage.dom.ts'; +import { IdleDetector } from './IdleDetector.preload.ts'; +import { challengeHandler } from './services/challengeHandler.preload.ts'; import { initialize as initializeExpiringMessageService, update as updateExpiringMessagesService, -} from './services/expiringMessagesDeletion.preload.js'; -import { keyTransparency } from './services/keyTransparency.preload.js'; +} from './services/expiringMessagesDeletion.preload.ts'; +import { keyTransparency } from './services/keyTransparency.preload.ts'; import { initialize as initializeNotificationProfilesService, fastUpdate as updateNotificationProfileService, -} from './services/notificationProfilesService.preload.js'; -import { tapToViewMessagesDeletionService } from './services/tapToViewMessagesDeletionService.preload.js'; -import { senderCertificateService } from './services/senderCertificate.preload.js'; +} from './services/notificationProfilesService.preload.ts'; +import { tapToViewMessagesDeletionService } from './services/tapToViewMessagesDeletionService.preload.ts'; +import { senderCertificateService } from './services/senderCertificate.preload.ts'; import { GROUP_CREDENTIALS_KEY, initializeGroupCredentialFetcher, -} from './services/groupCredentialFetcher.preload.js'; -import { initializeNetworkObserver } from './services/networkObserver.preload.js'; -import * as KeyboardLayout from './services/keyboardLayout.dom.js'; -import * as StorageService from './services/storage.preload.js'; -import { usernameIntegrity } from './services/usernameIntegrity.preload.js'; -import { updateIdentityKey } from './services/profiles.preload.js'; -import { initializeUpdateListener } from './services/updateListener.preload.js'; -import { RoutineProfileRefresher } from './routineProfileRefresh.preload.js'; -import { isOlderThan } from './util/timestamp.std.js'; -import { isValidReactionEmoji } from './reactions/isValidReactionEmoji.std.js'; -import { safeParsePartial } from './util/schemas.std.js'; -import { PollVoteSchema, PollTerminateSchema } from './types/Polls.dom.js'; -import type { ConversationModel } from './models/conversations.preload.js'; -import { isIncoming } from './messages/helpers.std.js'; -import { getAuthor } from './messages/sources.preload.js'; -import { migrateBatchOfMessages } from './messages/migrateMessageData.preload.js'; -import { createBatcher, waitForAllBatchers } from './util/batcher.std.js'; +} from './services/groupCredentialFetcher.preload.ts'; +import { initializeNetworkObserver } from './services/networkObserver.preload.ts'; +import * as KeyboardLayout from './services/keyboardLayout.dom.ts'; +import * as StorageService from './services/storage.preload.ts'; +import { usernameIntegrity } from './services/usernameIntegrity.preload.ts'; +import { updateIdentityKey } from './services/profiles.preload.ts'; +import { initializeUpdateListener } from './services/updateListener.preload.ts'; +import { RoutineProfileRefresher } from './routineProfileRefresh.preload.ts'; +import { isOlderThan } from './util/timestamp.std.ts'; +import { isValidReactionEmoji } from './reactions/isValidReactionEmoji.std.ts'; +import { safeParsePartial } from './util/schemas.std.ts'; +import { PollVoteSchema, PollTerminateSchema } from './types/Polls.dom.ts'; +import type { ConversationModel } from './models/conversations.preload.ts'; +import { isIncoming } from './messages/helpers.std.ts'; +import { getAuthor } from './messages/sources.preload.ts'; +import { migrateBatchOfMessages } from './messages/migrateMessageData.preload.ts'; +import { createBatcher, waitForAllBatchers } from './util/batcher.std.ts'; import { flushAllWaitBatchers, waitForAllWaitBatchers, -} from './util/waitBatcher.std.js'; +} from './util/waitBatcher.std.ts'; import { initializeAllJobQueues, shutdownAllJobQueues, -} from './jobs/initializeAllJobQueues.preload.js'; -import { removeStorageKeyJobQueue } from './jobs/removeStorageKeyJobQueue.preload.js'; -import { conversationJobQueue } from './jobs/conversationJobQueue.preload.js'; -import { ourProfileKeyService } from './services/ourProfileKey.std.js'; -import { notificationService } from './services/notifications.preload.js'; -import { areWeASubscriberService } from './services/areWeASubscriber.dom.js'; +} from './jobs/initializeAllJobQueues.preload.ts'; +import { removeStorageKeyJobQueue } from './jobs/removeStorageKeyJobQueue.preload.ts'; +import { conversationJobQueue } from './jobs/conversationJobQueue.preload.ts'; +import { ourProfileKeyService } from './services/ourProfileKey.std.ts'; +import { notificationService } from './services/notifications.preload.ts'; +import { areWeASubscriberService } from './services/areWeASubscriber.dom.ts'; import { onContactSync, setIsInitialContactSync, -} from './services/contactSync.preload.js'; -import { startTimeTravelDetector } from './util/startTimeTravelDetector.std.js'; -import { shouldRespondWithProfileKey } from './util/shouldRespondWithProfileKey.dom.js'; -import { LatestQueue } from './util/LatestQueue.std.js'; -import { parseIntOrThrow } from './util/parseIntOrThrow.std.js'; -import { getProfile } from './util/getProfile.preload.js'; +} from './services/contactSync.preload.ts'; +import { startTimeTravelDetector } from './util/startTimeTravelDetector.std.ts'; +import { shouldRespondWithProfileKey } from './util/shouldRespondWithProfileKey.dom.ts'; +import { LatestQueue } from './util/LatestQueue.std.ts'; +import { parseIntOrThrow } from './util/parseIntOrThrow.std.ts'; +import { getProfile } from './util/getProfile.preload.ts'; import type { AttachmentBackfillResponseSyncEvent, ConfigurationEvent, @@ -122,7 +122,7 @@ import type { ViewEvent, ViewOnceOpenSyncEvent, ViewSyncEvent, -} from './textsecure/messageReceiverEvents.std.js'; +} from './textsecure/messageReceiverEvents.std.ts'; import { cancelInflightRequests, checkSockets, @@ -148,145 +148,145 @@ import { registerRequestHandler, reportMessage, unregisterRequestHandler, -} from './textsecure/WebAPI.preload.js'; -import { accountManager } from './textsecure/AccountManager.preload.js'; -import * as KeyChangeListener from './textsecure/KeyChangeListener.dom.js'; -import { UpdateKeysListener } from './textsecure/UpdateKeysListener.preload.js'; -import { isGroup } from './util/whatTypeOfConversation.dom.js'; -import { BackOff, FIBONACCI_TIMEOUTS } from './util/BackOff.std.js'; -import { createApp as createAppRoot } from './state/roots/createApp.preload.js'; -import { AppViewType } from './state/ducks/app.preload.js'; -import { areAnyCallsActiveOrRinging } from './state/selectors/calling.std.js'; -import { badgeImageFileDownloader } from './badges/badgeImageFileDownloader.preload.js'; -import * as Deletes from './messageModifiers/Deletes.preload.js'; -import * as Edits from './messageModifiers/Edits.preload.js'; -import * as MessageReceipts from './messageModifiers/MessageReceipts.preload.js'; -import * as MessageRequests from './messageModifiers/MessageRequests.preload.js'; -import * as PinnedMessages from './messageModifiers/PinnedMessages.preload.js'; -import * as Polls from './messageModifiers/Polls.preload.js'; -import * as Reactions from './messageModifiers/Reactions.preload.js'; -import * as ViewOnceOpenSyncs from './messageModifiers/ViewOnceOpenSyncs.preload.js'; -import type { DeleteAttributesType } from './messageModifiers/Deletes.preload.js'; -import type { EditAttributesType } from './messageModifiers/Edits.preload.js'; -import type { MessageRequestAttributesType } from './messageModifiers/MessageRequests.preload.js'; +} from './textsecure/WebAPI.preload.ts'; +import { accountManager } from './textsecure/AccountManager.preload.ts'; +import * as KeyChangeListener from './textsecure/KeyChangeListener.dom.ts'; +import { UpdateKeysListener } from './textsecure/UpdateKeysListener.preload.ts'; +import { isGroup } from './util/whatTypeOfConversation.dom.ts'; +import { BackOff, FIBONACCI_TIMEOUTS } from './util/BackOff.std.ts'; +import { createApp as createAppRoot } from './state/roots/createApp.preload.tsx'; +import { AppViewType } from './state/ducks/app.preload.ts'; +import { areAnyCallsActiveOrRinging } from './state/selectors/calling.std.ts'; +import { badgeImageFileDownloader } from './badges/badgeImageFileDownloader.preload.ts'; +import * as Deletes from './messageModifiers/Deletes.preload.ts'; +import * as Edits from './messageModifiers/Edits.preload.ts'; +import * as MessageReceipts from './messageModifiers/MessageReceipts.preload.ts'; +import * as MessageRequests from './messageModifiers/MessageRequests.preload.ts'; +import * as PinnedMessages from './messageModifiers/PinnedMessages.preload.ts'; +import * as Polls from './messageModifiers/Polls.preload.ts'; +import * as Reactions from './messageModifiers/Reactions.preload.ts'; +import * as ViewOnceOpenSyncs from './messageModifiers/ViewOnceOpenSyncs.preload.ts'; +import type { DeleteAttributesType } from './messageModifiers/Deletes.preload.ts'; +import type { EditAttributesType } from './messageModifiers/Edits.preload.ts'; +import type { MessageRequestAttributesType } from './messageModifiers/MessageRequests.preload.ts'; import type { PollVoteAttributesType, PollTerminateAttributesType, -} from './messageModifiers/Polls.preload.js'; -import type { ReactionAttributesType } from './messageModifiers/Reactions.preload.js'; -import type { ViewOnceOpenSyncAttributesType } from './messageModifiers/ViewOnceOpenSyncs.preload.js'; -import { ReadStatus } from './messages/MessageReadStatus.std.js'; -import type { SendStateByConversationId } from './messages/MessageSendState.std.js'; -import { SendStatus } from './messages/MessageSendState.std.js'; -import * as Stickers from './types/Stickers.preload.js'; -import * as Errors from './types/errors.std.js'; -import { InstallScreenStep } from './types/InstallScreen.std.js'; -import { getEnvironment } from './environment.std.js'; -import { SignalService as Proto } from './protobuf/index.std.js'; +} from './messageModifiers/Polls.preload.ts'; +import type { ReactionAttributesType } from './messageModifiers/Reactions.preload.ts'; +import type { ViewOnceOpenSyncAttributesType } from './messageModifiers/ViewOnceOpenSyncs.preload.ts'; +import { ReadStatus } from './messages/MessageReadStatus.std.ts'; +import type { SendStateByConversationId } from './messages/MessageSendState.std.ts'; +import { SendStatus } from './messages/MessageSendState.std.ts'; +import * as Stickers from './types/Stickers.preload.ts'; +import * as Errors from './types/errors.std.ts'; +import { InstallScreenStep } from './types/InstallScreen.std.ts'; +import { getEnvironment } from './environment.std.ts'; +import { SignalService as Proto } from './protobuf/index.std.ts'; import { getOnDecryptionError, onRetryRequest, onInvalidPlaintextMessage, onSuccessfulDecrypt, -} from './util/handleRetry.preload.js'; -import { themeChanged } from './shims/themeChanged.dom.js'; -import { createIPCEvents } from './util/createIPCEvents.preload.js'; -import type { ServiceIdString } from './types/ServiceId.std.js'; +} from './util/handleRetry.preload.ts'; +import { themeChanged } from './shims/themeChanged.dom.ts'; +import { createIPCEvents } from './util/createIPCEvents.preload.ts'; +import type { ServiceIdString } from './types/ServiceId.std.ts'; import { ServiceIdKind, isPniString, isServiceIdString, -} from './types/ServiceId.std.js'; -import { isAciString } from './util/isAciString.std.js'; -import { normalizeAci } from './util/normalizeAci.std.js'; -import { createLogger } from './logging/log.std.js'; -import { deleteAllLogs } from './util/deleteAllLogs.preload.js'; -import { startInteractionMode } from './services/InteractionMode.dom.js'; -import { calling } from './services/calling.preload.js'; -import { ReactionSource } from './reactions/ReactionSource.std.js'; -import { singleProtoJobQueue } from './jobs/singleProtoJobQueue.preload.js'; -import { SeenStatus } from './MessageSeenStatus.std.js'; -import { MessageSender } from './textsecure/SendMessage.preload.js'; -import { onStoryRecipientUpdate } from './util/onStoryRecipientUpdate.preload.js'; -import { flushAttachmentDownloadQueue } from './util/attachmentDownloadQueue.preload.js'; -import { initializeRedux } from './state/initializeRedux.preload.js'; -import { StartupQueue } from './util/StartupQueue.std.js'; -import { showConfirmationDialog } from './util/showConfirmationDialog.dom.js'; -import { onCallEventSync } from './util/onCallEventSync.preload.js'; -import { sleeper } from './util/sleeper.std.js'; -import { DAY, HOUR, SECOND } from './util/durations/index.std.js'; -import { copyDataMessageIntoMessage } from './util/copyDataMessageIntoMessage.std.js'; +} from './types/ServiceId.std.ts'; +import { isAciString } from './util/isAciString.std.ts'; +import { normalizeAci } from './util/normalizeAci.std.ts'; +import { createLogger } from './logging/log.std.ts'; +import { deleteAllLogs } from './util/deleteAllLogs.preload.ts'; +import { startInteractionMode } from './services/InteractionMode.dom.ts'; +import { calling } from './services/calling.preload.ts'; +import { ReactionSource } from './reactions/ReactionSource.std.ts'; +import { singleProtoJobQueue } from './jobs/singleProtoJobQueue.preload.ts'; +import { SeenStatus } from './MessageSeenStatus.std.ts'; +import { MessageSender } from './textsecure/SendMessage.preload.ts'; +import { onStoryRecipientUpdate } from './util/onStoryRecipientUpdate.preload.ts'; +import { flushAttachmentDownloadQueue } from './util/attachmentDownloadQueue.preload.ts'; +import { initializeRedux } from './state/initializeRedux.preload.ts'; +import { StartupQueue } from './util/StartupQueue.std.ts'; +import { showConfirmationDialog } from './util/showConfirmationDialog.dom.tsx'; +import { onCallEventSync } from './util/onCallEventSync.preload.ts'; +import { sleeper } from './util/sleeper.std.ts'; +import { DAY, HOUR, SECOND } from './util/durations/index.std.ts'; +import { copyDataMessageIntoMessage } from './util/copyDataMessageIntoMessage.std.ts'; import { flushMessageCounter, incrementMessageCounter, initializeMessageCounter, -} from './util/incrementMessageCounter.preload.js'; -import { generateMessageId } from './util/generateMessageId.node.js'; -import { retryPlaceholders } from './services/retryPlaceholders.std.js'; -import { setBatchingStrategy } from './util/messageBatcher.preload.js'; -import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration.dom.js'; -import { addGlobalKeyboardShortcuts } from './services/addGlobalKeyboardShortcuts.preload.js'; -import { createEventHandler } from './quill/signal-clipboard/util.dom.js'; -import { onCallLogEventSync } from './util/onCallLogEventSync.preload.js'; -import { backupsService } from './services/backups/index.preload.js'; +} from './util/incrementMessageCounter.preload.ts'; +import { generateMessageId } from './util/generateMessageId.node.ts'; +import { retryPlaceholders } from './services/retryPlaceholders.std.ts'; +import { setBatchingStrategy } from './util/messageBatcher.preload.ts'; +import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration.dom.ts'; +import { addGlobalKeyboardShortcuts } from './services/addGlobalKeyboardShortcuts.preload.ts'; +import { createEventHandler } from './quill/signal-clipboard/util.dom.ts'; +import { onCallLogEventSync } from './util/onCallLogEventSync.preload.ts'; +import { backupsService } from './services/backups/index.preload.ts'; import { getCallIdFromEra, updateLocalGroupCallHistoryTimestamp, -} from './util/callDisposition.preload.js'; -import { deriveStorageServiceKey, deriveMasterKey } from './Crypto.node.js'; -import { AttachmentDownloadManager } from './jobs/AttachmentDownloadManager.preload.js'; -import { onCallLinkUpdateSync } from './util/onCallLinkUpdateSync.preload.js'; -import { CallMode } from './types/CallDisposition.std.js'; -import type { SyncTaskType } from './util/syncTasks.preload.js'; -import { queueSyncTasks, runAllSyncTasks } from './util/syncTasks.preload.js'; -import type { ViewSyncTaskType } from './messageModifiers/ViewSyncs.preload.js'; -import type { ReceiptSyncTaskType } from './messageModifiers/MessageReceipts.preload.js'; -import type { ReadSyncTaskType } from './messageModifiers/ReadSyncs.preload.js'; -import { AttachmentBackupManager } from './jobs/AttachmentBackupManager.preload.js'; -import { getConversationIdForLogging } from './util/idForLogging.preload.js'; -import { encryptConversationAttachments } from './util/encryptConversationAttachments.preload.js'; -import { DataReader, DataWriter } from './sql/Client.preload.js'; +} from './util/callDisposition.preload.ts'; +import { deriveStorageServiceKey, deriveMasterKey } from './Crypto.node.ts'; +import { AttachmentDownloadManager } from './jobs/AttachmentDownloadManager.preload.ts'; +import { onCallLinkUpdateSync } from './util/onCallLinkUpdateSync.preload.ts'; +import { CallMode } from './types/CallDisposition.std.ts'; +import type { SyncTaskType } from './util/syncTasks.preload.ts'; +import { queueSyncTasks, runAllSyncTasks } from './util/syncTasks.preload.ts'; +import type { ViewSyncTaskType } from './messageModifiers/ViewSyncs.preload.ts'; +import type { ReceiptSyncTaskType } from './messageModifiers/MessageReceipts.preload.ts'; +import type { ReadSyncTaskType } from './messageModifiers/ReadSyncs.preload.ts'; +import { AttachmentBackupManager } from './jobs/AttachmentBackupManager.preload.ts'; +import { getConversationIdForLogging } from './util/idForLogging.preload.ts'; +import { encryptConversationAttachments } from './util/encryptConversationAttachments.preload.ts'; +import { DataReader, DataWriter } from './sql/Client.preload.ts'; import { restoreRemoteConfigFromStorage, getValue as getRemoteConfigValue, onChange as onRemoteConfigChange, maybeRefreshRemoteConfig, forceRefreshRemoteConfig, -} from './RemoteConfig.dom.js'; +} from './RemoteConfig.dom.ts'; import { getParametersForRedux, loadAll, -} from './services/allLoaders.preload.js'; -import { checkFirstEnvelope } from './util/checkFirstEnvelope.dom.js'; -import { BLOCKED_UUIDS_ID } from './textsecure/storage/Blocked.std.js'; -import { ReleaseNoteAndMegaphoneFetcher } from './services/releaseNoteAndMegaphoneFetcher.preload.js'; -import { initMegaphoneCheckService } from './services/megaphone.preload.js'; -import { BuildExpirationService } from './services/buildExpiration.preload.js'; +} from './services/allLoaders.preload.ts'; +import { checkFirstEnvelope } from './util/checkFirstEnvelope.dom.ts'; +import { BLOCKED_UUIDS_ID } from './textsecure/storage/Blocked.std.ts'; +import { ReleaseNoteAndMegaphoneFetcher } from './services/releaseNoteAndMegaphoneFetcher.preload.ts'; +import { initMegaphoneCheckService } from './services/megaphone.preload.ts'; +import { BuildExpirationService } from './services/buildExpiration.preload.ts'; import { maybeQueueDeviceInfoFetch, onDeviceNameChangeSync, -} from './util/onDeviceNameChangeSync.preload.js'; -import { postSaveUpdates } from './util/cleanup.preload.js'; -import { handleDataMessage } from './messages/handleDataMessage.preload.js'; -import { MessageModel } from './models/messages.preload.js'; -import { waitForEvent } from './shims/events.dom.js'; -import { sendSyncRequests } from './textsecure/syncRequests.preload.js'; -import { handleServerAlerts } from './util/handleServerAlerts.preload.js'; -import { isLocalBackupsEnabled } from './util/isLocalBackupsEnabled.preload.js'; -import { NavTab, SettingsPage, ProfileEditorPage } from './types/Nav.std.js'; -import { initialize as initializeDonationService } from './services/donations.preload.js'; -import { MessageRequestResponseSource } from './types/MessageRequestResponseEvent.std.js'; +} from './util/onDeviceNameChangeSync.preload.ts'; +import { postSaveUpdates } from './util/cleanup.preload.ts'; +import { handleDataMessage } from './messages/handleDataMessage.preload.ts'; +import { MessageModel } from './models/messages.preload.ts'; +import { waitForEvent } from './shims/events.dom.ts'; +import { sendSyncRequests } from './textsecure/syncRequests.preload.ts'; +import { handleServerAlerts } from './util/handleServerAlerts.preload.ts'; +import { isLocalBackupsEnabled } from './util/isLocalBackupsEnabled.preload.ts'; +import { NavTab, SettingsPage, ProfileEditorPage } from './types/Nav.std.ts'; +import { initialize as initializeDonationService } from './services/donations.preload.ts'; +import { MessageRequestResponseSource } from './types/MessageRequestResponseEvent.std.ts'; import { CURRENT_SCHEMA_VERSION, PRIVATE, GROUP, -} from './types/Message2.preload.js'; -import { JobCancelReason } from './jobs/types.std.js'; -import { itemStorage } from './textsecure/Storage.preload.js'; -import { initMessageCleanup } from './services/messageStateCleanup.dom.js'; -import { MessageCache } from './services/MessageCache.preload.js'; -import { saveAndNotify } from './messages/saveAndNotify.preload.js'; -import { getBackupKeyHash } from './services/backups/crypto.preload.js'; +} from './types/Message2.preload.ts'; +import { JobCancelReason } from './jobs/types.std.ts'; +import { itemStorage } from './textsecure/Storage.preload.ts'; +import { initMessageCleanup } from './services/messageStateCleanup.dom.ts'; +import { MessageCache } from './services/MessageCache.preload.ts'; +import { saveAndNotify } from './messages/saveAndNotify.preload.ts'; +import { getBackupKeyHash } from './services/backups/crypto.preload.ts'; const { isNumber, throttle } = lodash; diff --git a/ts/badges/BadgeCategory.std.ts b/ts/badges/BadgeCategory.std.ts index be4053f935..a535ef36bb 100644 --- a/ts/badges/BadgeCategory.std.ts +++ b/ts/badges/BadgeCategory.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { makeEnumParser } from '../util/enum.std.js'; +import { makeEnumParser } from '../util/enum.std.ts'; // The server may return "testing", which we should parse as "other". export enum BadgeCategory { diff --git a/ts/badges/BadgeImageTheme.std.ts b/ts/badges/BadgeImageTheme.std.ts index 017199bdfa..35ab38ab23 100644 --- a/ts/badges/BadgeImageTheme.std.ts +++ b/ts/badges/BadgeImageTheme.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { makeEnumParser } from '../util/enum.std.js'; +import { makeEnumParser } from '../util/enum.std.ts'; export enum BadgeImageTheme { Light = 'light', diff --git a/ts/badges/badgeImageFileDownloader.preload.ts b/ts/badges/badgeImageFileDownloader.preload.ts index 4cd92a043e..7b0bff729b 100644 --- a/ts/badges/badgeImageFileDownloader.preload.ts +++ b/ts/badges/badgeImageFileDownloader.preload.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import PQueue from 'p-queue'; -import { DataWriter } from '../sql/Client.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { MINUTE } from '../util/durations/index.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { waitForOnline } from '../util/waitForOnline.dom.js'; -import { writeNewBadgeImageFileData } from '../util/migrations.preload.js'; -import { getBadgeImageFile, isOnline } from '../textsecure/WebAPI.preload.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { MINUTE } from '../util/durations/index.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { waitForOnline } from '../util/waitForOnline.dom.ts'; +import { writeNewBadgeImageFileData } from '../util/migrations.preload.ts'; +import { getBadgeImageFile, isOnline } from '../textsecure/WebAPI.preload.ts'; const log = createLogger('badgeImageFileDownloader'); diff --git a/ts/badges/getBadgeImageFileLocalPath.std.ts b/ts/badges/getBadgeImageFileLocalPath.std.ts index a35d157783..d47510cdcd 100644 --- a/ts/badges/getBadgeImageFileLocalPath.std.ts +++ b/ts/badges/getBadgeImageFileLocalPath.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import type { BadgeType } from './types.std.js'; -import { BadgeImageTheme } from './BadgeImageTheme.std.js'; +import type { BadgeType } from './types.std.ts'; +import { BadgeImageTheme } from './BadgeImageTheme.std.ts'; const { find, findLast, first, last } = lodash; diff --git a/ts/badges/isBadgeImageFileUrlValid.std.ts b/ts/badges/isBadgeImageFileUrlValid.std.ts index c8fe784bce..a10be7a279 100644 --- a/ts/badges/isBadgeImageFileUrlValid.std.ts +++ b/ts/badges/isBadgeImageFileUrlValid.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { maybeParseUrl } from '../util/url.std.js'; +import { maybeParseUrl } from '../util/url.std.ts'; export function isBadgeImageFileUrlValid( url: string, diff --git a/ts/badges/isBadgeVisible.std.ts b/ts/badges/isBadgeVisible.std.ts index 6b6da02cd8..b5ffb73af2 100644 --- a/ts/badges/isBadgeVisible.std.ts +++ b/ts/badges/isBadgeVisible.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { BadgeType } from './types.std.js'; +import type { BadgeType } from './types.std.ts'; export const isBadgeVisible = (badge: Readonly): boolean => 'isVisible' in badge ? badge.isVisible : true; diff --git a/ts/badges/parseBadgesFromServer.std.ts b/ts/badges/parseBadgesFromServer.std.ts index eee9fded75..20562a6d8f 100644 --- a/ts/badges/parseBadgesFromServer.std.ts +++ b/ts/badges/parseBadgesFromServer.std.ts @@ -3,16 +3,16 @@ import * as z from 'zod'; import lodash from 'lodash'; -import { isRecord } from '../util/isRecord.std.js'; -import { isNormalNumber } from '../util/isNormalNumber.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { BadgeType, BadgeImageType } from './types.std.js'; -import { parseBadgeCategory } from './BadgeCategory.std.js'; +import { isRecord } from '../util/isRecord.std.ts'; +import { isNormalNumber } from '../util/isNormalNumber.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { BadgeType, BadgeImageType } from './types.std.ts'; +import { parseBadgeCategory } from './BadgeCategory.std.ts'; import { BadgeImageTheme, parseBadgeImageTheme, -} from './BadgeImageTheme.std.js'; -import { safeParseUnknown } from '../util/schemas.std.js'; +} from './BadgeImageTheme.std.ts'; +import { safeParseUnknown } from '../util/schemas.std.ts'; const { isEmpty } = lodash; diff --git a/ts/badges/types.std.ts b/ts/badges/types.std.ts index 74f3e771bb..03950cb4a8 100644 --- a/ts/badges/types.std.ts +++ b/ts/badges/types.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { BadgeCategory } from './BadgeCategory.std.js'; -import type { BadgeImageTheme } from './BadgeImageTheme.std.js'; +import type { BadgeCategory } from './BadgeCategory.std.ts'; +import type { BadgeImageTheme } from './BadgeImageTheme.std.ts'; type SomeoneElsesBadgeType = Readonly<{ category: BadgeCategory; diff --git a/ts/calling/VideoSupport.preload.ts b/ts/calling/VideoSupport.preload.ts index 9d62ab4027..c6948717b0 100644 --- a/ts/calling/VideoSupport.preload.ts +++ b/ts/calling/VideoSupport.preload.ts @@ -4,8 +4,8 @@ import { videoPixelFormatToEnum } from '@signalapp/ringrtc'; import type { VideoFrameSender, VideoFrameSource } from '@signalapp/ringrtc'; import type { RefObject } from 'react'; -import { createLogger } from '../logging/log.std.js'; -import { toLogFormat } from '../types/errors.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; const log = createLogger('VideoSupport'); diff --git a/ts/calling/useGetCallingFrameBuffer.std.ts b/ts/calling/useGetCallingFrameBuffer.std.ts index 74a3d39637..407571febf 100644 --- a/ts/calling/useGetCallingFrameBuffer.std.ts +++ b/ts/calling/useGetCallingFrameBuffer.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { useRef, useCallback } from 'react'; -import { FRAME_BUFFER_SIZE } from './constants.std.js'; +import { FRAME_BUFFER_SIZE } from './constants.std.ts'; /** * A hook that returns a function. This function returns a "singleton" `ArrayBuffer` to be diff --git a/ts/challenge.dom.ts b/ts/challenge.dom.ts index e6c538c837..6b4f902b64 100644 --- a/ts/challenge.dom.ts +++ b/ts/challenge.dom.ts @@ -12,18 +12,18 @@ // are not immediately retried, however, until `.onOnline()` is called from // when we are actually online. -import { assertDev } from './util/assert.std.js'; -import { isOlderThan } from './util/timestamp.std.js'; -import { clearTimeoutIfNecessary } from './util/clearTimeoutIfNecessary.std.js'; -import { missingCaseError } from './util/missingCaseError.std.js'; +import { assertDev } from './util/assert.std.ts'; +import { isOlderThan } from './util/timestamp.std.ts'; +import { clearTimeoutIfNecessary } from './util/clearTimeoutIfNecessary.std.ts'; +import { missingCaseError } from './util/missingCaseError.std.ts'; import type { StorageInterface } from './types/Storage.d.ts'; -import * as Errors from './types/errors.std.js'; -import { HTTPError } from './types/HTTPError.std.js'; -import type { SendMessageChallengeData } from './textsecure/Errors.std.js'; -import { createLogger } from './logging/log.std.js'; -import { drop } from './util/drop.std.js'; -import { findRetryAfterTimeFromError } from './jobs/helpers/findRetryAfterTimeFromError.std.js'; -import { MINUTE } from './util/durations/index.std.js'; +import * as Errors from './types/errors.std.ts'; +import { HTTPError } from './types/HTTPError.std.ts'; +import type { SendMessageChallengeData } from './textsecure/Errors.std.ts'; +import { createLogger } from './logging/log.std.ts'; +import { drop } from './util/drop.std.ts'; +import { findRetryAfterTimeFromError } from './jobs/helpers/findRetryAfterTimeFromError.std.ts'; +import { MINUTE } from './util/durations/index.std.ts'; const log = createLogger('challenge'); diff --git a/ts/components/About.dom.stories.tsx b/ts/components/About.dom.stories.tsx index a93945a777..f3b6dfb856 100644 --- a/ts/components/About.dom.stories.tsx +++ b/ts/components/About.dom.stories.tsx @@ -3,9 +3,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import type { AboutProps } from './About.dom.js'; -import { About } from './About.dom.js'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import type { AboutProps } from './About.dom.tsx'; +import { About } from './About.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/About.dom.tsx b/ts/components/About.dom.tsx index 14eff03d0f..cef8401fd0 100644 --- a/ts/components/About.dom.tsx +++ b/ts/components/About.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; -import { tw } from '../axo/tw.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; +import { tw } from '../axo/tw.dom.tsx'; export type AboutProps = Readonly<{ closeAbout: () => unknown; diff --git a/ts/components/AddGroupMemberErrorDialog.dom.stories.tsx b/ts/components/AddGroupMemberErrorDialog.dom.stories.tsx index bf6a1ba1c1..46d57816f4 100644 --- a/ts/components/AddGroupMemberErrorDialog.dom.stories.tsx +++ b/ts/components/AddGroupMemberErrorDialog.dom.stories.tsx @@ -6,11 +6,11 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AddGroupMemberErrorDialog.dom.js'; +import type { PropsType } from './AddGroupMemberErrorDialog.dom.tsx'; import { AddGroupMemberErrorDialog, AddGroupMemberErrorDialogMode, -} from './AddGroupMemberErrorDialog.dom.js'; +} from './AddGroupMemberErrorDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/AddGroupMemberErrorDialog.dom.tsx b/ts/components/AddGroupMemberErrorDialog.dom.tsx index 2f9ba9f83c..dad575da77 100644 --- a/ts/components/AddGroupMemberErrorDialog.dom.tsx +++ b/ts/components/AddGroupMemberErrorDialog.dom.tsx @@ -4,9 +4,9 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Alert } from './Alert.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Alert } from './Alert.dom.tsx'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; export enum AddGroupMemberErrorDialogMode { MaximumGroupSize, diff --git a/ts/components/AddUserToAnotherGroupModal.dom.stories.tsx b/ts/components/AddUserToAnotherGroupModal.dom.stories.tsx index d8b7a668d4..a3a2ef3003 100644 --- a/ts/components/AddUserToAnotherGroupModal.dom.stories.tsx +++ b/ts/components/AddUserToAnotherGroupModal.dom.stories.tsx @@ -5,12 +5,12 @@ import React from 'react'; import type { Meta, StoryFn } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import type { Props } from './AddUserToAnotherGroupModal.dom.js'; +import type { Props } from './AddUserToAnotherGroupModal.dom.tsx'; import { getDefaultConversation, getDefaultGroup, -} from '../test-helpers/getDefaultConversation.std.js'; -import { AddUserToAnotherGroupModal } from './AddUserToAnotherGroupModal.dom.js'; +} from '../test-helpers/getDefaultConversation.std.ts'; +import { AddUserToAnotherGroupModal } from './AddUserToAnotherGroupModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/AddUserToAnotherGroupModal.dom.tsx b/ts/components/AddUserToAnotherGroupModal.dom.tsx index 954d156e2e..8b645a32b6 100644 --- a/ts/components/AddUserToAnotherGroupModal.dom.tsx +++ b/ts/components/AddUserToAnotherGroupModal.dom.tsx @@ -5,24 +5,24 @@ import lodash from 'lodash'; import React, { useCallback } from 'react'; import type { ListRowProps } from 'react-virtualized'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { filterAndSortConversations } from '../util/filterAndSortConversations.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import type { GroupListItemConversationType } from './conversationList/GroupListItem.dom.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { filterAndSortConversations } from '../util/filterAndSortConversations.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import type { GroupListItemConversationType } from './conversationList/GroupListItem.dom.tsx'; import { DisabledReason, GroupListItem, -} from './conversationList/GroupListItem.dom.js'; -import { Modal } from './Modal.dom.js'; -import { SearchInput } from './SearchInput.dom.js'; -import { useRestoreFocus } from '../hooks/useRestoreFocus.dom.js'; -import { ListView } from './ListView.dom.js'; -import { ListTile } from './ListTile.dom.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import { SizeObserver } from '../hooks/useSizeObserver.dom.js'; -import { strictAssert } from '../util/assert.std.js'; +} from './conversationList/GroupListItem.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { SearchInput } from './SearchInput.dom.tsx'; +import { useRestoreFocus } from '../hooks/useRestoreFocus.dom.ts'; +import { ListView } from './ListView.dom.tsx'; +import { ListTile } from './ListTile.dom.tsx'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import { SizeObserver } from '../hooks/useSizeObserver.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; const { pick } = lodash; diff --git a/ts/components/Alert.dom.stories.tsx b/ts/components/Alert.dom.stories.tsx index 7b076094f7..48c2d0378d 100644 --- a/ts/components/Alert.dom.stories.tsx +++ b/ts/components/Alert.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './Alert.dom.js'; -import { Alert } from './Alert.dom.js'; +import type { PropsType } from './Alert.dom.tsx'; +import { Alert } from './Alert.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/Alert.dom.tsx b/ts/components/Alert.dom.tsx index a910b83f31..09f239fe72 100644 --- a/ts/components/Alert.dom.tsx +++ b/ts/components/Alert.dom.tsx @@ -4,10 +4,10 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { Theme } from '../util/theme.std.js'; -import { Button } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { Theme } from '../util/theme.std.ts'; +import { Button } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; export type PropsType = { body: ReactNode; diff --git a/ts/components/AnimatedEmojiGalore.dom.stories.tsx b/ts/components/AnimatedEmojiGalore.dom.stories.tsx index 4d539645ca..df8ad5265e 100644 --- a/ts/components/AnimatedEmojiGalore.dom.stories.tsx +++ b/ts/components/AnimatedEmojiGalore.dom.stories.tsx @@ -5,8 +5,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AnimatedEmojiGalore.dom.js'; -import { AnimatedEmojiGalore } from './AnimatedEmojiGalore.dom.js'; +import type { PropsType } from './AnimatedEmojiGalore.dom.tsx'; +import { AnimatedEmojiGalore } from './AnimatedEmojiGalore.dom.tsx'; export default { title: 'Components/AnimatedEmojiGalore', diff --git a/ts/components/AnimatedEmojiGalore.dom.tsx b/ts/components/AnimatedEmojiGalore.dom.tsx index 0411fcde59..7013950742 100644 --- a/ts/components/AnimatedEmojiGalore.dom.tsx +++ b/ts/components/AnimatedEmojiGalore.dom.tsx @@ -4,14 +4,14 @@ import React from 'react'; import { animated, to as interpolate, useSprings } from '@react-spring/web'; import lodash from 'lodash'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; -import { FunStaticEmoji } from './fun/FunEmoji.dom.js'; -import { strictAssert } from '../util/assert.std.js'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; +import { FunStaticEmoji } from './fun/FunEmoji.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; import { getEmojiVariantByKey, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from './fun/data/emojis.std.js'; +} from './fun/data/emojis.std.ts'; const { random } = lodash; diff --git a/ts/components/AnnouncementsOnlyGroupBanner.dom.tsx b/ts/components/AnnouncementsOnlyGroupBanner.dom.tsx index fffe766822..145faabbce 100644 --- a/ts/components/AnnouncementsOnlyGroupBanner.dom.tsx +++ b/ts/components/AnnouncementsOnlyGroupBanner.dom.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; -import type { ShowConversationType } from '../state/ducks/conversations.preload.js'; -import { I18n } from './I18n.dom.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { GroupMemberLabel } from './conversation/ContactName.dom.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import { tw } from '../axo/tw.dom.js'; -import type { AdminMembershipType } from '../state/selectors/conversations.dom.js'; -import { UserText } from './UserText.dom.js'; -import type { ContactNameColorType } from '../types/Colors.std.js'; +import type { ShowConversationType } from '../state/ducks/conversations.preload.ts'; +import { I18n } from './I18n.dom.tsx'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { GroupMemberLabel } from './conversation/ContactName.dom.tsx'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import { tw } from '../axo/tw.dom.tsx'; +import type { AdminMembershipType } from '../state/selectors/conversations.dom.ts'; +import { UserText } from './UserText.dom.tsx'; +import type { ContactNameColorType } from '../types/Colors.std.ts'; type PropsType = { getPreferredBadge: PreferredBadgeSelectorType; diff --git a/ts/components/App.preload.tsx b/ts/components/App.preload.tsx index bdabbd63db..24bb50e139 100644 --- a/ts/components/App.preload.tsx +++ b/ts/components/App.preload.tsx @@ -4,14 +4,14 @@ import React, { useEffect } from 'react'; import classNames from 'classnames'; -import type { ViewStoryActionCreatorType } from '../state/ducks/stories.preload.js'; -import type { VerificationTransport } from '../types/VerificationTransport.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { type AppStateType, AppViewType } from '../state/ducks/app.preload.js'; -import { SmartInstallScreen } from '../state/smart/InstallScreen.preload.js'; -import { StandaloneRegistration } from './StandaloneRegistration.dom.js'; -import { usePageVisibility } from '../hooks/usePageVisibility.dom.js'; +import type { ViewStoryActionCreatorType } from '../state/ducks/stories.preload.ts'; +import type { VerificationTransport } from '../types/VerificationTransport.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { type AppStateType, AppViewType } from '../state/ducks/app.preload.ts'; +import { SmartInstallScreen } from '../state/smart/InstallScreen.preload.tsx'; +import { StandaloneRegistration } from './StandaloneRegistration.dom.tsx'; +import { usePageVisibility } from '../hooks/usePageVisibility.dom.ts'; type PropsType = { state: AppStateType; diff --git a/ts/components/AutoSizeInput.dom.stories.tsx b/ts/components/AutoSizeInput.dom.stories.tsx index 4d16f2b2ca..3217abbc39 100644 --- a/ts/components/AutoSizeInput.dom.stories.tsx +++ b/ts/components/AutoSizeInput.dom.stories.tsx @@ -4,8 +4,8 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AutoSizeInput.dom.js'; -import { AutoSizeInput } from './AutoSizeInput.dom.js'; +import type { PropsType } from './AutoSizeInput.dom.tsx'; +import { AutoSizeInput } from './AutoSizeInput.dom.tsx'; export default { title: 'Components/AutoSizeInput', diff --git a/ts/components/AutoSizeInput.dom.tsx b/ts/components/AutoSizeInput.dom.tsx index 061751f705..c37b659302 100644 --- a/ts/components/AutoSizeInput.dom.tsx +++ b/ts/components/AutoSizeInput.dom.tsx @@ -6,7 +6,7 @@ import React, { useCallback, useState, useEffect, useRef } from 'react'; import { createPortal } from 'react-dom'; import classNames from 'classnames'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; export type PropsType = Readonly<{ disableSpellcheck?: boolean; diff --git a/ts/components/AutoSizeTextArea.dom.tsx b/ts/components/AutoSizeTextArea.dom.tsx index f4c8bfb73d..fc53f90a0d 100644 --- a/ts/components/AutoSizeTextArea.dom.tsx +++ b/ts/components/AutoSizeTextArea.dom.tsx @@ -3,9 +3,9 @@ import type { ForwardedRef } from 'react'; import React, { forwardRef, useEffect, useLayoutEffect, useRef } from 'react'; import { mergeRefs } from '@react-aria/utils'; -import { strictAssert } from '../util/assert.std.js'; -import type { PropsType } from './Input.dom.js'; -import { Input } from './Input.dom.js'; +import { strictAssert } from '../util/assert.std.ts'; +import type { PropsType } from './Input.dom.tsx'; +import { Input } from './Input.dom.tsx'; export const AutoSizeTextArea = forwardRef(function AutoSizeTextArea( props: PropsType, diff --git a/ts/components/Avatar.dom.stories.tsx b/ts/components/Avatar.dom.stories.tsx index 43d5eaa5b4..ec9bd24b81 100644 --- a/ts/components/Avatar.dom.stories.tsx +++ b/ts/components/Avatar.dom.stories.tsx @@ -5,13 +5,13 @@ import type { Meta, StoryFn } from '@storybook/react'; import * as React from 'react'; import { action } from '@storybook/addon-actions'; import { expect, fn, within, userEvent } from '@storybook/test'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import type { Props } from './Avatar.dom.js'; -import { Avatar, AvatarBlur, AvatarSize } from './Avatar.dom.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import { HasStories } from '../types/Stories.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { getFakeBadge } from '../test-helpers/getFakeBadge.std.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import type { Props } from './Avatar.dom.tsx'; +import { Avatar, AvatarBlur, AvatarSize } from './Avatar.dom.tsx'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { HasStories } from '../types/Stories.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import { getFakeBadge } from '../test-helpers/getFakeBadge.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/Avatar.dom.tsx b/ts/components/Avatar.dom.tsx index f53b4e5f83..43739b294c 100644 --- a/ts/components/Avatar.dom.tsx +++ b/ts/components/Avatar.dom.tsx @@ -12,20 +12,20 @@ import classNames from 'classnames'; import lodash from 'lodash'; import { filterDOMProps } from '@react-aria/utils'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import type { BadgeType } from '../badges/types.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.js'; -import { HasStories } from '../types/Stories.std.js'; -import { Spinner } from './Spinner.dom.js'; -import { ThemeType } from '../types/Util.std.js'; -import { assertDev } from '../util/assert.std.js'; -import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath.std.js'; -import { getInitials } from '../util/getInitials.std.js'; -import { isBadgeVisible } from '../badges/isBadgeVisible.std.js'; -import { SIGNAL_AVATAR_PATH } from '../types/SignalConversation.std.js'; -import { getAvatarPlaceholderGradient } from '../utils/getAvatarPlaceholderGradient.std.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import type { BadgeType } from '../badges/types.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.ts'; +import { HasStories } from '../types/Stories.std.ts'; +import { Spinner } from './Spinner.dom.tsx'; +import { ThemeType } from '../types/Util.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath.std.ts'; +import { getInitials } from '../util/getInitials.std.ts'; +import { isBadgeVisible } from '../badges/isBadgeVisible.std.ts'; +import { SIGNAL_AVATAR_PATH } from '../types/SignalConversation.std.ts'; +import { getAvatarPlaceholderGradient } from '../utils/getAvatarPlaceholderGradient.std.ts'; const { noop } = lodash; diff --git a/ts/components/AvatarColorPicker.dom.stories.tsx b/ts/components/AvatarColorPicker.dom.stories.tsx index 9b21b11a90..0192d0a0fb 100644 --- a/ts/components/AvatarColorPicker.dom.stories.tsx +++ b/ts/components/AvatarColorPicker.dom.stories.tsx @@ -5,9 +5,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AvatarColorPicker.dom.js'; -import { AvatarColorPicker } from './AvatarColorPicker.dom.js'; -import { AvatarColors } from '../types/Colors.std.js'; +import type { PropsType } from './AvatarColorPicker.dom.tsx'; +import { AvatarColorPicker } from './AvatarColorPicker.dom.tsx'; +import { AvatarColors } from '../types/Colors.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/AvatarColorPicker.dom.tsx b/ts/components/AvatarColorPicker.dom.tsx index 3ddfbdf981..3870848717 100644 --- a/ts/components/AvatarColorPicker.dom.tsx +++ b/ts/components/AvatarColorPicker.dom.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { BetterAvatarBubble } from './BetterAvatarBubble.dom.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { BetterAvatarBubble } from './BetterAvatarBubble.dom.tsx'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/AvatarEditor.dom.stories.tsx b/ts/components/AvatarEditor.dom.stories.tsx index cf8ceffa6d..9ec2849e1d 100644 --- a/ts/components/AvatarEditor.dom.stories.tsx +++ b/ts/components/AvatarEditor.dom.stories.tsx @@ -5,11 +5,11 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { PropsType } from './AvatarEditor.dom.js'; -import { AvatarEditor } from './AvatarEditor.dom.js'; -import { getDefaultAvatars } from '../types/Avatar.std.js'; -import { createAvatarData } from '../util/createAvatarData.std.js'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { PropsType } from './AvatarEditor.dom.tsx'; +import { AvatarEditor } from './AvatarEditor.dom.tsx'; +import { getDefaultAvatars } from '../types/Avatar.std.ts'; +import { createAvatarData } from '../util/createAvatarData.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/AvatarEditor.dom.tsx b/ts/components/AvatarEditor.dom.tsx index 0101ca76e6..483b41d5dd 100644 --- a/ts/components/AvatarEditor.dom.tsx +++ b/ts/components/AvatarEditor.dom.tsx @@ -4,25 +4,25 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import lodash from 'lodash'; -import type { AvatarColorType } from '../types/Colors.std.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; import type { AvatarDataType, DeleteAvatarFromDiskActionType, ReplaceAvatarActionType, SaveAvatarToDiskActionType, -} from '../types/Avatar.std.js'; -import { AvatarIconEditor } from './AvatarIconEditor.dom.js'; -import { AvatarModalButtons } from './AvatarModalButtons.dom.js'; -import { AvatarPreview } from './AvatarPreview.dom.js'; -import { AvatarTextEditor } from './AvatarTextEditor.dom.js'; -import { AvatarUploadButton } from './AvatarUploadButton.dom.js'; -import { BetterAvatar } from './BetterAvatar.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { avatarDataToBytes } from '../util/avatarDataToBytes.dom.js'; -import { createAvatarData } from '../util/createAvatarData.std.js'; -import { isSameAvatarData } from '../util/isSameAvatarData.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; +} from '../types/Avatar.std.ts'; +import { AvatarIconEditor } from './AvatarIconEditor.dom.tsx'; +import { AvatarModalButtons } from './AvatarModalButtons.dom.tsx'; +import { AvatarPreview } from './AvatarPreview.dom.tsx'; +import { AvatarTextEditor } from './AvatarTextEditor.dom.tsx'; +import { AvatarUploadButton } from './AvatarUploadButton.dom.tsx'; +import { BetterAvatar } from './BetterAvatar.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { avatarDataToBytes } from '../util/avatarDataToBytes.dom.ts'; +import { createAvatarData } from '../util/createAvatarData.std.ts'; +import { isSameAvatarData } from '../util/isSameAvatarData.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; const { isEqual } = lodash; diff --git a/ts/components/AvatarIconEditor.dom.stories.tsx b/ts/components/AvatarIconEditor.dom.stories.tsx index ed3b7eb18a..65b0b76ca3 100644 --- a/ts/components/AvatarIconEditor.dom.stories.tsx +++ b/ts/components/AvatarIconEditor.dom.stories.tsx @@ -5,11 +5,11 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AvatarIconEditor.dom.js'; -import { AvatarIconEditor } from './AvatarIconEditor.dom.js'; -import { GroupAvatarIcons, PersonalAvatarIcons } from '../types/Avatar.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import { createAvatarData } from '../util/createAvatarData.std.js'; +import type { PropsType } from './AvatarIconEditor.dom.tsx'; +import { AvatarIconEditor } from './AvatarIconEditor.dom.tsx'; +import { GroupAvatarIcons, PersonalAvatarIcons } from '../types/Avatar.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { createAvatarData } from '../util/createAvatarData.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/AvatarIconEditor.dom.tsx b/ts/components/AvatarIconEditor.dom.tsx index 2cfa23dd69..d2bce1559d 100644 --- a/ts/components/AvatarIconEditor.dom.tsx +++ b/ts/components/AvatarIconEditor.dom.tsx @@ -3,13 +3,13 @@ import React, { useCallback, useEffect, useState } from 'react'; -import { AvatarColorPicker } from './AvatarColorPicker.dom.js'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import type { AvatarDataType } from '../types/Avatar.std.js'; -import { AvatarModalButtons } from './AvatarModalButtons.dom.js'; -import { AvatarPreview } from './AvatarPreview.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { avatarDataToBytes } from '../util/avatarDataToBytes.dom.js'; +import { AvatarColorPicker } from './AvatarColorPicker.dom.tsx'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import type { AvatarDataType } from '../types/Avatar.std.ts'; +import { AvatarModalButtons } from './AvatarModalButtons.dom.tsx'; +import { AvatarPreview } from './AvatarPreview.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { avatarDataToBytes } from '../util/avatarDataToBytes.dom.ts'; export type PropsType = { avatarData: AvatarDataType; diff --git a/ts/components/AvatarLightbox.dom.stories.tsx b/ts/components/AvatarLightbox.dom.stories.tsx index 764cce38ac..913f54b8be 100644 --- a/ts/components/AvatarLightbox.dom.stories.tsx +++ b/ts/components/AvatarLightbox.dom.stories.tsx @@ -4,10 +4,10 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { PropsType } from './AvatarLightbox.dom.js'; -import { AvatarLightbox } from './AvatarLightbox.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { PropsType } from './AvatarLightbox.dom.tsx'; +import { AvatarLightbox } from './AvatarLightbox.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/AvatarLightbox.dom.tsx b/ts/components/AvatarLightbox.dom.tsx index 32749a2e95..e01332130a 100644 --- a/ts/components/AvatarLightbox.dom.tsx +++ b/ts/components/AvatarLightbox.dom.tsx @@ -4,10 +4,10 @@ import React from 'react'; import lodash from 'lodash'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import { AvatarPreview } from './AvatarPreview.dom.js'; -import { Lightbox } from './Lightbox.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import { AvatarPreview } from './AvatarPreview.dom.tsx'; +import { Lightbox } from './Lightbox.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; const { noop } = lodash; diff --git a/ts/components/AvatarModalButtons.dom.stories.tsx b/ts/components/AvatarModalButtons.dom.stories.tsx index 854bd12165..27aa4c6091 100644 --- a/ts/components/AvatarModalButtons.dom.stories.tsx +++ b/ts/components/AvatarModalButtons.dom.stories.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AvatarModalButtons.dom.js'; -import { AvatarModalButtons } from './AvatarModalButtons.dom.js'; +import type { PropsType } from './AvatarModalButtons.dom.tsx'; +import { AvatarModalButtons } from './AvatarModalButtons.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/AvatarModalButtons.dom.tsx b/ts/components/AvatarModalButtons.dom.tsx index 794043adeb..43e83f125c 100644 --- a/ts/components/AvatarModalButtons.dom.tsx +++ b/ts/components/AvatarModalButtons.dom.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; -import { ConfirmDiscardDialog } from './ConfirmDiscardDialog.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; +import { ConfirmDiscardDialog } from './ConfirmDiscardDialog.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; export type PropsType = { hasChanges: boolean; diff --git a/ts/components/AvatarPreview.dom.stories.tsx b/ts/components/AvatarPreview.dom.stories.tsx index 9ea11a6037..653c934db2 100644 --- a/ts/components/AvatarPreview.dom.stories.tsx +++ b/ts/components/AvatarPreview.dom.stories.tsx @@ -7,9 +7,9 @@ import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AvatarPreview.dom.js'; -import { AvatarPreview } from './AvatarPreview.dom.js'; -import { AvatarColors } from '../types/Colors.std.js'; +import type { PropsType } from './AvatarPreview.dom.tsx'; +import { AvatarPreview } from './AvatarPreview.dom.tsx'; +import { AvatarColors } from '../types/Colors.std.ts'; const { chunk } = lodash; diff --git a/ts/components/AvatarPreview.dom.tsx b/ts/components/AvatarPreview.dom.tsx index 4a69dc11a5..6e932e0388 100644 --- a/ts/components/AvatarPreview.dom.tsx +++ b/ts/components/AvatarPreview.dom.tsx @@ -5,14 +5,14 @@ import type { CSSProperties } from 'react'; import React, { useEffect, useState } from 'react'; import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Spinner } from './Spinner.dom.js'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import { getInitials } from '../util/getInitials.std.js'; -import { imagePathToBytes } from '../util/imagePathToBytes.dom.js'; -import { type ConversationType } from '../state/ducks/conversations.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Spinner } from './Spinner.dom.tsx'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { getInitials } from '../util/getInitials.std.ts'; +import { imagePathToBytes } from '../util/imagePathToBytes.dom.ts'; +import { type ConversationType } from '../state/ducks/conversations.preload.ts'; const { noop } = lodash; diff --git a/ts/components/AvatarSpacer.dom.tsx b/ts/components/AvatarSpacer.dom.tsx index f0891dcb48..1ad6b1921f 100644 --- a/ts/components/AvatarSpacer.dom.tsx +++ b/ts/components/AvatarSpacer.dom.tsx @@ -3,7 +3,7 @@ import type { ReactElement } from 'react'; import React from 'react'; -import type { AvatarSize } from './Avatar.dom.js'; +import type { AvatarSize } from './Avatar.dom.tsx'; export function AvatarSpacer({ size, diff --git a/ts/components/AvatarTextEditor.dom.stories.tsx b/ts/components/AvatarTextEditor.dom.stories.tsx index 0aca846463..c92b1f066b 100644 --- a/ts/components/AvatarTextEditor.dom.stories.tsx +++ b/ts/components/AvatarTextEditor.dom.stories.tsx @@ -5,9 +5,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AvatarTextEditor.dom.js'; -import { AvatarTextEditor } from './AvatarTextEditor.dom.js'; -import { AvatarColors } from '../types/Colors.std.js'; +import type { PropsType } from './AvatarTextEditor.dom.tsx'; +import { AvatarTextEditor } from './AvatarTextEditor.dom.tsx'; +import { AvatarColors } from '../types/Colors.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/AvatarTextEditor.dom.tsx b/ts/components/AvatarTextEditor.dom.tsx index 3e8d14288f..6f1c0bb0be 100644 --- a/ts/components/AvatarTextEditor.dom.tsx +++ b/ts/components/AvatarTextEditor.dom.tsx @@ -11,19 +11,19 @@ import React, { } from 'react'; import lodash from 'lodash'; -import * as grapheme from '../util/grapheme.std.js'; -import { AvatarColorPicker } from './AvatarColorPicker.dom.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { AvatarDataType } from '../types/Avatar.std.js'; -import { AvatarModalButtons } from './AvatarModalButtons.dom.js'; -import { BetterAvatarBubble } from './BetterAvatarBubble.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { avatarDataToBytes } from '../util/avatarDataToBytes.dom.js'; -import { createAvatarData } from '../util/createAvatarData.std.js'; +import * as grapheme from '../util/grapheme.std.ts'; +import { AvatarColorPicker } from './AvatarColorPicker.dom.tsx'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { AvatarDataType } from '../types/Avatar.std.ts'; +import { AvatarModalButtons } from './AvatarModalButtons.dom.tsx'; +import { BetterAvatarBubble } from './BetterAvatarBubble.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { avatarDataToBytes } from '../util/avatarDataToBytes.dom.ts'; +import { createAvatarData } from '../util/createAvatarData.std.ts'; import { getFittedFontSize, getFontSizes, -} from '../util/avatarTextSizeCalculator.std.js'; +} from '../util/avatarTextSizeCalculator.std.ts'; const { noop } = lodash; diff --git a/ts/components/AvatarUploadButton.dom.stories.tsx b/ts/components/AvatarUploadButton.dom.stories.tsx index 6089ac6af2..1a18a0d9e5 100644 --- a/ts/components/AvatarUploadButton.dom.stories.tsx +++ b/ts/components/AvatarUploadButton.dom.stories.tsx @@ -5,8 +5,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AvatarUploadButton.dom.js'; -import { AvatarUploadButton } from './AvatarUploadButton.dom.js'; +import type { PropsType } from './AvatarUploadButton.dom.tsx'; +import { AvatarUploadButton } from './AvatarUploadButton.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/AvatarUploadButton.dom.tsx b/ts/components/AvatarUploadButton.dom.tsx index 6d5fbf0f03..2d43f4728e 100644 --- a/ts/components/AvatarUploadButton.dom.tsx +++ b/ts/components/AvatarUploadButton.dom.tsx @@ -5,8 +5,8 @@ import type { ChangeEventHandler } from 'react'; import React, { useEffect, useRef, useState } from 'react'; import lodash from 'lodash'; -import type { LocalizerType } from '../types/Util.std.js'; -import { processImageFile } from '../util/processImageFile.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { processImageFile } from '../util/processImageFile.dom.ts'; const { noop } = lodash; diff --git a/ts/components/BackfillFailureModal.dom.stories.tsx b/ts/components/BackfillFailureModal.dom.stories.tsx index ee56a9892b..eda327e01a 100644 --- a/ts/components/BackfillFailureModal.dom.stories.tsx +++ b/ts/components/BackfillFailureModal.dom.stories.tsx @@ -3,12 +3,12 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './BackfillFailureModal.dom.js'; +import type { PropsType } from './BackfillFailureModal.dom.tsx'; import { BackfillFailureModal, BackfillFailureKind, -} from './BackfillFailureModal.dom.js'; -import type { ComponentMeta } from '../storybook/types.std.js'; +} from './BackfillFailureModal.dom.tsx'; +import type { ComponentMeta } from '../storybook/types.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/BackfillFailureModal.dom.tsx b/ts/components/BackfillFailureModal.dom.tsx index 8352dbb6c7..267f83e7c6 100644 --- a/ts/components/BackfillFailureModal.dom.tsx +++ b/ts/components/BackfillFailureModal.dom.tsx @@ -3,10 +3,10 @@ import * as React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; export enum BackfillFailureKind { Timeout = 'Timeout', diff --git a/ts/components/BackupMediaDownloadCancelConfirmationDialog.dom.tsx b/ts/components/BackupMediaDownloadCancelConfirmationDialog.dom.tsx index ae2f87247d..45fd75f9e5 100644 --- a/ts/components/BackupMediaDownloadCancelConfirmationDialog.dom.tsx +++ b/ts/components/BackupMediaDownloadCancelConfirmationDialog.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { I18n } from './I18n.dom.js'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { I18n } from './I18n.dom.tsx'; const BACKUP_AND_RESTORE_SUPPORT_PAGE = 'https://support.signal.org/hc/articles/360007059752-Backup-and-Restore-Messages'; diff --git a/ts/components/BackupMediaDownloadProgress.dom.stories.tsx b/ts/components/BackupMediaDownloadProgress.dom.stories.tsx index 71cb99fc82..b0f7ef4735 100644 --- a/ts/components/BackupMediaDownloadProgress.dom.stories.tsx +++ b/ts/components/BackupMediaDownloadProgress.dom.stories.tsx @@ -5,9 +5,9 @@ import React, { type ComponentProps } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { BackupMediaDownloadProgress } from './BackupMediaDownloadProgress.dom.js'; -import { KIBIBYTE } from '../types/AttachmentSize.std.js'; -import { WidthBreakpoint } from './_util.std.js'; +import { BackupMediaDownloadProgress } from './BackupMediaDownloadProgress.dom.tsx'; +import { KIBIBYTE } from '../types/AttachmentSize.std.ts'; +import { WidthBreakpoint } from './_util.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/BackupMediaDownloadProgress.dom.tsx b/ts/components/BackupMediaDownloadProgress.dom.tsx index 4695ae9368..a9b1954274 100644 --- a/ts/components/BackupMediaDownloadProgress.dom.tsx +++ b/ts/components/BackupMediaDownloadProgress.dom.tsx @@ -3,13 +3,13 @@ import React, { useState } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { formatFileSize } from '../util/formatFileSize.std.js'; -import { SpinnerV2 } from './SpinnerV2.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { BackupMediaDownloadCancelConfirmationDialog } from './BackupMediaDownloadCancelConfirmationDialog.dom.js'; -import { LeftPaneDialog } from './LeftPaneDialog.dom.js'; -import { WidthBreakpoint } from './_util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { formatFileSize } from '../util/formatFileSize.std.ts'; +import { SpinnerV2 } from './SpinnerV2.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { BackupMediaDownloadCancelConfirmationDialog } from './BackupMediaDownloadCancelConfirmationDialog.dom.tsx'; +import { LeftPaneDialog } from './LeftPaneDialog.dom.tsx'; +import { WidthBreakpoint } from './_util.std.ts'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/BackupMediaDownloadProgressSettings.dom.tsx b/ts/components/BackupMediaDownloadProgressSettings.dom.tsx index d3c5190334..5002335802 100644 --- a/ts/components/BackupMediaDownloadProgressSettings.dom.tsx +++ b/ts/components/BackupMediaDownloadProgressSettings.dom.tsx @@ -3,12 +3,12 @@ import React, { useState } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { formatFileSize } from '../util/formatFileSize.std.js'; -import { roundFractionForProgressBar } from '../util/numbers.std.js'; -import { ProgressBar } from './ProgressBar.dom.js'; -import { Button, ButtonSize, ButtonVariant } from './Button.dom.js'; -import { BackupMediaDownloadCancelConfirmationDialog } from './BackupMediaDownloadCancelConfirmationDialog.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { formatFileSize } from '../util/formatFileSize.std.ts'; +import { roundFractionForProgressBar } from '../util/numbers.std.ts'; +import { ProgressBar } from './ProgressBar.dom.tsx'; +import { Button, ButtonSize, ButtonVariant } from './Button.dom.tsx'; +import { BackupMediaDownloadCancelConfirmationDialog } from './BackupMediaDownloadCancelConfirmationDialog.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/BadgeCarouselIndex.dom.tsx b/ts/components/BadgeCarouselIndex.dom.tsx index 49094ddf0a..6d53f25082 100644 --- a/ts/components/BadgeCarouselIndex.dom.tsx +++ b/ts/components/BadgeCarouselIndex.dom.tsx @@ -5,7 +5,7 @@ import React from 'react'; import classNames from 'classnames'; import lodash from 'lodash'; -import { strictAssert } from '../util/assert.std.js'; +import { strictAssert } from '../util/assert.std.ts'; const { times } = lodash; diff --git a/ts/components/BadgeDescription.dom.stories.tsx b/ts/components/BadgeDescription.dom.stories.tsx index c474900c89..0cc80f4812 100644 --- a/ts/components/BadgeDescription.dom.stories.tsx +++ b/ts/components/BadgeDescription.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './BadgeDescription.dom.js'; -import { BadgeDescription } from './BadgeDescription.dom.js'; +import type { Props } from './BadgeDescription.dom.tsx'; +import { BadgeDescription } from './BadgeDescription.dom.tsx'; export default { title: 'Components/BadgeDescription', diff --git a/ts/components/BadgeDescription.dom.tsx b/ts/components/BadgeDescription.dom.tsx index cc2efe2726..d2d8f0afcf 100644 --- a/ts/components/BadgeDescription.dom.tsx +++ b/ts/components/BadgeDescription.dom.tsx @@ -3,7 +3,7 @@ import type { ReactNode, ReactElement } from 'react'; import React from 'react'; -import { ContactName } from './conversation/ContactName.dom.js'; +import { ContactName } from './conversation/ContactName.dom.tsx'; export type Props = Readonly<{ firstName?: string; diff --git a/ts/components/BadgeDialog.dom.stories.tsx b/ts/components/BadgeDialog.dom.stories.tsx index 5da15afb4c..9c1d39a79e 100644 --- a/ts/components/BadgeDialog.dom.stories.tsx +++ b/ts/components/BadgeDialog.dom.stories.tsx @@ -9,11 +9,11 @@ import type { Meta } from '@storybook/react'; import { getFakeBadge, getFakeBadges, -} from '../test-helpers/getFakeBadge.std.js'; -import { repeat, zipObject } from '../util/iterables.std.js'; -import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.js'; -import type { PropsType } from './BadgeDialog.dom.js'; -import { BadgeDialog } from './BadgeDialog.dom.js'; +} from '../test-helpers/getFakeBadge.std.ts'; +import { repeat, zipObject } from '../util/iterables.std.ts'; +import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.ts'; +import type { PropsType } from './BadgeDialog.dom.tsx'; +import { BadgeDialog } from './BadgeDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/BadgeDialog.dom.tsx b/ts/components/BadgeDialog.dom.tsx index 8e8fcd0061..4874fc5ca2 100644 --- a/ts/components/BadgeDialog.dom.tsx +++ b/ts/components/BadgeDialog.dom.tsx @@ -4,16 +4,16 @@ import React, { useEffect, useState } from 'react'; import classNames from 'classnames'; -import { strictAssert } from '../util/assert.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { BadgeType } from '../badges/types.std.js'; -import { BadgeCategory } from '../badges/BadgeCategory.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonSize } from './Button.dom.js'; -import { BadgeDescription } from './BadgeDescription.dom.js'; -import { BadgeImage } from './BadgeImage.dom.js'; -import { BadgeCarouselIndex } from './BadgeCarouselIndex.dom.js'; -import { BadgeSustainerInstructionsDialog } from './BadgeSustainerInstructionsDialog.dom.js'; +import { strictAssert } from '../util/assert.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { BadgeType } from '../badges/types.std.ts'; +import { BadgeCategory } from '../badges/BadgeCategory.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonSize } from './Button.dom.tsx'; +import { BadgeDescription } from './BadgeDescription.dom.tsx'; +import { BadgeImage } from './BadgeImage.dom.tsx'; +import { BadgeCarouselIndex } from './BadgeCarouselIndex.dom.tsx'; +import { BadgeSustainerInstructionsDialog } from './BadgeSustainerInstructionsDialog.dom.tsx'; export type PropsType = Readonly<{ areWeASubscriber: boolean; diff --git a/ts/components/BadgeImage.dom.tsx b/ts/components/BadgeImage.dom.tsx index 914c8d1f10..7e8b1d2abe 100644 --- a/ts/components/BadgeImage.dom.tsx +++ b/ts/components/BadgeImage.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import type { BadgeType } from '../badges/types.std.js'; -import { Spinner } from './Spinner.dom.js'; -import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath.std.js'; -import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.js'; +import type { BadgeType } from '../badges/types.std.ts'; +import { Spinner } from './Spinner.dom.tsx'; +import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath.std.ts'; +import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.ts'; export function BadgeImage({ badge, diff --git a/ts/components/BadgeSustainerInstructionsDialog.dom.tsx b/ts/components/BadgeSustainerInstructionsDialog.dom.tsx index 7f8fdc6100..f7f89172ea 100644 --- a/ts/components/BadgeSustainerInstructionsDialog.dom.tsx +++ b/ts/components/BadgeSustainerInstructionsDialog.dom.tsx @@ -3,8 +3,8 @@ import type { ReactElement } from 'react'; import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; export function BadgeSustainerInstructionsDialog({ i18n, diff --git a/ts/components/BetterAvatar.dom.stories.tsx b/ts/components/BetterAvatar.dom.stories.tsx index 032b0de814..673b158516 100644 --- a/ts/components/BetterAvatar.dom.stories.tsx +++ b/ts/components/BetterAvatar.dom.stories.tsx @@ -6,11 +6,11 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { AvatarColors } from '../types/Colors.std.js'; -import { GroupAvatarIcons, PersonalAvatarIcons } from '../types/Avatar.std.js'; -import type { PropsType } from './BetterAvatar.dom.js'; -import { BetterAvatar } from './BetterAvatar.dom.js'; -import { createAvatarData } from '../util/createAvatarData.std.js'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { GroupAvatarIcons, PersonalAvatarIcons } from '../types/Avatar.std.ts'; +import type { PropsType } from './BetterAvatar.dom.tsx'; +import { BetterAvatar } from './BetterAvatar.dom.tsx'; +import { createAvatarData } from '../util/createAvatarData.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/BetterAvatar.dom.tsx b/ts/components/BetterAvatar.dom.tsx index 9681d49812..d7c999f4f0 100644 --- a/ts/components/BetterAvatar.dom.tsx +++ b/ts/components/BetterAvatar.dom.tsx @@ -4,11 +4,11 @@ import type { MouseEvent } from 'react'; import React, { useEffect, useState } from 'react'; import lodash from 'lodash'; -import type { AvatarDataType } from '../types/Avatar.std.js'; -import { BetterAvatarBubble } from './BetterAvatarBubble.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Spinner } from './Spinner.dom.js'; -import { avatarDataToBytes } from '../util/avatarDataToBytes.dom.js'; +import type { AvatarDataType } from '../types/Avatar.std.ts'; +import { BetterAvatarBubble } from './BetterAvatarBubble.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Spinner } from './Spinner.dom.tsx'; +import { avatarDataToBytes } from '../util/avatarDataToBytes.dom.ts'; const { noop } = lodash; diff --git a/ts/components/BetterAvatarBubble.dom.stories.tsx b/ts/components/BetterAvatarBubble.dom.stories.tsx index dfa5fe8e0f..107835e13f 100644 --- a/ts/components/BetterAvatarBubble.dom.stories.tsx +++ b/ts/components/BetterAvatarBubble.dom.stories.tsx @@ -6,9 +6,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { PropsType } from './BetterAvatarBubble.dom.js'; -import { BetterAvatarBubble } from './BetterAvatarBubble.dom.js'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { PropsType } from './BetterAvatarBubble.dom.tsx'; +import { BetterAvatarBubble } from './BetterAvatarBubble.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/BetterAvatarBubble.dom.tsx b/ts/components/BetterAvatarBubble.dom.tsx index a1e6c96cb7..8f2800b7e9 100644 --- a/ts/components/BetterAvatarBubble.dom.tsx +++ b/ts/components/BetterAvatarBubble.dom.tsx @@ -5,8 +5,8 @@ import type { CSSProperties, MouseEvent, ReactNode } from 'react'; import React from 'react'; import classNames from 'classnames'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; export type PropsType = { children?: ReactNode; diff --git a/ts/components/BrandedQRCode.dom.stories.tsx b/ts/components/BrandedQRCode.dom.stories.tsx index 9ed24efde9..5ca905723d 100644 --- a/ts/components/BrandedQRCode.dom.stories.tsx +++ b/ts/components/BrandedQRCode.dom.stories.tsx @@ -3,8 +3,8 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './BrandedQRCode.dom.js'; -import { BrandedQRCode } from './BrandedQRCode.dom.js'; +import type { PropsType } from './BrandedQRCode.dom.tsx'; +import { BrandedQRCode } from './BrandedQRCode.dom.tsx'; export default { title: 'Components/BrandedQRCode', diff --git a/ts/components/Button.dom.stories.tsx b/ts/components/Button.dom.stories.tsx index d2bdfe051d..917618ac30 100644 --- a/ts/components/Button.dom.stories.tsx +++ b/ts/components/Button.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './Button.dom.js'; -import { Button, ButtonSize, ButtonVariant } from './Button.dom.js'; +import type { PropsType } from './Button.dom.tsx'; +import { Button, ButtonSize, ButtonVariant } from './Button.dom.tsx'; export default { title: 'Components/Button', diff --git a/ts/components/Button.dom.tsx b/ts/components/Button.dom.tsx index 9bba5a0de9..a712897b69 100644 --- a/ts/components/Button.dom.tsx +++ b/ts/components/Button.dom.tsx @@ -10,9 +10,9 @@ import type { import React from 'react'; import classNames from 'classnames'; -import type { Theme } from '../util/theme.std.js'; -import { assertDev } from '../util/assert.std.js'; -import { themeClassName } from '../util/theme.std.js'; +import type { Theme } from '../util/theme.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import { themeClassName } from '../util/theme.std.ts'; export enum ButtonSize { Large, diff --git a/ts/components/CallDiagnosticWindow.dom.tsx b/ts/components/CallDiagnosticWindow.dom.tsx index 521a9b37e2..775494fdfb 100644 --- a/ts/components/CallDiagnosticWindow.dom.tsx +++ b/ts/components/CallDiagnosticWindow.dom.tsx @@ -3,10 +3,10 @@ import React, { useMemo } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { tw } from '../axo/tw.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; export type PropsType = { closeWindow: () => unknown; diff --git a/ts/components/CallLinkAddNameModal.dom.stories.tsx b/ts/components/CallLinkAddNameModal.dom.stories.tsx index 12cd2fea51..65b1644cb2 100644 --- a/ts/components/CallLinkAddNameModal.dom.stories.tsx +++ b/ts/components/CallLinkAddNameModal.dom.stories.tsx @@ -3,10 +3,10 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { CallLinkAddNameModalProps } from './CallLinkAddNameModal.dom.js'; -import { CallLinkAddNameModal } from './CallLinkAddNameModal.dom.js'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import { FAKE_CALL_LINK_WITH_ADMIN_KEY } from '../test-helpers/fakeCallLink.std.js'; +import type { CallLinkAddNameModalProps } from './CallLinkAddNameModal.dom.tsx'; +import { CallLinkAddNameModal } from './CallLinkAddNameModal.dom.tsx'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import { FAKE_CALL_LINK_WITH_ADMIN_KEY } from '../test-helpers/fakeCallLink.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallLinkAddNameModal.dom.tsx b/ts/components/CallLinkAddNameModal.dom.tsx index 7cf1215d55..c9729309ce 100644 --- a/ts/components/CallLinkAddNameModal.dom.tsx +++ b/ts/components/CallLinkAddNameModal.dom.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback, useMemo, useState } from 'react'; import { v4 as generateUuid } from 'uuid'; -import { Modal } from './Modal.dom.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { Input } from './Input.dom.js'; +import { Modal } from './Modal.dom.tsx'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { Input } from './Input.dom.tsx'; import { CallLinkNameMaxByteLength, CallLinkNameMaxLength, type CallLinkType, -} from '../types/CallLink.std.js'; -import { getColorForCallLink } from '../util/getColorForCallLink.std.js'; +} from '../types/CallLink.std.ts'; +import { getColorForCallLink } from '../util/getColorForCallLink.std.ts'; export type CallLinkAddNameModalProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/CallLinkDetails.dom.stories.tsx b/ts/components/CallLinkDetails.dom.stories.tsx index 412b0d6c05..c81a370d65 100644 --- a/ts/components/CallLinkDetails.dom.stories.tsx +++ b/ts/components/CallLinkDetails.dom.stories.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import type { CallLinkDetailsProps } from './CallLinkDetails.dom.js'; -import { CallLinkDetails } from './CallLinkDetails.dom.js'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import type { CallLinkDetailsProps } from './CallLinkDetails.dom.tsx'; +import { CallLinkDetails } from './CallLinkDetails.dom.tsx'; import { FAKE_CALL_LINK, FAKE_CALL_LINK_WITH_ADMIN_KEY, -} from '../test-helpers/fakeCallLink.std.js'; -import { getFakeCallLinkHistoryGroup } from '../test-helpers/getFakeCallHistoryGroup.std.js'; +} from '../test-helpers/fakeCallLink.std.ts'; +import { getFakeCallLinkHistoryGroup } from '../test-helpers/getFakeCallHistoryGroup.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallLinkDetails.dom.tsx b/ts/components/CallLinkDetails.dom.tsx index 24e5e1962a..0f883ef351 100644 --- a/ts/components/CallLinkDetails.dom.tsx +++ b/ts/components/CallLinkDetails.dom.tsx @@ -2,31 +2,31 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; import classNames from 'classnames'; -import type { CallHistoryGroup } from '../types/CallDisposition.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { CallHistoryGroupPanelSection } from './conversation/conversation-details/CallHistoryGroupPanelSection.dom.js'; -import { PanelSection } from './conversation/conversation-details/PanelSection.dom.js'; +import type { CallHistoryGroup } from '../types/CallDisposition.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { CallHistoryGroupPanelSection } from './conversation/conversation-details/CallHistoryGroupPanelSection.dom.tsx'; +import { PanelSection } from './conversation/conversation-details/PanelSection.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './conversation/conversation-details/ConversationDetailsIcon.dom.js'; -import { PanelRow } from './conversation/conversation-details/PanelRow.dom.js'; +} from './conversation/conversation-details/ConversationDetailsIcon.dom.tsx'; +import { PanelRow } from './conversation/conversation-details/PanelRow.dom.tsx'; import type { CallLinkRestrictions, CallLinkType, -} from '../types/CallLink.std.js'; -import { linkCallRoute } from '../util/signalRoutes.std.js'; -import { drop } from '../util/drop.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { Button, ButtonSize, ButtonVariant } from './Button.dom.js'; -import { copyCallLink } from '../util/copyLinksWithToast.dom.js'; -import { getColorForCallLink } from '../util/getColorForCallLink.std.js'; -import { isCallLinkAdmin } from '../types/CallLink.std.js'; -import { CallLinkRestrictionsSelect } from './CallLinkRestrictionsSelect.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { InAnotherCallTooltip } from './conversation/InAnotherCallTooltip.dom.js'; -import { offsetDistanceModifier } from '../util/popperUtil.std.js'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; +} from '../types/CallLink.std.ts'; +import { linkCallRoute } from '../util/signalRoutes.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { Button, ButtonSize, ButtonVariant } from './Button.dom.tsx'; +import { copyCallLink } from '../util/copyLinksWithToast.dom.ts'; +import { getColorForCallLink } from '../util/getColorForCallLink.std.ts'; +import { isCallLinkAdmin } from '../types/CallLink.std.ts'; +import { CallLinkRestrictionsSelect } from './CallLinkRestrictionsSelect.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { InAnotherCallTooltip } from './conversation/InAnotherCallTooltip.dom.tsx'; +import { offsetDistanceModifier } from '../util/popperUtil.std.ts'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; function toUrlWithoutProtocol(url: URL): string { return `${url.hostname}${url.pathname}${url.search}${url.hash}`; diff --git a/ts/components/CallLinkEditModal.dom.stories.tsx b/ts/components/CallLinkEditModal.dom.stories.tsx index 02de6e5dad..1f3bcea539 100644 --- a/ts/components/CallLinkEditModal.dom.stories.tsx +++ b/ts/components/CallLinkEditModal.dom.stories.tsx @@ -3,10 +3,10 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { CallLinkEditModalProps } from './CallLinkEditModal.dom.js'; -import { CallLinkEditModal } from './CallLinkEditModal.dom.js'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import { FAKE_CALL_LINK_WITH_ADMIN_KEY } from '../test-helpers/fakeCallLink.std.js'; +import type { CallLinkEditModalProps } from './CallLinkEditModal.dom.tsx'; +import { CallLinkEditModal } from './CallLinkEditModal.dom.tsx'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import { FAKE_CALL_LINK_WITH_ADMIN_KEY } from '../test-helpers/fakeCallLink.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallLinkEditModal.dom.tsx b/ts/components/CallLinkEditModal.dom.tsx index c42dd6fb9e..f0e4b5c0b8 100644 --- a/ts/components/CallLinkEditModal.dom.tsx +++ b/ts/components/CallLinkEditModal.dom.tsx @@ -4,18 +4,18 @@ import type { ReactNode } from 'react'; import React, { useMemo, useState } from 'react'; import { v4 as generateUuid } from 'uuid'; -import { Modal } from './Modal.dom.js'; -import type { LocalizerType } from '../types/I18N.std.js'; +import { Modal } from './Modal.dom.tsx'; +import type { LocalizerType } from '../types/I18N.std.ts'; import type { CallLinkRestrictions, CallLinkType, -} from '../types/CallLink.std.js'; -import { linkCallRoute } from '../util/signalRoutes.std.js'; -import { Button, ButtonSize, ButtonVariant } from './Button.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { getColorForCallLink } from '../util/getColorForCallLink.std.js'; -import { CallLinkRestrictionsSelect } from './CallLinkRestrictionsSelect.dom.js'; -import { InAnotherCallTooltip } from './conversation/InAnotherCallTooltip.dom.js'; +} from '../types/CallLink.std.ts'; +import { linkCallRoute } from '../util/signalRoutes.std.ts'; +import { Button, ButtonSize, ButtonVariant } from './Button.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { getColorForCallLink } from '../util/getColorForCallLink.std.ts'; +import { CallLinkRestrictionsSelect } from './CallLinkRestrictionsSelect.dom.tsx'; +import { InAnotherCallTooltip } from './conversation/InAnotherCallTooltip.dom.tsx'; const CallLinkEditModalRowIconClasses = { Edit: 'CallLinkEditModal__RowIcon--Edit', diff --git a/ts/components/CallLinkPendingParticipantModal.dom.stories.tsx b/ts/components/CallLinkPendingParticipantModal.dom.stories.tsx index ed71beae87..2771dcec83 100644 --- a/ts/components/CallLinkPendingParticipantModal.dom.stories.tsx +++ b/ts/components/CallLinkPendingParticipantModal.dom.stories.tsx @@ -3,10 +3,10 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { CallLinkPendingParticipantModalProps } from './CallLinkPendingParticipantModal.dom.js'; -import { CallLinkPendingParticipantModal } from './CallLinkPendingParticipantModal.dom.js'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import type { CallLinkPendingParticipantModalProps } from './CallLinkPendingParticipantModal.dom.tsx'; +import { CallLinkPendingParticipantModal } from './CallLinkPendingParticipantModal.dom.tsx'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallLinkPendingParticipantModal.dom.tsx b/ts/components/CallLinkPendingParticipantModal.dom.tsx index 0306cc2b7d..3a9fa9906b 100644 --- a/ts/components/CallLinkPendingParticipantModal.dom.tsx +++ b/ts/components/CallLinkPendingParticipantModal.dom.tsx @@ -2,18 +2,18 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback, useMemo } from 'react'; -import { Modal } from './Modal.dom.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import type { PendingUserActionPayloadType } from '../state/ducks/calling.preload.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { InContactsIcon } from './InContactsIcon.dom.js'; -import { isInSystemContacts } from '../util/isInSystemContacts.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { Theme } from '../util/theme.std.js'; -import { UserText } from './UserText.dom.js'; -import { SharedGroupNames } from './SharedGroupNames.dom.js'; -import type { ContactModalStateType } from '../types/globalModals.std.js'; +import { Modal } from './Modal.dom.tsx'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import type { PendingUserActionPayloadType } from '../state/ducks/calling.preload.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { InContactsIcon } from './InContactsIcon.dom.tsx'; +import { isInSystemContacts } from '../util/isInSystemContacts.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import { Theme } from '../util/theme.std.ts'; +import { UserText } from './UserText.dom.tsx'; +import { SharedGroupNames } from './SharedGroupNames.dom.tsx'; +import type { ContactModalStateType } from '../types/globalModals.std.ts'; export type CallLinkPendingParticipantModalProps = { readonly i18n: LocalizerType; diff --git a/ts/components/CallLinkRestrictionsSelect.dom.tsx b/ts/components/CallLinkRestrictionsSelect.dom.tsx index aa506e2037..983c96fa8a 100644 --- a/ts/components/CallLinkRestrictionsSelect.dom.tsx +++ b/ts/components/CallLinkRestrictionsSelect.dom.tsx @@ -4,9 +4,9 @@ import React from 'react'; import { CallLinkRestrictions, toCallLinkRestrictions, -} from '../types/CallLink.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { Select } from './Select.dom.js'; +} from '../types/CallLink.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { Select } from './Select.dom.tsx'; export type CallLinkRestrictionsSelectProps = Readonly<{ disabled?: boolean; diff --git a/ts/components/CallManager.dom.stories.tsx b/ts/components/CallManager.dom.stories.tsx index df79b671e0..63144ecd0f 100644 --- a/ts/components/CallManager.dom.stories.tsx +++ b/ts/components/CallManager.dom.stories.tsx @@ -4,35 +4,35 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CallManager.dom.js'; -import { CallManager } from './CallManager.dom.js'; +import type { PropsType } from './CallManager.dom.tsx'; +import { CallManager } from './CallManager.dom.tsx'; import { CallEndedReason, CallState, CallViewMode, GroupCallConnectionState, GroupCallJoinState, -} from '../types/Calling.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; +} from '../types/Calling.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; import type { ActiveGroupCallType, GroupCallRemoteParticipantType, -} from '../types/Calling.std.js'; +} from '../types/Calling.std.ts'; import type { ConversationType, ConversationTypeType, -} from '../state/ducks/conversations.preload.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.std.js'; -import { StorySendMode } from '../types/Stories.std.js'; +} from '../state/ducks/conversations.preload.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.std.ts'; +import { StorySendMode } from '../types/Stories.std.ts'; import { FAKE_CALL_LINK, FAKE_CALL_LINK_WITH_ADMIN_KEY, getDefaultCallLinkConversation, -} from '../test-helpers/fakeCallLink.std.js'; -import { allRemoteParticipants } from './CallScreen.dom.stories.js'; +} from '../test-helpers/fakeCallLink.std.ts'; +import { allRemoteParticipants } from './CallScreen.dom.stories.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallManager.dom.tsx b/ts/components/CallManager.dom.tsx index d8cee15ab0..85a2a8762b 100644 --- a/ts/components/CallManager.dom.tsx +++ b/ts/components/CallManager.dom.tsx @@ -4,26 +4,26 @@ import React, { useCallback, useEffect } from 'react'; import lodash from 'lodash'; import type { VideoFrameSource } from '@signalapp/ringrtc'; -import { CallNeedPermissionScreen } from './CallNeedPermissionScreen.dom.js'; -import { CallScreen } from './CallScreen.dom.js'; -import { CallingLobby } from './CallingLobby.dom.js'; -import { CallingParticipantsList } from './CallingParticipantsList.dom.js'; -import { CallingSelectPresentingSourcesModal } from './CallingSelectPresentingSourcesModal.dom.js'; -import { CallingPip } from './CallingPip.dom.js'; -import { IncomingCallBar } from './IncomingCallBar.dom.js'; +import { CallNeedPermissionScreen } from './CallNeedPermissionScreen.dom.tsx'; +import { CallScreen } from './CallScreen.dom.tsx'; +import { CallingLobby } from './CallingLobby.dom.tsx'; +import { CallingParticipantsList } from './CallingParticipantsList.dom.tsx'; +import { CallingSelectPresentingSourcesModal } from './CallingSelectPresentingSourcesModal.dom.tsx'; +import { CallingPip } from './CallingPip.dom.tsx'; +import { IncomingCallBar } from './IncomingCallBar.dom.tsx'; import type { ActiveCallType, CallViewMode, GroupCallConnectionState, GroupCallVideoRequest, -} from '../types/Calling.std.js'; +} from '../types/Calling.std.ts'; import { CallEndedReason, CallState, GroupCallJoinState, -} from '../types/Calling.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +} from '../types/Calling.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; import type { AcceptCallType, BatchUserActionPayloadType, @@ -39,27 +39,27 @@ import type { SetLocalVideoType, SetRendererCanvasType, StartCallType, -} from '../state/ducks/calling.preload.js'; -import { CallLinkRestrictions } from '../types/CallLink.std.js'; -import type { CallLinkType } from '../types/CallLink.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { CallingToastProvider } from './CallingToast.dom.js'; -import type { SmartReactionPicker } from '../state/smart/ReactionPicker.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.js'; -import { CallingAdhocCallInfo } from './CallingAdhocCallInfo.dom.js'; -import { callLinkRootKeyToUrl } from '../util/callLinkRootKeyToUrl.std.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { copyCallLink } from '../util/copyLinksWithToast.dom.js'; +} from '../state/ducks/calling.preload.ts'; +import { CallLinkRestrictions } from '../types/CallLink.std.ts'; +import type { CallLinkType } from '../types/CallLink.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { CallingToastProvider } from './CallingToast.dom.tsx'; +import type { SmartReactionPicker } from '../state/smart/ReactionPicker.dom.tsx'; +import { createLogger } from '../logging/log.std.ts'; +import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.ts'; +import { CallingAdhocCallInfo } from './CallingAdhocCallInfo.dom.tsx'; +import { callLinkRootKeyToUrl } from '../util/callLinkRootKeyToUrl.std.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { copyCallLink } from '../util/copyLinksWithToast.dom.ts'; import { redactNotificationProfileId, shouldNotify, -} from '../types/NotificationProfile.std.js'; -import type { NotificationProfileType } from '../types/NotificationProfile.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import type { SetLocalPreviewContainerType } from '../services/calling.preload.js'; -import type { ContactModalStateType } from '../types/globalModals.std.js'; +} from '../types/NotificationProfile.std.ts'; +import type { NotificationProfileType } from '../types/NotificationProfile.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import type { SetLocalPreviewContainerType } from '../services/calling.preload.ts'; +import type { ContactModalStateType } from '../types/globalModals.std.ts'; const { noop } = lodash; diff --git a/ts/components/CallNeedPermissionScreen.dom.stories.tsx b/ts/components/CallNeedPermissionScreen.dom.stories.tsx index 509ce6ebc4..cff0d49239 100644 --- a/ts/components/CallNeedPermissionScreen.dom.stories.tsx +++ b/ts/components/CallNeedPermissionScreen.dom.stories.tsx @@ -3,10 +3,10 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import type { Props } from './CallNeedPermissionScreen.dom.js'; -import { CallNeedPermissionScreen } from './CallNeedPermissionScreen.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import type { Props } from './CallNeedPermissionScreen.dom.tsx'; +import { CallNeedPermissionScreen } from './CallNeedPermissionScreen.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallNeedPermissionScreen.dom.tsx b/ts/components/CallNeedPermissionScreen.dom.tsx index d0cca1423d..d892883358 100644 --- a/ts/components/CallNeedPermissionScreen.dom.tsx +++ b/ts/components/CallNeedPermissionScreen.dom.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useRef, useEffect } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { I18n } from './I18n.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; export type Props = { conversation: Pick< diff --git a/ts/components/CallParticipantCount.dom.tsx b/ts/components/CallParticipantCount.dom.tsx index 6bc85c01dc..8376afa892 100644 --- a/ts/components/CallParticipantCount.dom.tsx +++ b/ts/components/CallParticipantCount.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; export type PropsType = { callMode: CallMode.Group | CallMode.Adhoc; diff --git a/ts/components/CallQualitySurvey.dom.stories.tsx b/ts/components/CallQualitySurvey.dom.stories.tsx index 82a352a5e5..7e300a4654 100644 --- a/ts/components/CallQualitySurvey.dom.stories.tsx +++ b/ts/components/CallQualitySurvey.dom.stories.tsx @@ -3,7 +3,7 @@ import type { Meta } from '@storybook/react'; import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; -import { CallQualitySurveyDialog } from './CallQualitySurveyDialog.dom.js'; +import { CallQualitySurveyDialog } from './CallQualitySurveyDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallQualitySurveyDialog.dom.tsx b/ts/components/CallQualitySurveyDialog.dom.tsx index bc90713ef3..85654b175d 100644 --- a/ts/components/CallQualitySurveyDialog.dom.tsx +++ b/ts/components/CallQualitySurveyDialog.dom.tsx @@ -1,17 +1,17 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback, useId, useMemo, useState } from 'react'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { AxoSymbol } from '../axo/AxoSymbol.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; -import { CallQualitySurvey } from '../types/CallQualitySurvey.std.js'; -import { tw } from '../axo/tw.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { AxoCheckbox } from '../axo/AxoCheckbox.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; -import { I18n } from './I18n.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { AxoSymbol } from '../axo/AxoSymbol.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; +import { CallQualitySurvey } from '../types/CallQualitySurvey.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { AxoCheckbox } from '../axo/AxoCheckbox.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; import Issue = CallQualitySurvey.Issue; diff --git a/ts/components/CallReactionBurst.dom.tsx b/ts/components/CallReactionBurst.dom.tsx index 108bc7d7bd..fcaa5dda09 100644 --- a/ts/components/CallReactionBurst.dom.tsx +++ b/ts/components/CallReactionBurst.dom.tsx @@ -12,8 +12,8 @@ import React, { } from 'react'; import { createPortal } from 'react-dom'; import { v4 as uuid } from 'uuid'; -import { useIsMounted } from '../hooks/useIsMounted.std.js'; -import { CallReactionBurstEmoji } from './CallReactionBurstEmoji.dom.js'; +import { useIsMounted } from '../hooks/useIsMounted.std.ts'; +import { CallReactionBurstEmoji } from './CallReactionBurstEmoji.dom.tsx'; const LIFETIME = 3000; diff --git a/ts/components/CallReactionBurstEmoji.dom.tsx b/ts/components/CallReactionBurstEmoji.dom.tsx index d4809939ca..58faf0458a 100644 --- a/ts/components/CallReactionBurstEmoji.dom.tsx +++ b/ts/components/CallReactionBurstEmoji.dom.tsx @@ -5,8 +5,8 @@ import React from 'react'; import { animated, useSpring } from '@react-spring/web'; import lodash from 'lodash'; import { v4 as uuid } from 'uuid'; -import { Emojify } from './conversation/Emojify.dom.js'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; +import { Emojify } from './conversation/Emojify.dom.tsx'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; const { random } = lodash; diff --git a/ts/components/CallScreen.dom.stories.tsx b/ts/components/CallScreen.dom.stories.tsx index f5138fc9b9..9ab08d48dd 100644 --- a/ts/components/CallScreen.dom.stories.tsx +++ b/ts/components/CallScreen.dom.stories.tsx @@ -11,32 +11,32 @@ import type { ActiveGroupCallType, GroupCallRemoteParticipantType, ObservedRemoteMuteType, -} from '../types/Calling.std.js'; +} from '../types/Calling.std.ts'; import { CallViewMode, CallState, GroupCallConnectionState, GroupCallJoinState, -} from '../types/Calling.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { PropsType } from './CallScreen.dom.js'; -import { CallScreen as UnwrappedCallScreen } from './CallScreen.dom.js'; -import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +} from '../types/Calling.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { PropsType } from './CallScreen.dom.tsx'; +import { CallScreen as UnwrappedCallScreen } from './CallScreen.dom.tsx'; +import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; import { getAvatarPath, getDefaultConversation, getDefaultConversationWithServiceId, -} from '../test-helpers/getDefaultConversation.std.js'; -import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.std.js'; -import { CallingToastProvider, useCallingToasts } from './CallingToast.dom.js'; -import type { CallingImageDataCache } from './CallManager.dom.js'; -import { MINUTE } from '../util/durations/index.std.js'; -import { strictAssert } from '../util/assert.std.js'; +} from '../test-helpers/getDefaultConversation.std.ts'; +import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.std.ts'; +import { CallingToastProvider, useCallingToasts } from './CallingToast.dom.tsx'; +import type { CallingImageDataCache } from './CallManager.dom.tsx'; +import { MINUTE } from '../util/durations/index.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; const { sample, shuffle, times } = lodash; diff --git a/ts/components/CallScreen.dom.tsx b/ts/components/CallScreen.dom.tsx index d899cdb584..fdeb0118b8 100644 --- a/ts/components/CallScreen.dom.tsx +++ b/ts/components/CallScreen.dom.tsx @@ -16,82 +16,82 @@ import type { SetLocalVideoType, SetRendererCanvasType, SetMutedByType, -} from '../state/ducks/calling.preload.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; +} from '../state/ducks/calling.preload.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; import { CallingHeader, getCallViewIconClassname, -} from './CallingHeader.dom.js'; -import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo.dom.js'; -import { CallingButton, CallingButtonType } from './CallingButton.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { TooltipPlacement } from './Tooltip.dom.js'; -import { CallBackgroundBlur } from './CallBackgroundBlur.dom.js'; +} from './CallingHeader.dom.tsx'; +import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo.dom.tsx'; +import { CallingButton, CallingButtonType } from './CallingButton.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { TooltipPlacement } from './Tooltip.dom.tsx'; +import { CallBackgroundBlur } from './CallBackgroundBlur.dom.tsx'; import type { ActiveCallType, ActiveCallReactionsType, ConversationsByDemuxIdType, GroupCallVideoRequest, -} from '../types/Calling.std.js'; +} from '../types/Calling.std.ts'; import { CALLING_REACTIONS_LIFETIME, CallViewMode, CallState, GroupCallConnectionState, GroupCallJoinState, -} from '../types/Calling.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +} from '../types/Calling.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; import { CallingButtonToastsContainer, useScreenSharingStoppedToast, -} from './CallingToastManager.dom.js'; -import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant.dom.js'; -import { GroupCallRemoteParticipants } from './GroupCallRemoteParticipants.dom.js'; -import { CallParticipantCount } from './CallParticipantCount.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { NeedsScreenRecordingPermissionsModal } from './NeedsScreenRecordingPermissionsModal.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import * as KeyboardLayout from '../services/keyboardLayout.dom.js'; +} from './CallingToastManager.dom.tsx'; +import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant.dom.tsx'; +import { GroupCallRemoteParticipants } from './GroupCallRemoteParticipants.dom.tsx'; +import { CallParticipantCount } from './CallParticipantCount.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { NeedsScreenRecordingPermissionsModal } from './NeedsScreenRecordingPermissionsModal.dom.tsx'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import * as KeyboardLayout from '../services/keyboardLayout.dom.ts'; import { usePresenter, useActivateSpeakerViewOnPresenting, -} from '../hooks/useActivateSpeakerViewOnPresenting.std.js'; +} from '../hooks/useActivateSpeakerViewOnPresenting.std.ts'; import { CallingAudioIndicator, SPEAKING_LINGER_MS, -} from './CallingAudioIndicator.dom.js'; +} from './CallingAudioIndicator.dom.tsx'; import { useActiveCallShortcuts, useKeyboardShortcuts, -} from '../hooks/useKeyboardShortcuts.dom.js'; -import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate.std.js'; -import { isReconnecting as callingIsReconnecting } from '../util/callingIsReconnecting.std.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; +} from '../hooks/useKeyboardShortcuts.dom.tsx'; +import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate.std.ts'; +import { isReconnecting as callingIsReconnecting } from '../util/callingIsReconnecting.std.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; import { CallingToastProvider, PersistentCallingToast, useCallingToasts, -} from './CallingToast.dom.js'; -import { handleOutsideClick } from '../util/handleOutsideClick.dom.js'; -import { Spinner } from './Spinner.dom.js'; -import type { SmartReactionPicker } from '../state/smart/ReactionPicker.dom.js'; +} from './CallingToast.dom.tsx'; +import { handleOutsideClick } from '../util/handleOutsideClick.dom.ts'; +import { Spinner } from './Spinner.dom.tsx'; +import type { SmartReactionPicker } from '../state/smart/ReactionPicker.dom.tsx'; import { CallingRaisedHandsList, CallingRaisedHandsListButton, -} from './CallingRaisedHandsList.dom.js'; -import type { CallReactionBurstType } from './CallReactionBurst.dom.js'; +} from './CallingRaisedHandsList.dom.tsx'; +import type { CallReactionBurstType } from './CallReactionBurst.dom.tsx'; import { CallReactionBurstProvider, useCallReactionBursts, -} from './CallReactionBurst.dom.js'; -import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.js'; -import { assertDev } from '../util/assert.std.js'; -import { CallingPendingParticipants } from './CallingPendingParticipants.dom.js'; -import type { CallingImageDataCache } from './CallManager.dom.js'; -import { FunStaticEmoji } from './fun/FunEmoji.dom.js'; +} from './CallReactionBurst.dom.tsx'; +import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import { CallingPendingParticipants } from './CallingPendingParticipants.dom.tsx'; +import type { CallingImageDataCache } from './CallManager.dom.tsx'; +import { FunStaticEmoji } from './fun/FunEmoji.dom.tsx'; import { getEmojiDebugLabel, getEmojiParentByKey, @@ -99,19 +99,19 @@ import { getEmojiVariantByKey, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from './fun/data/emojis.std.js'; -import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer.dom.js'; +} from './fun/data/emojis.std.ts'; +import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer.dom.tsx'; import { BeforeNavigateResponse, beforeNavigateService, -} from '../services/BeforeNavigate.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { SetLocalPreviewContainerType } from '../services/calling.preload.js'; -import type { SizeCallbackType } from '../calling/VideoSupport.preload.js'; +} from '../services/BeforeNavigate.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { SetLocalPreviewContainerType } from '../services/calling.preload.ts'; +import type { SizeCallbackType } from '../calling/VideoSupport.preload.ts'; import { PIP_MAXIMUM_LOCAL_VIDEO_HEIGHT_MULTIPLIER, PIP_MINIMUM_LOCAL_VIDEO_HEIGHT_MULTIPLIER, -} from './CallingPip.dom.js'; +} from './CallingPip.dom.tsx'; const { isEqual, noop } = lodash; diff --git a/ts/components/CallingAdhocCallInfo.dom.stories.tsx b/ts/components/CallingAdhocCallInfo.dom.stories.tsx index d2c19c5358..cc1fa3cc4d 100644 --- a/ts/components/CallingAdhocCallInfo.dom.stories.tsx +++ b/ts/components/CallingAdhocCallInfo.dom.stories.tsx @@ -6,14 +6,14 @@ import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CallingAdhocCallInfo.dom.js'; -import { CallingAdhocCallInfo } from './CallingAdhocCallInfo.dom.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { GroupCallRemoteParticipantType } from '../types/Calling.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import type { CallLinkType } from '../types/CallLink.std.js'; -import { CallLinkRestrictions } from '../types/CallLink.std.js'; +import type { PropsType } from './CallingAdhocCallInfo.dom.tsx'; +import { CallingAdhocCallInfo } from './CallingAdhocCallInfo.dom.tsx'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { GroupCallRemoteParticipantType } from '../types/Calling.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import type { CallLinkType } from '../types/CallLink.std.ts'; +import { CallLinkRestrictions } from '../types/CallLink.std.ts'; const { sample } = lodash; diff --git a/ts/components/CallingAdhocCallInfo.dom.tsx b/ts/components/CallingAdhocCallInfo.dom.tsx index 369202b574..0af138f587 100644 --- a/ts/components/CallingAdhocCallInfo.dom.tsx +++ b/ts/components/CallingAdhocCallInfo.dom.tsx @@ -5,21 +5,21 @@ import React from 'react'; import classNames from 'classnames'; import lodash from 'lodash'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import { InContactsIcon } from './InContactsIcon.dom.js'; -import type { CallLinkType } from '../types/CallLink.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { sortByTitle } from '../util/sortByTitle.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { ModalHost } from './ModalHost.dom.js'; -import { isInSystemContacts } from '../util/isInSystemContacts.std.js'; -import { AVATAR_COLOR_COUNT, AvatarColors } from '../types/Colors.std.js'; -import { Button } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; -import { Theme } from '../util/theme.std.js'; -import type { ContactModalStateType } from '../types/globalModals.std.js'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import { InContactsIcon } from './InContactsIcon.dom.tsx'; +import type { CallLinkType } from '../types/CallLink.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { sortByTitle } from '../util/sortByTitle.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { ModalHost } from './ModalHost.dom.tsx'; +import { isInSystemContacts } from '../util/isInSystemContacts.std.ts'; +import { AVATAR_COLOR_COUNT, AvatarColors } from '../types/Colors.std.ts'; +import { Button } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import type { ContactModalStateType } from '../types/globalModals.std.ts'; const { partition } = lodash; diff --git a/ts/components/CallingAudioIndicator.dom.stories.tsx b/ts/components/CallingAudioIndicator.dom.stories.tsx index 63a374731a..c6cb5e4555 100644 --- a/ts/components/CallingAudioIndicator.dom.stories.tsx +++ b/ts/components/CallingAudioIndicator.dom.stories.tsx @@ -3,13 +3,13 @@ import React, { useState, useEffect } from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './CallingAudioIndicator.dom.js'; +import type { Props } from './CallingAudioIndicator.dom.tsx'; import { CallingAudioIndicator, SPEAKING_LINGER_MS, -} from './CallingAudioIndicator.dom.js'; -import { AUDIO_LEVEL_INTERVAL_MS } from '../calling/constants.std.js'; -import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate.std.js'; +} from './CallingAudioIndicator.dom.tsx'; +import { AUDIO_LEVEL_INTERVAL_MS } from '../calling/constants.std.ts'; +import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate.std.ts'; export default { title: 'Components/CallingAudioIndicator', diff --git a/ts/components/CallingAudioIndicator.dom.tsx b/ts/components/CallingAudioIndicator.dom.tsx index 8cf8fd864e..73386e92a6 100644 --- a/ts/components/CallingAudioIndicator.dom.tsx +++ b/ts/components/CallingAudioIndicator.dom.tsx @@ -6,8 +6,8 @@ import type { ReactElement } from 'react'; import React, { useEffect } from 'react'; import { useSpring, animated } from '@react-spring/web'; -import { AUDIO_LEVEL_INTERVAL_MS } from '../calling/constants.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import { AUDIO_LEVEL_INTERVAL_MS } from '../calling/constants.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; export const SPEAKING_LINGER_MS = 200; const BASE_CLASS_NAME = 'CallingAudioIndicator'; diff --git a/ts/components/CallingButton.dom.stories.tsx b/ts/components/CallingButton.dom.stories.tsx index bb9324abbe..b9ed46b2c2 100644 --- a/ts/components/CallingButton.dom.stories.tsx +++ b/ts/components/CallingButton.dom.stories.tsx @@ -4,9 +4,9 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CallingButton.dom.js'; -import { CallingButton, CallingButtonType } from './CallingButton.dom.js'; -import { TooltipPlacement } from './Tooltip.dom.js'; +import type { PropsType } from './CallingButton.dom.tsx'; +import { CallingButton, CallingButtonType } from './CallingButton.dom.tsx'; +import { TooltipPlacement } from './Tooltip.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallingButton.dom.tsx b/ts/components/CallingButton.dom.tsx index f9a709881a..8e987d86a3 100644 --- a/ts/components/CallingButton.dom.tsx +++ b/ts/components/CallingButton.dom.tsx @@ -4,10 +4,10 @@ import React, { useMemo } from 'react'; import classNames from 'classnames'; import { v4 as uuid } from 'uuid'; -import type { TooltipPlacement } from './Tooltip.dom.js'; -import { Tooltip } from './Tooltip.dom.js'; -import { Theme } from '../util/theme.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { TooltipPlacement } from './Tooltip.dom.tsx'; +import { Tooltip } from './Tooltip.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; export enum CallingButtonType { AUDIO_DISABLED = 'AUDIO_DISABLED', diff --git a/ts/components/CallingDeviceSelection.dom.stories.tsx b/ts/components/CallingDeviceSelection.dom.stories.tsx index 675cdf3cc3..824e98c347 100644 --- a/ts/components/CallingDeviceSelection.dom.stories.tsx +++ b/ts/components/CallingDeviceSelection.dom.stories.tsx @@ -5,8 +5,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './CallingDeviceSelection.dom.js'; -import { CallingDeviceSelection } from './CallingDeviceSelection.dom.js'; +import type { Props } from './CallingDeviceSelection.dom.tsx'; +import { CallingDeviceSelection } from './CallingDeviceSelection.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallingDeviceSelection.dom.tsx b/ts/components/CallingDeviceSelection.dom.tsx index 0425d0535a..9e1c4667a0 100644 --- a/ts/components/CallingDeviceSelection.dom.tsx +++ b/ts/components/CallingDeviceSelection.dom.tsx @@ -4,16 +4,16 @@ import * as React from 'react'; import type { AudioDevice } from '@signalapp/ringrtc'; -import type { Option } from './Select.dom.js'; -import { Modal } from './Modal.dom.js'; -import { Select } from './Select.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { Option } from './Select.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { Select } from './Select.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; import type { ChangeIODevicePayloadType, MediaDeviceSettings, -} from '../types/Calling.std.js'; -import { CallingDeviceType } from '../types/Calling.std.js'; -import { Theme } from '../util/theme.std.js'; +} from '../types/Calling.std.ts'; +import { CallingDeviceType } from '../types/Calling.std.ts'; +import { Theme } from '../util/theme.std.ts'; export type Props = MediaDeviceSettings & { changeIODevice: (payload: ChangeIODevicePayloadType) => void; diff --git a/ts/components/CallingHeader.dom.stories.tsx b/ts/components/CallingHeader.dom.stories.tsx index 763a05346f..845215842f 100644 --- a/ts/components/CallingHeader.dom.stories.tsx +++ b/ts/components/CallingHeader.dom.stories.tsx @@ -4,9 +4,9 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CallingHeader.dom.js'; -import { CallingHeader } from './CallingHeader.dom.js'; -import { CallViewMode } from '../types/Calling.std.js'; +import type { PropsType } from './CallingHeader.dom.tsx'; +import { CallingHeader } from './CallingHeader.dom.tsx'; +import { CallViewMode } from '../types/Calling.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallingHeader.dom.tsx b/ts/components/CallingHeader.dom.tsx index 89d7b9efff..0ec209e1b0 100644 --- a/ts/components/CallingHeader.dom.tsx +++ b/ts/components/CallingHeader.dom.tsx @@ -3,11 +3,11 @@ import classNames from 'classnames'; import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { CallViewMode } from '../types/Calling.std.js'; -import { Tooltip } from './Tooltip.dom.js'; -import { Theme } from '../util/theme.std.js'; -import { ContextMenu } from './ContextMenu.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { CallViewMode } from '../types/Calling.std.ts'; +import { Tooltip } from './Tooltip.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import { ContextMenu } from './ContextMenu.dom.tsx'; export type PropsType = { callViewMode?: CallViewMode; diff --git a/ts/components/CallingLobby.dom.stories.tsx b/ts/components/CallingLobby.dom.stories.tsx index c38e599f40..89b0b351f5 100644 --- a/ts/components/CallingLobby.dom.stories.tsx +++ b/ts/components/CallingLobby.dom.stories.tsx @@ -7,18 +7,18 @@ import { action } from '@storybook/addon-actions'; import { v4 as generateUuid } from 'uuid'; import type { Meta } from '@storybook/react'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { PropsType } from './CallingLobby.dom.js'; -import { CallingLobby as UnwrappedCallingLobby } from './CallingLobby.dom.js'; -import { generateAci } from '../types/ServiceId.std.js'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { PropsType } from './CallingLobby.dom.tsx'; +import { CallingLobby as UnwrappedCallingLobby } from './CallingLobby.dom.tsx'; +import { generateAci } from '../types/ServiceId.std.ts'; import { getDefaultConversation, getDefaultConversationWithServiceId, -} from '../test-helpers/getDefaultConversation.std.js'; -import { CallingToastProvider } from './CallingToast.dom.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import { getDefaultCallLinkConversation } from '../test-helpers/fakeCallLink.std.js'; +} from '../test-helpers/getDefaultConversation.std.ts'; +import { CallingToastProvider } from './CallingToast.dom.tsx'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import { getDefaultCallLinkConversation } from '../test-helpers/fakeCallLink.std.ts'; const { times } = lodash; diff --git a/ts/components/CallingLobby.dom.tsx b/ts/components/CallingLobby.dom.tsx index bd3f9ad048..5cc402e759 100644 --- a/ts/components/CallingLobby.dom.tsx +++ b/ts/components/CallingLobby.dom.tsx @@ -7,28 +7,28 @@ import { FocusScope } from 'react-aria'; import type { SetLocalAudioType, SetLocalVideoType, -} from '../state/ducks/calling.preload.js'; -import { CallingButton, CallingButtonType } from './CallingButton.dom.js'; -import { TooltipPlacement } from './Tooltip.dom.js'; -import { CallBackgroundBlur } from './CallBackgroundBlur.dom.js'; -import { CallParticipantCount } from './CallParticipantCount.dom.js'; -import { CallingHeader } from './CallingHeader.dom.js'; -import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo.dom.js'; +} from '../state/ducks/calling.preload.ts'; +import { CallingButton, CallingButtonType } from './CallingButton.dom.tsx'; +import { TooltipPlacement } from './Tooltip.dom.tsx'; +import { CallBackgroundBlur } from './CallBackgroundBlur.dom.tsx'; +import { CallParticipantCount } from './CallParticipantCount.dom.tsx'; +import { CallingHeader } from './CallingHeader.dom.tsx'; +import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo.dom.tsx'; import { CallingLobbyJoinButton, CallingLobbyJoinButtonVariant, -} from './CallingLobbyJoinButton.dom.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import type { CallingConversationType } from '../types/Calling.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import * as KeyboardLayout from '../services/keyboardLayout.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { useCallingToasts } from './CallingToast.dom.js'; -import { CallingButtonToastsContainer } from './CallingToastManager.dom.js'; -import { isGroupOrAdhocCallMode } from '../util/isGroupOrAdhocCall.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { SpinnerV2 } from './SpinnerV2.dom.js'; -import type { SetLocalPreviewContainerType } from '../services/calling.preload.js'; +} from './CallingLobbyJoinButton.dom.tsx'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import type { CallingConversationType } from '../types/Calling.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import * as KeyboardLayout from '../services/keyboardLayout.dom.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { useCallingToasts } from './CallingToast.dom.tsx'; +import { CallingButtonToastsContainer } from './CallingToastManager.dom.tsx'; +import { isGroupOrAdhocCallMode } from '../util/isGroupOrAdhocCall.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { SpinnerV2 } from './SpinnerV2.dom.tsx'; +import type { SetLocalPreviewContainerType } from '../services/calling.preload.ts'; export type PropsType = { availableCameras: Array; diff --git a/ts/components/CallingLobbyJoinButton.dom.tsx b/ts/components/CallingLobbyJoinButton.dom.tsx index b7f6ccc0fe..3471d6cab6 100644 --- a/ts/components/CallingLobbyJoinButton.dom.tsx +++ b/ts/components/CallingLobbyJoinButton.dom.tsx @@ -5,9 +5,9 @@ import type { ReactNode } from 'react'; import React, { useState } from 'react'; import lodash from 'lodash'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Spinner } from './Spinner.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/CallingParticipantsList.dom.stories.tsx b/ts/components/CallingParticipantsList.dom.stories.tsx index 7ea8587f91..506888bc32 100644 --- a/ts/components/CallingParticipantsList.dom.stories.tsx +++ b/ts/components/CallingParticipantsList.dom.stories.tsx @@ -6,10 +6,10 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CallingParticipantsList.dom.js'; -import { CallingParticipantsList } from './CallingParticipantsList.dom.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import { createCallParticipant } from '../test-helpers/createCallParticipant.std.js'; +import type { PropsType } from './CallingParticipantsList.dom.tsx'; +import { CallingParticipantsList } from './CallingParticipantsList.dom.tsx'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { createCallParticipant } from '../test-helpers/createCallParticipant.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallingParticipantsList.dom.tsx b/ts/components/CallingParticipantsList.dom.tsx index 6cf4803434..bac473895d 100644 --- a/ts/components/CallingParticipantsList.dom.tsx +++ b/ts/components/CallingParticipantsList.dom.tsx @@ -5,16 +5,16 @@ import React, { useContext } from 'react'; import { createPortal } from 'react-dom'; import classNames from 'classnames'; import { FocusScope } from 'react-aria'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import { InContactsIcon } from './InContactsIcon.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { sortByTitle } from '../util/sortByTitle.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { isInSystemContacts } from '../util/isInSystemContacts.std.js'; -import { ModalContainerContext } from './ModalHost.dom.js'; -import type { ContactModalStateType } from '../types/globalModals.std.js'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import { InContactsIcon } from './InContactsIcon.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { sortByTitle } from '../util/sortByTitle.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { isInSystemContacts } from '../util/isInSystemContacts.std.ts'; +import { ModalContainerContext } from './ModalHost.dom.tsx'; +import type { ContactModalStateType } from '../types/globalModals.std.ts'; type ParticipantType = ConversationType & { hasRemoteAudio?: boolean; diff --git a/ts/components/CallingPendingParticipants.dom.stories.tsx b/ts/components/CallingPendingParticipants.dom.stories.tsx index 9e06b97a79..baca4f624d 100644 --- a/ts/components/CallingPendingParticipants.dom.stories.tsx +++ b/ts/components/CallingPendingParticipants.dom.stories.tsx @@ -4,10 +4,10 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CallingPendingParticipants.dom.js'; -import { CallingPendingParticipants } from './CallingPendingParticipants.dom.js'; -import { allRemoteParticipants } from './CallScreen.dom.stories.js'; -import { strictAssert } from '../util/assert.std.js'; +import type { PropsType } from './CallingPendingParticipants.dom.tsx'; +import { CallingPendingParticipants } from './CallingPendingParticipants.dom.tsx'; +import { allRemoteParticipants } from './CallScreen.dom.stories.tsx'; +import { strictAssert } from '../util/assert.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallingPendingParticipants.dom.tsx b/ts/components/CallingPendingParticipants.dom.tsx index e0138e5ecd..320fe0c320 100644 --- a/ts/components/CallingPendingParticipants.dom.tsx +++ b/ts/components/CallingPendingParticipants.dom.tsx @@ -6,22 +6,22 @@ import lodash from 'lodash'; import classNames from 'classnames'; import { AnimatePresence, motion } from 'motion/react'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import { InContactsIcon } from './InContactsIcon.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { isInSystemContacts } from '../util/isInSystemContacts.std.js'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import { InContactsIcon } from './InContactsIcon.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { isInSystemContacts } from '../util/isInSystemContacts.std.ts'; import type { BatchUserActionPayloadType, PendingUserActionPayloadType, -} from '../state/ducks/calling.preload.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { handleOutsideClick } from '../util/handleOutsideClick.dom.js'; -import { Theme } from '../util/theme.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; +} from '../state/ducks/calling.preload.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { handleOutsideClick } from '../util/handleOutsideClick.dom.ts'; +import { Theme } from '../util/theme.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; const { noop } = lodash; diff --git a/ts/components/CallingPip.dom.stories.tsx b/ts/components/CallingPip.dom.stories.tsx index 1fafdbc14f..eca6795b7f 100644 --- a/ts/components/CallingPip.dom.stories.tsx +++ b/ts/components/CallingPip.dom.stories.tsx @@ -5,24 +5,24 @@ import * as React from 'react'; import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { PropsType } from './CallingPip.dom.js'; -import { CallingPip } from './CallingPip.dom.js'; -import type { ActiveDirectCallType } from '../types/Calling.std.js'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { PropsType } from './CallingPip.dom.tsx'; +import { CallingPip } from './CallingPip.dom.tsx'; +import type { ActiveDirectCallType } from '../types/Calling.std.ts'; import { CallViewMode, CallState, GroupCallConnectionState, GroupCallJoinState, -} from '../types/Calling.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.std.js'; -import { MINUTE } from '../util/durations/index.std.js'; -import type { SetRendererCanvasType } from '../state/ducks/calling.preload.js'; -import { createCallParticipant } from '../test-helpers/createCallParticipant.std.js'; -import type { SetLocalPreviewContainerType } from '../services/calling.preload.js'; +} from '../types/Calling.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.std.ts'; +import { MINUTE } from '../util/durations/index.std.ts'; +import type { SetRendererCanvasType } from '../state/ducks/calling.preload.ts'; +import { createCallParticipant } from '../test-helpers/createCallParticipant.std.ts'; +import type { SetLocalPreviewContainerType } from '../services/calling.preload.ts'; const { times } = lodash; diff --git a/ts/components/CallingPip.dom.tsx b/ts/components/CallingPip.dom.tsx index 62c50b4e90..8c8a123307 100644 --- a/ts/components/CallingPip.dom.tsx +++ b/ts/components/CallingPip.dom.tsx @@ -7,29 +7,29 @@ import lodash, { clamp } from 'lodash'; import type { VideoFrameSource } from '@signalapp/ringrtc'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.js'; -import { useActivateSpeakerViewOnPresenting } from '../hooks/useActivateSpeakerViewOnPresenting.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import { TooltipPlacement } from './Tooltip.dom.js'; -import { CallingButton, CallingButtonType } from './CallingButton.dom.js'; -import { CallingPipRemoteVideo } from './CallingPipRemoteVideo.dom.js'; -import { CallBackgroundBlur } from './CallBackgroundBlur.dom.js'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.ts'; +import { useActivateSpeakerViewOnPresenting } from '../hooks/useActivateSpeakerViewOnPresenting.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import { TooltipPlacement } from './Tooltip.dom.tsx'; +import { CallingButton, CallingButtonType } from './CallingButton.dom.tsx'; +import { CallingPipRemoteVideo } from './CallingPipRemoteVideo.dom.tsx'; +import { CallBackgroundBlur } from './CallBackgroundBlur.dom.tsx'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; import type { ActiveCallType, GroupCallVideoRequest, -} from '../types/Calling.std.js'; -import type { SetRendererCanvasType } from '../state/ducks/calling.preload.js'; -import type { CallingImageDataCache } from './CallManager.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { SetLocalPreviewContainerType } from '../services/calling.preload.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import type { SizeCallbackType } from '../calling/VideoSupport.preload.js'; -import { MAX_FRAME_HEIGHT } from '../calling/constants.std.js'; +} from '../types/Calling.std.ts'; +import type { SetRendererCanvasType } from '../state/ducks/calling.preload.ts'; +import type { CallingImageDataCache } from './CallManager.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { SetLocalPreviewContainerType } from '../services/calling.preload.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import type { SizeCallbackType } from '../calling/VideoSupport.preload.ts'; +import { MAX_FRAME_HEIGHT } from '../calling/constants.std.ts'; const { minBy, debounce, noop } = lodash; diff --git a/ts/components/CallingPipRemoteVideo.dom.tsx b/ts/components/CallingPipRemoteVideo.dom.tsx index 05d429cb6e..cbcf6a5fe4 100644 --- a/ts/components/CallingPipRemoteVideo.dom.tsx +++ b/ts/components/CallingPipRemoteVideo.dom.tsx @@ -4,34 +4,34 @@ import React, { useEffect } from 'react'; import lodash from 'lodash'; import type { VideoFrameSource } from '@signalapp/ringrtc'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { CallBackgroundBlur } from './CallBackgroundBlur.dom.js'; -import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant.dom.js'; -import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { CallBackgroundBlur } from './CallBackgroundBlur.dom.tsx'; +import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant.dom.tsx'; +import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; import { GroupCallJoinState, type ActiveCallType, type GroupCallRemoteParticipantType, type GroupCallVideoRequest, -} from '../types/Calling.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { SetRendererCanvasType } from '../state/ducks/calling.preload.js'; -import { useGetCallingFrameBuffer } from '../calling/useGetCallingFrameBuffer.std.js'; -import { MAX_FRAME_HEIGHT } from '../calling/constants.std.js'; -import { usePageVisibility } from '../hooks/usePageVisibility.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { nonRenderedRemoteParticipant } from '../util/ringrtc/nonRenderedRemoteParticipant.std.js'; -import { isReconnecting } from '../util/callingIsReconnecting.std.js'; -import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.js'; -import { assertDev } from '../util/assert.std.js'; -import type { CallingImageDataCache } from './CallManager.dom.js'; +} from '../types/Calling.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { SetRendererCanvasType } from '../state/ducks/calling.preload.ts'; +import { useGetCallingFrameBuffer } from '../calling/useGetCallingFrameBuffer.std.ts'; +import { MAX_FRAME_HEIGHT } from '../calling/constants.std.ts'; +import { usePageVisibility } from '../hooks/usePageVisibility.dom.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { nonRenderedRemoteParticipant } from '../util/ringrtc/nonRenderedRemoteParticipant.std.ts'; +import { isReconnecting } from '../util/callingIsReconnecting.std.ts'; +import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import type { CallingImageDataCache } from './CallManager.dom.tsx'; import { PIP_MAXIMUM_HEIGHT_MULTIPLIER, PIP_MINIMUM_HEIGHT_MULTIPLIER, PIP_WIDTH_NORMAL, -} from './CallingPip.dom.js'; +} from './CallingPip.dom.tsx'; const { clamp, isNumber, maxBy } = lodash; diff --git a/ts/components/CallingPreCallInfo.dom.stories.tsx b/ts/components/CallingPreCallInfo.dom.stories.tsx index 20ba4e2805..194f3b802f 100644 --- a/ts/components/CallingPreCallInfo.dom.stories.tsx +++ b/ts/components/CallingPreCallInfo.dom.stories.tsx @@ -3,13 +3,13 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import type { PropsType } from './CallingPreCallInfo.dom.js'; -import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import { FAKE_CALL_LINK } from '../test-helpers/fakeCallLink.std.js'; -import { callLinkToConversation } from '../util/callLinks.std.js'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import type { PropsType } from './CallingPreCallInfo.dom.tsx'; +import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { FAKE_CALL_LINK } from '../test-helpers/fakeCallLink.std.ts'; +import { callLinkToConversation } from '../util/callLinks.std.ts'; const { i18n } = window.SignalContext; const getDefaultGroupConversation = () => diff --git a/ts/components/CallingPreCallInfo.dom.tsx b/ts/components/CallingPreCallInfo.dom.tsx index e27ebeaad7..54ea62d46b 100644 --- a/ts/components/CallingPreCallInfo.dom.tsx +++ b/ts/components/CallingPreCallInfo.dom.tsx @@ -3,13 +3,13 @@ import React from 'react'; import lodash from 'lodash'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { CallingConversationType } from '../types/Calling.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { getParticipantName } from '../util/callingGetParticipantName.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { UserText } from './UserText.dom.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { CallingConversationType } from '../types/Calling.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { getParticipantName } from '../util/callingGetParticipantName.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { UserText } from './UserText.dom.tsx'; const { partition } = lodash; diff --git a/ts/components/CallingRaisedHandsList.dom.stories.tsx b/ts/components/CallingRaisedHandsList.dom.stories.tsx index beb2e6227e..0653e2b619 100644 --- a/ts/components/CallingRaisedHandsList.dom.stories.tsx +++ b/ts/components/CallingRaisedHandsList.dom.stories.tsx @@ -9,14 +9,14 @@ import type { Meta } from '@storybook/react'; import type { CallingRaisedHandsListButtonPropsType, PropsType, -} from './CallingRaisedHandsList.dom.js'; +} from './CallingRaisedHandsList.dom.tsx'; import { CallingRaisedHandsList, CallingRaisedHandsListButton, -} from './CallingRaisedHandsList.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import { getDefaultConversationWithServiceId } from '../test-helpers/getDefaultConversation.std.js'; +} from './CallingRaisedHandsList.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { getDefaultConversationWithServiceId } from '../test-helpers/getDefaultConversation.std.ts'; const { times } = lodash; diff --git a/ts/components/CallingRaisedHandsList.dom.tsx b/ts/components/CallingRaisedHandsList.dom.tsx index c7838c84e1..cbded176f3 100644 --- a/ts/components/CallingRaisedHandsList.dom.tsx +++ b/ts/components/CallingRaisedHandsList.dom.tsx @@ -4,17 +4,17 @@ import React, { useEffect, useRef } from 'react'; import { animated, useSpring } from '@react-spring/web'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import type { ConversationsByDemuxIdType } from '../types/Calling.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { ModalHost } from './ModalHost.dom.js'; -import { drop } from '../util/drop.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import type { ConversationsByDemuxIdType } from '../types/Calling.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { ModalHost } from './ModalHost.dom.tsx'; +import { drop } from '../util/drop.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; const log = createLogger('CallingRaisedHandsList'); diff --git a/ts/components/CallingScreenSharingController.dom.stories.tsx b/ts/components/CallingScreenSharingController.dom.stories.tsx index d5ce8862fb..d2b4531675 100644 --- a/ts/components/CallingScreenSharingController.dom.stories.tsx +++ b/ts/components/CallingScreenSharingController.dom.stories.tsx @@ -5,10 +5,10 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CallingScreenSharingController.dom.js'; -import { CallingScreenSharingController } from './CallingScreenSharingController.dom.js'; +import type { PropsType } from './CallingScreenSharingController.dom.tsx'; +import { CallingScreenSharingController } from './CallingScreenSharingController.dom.tsx'; -import { ScreenShareStatus } from '../types/Calling.std.js'; +import { ScreenShareStatus } from '../types/Calling.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallingScreenSharingController.dom.tsx b/ts/components/CallingScreenSharingController.dom.tsx index b7098d751a..b53d60422a 100644 --- a/ts/components/CallingScreenSharingController.dom.tsx +++ b/ts/components/CallingScreenSharingController.dom.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import { Button, ButtonVariant } from './Button.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ScreenShareStatus } from '../types/Calling.std.js'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ScreenShareStatus } from '../types/Calling.std.ts'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/CallingSelectPresentingSourcesModal.dom.stories.tsx b/ts/components/CallingSelectPresentingSourcesModal.dom.stories.tsx index d2878fdb12..ddbaa31d4f 100644 --- a/ts/components/CallingSelectPresentingSourcesModal.dom.stories.tsx +++ b/ts/components/CallingSelectPresentingSourcesModal.dom.stories.tsx @@ -5,8 +5,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CallingSelectPresentingSourcesModal.dom.js'; -import { CallingSelectPresentingSourcesModal } from './CallingSelectPresentingSourcesModal.dom.js'; +import type { PropsType } from './CallingSelectPresentingSourcesModal.dom.tsx'; +import { CallingSelectPresentingSourcesModal } from './CallingSelectPresentingSourcesModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/CallingSelectPresentingSourcesModal.dom.tsx b/ts/components/CallingSelectPresentingSourcesModal.dom.tsx index 5fb4893b4f..328c4fca84 100644 --- a/ts/components/CallingSelectPresentingSourcesModal.dom.tsx +++ b/ts/components/CallingSelectPresentingSourcesModal.dom.tsx @@ -4,15 +4,15 @@ import React, { useState } from 'react'; import classNames from 'classnames'; import lodash from 'lodash'; -import { Button, ButtonVariant } from './Button.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; import type { PresentedSource, PresentableSource, -} from '../types/Calling.std.js'; -import { Theme } from '../util/theme.std.js'; -import { strictAssert } from '../util/assert.std.js'; +} from '../types/Calling.std.ts'; +import { Theme } from '../util/theme.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; const { groupBy } = lodash; diff --git a/ts/components/CallingToast.dom.tsx b/ts/components/CallingToast.dom.tsx index 86c40c1cee..fc93a3a301 100644 --- a/ts/components/CallingToast.dom.tsx +++ b/ts/components/CallingToast.dom.tsx @@ -14,11 +14,11 @@ import { createPortal } from 'react-dom'; import { useTransition, animated } from '@react-spring/web'; import classNames from 'classnames'; import { v4 as uuid } from 'uuid'; -import { useIsMounted } from '../hooks/useIsMounted.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { difference } from '../util/setUtil.std.js'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; +import { useIsMounted } from '../hooks/useIsMounted.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { difference } from '../util/setUtil.std.ts'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; const DEFAULT_LIFETIME = 5000; const DEFAULT_TRANSITION_FROM = { diff --git a/ts/components/CallingToastManager.dom.tsx b/ts/components/CallingToastManager.dom.tsx index 7723cf807d..6ad2da6e3a 100644 --- a/ts/components/CallingToastManager.dom.tsx +++ b/ts/components/CallingToastManager.dom.tsx @@ -5,17 +5,17 @@ import React, { useEffect, useMemo, useRef } from 'react'; import type { ActiveCallType, ObservedRemoteMuteType, -} from '../types/Calling.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { CallingToastProvider, useCallingToasts } from './CallingToast.dom.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { difference as setDifference } from '../util/setUtil.std.js'; -import { isMoreRecentThan } from '../util/timestamp.std.js'; -import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import type { SetMutedByType } from '../state/ducks/calling.preload.js'; +} from '../types/Calling.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { CallingToastProvider, useCallingToasts } from './CallingToast.dom.tsx'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { difference as setDifference } from '../util/setUtil.std.ts'; +import { isMoreRecentThan } from '../util/timestamp.std.ts'; +import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import type { SetMutedByType } from '../state/ducks/calling.preload.ts'; type PropsType = { activeCall: ActiveCallType; diff --git a/ts/components/CallsList.preload.tsx b/ts/components/CallsList.preload.tsx index cbf1105829..e1449fac51 100644 --- a/ts/components/CallsList.preload.tsx +++ b/ts/components/CallsList.preload.tsx @@ -12,15 +12,15 @@ import React, { import type { Index, IndexRange, ListRowProps } from 'react-virtualized'; import { InfiniteLoader, List } from 'react-virtualized'; import classNames from 'classnames'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { ListTile } from './ListTile.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { SearchInput } from './SearchInput.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { ListTile } from './ListTile.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { SearchInput } from './SearchInput.dom.tsx'; import type { CallHistoryFilterOptions, CallHistoryGroup, CallHistoryPagination, -} from '../types/CallDisposition.std.js'; +} from '../types/CallDisposition.std.ts'; import { CallHistoryFilterStatus, CallDirection, @@ -29,46 +29,46 @@ import { GroupCallStatus, isSameCallHistoryGroup, CallMode, -} from '../types/CallDisposition.std.js'; -import { isMoreRecentThan, toBoundedDate } from '../util/timestamp.std.js'; -import { formatDateTimeShort } from '../util/formatTimestamp.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { refMerger } from '../util/refMerger.std.js'; -import { drop } from '../util/drop.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { UserText } from './UserText.dom.js'; -import { I18n } from './I18n.dom.js'; -import { NavSidebarSearchHeader, NavSidebarEmpty } from './NavSidebar.dom.js'; -import { SizeObserver } from '../hooks/useSizeObserver.dom.js'; +} from '../types/CallDisposition.std.ts'; +import { isMoreRecentThan, toBoundedDate } from '../util/timestamp.std.ts'; +import { formatDateTimeShort } from '../util/formatTimestamp.dom.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { refMerger } from '../util/refMerger.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { UserText } from './UserText.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { NavSidebarSearchHeader, NavSidebarEmpty } from './NavSidebar.dom.tsx'; +import { SizeObserver } from '../hooks/useSizeObserver.dom.tsx'; import { formatCallHistoryGroup, getCallIdFromEra, -} from '../util/callDisposition.preload.js'; -import { CallsNewCallButton } from './CallsNewCallButton.dom.js'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; -import { Theme } from '../util/theme.std.js'; -import type { CallingConversationType } from '../types/Calling.std.js'; -import type { CallLinkType } from '../types/CallLink.std.js'; +} from '../util/callDisposition.preload.ts'; +import { CallsNewCallButton } from './CallsNewCallButton.dom.tsx'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import type { CallingConversationType } from '../types/Calling.std.ts'; +import type { CallLinkType } from '../types/CallLink.std.ts'; import { callLinkToConversation, getPlaceholderCallLinkConversation, -} from '../util/callLinks.std.js'; -import type { CallsTabSelectedView } from './CallsTab.preload.js'; -import type { CallStateType } from '../state/selectors/calling.std.js'; +} from '../util/callLinks.std.ts'; +import type { CallsTabSelectedView } from './CallsTab.preload.tsx'; +import type { CallStateType } from '../state/selectors/calling.std.ts'; import { isGroupOrAdhocCallMode, isGroupOrAdhocCallState, -} from '../util/isGroupOrAdhocCall.std.js'; -import { isAnybodyInGroupCall } from '../state/ducks/callingHelpers.std.js'; +} from '../util/isGroupOrAdhocCall.std.ts'; +import { isAnybodyInGroupCall } from '../state/ducks/callingHelpers.std.ts'; import type { ActiveCallStateType, PeekNotConnectedGroupCallType, -} from '../state/ducks/calling.preload.js'; -import { DAY, MINUTE, SECOND } from '../util/durations/index.std.js'; -import type { StartCallData } from './ConfirmLeaveCallModal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import type { ICUJSXMessageParamsByKeyType } from '../types/Util.std.js'; +} from '../state/ducks/calling.preload.ts'; +import { DAY, MINUTE, SECOND } from '../util/durations/index.std.ts'; +import type { StartCallData } from './ConfirmLeaveCallModal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import type { ICUJSXMessageParamsByKeyType } from '../types/Util.std.ts'; const log = createLogger('CallsList'); diff --git a/ts/components/CallsNewCallButton.dom.tsx b/ts/components/CallsNewCallButton.dom.tsx index 0a51fbf747..8513e7f4f7 100644 --- a/ts/components/CallsNewCallButton.dom.tsx +++ b/ts/components/CallsNewCallButton.dom.tsx @@ -7,23 +7,23 @@ import lodash from 'lodash'; import type { ListRowProps } from 'react-virtualized'; import { List } from 'react-virtualized'; import classNames from 'classnames'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { SearchInput } from './SearchInput.dom.js'; -import { filterAndSortConversations } from '../util/filterAndSortConversations.std.js'; -import { NavSidebarSearchHeader } from './NavSidebar.dom.js'; -import { ListTile } from './ListTile.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { UserText } from './UserText.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { I18n } from './I18n.dom.js'; -import { SizeObserver } from '../hooks/useSizeObserver.dom.js'; -import { CallType } from '../types/CallDisposition.std.js'; -import type { CallsTabSelectedView } from './CallsTab.preload.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { SearchInput } from './SearchInput.dom.tsx'; +import { filterAndSortConversations } from '../util/filterAndSortConversations.std.ts'; +import { NavSidebarSearchHeader } from './NavSidebar.dom.tsx'; +import { ListTile } from './ListTile.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; +import { UserText } from './UserText.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { SizeObserver } from '../hooks/useSizeObserver.dom.tsx'; +import { CallType } from '../types/CallDisposition.std.ts'; +import type { CallsTabSelectedView } from './CallsTab.preload.tsx'; import { InAnotherCallTooltip, getTooltipContent, -} from './conversation/InAnotherCallTooltip.dom.js'; +} from './conversation/InAnotherCallTooltip.dom.tsx'; const { partition } = lodash; diff --git a/ts/components/CallsTab.preload.tsx b/ts/components/CallsTab.preload.tsx index b4d7ddb31e..51e84db83f 100644 --- a/ts/components/CallsTab.preload.tsx +++ b/ts/components/CallsTab.preload.tsx @@ -2,29 +2,29 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback, useEffect, useState } from 'react'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { NavSidebar, NavSidebarActionButton } from './NavSidebar.dom.js'; -import { CallsList } from './CallsList.preload.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { NavSidebar, NavSidebarActionButton } from './NavSidebar.dom.tsx'; +import { CallsList } from './CallsList.preload.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; import type { CallHistoryFilterOptions, CallHistoryGroup, CallHistoryPagination, -} from '../types/CallDisposition.std.js'; -import { CallsNewCall } from './CallsNewCallButton.dom.js'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; +} from '../types/CallDisposition.std.ts'; +import { CallsNewCall } from './CallsNewCallButton.dom.tsx'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; import type { ActiveCallStateType, PeekNotConnectedGroupCallType, -} from '../state/ducks/calling.preload.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import type { UnreadStats } from '../util/countUnreadStats.std.js'; -import type { CallLinkType } from '../types/CallLink.std.js'; -import type { CallStateType } from '../state/selectors/calling.std.js'; -import type { StartCallData } from './ConfirmLeaveCallModal.dom.js'; -import { I18n } from './I18n.dom.js'; -import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.js'; -import type { SmartPropsType as SmartToastManagerPropsType } from '../state/smart/ToastManager.preload.js'; +} from '../state/ducks/calling.preload.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import type { UnreadStats } from '../util/countUnreadStats.std.ts'; +import type { CallLinkType } from '../types/CallLink.std.ts'; +import type { CallStateType } from '../state/selectors/calling.std.ts'; +import type { StartCallData } from './ConfirmLeaveCallModal.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.tsx'; +import type { SmartPropsType as SmartToastManagerPropsType } from '../state/smart/ToastManager.preload.tsx'; enum CallsTabSidebarView { CallsListView, diff --git a/ts/components/CaptchaDialog.dom.stories.tsx b/ts/components/CaptchaDialog.dom.stories.tsx index 4820e3e68e..8c3bc58503 100644 --- a/ts/components/CaptchaDialog.dom.stories.tsx +++ b/ts/components/CaptchaDialog.dom.stories.tsx @@ -4,9 +4,9 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CaptchaDialog.dom.js'; -import { CaptchaDialog } from './CaptchaDialog.dom.js'; -import { Button } from './Button.dom.js'; +import type { PropsType } from './CaptchaDialog.dom.tsx'; +import { CaptchaDialog } from './CaptchaDialog.dom.tsx'; +import { Button } from './Button.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/CaptchaDialog.dom.tsx b/ts/components/CaptchaDialog.dom.tsx index cf939ae080..ebf824173e 100644 --- a/ts/components/CaptchaDialog.dom.tsx +++ b/ts/components/CaptchaDialog.dom.tsx @@ -3,10 +3,10 @@ import React, { useRef, useState } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; -import { Spinner } from './Spinner.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/ChatColorPicker.dom.stories.tsx b/ts/components/ChatColorPicker.dom.stories.tsx index 541b5e2e84..6804df38b0 100644 --- a/ts/components/ChatColorPicker.dom.stories.tsx +++ b/ts/components/ChatColorPicker.dom.stories.tsx @@ -4,9 +4,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ChatColorPicker.dom.js'; -import { ChatColorPicker } from './ChatColorPicker.dom.js'; -import { ConversationColors } from '../types/Colors.std.js'; +import type { PropsType } from './ChatColorPicker.dom.tsx'; +import { ChatColorPicker } from './ChatColorPicker.dom.tsx'; +import { ConversationColors } from '../types/Colors.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/ChatColorPicker.dom.tsx b/ts/components/ChatColorPicker.dom.tsx index c4609b27b9..b7c97bdb98 100644 --- a/ts/components/ChatColorPicker.dom.tsx +++ b/ts/components/ChatColorPicker.dom.tsx @@ -4,23 +4,23 @@ import type { MouseEvent, ReactNode } from 'react'; import React, { useCallback, useState } from 'react'; import classNames from 'classnames'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { CustomColorEditor } from './CustomColorEditor.dom.js'; -import { Modal } from './Modal.dom.js'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { CustomColorEditor } from './CustomColorEditor.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; import type { ConversationColorType, CustomColorType, -} from '../types/Colors.std.js'; -import { ConversationColors } from '../types/Colors.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { SampleMessageBubbles } from './SampleMessageBubbles.dom.js'; -import { PanelRow } from './conversation/conversation-details/PanelRow.dom.js'; -import { getCustomColorStyle } from '../util/getCustomColorStyle.dom.js'; +} from '../types/Colors.std.ts'; +import { ConversationColors } from '../types/Colors.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { SampleMessageBubbles } from './SampleMessageBubbles.dom.tsx'; +import { PanelRow } from './conversation/conversation-details/PanelRow.dom.tsx'; +import { getCustomColorStyle } from '../util/getCustomColorStyle.dom.ts'; -import { useDelayedRestoreFocus } from '../hooks/useRestoreFocus.dom.js'; -import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.js'; -import { tw } from '../axo/tw.dom.js'; +import { useDelayedRestoreFocus } from '../hooks/useRestoreFocus.dom.ts'; +import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; type CustomColorDataType = { id?: string; diff --git a/ts/components/ChatsTab.dom.stories.tsx b/ts/components/ChatsTab.dom.stories.tsx index 34a92e2738..79981d0bb8 100644 --- a/ts/components/ChatsTab.dom.stories.tsx +++ b/ts/components/ChatsTab.dom.stories.tsx @@ -3,9 +3,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import type { ChatsTabProps } from './ChatsTab.dom.js'; -import { ChatsTab } from './ChatsTab.dom.js'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import type { ChatsTabProps } from './ChatsTab.dom.tsx'; +import { ChatsTab } from './ChatsTab.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ChatsTab.dom.tsx b/ts/components/ChatsTab.dom.tsx index 636acc4826..f7d5386445 100644 --- a/ts/components/ChatsTab.dom.tsx +++ b/ts/components/ChatsTab.dom.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../types/I18N.std.js'; -import type { NavTabPanelProps } from './NavTabs.dom.js'; -import { WhatsNewLink } from './WhatsNewLink.dom.js'; -import type { UnreadStats } from '../util/countUnreadStats.std.js'; -import type { SmartConversationViewProps } from '../state/smart/ConversationView.preload.js'; -import { tw } from '../axo/tw.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import type { NavTabPanelProps } from './NavTabs.dom.tsx'; +import { WhatsNewLink } from './WhatsNewLink.dom.tsx'; +import type { UnreadStats } from '../util/countUnreadStats.std.ts'; +import type { SmartConversationViewProps } from '../state/smart/ConversationView.preload.tsx'; +import { tw } from '../axo/tw.dom.tsx'; export type ChatsTabProps = Readonly<{ otherTabsUnreadStats: UnreadStats; diff --git a/ts/components/Checkbox.dom.stories.tsx b/ts/components/Checkbox.dom.stories.tsx index 6c0b2d38f9..8fd15ee615 100644 --- a/ts/components/Checkbox.dom.stories.tsx +++ b/ts/components/Checkbox.dom.stories.tsx @@ -5,8 +5,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './Checkbox.dom.js'; -import { Checkbox } from './Checkbox.dom.js'; +import type { PropsType } from './Checkbox.dom.tsx'; +import { Checkbox } from './Checkbox.dom.tsx'; const createProps = (): PropsType => ({ checked: false, diff --git a/ts/components/Checkbox.dom.tsx b/ts/components/Checkbox.dom.tsx index 7b67b8f196..39c63fae10 100644 --- a/ts/components/Checkbox.dom.tsx +++ b/ts/components/Checkbox.dom.tsx @@ -5,7 +5,7 @@ import type { ReactNode } from 'react'; import React, { forwardRef, useMemo } from 'react'; import { v4 as uuid } from 'uuid'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; export type PropsType = { checked?: boolean; diff --git a/ts/components/CircleCheckbox.dom.stories.tsx b/ts/components/CircleCheckbox.dom.stories.tsx index dbfea91d7a..b58415af5e 100644 --- a/ts/components/CircleCheckbox.dom.stories.tsx +++ b/ts/components/CircleCheckbox.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './CircleCheckbox.dom.js'; -import { CircleCheckbox, Variant } from './CircleCheckbox.dom.js'; +import type { Props } from './CircleCheckbox.dom.tsx'; +import { CircleCheckbox, Variant } from './CircleCheckbox.dom.tsx'; const createProps = (): Props => ({ checked: false, diff --git a/ts/components/CircleCheckbox.dom.tsx b/ts/components/CircleCheckbox.dom.tsx index 0a487cfbf3..89b070d65c 100644 --- a/ts/components/CircleCheckbox.dom.tsx +++ b/ts/components/CircleCheckbox.dom.tsx @@ -4,8 +4,8 @@ import React, { useCallback } from 'react'; import classNames from 'classnames'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; export enum Variant { Normal = 'Normal', diff --git a/ts/components/ClearingData.dom.stories.tsx b/ts/components/ClearingData.dom.stories.tsx index f159c26674..896fa93a4f 100644 --- a/ts/components/ClearingData.dom.stories.tsx +++ b/ts/components/ClearingData.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ClearingData.dom.js'; -import { ClearingData } from './ClearingData.dom.js'; +import type { PropsType } from './ClearingData.dom.tsx'; +import { ClearingData } from './ClearingData.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ClearingData.dom.tsx b/ts/components/ClearingData.dom.tsx index 26a7ac7f16..29924b25dd 100644 --- a/ts/components/ClearingData.dom.tsx +++ b/ts/components/ClearingData.dom.tsx @@ -3,10 +3,10 @@ import React, { useEffect } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { TitlebarDragArea } from './TitlebarDragArea.dom.js'; -import { ProgressBar } from './ProgressBar.dom.js'; -import { InstallScreenSignalLogo } from './installScreen/InstallScreenSignalLogo.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { TitlebarDragArea } from './TitlebarDragArea.dom.tsx'; +import { ProgressBar } from './ProgressBar.dom.tsx'; +import { InstallScreenSignalLogo } from './installScreen/InstallScreenSignalLogo.dom.tsx'; export type PropsType = { deleteAllData: () => void; diff --git a/ts/components/CollidingAvatars.dom.stories.tsx b/ts/components/CollidingAvatars.dom.stories.tsx index f3df7aa3b9..1ff785689b 100644 --- a/ts/components/CollidingAvatars.dom.stories.tsx +++ b/ts/components/CollidingAvatars.dom.stories.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { PropsType } from './CollidingAvatars.dom.js'; -import { CollidingAvatars } from './CollidingAvatars.dom.js'; -import { type ComponentMeta } from '../storybook/types.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './CollidingAvatars.dom.tsx'; +import { CollidingAvatars } from './CollidingAvatars.dom.tsx'; +import { type ComponentMeta } from '../storybook/types.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CollidingAvatars.dom.tsx b/ts/components/CollidingAvatars.dom.tsx index d31b8b4e03..1942c609ba 100644 --- a/ts/components/CollidingAvatars.dom.tsx +++ b/ts/components/CollidingAvatars.dom.tsx @@ -4,9 +4,9 @@ import { v4 as uuid } from 'uuid'; import React, { useMemo, useCallback } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/CompositionArea.dom.stories.tsx b/ts/components/CompositionArea.dom.stories.tsx index 36a48d1e28..d82973eb3f 100644 --- a/ts/components/CompositionArea.dom.stories.tsx +++ b/ts/components/CompositionArea.dom.stories.tsx @@ -4,20 +4,20 @@ import React, { useContext, useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { IMAGE_JPEG } from '../types/MIME.std.js'; -import type { Props } from './CompositionArea.dom.js'; -import { CompositionArea } from './CompositionArea.dom.js'; +import { IMAGE_JPEG } from '../types/MIME.std.ts'; +import type { Props } from './CompositionArea.dom.tsx'; +import { CompositionArea } from './CompositionArea.dom.tsx'; import { StorybookThemeContext } from '../../.storybook/StorybookThemeContext.std.js'; -import { fakeDraftAttachment } from '../test-helpers/fakeAttachment.std.js'; -import { landscapeGreenUrl } from '../storybook/Fixtures.std.js'; -import { RecordingState } from '../types/AudioRecorder.std.js'; -import type { ContactNameColorType } from '../types/Colors.std.js'; -import { ContactNameColors, ConversationColors } from '../types/Colors.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { PaymentEventKind } from '../types/Payment.std.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; +import { fakeDraftAttachment } from '../test-helpers/fakeAttachment.std.ts'; +import { landscapeGreenUrl } from '../storybook/Fixtures.std.ts'; +import { RecordingState } from '../types/AudioRecorder.std.ts'; +import type { ContactNameColorType } from '../types/Colors.std.ts'; +import { ContactNameColors, ConversationColors } from '../types/Colors.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { PaymentEventKind } from '../types/Payment.std.ts'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CompositionArea.dom.tsx b/ts/components/CompositionArea.dom.tsx index 238d2bbf29..e3921e568e 100644 --- a/ts/components/CompositionArea.dom.tsx +++ b/ts/components/CompositionArea.dom.tsx @@ -14,84 +14,84 @@ import type { ReadonlyDeep } from 'type-fest'; import type { DraftBodyRanges, HydratedBodyRangesType, -} from '../types/BodyRange.std.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { ErrorDialogAudioRecorderType } from '../types/AudioRecorder.std.js'; -import { RecordingState } from '../types/AudioRecorder.std.js'; -import type { imageToBlurHash } from '../util/imageToBlurHash.dom.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { Spinner } from './Spinner.dom.js'; +} from '../types/BodyRange.std.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { ErrorDialogAudioRecorderType } from '../types/AudioRecorder.std.ts'; +import { RecordingState } from '../types/AudioRecorder.std.ts'; +import type { imageToBlurHash } from '../util/imageToBlurHash.dom.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import { Spinner } from './Spinner.dom.tsx'; import type { InputApi, Props as CompositionInputProps, -} from './CompositionInput.dom.js'; -import { CompositionInput } from './CompositionInput.dom.js'; -import type { Props as MessageRequestActionsProps } from './conversation/MessageRequestActions.dom.js'; -import { MessageRequestActions } from './conversation/MessageRequestActions.dom.js'; -import type { PropsType as GroupV1DisabledActionsPropsType } from './conversation/GroupV1DisabledActions.dom.js'; -import { GroupV1DisabledActions } from './conversation/GroupV1DisabledActions.dom.js'; -import type { PropsType as GroupV2PendingApprovalActionsPropsType } from './conversation/GroupV2PendingApprovalActions.dom.js'; -import { GroupV2PendingApprovalActions } from './conversation/GroupV2PendingApprovalActions.dom.js'; -import { AnnouncementsOnlyGroupBanner } from './AnnouncementsOnlyGroupBanner.dom.js'; -import { AttachmentList } from './conversation/AttachmentList.dom.js'; +} from './CompositionInput.dom.tsx'; +import { CompositionInput } from './CompositionInput.dom.tsx'; +import type { Props as MessageRequestActionsProps } from './conversation/MessageRequestActions.dom.tsx'; +import { MessageRequestActions } from './conversation/MessageRequestActions.dom.tsx'; +import type { PropsType as GroupV1DisabledActionsPropsType } from './conversation/GroupV1DisabledActions.dom.tsx'; +import { GroupV1DisabledActions } from './conversation/GroupV1DisabledActions.dom.tsx'; +import type { PropsType as GroupV2PendingApprovalActionsPropsType } from './conversation/GroupV2PendingApprovalActions.dom.tsx'; +import { GroupV2PendingApprovalActions } from './conversation/GroupV2PendingApprovalActions.dom.tsx'; +import { AnnouncementsOnlyGroupBanner } from './AnnouncementsOnlyGroupBanner.dom.tsx'; +import { AttachmentList } from './conversation/AttachmentList.dom.tsx'; import type { AttachmentDraftType, InMemoryAttachmentDraftType, -} from '../types/Attachment.std.js'; -import { isImageAttachment, isVoiceMessage } from '../util/Attachment.std.js'; -import { isViewOnceEligible } from '../util/viewOnceEligibility.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { AudioCapture } from './conversation/AudioCapture.dom.js'; -import { CompositionUpload } from './CompositionUpload.dom.js'; +} from '../types/Attachment.std.ts'; +import { isImageAttachment, isVoiceMessage } from '../util/Attachment.std.ts'; +import { isViewOnceEligible } from '../util/viewOnceEligibility.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { AudioCapture } from './conversation/AudioCapture.dom.tsx'; +import { CompositionUpload } from './CompositionUpload.dom.tsx'; import type { ConversationRemovalStage, ConversationType, PushPanelForConversationActionType, ShowConversationType, -} from '../state/ducks/conversations.preload.js'; -import type { GetConversationByIdType } from '../state/selectors/conversations.dom.js'; -import type { GetSharedGroupNamesType } from '../util/sharedGroupNames.dom.js'; -import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.js'; -import { isSameLinkPreview } from '../types/message/LinkPreviews.std.js'; +} from '../state/ducks/conversations.preload.ts'; +import type { GetConversationByIdType } from '../state/selectors/conversations.dom.ts'; +import type { GetSharedGroupNamesType } from '../util/sharedGroupNames.dom.ts'; +import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.ts'; +import { isSameLinkPreview } from '../types/message/LinkPreviews.std.ts'; -import { MandatoryProfileSharingActions } from './conversation/MandatoryProfileSharingActions.dom.js'; -import { MediaQualitySelector } from './MediaQualitySelector.dom.js'; -import type { Props as QuoteProps } from './conversation/Quote.dom.js'; -import { Quote } from './conversation/Quote.dom.js'; +import { MandatoryProfileSharingActions } from './conversation/MandatoryProfileSharingActions.dom.tsx'; +import { MediaQualitySelector } from './MediaQualitySelector.dom.tsx'; +import type { Props as QuoteProps } from './conversation/Quote.dom.tsx'; +import { Quote } from './conversation/Quote.dom.tsx'; import { useAttachFileShortcut, useEditLastMessageSent, -} from '../hooks/useKeyboardShortcuts.dom.js'; -import { MediaEditor } from './MediaEditor.dom.js'; -import { isImageTypeSupported } from '../util/GoogleChrome.std.js'; -import * as KeyboardLayout from '../services/keyboardLayout.dom.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { PanelType } from '../types/Panels.std.js'; -import type { SmartCompositionRecordingDraftProps } from '../state/smart/CompositionRecordingDraft.preload.js'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; -import SelectModeActions from './conversation/SelectModeActions.dom.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; +} from '../hooks/useKeyboardShortcuts.dom.tsx'; +import { MediaEditor } from './MediaEditor.dom.tsx'; +import { isImageTypeSupported } from '../util/GoogleChrome.std.ts'; +import * as KeyboardLayout from '../services/keyboardLayout.dom.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { PanelType } from '../types/Panels.std.ts'; +import type { SmartCompositionRecordingDraftProps } from '../state/smart/CompositionRecordingDraft.preload.tsx'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; +import SelectModeActions from './conversation/SelectModeActions.dom.tsx'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; import type { DraftEditMessageType } from '../model-types.d.ts'; -import type { ForwardMessagesPayload } from '../state/ducks/globalModals.preload.js'; -import { ForwardMessagesModalType } from './ForwardMessagesModal.dom.js'; -import { SignalConversationMuteToggle } from './conversation/SignalConversationMuteToggle.dom.js'; -import { FunPicker } from './fun/FunPicker.dom.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; -import type { FunStickerSelection } from './fun/panels/FunPanelStickers.dom.js'; -import type { FunGifSelection } from './fun/panels/FunPanelGifs.dom.js'; -import type { SmartDraftGifMessageSendModalProps } from '../state/smart/DraftGifMessageSendModal.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import type { EmojiSkinTone } from './fun/data/emojis.std.js'; -import { FunPickerButton } from './fun/FunButton.dom.js'; -import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.js'; -import { AxoIconButton } from '../axo/AxoIconButton.dom.js'; -import { tw } from '../axo/tw.dom.js'; -import type { PollCreateType } from '../types/Polls.dom.js'; -import { PollCreateModal } from './PollCreateModal.dom.js'; -import { useDocumentKeyDown } from '../hooks/useDocumentKeyDown.dom.js'; -import { hasDraft } from '../util/hasDraft.std.js'; -import type { ContactNameColorType } from '../types/Colors.std.js'; +import type { ForwardMessagesPayload } from '../state/ducks/globalModals.preload.ts'; +import { ForwardMessagesModalType } from './ForwardMessagesModal.dom.tsx'; +import { SignalConversationMuteToggle } from './conversation/SignalConversationMuteToggle.dom.tsx'; +import { FunPicker } from './fun/FunPicker.dom.tsx'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; +import type { FunStickerSelection } from './fun/panels/FunPanelStickers.dom.tsx'; +import type { FunGifSelection } from './fun/panels/FunPanelGifs.dom.tsx'; +import type { SmartDraftGifMessageSendModalProps } from '../state/smart/DraftGifMessageSendModal.preload.tsx'; +import { strictAssert } from '../util/assert.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import type { EmojiSkinTone } from './fun/data/emojis.std.ts'; +import { FunPickerButton } from './fun/FunButton.dom.tsx'; +import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.tsx'; +import { AxoIconButton } from '../axo/AxoIconButton.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; +import type { PollCreateType } from '../types/Polls.dom.ts'; +import { PollCreateModal } from './PollCreateModal.dom.tsx'; +import { useDocumentKeyDown } from '../hooks/useDocumentKeyDown.dom.ts'; +import { hasDraft } from '../util/hasDraft.std.ts'; +import type { ContactNameColorType } from '../types/Colors.std.ts'; export type OwnProps = Readonly<{ acceptedMessageRequest: boolean | null; diff --git a/ts/components/CompositionInput.dom.stories.tsx b/ts/components/CompositionInput.dom.stories.tsx index f9171d25cf..689775f333 100644 --- a/ts/components/CompositionInput.dom.stories.tsx +++ b/ts/components/CompositionInput.dom.stories.tsx @@ -2,16 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -// @ts-expect-error -- no types -import '@signalapp/quill-cjs/dist/quill.core.css'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import type { Props } from './CompositionInput.dom.js'; -import { CompositionInput } from './CompositionInput.dom.js'; -import { generateAci } from '../types/ServiceId.std.js'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import type { Props } from './CompositionInput.dom.tsx'; +import { CompositionInput } from './CompositionInput.dom.tsx'; +import { generateAci } from '../types/ServiceId.std.ts'; import { StorybookThemeContext } from '../../.storybook/StorybookThemeContext.std.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CompositionInput.dom.tsx b/ts/components/CompositionInput.dom.tsx index edfc775585..f0d85330e1 100644 --- a/ts/components/CompositionInput.dom.tsx +++ b/ts/components/CompositionInput.dom.tsx @@ -15,33 +15,33 @@ import Emitter from '@signalapp/quill-cjs/core/emitter.js'; import type { Context } from '@signalapp/quill-cjs/modules/keyboard.js'; import type { Range as RangeStatic } from '@signalapp/quill-cjs'; -import { MentionCompletion } from '../quill/mentions/completion.dom.js'; +import { MentionCompletion } from '../quill/mentions/completion.dom.tsx'; import { FormattingMenu, QuillFormattingStyle, -} from '../quill/formatting/menu.dom.js'; -import { MonospaceBlot } from '../quill/formatting/monospaceBlot.std.js'; -import { SpoilerBlot } from '../quill/formatting/spoilerBlot.std.js'; -import { EmojiBlot, EmojiCompletion } from '../quill/emoji/index.dom.js'; +} from '../quill/formatting/menu.dom.tsx'; +import { MonospaceBlot } from '../quill/formatting/monospaceBlot.std.ts'; +import { SpoilerBlot } from '../quill/formatting/spoilerBlot.std.ts'; +import { EmojiBlot, EmojiCompletion } from '../quill/emoji/index.dom.tsx'; import type { DraftBodyRanges, HydratedBodyRangesType, RangeNode, -} from '../types/BodyRange.std.js'; +} from '../types/BodyRange.std.ts'; import { BodyRange, areBodyRangesEqual, collapseRangeTree, insertRange, -} from '../types/BodyRange.std.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import { isAciString } from '../util/isAciString.std.js'; -import { MentionBlot } from '../quill/mentions/blot.dom.js'; -import { matchEmojiBlot, matchEmojiText } from '../quill/emoji/matchers.dom.js'; -import { matchMention } from '../quill/mentions/matchers.std.js'; -import { MemberRepository } from '../quill/memberRepository.std.js'; +} from '../types/BodyRange.std.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import { MentionBlot } from '../quill/mentions/blot.dom.tsx'; +import { matchEmojiBlot, matchEmojiText } from '../quill/emoji/matchers.dom.ts'; +import { matchMention } from '../quill/mentions/matchers.std.ts'; +import { MemberRepository } from '../quill/memberRepository.std.ts'; import { getDeltaToRemoveStaleMentions, getTextAndRangesFromOps, @@ -52,41 +52,41 @@ import { insertEmojiOps, insertFormattingAndMentionsOps, isInsertMentionOp, -} from '../quill/util.dom.js'; -import { SignalClipboard } from '../quill/signal-clipboard/index.dom.js'; -import { DirectionalBlot } from '../quill/block/blot.dom.js'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.js'; -import { StagedLinkPreview } from './conversation/StagedLinkPreview.dom.js'; +} from '../quill/util.dom.ts'; +import { SignalClipboard } from '../quill/signal-clipboard/index.dom.ts'; +import { DirectionalBlot } from '../quill/block/blot.dom.tsx'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.ts'; +import { StagedLinkPreview } from './conversation/StagedLinkPreview.dom.tsx'; import type { DraftEditMessageType } from '../model-types.d.ts'; -import { usePrevious } from '../hooks/usePrevious.std.js'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; import { matchBold, matchItalic, matchMonospace, matchSpoiler, matchStrikethrough, -} from '../quill/formatting/matchers.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import type { AutoSubstituteAsciiEmojisOptions } from '../quill/auto-substitute-ascii-emojis/index.dom.js'; -import { AutoSubstituteAsciiEmojis } from '../quill/auto-substitute-ascii-emojis/index.dom.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { SimpleQuillWrapper } from './SimpleQuillWrapper.dom.js'; +} from '../quill/formatting/matchers.dom.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import type { AutoSubstituteAsciiEmojisOptions } from '../quill/auto-substitute-ascii-emojis/index.dom.tsx'; +import { AutoSubstituteAsciiEmojis } from '../quill/auto-substitute-ascii-emojis/index.dom.tsx'; +import { dropNull } from '../util/dropNull.std.ts'; +import { SimpleQuillWrapper } from './SimpleQuillWrapper.dom.tsx'; import { getEmojiVariantByKey, type EmojiSkinTone, -} from './fun/data/emojis.std.js'; -import { FUN_STATIC_EMOJI_CLASS } from './fun/FunEmoji.dom.js'; -import { useFunEmojiSearch } from './fun/useFunEmojiSearch.dom.js'; -import type { EmojiCompletionOptions } from '../quill/emoji/completion.dom.js'; -import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer.dom.js'; -import { MAX_BODY_ATTACHMENT_BYTE_LENGTH } from '../util/longAttachment.std.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; -import { AxoSymbol } from '../axo/AxoSymbol.dom.js'; -import { AxoTooltip } from '../axo/AxoTooltip.dom.js'; -import { tw } from '../axo/tw.dom.js'; +} from './fun/data/emojis.std.ts'; +import { FUN_STATIC_EMOJI_CLASS } from './fun/FunEmoji.dom.tsx'; +import { useFunEmojiSearch } from './fun/useFunEmojiSearch.dom.tsx'; +import type { EmojiCompletionOptions } from '../quill/emoji/completion.dom.tsx'; +import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer.dom.tsx'; +import { MAX_BODY_ATTACHMENT_BYTE_LENGTH } from '../util/longAttachment.std.ts'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; +import { AxoSymbol } from '../axo/AxoSymbol.dom.tsx'; +import { AxoTooltip } from '../axo/AxoTooltip.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; const log = createLogger('CompositionInput'); diff --git a/ts/components/CompositionRecording.dom.stories.tsx b/ts/components/CompositionRecording.dom.stories.tsx index d9ec5beb94..a4fedd9edf 100644 --- a/ts/components/CompositionRecording.dom.stories.tsx +++ b/ts/components/CompositionRecording.dom.stories.tsx @@ -4,8 +4,8 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './CompositionRecording.dom.js'; -import { CompositionRecording } from './CompositionRecording.dom.js'; +import type { Props } from './CompositionRecording.dom.tsx'; +import { CompositionRecording } from './CompositionRecording.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/CompositionRecording.dom.tsx b/ts/components/CompositionRecording.dom.tsx index 7cabb136b1..a2c2ad5720 100644 --- a/ts/components/CompositionRecording.dom.tsx +++ b/ts/components/CompositionRecording.dom.tsx @@ -3,19 +3,19 @@ import lodash from 'lodash'; import React, { useEffect, useRef, useState } from 'react'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; import type { HideToastAction, ShowToastAction, -} from '../state/ducks/toast.preload.js'; -import { ErrorDialogAudioRecorderType } from '../types/AudioRecorder.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { AnyToast } from '../types/Toast.dom.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { DurationInSeconds, SECOND } from '../util/durations/index.std.js'; -import { durationToPlaybackText } from '../util/durationToPlaybackText.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { RecordingComposer } from './RecordingComposer.dom.js'; +} from '../state/ducks/toast.preload.ts'; +import { ErrorDialogAudioRecorderType } from '../types/AudioRecorder.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { AnyToast } from '../types/Toast.dom.tsx'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { DurationInSeconds, SECOND } from '../util/durations/index.std.ts'; +import { durationToPlaybackText } from '../util/durationToPlaybackText.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { RecordingComposer } from './RecordingComposer.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/CompositionRecordingDraft.dom.stories.tsx b/ts/components/CompositionRecordingDraft.dom.stories.tsx index ada9823761..aec9889a11 100644 --- a/ts/components/CompositionRecordingDraft.dom.stories.tsx +++ b/ts/components/CompositionRecordingDraft.dom.stories.tsx @@ -4,8 +4,8 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './CompositionRecordingDraft.dom.js'; -import { CompositionRecordingDraft } from './CompositionRecordingDraft.dom.js'; +import type { Props } from './CompositionRecordingDraft.dom.tsx'; +import { CompositionRecordingDraft } from './CompositionRecordingDraft.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/CompositionRecordingDraft.dom.tsx b/ts/components/CompositionRecordingDraft.dom.tsx index ee38a7cbae..3e7f84b2e0 100644 --- a/ts/components/CompositionRecordingDraft.dom.tsx +++ b/ts/components/CompositionRecordingDraft.dom.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState, useCallback, useRef } from 'react'; -import { useComputePeaks } from '../hooks/useComputePeaks.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { WaveformScrubber } from './conversation/WaveformScrubber.dom.js'; -import { PlaybackButton } from './PlaybackButton.dom.js'; -import { RecordingComposer } from './RecordingComposer.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import type { Size } from '../hooks/useSizeObserver.dom.js'; -import { SizeObserver } from '../hooks/useSizeObserver.dom.js'; +import { useComputePeaks } from '../hooks/useComputePeaks.dom.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { WaveformScrubber } from './conversation/WaveformScrubber.dom.tsx'; +import { PlaybackButton } from './PlaybackButton.dom.tsx'; +import { RecordingComposer } from './RecordingComposer.dom.tsx'; +import { createLogger } from '../logging/log.std.ts'; +import type { Size } from '../hooks/useSizeObserver.dom.tsx'; +import { SizeObserver } from '../hooks/useSizeObserver.dom.tsx'; const log = createLogger('CompositionRecordingDraft'); diff --git a/ts/components/CompositionTextArea.dom.tsx b/ts/components/CompositionTextArea.dom.tsx index e7b4dc846c..521e868ba4 100644 --- a/ts/components/CompositionTextArea.dom.tsx +++ b/ts/components/CompositionTextArea.dom.tsx @@ -2,20 +2,20 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useRef, useCallback, useState } from 'react'; -import type { LocalizerType } from '../types/I18N.std.js'; -import type { InputApi } from './CompositionInput.dom.js'; -import { CompositionInput } from './CompositionInput.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import type { InputApi } from './CompositionInput.dom.tsx'; +import { CompositionInput } from './CompositionInput.dom.tsx'; import type { DraftBodyRanges, HydratedBodyRangesType, -} from '../types/BodyRange.std.js'; -import type { ThemeType } from '../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import * as grapheme from '../util/grapheme.std.js'; -import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; -import type { EmojiSkinTone } from './fun/data/emojis.std.js'; -import { FunEmojiPickerButton } from './fun/FunButton.dom.js'; +} from '../types/BodyRange.std.ts'; +import type { ThemeType } from '../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import * as grapheme from '../util/grapheme.std.ts'; +import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.tsx'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; +import type { EmojiSkinTone } from './fun/data/emojis.std.ts'; +import { FunEmojiPickerButton } from './fun/FunButton.dom.tsx'; export type CompositionTextAreaProps = { bodyRanges: HydratedBodyRangesType | null; diff --git a/ts/components/CompositionUpload.dom.tsx b/ts/components/CompositionUpload.dom.tsx index 8a7b1e814c..ada9b7f1cc 100644 --- a/ts/components/CompositionUpload.dom.tsx +++ b/ts/components/CompositionUpload.dom.tsx @@ -4,17 +4,17 @@ import type { ChangeEventHandler } from 'react'; import React, { forwardRef } from 'react'; -import type { AttachmentDraftType } from '../types/Attachment.std.js'; +import type { AttachmentDraftType } from '../types/Attachment.std.ts'; import { isVideoAttachment, isImageAttachment, -} from '../util/Attachment.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; +} from '../util/Attachment.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; import { getSupportedImageTypes, getSupportedVideoTypes, -} from '../util/GoogleChrome.std.js'; +} from '../util/GoogleChrome.std.ts'; export type PropsType = { conversationId: string; diff --git a/ts/components/ConfirmDiscardDialog.dom.stories.tsx b/ts/components/ConfirmDiscardDialog.dom.stories.tsx index 24cfbca59b..7cfc91ae8d 100644 --- a/ts/components/ConfirmDiscardDialog.dom.stories.tsx +++ b/ts/components/ConfirmDiscardDialog.dom.stories.tsx @@ -5,8 +5,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { ConfirmDialogProps } from './ConfirmDiscardDialog.dom.js'; -import { ConfirmDiscardDialog } from './ConfirmDiscardDialog.dom.js'; +import type { ConfirmDialogProps } from './ConfirmDiscardDialog.dom.tsx'; +import { ConfirmDiscardDialog } from './ConfirmDiscardDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ConfirmDiscardDialog.dom.tsx b/ts/components/ConfirmDiscardDialog.dom.tsx index 550fe925ba..af7428e14f 100644 --- a/ts/components/ConfirmDiscardDialog.dom.tsx +++ b/ts/components/ConfirmDiscardDialog.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; export type ConfirmDialogProps = { i18n: LocalizerType; diff --git a/ts/components/ConfirmLeaveCallModal.dom.tsx b/ts/components/ConfirmLeaveCallModal.dom.tsx index 40886bdabb..dc3def88cc 100644 --- a/ts/components/ConfirmLeaveCallModal.dom.tsx +++ b/ts/components/ConfirmLeaveCallModal.dom.tsx @@ -3,14 +3,14 @@ import React from 'react'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; import type { StartCallingLobbyType, StartCallLinkLobbyByRoomIdType, StartCallLinkLobbyType, -} from '../state/ducks/calling.preload.js'; +} from '../state/ducks/calling.preload.ts'; export type StartCallData = | ({ diff --git a/ts/components/ConfirmationDialog.dom.stories.tsx b/ts/components/ConfirmationDialog.dom.stories.tsx index b39a496e63..f889b1ac3d 100644 --- a/ts/components/ConfirmationDialog.dom.stories.tsx +++ b/ts/components/ConfirmationDialog.dom.stories.tsx @@ -5,8 +5,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './ConfirmationDialog.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; +import type { Props } from './ConfirmationDialog.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ConfirmationDialog.dom.tsx b/ts/components/ConfirmationDialog.dom.tsx index 7aa9afd37c..b1949242b2 100644 --- a/ts/components/ConfirmationDialog.dom.tsx +++ b/ts/components/ConfirmationDialog.dom.tsx @@ -4,13 +4,13 @@ import type { MouseEvent } from 'react'; import React, { useCallback } from 'react'; import { animated } from '@react-spring/web'; -import { Button, ButtonVariant } from './Button.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ModalHost } from './ModalHost.dom.js'; -import { ModalPage } from './Modal.dom.js'; -import type { Theme } from '../util/theme.std.js'; -import { useAnimated } from '../hooks/useAnimated.dom.js'; -import { Spinner } from './Spinner.dom.js'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ModalHost } from './ModalHost.dom.tsx'; +import { ModalPage } from './Modal.dom.tsx'; +import type { Theme } from '../util/theme.std.ts'; +import { useAnimated } from '../hooks/useAnimated.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; export type ActionSpec = { action: () => unknown; diff --git a/ts/components/ContactPill.dom.tsx b/ts/components/ContactPill.dom.tsx index eb46f00237..526e9976b9 100644 --- a/ts/components/ContactPill.dom.tsx +++ b/ts/components/ContactPill.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/ContactPills.dom.stories.tsx b/ts/components/ContactPills.dom.stories.tsx index 1f75d138bd..384d692db0 100644 --- a/ts/components/ContactPills.dom.stories.tsx +++ b/ts/components/ContactPills.dom.stories.tsx @@ -6,11 +6,11 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { ContactPills } from './ContactPills.dom.js'; -import type { PropsType as ContactPillPropsType } from './ContactPill.dom.js'; -import { ContactPill } from './ContactPill.dom.js'; -import { gifUrl } from '../storybook/Fixtures.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import { ContactPills } from './ContactPills.dom.tsx'; +import type { PropsType as ContactPillPropsType } from './ContactPill.dom.tsx'; +import { ContactPill } from './ContactPill.dom.tsx'; +import { gifUrl } from '../storybook/Fixtures.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/ContactPills.dom.tsx b/ts/components/ContactPills.dom.tsx index 77f7f371cb..2cb3a35cde 100644 --- a/ts/components/ContactPills.dom.tsx +++ b/ts/components/ContactPills.dom.tsx @@ -5,8 +5,8 @@ import type { ReactNode } from 'react'; import React, { useRef, useEffect, Children } from 'react'; import classNames from 'classnames'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { scrollToBottom } from '../util/scrollUtil.std.js'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { scrollToBottom } from '../util/scrollUtil.std.ts'; type PropsType = { moduleClassName?: string; diff --git a/ts/components/ContextMenu.dom.stories.tsx b/ts/components/ContextMenu.dom.stories.tsx index 8e172ff68f..fa6829ba2b 100644 --- a/ts/components/ContextMenu.dom.stories.tsx +++ b/ts/components/ContextMenu.dom.stories.tsx @@ -5,8 +5,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ContextMenu.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; +import type { PropsType } from './ContextMenu.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ContextMenu.dom.tsx b/ts/components/ContextMenu.dom.tsx index d58f211201..2d02f934a5 100644 --- a/ts/components/ContextMenu.dom.tsx +++ b/ts/components/ContextMenu.dom.tsx @@ -9,11 +9,11 @@ import classNames from 'classnames'; import { usePopper } from 'react-popper'; import lodash from 'lodash'; -import type { Theme } from '../util/theme.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; -import { themeClassName } from '../util/theme.std.js'; -import { handleOutsideClick } from '../util/handleOutsideClick.dom.js'; +import type { Theme } from '../util/theme.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; +import { themeClassName } from '../util/theme.std.ts'; +import { handleOutsideClick } from '../util/handleOutsideClick.dom.ts'; const { noop } = lodash; diff --git a/ts/components/ConversationList.dom.stories.tsx b/ts/components/ConversationList.dom.stories.tsx index 1da5e997b9..55f8ad7aa4 100644 --- a/ts/components/ConversationList.dom.stories.tsx +++ b/ts/components/ConversationList.dom.stories.tsx @@ -6,16 +6,16 @@ import lodash from 'lodash'; import { v4 as generateUuid } from 'uuid'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Row, PropsType } from './ConversationList.dom.js'; -import { ConversationList, RowType } from './ConversationList.dom.js'; -import { MessageSearchResult } from './conversationList/MessageSearchResult.dom.js'; -import type { PropsData as ConversationListItemPropsType } from './conversationList/ConversationListItem.dom.js'; -import { MessageStatuses } from '../types/message/MessageStatus.std.js'; -import { ContactCheckboxDisabledReason } from './conversationList/ContactCheckbox.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { ThemeType } from '../types/Util.std.js'; +import type { Row, PropsType } from './ConversationList.dom.tsx'; +import { ConversationList, RowType } from './ConversationList.dom.tsx'; +import { MessageSearchResult } from './conversationList/MessageSearchResult.dom.tsx'; +import type { PropsData as ConversationListItemPropsType } from './conversationList/ConversationListItem.dom.tsx'; +import { MessageStatuses } from '../types/message/MessageStatus.std.ts'; +import { ContactCheckboxDisabledReason } from './conversationList/ContactCheckbox.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; import { StorybookThemeContext } from '../../.storybook/StorybookThemeContext.std.js'; -import { makeFakeLookupConversationWithoutServiceId } from '../test-helpers/fakeLookupConversationWithoutServiceId.std.js'; +import { makeFakeLookupConversationWithoutServiceId } from '../test-helpers/fakeLookupConversationWithoutServiceId.std.ts'; const { times, omit } = lodash; diff --git a/ts/components/ConversationList.dom.tsx b/ts/components/ConversationList.dom.tsx index 4f3c910984..f8567bbd79 100644 --- a/ts/components/ConversationList.dom.tsx +++ b/ts/components/ConversationList.dom.tsx @@ -7,38 +7,38 @@ import type { ListRowRenderer } from 'react-virtualized'; import classNames from 'classnames'; import lodash from 'lodash'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { assertDev } from '../util/assert.std.js'; -import type { ParsedE164Type } from '../util/libphonenumberInstance.std.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import { ScrollBehavior } from '../types/Util.std.js'; -import { getNavSidebarWidthBreakpoint } from './_util.std.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../util/lookupConversationWithoutServiceId.preload.js'; -import type { ShowConversationType } from '../state/ducks/conversations.preload.js'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import type { ParsedE164Type } from '../util/libphonenumberInstance.std.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import { ScrollBehavior } from '../types/Util.std.ts'; +import { getNavSidebarWidthBreakpoint } from './_util.std.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../util/lookupConversationWithoutServiceId.preload.ts'; +import type { ShowConversationType } from '../state/ducks/conversations.preload.ts'; -import type { PropsData as ConversationListItemPropsType } from './conversationList/ConversationListItem.dom.js'; -import type { ContactCheckboxDisabledReason } from './conversationList/ContactCheckbox.dom.js'; -import type { ContactListItemConversationType as ContactListItemPropsType } from './conversationList/ContactListItem.dom.js'; -import type { GroupListItemConversationType } from './conversationList/GroupListItem.dom.js'; -import { ConversationListItem } from './conversationList/ConversationListItem.dom.js'; -import { ContactListItem } from './conversationList/ContactListItem.dom.js'; -import { ContactCheckbox as ContactCheckboxComponent } from './conversationList/ContactCheckbox.dom.js'; -import { PhoneNumberCheckbox as PhoneNumberCheckboxComponent } from './conversationList/PhoneNumberCheckbox.dom.js'; -import { UsernameCheckbox as UsernameCheckboxComponent } from './conversationList/UsernameCheckbox.dom.js'; +import type { PropsData as ConversationListItemPropsType } from './conversationList/ConversationListItem.dom.tsx'; +import type { ContactCheckboxDisabledReason } from './conversationList/ContactCheckbox.dom.tsx'; +import type { ContactListItemConversationType as ContactListItemPropsType } from './conversationList/ContactListItem.dom.tsx'; +import type { GroupListItemConversationType } from './conversationList/GroupListItem.dom.tsx'; +import { ConversationListItem } from './conversationList/ConversationListItem.dom.tsx'; +import { ContactListItem } from './conversationList/ContactListItem.dom.tsx'; +import { ContactCheckbox as ContactCheckboxComponent } from './conversationList/ContactCheckbox.dom.tsx'; +import { PhoneNumberCheckbox as PhoneNumberCheckboxComponent } from './conversationList/PhoneNumberCheckbox.dom.tsx'; +import { UsernameCheckbox as UsernameCheckboxComponent } from './conversationList/UsernameCheckbox.dom.tsx'; import { ComposeStepButton, Icon as ComposeStepButtonIcon, -} from './conversationList/ComposeStepButton.dom.js'; -import { StartNewConversation as StartNewConversationComponent } from './conversationList/StartNewConversation.dom.js'; -import { SearchResultsLoadingFakeHeader as SearchResultsLoadingFakeHeaderComponent } from './conversationList/SearchResultsLoadingFakeHeader.dom.js'; -import { SearchResultsLoadingFakeRow as SearchResultsLoadingFakeRowComponent } from './conversationList/SearchResultsLoadingFakeRow.dom.js'; -import { UsernameSearchResultListItem } from './conversationList/UsernameSearchResultListItem.dom.js'; -import { GroupListItem } from './conversationList/GroupListItem.dom.js'; -import { ListView } from './ListView.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { ListTile } from './ListTile.dom.js'; -import type { RenderConversationListItemContextMenuProps } from './conversationList/BaseConversationListItem.dom.js'; +} from './conversationList/ComposeStepButton.dom.tsx'; +import { StartNewConversation as StartNewConversationComponent } from './conversationList/StartNewConversation.dom.tsx'; +import { SearchResultsLoadingFakeHeader as SearchResultsLoadingFakeHeaderComponent } from './conversationList/SearchResultsLoadingFakeHeader.dom.tsx'; +import { SearchResultsLoadingFakeRow as SearchResultsLoadingFakeRowComponent } from './conversationList/SearchResultsLoadingFakeRow.dom.tsx'; +import { UsernameSearchResultListItem } from './conversationList/UsernameSearchResultListItem.dom.tsx'; +import { GroupListItem } from './conversationList/GroupListItem.dom.tsx'; +import { ListView } from './ListView.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { ListTile } from './ListTile.dom.tsx'; +import type { RenderConversationListItemContextMenuProps } from './conversationList/BaseConversationListItem.dom.tsx'; const { get, pick } = lodash; diff --git a/ts/components/CountryCodeSelect.dom.stories.tsx b/ts/components/CountryCodeSelect.dom.stories.tsx index b5ef6d175f..5dd265851e 100644 --- a/ts/components/CountryCodeSelect.dom.stories.tsx +++ b/ts/components/CountryCodeSelect.dom.stories.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; -import type { PropsType } from './CountryCodeSelect.dom.js'; -import { CountryCodeSelect } from './CountryCodeSelect.dom.js'; -import { type ComponentMeta } from '../storybook/types.std.js'; +import type { PropsType } from './CountryCodeSelect.dom.tsx'; +import { CountryCodeSelect } from './CountryCodeSelect.dom.tsx'; +import { type ComponentMeta } from '../storybook/types.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CountryCodeSelect.dom.tsx b/ts/components/CountryCodeSelect.dom.tsx index 18122f77ff..e1413a592a 100644 --- a/ts/components/CountryCodeSelect.dom.tsx +++ b/ts/components/CountryCodeSelect.dom.tsx @@ -4,10 +4,10 @@ import React, { useState, useCallback, useMemo } from 'react'; import Fuse from 'fuse.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { CountryDataType } from '../util/getCountryData.dom.js'; -import { Modal } from './Modal.dom.js'; -import { SearchInput } from './SearchInput.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { CountryDataType } from '../util/getCountryData.dom.ts'; +import { Modal } from './Modal.dom.tsx'; +import { SearchInput } from './SearchInput.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/CrashReportDialog.dom.stories.tsx b/ts/components/CrashReportDialog.dom.stories.tsx index f46e6ad3c3..1fcc3acf37 100644 --- a/ts/components/CrashReportDialog.dom.stories.tsx +++ b/ts/components/CrashReportDialog.dom.stories.tsx @@ -5,9 +5,9 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CrashReportDialog.dom.js'; -import { CrashReportDialog } from './CrashReportDialog.dom.js'; -import { sleep } from '../util/sleep.std.js'; +import type { PropsType } from './CrashReportDialog.dom.tsx'; +import { CrashReportDialog } from './CrashReportDialog.dom.tsx'; +import { sleep } from '../util/sleep.std.ts'; export default { title: 'Components/CrashReportDialog', diff --git a/ts/components/CrashReportDialog.dom.tsx b/ts/components/CrashReportDialog.dom.tsx index 4edff726ec..55abfa265a 100644 --- a/ts/components/CrashReportDialog.dom.tsx +++ b/ts/components/CrashReportDialog.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; -import { Spinner } from './Spinner.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; type PropsActionsType = { writeCrashReportsToLog: () => void; diff --git a/ts/components/CriticalIdlePrimaryDeviceDialog.dom.tsx b/ts/components/CriticalIdlePrimaryDeviceDialog.dom.tsx index 1e4d3e5697..c9bcc3e6f5 100644 --- a/ts/components/CriticalIdlePrimaryDeviceDialog.dom.tsx +++ b/ts/components/CriticalIdlePrimaryDeviceDialog.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import { LeftPaneDialog } from './LeftPaneDialog.dom.js'; -import type { WidthBreakpoint } from './_util.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { I18n } from './I18n.dom.js'; +import { LeftPaneDialog } from './LeftPaneDialog.dom.tsx'; +import type { WidthBreakpoint } from './_util.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { I18n } from './I18n.dom.tsx'; export type PropsType = { containerWidthBreakpoint: WidthBreakpoint; diff --git a/ts/components/CriticalIdlePrimaryDeviceModal.dom.stories.tsx b/ts/components/CriticalIdlePrimaryDeviceModal.dom.stories.tsx index 46c90cf901..07d5a50c4e 100644 --- a/ts/components/CriticalIdlePrimaryDeviceModal.dom.stories.tsx +++ b/ts/components/CriticalIdlePrimaryDeviceModal.dom.stories.tsx @@ -5,7 +5,7 @@ import type { Meta, StoryFn } from '@storybook/react'; import React, { type ComponentProps } from 'react'; import { action } from '@storybook/addon-actions'; -import { CriticalIdlePrimaryDeviceModal } from './CriticalIdlePrimaryDeviceModal.dom.js'; +import { CriticalIdlePrimaryDeviceModal } from './CriticalIdlePrimaryDeviceModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/CriticalIdlePrimaryDeviceModal.dom.tsx b/ts/components/CriticalIdlePrimaryDeviceModal.dom.tsx index d9869ca7d6..165ab1d7a3 100644 --- a/ts/components/CriticalIdlePrimaryDeviceModal.dom.tsx +++ b/ts/components/CriticalIdlePrimaryDeviceModal.dom.tsx @@ -3,11 +3,11 @@ import * as React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { CRITICAL_IDLE_PRIMARY_DEVICE_SUPPORT_PAGE } from './CriticalIdlePrimaryDeviceDialog.dom.js'; -import { I18n } from './I18n.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { CRITICAL_IDLE_PRIMARY_DEVICE_SUPPORT_PAGE } from './CriticalIdlePrimaryDeviceDialog.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/CustomColorEditor.dom.stories.tsx b/ts/components/CustomColorEditor.dom.stories.tsx index e65553601c..5919fc3ddb 100644 --- a/ts/components/CustomColorEditor.dom.stories.tsx +++ b/ts/components/CustomColorEditor.dom.stories.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './CustomColorEditor.dom.js'; -import { CustomColorEditor } from './CustomColorEditor.dom.js'; +import type { PropsType } from './CustomColorEditor.dom.tsx'; +import { CustomColorEditor } from './CustomColorEditor.dom.tsx'; export default { title: 'Components/CustomColorEditor', diff --git a/ts/components/CustomColorEditor.dom.tsx b/ts/components/CustomColorEditor.dom.tsx index c803688a5f..d0ba6757ee 100644 --- a/ts/components/CustomColorEditor.dom.tsx +++ b/ts/components/CustomColorEditor.dom.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { GradientDial, KnobType } from './GradientDial.dom.js'; -import { SampleMessageBubbles } from './SampleMessageBubbles.dom.js'; -import { Slider } from './Slider.dom.js'; -import { Tabs } from './Tabs.dom.js'; -import type { CustomColorType } from '../types/Colors.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { getHSL } from '../util/getHSL.std.js'; -import { getCustomColorStyle } from '../util/getCustomColorStyle.dom.js'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { GradientDial, KnobType } from './GradientDial.dom.tsx'; +import { SampleMessageBubbles } from './SampleMessageBubbles.dom.tsx'; +import { Slider } from './Slider.dom.tsx'; +import { Tabs } from './Tabs.dom.tsx'; +import type { CustomColorType } from '../types/Colors.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { getHSL } from '../util/getHSL.std.ts'; +import { getCustomColorStyle } from '../util/getCustomColorStyle.dom.ts'; export type PropsType = { customColor?: CustomColorType; diff --git a/ts/components/CustomizingPreferredReactionsModal.dom.stories.tsx b/ts/components/CustomizingPreferredReactionsModal.dom.stories.tsx index aef8238664..c62be910fb 100644 --- a/ts/components/CustomizingPreferredReactionsModal.dom.stories.tsx +++ b/ts/components/CustomizingPreferredReactionsModal.dom.stories.tsx @@ -6,10 +6,10 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants.std.js'; -import type { PropsType } from './CustomizingPreferredReactionsModal.dom.js'; -import { CustomizingPreferredReactionsModal } from './CustomizingPreferredReactionsModal.dom.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; +import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants.std.ts'; +import type { PropsType } from './CustomizingPreferredReactionsModal.dom.tsx'; +import { CustomizingPreferredReactionsModal } from './CustomizingPreferredReactionsModal.dom.tsx'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/CustomizingPreferredReactionsModal.dom.tsx b/ts/components/CustomizingPreferredReactionsModal.dom.tsx index 65dc6f7a9d..a9909b282f 100644 --- a/ts/components/CustomizingPreferredReactionsModal.dom.tsx +++ b/ts/components/CustomizingPreferredReactionsModal.dom.tsx @@ -4,22 +4,22 @@ import React, { useState, useCallback, useRef } from 'react'; import lodash from 'lodash'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; import { ReactionPickerPicker, ReactionPickerPickerEmojiButton, ReactionPickerPickerStyle, -} from './ReactionPickerPicker.dom.js'; -import { DEFAULT_PREFERRED_REACTION_EMOJI_PARENT_KEYS } from '../reactions/constants.std.js'; +} from './ReactionPickerPicker.dom.tsx'; +import { DEFAULT_PREFERRED_REACTION_EMOJI_PARENT_KEYS } from '../reactions/constants.std.ts'; import { EmojiSkinTone, getEmojiVariantByKey, getEmojiVariantByParentKeyAndSkinTone, -} from './fun/data/emojis.std.js'; -import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; +} from './fun/data/emojis.std.ts'; +import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.tsx'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; const { isEqual } = lodash; diff --git a/ts/components/DebugLogErrorModal.dom.stories.tsx b/ts/components/DebugLogErrorModal.dom.stories.tsx index 45f709d893..4d2c97b046 100644 --- a/ts/components/DebugLogErrorModal.dom.stories.tsx +++ b/ts/components/DebugLogErrorModal.dom.stories.tsx @@ -5,8 +5,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DebugLogErrorModal.dom.js'; -import { DebugLogErrorModal } from './DebugLogErrorModal.dom.js'; +import type { PropsType } from './DebugLogErrorModal.dom.tsx'; +import { DebugLogErrorModal } from './DebugLogErrorModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DebugLogErrorModal.dom.tsx b/ts/components/DebugLogErrorModal.dom.tsx index bc4eb38e8b..ef93f90e49 100644 --- a/ts/components/DebugLogErrorModal.dom.tsx +++ b/ts/components/DebugLogErrorModal.dom.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; export type PropsType = { description?: string; diff --git a/ts/components/DebugLogWindow.dom.stories.tsx b/ts/components/DebugLogWindow.dom.stories.tsx index e8e9f25c43..2715f27eb3 100644 --- a/ts/components/DebugLogWindow.dom.stories.tsx +++ b/ts/components/DebugLogWindow.dom.stories.tsx @@ -5,9 +5,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DebugLogWindow.dom.js'; -import { DebugLogWindow } from './DebugLogWindow.dom.js'; -import { sleep } from '../util/sleep.std.js'; +import type { PropsType } from './DebugLogWindow.dom.tsx'; +import { DebugLogWindow } from './DebugLogWindow.dom.tsx'; +import { sleep } from '../util/sleep.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/DebugLogWindow.dom.tsx b/ts/components/DebugLogWindow.dom.tsx index 22dc7eb7d4..a1c308b985 100644 --- a/ts/components/DebugLogWindow.dom.tsx +++ b/ts/components/DebugLogWindow.dom.tsx @@ -4,18 +4,18 @@ import type { MouseEvent } from 'react'; import React, { useEffect, useState } from 'react'; import copyText from 'copy-text-to-clipboard'; -import type { LocalizerType } from '../types/Util.std.js'; -import * as Errors from '../types/errors.std.js'; -import type { AnyToast } from '../types/Toast.dom.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Spinner } from './Spinner.dom.js'; -import { ToastManager } from './ToastManager.dom.js'; -import { createSupportUrl } from '../util/createSupportUrl.std.js'; -import { shouldNeverBeCalled } from '../util/shouldNeverBeCalled.std.js'; -import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import type { AnyToast } from '../types/Toast.dom.tsx'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { createLogger } from '../logging/log.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; +import { ToastManager } from './ToastManager.dom.tsx'; +import { createSupportUrl } from '../util/createSupportUrl.std.ts'; +import { shouldNeverBeCalled } from '../util/shouldNeverBeCalled.std.ts'; +import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.ts'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; const log = createLogger('DebugLogWindow'); diff --git a/ts/components/DeleteAttachmentConfirmationDialog.dom.stories.tsx b/ts/components/DeleteAttachmentConfirmationDialog.dom.stories.tsx index f3309b0047..4b3757314e 100644 --- a/ts/components/DeleteAttachmentConfirmationDialog.dom.stories.tsx +++ b/ts/components/DeleteAttachmentConfirmationDialog.dom.stories.tsx @@ -3,7 +3,7 @@ import type { Meta } from '@storybook/react'; import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; -import { DeleteAttachmentConfirmationDialog } from './DeleteAttachmentConfirmationDialog.dom.js'; +import { DeleteAttachmentConfirmationDialog } from './DeleteAttachmentConfirmationDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DeleteAttachmentConfirmationDialog.dom.tsx b/ts/components/DeleteAttachmentConfirmationDialog.dom.tsx index 079f62da94..530aa7405c 100644 --- a/ts/components/DeleteAttachmentConfirmationDialog.dom.tsx +++ b/ts/components/DeleteAttachmentConfirmationDialog.dom.tsx @@ -1,8 +1,8 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback } from 'react'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; export function DeleteAttachmentConfirmationDialog({ i18n, diff --git a/ts/components/DeleteMessagesConfirmationDialog.dom.stories.tsx b/ts/components/DeleteMessagesConfirmationDialog.dom.stories.tsx index 288e32c945..379b5346ce 100644 --- a/ts/components/DeleteMessagesConfirmationDialog.dom.stories.tsx +++ b/ts/components/DeleteMessagesConfirmationDialog.dom.stories.tsx @@ -3,7 +3,7 @@ import type { Meta } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import { DeleteMessagesConfirmationDialog } from './DeleteMessagesConfirmationDialog.dom.js'; +import { DeleteMessagesConfirmationDialog } from './DeleteMessagesConfirmationDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DeleteMessagesConfirmationDialog.dom.tsx b/ts/components/DeleteMessagesConfirmationDialog.dom.tsx index d998ede09c..489df840a4 100644 --- a/ts/components/DeleteMessagesConfirmationDialog.dom.tsx +++ b/ts/components/DeleteMessagesConfirmationDialog.dom.tsx @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; export function DeleteMessagesConfirmationDialog({ i18n, diff --git a/ts/components/DeleteMessagesModal.dom.stories.tsx b/ts/components/DeleteMessagesModal.dom.stories.tsx index 450e1fbbe5..f73a20350b 100644 --- a/ts/components/DeleteMessagesModal.dom.stories.tsx +++ b/ts/components/DeleteMessagesModal.dom.stories.tsx @@ -5,9 +5,9 @@ import React, { useCallback, useState } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import DeleteMessagesModal from './DeleteMessagesModal.dom.js'; -import type { DeleteMessagesModalProps } from './DeleteMessagesModal.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; +import DeleteMessagesModal from './DeleteMessagesModal.dom.tsx'; +import type { DeleteMessagesModalProps } from './DeleteMessagesModal.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DeleteMessagesModal.dom.tsx b/ts/components/DeleteMessagesModal.dom.tsx index f79928e64d..0442bd8f33 100644 --- a/ts/components/DeleteMessagesModal.dom.tsx +++ b/ts/components/DeleteMessagesModal.dom.tsx @@ -3,10 +3,10 @@ import type { MouseEvent } from 'react'; import React, { useCallback, useState } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.tsx'; export type DeleteMessagesModalProps = Readonly<{ isMe: boolean; diff --git a/ts/components/DialogExpiredBuild.dom.stories.tsx b/ts/components/DialogExpiredBuild.dom.stories.tsx index 9fa51a136e..0cfc4418f2 100644 --- a/ts/components/DialogExpiredBuild.dom.stories.tsx +++ b/ts/components/DialogExpiredBuild.dom.stories.tsx @@ -3,10 +3,10 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DialogExpiredBuild.dom.js'; -import { DialogExpiredBuild } from './DialogExpiredBuild.dom.js'; -import { WidthBreakpoint } from './_util.std.js'; -import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.js'; +import type { PropsType } from './DialogExpiredBuild.dom.tsx'; +import { DialogExpiredBuild } from './DialogExpiredBuild.dom.tsx'; +import { WidthBreakpoint } from './_util.std.ts'; +import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DialogExpiredBuild.dom.tsx b/ts/components/DialogExpiredBuild.dom.tsx index f1b992ca45..c9590e6b14 100644 --- a/ts/components/DialogExpiredBuild.dom.tsx +++ b/ts/components/DialogExpiredBuild.dom.tsx @@ -3,11 +3,11 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { WidthBreakpoint } from './_util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { WidthBreakpoint } from './_util.std.ts'; -import { LeftPaneDialog } from './LeftPaneDialog.dom.js'; -import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js'; +import { LeftPaneDialog } from './LeftPaneDialog.dom.tsx'; +import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.ts'; export type PropsType = { containerWidthBreakpoint: WidthBreakpoint; diff --git a/ts/components/DialogNetworkStatus.dom.stories.tsx b/ts/components/DialogNetworkStatus.dom.stories.tsx index b271142d90..854fb1b006 100644 --- a/ts/components/DialogNetworkStatus.dom.stories.tsx +++ b/ts/components/DialogNetworkStatus.dom.stories.tsx @@ -5,11 +5,11 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DialogNetworkStatus.dom.js'; -import { DialogNetworkStatus } from './DialogNetworkStatus.dom.js'; -import { SocketStatus } from '../types/SocketStatus.std.js'; -import { WidthBreakpoint } from './_util.std.js'; -import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.js'; +import type { PropsType } from './DialogNetworkStatus.dom.tsx'; +import { DialogNetworkStatus } from './DialogNetworkStatus.dom.tsx'; +import { SocketStatus } from '../types/SocketStatus.std.ts'; +import { WidthBreakpoint } from './_util.std.ts'; +import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DialogNetworkStatus.dom.tsx b/ts/components/DialogNetworkStatus.dom.tsx index fa3133b154..00dfd71858 100644 --- a/ts/components/DialogNetworkStatus.dom.tsx +++ b/ts/components/DialogNetworkStatus.dom.tsx @@ -3,13 +3,13 @@ import React, { useEffect } from 'react'; -import { LeftPaneDialog } from './LeftPaneDialog.dom.js'; -import { Spinner } from './Spinner.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { SocketStatus } from '../types/SocketStatus.std.js'; -import type { NetworkStateType } from '../state/ducks/network.dom.js'; -import type { WidthBreakpoint } from './_util.std.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; +import { LeftPaneDialog } from './LeftPaneDialog.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { SocketStatus } from '../types/SocketStatus.std.ts'; +import type { NetworkStateType } from '../state/ducks/network.dom.ts'; +import type { WidthBreakpoint } from './_util.std.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; const FIVE_SECONDS = 5 * 1000; diff --git a/ts/components/DialogRelink.dom.stories.tsx b/ts/components/DialogRelink.dom.stories.tsx index aa94be2c4f..1bd5e698be 100644 --- a/ts/components/DialogRelink.dom.stories.tsx +++ b/ts/components/DialogRelink.dom.stories.tsx @@ -4,10 +4,10 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DialogRelink.dom.js'; -import { DialogRelink } from './DialogRelink.dom.js'; -import { WidthBreakpoint } from './_util.std.js'; -import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.js'; +import type { PropsType } from './DialogRelink.dom.tsx'; +import { DialogRelink } from './DialogRelink.dom.tsx'; +import { WidthBreakpoint } from './_util.std.ts'; +import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DialogRelink.dom.tsx b/ts/components/DialogRelink.dom.tsx index 8f7750243f..edba6d8e70 100644 --- a/ts/components/DialogRelink.dom.tsx +++ b/ts/components/DialogRelink.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { WidthBreakpoint } from './_util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { WidthBreakpoint } from './_util.std.ts'; -import { LeftPaneDialog } from './LeftPaneDialog.dom.js'; +import { LeftPaneDialog } from './LeftPaneDialog.dom.tsx'; export type PropsType = { containerWidthBreakpoint: WidthBreakpoint; diff --git a/ts/components/DialogUpdate.dom.stories.tsx b/ts/components/DialogUpdate.dom.stories.tsx index caafac3559..9b9a3bee9f 100644 --- a/ts/components/DialogUpdate.dom.stories.tsx +++ b/ts/components/DialogUpdate.dom.stories.tsx @@ -4,12 +4,12 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DialogUpdate.dom.js'; -import { DialogUpdate } from './DialogUpdate.dom.js'; -import { DialogType } from '../types/Dialogs.std.js'; -import { WidthBreakpoint } from './_util.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.js'; +import type { PropsType } from './DialogUpdate.dom.tsx'; +import { DialogUpdate } from './DialogUpdate.dom.tsx'; +import { DialogType } from '../types/Dialogs.std.ts'; +import { WidthBreakpoint } from './_util.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DialogUpdate.dom.tsx b/ts/components/DialogUpdate.dom.tsx index 69233cc70d..6e1099a7e7 100644 --- a/ts/components/DialogUpdate.dom.tsx +++ b/ts/components/DialogUpdate.dom.tsx @@ -4,19 +4,19 @@ import type { ReactNode } from 'react'; import React, { useCallback } from 'react'; -import { isBeta } from '../util/version.std.js'; -import { DialogType } from '../types/Dialogs.std.js'; +import { isBeta } from '../util/version.std.ts'; +import { DialogType } from '../types/Dialogs.std.ts'; import { PRODUCTION_DOWNLOAD_URL, BETA_DOWNLOAD_URL, -} from '../types/support.std.js'; -import { I18n } from './I18n.dom.js'; -import { LeftPaneDialog } from './LeftPaneDialog.dom.js'; -import { formatFileSize } from '../util/formatFileSize.std.js'; +} from '../types/support.std.ts'; +import { I18n } from './I18n.dom.tsx'; +import { LeftPaneDialog } from './LeftPaneDialog.dom.tsx'; +import { formatFileSize } from '../util/formatFileSize.std.ts'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { DismissOptions } from './LeftPaneDialog.dom.js'; -import type { WidthBreakpoint } from './_util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { DismissOptions } from './LeftPaneDialog.dom.tsx'; +import type { WidthBreakpoint } from './_util.std.ts'; function contactSupportLink(parts: ReactNode): React.JSX.Element { return ( diff --git a/ts/components/DirectCallRemoteParticipant.dom.tsx b/ts/components/DirectCallRemoteParticipant.dom.tsx index 910b4b3e6b..215209c00f 100644 --- a/ts/components/DirectCallRemoteParticipant.dom.tsx +++ b/ts/components/DirectCallRemoteParticipant.dom.tsx @@ -3,13 +3,13 @@ import React, { useRef, useEffect } from 'react'; import classNames from 'classnames'; -import type { SetRendererCanvasType } from '../state/ducks/calling.preload.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { CallBackgroundBlur } from './CallBackgroundBlur.dom.js'; -import type { SizeCallbackType } from '../calling/VideoSupport.preload.js'; +import type { SetRendererCanvasType } from '../state/ducks/calling.preload.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { CallBackgroundBlur } from './CallBackgroundBlur.dom.tsx'; +import type { SizeCallbackType } from '../calling/VideoSupport.preload.ts'; type PropsType = { conversation: ConversationType; diff --git a/ts/components/DisappearingTimeDialog.dom.stories.tsx b/ts/components/DisappearingTimeDialog.dom.stories.tsx index 96a4245e4e..fe5b55eeba 100644 --- a/ts/components/DisappearingTimeDialog.dom.stories.tsx +++ b/ts/components/DisappearingTimeDialog.dom.stories.tsx @@ -4,9 +4,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DisappearingTimeDialog.dom.js'; -import { DisappearingTimeDialog } from './DisappearingTimeDialog.dom.js'; -import { EXPIRE_TIMERS } from '../test-helpers/expireTimers.std.js'; +import type { PropsType } from './DisappearingTimeDialog.dom.tsx'; +import { DisappearingTimeDialog } from './DisappearingTimeDialog.dom.tsx'; +import { EXPIRE_TIMERS } from '../test-helpers/expireTimers.std.ts'; export default { title: 'Components/DisappearingTimeDialog', diff --git a/ts/components/DisappearingTimeDialog.dom.tsx b/ts/components/DisappearingTimeDialog.dom.tsx index cd8cbf10f9..670153e73f 100644 --- a/ts/components/DisappearingTimeDialog.dom.tsx +++ b/ts/components/DisappearingTimeDialog.dom.tsx @@ -3,11 +3,11 @@ import React, { useState } from 'react'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { Select } from './Select.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { Theme } from '../util/theme.std.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { Select } from './Select.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { Theme } from '../util/theme.std.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; const CSS_MODULE = 'module-disappearing-time-dialog'; diff --git a/ts/components/DisappearingTimerSelect.dom.stories.tsx b/ts/components/DisappearingTimerSelect.dom.stories.tsx index a0f72c2c67..2ca9c7c1cf 100644 --- a/ts/components/DisappearingTimerSelect.dom.stories.tsx +++ b/ts/components/DisappearingTimerSelect.dom.stories.tsx @@ -3,9 +3,9 @@ import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './DisappearingTimerSelect.dom.js'; -import { DisappearingTimerSelect } from './DisappearingTimerSelect.dom.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; +import type { Props } from './DisappearingTimerSelect.dom.tsx'; +import { DisappearingTimerSelect } from './DisappearingTimerSelect.dom.tsx'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; export default { title: 'Components/DisappearingTimerSelect', diff --git a/ts/components/DisappearingTimerSelect.dom.tsx b/ts/components/DisappearingTimerSelect.dom.tsx index 1cdecb2f55..f0fc83cb97 100644 --- a/ts/components/DisappearingTimerSelect.dom.tsx +++ b/ts/components/DisappearingTimerSelect.dom.tsx @@ -3,12 +3,12 @@ import type { ReactNode } from 'react'; import React, { useCallback, useState, useMemo } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import * as expirationTimer from '../util/expirationTimer.std.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; -import { DisappearingTimeDialog } from './DisappearingTimeDialog.dom.js'; -import { AxoSelect } from '../axo/AxoSelect.dom.js'; -import { tw } from '../axo/tw.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import * as expirationTimer from '../util/expirationTimer.std.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; +import { DisappearingTimeDialog } from './DisappearingTimeDialog.dom.tsx'; +import { AxoSelect } from '../axo/AxoSelect.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; export type Props = { i18n: LocalizerType; diff --git a/ts/components/DiscardDraftDialog.dom.stories.tsx b/ts/components/DiscardDraftDialog.dom.stories.tsx index a40d1720cf..3a82c210af 100644 --- a/ts/components/DiscardDraftDialog.dom.stories.tsx +++ b/ts/components/DiscardDraftDialog.dom.stories.tsx @@ -4,7 +4,7 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { DiscardDraftDialog } from './DiscardDraftDialog.dom.js'; +import { DiscardDraftDialog } from './DiscardDraftDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DiscardDraftDialog.dom.tsx b/ts/components/DiscardDraftDialog.dom.tsx index 8b77cc85eb..76c47b6890 100644 --- a/ts/components/DiscardDraftDialog.dom.tsx +++ b/ts/components/DiscardDraftDialog.dom.tsx @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback } from 'react'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.tsx'; export type DiscardDraftDialogProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/DonationErrorModal.dom.stories.tsx b/ts/components/DonationErrorModal.dom.stories.tsx index 4339709263..46862be0a3 100644 --- a/ts/components/DonationErrorModal.dom.stories.tsx +++ b/ts/components/DonationErrorModal.dom.stories.tsx @@ -6,9 +6,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DonationErrorModal.dom.js'; -import { DonationErrorModal } from './DonationErrorModal.dom.js'; -import { donationErrorTypeSchema } from '../types/Donations.std.js'; +import type { PropsType } from './DonationErrorModal.dom.tsx'; +import { DonationErrorModal } from './DonationErrorModal.dom.tsx'; +import { donationErrorTypeSchema } from '../types/Donations.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/DonationErrorModal.dom.tsx b/ts/components/DonationErrorModal.dom.tsx index 9129fb8a3e..3a707e210b 100644 --- a/ts/components/DonationErrorModal.dom.tsx +++ b/ts/components/DonationErrorModal.dom.tsx @@ -4,13 +4,13 @@ import React from 'react'; import type { ReactNode } from 'react'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { donationErrorTypeSchema } from '../types/Donations.std.js'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { donationErrorTypeSchema } from '../types/Donations.std.ts'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { DonationErrorType } from '../types/Donations.std.js'; -import { Button } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { DonationErrorType } from '../types/Donations.std.ts'; +import { Button } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/DonationInterruptedModal.dom.stories.tsx b/ts/components/DonationInterruptedModal.dom.stories.tsx index b967f7bf0c..ac8506579b 100644 --- a/ts/components/DonationInterruptedModal.dom.stories.tsx +++ b/ts/components/DonationInterruptedModal.dom.stories.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DonationInterruptedModal.dom.js'; -import { DonationInterruptedModal } from './DonationInterruptedModal.dom.js'; +import type { PropsType } from './DonationInterruptedModal.dom.tsx'; +import { DonationInterruptedModal } from './DonationInterruptedModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DonationInterruptedModal.dom.tsx b/ts/components/DonationInterruptedModal.dom.tsx index dd0dfc82f3..dd22cc7ee9 100644 --- a/ts/components/DonationInterruptedModal.dom.tsx +++ b/ts/components/DonationInterruptedModal.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/DonationPrivacyInformationModal.dom.stories.tsx b/ts/components/DonationPrivacyInformationModal.dom.stories.tsx index 122299e947..6230ec96aa 100644 --- a/ts/components/DonationPrivacyInformationModal.dom.stories.tsx +++ b/ts/components/DonationPrivacyInformationModal.dom.stories.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { DonationPrivacyInformationModal } from './DonationPrivacyInformationModal.dom.js'; -import type { LocalizerType } from '../types/I18N.std.js'; +import { DonationPrivacyInformationModal } from './DonationPrivacyInformationModal.dom.tsx'; +import type { LocalizerType } from '../types/I18N.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/DonationPrivacyInformationModal.dom.tsx b/ts/components/DonationPrivacyInformationModal.dom.tsx index fb827badc6..c1ebc0a4b4 100644 --- a/ts/components/DonationPrivacyInformationModal.dom.tsx +++ b/ts/components/DonationPrivacyInformationModal.dom.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; -import { tw } from '../axo/tw.dom.js'; -import { AxoSymbol } from '../axo/AxoSymbol.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.ts'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; +import { AxoSymbol } from '../axo/AxoSymbol.dom.tsx'; export type DonationPrivacyInformationModalProps = { i18n: LocalizerType; diff --git a/ts/components/DonationProgressModal.dom.stories.tsx b/ts/components/DonationProgressModal.dom.stories.tsx index 35c2866e29..e25c5f16d1 100644 --- a/ts/components/DonationProgressModal.dom.stories.tsx +++ b/ts/components/DonationProgressModal.dom.stories.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DonationProgressModal.dom.js'; -import { DonationProgressModal } from './DonationProgressModal.dom.js'; +import type { PropsType } from './DonationProgressModal.dom.tsx'; +import { DonationProgressModal } from './DonationProgressModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DonationProgressModal.dom.tsx b/ts/components/DonationProgressModal.dom.tsx index 7a771906da..acedb2cfea 100644 --- a/ts/components/DonationProgressModal.dom.tsx +++ b/ts/components/DonationProgressModal.dom.tsx @@ -3,10 +3,10 @@ import React, { useEffect } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { SpinnerV2 } from './SpinnerV2.dom.js'; -import { SECOND } from '../util/durations/index.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { SpinnerV2 } from './SpinnerV2.dom.tsx'; +import { SECOND } from '../util/durations/index.std.ts'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/DonationStillProcessingModal.dom.stories.tsx b/ts/components/DonationStillProcessingModal.dom.stories.tsx index a03f1d2801..d073d6796c 100644 --- a/ts/components/DonationStillProcessingModal.dom.stories.tsx +++ b/ts/components/DonationStillProcessingModal.dom.stories.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DonationStillProcessingModal.dom.js'; -import { DonationStillProcessingModal } from './DonationStillProcessingModal.dom.js'; +import type { PropsType } from './DonationStillProcessingModal.dom.tsx'; +import { DonationStillProcessingModal } from './DonationStillProcessingModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/DonationStillProcessingModal.dom.tsx b/ts/components/DonationStillProcessingModal.dom.tsx index a1fcff1916..c5b65d3623 100644 --- a/ts/components/DonationStillProcessingModal.dom.tsx +++ b/ts/components/DonationStillProcessingModal.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button } from './Button.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button } from './Button.dom.tsx'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/DonationThanksModal.dom.stories.tsx b/ts/components/DonationThanksModal.dom.stories.tsx index eb1386f11a..096ba198f4 100644 --- a/ts/components/DonationThanksModal.dom.stories.tsx +++ b/ts/components/DonationThanksModal.dom.stories.tsx @@ -5,9 +5,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta, StoryFn } from '@storybook/react'; -import type { PropsType } from './DonationThanksModal.dom.js'; -import { DonationThanksModal } from './DonationThanksModal.dom.js'; -import { getFakeBadge } from '../test-helpers/getFakeBadge.std.js'; +import type { PropsType } from './DonationThanksModal.dom.tsx'; +import { DonationThanksModal } from './DonationThanksModal.dom.tsx'; +import { getFakeBadge } from '../test-helpers/getFakeBadge.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/DonationThanksModal.dom.tsx b/ts/components/DonationThanksModal.dom.tsx index 302dcd3473..b20d1e37fc 100644 --- a/ts/components/DonationThanksModal.dom.tsx +++ b/ts/components/DonationThanksModal.dom.tsx @@ -3,13 +3,13 @@ import React, { useState } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { BadgeType } from '../badges/types.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Checkbox } from './Checkbox.dom.js'; -import { BadgeImage } from './BadgeImage.dom.js'; -import { Spinner } from './Spinner.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { BadgeType } from '../badges/types.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Checkbox } from './Checkbox.dom.tsx'; +import { BadgeImage } from './BadgeImage.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/DonationVerificationModal.dom.stories.tsx b/ts/components/DonationVerificationModal.dom.stories.tsx index 1114c4eb1e..828743c996 100644 --- a/ts/components/DonationVerificationModal.dom.stories.tsx +++ b/ts/components/DonationVerificationModal.dom.stories.tsx @@ -6,9 +6,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DonationVerificationModal.dom.js'; -import { DonationVerificationModal } from './DonationVerificationModal.dom.js'; -import { SECOND } from '../util/durations/index.std.js'; +import type { PropsType } from './DonationVerificationModal.dom.tsx'; +import { DonationVerificationModal } from './DonationVerificationModal.dom.tsx'; +import { SECOND } from '../util/durations/index.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/DonationVerificationModal.dom.tsx b/ts/components/DonationVerificationModal.dom.tsx index 9794b6a404..3794ea0389 100644 --- a/ts/components/DonationVerificationModal.dom.tsx +++ b/ts/components/DonationVerificationModal.dom.tsx @@ -3,10 +3,10 @@ import React, { useEffect, useState } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { DAY } from '../util/durations/index.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { DAY } from '../util/durations/index.std.ts'; export type PropsType = { // Test-only diff --git a/ts/components/DonationsErrorBoundary.dom.tsx b/ts/components/DonationsErrorBoundary.dom.tsx index ddc726383e..67098e2234 100644 --- a/ts/components/DonationsErrorBoundary.dom.tsx +++ b/ts/components/DonationsErrorBoundary.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReactNode, ErrorInfo } from 'react'; import React, { Component, useCallback } from 'react'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; const log = createLogger('DonationsErrorBoundary'); diff --git a/ts/components/DraftGifMessageSendModal.dom.stories.tsx b/ts/components/DraftGifMessageSendModal.dom.stories.tsx index 1a7f805c62..c1d6d2f43d 100644 --- a/ts/components/DraftGifMessageSendModal.dom.stories.tsx +++ b/ts/components/DraftGifMessageSendModal.dom.stories.tsx @@ -6,14 +6,14 @@ import { action } from '@storybook/addon-actions'; import { DraftGifMessageSendModal, type DraftGifMessageSendModalProps, -} from './DraftGifMessageSendModal.dom.js'; -import { ThemeType } from '../types/Util.std.js'; -import { CompositionTextArea } from './CompositionTextArea.dom.js'; -import type { SmartCompositionTextAreaProps } from '../state/smart/CompositionTextArea.preload.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; -import { LoadingState } from '../util/loadable.std.js'; -import { VIDEO_MP4 } from '../types/MIME.std.js'; -import { drop } from '../util/drop.std.js'; +} from './DraftGifMessageSendModal.dom.tsx'; +import { ThemeType } from '../types/Util.std.ts'; +import { CompositionTextArea } from './CompositionTextArea.dom.tsx'; +import type { SmartCompositionTextAreaProps } from '../state/smart/CompositionTextArea.preload.tsx'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; +import { LoadingState } from '../util/loadable.std.ts'; +import { VIDEO_MP4 } from '../types/MIME.std.ts'; +import { drop } from '../util/drop.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/DraftGifMessageSendModal.dom.tsx b/ts/components/DraftGifMessageSendModal.dom.tsx index 88a0687d6b..8ae121d5ba 100644 --- a/ts/components/DraftGifMessageSendModal.dom.tsx +++ b/ts/components/DraftGifMessageSendModal.dom.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { type ComponentType, useEffect, useMemo, useId } from 'react'; import { VisuallyHidden } from 'react-aria'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; -import type { HydratedBodyRangesType } from '../types/BodyRange.std.js'; -import type { SmartCompositionTextAreaProps } from '../state/smart/CompositionTextArea.preload.js'; -import type { ThemeType } from '../types/Util.std.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; -import { FunGifPreview } from './fun/FunGif.dom.js'; -import type { FunGifSelection } from './fun/panels/FunPanelGifs.dom.js'; -import type { GifDownloadState } from '../state/smart/DraftGifMessageSendModal.preload.js'; -import { LoadingState } from '../util/loadable.std.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import type { HydratedBodyRangesType } from '../types/BodyRange.std.ts'; +import type { SmartCompositionTextAreaProps } from '../state/smart/CompositionTextArea.preload.tsx'; +import type { ThemeType } from '../types/Util.std.ts'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; +import { FunGifPreview } from './fun/FunGif.dom.tsx'; +import type { FunGifSelection } from './fun/panels/FunPanelGifs.dom.tsx'; +import type { GifDownloadState } from '../state/smart/DraftGifMessageSendModal.preload.tsx'; +import { LoadingState } from '../util/loadable.std.ts'; export type DraftGifMessageSendModalProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/EditHistoryMessagesModal.dom.tsx b/ts/components/EditHistoryMessagesModal.dom.tsx index e7cb976204..32cf5834da 100644 --- a/ts/components/EditHistoryMessagesModal.dom.tsx +++ b/ts/components/EditHistoryMessagesModal.dom.tsx @@ -5,25 +5,25 @@ import type { ReactNode } from 'react'; import React, { useCallback, useState, useRef } from 'react'; import lodash from 'lodash'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { MessagePropsType } from '../state/selectors/message.preload.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { MessagePropsType } from '../state/selectors/message.preload.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; import { Message, MessageInteractivity, TextDirection, -} from './conversation/Message.dom.js'; -import { Modal } from './Modal.dom.js'; -import { WidthBreakpoint } from './_util.std.js'; -import { shouldNeverBeCalled } from '../util/shouldNeverBeCalled.std.js'; -import { useTheme } from '../hooks/useTheme.dom.js'; -import { isSameDay } from '../util/timestamp.std.js'; -import { TimelineDateHeader } from './conversation/TimelineDateHeader.dom.js'; -import { AxoContextMenu } from '../axo/AxoContextMenu.dom.js'; -import { drop } from '../util/drop.std.js'; -import type { AxoMenuBuilder } from '../axo/AxoMenuBuilder.dom.js'; -import { strictAssert } from '../util/assert.std.js'; +} from './conversation/Message.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { WidthBreakpoint } from './_util.std.ts'; +import { shouldNeverBeCalled } from '../util/shouldNeverBeCalled.std.ts'; +import { useTheme } from '../hooks/useTheme.dom.ts'; +import { isSameDay } from '../util/timestamp.std.ts'; +import { TimelineDateHeader } from './conversation/TimelineDateHeader.dom.tsx'; +import { AxoContextMenu } from '../axo/AxoContextMenu.dom.tsx'; +import { drop } from '../util/drop.std.ts'; +import type { AxoMenuBuilder } from '../axo/AxoMenuBuilder.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; const { noop } = lodash; diff --git a/ts/components/EditNicknameAndNoteModal.dom.stories.tsx b/ts/components/EditNicknameAndNoteModal.dom.stories.tsx index c88ff85077..58794522e3 100644 --- a/ts/components/EditNicknameAndNoteModal.dom.stories.tsx +++ b/ts/components/EditNicknameAndNoteModal.dom.stories.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import { action } from '@storybook/addon-actions'; import * as React from 'react'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import type { EditNicknameAndNoteModalProps } from './EditNicknameAndNoteModal.dom.js'; -import { EditNicknameAndNoteModal } from './EditNicknameAndNoteModal.dom.js'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import type { EditNicknameAndNoteModalProps } from './EditNicknameAndNoteModal.dom.tsx'; +import { EditNicknameAndNoteModal } from './EditNicknameAndNoteModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/EditNicknameAndNoteModal.dom.tsx b/ts/components/EditNicknameAndNoteModal.dom.tsx index ef37fee168..a656d8feb2 100644 --- a/ts/components/EditNicknameAndNoteModal.dom.tsx +++ b/ts/components/EditNicknameAndNoteModal.dom.tsx @@ -4,18 +4,18 @@ import type { FormEvent } from 'react'; import React, { useCallback, useMemo, useState } from 'react'; import { v4 as uuid } from 'uuid'; import { z } from 'zod'; -import { Modal } from './Modal.dom.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; +import { Modal } from './Modal.dom.tsx'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; import type { ConversationType, NicknameAndNote, -} from '../state/ducks/conversations.preload.js'; -import { Input } from './Input.dom.js'; -import { AutoSizeTextArea } from './AutoSizeTextArea.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { safeParsePartial } from '../util/schemas.std.js'; +} from '../state/ducks/conversations.preload.ts'; +import { Input } from './Input.dom.tsx'; +import { AutoSizeTextArea } from './AutoSizeTextArea.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; +import { safeParsePartial } from '../util/schemas.std.ts'; const formSchema = z.object({ nickname: z diff --git a/ts/components/ErrorBoundary.dom.tsx b/ts/components/ErrorBoundary.dom.tsx index 0c51b67806..70a058a70d 100644 --- a/ts/components/ErrorBoundary.dom.tsx +++ b/ts/components/ErrorBoundary.dom.tsx @@ -4,9 +4,9 @@ import type { ReactNode, ErrorInfo } from 'react'; import React from 'react'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { ToastType } from '../types/Toast.dom.js'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; const log = createLogger('ErrorBoundary'); diff --git a/ts/components/ErrorModal.dom.stories.tsx b/ts/components/ErrorModal.dom.stories.tsx index 9085330668..f8b8e9f732 100644 --- a/ts/components/ErrorModal.dom.stories.tsx +++ b/ts/components/ErrorModal.dom.stories.tsx @@ -5,10 +5,10 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ErrorModal.dom.js'; -import { ErrorModal } from './ErrorModal.dom.js'; +import type { PropsType } from './ErrorModal.dom.tsx'; +import { ErrorModal } from './ErrorModal.dom.tsx'; -import { ButtonVariant } from './Button.dom.js'; +import { ButtonVariant } from './Button.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ErrorModal.dom.tsx b/ts/components/ErrorModal.dom.tsx index 9af024899c..3291f5585f 100644 --- a/ts/components/ErrorModal.dom.tsx +++ b/ts/components/ErrorModal.dom.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; export type PropsType = { buttonVariant?: ButtonVariant; diff --git a/ts/components/FileThumbnail.dom.stories.tsx b/ts/components/FileThumbnail.dom.stories.tsx index 3e68a4c2b8..2c8073e1db 100644 --- a/ts/components/FileThumbnail.dom.stories.tsx +++ b/ts/components/FileThumbnail.dom.stories.tsx @@ -3,8 +3,8 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import { FileThumbnail } from './FileThumbnail.dom.js'; -import { APPLICATION_OCTET_STREAM } from '../types/MIME.std.js'; +import { FileThumbnail } from './FileThumbnail.dom.tsx'; +import { APPLICATION_OCTET_STREAM } from '../types/MIME.std.ts'; export default { title: 'FileThumbnail', diff --git a/ts/components/FileThumbnail.dom.tsx b/ts/components/FileThumbnail.dom.tsx index 8813dbdb20..9f5fab2689 100644 --- a/ts/components/FileThumbnail.dom.tsx +++ b/ts/components/FileThumbnail.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import { getExtensionForDisplay } from '../util/Attachment.std.js'; -import { isFileDangerous } from '../util/isFileDangerous.std.js'; -import { tw } from '../axo/tw.dom.js'; +import { getExtensionForDisplay } from '../util/Attachment.std.ts'; +import { isFileDangerous } from '../util/isFileDangerous.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; export type PropsType = Readonly[0]>; diff --git a/ts/components/ForwardMessagesModal.dom.stories.tsx b/ts/components/ForwardMessagesModal.dom.stories.tsx index 77fd43f0e3..bed00eaa55 100644 --- a/ts/components/ForwardMessagesModal.dom.stories.tsx +++ b/ts/components/ForwardMessagesModal.dom.stories.tsx @@ -4,18 +4,18 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { AttachmentForUIType } from '../types/Attachment.std.js'; -import type { PropsType } from './ForwardMessagesModal.dom.js'; +import type { AttachmentForUIType } from '../types/Attachment.std.ts'; +import type { PropsType } from './ForwardMessagesModal.dom.tsx'; import { ForwardMessagesModal, ForwardMessagesModalType, -} from './ForwardMessagesModal.dom.js'; -import { IMAGE_JPEG, VIDEO_MP4, stringToMIMEType } from '../types/MIME.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +} from './ForwardMessagesModal.dom.tsx'; +import { IMAGE_JPEG, VIDEO_MP4, stringToMIMEType } from '../types/MIME.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; import { StorybookThemeContext } from '../../.storybook/StorybookThemeContext.std.js'; -import { CompositionTextArea } from './CompositionTextArea.dom.js'; -import type { MessageForwardDraft } from '../types/ForwardDraft.std.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; +import { CompositionTextArea } from './CompositionTextArea.dom.tsx'; +import type { MessageForwardDraft } from '../types/ForwardDraft.std.ts'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; const createAttachment = ( props: Partial = {} diff --git a/ts/components/ForwardMessagesModal.dom.tsx b/ts/components/ForwardMessagesModal.dom.tsx index 01ff8bbdd1..799ac26dc2 100644 --- a/ts/components/ForwardMessagesModal.dom.tsx +++ b/ts/components/ForwardMessagesModal.dom.tsx @@ -10,41 +10,41 @@ import React, { useState, Fragment, } from 'react'; -import { AttachmentList } from './conversation/AttachmentList.dom.js'; -import type { AttachmentForUIType } from '../types/Attachment.std.js'; -import { Button } from './Button.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { ContactCheckboxDisabledReason } from './conversationList/ContactCheckbox.dom.js'; -import type { Row } from './ConversationList.dom.js'; -import { ConversationList, RowType } from './ConversationList.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { SmartCompositionTextAreaProps } from '../state/smart/CompositionTextArea.preload.js'; -import { SearchInput } from './SearchInput.dom.js'; -import { StagedLinkPreview } from './conversation/StagedLinkPreview.dom.js'; -import { filterAndSortConversations } from '../util/filterAndSortConversations.std.js'; +import { AttachmentList } from './conversation/AttachmentList.dom.tsx'; +import type { AttachmentForUIType } from '../types/Attachment.std.ts'; +import { Button } from './Button.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { ContactCheckboxDisabledReason } from './conversationList/ContactCheckbox.dom.tsx'; +import type { Row } from './ConversationList.dom.tsx'; +import { ConversationList, RowType } from './ConversationList.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { SmartCompositionTextAreaProps } from '../state/smart/CompositionTextArea.preload.tsx'; +import { SearchInput } from './SearchInput.dom.tsx'; +import { StagedLinkPreview } from './conversation/StagedLinkPreview.dom.tsx'; +import { filterAndSortConversations } from '../util/filterAndSortConversations.std.ts'; import { shouldNeverBeCalled, asyncShouldNeverBeCalled, -} from '../util/shouldNeverBeCalled.std.js'; -import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.js'; -import { LinkPreviewSourceType } from '../types/LinkPreview.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import type { HydratedBodyRangesType } from '../types/BodyRange.std.js'; -import { applyRangesToText } from '../types/BodyRange.std.js'; -import { UserText } from './UserText.dom.js'; -import { Modal } from './Modal.dom.js'; -import { SizeObserver } from '../hooks/useSizeObserver.dom.js'; +} from '../util/shouldNeverBeCalled.std.ts'; +import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.ts'; +import { LinkPreviewSourceType } from '../types/LinkPreview.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import type { HydratedBodyRangesType } from '../types/BodyRange.std.ts'; +import { applyRangesToText } from '../types/BodyRange.std.ts'; +import { UserText } from './UserText.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { SizeObserver } from '../hooks/useSizeObserver.dom.tsx'; import { isDraftEditable, isDraftForwardable, type MessageForwardDraft, -} from '../types/ForwardDraft.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { Theme } from '../util/theme.std.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; +} from '../types/ForwardDraft.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { Theme } from '../util/theme.std.ts'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; export enum ForwardMessagesModalType { Forward, diff --git a/ts/components/GlobalModalContainer.dom.tsx b/ts/components/GlobalModalContainer.dom.tsx index a598beedde..531fddfc75 100644 --- a/ts/components/GlobalModalContainer.dom.tsx +++ b/ts/components/GlobalModalContainer.dom.tsx @@ -13,34 +13,34 @@ import type { MessageRequestActionsConfirmationPropsType, SafetyNumberChangedBlockingDataType, UserNotFoundModalStateType, -} from '../state/ducks/globalModals.preload.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; +} from '../state/ducks/globalModals.preload.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; import { type ContactModalStateType, UsernameOnboardingState, -} from '../types/globalModals.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +} from '../types/globalModals.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; -import { ButtonVariant } from './Button.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { SignalConnectionsModal } from './SignalConnectionsModal.dom.js'; -import { WhatsNewModal } from './WhatsNewModal.dom.js'; -import { MediaPermissionsModal } from './MediaPermissionsModal.dom.js'; -import type { StartCallData } from './ConfirmLeaveCallModal.dom.js'; +import { ButtonVariant } from './Button.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { SignalConnectionsModal } from './SignalConnectionsModal.dom.tsx'; +import { WhatsNewModal } from './WhatsNewModal.dom.tsx'; +import { MediaPermissionsModal } from './MediaPermissionsModal.dom.tsx'; +import type { StartCallData } from './ConfirmLeaveCallModal.dom.tsx'; import { TapToViewNotAvailableModal, type DataPropsType as TapToViewNotAvailablePropsType, -} from './TapToViewNotAvailableModal.dom.js'; +} from './TapToViewNotAvailableModal.dom.tsx'; import { BackfillFailureModal, type DataPropsType as BackfillFailureModalPropsType, -} from './BackfillFailureModal.dom.js'; -import type { SmartDraftGifMessageSendModalProps } from '../state/smart/DraftGifMessageSendModal.preload.js'; -import { CriticalIdlePrimaryDeviceModal } from './CriticalIdlePrimaryDeviceModal.dom.js'; -import { LowDiskSpaceBackupImportModal } from './LowDiskSpaceBackupImportModal.dom.js'; -import { KeyTransparencyOnboardingDialog } from './KeyTransparencyOnboardingDialog.dom.js'; -import { isUsernameValid } from '../util/Username.dom.js'; -import type { PinMessageDialogData } from '../state/smart/PinMessageDialog.preload.js'; +} from './BackfillFailureModal.dom.tsx'; +import type { SmartDraftGifMessageSendModalProps } from '../state/smart/DraftGifMessageSendModal.preload.tsx'; +import { CriticalIdlePrimaryDeviceModal } from './CriticalIdlePrimaryDeviceModal.dom.tsx'; +import { LowDiskSpaceBackupImportModal } from './LowDiskSpaceBackupImportModal.dom.tsx'; +import { KeyTransparencyOnboardingDialog } from './KeyTransparencyOnboardingDialog.dom.tsx'; +import { isUsernameValid } from '../util/Username.dom.ts'; +import type { PinMessageDialogData } from '../state/smart/PinMessageDialog.preload.tsx'; // NOTE: All types should be required for this component so that the smart // component gives you type errors when adding/removing props. diff --git a/ts/components/GradientDial.dom.tsx b/ts/components/GradientDial.dom.tsx index 6933009be1..bb383daa83 100644 --- a/ts/components/GradientDial.dom.tsx +++ b/ts/components/GradientDial.dom.tsx @@ -4,8 +4,8 @@ import type { CSSProperties, KeyboardEvent } from 'react'; import React, { useEffect, useRef, useState } from 'react'; import classNames from 'classnames'; -import { arrow } from '../util/keyboard.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { arrow } from '../util/keyboard.dom.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; export enum KnobType { start = 'start', diff --git a/ts/components/GroupCallOverflowArea.dom.stories.tsx b/ts/components/GroupCallOverflowArea.dom.stories.tsx index 8462e0c4e4..83e55c22c9 100644 --- a/ts/components/GroupCallOverflowArea.dom.stories.tsx +++ b/ts/components/GroupCallOverflowArea.dom.stories.tsx @@ -5,14 +5,14 @@ import React from 'react'; import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupCallOverflowArea.dom.js'; -import { GroupCallOverflowArea } from './GroupCallOverflowArea.dom.js'; -import { getDefaultConversationWithServiceId } from '../test-helpers/getDefaultConversation.std.js'; -import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.std.js'; -import { FRAME_BUFFER_SIZE } from '../calling/constants.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import type { CallingImageDataCache } from './CallManager.dom.js'; -import { MINUTE } from '../util/durations/index.std.js'; +import type { PropsType } from './GroupCallOverflowArea.dom.tsx'; +import { GroupCallOverflowArea } from './GroupCallOverflowArea.dom.tsx'; +import { getDefaultConversationWithServiceId } from '../test-helpers/getDefaultConversation.std.ts'; +import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.std.ts'; +import { FRAME_BUFFER_SIZE } from '../calling/constants.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import type { CallingImageDataCache } from './CallManager.dom.tsx'; +import { MINUTE } from '../util/durations/index.std.ts'; const { memoize, times } = lodash; diff --git a/ts/components/GroupCallOverflowArea.dom.tsx b/ts/components/GroupCallOverflowArea.dom.tsx index ec2dca7fcc..786ccb2cb8 100644 --- a/ts/components/GroupCallOverflowArea.dom.tsx +++ b/ts/components/GroupCallOverflowArea.dom.tsx @@ -5,10 +5,10 @@ import type { ReactElement } from 'react'; import React, { useRef, useState, useEffect } from 'react'; import classNames from 'classnames'; import type { VideoFrameSource } from '@signalapp/ringrtc'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { GroupCallRemoteParticipantType } from '../types/Calling.std.js'; -import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant.dom.js'; -import type { CallingImageDataCache } from './CallManager.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { GroupCallRemoteParticipantType } from '../types/Calling.std.ts'; +import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant.dom.tsx'; +import type { CallingImageDataCache } from './CallManager.dom.tsx'; const OVERFLOW_SCROLLED_TO_EDGE_THRESHOLD = 20; const OVERFLOW_SCROLL_BUTTON_RATIO = 0.75; diff --git a/ts/components/GroupCallRemoteParticipant.dom.stories.tsx b/ts/components/GroupCallRemoteParticipant.dom.stories.tsx index 7ef8dde1a1..5690ddda32 100644 --- a/ts/components/GroupCallRemoteParticipant.dom.stories.tsx +++ b/ts/components/GroupCallRemoteParticipant.dom.stories.tsx @@ -4,13 +4,13 @@ import * as React from 'react'; import lodash from 'lodash'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupCallRemoteParticipant.dom.js'; -import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { FRAME_BUFFER_SIZE } from '../calling/constants.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import type { CallingImageDataCache } from './CallManager.dom.js'; -import { MINUTE } from '../util/durations/index.std.js'; +import type { PropsType } from './GroupCallRemoteParticipant.dom.tsx'; +import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { FRAME_BUFFER_SIZE } from '../calling/constants.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import type { CallingImageDataCache } from './CallManager.dom.tsx'; +import { MINUTE } from '../util/durations/index.std.ts'; const { memoize } = lodash; diff --git a/ts/components/GroupCallRemoteParticipant.dom.tsx b/ts/components/GroupCallRemoteParticipant.dom.tsx index e15a8ce6b2..e0ab319cca 100644 --- a/ts/components/GroupCallRemoteParticipant.dom.tsx +++ b/ts/components/GroupCallRemoteParticipant.dom.tsx @@ -12,25 +12,25 @@ import React, { import classNames from 'classnames'; import lodash from 'lodash'; import type { VideoFrameSource } from '@signalapp/ringrtc'; -import type { GroupCallRemoteParticipantType } from '../types/Calling.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import { CallBackgroundBlur } from './CallBackgroundBlur.dom.js'; +import type { GroupCallRemoteParticipantType } from '../types/Calling.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { CallBackgroundBlur } from './CallBackgroundBlur.dom.tsx'; import { CallingAudioIndicator, SPEAKING_LINGER_MS, -} from './CallingAudioIndicator.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { I18n } from './I18n.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import { useIntersectionObserver } from '../hooks/useIntersectionObserver.std.js'; -import { MAX_FRAME_HEIGHT, MAX_FRAME_WIDTH } from '../calling/constants.std.js'; -import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate.std.js'; -import { Theme } from '../util/theme.std.js'; -import { isOlderThan } from '../util/timestamp.std.js'; -import type { CallingImageDataCache } from './CallManager.dom.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; +} from './CallingAudioIndicator.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import { useIntersectionObserver } from '../hooks/useIntersectionObserver.std.ts'; +import { MAX_FRAME_HEIGHT, MAX_FRAME_WIDTH } from '../calling/constants.std.ts'; +import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate.std.ts'; +import { Theme } from '../util/theme.std.ts'; +import { isOlderThan } from '../util/timestamp.std.ts'; +import type { CallingImageDataCache } from './CallManager.dom.tsx'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; const { debounce, noop } = lodash; diff --git a/ts/components/GroupCallRemoteParticipants.dom.tsx b/ts/components/GroupCallRemoteParticipants.dom.tsx index 01013e84b8..01750f9c89 100644 --- a/ts/components/GroupCallRemoteParticipants.dom.tsx +++ b/ts/components/GroupCallRemoteParticipants.dom.tsx @@ -4,30 +4,30 @@ import React, { useCallback, useState, useMemo, useEffect } from 'react'; import lodash from 'lodash'; import type { VideoFrameSource } from '@signalapp/ringrtc'; -import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant.dom.js'; +import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant.dom.tsx'; import { GroupCallOverflowArea, OVERFLOW_PARTICIPANT_WIDTH, -} from './GroupCallOverflowArea.dom.js'; +} from './GroupCallOverflowArea.dom.tsx'; import type { GroupCallRemoteParticipantType, GroupCallVideoRequest, -} from '../types/Calling.std.js'; -import { CallViewMode } from '../types/Calling.std.js'; -import { useGetCallingFrameBuffer } from '../calling/useGetCallingFrameBuffer.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { usePageVisibility } from '../hooks/usePageVisibility.dom.js'; -import { useDevicePixelRatio } from '../hooks/useDevicePixelRatio.dom.js'; -import { nonRenderedRemoteParticipant } from '../util/ringrtc/nonRenderedRemoteParticipant.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { filter, join } from '../util/iterables.std.js'; -import * as setUtil from '../util/setUtil.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { MAX_FRAME_HEIGHT, MAX_FRAME_WIDTH } from '../calling/constants.std.js'; -import { SizeObserver } from '../hooks/useSizeObserver.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import type { CallingImageDataCache } from './CallManager.dom.js'; +} from '../types/Calling.std.ts'; +import { CallViewMode } from '../types/Calling.std.ts'; +import { useGetCallingFrameBuffer } from '../calling/useGetCallingFrameBuffer.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { usePageVisibility } from '../hooks/usePageVisibility.dom.ts'; +import { useDevicePixelRatio } from '../hooks/useDevicePixelRatio.dom.ts'; +import { nonRenderedRemoteParticipant } from '../util/ringrtc/nonRenderedRemoteParticipant.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { filter, join } from '../util/iterables.std.ts'; +import * as setUtil from '../util/setUtil.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { MAX_FRAME_HEIGHT, MAX_FRAME_WIDTH } from '../calling/constants.std.ts'; +import { SizeObserver } from '../hooks/useSizeObserver.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; +import type { CallingImageDataCache } from './CallManager.dom.tsx'; const { clamp, chunk, maxBy, flatten, noop } = lodash; diff --git a/ts/components/GroupDescriptionInput.dom.stories.tsx b/ts/components/GroupDescriptionInput.dom.stories.tsx index 5d3d2c7699..25ec83da25 100644 --- a/ts/components/GroupDescriptionInput.dom.stories.tsx +++ b/ts/components/GroupDescriptionInput.dom.stories.tsx @@ -3,8 +3,8 @@ import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupDescriptionInput.dom.js'; -import { GroupDescriptionInput } from './GroupDescriptionInput.dom.js'; +import type { PropsType } from './GroupDescriptionInput.dom.tsx'; +import { GroupDescriptionInput } from './GroupDescriptionInput.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/GroupDescriptionInput.dom.tsx b/ts/components/GroupDescriptionInput.dom.tsx index d095ba8288..df91d98503 100644 --- a/ts/components/GroupDescriptionInput.dom.tsx +++ b/ts/components/GroupDescriptionInput.dom.tsx @@ -3,8 +3,8 @@ import React, { forwardRef } from 'react'; -import { Input } from './Input.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { Input } from './Input.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; export type PropsType = { disabled?: boolean; diff --git a/ts/components/GroupDescriptionText.dom.tsx b/ts/components/GroupDescriptionText.dom.tsx index a6672e47af..2c5b247d53 100644 --- a/ts/components/GroupDescriptionText.dom.tsx +++ b/ts/components/GroupDescriptionText.dom.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { RenderTextCallbackType } from '../types/Util.std.js'; -import { AddNewLines } from './conversation/AddNewLines.dom.js'; -import { Emojify } from './conversation/Emojify.dom.js'; -import { Linkify } from './conversation/Linkify.dom.js'; +import type { RenderTextCallbackType } from '../types/Util.std.ts'; +import { AddNewLines } from './conversation/AddNewLines.dom.tsx'; +import { Emojify } from './conversation/Emojify.dom.tsx'; +import { Linkify } from './conversation/Linkify.dom.tsx'; type PropsType = { text: string; diff --git a/ts/components/GroupDialog.dom.tsx b/ts/components/GroupDialog.dom.tsx index 747aba2b19..c396bc30bb 100644 --- a/ts/components/GroupDialog.dom.tsx +++ b/ts/components/GroupDialog.dom.tsx @@ -4,13 +4,13 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import { ModalHost } from './ModalHost.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import { ModalHost } from './ModalHost.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; type PropsType = { children: ReactNode; diff --git a/ts/components/GroupMemberLabelInfoModal.dom.stories.tsx b/ts/components/GroupMemberLabelInfoModal.dom.stories.tsx index 4c377d16bd..53bb7b9029 100644 --- a/ts/components/GroupMemberLabelInfoModal.dom.stories.tsx +++ b/ts/components/GroupMemberLabelInfoModal.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupMemberLabelInfoModal.dom.js'; -import { GroupMemberLabelInfoModal } from './GroupMemberLabelInfoModal.dom.js'; +import type { PropsType } from './GroupMemberLabelInfoModal.dom.tsx'; +import { GroupMemberLabelInfoModal } from './GroupMemberLabelInfoModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/GroupMemberLabelInfoModal.dom.tsx b/ts/components/GroupMemberLabelInfoModal.dom.tsx index 38e62bdb95..bfcbe1f0f6 100644 --- a/ts/components/GroupMemberLabelInfoModal.dom.tsx +++ b/ts/components/GroupMemberLabelInfoModal.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; -import type { LocalizerType } from '../types/Util.std.js'; -import { tw } from '../axo/tw.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; export type PropsType = { canAddLabel: boolean; diff --git a/ts/components/GroupMembersNames.dom.tsx b/ts/components/GroupMembersNames.dom.tsx index 805fdcd0e7..a8d14bfdec 100644 --- a/ts/components/GroupMembersNames.dom.tsx +++ b/ts/components/GroupMembersNames.dom.tsx @@ -5,10 +5,10 @@ import React, { useMemo } from 'react'; import type { ReactNode } from 'react'; import lodash from 'lodash'; -import { I18n } from './I18n.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { UserText } from './UserText.dom.js'; -import type { GroupV2Membership } from './conversation/conversation-details/ConversationDetailsMembershipList.dom.js'; +import { I18n } from './I18n.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { UserText } from './UserText.dom.tsx'; +import type { GroupV2Membership } from './conversation/conversation-details/ConversationDetailsMembershipList.dom.tsx'; const { take } = lodash; diff --git a/ts/components/GroupTitleInput.dom.stories.tsx b/ts/components/GroupTitleInput.dom.stories.tsx index 531f9592ba..9154263a9e 100644 --- a/ts/components/GroupTitleInput.dom.stories.tsx +++ b/ts/components/GroupTitleInput.dom.stories.tsx @@ -3,8 +3,8 @@ import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupTitleInput.dom.js'; -import { GroupTitleInput } from './GroupTitleInput.dom.js'; +import type { PropsType } from './GroupTitleInput.dom.tsx'; +import { GroupTitleInput } from './GroupTitleInput.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/GroupTitleInput.dom.tsx b/ts/components/GroupTitleInput.dom.tsx index 8f053728ae..a78e781ca8 100644 --- a/ts/components/GroupTitleInput.dom.tsx +++ b/ts/components/GroupTitleInput.dom.tsx @@ -3,8 +3,8 @@ import React, { forwardRef } from 'react'; -import { Input } from './Input.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { Input } from './Input.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; export type PropsType = { disabled?: boolean; diff --git a/ts/components/GroupV1MigrationDialog.dom.stories.tsx b/ts/components/GroupV1MigrationDialog.dom.stories.tsx index cda249527e..e0bb594a80 100644 --- a/ts/components/GroupV1MigrationDialog.dom.stories.tsx +++ b/ts/components/GroupV1MigrationDialog.dom.stories.tsx @@ -6,11 +6,11 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupV1MigrationDialog.dom.js'; -import { GroupV1MigrationDialog } from './GroupV1MigrationDialog.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { ThemeType } from '../types/Util.std.js'; +import type { PropsType } from './GroupV1MigrationDialog.dom.tsx'; +import { GroupV1MigrationDialog } from './GroupV1MigrationDialog.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/GroupV1MigrationDialog.dom.tsx b/ts/components/GroupV1MigrationDialog.dom.tsx index 7016b59bc4..1a27448a09 100644 --- a/ts/components/GroupV1MigrationDialog.dom.tsx +++ b/ts/components/GroupV1MigrationDialog.dom.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import { GroupDialog } from './GroupDialog.dom.js'; -import { sortByTitle } from '../util/sortByTitle.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import { GroupDialog } from './GroupDialog.dom.tsx'; +import { sortByTitle } from '../util/sortByTitle.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; export type DataPropsType = { readonly areWeInvited: boolean; diff --git a/ts/components/GroupV2JoinDialog.dom.stories.tsx b/ts/components/GroupV2JoinDialog.dom.stories.tsx index 0d82a80be9..48801bfcc6 100644 --- a/ts/components/GroupV2JoinDialog.dom.stories.tsx +++ b/ts/components/GroupV2JoinDialog.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupV2JoinDialog.dom.js'; -import { GroupV2JoinDialog } from './GroupV2JoinDialog.dom.js'; +import type { PropsType } from './GroupV2JoinDialog.dom.tsx'; +import { GroupV2JoinDialog } from './GroupV2JoinDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/GroupV2JoinDialog.dom.tsx b/ts/components/GroupV2JoinDialog.dom.tsx index 0e0fca1eb6..af860a3a91 100644 --- a/ts/components/GroupV2JoinDialog.dom.tsx +++ b/ts/components/GroupV2JoinDialog.dom.tsx @@ -3,13 +3,13 @@ import * as React from 'react'; import classNames from 'classnames'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Avatar, AvatarBlur } from './Avatar.dom.js'; -import { Spinner } from './Spinner.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { GroupDescription } from './conversation/GroupDescription.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Avatar, AvatarBlur } from './Avatar.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { GroupDescription } from './conversation/GroupDescription.dom.tsx'; -import type { PreJoinConversationType } from '../state/ducks/conversations.preload.js'; +import type { PreJoinConversationType } from '../state/ducks/conversations.preload.ts'; type CallbackType = () => unknown; diff --git a/ts/components/I18n.dom.stories.tsx b/ts/components/I18n.dom.stories.tsx index ab0eb3556d..e247101230 100644 --- a/ts/components/I18n.dom.stories.tsx +++ b/ts/components/I18n.dom.stories.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import type { Props } from './I18n.dom.js'; -import { I18n } from './I18n.dom.js'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import type { Props } from './I18n.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/I18n.dom.tsx b/ts/components/I18n.dom.tsx index bbc2c53e08..1070cdc4a1 100644 --- a/ts/components/I18n.dom.tsx +++ b/ts/components/I18n.dom.tsx @@ -6,8 +6,8 @@ import React from 'react'; import type { LocalizerType, ICUJSXMessageParamsByKeyType, -} from '../types/Util.std.js'; -import { strictAssert } from '../util/assert.std.js'; +} from '../types/Util.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; export type I18nComponentParts = ReadonlyArray; diff --git a/ts/components/IdenticonSVG.dom.stories.tsx b/ts/components/IdenticonSVG.dom.stories.tsx index 204ca40b06..de599fd774 100644 --- a/ts/components/IdenticonSVG.dom.stories.tsx +++ b/ts/components/IdenticonSVG.dom.stories.tsx @@ -7,8 +7,8 @@ import { IdenticonSVGForCallLink, IdenticonSVGForContact, IdenticonSVGForGroup, -} from './IdenticonSVG.dom.js'; -import { AvatarColorMap } from '../types/Colors.std.js'; +} from './IdenticonSVG.dom.tsx'; +import { AvatarColorMap } from '../types/Colors.std.ts'; export default { title: 'Components/IdenticonSVG', diff --git a/ts/components/ImageOrBlurhash.dom.stories.tsx b/ts/components/ImageOrBlurhash.dom.stories.tsx index 8acf66fff7..d8b8a75dd2 100644 --- a/ts/components/ImageOrBlurhash.dom.stories.tsx +++ b/ts/components/ImageOrBlurhash.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './ImageOrBlurhash.dom.js'; -import { ImageOrBlurhash } from './ImageOrBlurhash.dom.js'; +import type { Props } from './ImageOrBlurhash.dom.tsx'; +import { ImageOrBlurhash } from './ImageOrBlurhash.dom.tsx'; export default { title: 'Components/ImageOrBlurhash', diff --git a/ts/components/ImageOrBlurhash.dom.tsx b/ts/components/ImageOrBlurhash.dom.tsx index 563e4d4258..164b2dab4b 100644 --- a/ts/components/ImageOrBlurhash.dom.tsx +++ b/ts/components/ImageOrBlurhash.dom.tsx @@ -3,7 +3,7 @@ import React, { useMemo, useCallback, useState, useRef } from 'react'; -import { computeBlurHashUrl } from '../util/computeBlurHashUrl.std.js'; +import { computeBlurHashUrl } from '../util/computeBlurHashUrl.std.ts'; export type Props = React.ImgHTMLAttributes & Readonly<{ diff --git a/ts/components/InContactsIcon.dom.stories.tsx b/ts/components/InContactsIcon.dom.stories.tsx index f906d85a4e..a4a898a6a4 100644 --- a/ts/components/InContactsIcon.dom.stories.tsx +++ b/ts/components/InContactsIcon.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './InContactsIcon.dom.js'; -import { InContactsIcon } from './InContactsIcon.dom.js'; +import type { PropsType } from './InContactsIcon.dom.tsx'; +import { InContactsIcon } from './InContactsIcon.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/InContactsIcon.dom.tsx b/ts/components/InContactsIcon.dom.tsx index 727efdaaea..452e9288a2 100644 --- a/ts/components/InContactsIcon.dom.tsx +++ b/ts/components/InContactsIcon.dom.tsx @@ -4,8 +4,8 @@ import React from 'react'; import classNames from 'classnames'; -import { Tooltip } from './Tooltip.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { Tooltip } from './Tooltip.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; export type PropsType = { className?: string; diff --git a/ts/components/Inbox.dom.stories.tsx b/ts/components/Inbox.dom.stories.tsx index da74af0f97..0818897995 100644 --- a/ts/components/Inbox.dom.stories.tsx +++ b/ts/components/Inbox.dom.stories.tsx @@ -5,9 +5,9 @@ import React, { useState, useEffect, useMemo } from 'react'; import type { Meta, StoryFn } from '@storybook/react'; import lodash from 'lodash'; -import { Inbox } from './Inbox.dom.js'; -import type { PropsType } from './Inbox.dom.js'; -import { DAY, SECOND } from '../util/durations/index.std.js'; +import { Inbox } from './Inbox.dom.tsx'; +import type { PropsType } from './Inbox.dom.tsx'; +import { DAY, SECOND } from '../util/durations/index.std.ts'; const { noop } = lodash; diff --git a/ts/components/Inbox.dom.tsx b/ts/components/Inbox.dom.tsx index f017c15465..c18f42eddd 100644 --- a/ts/components/Inbox.dom.tsx +++ b/ts/components/Inbox.dom.tsx @@ -4,10 +4,10 @@ import type { ReactNode } from 'react'; import React, { useEffect, useState, useMemo } from 'react'; import classNames from 'classnames'; -import type { LocalizerType } from '../types/Util.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { SECOND, DAY } from '../util/durations/index.std.js'; -import type { SmartNavTabsProps } from '../state/smart/NavTabs.preload.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { SECOND, DAY } from '../util/durations/index.std.ts'; +import type { SmartNavTabsProps } from '../state/smart/NavTabs.preload.tsx'; const log = createLogger('Inbox'); diff --git a/ts/components/IncomingCallBar.dom.stories.tsx b/ts/components/IncomingCallBar.dom.stories.tsx index 2f36bc6cb7..0234a8142b 100644 --- a/ts/components/IncomingCallBar.dom.stories.tsx +++ b/ts/components/IncomingCallBar.dom.stories.tsx @@ -4,10 +4,10 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './IncomingCallBar.dom.js'; -import { IncomingCallBar } from './IncomingCallBar.dom.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './IncomingCallBar.dom.tsx'; +import { IncomingCallBar } from './IncomingCallBar.dom.tsx'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/IncomingCallBar.dom.tsx b/ts/components/IncomingCallBar.dom.tsx index 91b312940b..568e2d98c0 100644 --- a/ts/components/IncomingCallBar.dom.tsx +++ b/ts/components/IncomingCallBar.dom.tsx @@ -3,26 +3,26 @@ import type { ReactNode } from 'react'; import React, { useCallback, useEffect, useRef } from 'react'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { Tooltip } from './Tooltip.dom.js'; -import { I18n } from './I18n.dom.js'; -import { Theme } from '../util/theme.std.js'; -import { getParticipantName } from '../util/callingGetParticipantName.std.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { Tooltip } from './Tooltip.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import { getParticipantName } from '../util/callingGetParticipantName.std.ts'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; import type { AcceptCallType, DeclineCallType, -} from '../state/ducks/calling.preload.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +} from '../state/ducks/calling.preload.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; import { useIncomingCallShortcuts, useKeyboardShortcuts, -} from '../hooks/useKeyboardShortcuts.dom.js'; -import { UserText } from './UserText.dom.js'; +} from '../hooks/useKeyboardShortcuts.dom.tsx'; +import { UserText } from './UserText.dom.tsx'; export type PropsType = { acceptCall: (_: AcceptCallType) => void; diff --git a/ts/components/Input.dom.stories.tsx b/ts/components/Input.dom.stories.tsx index 5a4d023ae4..44fca6d6f1 100644 --- a/ts/components/Input.dom.stories.tsx +++ b/ts/components/Input.dom.stories.tsx @@ -4,8 +4,8 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './Input.dom.js'; -import { Input } from './Input.dom.js'; +import type { PropsType } from './Input.dom.tsx'; +import { Input } from './Input.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/Input.dom.tsx b/ts/components/Input.dom.tsx index 7833e0a83b..253c7bdd8c 100644 --- a/ts/components/Input.dom.tsx +++ b/ts/components/Input.dom.tsx @@ -11,11 +11,11 @@ import React, { } from 'react'; import classNames from 'classnames'; -import * as grapheme from '../util/grapheme.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; -import { useRefMerger } from '../hooks/useRefMerger.std.js'; -import { byteLength } from '../Bytes.std.js'; +import * as grapheme from '../util/grapheme.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; +import { useRefMerger } from '../hooks/useRefMerger.std.ts'; +import { byteLength } from '../Bytes.std.ts'; export type PropsType = { autoFocus?: boolean; diff --git a/ts/components/InstallScreen.dom.tsx b/ts/components/InstallScreen.dom.tsx index 594a45f4a1..f8c0a77ece 100644 --- a/ts/components/InstallScreen.dom.tsx +++ b/ts/components/InstallScreen.dom.tsx @@ -4,12 +4,12 @@ import type { ComponentProps, ReactElement } from 'react'; import React from 'react'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { InstallScreenStep } from '../types/InstallScreen.std.js'; -import { InstallScreenErrorStep } from './installScreen/InstallScreenErrorStep.dom.js'; -import { InstallScreenLinkInProgressStep } from './installScreen/InstallScreenLinkInProgressStep.dom.js'; -import { InstallScreenQrCodeNotScannedStep } from './installScreen/InstallScreenQrCodeNotScannedStep.dom.js'; -import { InstallScreenBackupImportStep } from './installScreen/InstallScreenBackupImportStep.dom.js'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { InstallScreenStep } from '../types/InstallScreen.std.ts'; +import { InstallScreenErrorStep } from './installScreen/InstallScreenErrorStep.dom.tsx'; +import { InstallScreenLinkInProgressStep } from './installScreen/InstallScreenLinkInProgressStep.dom.tsx'; +import { InstallScreenQrCodeNotScannedStep } from './installScreen/InstallScreenQrCodeNotScannedStep.dom.tsx'; +import { InstallScreenBackupImportStep } from './installScreen/InstallScreenBackupImportStep.dom.tsx'; // We can't always use destructuring assignment because of the complexity of this props // type. diff --git a/ts/components/KeyTransparencyErrorDialog.dom.stories.tsx b/ts/components/KeyTransparencyErrorDialog.dom.stories.tsx index 4cac030aec..f55119bd8d 100644 --- a/ts/components/KeyTransparencyErrorDialog.dom.stories.tsx +++ b/ts/components/KeyTransparencyErrorDialog.dom.stories.tsx @@ -3,7 +3,7 @@ import type { Meta } from '@storybook/react'; import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; -import { KeyTransparencyErrorDialog } from './KeyTransparencyErrorDialog.dom.js'; +import { KeyTransparencyErrorDialog } from './KeyTransparencyErrorDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/KeyTransparencyErrorDialog.dom.tsx b/ts/components/KeyTransparencyErrorDialog.dom.tsx index cdf486500c..06617fa12d 100644 --- a/ts/components/KeyTransparencyErrorDialog.dom.tsx +++ b/ts/components/KeyTransparencyErrorDialog.dom.tsx @@ -1,12 +1,12 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback, useId, useState } from 'react'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; -import { tw } from '../axo/tw.dom.js'; -import { AxoCheckbox } from '../axo/AxoCheckbox.dom.js'; -import { I18n } from './I18n.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; +import { AxoCheckbox } from '../axo/AxoCheckbox.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; export type KeyTransparencyErrorDialogProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/KeyTransparencyOnboardingDialog.dom.stories.tsx b/ts/components/KeyTransparencyOnboardingDialog.dom.stories.tsx index 943261b069..19a51230f9 100644 --- a/ts/components/KeyTransparencyOnboardingDialog.dom.stories.tsx +++ b/ts/components/KeyTransparencyOnboardingDialog.dom.stories.tsx @@ -3,7 +3,7 @@ import type { Meta } from '@storybook/react'; import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; -import { KeyTransparencyOnboardingDialog } from './KeyTransparencyOnboardingDialog.dom.js'; +import { KeyTransparencyOnboardingDialog } from './KeyTransparencyOnboardingDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/KeyTransparencyOnboardingDialog.dom.tsx b/ts/components/KeyTransparencyOnboardingDialog.dom.tsx index e7bc05658b..15bd91f2cb 100644 --- a/ts/components/KeyTransparencyOnboardingDialog.dom.tsx +++ b/ts/components/KeyTransparencyOnboardingDialog.dom.tsx @@ -1,11 +1,11 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js'; -import { KEY_TRANSPARENCY_URL } from '../types/support.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; -import { tw } from '../axo/tw.dom.js'; +import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.ts'; +import { KEY_TRANSPARENCY_URL } from '../types/support.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; export type KeyTransparencyOnboardingDialogProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/LeftPane.dom.stories.tsx b/ts/components/LeftPane.dom.stories.tsx index 2830c0efa1..0d28f32d7e 100644 --- a/ts/components/LeftPane.dom.stories.tsx +++ b/ts/components/LeftPane.dom.stories.tsx @@ -4,39 +4,39 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './LeftPane.dom.js'; -import { LeftPane } from './LeftPane.dom.js'; -import { CaptchaDialog } from './CaptchaDialog.dom.js'; -import { CrashReportDialog } from './CrashReportDialog.dom.js'; -import { ToastManager } from './ToastManager.dom.js'; -import type { PropsType as DialogNetworkStatusPropsType } from './DialogNetworkStatus.dom.js'; -import { DialogExpiredBuild } from './DialogExpiredBuild.dom.js'; -import { DialogNetworkStatus } from './DialogNetworkStatus.dom.js'; -import { DialogRelink } from './DialogRelink.dom.js'; -import type { PropsType as DialogUpdatePropsType } from './DialogUpdate.dom.js'; -import { DialogUpdate } from './DialogUpdate.dom.js'; -import { UnsupportedOSDialog } from './UnsupportedOSDialog.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { MessageSearchResult } from './conversationList/MessageSearchResult.dom.js'; -import { DurationInSeconds, DAY } from '../util/durations/index.std.js'; -import { LeftPaneMode } from '../types/leftPane.std.js'; -import { ThemeType } from '../types/Util.std.js'; +import type { PropsType } from './LeftPane.dom.tsx'; +import { LeftPane } from './LeftPane.dom.tsx'; +import { CaptchaDialog } from './CaptchaDialog.dom.tsx'; +import { CrashReportDialog } from './CrashReportDialog.dom.tsx'; +import { ToastManager } from './ToastManager.dom.tsx'; +import type { PropsType as DialogNetworkStatusPropsType } from './DialogNetworkStatus.dom.tsx'; +import { DialogExpiredBuild } from './DialogExpiredBuild.dom.tsx'; +import { DialogNetworkStatus } from './DialogNetworkStatus.dom.tsx'; +import { DialogRelink } from './DialogRelink.dom.tsx'; +import type { PropsType as DialogUpdatePropsType } from './DialogUpdate.dom.tsx'; +import { DialogUpdate } from './DialogUpdate.dom.tsx'; +import { UnsupportedOSDialog } from './UnsupportedOSDialog.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { MessageSearchResult } from './conversationList/MessageSearchResult.dom.tsx'; +import { DurationInSeconds, DAY } from '../util/durations/index.std.ts'; +import { LeftPaneMode } from '../types/leftPane.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; import { getDefaultConversation, getDefaultGroupListItem, -} from '../test-helpers/getDefaultConversation.std.js'; -import { DialogType } from '../types/Dialogs.std.js'; -import { SocketStatus } from '../types/SocketStatus.std.js'; +} from '../test-helpers/getDefaultConversation.std.ts'; +import { DialogType } from '../types/Dialogs.std.ts'; +import { SocketStatus } from '../types/SocketStatus.std.ts'; import { StorybookThemeContext } from '../../.storybook/StorybookThemeContext.std.js'; import { makeFakeLookupConversationWithoutServiceId, useUuidFetchState, -} from '../test-helpers/fakeLookupConversationWithoutServiceId.std.js'; -import type { GroupListItemConversationType } from './conversationList/GroupListItem.dom.js'; -import { ServerAlert } from '../types/ServerAlert.std.js'; -import { LeftPaneChatFolders } from './leftPane/LeftPaneChatFolders.dom.js'; -import { LeftPaneConversationListItemContextMenu } from './leftPane/LeftPaneConversationListItemContextMenu.dom.js'; -import { CurrentChatFolders } from '../types/CurrentChatFolders.std.js'; +} from '../test-helpers/fakeLookupConversationWithoutServiceId.std.ts'; +import type { GroupListItemConversationType } from './conversationList/GroupListItem.dom.tsx'; +import { ServerAlert } from '../types/ServerAlert.std.ts'; +import { LeftPaneChatFolders } from './leftPane/LeftPaneChatFolders.dom.tsx'; +import { LeftPaneConversationListItemContextMenu } from './leftPane/LeftPaneConversationListItemContextMenu.dom.tsx'; +import { CurrentChatFolders } from '../types/CurrentChatFolders.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/LeftPane.dom.tsx b/ts/components/LeftPane.dom.tsx index 76cf71e573..a2b99ee4bd 100644 --- a/ts/components/LeftPane.dom.tsx +++ b/ts/components/LeftPane.dom.tsx @@ -5,69 +5,69 @@ import React, { useEffect, useCallback, useMemo, useRef } from 'react'; import classNames from 'classnames'; import lodash from 'lodash'; -import type { ToFindType } from './leftPane/LeftPaneHelper.dom.js'; -import { FindDirection } from './leftPane/LeftPaneHelper.dom.js'; -import type { LeftPaneInboxPropsType } from './leftPane/LeftPaneInboxHelper.dom.js'; -import { LeftPaneInboxHelper } from './leftPane/LeftPaneInboxHelper.dom.js'; -import type { LeftPaneSearchPropsType } from './leftPane/LeftPaneSearchHelper.dom.js'; -import { LeftPaneSearchHelper } from './leftPane/LeftPaneSearchHelper.dom.js'; -import type { LeftPaneArchivePropsType } from './leftPane/LeftPaneArchiveHelper.dom.js'; -import { LeftPaneArchiveHelper } from './leftPane/LeftPaneArchiveHelper.dom.js'; -import type { LeftPaneComposePropsType } from './leftPane/LeftPaneComposeHelper.dom.js'; -import { LeftPaneComposeHelper } from './leftPane/LeftPaneComposeHelper.dom.js'; -import type { LeftPaneFindByUsernamePropsType } from './leftPane/LeftPaneFindByUsernameHelper.dom.js'; -import { LeftPaneFindByUsernameHelper } from './leftPane/LeftPaneFindByUsernameHelper.dom.js'; -import type { LeftPaneFindByPhoneNumberPropsType } from './leftPane/LeftPaneFindByPhoneNumberHelper.dom.js'; -import { LeftPaneFindByPhoneNumberHelper } from './leftPane/LeftPaneFindByPhoneNumberHelper.dom.js'; -import type { LeftPaneChooseGroupMembersPropsType } from './leftPane/LeftPaneChooseGroupMembersHelper.dom.js'; -import { LeftPaneChooseGroupMembersHelper } from './leftPane/LeftPaneChooseGroupMembersHelper.dom.js'; -import type { LeftPaneSetGroupMetadataPropsType } from './leftPane/LeftPaneSetGroupMetadataHelper.dom.js'; -import { LeftPaneSetGroupMetadataHelper } from './leftPane/LeftPaneSetGroupMetadataHelper.dom.js'; +import type { ToFindType } from './leftPane/LeftPaneHelper.dom.tsx'; +import { FindDirection } from './leftPane/LeftPaneHelper.dom.tsx'; +import type { LeftPaneInboxPropsType } from './leftPane/LeftPaneInboxHelper.dom.tsx'; +import { LeftPaneInboxHelper } from './leftPane/LeftPaneInboxHelper.dom.tsx'; +import type { LeftPaneSearchPropsType } from './leftPane/LeftPaneSearchHelper.dom.tsx'; +import { LeftPaneSearchHelper } from './leftPane/LeftPaneSearchHelper.dom.tsx'; +import type { LeftPaneArchivePropsType } from './leftPane/LeftPaneArchiveHelper.dom.tsx'; +import { LeftPaneArchiveHelper } from './leftPane/LeftPaneArchiveHelper.dom.tsx'; +import type { LeftPaneComposePropsType } from './leftPane/LeftPaneComposeHelper.dom.tsx'; +import { LeftPaneComposeHelper } from './leftPane/LeftPaneComposeHelper.dom.tsx'; +import type { LeftPaneFindByUsernamePropsType } from './leftPane/LeftPaneFindByUsernameHelper.dom.tsx'; +import { LeftPaneFindByUsernameHelper } from './leftPane/LeftPaneFindByUsernameHelper.dom.tsx'; +import type { LeftPaneFindByPhoneNumberPropsType } from './leftPane/LeftPaneFindByPhoneNumberHelper.dom.tsx'; +import { LeftPaneFindByPhoneNumberHelper } from './leftPane/LeftPaneFindByPhoneNumberHelper.dom.tsx'; +import type { LeftPaneChooseGroupMembersPropsType } from './leftPane/LeftPaneChooseGroupMembersHelper.dom.tsx'; +import { LeftPaneChooseGroupMembersHelper } from './leftPane/LeftPaneChooseGroupMembersHelper.dom.tsx'; +import type { LeftPaneSetGroupMetadataPropsType } from './leftPane/LeftPaneSetGroupMetadataHelper.dom.tsx'; +import { LeftPaneSetGroupMetadataHelper } from './leftPane/LeftPaneSetGroupMetadataHelper.dom.tsx'; -import { LeftPaneMode } from '../types/leftPane.std.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import { ScrollBehavior } from '../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import type { DurationInSeconds } from '../util/durations/index.std.js'; -import { WidthBreakpoint, getNavSidebarWidthBreakpoint } from './_util.std.js'; -import * as KeyboardLayout from '../services/keyboardLayout.dom.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../util/lookupConversationWithoutServiceId.preload.js'; -import type { ShowConversationType } from '../state/ducks/conversations.preload.js'; -import type { PropsType as UnsupportedOSDialogPropsType } from '../state/smart/UnsupportedOSDialog.preload.js'; -import type { SmartPropsType as SmartToastManagerPropsType } from '../state/smart/ToastManager.preload.js'; +import { LeftPaneMode } from '../types/leftPane.std.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import { ScrollBehavior } from '../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import type { DurationInSeconds } from '../util/durations/index.std.ts'; +import { WidthBreakpoint, getNavSidebarWidthBreakpoint } from './_util.std.ts'; +import * as KeyboardLayout from '../services/keyboardLayout.dom.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../util/lookupConversationWithoutServiceId.preload.ts'; +import type { ShowConversationType } from '../state/ducks/conversations.preload.ts'; +import type { PropsType as UnsupportedOSDialogPropsType } from '../state/smart/UnsupportedOSDialog.preload.tsx'; +import type { SmartPropsType as SmartToastManagerPropsType } from '../state/smart/ToastManager.preload.tsx'; -import { ConversationList } from './ConversationList.dom.js'; -import { ContactCheckboxDisabledReason } from './conversationList/ContactCheckbox.dom.js'; -import type { PropsType as DialogExpiredBuildPropsType } from './DialogExpiredBuild.dom.js'; -import { LeftPaneBanner } from './LeftPaneBanner.dom.js'; +import { ConversationList } from './ConversationList.dom.tsx'; +import { ContactCheckboxDisabledReason } from './conversationList/ContactCheckbox.dom.tsx'; +import type { PropsType as DialogExpiredBuildPropsType } from './DialogExpiredBuild.dom.tsx'; +import { LeftPaneBanner } from './LeftPaneBanner.dom.tsx'; import type { DeleteAvatarFromDiskActionType, ReplaceAvatarActionType, SaveAvatarToDiskActionType, -} from '../types/Avatar.std.js'; -import { useSizeObserver } from '../hooks/useSizeObserver.dom.js'; +} from '../types/Avatar.std.ts'; +import { useSizeObserver } from '../hooks/useSizeObserver.dom.tsx'; import { NavSidebar, NavSidebarActionButton, NavSidebarSearchHeader, -} from './NavSidebar.dom.js'; -import type { UnreadStats } from '../util/countUnreadStats.std.js'; -import { BackupMediaDownloadProgress } from './BackupMediaDownloadProgress.dom.js'; +} from './NavSidebar.dom.tsx'; +import type { UnreadStats } from '../util/countUnreadStats.std.ts'; +import { BackupMediaDownloadProgress } from './BackupMediaDownloadProgress.dom.tsx'; import type { ServerAlertsType, ServerAlert, -} from '../types/ServerAlert.std.js'; -import { getServerAlertDialog } from './ServerAlerts.dom.js'; -import { NavTab, SettingsPage, ProfileEditorPage } from '../types/Nav.std.js'; -import type { Location } from '../types/Nav.std.js'; -import type { RenderConversationListItemContextMenuProps } from './conversationList/BaseConversationListItem.dom.js'; -import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.js'; -import type { ChatFolder } from '../types/ChatFolder.std.js'; -import { ProfileAvatar } from './PreferencesNotificationProfiles.dom.js'; -import { tw } from '../axo/tw.dom.js'; +} from '../types/ServerAlert.std.ts'; +import { getServerAlertDialog } from './ServerAlerts.dom.tsx'; +import { NavTab, SettingsPage, ProfileEditorPage } from '../types/Nav.std.ts'; +import type { Location } from '../types/Nav.std.ts'; +import type { RenderConversationListItemContextMenuProps } from './conversationList/BaseConversationListItem.dom.tsx'; +import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.tsx'; +import type { ChatFolder } from '../types/ChatFolder.std.ts'; +import { ProfileAvatar } from './PreferencesNotificationProfiles.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; const { isNumber } = lodash; diff --git a/ts/components/LeftPaneBanner.dom.stories.tsx b/ts/components/LeftPaneBanner.dom.stories.tsx index 38ac30bbdb..75280063e5 100644 --- a/ts/components/LeftPaneBanner.dom.stories.tsx +++ b/ts/components/LeftPaneBanner.dom.stories.tsx @@ -4,7 +4,7 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { LeftPaneBanner, type PropsType } from './LeftPaneBanner.dom.js'; +import { LeftPaneBanner, type PropsType } from './LeftPaneBanner.dom.tsx'; export default { title: 'Components/LeftPaneBanner', diff --git a/ts/components/LeftPaneDialog.dom.stories.tsx b/ts/components/LeftPaneDialog.dom.stories.tsx index 62e1cb5f86..888a9ee036 100644 --- a/ts/components/LeftPaneDialog.dom.stories.tsx +++ b/ts/components/LeftPaneDialog.dom.stories.tsx @@ -3,9 +3,9 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './LeftPaneDialog.dom.js'; -import { LeftPaneDialog } from './LeftPaneDialog.dom.js'; -import { WidthBreakpoint } from './_util.std.js'; +import type { PropsType } from './LeftPaneDialog.dom.tsx'; +import { LeftPaneDialog } from './LeftPaneDialog.dom.tsx'; +import { WidthBreakpoint } from './_util.std.ts'; const widths = { [WidthBreakpoint.Wide]: '400px', diff --git a/ts/components/LeftPaneDialog.dom.tsx b/ts/components/LeftPaneDialog.dom.tsx index b80dd054f8..9e78245a4d 100644 --- a/ts/components/LeftPaneDialog.dom.tsx +++ b/ts/components/LeftPaneDialog.dom.tsx @@ -4,8 +4,8 @@ import type { ReactNode } from 'react'; import React from 'react'; import classNames from 'classnames'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; -import { WidthBreakpoint } from './_util.std.js'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; +import { WidthBreakpoint } from './_util.std.ts'; const BASE_CLASS_NAME = 'LeftPaneDialog'; const TOOLTIP_CLASS_NAME = `${BASE_CLASS_NAME}__tooltip`; diff --git a/ts/components/LeftPaneSearchInput.dom.tsx b/ts/components/LeftPaneSearchInput.dom.tsx index e058a59bcc..c648509c3a 100644 --- a/ts/components/LeftPaneSearchInput.dom.tsx +++ b/ts/components/LeftPaneSearchInput.dom.tsx @@ -6,13 +6,13 @@ import classNames from 'classnames'; import type { ConversationType, ShowConversationType, -} from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { SearchInput } from './SearchInput.dom.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; -import { Theme } from '../util/theme.std.js'; +} from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { SearchInput } from './SearchInput.dom.tsx'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; type BasePropsType = { clearConversationSearch: () => void; diff --git a/ts/components/Lightbox.dom.stories.tsx b/ts/components/Lightbox.dom.stories.tsx index fbe36b7a50..4e809812e1 100644 --- a/ts/components/Lightbox.dom.stories.tsx +++ b/ts/components/Lightbox.dom.stories.tsx @@ -5,9 +5,9 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import lodash from 'lodash'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './Lightbox.dom.js'; -import { Lightbox } from './Lightbox.dom.js'; -import type { MediaItemType } from '../types/MediaItem.std.js'; +import type { PropsType } from './Lightbox.dom.tsx'; +import { Lightbox } from './Lightbox.dom.tsx'; +import type { MediaItemType } from '../types/MediaItem.std.ts'; import { AUDIO_MP3, IMAGE_JPEG, @@ -15,9 +15,9 @@ import { VIDEO_QUICKTIME, stringToMIMEType, type MIMEType, -} from '../types/MIME.std.js'; +} from '../types/MIME.std.ts'; -import { fakeAttachment } from '../test-helpers/fakeAttachment.std.js'; +import { fakeAttachment } from '../test-helpers/fakeAttachment.std.ts'; const { noop } = lodash; diff --git a/ts/components/Lightbox.dom.tsx b/ts/components/Lightbox.dom.tsx index 1da549eee3..89601c7ca7 100644 --- a/ts/components/Lightbox.dom.tsx +++ b/ts/components/Lightbox.dom.tsx @@ -12,30 +12,30 @@ import type { ReadonlyDeep } from 'type-fest'; import type { ConversationType, SaveAttachmentActionCreatorType, -} from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { MediaItemType } from '../types/MediaItem.std.js'; -import * as GoogleChrome from '../util/GoogleChrome.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { IMAGE_PNG, isImage, isVideo } from '../types/MIME.std.js'; -import { formatDateTimeForAttachment } from '../util/formatTimestamp.dom.js'; -import { formatDuration } from '../util/formatDuration.std.js'; -import { isGIF, isIncremental } from '../util/Attachment.std.js'; -import { useRestoreFocus } from '../hooks/useRestoreFocus.dom.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { arrow } from '../util/keyboard.dom.js'; -import { drop } from '../util/drop.std.js'; -import { isCmdOrCtrl } from '../hooks/useKeyboardShortcuts.dom.js'; -import type { ForwardMessagesPayload } from '../state/ducks/globalModals.preload.js'; -import { ForwardMessagesModalType } from './ForwardMessagesModal.dom.js'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; -import { formatFileSize } from '../util/formatFileSize.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { Toast } from './Toast.dom.js'; -import { isAbortError } from '../util/isAbortError.std.js'; -import { strictAssert } from '../util/assert.std.js'; +} from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { MediaItemType } from '../types/MediaItem.std.ts'; +import * as GoogleChrome from '../util/GoogleChrome.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { IMAGE_PNG, isImage, isVideo } from '../types/MIME.std.ts'; +import { formatDateTimeForAttachment } from '../util/formatTimestamp.dom.ts'; +import { formatDuration } from '../util/formatDuration.std.ts'; +import { isGIF, isIncremental } from '../util/Attachment.std.ts'; +import { useRestoreFocus } from '../hooks/useRestoreFocus.dom.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { arrow } from '../util/keyboard.dom.ts'; +import { drop } from '../util/drop.std.ts'; +import { isCmdOrCtrl } from '../hooks/useKeyboardShortcuts.dom.tsx'; +import type { ForwardMessagesPayload } from '../state/ducks/globalModals.preload.ts'; +import { ForwardMessagesModalType } from './ForwardMessagesModal.dom.tsx'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; +import { formatFileSize } from '../util/formatFileSize.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { Toast } from './Toast.dom.tsx'; +import { isAbortError } from '../util/isAbortError.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; const { noop } = lodash; diff --git a/ts/components/ListTile.dom.stories.tsx b/ts/components/ListTile.dom.stories.tsx index e9515748f6..fd12757d7a 100644 --- a/ts/components/ListTile.dom.stories.tsx +++ b/ts/components/ListTile.dom.stories.tsx @@ -3,10 +3,10 @@ import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; -import { ListTile } from './ListTile.dom.js'; -import type { Props } from './ListTile.dom.js'; -import { CircleCheckbox } from './CircleCheckbox.dom.js'; -import { UserText } from './UserText.dom.js'; +import { ListTile } from './ListTile.dom.tsx'; +import type { Props } from './ListTile.dom.tsx'; +import { CircleCheckbox } from './CircleCheckbox.dom.tsx'; +import { UserText } from './UserText.dom.tsx'; export default { title: 'Components/ListTile', diff --git a/ts/components/ListTile.dom.tsx b/ts/components/ListTile.dom.tsx index 22d36f22f4..026ee08189 100644 --- a/ts/components/ListTile.dom.tsx +++ b/ts/components/ListTile.dom.tsx @@ -4,8 +4,8 @@ import classNames from 'classnames'; import React, { useMemo } from 'react'; import { v4 as uuid } from 'uuid'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; -import { CircleCheckbox } from './CircleCheckbox.dom.js'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; +import { CircleCheckbox } from './CircleCheckbox.dom.tsx'; export type Props = { title: string | React.JSX.Element; diff --git a/ts/components/ListView.dom.tsx b/ts/components/ListView.dom.tsx index 0b23ee0c58..d166fdf300 100644 --- a/ts/components/ListView.dom.tsx +++ b/ts/components/ListView.dom.tsx @@ -5,7 +5,7 @@ import classNames from 'classnames'; import React, { useRef, useCallback, useMemo, useLayoutEffect } from 'react'; import type { Index, ListRowRenderer } from 'react-virtualized'; import { List } from 'react-virtualized'; -import { ScrollBehavior } from '../types/Util.std.js'; +import { ScrollBehavior } from '../types/Util.std.ts'; type Props = { width: number; diff --git a/ts/components/LocalBackupExportWorkflow.dom.stories.tsx b/ts/components/LocalBackupExportWorkflow.dom.stories.tsx index 7a2b5e95e8..f71f3e6144 100644 --- a/ts/components/LocalBackupExportWorkflow.dom.stories.tsx +++ b/ts/components/LocalBackupExportWorkflow.dom.stories.tsx @@ -3,14 +3,14 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import { LocalBackupExportWorkflow } from './LocalBackupExportWorkflow.dom.js'; +import { LocalBackupExportWorkflow } from './LocalBackupExportWorkflow.dom.tsx'; import { LocalExportErrors, LocalBackupExportSteps, -} from '../types/LocalExport.std.js'; +} from '../types/LocalExport.std.ts'; -import type { PropsType } from './LocalBackupExportWorkflow.dom.js'; -import type { ComponentMeta } from '../storybook/types.std.js'; +import type { PropsType } from './LocalBackupExportWorkflow.dom.tsx'; +import type { ComponentMeta } from '../storybook/types.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/LocalBackupExportWorkflow.dom.tsx b/ts/components/LocalBackupExportWorkflow.dom.tsx index 6aee2e65d7..b753d1f070 100644 --- a/ts/components/LocalBackupExportWorkflow.dom.tsx +++ b/ts/components/LocalBackupExportWorkflow.dom.tsx @@ -6,18 +6,18 @@ import React, { type ReactNode } from 'react'; import { LocalExportErrors, LocalBackupExportSteps, -} from '../types/LocalExport.std.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; -import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.js'; +} from '../types/LocalExport.std.ts'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; +import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.tsx'; -import type { LocalBackupExportWorkflowType } from '../types/LocalExport.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { formatFileSize } from '../util/formatFileSize.std.js'; -import { ProgressBar } from './ProgressBar.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { tw } from '../axo/tw.dom.js'; -import { AxoSymbol } from '../axo/AxoSymbol.dom.js'; -import type { AxoSymbolIconName } from '../axo/_internal/AxoSymbolDefs.generated.std.js'; +import type { LocalBackupExportWorkflowType } from '../types/LocalExport.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { formatFileSize } from '../util/formatFileSize.std.ts'; +import { ProgressBar } from './ProgressBar.dom.tsx'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; +import { AxoSymbol } from '../axo/AxoSymbol.dom.tsx'; +import type { AxoSymbolIconName } from '../axo/_internal/AxoSymbolDefs.generated.std.ts'; export type PropsType = { cancelWorkflow: () => void; diff --git a/ts/components/LowDiskSpaceBackupImportModal.dom.stories.tsx b/ts/components/LowDiskSpaceBackupImportModal.dom.stories.tsx index 8c13c626ae..36d7eeefc1 100644 --- a/ts/components/LowDiskSpaceBackupImportModal.dom.stories.tsx +++ b/ts/components/LowDiskSpaceBackupImportModal.dom.stories.tsx @@ -5,8 +5,8 @@ import type { Meta, StoryFn } from '@storybook/react'; import React, { type ComponentProps } from 'react'; import { action } from '@storybook/addon-actions'; -import { LowDiskSpaceBackupImportModal } from './LowDiskSpaceBackupImportModal.dom.js'; -import { MEBIBYTE } from '../types/AttachmentSize.std.js'; +import { LowDiskSpaceBackupImportModal } from './LowDiskSpaceBackupImportModal.dom.tsx'; +import { MEBIBYTE } from '../types/AttachmentSize.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/LowDiskSpaceBackupImportModal.dom.tsx b/ts/components/LowDiskSpaceBackupImportModal.dom.tsx index 6ecdb65a5c..37c3e4335d 100644 --- a/ts/components/LowDiskSpaceBackupImportModal.dom.tsx +++ b/ts/components/LowDiskSpaceBackupImportModal.dom.tsx @@ -3,10 +3,10 @@ import * as React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { formatFileSize } from '../util/formatFileSize.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { formatFileSize } from '../util/formatFileSize.std.ts'; export type PropsType = Readonly<{ bytesNeeded: number; diff --git a/ts/components/MediaEditor.dom.stories.tsx b/ts/components/MediaEditor.dom.stories.tsx index 0da055982b..fd5c0398a9 100644 --- a/ts/components/MediaEditor.dom.stories.tsx +++ b/ts/components/MediaEditor.dom.stories.tsx @@ -5,9 +5,9 @@ import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './MediaEditor.dom.js'; -import { MediaEditor } from './MediaEditor.dom.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; +import type { PropsType } from './MediaEditor.dom.tsx'; +import { MediaEditor } from './MediaEditor.dom.tsx'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; const { i18n } = window.SignalContext; const IMAGE_1 = '/fixtures/nathan-anderson-316188-unsplash.jpg'; diff --git a/ts/components/MediaEditor.dom.tsx b/ts/components/MediaEditor.dom.tsx index 1e497b61ef..26c3868185 100644 --- a/ts/components/MediaEditor.dom.tsx +++ b/ts/components/MediaEditor.dom.tsx @@ -16,56 +16,56 @@ import lodash from 'lodash'; import type { DraftBodyRanges, HydratedBodyRangesType, -} from '../types/BodyRange.std.js'; -import type { ImageStateType } from '../mediaEditor/ImageStateType.std.js'; +} from '../types/BodyRange.std.ts'; +import type { ImageStateType } from '../mediaEditor/ImageStateType.std.ts'; import type { InputApi, Props as CompositionInputProps, -} from './CompositionInput.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { MIMEType } from '../types/MIME.std.js'; -import type { imageToBlurHash } from '../util/imageToBlurHash.dom.js'; -import { MediaEditorFabricAnalogTimeSticker } from '../mediaEditor/MediaEditorFabricAnalogTimeSticker.dom.js'; -import { MediaEditorFabricCropRect } from '../mediaEditor/MediaEditorFabricCropRect.dom.js'; -import { MediaEditorFabricDigitalTimeSticker } from '../mediaEditor/MediaEditorFabricDigitalTimeSticker.dom.js'; -import { MediaEditorFabricIText } from '../mediaEditor/MediaEditorFabricIText.dom.js'; -import { MediaEditorFabricPencilBrush } from '../mediaEditor/MediaEditorFabricPencilBrush.dom.js'; -import { MediaEditorFabricSticker } from '../mediaEditor/MediaEditorFabricSticker.dom.js'; -import { fabricEffectListener } from '../mediaEditor/fabricEffectListener.std.js'; -import { getRGBA, getHSL } from '../mediaEditor/util/color.std.js'; +} from './CompositionInput.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { MIMEType } from '../types/MIME.std.ts'; +import type { imageToBlurHash } from '../util/imageToBlurHash.dom.ts'; +import { MediaEditorFabricAnalogTimeSticker } from '../mediaEditor/MediaEditorFabricAnalogTimeSticker.dom.ts'; +import { MediaEditorFabricCropRect } from '../mediaEditor/MediaEditorFabricCropRect.dom.ts'; +import { MediaEditorFabricDigitalTimeSticker } from '../mediaEditor/MediaEditorFabricDigitalTimeSticker.dom.ts'; +import { MediaEditorFabricIText } from '../mediaEditor/MediaEditorFabricIText.dom.ts'; +import { MediaEditorFabricPencilBrush } from '../mediaEditor/MediaEditorFabricPencilBrush.dom.ts'; +import { MediaEditorFabricSticker } from '../mediaEditor/MediaEditorFabricSticker.dom.ts'; +import { fabricEffectListener } from '../mediaEditor/fabricEffectListener.std.ts'; +import { getRGBA, getHSL } from '../mediaEditor/util/color.std.ts'; import { getTextStyleAttributes, TextStyle, -} from '../mediaEditor/util/getTextStyleAttributes.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { CompositionInput } from './CompositionInput.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { IMAGE_PNG } from '../types/MIME.std.js'; -import { SizeObserver } from '../hooks/useSizeObserver.dom.js'; -import { Slider } from './Slider.dom.js'; -import { Theme } from '../util/theme.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { arrow } from '../util/keyboard.dom.js'; -import { canvasToBytes } from '../util/canvasToBytes.std.js'; -import { loadImage } from '../util/loadImage.std.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; -import { useFabricHistory } from '../mediaEditor/useFabricHistory.dom.js'; -import { usePortal } from '../hooks/usePortal.dom.js'; -import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.js'; +} from '../mediaEditor/util/getTextStyleAttributes.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { CompositionInput } from './CompositionInput.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { IMAGE_PNG } from '../types/MIME.std.ts'; +import { SizeObserver } from '../hooks/useSizeObserver.dom.tsx'; +import { Slider } from './Slider.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import { arrow } from '../util/keyboard.dom.ts'; +import { canvasToBytes } from '../util/canvasToBytes.std.ts'; +import { loadImage } from '../util/loadImage.std.ts'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; +import { useFabricHistory } from '../mediaEditor/useFabricHistory.dom.ts'; +import { usePortal } from '../hooks/usePortal.dom.ts'; +import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.tsx'; import { FunEmojiPickerButton, FunStickerPickerButton, -} from './fun/FunButton.dom.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; -import { FunStickerPicker } from './fun/FunStickerPicker.dom.js'; -import type { FunStickerSelection } from './fun/panels/FunPanelStickers.dom.js'; -import { drop } from '../util/drop.std.js'; -import { MediaQualitySelector } from './MediaQualitySelector.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { tw } from '../axo/tw.dom.js'; -import type { FunTimeStickerStyle } from './fun/constants.dom.js'; -import * as Errors from '../types/errors.std.js'; +} from './fun/FunButton.dom.tsx'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; +import { FunStickerPicker } from './fun/FunStickerPicker.dom.tsx'; +import type { FunStickerSelection } from './fun/panels/FunPanelStickers.dom.tsx'; +import { drop } from '../util/drop.std.ts'; +import { MediaQualitySelector } from './MediaQualitySelector.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; +import type { FunTimeStickerStyle } from './fun/constants.dom.tsx'; +import * as Errors from '../types/errors.std.ts'; const { get, has, noop } = lodash; diff --git a/ts/components/MediaPermissionsModal.dom.stories.tsx b/ts/components/MediaPermissionsModal.dom.stories.tsx index 36884b521d..8e5ff5a4ca 100644 --- a/ts/components/MediaPermissionsModal.dom.stories.tsx +++ b/ts/components/MediaPermissionsModal.dom.stories.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import { action } from '@storybook/addon-actions'; -import { type ComponentMeta } from '../storybook/types.std.js'; -import type { PropsType } from './MediaPermissionsModal.dom.js'; -import { MediaPermissionsModal } from './MediaPermissionsModal.dom.js'; +import { type ComponentMeta } from '../storybook/types.std.ts'; +import type { PropsType } from './MediaPermissionsModal.dom.tsx'; +import { MediaPermissionsModal } from './MediaPermissionsModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/MediaPermissionsModal.dom.tsx b/ts/components/MediaPermissionsModal.dom.tsx index 544949b07d..47889562e2 100644 --- a/ts/components/MediaPermissionsModal.dom.tsx +++ b/ts/components/MediaPermissionsModal.dom.tsx @@ -3,11 +3,11 @@ import React, { useCallback } from 'react'; -import { Modal } from './Modal.dom.js'; -import { tw } from '../axo/tw.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { Button } from './Button.dom.js'; +import { Modal } from './Modal.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { Button } from './Button.dom.tsx'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/MediaQualitySelector.dom.stories.tsx b/ts/components/MediaQualitySelector.dom.stories.tsx index 8ab34755ae..5c15625f09 100644 --- a/ts/components/MediaQualitySelector.dom.stories.tsx +++ b/ts/components/MediaQualitySelector.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './MediaQualitySelector.dom.js'; -import { MediaQualitySelector } from './MediaQualitySelector.dom.js'; +import type { PropsType } from './MediaQualitySelector.dom.tsx'; +import { MediaQualitySelector } from './MediaQualitySelector.dom.tsx'; export default { title: 'Components/MediaQualitySelector', diff --git a/ts/components/MediaQualitySelector.dom.tsx b/ts/components/MediaQualitySelector.dom.tsx index 60af367242..0f0505eb3c 100644 --- a/ts/components/MediaQualitySelector.dom.tsx +++ b/ts/components/MediaQualitySelector.dom.tsx @@ -5,9 +5,9 @@ import type { KeyboardEvent } from 'react'; import React, { useCallback, useRef, useState } from 'react'; import classNames from 'classnames'; import { Popover } from 'radix-ui'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { AxoIconButton } from '../axo/AxoIconButton.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import { AxoIconButton } from '../axo/AxoIconButton.dom.tsx'; export type PropsType = { conversationId: string; diff --git a/ts/components/MiniPlayer.dom.stories.tsx b/ts/components/MiniPlayer.dom.stories.tsx index 0c541ae979..44adcae076 100644 --- a/ts/components/MiniPlayer.dom.stories.tsx +++ b/ts/components/MiniPlayer.dom.stories.tsx @@ -3,8 +3,8 @@ import React, { useEffect, useState } from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './MiniPlayer.dom.js'; -import { MiniPlayer, PlayerState } from './MiniPlayer.dom.js'; +import type { Props } from './MiniPlayer.dom.tsx'; +import { MiniPlayer, PlayerState } from './MiniPlayer.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/MiniPlayer.dom.tsx b/ts/components/MiniPlayer.dom.tsx index e8974fc794..5032e0e8aa 100644 --- a/ts/components/MiniPlayer.dom.tsx +++ b/ts/components/MiniPlayer.dom.tsx @@ -3,11 +3,11 @@ import classnames from 'classnames'; import React, { useCallback } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { durationToPlaybackText } from '../util/durationToPlaybackText.std.js'; -import { PlaybackButton } from './PlaybackButton.dom.js'; -import { PlaybackRateButton } from './PlaybackRateButton.dom.js'; -import { UserText } from './UserText.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { durationToPlaybackText } from '../util/durationToPlaybackText.std.ts'; +import { PlaybackButton } from './PlaybackButton.dom.tsx'; +import { PlaybackRateButton } from './PlaybackRateButton.dom.tsx'; +import { UserText } from './UserText.dom.tsx'; export enum PlayerState { loading = 'loading', diff --git a/ts/components/Modal.dom.stories.tsx b/ts/components/Modal.dom.stories.tsx index ca125ee697..3c2e6568ae 100644 --- a/ts/components/Modal.dom.stories.tsx +++ b/ts/components/Modal.dom.stories.tsx @@ -5,9 +5,9 @@ import React from 'react'; import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { Button } from './Button.dom.js'; -import type { ModalPropsType } from './Modal.dom.js'; -import { Modal } from './Modal.dom.js'; +import { Button } from './Button.dom.tsx'; +import type { ModalPropsType } from './Modal.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/Modal.dom.tsx b/ts/components/Modal.dom.tsx index c652f66678..e3d65d026d 100644 --- a/ts/components/Modal.dom.tsx +++ b/ts/components/Modal.dom.tsx @@ -8,20 +8,20 @@ import lodash from 'lodash'; import { animated } from '@react-spring/web'; import { v4 as uuid } from 'uuid'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ModalHost } from './ModalHost.dom.js'; -import type { Theme } from '../util/theme.std.js'; -import { assertDev } from '../util/assert.std.js'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; -import { useAnimated } from '../hooks/useAnimated.dom.js'; -import { useHasWrapped } from '../hooks/useHasWrapped.std.js'; -import { createLogger } from '../logging/log.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ModalHost } from './ModalHost.dom.tsx'; +import type { Theme } from '../util/theme.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; +import { useAnimated } from '../hooks/useAnimated.dom.tsx'; +import { useHasWrapped } from '../hooks/useHasWrapped.std.ts'; +import { createLogger } from '../logging/log.std.ts'; import { isScrollOverflowVertical, isScrollAtTop, isScrollAtBottom, useScrollObserver, -} from '../hooks/useSizeObserver.dom.js'; +} from '../hooks/useSizeObserver.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/ModalContainer.dom.tsx b/ts/components/ModalContainer.dom.tsx index c64a3a8f22..6ce9c25b14 100644 --- a/ts/components/ModalContainer.dom.tsx +++ b/ts/components/ModalContainer.dom.tsx @@ -4,7 +4,7 @@ import React from 'react'; import type { ReactNode } from 'react'; import ReactDOM from 'react-dom'; -import { ModalContainerContext } from './ModalHost.dom.js'; +import { ModalContainerContext } from './ModalHost.dom.tsx'; type Props = { children: ReactNode; diff --git a/ts/components/ModalHost.dom.tsx b/ts/components/ModalHost.dom.tsx index 9177febad0..37246fb094 100644 --- a/ts/components/ModalHost.dom.tsx +++ b/ts/components/ModalHost.dom.tsx @@ -8,15 +8,15 @@ import { animated } from '@react-spring/web'; import classNames from 'classnames'; import lodash from 'lodash'; import { FocusScope } from 'react-aria'; -import type { ModalConfigType } from '../hooks/useAnimated.dom.js'; -import type { Theme } from '../util/theme.std.js'; -import { assertDev } from '../util/assert.std.js'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; -import { themeClassName } from '../util/theme.std.js'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { handleOutsideClick } from '../util/handleOutsideClick.dom.js'; -import { createLogger } from '../logging/log.std.js'; +import type { ModalConfigType } from '../hooks/useAnimated.dom.tsx'; +import type { Theme } from '../util/theme.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; +import { themeClassName } from '../util/theme.std.ts'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { handleOutsideClick } from '../util/handleOutsideClick.dom.ts'; +import { createLogger } from '../logging/log.std.ts'; const { noop } = lodash; diff --git a/ts/components/MyStories.dom.stories.tsx b/ts/components/MyStories.dom.stories.tsx index fcb6045305..24c9890d91 100644 --- a/ts/components/MyStories.dom.stories.tsx +++ b/ts/components/MyStories.dom.stories.tsx @@ -8,13 +8,13 @@ import { v4 as uuid } from 'uuid'; import { expect, fn, within, userEvent } from '@storybook/test'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './MyStories.dom.js'; -import { MY_STORY_ID } from '../types/Stories.std.js'; -import { MyStories } from './MyStories.dom.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { getFakeMyStory } from '../test-helpers/getFakeStory.dom.js'; -import { sleep } from '../util/sleep.std.js'; +import type { PropsType } from './MyStories.dom.tsx'; +import { MY_STORY_ID } from '../types/Stories.std.ts'; +import { MyStories } from './MyStories.dom.tsx'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { getFakeMyStory } from '../test-helpers/getFakeStory.dom.tsx'; +import { sleep } from '../util/sleep.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/MyStories.dom.tsx b/ts/components/MyStories.dom.tsx index 821eda666d..4517b4a8c6 100644 --- a/ts/components/MyStories.dom.tsx +++ b/ts/components/MyStories.dom.tsx @@ -2,26 +2,26 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; -import type { MyStoryType, StoryViewType } from '../types/Stories.std.js'; +import type { MyStoryType, StoryViewType } from '../types/Stories.std.ts'; import { ResolvedSendStatus, StoryViewTargetType, StoryViewModeType, -} from '../types/Stories.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import type { ViewStoryActionCreatorType } from '../state/ducks/stories.preload.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { MessageTimestamp } from './conversation/MessageTimestamp.dom.js'; -import { StoryDistributionListName } from './StoryDistributionListName.dom.js'; -import { StoryImage } from './StoryImage.dom.js'; -import { Theme } from '../util/theme.std.js'; -import { resolveStorySendStatus } from '../util/resolveStorySendStatus.std.js'; -import { useRetryStorySend } from '../hooks/useRetryStorySend.dom.js'; -import { NavSidebar } from './NavSidebar.dom.js'; -import type { WidthBreakpoint } from './_util.std.js'; -import type { UnreadStats } from '../util/countUnreadStats.std.js'; +} from '../types/Stories.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import type { ViewStoryActionCreatorType } from '../state/ducks/stories.preload.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { MessageTimestamp } from './conversation/MessageTimestamp.dom.tsx'; +import { StoryDistributionListName } from './StoryDistributionListName.dom.tsx'; +import { StoryImage } from './StoryImage.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import { resolveStorySendStatus } from '../util/resolveStorySendStatus.std.ts'; +import { useRetryStorySend } from '../hooks/useRetryStorySend.dom.tsx'; +import { NavSidebar } from './NavSidebar.dom.tsx'; +import type { WidthBreakpoint } from './_util.std.ts'; +import type { UnreadStats } from '../util/countUnreadStats.std.ts'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/MyStoryButton.dom.stories.tsx b/ts/components/MyStoryButton.dom.stories.tsx index 2979a34fc7..582a4f2b28 100644 --- a/ts/components/MyStoryButton.dom.stories.tsx +++ b/ts/components/MyStoryButton.dom.stories.tsx @@ -7,12 +7,12 @@ import React from 'react'; import { expect, fn, within, userEvent } from '@storybook/test'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './MyStoryButton.dom.js'; -import { MyStoryButton } from './MyStoryButton.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { getFakeMyStory } from '../test-helpers/getFakeStory.dom.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { ResolvedSendStatus } from '../types/Stories.std.js'; +import type { PropsType } from './MyStoryButton.dom.tsx'; +import { MyStoryButton } from './MyStoryButton.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { getFakeMyStory } from '../test-helpers/getFakeStory.dom.tsx'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { ResolvedSendStatus } from '../types/Stories.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/MyStoryButton.dom.tsx b/ts/components/MyStoryButton.dom.tsx index 3f874d69d8..1acf46995c 100644 --- a/ts/components/MyStoryButton.dom.tsx +++ b/ts/components/MyStoryButton.dom.tsx @@ -3,17 +3,17 @@ import React, { useState } from 'react'; import classNames from 'classnames'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { MyStoryType, StoryViewType } from '../types/Stories.std.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { HasStories, ResolvedSendStatus } from '../types/Stories.std.js'; -import { MessageTimestamp } from './conversation/MessageTimestamp.dom.js'; -import { StoriesAddStoryButton } from './StoriesAddStoryButton.dom.js'; -import { StoryImage } from './StoryImage.dom.js'; -import { getAvatarColor } from '../types/Colors.std.js'; -import { reduceStorySendStatus } from '../util/resolveStorySendStatus.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { MyStoryType, StoryViewType } from '../types/Stories.std.ts'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { HasStories, ResolvedSendStatus } from '../types/Stories.std.ts'; +import { MessageTimestamp } from './conversation/MessageTimestamp.dom.tsx'; +import { StoriesAddStoryButton } from './StoriesAddStoryButton.dom.tsx'; +import { StoryImage } from './StoryImage.dom.tsx'; +import { getAvatarColor } from '../types/Colors.std.ts'; +import { reduceStorySendStatus } from '../util/resolveStorySendStatus.std.ts'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/NavSidebar.dom.tsx b/ts/components/NavSidebar.dom.tsx index 8a2a98ee7f..5c5df78be1 100644 --- a/ts/components/NavSidebar.dom.tsx +++ b/ts/components/NavSidebar.dom.tsx @@ -5,17 +5,17 @@ import type { ButtonHTMLAttributes, ReactNode } from 'react'; import React, { createContext, useCallback, useEffect, useState } from 'react'; import classNames from 'classnames'; import { useMove } from 'react-aria'; -import { NavTabsToggle } from './NavTabs.dom.js'; -import type { LocalizerType } from '../types/I18N.std.js'; +import { NavTabsToggle } from './NavTabs.dom.tsx'; +import type { LocalizerType } from '../types/I18N.std.ts'; import { MAX_WIDTH, MIN_FULL_WIDTH, MIN_WIDTH, getWidthFromPreferredWidth, -} from '../util/leftPaneWidth.std.js'; -import { WidthBreakpoint, getNavSidebarWidthBreakpoint } from './_util.std.js'; -import type { UnreadStats } from '../util/countUnreadStats.std.js'; -import type { SmartPropsType as SmartToastManagerPropsType } from '../state/smart/ToastManager.preload.js'; +} from '../util/leftPaneWidth.std.ts'; +import { WidthBreakpoint, getNavSidebarWidthBreakpoint } from './_util.std.ts'; +import type { UnreadStats } from '../util/countUnreadStats.std.ts'; +import type { SmartPropsType as SmartToastManagerPropsType } from '../state/smart/ToastManager.preload.tsx'; export const NavSidebarWidthBreakpointContext = createContext(null); diff --git a/ts/components/NavTabs.dom.stories.tsx b/ts/components/NavTabs.dom.stories.tsx index 29525bc0c8..47895f4ef8 100644 --- a/ts/components/NavTabs.dom.stories.tsx +++ b/ts/components/NavTabs.dom.stories.tsx @@ -5,11 +5,11 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { NavTabsProps } from './NavTabs.dom.js'; -import { NavTabs } from './NavTabs.dom.js'; -import { NavTab } from '../types/Nav.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { ThemeType } from '../types/Util.std.js'; +import type { NavTabsProps } from './NavTabs.dom.tsx'; +import { NavTabs } from './NavTabs.dom.tsx'; +import { NavTab } from '../types/Nav.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/NavTabs.dom.tsx b/ts/components/NavTabs.dom.tsx index cc6595038e..6dec5cb4ea 100644 --- a/ts/components/NavTabs.dom.tsx +++ b/ts/components/NavTabs.dom.tsx @@ -5,16 +5,16 @@ import type { Key, ReactNode } from 'react'; import React, { useState } from 'react'; import { Tabs, TabList, Tab, TabPanel } from 'react-aria-components'; import classNames from 'classnames'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { BadgeType } from '../badges/types.std.js'; -import { NavTab, ProfileEditorPage, SettingsPage } from '../types/Nav.std.js'; -import type { Location } from '../types/Nav.std.js'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; -import { Theme } from '../util/theme.std.js'; -import type { UnreadStats } from '../util/countUnreadStats.std.js'; -import { ProfileMovedModal } from './ProfileMovedModal.dom.js'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { BadgeType } from '../badges/types.std.ts'; +import { NavTab, ProfileEditorPage, SettingsPage } from '../types/Nav.std.ts'; +import type { Location } from '../types/Nav.std.ts'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import type { UnreadStats } from '../util/countUnreadStats.std.ts'; +import { ProfileMovedModal } from './ProfileMovedModal.dom.tsx'; type NavTabsItemBadgesProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/NeedsScreenRecordingPermissionsModal.dom.tsx b/ts/components/NeedsScreenRecordingPermissionsModal.dom.tsx index fb633e9742..4100f042e5 100644 --- a/ts/components/NeedsScreenRecordingPermissionsModal.dom.tsx +++ b/ts/components/NeedsScreenRecordingPermissionsModal.dom.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Theme } from '../util/theme.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { tw } from '../axo/tw.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Theme } from '../util/theme.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; type PropsType = { i18n: LocalizerType; diff --git a/ts/components/NewlyCreatedGroupInvitedContactsDialog.dom.stories.tsx b/ts/components/NewlyCreatedGroupInvitedContactsDialog.dom.stories.tsx index c8c60272dc..00d1a0bebe 100644 --- a/ts/components/NewlyCreatedGroupInvitedContactsDialog.dom.stories.tsx +++ b/ts/components/NewlyCreatedGroupInvitedContactsDialog.dom.stories.tsx @@ -6,11 +6,11 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './NewlyCreatedGroupInvitedContactsDialog.dom.js'; -import { NewlyCreatedGroupInvitedContactsDialog } from './NewlyCreatedGroupInvitedContactsDialog.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { ThemeType } from '../types/Util.std.js'; +import type { PropsType } from './NewlyCreatedGroupInvitedContactsDialog.dom.tsx'; +import { NewlyCreatedGroupInvitedContactsDialog } from './NewlyCreatedGroupInvitedContactsDialog.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/NewlyCreatedGroupInvitedContactsDialog.dom.tsx b/ts/components/NewlyCreatedGroupInvitedContactsDialog.dom.tsx index 1087554e3e..1abf44b2b8 100644 --- a/ts/components/NewlyCreatedGroupInvitedContactsDialog.dom.tsx +++ b/ts/components/NewlyCreatedGroupInvitedContactsDialog.dom.tsx @@ -4,13 +4,13 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import { I18n } from './I18n.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import { GroupDialog } from './GroupDialog.dom.js'; -import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import { I18n } from './I18n.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import { GroupDialog } from './GroupDialog.dom.tsx'; +import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.ts'; export type PropsType = { contacts: Array; diff --git a/ts/components/NotePreviewModal.dom.stories.tsx b/ts/components/NotePreviewModal.dom.stories.tsx index 05dc8b0998..6847a2f7c3 100644 --- a/ts/components/NotePreviewModal.dom.stories.tsx +++ b/ts/components/NotePreviewModal.dom.stories.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import { action } from '@storybook/addon-actions'; import * as React from 'react'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; import { NotePreviewModal, type NotePreviewModalProps, -} from './NotePreviewModal.dom.js'; +} from './NotePreviewModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/NotePreviewModal.dom.tsx b/ts/components/NotePreviewModal.dom.tsx index f5baf0dbee..d78a95eee3 100644 --- a/ts/components/NotePreviewModal.dom.tsx +++ b/ts/components/NotePreviewModal.dom.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; -import { Linkify } from './conversation/Linkify.dom.js'; -import type { RenderTextCallbackType } from '../types/Util.std.js'; -import { Emojify } from './conversation/Emojify.dom.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { Linkify } from './conversation/Linkify.dom.tsx'; +import type { RenderTextCallbackType } from '../types/Util.std.ts'; +import { Emojify } from './conversation/Emojify.dom.tsx'; export type NotePreviewModalProps = Readonly<{ conversation: ConversationType; diff --git a/ts/components/NotificationProfilesMenu.dom.stories.tsx b/ts/components/NotificationProfilesMenu.dom.stories.tsx index 341b0baa21..7cfbac6fb5 100644 --- a/ts/components/NotificationProfilesMenu.dom.stories.tsx +++ b/ts/components/NotificationProfilesMenu.dom.stories.tsx @@ -6,18 +6,18 @@ import { shuffle } from 'lodash'; import type { Meta, StoryFn } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { NotificationProfilesMenu } from './NotificationProfilesMenu.dom.js'; -import type { Props } from './NotificationProfilesMenu.dom.js'; +import { NotificationProfilesMenu } from './NotificationProfilesMenu.dom.tsx'; +import type { Props } from './NotificationProfilesMenu.dom.tsx'; import { getDefaultConversation, getDefaultGroup, -} from '../test-helpers/getDefaultConversation.std.js'; -import { DayOfWeek } from '../types/NotificationProfile.std.js'; -import type { NotificationProfileIdString } from '../types/NotificationProfile.std.js'; -import { HOUR } from '../util/durations/index.std.js'; -import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +} from '../test-helpers/getDefaultConversation.std.ts'; +import { DayOfWeek } from '../types/NotificationProfile.std.ts'; +import type { NotificationProfileIdString } from '../types/NotificationProfile.std.ts'; +import { HOUR } from '../util/durations/index.std.ts'; +import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/NotificationProfilesMenu.dom.tsx b/ts/components/NotificationProfilesMenu.dom.tsx index 07f3eb956f..5b2f48ccea 100644 --- a/ts/components/NotificationProfilesMenu.dom.tsx +++ b/ts/components/NotificationProfilesMenu.dom.tsx @@ -3,17 +3,17 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; import { getMidnight, type NotificationProfileIdString, type NotificationProfileOverride, type NotificationProfileType, -} from '../types/NotificationProfile.std.js'; -import { DAY, HOUR, SECOND } from '../util/durations/index.std.js'; -import { formatTimestamp } from '../util/formatTimestamp.dom.js'; -import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.js'; -import { ProfileAvatar } from './PreferencesNotificationProfiles.dom.js'; +} from '../types/NotificationProfile.std.ts'; +import { DAY, HOUR, SECOND } from '../util/durations/index.std.ts'; +import { formatTimestamp } from '../util/formatTimestamp.dom.ts'; +import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.tsx'; +import { ProfileAvatar } from './PreferencesNotificationProfiles.dom.tsx'; export type Props = Readonly<{ activeProfileId: NotificationProfileIdString | undefined; diff --git a/ts/components/OutgoingGiftBadgeModal.dom.stories.tsx b/ts/components/OutgoingGiftBadgeModal.dom.stories.tsx index 9805d9c2bb..600a64f550 100644 --- a/ts/components/OutgoingGiftBadgeModal.dom.stories.tsx +++ b/ts/components/OutgoingGiftBadgeModal.dom.stories.tsx @@ -4,9 +4,9 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './OutgoingGiftBadgeModal.dom.js'; -import { OutgoingGiftBadgeModal } from './OutgoingGiftBadgeModal.dom.js'; -import { BadgeCategory } from '../badges/BadgeCategory.std.js'; +import type { PropsType } from './OutgoingGiftBadgeModal.dom.tsx'; +import { OutgoingGiftBadgeModal } from './OutgoingGiftBadgeModal.dom.tsx'; +import { BadgeCategory } from '../badges/BadgeCategory.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/OutgoingGiftBadgeModal.dom.tsx b/ts/components/OutgoingGiftBadgeModal.dom.tsx index f29c05bec9..a81fa5bae5 100644 --- a/ts/components/OutgoingGiftBadgeModal.dom.tsx +++ b/ts/components/OutgoingGiftBadgeModal.dom.tsx @@ -4,12 +4,12 @@ import React from 'react'; import classNames from 'classnames'; -import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath.std.js'; -import { Modal } from './Modal.dom.js'; -import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.js'; +import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.ts'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; const CLASS_NAME = 'OutgoingGiftBadgeModal'; diff --git a/ts/components/PermissionsPopup.dom.tsx b/ts/components/PermissionsPopup.dom.tsx index bc582d7d15..a6334819d8 100644 --- a/ts/components/PermissionsPopup.dom.tsx +++ b/ts/components/PermissionsPopup.dom.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import { Button, ButtonVariant } from './Button.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/PlaintextExportWorkflow.dom.stories.tsx b/ts/components/PlaintextExportWorkflow.dom.stories.tsx index a5c150691c..2616b636f8 100644 --- a/ts/components/PlaintextExportWorkflow.dom.stories.tsx +++ b/ts/components/PlaintextExportWorkflow.dom.stories.tsx @@ -3,14 +3,14 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import { PlaintextExportWorkflow } from './PlaintextExportWorkflow.dom.js'; +import { PlaintextExportWorkflow } from './PlaintextExportWorkflow.dom.tsx'; import { LocalExportErrors, PlaintextExportSteps, -} from '../types/LocalExport.std.js'; +} from '../types/LocalExport.std.ts'; -import type { PropsType } from './PlaintextExportWorkflow.dom.js'; -import type { ComponentMeta } from '../storybook/types.std.js'; +import type { PropsType } from './PlaintextExportWorkflow.dom.tsx'; +import type { ComponentMeta } from '../storybook/types.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/PlaintextExportWorkflow.dom.tsx b/ts/components/PlaintextExportWorkflow.dom.tsx index e5b5a028b6..a05a05889d 100644 --- a/ts/components/PlaintextExportWorkflow.dom.tsx +++ b/ts/components/PlaintextExportWorkflow.dom.tsx @@ -6,18 +6,18 @@ import React from 'react'; import { LocalExportErrors, PlaintextExportSteps, -} from '../types/LocalExport.std.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; -import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.js'; +} from '../types/LocalExport.std.ts'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; +import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.tsx'; -import type { PlaintextExportWorkflowType } from '../types/LocalExport.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { AxoCheckbox } from '../axo/AxoCheckbox.dom.js'; -import { formatFileSize } from '../util/formatFileSize.std.js'; -import { ProgressBar } from './ProgressBar.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { tw } from '../axo/tw.dom.js'; -import { I18n } from './I18n.dom.js'; +import type { PlaintextExportWorkflowType } from '../types/LocalExport.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { AxoCheckbox } from '../axo/AxoCheckbox.dom.tsx'; +import { formatFileSize } from '../util/formatFileSize.std.ts'; +import { ProgressBar } from './ProgressBar.dom.tsx'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; export type PropsType = { cancelWorkflow: () => unknown; diff --git a/ts/components/PlaybackButton.dom.stories.tsx b/ts/components/PlaybackButton.dom.stories.tsx index 519d333cf1..b16fb3f789 100644 --- a/ts/components/PlaybackButton.dom.stories.tsx +++ b/ts/components/PlaybackButton.dom.stories.tsx @@ -5,11 +5,11 @@ import React, { useContext } from 'react'; import type { CSSProperties } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { ButtonProps } from './PlaybackButton.dom.js'; -import { PlaybackButton } from './PlaybackButton.dom.js'; +import type { ButtonProps } from './PlaybackButton.dom.tsx'; +import { PlaybackButton } from './PlaybackButton.dom.tsx'; import { StorybookThemeContext } from '../../.storybook/StorybookThemeContext.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { AUDIO_MP3 } from '../types/MIME.std.js'; +import { ThemeType } from '../types/Util.std.ts'; +import { AUDIO_MP3 } from '../types/MIME.std.ts'; export default { title: 'components/PlaybackButton', diff --git a/ts/components/PlaybackButton.dom.tsx b/ts/components/PlaybackButton.dom.tsx index 3911427df5..9cc1664481 100644 --- a/ts/components/PlaybackButton.dom.tsx +++ b/ts/components/PlaybackButton.dom.tsx @@ -4,9 +4,9 @@ import { animated, useSpring } from '@react-spring/web'; import classNames from 'classnames'; import React, { useCallback } from 'react'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; -import type { AttachmentForUIType } from '../types/Attachment.std.js'; -import { SpinnerV2 } from './SpinnerV2.dom.js'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; +import type { AttachmentForUIType } from '../types/Attachment.std.ts'; +import { SpinnerV2 } from './SpinnerV2.dom.tsx'; const SPRING_CONFIG = { mass: 0.5, diff --git a/ts/components/PlaybackRateButton.dom.tsx b/ts/components/PlaybackRateButton.dom.tsx index 2b70249557..0f5d3ea88b 100644 --- a/ts/components/PlaybackRateButton.dom.tsx +++ b/ts/components/PlaybackRateButton.dom.tsx @@ -4,8 +4,8 @@ import classNames from 'classnames'; import React, { useCallback, useState } from 'react'; import { animated, useSpring } from '@react-spring/web'; -import type { LocalizerType } from '../types/Util.std.js'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; const SPRING_CONFIG = { mass: 0.5, diff --git a/ts/components/PollCreateModal.dom.stories.tsx b/ts/components/PollCreateModal.dom.stories.tsx index 1501b8fa2e..3bda2bd37c 100644 --- a/ts/components/PollCreateModal.dom.stories.tsx +++ b/ts/components/PollCreateModal.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PollCreateModalProps } from './PollCreateModal.dom.js'; -import { PollCreateModal } from './PollCreateModal.dom.js'; +import type { PollCreateModalProps } from './PollCreateModal.dom.tsx'; +import { PollCreateModal } from './PollCreateModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/PollCreateModal.dom.tsx b/ts/components/PollCreateModal.dom.tsx index 0525eb7b57..96d1b7bc79 100644 --- a/ts/components/PollCreateModal.dom.tsx +++ b/ts/components/PollCreateModal.dom.tsx @@ -4,27 +4,27 @@ import React, { useState, useRef, useCallback, useMemo } from 'react'; import { flushSync } from 'react-dom'; import { v4 as generateUuid } from 'uuid'; -import { tw } from '../axo/tw.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { AutoSizeTextArea } from './AutoSizeTextArea.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { AxoSwitch } from '../axo/AxoSwitch.dom.js'; -import { Toast } from './Toast.dom.js'; -import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.js'; -import { FunEmojiPickerButton } from './fun/FunButton.dom.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; -import { getEmojiVariantByKey } from './fun/data/emojis.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import { tw } from '../axo/tw.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { AutoSizeTextArea } from './AutoSizeTextArea.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { AxoSwitch } from '../axo/AxoSwitch.dom.tsx'; +import { Toast } from './Toast.dom.tsx'; +import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.tsx'; +import { FunEmojiPickerButton } from './fun/FunButton.dom.tsx'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; +import { getEmojiVariantByKey } from './fun/data/emojis.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; import { type PollCreateType, POLL_QUESTION_MAX_LENGTH_SEND, POLL_OPTION_MAX_LENGTH, POLL_OPTIONS_MIN_COUNT, POLL_OPTIONS_MAX_COUNT, -} from '../types/Polls.dom.js'; -import { count as countGraphemes } from '../util/grapheme.std.js'; -import { MAX_MESSAGE_BODY_BYTE_LENGTH } from '../util/longAttachment.std.js'; +} from '../types/Polls.dom.ts'; +import { count as countGraphemes } from '../util/grapheme.std.ts'; +import { MAX_MESSAGE_BODY_BYTE_LENGTH } from '../util/longAttachment.std.ts'; type PollOption = { id: string; diff --git a/ts/components/Preferences.dom.stories.tsx b/ts/components/Preferences.dom.stories.tsx index 70406ac2be..03493bc961 100644 --- a/ts/components/Preferences.dom.stories.tsx +++ b/ts/components/Preferences.dom.stories.tsx @@ -7,60 +7,60 @@ import type { MutableRefObject } from 'react'; import { action } from '@storybook/addon-actions'; import lodash from 'lodash'; -import { Preferences } from './Preferences.dom.js'; -import { DEFAULT_CONVERSATION_COLOR } from '../types/Colors.std.js'; -import { PhoneNumberSharingMode } from '../types/PhoneNumberSharingMode.std.js'; -import { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability.std.js'; -import { sleep } from '../util/sleep.std.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; +import { Preferences } from './Preferences.dom.tsx'; +import { DEFAULT_CONVERSATION_COLOR } from '../types/Colors.std.ts'; +import { PhoneNumberSharingMode } from '../types/PhoneNumberSharingMode.std.ts'; +import { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; import { DAY, DurationInSeconds, HOUR, WEEK, -} from '../util/durations/index.std.js'; -import { DialogUpdate } from './DialogUpdate.dom.js'; -import { DialogType } from '../types/Dialogs.std.js'; -import { ThemeType } from '../types/Util.std.js'; +} from '../util/durations/index.std.ts'; +import { DialogUpdate } from './DialogUpdate.dom.tsx'; +import { DialogType } from '../types/Dialogs.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; import { getDefaultConversation, getDefaultGroup, -} from '../test-helpers/getDefaultConversation.std.js'; -import { ProfileEditor } from './ProfileEditor.dom.js'; +} from '../test-helpers/getDefaultConversation.std.ts'; +import { ProfileEditor } from './ProfileEditor.dom.tsx'; import { UsernameEditState, UsernameLinkState, -} from '../state/ducks/usernameEnums.std.js'; -import type { SettingsLocation } from '../types/Nav.std.js'; -import { NavTab, ProfileEditorPage, SettingsPage } from '../types/Nav.std.js'; -import { PreferencesDonations } from './PreferencesDonations.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { PreferencesChatFoldersPage } from './preferences/chatFolders/PreferencesChatFoldersPage.dom.js'; -import { PreferencesEditChatFolderPage } from './preferences/chatFolders/PreferencesEditChatFoldersPage.dom.js'; -import { CHAT_FOLDER_DEFAULTS } from '../types/ChatFolder.std.js'; +} from '../state/ducks/usernameEnums.std.ts'; +import type { SettingsLocation } from '../types/Nav.std.ts'; +import { NavTab, ProfileEditorPage, SettingsPage } from '../types/Nav.std.ts'; +import { PreferencesDonations } from './PreferencesDonations.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; +import { PreferencesChatFoldersPage } from './preferences/chatFolders/PreferencesChatFoldersPage.dom.tsx'; +import { PreferencesEditChatFolderPage } from './preferences/chatFolders/PreferencesEditChatFoldersPage.dom.tsx'; +import { CHAT_FOLDER_DEFAULTS } from '../types/ChatFolder.std.ts'; import { NotificationProfilesHome, NotificationProfilesCreateFlow, -} from './PreferencesNotificationProfiles.dom.js'; -import { DayOfWeek } from '../types/NotificationProfile.std.js'; +} from './PreferencesNotificationProfiles.dom.tsx'; +import { DayOfWeek } from '../types/NotificationProfile.std.ts'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { PropsType } from './Preferences.dom.js'; -import type { WidthBreakpoint } from './_util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { PropsType } from './Preferences.dom.tsx'; +import type { WidthBreakpoint } from './_util.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; import type { DonationReceipt, DonationWorkflow, OneTimeDonationHumanAmounts, -} from '../types/Donations.std.js'; -import type { AnyToast } from '../types/Toast.dom.js'; -import type { SmartPreferencesChatFoldersPageProps } from '../state/smart/PreferencesChatFoldersPage.preload.js'; -import type { SmartPreferencesEditChatFolderPageProps } from '../state/smart/PreferencesEditChatFolderPage.preload.js'; -import { CurrentChatFolders } from '../types/CurrentChatFolders.std.js'; -import type { ExternalProps as SmartNotificationProfilesProps } from '../state/smart/PreferencesNotificationProfiles.preload.js'; -import type { NotificationProfileIdString } from '../types/NotificationProfile.std.js'; -import type { ExportResultType } from '../services/backups/types.std.js'; -import { BackupLevel } from '../services/backups/types.std.js'; +} from '../types/Donations.std.ts'; +import type { AnyToast } from '../types/Toast.dom.tsx'; +import type { SmartPreferencesChatFoldersPageProps } from '../state/smart/PreferencesChatFoldersPage.preload.tsx'; +import type { SmartPreferencesEditChatFolderPageProps } from '../state/smart/PreferencesEditChatFolderPage.preload.tsx'; +import { CurrentChatFolders } from '../types/CurrentChatFolders.std.ts'; +import type { ExternalProps as SmartNotificationProfilesProps } from '../state/smart/PreferencesNotificationProfiles.preload.tsx'; +import type { NotificationProfileIdString } from '../types/NotificationProfile.std.ts'; +import type { ExportResultType } from '../services/backups/types.std.ts'; +import { BackupLevel } from '../services/backups/types.std.ts'; const { shuffle } = lodash; diff --git a/ts/components/Preferences.dom.tsx b/ts/components/Preferences.dom.tsx index 582117aa8e..8a59146388 100644 --- a/ts/components/Preferences.dom.tsx +++ b/ts/components/Preferences.dom.tsx @@ -16,93 +16,93 @@ import * as LocaleMatcher from '@formatjs/intl-localematcher'; import type { MutableRefObject, ReactNode } from 'react'; import type { RowType } from '@signalapp/sqlcipher'; import type { BackupLevel } from '@signalapp/libsignal-client/zkgroup.js'; -import { ChatColorPicker } from './ChatColorPicker.dom.js'; -import { Checkbox } from './Checkbox.dom.js'; -import { WidthBreakpoint } from './_util.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { DisappearingTimeDialog } from './DisappearingTimeDialog.dom.js'; -import { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability.std.js'; -import { PhoneNumberSharingMode } from '../types/PhoneNumberSharingMode.std.js'; -import { KEY_TRANSPARENCY_URL } from '../types/support.std.js'; -import { Select } from './Select.dom.js'; -import { getCustomColorStyle } from '../util/getCustomColorStyle.dom.js'; +import { ChatColorPicker } from './ChatColorPicker.dom.tsx'; +import { Checkbox } from './Checkbox.dom.tsx'; +import { WidthBreakpoint } from './_util.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { DisappearingTimeDialog } from './DisappearingTimeDialog.dom.tsx'; +import { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability.std.ts'; +import { PhoneNumberSharingMode } from '../types/PhoneNumberSharingMode.std.ts'; +import { KEY_TRANSPARENCY_URL } from '../types/support.std.ts'; +import { Select } from './Select.dom.tsx'; +import { getCustomColorStyle } from '../util/getCustomColorStyle.dom.ts'; import { DEFAULT_DURATIONS_IN_SECONDS, DEFAULT_DURATIONS_SET, format as formatExpirationTimer, -} from '../util/expirationTimer.std.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; -import { focusableSelector } from '../util/focusableSelectors.std.js'; -import { Modal } from './Modal.dom.js'; -import { SearchInput } from './SearchInput.dom.js'; -import { removeDiacritics } from '../util/removeDiacritics.std.js'; -import { assertDev } from '../util/assert.std.js'; -import { I18n } from './I18n.dom.js'; -import { FunSkinTonesList } from './fun/FunSkinTones.dom.js'; -import { EMOJI_PARENT_KEY_CONSTANTS } from './fun/data/emojis.std.js'; +} from '../util/expirationTimer.std.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; +import { focusableSelector } from '../util/focusableSelectors.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { SearchInput } from './SearchInput.dom.tsx'; +import { removeDiacritics } from '../util/removeDiacritics.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import { I18n } from './I18n.dom.tsx'; +import { FunSkinTonesList } from './fun/FunSkinTones.dom.tsx'; +import { EMOJI_PARENT_KEY_CONSTANTS } from './fun/data/emojis.std.ts'; import { SettingsControl as Control, FlowingSettingsControl as FlowingControl, SettingsRadio, SettingsRow, -} from './PreferencesUtil.dom.js'; -import { PreferencesBackups } from './PreferencesBackups.dom.js'; -import { PreferencesInternal } from './PreferencesInternal.dom.js'; -import { FunEmojiLocalizationProvider } from './fun/FunEmojiLocalizationProvider.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { NavSidebar } from './NavSidebar.dom.js'; -import type { SettingsLocation } from '../types/Nav.std.js'; -import { SettingsPage, ProfileEditorPage } from '../types/Nav.std.js'; -import { tw } from '../axo/tw.dom.js'; -import { FullWidthButton } from './PreferencesNotificationProfiles.dom.js'; -import type { EmojiSkinTone } from './fun/data/emojis.std.js'; -import type { MediaDeviceSettings } from '../types/Calling.std.js'; -import type { ValidationResultType as BackupValidationResultType } from '../services/backups/index.preload.js'; +} from './PreferencesUtil.dom.tsx'; +import { PreferencesBackups } from './PreferencesBackups.dom.tsx'; +import { PreferencesInternal } from './PreferencesInternal.dom.tsx'; +import { FunEmojiLocalizationProvider } from './fun/FunEmojiLocalizationProvider.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { NavSidebar } from './NavSidebar.dom.tsx'; +import type { SettingsLocation } from '../types/Nav.std.ts'; +import { SettingsPage, ProfileEditorPage } from '../types/Nav.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; +import { FullWidthButton } from './PreferencesNotificationProfiles.dom.tsx'; +import type { EmojiSkinTone } from './fun/data/emojis.std.ts'; +import type { MediaDeviceSettings } from '../types/Calling.std.ts'; +import type { ValidationResultType as BackupValidationResultType } from '../services/backups/index.preload.ts'; import type { AutoDownloadAttachmentType, NotificationSettingType, SentMediaQualitySettingType, ZoomFactorType, StorageAccessType, -} from '../types/StorageKeys.std.js'; -import type { ThemeSettingType } from '../util/theme.std.js'; -import type { AnyToast } from '../types/Toast.dom.js'; -import { ToastType } from '../types/Toast.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +} from '../types/StorageKeys.std.ts'; +import type { ThemeSettingType } from '../util/theme.std.ts'; +import type { AnyToast } from '../types/Toast.dom.tsx'; +import { ToastType } from '../types/Toast.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; import type { ConversationColorType, CustomColorType, DefaultConversationColorType, -} from '../types/Colors.std.js'; +} from '../types/Colors.std.ts'; import type { LocalizerType, SentMediaQualityType, ThemeType, -} from '../types/Util.std.js'; +} from '../types/Util.std.ts'; import type { BackupMediaDownloadStatusType, BackupsSubscriptionType, BackupStatusType, -} from '../types/backups.node.js'; -import type { UnreadStats } from '../util/countUnreadStats.std.js'; -import type { BadgeType } from '../badges/types.std.js'; -import type { MessageCountBySchemaVersionType } from '../sql/Interface.std.js'; +} from '../types/backups.node.ts'; +import type { UnreadStats } from '../util/countUnreadStats.std.ts'; +import type { BadgeType } from '../badges/types.std.ts'; +import type { MessageCountBySchemaVersionType } from '../sql/Interface.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import { isBackupPage } from '../types/PreferencesBackupPage.std.js'; -import type { PreferencesBackupPage } from '../types/PreferencesBackupPage.std.js'; +import { isBackupPage } from '../types/PreferencesBackupPage.std.ts'; +import type { PreferencesBackupPage } from '../types/PreferencesBackupPage.std.ts'; import type { PromptOSAuthReasonType, PromptOSAuthResultType, -} from '../util/os/promptOSAuthMain.main.js'; -import type { DonationReceipt } from '../types/Donations.std.js'; -import type { ChatFolderId } from '../types/ChatFolder.std.js'; -import type { SmartPreferencesEditChatFolderPageProps } from '../state/smart/PreferencesEditChatFolderPage.preload.js'; -import type { SmartPreferencesChatFoldersPageProps } from '../state/smart/PreferencesChatFoldersPage.preload.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import type { ExternalProps as SmartNotificationProfilesProps } from '../state/smart/PreferencesNotificationProfiles.preload.js'; -import type { LocalBackupExportMetadata } from '../types/LocalExport.std.js'; -import { isDonationsPage } from './PreferencesDonations.dom.js'; -import type { VisibleRemoteMegaphoneType } from '../types/Megaphone.std.js'; +} from '../util/os/promptOSAuthMain.main.ts'; +import type { DonationReceipt } from '../types/Donations.std.ts'; +import type { ChatFolderId } from '../types/ChatFolder.std.ts'; +import type { SmartPreferencesEditChatFolderPageProps } from '../state/smart/PreferencesEditChatFolderPage.preload.tsx'; +import type { SmartPreferencesChatFoldersPageProps } from '../state/smart/PreferencesChatFoldersPage.preload.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import type { ExternalProps as SmartNotificationProfilesProps } from '../state/smart/PreferencesNotificationProfiles.preload.tsx'; +import type { LocalBackupExportMetadata } from '../types/LocalExport.std.ts'; +import { isDonationsPage } from './PreferencesDonations.dom.tsx'; +import type { VisibleRemoteMegaphoneType } from '../types/Megaphone.std.ts'; const { isNumber, noop, partition } = lodash; diff --git a/ts/components/PreferencesBackupDetails.dom.tsx b/ts/components/PreferencesBackupDetails.dom.tsx index 68826fadb1..abf9c78b72 100644 --- a/ts/components/PreferencesBackupDetails.dom.tsx +++ b/ts/components/PreferencesBackupDetails.dom.tsx @@ -7,16 +7,16 @@ import type { BackupMediaDownloadStatusType, BackupsSubscriptionType, BackupStatusType, -} from '../types/backups.node.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { formatTimestamp } from '../util/formatTimestamp.dom.js'; -import { SettingsRow } from './PreferencesUtil.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { BackupMediaDownloadProgressSettings } from './BackupMediaDownloadProgressSettings.dom.js'; -import { BackupLevel } from '../services/backups/types.std.js'; -import { SpinnerV2 } from './SpinnerV2.dom.js'; -import { MINUTE } from '../util/durations/constants.std.js'; -import { isOlderThan } from '../util/timestamp.std.js'; +} from '../types/backups.node.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { formatTimestamp } from '../util/formatTimestamp.dom.ts'; +import { SettingsRow } from './PreferencesUtil.dom.tsx'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { BackupMediaDownloadProgressSettings } from './BackupMediaDownloadProgressSettings.dom.tsx'; +import { BackupLevel } from '../services/backups/types.std.ts'; +import { SpinnerV2 } from './SpinnerV2.dom.tsx'; +import { MINUTE } from '../util/durations/constants.std.ts'; +import { isOlderThan } from '../util/timestamp.std.ts'; // We'll show a loading spinner if we are fetching fresh data and cached data is older // than this duration diff --git a/ts/components/PreferencesBackups.dom.tsx b/ts/components/PreferencesBackups.dom.tsx index cd29faa98e..d92cd32005 100644 --- a/ts/components/PreferencesBackups.dom.tsx +++ b/ts/components/PreferencesBackups.dom.tsx @@ -8,30 +8,30 @@ import type { BackupMediaDownloadStatusType, BackupsSubscriptionType, BackupStatusType, -} from '../types/backups.node.js'; -import type { LocalizerType } from '../types/I18N.std.js'; +} from '../types/backups.node.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; import { SettingsControl as Control, FlowingSettingsControl as FlowingControl, LightIconLabel, SettingsRow, -} from './PreferencesUtil.dom.js'; -import type { SettingsLocation } from '../types/Nav.std.js'; -import { SettingsPage } from '../types/Nav.std.js'; -import { I18n } from './I18n.dom.js'; -import { PreferencesLocalBackups } from './PreferencesLocalBackups.dom.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; +} from './PreferencesUtil.dom.tsx'; +import type { SettingsLocation } from '../types/Nav.std.ts'; +import { SettingsPage } from '../types/Nav.std.ts'; +import { I18n } from './I18n.dom.tsx'; +import { PreferencesLocalBackups } from './PreferencesLocalBackups.dom.tsx'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; import type { PromptOSAuthReasonType, PromptOSAuthResultType, -} from '../util/os/promptOSAuthMain.main.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { BackupLevel } from '../services/backups/types.std.js'; +} from '../util/os/promptOSAuthMain.main.ts'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { BackupLevel } from '../services/backups/types.std.ts'; import { BackupsDetailsPage, renderSubscriptionDetails, -} from './PreferencesBackupDetails.dom.js'; -import type { LocalBackupExportMetadata } from '../types/LocalExport.std.js'; +} from './PreferencesBackupDetails.dom.tsx'; +import type { LocalBackupExportMetadata } from '../types/LocalExport.std.ts'; export const SIGNAL_BACKUPS_LEARN_MORE_URL = 'https://support.signal.org/hc/articles/360007059752-Backup-and-Restore-Messages'; diff --git a/ts/components/PreferencesDonateFlow.dom.tsx b/ts/components/PreferencesDonateFlow.dom.tsx index 9f45a64455..702efa420b 100644 --- a/ts/components/PreferencesDonateFlow.dom.tsx +++ b/ts/components/PreferencesDonateFlow.dom.tsx @@ -12,15 +12,15 @@ import React, { import classNames from 'classnames'; import type { ReadonlyDeep } from 'type-fest'; -import type { LocalizerType } from '../types/Util.std.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; import { donationErrorTypeSchema, DonationProcessor, donationStateSchema, ONE_TIME_DONATION_CONFIG_ID, PaymentMethod, -} from '../types/Donations.std.js'; +} from '../types/Donations.std.ts'; import type { CardDetail, DonationErrorType, @@ -28,12 +28,12 @@ import type { HumanDonationAmount, DonationWorkflow, OneTimeDonationHumanAmounts, -} from '../types/Donations.std.js'; +} from '../types/Donations.std.ts'; import type { CardCvcError, CardExpirationError, CardNumberError, -} from '../types/DonationsCardForm.std.js'; +} from '../types/DonationsCardForm.std.ts'; import { cardFormToCardDetail, getCardFormSettings, @@ -42,7 +42,7 @@ import { parseCardExpiration, parseCardForm, parseCardNumber, -} from '../types/DonationsCardForm.std.js'; +} from '../types/DonationsCardForm.std.ts'; import { brandHumanDonationAmount, brandStripeDonationAmount, @@ -53,33 +53,33 @@ import { toHumanCurrencyString, toHumanDonationAmount, toStripeDonationAmount, -} from '../util/currency.dom.js'; -import { PreferencesContent } from './Preferences.dom.js'; -import type { SubmitDonationType } from '../state/ducks/donations.preload.js'; -import { Select } from './Select.dom.js'; +} from '../util/currency.dom.ts'; +import { PreferencesContent } from './Preferences.dom.tsx'; +import type { SubmitDonationType } from '../state/ducks/donations.preload.ts'; +import { Select } from './Select.dom.tsx'; import { DonateInputCardNumber, getCardNumberErrorMessage, -} from './preferences/donations/DonateInputCardNumber.dom.js'; +} from './preferences/donations/DonateInputCardNumber.dom.tsx'; import { DonateInputCardExp, getCardExpirationErrorMessage, -} from './preferences/donations/DonateInputCardExp.dom.js'; +} from './preferences/donations/DonateInputCardExp.dom.tsx'; import { DonateInputCardCvc, getCardCvcErrorMessage, -} from './preferences/donations/DonateInputCardCvc.dom.js'; -import { I18n } from './I18n.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { DonationsOfflineTooltip } from './conversation/DonationsOfflineTooltip.dom.js'; -import { DonateInputAmount } from './preferences/donations/DonateInputAmount.dom.js'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; -import { offsetDistanceModifier } from '../util/popperUtil.std.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js'; -import { usePrevious } from '../hooks/usePrevious.std.js'; -import { tw } from '../axo/tw.dom.js'; +} from './preferences/donations/DonateInputCardCvc.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; +import { DonationsOfflineTooltip } from './conversation/DonationsOfflineTooltip.dom.tsx'; +import { DonateInputAmount } from './preferences/donations/DonateInputAmount.dom.tsx'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; +import { offsetDistanceModifier } from '../util/popperUtil.std.ts'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.ts'; +import { usePrevious } from '../hooks/usePrevious.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; const SUPPORT_URL = 'https://support.signal.org/hc/requests/new?desktop'; diff --git a/ts/components/PreferencesDonations.dom.tsx b/ts/components/PreferencesDonations.dom.tsx index 3f52b52db9..25d1524e92 100644 --- a/ts/components/PreferencesDonations.dom.tsx +++ b/ts/components/PreferencesDonations.dom.tsx @@ -7,57 +7,57 @@ import lodash from 'lodash'; import type { MutableRefObject, ReactNode } from 'react'; import { ListBox, ListBoxItem } from 'react-aria-components'; import type { ReadonlyDeep } from 'type-fest'; -import { getDateTimeFormatter } from '../util/formatTimestamp.dom.js'; +import { getDateTimeFormatter } from '../util/formatTimestamp.dom.ts'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import { PreferencesContent } from './Preferences.dom.js'; -import type { SettingsLocation } from '../types/Nav.std.js'; -import { SettingsPage } from '../types/Nav.std.js'; -import { PreferencesDonateFlow } from './PreferencesDonateFlow.dom.js'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import { PreferencesContent } from './Preferences.dom.tsx'; +import type { SettingsLocation } from '../types/Nav.std.ts'; +import { SettingsPage } from '../types/Nav.std.ts'; +import { PreferencesDonateFlow } from './PreferencesDonateFlow.dom.tsx'; import type { DonationWorkflow, DonationReceipt, OneTimeDonationHumanAmounts, DonationErrorType, -} from '../types/Donations.std.js'; +} from '../types/Donations.std.ts'; import { donationErrorTypeSchema, donationStateSchema, -} from '../types/Donations.std.js'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import { Button, ButtonSize, ButtonVariant } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; -import { Spinner } from './Spinner.dom.js'; -import type { AnyToast } from '../types/Toast.dom.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import { I18n } from './I18n.dom.js'; -import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js'; -import { DonationPrivacyInformationModal } from './DonationPrivacyInformationModal.dom.js'; -import type { SubmitDonationType } from '../state/ducks/donations.preload.js'; +} from '../types/Donations.std.ts'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import { Button, ButtonSize, ButtonVariant } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; +import type { AnyToast } from '../types/Toast.dom.tsx'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { createLogger } from '../logging/log.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import { I18n } from './I18n.dom.tsx'; +import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.ts'; +import { DonationPrivacyInformationModal } from './DonationPrivacyInformationModal.dom.tsx'; +import type { SubmitDonationType } from '../state/ducks/donations.preload.ts'; import { getHumanDonationAmount, toHumanCurrencyString, -} from '../util/currency.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import type { BadgeType } from '../badges/types.std.js'; -import { DonationInterruptedModal } from './DonationInterruptedModal.dom.js'; -import { DonationErrorModal } from './DonationErrorModal.dom.js'; -import { DonationVerificationModal } from './DonationVerificationModal.dom.js'; -import { DonationProgressModal } from './DonationProgressModal.dom.js'; -import { DonationStillProcessingModal } from './DonationStillProcessingModal.dom.js'; -import { DonationThanksModal } from './DonationThanksModal.dom.js'; +} from '../util/currency.dom.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import type { BadgeType } from '../badges/types.std.ts'; +import { DonationInterruptedModal } from './DonationInterruptedModal.dom.tsx'; +import { DonationErrorModal } from './DonationErrorModal.dom.tsx'; +import { DonationVerificationModal } from './DonationVerificationModal.dom.tsx'; +import { DonationProgressModal } from './DonationProgressModal.dom.tsx'; +import { DonationStillProcessingModal } from './DonationStillProcessingModal.dom.tsx'; +import { DonationThanksModal } from './DonationThanksModal.dom.tsx'; import type { ConversationType, ProfileDataType, -} from '../state/ducks/conversations.preload.js'; -import type { AvatarUpdateOptionsType } from '../types/Avatar.std.js'; -import { drop } from '../util/drop.std.js'; -import { DonationsOfflineTooltip } from './conversation/DonationsOfflineTooltip.dom.js'; -import { getInProgressDonation } from '../util/donations.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { tw } from '../axo/tw.dom.js'; +} from '../state/ducks/conversations.preload.ts'; +import type { AvatarUpdateOptionsType } from '../types/Avatar.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { DonationsOfflineTooltip } from './conversation/DonationsOfflineTooltip.dom.tsx'; +import { getInProgressDonation } from '../util/donations.dom.ts'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; const { groupBy, sortBy } = lodash; diff --git a/ts/components/PreferencesInternal.dom.tsx b/ts/components/PreferencesInternal.dom.tsx index d4b2b8b59e..49d34ccf23 100644 --- a/ts/components/PreferencesInternal.dom.tsx +++ b/ts/components/PreferencesInternal.dom.tsx @@ -6,24 +6,24 @@ import classNames from 'classnames'; import { v4 as uuid } from 'uuid'; import type { RowType } from '@signalapp/sqlcipher'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import { formatFileSize } from '../util/formatFileSize.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import type { ValidationResultType as BackupValidationResultType } from '../services/backups/index.preload.js'; -import { SettingsRow, FlowingSettingsControl } from './PreferencesUtil.dom.js'; -import type { MessageCountBySchemaVersionType } from '../sql/Interface.std.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import { formatFileSize } from '../util/formatFileSize.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import type { ValidationResultType as BackupValidationResultType } from '../services/backups/index.preload.ts'; +import { SettingsRow, FlowingSettingsControl } from './PreferencesUtil.dom.tsx'; +import type { MessageCountBySchemaVersionType } from '../sql/Interface.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { DonationReceipt } from '../types/Donations.std.js'; -import type { StorageAccessType } from '../types/StorageKeys.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { isStagingServer } from '../util/isStagingServer.dom.js'; -import { getHumanDonationAmount } from '../util/currency.dom.js'; -import { AutoSizeTextArea } from './AutoSizeTextArea.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { AxoSwitch } from '../axo/AxoSwitch.dom.js'; -import type { VisibleRemoteMegaphoneType } from '../types/Megaphone.std.js'; -import { internalGetTestMegaphone } from '../util/getTestMegaphone.std.js'; +import type { DonationReceipt } from '../types/Donations.std.ts'; +import type { StorageAccessType } from '../types/StorageKeys.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { isStagingServer } from '../util/isStagingServer.dom.ts'; +import { getHumanDonationAmount } from '../util/currency.dom.ts'; +import { AutoSizeTextArea } from './AutoSizeTextArea.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { AxoSwitch } from '../axo/AxoSwitch.dom.tsx'; +import type { VisibleRemoteMegaphoneType } from '../types/Megaphone.std.ts'; +import { internalGetTestMegaphone } from '../util/getTestMegaphone.std.ts'; const log = createLogger('PreferencesInternal'); diff --git a/ts/components/PreferencesLocalBackups.dom.tsx b/ts/components/PreferencesLocalBackups.dom.tsx index 218ec4f920..ff028227a9 100644 --- a/ts/components/PreferencesLocalBackups.dom.tsx +++ b/ts/components/PreferencesLocalBackups.dom.tsx @@ -12,33 +12,33 @@ import React, { import lodash from 'lodash'; import classNames from 'classnames'; -import type { LocalizerType } from '../types/I18N.std.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; import { FlowingSettingsControl as FlowingControl, SettingsRow, -} from './PreferencesUtil.dom.js'; -import { SIGNAL_BACKUPS_LEARN_MORE_URL } from './PreferencesBackups.dom.js'; -import { I18n } from './I18n.dom.js'; -import type { SettingsLocation } from '../types/Nav.std.js'; -import { SettingsPage } from '../types/Nav.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import { Modal } from './Modal.dom.js'; +} from './PreferencesUtil.dom.tsx'; +import { SIGNAL_BACKUPS_LEARN_MORE_URL } from './PreferencesBackups.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import type { SettingsLocation } from '../types/Nav.std.ts'; +import { SettingsPage } from '../types/Nav.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import { Modal } from './Modal.dom.tsx'; import type { PromptOSAuthReasonType, PromptOSAuthResultType, -} from '../util/os/promptOSAuthMain.main.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; -import { AxoCheckbox } from '../axo/AxoCheckbox.dom.js'; -import { SECOND } from '../util/durations/constants.std.js'; -import { formatTimestamp } from '../util/formatTimestamp.dom.js'; -import type { LocalBackupExportMetadata } from '../types/LocalExport.std.js'; -import { tw } from '../axo/tw.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.js'; -import { AxoSymbol } from '../axo/AxoSymbol.dom.js'; +} from '../util/os/promptOSAuthMain.main.ts'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; +import { AxoCheckbox } from '../axo/AxoCheckbox.dom.tsx'; +import { SECOND } from '../util/durations/constants.std.ts'; +import { formatTimestamp } from '../util/formatTimestamp.dom.ts'; +import type { LocalBackupExportMetadata } from '../types/LocalExport.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; +import { createLogger } from '../logging/log.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.tsx'; +import { AxoSymbol } from '../axo/AxoSymbol.dom.tsx'; const { noop } = lodash; const log = createLogger('PreferencesLocalBackups'); diff --git a/ts/components/PreferencesNotificationProfiles.dom.tsx b/ts/components/PreferencesNotificationProfiles.dom.tsx index 410a1911f2..040dd89592 100644 --- a/ts/components/PreferencesNotificationProfiles.dom.tsx +++ b/ts/components/PreferencesNotificationProfiles.dom.tsx @@ -13,53 +13,53 @@ import { isEmojiVariantValue, getEmojiVariantByKey, getEmojiVariantKeyByValue, -} from './fun/data/emojis.std.js'; -import { FunStaticEmoji } from './fun/FunEmoji.dom.js'; -import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.js'; -import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer.dom.js'; -import { FunEmojiPickerButton } from './fun/FunButton.dom.js'; -import { tw } from '../axo/tw.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { AxoSelect } from '../axo/AxoSelect.dom.js'; -import { AxoSwitch } from '../axo/AxoSwitch.dom.js'; -import { AxoSymbol } from '../axo/AxoSymbol.dom.js'; -import { Input } from './Input.dom.js'; -import { Checkbox } from './Checkbox.dom.js'; -import { AvatarColorMap, AvatarColors } from '../types/Colors.std.js'; -import { PreferencesSelectChatsDialog } from './preferences/PreferencesSelectChatsDialog.dom.js'; +} from './fun/data/emojis.std.ts'; +import { FunStaticEmoji } from './fun/FunEmoji.dom.tsx'; +import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.tsx'; +import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer.dom.tsx'; +import { FunEmojiPickerButton } from './fun/FunButton.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { AxoSelect } from '../axo/AxoSelect.dom.tsx'; +import { AxoSwitch } from '../axo/AxoSwitch.dom.tsx'; +import { AxoSymbol } from '../axo/AxoSymbol.dom.tsx'; +import { Input } from './Input.dom.tsx'; +import { Checkbox } from './Checkbox.dom.tsx'; +import { AvatarColorMap, AvatarColors } from '../types/Colors.std.ts'; +import { PreferencesSelectChatsDialog } from './preferences/PreferencesSelectChatsDialog.dom.tsx'; import { DayOfWeek, getMidnight, scheduleToTime, -} from '../types/NotificationProfile.std.js'; -import { Avatar } from './Avatar.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { formatTimestamp } from '../util/formatTimestamp.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { SettingsPage } from '../types/Nav.std.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; -import { AriaClickable } from '../axo/AriaClickable.dom.js'; -import { offsetDistanceModifier } from '../util/popperUtil.std.js'; -import { themeClassName2 } from '../util/theme.std.js'; -import { useRefMerger } from '../hooks/useRefMerger.std.js'; -import { handleOutsideClick } from '../util/handleOutsideClick.dom.js'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; -import { Modal } from './Modal.dom.js'; +} from '../types/NotificationProfile.std.ts'; +import { Avatar } from './Avatar.dom.tsx'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { formatTimestamp } from '../util/formatTimestamp.dom.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { SettingsPage } from '../types/Nav.std.ts'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; +import { AriaClickable } from '../axo/AriaClickable.dom.tsx'; +import { offsetDistanceModifier } from '../util/popperUtil.std.ts'; +import { themeClassName2 } from '../util/theme.std.ts'; +import { useRefMerger } from '../hooks/useRefMerger.std.ts'; +import { handleOutsideClick } from '../util/handleOutsideClick.dom.ts'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; +import { Modal } from './Modal.dom.tsx'; -import type { EmojiVariantKey } from './fun/data/emojis.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import type { ThemeType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { GetConversationByIdType } from '../state/selectors/conversations.dom.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; +import type { EmojiVariantKey } from './fun/data/emojis.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import type { ThemeType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { GetConversationByIdType } from '../state/selectors/conversations.dom.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; import type { NotificationProfileIdString, NotificationProfileType, ScheduleDays, -} from '../types/NotificationProfile.std.js'; -import type { SettingsLocation } from '../types/Nav.std.js'; -import { addLeadingZero } from '../util/timestamp.std.js'; +} from '../types/NotificationProfile.std.ts'; +import type { SettingsLocation } from '../types/Nav.std.ts'; +import { addLeadingZero } from '../util/timestamp.std.ts'; enum CreateFlowPage { Name = 'Name', diff --git a/ts/components/PreferencesUtil.dom.tsx b/ts/components/PreferencesUtil.dom.tsx index 0731f274f1..35ad78c50a 100644 --- a/ts/components/PreferencesUtil.dom.tsx +++ b/ts/components/PreferencesUtil.dom.tsx @@ -8,7 +8,7 @@ import lodash from 'lodash'; import { CircleCheckbox, Variant as CircleCheckboxVariant, -} from './CircleCheckbox.dom.js'; +} from './CircleCheckbox.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/ProfileEditor.dom.stories.tsx b/ts/components/ProfileEditor.dom.stories.tsx index 66f07750bb..8237d0b969 100644 --- a/ts/components/ProfileEditor.dom.stories.tsx +++ b/ts/components/ProfileEditor.dom.stories.tsx @@ -7,19 +7,19 @@ import React, { useState } from 'react'; import casual from 'casual'; import { v4 as generateUuid } from 'uuid'; -import type { PropsType } from './ProfileEditor.dom.js'; +import type { PropsType } from './ProfileEditor.dom.tsx'; -import { ProfileEditorPage } from '../types/Nav.std.js'; -import { ProfileEditor } from './ProfileEditor.dom.js'; -import { UsernameEditor } from './UsernameEditor.dom.js'; +import { ProfileEditorPage } from '../types/Nav.std.ts'; +import { ProfileEditor } from './ProfileEditor.dom.tsx'; +import { UsernameEditor } from './UsernameEditor.dom.tsx'; import { UsernameEditState, UsernameLinkState, UsernameReservationState, -} from '../state/ducks/usernameEnums.std.js'; -import { getRandomColor } from '../test-helpers/getRandomColor.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; +} from '../state/ducks/usernameEnums.std.ts'; +import { getRandomColor } from '../test-helpers/getRandomColor.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/ProfileEditor.dom.tsx b/ts/components/ProfileEditor.dom.tsx index 0a4c73fe0d..0b608119c7 100644 --- a/ts/components/ProfileEditor.dom.tsx +++ b/ts/components/ProfileEditor.dom.tsx @@ -12,28 +12,28 @@ import { useSpring, animated } from '@react-spring/web'; import type { MutableRefObject } from 'react'; -import { AvatarColors } from '../types/Colors.std.js'; -import { AvatarEditor } from './AvatarEditor.dom.js'; -import { AvatarPreview } from './AvatarPreview.dom.js'; -import { ButtonVariant } from './Button.dom.js'; -import { Input } from './Input.dom.js'; -import { PanelRow } from './conversation/conversation-details/PanelRow.dom.js'; -import { UsernameEditState } from '../state/ducks/usernameEnums.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { assertDev } from '../util/assert.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { UsernameLinkEditor } from './UsernameLinkEditor.dom.js'; +import { AvatarColors } from '../types/Colors.std.ts'; +import { AvatarEditor } from './AvatarEditor.dom.tsx'; +import { AvatarPreview } from './AvatarPreview.dom.tsx'; +import { ButtonVariant } from './Button.dom.tsx'; +import { Input } from './Input.dom.tsx'; +import { PanelRow } from './conversation/conversation-details/PanelRow.dom.tsx'; +import { UsernameEditState } from '../state/ducks/usernameEnums.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { assertDev } from '../util/assert.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { UsernameLinkEditor } from './UsernameLinkEditor.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './conversation/conversation-details/ConversationDetailsIcon.dom.js'; -import { UserText } from './UserText.dom.js'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; -import { offsetDistanceModifier } from '../util/popperUtil.std.js'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; -import { FunStaticEmoji } from './fun/FunEmoji.dom.js'; +} from './conversation/conversation-details/ConversationDetailsIcon.dom.tsx'; +import { UserText } from './UserText.dom.tsx'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; +import { offsetDistanceModifier } from '../util/popperUtil.std.ts'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; +import { FunStaticEmoji } from './fun/FunEmoji.dom.tsx'; import { EMOJI_PARENT_KEY_CONSTANTS, EmojiSkinTone, @@ -41,33 +41,33 @@ import { getEmojiVariantByParentKeyAndSkinTone, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from './fun/data/emojis.std.js'; -import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.js'; -import { FunEmojiPickerButton } from './fun/FunButton.dom.js'; -import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer.dom.js'; -import { PreferencesContent } from './Preferences.dom.js'; -import { ProfileEditorPage } from '../types/Nav.std.js'; +} from './fun/data/emojis.std.ts'; +import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.tsx'; +import { FunEmojiPickerButton } from './fun/FunButton.dom.tsx'; +import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer.dom.tsx'; +import { PreferencesContent } from './Preferences.dom.tsx'; +import { ProfileEditorPage } from '../types/Nav.std.ts'; -import type { AvatarColorType } from '../types/Colors.std.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; import type { AvatarDataType, AvatarUpdateOptionsType, DeleteAvatarFromDiskActionType, ReplaceAvatarActionType, SaveAvatarToDiskActionType, -} from '../types/Avatar.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; +} from '../types/Avatar.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; import type { ConversationType, ProfileDataType, SaveAttachmentActionCreatorType, -} from '../state/ducks/conversations.preload.js'; -import type { UsernameLinkState } from '../state/ducks/usernameEnums.std.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import type { EmojiParentKey, EmojiVariantKey } from './fun/data/emojis.std.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; +} from '../state/ducks/conversations.preload.ts'; +import type { UsernameLinkState } from '../state/ducks/usernameEnums.std.ts'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import type { EmojiParentKey, EmojiVariantKey } from './fun/data/emojis.std.ts'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; type ProfileEditorData = { firstName: string; diff --git a/ts/components/ProfileMovedModal.dom.stories.tsx b/ts/components/ProfileMovedModal.dom.stories.tsx index 907aa6c1c8..f07b34fd14 100644 --- a/ts/components/ProfileMovedModal.dom.stories.tsx +++ b/ts/components/ProfileMovedModal.dom.stories.tsx @@ -7,10 +7,10 @@ import { action } from '@storybook/addon-actions'; import type { ComponentProps } from 'react'; import type { Meta } from '@storybook/react'; -import { ProfileMovedModal } from './ProfileMovedModal.dom.js'; -import { ThemeType } from '../types/Util.std.js'; +import { ProfileMovedModal } from './ProfileMovedModal.dom.tsx'; +import { ThemeType } from '../types/Util.std.ts'; -import type { PropsType } from './ProfileMovedModal.dom.js'; +import type { PropsType } from './ProfileMovedModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ProfileMovedModal.dom.tsx b/ts/components/ProfileMovedModal.dom.tsx index 50a5290833..bb65047f6b 100644 --- a/ts/components/ProfileMovedModal.dom.tsx +++ b/ts/components/ProfileMovedModal.dom.tsx @@ -3,11 +3,11 @@ import React from 'react'; -import { Modal } from './Modal.dom.js'; -import { Button } from './Button.dom.js'; -import { ThemeType } from '../types/Util.std.js'; +import { Modal } from './Modal.dom.tsx'; +import { Button } from './Button.dom.tsx'; +import { ThemeType } from '../types/Util.std.ts'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/Profiler.dom.tsx b/ts/components/Profiler.dom.tsx index da082f8809..b3e1579173 100644 --- a/ts/components/Profiler.dom.tsx +++ b/ts/components/Profiler.dom.tsx @@ -3,7 +3,7 @@ import type { ProfilerOnRenderCallback, ReactNode } from 'react'; import React from 'react'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('Profiler'); diff --git a/ts/components/ProgressBar.dom.stories.tsx b/ts/components/ProgressBar.dom.stories.tsx index d753f9140a..80619b660a 100644 --- a/ts/components/ProgressBar.dom.stories.tsx +++ b/ts/components/ProgressBar.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; -import { ProgressBar } from './ProgressBar.dom.js'; -import type { ComponentMeta } from '../storybook/types.std.js'; +import { ProgressBar } from './ProgressBar.dom.tsx'; +import type { ComponentMeta } from '../storybook/types.std.ts'; type Props = React.ComponentProps; export default { diff --git a/ts/components/ProgressDialog.dom.stories.tsx b/ts/components/ProgressDialog.dom.stories.tsx index 489b284a47..efde864d57 100644 --- a/ts/components/ProgressDialog.dom.stories.tsx +++ b/ts/components/ProgressDialog.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ProgressDialog.dom.js'; -import { ProgressDialog } from './ProgressDialog.dom.js'; +import type { PropsType } from './ProgressDialog.dom.tsx'; +import { ProgressDialog } from './ProgressDialog.dom.tsx'; export default { title: 'Components/ProgressDialog', diff --git a/ts/components/ProgressDialog.dom.tsx b/ts/components/ProgressDialog.dom.tsx index d38cd27a0e..5c484a74ea 100644 --- a/ts/components/ProgressDialog.dom.tsx +++ b/ts/components/ProgressDialog.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Spinner } from './Spinner.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Spinner } from './Spinner.dom.tsx'; export type PropsType = { readonly i18n: LocalizerType; diff --git a/ts/components/ProgressModal.dom.stories.tsx b/ts/components/ProgressModal.dom.stories.tsx index dff24ad104..5e1423c5f4 100644 --- a/ts/components/ProgressModal.dom.stories.tsx +++ b/ts/components/ProgressModal.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ProgressModal.dom.js'; -import { ProgressModal } from './ProgressModal.dom.js'; +import type { PropsType } from './ProgressModal.dom.tsx'; +import { ProgressModal } from './ProgressModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ProgressModal.dom.tsx b/ts/components/ProgressModal.dom.tsx index 79b411dd5c..f0ac611237 100644 --- a/ts/components/ProgressModal.dom.tsx +++ b/ts/components/ProgressModal.dom.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import { createPortal } from 'react-dom'; -import { ProgressDialog } from './ProgressDialog.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { ProgressDialog } from './ProgressDialog.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; export type PropsType = { readonly i18n: LocalizerType; diff --git a/ts/components/QrCode.dom.stories.tsx b/ts/components/QrCode.dom.stories.tsx index 403beee08d..d1ac105251 100644 --- a/ts/components/QrCode.dom.stories.tsx +++ b/ts/components/QrCode.dom.stories.tsx @@ -3,8 +3,8 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './QrCode.dom.js'; -import { QrCode } from './QrCode.dom.js'; +import type { PropsType } from './QrCode.dom.tsx'; +import { QrCode } from './QrCode.dom.tsx'; export default { title: 'Components/QrCode', diff --git a/ts/components/QrCode.dom.tsx b/ts/components/QrCode.dom.tsx index bb5bad837e..cd0a7fe00d 100644 --- a/ts/components/QrCode.dom.tsx +++ b/ts/components/QrCode.dom.tsx @@ -4,7 +4,7 @@ import type { ReactElement } from 'react'; import React, { useMemo, useRef } from 'react'; import qrcode from 'qrcode-generator'; -import { getEnvironment, Environment } from '../environment.std.js'; +import { getEnvironment, Environment } from '../environment.std.ts'; const AUTODETECT_TYPE_NUMBER = 0; const ERROR_CORRECTION_LEVEL = 'L'; diff --git a/ts/components/ReactionPickerPicker.dom.tsx b/ts/components/ReactionPickerPicker.dom.tsx index 87c832d28e..7ed04a7464 100644 --- a/ts/components/ReactionPickerPicker.dom.tsx +++ b/ts/components/ReactionPickerPicker.dom.tsx @@ -6,15 +6,15 @@ import React, { forwardRef } from 'react'; import classNames from 'classnames'; import { Button } from 'react-aria-components'; -import type { LocalizerType } from '../types/Util.std.js'; -import { FunStaticEmoji } from './fun/FunEmoji.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { FunStaticEmoji } from './fun/FunEmoji.dom.tsx'; import { getEmojiDebugLabel, getEmojiVariantByKey, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from './fun/data/emojis.std.js'; -import { createLogger } from '../logging/log.std.js'; +} from './fun/data/emojis.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('ReactionPickerPicker'); diff --git a/ts/components/RecordingComposer.dom.tsx b/ts/components/RecordingComposer.dom.tsx index 6c131e09de..e5c0fb8acc 100644 --- a/ts/components/RecordingComposer.dom.tsx +++ b/ts/components/RecordingComposer.dom.tsx @@ -3,8 +3,8 @@ import React from 'react'; import type { ReactNode } from 'react'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { Button, ButtonSize, ButtonVariant } from './Button.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { Button, ButtonSize, ButtonVariant } from './Button.dom.tsx'; type Props = { i18n: LocalizerType; diff --git a/ts/components/RemoteMegaphone.dom.stories.tsx b/ts/components/RemoteMegaphone.dom.stories.tsx index 2df4080e5c..5f33374e26 100644 --- a/ts/components/RemoteMegaphone.dom.stories.tsx +++ b/ts/components/RemoteMegaphone.dom.stories.tsx @@ -3,13 +3,13 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './RemoteMegaphone.dom.js'; -import { RemoteMegaphone } from './RemoteMegaphone.dom.js'; -import { type ComponentMeta } from '../storybook/types.std.js'; +import type { PropsType } from './RemoteMegaphone.dom.tsx'; +import { RemoteMegaphone } from './RemoteMegaphone.dom.tsx'; +import { type ComponentMeta } from '../storybook/types.std.ts'; import type { MegaphoneCtaId, RemoteMegaphoneId, -} from '../types/Megaphone.std.js'; +} from '../types/Megaphone.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/RemoteMegaphone.dom.tsx b/ts/components/RemoteMegaphone.dom.tsx index 8b3cd4f3cc..fb8bfbc700 100644 --- a/ts/components/RemoteMegaphone.dom.tsx +++ b/ts/components/RemoteMegaphone.dom.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { RemoteActionableMegaphoneType } from '../types/Megaphone.std.js'; -import { tw } from '../axo/tw.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { offsetDistanceModifier } from '../util/popperUtil.std.js'; +import type { RemoteActionableMegaphoneType } from '../types/Megaphone.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { offsetDistanceModifier } from '../util/popperUtil.std.ts'; export type PropsType = Omit & { isFullSize: boolean; diff --git a/ts/components/SafetyNumberChangeDialog.dom.stories.tsx b/ts/components/SafetyNumberChangeDialog.dom.stories.tsx index 44fbc47da6..227a7a9912 100644 --- a/ts/components/SafetyNumberChangeDialog.dom.stories.tsx +++ b/ts/components/SafetyNumberChangeDialog.dom.stories.tsx @@ -7,14 +7,14 @@ import type { Meta } from '@storybook/react'; import type { Props, SafetyNumberProps, -} from './SafetyNumberChangeDialog.dom.js'; -import { SafetyNumberChangeDialog } from './SafetyNumberChangeDialog.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +} from './SafetyNumberChangeDialog.dom.tsx'; +import { SafetyNumberChangeDialog } from './SafetyNumberChangeDialog.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; import { StorybookThemeContext } from '../../.storybook/StorybookThemeContext.std.js'; -import { getFakeBadge } from '../test-helpers/getFakeBadge.std.js'; -import { MY_STORY_ID } from '../types/Stories.std.js'; -import { generateStoryDistributionId } from '../types/StoryDistributionId.std.js'; -import { SafetyNumber } from './SafetyNumberViewer.dom.stories.js'; +import { getFakeBadge } from '../test-helpers/getFakeBadge.std.ts'; +import { MY_STORY_ID } from '../types/Stories.std.ts'; +import { generateStoryDistributionId } from '../types/StoryDistributionId.std.ts'; +import { SafetyNumber } from './SafetyNumberViewer.dom.stories.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/SafetyNumberChangeDialog.dom.tsx b/ts/components/SafetyNumberChangeDialog.dom.tsx index c143f82799..c039d8d011 100644 --- a/ts/components/SafetyNumberChangeDialog.dom.tsx +++ b/ts/components/SafetyNumberChangeDialog.dom.tsx @@ -5,25 +5,25 @@ import * as React from 'react'; import lodash from 'lodash'; import classNames from 'classnames'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import type { ActionSpec } from './ConfirmationDialog.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { InContactsIcon } from './InContactsIcon.dom.js'; -import { Modal } from './Modal.dom.js'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import type { ActionSpec } from './ConfirmationDialog.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { InContactsIcon } from './InContactsIcon.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { isInSystemContacts } from '../util/isInSystemContacts.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { Theme } from '../util/theme.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { MY_STORY_ID } from '../types/Stories.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import { UserText } from './UserText.dom.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import { isInSystemContacts } from '../util/isInSystemContacts.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { MY_STORY_ID } from '../types/Stories.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import { UserText } from './UserText.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/SafetyNumberModal.dom.stories.tsx b/ts/components/SafetyNumberModal.dom.stories.tsx index 394ce30cbf..4c9180b9f6 100644 --- a/ts/components/SafetyNumberModal.dom.stories.tsx +++ b/ts/components/SafetyNumberModal.dom.stories.tsx @@ -4,10 +4,10 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import type { PropsType } from './SafetyNumberModal.dom.js'; -import { SafetyNumberModal } from './SafetyNumberModal.dom.js'; -import { SafetyNumber } from './SafetyNumberViewer.dom.stories.js'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import type { PropsType } from './SafetyNumberModal.dom.tsx'; +import { SafetyNumberModal } from './SafetyNumberModal.dom.tsx'; +import { SafetyNumber } from './SafetyNumberViewer.dom.stories.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/SafetyNumberModal.dom.tsx b/ts/components/SafetyNumberModal.dom.tsx index 75392515c2..7e0a5b9918 100644 --- a/ts/components/SafetyNumberModal.dom.tsx +++ b/ts/components/SafetyNumberModal.dom.tsx @@ -3,12 +3,12 @@ import React from 'react'; -import { isSafetyNumberNotAvailable } from '../util/isSafetyNumberNotAvailable.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; -import type { SafetyNumberProps as SafetyNumberViewerPropsType } from './SafetyNumberChangeDialog.dom.js'; -import { SafetyNumberNotReady } from './SafetyNumberNotReady.dom.js'; +import { isSafetyNumberNotAvailable } from '../util/isSafetyNumberNotAvailable.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; +import type { SafetyNumberProps as SafetyNumberViewerPropsType } from './SafetyNumberChangeDialog.dom.tsx'; +import { SafetyNumberNotReady } from './SafetyNumberNotReady.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/SafetyNumberNotReady.dom.stories.tsx b/ts/components/SafetyNumberNotReady.dom.stories.tsx index e6af59378e..c59112ef46 100644 --- a/ts/components/SafetyNumberNotReady.dom.stories.tsx +++ b/ts/components/SafetyNumberNotReady.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './SafetyNumberNotReady.dom.js'; -import { SafetyNumberNotReady } from './SafetyNumberNotReady.dom.js'; +import type { PropsType } from './SafetyNumberNotReady.dom.tsx'; +import { SafetyNumberNotReady } from './SafetyNumberNotReady.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/SafetyNumberNotReady.dom.tsx b/ts/components/SafetyNumberNotReady.dom.tsx index 5c48e29c97..153ab627d2 100644 --- a/ts/components/SafetyNumberNotReady.dom.tsx +++ b/ts/components/SafetyNumberNotReady.dom.tsx @@ -3,12 +3,12 @@ import React from 'react'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; -import { I18n } from './I18n.dom.js'; -import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { SAFETY_NUMBER_URL } from '../types/support.std.js'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { SAFETY_NUMBER_URL } from '../types/support.std.ts'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/SafetyNumberViewer.dom.stories.tsx b/ts/components/SafetyNumberViewer.dom.stories.tsx index 1936ace434..030faf44c2 100644 --- a/ts/components/SafetyNumberViewer.dom.stories.tsx +++ b/ts/components/SafetyNumberViewer.dom.stories.tsx @@ -4,9 +4,9 @@ import React, { useState, useEffect, useMemo } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './SafetyNumberViewer.dom.js'; -import { SafetyNumberViewer } from './SafetyNumberViewer.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './SafetyNumberViewer.dom.tsx'; +import { SafetyNumberViewer } from './SafetyNumberViewer.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; function generateQRData() { const data = new Uint8Array(128); diff --git a/ts/components/SafetyNumberViewer.dom.tsx b/ts/components/SafetyNumberViewer.dom.tsx index 23e86ecebf..58b182925a 100644 --- a/ts/components/SafetyNumberViewer.dom.tsx +++ b/ts/components/SafetyNumberViewer.dom.tsx @@ -4,22 +4,22 @@ import React, { useState, useCallback } from 'react'; import { AnimatePresence, motion } from 'motion/react'; -import { AxoSymbol } from '../axo/AxoSymbol.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; -import { AxoDialog } from '../axo/AxoDialog.dom.js'; -import { QrCode } from './QrCode.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { I18n } from './I18n.dom.js'; -import { SpinnerV2 } from './SpinnerV2.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { SafetyNumberType } from '../types/safetyNumber.std.js'; +import { AxoSymbol } from '../axo/AxoSymbol.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; +import { AxoDialog } from '../axo/AxoDialog.dom.tsx'; +import { QrCode } from './QrCode.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { I18n } from './I18n.dom.tsx'; +import { SpinnerV2 } from './SpinnerV2.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { SafetyNumberType } from '../types/safetyNumber.std.ts'; import { SAFETY_NUMBER_URL, KEY_TRANSPARENCY_URL, -} from '../types/support.std.js'; +} from '../types/support.std.ts'; import type { KeyTransparencyStatusType } from '../types/KeyTransparency.d.ts'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { tw, type TailwindStyles } from '../axo/tw.dom.js'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { tw, type TailwindStyles } from '../axo/tw.dom.tsx'; export type PropsType = { contact: ConversationType; diff --git a/ts/components/SafetyTipsModal.dom.stories.tsx b/ts/components/SafetyTipsModal.dom.stories.tsx index 4e8bc40aee..b1798f7002 100644 --- a/ts/components/SafetyTipsModal.dom.stories.tsx +++ b/ts/components/SafetyTipsModal.dom.stories.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import type { SafetyTipsModalProps } from './SafetyTipsModal.dom.js'; -import { SafetyTipsModal } from './SafetyTipsModal.dom.js'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import type { SafetyTipsModalProps } from './SafetyTipsModal.dom.tsx'; +import { SafetyTipsModal } from './SafetyTipsModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/SafetyTipsModal.dom.tsx b/ts/components/SafetyTipsModal.dom.tsx index d749ac2895..3c4ee2a3bf 100644 --- a/ts/components/SafetyTipsModal.dom.tsx +++ b/ts/components/SafetyTipsModal.dom.tsx @@ -3,10 +3,10 @@ import type { UIEvent } from 'react'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { v4 as uuid } from 'uuid'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { useReducedMotion } from '../hooks/useReducedMotion.dom.js'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { useReducedMotion } from '../hooks/useReducedMotion.dom.ts'; export type SafetyTipsModalProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/SampleMessageBubbles.dom.tsx b/ts/components/SampleMessageBubbles.dom.tsx index 3c73cb5122..ca831d7532 100644 --- a/ts/components/SampleMessageBubbles.dom.tsx +++ b/ts/components/SampleMessageBubbles.dom.tsx @@ -3,9 +3,9 @@ import type { CSSProperties } from 'react'; import React from 'react'; -import type { ConversationColorType } from '../types/Colors.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { formatTime } from '../util/formatTimestamp.dom.js'; +import type { ConversationColorType } from '../types/Colors.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { formatTime } from '../util/formatTimestamp.dom.ts'; export type PropsType = { backgroundStyle?: CSSProperties; diff --git a/ts/components/SearchInput.dom.tsx b/ts/components/SearchInput.dom.tsx index 94a30150b1..9c0911f1b6 100644 --- a/ts/components/SearchInput.dom.tsx +++ b/ts/components/SearchInput.dom.tsx @@ -9,8 +9,8 @@ import type { } from 'react'; import React, { forwardRef } from 'react'; import classNames from 'classnames'; -import type { LocalizerType } from '../types/Util.std.js'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; export type PropTypes = Readonly<{ children?: ReactNode; diff --git a/ts/components/Select.dom.stories.tsx b/ts/components/Select.dom.stories.tsx index 75a4645d76..c00c274919 100644 --- a/ts/components/Select.dom.stories.tsx +++ b/ts/components/Select.dom.stories.tsx @@ -4,8 +4,8 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './Select.dom.js'; -import { Select } from './Select.dom.js'; +import type { PropsType } from './Select.dom.tsx'; +import { Select } from './Select.dom.tsx'; export default { title: 'Components/Select', diff --git a/ts/components/SendStoryModal.dom.stories.tsx b/ts/components/SendStoryModal.dom.stories.tsx index 436f03d0aa..9b74935143 100644 --- a/ts/components/SendStoryModal.dom.stories.tsx +++ b/ts/components/SendStoryModal.dom.stories.tsx @@ -5,18 +5,18 @@ import type { Meta } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './SendStoryModal.dom.js'; -import { SendStoryModal } from './SendStoryModal.dom.js'; +import type { PropsType } from './SendStoryModal.dom.tsx'; +import { SendStoryModal } from './SendStoryModal.dom.tsx'; import { getDefaultConversation, getDefaultGroup, -} from '../test-helpers/getDefaultConversation.std.js'; +} from '../test-helpers/getDefaultConversation.std.ts'; import { getMyStories, getFakeDistributionListsWithMembers, -} from '../test-helpers/getFakeDistributionLists.std.js'; -import { VIDEO_MP4 } from '../types/MIME.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; +} from '../test-helpers/getFakeDistributionLists.std.ts'; +import { VIDEO_MP4 } from '../types/MIME.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/SendStoryModal.dom.tsx b/ts/components/SendStoryModal.dom.tsx index 1211984c30..afc9a0dcf0 100644 --- a/ts/components/SendStoryModal.dom.tsx +++ b/ts/components/SendStoryModal.dom.tsx @@ -4,15 +4,15 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import lodash from 'lodash'; -import { SearchInput } from './SearchInput.dom.js'; -import { filterAndSortConversations } from '../util/filterAndSortConversations.std.js'; +import { SearchInput } from './SearchInput.dom.tsx'; +import { filterAndSortConversations } from '../util/filterAndSortConversations.std.ts'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { ConversationWithStoriesType } from '../state/selectors/conversations.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { PropsType as StoriesSettingsModalPropsType } from './StoriesSettingsModal.dom.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { ConversationWithStoriesType } from '../state/selectors/conversations.dom.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { PropsType as StoriesSettingsModalPropsType } from './StoriesSettingsModal.dom.tsx'; import { getI18nForMyStory, getListViewers, @@ -20,36 +20,36 @@ import { EditDistributionListModal, EditMyStoryPrivacy, Page as StoriesSettingsPage, -} from './StoriesSettingsModal.dom.js'; -import type { StoryDistributionListWithMembersDataType } from '../types/Stories.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { Alert } from './Alert.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { Button, ButtonSize, ButtonVariant } from './Button.dom.js'; -import { Checkbox } from './Checkbox.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; +} from './StoriesSettingsModal.dom.tsx'; +import type { StoryDistributionListWithMembersDataType } from '../types/Stories.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { Alert } from './Alert.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { Button, ButtonSize, ButtonVariant } from './Button.dom.tsx'; +import { Checkbox } from './Checkbox.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; import { MY_STORY_ID, getStoryDistributionListName, -} from '../types/Stories.std.js'; -import type { RenderModalPage, ModalPropsType } from './Modal.dom.js'; -import { PagedModal, ModalPage } from './Modal.dom.js'; -import { StoryDistributionListName } from './StoryDistributionListName.dom.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { StoryImage } from './StoryImage.dom.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; -import { getStoryBackground } from '../util/getStoryBackground.std.js'; +} from '../types/Stories.std.ts'; +import type { RenderModalPage, ModalPropsType } from './Modal.dom.tsx'; +import { PagedModal, ModalPage } from './Modal.dom.tsx'; +import { StoryDistributionListName } from './StoryDistributionListName.dom.tsx'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { StoryImage } from './StoryImage.dom.tsx'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; +import { getStoryBackground } from '../util/getStoryBackground.std.ts'; import { makeObjectUrl, revokeObjectUrl, -} from '../types/VisualAttachment.dom.js'; -import { UserText } from './UserText.dom.js'; -import { Theme } from '../util/theme.std.js'; -import { strictAssert } from '../util/assert.std.js'; +} from '../types/VisualAttachment.dom.ts'; +import { UserText } from './UserText.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; const { noop, sortBy } = lodash; diff --git a/ts/components/ServerAlerts.dom.tsx b/ts/components/ServerAlerts.dom.tsx index 1c789a3d54..c0891d83b3 100644 --- a/ts/components/ServerAlerts.dom.tsx +++ b/ts/components/ServerAlerts.dom.tsx @@ -5,12 +5,12 @@ import React from 'react'; import { ServerAlert, type ServerAlertsType, -} from '../types/ServerAlert.std.js'; -import type { WidthBreakpoint } from './_util.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { CriticalIdlePrimaryDeviceDialog } from './CriticalIdlePrimaryDeviceDialog.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { WarningIdlePrimaryDeviceDialog } from './WarningIdlePrimaryDeviceDialog.dom.js'; +} from '../types/ServerAlert.std.ts'; +import type { WidthBreakpoint } from './_util.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { CriticalIdlePrimaryDeviceDialog } from './CriticalIdlePrimaryDeviceDialog.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; +import { WarningIdlePrimaryDeviceDialog } from './WarningIdlePrimaryDeviceDialog.dom.tsx'; export function getServerAlertDialog( alerts: ServerAlertsType | undefined, diff --git a/ts/components/SharedGroupNames.dom.tsx b/ts/components/SharedGroupNames.dom.tsx index 0a338ac109..e65e733b95 100644 --- a/ts/components/SharedGroupNames.dom.tsx +++ b/ts/components/SharedGroupNames.dom.tsx @@ -4,9 +4,9 @@ import React from 'react'; import lodash from 'lodash'; -import { I18n } from './I18n.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { UserText } from './UserText.dom.js'; +import { I18n } from './I18n.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { UserText } from './UserText.dom.tsx'; const { take } = lodash; diff --git a/ts/components/ShortcutGuide.dom.stories.tsx b/ts/components/ShortcutGuide.dom.stories.tsx index 3559c5c80f..61ad903b5c 100644 --- a/ts/components/ShortcutGuide.dom.stories.tsx +++ b/ts/components/ShortcutGuide.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './ShortcutGuide.dom.js'; -import { ShortcutGuide } from './ShortcutGuide.dom.js'; +import type { Props } from './ShortcutGuide.dom.tsx'; +import { ShortcutGuide } from './ShortcutGuide.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ShortcutGuide.dom.tsx b/ts/components/ShortcutGuide.dom.tsx index 4a9ceefb9d..e817bad161 100644 --- a/ts/components/ShortcutGuide.dom.tsx +++ b/ts/components/ShortcutGuide.dom.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import classNames from 'classnames'; -import { useRestoreFocus } from '../hooks/useRestoreFocus.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { useRestoreFocus } from '../hooks/useRestoreFocus.dom.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; export type Props = { platform: string; diff --git a/ts/components/ShortcutGuideModal.dom.tsx b/ts/components/ShortcutGuideModal.dom.tsx index 9ca3e6ff6f..e1a94e3a91 100644 --- a/ts/components/ShortcutGuideModal.dom.tsx +++ b/ts/components/ShortcutGuideModal.dom.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import { createPortal } from 'react-dom'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ShortcutGuide } from './ShortcutGuide.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ShortcutGuide } from './ShortcutGuide.dom.tsx'; export type PropsType = { platform: string; diff --git a/ts/components/SignalConnectionsModal.dom.stories.tsx b/ts/components/SignalConnectionsModal.dom.stories.tsx index a258213ef9..5248d1b8da 100644 --- a/ts/components/SignalConnectionsModal.dom.stories.tsx +++ b/ts/components/SignalConnectionsModal.dom.stories.tsx @@ -5,8 +5,8 @@ import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './SignalConnectionsModal.dom.js'; -import { SignalConnectionsModal } from './SignalConnectionsModal.dom.js'; +import type { PropsType } from './SignalConnectionsModal.dom.tsx'; +import { SignalConnectionsModal } from './SignalConnectionsModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/SignalConnectionsModal.dom.tsx b/ts/components/SignalConnectionsModal.dom.tsx index 3e8bddb8d3..04dced526c 100644 --- a/ts/components/SignalConnectionsModal.dom.tsx +++ b/ts/components/SignalConnectionsModal.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { I18n } from './I18n.dom.js'; -import { Modal } from './Modal.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { I18n } from './I18n.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/Slider.dom.stories.tsx b/ts/components/Slider.dom.stories.tsx index ded9a98a5a..d42692b2df 100644 --- a/ts/components/Slider.dom.stories.tsx +++ b/ts/components/Slider.dom.stories.tsx @@ -6,8 +6,8 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './Slider.dom.js'; -import { Slider } from './Slider.dom.js'; +import type { PropsType } from './Slider.dom.tsx'; +import { Slider } from './Slider.dom.tsx'; export default { title: 'Components/Slider', diff --git a/ts/components/Slider.dom.tsx b/ts/components/Slider.dom.tsx index ee02ba070a..3324ff4e88 100644 --- a/ts/components/Slider.dom.tsx +++ b/ts/components/Slider.dom.tsx @@ -3,8 +3,8 @@ import type { CSSProperties, KeyboardEvent } from 'react'; import React, { useRef } from 'react'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; -import { arrow } from '../util/keyboard.dom.js'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; +import { arrow } from '../util/keyboard.dom.ts'; export type PropsType = { containerStyle?: CSSProperties; diff --git a/ts/components/Spinner.dom.stories.tsx b/ts/components/Spinner.dom.stories.tsx index fff4ce123f..1a7bab4610 100644 --- a/ts/components/Spinner.dom.stories.tsx +++ b/ts/components/Spinner.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './Spinner.dom.js'; -import { Spinner, SpinnerDirections, SpinnerSvgSizes } from './Spinner.dom.js'; +import type { Props } from './Spinner.dom.tsx'; +import { Spinner, SpinnerDirections, SpinnerSvgSizes } from './Spinner.dom.tsx'; export default { title: 'Components/Spinner', diff --git a/ts/components/Spinner.dom.tsx b/ts/components/Spinner.dom.tsx index 31ffdf206c..868e5e1111 100644 --- a/ts/components/Spinner.dom.tsx +++ b/ts/components/Spinner.dom.tsx @@ -4,7 +4,7 @@ import React from 'react'; import classNames from 'classnames'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; export const SpinnerSvgSizes = ['small', 'normal'] as const; export type SpinnerSvgSize = (typeof SpinnerSvgSizes)[number]; diff --git a/ts/components/SpinnerV2.dom.stories.tsx b/ts/components/SpinnerV2.dom.stories.tsx index f90ba502eb..955a9a9f09 100644 --- a/ts/components/SpinnerV2.dom.stories.tsx +++ b/ts/components/SpinnerV2.dom.stories.tsx @@ -3,11 +3,11 @@ import React, { useEffect, useState } from 'react'; -import { SpinnerV2 } from './SpinnerV2.dom.js'; -import { tw } from '../axo/tw.dom.js'; +import { SpinnerV2 } from './SpinnerV2.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; -import type { ComponentMeta } from '../storybook/types.std.js'; -import type { Props } from './SpinnerV2.dom.js'; +import type { ComponentMeta } from '../storybook/types.std.ts'; +import type { Props } from './SpinnerV2.dom.tsx'; export default { title: 'Components/SpinnerV2', diff --git a/ts/components/SpinnerV2.dom.tsx b/ts/components/SpinnerV2.dom.tsx index 1b62acabfb..664f5a921b 100644 --- a/ts/components/SpinnerV2.dom.tsx +++ b/ts/components/SpinnerV2.dom.tsx @@ -3,8 +3,8 @@ import React from 'react'; -import { tw, type TailwindStyles } from '../axo/tw.dom.js'; -import { roundFractionForProgressBar } from '../util/numbers.std.js'; +import { tw, type TailwindStyles } from '../axo/tw.dom.tsx'; +import { roundFractionForProgressBar } from '../util/numbers.std.ts'; export type Props = { value?: number | 'indeterminate'; // default: 'indeterminate' diff --git a/ts/components/StandaloneRegistration.dom.stories.tsx b/ts/components/StandaloneRegistration.dom.stories.tsx index be9337ecd1..26b68a8c99 100644 --- a/ts/components/StandaloneRegistration.dom.stories.tsx +++ b/ts/components/StandaloneRegistration.dom.stories.tsx @@ -5,10 +5,10 @@ import React from 'react'; import type { Meta, StoryFn } from '@storybook/react'; import { fn } from '@storybook/test'; -import { StandaloneRegistration } from './StandaloneRegistration.dom.js'; -import type { PropsType } from './StandaloneRegistration.dom.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { sleep } from '../util/sleep.std.js'; +import { StandaloneRegistration } from './StandaloneRegistration.dom.tsx'; +import type { PropsType } from './StandaloneRegistration.dom.tsx'; +import { SECOND } from '../util/durations/index.std.ts'; +import { sleep } from '../util/sleep.std.ts'; export default { title: 'Components/StandaloneRegistration', diff --git a/ts/components/StandaloneRegistration.dom.tsx b/ts/components/StandaloneRegistration.dom.tsx index 5a1345d4f9..1b32df9584 100644 --- a/ts/components/StandaloneRegistration.dom.tsx +++ b/ts/components/StandaloneRegistration.dom.tsx @@ -6,10 +6,10 @@ import React, { useState, useEffect, useCallback, useRef } from 'react'; import type { Iti } from 'intl-tel-input'; import intlTelInput from 'intl-tel-input'; -import { strictAssert } from '../util/assert.std.js'; -import { parseNumber } from '../util/libphonenumberUtil.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { VerificationTransport } from '../types/VerificationTransport.std.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { parseNumber } from '../util/libphonenumberUtil.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { VerificationTransport } from '../types/VerificationTransport.std.ts'; function PhoneInput({ initialValue, diff --git a/ts/components/StoriesAddStoryButton.dom.tsx b/ts/components/StoriesAddStoryButton.dom.tsx index bbbaeeab36..f790e66082 100644 --- a/ts/components/StoriesAddStoryButton.dom.tsx +++ b/ts/components/StoriesAddStoryButton.dom.tsx @@ -4,15 +4,15 @@ import type { ReactNode } from 'react'; import React, { useState, useCallback } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { ToastType } from '../types/Toast.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { ToastType } from '../types/Toast.dom.tsx'; import { isVideoGoodForStories, ReasonVideoNotGood, -} from '../util/isVideoGoodForStories.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; +} from '../util/isVideoGoodForStories.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; export type PropsType = { children?: ReactNode; diff --git a/ts/components/StoriesPane.dom.tsx b/ts/components/StoriesPane.dom.tsx index ee386e6d53..440c00a1a1 100644 --- a/ts/components/StoriesPane.dom.tsx +++ b/ts/components/StoriesPane.dom.tsx @@ -8,20 +8,20 @@ import classNames from 'classnames'; import type { ConversationType, ShowConversationType, -} from '../state/ducks/conversations.preload.js'; +} from '../state/ducks/conversations.preload.ts'; import type { ConversationStoryType, MyStoryType, -} from '../types/Stories.std.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import type { ViewUserStoriesActionCreatorType } from '../state/ducks/stories.preload.js'; -import { MyStoryButton } from './MyStoryButton.dom.js'; -import { SearchInput } from './SearchInput.dom.js'; -import { StoryListItem } from './StoryListItem.dom.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { NavSidebarSearchHeader, NavSidebarEmpty } from './NavSidebar.dom.js'; +} from '../types/Stories.std.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import type { ViewUserStoriesActionCreatorType } from '../state/ducks/stories.preload.ts'; +import { MyStoryButton } from './MyStoryButton.dom.tsx'; +import { SearchInput } from './SearchInput.dom.tsx'; +import { StoryListItem } from './StoryListItem.dom.tsx'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { NavSidebarSearchHeader, NavSidebarEmpty } from './NavSidebar.dom.tsx'; const FUSE_OPTIONS: Fuse.IFuseOptions = { getFn: (story, path) => { diff --git a/ts/components/StoriesSettingsModal.dom.stories.tsx b/ts/components/StoriesSettingsModal.dom.stories.tsx index a384f267cc..f9da91bd3e 100644 --- a/ts/components/StoriesSettingsModal.dom.stories.tsx +++ b/ts/components/StoriesSettingsModal.dom.stories.tsx @@ -5,16 +5,16 @@ import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './StoriesSettingsModal.dom.js'; -import { StoriesSettingsModal } from './StoriesSettingsModal.dom.js'; +import type { PropsType } from './StoriesSettingsModal.dom.tsx'; +import { StoriesSettingsModal } from './StoriesSettingsModal.dom.tsx'; import { getDefaultConversation, getDefaultGroup, -} from '../test-helpers/getDefaultConversation.std.js'; +} from '../test-helpers/getDefaultConversation.std.ts'; import { getMyStories, getFakeDistributionList, -} from '../test-helpers/getFakeDistributionLists.std.js'; +} from '../test-helpers/getFakeDistributionLists.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/StoriesSettingsModal.dom.tsx b/ts/components/StoriesSettingsModal.dom.tsx index 22a739e29d..effb491d0c 100644 --- a/ts/components/StoriesSettingsModal.dom.tsx +++ b/ts/components/StoriesSettingsModal.dom.tsx @@ -11,42 +11,42 @@ import React, { } from 'react'; import lodash from 'lodash'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { ConversationWithStoriesType } from '../state/selectors/conversations.dom.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { Row } from './ConversationList.dom.js'; -import type { StoryDistributionListWithMembersDataType } from '../types/Stories.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import type { RenderModalPage, ModalPropsType } from './Modal.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Checkbox } from './Checkbox.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { ContactPills } from './ContactPills.dom.js'; -import { ContactPill } from './ContactPill.dom.js'; -import { ConversationList, RowType } from './ConversationList.dom.js'; -import { Input } from './Input.dom.js'; -import { I18n } from './I18n.dom.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { ConversationWithStoriesType } from '../state/selectors/conversations.dom.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { Row } from './ConversationList.dom.tsx'; +import type { StoryDistributionListWithMembersDataType } from '../types/Stories.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import type { RenderModalPage, ModalPropsType } from './Modal.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Checkbox } from './Checkbox.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { ContactPills } from './ContactPills.dom.tsx'; +import { ContactPill } from './ContactPill.dom.tsx'; +import { ConversationList, RowType } from './ConversationList.dom.tsx'; +import { Input } from './Input.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; import { MY_STORY_ID, getStoryDistributionListName, -} from '../types/Stories.std.js'; -import { PagedModal, ModalPage } from './Modal.dom.js'; -import { SearchInput } from './SearchInput.dom.js'; -import { StoryDistributionListName } from './StoryDistributionListName.dom.js'; -import { filterAndSortConversations } from '../util/filterAndSortConversations.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; +} from '../types/Stories.std.ts'; +import { PagedModal, ModalPage } from './Modal.dom.tsx'; +import { SearchInput } from './SearchInput.dom.tsx'; +import { StoryDistributionListName } from './StoryDistributionListName.dom.tsx'; +import { filterAndSortConversations } from '../util/filterAndSortConversations.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; import { shouldNeverBeCalled, asyncShouldNeverBeCalled, -} from '../util/shouldNeverBeCalled.std.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; -import { getGroupMemberships } from '../util/getGroupMemberships.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { UserText } from './UserText.dom.js'; -import { SizeObserver } from '../hooks/useSizeObserver.dom.js'; +} from '../util/shouldNeverBeCalled.std.ts'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; +import { getGroupMemberships } from '../util/getGroupMemberships.dom.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { UserText } from './UserText.dom.tsx'; +import { SizeObserver } from '../hooks/useSizeObserver.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/StoriesTab.dom.stories.tsx b/ts/components/StoriesTab.dom.stories.tsx index 606a7c39e8..a40beb1f51 100644 --- a/ts/components/StoriesTab.dom.stories.tsx +++ b/ts/components/StoriesTab.dom.stories.tsx @@ -5,14 +5,14 @@ import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './StoriesTab.dom.js'; -import { StoriesTab } from './StoriesTab.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './StoriesTab.dom.tsx'; +import { StoriesTab } from './StoriesTab.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; import { getFakeMyStory, getFakeStory, -} from '../test-helpers/getFakeStory.dom.js'; -import * as durations from '../util/durations/index.std.js'; +} from '../test-helpers/getFakeStory.dom.tsx'; +import * as durations from '../util/durations/index.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/StoriesTab.dom.tsx b/ts/components/StoriesTab.dom.tsx index a618e3b63d..73d67d0ba8 100644 --- a/ts/components/StoriesTab.dom.tsx +++ b/ts/components/StoriesTab.dom.tsx @@ -5,28 +5,28 @@ import React, { useState } from 'react'; import type { ConversationType, ShowConversationType, -} from '../state/ducks/conversations.preload.js'; +} from '../state/ducks/conversations.preload.ts'; import type { ConversationStoryType, MyStoryType, StoryViewType, -} from '../types/Stories.std.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; +} from '../types/Stories.std.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; import type { AddStoryData, ViewUserStoriesActionCreatorType, ViewStoryActionCreatorType, -} from '../state/ducks/stories.preload.js'; -import { MyStories } from './MyStories.dom.js'; -import { StoriesPane } from './StoriesPane.dom.js'; -import { NavSidebar, NavSidebarActionButton } from './NavSidebar.dom.js'; -import { StoriesAddStoryButton } from './StoriesAddStoryButton.dom.js'; -import { I18n } from './I18n.dom.js'; -import type { WidthBreakpoint } from './_util.std.js'; -import type { UnreadStats } from '../util/countUnreadStats.std.js'; -import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.js'; +} from '../state/ducks/stories.preload.ts'; +import { MyStories } from './MyStories.dom.tsx'; +import { StoriesPane } from './StoriesPane.dom.tsx'; +import { NavSidebar, NavSidebarActionButton } from './NavSidebar.dom.tsx'; +import { StoriesAddStoryButton } from './StoriesAddStoryButton.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import type { WidthBreakpoint } from './_util.std.ts'; +import type { UnreadStats } from '../util/countUnreadStats.std.ts'; +import { AxoDropdownMenu } from '../axo/AxoDropdownMenu.dom.tsx'; export type PropsType = { addStoryData: AddStoryData; diff --git a/ts/components/StoryCreator.dom.stories.tsx b/ts/components/StoryCreator.dom.stories.tsx index a8bef577a0..c65951d82f 100644 --- a/ts/components/StoryCreator.dom.stories.tsx +++ b/ts/components/StoryCreator.dom.stories.tsx @@ -5,15 +5,15 @@ import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './StoryCreator.dom.js'; -import { StoryCreator } from './StoryCreator.dom.js'; -import { fakeAttachment } from '../test-helpers/fakeAttachment.std.js'; +import type { PropsType } from './StoryCreator.dom.tsx'; +import { StoryCreator } from './StoryCreator.dom.tsx'; +import { fakeAttachment } from '../test-helpers/fakeAttachment.std.ts'; import { getDefaultConversation, getDefaultGroup, -} from '../test-helpers/getDefaultConversation.std.js'; -import { getFakeDistributionListsWithMembers } from '../test-helpers/getFakeDistributionLists.std.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; +} from '../test-helpers/getDefaultConversation.std.ts'; +import { getFakeDistributionListsWithMembers } from '../test-helpers/getFakeDistributionLists.std.ts'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/StoryCreator.dom.tsx b/ts/components/StoryCreator.dom.tsx index 74142a92b5..1571507f55 100644 --- a/ts/components/StoryCreator.dom.tsx +++ b/ts/components/StoryCreator.dom.tsx @@ -5,23 +5,23 @@ import React, { useEffect, useState } from 'react'; import lodash from 'lodash'; import { createPortal } from 'react-dom'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { LinkPreviewSourceType } from '../types/LinkPreview.std.js'; -import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { PropsType as SendStoryModalPropsType } from './SendStoryModal.dom.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import type { imageToBlurHash } from '../util/imageToBlurHash.dom.js'; -import type { PropsType as MediaEditorPropsType } from './MediaEditor.dom.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { LinkPreviewSourceType } from '../types/LinkPreview.std.ts'; +import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { PropsType as SendStoryModalPropsType } from './SendStoryModal.dom.tsx'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import type { imageToBlurHash } from '../util/imageToBlurHash.dom.ts'; +import type { PropsType as MediaEditorPropsType } from './MediaEditor.dom.tsx'; -import { TEXT_ATTACHMENT } from '../types/MIME.std.js'; -import { isVideoAttachment } from '../util/Attachment.std.js'; -import { SendStoryModal } from './SendStoryModal.dom.js'; +import { TEXT_ATTACHMENT } from '../types/MIME.std.ts'; +import { isVideoAttachment } from '../util/Attachment.std.ts'; +import { SendStoryModal } from './SendStoryModal.dom.tsx'; -import { MediaEditor } from './MediaEditor.dom.js'; -import { TextStoryCreator } from './TextStoryCreator.dom.js'; -import type { DraftBodyRanges } from '../types/BodyRange.std.js'; -import type { processAttachment } from '../util/processAttachment.preload.js'; +import { MediaEditor } from './MediaEditor.dom.tsx'; +import { TextStoryCreator } from './TextStoryCreator.dom.tsx'; +import type { DraftBodyRanges } from '../types/BodyRange.std.ts'; +import type { processAttachment } from '../util/processAttachment.preload.ts'; const { get, has } = lodash; diff --git a/ts/components/StoryDetailsModal.dom.stories.tsx b/ts/components/StoryDetailsModal.dom.stories.tsx index 0979369656..856b32c839 100644 --- a/ts/components/StoryDetailsModal.dom.stories.tsx +++ b/ts/components/StoryDetailsModal.dom.stories.tsx @@ -6,10 +6,10 @@ import React from 'react'; import casual from 'casual'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './StoryDetailsModal.dom.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { StoryDetailsModal } from './StoryDetailsModal.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './StoryDetailsModal.dom.tsx'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { StoryDetailsModal } from './StoryDetailsModal.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/StoryDetailsModal.dom.tsx b/ts/components/StoryDetailsModal.dom.tsx index 94ce44e2a3..62672a0abc 100644 --- a/ts/components/StoryDetailsModal.dom.tsx +++ b/ts/components/StoryDetailsModal.dom.tsx @@ -2,28 +2,28 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; import type { StorySendStateType, StoryViewType, -} from '../types/Stories.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { I18n } from './I18n.dom.js'; -import { Modal } from './Modal.dom.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { Theme } from '../util/theme.std.js'; -import { formatDateTimeLong } from '../util/formatTimestamp.dom.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; -import type { SaveAttachmentActionCreatorType } from '../state/ducks/conversations.preload.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { Time } from './Time.dom.js'; -import { groupBy } from '../util/mapUtil.std.js'; -import { format as formatRelativeTime } from '../util/expirationTimer.std.js'; -import { formatFileSize } from '../util/formatFileSize.std.js'; +} from '../types/Stories.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { Theme } from '../util/theme.std.ts'; +import { formatDateTimeLong } from '../util/formatTimestamp.dom.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; +import type { SaveAttachmentActionCreatorType } from '../state/ducks/conversations.preload.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import { Time } from './Time.dom.tsx'; +import { groupBy } from '../util/mapUtil.std.ts'; +import { format as formatRelativeTime } from '../util/expirationTimer.std.ts'; +import { formatFileSize } from '../util/formatFileSize.std.ts'; export type PropsType = { getPreferredBadge: PreferredBadgeSelectorType; diff --git a/ts/components/StoryDistributionListName.dom.tsx b/ts/components/StoryDistributionListName.dom.tsx index cc9a842342..d57cd92e68 100644 --- a/ts/components/StoryDistributionListName.dom.tsx +++ b/ts/components/StoryDistributionListName.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { getStoryDistributionListName } from '../types/Stories.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import { UserText } from './UserText.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { getStoryDistributionListName } from '../types/Stories.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import { UserText } from './UserText.dom.tsx'; type PropsType = { i18n: LocalizerType; diff --git a/ts/components/StoryImage.dom.stories.tsx b/ts/components/StoryImage.dom.stories.tsx index d7d775279b..004fc1619a 100644 --- a/ts/components/StoryImage.dom.stories.tsx +++ b/ts/components/StoryImage.dom.stories.tsx @@ -7,13 +7,13 @@ import { action } from '@storybook/addon-actions'; import lodash from 'lodash'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './StoryImage.dom.js'; -import { StoryImage } from './StoryImage.dom.js'; +import type { PropsType } from './StoryImage.dom.tsx'; +import { StoryImage } from './StoryImage.dom.tsx'; import { fakeAttachment, fakeThumbnail, -} from '../test-helpers/fakeAttachment.std.js'; -import { VIDEO_MP4 } from '../types/MIME.std.js'; +} from '../test-helpers/fakeAttachment.std.ts'; +import { VIDEO_MP4 } from '../types/MIME.std.ts'; const { noop } = lodash; diff --git a/ts/components/StoryImage.dom.tsx b/ts/components/StoryImage.dom.tsx index 25ebbfa6c3..3cb43bd510 100644 --- a/ts/components/StoryImage.dom.tsx +++ b/ts/components/StoryImage.dom.tsx @@ -6,11 +6,11 @@ import React, { useEffect, useRef, useState } from 'react'; import classNames from 'classnames'; import { Blurhash } from 'react-blurhash'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Spinner } from './Spinner.dom.js'; -import { TextAttachment } from './TextAttachment.dom.js'; -import { ThemeType } from '../types/Util.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Spinner } from './Spinner.dom.tsx'; +import { TextAttachment } from './TextAttachment.dom.tsx'; +import { ThemeType } from '../types/Util.std.ts'; import { defaultBlurHash, hasFailed, @@ -18,12 +18,12 @@ import { isDownloaded, isDownloading, isGIF, -} from '../util/Attachment.std.js'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; -import { isVideoTypeSupported } from '../util/GoogleChrome.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { isAbortError } from '../util/isAbortError.std.js'; +} from '../util/Attachment.std.ts'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; +import { isVideoTypeSupported } from '../util/GoogleChrome.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { isAbortError } from '../util/isAbortError.std.ts'; const log = createLogger('StoryImage'); diff --git a/ts/components/StoryLinkPreview.dom.stories.tsx b/ts/components/StoryLinkPreview.dom.stories.tsx index 78b5852c59..91aad11ffd 100644 --- a/ts/components/StoryLinkPreview.dom.stories.tsx +++ b/ts/components/StoryLinkPreview.dom.stories.tsx @@ -4,10 +4,10 @@ import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; -import type { Props } from './StoryLinkPreview.dom.js'; -import { StoryLinkPreview } from './StoryLinkPreview.dom.js'; -import { fakeAttachment } from '../test-helpers/fakeAttachment.std.js'; -import { IMAGE_JPEG } from '../types/MIME.std.js'; +import type { Props } from './StoryLinkPreview.dom.tsx'; +import { StoryLinkPreview } from './StoryLinkPreview.dom.tsx'; +import { fakeAttachment } from '../test-helpers/fakeAttachment.std.ts'; +import { IMAGE_JPEG } from '../types/MIME.std.ts'; const LONG_TITLE = "This is a super-sweet site. And it's got some really amazing content in store for you if you just click that link. Can you click that link for me?"; diff --git a/ts/components/StoryLinkPreview.dom.tsx b/ts/components/StoryLinkPreview.dom.tsx index 66ee8698e8..e7a647b876 100644 --- a/ts/components/StoryLinkPreview.dom.tsx +++ b/ts/components/StoryLinkPreview.dom.tsx @@ -5,11 +5,11 @@ import React from 'react'; import classNames from 'classnames'; import lodash from 'lodash'; -import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { CurveType, Image } from './conversation/Image.dom.js'; -import { isImageAttachment } from '../util/Attachment.std.js'; -import { getSafeDomain } from '../types/LinkPreview.std.js'; +import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { CurveType, Image } from './conversation/Image.dom.tsx'; +import { isImageAttachment } from '../util/Attachment.std.ts'; +import { getSafeDomain } from '../types/LinkPreview.std.ts'; const { unescape } = lodash; diff --git a/ts/components/StoryListItem.dom.stories.tsx b/ts/components/StoryListItem.dom.stories.tsx index 2fde265f58..f8a972eb7c 100644 --- a/ts/components/StoryListItem.dom.stories.tsx +++ b/ts/components/StoryListItem.dom.stories.tsx @@ -5,13 +5,13 @@ import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './StoryListItem.dom.js'; -import { StoryListItem } from './StoryListItem.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './StoryListItem.dom.tsx'; +import { StoryListItem } from './StoryListItem.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; import { fakeAttachment, fakeThumbnail, -} from '../test-helpers/fakeAttachment.std.js'; +} from '../test-helpers/fakeAttachment.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/StoryListItem.dom.tsx b/ts/components/StoryListItem.dom.tsx index 3bbd322615..a41507c3b0 100644 --- a/ts/components/StoryListItem.dom.tsx +++ b/ts/components/StoryListItem.dom.tsx @@ -6,20 +6,20 @@ import classNames from 'classnames'; import type { ConversationStoryType, StoryViewType, -} from '../types/Stories.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { LocalizerType, ThemeType } from '../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { ViewUserStoriesActionCreatorType } from '../state/ducks/stories.preload.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { SIGNAL_ACI } from '../types/SignalConversation.std.js'; -import { StoryViewTargetType, HasStories } from '../types/Stories.std.js'; +} from '../types/Stories.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { LocalizerType, ThemeType } from '../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { ViewUserStoriesActionCreatorType } from '../state/ducks/stories.preload.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { SIGNAL_ACI } from '../types/SignalConversation.std.ts'; +import { StoryViewTargetType, HasStories } from '../types/Stories.std.ts'; -import { MessageTimestamp } from './conversation/MessageTimestamp.dom.js'; -import { StoryImage } from './StoryImage.dom.js'; -import { getAvatarColor } from '../types/Colors.std.js'; +import { MessageTimestamp } from './conversation/MessageTimestamp.dom.tsx'; +import { StoryImage } from './StoryImage.dom.tsx'; +import { getAvatarColor } from '../types/Colors.std.ts'; export type PropsType = Pick & { conversationId: string; diff --git a/ts/components/StoryViewer.dom.stories.tsx b/ts/components/StoryViewer.dom.stories.tsx index 51badd7a46..76ce32f925 100644 --- a/ts/components/StoryViewer.dom.stories.tsx +++ b/ts/components/StoryViewer.dom.stories.tsx @@ -4,17 +4,17 @@ import type { Meta } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './StoryViewer.dom.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { StoryViewModeType } from '../types/Stories.std.js'; -import { generateStoryDistributionId } from '../types/StoryDistributionId.std.js'; -import { StoryViewer } from './StoryViewer.dom.js'; -import { VIDEO_MP4 } from '../types/MIME.std.js'; -import { fakeAttachment } from '../test-helpers/fakeAttachment.std.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { getFakeStoryView } from '../test-helpers/getFakeStory.dom.js'; -import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants.std.js'; -import { EmojiSkinTone } from './fun/data/emojis.std.js'; +import type { PropsType } from './StoryViewer.dom.tsx'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { StoryViewModeType } from '../types/Stories.std.ts'; +import { generateStoryDistributionId } from '../types/StoryDistributionId.std.ts'; +import { StoryViewer } from './StoryViewer.dom.tsx'; +import { VIDEO_MP4 } from '../types/MIME.std.ts'; +import { fakeAttachment } from '../test-helpers/fakeAttachment.std.ts'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { getFakeStoryView } from '../test-helpers/getFakeStory.dom.tsx'; +import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants.std.ts'; +import { EmojiSkinTone } from './fun/data/emojis.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/StoryViewer.dom.tsx b/ts/components/StoryViewer.dom.tsx index aeac16280b..84cca00e5b 100644 --- a/ts/components/StoryViewer.dom.tsx +++ b/ts/components/StoryViewer.dom.tsx @@ -5,55 +5,55 @@ import { FocusScope } from 'react-aria'; import type { UIEvent } from 'react'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import classNames from 'classnames'; -import type { DraftBodyRanges } from '../types/BodyRange.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { ContextMenuOptionType } from './ContextMenu.dom.js'; +import type { DraftBodyRanges } from '../types/BodyRange.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { ContextMenuOptionType } from './ContextMenu.dom.tsx'; import type { ConversationType, SaveAttachmentActionCreatorType, -} from '../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { ReplyStateType, StoryViewType } from '../types/Stories.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import type { ViewStoryActionCreatorType } from '../state/ducks/stories.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { AnimatedEmojiGalore } from './AnimatedEmojiGalore.dom.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { I18n } from './I18n.dom.js'; -import { MessageTimestamp } from './conversation/MessageTimestamp.dom.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { Spinner } from './Spinner.dom.js'; -import { StoryDetailsModal } from './StoryDetailsModal.dom.js'; -import { StoryDistributionListName } from './StoryDistributionListName.dom.js'; -import { StoryImage } from './StoryImage.dom.js'; +} from '../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { ReplyStateType, StoryViewType } from '../types/Stories.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import type { ViewStoryActionCreatorType } from '../state/ducks/stories.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { AnimatedEmojiGalore } from './AnimatedEmojiGalore.dom.tsx'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import { MessageTimestamp } from './conversation/MessageTimestamp.dom.tsx'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { Spinner } from './Spinner.dom.tsx'; +import { StoryDetailsModal } from './StoryDetailsModal.dom.tsx'; +import { StoryDistributionListName } from './StoryDistributionListName.dom.tsx'; +import { StoryImage } from './StoryImage.dom.tsx'; import { ResolvedSendStatus, StoryViewDirectionType, StoryViewModeType, StoryViewTargetType, -} from '../types/Stories.std.js'; -import { StoryViewsNRepliesModal } from './StoryViewsNRepliesModal.dom.js'; -import { Theme } from '../util/theme.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { getAvatarColor } from '../types/Colors.std.js'; -import { getStoryBackground } from '../util/getStoryBackground.std.js'; -import { getStoryDuration } from '../util/getStoryDuration.dom.js'; -import { isVideoAttachment } from '../util/Attachment.std.js'; -import { graphemeAndLinkAwareSlice } from '../util/graphemeAndLinkAwareSlice.std.js'; -import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js'; -import { useRetryStorySend } from '../hooks/useRetryStorySend.dom.js'; -import { resolveStorySendStatus } from '../util/resolveStorySendStatus.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { MessageBody } from './conversation/MessageBody.dom.js'; -import { RenderLocation } from './conversation/MessageTextRenderer.dom.js'; -import { arrow } from '../util/keyboard.dom.js'; -import { StoryProgressSegment } from './StoryProgressSegment.dom.js'; -import type { EmojiSkinTone } from './fun/data/emojis.std.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; -import type { ContactModalStateType } from '../types/globalModals.std.js'; +} from '../types/Stories.std.ts'; +import { StoryViewsNRepliesModal } from './StoryViewsNRepliesModal.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { getAvatarColor } from '../types/Colors.std.ts'; +import { getStoryBackground } from '../util/getStoryBackground.std.ts'; +import { getStoryDuration } from '../util/getStoryDuration.dom.ts'; +import { isVideoAttachment } from '../util/Attachment.std.ts'; +import { graphemeAndLinkAwareSlice } from '../util/graphemeAndLinkAwareSlice.std.ts'; +import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.ts'; +import { useRetryStorySend } from '../hooks/useRetryStorySend.dom.tsx'; +import { resolveStorySendStatus } from '../util/resolveStorySendStatus.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { MessageBody } from './conversation/MessageBody.dom.tsx'; +import { RenderLocation } from './conversation/MessageTextRenderer.dom.tsx'; +import { arrow } from '../util/keyboard.dom.ts'; +import { StoryProgressSegment } from './StoryProgressSegment.dom.tsx'; +import type { EmojiSkinTone } from './fun/data/emojis.std.ts'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; +import type { ContactModalStateType } from '../types/globalModals.std.ts'; const log = createLogger('StoryViewer'); diff --git a/ts/components/StoryViewsNRepliesModal.dom.stories.tsx b/ts/components/StoryViewsNRepliesModal.dom.stories.tsx index 4175e408ea..f85ec96d3b 100644 --- a/ts/components/StoryViewsNRepliesModal.dom.stories.tsx +++ b/ts/components/StoryViewsNRepliesModal.dom.stories.tsx @@ -6,13 +6,13 @@ import React, { useState } from 'react'; import { v4 as generateUuid } from 'uuid'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './StoryViewsNRepliesModal.dom.js'; -import * as durations from '../util/durations/index.std.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { StoryViewsNRepliesModal } from './StoryViewsNRepliesModal.dom.js'; -import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.js'; -import { StoryViewTargetType } from '../types/Stories.std.js'; -import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants.std.js'; +import type { PropsType } from './StoryViewsNRepliesModal.dom.tsx'; +import * as durations from '../util/durations/index.std.ts'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { StoryViewsNRepliesModal } from './StoryViewsNRepliesModal.dom.tsx'; +import { getDefaultConversation } from '../test-helpers/getDefaultConversation.std.ts'; +import { StoryViewTargetType } from '../types/Stories.std.ts'; +import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/StoryViewsNRepliesModal.dom.tsx b/ts/components/StoryViewsNRepliesModal.dom.tsx index be59e2dd20..e6dac5425f 100644 --- a/ts/components/StoryViewsNRepliesModal.dom.tsx +++ b/ts/components/StoryViewsNRepliesModal.dom.tsx @@ -11,41 +11,41 @@ import React, { } from 'react'; import classNames from 'classnames'; import lodash from 'lodash'; -import type { DraftBodyRanges } from '../types/BodyRange.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { InputApi } from './CompositionInput.dom.js'; -import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.js'; -import type { ReplyType, StorySendStateType } from '../types/Stories.std.js'; -import { StoryViewTargetType } from '../types/Stories.std.js'; -import { Avatar, AvatarSize } from './Avatar.dom.js'; -import { CompositionInput } from './CompositionInput.dom.js'; -import { ContactName } from './conversation/ContactName.dom.js'; -import { Emojify } from './conversation/Emojify.dom.js'; +import type { DraftBodyRanges } from '../types/BodyRange.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { InputApi } from './CompositionInput.dom.tsx'; +import type { PreferredBadgeSelectorType } from '../state/selectors/badges.preload.ts'; +import type { ReplyType, StorySendStateType } from '../types/Stories.std.ts'; +import { StoryViewTargetType } from '../types/Stories.std.ts'; +import { Avatar, AvatarSize } from './Avatar.dom.tsx'; +import { CompositionInput } from './CompositionInput.dom.tsx'; +import { ContactName } from './conversation/ContactName.dom.tsx'; +import { Emojify } from './conversation/Emojify.dom.tsx'; import { Message, MessageInteractivity, TextDirection, -} from './conversation/Message.dom.js'; -import { MessageTimestamp } from './conversation/MessageTimestamp.dom.js'; -import { Modal } from './Modal.dom.js'; -import { ReactionPicker } from './conversation/ReactionPicker.dom.js'; -import { Tabs } from './Tabs.dom.js'; -import { Theme } from '../util/theme.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { WidthBreakpoint } from './_util.std.js'; -import { getAvatarColor } from '../types/Colors.std.js'; -import { shouldNeverBeCalled } from '../util/shouldNeverBeCalled.std.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import type { EmojiSkinTone } from './fun/data/emojis.std.js'; -import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.js'; -import { FunEmojiPickerButton } from './fun/FunButton.dom.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; -import { AxoContextMenu } from '../axo/AxoContextMenu.dom.js'; -import type { AxoMenuBuilder } from '../axo/AxoMenuBuilder.dom.js'; -import { drop } from '../util/drop.std.js'; -import type { ContactModalStateType } from '../types/globalModals.std.js'; +} from './conversation/Message.dom.tsx'; +import { MessageTimestamp } from './conversation/MessageTimestamp.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { ReactionPicker } from './conversation/ReactionPicker.dom.tsx'; +import { Tabs } from './Tabs.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import { WidthBreakpoint } from './_util.std.ts'; +import { getAvatarColor } from '../types/Colors.std.ts'; +import { shouldNeverBeCalled } from '../util/shouldNeverBeCalled.std.ts'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import type { EmojiSkinTone } from './fun/data/emojis.std.ts'; +import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.tsx'; +import { FunEmojiPickerButton } from './fun/FunButton.dom.tsx'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; +import { AxoContextMenu } from '../axo/AxoContextMenu.dom.tsx'; +import type { AxoMenuBuilder } from '../axo/AxoMenuBuilder.dom.tsx'; +import { drop } from '../util/drop.std.ts'; +import type { ContactModalStateType } from '../types/globalModals.std.ts'; const { noop, orderBy } = lodash; diff --git a/ts/components/Tabs.dom.tsx b/ts/components/Tabs.dom.tsx index 97bff1e970..be0e2fca0a 100644 --- a/ts/components/Tabs.dom.tsx +++ b/ts/components/Tabs.dom.tsx @@ -4,8 +4,8 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { TabsOptionsType } from '../hooks/useTabs.dom.js'; -import { useTabs } from '../hooks/useTabs.dom.js'; +import type { TabsOptionsType } from '../hooks/useTabs.dom.tsx'; +import { useTabs } from '../hooks/useTabs.dom.tsx'; type PropsType = { children: (renderProps: { selectedTab: string }) => ReactNode; diff --git a/ts/components/TapToViewNotAvailableModal.dom.stories.tsx b/ts/components/TapToViewNotAvailableModal.dom.stories.tsx index 772aed7a76..e1b4e2f3e1 100644 --- a/ts/components/TapToViewNotAvailableModal.dom.stories.tsx +++ b/ts/components/TapToViewNotAvailableModal.dom.stories.tsx @@ -3,12 +3,12 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './TapToViewNotAvailableModal.dom.js'; +import type { PropsType } from './TapToViewNotAvailableModal.dom.tsx'; import { TapToViewNotAvailableModal, TapToViewNotAvailableType, -} from './TapToViewNotAvailableModal.dom.js'; -import type { ComponentMeta } from '../storybook/types.std.js'; +} from './TapToViewNotAvailableModal.dom.tsx'; +import type { ComponentMeta } from '../storybook/types.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/TapToViewNotAvailableModal.dom.tsx b/ts/components/TapToViewNotAvailableModal.dom.tsx index f18a3000e6..2600c4fba4 100644 --- a/ts/components/TapToViewNotAvailableModal.dom.tsx +++ b/ts/components/TapToViewNotAvailableModal.dom.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; export type DataPropsType = { parameters: { diff --git a/ts/components/TerminateGroupFailedModal.dom.stories.tsx b/ts/components/TerminateGroupFailedModal.dom.stories.tsx index eced93a9e6..c3a7a9435f 100644 --- a/ts/components/TerminateGroupFailedModal.dom.stories.tsx +++ b/ts/components/TerminateGroupFailedModal.dom.stories.tsx @@ -5,7 +5,7 @@ import type { Meta, StoryFn } from '@storybook/react'; import React, { type ComponentProps } from 'react'; import { action } from '@storybook/addon-actions'; -import { TerminateGroupFailedModal } from './TerminateGroupFailedModal.dom.js'; +import { TerminateGroupFailedModal } from './TerminateGroupFailedModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/TerminateGroupFailedModal.dom.tsx b/ts/components/TerminateGroupFailedModal.dom.tsx index 1bd04bc2e7..8944543703 100644 --- a/ts/components/TerminateGroupFailedModal.dom.tsx +++ b/ts/components/TerminateGroupFailedModal.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { AxoAlertDialog } from '../axo/AxoAlertDialog.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/TextAttachment.dom.stories.tsx b/ts/components/TextAttachment.dom.stories.tsx index b75c03d04b..945f84bbf1 100644 --- a/ts/components/TextAttachment.dom.stories.tsx +++ b/ts/components/TextAttachment.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import { TextAttachment } from './TextAttachment.dom.js'; -import type { PropsType } from './TextAttachment.dom.js'; +import { TextAttachment } from './TextAttachment.dom.tsx'; +import type { PropsType } from './TextAttachment.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/TextAttachment.dom.tsx b/ts/components/TextAttachment.dom.tsx index 2873378581..3933a0ef5a 100644 --- a/ts/components/TextAttachment.dom.tsx +++ b/ts/components/TextAttachment.dom.tsx @@ -7,23 +7,23 @@ import classNames from 'classnames'; import type { LocalizerType, RenderTextCallbackType, -} from '../types/Util.std.js'; -import type { TextAttachmentType } from '../types/Attachment.std.js'; -import { AddNewLines } from './conversation/AddNewLines.dom.js'; -import { Emojify } from './conversation/Emojify.dom.js'; -import { StoryLinkPreview } from './StoryLinkPreview.dom.js'; -import { TextAttachmentStyleType } from '../types/Attachment.std.js'; -import { count } from '../util/grapheme.std.js'; -import { isValidLink, getSafeDomain } from '../types/LinkPreview.std.js'; -import { getFontNameByTextScript } from '../util/getFontNameByTextScript.std.js'; +} from '../types/Util.std.ts'; +import type { TextAttachmentType } from '../types/Attachment.std.ts'; +import { AddNewLines } from './conversation/AddNewLines.dom.tsx'; +import { Emojify } from './conversation/Emojify.dom.tsx'; +import { StoryLinkPreview } from './StoryLinkPreview.dom.tsx'; +import { TextAttachmentStyleType } from '../types/Attachment.std.ts'; +import { count } from '../util/grapheme.std.ts'; +import { isValidLink, getSafeDomain } from '../types/LinkPreview.std.ts'; +import { getFontNameByTextScript } from '../util/getFontNameByTextScript.std.ts'; import { COLOR_WHITE_INT, getHexFromNumber, getBackgroundColor, -} from '../util/getStoryBackground.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { useRefMerger } from '../hooks/useRefMerger.std.js'; -import { useSizeObserver } from '../hooks/useSizeObserver.dom.js'; +} from '../util/getStoryBackground.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { useRefMerger } from '../hooks/useRefMerger.std.ts'; +import { useSizeObserver } from '../hooks/useSizeObserver.dom.tsx'; const renderNewLines: RenderTextCallbackType = ({ text: textWithNewLines, diff --git a/ts/components/TextStoryCreator.dom.tsx b/ts/components/TextStoryCreator.dom.tsx index fa64b7d754..5c24ac6798 100644 --- a/ts/components/TextStoryCreator.dom.tsx +++ b/ts/components/TextStoryCreator.dom.tsx @@ -5,32 +5,32 @@ import classNames from 'classnames'; import lodash from 'lodash'; import { usePopper } from 'react-popper'; import { FocusScope } from 'react-aria'; -import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.js'; -import { ThemeType, type LocalizerType } from '../types/Util.std.js'; -import type { TextAttachmentType } from '../types/Attachment.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { ContextMenu } from './ContextMenu.dom.js'; -import { LinkPreviewSourceType, findLinks } from '../types/LinkPreview.std.js'; -import type { MaybeGrabLinkPreviewOptionsType } from '../types/LinkPreview.std.js'; -import { Input } from './Input.dom.js'; -import { Slider } from './Slider.dom.js'; -import { StoryLinkPreview } from './StoryLinkPreview.dom.js'; -import { TextAttachment } from './TextAttachment.dom.js'; -import { Theme, themeClassName } from '../util/theme.std.js'; -import { getRGBA, getRGBANumber } from '../mediaEditor/util/color.std.js'; +import type { LinkPreviewForUIType } from '../types/message/LinkPreviews.std.ts'; +import { ThemeType, type LocalizerType } from '../types/Util.std.ts'; +import type { TextAttachmentType } from '../types/Attachment.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { ContextMenu } from './ContextMenu.dom.tsx'; +import { LinkPreviewSourceType, findLinks } from '../types/LinkPreview.std.ts'; +import type { MaybeGrabLinkPreviewOptionsType } from '../types/LinkPreview.std.ts'; +import { Input } from './Input.dom.tsx'; +import { Slider } from './Slider.dom.tsx'; +import { StoryLinkPreview } from './StoryLinkPreview.dom.tsx'; +import { TextAttachment } from './TextAttachment.dom.tsx'; +import { Theme, themeClassName } from '../util/theme.std.ts'; +import { getRGBA, getRGBANumber } from '../mediaEditor/util/color.std.ts'; import { COLOR_BLACK_INT, COLOR_WHITE_INT, getBackgroundColor, -} from '../util/getStoryBackground.std.js'; -import { objectMap } from '../util/objectMap.std.js'; -import { handleOutsideClick } from '../util/handleOutsideClick.dom.js'; -import { Spinner } from './Spinner.dom.js'; -import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.js'; -import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.js'; -import { getEmojiVariantByKey } from './fun/data/emojis.std.js'; -import { FunEmojiPickerButton } from './fun/FunButton.dom.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; +} from '../util/getStoryBackground.std.ts'; +import { objectMap } from '../util/objectMap.std.ts'; +import { handleOutsideClick } from '../util/handleOutsideClick.dom.ts'; +import { Spinner } from './Spinner.dom.tsx'; +import { FunEmojiPicker } from './fun/FunEmojiPicker.dom.tsx'; +import type { FunEmojiSelection } from './fun/panels/FunPanelEmojis.dom.tsx'; +import { getEmojiVariantByKey } from './fun/data/emojis.std.ts'; +import { FunEmojiPickerButton } from './fun/FunButton.dom.tsx'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/Time.dom.tsx b/ts/components/Time.dom.tsx index db5cf1ec29..e729728bb0 100644 --- a/ts/components/Time.dom.tsx +++ b/ts/components/Time.dom.tsx @@ -6,7 +6,7 @@ import type { ReactElement, TimeHTMLAttributes } from 'react'; import moment from 'moment'; import React from 'react'; -import { toBoundedDate } from '../util/timestamp.std.js'; +import { toBoundedDate } from '../util/timestamp.std.ts'; export function Time({ children, diff --git a/ts/components/Toast.dom.stories.tsx b/ts/components/Toast.dom.stories.tsx index 5ab6acfa26..9887ec1f9f 100644 --- a/ts/components/Toast.dom.stories.tsx +++ b/ts/components/Toast.dom.stories.tsx @@ -3,9 +3,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './Toast.dom.js'; -import { Toast } from './Toast.dom.js'; -import { type ComponentMeta, argPresets } from '../storybook/types.std.js'; +import type { PropsType } from './Toast.dom.tsx'; +import { Toast } from './Toast.dom.tsx'; +import { type ComponentMeta, argPresets } from '../storybook/types.std.ts'; export default { title: 'Components/Toast', diff --git a/ts/components/Toast.dom.tsx b/ts/components/Toast.dom.tsx index 2ef4c1457d..9c34db1da6 100644 --- a/ts/components/Toast.dom.tsx +++ b/ts/components/Toast.dom.tsx @@ -4,8 +4,8 @@ import type { KeyboardEvent, MouseEvent, ReactNode } from 'react'; import React, { memo, useEffect } from 'react'; import classNames from 'classnames'; -import { useRestoreFocus } from '../hooks/useRestoreFocus.dom.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; +import { useRestoreFocus } from '../hooks/useRestoreFocus.dom.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; export type PropsType = { autoDismissDisabled?: boolean; diff --git a/ts/components/ToastManager.dom.stories.tsx b/ts/components/ToastManager.dom.stories.tsx index 822009c9a5..77b88b663b 100644 --- a/ts/components/ToastManager.dom.stories.tsx +++ b/ts/components/ToastManager.dom.stories.tsx @@ -5,17 +5,17 @@ import type { Meta, StoryFn } from '@storybook/react'; import React from 'react'; import { action } from '@storybook/addon-actions'; -import { ToastManager } from './ToastManager.dom.js'; -import type { AnyToast } from '../types/Toast.dom.js'; -import { ToastType } from '../types/Toast.dom.js'; +import { ToastManager } from './ToastManager.dom.tsx'; +import type { AnyToast } from '../types/Toast.dom.tsx'; +import { ToastType } from '../types/Toast.dom.tsx'; import type { AnyActionableMegaphone, MegaphoneCtaId, RemoteMegaphoneId, -} from '../types/Megaphone.std.js'; -import { MegaphoneType } from '../types/Megaphone.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import type { PropsType } from './ToastManager.dom.js'; +} from '../types/Megaphone.std.ts'; +import { MegaphoneType } from '../types/Megaphone.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import type { PropsType } from './ToastManager.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/ToastManager.dom.tsx b/ts/components/ToastManager.dom.tsx index f2677b06f4..3fd99c5783 100644 --- a/ts/components/ToastManager.dom.tsx +++ b/ts/components/ToastManager.dom.tsx @@ -5,25 +5,25 @@ import classNames from 'classnames'; import React from 'react'; import { createPortal } from 'react-dom'; -import { SECOND } from '../util/durations/index.std.js'; -import { Toast } from './Toast.dom.js'; -import { WidthBreakpoint } from './_util.std.js'; -import { UsernameMegaphone } from './UsernameMegaphone.dom.js'; -import { assertDev } from '../util/assert.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { MegaphoneType } from '../types/Megaphone.std.js'; -import { NavTab, SettingsPage } from '../types/Nav.std.js'; -import { AxoSymbol } from '../axo/AxoSymbol.dom.js'; -import { tw } from '../axo/tw.dom.js'; +import { SECOND } from '../util/durations/index.std.ts'; +import { Toast } from './Toast.dom.tsx'; +import { WidthBreakpoint } from './_util.std.ts'; +import { UsernameMegaphone } from './UsernameMegaphone.dom.tsx'; +import { assertDev } from '../util/assert.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { MegaphoneType } from '../types/Megaphone.std.ts'; +import { NavTab, SettingsPage } from '../types/Nav.std.ts'; +import { AxoSymbol } from '../axo/AxoSymbol.dom.tsx'; +import { tw } from '../axo/tw.dom.tsx'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { AnyToast } from '../types/Toast.dom.js'; -import type { AnyActionableMegaphone } from '../types/Megaphone.std.js'; -import type { Location } from '../types/Nav.std.js'; -import { I18n } from './I18n.dom.js'; -import { UserText } from './UserText.dom.js'; -import { RemoteMegaphone } from './RemoteMegaphone.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { AnyToast } from '../types/Toast.dom.tsx'; +import type { AnyActionableMegaphone } from '../types/Megaphone.std.ts'; +import type { Location } from '../types/Nav.std.ts'; +import { I18n } from './I18n.dom.tsx'; +import { UserText } from './UserText.dom.tsx'; +import { RemoteMegaphone } from './RemoteMegaphone.dom.tsx'; export type PropsType = { changeLocation: (newLocation: Location) => unknown; diff --git a/ts/components/Tooltip.dom.stories.tsx b/ts/components/Tooltip.dom.stories.tsx index af5557566c..bdfffec3ef 100644 --- a/ts/components/Tooltip.dom.stories.tsx +++ b/ts/components/Tooltip.dom.stories.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './Tooltip.dom.js'; -import { Tooltip, TooltipPlacement } from './Tooltip.dom.js'; -import { Theme } from '../util/theme.std.js'; +import type { PropsType } from './Tooltip.dom.tsx'; +import { Tooltip, TooltipPlacement } from './Tooltip.dom.tsx'; +import { Theme } from '../util/theme.std.ts'; export default { title: 'Components/Tooltip', diff --git a/ts/components/Tooltip.dom.tsx b/ts/components/Tooltip.dom.tsx index c0839a7b1f..b62064626c 100644 --- a/ts/components/Tooltip.dom.tsx +++ b/ts/components/Tooltip.dom.tsx @@ -7,11 +7,11 @@ import lodash from 'lodash'; import { Manager, Reference, Popper } from 'react-popper'; import type { StrictModifiers } from '@popperjs/core'; import { createPortal } from 'react-dom'; -import type { Theme } from '../util/theme.std.js'; -import { themeClassName } from '../util/theme.std.js'; -import { refMerger } from '../util/refMerger.std.js'; -import { offsetDistanceModifier } from '../util/popperUtil.std.js'; -import { getInteractionMode } from '../services/InteractionMode.dom.js'; +import type { Theme } from '../util/theme.std.ts'; +import { themeClassName } from '../util/theme.std.ts'; +import { refMerger } from '../util/refMerger.std.ts'; +import { offsetDistanceModifier } from '../util/popperUtil.std.ts'; +import { getInteractionMode } from '../services/InteractionMode.dom.ts'; const { noop } = lodash; diff --git a/ts/components/UnsupportedOSDialog.dom.stories.tsx b/ts/components/UnsupportedOSDialog.dom.stories.tsx index e09b1713b7..2f7fee1e7f 100644 --- a/ts/components/UnsupportedOSDialog.dom.stories.tsx +++ b/ts/components/UnsupportedOSDialog.dom.stories.tsx @@ -3,11 +3,11 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import { UnsupportedOSDialog } from './UnsupportedOSDialog.dom.js'; -import type { PropsType } from './UnsupportedOSDialog.dom.js'; -import { DAY } from '../util/durations/index.std.js'; -import { WidthBreakpoint } from './_util.std.js'; -import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.js'; +import { UnsupportedOSDialog } from './UnsupportedOSDialog.dom.tsx'; +import type { PropsType } from './UnsupportedOSDialog.dom.tsx'; +import { DAY } from '../util/durations/index.std.ts'; +import { WidthBreakpoint } from './_util.std.ts'; +import { FakeLeftPaneContainer } from '../test-helpers/FakeLeftPaneContainer.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/UnsupportedOSDialog.dom.tsx b/ts/components/UnsupportedOSDialog.dom.tsx index 62e68c90d6..40a2075262 100644 --- a/ts/components/UnsupportedOSDialog.dom.tsx +++ b/ts/components/UnsupportedOSDialog.dom.tsx @@ -4,13 +4,13 @@ import React from 'react'; import moment from 'moment'; -import type { LocalizerType } from '../types/Util.std.js'; -import { UNSUPPORTED_OS_URL } from '../types/support.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import type { WidthBreakpoint } from './_util.std.js'; -import { I18n } from './I18n.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { UNSUPPORTED_OS_URL } from '../types/support.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import type { WidthBreakpoint } from './_util.std.ts'; +import { I18n } from './I18n.dom.tsx'; -import { LeftPaneDialog } from './LeftPaneDialog.dom.js'; +import { LeftPaneDialog } from './LeftPaneDialog.dom.tsx'; export type PropsType = { containerWidthBreakpoint: WidthBreakpoint; diff --git a/ts/components/UserText.dom.tsx b/ts/components/UserText.dom.tsx index 3a49ae6f9c..6cb34a18f0 100644 --- a/ts/components/UserText.dom.tsx +++ b/ts/components/UserText.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useMemo } from 'react'; import type { CSSProperties } from 'react'; -import { Emojify } from './conversation/Emojify.dom.js'; -import { bidiIsolate } from '../util/unicodeBidi.std.js'; +import { Emojify } from './conversation/Emojify.dom.tsx'; +import { bidiIsolate } from '../util/unicodeBidi.std.ts'; export type UserTextProps = Readonly<{ text: string; diff --git a/ts/components/UsernameEditor.dom.stories.tsx b/ts/components/UsernameEditor.dom.stories.tsx index a5238597e0..e69736b846 100644 --- a/ts/components/UsernameEditor.dom.stories.tsx +++ b/ts/components/UsernameEditor.dom.stories.tsx @@ -5,14 +5,14 @@ import React from 'react'; import type { Meta, StoryFn } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import type { UsernameReservationType } from '../types/Username.std.js'; +import type { UsernameReservationType } from '../types/Username.std.ts'; -import type { PropsType } from './UsernameEditor.dom.js'; -import { UsernameEditor } from './UsernameEditor.dom.js'; +import type { PropsType } from './UsernameEditor.dom.tsx'; +import { UsernameEditor } from './UsernameEditor.dom.tsx'; import { UsernameReservationState as State, UsernameReservationError, -} from '../state/ducks/usernameEnums.std.js'; +} from '../state/ducks/usernameEnums.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/UsernameEditor.dom.tsx b/ts/components/UsernameEditor.dom.tsx index 85b51e6961..8cf25daa19 100644 --- a/ts/components/UsernameEditor.dom.tsx +++ b/ts/components/UsernameEditor.dom.tsx @@ -11,29 +11,29 @@ import React, { import classNames from 'classnames'; import lodash from 'lodash'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { UsernameReservationType } from '../types/Username.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { UsernameReservationType } from '../types/Username.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; import { getNickname, getDiscriminator, isCaseChange, -} from '../types/Username.std.js'; +} from '../types/Username.std.ts'; import { UsernameReservationState, UsernameReservationError, -} from '../state/ducks/usernameEnums.std.js'; -import type { ReserveUsernameOptionsType } from '../state/ducks/username.preload.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import { AutoSizeInput } from './AutoSizeInput.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { Input } from './Input.dom.js'; -import { Spinner } from './Spinner.dom.js'; -import { Modal } from './Modal.dom.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; -import { AxoButton } from '../axo/AxoButton.dom.js'; +} from '../state/ducks/usernameEnums.std.ts'; +import type { ReserveUsernameOptionsType } from '../state/ducks/username.preload.ts'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import { AutoSizeInput } from './AutoSizeInput.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { Input } from './Input.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; +import { AxoButton } from '../axo/AxoButton.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/UsernameLinkEditor.dom.stories.tsx b/ts/components/UsernameLinkEditor.dom.stories.tsx index 67ab9dc00a..2507d741ff 100644 --- a/ts/components/UsernameLinkEditor.dom.stories.tsx +++ b/ts/components/UsernameLinkEditor.dom.stories.tsx @@ -5,16 +5,16 @@ import React, { useCallback, useState } from 'react'; import type { Meta, StoryFn } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { UsernameLinkState } from '../state/ducks/usernameEnums.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +import { UsernameLinkState } from '../state/ducks/usernameEnums.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; -import type { PropsType } from './UsernameLinkEditor.dom.js'; +import type { PropsType } from './UsernameLinkEditor.dom.tsx'; import { UsernameLinkEditor, PRINT_WIDTH, PRINT_HEIGHT, -} from './UsernameLinkEditor.dom.js'; -import { Modal } from './Modal.dom.js'; +} from './UsernameLinkEditor.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; const ColorEnum = Proto.AccountRecord.UsernameLink.Color; diff --git a/ts/components/UsernameLinkEditor.dom.tsx b/ts/components/UsernameLinkEditor.dom.tsx index 35a4ebee6e..128ca64057 100644 --- a/ts/components/UsernameLinkEditor.dom.tsx +++ b/ts/components/UsernameLinkEditor.dom.tsx @@ -7,22 +7,22 @@ import classnames from 'classnames'; import { changeDpiBlob } from 'changedpi'; import lodash from 'lodash'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import type { SaveAttachmentActionCreatorType } from '../state/ducks/conversations.preload.js'; -import { UsernameLinkState } from '../state/ducks/usernameEnums.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import type { ShowToastAction } from '../state/ducks/toast.preload.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { IMAGE_PNG } from '../types/MIME.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { drop } from '../util/drop.std.js'; -import { splitText } from '../util/splitText.std.js'; -import { loadImage } from '../util/loadImage.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { ConfirmationDialog } from './ConfirmationDialog.dom.js'; -import { Spinner } from './Spinner.dom.js'; -import { BrandedQRCode } from './BrandedQRCode.dom.js'; -import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import type { SaveAttachmentActionCreatorType } from '../state/ducks/conversations.preload.ts'; +import { UsernameLinkState } from '../state/ducks/usernameEnums.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import type { ShowToastAction } from '../state/ducks/toast.preload.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { IMAGE_PNG } from '../types/MIME.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { splitText } from '../util/splitText.std.ts'; +import { loadImage } from '../util/loadImage.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { ConfirmationDialog } from './ConfirmationDialog.dom.tsx'; +import { Spinner } from './Spinner.dom.tsx'; +import { BrandedQRCode } from './BrandedQRCode.dom.tsx'; +import { useConfirmDiscard } from '../hooks/useConfirmDiscard.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/UsernameMegaphone.dom.stories.tsx b/ts/components/UsernameMegaphone.dom.stories.tsx index 231da0895d..d4b196bd9c 100644 --- a/ts/components/UsernameMegaphone.dom.stories.tsx +++ b/ts/components/UsernameMegaphone.dom.stories.tsx @@ -3,9 +3,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './UsernameMegaphone.dom.js'; -import { UsernameMegaphone } from './UsernameMegaphone.dom.js'; -import { type ComponentMeta } from '../storybook/types.std.js'; +import type { PropsType } from './UsernameMegaphone.dom.tsx'; +import { UsernameMegaphone } from './UsernameMegaphone.dom.tsx'; +import { type ComponentMeta } from '../storybook/types.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/UsernameMegaphone.dom.tsx b/ts/components/UsernameMegaphone.dom.tsx index 2886656572..49cd28a3bb 100644 --- a/ts/components/UsernameMegaphone.dom.tsx +++ b/ts/components/UsernameMegaphone.dom.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import type { UsernameOnboardingActionableMegaphoneType } from '../types/Megaphone.std.js'; -import { Button, ButtonSize, ButtonVariant } from './Button.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import type { UsernameOnboardingActionableMegaphoneType } from '../types/Megaphone.std.ts'; +import { Button, ButtonSize, ButtonVariant } from './Button.dom.tsx'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/UsernameOnboardingModal.dom.stories.tsx b/ts/components/UsernameOnboardingModal.dom.stories.tsx index 0278a3e942..df6427b604 100644 --- a/ts/components/UsernameOnboardingModal.dom.stories.tsx +++ b/ts/components/UsernameOnboardingModal.dom.stories.tsx @@ -5,8 +5,8 @@ import React from 'react'; import type { Meta, StoryFn } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './UsernameOnboardingModal.dom.js'; -import { UsernameOnboardingModal } from './UsernameOnboardingModal.dom.js'; +import type { PropsType } from './UsernameOnboardingModal.dom.tsx'; +import { UsernameOnboardingModal } from './UsernameOnboardingModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/UsernameOnboardingModal.dom.tsx b/ts/components/UsernameOnboardingModal.dom.tsx index f4fb110492..b39f602a84 100644 --- a/ts/components/UsernameOnboardingModal.dom.tsx +++ b/ts/components/UsernameOnboardingModal.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Button, ButtonVariant } from './Button.dom.js'; -import { Modal } from './Modal.dom.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Button, ButtonVariant } from './Button.dom.tsx'; +import { Modal } from './Modal.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/VoiceNotesPlaybackContext.dom.tsx b/ts/components/VoiceNotesPlaybackContext.dom.tsx index ae0ecbddd9..0f5907622c 100644 --- a/ts/components/VoiceNotesPlaybackContext.dom.tsx +++ b/ts/components/VoiceNotesPlaybackContext.dom.tsx @@ -5,8 +5,8 @@ import * as React from 'react'; import PQueue from 'p-queue'; import { LRUCache } from 'lru-cache'; -import type { WaveformCache } from '../types/Audio.dom.js'; -import { createLogger } from '../logging/log.std.js'; +import type { WaveformCache } from '../types/Audio.dom.tsx'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('VoiceNotesPlaybackContext'); diff --git a/ts/components/WarningIdlePrimaryDeviceDialog.dom.tsx b/ts/components/WarningIdlePrimaryDeviceDialog.dom.tsx index b80f3b055c..ae2dfd8eb0 100644 --- a/ts/components/WarningIdlePrimaryDeviceDialog.dom.tsx +++ b/ts/components/WarningIdlePrimaryDeviceDialog.dom.tsx @@ -7,10 +7,10 @@ import { LeftPaneDialog, LeftPaneDialogIcon, LeftPaneDialogIconBackground, -} from './LeftPaneDialog.dom.js'; -import { WidthBreakpoint } from './_util.std.js'; -import type { LocalizerType } from '../types/I18N.std.js'; -import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.js'; +} from './LeftPaneDialog.dom.tsx'; +import { WidthBreakpoint } from './_util.std.ts'; +import type { LocalizerType } from '../types/I18N.std.ts'; +import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser.dom.ts'; export type Props = { containerWidthBreakpoint: WidthBreakpoint; diff --git a/ts/components/WhatsNewLink.dom.tsx b/ts/components/WhatsNewLink.dom.tsx index 89f4c1e4cb..ba2cfb9015 100644 --- a/ts/components/WhatsNewLink.dom.tsx +++ b/ts/components/WhatsNewLink.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import { I18n } from './I18n.dom.js'; +import { I18n } from './I18n.dom.tsx'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/WhatsNewModal.dom.stories.tsx b/ts/components/WhatsNewModal.dom.stories.tsx index 28e88f80ac..9fa97d679d 100644 --- a/ts/components/WhatsNewModal.dom.stories.tsx +++ b/ts/components/WhatsNewModal.dom.stories.tsx @@ -4,8 +4,8 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './WhatsNewModal.dom.js'; -import { WhatsNewModal } from './WhatsNewModal.dom.js'; +import type { PropsType } from './WhatsNewModal.dom.tsx'; +import { WhatsNewModal } from './WhatsNewModal.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/WhatsNewModal.dom.tsx b/ts/components/WhatsNewModal.dom.tsx index 4015d3459b..fde8818b26 100644 --- a/ts/components/WhatsNewModal.dom.tsx +++ b/ts/components/WhatsNewModal.dom.tsx @@ -5,10 +5,10 @@ import type { ReactNode } from 'react'; import React from 'react'; import moment from 'moment'; -import { Modal } from './Modal.dom.js'; -import { I18n } from './I18n.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { tw } from '../axo/tw.dom.js'; +import { Modal } from './Modal.dom.tsx'; +import { I18n } from './I18n.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { tw } from '../axo/tw.dom.tsx'; export type PropsType = { hideWhatsNewModal: () => unknown; diff --git a/ts/components/conversation/About.dom.tsx b/ts/components/conversation/About.dom.tsx index ea9abe0a79..f33a6c2ef5 100644 --- a/ts/components/conversation/About.dom.tsx +++ b/ts/components/conversation/About.dom.tsx @@ -3,7 +3,7 @@ import React from 'react'; -import { Emojify } from './Emojify.dom.js'; +import { Emojify } from './Emojify.dom.tsx'; export type PropsType = { className?: string; diff --git a/ts/components/conversation/AboutContactModal.dom.stories.tsx b/ts/components/conversation/AboutContactModal.dom.stories.tsx index b20a1a0787..8adae03bef 100644 --- a/ts/components/conversation/AboutContactModal.dom.stories.tsx +++ b/ts/components/conversation/AboutContactModal.dom.stories.tsx @@ -3,10 +3,10 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './AboutContactModal.dom.js'; -import { AboutContactModal } from './AboutContactModal.dom.js'; -import { type ComponentMeta } from '../../storybook/types.std.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './AboutContactModal.dom.tsx'; +import { AboutContactModal } from './AboutContactModal.dom.tsx'; +import { type ComponentMeta } from '../../storybook/types.std.ts'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/AboutContactModal.dom.tsx b/ts/components/conversation/AboutContactModal.dom.tsx index 3fff6864c7..09303b5e5f 100644 --- a/ts/components/conversation/AboutContactModal.dom.tsx +++ b/ts/components/conversation/AboutContactModal.dom.tsx @@ -3,26 +3,26 @@ import React, { type ReactNode, useCallback, useMemo } from 'react'; -import { isInSystemContacts } from '../../util/isInSystemContacts.std.js'; -import { Avatar, AvatarBlur, AvatarSize } from '../Avatar.dom.js'; -import { Modal } from '../Modal.dom.js'; -import { UserText } from '../UserText.dom.js'; -import { SharedGroupNames } from '../SharedGroupNames.dom.js'; -import { About } from './About.dom.js'; -import { I18n } from '../I18n.dom.js'; -import { canHaveNicknameAndNote } from '../../util/nicknames.dom.js'; -import { Tooltip, TooltipPlacement } from '../Tooltip.dom.js'; -import { useFunEmojiLocalizer } from '../fun/useFunEmojiLocalizer.dom.js'; +import { isInSystemContacts } from '../../util/isInSystemContacts.std.ts'; +import { Avatar, AvatarBlur, AvatarSize } from '../Avatar.dom.tsx'; +import { Modal } from '../Modal.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; +import { SharedGroupNames } from '../SharedGroupNames.dom.tsx'; +import { About } from './About.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import { canHaveNicknameAndNote } from '../../util/nicknames.dom.ts'; +import { Tooltip, TooltipPlacement } from '../Tooltip.dom.tsx'; +import { useFunEmojiLocalizer } from '../fun/useFunEmojiLocalizer.dom.tsx'; import { getEmojiVariantByKey, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from '../fun/data/emojis.std.js'; -import { FunStaticEmoji } from '../fun/FunEmoji.dom.js'; -import { missingEmojiPlaceholder } from '../../types/GroupMemberLabels.std.js'; +} from '../fun/data/emojis.std.ts'; +import { FunStaticEmoji } from '../fun/FunEmoji.dom.tsx'; +import { missingEmojiPlaceholder } from '../../types/GroupMemberLabels.std.ts'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; function muted(parts: Array) { return ( diff --git a/ts/components/conversation/AddNewLines.dom.stories.tsx b/ts/components/conversation/AddNewLines.dom.stories.tsx index 87e4091ef6..c9c2dd0a43 100644 --- a/ts/components/conversation/AddNewLines.dom.stories.tsx +++ b/ts/components/conversation/AddNewLines.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './AddNewLines.dom.js'; -import { AddNewLines } from './AddNewLines.dom.js'; +import type { Props } from './AddNewLines.dom.tsx'; +import { AddNewLines } from './AddNewLines.dom.tsx'; export default { title: 'Components/Conversation/AddNewLines', diff --git a/ts/components/conversation/AddNewLines.dom.tsx b/ts/components/conversation/AddNewLines.dom.tsx index 3579269f2b..a68493718c 100644 --- a/ts/components/conversation/AddNewLines.dom.tsx +++ b/ts/components/conversation/AddNewLines.dom.tsx @@ -3,7 +3,7 @@ import React from 'react'; -import type { RenderTextCallbackType } from '../../types/Util.std.js'; +import type { RenderTextCallbackType } from '../../types/Util.std.ts'; export type Props = { text: string; diff --git a/ts/components/conversation/AtMention.dom.tsx b/ts/components/conversation/AtMention.dom.tsx index 231e144dbe..2d633d5e63 100644 --- a/ts/components/conversation/AtMention.dom.tsx +++ b/ts/components/conversation/AtMention.dom.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames'; import type { KeyboardEventHandler } from 'react'; import React from 'react'; -import { Emojify } from './Emojify.dom.js'; +import { Emojify } from './Emojify.dom.tsx'; export function AtMention({ direction, diff --git a/ts/components/conversation/AtMentionify.dom.stories.tsx b/ts/components/conversation/AtMentionify.dom.stories.tsx index 0760c320cf..6e617dc4f0 100644 --- a/ts/components/conversation/AtMentionify.dom.stories.tsx +++ b/ts/components/conversation/AtMentionify.dom.stories.tsx @@ -4,9 +4,9 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { generateAci } from '../../types/ServiceId.std.js'; -import type { Props } from './AtMentionify.dom.js'; -import { AtMentionify } from './AtMentionify.dom.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import type { Props } from './AtMentionify.dom.tsx'; +import { AtMentionify } from './AtMentionify.dom.tsx'; const SERVICE_ID_1 = generateAci(); const SERVICE_ID_2 = generateAci(); diff --git a/ts/components/conversation/AtMentionify.dom.tsx b/ts/components/conversation/AtMentionify.dom.tsx index 95c0887ce2..ea2f59b090 100644 --- a/ts/components/conversation/AtMentionify.dom.tsx +++ b/ts/components/conversation/AtMentionify.dom.tsx @@ -6,8 +6,8 @@ import lodash from 'lodash'; import type { HydratedBodyRangeMention, BodyRange, -} from '../../types/BodyRange.std.js'; -import { AtMention } from './AtMention.dom.js'; +} from '../../types/BodyRange.std.ts'; +import { AtMention } from './AtMention.dom.tsx'; const { sortBy } = lodash; diff --git a/ts/components/conversation/AttachmentDetailPill.dom.stories.tsx b/ts/components/conversation/AttachmentDetailPill.dom.stories.tsx index 5957eeaaea..e3ff79c05f 100644 --- a/ts/components/conversation/AttachmentDetailPill.dom.stories.tsx +++ b/ts/components/conversation/AttachmentDetailPill.dom.stories.tsx @@ -6,9 +6,9 @@ import { action } from '@storybook/addon-actions'; import { type PropsType, AttachmentDetailPill, -} from './AttachmentDetailPill.dom.js'; -import { type ComponentMeta } from '../../storybook/types.std.js'; -import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js'; +} from './AttachmentDetailPill.dom.tsx'; +import { type ComponentMeta } from '../../storybook/types.std.ts'; +import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/AttachmentDetailPill.dom.tsx b/ts/components/conversation/AttachmentDetailPill.dom.tsx index 8f3b06a49a..f65fd8d0c9 100644 --- a/ts/components/conversation/AttachmentDetailPill.dom.tsx +++ b/ts/components/conversation/AttachmentDetailPill.dom.tsx @@ -4,12 +4,12 @@ import React from 'react'; import classNames from 'classnames'; -import { formatFileSize } from '../../util/formatFileSize.std.js'; -import { SpinnerV2 } from '../SpinnerV2.dom.js'; +import { formatFileSize } from '../../util/formatFileSize.std.ts'; +import { SpinnerV2 } from '../SpinnerV2.dom.tsx'; -import type { AttachmentForUIType } from '../../types/Attachment.std.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import { isKeyboardActivation } from '../../hooks/useKeyboardShortcuts.dom.js'; +import type { AttachmentForUIType } from '../../types/Attachment.std.ts'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import { isKeyboardActivation } from '../../hooks/useKeyboardShortcuts.dom.tsx'; export type PropsType = { attachments: ReadonlyArray; diff --git a/ts/components/conversation/AttachmentList.dom.stories.tsx b/ts/components/conversation/AttachmentList.dom.stories.tsx index b890e8a0fb..f15b401acc 100644 --- a/ts/components/conversation/AttachmentList.dom.stories.tsx +++ b/ts/components/conversation/AttachmentList.dom.stories.tsx @@ -7,17 +7,17 @@ import type { Meta } from '@storybook/react'; import type { AttachmentDraftType, AttachmentForUIType, -} from '../../types/Attachment.std.js'; -import type { Props } from './AttachmentList.dom.js'; -import { AttachmentList } from './AttachmentList.dom.js'; +} from '../../types/Attachment.std.ts'; +import type { Props } from './AttachmentList.dom.tsx'; +import { AttachmentList } from './AttachmentList.dom.tsx'; import { AUDIO_MP3, IMAGE_GIF, IMAGE_JPEG, VIDEO_MP4, stringToMIMEType, -} from '../../types/MIME.std.js'; -import { fakeDraftAttachment } from '../../test-helpers/fakeAttachment.std.js'; +} from '../../types/MIME.std.ts'; +import { fakeDraftAttachment } from '../../test-helpers/fakeAttachment.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/AttachmentList.dom.tsx b/ts/components/conversation/AttachmentList.dom.tsx index e68163603f..8a79c3b7a0 100644 --- a/ts/components/conversation/AttachmentList.dom.tsx +++ b/ts/components/conversation/AttachmentList.dom.tsx @@ -3,20 +3,20 @@ import React, { useMemo } from 'react'; -import { CurveType, Image } from './Image.dom.js'; -import { StagedGenericAttachment } from './StagedGenericAttachment.dom.js'; -import { StagedPlaceholderAttachment } from './StagedPlaceholderAttachment.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import { CurveType, Image } from './Image.dom.tsx'; +import { StagedGenericAttachment } from './StagedGenericAttachment.dom.tsx'; +import { StagedPlaceholderAttachment } from './StagedPlaceholderAttachment.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; import type { AttachmentForUIType, AttachmentDraftType, -} from '../../types/Attachment.std.js'; +} from '../../types/Attachment.std.ts'; import { areAllAttachmentsVisual, canDisplayImage, isImageAttachment, isVideoAttachment, -} from '../../util/Attachment.std.js'; +} from '../../util/Attachment.std.ts'; export type Props = Readonly<{ diff --git a/ts/components/conversation/AttachmentStatusIcon.dom.stories.tsx b/ts/components/conversation/AttachmentStatusIcon.dom.stories.tsx index 45d34c64f0..4b5ad3d86a 100644 --- a/ts/components/conversation/AttachmentStatusIcon.dom.stories.tsx +++ b/ts/components/conversation/AttachmentStatusIcon.dom.stories.tsx @@ -3,9 +3,9 @@ import React, { useCallback, useRef, useState } from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './AttachmentStatusIcon.dom.js'; -import { AttachmentStatusIcon } from './AttachmentStatusIcon.dom.js'; -import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js'; +import type { PropsType } from './AttachmentStatusIcon.dom.tsx'; +import { AttachmentStatusIcon } from './AttachmentStatusIcon.dom.tsx'; +import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts'; export default { title: 'Components/Conversation/AttachmentStatusIcon', diff --git a/ts/components/conversation/AttachmentStatusIcon.dom.tsx b/ts/components/conversation/AttachmentStatusIcon.dom.tsx index d1600f8b77..f9be171cdb 100644 --- a/ts/components/conversation/AttachmentStatusIcon.dom.tsx +++ b/ts/components/conversation/AttachmentStatusIcon.dom.tsx @@ -4,11 +4,11 @@ import React, { type ReactNode } from 'react'; import classNames from 'classnames'; -import { SpinnerV2 } from '../SpinnerV2.dom.js'; +import { SpinnerV2 } from '../SpinnerV2.dom.tsx'; -import type { AttachmentForUIType } from '../../types/Attachment.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { useAttachmentStatus } from '../../hooks/useAttachmentStatus.std.js'; +import type { AttachmentForUIType } from '../../types/Attachment.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { useAttachmentStatus } from '../../hooks/useAttachmentStatus.std.ts'; export type PropsType = { attachment: AttachmentForUIType; diff --git a/ts/components/conversation/AudioCapture.dom.tsx b/ts/components/conversation/AudioCapture.dom.tsx index 446d3d4b46..9b666be43b 100644 --- a/ts/components/conversation/AudioCapture.dom.tsx +++ b/ts/components/conversation/AudioCapture.dom.tsx @@ -3,14 +3,14 @@ import React, { useCallback } from 'react'; -import type { ShowToastAction } from '../../state/ducks/toast.preload.js'; -import type { AttachmentDraftType } from '../../types/Attachment.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { ToastType } from '../../types/Toast.dom.js'; +import type { ShowToastAction } from '../../state/ducks/toast.preload.ts'; +import type { AttachmentDraftType } from '../../types/Attachment.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; import { useStartRecordingShortcut, useKeyboardShortcuts, -} from '../../hooks/useKeyboardShortcuts.dom.js'; +} from '../../hooks/useKeyboardShortcuts.dom.tsx'; export type PropsType = { conversationId: string; diff --git a/ts/components/conversation/CallingNotification.dom.stories.tsx b/ts/components/conversation/CallingNotification.dom.stories.tsx index ce84c263d8..28407811ab 100644 --- a/ts/components/conversation/CallingNotification.dom.stories.tsx +++ b/ts/components/conversation/CallingNotification.dom.stories.tsx @@ -10,18 +10,18 @@ import { CallDirection, GroupCallStatus, DirectCallStatus, -} from '../../types/CallDisposition.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import { CallingNotification, type PropsType, -} from './CallingNotification.dom.js'; +} from './CallingNotification.dom.tsx'; import { getDefaultConversation, getDefaultGroup, -} from '../../test-helpers/getDefaultConversation.std.js'; -import type { CallStatus } from '../../types/CallDisposition.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; +} from '../../test-helpers/getDefaultConversation.std.ts'; +import type { CallStatus } from '../../types/CallDisposition.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/CallingNotification.dom.tsx b/ts/components/conversation/CallingNotification.dom.tsx index 805fc38a5a..79274f695e 100644 --- a/ts/components/conversation/CallingNotification.dom.tsx +++ b/ts/components/conversation/CallingNotification.dom.tsx @@ -5,30 +5,30 @@ import type { ReactNode } from 'react'; import React from 'react'; import lodash from 'lodash'; -import { SystemMessage, SystemMessageKind } from './SystemMessage.dom.js'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import { MessageTimestamp } from './MessageTimestamp.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import { SystemMessage, SystemMessageKind } from './SystemMessage.dom.tsx'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import { MessageTimestamp } from './MessageTimestamp.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; import { CallMode, CallDirection, CallType, DirectCallStatus, GroupCallStatus, -} from '../../types/CallDisposition.std.js'; -import type { CallingNotificationType } from '../../util/callingNotification.std.js'; +} from '../../types/CallDisposition.std.ts'; +import type { CallingNotificationType } from '../../util/callingNotification.std.ts'; import { getCallingIcon, getCallingNotificationText, -} from '../../util/callingNotification.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { Tooltip, TooltipPlacement } from '../Tooltip.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import { MessageContextMenu } from './MessageContextMenu.dom.js'; -import type { DeleteMessagesPropsType } from '../../state/ducks/globalModals.preload.js'; -import { MINUTE } from '../../util/durations/index.std.js'; -import { isMoreRecentThan } from '../../util/timestamp.std.js'; -import { InAnotherCallTooltip } from './InAnotherCallTooltip.dom.js'; +} from '../../util/callingNotification.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { Tooltip, TooltipPlacement } from '../Tooltip.dom.tsx'; +import { createLogger } from '../../logging/log.std.ts'; +import { MessageContextMenu } from './MessageContextMenu.dom.tsx'; +import type { DeleteMessagesPropsType } from '../../state/ducks/globalModals.preload.ts'; +import { MINUTE } from '../../util/durations/index.std.ts'; +import { isMoreRecentThan } from '../../util/timestamp.std.ts'; +import { InAnotherCallTooltip } from './InAnotherCallTooltip.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/conversation/ChangeNumberNotification.dom.stories.tsx b/ts/components/conversation/ChangeNumberNotification.dom.stories.tsx index e1ab8f7dbd..f3fffd82d0 100644 --- a/ts/components/conversation/ChangeNumberNotification.dom.stories.tsx +++ b/ts/components/conversation/ChangeNumberNotification.dom.stories.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import type { Props } from './ChangeNumberNotification.dom.js'; -import { ChangeNumberNotification } from './ChangeNumberNotification.dom.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import type { Props } from './ChangeNumberNotification.dom.tsx'; +import { ChangeNumberNotification } from './ChangeNumberNotification.dom.tsx'; export default { title: 'Components/Conversation/ChangeNumberNotification', diff --git a/ts/components/conversation/ChangeNumberNotification.dom.tsx b/ts/components/conversation/ChangeNumberNotification.dom.tsx index 065a6160a9..cd7ac36455 100644 --- a/ts/components/conversation/ChangeNumberNotification.dom.tsx +++ b/ts/components/conversation/ChangeNumberNotification.dom.tsx @@ -3,13 +3,13 @@ import React from 'react'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { I18n } from '../I18n.dom.js'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { I18n } from '../I18n.dom.tsx'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { MessageTimestamp } from './MessageTimestamp.dom.js'; -import { UserText } from '../UserText.dom.js'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { MessageTimestamp } from './MessageTimestamp.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; export type PropsData = { sender: ConversationType; diff --git a/ts/components/conversation/ChatSessionRefreshedDialog.dom.stories.tsx b/ts/components/conversation/ChatSessionRefreshedDialog.dom.stories.tsx index 8793d4417d..4b28054218 100644 --- a/ts/components/conversation/ChatSessionRefreshedDialog.dom.stories.tsx +++ b/ts/components/conversation/ChatSessionRefreshedDialog.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ChatSessionRefreshedDialog.dom.js'; -import { ChatSessionRefreshedDialog } from './ChatSessionRefreshedDialog.dom.js'; +import type { PropsType } from './ChatSessionRefreshedDialog.dom.tsx'; +import { ChatSessionRefreshedDialog } from './ChatSessionRefreshedDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ChatSessionRefreshedDialog.dom.tsx b/ts/components/conversation/ChatSessionRefreshedDialog.dom.tsx index 2dc98317c0..2a25c10791 100644 --- a/ts/components/conversation/ChatSessionRefreshedDialog.dom.tsx +++ b/ts/components/conversation/ChatSessionRefreshedDialog.dom.tsx @@ -3,12 +3,12 @@ import * as React from 'react'; -import { Modal } from '../Modal.dom.js'; +import { Modal } from '../Modal.dom.tsx'; -import { useRestoreFocus } from '../../hooks/useRestoreFocus.dom.js'; +import { useRestoreFocus } from '../../hooks/useRestoreFocus.dom.ts'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/conversation/ChatSessionRefreshedNotification.dom.stories.tsx b/ts/components/conversation/ChatSessionRefreshedNotification.dom.stories.tsx index 9d7b74f62b..a00eedffa9 100644 --- a/ts/components/conversation/ChatSessionRefreshedNotification.dom.stories.tsx +++ b/ts/components/conversation/ChatSessionRefreshedNotification.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ChatSessionRefreshedNotification.dom.js'; -import { ChatSessionRefreshedNotification } from './ChatSessionRefreshedNotification.dom.js'; +import type { PropsType } from './ChatSessionRefreshedNotification.dom.tsx'; +import { ChatSessionRefreshedNotification } from './ChatSessionRefreshedNotification.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ChatSessionRefreshedNotification.dom.tsx b/ts/components/conversation/ChatSessionRefreshedNotification.dom.tsx index 8f88bed000..56a0ecb13f 100644 --- a/ts/components/conversation/ChatSessionRefreshedNotification.dom.tsx +++ b/ts/components/conversation/ChatSessionRefreshedNotification.dom.tsx @@ -4,12 +4,12 @@ import type { ReactElement } from 'react'; import React, { useCallback, useState } from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { ChatSessionRefreshedDialog } from './ChatSessionRefreshedDialog.dom.js'; -import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.js'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { ChatSessionRefreshedDialog } from './ChatSessionRefreshedDialog.dom.tsx'; +import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.ts'; type PropsHousekeepingType = { i18n: LocalizerType; diff --git a/ts/components/conversation/CollapseSet.dom.stories.tsx b/ts/components/conversation/CollapseSet.dom.stories.tsx index 09d5ec504e..8b1368ffd0 100644 --- a/ts/components/conversation/CollapseSet.dom.stories.tsx +++ b/ts/components/conversation/CollapseSet.dom.stories.tsx @@ -5,13 +5,13 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.js'; -import { WidthBreakpoint } from '../_util.std.js'; -import { tw } from '../../axo/tw.dom.js'; -import { CollapseSetViewer } from './CollapseSet.dom.js'; +import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.ts'; +import { WidthBreakpoint } from '../_util.std.ts'; +import { tw } from '../../axo/tw.dom.tsx'; +import { CollapseSetViewer } from './CollapseSet.dom.tsx'; -import type { Props } from './CollapseSet.dom.js'; -import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.js'; +import type { Props } from './CollapseSet.dom.tsx'; +import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/CollapseSet.dom.tsx b/ts/components/conversation/CollapseSet.dom.tsx index e089ad679a..482f73c9b9 100644 --- a/ts/components/conversation/CollapseSet.dom.tsx +++ b/ts/components/conversation/CollapseSet.dom.tsx @@ -6,25 +6,25 @@ import classNames from 'classnames'; import type { RefObject } from 'react'; -import { MessageInteractivity } from './Message.dom.js'; -import { format } from '../../util/expirationTimer.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { AxoSymbol } from '../../axo/AxoSymbol.dom.js'; -import { tw } from '../../axo/tw.dom.js'; -import { AxoButton } from '../../axo/AxoButton.dom.js'; -import { MessageContextMenu } from './MessageContextMenu.dom.js'; +import { MessageInteractivity } from './Message.dom.tsx'; +import { format } from '../../util/expirationTimer.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { AxoSymbol } from '../../axo/AxoSymbol.dom.tsx'; +import { tw } from '../../axo/tw.dom.tsx'; +import { AxoButton } from '../../axo/AxoButton.dom.tsx'; +import { MessageContextMenu } from './MessageContextMenu.dom.tsx'; -import type { WidthBreakpoint } from '../_util.std.js'; +import type { WidthBreakpoint } from '../_util.std.ts'; import type { CollapsedMessage, CollapseSet, -} from '../../util/CollapseSet.std.js'; -import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import type { TargetedMessageType } from '../../state/selectors/conversations.dom.js'; -import type { DeleteMessagesPropsType } from '../../state/ducks/globalModals.preload.js'; -import { I18n } from '../I18n.dom.js'; +} from '../../util/CollapseSet.std.ts'; +import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.tsx'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import type { TargetedMessageType } from '../../state/selectors/conversations.dom.ts'; +import type { DeleteMessagesPropsType } from '../../state/ducks/globalModals.preload.ts'; +import { I18n } from '../I18n.dom.tsx'; export type Props = CollapseSet & { containerElementRef: RefObject; diff --git a/ts/components/conversation/ContactDetail.dom.stories.tsx b/ts/components/conversation/ContactDetail.dom.stories.tsx index d4ecdad1f0..a4819243df 100644 --- a/ts/components/conversation/ContactDetail.dom.stories.tsx +++ b/ts/components/conversation/ContactDetail.dom.stories.tsx @@ -4,14 +4,14 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './ContactDetail.dom.js'; -import { ContactDetail } from './ContactDetail.dom.js'; +import type { Props } from './ContactDetail.dom.tsx'; +import { ContactDetail } from './ContactDetail.dom.tsx'; import { AddressType, ContactFormType, -} from '../../types/EmbeddedContact.std.js'; -import { IMAGE_GIF } from '../../types/MIME.std.js'; -import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js'; +} from '../../types/EmbeddedContact.std.ts'; +import { IMAGE_GIF } from '../../types/MIME.std.ts'; +import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ContactDetail.dom.tsx b/ts/components/conversation/ContactDetail.dom.tsx index 2c0e15cf0f..1a3d0b3276 100644 --- a/ts/components/conversation/ContactDetail.dom.tsx +++ b/ts/components/conversation/ContactDetail.dom.tsx @@ -9,21 +9,21 @@ import type { ReadonlyDeep } from 'type-fest'; import { AddressType, ContactFormType, -} from '../../types/EmbeddedContact.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; +} from '../../types/EmbeddedContact.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; import { renderAvatar, renderContactShorthand, renderName, -} from './contactUtil.dom.js'; +} from './contactUtil.dom.tsx'; import type { EmbeddedContactForUIType, Email, Phone, PostalAddress, -} from '../../types/EmbeddedContact.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +} from '../../types/EmbeddedContact.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; export type Props = { cancelAttachmentDownload: (options: { messageId: string }) => void; diff --git a/ts/components/conversation/ContactModal.dom.stories.tsx b/ts/components/conversation/ContactModal.dom.stories.tsx index 2a5f2bda86..cb63a37166 100644 --- a/ts/components/conversation/ContactModal.dom.stories.tsx +++ b/ts/components/conversation/ContactModal.dom.stories.tsx @@ -5,14 +5,14 @@ import type { Meta, StoryFn } from '@storybook/react'; import * as React from 'react'; import casual from 'casual'; import { action } from '@storybook/addon-actions'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { PropsType } from './ContactModal.dom.js'; -import { ContactModal } from './ContactModal.dom.js'; -import { HasStories } from '../../types/Stories.std.js'; -import { ThemeType } from '../../types/Util.std.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { getFakeBadges } from '../../test-helpers/getFakeBadge.std.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { PropsType } from './ContactModal.dom.tsx'; +import { ContactModal } from './ContactModal.dom.tsx'; +import { HasStories } from '../../types/Stories.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { getFakeBadges } from '../../test-helpers/getFakeBadge.std.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; const ACCESS_ENUM = Proto.AccessControl.AccessRequired; diff --git a/ts/components/conversation/ContactModal.dom.tsx b/ts/components/conversation/ContactModal.dom.tsx index 35b4f9f2a7..4b8abfb70a 100644 --- a/ts/components/conversation/ContactModal.dom.tsx +++ b/ts/components/conversation/ContactModal.dom.tsx @@ -7,39 +7,39 @@ import type { ReactNode } from 'react'; import type { ConversationType, ShowConversationType, -} from '../../state/ducks/conversations.preload.js'; -import type { BadgeType } from '../../badges/types.std.js'; -import type { HasStories } from '../../types/Stories.std.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { ViewUserStoriesActionCreatorType } from '../../state/ducks/stories.preload.js'; -import { StoryViewModeType } from '../../types/Stories.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { Avatar, AvatarBlur, AvatarSize } from '../Avatar.dom.js'; -import { AvatarLightbox } from '../AvatarLightbox.dom.js'; -import { BadgeDialog } from '../BadgeDialog.dom.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { Modal } from '../Modal.dom.js'; -import { RemoveGroupMemberConfirmationDialog } from './RemoveGroupMemberConfirmationDialog.dom.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { UserText } from '../UserText.dom.js'; -import { Button, ButtonIconType, ButtonVariant } from '../Button.dom.js'; -import { isInSystemContacts } from '../../util/isInSystemContacts.std.js'; -import { InContactsIcon } from '../InContactsIcon.dom.js'; -import { canHaveNicknameAndNote } from '../../util/nicknames.dom.js'; -import { getThemeByThemeType } from '../../util/theme.std.js'; +} from '../../state/ducks/conversations.preload.ts'; +import type { BadgeType } from '../../badges/types.std.ts'; +import type { HasStories } from '../../types/Stories.std.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { ViewUserStoriesActionCreatorType } from '../../state/ducks/stories.preload.ts'; +import { StoryViewModeType } from '../../types/Stories.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { Avatar, AvatarBlur, AvatarSize } from '../Avatar.dom.tsx'; +import { AvatarLightbox } from '../AvatarLightbox.dom.tsx'; +import { BadgeDialog } from '../BadgeDialog.dom.tsx'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { Modal } from '../Modal.dom.tsx'; +import { RemoveGroupMemberConfirmationDialog } from './RemoveGroupMemberConfirmationDialog.dom.tsx'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { UserText } from '../UserText.dom.tsx'; +import { Button, ButtonIconType, ButtonVariant } from '../Button.dom.tsx'; +import { isInSystemContacts } from '../../util/isInSystemContacts.std.ts'; +import { InContactsIcon } from '../InContactsIcon.dom.tsx'; +import { canHaveNicknameAndNote } from '../../util/nicknames.dom.ts'; +import { getThemeByThemeType } from '../../util/theme.std.ts'; import { InAnotherCallTooltip, getTooltipContent, -} from './InAnotherCallTooltip.dom.js'; -import type { ToggleGroupMemberLabelInfoModalType } from '../../state/ducks/globalModals.preload.js'; -import type { ContactModalStateType } from '../../types/globalModals.std.js'; -import { GroupMemberLabel } from './ContactName.dom.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; -import { AxoSymbol } from '../../axo/AxoSymbol.dom.js'; -import { tw } from '../../axo/tw.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { RemoveClientType } from '../../types/Calling.std.js'; -import type { ContactNameColorType } from '../../types/Colors.std.js'; +} from './InAnotherCallTooltip.dom.tsx'; +import type { ToggleGroupMemberLabelInfoModalType } from '../../state/ducks/globalModals.preload.ts'; +import type { ContactModalStateType } from '../../types/globalModals.std.ts'; +import { GroupMemberLabel } from './ContactName.dom.tsx'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; +import { AxoSymbol } from '../../axo/AxoSymbol.dom.tsx'; +import { tw } from '../../axo/tw.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { RemoveClientType } from '../../types/Calling.std.ts'; +import type { ContactNameColorType } from '../../types/Colors.std.ts'; const ACCESS_ENUM = Proto.AccessControl.AccessRequired; diff --git a/ts/components/conversation/ContactName.dom.stories.tsx b/ts/components/conversation/ContactName.dom.stories.tsx index aad2aed64f..74cdea7f5a 100644 --- a/ts/components/conversation/ContactName.dom.stories.tsx +++ b/ts/components/conversation/ContactName.dom.stories.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ContactName.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { ContactNameColors } from '../../types/Colors.std.js'; +import type { PropsType } from './ContactName.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { ContactNameColors } from '../../types/Colors.std.ts'; export default { title: 'Components/Conversation/ContactName', diff --git a/ts/components/conversation/ContactName.dom.tsx b/ts/components/conversation/ContactName.dom.tsx index 8b07f8fd84..f1baff834f 100644 --- a/ts/components/conversation/ContactName.dom.tsx +++ b/ts/components/conversation/ContactName.dom.tsx @@ -6,22 +6,22 @@ import classNames from 'classnames'; import type { ReactNode } from 'react'; -import { getClassNamesFor } from '../../util/getClassNamesFor.std.js'; -import { isSignalConversation as getIsSignalConversation } from '../../util/isSignalConversation.dom.js'; +import { getClassNamesFor } from '../../util/getClassNamesFor.std.ts'; +import { isSignalConversation as getIsSignalConversation } from '../../util/isSignalConversation.dom.ts'; import { getEmojiVariantByKey, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from '../fun/data/emojis.std.js'; -import { useFunEmojiLocalizer } from '../fun/useFunEmojiLocalizer.dom.js'; -import { FunStaticEmoji } from '../fun/FunEmoji.dom.js'; -import { missingEmojiPlaceholder } from '../../types/GroupMemberLabels.std.js'; +} from '../fun/data/emojis.std.ts'; +import { useFunEmojiLocalizer } from '../fun/useFunEmojiLocalizer.dom.tsx'; +import { FunStaticEmoji } from '../fun/FunEmoji.dom.tsx'; +import { missingEmojiPlaceholder } from '../../types/GroupMemberLabels.std.ts'; -import type { MemberLabelType } from '../../types/GroupMemberLabels.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { ContactNameColorType } from '../../types/Colors.std.js'; -import type { FunStaticEmojiSize } from '../fun/FunEmoji.dom.js'; -import { UserText } from '../UserText.dom.js'; +import type { MemberLabelType } from '../../types/GroupMemberLabels.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { ContactNameColorType } from '../../types/Colors.std.ts'; +import type { FunStaticEmojiSize } from '../fun/FunEmoji.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; export type ContactNameData = { contactNameColor?: ContactNameColorType; diff --git a/ts/components/conversation/ContactSpoofingReviewDialog.dom.stories.tsx b/ts/components/conversation/ContactSpoofingReviewDialog.dom.stories.tsx index 3377575eee..e6d4ac7596 100644 --- a/ts/components/conversation/ContactSpoofingReviewDialog.dom.stories.tsx +++ b/ts/components/conversation/ContactSpoofingReviewDialog.dom.stories.tsx @@ -5,11 +5,11 @@ import React from 'react'; import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import type { PropsType } from './ContactSpoofingReviewDialog.dom.js'; -import { ContactSpoofingReviewDialog } from './ContactSpoofingReviewDialog.dom.js'; -import { ContactSpoofingType } from '../../util/contactSpoofing.std.js'; -import { ThemeType } from '../../types/Util.std.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import type { PropsType } from './ContactSpoofingReviewDialog.dom.tsx'; +import { ContactSpoofingReviewDialog } from './ContactSpoofingReviewDialog.dom.tsx'; +import { ContactSpoofingType } from '../../util/contactSpoofing.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; const { times } = lodash; diff --git a/ts/components/conversation/ContactSpoofingReviewDialog.dom.tsx b/ts/components/conversation/ContactSpoofingReviewDialog.dom.tsx index 851ce21bba..513fbfcada 100644 --- a/ts/components/conversation/ContactSpoofingReviewDialog.dom.tsx +++ b/ts/components/conversation/ContactSpoofingReviewDialog.dom.tsx @@ -4,23 +4,23 @@ import type { ReactNode } from 'react'; import React, { useState } from 'react'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; import { MessageRequestActionsConfirmation, MessageRequestState, -} from './MessageRequestActionsConfirmation.dom.js'; -import { ContactSpoofingType } from '../../util/contactSpoofing.std.js'; +} from './MessageRequestActionsConfirmation.dom.tsx'; +import { ContactSpoofingType } from '../../util/contactSpoofing.std.ts'; -import { Modal } from '../Modal.dom.js'; -import { RemoveGroupMemberConfirmationDialog } from './RemoveGroupMemberConfirmationDialog.dom.js'; -import { ContactSpoofingReviewDialogPerson } from './ContactSpoofingReviewDialogPerson.dom.js'; -import { Button, ButtonVariant } from '../Button.dom.js'; -import { assertDev } from '../../util/assert.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { isInSystemContacts } from '../../util/isInSystemContacts.std.js'; -import type { ContactModalStateType } from '../../types/globalModals.std.js'; +import { Modal } from '../Modal.dom.tsx'; +import { RemoveGroupMemberConfirmationDialog } from './RemoveGroupMemberConfirmationDialog.dom.tsx'; +import { ContactSpoofingReviewDialogPerson } from './ContactSpoofingReviewDialogPerson.dom.tsx'; +import { Button, ButtonVariant } from '../Button.dom.tsx'; +import { assertDev } from '../../util/assert.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { isInSystemContacts } from '../../util/isInSystemContacts.std.ts'; +import type { ContactModalStateType } from '../../types/globalModals.std.ts'; export type ReviewPropsType = Readonly< | { diff --git a/ts/components/conversation/ContactSpoofingReviewDialogPerson.dom.stories.tsx b/ts/components/conversation/ContactSpoofingReviewDialogPerson.dom.stories.tsx index 3ede297f4d..f0e1261d14 100644 --- a/ts/components/conversation/ContactSpoofingReviewDialogPerson.dom.stories.tsx +++ b/ts/components/conversation/ContactSpoofingReviewDialogPerson.dom.stories.tsx @@ -5,11 +5,11 @@ import React from 'react'; import type { Meta, StoryFn } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { ThemeType } from '../../types/Util.std.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; +import { ThemeType } from '../../types/Util.std.ts'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; -import type { PropsType } from './ContactSpoofingReviewDialogPerson.dom.js'; -import { ContactSpoofingReviewDialogPerson } from './ContactSpoofingReviewDialogPerson.dom.js'; +import type { PropsType } from './ContactSpoofingReviewDialogPerson.dom.tsx'; +import { ContactSpoofingReviewDialogPerson } from './ContactSpoofingReviewDialogPerson.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ContactSpoofingReviewDialogPerson.dom.tsx b/ts/components/conversation/ContactSpoofingReviewDialogPerson.dom.tsx index baaecd8679..871bcf59c4 100644 --- a/ts/components/conversation/ContactSpoofingReviewDialogPerson.dom.tsx +++ b/ts/components/conversation/ContactSpoofingReviewDialogPerson.dom.tsx @@ -4,16 +4,16 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; -import { assertDev } from '../../util/assert.std.js'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; +import { assertDev } from '../../util/assert.std.ts'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { SharedGroupNames } from '../SharedGroupNames.dom.js'; -import { UserText } from '../UserText.dom.js'; -import { I18n } from '../I18n.dom.js'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { SharedGroupNames } from '../SharedGroupNames.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; export type PropsType = Readonly<{ children?: ReactNode; diff --git a/ts/components/conversation/ConversationHeader.dom.stories.tsx b/ts/components/conversation/ConversationHeader.dom.stories.tsx index e35f2c024b..d2559c603b 100644 --- a/ts/components/conversation/ConversationHeader.dom.stories.tsx +++ b/ts/components/conversation/ConversationHeader.dom.stories.tsx @@ -10,19 +10,19 @@ import { v4 as generateUuid } from 'uuid'; import { getDefaultConversation, getDefaultGroup, -} from '../../test-helpers/getDefaultConversation.std.js'; -import { getRandomColor } from '../../test-helpers/getRandomColor.std.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; +} from '../../test-helpers/getDefaultConversation.std.ts'; +import { getRandomColor } from '../../test-helpers/getRandomColor.std.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; import { StorybookThemeContext } from '../../../.storybook/StorybookThemeContext.std.js'; -import type { PropsType } from './ConversationHeader.dom.js'; +import type { PropsType } from './ConversationHeader.dom.tsx'; import { ConversationHeader, OutgoingCallButtonStyle, -} from './ConversationHeader.dom.js'; -import { gifUrl } from '../../storybook/Fixtures.std.js'; -import { ThemeType } from '../../types/Util.std.js'; -import { ContactSpoofingType } from '../../util/contactSpoofing.std.js'; -import { CollidingAvatars } from '../CollidingAvatars.dom.js'; +} from './ConversationHeader.dom.tsx'; +import { gifUrl } from '../../storybook/Fixtures.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import { ContactSpoofingType } from '../../util/contactSpoofing.std.ts'; +import { CollidingAvatars } from '../CollidingAvatars.dom.tsx'; export default { title: 'Components/Conversation/ConversationHeader', diff --git a/ts/components/conversation/ConversationHeader.dom.tsx b/ts/components/conversation/ConversationHeader.dom.tsx index 68fc6bfd34..6812546fa8 100644 --- a/ts/components/conversation/ConversationHeader.dom.tsx +++ b/ts/components/conversation/ConversationHeader.dom.tsx @@ -5,53 +5,53 @@ import classNames from 'classnames'; import type { RefObject } from 'react'; import React, { memo, useCallback, useMemo, useRef, useState } from 'react'; import type { ReadonlyDeep } from 'type-fest'; -import type { BadgeType } from '../../badges/types.std.js'; +import type { BadgeType } from '../../badges/types.std.ts'; import { useKeyboardShortcuts, useStartCallShortcuts, -} from '../../hooks/useKeyboardShortcuts.dom.js'; -import { SizeObserver } from '../../hooks/useSizeObserver.dom.js'; -import type { ConversationTypeType } from '../../state/ducks/conversations.preload.js'; -import type { HasStories } from '../../types/Stories.std.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { DurationInSeconds } from '../../util/durations/index.std.js'; -import * as expirationTimer from '../../util/expirationTimer.std.js'; -import { getMuteOptions } from '../../util/getMuteOptions.std.js'; -import { isConversationMuted } from '../../util/isConversationMuted.std.js'; -import { isInSystemContacts } from '../../util/isInSystemContacts.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { Alert } from '../Alert.dom.js'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { DisappearingTimeDialog } from '../DisappearingTimeDialog.dom.js'; -import { InContactsIcon } from '../InContactsIcon.dom.js'; -import { UserText } from '../UserText.dom.js'; -import type { ContactNameData } from './ContactName.dom.js'; +} from '../../hooks/useKeyboardShortcuts.dom.tsx'; +import { SizeObserver } from '../../hooks/useSizeObserver.dom.tsx'; +import type { ConversationTypeType } from '../../state/ducks/conversations.preload.ts'; +import type { HasStories } from '../../types/Stories.std.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { DurationInSeconds } from '../../util/durations/index.std.ts'; +import * as expirationTimer from '../../util/expirationTimer.std.ts'; +import { getMuteOptions } from '../../util/getMuteOptions.std.ts'; +import { isConversationMuted } from '../../util/isConversationMuted.std.ts'; +import { isInSystemContacts } from '../../util/isInSystemContacts.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { Alert } from '../Alert.dom.tsx'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { DisappearingTimeDialog } from '../DisappearingTimeDialog.dom.tsx'; +import { InContactsIcon } from '../InContactsIcon.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; +import type { ContactNameData } from './ContactName.dom.tsx'; import { MessageRequestActionsConfirmation, MessageRequestState, -} from './MessageRequestActionsConfirmation.dom.js'; -import type { MinimalConversation } from '../../hooks/useMinimalConversation.std.js'; -import { InAnotherCallTooltip } from './InAnotherCallTooltip.dom.js'; -import { DeleteMessagesConfirmationDialog } from '../DeleteMessagesConfirmationDialog.dom.js'; -import { AxoDropdownMenu } from '../../axo/AxoDropdownMenu.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from './MessageRequestActionsConfirmation.dom.tsx'; +import type { MinimalConversation } from '../../hooks/useMinimalConversation.std.ts'; +import { InAnotherCallTooltip } from './InAnotherCallTooltip.dom.tsx'; +import { DeleteMessagesConfirmationDialog } from '../DeleteMessagesConfirmationDialog.dom.tsx'; +import { AxoDropdownMenu } from '../../axo/AxoDropdownMenu.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; import { TimelineWarning, TimelineWarningCustomInfo, TimelineWarningLink, -} from './TimelineWarning.dom.js'; -import { ContactSpoofingType } from '../../util/contactSpoofing.std.js'; -import type { GroupNameCollisionsWithIdsByTitle } from '../../util/groupMemberNameCollisions.std.js'; -import { hasUnacknowledgedCollisions } from '../../util/groupMemberNameCollisions.std.js'; -import type { I18nComponentParts } from '../I18n.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { SmartCollidingAvatarsProps } from '../../state/smart/CollidingAvatars.dom.js'; +} from './TimelineWarning.dom.tsx'; +import { ContactSpoofingType } from '../../util/contactSpoofing.std.ts'; +import type { GroupNameCollisionsWithIdsByTitle } from '../../util/groupMemberNameCollisions.std.ts'; +import { hasUnacknowledgedCollisions } from '../../util/groupMemberNameCollisions.std.ts'; +import type { I18nComponentParts } from '../I18n.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { SmartCollidingAvatarsProps } from '../../state/smart/CollidingAvatars.dom.tsx'; import type { ContactSpoofingWarning, MultipleGroupMembersWithSameTitleContactSpoofingWarning, -} from '../../state/selectors/timeline.preload.js'; -import { tw } from '../../axo/tw.dom.js'; +} from '../../state/selectors/timeline.preload.ts'; +import { tw } from '../../axo/tw.dom.tsx'; function HeaderInfoTitle({ name, diff --git a/ts/components/conversation/ConversationHero.dom.stories.tsx b/ts/components/conversation/ConversationHero.dom.stories.tsx index 3c71d3c142..f84f5d5c3d 100644 --- a/ts/components/conversation/ConversationHero.dom.stories.tsx +++ b/ts/components/conversation/ConversationHero.dom.stories.tsx @@ -5,13 +5,13 @@ import type { Meta, StoryFn } from '@storybook/react'; import React, { useContext } from 'react'; import casual from 'casual'; import { action } from '@storybook/addon-actions'; -import type { Props } from './ConversationHero.dom.js'; -import { ConversationHero } from './ConversationHero.dom.js'; -import { HasStories } from '../../types/Stories.std.js'; +import type { Props } from './ConversationHero.dom.tsx'; +import { ConversationHero } from './ConversationHero.dom.tsx'; +import { HasStories } from '../../types/Stories.std.ts'; import { StorybookThemeContext } from '../../../.storybook/StorybookThemeContext.std.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { ThemeType } from '../../types/Util.std.js'; -import type { GroupV2Membership } from './conversation-details/ConversationDetailsMembershipList.dom.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import type { GroupV2Membership } from './conversation-details/ConversationDetailsMembershipList.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ConversationHero.dom.tsx b/ts/components/conversation/ConversationHero.dom.tsx index ac0452b471..151b7aa050 100644 --- a/ts/components/conversation/ConversationHero.dom.tsx +++ b/ts/components/conversation/ConversationHero.dom.tsx @@ -3,22 +3,22 @@ import React, { type ReactNode, useState } from 'react'; import classNames from 'classnames'; -import type { Props as AvatarProps } from '../Avatar.dom.js'; -import { Avatar, AvatarSize, AvatarBlur } from '../Avatar.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { About } from './About.dom.js'; -import { GroupDescription } from './GroupDescription.dom.js'; -import { SharedGroupNames } from '../SharedGroupNames.dom.js'; -import { GroupMembersNames } from '../GroupMembersNames.dom.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { HasStories } from '../../types/Stories.std.js'; -import type { ViewUserStoriesActionCreatorType } from '../../state/ducks/stories.preload.js'; -import type { GroupV2Membership } from './conversation-details/ConversationDetailsMembershipList.dom.js'; -import { StoryViewModeType } from '../../types/Stories.std.js'; -import { Button, ButtonVariant } from '../Button.dom.js'; -import { SafetyTipsModal } from '../SafetyTipsModal.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { ContactModalStateType } from '../../types/globalModals.std.js'; +import type { Props as AvatarProps } from '../Avatar.dom.tsx'; +import { Avatar, AvatarSize, AvatarBlur } from '../Avatar.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { About } from './About.dom.tsx'; +import { GroupDescription } from './GroupDescription.dom.tsx'; +import { SharedGroupNames } from '../SharedGroupNames.dom.tsx'; +import { GroupMembersNames } from '../GroupMembersNames.dom.tsx'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { HasStories } from '../../types/Stories.std.ts'; +import type { ViewUserStoriesActionCreatorType } from '../../state/ducks/stories.preload.ts'; +import type { GroupV2Membership } from './conversation-details/ConversationDetailsMembershipList.dom.tsx'; +import { StoryViewModeType } from '../../types/Stories.std.ts'; +import { Button, ButtonVariant } from '../Button.dom.tsx'; +import { SafetyTipsModal } from '../SafetyTipsModal.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { ContactModalStateType } from '../../types/globalModals.std.ts'; export type Props = { about?: string; diff --git a/ts/components/conversation/ConversationMergeNotification.dom.stories.tsx b/ts/components/conversation/ConversationMergeNotification.dom.stories.tsx index be53461bb1..8ccedbb706 100644 --- a/ts/components/conversation/ConversationMergeNotification.dom.stories.tsx +++ b/ts/components/conversation/ConversationMergeNotification.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ConversationMergeNotification.dom.js'; -import { ConversationMergeNotification } from './ConversationMergeNotification.dom.js'; +import type { PropsType } from './ConversationMergeNotification.dom.tsx'; +import { ConversationMergeNotification } from './ConversationMergeNotification.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ConversationMergeNotification.dom.tsx b/ts/components/conversation/ConversationMergeNotification.dom.tsx index d7ab632b5b..217695c12b 100644 --- a/ts/components/conversation/ConversationMergeNotification.dom.tsx +++ b/ts/components/conversation/ConversationMergeNotification.dom.tsx @@ -3,13 +3,13 @@ import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { getStringForConversationMerge } from '../../util/getStringForConversationMerge.std.js'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { Emojify } from './Emojify.dom.js'; -import { Modal } from '../Modal.dom.js'; -import { I18n } from '../I18n.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { getStringForConversationMerge } from '../../util/getStringForConversationMerge.std.ts'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { Emojify } from './Emojify.dom.tsx'; +import { Modal } from '../Modal.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; export type PropsDataType = { conversationTitle: string; diff --git a/ts/components/conversation/ConversationView.dom.tsx b/ts/components/conversation/ConversationView.dom.tsx index 17454b6e9a..2dc7d0ede7 100644 --- a/ts/components/conversation/ConversationView.dom.tsx +++ b/ts/components/conversation/ConversationView.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; import classNames from 'classnames'; -import { useEscapeHandling } from '../../hooks/useEscapeHandling.dom.js'; -import { getSuggestedFilename } from '../../util/Attachment.std.js'; -import { IMAGE_PNG, type MIMEType } from '../../types/MIME.std.js'; +import { useEscapeHandling } from '../../hooks/useEscapeHandling.dom.ts'; +import { getSuggestedFilename } from '../../util/Attachment.std.ts'; +import { IMAGE_PNG, type MIMEType } from '../../types/MIME.std.ts'; export type PropsType = { conversationId: string; diff --git a/ts/components/conversation/DeliveryIssueDialog.dom.stories.tsx b/ts/components/conversation/DeliveryIssueDialog.dom.stories.tsx index 6a0d929331..f59e684fb4 100644 --- a/ts/components/conversation/DeliveryIssueDialog.dom.stories.tsx +++ b/ts/components/conversation/DeliveryIssueDialog.dom.stories.tsx @@ -4,9 +4,9 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DeliveryIssueDialog.dom.js'; -import { DeliveryIssueDialog } from './DeliveryIssueDialog.dom.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './DeliveryIssueDialog.dom.tsx'; +import { DeliveryIssueDialog } from './DeliveryIssueDialog.dom.tsx'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; const sender = getDefaultConversation(); diff --git a/ts/components/conversation/DeliveryIssueDialog.dom.tsx b/ts/components/conversation/DeliveryIssueDialog.dom.tsx index 17fc41f0bf..06309b4562 100644 --- a/ts/components/conversation/DeliveryIssueDialog.dom.tsx +++ b/ts/components/conversation/DeliveryIssueDialog.dom.tsx @@ -3,16 +3,16 @@ import * as React from 'react'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { Modal } from '../Modal.dom.js'; -import { I18n } from '../I18n.dom.js'; -import { Emojify } from './Emojify.dom.js'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { Modal } from '../Modal.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import { Emojify } from './Emojify.dom.tsx'; -import { useRestoreFocus } from '../../hooks/useRestoreFocus.dom.js'; +import { useRestoreFocus } from '../../hooks/useRestoreFocus.dom.ts'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.ts'; export type PropsType = { i18n: LocalizerType; diff --git a/ts/components/conversation/DeliveryIssueNotification.dom.stories.tsx b/ts/components/conversation/DeliveryIssueNotification.dom.stories.tsx index 228756f08b..7e91550759 100644 --- a/ts/components/conversation/DeliveryIssueNotification.dom.stories.tsx +++ b/ts/components/conversation/DeliveryIssueNotification.dom.stories.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './DeliveryIssueNotification.dom.js'; -import { DeliveryIssueNotification } from './DeliveryIssueNotification.dom.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './DeliveryIssueNotification.dom.tsx'; +import { DeliveryIssueNotification } from './DeliveryIssueNotification.dom.tsx'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; export default { title: 'Components/Conversation/DeliveryIssueNotification', diff --git a/ts/components/conversation/DeliveryIssueNotification.dom.tsx b/ts/components/conversation/DeliveryIssueNotification.dom.tsx index f351808c8b..c6220632f7 100644 --- a/ts/components/conversation/DeliveryIssueNotification.dom.tsx +++ b/ts/components/conversation/DeliveryIssueNotification.dom.tsx @@ -4,14 +4,14 @@ import type { ReactElement } from 'react'; import React, { useCallback, useState } from 'react'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { I18n } from '../I18n.dom.js'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { I18n } from '../I18n.dom.tsx'; -import { DeliveryIssueDialog } from './DeliveryIssueDialog.dom.js'; -import { UserText } from '../UserText.dom.js'; +import { DeliveryIssueDialog } from './DeliveryIssueDialog.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; export type PropsDataType = { sender?: ConversationType; diff --git a/ts/components/conversation/DonationsOfflineTooltip.dom.tsx b/ts/components/conversation/DonationsOfflineTooltip.dom.tsx index 00b7ca5e99..f1a9954d56 100644 --- a/ts/components/conversation/DonationsOfflineTooltip.dom.tsx +++ b/ts/components/conversation/DonationsOfflineTooltip.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import { offsetDistanceModifier } from '../../util/popperUtil.std.js'; -import { Tooltip, TooltipPlacement } from '../Tooltip.dom.js'; +import { offsetDistanceModifier } from '../../util/popperUtil.std.ts'; +import { Tooltip, TooltipPlacement } from '../Tooltip.dom.tsx'; -import type { LocalizerType } from '../../types/I18N.std.js'; +import type { LocalizerType } from '../../types/I18N.std.ts'; type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/EmbeddedContact.dom.tsx b/ts/components/conversation/EmbeddedContact.dom.tsx index beb691cfdf..b9ddfb9510 100644 --- a/ts/components/conversation/EmbeddedContact.dom.tsx +++ b/ts/components/conversation/EmbeddedContact.dom.tsx @@ -5,14 +5,14 @@ import React from 'react'; import classNames from 'classnames'; import type { ReadonlyDeep } from 'type-fest'; -import type { EmbeddedContactForUIType } from '../../types/EmbeddedContact.std.js'; +import type { EmbeddedContactForUIType } from '../../types/EmbeddedContact.std.ts'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; import { renderAvatar, renderContactShorthand, renderName, -} from './contactUtil.dom.js'; +} from './contactUtil.dom.tsx'; export type Props = { contact: ReadonlyDeep; diff --git a/ts/components/conversation/Emojify.dom.stories.tsx b/ts/components/conversation/Emojify.dom.stories.tsx index e0b22d9824..0a2d5c2026 100644 --- a/ts/components/conversation/Emojify.dom.stories.tsx +++ b/ts/components/conversation/Emojify.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './Emojify.dom.js'; -import { Emojify } from './Emojify.dom.js'; +import type { Props } from './Emojify.dom.tsx'; +import { Emojify } from './Emojify.dom.tsx'; export default { title: 'Components/Conversation/Emojify', diff --git a/ts/components/conversation/Emojify.dom.tsx b/ts/components/conversation/Emojify.dom.tsx index 754bff2d29..2a0d4130fe 100644 --- a/ts/components/conversation/Emojify.dom.tsx +++ b/ts/components/conversation/Emojify.dom.tsx @@ -2,18 +2,18 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import type { CSSProperties } from 'react'; -import type { RenderTextCallbackType } from '../../types/Util.std.js'; -import { splitByEmoji } from '../../util/emoji.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { FunInlineEmoji } from '../fun/FunEmoji.dom.js'; +import type { RenderTextCallbackType } from '../../types/Util.std.ts'; +import { splitByEmoji } from '../../util/emoji.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { FunInlineEmoji } from '../fun/FunEmoji.dom.tsx'; import { getEmojiVariantByKey, getEmojiVariantKeyByValue, isEmojiVariantValue, isEmojiVariantValueNonQualified, -} from '../fun/data/emojis.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { useFunEmojiLocalizer } from '../fun/useFunEmojiLocalizer.dom.js'; +} from '../fun/data/emojis.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { useFunEmojiLocalizer } from '../fun/useFunEmojiLocalizer.dom.tsx'; const log = createLogger('Emojify'); diff --git a/ts/components/conversation/ErrorBoundary.dom.stories.tsx b/ts/components/conversation/ErrorBoundary.dom.stories.tsx index 831cb1a789..7d3a0ab101 100644 --- a/ts/components/conversation/ErrorBoundary.dom.stories.tsx +++ b/ts/components/conversation/ErrorBoundary.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './ErrorBoundary.dom.js'; -import { ErrorBoundary } from './ErrorBoundary.dom.js'; +import type { Props } from './ErrorBoundary.dom.tsx'; +import { ErrorBoundary } from './ErrorBoundary.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ErrorBoundary.dom.tsx b/ts/components/conversation/ErrorBoundary.dom.tsx index be8f284c2d..95998d3845 100644 --- a/ts/components/conversation/ErrorBoundary.dom.tsx +++ b/ts/components/conversation/ErrorBoundary.dom.tsx @@ -4,9 +4,9 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { createLogger } from '../../logging/log.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; const log = createLogger('ErrorBoundary'); diff --git a/ts/components/conversation/ExpireTimer.dom.stories.tsx b/ts/components/conversation/ExpireTimer.dom.stories.tsx index b321077c42..96b1fbb07e 100644 --- a/ts/components/conversation/ExpireTimer.dom.stories.tsx +++ b/ts/components/conversation/ExpireTimer.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './ExpireTimer.dom.js'; -import { ExpireTimer } from './ExpireTimer.dom.js'; +import type { Props } from './ExpireTimer.dom.tsx'; +import { ExpireTimer } from './ExpireTimer.dom.tsx'; export default { title: 'Components/Conversation/ExpireTimer', diff --git a/ts/components/conversation/ExpireTimer.dom.tsx b/ts/components/conversation/ExpireTimer.dom.tsx index 878ed367ee..a5ef116818 100644 --- a/ts/components/conversation/ExpireTimer.dom.tsx +++ b/ts/components/conversation/ExpireTimer.dom.tsx @@ -4,7 +4,7 @@ import React, { useEffect, useReducer } from 'react'; import classNames from 'classnames'; -import { getIncrement, getTimerBucket } from '../../util/timer.std.js'; +import { getIncrement, getTimerBucket } from '../../util/timer.std.ts'; export type Props = Readonly<{ expirationLength: number; diff --git a/ts/components/conversation/GIF.dom.tsx b/ts/components/conversation/GIF.dom.tsx index 7a8bd9cd16..6bb2faad5a 100644 --- a/ts/components/conversation/GIF.dom.tsx +++ b/ts/components/conversation/GIF.dom.tsx @@ -5,22 +5,22 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import classNames from 'classnames'; import { Blurhash } from 'react-blurhash'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; -import type { AttachmentForUIType } from '../../types/Attachment.std.js'; +import type { AttachmentForUIType } from '../../types/Attachment.std.ts'; import { hasNotResolved, getImageDimensionsForTimeline, defaultBlurHash, isDownloadable, -} from '../../util/Attachment.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { useReducedMotion } from '../../hooks/useReducedMotion.dom.js'; -import { AttachmentDetailPill } from './AttachmentDetailPill.dom.js'; -import { getSpinner } from './Image.dom.js'; -import { useUndownloadableMediaHandler } from '../../hooks/useUndownloadableMediaHandler.dom.js'; -import { isAbortError } from '../../util/isAbortError.std.js'; +} from '../../util/Attachment.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { useReducedMotion } from '../../hooks/useReducedMotion.dom.ts'; +import { AttachmentDetailPill } from './AttachmentDetailPill.dom.tsx'; +import { getSpinner } from './Image.dom.tsx'; +import { useUndownloadableMediaHandler } from '../../hooks/useUndownloadableMediaHandler.dom.tsx'; +import { isAbortError } from '../../util/isAbortError.std.ts'; const log = createLogger('GIF'); diff --git a/ts/components/conversation/GroupDescription.dom.stories.tsx b/ts/components/conversation/GroupDescription.dom.stories.tsx index 20223eb023..0a164d6ad6 100644 --- a/ts/components/conversation/GroupDescription.dom.stories.tsx +++ b/ts/components/conversation/GroupDescription.dom.stories.tsx @@ -3,8 +3,8 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupDescription.dom.js'; -import { GroupDescription } from './GroupDescription.dom.js'; +import type { PropsType } from './GroupDescription.dom.tsx'; +import { GroupDescription } from './GroupDescription.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/GroupDescription.dom.tsx b/ts/components/conversation/GroupDescription.dom.tsx index 66fa635f82..32b6039bbb 100644 --- a/ts/components/conversation/GroupDescription.dom.tsx +++ b/ts/components/conversation/GroupDescription.dom.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useEffect, useRef, useState } from 'react'; -import { Modal } from '../Modal.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { GroupDescriptionText } from '../GroupDescriptionText.dom.js'; +import { Modal } from '../Modal.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { GroupDescriptionText } from '../GroupDescriptionText.dom.tsx'; // Emojification can cause the scroll height to be *slightly* larger than the client // height, so we add a little wiggle room. diff --git a/ts/components/conversation/GroupNotification.dom.stories.tsx b/ts/components/conversation/GroupNotification.dom.stories.tsx index 2715b39a16..1741b7a8a2 100644 --- a/ts/components/conversation/GroupNotification.dom.stories.tsx +++ b/ts/components/conversation/GroupNotification.dom.stories.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './GroupNotification.dom.js'; -import { GroupNotification } from './GroupNotification.dom.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; +import type { Props } from './GroupNotification.dom.tsx'; +import { GroupNotification } from './GroupNotification.dom.tsx'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; export default { title: 'Components/Conversation', diff --git a/ts/components/conversation/GroupNotification.dom.tsx b/ts/components/conversation/GroupNotification.dom.tsx index fdf281eff3..4b634a956c 100644 --- a/ts/components/conversation/GroupNotification.dom.tsx +++ b/ts/components/conversation/GroupNotification.dom.tsx @@ -5,13 +5,13 @@ import type { ReactNode } from 'react'; import React from 'react'; import lodash from 'lodash'; -import { ContactName } from './ContactName.dom.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import { ContactName } from './ContactName.dom.tsx'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; const { compact, flatten } = lodash; diff --git a/ts/components/conversation/GroupV1DisabledActions.dom.stories.tsx b/ts/components/conversation/GroupV1DisabledActions.dom.stories.tsx index 55ce628585..662d023676 100644 --- a/ts/components/conversation/GroupV1DisabledActions.dom.stories.tsx +++ b/ts/components/conversation/GroupV1DisabledActions.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType as GroupV1DisabledActionsPropsType } from './GroupV1DisabledActions.dom.js'; -import { GroupV1DisabledActions } from './GroupV1DisabledActions.dom.js'; +import type { PropsType as GroupV1DisabledActionsPropsType } from './GroupV1DisabledActions.dom.tsx'; +import { GroupV1DisabledActions } from './GroupV1DisabledActions.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/GroupV1DisabledActions.dom.tsx b/ts/components/conversation/GroupV1DisabledActions.dom.tsx index ef2a135e22..29ef63e8b5 100644 --- a/ts/components/conversation/GroupV1DisabledActions.dom.tsx +++ b/ts/components/conversation/GroupV1DisabledActions.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import { I18n } from '../I18n.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import { I18n } from '../I18n.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; export type PropsType = { conversationId: string; diff --git a/ts/components/conversation/GroupV1Migration.dom.stories.tsx b/ts/components/conversation/GroupV1Migration.dom.stories.tsx index 4cdc67e36e..b9425ecc56 100644 --- a/ts/components/conversation/GroupV1Migration.dom.stories.tsx +++ b/ts/components/conversation/GroupV1Migration.dom.stories.tsx @@ -3,10 +3,10 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import type { PropsType } from './GroupV1Migration.dom.js'; -import { GroupV1Migration } from './GroupV1Migration.dom.js'; -import { ThemeType } from '../../types/Util.std.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import type { PropsType } from './GroupV1Migration.dom.tsx'; +import { GroupV1Migration } from './GroupV1Migration.dom.tsx'; +import { ThemeType } from '../../types/Util.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/GroupV1Migration.dom.tsx b/ts/components/conversation/GroupV1Migration.dom.tsx index 586628387c..186f5e4ad8 100644 --- a/ts/components/conversation/GroupV1Migration.dom.tsx +++ b/ts/components/conversation/GroupV1Migration.dom.tsx @@ -3,15 +3,15 @@ import * as React from 'react'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; -import { I18n } from '../I18n.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { GroupV1MigrationDialog } from '../GroupV1MigrationDialog.dom.js'; -import { createLogger } from '../../logging/log.std.js'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; +import { I18n } from '../I18n.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { GroupV1MigrationDialog } from '../GroupV1MigrationDialog.dom.tsx'; +import { createLogger } from '../../logging/log.std.ts'; const log = createLogger('GroupV1Migration'); diff --git a/ts/components/conversation/GroupV2Change.dom.stories.tsx b/ts/components/conversation/GroupV2Change.dom.stories.tsx index bc4b3038d6..3b5cf40eb2 100644 --- a/ts/components/conversation/GroupV2Change.dom.stories.tsx +++ b/ts/components/conversation/GroupV2Change.dom.stories.tsx @@ -4,13 +4,13 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { generateAci, generatePni } from '../../types/ServiceId.std.js'; -import type { ServiceIdString, AciString } from '../../types/ServiceId.std.js'; -import type { GroupV2ChangeType } from '../../types/groups.std.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; -import type { SmartContactRendererType } from '../../groupChange.std.js'; -import type { PropsType } from './GroupV2Change.dom.js'; -import { GroupV2Change } from './GroupV2Change.dom.js'; +import { generateAci, generatePni } from '../../types/ServiceId.std.ts'; +import type { ServiceIdString, AciString } from '../../types/ServiceId.std.ts'; +import type { GroupV2ChangeType } from '../../types/groups.std.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; +import type { SmartContactRendererType } from '../../groupChange.std.ts'; +import type { PropsType } from './GroupV2Change.dom.tsx'; +import { GroupV2Change } from './GroupV2Change.dom.tsx'; // Note: this should be kept up to date with backup_groupv2_notifications_test.ts, to // maintain the comprehensive set of GroupV2 notifications we need to handle diff --git a/ts/components/conversation/GroupV2Change.dom.tsx b/ts/components/conversation/GroupV2Change.dom.tsx index 04fa54d67b..085e89d3a7 100644 --- a/ts/components/conversation/GroupV2Change.dom.tsx +++ b/ts/components/conversation/GroupV2Change.dom.tsx @@ -6,30 +6,30 @@ import React, { useState } from 'react'; import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import { createLogger } from '../../logging/log.std.js'; -import { I18n } from '../I18n.dom.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { I18n } from '../I18n.dom.tsx'; import type { LocalizerType, ICUJSXMessageParamsByKeyType, -} from '../../types/Util.std.js'; +} from '../../types/Util.std.ts'; import type { AciString, PniString, ServiceIdString, -} from '../../types/ServiceId.std.js'; -import { GroupDescriptionText } from '../GroupDescriptionText.dom.js'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import { SystemMessage } from './SystemMessage.dom.js'; +} from '../../types/ServiceId.std.ts'; +import { GroupDescriptionText } from '../GroupDescriptionText.dom.tsx'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import { SystemMessage } from './SystemMessage.dom.tsx'; import type { GroupV2ChangeType, GroupV2ChangeDetailType, -} from '../../types/groups.std.js'; +} from '../../types/groups.std.ts'; -import type { SmartContactRendererType } from '../../groupChange.std.js'; -import { renderChange } from '../../groupChange.std.js'; -import { Modal } from '../Modal.dom.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; +import type { SmartContactRendererType } from '../../groupChange.std.ts'; +import { renderChange } from '../../groupChange.std.ts'; +import { Modal } from '../Modal.dom.tsx'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; const { get } = lodash; diff --git a/ts/components/conversation/GroupV2PendingApprovalActions.dom.stories.tsx b/ts/components/conversation/GroupV2PendingApprovalActions.dom.stories.tsx index 1eb0dc6034..a0f6501b5d 100644 --- a/ts/components/conversation/GroupV2PendingApprovalActions.dom.stories.tsx +++ b/ts/components/conversation/GroupV2PendingApprovalActions.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType as GroupV2PendingApprovalActionsPropsType } from './GroupV2PendingApprovalActions.dom.js'; -import { GroupV2PendingApprovalActions } from './GroupV2PendingApprovalActions.dom.js'; +import type { PropsType as GroupV2PendingApprovalActionsPropsType } from './GroupV2PendingApprovalActions.dom.tsx'; +import { GroupV2PendingApprovalActions } from './GroupV2PendingApprovalActions.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/GroupV2PendingApprovalActions.dom.tsx b/ts/components/conversation/GroupV2PendingApprovalActions.dom.tsx index 02a750002a..6bb456a42d 100644 --- a/ts/components/conversation/GroupV2PendingApprovalActions.dom.tsx +++ b/ts/components/conversation/GroupV2PendingApprovalActions.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; export type PropsType = { conversationId: string; diff --git a/ts/components/conversation/Image.dom.stories.tsx b/ts/components/conversation/Image.dom.stories.tsx index 70fe9a3724..e4cba55708 100644 --- a/ts/components/conversation/Image.dom.stories.tsx +++ b/ts/components/conversation/Image.dom.stories.tsx @@ -4,14 +4,14 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { pngUrl } from '../../storybook/Fixtures.std.js'; -import type { Props } from './Image.dom.js'; -import { CurveType, Image } from './Image.dom.js'; -import { IMAGE_PNG } from '../../types/MIME.std.js'; -import type { ThemeType } from '../../types/Util.std.js'; +import { pngUrl } from '../../storybook/Fixtures.std.ts'; +import type { Props } from './Image.dom.tsx'; +import { CurveType, Image } from './Image.dom.tsx'; +import { IMAGE_PNG } from '../../types/MIME.std.ts'; +import type { ThemeType } from '../../types/Util.std.ts'; import { StorybookThemeContext } from '../../../.storybook/StorybookThemeContext.std.js'; -import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js'; +import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/Image.dom.tsx b/ts/components/conversation/Image.dom.tsx index c48a56ec78..bb4f8633c1 100644 --- a/ts/components/conversation/Image.dom.tsx +++ b/ts/components/conversation/Image.dom.tsx @@ -5,16 +5,16 @@ import type { CSSProperties } from 'react'; import React, { useCallback } from 'react'; import classNames from 'classnames'; -import { ImageOrBlurhash } from '../ImageOrBlurhash.dom.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { AttachmentForUIType } from '../../types/Attachment.std.js'; +import { ImageOrBlurhash } from '../ImageOrBlurhash.dom.tsx'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { AttachmentForUIType } from '../../types/Attachment.std.ts'; import { defaultBlurHash, isIncremental, isReadyToView, -} from '../../util/Attachment.std.js'; -import { SpinnerV2 } from '../SpinnerV2.dom.js'; -import { useUndownloadableMediaHandler } from '../../hooks/useUndownloadableMediaHandler.dom.js'; +} from '../../util/Attachment.std.ts'; +import { SpinnerV2 } from '../SpinnerV2.dom.tsx'; +import { useUndownloadableMediaHandler } from '../../hooks/useUndownloadableMediaHandler.dom.tsx'; export enum CurveType { None = 0, diff --git a/ts/components/conversation/ImageGrid.dom.stories.tsx b/ts/components/conversation/ImageGrid.dom.stories.tsx index 6f4b07ad5f..3a7ea2fb19 100644 --- a/ts/components/conversation/ImageGrid.dom.stories.tsx +++ b/ts/components/conversation/ImageGrid.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './ImageGrid.dom.js'; -import { ImageGrid } from './ImageGrid.dom.js'; +import type { Props } from './ImageGrid.dom.tsx'; +import { ImageGrid } from './ImageGrid.dom.tsx'; import { AUDIO_MP3, IMAGE_JPEG, @@ -13,11 +13,11 @@ import { IMAGE_WEBP, VIDEO_MP4, stringToMIMEType, -} from '../../types/MIME.std.js'; -import { pngUrl, squareStickerUrl } from '../../storybook/Fixtures.std.js'; -import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { isDownloadable } from '../../util/Attachment.std.js'; +} from '../../types/MIME.std.ts'; +import { pngUrl, squareStickerUrl } from '../../storybook/Fixtures.std.ts'; +import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { isDownloadable } from '../../util/Attachment.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ImageGrid.dom.tsx b/ts/components/conversation/ImageGrid.dom.tsx index 3420a4951e..c1b8b1f4c8 100644 --- a/ts/components/conversation/ImageGrid.dom.tsx +++ b/ts/components/conversation/ImageGrid.dom.tsx @@ -7,7 +7,7 @@ import classNames from 'classnames'; import type { AttachmentForUIType, AttachmentType, -} from '../../types/Attachment.std.js'; +} from '../../types/Attachment.std.ts'; import { areAllAttachmentsVisual, getAlt, @@ -17,13 +17,13 @@ import { isDownloadable, isIncremental, isVideoAttachment, -} from '../../util/Attachment.std.js'; +} from '../../util/Attachment.std.ts'; -import { Image, CurveType } from './Image.dom.js'; +import { Image, CurveType } from './Image.dom.tsx'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import { AttachmentDetailPill } from './AttachmentDetailPill.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import { AttachmentDetailPill } from './AttachmentDetailPill.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; export type DirectionType = 'incoming' | 'outgoing'; diff --git a/ts/components/conversation/InAnotherCallTooltip.dom.tsx b/ts/components/conversation/InAnotherCallTooltip.dom.tsx index 86de5cdbb7..1d12431655 100644 --- a/ts/components/conversation/InAnotherCallTooltip.dom.tsx +++ b/ts/components/conversation/InAnotherCallTooltip.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import { offsetDistanceModifier } from '../../util/popperUtil.std.js'; -import { Tooltip, TooltipPlacement } from '../Tooltip.dom.js'; +import { offsetDistanceModifier } from '../../util/popperUtil.std.ts'; +import { Tooltip, TooltipPlacement } from '../Tooltip.dom.tsx'; -import type { LocalizerType } from '../../types/I18N.std.js'; +import type { LocalizerType } from '../../types/I18N.std.ts'; type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/InlineNotificationWrapper.dom.tsx b/ts/components/conversation/InlineNotificationWrapper.dom.tsx index e885484684..ab376880ff 100644 --- a/ts/components/conversation/InlineNotificationWrapper.dom.tsx +++ b/ts/components/conversation/InlineNotificationWrapper.dom.tsx @@ -3,7 +3,7 @@ import type { ReactNode } from 'react'; import React, { useCallback, useEffect, useRef } from 'react'; -import { getInteractionMode } from '../../services/InteractionMode.dom.js'; +import { getInteractionMode } from '../../services/InteractionMode.dom.ts'; type PropsType = { id: string; diff --git a/ts/components/conversation/JoinedSignalNotification.dom.stories.tsx b/ts/components/conversation/JoinedSignalNotification.dom.stories.tsx index d079d02f97..954840c52f 100644 --- a/ts/components/conversation/JoinedSignalNotification.dom.stories.tsx +++ b/ts/components/conversation/JoinedSignalNotification.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './JoinedSignalNotification.dom.js'; -import { JoinedSignalNotification } from './JoinedSignalNotification.dom.js'; +import type { Props } from './JoinedSignalNotification.dom.tsx'; +import { JoinedSignalNotification } from './JoinedSignalNotification.dom.tsx'; export default { title: 'Components/Conversation/JoinedSignalNotification', diff --git a/ts/components/conversation/JoinedSignalNotification.dom.tsx b/ts/components/conversation/JoinedSignalNotification.dom.tsx index dea4e7edac..676557f000 100644 --- a/ts/components/conversation/JoinedSignalNotification.dom.tsx +++ b/ts/components/conversation/JoinedSignalNotification.dom.tsx @@ -3,11 +3,11 @@ import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { I18n } from '../I18n.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { I18n } from '../I18n.dom.tsx'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { MessageTimestamp } from './MessageTimestamp.dom.js'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { MessageTimestamp } from './MessageTimestamp.dom.tsx'; export type PropsData = { timestamp: number; diff --git a/ts/components/conversation/LastSeenIndicator.dom.stories.tsx b/ts/components/conversation/LastSeenIndicator.dom.stories.tsx index 29de6cd985..ce2f5f8636 100644 --- a/ts/components/conversation/LastSeenIndicator.dom.stories.tsx +++ b/ts/components/conversation/LastSeenIndicator.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './LastSeenIndicator.dom.js'; -import { LastSeenIndicator } from './LastSeenIndicator.dom.js'; +import type { Props } from './LastSeenIndicator.dom.tsx'; +import { LastSeenIndicator } from './LastSeenIndicator.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/LastSeenIndicator.dom.tsx b/ts/components/conversation/LastSeenIndicator.dom.tsx index 9d5a912b31..859f2d3773 100644 --- a/ts/components/conversation/LastSeenIndicator.dom.tsx +++ b/ts/components/conversation/LastSeenIndicator.dom.tsx @@ -3,7 +3,7 @@ import React, { forwardRef } from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; export type Props = { count: number; diff --git a/ts/components/conversation/LinkPreviewDate.dom.tsx b/ts/components/conversation/LinkPreviewDate.dom.tsx index 1fec7b8d58..0321636aeb 100644 --- a/ts/components/conversation/LinkPreviewDate.dom.tsx +++ b/ts/components/conversation/LinkPreviewDate.dom.tsx @@ -4,7 +4,7 @@ import * as React from 'react'; import type { Moment } from 'moment'; import moment from 'moment'; -import { isLinkPreviewDateValid } from '../../linkPreviews/isLinkPreviewDateValid.std.js'; +import { isLinkPreviewDateValid } from '../../linkPreviews/isLinkPreviewDateValid.std.ts'; type Props = { date?: null | number; diff --git a/ts/components/conversation/Linkify.dom.stories.tsx b/ts/components/conversation/Linkify.dom.stories.tsx index f97cc133b3..17ba69bc22 100644 --- a/ts/components/conversation/Linkify.dom.stories.tsx +++ b/ts/components/conversation/Linkify.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './Linkify.dom.js'; -import { Linkify } from './Linkify.dom.js'; +import type { Props } from './Linkify.dom.tsx'; +import { Linkify } from './Linkify.dom.tsx'; export default { title: 'Components/Conversation/Linkify', diff --git a/ts/components/conversation/Linkify.dom.tsx b/ts/components/conversation/Linkify.dom.tsx index 24815dda9e..1629ef788b 100644 --- a/ts/components/conversation/Linkify.dom.tsx +++ b/ts/components/conversation/Linkify.dom.tsx @@ -5,13 +5,13 @@ import React from 'react'; import LinkifyIt, { type Match as LinkifyItMatch } from 'linkify-it'; -import type { RenderTextCallbackType } from '../../types/Util.std.js'; +import type { RenderTextCallbackType } from '../../types/Util.std.ts'; import { isLinkSneaky, shouldLinkifyMessage, -} from '../../types/LinkPreview.std.js'; -import { splitByEmoji } from '../../util/emoji.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; +} from '../../types/LinkPreview.std.ts'; +import { splitByEmoji } from '../../util/emoji.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; export const linkify = new LinkifyIt() // This is all TLDs in place in 2010, according to [IANA's root zone database][0] diff --git a/ts/components/conversation/MandatoryProfileSharingActions.dom.stories.tsx b/ts/components/conversation/MandatoryProfileSharingActions.dom.stories.tsx index d544f2b176..303fdcc7bb 100644 --- a/ts/components/conversation/MandatoryProfileSharingActions.dom.stories.tsx +++ b/ts/components/conversation/MandatoryProfileSharingActions.dom.stories.tsx @@ -4,12 +4,12 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './MandatoryProfileSharingActions.dom.js'; -import { MandatoryProfileSharingActions } from './MandatoryProfileSharingActions.dom.js'; +import type { Props } from './MandatoryProfileSharingActions.dom.tsx'; +import { MandatoryProfileSharingActions } from './MandatoryProfileSharingActions.dom.tsx'; import { getDefaultConversation, getDefaultGroup, -} from '../../test-helpers/getDefaultConversation.std.js'; +} from '../../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/MandatoryProfileSharingActions.dom.tsx b/ts/components/conversation/MandatoryProfileSharingActions.dom.tsx index a45558041a..f0798fb5ff 100644 --- a/ts/components/conversation/MandatoryProfileSharingActions.dom.tsx +++ b/ts/components/conversation/MandatoryProfileSharingActions.dom.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import { ContactName } from './ContactName.dom.js'; -import { Button, ButtonVariant } from '../Button.dom.js'; -import type { MessageRequestActionsConfirmationProps } from './MessageRequestActionsConfirmation.dom.js'; +import { ContactName } from './ContactName.dom.tsx'; +import { Button, ButtonVariant } from '../Button.dom.tsx'; +import type { MessageRequestActionsConfirmationProps } from './MessageRequestActionsConfirmation.dom.tsx'; import { MessageRequestActionsConfirmation, MessageRequestState, -} from './MessageRequestActionsConfirmation.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +} from './MessageRequestActionsConfirmation.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; export type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/Message.dom.tsx b/ts/components/conversation/Message.dom.tsx index a88fa8d5a4..c9ca65e357 100644 --- a/ts/components/conversation/Message.dom.tsx +++ b/ts/components/conversation/Message.dom.tsx @@ -23,41 +23,41 @@ import type { SaveAttachmentActionCreatorType, SaveAttachmentsActionCreatorType, ShowConversationType, -} from '../../state/ducks/conversations.preload.js'; -import type { ViewStoryActionCreatorType } from '../../state/ducks/stories.preload.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { AvatarSpacer } from '../AvatarSpacer.dom.js'; -import { MessageBodyReadMore } from './MessageBodyReadMore.dom.js'; -import { MessageMetadata } from './MessageMetadata.dom.js'; -import { MessageTextMetadataSpacer } from './MessageTextMetadataSpacer.dom.js'; -import { ImageGrid } from './ImageGrid.dom.js'; -import { GIF } from './GIF.dom.js'; -import { CurveType, Image } from './Image.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { QuotedAttachmentForUIType } from './Quote.dom.js'; -import { Quote } from './Quote.dom.js'; -import { EmbeddedContact } from './EmbeddedContact.dom.js'; +} from '../../state/ducks/conversations.preload.ts'; +import type { ViewStoryActionCreatorType } from '../../state/ducks/stories.preload.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { AvatarSpacer } from '../AvatarSpacer.dom.tsx'; +import { MessageBodyReadMore } from './MessageBodyReadMore.dom.tsx'; +import { MessageMetadata } from './MessageMetadata.dom.tsx'; +import { MessageTextMetadataSpacer } from './MessageTextMetadataSpacer.dom.tsx'; +import { ImageGrid } from './ImageGrid.dom.tsx'; +import { GIF } from './GIF.dom.tsx'; +import { CurveType, Image } from './Image.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { QuotedAttachmentForUIType } from './Quote.dom.tsx'; +import { Quote } from './Quote.dom.tsx'; +import { EmbeddedContact } from './EmbeddedContact.dom.tsx'; import type { OwnProps as ReactionViewerProps, Reaction, -} from './ReactionViewer.dom.js'; -import { ReactionViewer } from './ReactionViewer.dom.js'; -import { LinkPreviewDate } from './LinkPreviewDate.dom.js'; +} from './ReactionViewer.dom.tsx'; +import { ReactionViewer } from './ReactionViewer.dom.tsx'; +import { LinkPreviewDate } from './LinkPreviewDate.dom.tsx'; import type { RenderingContextType } from '../../types/RenderingContext.d.ts'; -import type { LinkPreviewForUIType } from '../../types/message/LinkPreviews.std.js'; -import type { MessageStatusType } from '../../types/message/MessageStatus.std.js'; -import { shouldUseFullSizeLinkPreviewImage } from '../../linkPreviews/shouldUseFullSizeLinkPreviewImage.std.js'; -import type { WidthBreakpoint } from '../_util.std.js'; -import { OutgoingGiftBadgeModal } from '../OutgoingGiftBadgeModal.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import { StoryViewModeType } from '../../types/Stories.std.js'; -import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.js'; +import type { LinkPreviewForUIType } from '../../types/message/LinkPreviews.std.ts'; +import type { MessageStatusType } from '../../types/message/MessageStatus.std.ts'; +import { shouldUseFullSizeLinkPreviewImage } from '../../linkPreviews/shouldUseFullSizeLinkPreviewImage.std.ts'; +import type { WidthBreakpoint } from '../_util.std.ts'; +import { OutgoingGiftBadgeModal } from '../OutgoingGiftBadgeModal.dom.tsx'; +import { createLogger } from '../../logging/log.std.ts'; +import { StoryViewModeType } from '../../types/Stories.std.ts'; +import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.ts'; import type { AttachmentForUIType, AttachmentType, -} from '../../types/Attachment.std.js'; +} from '../../types/Attachment.std.ts'; import { canDisplayImage, getGridDimensions, @@ -71,47 +71,47 @@ import { isImage, isImageAttachment, isVideo, -} from '../../util/Attachment.std.js'; -import type { EmbeddedContactForUIType } from '../../types/EmbeddedContact.std.js'; +} from '../../util/Attachment.std.ts'; +import type { EmbeddedContactForUIType } from '../../types/EmbeddedContact.std.ts'; -import { getIncrement } from '../../util/timer.std.js'; -import { clearTimeoutIfNecessary } from '../../util/clearTimeoutIfNecessary.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import type { HydratedBodyRangesType } from '../../types/BodyRange.std.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; +import { getIncrement } from '../../util/timer.std.ts'; +import { clearTimeoutIfNecessary } from '../../util/clearTimeoutIfNecessary.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import type { HydratedBodyRangesType } from '../../types/BodyRange.std.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; import type { ContactNameColorType, ConversationColorType, CustomColorType, -} from '../../types/Colors.std.js'; -import { createRefMerger } from '../../util/refMerger.std.js'; -import { getCustomColorStyle } from '../../util/getCustomColorStyle.dom.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { DAY, HOUR, MINUTE, SECOND } from '../../util/durations/index.std.js'; -import { BadgeImageTheme } from '../../badges/BadgeImageTheme.std.js'; -import { getBadgeImageFileLocalPath } from '../../badges/getBadgeImageFileLocalPath.std.js'; -import { handleOutsideClick } from '../../util/handleOutsideClick.dom.js'; -import { isPaymentNotificationEvent } from '../../types/Payment.std.js'; -import type { AnyPaymentEvent } from '../../types/Payment.std.js'; -import { getPaymentEventDescription } from '../../messages/payments.std.js'; -import { PanelType } from '../../types/Panels.std.js'; -import type { PollWithResolvedVotersType } from '../../state/selectors/message.preload.js'; -import { PollMessageContents } from './poll-message/PollMessageContents.dom.js'; -import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.js'; -import { RenderLocation } from './MessageTextRenderer.dom.js'; -import { UserText } from '../UserText.dom.js'; -import { getColorForCallLink } from '../../util/getColorForCallLink.std.js'; -import { getKeyFromCallLink } from '../../util/callLinks.std.js'; -import { InAnotherCallTooltip } from './InAnotherCallTooltip.dom.js'; -import { formatFileSize } from '../../util/formatFileSize.std.js'; -import { assertDev, strictAssert } from '../../util/assert.std.js'; -import { AttachmentStatusIcon } from './AttachmentStatusIcon.dom.js'; -import { TapToViewNotAvailableType } from '../TapToViewNotAvailableModal.dom.js'; -import type { DataPropsType as TapToViewNotAvailablePropsType } from '../TapToViewNotAvailableModal.dom.js'; -import { FileThumbnail } from '../FileThumbnail.dom.js'; -import { FunStaticEmoji } from '../fun/FunEmoji.dom.js'; +} from '../../types/Colors.std.ts'; +import { createRefMerger } from '../../util/refMerger.std.ts'; +import { getCustomColorStyle } from '../../util/getCustomColorStyle.dom.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { DAY, HOUR, MINUTE, SECOND } from '../../util/durations/index.std.ts'; +import { BadgeImageTheme } from '../../badges/BadgeImageTheme.std.ts'; +import { getBadgeImageFileLocalPath } from '../../badges/getBadgeImageFileLocalPath.std.ts'; +import { handleOutsideClick } from '../../util/handleOutsideClick.dom.ts'; +import { isPaymentNotificationEvent } from '../../types/Payment.std.ts'; +import type { AnyPaymentEvent } from '../../types/Payment.std.ts'; +import { getPaymentEventDescription } from '../../messages/payments.std.ts'; +import { PanelType } from '../../types/Panels.std.ts'; +import type { PollWithResolvedVotersType } from '../../state/selectors/message.preload.ts'; +import { PollMessageContents } from './poll-message/PollMessageContents.dom.tsx'; +import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.ts'; +import { RenderLocation } from './MessageTextRenderer.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; +import { getColorForCallLink } from '../../util/getColorForCallLink.std.ts'; +import { getKeyFromCallLink } from '../../util/callLinks.std.ts'; +import { InAnotherCallTooltip } from './InAnotherCallTooltip.dom.tsx'; +import { formatFileSize } from '../../util/formatFileSize.std.ts'; +import { assertDev, strictAssert } from '../../util/assert.std.ts'; +import { AttachmentStatusIcon } from './AttachmentStatusIcon.dom.tsx'; +import { TapToViewNotAvailableType } from '../TapToViewNotAvailableModal.dom.tsx'; +import type { DataPropsType as TapToViewNotAvailablePropsType } from '../TapToViewNotAvailableModal.dom.tsx'; +import { FileThumbnail } from '../FileThumbnail.dom.tsx'; +import { FunStaticEmoji } from '../fun/FunEmoji.dom.tsx'; import { type EmojifyData, getEmojiDebugLabel, @@ -121,13 +121,13 @@ import { getEmojiVariantByKey, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from '../fun/data/emojis.std.js'; -import { useGroupedAndOrderedReactions } from '../../util/groupAndOrderReactions.dom.js'; -import type { AxoMenuBuilder } from '../../axo/AxoMenuBuilder.dom.js'; -import { AxoSymbol } from '../../axo/AxoSymbol.dom.js'; -import type { RenderAudioAttachmentProps } from '../../state/smart/renderAudioAttachment.preload.js'; -import type { MemberLabelType } from '../../types/GroupMemberLabels.std.js'; -import type { ContactModalStateType } from '../../types/globalModals.std.js'; +} from '../fun/data/emojis.std.ts'; +import { useGroupedAndOrderedReactions } from '../../util/groupAndOrderReactions.dom.ts'; +import type { AxoMenuBuilder } from '../../axo/AxoMenuBuilder.dom.tsx'; +import { AxoSymbol } from '../../axo/AxoSymbol.dom.tsx'; +import type { RenderAudioAttachmentProps } from '../../state/smart/renderAudioAttachment.preload.tsx'; +import type { MemberLabelType } from '../../types/GroupMemberLabels.std.ts'; +import type { ContactModalStateType } from '../../types/globalModals.std.ts'; const { drop, take, unescape } = lodash; diff --git a/ts/components/conversation/MessageAudio.dom.tsx b/ts/components/conversation/MessageAudio.dom.tsx index 154dbc90ef..616860504a 100644 --- a/ts/components/conversation/MessageAudio.dom.tsx +++ b/ts/components/conversation/MessageAudio.dom.tsx @@ -7,24 +7,24 @@ import classNames from 'classnames'; import lodash from 'lodash'; import { animated, useSpring } from '@react-spring/web'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { AttachmentForUIType } from '../../types/Attachment.std.js'; -import type { MessageStatusType } from '../../types/message/MessageStatus.std.js'; -import type { PushPanelForConversationActionType } from '../../state/ducks/conversations.preload.js'; -import { isDownloaded } from '../../util/Attachment.std.js'; -import type { DirectionType } from './Message.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { AttachmentForUIType } from '../../types/Attachment.std.ts'; +import type { MessageStatusType } from '../../types/message/MessageStatus.std.ts'; +import type { PushPanelForConversationActionType } from '../../state/ducks/conversations.preload.ts'; +import { isDownloaded } from '../../util/Attachment.std.ts'; +import type { DirectionType } from './Message.dom.tsx'; -import type { ComputePeaksResult } from '../VoiceNotesPlaybackContext.dom.js'; -import { MessageMetadata } from './MessageMetadata.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import type { ActiveAudioPlayerStateType } from '../../state/ducks/audioPlayer.preload.js'; -import { PlaybackRateButton } from '../PlaybackRateButton.dom.js'; -import { PlaybackButton } from '../PlaybackButton.dom.js'; -import { WaveformScrubber } from './WaveformScrubber.dom.js'; -import { useComputePeaks } from '../../hooks/useComputePeaks.dom.js'; -import { durationToPlaybackText } from '../../util/durationToPlaybackText.std.js'; -import { shouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.js'; -import { formatFileSize } from '../../util/formatFileSize.std.js'; +import type { ComputePeaksResult } from '../VoiceNotesPlaybackContext.dom.tsx'; +import { MessageMetadata } from './MessageMetadata.dom.tsx'; +import { createLogger } from '../../logging/log.std.ts'; +import type { ActiveAudioPlayerStateType } from '../../state/ducks/audioPlayer.preload.ts'; +import { PlaybackRateButton } from '../PlaybackRateButton.dom.tsx'; +import { PlaybackButton } from '../PlaybackButton.dom.tsx'; +import { WaveformScrubber } from './WaveformScrubber.dom.tsx'; +import { useComputePeaks } from '../../hooks/useComputePeaks.dom.ts'; +import { durationToPlaybackText } from '../../util/durationToPlaybackText.std.ts'; +import { shouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.ts'; +import { formatFileSize } from '../../util/formatFileSize.std.ts'; const { noop } = lodash; diff --git a/ts/components/conversation/MessageBody.dom.stories.tsx b/ts/components/conversation/MessageBody.dom.stories.tsx index 57ca0f1c59..e8a17f9d47 100644 --- a/ts/components/conversation/MessageBody.dom.stories.tsx +++ b/ts/components/conversation/MessageBody.dom.stories.tsx @@ -4,11 +4,11 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './MessageBody.dom.js'; -import { MessageBody } from './MessageBody.dom.js'; -import { BodyRange } from '../../types/BodyRange.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { RenderLocation } from './MessageTextRenderer.dom.js'; +import type { Props } from './MessageBody.dom.tsx'; +import { MessageBody } from './MessageBody.dom.tsx'; +import { BodyRange } from '../../types/BodyRange.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { RenderLocation } from './MessageTextRenderer.dom.tsx'; const SERVICE_ID_1 = generateAci(); const SERVICE_ID_2 = generateAci(); diff --git a/ts/components/conversation/MessageBody.dom.tsx b/ts/components/conversation/MessageBody.dom.tsx index 2101e31eab..cd74ef7b22 100644 --- a/ts/components/conversation/MessageBody.dom.tsx +++ b/ts/components/conversation/MessageBody.dom.tsx @@ -3,17 +3,17 @@ import type { KeyboardEvent } from 'react'; import React from 'react'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import { canBeDownloaded, isDownloaded } from '../../util/Attachment.std.js'; -import type { ShowConversationType } from '../../state/ducks/conversations.preload.js'; -import type { HydratedBodyRangesType } from '../../types/BodyRange.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { MessageTextRenderer } from './MessageTextRenderer.dom.js'; -import type { RenderLocation } from './MessageTextRenderer.dom.js'; -import { UserText } from '../UserText.dom.js'; -import { shouldLinkifyMessage } from '../../types/LinkPreview.std.js'; -import { FunJumboEmojiSize } from '../fun/FunEmoji.dom.js'; -import { getEmojifyData } from '../fun/data/emojis.std.js'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import { canBeDownloaded, isDownloaded } from '../../util/Attachment.std.ts'; +import type { ShowConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { HydratedBodyRangesType } from '../../types/BodyRange.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { MessageTextRenderer } from './MessageTextRenderer.dom.tsx'; +import type { RenderLocation } from './MessageTextRenderer.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; +import { shouldLinkifyMessage } from '../../types/LinkPreview.std.ts'; +import { FunJumboEmojiSize } from '../fun/FunEmoji.dom.tsx'; +import { getEmojifyData } from '../fun/data/emojis.std.ts'; function getSizeClass(str: string): FunJumboEmojiSize | null { const emojifyData = getEmojifyData(str); diff --git a/ts/components/conversation/MessageBodyReadMore.dom.stories.tsx b/ts/components/conversation/MessageBodyReadMore.dom.stories.tsx index 8c1ef19272..80c523e748 100644 --- a/ts/components/conversation/MessageBodyReadMore.dom.stories.tsx +++ b/ts/components/conversation/MessageBodyReadMore.dom.stories.tsx @@ -4,12 +4,12 @@ import React, { useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './MessageBodyReadMore.dom.js'; -import { MessageBodyReadMore } from './MessageBodyReadMore.dom.js'; -import type { HydratedBodyRangesType } from '../../types/BodyRange.std.js'; -import { BodyRange } from '../../types/BodyRange.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { RenderLocation } from './MessageTextRenderer.dom.js'; +import type { Props } from './MessageBodyReadMore.dom.tsx'; +import { MessageBodyReadMore } from './MessageBodyReadMore.dom.tsx'; +import type { HydratedBodyRangesType } from '../../types/BodyRange.std.ts'; +import { BodyRange } from '../../types/BodyRange.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { RenderLocation } from './MessageTextRenderer.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/MessageBodyReadMore.dom.tsx b/ts/components/conversation/MessageBodyReadMore.dom.tsx index e0aa072e49..352a301289 100644 --- a/ts/components/conversation/MessageBodyReadMore.dom.tsx +++ b/ts/components/conversation/MessageBodyReadMore.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import type { Props as MessageBodyPropsType } from './MessageBody.dom.js'; -import { MessageBody } from './MessageBody.dom.js'; -import { graphemeAndLinkAwareSlice } from '../../util/graphemeAndLinkAwareSlice.std.js'; -import { shouldLinkifyMessage } from '../../types/LinkPreview.std.js'; +import type { Props as MessageBodyPropsType } from './MessageBody.dom.tsx'; +import { MessageBody } from './MessageBody.dom.tsx'; +import { graphemeAndLinkAwareSlice } from '../../util/graphemeAndLinkAwareSlice.std.ts'; +import { shouldLinkifyMessage } from '../../types/LinkPreview.std.ts'; export type Props = Pick< MessageBodyPropsType, diff --git a/ts/components/conversation/MessageContextMenu.dom.tsx b/ts/components/conversation/MessageContextMenu.dom.tsx index e6175e6fd0..b3e57ba13b 100644 --- a/ts/components/conversation/MessageContextMenu.dom.tsx +++ b/ts/components/conversation/MessageContextMenu.dom.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useRef, type ReactNode } from 'react'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import { AxoMenuBuilder } from '../../axo/AxoMenuBuilder.dom.js'; -import { isInternalFeaturesEnabled } from '../../util/isInternalFeaturesEnabled.dom.js'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import { AxoMenuBuilder } from '../../axo/AxoMenuBuilder.dom.tsx'; +import { isInternalFeaturesEnabled } from '../../util/isInternalFeaturesEnabled.dom.ts'; type MessageContextMenuProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/conversation/MessageDetail.dom.stories.tsx b/ts/components/conversation/MessageDetail.dom.stories.tsx index 5ed0d08479..2fbd5061ff 100644 --- a/ts/components/conversation/MessageDetail.dom.stories.tsx +++ b/ts/components/conversation/MessageDetail.dom.stories.tsx @@ -4,15 +4,15 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsData as MessageDataPropsType } from './Message.dom.js'; -import { TextDirection } from './Message.dom.js'; -import type { Props } from './MessageDetail.dom.js'; -import { MessageDetail } from './MessageDetail.dom.js'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { getFakeBadge } from '../../test-helpers/getFakeBadge.std.js'; -import { ThemeType } from '../../types/Util.std.js'; +import type { PropsData as MessageDataPropsType } from './Message.dom.tsx'; +import { TextDirection } from './Message.dom.tsx'; +import type { Props } from './MessageDetail.dom.tsx'; +import { MessageDetail } from './MessageDetail.dom.tsx'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { getFakeBadge } from '../../test-helpers/getFakeBadge.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/MessageDetail.dom.tsx b/ts/components/conversation/MessageDetail.dom.tsx index 119c461340..42394d3e37 100644 --- a/ts/components/conversation/MessageDetail.dom.tsx +++ b/ts/components/conversation/MessageDetail.dom.tsx @@ -6,36 +6,36 @@ import React, { useRef } from 'react'; import classNames from 'classnames'; import lodash from 'lodash'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { ContextMenu } from '../ContextMenu.dom.js'; -import { Time } from '../Time.dom.js'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { ContextMenu } from '../ContextMenu.dom.tsx'; +import { Time } from '../Time.dom.tsx'; import type { Props as MessagePropsType, PropsData as MessagePropsDataType, -} from './Message.dom.js'; -import { Message, MessageInteractivity } from './Message.dom.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; -import { groupBy } from '../../util/mapUtil.std.js'; -import type { ContactNameColorType } from '../../types/Colors.std.js'; +} from './Message.dom.tsx'; +import { Message, MessageInteractivity } from './Message.dom.tsx'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; +import { groupBy } from '../../util/mapUtil.std.ts'; +import type { ContactNameColorType } from '../../types/Colors.std.ts'; import { SendStatus, type VisibleSendStatus, -} from '../../messages/MessageSendState.std.js'; -import { WidthBreakpoint } from '../_util.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { formatDateTimeLong } from '../../util/formatTimestamp.dom.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import { format as formatRelativeTime } from '../../util/expirationTimer.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { PanelRow } from './conversation-details/PanelRow.dom.js'; -import { PanelSection } from './conversation-details/PanelSection.dom.js'; +} from '../../messages/MessageSendState.std.ts'; +import { WidthBreakpoint } from '../_util.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { formatDateTimeLong } from '../../util/formatTimestamp.dom.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import { format as formatRelativeTime } from '../../util/expirationTimer.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { PanelRow } from './conversation-details/PanelRow.dom.tsx'; +import { PanelSection } from './conversation-details/PanelSection.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './conversation-details/ConversationDetailsIcon.dom.js'; +} from './conversation-details/ConversationDetailsIcon.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/conversation/MessageMetadata.dom.tsx b/ts/components/conversation/MessageMetadata.dom.tsx index c2cbe622a6..8c6f005192 100644 --- a/ts/components/conversation/MessageMetadata.dom.tsx +++ b/ts/components/conversation/MessageMetadata.dom.tsx @@ -5,22 +5,22 @@ import type { ReactNode } from 'react'; import React, { forwardRef, useCallback, useState } from 'react'; import classNames from 'classnames'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { MessageStatusType } from '../../types/message/MessageStatus.std.js'; -import type { DirectionType } from './Message.dom.js'; -import type { PushPanelForConversationActionType } from '../../state/ducks/conversations.preload.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { ExpireTimer } from './ExpireTimer.dom.js'; -import { MessageTimestamp } from './MessageTimestamp.dom.js'; -import { PanelType } from '../../types/Panels.std.js'; -import { Spinner } from '../Spinner.dom.js'; -import { AxoAlertDialog } from '../../axo/AxoAlertDialog.dom.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { refMerger } from '../../util/refMerger.std.js'; -import type { Size } from '../../hooks/useSizeObserver.dom.js'; -import { SizeObserver } from '../../hooks/useSizeObserver.dom.js'; -import { AxoSymbol } from '../../axo/AxoSymbol.dom.js'; -import { tw } from '../../axo/tw.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { MessageStatusType } from '../../types/message/MessageStatus.std.ts'; +import type { DirectionType } from './Message.dom.tsx'; +import type { PushPanelForConversationActionType } from '../../state/ducks/conversations.preload.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { ExpireTimer } from './ExpireTimer.dom.tsx'; +import { MessageTimestamp } from './MessageTimestamp.dom.tsx'; +import { PanelType } from '../../types/Panels.std.ts'; +import { Spinner } from '../Spinner.dom.tsx'; +import { AxoAlertDialog } from '../../axo/AxoAlertDialog.dom.tsx'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { refMerger } from '../../util/refMerger.std.ts'; +import type { Size } from '../../hooks/useSizeObserver.dom.tsx'; +import { SizeObserver } from '../../hooks/useSizeObserver.dom.tsx'; +import { AxoSymbol } from '../../axo/AxoSymbol.dom.tsx'; +import { tw } from '../../axo/tw.dom.tsx'; type PropsType = { canRetryDeleteForEveryone: boolean; diff --git a/ts/components/conversation/MessageRequestActions.dom.stories.tsx b/ts/components/conversation/MessageRequestActions.dom.stories.tsx index fd60986b55..e3658c6a8b 100644 --- a/ts/components/conversation/MessageRequestActions.dom.stories.tsx +++ b/ts/components/conversation/MessageRequestActions.dom.stories.tsx @@ -4,11 +4,11 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { MessageRequestActions } from './MessageRequestActions.dom.js'; +import { MessageRequestActions } from './MessageRequestActions.dom.tsx'; import { getDefaultConversation, getDefaultGroup, -} from '../../test-helpers/getDefaultConversation.std.js'; +} from '../../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/MessageRequestActions.dom.tsx b/ts/components/conversation/MessageRequestActions.dom.tsx index e8ec0c5c67..7d2c1deef3 100644 --- a/ts/components/conversation/MessageRequestActions.dom.tsx +++ b/ts/components/conversation/MessageRequestActions.dom.tsx @@ -2,20 +2,20 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import { ContactName } from './ContactName.dom.js'; -import { Button, ButtonVariant } from '../Button.dom.js'; -import type { MessageRequestActionsConfirmationProps } from './MessageRequestActionsConfirmation.dom.js'; +import { ContactName } from './ContactName.dom.tsx'; +import { Button, ButtonVariant } from '../Button.dom.tsx'; +import type { MessageRequestActionsConfirmationProps } from './MessageRequestActionsConfirmation.dom.tsx'; import { MessageRequestActionsConfirmation, MessageRequestState, -} from './MessageRequestActionsConfirmation.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from './MessageRequestActionsConfirmation.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; import { useSharedGroupNamesOnMount, type GetSharedGroupNamesType, -} from '../../util/sharedGroupNames.dom.js'; +} from '../../util/sharedGroupNames.dom.ts'; export type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/MessageRequestActionsConfirmation.dom.tsx b/ts/components/conversation/MessageRequestActionsConfirmation.dom.tsx index 3291f4aaae..1defb46065 100644 --- a/ts/components/conversation/MessageRequestActionsConfirmation.dom.tsx +++ b/ts/components/conversation/MessageRequestActionsConfirmation.dom.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import type { ContactNameData } from './ContactName.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { ContactNameData } from './ContactName.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; export enum MessageRequestState { blocking, diff --git a/ts/components/conversation/MessageRequestResponseNotification.dom.tsx b/ts/components/conversation/MessageRequestResponseNotification.dom.tsx index f53e1c18da..bd0bbeee7d 100644 --- a/ts/components/conversation/MessageRequestResponseNotification.dom.tsx +++ b/ts/components/conversation/MessageRequestResponseNotification.dom.tsx @@ -1,12 +1,12 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import { MessageRequestState } from './MessageRequestActionsConfirmation.dom.js'; -import { SafetyTipsModal } from '../SafetyTipsModal.dom.js'; -import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.js'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import { MessageRequestState } from './MessageRequestActionsConfirmation.dom.tsx'; +import { SafetyTipsModal } from '../SafetyTipsModal.dom.tsx'; +import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.ts'; export type MessageRequestResponseNotificationData = { messageRequestResponseEvent: MessageRequestResponseEvent; diff --git a/ts/components/conversation/MessageTextRenderer.dom.tsx b/ts/components/conversation/MessageTextRenderer.dom.tsx index c7c0e51039..260a0ed634 100644 --- a/ts/components/conversation/MessageTextRenderer.dom.tsx +++ b/ts/components/conversation/MessageTextRenderer.dom.tsx @@ -7,25 +7,25 @@ import classNames from 'classnames'; import emojiRegex from 'emoji-regex'; import lodash from 'lodash'; -import { linkify, SUPPORTED_PROTOCOLS } from './Linkify.dom.js'; +import { linkify, SUPPORTED_PROTOCOLS } from './Linkify.dom.tsx'; import type { BodyRangesForDisplayType, DisplayNode, HydratedBodyRangeMention, RangeNode, -} from '../../types/BodyRange.std.js'; +} from '../../types/BodyRange.std.ts'; import { BodyRange, insertRange, collapseRangeTree, groupContiguousSpoilers, -} from '../../types/BodyRange.std.js'; -import { AtMention } from './AtMention.dom.js'; -import { isLinkSneaky } from '../../types/LinkPreview.std.js'; -import { Emojify } from './Emojify.dom.js'; -import { AddNewLines } from './AddNewLines.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { FunJumboEmojiSize } from '../fun/FunEmoji.dom.js'; +} from '../../types/BodyRange.std.ts'; +import { AtMention } from './AtMention.dom.tsx'; +import { isLinkSneaky } from '../../types/LinkPreview.std.ts'; +import { Emojify } from './Emojify.dom.tsx'; +import { AddNewLines } from './AddNewLines.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { FunJumboEmojiSize } from '../fun/FunEmoji.dom.tsx'; const { sortBy } = lodash; diff --git a/ts/components/conversation/MessageTimestamp.dom.stories.tsx b/ts/components/conversation/MessageTimestamp.dom.stories.tsx index 19686f9f71..ce4b717287 100644 --- a/ts/components/conversation/MessageTimestamp.dom.stories.tsx +++ b/ts/components/conversation/MessageTimestamp.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './MessageTimestamp.dom.js'; -import { MessageTimestamp } from './MessageTimestamp.dom.js'; +import type { Props } from './MessageTimestamp.dom.tsx'; +import { MessageTimestamp } from './MessageTimestamp.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/MessageTimestamp.dom.tsx b/ts/components/conversation/MessageTimestamp.dom.tsx index 1d8ef287d5..ab4d7d1998 100644 --- a/ts/components/conversation/MessageTimestamp.dom.tsx +++ b/ts/components/conversation/MessageTimestamp.dom.tsx @@ -5,11 +5,11 @@ import type { ReactElement } from 'react'; import React from 'react'; import classNames from 'classnames'; -import { formatTime } from '../../util/formatTimestamp.dom.js'; +import { formatTime } from '../../util/formatTimestamp.dom.ts'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { Time } from '../Time.dom.js'; -import { useNowThatUpdatesEveryMinute } from '../../hooks/useNowThatUpdatesEveryMinute.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { Time } from '../Time.dom.tsx'; +import { useNowThatUpdatesEveryMinute } from '../../hooks/useNowThatUpdatesEveryMinute.std.ts'; export type Props = { direction?: 'incoming' | 'outgoing'; diff --git a/ts/components/conversation/PaymentEventNotification.dom.tsx b/ts/components/conversation/PaymentEventNotification.dom.tsx index 2d3e0c57bb..4381f0b4ed 100644 --- a/ts/components/conversation/PaymentEventNotification.dom.tsx +++ b/ts/components/conversation/PaymentEventNotification.dom.tsx @@ -3,12 +3,12 @@ import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { Emojify } from './Emojify.dom.js'; -import type { AnyPaymentEvent } from '../../types/Payment.std.js'; -import { getPaymentEventDescription } from '../../messages/payments.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { Emojify } from './Emojify.dom.tsx'; +import type { AnyPaymentEvent } from '../../types/Payment.std.ts'; +import { getPaymentEventDescription } from '../../messages/payments.std.ts'; export type PropsType = { event: AnyPaymentEvent; diff --git a/ts/components/conversation/PhoneNumberDiscoveryNotification.dom.stories.tsx b/ts/components/conversation/PhoneNumberDiscoveryNotification.dom.stories.tsx index ed5b1d1e65..fe27241582 100644 --- a/ts/components/conversation/PhoneNumberDiscoveryNotification.dom.stories.tsx +++ b/ts/components/conversation/PhoneNumberDiscoveryNotification.dom.stories.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './PhoneNumberDiscoveryNotification.dom.js'; -import { PhoneNumberDiscoveryNotification } from './PhoneNumberDiscoveryNotification.dom.js'; -import type { GetSharedGroupNamesType } from '../../util/sharedGroupNames.dom.js'; +import type { PropsType } from './PhoneNumberDiscoveryNotification.dom.tsx'; +import { PhoneNumberDiscoveryNotification } from './PhoneNumberDiscoveryNotification.dom.tsx'; +import type { GetSharedGroupNamesType } from '../../util/sharedGroupNames.dom.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/PhoneNumberDiscoveryNotification.dom.tsx b/ts/components/conversation/PhoneNumberDiscoveryNotification.dom.tsx index e272c4afd9..e823a90f2e 100644 --- a/ts/components/conversation/PhoneNumberDiscoveryNotification.dom.tsx +++ b/ts/components/conversation/PhoneNumberDiscoveryNotification.dom.tsx @@ -3,14 +3,14 @@ import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { Emojify } from './Emojify.dom.js'; -import { getStringForPhoneNumberDiscovery } from '../../util/getStringForPhoneNumberDiscovery.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { Emojify } from './Emojify.dom.tsx'; +import { getStringForPhoneNumberDiscovery } from '../../util/getStringForPhoneNumberDiscovery.std.ts'; import { useSharedGroupNamesOnMount, type GetSharedGroupNamesType, -} from '../../util/sharedGroupNames.dom.js'; +} from '../../util/sharedGroupNames.dom.ts'; export type PropsDataType = { conversationId: string; diff --git a/ts/components/conversation/PollTerminateNotification.dom.tsx b/ts/components/conversation/PollTerminateNotification.dom.tsx index 2694867732..fb1af0142f 100644 --- a/ts/components/conversation/PollTerminateNotification.dom.tsx +++ b/ts/components/conversation/PollTerminateNotification.dom.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { Button, ButtonVariant, ButtonSize } from '../Button.dom.js'; -import { UserText } from '../UserText.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { Button, ButtonVariant, ButtonSize } from '../Button.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; export type PollTerminateNotificationDataType = { sender: ConversationType; diff --git a/ts/components/conversation/ProfileChangeNotification.dom.stories.tsx b/ts/components/conversation/ProfileChangeNotification.dom.stories.tsx index e98519bd76..1ecdc9b7e4 100644 --- a/ts/components/conversation/ProfileChangeNotification.dom.stories.tsx +++ b/ts/components/conversation/ProfileChangeNotification.dom.stories.tsx @@ -4,9 +4,9 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import type { PropsType } from './ProfileChangeNotification.dom.js'; -import { ProfileChangeNotification } from './ProfileChangeNotification.dom.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import type { PropsType } from './ProfileChangeNotification.dom.tsx'; +import { ProfileChangeNotification } from './ProfileChangeNotification.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ProfileChangeNotification.dom.tsx b/ts/components/conversation/ProfileChangeNotification.dom.tsx index 64ededda4d..7afcf5bda6 100644 --- a/ts/components/conversation/ProfileChangeNotification.dom.tsx +++ b/ts/components/conversation/ProfileChangeNotification.dom.tsx @@ -3,13 +3,13 @@ import React, { useCallback } from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { Emojify } from './Emojify.dom.js'; -import type { ProfileNameChangeType } from '../../util/getStringForProfileChange.std.js'; -import { getStringForProfileChange } from '../../util/getStringForProfileChange.std.js'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { Emojify } from './Emojify.dom.tsx'; +import type { ProfileNameChangeType } from '../../util/getStringForProfileChange.std.ts'; +import { getStringForProfileChange } from '../../util/getStringForProfileChange.std.ts'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; export type PropsType = { change: ProfileNameChangeType; diff --git a/ts/components/conversation/ProfileNameWarningModal.dom.stories.tsx b/ts/components/conversation/ProfileNameWarningModal.dom.stories.tsx index ce6ccc6051..b36f7fa3a7 100644 --- a/ts/components/conversation/ProfileNameWarningModal.dom.stories.tsx +++ b/ts/components/conversation/ProfileNameWarningModal.dom.stories.tsx @@ -3,9 +3,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from './ProfileNameWarningModal.dom.js'; -import { ProfileNameWarningModal } from './ProfileNameWarningModal.dom.js'; -import { type ComponentMeta } from '../../storybook/types.std.js'; +import type { PropsType } from './ProfileNameWarningModal.dom.tsx'; +import { ProfileNameWarningModal } from './ProfileNameWarningModal.dom.tsx'; +import { type ComponentMeta } from '../../storybook/types.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ProfileNameWarningModal.dom.tsx b/ts/components/conversation/ProfileNameWarningModal.dom.tsx index a98b98c52d..b9a3814647 100644 --- a/ts/components/conversation/ProfileNameWarningModal.dom.tsx +++ b/ts/components/conversation/ProfileNameWarningModal.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import { Modal } from '../Modal.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import { Modal } from '../Modal.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; export type PropsType = Readonly<{ conversationType: 'group' | 'direct'; diff --git a/ts/components/conversation/Quote.dom.stories.tsx b/ts/components/conversation/Quote.dom.stories.tsx index 811c988c8e..d6e583d329 100644 --- a/ts/components/conversation/Quote.dom.stories.tsx +++ b/ts/components/conversation/Quote.dom.stories.tsx @@ -6,11 +6,11 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; -import { ConversationColors } from '../../types/Colors.std.js'; -import { pngUrl } from '../../storybook/Fixtures.std.js'; -import type { Props as TimelineMessagesProps } from './TimelineMessage.dom.js'; -import { TimelineMessage } from './TimelineMessage.dom.js'; -import { MessageInteractivity, TextDirection } from './Message.dom.js'; +import { ConversationColors } from '../../types/Colors.std.ts'; +import { pngUrl } from '../../storybook/Fixtures.std.ts'; +import type { Props as TimelineMessagesProps } from './TimelineMessage.dom.tsx'; +import { TimelineMessage } from './TimelineMessage.dom.tsx'; +import { MessageInteractivity, TextDirection } from './Message.dom.tsx'; import { AUDIO_MP3, IMAGE_PNG, @@ -18,14 +18,14 @@ import { LONG_MESSAGE, VIDEO_MP4, stringToMIMEType, -} from '../../types/MIME.std.js'; -import type { Props } from './Quote.dom.js'; -import { Quote } from './Quote.dom.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { WidthBreakpoint } from '../_util.std.js'; -import { ThemeType } from '../../types/Util.std.js'; -import { PaymentEventKind } from '../../types/Payment.std.js'; +} from '../../types/MIME.std.ts'; +import type { Props } from './Quote.dom.tsx'; +import { Quote } from './Quote.dom.tsx'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { WidthBreakpoint } from '../_util.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import { PaymentEventKind } from '../../types/Payment.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/Quote.dom.tsx b/ts/components/conversation/Quote.dom.tsx index 49e954c350..f2185b535f 100644 --- a/ts/components/conversation/Quote.dom.tsx +++ b/ts/components/conversation/Quote.dom.tsx @@ -7,32 +7,32 @@ import classNames from 'classnames'; import type { ReactNode } from 'react'; -import * as MIME from '../../types/MIME.std.js'; -import * as GoogleChrome from '../../util/GoogleChrome.std.js'; -import { MessageBody } from './MessageBody.dom.js'; -import { ContactName, GroupMemberLabel } from './ContactName.dom.js'; -import { Emojify } from './Emojify.dom.js'; -import { TextAttachment } from '../TextAttachment.dom.js'; -import { getClassNamesFor } from '../../util/getClassNamesFor.std.js'; -import { getCustomColorStyle } from '../../util/getCustomColorStyle.dom.js'; -import { PaymentEventKind } from '../../types/Payment.std.js'; -import { getPaymentEventNotificationText } from '../../messages/payments.std.js'; -import { shouldTryToCopyFromQuotedMessage } from '../../messages/helpers.std.js'; -import { RenderLocation } from './MessageTextRenderer.dom.js'; +import * as MIME from '../../types/MIME.std.ts'; +import * as GoogleChrome from '../../util/GoogleChrome.std.ts'; +import { MessageBody } from './MessageBody.dom.tsx'; +import { ContactName, GroupMemberLabel } from './ContactName.dom.tsx'; +import { Emojify } from './Emojify.dom.tsx'; +import { TextAttachment } from '../TextAttachment.dom.tsx'; +import { getClassNamesFor } from '../../util/getClassNamesFor.std.ts'; +import { getCustomColorStyle } from '../../util/getCustomColorStyle.dom.ts'; +import { PaymentEventKind } from '../../types/Payment.std.ts'; +import { getPaymentEventNotificationText } from '../../messages/payments.std.ts'; +import { shouldTryToCopyFromQuotedMessage } from '../../messages/helpers.std.ts'; +import { RenderLocation } from './MessageTextRenderer.dom.tsx'; import type { AttachmentType, ThumbnailType, -} from '../../types/Attachment.std.js'; -import type { HydratedBodyRangesType } from '../../types/BodyRange.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +} from '../../types/Attachment.std.ts'; +import type { HydratedBodyRangesType } from '../../types/BodyRange.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; import type { ConversationColorType, CustomColorType, -} from '../../types/Colors.std.js'; -import type { AnyPaymentEvent } from '../../types/Payment.std.js'; +} from '../../types/Colors.std.ts'; +import type { AnyPaymentEvent } from '../../types/Payment.std.ts'; import type { QuotedAttachmentType } from '../../model-types.d.ts'; -import type { MemberLabelType } from '../../types/GroupMemberLabels.std.js'; +import type { MemberLabelType } from '../../types/GroupMemberLabels.std.ts'; const { noop } = lodash; diff --git a/ts/components/conversation/ReactionPicker.dom.stories.tsx b/ts/components/conversation/ReactionPicker.dom.stories.tsx index 37eeb68c25..eda1d8dc44 100644 --- a/ts/components/conversation/ReactionPicker.dom.stories.tsx +++ b/ts/components/conversation/ReactionPicker.dom.stories.tsx @@ -4,9 +4,9 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props as ReactionPickerProps } from './ReactionPicker.dom.js'; -import { ReactionPicker } from './ReactionPicker.dom.js'; -import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../../reactions/constants.std.js'; +import type { Props as ReactionPickerProps } from './ReactionPicker.dom.tsx'; +import { ReactionPicker } from './ReactionPicker.dom.tsx'; +import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../../reactions/constants.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ReactionPicker.dom.tsx b/ts/components/conversation/ReactionPicker.dom.tsx index c42056dd51..7d9c51c464 100644 --- a/ts/components/conversation/ReactionPicker.dom.tsx +++ b/ts/components/conversation/ReactionPicker.dom.tsx @@ -3,17 +3,17 @@ import React, { useCallback, useState, useEffect } from 'react'; import { Button } from 'react-aria-components'; -import { useDelayedRestoreFocus } from '../../hooks/useRestoreFocus.dom.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; +import { useDelayedRestoreFocus } from '../../hooks/useRestoreFocus.dom.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; import { ReactionPickerPicker, ReactionPickerPickerEmojiButton, ReactionPickerPickerStyle, -} from '../ReactionPickerPicker.dom.js'; -import type { EmojiVariantKey } from '../fun/data/emojis.std.js'; -import { getEmojiVariantByKey } from '../fun/data/emojis.std.js'; -import { FunEmojiPicker } from '../fun/FunEmojiPicker.dom.js'; -import type { FunEmojiSelection } from '../fun/panels/FunPanelEmojis.dom.js'; +} from '../ReactionPickerPicker.dom.tsx'; +import type { EmojiVariantKey } from '../fun/data/emojis.std.ts'; +import { getEmojiVariantByKey } from '../fun/data/emojis.std.ts'; +import { FunEmojiPicker } from '../fun/FunEmojiPicker.dom.tsx'; +import type { FunEmojiSelection } from '../fun/panels/FunPanelEmojis.dom.tsx'; export type OwnProps = { i18n: LocalizerType; diff --git a/ts/components/conversation/ReactionViewer.dom.stories.tsx b/ts/components/conversation/ReactionViewer.dom.stories.tsx index 6ab45618a5..a078baa4c0 100644 --- a/ts/components/conversation/ReactionViewer.dom.stories.tsx +++ b/ts/components/conversation/ReactionViewer.dom.stories.tsx @@ -4,10 +4,10 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './ReactionViewer.dom.js'; -import { ReactionViewer } from './ReactionViewer.dom.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { ThemeType } from '../../types/Util.std.js'; +import type { Props } from './ReactionViewer.dom.tsx'; +import { ReactionViewer } from './ReactionViewer.dom.tsx'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ReactionViewer.dom.tsx b/ts/components/conversation/ReactionViewer.dom.tsx index 345a577ce5..2b6cc98802 100644 --- a/ts/components/conversation/ReactionViewer.dom.tsx +++ b/ts/components/conversation/ReactionViewer.dom.tsx @@ -4,18 +4,18 @@ import * as React from 'react'; import lodash from 'lodash'; import classNames from 'classnames'; -import { ContactName } from './ContactName.dom.js'; -import type { Props as AvatarProps } from '../Avatar.dom.js'; -import { Avatar } from '../Avatar.dom.js'; -import { useRestoreFocus } from '../../hooks/useRestoreFocus.dom.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; -import { useEscapeHandling } from '../../hooks/useEscapeHandling.dom.js'; -import type { ThemeType } from '../../types/Util.std.js'; +import { ContactName } from './ContactName.dom.tsx'; +import type { Props as AvatarProps } from '../Avatar.dom.tsx'; +import { Avatar } from '../Avatar.dom.tsx'; +import { useRestoreFocus } from '../../hooks/useRestoreFocus.dom.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; +import { useEscapeHandling } from '../../hooks/useEscapeHandling.dom.ts'; +import type { ThemeType } from '../../types/Util.std.ts'; import type { EmojiParentKey, EmojiVariantKey, -} from '../fun/data/emojis.std.js'; +} from '../fun/data/emojis.std.ts'; import { EMOJI_PARENT_KEY_CONSTANTS, getEmojiDebugLabel, @@ -23,11 +23,11 @@ import { getEmojiVariantByKey, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from '../fun/data/emojis.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { FunStaticEmoji } from '../fun/FunEmoji.dom.js'; -import { useFunEmojiLocalizer } from '../fun/useFunEmojiLocalizer.dom.js'; -import { createLogger } from '../../logging/log.std.js'; +} from '../fun/data/emojis.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { FunStaticEmoji } from '../fun/FunEmoji.dom.tsx'; +import { useFunEmojiLocalizer } from '../fun/useFunEmojiLocalizer.dom.tsx'; +import { createLogger } from '../../logging/log.std.ts'; const { mapValues, orderBy } = lodash; diff --git a/ts/components/conversation/RemoveGroupMemberConfirmationDialog.dom.tsx b/ts/components/conversation/RemoveGroupMemberConfirmationDialog.dom.tsx index cd8fd0990b..380a51daf1 100644 --- a/ts/components/conversation/RemoveGroupMemberConfirmationDialog.dom.tsx +++ b/ts/components/conversation/RemoveGroupMemberConfirmationDialog.dom.tsx @@ -3,13 +3,13 @@ import React from 'react'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { isAccessControlEnabled } from '../../groups/util.std.js'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { isAccessControlEnabled } from '../../groups/util.std.ts'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { I18n } from '../I18n.dom.js'; -import { ContactName } from './ContactName.dom.js'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; type PropsType = { group: ConversationType; diff --git a/ts/components/conversation/ResetSessionNotification.dom.stories.tsx b/ts/components/conversation/ResetSessionNotification.dom.stories.tsx index 5534067e6c..0d557dc1bb 100644 --- a/ts/components/conversation/ResetSessionNotification.dom.stories.tsx +++ b/ts/components/conversation/ResetSessionNotification.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './ResetSessionNotification.dom.js'; -import { ResetSessionNotification } from './ResetSessionNotification.dom.js'; +import type { Props } from './ResetSessionNotification.dom.tsx'; +import { ResetSessionNotification } from './ResetSessionNotification.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ResetSessionNotification.dom.tsx b/ts/components/conversation/ResetSessionNotification.dom.tsx index fbc31864cc..069dc0795a 100644 --- a/ts/components/conversation/ResetSessionNotification.dom.tsx +++ b/ts/components/conversation/ResetSessionNotification.dom.tsx @@ -3,8 +3,8 @@ import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { SystemMessage } from './SystemMessage.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { SystemMessage } from './SystemMessage.dom.tsx'; export type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/SafetyNumberNotification.dom.stories.tsx b/ts/components/conversation/SafetyNumberNotification.dom.stories.tsx index d795eb5dac..5413e57801 100644 --- a/ts/components/conversation/SafetyNumberNotification.dom.stories.tsx +++ b/ts/components/conversation/SafetyNumberNotification.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { ContactType, Props } from './SafetyNumberNotification.dom.js'; -import { SafetyNumberNotification } from './SafetyNumberNotification.dom.js'; +import type { ContactType, Props } from './SafetyNumberNotification.dom.tsx'; +import { SafetyNumberNotification } from './SafetyNumberNotification.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/SafetyNumberNotification.dom.tsx b/ts/components/conversation/SafetyNumberNotification.dom.tsx index 3d825b8d16..4585555871 100644 --- a/ts/components/conversation/SafetyNumberNotification.dom.tsx +++ b/ts/components/conversation/SafetyNumberNotification.dom.tsx @@ -3,11 +3,11 @@ import React from 'react'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; export type ContactType = { id: string; diff --git a/ts/components/conversation/ScrollDownButton.dom.stories.tsx b/ts/components/conversation/ScrollDownButton.dom.stories.tsx index c34e46aff1..8bba9b3da1 100644 --- a/ts/components/conversation/ScrollDownButton.dom.stories.tsx +++ b/ts/components/conversation/ScrollDownButton.dom.stories.tsx @@ -5,11 +5,11 @@ import * as React from 'react'; import type { Meta, StoryFn } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import type { ScrollDownButtonPropsType } from './ScrollDownButton.dom.js'; +import type { ScrollDownButtonPropsType } from './ScrollDownButton.dom.tsx'; import { ScrollDownButton, ScrollDownButtonVariant, -} from './ScrollDownButton.dom.js'; +} from './ScrollDownButton.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/ScrollDownButton.dom.tsx b/ts/components/conversation/ScrollDownButton.dom.tsx index b1cdb17229..606c704496 100644 --- a/ts/components/conversation/ScrollDownButton.dom.tsx +++ b/ts/components/conversation/ScrollDownButton.dom.tsx @@ -4,8 +4,8 @@ import classNames from 'classnames'; import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { getClassNamesFor } from '../../util/getClassNamesFor.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { getClassNamesFor } from '../../util/getClassNamesFor.std.ts'; export enum ScrollDownButtonVariant { UNREAD_MESSAGES = 'unread-messages', diff --git a/ts/components/conversation/SelectModeActions.dom.tsx b/ts/components/conversation/SelectModeActions.dom.tsx index afb2416903..22164c976c 100644 --- a/ts/components/conversation/SelectModeActions.dom.tsx +++ b/ts/components/conversation/SelectModeActions.dom.tsx @@ -3,9 +3,9 @@ import classNames from 'classnames'; import React from 'react'; -import type { ShowToastAction } from '../../state/ducks/toast.preload.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { ShowToastAction } from '../../state/ducks/toast.preload.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; // Keep this in sync with iOS and Android const MAX_FORWARD_COUNT = 30; diff --git a/ts/components/conversation/SignalConversationMuteToggle.dom.tsx b/ts/components/conversation/SignalConversationMuteToggle.dom.tsx index 3cac5fd6dd..f5468ac114 100644 --- a/ts/components/conversation/SignalConversationMuteToggle.dom.tsx +++ b/ts/components/conversation/SignalConversationMuteToggle.dom.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../../types/I18N.std.js'; +import type { LocalizerType } from '../../types/I18N.std.ts'; type Props = { isMuted: boolean; diff --git a/ts/components/conversation/StagedGenericAttachment.dom.stories.tsx b/ts/components/conversation/StagedGenericAttachment.dom.stories.tsx index 8493edf558..a9399ee16a 100644 --- a/ts/components/conversation/StagedGenericAttachment.dom.stories.tsx +++ b/ts/components/conversation/StagedGenericAttachment.dom.stories.tsx @@ -4,10 +4,10 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import { stringToMIMEType } from '../../types/MIME.std.js'; -import type { Props } from './StagedGenericAttachment.dom.js'; -import { StagedGenericAttachment } from './StagedGenericAttachment.dom.js'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import { stringToMIMEType } from '../../types/MIME.std.ts'; +import type { Props } from './StagedGenericAttachment.dom.tsx'; +import { StagedGenericAttachment } from './StagedGenericAttachment.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/StagedGenericAttachment.dom.tsx b/ts/components/conversation/StagedGenericAttachment.dom.tsx index 5587995a2f..7918f503f1 100644 --- a/ts/components/conversation/StagedGenericAttachment.dom.tsx +++ b/ts/components/conversation/StagedGenericAttachment.dom.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { FileThumbnail } from '../FileThumbnail.dom.js'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { FileThumbnail } from '../FileThumbnail.dom.tsx'; export type Props = { attachment: AttachmentType; diff --git a/ts/components/conversation/StagedLinkPreview.dom.stories.tsx b/ts/components/conversation/StagedLinkPreview.dom.stories.tsx index 900dffb36a..40a57aac86 100644 --- a/ts/components/conversation/StagedLinkPreview.dom.stories.tsx +++ b/ts/components/conversation/StagedLinkPreview.dom.stories.tsx @@ -5,10 +5,10 @@ import type { Meta, StoryFn } from '@storybook/react'; import * as React from 'react'; import { action } from '@storybook/addon-actions'; -import type { Props } from './StagedLinkPreview.dom.js'; -import { StagedLinkPreview } from './StagedLinkPreview.dom.js'; -import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js'; -import { IMAGE_JPEG } from '../../types/MIME.std.js'; +import type { Props } from './StagedLinkPreview.dom.tsx'; +import { StagedLinkPreview } from './StagedLinkPreview.dom.tsx'; +import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts'; +import { IMAGE_JPEG } from '../../types/MIME.std.ts'; const LONG_TITLE = "This is a super-sweet site. And it's got some really amazing content in store for you if you just click that link. Can you click that link for me?"; diff --git a/ts/components/conversation/StagedLinkPreview.dom.tsx b/ts/components/conversation/StagedLinkPreview.dom.tsx index e81ae7d568..91b57d924e 100644 --- a/ts/components/conversation/StagedLinkPreview.dom.tsx +++ b/ts/components/conversation/StagedLinkPreview.dom.tsx @@ -5,17 +5,17 @@ import React from 'react'; import classNames from 'classnames'; import lodash from 'lodash'; -import { CurveType, Image } from './Image.dom.js'; -import { LinkPreviewDate } from './LinkPreviewDate.dom.js'; +import { CurveType, Image } from './Image.dom.tsx'; +import { LinkPreviewDate } from './LinkPreviewDate.dom.tsx'; -import type { LinkPreviewForUIType } from '../../types/message/LinkPreviews.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { getClassNamesFor } from '../../util/getClassNamesFor.std.js'; -import { isImageAttachment } from '../../util/Attachment.std.js'; -import { isCallLink } from '../../types/LinkPreview.std.js'; -import { Avatar } from '../Avatar.dom.js'; -import { getColorForCallLink } from '../../util/getColorForCallLink.std.js'; -import { getKeyFromCallLink } from '../../util/callLinks.std.js'; +import type { LinkPreviewForUIType } from '../../types/message/LinkPreviews.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { getClassNamesFor } from '../../util/getClassNamesFor.std.ts'; +import { isImageAttachment } from '../../util/Attachment.std.ts'; +import { isCallLink } from '../../types/LinkPreview.std.ts'; +import { Avatar } from '../Avatar.dom.tsx'; +import { getColorForCallLink } from '../../util/getColorForCallLink.std.ts'; +import { getKeyFromCallLink } from '../../util/callLinks.std.ts'; const { unescape } = lodash; diff --git a/ts/components/conversation/StagedPlaceholderAttachment.dom.stories.tsx b/ts/components/conversation/StagedPlaceholderAttachment.dom.stories.tsx index d5399a3dcd..0089b8504d 100644 --- a/ts/components/conversation/StagedPlaceholderAttachment.dom.stories.tsx +++ b/ts/components/conversation/StagedPlaceholderAttachment.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './StagedPlaceholderAttachment.dom.js'; -import { StagedPlaceholderAttachment } from './StagedPlaceholderAttachment.dom.js'; +import type { Props } from './StagedPlaceholderAttachment.dom.tsx'; +import { StagedPlaceholderAttachment } from './StagedPlaceholderAttachment.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/StagedPlaceholderAttachment.dom.tsx b/ts/components/conversation/StagedPlaceholderAttachment.dom.tsx index ebfe6ecf97..3a551c414a 100644 --- a/ts/components/conversation/StagedPlaceholderAttachment.dom.tsx +++ b/ts/components/conversation/StagedPlaceholderAttachment.dom.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; export type Props = { onClick: () => void; diff --git a/ts/components/conversation/SystemMessage.dom.stories.tsx b/ts/components/conversation/SystemMessage.dom.stories.tsx index 6f1d204c1c..37ceee2b9a 100644 --- a/ts/components/conversation/SystemMessage.dom.stories.tsx +++ b/ts/components/conversation/SystemMessage.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './SystemMessage.dom.js'; -import { SystemMessage, SystemMessageKind } from './SystemMessage.dom.js'; +import type { PropsType } from './SystemMessage.dom.tsx'; +import { SystemMessage, SystemMessageKind } from './SystemMessage.dom.tsx'; export default { title: 'Components/Conversation/SystemMessage', diff --git a/ts/components/conversation/SystemMessage.dom.tsx b/ts/components/conversation/SystemMessage.dom.tsx index bd233943e8..07d8f134e5 100644 --- a/ts/components/conversation/SystemMessage.dom.tsx +++ b/ts/components/conversation/SystemMessage.dom.tsx @@ -4,9 +4,9 @@ import type { ReactNode } from 'react'; import React, { forwardRef } from 'react'; import classNames from 'classnames'; -import { AxoSymbol } from '../../axo/AxoSymbol.dom.js'; -import type { AxoSymbolIconName } from '../../axo/_internal/AxoSymbolDefs.generated.std.js'; -import { tw } from '../../axo/tw.dom.js'; +import { AxoSymbol } from '../../axo/AxoSymbol.dom.tsx'; +import type { AxoSymbolIconName } from '../../axo/_internal/AxoSymbolDefs.generated.std.ts'; +import { tw } from '../../axo/tw.dom.tsx'; export enum SystemMessageKind { Normal = 'Normal', diff --git a/ts/components/conversation/Timeline.dom.stories.tsx b/ts/components/conversation/Timeline.dom.stories.tsx index c206e157d2..e2eb011710 100644 --- a/ts/components/conversation/Timeline.dom.stories.tsx +++ b/ts/components/conversation/Timeline.dom.stories.tsx @@ -5,21 +5,21 @@ import * as React from 'react'; import { v4 as uuid } from 'uuid'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import type { PropsType } from './Timeline.dom.js'; -import { Timeline } from './Timeline.dom.js'; -import type { TimelineItemType } from './TimelineItem.dom.js'; -import { TimelineItem } from './TimelineItem.dom.js'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import type { PropsType } from './Timeline.dom.tsx'; +import { Timeline } from './Timeline.dom.tsx'; +import type { TimelineItemType } from './TimelineItem.dom.tsx'; +import { TimelineItem } from './TimelineItem.dom.tsx'; import { StorybookThemeContext } from '../../../.storybook/StorybookThemeContext.std.js'; -import { ConversationHero } from './ConversationHero.dom.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { TypingBubble } from './TypingBubble.dom.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { ThemeType } from '../../types/Util.std.js'; -import { MessageInteractivity, TextDirection } from './Message.dom.js'; -import { PaymentEventKind } from '../../types/Payment.std.js'; -import type { PropsData as TimelineMessageProps } from './TimelineMessage.dom.js'; -import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.js'; +import { ConversationHero } from './ConversationHero.dom.tsx'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { TypingBubble } from './TypingBubble.dom.tsx'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import { MessageInteractivity, TextDirection } from './Message.dom.tsx'; +import { PaymentEventKind } from '../../types/Payment.std.ts'; +import type { PropsData as TimelineMessageProps } from './TimelineMessage.dom.tsx'; +import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/Timeline.dom.tsx b/ts/components/conversation/Timeline.dom.tsx index 23200d86cb..2f5adfc604 100644 --- a/ts/components/conversation/Timeline.dom.tsx +++ b/ts/components/conversation/Timeline.dom.tsx @@ -9,42 +9,42 @@ import React from 'react'; import { ScrollDownButton, ScrollDownButtonVariant, -} from './ScrollDownButton.dom.js'; +} from './ScrollDownButton.dom.tsx'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; -import { assertDev, strictAssert } from '../../util/assert.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { clearTimeoutIfNecessary } from '../../util/clearTimeoutIfNecessary.std.js'; -import { WidthBreakpoint } from '../_util.std.js'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; +import { assertDev, strictAssert } from '../../util/assert.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { clearTimeoutIfNecessary } from '../../util/clearTimeoutIfNecessary.std.ts'; +import { WidthBreakpoint } from '../_util.std.ts'; -import { ErrorBoundary } from './ErrorBoundary.dom.js'; -import { NewlyCreatedGroupInvitedContactsDialog } from '../NewlyCreatedGroupInvitedContactsDialog.dom.js'; -import type { PropsType as SmartContactSpoofingReviewDialogPropsType } from '../../state/smart/ContactSpoofingReviewDialog.preload.js'; -import { TimelineFloatingHeader } from './TimelineFloatingHeader.dom.js'; +import { ErrorBoundary } from './ErrorBoundary.dom.tsx'; +import { NewlyCreatedGroupInvitedContactsDialog } from '../NewlyCreatedGroupInvitedContactsDialog.dom.tsx'; +import type { PropsType as SmartContactSpoofingReviewDialogPropsType } from '../../state/smart/ContactSpoofingReviewDialog.preload.tsx'; +import { TimelineFloatingHeader } from './TimelineFloatingHeader.dom.tsx'; import { getScrollAnchorBeforeUpdate, getWidthBreakpoint, ScrollAnchor, TimelineMessageLoadingState, UnreadIndicatorPlacement, -} from '../../util/timelineUtil.std.js'; +} from '../../util/timelineUtil.std.ts'; import { getScrollBottom, scrollToBottom, setScrollBottom, -} from '../../util/scrollUtil.std.js'; -import { LastSeenIndicator } from './LastSeenIndicator.dom.js'; -import { MINUTE, SECOND } from '../../util/durations/index.std.js'; -import { SizeObserver } from '../../hooks/useSizeObserver.dom.js'; +} from '../../util/scrollUtil.std.ts'; +import { LastSeenIndicator } from './LastSeenIndicator.dom.tsx'; +import { MINUTE, SECOND } from '../../util/durations/index.std.ts'; +import { SizeObserver } from '../../hooks/useSizeObserver.dom.tsx'; import { createScrollerLock, ScrollerLockContext, -} from '../../hooks/useScrollLock.dom.js'; -import { MessageInteractivity } from './Message.dom.js'; -import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.js'; -import type { CollapseSet } from '../../util/CollapseSet.std.js'; +} from '../../hooks/useScrollLock.dom.tsx'; +import { MessageInteractivity } from './Message.dom.tsx'; +import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.tsx'; +import type { CollapseSet } from '../../util/CollapseSet.std.ts'; const { first, get, isNumber, last, throttle } = lodash; diff --git a/ts/components/conversation/TimelineDateHeader.dom.tsx b/ts/components/conversation/TimelineDateHeader.dom.tsx index 5d3cd9a98f..9234f3b662 100644 --- a/ts/components/conversation/TimelineDateHeader.dom.tsx +++ b/ts/components/conversation/TimelineDateHeader.dom.tsx @@ -4,10 +4,10 @@ import type { ReactElement } from 'react'; import React, { useEffect, useState } from 'react'; import classNames from 'classnames'; -import * as durations from '../../util/durations/index.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { formatDate } from '../../util/formatTimestamp.dom.js'; -import { Time } from '../Time.dom.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { formatDate } from '../../util/formatTimestamp.dom.ts'; +import { Time } from '../Time.dom.tsx'; export function TimelineDateHeader({ floating = false, diff --git a/ts/components/conversation/TimelineFloatingHeader.dom.stories.tsx b/ts/components/conversation/TimelineFloatingHeader.dom.stories.tsx index 1c93802d04..55c1eebb6a 100644 --- a/ts/components/conversation/TimelineFloatingHeader.dom.stories.tsx +++ b/ts/components/conversation/TimelineFloatingHeader.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './TimelineFloatingHeader.dom.js'; -import { TimelineFloatingHeader } from './TimelineFloatingHeader.dom.js'; +import type { PropsType } from './TimelineFloatingHeader.dom.tsx'; +import { TimelineFloatingHeader } from './TimelineFloatingHeader.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/TimelineFloatingHeader.dom.tsx b/ts/components/conversation/TimelineFloatingHeader.dom.tsx index 25f2d4b393..012eda87bb 100644 --- a/ts/components/conversation/TimelineFloatingHeader.dom.tsx +++ b/ts/components/conversation/TimelineFloatingHeader.dom.tsx @@ -6,10 +6,10 @@ import type { CSSProperties, ReactElement } from 'react'; import React, { useEffect, useState } from 'react'; import { animated, useSpring } from '@react-spring/web'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { drop } from '../../util/drop.std.js'; -import { TimelineDateHeader } from './TimelineDateHeader.dom.js'; -import { Spinner } from '../Spinner.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { TimelineDateHeader } from './TimelineDateHeader.dom.tsx'; +import { Spinner } from '../Spinner.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/conversation/TimelineItem.dom.stories.tsx b/ts/components/conversation/TimelineItem.dom.stories.tsx index 0b58e6ef38..e8e8e817d7 100644 --- a/ts/components/conversation/TimelineItem.dom.stories.tsx +++ b/ts/components/conversation/TimelineItem.dom.stories.tsx @@ -4,18 +4,18 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import type { PropsType as TimelineItemProps } from './TimelineItem.dom.js'; -import { TimelineItem } from './TimelineItem.dom.js'; -import { UniversalTimerNotification } from './UniversalTimerNotification.dom.js'; -import { CallMode } from '../../types/CallDisposition.std.js'; -import { AvatarColors } from '../../types/Colors.std.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { WidthBreakpoint } from '../_util.std.js'; -import { ThemeType } from '../../types/Util.std.js'; -import { PaymentEventKind } from '../../types/Payment.std.js'; -import { ErrorBoundary } from './ErrorBoundary.dom.js'; -import { MessageInteractivity } from './Message.dom.js'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import type { PropsType as TimelineItemProps } from './TimelineItem.dom.tsx'; +import { TimelineItem } from './TimelineItem.dom.tsx'; +import { UniversalTimerNotification } from './UniversalTimerNotification.dom.tsx'; +import { CallMode } from '../../types/CallDisposition.std.ts'; +import { AvatarColors } from '../../types/Colors.std.ts'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { WidthBreakpoint } from '../_util.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import { PaymentEventKind } from '../../types/Payment.std.ts'; +import { ErrorBoundary } from './ErrorBoundary.dom.tsx'; +import { MessageInteractivity } from './Message.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/TimelineItem.dom.tsx b/ts/components/conversation/TimelineItem.dom.tsx index 7435b05477..cdad4133c3 100644 --- a/ts/components/conversation/TimelineItem.dom.tsx +++ b/ts/components/conversation/TimelineItem.dom.tsx @@ -4,77 +4,77 @@ import type { ReactNode, RefObject } from 'react'; import React, { memo } from 'react'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { GetSharedGroupNamesType } from '../../util/sharedGroupNames.dom.js'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { GetSharedGroupNamesType } from '../../util/sharedGroupNames.dom.ts'; -import type { InteractionModeType } from '../../state/ducks/conversations.preload.js'; -import { TimelineDateHeader } from './TimelineDateHeader.dom.js'; +import type { InteractionModeType } from '../../state/ducks/conversations.preload.ts'; +import { TimelineDateHeader } from './TimelineDateHeader.dom.tsx'; import type { Props as AllMessageProps, PropsData as TimelineMessageProps, PropsActions as MessageActionsType, -} from './TimelineMessage.dom.js'; -import type { PropsActionsType as CallingNotificationActionsType } from './CallingNotification.dom.js'; -import { CallingNotification } from './CallingNotification.dom.js'; -import { ChatSessionRefreshedNotification } from './ChatSessionRefreshedNotification.dom.js'; -import type { PropsDataType as DeliveryIssueProps } from './DeliveryIssueNotification.dom.js'; -import { DeliveryIssueNotification } from './DeliveryIssueNotification.dom.js'; -import type { PropsData as ChangeNumberNotificationProps } from './ChangeNumberNotification.dom.js'; -import { ChangeNumberNotification } from './ChangeNumberNotification.dom.js'; -import type { PropsData as JoinedSignalNotificationProps } from './JoinedSignalNotification.dom.js'; -import { JoinedSignalNotification } from './JoinedSignalNotification.dom.js'; -import type { PropsData as TitleTransitionNotificationProps } from './TitleTransitionNotification.dom.js'; -import { TitleTransitionNotification } from './TitleTransitionNotification.dom.js'; -import type { CallingNotificationType } from '../../util/callingNotification.std.js'; -import { InlineNotificationWrapper } from './InlineNotificationWrapper.dom.js'; -import type { PropsData as UnsupportedMessageProps } from './UnsupportedMessage.dom.js'; -import { UnsupportedMessage } from './UnsupportedMessage.dom.js'; -import type { PropsData as TimerNotificationProps } from './TimerNotification.dom.js'; -import { TimerNotification } from './TimerNotification.dom.js'; +} from './TimelineMessage.dom.tsx'; +import type { PropsActionsType as CallingNotificationActionsType } from './CallingNotification.dom.tsx'; +import { CallingNotification } from './CallingNotification.dom.tsx'; +import { ChatSessionRefreshedNotification } from './ChatSessionRefreshedNotification.dom.tsx'; +import type { PropsDataType as DeliveryIssueProps } from './DeliveryIssueNotification.dom.tsx'; +import { DeliveryIssueNotification } from './DeliveryIssueNotification.dom.tsx'; +import type { PropsData as ChangeNumberNotificationProps } from './ChangeNumberNotification.dom.tsx'; +import { ChangeNumberNotification } from './ChangeNumberNotification.dom.tsx'; +import type { PropsData as JoinedSignalNotificationProps } from './JoinedSignalNotification.dom.tsx'; +import { JoinedSignalNotification } from './JoinedSignalNotification.dom.tsx'; +import type { PropsData as TitleTransitionNotificationProps } from './TitleTransitionNotification.dom.tsx'; +import { TitleTransitionNotification } from './TitleTransitionNotification.dom.tsx'; +import type { CallingNotificationType } from '../../util/callingNotification.std.ts'; +import { InlineNotificationWrapper } from './InlineNotificationWrapper.dom.tsx'; +import type { PropsData as UnsupportedMessageProps } from './UnsupportedMessage.dom.tsx'; +import { UnsupportedMessage } from './UnsupportedMessage.dom.tsx'; +import type { PropsData as TimerNotificationProps } from './TimerNotification.dom.tsx'; +import { TimerNotification } from './TimerNotification.dom.tsx'; import type { PropsActions as SafetyNumberActionsType, PropsData as SafetyNumberNotificationProps, -} from './SafetyNumberNotification.dom.js'; -import { SafetyNumberNotification } from './SafetyNumberNotification.dom.js'; -import type { PropsData as VerificationNotificationProps } from './VerificationNotification.dom.js'; -import { VerificationNotification } from './VerificationNotification.dom.js'; -import type { PropsData as GroupNotificationProps } from './GroupNotification.dom.js'; -import { GroupNotification } from './GroupNotification.dom.js'; +} from './SafetyNumberNotification.dom.tsx'; +import { SafetyNumberNotification } from './SafetyNumberNotification.dom.tsx'; +import type { PropsData as VerificationNotificationProps } from './VerificationNotification.dom.tsx'; +import { VerificationNotification } from './VerificationNotification.dom.tsx'; +import type { PropsData as GroupNotificationProps } from './GroupNotification.dom.tsx'; +import { GroupNotification } from './GroupNotification.dom.tsx'; import type { PropsDataType as GroupV2ChangeProps, PropsActionsType as GroupV2ChangeActionsType, -} from './GroupV2Change.dom.js'; -import { GroupV2Change } from './GroupV2Change.dom.js'; -import type { PropsDataType as GroupV1MigrationProps } from './GroupV1Migration.dom.js'; -import { GroupV1Migration } from './GroupV1Migration.dom.js'; -import type { SmartContactRendererType } from '../../groupChange.std.js'; -import { ResetSessionNotification } from './ResetSessionNotification.dom.js'; -import type { PropsType as ProfileChangeNotificationPropsType } from './ProfileChangeNotification.dom.js'; -import { ProfileChangeNotification } from './ProfileChangeNotification.dom.js'; -import type { PropsType as PaymentEventNotificationPropsType } from './PaymentEventNotification.dom.js'; -import { PaymentEventNotification } from './PaymentEventNotification.dom.js'; -import type { PollTerminateNotificationDataType } from './PollTerminateNotification.dom.js'; -import { PollTerminateNotification } from './PollTerminateNotification.dom.js'; -import type { PropsDataType as ConversationMergeNotificationPropsType } from './ConversationMergeNotification.dom.js'; -import { ConversationMergeNotification } from './ConversationMergeNotification.dom.js'; -import type { PropsDataType as PhoneNumberDiscoveryNotificationPropsType } from './PhoneNumberDiscoveryNotification.dom.js'; -import { PhoneNumberDiscoveryNotification } from './PhoneNumberDiscoveryNotification.dom.js'; -import type { PinnedMessageNotificationData } from './pinned-messages/PinnedMessageNotification.dom.js'; -import { PinnedMessageNotification } from './pinned-messages/PinnedMessageNotification.dom.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { TimelineMessage } from './TimelineMessage.dom.js'; +} from './GroupV2Change.dom.tsx'; +import { GroupV2Change } from './GroupV2Change.dom.tsx'; +import type { PropsDataType as GroupV1MigrationProps } from './GroupV1Migration.dom.tsx'; +import { GroupV1Migration } from './GroupV1Migration.dom.tsx'; +import type { SmartContactRendererType } from '../../groupChange.std.ts'; +import { ResetSessionNotification } from './ResetSessionNotification.dom.tsx'; +import type { PropsType as ProfileChangeNotificationPropsType } from './ProfileChangeNotification.dom.tsx'; +import { ProfileChangeNotification } from './ProfileChangeNotification.dom.tsx'; +import type { PropsType as PaymentEventNotificationPropsType } from './PaymentEventNotification.dom.tsx'; +import { PaymentEventNotification } from './PaymentEventNotification.dom.tsx'; +import type { PollTerminateNotificationDataType } from './PollTerminateNotification.dom.tsx'; +import { PollTerminateNotification } from './PollTerminateNotification.dom.tsx'; +import type { PropsDataType as ConversationMergeNotificationPropsType } from './ConversationMergeNotification.dom.tsx'; +import { ConversationMergeNotification } from './ConversationMergeNotification.dom.tsx'; +import type { PropsDataType as PhoneNumberDiscoveryNotificationPropsType } from './PhoneNumberDiscoveryNotification.dom.tsx'; +import { PhoneNumberDiscoveryNotification } from './PhoneNumberDiscoveryNotification.dom.tsx'; +import type { PinnedMessageNotificationData } from './pinned-messages/PinnedMessageNotification.dom.tsx'; +import { PinnedMessageNotification } from './pinned-messages/PinnedMessageNotification.dom.tsx'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { TimelineMessage } from './TimelineMessage.dom.tsx'; import { MessageRequestResponseNotification, type MessageRequestResponseNotificationData, -} from './MessageRequestResponseNotification.dom.js'; -import type { MessageRequestState } from './MessageRequestActionsConfirmation.dom.js'; -import type { MessageInteractivity } from './Message.dom.js'; -import type { PinMessageData } from '../../model-types.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.js'; -import type { CollapseSet } from '../../util/CollapseSet.std.js'; -import { CollapseSetViewer } from './CollapseSet.dom.js'; -import type { TargetedMessageType } from '../../state/selectors/conversations.dom.js'; +} from './MessageRequestResponseNotification.dom.tsx'; +import type { MessageRequestState } from './MessageRequestActionsConfirmation.dom.tsx'; +import type { MessageInteractivity } from './Message.dom.tsx'; +import type { PinMessageData } from '../../model-types.d.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import type { RenderItemProps } from '../../state/smart/TimelineItem.preload.tsx'; +import type { CollapseSet } from '../../util/CollapseSet.std.ts'; +import { CollapseSetViewer } from './CollapseSet.dom.tsx'; +import type { TargetedMessageType } from '../../state/selectors/conversations.dom.ts'; type CallHistoryType = { type: 'callHistory'; diff --git a/ts/components/conversation/TimelineMessage.dom.stories.tsx b/ts/components/conversation/TimelineMessage.dom.stories.tsx index e2b238139f..b3541ffc3d 100644 --- a/ts/components/conversation/TimelineMessage.dom.stories.tsx +++ b/ts/components/conversation/TimelineMessage.dom.stories.tsx @@ -6,13 +6,13 @@ import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta, StoryFn } from '@storybook/react'; -import { tw } from '../../axo/tw.dom.js'; +import { tw } from '../../axo/tw.dom.tsx'; -import { SignalService } from '../../protobuf/index.std.js'; -import { ConversationColors } from '../../types/Colors.std.js'; -import type { Props } from './TimelineMessage.dom.js'; -import { TimelineMessage } from './TimelineMessage.dom.js'; -import { MessageInteractivity, TextDirection } from './Message.dom.js'; +import { SignalService } from '../../protobuf/index.std.ts'; +import { ConversationColors } from '../../types/Colors.std.ts'; +import type { Props } from './TimelineMessage.dom.tsx'; +import { TimelineMessage } from './TimelineMessage.dom.tsx'; +import { MessageInteractivity, TextDirection } from './Message.dom.tsx'; import { AUDIO_MP3, IMAGE_JPEG, @@ -23,28 +23,28 @@ import { stringToMIMEType, IMAGE_GIF, VIDEO_QUICKTIME, -} from '../../types/MIME.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { MessageAudio } from './MessageAudio.dom.js'; -import { computePeaks } from '../VoiceNotesPlaybackContext.dom.js'; -import { pngUrl } from '../../storybook/Fixtures.std.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { WidthBreakpoint } from '../_util.std.js'; -import { DAY, HOUR, MINUTE, SECOND } from '../../util/durations/index.std.js'; -import { ContactFormType } from '../../types/EmbeddedContact.std.js'; -import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +} from '../../types/MIME.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { MessageAudio } from './MessageAudio.dom.tsx'; +import { computePeaks } from '../VoiceNotesPlaybackContext.dom.tsx'; +import { pngUrl } from '../../storybook/Fixtures.std.ts'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { WidthBreakpoint } from '../_util.std.ts'; +import { DAY, HOUR, MINUTE, SECOND } from '../../util/durations/index.std.ts'; +import { ContactFormType } from '../../types/EmbeddedContact.std.ts'; +import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import { fakeAttachment, fakeThumbnail, -} from '../../test-helpers/fakeAttachment.std.js'; -import { getFakeBadge } from '../../test-helpers/getFakeBadge.std.js'; -import { ThemeType } from '../../types/Util.std.js'; -import { BadgeCategory } from '../../badges/BadgeCategory.std.js'; -import { PaymentEventKind } from '../../types/Payment.std.js'; -import type { RenderAudioAttachmentProps } from '../../state/smart/renderAudioAttachment.preload.js'; -import type { PollVoteWithUserType } from '../../state/selectors/message.preload.js'; +} from '../../test-helpers/fakeAttachment.std.ts'; +import { getFakeBadge } from '../../test-helpers/getFakeBadge.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import { BadgeCategory } from '../../badges/BadgeCategory.std.ts'; +import { PaymentEventKind } from '../../types/Payment.std.ts'; +import type { RenderAudioAttachmentProps } from '../../state/smart/renderAudioAttachment.preload.tsx'; +import type { PollVoteWithUserType } from '../../state/selectors/message.preload.ts'; const { isBoolean, noop } = lodash; diff --git a/ts/components/conversation/TimelineMessage.dom.tsx b/ts/components/conversation/TimelineMessage.dom.tsx index ac0baac967..5c895c53c8 100644 --- a/ts/components/conversation/TimelineMessage.dom.tsx +++ b/ts/components/conversation/TimelineMessage.dom.tsx @@ -8,35 +8,35 @@ import type { ReactNode } from 'react'; import { createPortal } from 'react-dom'; import { Manager, Popper, Reference } from 'react-popper'; import type { PreventOverflowModifier } from '@popperjs/core/lib/modifiers/preventOverflow.js'; -import { isDownloaded } from '../../util/Attachment.std.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import { handleOutsideClick } from '../../util/handleOutsideClick.dom.js'; -import { offsetDistanceModifier } from '../../util/popperUtil.std.js'; -import { WidthBreakpoint } from '../_util.std.js'; -import { Message, MessageInteractivity } from './Message.dom.js'; -import type { SmartReactionPicker } from '../../state/smart/ReactionPicker.dom.js'; +import { isDownloaded } from '../../util/Attachment.std.ts'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import { handleOutsideClick } from '../../util/handleOutsideClick.dom.ts'; +import { offsetDistanceModifier } from '../../util/popperUtil.std.ts'; +import { WidthBreakpoint } from '../_util.std.ts'; +import { Message, MessageInteractivity } from './Message.dom.tsx'; +import type { SmartReactionPicker } from '../../state/smart/ReactionPicker.dom.tsx'; import type { Props as MessageProps, PropsActions as MessagePropsActions, PropsData as MessagePropsData, PropsHousekeeping, -} from './Message.dom.js'; -import type { PushPanelForConversationActionType } from '../../state/ducks/conversations.preload.js'; -import { doesMessageBodyOverflow } from './MessageBodyReadMore.dom.js'; -import { useToggleReactionPicker } from '../../hooks/useKeyboardShortcuts.dom.js'; -import { PanelType } from '../../types/Panels.std.js'; +} from './Message.dom.tsx'; +import type { PushPanelForConversationActionType } from '../../state/ducks/conversations.preload.ts'; +import { doesMessageBodyOverflow } from './MessageBodyReadMore.dom.tsx'; +import { useToggleReactionPicker } from '../../hooks/useKeyboardShortcuts.dom.tsx'; +import { PanelType } from '../../types/Panels.std.ts'; import type { DeleteMessagesPropsType, ForwardMessagesPayload, -} from '../../state/ducks/globalModals.preload.js'; -import { useScrollerLock } from '../../hooks/useScrollLock.dom.js'; -import { MessageContextMenu } from './MessageContextMenu.dom.js'; -import { ForwardMessagesModalType } from '../ForwardMessagesModal.dom.js'; -import { useGroupedAndOrderedReactions } from '../../util/groupAndOrderReactions.dom.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import type { AxoMenuBuilder } from '../../axo/AxoMenuBuilder.dom.js'; -import { AxoContextMenu } from '../../axo/AxoContextMenu.dom.js'; -import { useDocumentKeyDown } from '../../hooks/useDocumentKeyDown.dom.js'; +} from '../../state/ducks/globalModals.preload.ts'; +import { useScrollerLock } from '../../hooks/useScrollLock.dom.tsx'; +import { MessageContextMenu } from './MessageContextMenu.dom.tsx'; +import { ForwardMessagesModalType } from '../ForwardMessagesModal.dom.tsx'; +import { useGroupedAndOrderedReactions } from '../../util/groupAndOrderReactions.dom.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import type { AxoMenuBuilder } from '../../axo/AxoMenuBuilder.dom.tsx'; +import { AxoContextMenu } from '../../axo/AxoContextMenu.dom.tsx'; +import { useDocumentKeyDown } from '../../hooks/useDocumentKeyDown.dom.ts'; const { useAxoContextMenuOutsideKeyboardTrigger } = AxoContextMenu; diff --git a/ts/components/conversation/TimelineWarning.dom.tsx b/ts/components/conversation/TimelineWarning.dom.tsx index e07cfeb45b..5d2a0b41fa 100644 --- a/ts/components/conversation/TimelineWarning.dom.tsx +++ b/ts/components/conversation/TimelineWarning.dom.tsx @@ -4,7 +4,7 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; const CLASS_NAME = 'module-TimelineWarning'; const ICON_CONTAINER_CLASS_NAME = `${CLASS_NAME}__icon-container`; diff --git a/ts/components/conversation/TimerNotification.dom.stories.tsx b/ts/components/conversation/TimerNotification.dom.stories.tsx index 071a738744..a7501a5833 100644 --- a/ts/components/conversation/TimerNotification.dom.stories.tsx +++ b/ts/components/conversation/TimerNotification.dom.stories.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import type { Props } from './TimerNotification.dom.js'; -import { TimerNotification } from './TimerNotification.dom.js'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import type { Props } from './TimerNotification.dom.tsx'; +import { TimerNotification } from './TimerNotification.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/TimerNotification.dom.tsx b/ts/components/conversation/TimerNotification.dom.tsx index 703a81da98..50414976fd 100644 --- a/ts/components/conversation/TimerNotification.dom.tsx +++ b/ts/components/conversation/TimerNotification.dom.tsx @@ -4,13 +4,13 @@ import type { ReactNode } from 'react'; import React from 'react'; -import { ContactName } from './ContactName.dom.js'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import * as expirationTimer from '../../util/expirationTimer.std.js'; -import type { DurationInSeconds } from '../../util/durations/index.std.js'; -import { createLogger } from '../../logging/log.std.js'; +import { ContactName } from './ContactName.dom.tsx'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import * as expirationTimer from '../../util/expirationTimer.std.ts'; +import type { DurationInSeconds } from '../../util/durations/index.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; const log = createLogger('TimerNotification'); diff --git a/ts/components/conversation/TitleTransitionNotification.dom.stories.tsx b/ts/components/conversation/TitleTransitionNotification.dom.stories.tsx index 2d0eea50ea..f51614b406 100644 --- a/ts/components/conversation/TitleTransitionNotification.dom.stories.tsx +++ b/ts/components/conversation/TitleTransitionNotification.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './TitleTransitionNotification.dom.js'; -import { TitleTransitionNotification } from './TitleTransitionNotification.dom.js'; +import type { Props } from './TitleTransitionNotification.dom.tsx'; +import { TitleTransitionNotification } from './TitleTransitionNotification.dom.tsx'; export default { title: 'Components/Conversation/TitleTransitionNotification', diff --git a/ts/components/conversation/TitleTransitionNotification.dom.tsx b/ts/components/conversation/TitleTransitionNotification.dom.tsx index ea7d9dbe69..36bd79ee0c 100644 --- a/ts/components/conversation/TitleTransitionNotification.dom.tsx +++ b/ts/components/conversation/TitleTransitionNotification.dom.tsx @@ -3,11 +3,11 @@ import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { I18n } from '../I18n.dom.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { I18n } from '../I18n.dom.tsx'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { UserText } from '../UserText.dom.js'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; export type PropsData = { oldTitle: string; diff --git a/ts/components/conversation/TypingAnimation.dom.stories.tsx b/ts/components/conversation/TypingAnimation.dom.stories.tsx index 99eed4fc5b..ad2a132deb 100644 --- a/ts/components/conversation/TypingAnimation.dom.stories.tsx +++ b/ts/components/conversation/TypingAnimation.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './TypingAnimation.dom.js'; -import { TypingAnimation } from './TypingAnimation.dom.js'; +import type { Props } from './TypingAnimation.dom.tsx'; +import { TypingAnimation } from './TypingAnimation.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/TypingAnimation.dom.tsx b/ts/components/conversation/TypingAnimation.dom.tsx index 0148e861fc..5985a4bcb1 100644 --- a/ts/components/conversation/TypingAnimation.dom.tsx +++ b/ts/components/conversation/TypingAnimation.dom.tsx @@ -4,7 +4,7 @@ import React from 'react'; import classNames from 'classnames'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; export type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/TypingBubble.dom.stories.tsx b/ts/components/conversation/TypingBubble.dom.stories.tsx index 20f3e1d4eb..f0a92c4aa7 100644 --- a/ts/components/conversation/TypingBubble.dom.stories.tsx +++ b/ts/components/conversation/TypingBubble.dom.stories.tsx @@ -5,12 +5,12 @@ import React, { useEffect, useState } from 'react'; import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import type { TypingBubblePropsType } from './TypingBubble.dom.js'; -import { TypingBubble } from './TypingBubble.dom.js'; -import { AvatarColors } from '../../types/Colors.std.js'; -import { getFakeBadge } from '../../test-helpers/getFakeBadge.std.js'; -import { ThemeType } from '../../types/Util.std.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import type { TypingBubblePropsType } from './TypingBubble.dom.tsx'; +import { TypingBubble } from './TypingBubble.dom.tsx'; +import { AvatarColors } from '../../types/Colors.std.ts'; +import { getFakeBadge } from '../../test-helpers/getFakeBadge.std.ts'; +import { ThemeType } from '../../types/Util.std.ts'; const { times } = lodash; diff --git a/ts/components/conversation/TypingBubble.dom.tsx b/ts/components/conversation/TypingBubble.dom.tsx index 4df230a09e..2e56801f71 100644 --- a/ts/components/conversation/TypingBubble.dom.tsx +++ b/ts/components/conversation/TypingBubble.dom.tsx @@ -6,15 +6,15 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import classNames from 'classnames'; import { animated, useSpring } from '@react-spring/web'; -import { TypingAnimation } from './TypingAnimation.dom.js'; -import { Avatar } from '../Avatar.dom.js'; +import { TypingAnimation } from './TypingAnimation.dom.tsx'; +import { Avatar } from '../Avatar.dom.tsx'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; -import { drop } from '../../util/drop.std.js'; -import { useReducedMotion } from '../../hooks/useReducedMotion.dom.js'; -import type { ContactModalStateType } from '../../types/globalModals.std.js'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; +import { drop } from '../../util/drop.std.ts'; +import { useReducedMotion } from '../../hooks/useReducedMotion.dom.ts'; +import type { ContactModalStateType } from '../../types/globalModals.std.ts'; const MAX_AVATARS_COUNT = 3; diff --git a/ts/components/conversation/UniversalTimerNotification.dom.stories.tsx b/ts/components/conversation/UniversalTimerNotification.dom.stories.tsx index 55f79c8c44..48d6fd1fa3 100644 --- a/ts/components/conversation/UniversalTimerNotification.dom.stories.tsx +++ b/ts/components/conversation/UniversalTimerNotification.dom.stories.tsx @@ -3,9 +3,9 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './UniversalTimerNotification.dom.js'; -import { UniversalTimerNotification } from './UniversalTimerNotification.dom.js'; -import { EXPIRE_TIMERS } from '../../test-helpers/expireTimers.std.js'; +import type { Props } from './UniversalTimerNotification.dom.tsx'; +import { UniversalTimerNotification } from './UniversalTimerNotification.dom.tsx'; +import { EXPIRE_TIMERS } from '../../test-helpers/expireTimers.std.ts'; export default { title: 'Components/UniversalTimerNotification', diff --git a/ts/components/conversation/UniversalTimerNotification.dom.tsx b/ts/components/conversation/UniversalTimerNotification.dom.tsx index aff80e9cb8..fd3570ca17 100644 --- a/ts/components/conversation/UniversalTimerNotification.dom.tsx +++ b/ts/components/conversation/UniversalTimerNotification.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import { SystemMessage } from './SystemMessage.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import * as expirationTimer from '../../util/expirationTimer.std.js'; -import type { DurationInSeconds } from '../../util/durations/index.std.js'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import * as expirationTimer from '../../util/expirationTimer.std.ts'; +import type { DurationInSeconds } from '../../util/durations/index.std.ts'; export type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/UnsupportedMessage.dom.stories.tsx b/ts/components/conversation/UnsupportedMessage.dom.stories.tsx index 9d518ebda9..308f26c860 100644 --- a/ts/components/conversation/UnsupportedMessage.dom.stories.tsx +++ b/ts/components/conversation/UnsupportedMessage.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { ContactType, Props } from './UnsupportedMessage.dom.js'; -import { UnsupportedMessage } from './UnsupportedMessage.dom.js'; +import type { ContactType, Props } from './UnsupportedMessage.dom.tsx'; +import { UnsupportedMessage } from './UnsupportedMessage.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/UnsupportedMessage.dom.tsx b/ts/components/conversation/UnsupportedMessage.dom.tsx index a73a594e50..aaf0a97951 100644 --- a/ts/components/conversation/UnsupportedMessage.dom.tsx +++ b/ts/components/conversation/UnsupportedMessage.dom.tsx @@ -3,12 +3,12 @@ import React from 'react'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { Button, ButtonSize, ButtonVariant } from '../Button.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.js'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { Button, ButtonSize, ButtonVariant } from '../Button.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.ts'; export type ContactType = { id: string; diff --git a/ts/components/conversation/VerificationNotification.dom.stories.tsx b/ts/components/conversation/VerificationNotification.dom.stories.tsx index 771efebd5a..0d6a3ed535 100644 --- a/ts/components/conversation/VerificationNotification.dom.stories.tsx +++ b/ts/components/conversation/VerificationNotification.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './VerificationNotification.dom.js'; -import { VerificationNotification } from './VerificationNotification.dom.js'; +import type { Props } from './VerificationNotification.dom.tsx'; +import { VerificationNotification } from './VerificationNotification.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/VerificationNotification.dom.tsx b/ts/components/conversation/VerificationNotification.dom.tsx index 1cda1b0c79..48c5470353 100644 --- a/ts/components/conversation/VerificationNotification.dom.tsx +++ b/ts/components/conversation/VerificationNotification.dom.tsx @@ -3,12 +3,12 @@ import React from 'react'; -import { SystemMessage } from './SystemMessage.dom.js'; -import { ContactName } from './ContactName.dom.js'; -import { I18n } from '../I18n.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import { SystemMessage } from './SystemMessage.dom.tsx'; +import { ContactName } from './ContactName.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; type Contact = { title: string }; diff --git a/ts/components/conversation/Waveform.dom.tsx b/ts/components/conversation/Waveform.dom.tsx index 276b9b4138..f6a0c02ad2 100644 --- a/ts/components/conversation/Waveform.dom.tsx +++ b/ts/components/conversation/Waveform.dom.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import React from 'react'; -import { assertDev } from '../../util/assert.std.js'; +import { assertDev } from '../../util/assert.std.ts'; type Props = { peaks: ReadonlyArray; diff --git a/ts/components/conversation/WaveformScrubber.dom.tsx b/ts/components/conversation/WaveformScrubber.dom.tsx index 239b25e067..fb33c83a75 100644 --- a/ts/components/conversation/WaveformScrubber.dom.tsx +++ b/ts/components/conversation/WaveformScrubber.dom.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback, useRef } from 'react'; -import { useRefMerger } from '../../hooks/useRefMerger.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { durationToPlaybackText } from '../../util/durationToPlaybackText.std.js'; -import { Waveform } from './Waveform.dom.js'; -import { arrow } from '../../util/keyboard.dom.js'; +import { useRefMerger } from '../../hooks/useRefMerger.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { durationToPlaybackText } from '../../util/durationToPlaybackText.std.ts'; +import { Waveform } from './Waveform.dom.tsx'; +import { arrow } from '../../util/keyboard.dom.ts'; type Props = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/conversation/contactUtil.dom.tsx b/ts/components/conversation/contactUtil.dom.tsx index 8048f851b8..aaca3186d3 100644 --- a/ts/components/conversation/contactUtil.dom.tsx +++ b/ts/components/conversation/contactUtil.dom.tsx @@ -5,13 +5,13 @@ import React from 'react'; import classNames from 'classnames'; import type { ReadonlyDeep } from 'type-fest'; -import { Avatar, AvatarBlur } from '../Avatar.dom.js'; -import { AvatarColors } from '../../types/Colors.std.js'; -import { getName } from '../../types/EmbeddedContact.std.js'; -import { AttachmentStatusIcon } from './AttachmentStatusIcon.dom.js'; +import { Avatar, AvatarBlur } from '../Avatar.dom.tsx'; +import { AvatarColors } from '../../types/Colors.std.ts'; +import { getName } from '../../types/EmbeddedContact.std.ts'; +import { AttachmentStatusIcon } from './AttachmentStatusIcon.dom.tsx'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { EmbeddedContactForUIType } from '../../types/EmbeddedContact.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { EmbeddedContactForUIType } from '../../types/EmbeddedContact.std.ts'; export function renderAvatar({ contact, diff --git a/ts/components/conversation/conversation-details/AddGroupMembersModal.dom.stories.tsx b/ts/components/conversation/conversation-details/AddGroupMembersModal.dom.stories.tsx index 2f1e6dde06..89ee72cb41 100644 --- a/ts/components/conversation/conversation-details/AddGroupMembersModal.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/AddGroupMembersModal.dom.stories.tsx @@ -6,17 +6,17 @@ import React, { useState } from 'react'; import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { sleep } from '../../../util/sleep.std.js'; -import { makeLookup } from '../../../util/makeLookup.std.js'; -import { deconstructLookup } from '../../../util/deconstructLookup.std.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { AddGroupMembersModal } from './AddGroupMembersModal.dom.js'; -import { ChooseGroupMembersModal } from './AddGroupMembersModal/ChooseGroupMembersModal.dom.js'; -import { ConfirmAdditionsModal } from './AddGroupMembersModal/ConfirmAdditionsModal.dom.js'; -import { RequestState } from './util.std.js'; -import { ThemeType } from '../../../types/Util.std.js'; -import { makeFakeLookupConversationWithoutServiceId } from '../../../test-helpers/fakeLookupConversationWithoutServiceId.std.js'; +import { sleep } from '../../../util/sleep.std.ts'; +import { makeLookup } from '../../../util/makeLookup.std.ts'; +import { deconstructLookup } from '../../../util/deconstructLookup.std.ts'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { AddGroupMembersModal } from './AddGroupMembersModal.dom.tsx'; +import { ChooseGroupMembersModal } from './AddGroupMembersModal/ChooseGroupMembersModal.dom.tsx'; +import { ConfirmAdditionsModal } from './AddGroupMembersModal/ConfirmAdditionsModal.dom.tsx'; +import { RequestState } from './util.std.ts'; +import { ThemeType } from '../../../types/Util.std.ts'; +import { makeFakeLookupConversationWithoutServiceId } from '../../../test-helpers/fakeLookupConversationWithoutServiceId.std.ts'; const { times } = lodash; diff --git a/ts/components/conversation/conversation-details/AddGroupMembersModal.dom.tsx b/ts/components/conversation/conversation-details/AddGroupMembersModal.dom.tsx index 0a8bbbbb38..4c5a070f55 100644 --- a/ts/components/conversation/conversation-details/AddGroupMembersModal.dom.tsx +++ b/ts/components/conversation/conversation-details/AddGroupMembersModal.dom.tsx @@ -4,19 +4,19 @@ import React, { useReducer } from 'react'; import lodash from 'lodash'; -import type { LocalizerType } from '../../../types/Util.std.js'; +import type { LocalizerType } from '../../../types/Util.std.ts'; import { AddGroupMemberErrorDialog, AddGroupMemberErrorDialogMode, -} from '../../AddGroupMemberErrorDialog.dom.js'; -import type { SmartChooseGroupMembersModalPropsType } from '../../../state/smart/ChooseGroupMembersModal.preload.js'; -import type { SmartConfirmAdditionsModalPropsType } from '../../../state/smart/ConfirmAdditionsModal.dom.js'; +} from '../../AddGroupMemberErrorDialog.dom.tsx'; +import type { SmartChooseGroupMembersModalPropsType } from '../../../state/smart/ChooseGroupMembersModal.preload.tsx'; +import type { SmartConfirmAdditionsModalPropsType } from '../../../state/smart/ConfirmAdditionsModal.dom.tsx'; import { toggleSelectedContactForGroupAddition, OneTimeModalState, -} from '../../../groups/toggleSelectedContactForGroupAddition.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import type { RequestState } from './util.std.js'; +} from '../../../groups/toggleSelectedContactForGroupAddition.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import type { RequestState } from './util.std.ts'; const { without } = lodash; diff --git a/ts/components/conversation/conversation-details/AddGroupMembersModal/ChooseGroupMembersModal.dom.tsx b/ts/components/conversation/conversation-details/AddGroupMembersModal/ChooseGroupMembersModal.dom.tsx index 4bcae7e30f..a9b10acbe8 100644 --- a/ts/components/conversation/conversation-details/AddGroupMembersModal/ChooseGroupMembersModal.dom.tsx +++ b/ts/components/conversation/conversation-details/AddGroupMembersModal/ChooseGroupMembersModal.dom.tsx @@ -11,39 +11,39 @@ import React, { import lodash from 'lodash'; import type { ListRowProps } from 'react-virtualized'; -import type { LocalizerType, ThemeType } from '../../../../types/Util.std.js'; -import { strictAssert, assertDev } from '../../../../util/assert.std.js'; -import { refMerger } from '../../../../util/refMerger.std.js'; -import { useRestoreFocus } from '../../../../hooks/useRestoreFocus.dom.js'; -import { missingCaseError } from '../../../../util/missingCaseError.std.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../../../../util/lookupConversationWithoutServiceId.preload.js'; -import { parseAndFormatPhoneNumber } from '../../../../util/libphonenumberInstance.std.js'; -import type { ParsedE164Type } from '../../../../util/libphonenumberInstance.std.js'; -import { filterAndSortConversations } from '../../../../util/filterAndSortConversations.std.js'; -import type { ConversationType } from '../../../../state/ducks/conversations.preload.js'; +import type { LocalizerType, ThemeType } from '../../../../types/Util.std.ts'; +import { strictAssert, assertDev } from '../../../../util/assert.std.ts'; +import { refMerger } from '../../../../util/refMerger.std.ts'; +import { useRestoreFocus } from '../../../../hooks/useRestoreFocus.dom.ts'; +import { missingCaseError } from '../../../../util/missingCaseError.std.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../../../../util/lookupConversationWithoutServiceId.preload.ts'; +import { parseAndFormatPhoneNumber } from '../../../../util/libphonenumberInstance.std.ts'; +import type { ParsedE164Type } from '../../../../util/libphonenumberInstance.std.ts'; +import { filterAndSortConversations } from '../../../../util/filterAndSortConversations.std.ts'; +import type { ConversationType } from '../../../../state/ducks/conversations.preload.ts'; import type { UUIDFetchStateKeyType, UUIDFetchStateType, -} from '../../../../util/uuidFetchState.std.js'; +} from '../../../../util/uuidFetchState.std.ts'; import { isFetchingByE164, isFetchingByUsername, -} from '../../../../util/uuidFetchState.std.js'; -import { ModalHost } from '../../../ModalHost.dom.js'; -import { ContactPills } from '../../../ContactPills.dom.js'; -import { ContactPill } from '../../../ContactPill.dom.js'; -import type { Row } from '../../../ConversationList.dom.js'; -import { RowType } from '../../../ConversationList.dom.js'; +} from '../../../../util/uuidFetchState.std.ts'; +import { ModalHost } from '../../../ModalHost.dom.tsx'; +import { ContactPills } from '../../../ContactPills.dom.tsx'; +import { ContactPill } from '../../../ContactPill.dom.tsx'; +import type { Row } from '../../../ConversationList.dom.tsx'; +import { RowType } from '../../../ConversationList.dom.tsx'; import { ContactCheckbox, ContactCheckboxDisabledReason, -} from '../../../conversationList/ContactCheckbox.dom.js'; -import { Button, ButtonVariant } from '../../../Button.dom.js'; -import { SearchInput } from '../../../SearchInput.dom.js'; -import { ListView } from '../../../ListView.dom.js'; -import { UsernameCheckbox } from '../../../conversationList/UsernameCheckbox.dom.js'; -import { PhoneNumberCheckbox } from '../../../conversationList/PhoneNumberCheckbox.dom.js'; -import { SizeObserver } from '../../../../hooks/useSizeObserver.dom.js'; +} from '../../../conversationList/ContactCheckbox.dom.tsx'; +import { Button, ButtonVariant } from '../../../Button.dom.tsx'; +import { SearchInput } from '../../../SearchInput.dom.tsx'; +import { ListView } from '../../../ListView.dom.tsx'; +import { UsernameCheckbox } from '../../../conversationList/UsernameCheckbox.dom.tsx'; +import { PhoneNumberCheckbox } from '../../../conversationList/PhoneNumberCheckbox.dom.tsx'; +import { SizeObserver } from '../../../../hooks/useSizeObserver.dom.tsx'; const { omit } = lodash; diff --git a/ts/components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.dom.tsx b/ts/components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.dom.tsx index a9512ff662..4623950771 100644 --- a/ts/components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.dom.tsx +++ b/ts/components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.dom.tsx @@ -4,16 +4,16 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { LocalizerType } from '../../../../types/Util.std.js'; -import { assertDev } from '../../../../util/assert.std.js'; -import { ModalHost } from '../../../ModalHost.dom.js'; -import { Button, ButtonVariant } from '../../../Button.dom.js'; -import { Spinner } from '../../../Spinner.dom.js'; -import type { ConversationType } from '../../../../state/ducks/conversations.preload.js'; -import { RequestState } from '../util.std.js'; -import { I18n } from '../../../I18n.dom.js'; -import { ContactName } from '../../ContactName.dom.js'; -import { UserText } from '../../../UserText.dom.js'; +import type { LocalizerType } from '../../../../types/Util.std.ts'; +import { assertDev } from '../../../../util/assert.std.ts'; +import { ModalHost } from '../../../ModalHost.dom.tsx'; +import { Button, ButtonVariant } from '../../../Button.dom.tsx'; +import { Spinner } from '../../../Spinner.dom.tsx'; +import type { ConversationType } from '../../../../state/ducks/conversations.preload.ts'; +import { RequestState } from '../util.std.ts'; +import { I18n } from '../../../I18n.dom.tsx'; +import { ContactName } from '../../ContactName.dom.tsx'; +import { UserText } from '../../../UserText.dom.tsx'; export type StatePropsType = { groupTitle: string; diff --git a/ts/components/conversation/conversation-details/CallHistoryGroupPanelSection.dom.tsx b/ts/components/conversation/conversation-details/CallHistoryGroupPanelSection.dom.tsx index c56cce58ba..0461387600 100644 --- a/ts/components/conversation/conversation-details/CallHistoryGroupPanelSection.dom.tsx +++ b/ts/components/conversation/conversation-details/CallHistoryGroupPanelSection.dom.tsx @@ -7,15 +7,15 @@ import { CallType, DirectCallStatus, GroupCallStatus, -} from '../../../types/CallDisposition.std.js'; +} from '../../../types/CallDisposition.std.ts'; import type { CallStatus, CallHistoryGroup, -} from '../../../types/CallDisposition.std.js'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { formatDate, formatTime } from '../../../util/formatTimestamp.dom.js'; -import { PanelSection } from './PanelSection.dom.js'; -import { getDirectCallNotificationText } from '../../../util/callingNotification.std.js'; +} from '../../../types/CallDisposition.std.ts'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { formatDate, formatTime } from '../../../util/formatTimestamp.dom.ts'; +import { PanelSection } from './PanelSection.dom.tsx'; +import { getDirectCallNotificationText } from '../../../util/callingNotification.std.ts'; function describeCallHistory( i18n: LocalizerType, diff --git a/ts/components/conversation/conversation-details/ConversationDetails.dom.stories.tsx b/ts/components/conversation/conversation-details/ConversationDetails.dom.stories.tsx index 2a279c1ab1..1fa1162f27 100644 --- a/ts/components/conversation/conversation-details/ConversationDetails.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetails.dom.stories.tsx @@ -7,21 +7,21 @@ import { action } from '@storybook/addon-actions'; import lodash from 'lodash'; import type { Meta } from '@storybook/react'; -import type { Props } from './ConversationDetails.dom.js'; -import { ConversationDetails } from './ConversationDetails.dom.js'; -import { ChooseGroupMembersModal } from './AddGroupMembersModal/ChooseGroupMembersModal.dom.js'; -import { ConfirmAdditionsModal } from './AddGroupMembersModal/ConfirmAdditionsModal.dom.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { makeFakeLookupConversationWithoutServiceId } from '../../../test-helpers/fakeLookupConversationWithoutServiceId.std.js'; -import { ThemeType } from '../../../types/Util.std.js'; -import { DurationInSeconds } from '../../../util/durations/index.std.js'; -import { NavTab } from '../../../types/Nav.std.js'; -import { getFakeCallHistoryGroup } from '../../../test-helpers/getFakeCallHistoryGroup.std.js'; -import type { ContactNameColorType } from '../../../types/Colors.std.js'; -import { ContactNameColors } from '../../../types/Colors.std.js'; -import { isNotNil } from '../../../util/isNotNil.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; +import type { Props } from './ConversationDetails.dom.tsx'; +import { ConversationDetails } from './ConversationDetails.dom.tsx'; +import { ChooseGroupMembersModal } from './AddGroupMembersModal/ChooseGroupMembersModal.dom.tsx'; +import { ConfirmAdditionsModal } from './AddGroupMembersModal/ConfirmAdditionsModal.dom.tsx'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { makeFakeLookupConversationWithoutServiceId } from '../../../test-helpers/fakeLookupConversationWithoutServiceId.std.ts'; +import { ThemeType } from '../../../types/Util.std.ts'; +import { DurationInSeconds } from '../../../util/durations/index.std.ts'; +import { NavTab } from '../../../types/Nav.std.ts'; +import { getFakeCallHistoryGroup } from '../../../test-helpers/getFakeCallHistoryGroup.std.ts'; +import type { ContactNameColorType } from '../../../types/Colors.std.ts'; +import { ContactNameColors } from '../../../types/Colors.std.ts'; +import { isNotNil } from '../../../util/isNotNil.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; const { times } = lodash; diff --git a/ts/components/conversation/conversation-details/ConversationDetails.dom.tsx b/ts/components/conversation/conversation-details/ConversationDetails.dom.tsx index d7fe8bb5b1..156430e453 100644 --- a/ts/components/conversation/conversation-details/ConversationDetails.dom.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetails.dom.tsx @@ -5,70 +5,70 @@ import type { ReactNode } from 'react'; import React, { useEffect, useState, useCallback } from 'react'; import classNames from 'classnames'; -import { Button, ButtonIconType, ButtonVariant } from '../../Button.dom.js'; +import { Button, ButtonIconType, ButtonVariant } from '../../Button.dom.tsx'; import type { ConversationType, PushPanelForConversationActionType, ShowConversationType, UpdateGroupAttributesType, -} from '../../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.js'; -import type { SmartChooseGroupMembersModalPropsType } from '../../../state/smart/ChooseGroupMembersModal.preload.js'; -import type { SmartConfirmAdditionsModalPropsType } from '../../../state/smart/ConfirmAdditionsModal.dom.js'; -import { assertDev } from '../../../util/assert.std.js'; -import { getMutedUntilText } from '../../../util/getMutedUntilText.std.js'; +} from '../../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.ts'; +import type { SmartChooseGroupMembersModalPropsType } from '../../../state/smart/ChooseGroupMembersModal.preload.tsx'; +import type { SmartConfirmAdditionsModalPropsType } from '../../../state/smart/ConfirmAdditionsModal.dom.tsx'; +import { assertDev } from '../../../util/assert.std.ts'; +import { getMutedUntilText } from '../../../util/getMutedUntilText.std.ts'; -import type { LocalizerType, ThemeType } from '../../../types/Util.std.js'; -import type { BadgeType } from '../../../badges/types.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import { DurationInSeconds } from '../../../util/durations/index.std.js'; +import type { LocalizerType, ThemeType } from '../../../types/Util.std.ts'; +import type { BadgeType } from '../../../badges/types.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import { DurationInSeconds } from '../../../util/durations/index.std.ts'; -import { DisappearingTimerSelect } from '../../DisappearingTimerSelect.dom.js'; +import { DisappearingTimerSelect } from '../../DisappearingTimerSelect.dom.tsx'; -import { PanelRow } from './PanelRow.dom.js'; -import { PanelSection } from './PanelSection.dom.js'; -import { AddGroupMembersModal } from './AddGroupMembersModal.dom.js'; -import { ConversationDetailsActions } from './ConversationDetailsActions.dom.js'; -import { ConversationDetailsHeader } from './ConversationDetailsHeader.dom.js'; +import { PanelRow } from './PanelRow.dom.tsx'; +import { PanelSection } from './PanelSection.dom.tsx'; +import { AddGroupMembersModal } from './AddGroupMembersModal.dom.tsx'; +import { ConversationDetailsActions } from './ConversationDetailsActions.dom.tsx'; +import { ConversationDetailsHeader } from './ConversationDetailsHeader.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './ConversationDetailsIcon.dom.js'; -import type { GroupV2Membership } from './ConversationDetailsMembershipList.dom.js'; -import { ConversationDetailsMembershipList } from './ConversationDetailsMembershipList.dom.js'; +} from './ConversationDetailsIcon.dom.tsx'; +import type { GroupV2Membership } from './ConversationDetailsMembershipList.dom.tsx'; +import { ConversationDetailsMembershipList } from './ConversationDetailsMembershipList.dom.tsx'; import type { GroupV2PendingMembership, GroupV2RequestingMembership, -} from './PendingInvites.dom.js'; -import { EditConversationAttributesModal } from './EditConversationAttributesModal.dom.js'; -import { RequestState } from './util.std.js'; -import { getCustomColorStyle } from '../../../util/getCustomColorStyle.dom.js'; -import { openLinkInWebBrowser } from '../../../util/openLinkInWebBrowser.dom.js'; -import { ConfirmationDialog } from '../../ConfirmationDialog.dom.js'; -import { ConversationNotificationsModal } from './ConversationNotificationsModal.dom.js'; +} from './PendingInvites.dom.tsx'; +import { EditConversationAttributesModal } from './EditConversationAttributesModal.dom.tsx'; +import { RequestState } from './util.std.ts'; +import { getCustomColorStyle } from '../../../util/getCustomColorStyle.dom.ts'; +import { openLinkInWebBrowser } from '../../../util/openLinkInWebBrowser.dom.ts'; +import { ConfirmationDialog } from '../../ConfirmationDialog.dom.tsx'; +import { ConversationNotificationsModal } from './ConversationNotificationsModal.dom.tsx'; import type { AvatarDataType, DeleteAvatarFromDiskActionType, ReplaceAvatarActionType, SaveAvatarToDiskActionType, -} from '../../../types/Avatar.std.js'; -import { isConversationMuted } from '../../../util/isConversationMuted.std.js'; -import { ConversationDetailsGroups } from './ConversationDetailsGroups.dom.js'; -import { PanelType } from '../../../types/Panels.std.js'; -import { type CallHistoryGroup } from '../../../types/CallDisposition.std.js'; -import { NavTab } from '../../../types/Nav.std.js'; -import { ContextMenu } from '../../ContextMenu.dom.js'; -import { canHaveNicknameAndNote } from '../../../util/nicknames.dom.js'; -import { CallHistoryGroupPanelSection } from './CallHistoryGroupPanelSection.dom.js'; +} from '../../../types/Avatar.std.ts'; +import { isConversationMuted } from '../../../util/isConversationMuted.std.ts'; +import { ConversationDetailsGroups } from './ConversationDetailsGroups.dom.tsx'; +import { PanelType } from '../../../types/Panels.std.ts'; +import { type CallHistoryGroup } from '../../../types/CallDisposition.std.ts'; +import { NavTab } from '../../../types/Nav.std.ts'; +import { ContextMenu } from '../../ContextMenu.dom.tsx'; +import { canHaveNicknameAndNote } from '../../../util/nicknames.dom.ts'; +import { CallHistoryGroupPanelSection } from './CallHistoryGroupPanelSection.dom.tsx'; import { InAnotherCallTooltip, getTooltipContent, -} from '../InAnotherCallTooltip.dom.js'; -import { BadgeSustainerInstructionsDialog } from '../../BadgeSustainerInstructionsDialog.dom.js'; -import type { ContactModalStateType } from '../../../types/globalModals.std.js'; -import type { ShowToastAction } from '../../../state/ducks/toast.preload.js'; -import { ToastType } from '../../../types/Toast.dom.js'; -import type { ContactNameColorType } from '../../../types/Colors.std.js'; +} from '../InAnotherCallTooltip.dom.tsx'; +import { BadgeSustainerInstructionsDialog } from '../../BadgeSustainerInstructionsDialog.dom.tsx'; +import type { ContactModalStateType } from '../../../types/globalModals.std.ts'; +import type { ShowToastAction } from '../../../state/ducks/toast.preload.ts'; +import { ToastType } from '../../../types/Toast.dom.tsx'; +import type { ContactNameColorType } from '../../../types/Colors.std.ts'; enum ModalState { AddingGroupMembers, diff --git a/ts/components/conversation/conversation-details/ConversationDetailsActions.dom.stories.tsx b/ts/components/conversation/conversation-details/ConversationDetailsActions.dom.stories.tsx index 281e29a2f9..4db65a40fd 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsActions.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsActions.dom.stories.tsx @@ -5,8 +5,8 @@ import * as React from 'react'; import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './ConversationDetailsActions.dom.js'; -import { ConversationDetailsActions } from './ConversationDetailsActions.dom.js'; +import type { Props } from './ConversationDetailsActions.dom.tsx'; +import { ConversationDetailsActions } from './ConversationDetailsActions.dom.tsx'; const { isBoolean } = lodash; diff --git a/ts/components/conversation/conversation-details/ConversationDetailsActions.dom.tsx b/ts/components/conversation/conversation-details/ConversationDetailsActions.dom.tsx index 36aa72dcef..c33770afe4 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsActions.dom.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsActions.dom.tsx @@ -5,17 +5,17 @@ import type { ReactNode } from 'react'; import React, { useState } from 'react'; import classNames from 'classnames'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { ConfirmationDialog } from '../../ConfirmationDialog.dom.js'; -import { Tooltip, TooltipPlacement } from '../../Tooltip.dom.js'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { ConfirmationDialog } from '../../ConfirmationDialog.dom.tsx'; +import { Tooltip, TooltipPlacement } from '../../Tooltip.dom.tsx'; -import { PanelRow } from './PanelRow.dom.js'; -import { PanelSection } from './PanelSection.dom.js'; +import { PanelRow } from './PanelRow.dom.tsx'; +import { PanelSection } from './PanelSection.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './ConversationDetailsIcon.dom.js'; -import { DeleteMessagesConfirmationDialog } from '../../DeleteMessagesConfirmationDialog.dom.js'; +} from './ConversationDetailsIcon.dom.tsx'; +import { DeleteMessagesConfirmationDialog } from '../../DeleteMessagesConfirmationDialog.dom.tsx'; export type Props = { acceptConversation: (id: string) => void; diff --git a/ts/components/conversation/conversation-details/ConversationDetailsGroups.dom.tsx b/ts/components/conversation/conversation-details/ConversationDetailsGroups.dom.tsx index ed432b9414..d1fed52d13 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsGroups.dom.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsGroups.dom.tsx @@ -5,15 +5,15 @@ import React from 'react'; import type { ConversationType, ShowConversationType, -} from '../../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { Avatar, AvatarSize } from '../../Avatar.dom.js'; +} from '../../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { Avatar, AvatarSize } from '../../Avatar.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './ConversationDetailsIcon.dom.js'; -import { PanelRow } from './PanelRow.dom.js'; -import { PanelSection } from './PanelSection.dom.js'; +} from './ConversationDetailsIcon.dom.tsx'; +import { PanelRow } from './PanelRow.dom.tsx'; +import { PanelSection } from './PanelSection.dom.tsx'; type Props = { contactId: string; diff --git a/ts/components/conversation/conversation-details/ConversationDetailsHeader.dom.stories.tsx b/ts/components/conversation/conversation-details/ConversationDetailsHeader.dom.stories.tsx index 87aa8a03f7..cac928a078 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsHeader.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsHeader.dom.stories.tsx @@ -4,12 +4,12 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { getFakeBadges } from '../../../test-helpers/getFakeBadge.std.js'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { getFakeBadges } from '../../../test-helpers/getFakeBadge.std.ts'; import { StorybookThemeContext } from '../../../../.storybook/StorybookThemeContext.std.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import type { Props } from './ConversationDetailsHeader.dom.js'; -import { ConversationDetailsHeader } from './ConversationDetailsHeader.dom.js'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import type { Props } from './ConversationDetailsHeader.dom.tsx'; +import { ConversationDetailsHeader } from './ConversationDetailsHeader.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/conversation-details/ConversationDetailsHeader.dom.tsx b/ts/components/conversation/conversation-details/ConversationDetailsHeader.dom.tsx index d18d4c46fe..231726d8e8 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsHeader.dom.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsHeader.dom.tsx @@ -4,21 +4,21 @@ import type { ReactNode } from 'react'; import React, { useState } from 'react'; -import { Avatar, AvatarBlur, AvatarSize } from '../../Avatar.dom.js'; -import { AvatarLightbox } from '../../AvatarLightbox.dom.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import { GroupDescription } from '../GroupDescription.dom.js'; -import { About } from '../About.dom.js'; -import type { LocalizerType, ThemeType } from '../../../types/Util.std.js'; -import { assertDev } from '../../../util/assert.std.js'; -import { BadgeDialog } from '../../BadgeDialog.dom.js'; -import type { BadgeType } from '../../../badges/types.std.js'; -import { UserText } from '../../UserText.dom.js'; -import { isInSystemContacts } from '../../../util/isInSystemContacts.std.js'; -import { InContactsIcon } from '../../InContactsIcon.dom.js'; -import type { ContactModalStateType } from '../../../types/globalModals.std.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; +import { Avatar, AvatarBlur, AvatarSize } from '../../Avatar.dom.tsx'; +import { AvatarLightbox } from '../../AvatarLightbox.dom.tsx'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import { GroupDescription } from '../GroupDescription.dom.tsx'; +import { About } from '../About.dom.tsx'; +import type { LocalizerType, ThemeType } from '../../../types/Util.std.ts'; +import { assertDev } from '../../../util/assert.std.ts'; +import { BadgeDialog } from '../../BadgeDialog.dom.tsx'; +import type { BadgeType } from '../../../badges/types.std.ts'; +import { UserText } from '../../UserText.dom.tsx'; +import { isInSystemContacts } from '../../../util/isInSystemContacts.std.ts'; +import { InContactsIcon } from '../../InContactsIcon.dom.tsx'; +import type { ContactModalStateType } from '../../../types/globalModals.std.ts'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { AxoSymbol } from '../../../axo/AxoSymbol.dom.tsx'; export type Props = { areWeASubscriber: boolean; diff --git a/ts/components/conversation/conversation-details/ConversationDetailsIcon.dom.stories.tsx b/ts/components/conversation/conversation-details/ConversationDetailsIcon.dom.stories.tsx index 01bde74f8a..38dbc0d80f 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsIcon.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsIcon.dom.stories.tsx @@ -4,11 +4,11 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './ConversationDetailsIcon.dom.js'; +import type { Props } from './ConversationDetailsIcon.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './ConversationDetailsIcon.dom.js'; +} from './ConversationDetailsIcon.dom.tsx'; export default { title: 'Components/Conversation/ConversationDetails/ConversationDetailIcon', diff --git a/ts/components/conversation/conversation-details/ConversationDetailsIcon.dom.tsx b/ts/components/conversation/conversation-details/ConversationDetailsIcon.dom.tsx index 4673546731..ab195f02dc 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsIcon.dom.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsIcon.dom.tsx @@ -4,8 +4,8 @@ import React from 'react'; import classNames from 'classnames'; -import { Spinner } from '../../Spinner.dom.js'; -import { bemGenerator } from './util.std.js'; +import { Spinner } from '../../Spinner.dom.tsx'; +import { bemGenerator } from './util.std.ts'; export enum IconType { 'archive' = 'archive', diff --git a/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.dom.stories.tsx b/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.dom.stories.tsx index 387941b148..235e2abb0a 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.dom.stories.tsx @@ -4,16 +4,16 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { ThemeType } from '../../../types/Util.std.js'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { ThemeType } from '../../../types/Util.std.ts'; import type { Props, GroupV2Membership, -} from './ConversationDetailsMembershipList.dom.js'; -import { ConversationDetailsMembershipList } from './ConversationDetailsMembershipList.dom.js'; -import type { ContactNameColorType } from '../../../types/Colors.std.js'; -import { ContactNameColors } from '../../../types/Colors.std.js'; +} from './ConversationDetailsMembershipList.dom.tsx'; +import { ConversationDetailsMembershipList } from './ConversationDetailsMembershipList.dom.tsx'; +import type { ContactNameColorType } from '../../../types/Colors.std.ts'; +import { ContactNameColors } from '../../../types/Colors.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.dom.tsx b/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.dom.tsx index f1d675976d..c188b9442b 100644 --- a/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.dom.tsx +++ b/ts/components/conversation/conversation-details/ConversationDetailsMembershipList.dom.tsx @@ -3,23 +3,23 @@ import React from 'react'; -import type { LocalizerType, ThemeType } from '../../../types/Util.std.js'; +import type { LocalizerType, ThemeType } from '../../../types/Util.std.ts'; -import { Avatar, AvatarSize } from '../../Avatar.dom.js'; -import { Emojify } from '../Emojify.dom.js'; +import { Avatar, AvatarSize } from '../../Avatar.dom.tsx'; +import { Emojify } from '../Emojify.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './ConversationDetailsIcon.dom.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.js'; -import { PanelRow } from './PanelRow.dom.js'; -import { PanelSection } from './PanelSection.dom.js'; -import { GroupMemberLabel } from '../ContactName.dom.js'; -import { AriaClickable } from '../../../axo/AriaClickable.dom.js'; -import type { ContactModalStateType } from '../../../types/globalModals.std.js'; -import type { ContactNameColorType } from '../../../types/Colors.std.js'; +} from './ConversationDetailsIcon.dom.tsx'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.ts'; +import { PanelRow } from './PanelRow.dom.tsx'; +import { PanelSection } from './PanelSection.dom.tsx'; +import { GroupMemberLabel } from '../ContactName.dom.tsx'; +import { AriaClickable } from '../../../axo/AriaClickable.dom.tsx'; +import type { ContactModalStateType } from '../../../types/globalModals.std.ts'; +import type { ContactNameColorType } from '../../../types/Colors.std.ts'; export type GroupV2Membership = { isAdmin: boolean; diff --git a/ts/components/conversation/conversation-details/ConversationNotificationsModal.dom.tsx b/ts/components/conversation/conversation-details/ConversationNotificationsModal.dom.tsx index c9da9b1574..2c9b5d0b4e 100644 --- a/ts/components/conversation/conversation-details/ConversationNotificationsModal.dom.tsx +++ b/ts/components/conversation/conversation-details/ConversationNotificationsModal.dom.tsx @@ -4,12 +4,12 @@ import React, { useMemo, useState } from 'react'; import { v4 as uuid } from 'uuid'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { getMuteOptions } from '../../../util/getMuteOptions.std.js'; -import { parseIntOrThrow } from '../../../util/parseIntOrThrow.std.js'; -import { CircleCheckbox, Variant } from '../../CircleCheckbox.dom.js'; -import { Modal } from '../../Modal.dom.js'; -import { Button, ButtonVariant } from '../../Button.dom.js'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { getMuteOptions } from '../../../util/getMuteOptions.std.ts'; +import { parseIntOrThrow } from '../../../util/parseIntOrThrow.std.ts'; +import { CircleCheckbox, Variant } from '../../CircleCheckbox.dom.tsx'; +import { Modal } from '../../Modal.dom.tsx'; +import { Button, ButtonVariant } from '../../Button.dom.tsx'; type PropsType = { i18n: LocalizerType; diff --git a/ts/components/conversation/conversation-details/ConversationNotificationsSettings.dom.stories.tsx b/ts/components/conversation/conversation-details/ConversationNotificationsSettings.dom.stories.tsx index 45db11a56a..afacf45707 100644 --- a/ts/components/conversation/conversation-details/ConversationNotificationsSettings.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/ConversationNotificationsSettings.dom.stories.tsx @@ -4,8 +4,8 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './ConversationNotificationsSettings.dom.js'; -import { ConversationNotificationsSettings } from './ConversationNotificationsSettings.dom.js'; +import type { PropsType } from './ConversationNotificationsSettings.dom.tsx'; +import { ConversationNotificationsSettings } from './ConversationNotificationsSettings.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/conversation-details/ConversationNotificationsSettings.dom.tsx b/ts/components/conversation/conversation-details/ConversationNotificationsSettings.dom.tsx index d056a29c92..e16e20eca6 100644 --- a/ts/components/conversation/conversation-details/ConversationNotificationsSettings.dom.tsx +++ b/ts/components/conversation/conversation-details/ConversationNotificationsSettings.dom.tsx @@ -2,18 +2,18 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useMemo, useId } from 'react'; -import type { ConversationTypeType } from '../../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { PanelSection } from './PanelSection.dom.js'; -import { PanelRow } from './PanelRow.dom.js'; +import type { ConversationTypeType } from '../../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { PanelSection } from './PanelSection.dom.tsx'; +import { PanelRow } from './PanelRow.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './ConversationDetailsIcon.dom.js'; -import { Select } from '../../Select.dom.js'; -import { isConversationMuted } from '../../../util/isConversationMuted.std.js'; -import { getMuteOptions } from '../../../util/getMuteOptions.std.js'; -import { parseIntOrThrow } from '../../../util/parseIntOrThrow.std.js'; +} from './ConversationDetailsIcon.dom.tsx'; +import { Select } from '../../Select.dom.tsx'; +import { isConversationMuted } from '../../../util/isConversationMuted.std.ts'; +import { getMuteOptions } from '../../../util/getMuteOptions.std.ts'; +import { parseIntOrThrow } from '../../../util/parseIntOrThrow.std.ts'; export type PropsType = { id: string; diff --git a/ts/components/conversation/conversation-details/EditConversationAttributesModal.dom.stories.tsx b/ts/components/conversation/conversation-details/EditConversationAttributesModal.dom.stories.tsx index 1fb6b2c2cb..14d4ee0ff7 100644 --- a/ts/components/conversation/conversation-details/EditConversationAttributesModal.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/EditConversationAttributesModal.dom.stories.tsx @@ -5,8 +5,8 @@ import type { ComponentProps } from 'react'; import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { EditConversationAttributesModal } from './EditConversationAttributesModal.dom.js'; -import { RequestState } from './util.std.js'; +import { EditConversationAttributesModal } from './EditConversationAttributesModal.dom.tsx'; +import { RequestState } from './util.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/conversation-details/EditConversationAttributesModal.dom.tsx b/ts/components/conversation/conversation-details/EditConversationAttributesModal.dom.tsx index e73dbb3d44..93bd63eba4 100644 --- a/ts/components/conversation/conversation-details/EditConversationAttributesModal.dom.tsx +++ b/ts/components/conversation/conversation-details/EditConversationAttributesModal.dom.tsx @@ -4,23 +4,23 @@ import type { FormEventHandler } from 'react'; import React, { useCallback, useRef, useState } from 'react'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { Modal } from '../../Modal.dom.js'; -import { AvatarEditor } from '../../AvatarEditor.dom.js'; -import { AvatarPreview } from '../../AvatarPreview.dom.js'; -import { Button, ButtonVariant } from '../../Button.dom.js'; -import { Spinner } from '../../Spinner.dom.js'; -import { GroupDescriptionInput } from '../../GroupDescriptionInput.dom.js'; -import { GroupTitleInput } from '../../GroupTitleInput.dom.js'; -import { RequestState } from './util.std.js'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { Modal } from '../../Modal.dom.tsx'; +import { AvatarEditor } from '../../AvatarEditor.dom.tsx'; +import { AvatarPreview } from '../../AvatarPreview.dom.tsx'; +import { Button, ButtonVariant } from '../../Button.dom.tsx'; +import { Spinner } from '../../Spinner.dom.tsx'; +import { GroupDescriptionInput } from '../../GroupDescriptionInput.dom.tsx'; +import { GroupTitleInput } from '../../GroupTitleInput.dom.tsx'; +import { RequestState } from './util.std.ts'; import type { AvatarDataType, DeleteAvatarFromDiskActionType, ReplaceAvatarActionType, SaveAvatarToDiskActionType, -} from '../../../types/Avatar.std.js'; -import type { AvatarColorType } from '../../../types/Colors.std.js'; -import { useConfirmDiscard } from '../../../hooks/useConfirmDiscard.dom.js'; +} from '../../../types/Avatar.std.ts'; +import type { AvatarColorType } from '../../../types/Colors.std.ts'; +import { useConfirmDiscard } from '../../../hooks/useConfirmDiscard.dom.tsx'; type PropsType = { avatarColor?: AvatarColorType; diff --git a/ts/components/conversation/conversation-details/GroupLinkManagement.dom.stories.tsx b/ts/components/conversation/conversation-details/GroupLinkManagement.dom.stories.tsx index 654ff959fb..9d7f566dbb 100644 --- a/ts/components/conversation/conversation-details/GroupLinkManagement.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/GroupLinkManagement.dom.stories.tsx @@ -4,11 +4,11 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupLinkManagement.dom.js'; -import { GroupLinkManagement } from './GroupLinkManagement.dom.js'; -import { SignalService as Proto } from '../../../protobuf/index.std.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; +import type { PropsType } from './GroupLinkManagement.dom.tsx'; +import { GroupLinkManagement } from './GroupLinkManagement.dom.tsx'; +import { SignalService as Proto } from '../../../protobuf/index.std.ts'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/conversation-details/GroupLinkManagement.dom.tsx b/ts/components/conversation/conversation-details/GroupLinkManagement.dom.tsx index f9e9b175f9..74b2845393 100644 --- a/ts/components/conversation/conversation-details/GroupLinkManagement.dom.tsx +++ b/ts/components/conversation/conversation-details/GroupLinkManagement.dom.tsx @@ -1,20 +1,20 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useId, useState } from 'react'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { ConfirmationDialog } from '../../ConfirmationDialog.dom.js'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { ConfirmationDialog } from '../../ConfirmationDialog.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './ConversationDetailsIcon.dom.js'; -import { PanelRow } from './PanelRow.dom.js'; -import { PanelSection } from './PanelSection.dom.js'; -import { Select } from '../../Select.dom.js'; -import { SignalService as Proto } from '../../../protobuf/index.std.js'; -import { copyGroupLink } from '../../../util/copyLinksWithToast.dom.js'; -import { drop } from '../../../util/drop.std.js'; -import { useDelayedRestoreFocus } from '../../../hooks/useRestoreFocus.dom.js'; +} from './ConversationDetailsIcon.dom.tsx'; +import { PanelRow } from './PanelRow.dom.tsx'; +import { PanelSection } from './PanelSection.dom.tsx'; +import { Select } from '../../Select.dom.tsx'; +import { SignalService as Proto } from '../../../protobuf/index.std.ts'; +import { copyGroupLink } from '../../../util/copyLinksWithToast.dom.ts'; +import { drop } from '../../../util/drop.std.ts'; +import { useDelayedRestoreFocus } from '../../../hooks/useRestoreFocus.dom.ts'; const AccessControlEnum = Proto.AccessControl.AccessRequired; diff --git a/ts/components/conversation/conversation-details/GroupMemberLabelEditor.dom.stories.tsx b/ts/components/conversation/conversation-details/GroupMemberLabelEditor.dom.stories.tsx index f175632f3c..0af6cbf7b2 100644 --- a/ts/components/conversation/conversation-details/GroupMemberLabelEditor.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/GroupMemberLabelEditor.dom.stories.tsx @@ -6,15 +6,15 @@ import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; import { sample } from 'lodash'; -import type { PropsType } from './GroupMemberLabelEditor.dom.js'; -import { GroupMemberLabelEditor } from './GroupMemberLabelEditor.dom.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { ThemeType } from '../../../types/Util.std.js'; -import { getFakeBadge } from '../../../test-helpers/getFakeBadge.std.js'; -import { SECOND } from '../../../util/durations/constants.std.js'; -import { sleep } from '../../../util/sleep.std.js'; -import { SignalService as Proto } from '../../../protobuf/index.std.js'; -import { ContactNameColors } from '../../../types/Colors.std.js'; +import type { PropsType } from './GroupMemberLabelEditor.dom.tsx'; +import { GroupMemberLabelEditor } from './GroupMemberLabelEditor.dom.tsx'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { ThemeType } from '../../../types/Util.std.ts'; +import { getFakeBadge } from '../../../test-helpers/getFakeBadge.std.ts'; +import { SECOND } from '../../../util/durations/constants.std.ts'; +import { sleep } from '../../../util/sleep.std.ts'; +import { SignalService as Proto } from '../../../protobuf/index.std.ts'; +import { ContactNameColors } from '../../../types/Colors.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/conversation-details/GroupMemberLabelEditor.dom.tsx b/ts/components/conversation/conversation-details/GroupMemberLabelEditor.dom.tsx index afa1951d4b..ca072cf99b 100644 --- a/ts/components/conversation/conversation-details/GroupMemberLabelEditor.dom.tsx +++ b/ts/components/conversation/conversation-details/GroupMemberLabelEditor.dom.tsx @@ -4,45 +4,45 @@ import React, { useEffect, useRef, useState } from 'react'; import { noop } from 'lodash'; -import { Input } from '../../Input.dom.js'; -import { FunEmojiPicker } from '../../fun/FunEmojiPicker.dom.js'; +import { Input } from '../../Input.dom.tsx'; +import { FunEmojiPicker } from '../../fun/FunEmojiPicker.dom.tsx'; import { getEmojiVariantByKey, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from '../../fun/data/emojis.std.js'; -import { FunEmojiPickerButton } from '../../fun/FunButton.dom.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { AxoButton } from '../../../axo/AxoButton.dom.js'; +} from '../../fun/data/emojis.std.ts'; +import { FunEmojiPickerButton } from '../../fun/FunButton.dom.tsx'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { AxoButton } from '../../../axo/AxoButton.dom.tsx'; import { STRING_BYTE_LIMIT, STRING_GRAPHEME_LIMIT, -} from '../../../types/GroupMemberLabels.std.js'; +} from '../../../types/GroupMemberLabels.std.ts'; import { Message, MessageInteractivity, TextDirection, -} from '../Message.dom.js'; -import type { ContactNameColorType } from '../../../types/Colors.std.js'; -import { ConversationColors } from '../../../types/Colors.std.js'; -import { WidthBreakpoint } from '../../_util.std.js'; -import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.js'; -import { Avatar, AvatarSize } from '../../Avatar.dom.js'; -import { UserText } from '../../UserText.dom.js'; -import { GroupMemberLabel } from '../ContactName.dom.js'; -import { useConfirmDiscard } from '../../../hooks/useConfirmDiscard.dom.js'; -import { NavTab } from '../../../types/Nav.std.js'; -import { PanelType } from '../../../types/Panels.std.js'; +} from '../Message.dom.tsx'; +import type { ContactNameColorType } from '../../../types/Colors.std.ts'; +import { ConversationColors } from '../../../types/Colors.std.ts'; +import { WidthBreakpoint } from '../../_util.std.ts'; +import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.tsx'; +import { Avatar, AvatarSize } from '../../Avatar.dom.tsx'; +import { UserText } from '../../UserText.dom.tsx'; +import { GroupMemberLabel } from '../ContactName.dom.tsx'; +import { useConfirmDiscard } from '../../../hooks/useConfirmDiscard.dom.tsx'; +import { NavTab } from '../../../types/Nav.std.ts'; +import { PanelType } from '../../../types/Panels.std.ts'; -import type { EmojiVariantKey } from '../../fun/data/emojis.std.js'; +import type { EmojiVariantKey } from '../../fun/data/emojis.std.ts'; import type { ConversationType, UpdateGroupMemberLabelType, -} from '../../../state/ducks/conversations.preload.js'; -import type { LocalizerType, ThemeType } from '../../../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.js'; -import type { Location } from '../../../types/Nav.std.js'; -import { usePrevious } from '../../../hooks/usePrevious.std.js'; +} from '../../../state/ducks/conversations.preload.ts'; +import type { LocalizerType, ThemeType } from '../../../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.ts'; +import type { Location } from '../../../types/Nav.std.ts'; +import { usePrevious } from '../../../hooks/usePrevious.std.ts'; export type PropsDataType = { canAddLabel: boolean; diff --git a/ts/components/conversation/conversation-details/GroupV2Permissions.dom.stories.tsx b/ts/components/conversation/conversation-details/GroupV2Permissions.dom.stories.tsx index 812694ee68..aff828bb3b 100644 --- a/ts/components/conversation/conversation-details/GroupV2Permissions.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/GroupV2Permissions.dom.stories.tsx @@ -4,11 +4,11 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { PropsType } from './GroupV2Permissions.dom.js'; -import { GroupV2Permissions } from './GroupV2Permissions.dom.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { generateAci } from '../../../types/ServiceId.std.js'; +import type { PropsType } from './GroupV2Permissions.dom.tsx'; +import { GroupV2Permissions } from './GroupV2Permissions.dom.tsx'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { generateAci } from '../../../types/ServiceId.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/conversation-details/GroupV2Permissions.dom.tsx b/ts/components/conversation/conversation-details/GroupV2Permissions.dom.tsx index f2d3abaf5c..024e88a4e2 100644 --- a/ts/components/conversation/conversation-details/GroupV2Permissions.dom.tsx +++ b/ts/components/conversation/conversation-details/GroupV2Permissions.dom.tsx @@ -1,14 +1,14 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useId } from 'react'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { getAccessControlOptions } from '../../../util/getAccessControlOptions.std.js'; -import { SignalService as Proto } from '../../../protobuf/index.std.js'; -import { PanelRow } from './PanelRow.dom.js'; -import { PanelSection } from './PanelSection.dom.js'; -import { Select } from '../../Select.dom.js'; -import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.js'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { getAccessControlOptions } from '../../../util/getAccessControlOptions.std.ts'; +import { SignalService as Proto } from '../../../protobuf/index.std.ts'; +import { PanelRow } from './PanelRow.dom.tsx'; +import { PanelSection } from './PanelSection.dom.tsx'; +import { Select } from '../../Select.dom.tsx'; +import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.tsx'; export type PropsDataType = { conversation?: ConversationType; diff --git a/ts/components/conversation/conversation-details/PanelRow.dom.stories.tsx b/ts/components/conversation/conversation-details/PanelRow.dom.stories.tsx index 18d8c1a99d..e459d28eab 100644 --- a/ts/components/conversation/conversation-details/PanelRow.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/PanelRow.dom.stories.tsx @@ -4,12 +4,12 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './PanelRow.dom.js'; -import { PanelRow } from './PanelRow.dom.js'; +import type { Props } from './PanelRow.dom.tsx'; +import { PanelRow } from './PanelRow.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './ConversationDetailsIcon.dom.js'; +} from './ConversationDetailsIcon.dom.tsx'; export default { title: 'Components/Conversation/ConversationDetails/PanelRow', diff --git a/ts/components/conversation/conversation-details/PanelRow.dom.tsx b/ts/components/conversation/conversation-details/PanelRow.dom.tsx index 9ec57d1876..9b37a5fb44 100644 --- a/ts/components/conversation/conversation-details/PanelRow.dom.tsx +++ b/ts/components/conversation/conversation-details/PanelRow.dom.tsx @@ -3,8 +3,8 @@ import React, { useId } from 'react'; import classNames from 'classnames'; -import { bemGenerator } from './util.std.js'; -import { AriaClickable } from '../../../axo/AriaClickable.dom.js'; +import { bemGenerator } from './util.std.ts'; +import { AriaClickable } from '../../../axo/AriaClickable.dom.tsx'; export type Props = { alwaysShowActions?: boolean; diff --git a/ts/components/conversation/conversation-details/PanelSection.dom.stories.tsx b/ts/components/conversation/conversation-details/PanelSection.dom.stories.tsx index 205f1dccfd..5bcfd61655 100644 --- a/ts/components/conversation/conversation-details/PanelSection.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/PanelSection.dom.stories.tsx @@ -4,9 +4,9 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './PanelSection.dom.js'; -import { PanelSection } from './PanelSection.dom.js'; -import { PanelRow } from './PanelRow.dom.js'; +import type { Props } from './PanelSection.dom.tsx'; +import { PanelSection } from './PanelSection.dom.tsx'; +import { PanelRow } from './PanelRow.dom.tsx'; export default { title: 'Components/Conversation/ConversationDetails/PanelSection', diff --git a/ts/components/conversation/conversation-details/PanelSection.dom.tsx b/ts/components/conversation/conversation-details/PanelSection.dom.tsx index fd2b607429..38b9ebba0f 100644 --- a/ts/components/conversation/conversation-details/PanelSection.dom.tsx +++ b/ts/components/conversation/conversation-details/PanelSection.dom.tsx @@ -3,7 +3,7 @@ import React from 'react'; import classNames from 'classnames'; -import { bemGenerator } from './util.std.js'; +import { bemGenerator } from './util.std.ts'; export type Props = { actions?: React.ReactNode; diff --git a/ts/components/conversation/conversation-details/PendingInvites.dom.stories.tsx b/ts/components/conversation/conversation-details/PendingInvites.dom.stories.tsx index f0796d2c6c..971b247377 100644 --- a/ts/components/conversation/conversation-details/PendingInvites.dom.stories.tsx +++ b/ts/components/conversation/conversation-details/PendingInvites.dom.stories.tsx @@ -5,13 +5,13 @@ import * as React from 'react'; import lodash from 'lodash'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { generateAci } from '../../../types/ServiceId.std.js'; -import { StorySendMode } from '../../../types/Stories.std.js'; -import type { PropsType } from './PendingInvites.dom.js'; -import { PendingInvites } from './PendingInvites.dom.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { getFakeBadge } from '../../../test-helpers/getFakeBadge.std.js'; +import { generateAci } from '../../../types/ServiceId.std.ts'; +import { StorySendMode } from '../../../types/Stories.std.ts'; +import type { PropsType } from './PendingInvites.dom.tsx'; +import { PendingInvites } from './PendingInvites.dom.tsx'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { getFakeBadge } from '../../../test-helpers/getFakeBadge.std.ts'; import { StorybookThemeContext } from '../../../../.storybook/StorybookThemeContext.std.js'; const { times } = lodash; diff --git a/ts/components/conversation/conversation-details/PendingInvites.dom.tsx b/ts/components/conversation/conversation-details/PendingInvites.dom.tsx index c459d69827..3a6e985d77 100644 --- a/ts/components/conversation/conversation-details/PendingInvites.dom.tsx +++ b/ts/components/conversation/conversation-details/PendingInvites.dom.tsx @@ -4,20 +4,20 @@ import React from 'react'; import _ from 'lodash'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import type { LocalizerType, ThemeType } from '../../../types/Util.std.js'; -import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.js'; -import type { AciString } from '../../../types/ServiceId.std.js'; -import { Avatar, AvatarSize } from '../../Avatar.dom.js'; -import { ConfirmationDialog } from '../../ConfirmationDialog.dom.js'; -import { PanelSection } from './PanelSection.dom.js'; -import { PanelRow } from './PanelRow.dom.js'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import type { LocalizerType, ThemeType } from '../../../types/Util.std.ts'; +import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.ts'; +import type { AciString } from '../../../types/ServiceId.std.ts'; +import { Avatar, AvatarSize } from '../../Avatar.dom.tsx'; +import { ConfirmationDialog } from '../../ConfirmationDialog.dom.tsx'; +import { PanelSection } from './PanelSection.dom.tsx'; +import { PanelRow } from './PanelRow.dom.tsx'; import { ConversationDetailsIcon, IconType, -} from './ConversationDetailsIcon.dom.js'; -import { isAccessControlEnabled } from '../../../groups/util.std.js'; -import { Tabs } from '../../Tabs.dom.js'; +} from './ConversationDetailsIcon.dom.tsx'; +import { isAccessControlEnabled } from '../../../groups/util.std.ts'; +import { Tabs } from '../../Tabs.dom.tsx'; export type PropsDataType = { readonly conversation?: ConversationType; diff --git a/ts/components/conversation/media-gallery/AttachmentSection.dom.stories.tsx b/ts/components/conversation/media-gallery/AttachmentSection.dom.stories.tsx index a32d364cd6..146d83efd8 100644 --- a/ts/components/conversation/media-gallery/AttachmentSection.dom.stories.tsx +++ b/ts/components/conversation/media-gallery/AttachmentSection.dom.stories.tsx @@ -4,16 +4,16 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './AttachmentSection.dom.js'; -import { AttachmentSection } from './AttachmentSection.dom.js'; +import type { Props } from './AttachmentSection.dom.tsx'; +import { AttachmentSection } from './AttachmentSection.dom.tsx'; import { createRandomDocuments, createRandomMedia, createRandomLinks, createRandomAudio, days, -} from './utils/mocks.std.js'; -import { MediaItem } from './utils/storybook.dom.js'; +} from './utils/mocks.std.ts'; +import { MediaItem } from './utils/storybook.dom.tsx'; export default { title: 'Components/Conversation/MediaGallery/AttachmentSection', diff --git a/ts/components/conversation/media-gallery/AttachmentSection.dom.tsx b/ts/components/conversation/media-gallery/AttachmentSection.dom.tsx index 8ff3a2fd56..f95d3fc140 100644 --- a/ts/components/conversation/media-gallery/AttachmentSection.dom.tsx +++ b/ts/components/conversation/media-gallery/AttachmentSection.dom.tsx @@ -3,16 +3,16 @@ import React, { Fragment } from 'react'; -import type { ItemClickEvent } from './types/ItemClickEvent.std.js'; +import type { ItemClickEvent } from './types/ItemClickEvent.std.ts'; import type { GenericMediaItemType, MediaItemType, LinkPreviewMediaItemType, ContactMediaItemType, -} from '../../../types/MediaItem.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { tw } from '../../../axo/tw.dom.js'; +} from '../../../types/MediaItem.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { tw } from '../../../axo/tw.dom.tsx'; export type Props = { header?: string; diff --git a/ts/components/conversation/media-gallery/AudioListItem.dom.stories.tsx b/ts/components/conversation/media-gallery/AudioListItem.dom.stories.tsx index fc5a577852..cf1f4bef26 100644 --- a/ts/components/conversation/media-gallery/AudioListItem.dom.stories.tsx +++ b/ts/components/conversation/media-gallery/AudioListItem.dom.stories.tsx @@ -4,12 +4,12 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './AudioListItem.dom.js'; -import { AudioListItem } from './AudioListItem.dom.js'; +import type { Props } from './AudioListItem.dom.tsx'; +import { AudioListItem } from './AudioListItem.dom.tsx'; import { createPreparedMediaItems, createRandomAudio, -} from './utils/mocks.std.js'; +} from './utils/mocks.std.ts'; export default { title: 'Components/Conversation/MediaGallery/AudioListItem', diff --git a/ts/components/conversation/media-gallery/AudioListItem.dom.tsx b/ts/components/conversation/media-gallery/AudioListItem.dom.tsx index 27f5937205..64458633ae 100644 --- a/ts/components/conversation/media-gallery/AudioListItem.dom.tsx +++ b/ts/components/conversation/media-gallery/AudioListItem.dom.tsx @@ -7,17 +7,17 @@ import type { Transition } from 'motion/react'; import { motion } from 'motion/react'; import type { ReadonlyDeep } from 'type-fest'; -import { tw } from '../../../axo/tw.dom.js'; -import { formatFileSize } from '../../../util/formatFileSize.std.js'; -import { durationToPlaybackText } from '../../../util/durationToPlaybackText.std.js'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { formatFileSize } from '../../../util/formatFileSize.std.ts'; +import { durationToPlaybackText } from '../../../util/durationToPlaybackText.std.ts'; import type { GenericMediaItemType, MediaItemType, -} from '../../../types/MediaItem.std.js'; -import type { LocalizerType, ThemeType } from '../../../types/Util.std.js'; -import { type AttachmentStatusType } from '../../../hooks/useAttachmentStatus.std.js'; -import { useComputePeaks } from '../../../hooks/useComputePeaks.dom.js'; -import { ListItem } from './ListItem.dom.js'; +} from '../../../types/MediaItem.std.ts'; +import type { LocalizerType, ThemeType } from '../../../types/Util.std.ts'; +import { type AttachmentStatusType } from '../../../hooks/useAttachmentStatus.std.ts'; +import { useComputePeaks } from '../../../hooks/useComputePeaks.dom.ts'; +import { ListItem } from './ListItem.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/conversation/media-gallery/ContactListItem.dom.stories.tsx b/ts/components/conversation/media-gallery/ContactListItem.dom.stories.tsx index 488c976d0d..2e4325897e 100644 --- a/ts/components/conversation/media-gallery/ContactListItem.dom.stories.tsx +++ b/ts/components/conversation/media-gallery/ContactListItem.dom.stories.tsx @@ -4,12 +4,12 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './ContactListItem.dom.js'; -import { ContactListItem } from './ContactListItem.dom.js'; +import type { Props } from './ContactListItem.dom.tsx'; +import { ContactListItem } from './ContactListItem.dom.tsx'; import { createPreparedMediaItems, createRandomContacts, -} from './utils/mocks.std.js'; +} from './utils/mocks.std.ts'; export default { title: 'Components/Conversation/MediaGallery/ContactListItem', diff --git a/ts/components/conversation/media-gallery/ContactListItem.dom.tsx b/ts/components/conversation/media-gallery/ContactListItem.dom.tsx index 61c2940624..debafe684d 100644 --- a/ts/components/conversation/media-gallery/ContactListItem.dom.tsx +++ b/ts/components/conversation/media-gallery/ContactListItem.dom.tsx @@ -7,13 +7,13 @@ import type { ReadonlyDeep } from 'type-fest'; import type { GenericMediaItemType, ContactMediaItemType, -} from '../../../types/MediaItem.std.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { getName } from '../../../types/EmbeddedContact.std.js'; -import { AvatarColors } from '../../../types/Colors.std.js'; -import type { AttachmentStatusType } from '../../../hooks/useAttachmentStatus.std.js'; -import { Avatar, AvatarBlur, AvatarSize } from '../../Avatar.dom.js'; -import { ListItem } from './ListItem.dom.js'; +} from '../../../types/MediaItem.std.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { getName } from '../../../types/EmbeddedContact.std.ts'; +import { AvatarColors } from '../../../types/Colors.std.ts'; +import type { AttachmentStatusType } from '../../../hooks/useAttachmentStatus.std.ts'; +import { Avatar, AvatarBlur, AvatarSize } from '../../Avatar.dom.tsx'; +import { ListItem } from './ListItem.dom.tsx'; export type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/media-gallery/DocumentListItem.dom.stories.tsx b/ts/components/conversation/media-gallery/DocumentListItem.dom.stories.tsx index df16b2f550..aac0fa7acd 100644 --- a/ts/components/conversation/media-gallery/DocumentListItem.dom.stories.tsx +++ b/ts/components/conversation/media-gallery/DocumentListItem.dom.stories.tsx @@ -4,12 +4,12 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './DocumentListItem.dom.js'; -import { DocumentListItem } from './DocumentListItem.dom.js'; +import type { Props } from './DocumentListItem.dom.tsx'; +import { DocumentListItem } from './DocumentListItem.dom.tsx'; import { createPreparedMediaItems, createRandomDocuments, -} from './utils/mocks.std.js'; +} from './utils/mocks.std.ts'; export default { title: 'Components/Conversation/MediaGallery/DocumentListItem', diff --git a/ts/components/conversation/media-gallery/DocumentListItem.dom.tsx b/ts/components/conversation/media-gallery/DocumentListItem.dom.tsx index 897b3f7322..1d2adb17d8 100644 --- a/ts/components/conversation/media-gallery/DocumentListItem.dom.tsx +++ b/ts/components/conversation/media-gallery/DocumentListItem.dom.tsx @@ -4,19 +4,19 @@ import React, { type ReactNode } from 'react'; import type { ReadonlyDeep } from 'type-fest'; -import { formatFileSize } from '../../../util/formatFileSize.std.js'; +import { formatFileSize } from '../../../util/formatFileSize.std.ts'; import type { GenericMediaItemType, MediaItemType, -} from '../../../types/MediaItem.std.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; -import { FileThumbnail } from '../../FileThumbnail.dom.js'; +} from '../../../types/MediaItem.std.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { AxoSymbol } from '../../../axo/AxoSymbol.dom.tsx'; +import { FileThumbnail } from '../../FileThumbnail.dom.tsx'; import { useAttachmentStatus, type AttachmentStatusType, -} from '../../../hooks/useAttachmentStatus.std.js'; -import { ListItem } from './ListItem.dom.js'; +} from '../../../hooks/useAttachmentStatus.std.ts'; +import { ListItem } from './ListItem.dom.tsx'; export type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/media-gallery/EmptyState.dom.stories.tsx b/ts/components/conversation/media-gallery/EmptyState.dom.stories.tsx index 6bdadb0b42..880995f44f 100644 --- a/ts/components/conversation/media-gallery/EmptyState.dom.stories.tsx +++ b/ts/components/conversation/media-gallery/EmptyState.dom.stories.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './EmptyState.dom.js'; -import { EmptyState } from './EmptyState.dom.js'; +import type { Props } from './EmptyState.dom.tsx'; +import { EmptyState } from './EmptyState.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/media-gallery/EmptyState.dom.tsx b/ts/components/conversation/media-gallery/EmptyState.dom.tsx index dc0efd1d6f..50777c92a8 100644 --- a/ts/components/conversation/media-gallery/EmptyState.dom.tsx +++ b/ts/components/conversation/media-gallery/EmptyState.dom.tsx @@ -3,10 +3,10 @@ import React from 'react'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import type { MediaTabType } from '../../../types/MediaItem.std.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import type { MediaTabType } from '../../../types/MediaItem.std.ts'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; export type Props = { i18n: LocalizerType; diff --git a/ts/components/conversation/media-gallery/LinkPreviewItem.dom.stories.tsx b/ts/components/conversation/media-gallery/LinkPreviewItem.dom.stories.tsx index 8d1be23843..c5fe83d4ae 100644 --- a/ts/components/conversation/media-gallery/LinkPreviewItem.dom.stories.tsx +++ b/ts/components/conversation/media-gallery/LinkPreviewItem.dom.stories.tsx @@ -4,12 +4,12 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './LinkPreviewItem.dom.js'; -import { LinkPreviewItem } from './LinkPreviewItem.dom.js'; +import type { Props } from './LinkPreviewItem.dom.tsx'; +import { LinkPreviewItem } from './LinkPreviewItem.dom.tsx'; import { createPreparedMediaItems, createRandomLinks, -} from './utils/mocks.std.js'; +} from './utils/mocks.std.ts'; export default { title: 'Components/Conversation/MediaGallery/LinkPreviewItem', diff --git a/ts/components/conversation/media-gallery/LinkPreviewItem.dom.tsx b/ts/components/conversation/media-gallery/LinkPreviewItem.dom.tsx index 57f3172602..b6c822683b 100644 --- a/ts/components/conversation/media-gallery/LinkPreviewItem.dom.tsx +++ b/ts/components/conversation/media-gallery/LinkPreviewItem.dom.tsx @@ -8,17 +8,17 @@ import { getAlt, getUrl, defaultBlurHash, -} from '../../../util/Attachment.std.js'; +} from '../../../util/Attachment.std.ts'; import type { GenericMediaItemType, LinkPreviewMediaItemType, -} from '../../../types/MediaItem.std.js'; -import type { LocalizerType, ThemeType } from '../../../types/Util.std.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; -import type { AttachmentStatusType } from '../../../hooks/useAttachmentStatus.std.js'; -import { ImageOrBlurhash } from '../../ImageOrBlurhash.dom.js'; -import { ListItem } from './ListItem.dom.js'; +} from '../../../types/MediaItem.std.ts'; +import type { LocalizerType, ThemeType } from '../../../types/Util.std.ts'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { AxoSymbol } from '../../../axo/AxoSymbol.dom.tsx'; +import type { AttachmentStatusType } from '../../../hooks/useAttachmentStatus.std.ts'; +import { ImageOrBlurhash } from '../../ImageOrBlurhash.dom.tsx'; +import { ListItem } from './ListItem.dom.tsx'; export type DataProps = Readonly<{ mediaItem: LinkPreviewMediaItemType; diff --git a/ts/components/conversation/media-gallery/ListItem.dom.tsx b/ts/components/conversation/media-gallery/ListItem.dom.tsx index ca439e2e3d..d623275e89 100644 --- a/ts/components/conversation/media-gallery/ListItem.dom.tsx +++ b/ts/components/conversation/media-gallery/ListItem.dom.tsx @@ -5,19 +5,19 @@ import React, { useCallback, type ReactNode } from 'react'; import type { ReadonlyDeep } from 'type-fest'; import moment from 'moment'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import type { GenericMediaItemType } from '../../../types/MediaItem.std.js'; -import type { AttachmentForUIType } from '../../../types/Attachment.std.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { SpinnerV2 } from '../../SpinnerV2.dom.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { AriaClickable } from '../../../axo/AriaClickable.dom.js'; -import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; -import { UserText } from '../../UserText.dom.js'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import type { GenericMediaItemType } from '../../../types/MediaItem.std.ts'; +import type { AttachmentForUIType } from '../../../types/Attachment.std.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { SpinnerV2 } from '../../SpinnerV2.dom.tsx'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { AriaClickable } from '../../../axo/AriaClickable.dom.tsx'; +import { AxoSymbol } from '../../../axo/AxoSymbol.dom.tsx'; +import { UserText } from '../../UserText.dom.tsx'; import { useAttachmentStatus, type AttachmentStatusType, -} from '../../../hooks/useAttachmentStatus.std.js'; +} from '../../../hooks/useAttachmentStatus.std.ts'; export type Props = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/conversation/media-gallery/MediaContextMenu.dom.tsx b/ts/components/conversation/media-gallery/MediaContextMenu.dom.tsx index 4faa092805..8203ddee4d 100644 --- a/ts/components/conversation/media-gallery/MediaContextMenu.dom.tsx +++ b/ts/components/conversation/media-gallery/MediaContextMenu.dom.tsx @@ -4,9 +4,9 @@ import React, { useCallback, useState } from 'react'; import type { ReactNode } from 'react'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { AxoContextMenu } from '../../../axo/AxoContextMenu.dom.js'; -import { DeleteAttachmentConfirmationDialog } from '../../DeleteAttachmentConfirmationDialog.dom.js'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { AxoContextMenu } from '../../../axo/AxoContextMenu.dom.tsx'; +import { DeleteAttachmentConfirmationDialog } from '../../DeleteAttachmentConfirmationDialog.dom.tsx'; export type PropsType = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/conversation/media-gallery/MediaGallery.dom.stories.tsx b/ts/components/conversation/media-gallery/MediaGallery.dom.stories.tsx index 0d8f8d2679..cb8a74a59c 100644 --- a/ts/components/conversation/media-gallery/MediaGallery.dom.stories.tsx +++ b/ts/components/conversation/media-gallery/MediaGallery.dom.stories.tsx @@ -7,10 +7,10 @@ import type { Meta } from '@storybook/react'; import type { MediaTabType, MediaSortOrderType, -} from '../../../types/MediaItem.std.js'; -import type { Props } from './MediaGallery.dom.js'; -import { MediaGallery } from './MediaGallery.dom.js'; -import { PanelHeader } from './PanelHeader.dom.js'; +} from '../../../types/MediaItem.std.ts'; +import type { Props } from './MediaGallery.dom.tsx'; +import { MediaGallery } from './MediaGallery.dom.tsx'; +import { PanelHeader } from './PanelHeader.dom.tsx'; import { createPreparedMediaItems, createRandomDocuments, @@ -18,8 +18,8 @@ import { createRandomAudio, createRandomLinks, days, -} from './utils/mocks.std.js'; -import { MediaItem } from './utils/storybook.dom.js'; +} from './utils/mocks.std.ts'; +import { MediaItem } from './utils/storybook.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/media-gallery/MediaGallery.dom.tsx b/ts/components/conversation/media-gallery/MediaGallery.dom.tsx index 92bb529023..fe7bf1acf6 100644 --- a/ts/components/conversation/media-gallery/MediaGallery.dom.tsx +++ b/ts/components/conversation/media-gallery/MediaGallery.dom.tsx @@ -12,8 +12,8 @@ import React, { import moment from 'moment'; -import type { ItemClickEvent } from './types/ItemClickEvent.std.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; +import type { ItemClickEvent } from './types/ItemClickEvent.std.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; import type { MediaTabType, MediaSortOrderType, @@ -21,20 +21,20 @@ import type { ContactMediaItemType, MediaItemType, GenericMediaItemType, -} from '../../../types/MediaItem.std.js'; +} from '../../../types/MediaItem.std.ts'; import type { SaveAttachmentActionCreatorType, PushPanelForConversationActionType, -} from '../../../state/ducks/conversations.preload.js'; -import { AttachmentSection } from './AttachmentSection.dom.js'; -import { EmptyState } from './EmptyState.dom.js'; -import { groupMediaItemsByDate } from './groupMediaItemsByDate.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import { openLinkInWebBrowser } from '../../../util/openLinkInWebBrowser.dom.js'; -import { useIntersectionObserver } from '../../../hooks/useIntersectionObserver.std.js'; -import type { AttachmentForUIType } from '../../../types/Attachment.std.js'; -import { PanelType } from '../../../types/Panels.std.js'; -import { tw } from '../../../axo/tw.dom.js'; +} from '../../../state/ducks/conversations.preload.ts'; +import { AttachmentSection } from './AttachmentSection.dom.tsx'; +import { EmptyState } from './EmptyState.dom.tsx'; +import { groupMediaItemsByDate } from './groupMediaItemsByDate.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import { openLinkInWebBrowser } from '../../../util/openLinkInWebBrowser.dom.ts'; +import { useIntersectionObserver } from '../../../hooks/useIntersectionObserver.std.ts'; +import type { AttachmentForUIType } from '../../../types/Attachment.std.ts'; +import { PanelType } from '../../../types/Panels.std.ts'; +import { tw } from '../../../axo/tw.dom.tsx'; export type Props = { conversationId: string; diff --git a/ts/components/conversation/media-gallery/MediaGridItem.dom.stories.tsx b/ts/components/conversation/media-gallery/MediaGridItem.dom.stories.tsx index 5b86c8e922..f0d010055d 100644 --- a/ts/components/conversation/media-gallery/MediaGridItem.dom.stories.tsx +++ b/ts/components/conversation/media-gallery/MediaGridItem.dom.stories.tsx @@ -5,16 +5,16 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; import { StorybookThemeContext } from '../../../../.storybook/StorybookThemeContext.std.js'; -import type { MediaItemType } from '../../../types/MediaItem.std.js'; -import { SignalService } from '../../../protobuf/index.std.js'; +import type { MediaItemType } from '../../../types/MediaItem.std.ts'; +import { SignalService } from '../../../protobuf/index.std.ts'; import { IMAGE_JPEG, VIDEO_MP4, APPLICATION_OCTET_STREAM, type MIMEType, -} from '../../../types/MIME.std.js'; -import type { Props } from './MediaGridItem.dom.js'; -import { MediaGridItem } from './MediaGridItem.dom.js'; +} from '../../../types/MIME.std.ts'; +import type { Props } from './MediaGridItem.dom.tsx'; +import { MediaGridItem } from './MediaGridItem.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/media-gallery/MediaGridItem.dom.tsx b/ts/components/conversation/media-gallery/MediaGridItem.dom.tsx index 37512cbfcb..57960c3687 100644 --- a/ts/components/conversation/media-gallery/MediaGridItem.dom.tsx +++ b/ts/components/conversation/media-gallery/MediaGridItem.dom.tsx @@ -4,27 +4,27 @@ import React, { useCallback, type ReactNode } from 'react'; import type { ReadonlyDeep } from 'type-fest'; -import { formatFileSize } from '../../../util/formatFileSize.std.js'; -import { formatDuration } from '../../../util/formatDuration.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import type { LocalizerType, ThemeType } from '../../../types/Util.std.js'; -import type { MediaItemType } from '../../../types/MediaItem.std.js'; -import type { AttachmentForUIType } from '../../../types/Attachment.std.js'; +import { formatFileSize } from '../../../util/formatFileSize.std.ts'; +import { formatDuration } from '../../../util/formatDuration.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import type { LocalizerType, ThemeType } from '../../../types/Util.std.ts'; +import type { MediaItemType } from '../../../types/MediaItem.std.ts'; +import type { AttachmentForUIType } from '../../../types/Attachment.std.ts'; import { getAlt, getUrl, defaultBlurHash, isGIF, isVideoAttachment, -} from '../../../util/Attachment.std.js'; -import { ImageOrBlurhash } from '../../ImageOrBlurhash.dom.js'; -import { SpinnerV2 } from '../../SpinnerV2.dom.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; +} from '../../../util/Attachment.std.ts'; +import { ImageOrBlurhash } from '../../ImageOrBlurhash.dom.tsx'; +import { SpinnerV2 } from '../../SpinnerV2.dom.tsx'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { AxoSymbol } from '../../../axo/AxoSymbol.dom.tsx'; import { useAttachmentStatus, type AttachmentStatusType, -} from '../../../hooks/useAttachmentStatus.std.js'; +} from '../../../hooks/useAttachmentStatus.std.ts'; export type Props = Readonly<{ mediaItem: ReadonlyDeep; diff --git a/ts/components/conversation/media-gallery/PanelHeader.dom.tsx b/ts/components/conversation/media-gallery/PanelHeader.dom.tsx index cd4e876196..7ae842f786 100644 --- a/ts/components/conversation/media-gallery/PanelHeader.dom.tsx +++ b/ts/components/conversation/media-gallery/PanelHeader.dom.tsx @@ -3,16 +3,16 @@ import React, { useCallback } from 'react'; -import { tw } from '../../../axo/tw.dom.js'; -import { ExperimentalAxoSegmentedControl } from '../../../axo/AxoSegmentedControl.dom.js'; -import { AxoSelect } from '../../../axo/AxoSelect.dom.js'; -import { AxoDropdownMenu } from '../../../axo/AxoDropdownMenu.dom.js'; -import { AxoIconButton } from '../../../axo/AxoIconButton.dom.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { ExperimentalAxoSegmentedControl } from '../../../axo/AxoSegmentedControl.dom.tsx'; +import { AxoSelect } from '../../../axo/AxoSelect.dom.tsx'; +import { AxoDropdownMenu } from '../../../axo/AxoDropdownMenu.dom.tsx'; +import { AxoIconButton } from '../../../axo/AxoIconButton.dom.tsx'; +import type { LocalizerType } from '../../../types/Util.std.ts'; import type { MediaTabType, MediaSortOrderType, -} from '../../../types/MediaItem.std.js'; +} from '../../../types/MediaItem.std.ts'; // Provided by smart layer export type Props = Readonly<{ diff --git a/ts/components/conversation/media-gallery/groupMediaItemsByDate.std.ts b/ts/components/conversation/media-gallery/groupMediaItemsByDate.std.ts index cd04d8ae23..f3b2c3a044 100644 --- a/ts/components/conversation/media-gallery/groupMediaItemsByDate.std.ts +++ b/ts/components/conversation/media-gallery/groupMediaItemsByDate.std.ts @@ -3,8 +3,8 @@ import moment from 'moment'; import lodash from 'lodash'; -import type { GenericMediaItemType } from '../../../types/MediaItem.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; +import type { GenericMediaItemType } from '../../../types/MediaItem.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; const { compact, groupBy, sortBy } = lodash; diff --git a/ts/components/conversation/media-gallery/types/ItemClickEvent.std.ts b/ts/components/conversation/media-gallery/types/ItemClickEvent.std.ts index e0e1389449..47d2182346 100644 --- a/ts/components/conversation/media-gallery/types/ItemClickEvent.std.ts +++ b/ts/components/conversation/media-gallery/types/ItemClickEvent.std.ts @@ -1,8 +1,8 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { GenericMediaItemType } from '../../../../types/MediaItem.std.js'; -import type { AttachmentStatusType } from '../../../../hooks/useAttachmentStatus.std.js'; +import type { GenericMediaItemType } from '../../../../types/MediaItem.std.ts'; +import type { AttachmentStatusType } from '../../../../hooks/useAttachmentStatus.std.ts'; export type ItemClickEvent = Readonly<{ state: AttachmentStatusType['state']; diff --git a/ts/components/conversation/media-gallery/utils/mocks.std.ts b/ts/components/conversation/media-gallery/utils/mocks.std.ts index 71d700cb46..63b8d502e5 100644 --- a/ts/components/conversation/media-gallery/utils/mocks.std.ts +++ b/ts/components/conversation/media-gallery/utils/mocks.std.ts @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { IMAGE_JPEG, stringToMIMEType } from '../../../../types/MIME.std.js'; +import { IMAGE_JPEG, stringToMIMEType } from '../../../../types/MIME.std.ts'; import type { MediaItemType, ContactMediaItemType, LinkPreviewMediaItemType, MediaItemMessageType, GenericMediaItemType, -} from '../../../../types/MediaItem.std.js'; -import type { AttachmentForUIType } from '../../../../types/Attachment.std.js'; -import { randomBlurHash } from '../../../../util/randomBlurHash.std.js'; -import { SignalService } from '../../../../protobuf/index.std.js'; +} from '../../../../types/MediaItem.std.ts'; +import type { AttachmentForUIType } from '../../../../types/Attachment.std.ts'; +import { randomBlurHash } from '../../../../util/randomBlurHash.std.ts'; +import { SignalService } from '../../../../protobuf/index.std.ts'; const { random, range, sample, sortBy } = lodash; diff --git a/ts/components/conversation/media-gallery/utils/storybook.dom.tsx b/ts/components/conversation/media-gallery/utils/storybook.dom.tsx index c0bc277778..e029014c16 100644 --- a/ts/components/conversation/media-gallery/utils/storybook.dom.tsx +++ b/ts/components/conversation/media-gallery/utils/storybook.dom.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback, type ReactNode } from 'react'; import { action } from '@storybook/addon-actions'; -import type { PropsType } from '../../../../state/smart/MediaItem.preload.js'; -import { getSafeDomain } from '../../../../types/LinkPreview.std.js'; -import type { AttachmentStatusType } from '../../../../hooks/useAttachmentStatus.std.js'; -import { missingCaseError } from '../../../../util/missingCaseError.std.js'; -import { isVoiceMessagePlayed } from '../../../../util/isVoiceMessagePlayed.std.js'; -import { LinkPreviewItem } from '../LinkPreviewItem.dom.js'; -import { MediaContextMenu } from '../MediaContextMenu.dom.js'; -import { MediaGridItem } from '../MediaGridItem.dom.js'; -import { DocumentListItem } from '../DocumentListItem.dom.js'; -import { ContactListItem } from '../ContactListItem.dom.js'; -import { AudioListItem } from '../AudioListItem.dom.js'; +import type { PropsType } from '../../../../state/smart/MediaItem.preload.tsx'; +import { getSafeDomain } from '../../../../types/LinkPreview.std.ts'; +import type { AttachmentStatusType } from '../../../../hooks/useAttachmentStatus.std.ts'; +import { missingCaseError } from '../../../../util/missingCaseError.std.ts'; +import { isVoiceMessagePlayed } from '../../../../util/isVoiceMessagePlayed.std.ts'; +import { LinkPreviewItem } from '../LinkPreviewItem.dom.tsx'; +import { MediaContextMenu } from '../MediaContextMenu.dom.tsx'; +import { MediaGridItem } from '../MediaGridItem.dom.tsx'; +import { DocumentListItem } from '../DocumentListItem.dom.tsx'; +import { ContactListItem } from '../ContactListItem.dom.tsx'; +import { AudioListItem } from '../AudioListItem.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/pinned-messages/PinMessageDialog.dom.stories.tsx b/ts/components/conversation/pinned-messages/PinMessageDialog.dom.stories.tsx index 6e86d86b38..387bb649fa 100644 --- a/ts/components/conversation/pinned-messages/PinMessageDialog.dom.stories.tsx +++ b/ts/components/conversation/pinned-messages/PinMessageDialog.dom.stories.tsx @@ -3,7 +3,7 @@ import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { PinMessageDialog } from './PinMessageDialog.dom.js'; +import { PinMessageDialog } from './PinMessageDialog.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/pinned-messages/PinMessageDialog.dom.tsx b/ts/components/conversation/pinned-messages/PinMessageDialog.dom.tsx index b6483f70fa..499f9403bc 100644 --- a/ts/components/conversation/pinned-messages/PinMessageDialog.dom.tsx +++ b/ts/components/conversation/pinned-messages/PinMessageDialog.dom.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { MouseEvent } from 'react'; import React, { memo, useCallback, useMemo, useState } from 'react'; -import { AxoDialog } from '../../../axo/AxoDialog.dom.js'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { AxoRadioGroup } from '../../../axo/AxoRadioGroup.dom.js'; -import { DurationInSeconds } from '../../../util/durations/duration-in-seconds.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.js'; -import { isInternalFeaturesEnabled } from '../../../util/isInternalFeaturesEnabled.dom.js'; +import { AxoDialog } from '../../../axo/AxoDialog.dom.tsx'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { AxoRadioGroup } from '../../../axo/AxoRadioGroup.dom.tsx'; +import { DurationInSeconds } from '../../../util/durations/duration-in-seconds.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.tsx'; +import { isInternalFeaturesEnabled } from '../../../util/isInternalFeaturesEnabled.dom.ts'; enum DurationOption { TIME_24_HOURS = 'TIME_24_HOURS', diff --git a/ts/components/conversation/pinned-messages/PinnedMessageNotification.dom.tsx b/ts/components/conversation/pinned-messages/PinnedMessageNotification.dom.tsx index 07f7ff77ac..c0c055cd07 100644 --- a/ts/components/conversation/pinned-messages/PinnedMessageNotification.dom.tsx +++ b/ts/components/conversation/pinned-messages/PinnedMessageNotification.dom.tsx @@ -1,13 +1,13 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback } from 'react'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { I18n } from '../../I18n.dom.js'; -import { SystemMessage } from '../SystemMessage.dom.js'; -import { UserText } from '../../UserText.dom.js'; -import { Button, ButtonSize, ButtonVariant } from '../../Button.dom.js'; -import type { PinMessageData } from '../../../model-types.js'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { I18n } from '../../I18n.dom.tsx'; +import { SystemMessage } from '../SystemMessage.dom.tsx'; +import { UserText } from '../../UserText.dom.tsx'; +import { Button, ButtonSize, ButtonVariant } from '../../Button.dom.tsx'; +import type { PinMessageData } from '../../../model-types.d.ts'; export type PinnedMessageNotificationData = Readonly<{ sender: ConversationType; diff --git a/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.stories.tsx b/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.stories.tsx index 98be000336..b2da74031d 100644 --- a/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.stories.tsx +++ b/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.stories.tsx @@ -4,11 +4,11 @@ import type { ReactNode } from 'react'; import React, { useState } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import type { Pin, PinMessage } from './PinnedMessagesBar.dom.js'; -import { PinnedMessagesBar } from './PinnedMessagesBar.dom.js'; -import { tw } from '../../../axo/tw.dom.js'; -import type { PinnedMessageId } from '../../../types/PinnedMessage.std.js'; -import { BodyRange } from '../../../types/BodyRange.std.js'; +import type { Pin, PinMessage } from './PinnedMessagesBar.dom.tsx'; +import { PinnedMessagesBar } from './PinnedMessagesBar.dom.tsx'; +import { tw } from '../../../axo/tw.dom.tsx'; +import type { PinnedMessageId } from '../../../types/PinnedMessage.std.ts'; +import { BodyRange } from '../../../types/BodyRange.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx b/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx index 73d57a675c..fecbd07164 100644 --- a/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx +++ b/ts/components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx @@ -4,21 +4,21 @@ import type { ForwardedRef, ReactNode } from 'react'; import React, { forwardRef, memo, useCallback, useMemo, useState } from 'react'; import { Tabs } from 'radix-ui'; import { AnimatePresence, motion } from 'motion/react'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { AxoIconButton } from '../../../axo/AxoIconButton.dom.js'; -import { AxoDropdownMenu } from '../../../axo/AxoDropdownMenu.dom.js'; -import { AriaClickable } from '../../../axo/AriaClickable.dom.js'; -import { UserText } from '../../UserText.dom.js'; -import type { PinnedMessageId } from '../../../types/PinnedMessage.std.js'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { AxoIconButton } from '../../../axo/AxoIconButton.dom.tsx'; +import { AxoDropdownMenu } from '../../../axo/AxoDropdownMenu.dom.tsx'; +import { AriaClickable } from '../../../axo/AriaClickable.dom.tsx'; +import { UserText } from '../../UserText.dom.tsx'; +import type { PinnedMessageId } from '../../../types/PinnedMessage.std.ts'; import { MessageTextRenderer, RenderLocation, -} from '../MessageTextRenderer.dom.js'; -import type { HydratedBodyRangesType } from '../../../types/BodyRange.std.js'; -import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import { stripNewlinesForLeftPane } from '../../../util/stripNewlinesForLeftPane.std.js'; +} from '../MessageTextRenderer.dom.tsx'; +import type { HydratedBodyRangesType } from '../../../types/BodyRange.std.ts'; +import { AxoSymbol } from '../../../axo/AxoSymbol.dom.tsx'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import { stripNewlinesForLeftPane } from '../../../util/stripNewlinesForLeftPane.std.ts'; enum Direction { None = 0, diff --git a/ts/components/conversation/pinned-messages/PinnedMessagesPanel.dom.tsx b/ts/components/conversation/pinned-messages/PinnedMessagesPanel.dom.tsx index fdcde0682f..5b1e6249b0 100644 --- a/ts/components/conversation/pinned-messages/PinnedMessagesPanel.dom.tsx +++ b/ts/components/conversation/pinned-messages/PinnedMessagesPanel.dom.tsx @@ -11,23 +11,23 @@ import React, { useState, } from 'react'; import { useLayoutEffect } from '@react-aria/utils'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import type { PinnedMessage } from '../../../types/PinnedMessage.std.js'; -import type { SmartTimelineItemProps } from '../../../state/smart/TimelineItem.preload.js'; -import { WidthBreakpoint } from '../../_util.std.js'; -import { AxoScrollArea } from '../../../axo/AxoScrollArea.dom.js'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import type { PinnedMessage } from '../../../types/PinnedMessage.std.ts'; +import type { SmartTimelineItemProps } from '../../../state/smart/TimelineItem.preload.tsx'; +import { WidthBreakpoint } from '../../_util.std.ts'; +import { AxoScrollArea } from '../../../axo/AxoScrollArea.dom.tsx'; import { createScrollerLock, ScrollerLockContext, -} from '../../../hooks/useScrollLock.dom.js'; -import { getWidthBreakpoint } from '../../../util/timelineUtil.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { useSizeObserver } from '../../../hooks/useSizeObserver.dom.js'; -import { MessageInteractivity } from '../Message.dom.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { AxoButton } from '../../../axo/AxoButton.dom.js'; -import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.js'; +} from '../../../hooks/useScrollLock.dom.tsx'; +import { getWidthBreakpoint } from '../../../util/timelineUtil.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { useSizeObserver } from '../../../hooks/useSizeObserver.dom.tsx'; +import { MessageInteractivity } from '../Message.dom.tsx'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { AxoButton } from '../../../axo/AxoButton.dom.tsx'; +import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.tsx'; export type PinnedMessagesPanelProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/conversation/poll-message/PollMessageContents.dom.tsx b/ts/components/conversation/poll-message/PollMessageContents.dom.tsx index 57f7b9932f..1dbdb4a4a1 100644 --- a/ts/components/conversation/poll-message/PollMessageContents.dom.tsx +++ b/ts/components/conversation/poll-message/PollMessageContents.dom.tsx @@ -4,16 +4,16 @@ import React, { memo, useState, useEffect, useRef } from 'react'; import { Checkbox } from 'radix-ui'; import { AnimatePresence, motion } from 'motion/react'; -import { type TailwindStyles, tw } from '../../../axo/tw.dom.js'; -import { AxoButton } from '../../../axo/AxoButton.dom.js'; -import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; -import type { DirectionType } from '../Message.dom.js'; -import type { PollWithResolvedVotersType } from '../../../state/selectors/message.preload.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; -import { PollVotesModal } from './PollVotesModal.dom.js'; -import { SpinnerV2 } from '../../SpinnerV2.dom.js'; -import { usePrevious } from '../../../hooks/usePrevious.std.js'; -import { UserText } from '../../UserText.dom.js'; +import { type TailwindStyles, tw } from '../../../axo/tw.dom.tsx'; +import { AxoButton } from '../../../axo/AxoButton.dom.tsx'; +import { AxoSymbol } from '../../../axo/AxoSymbol.dom.tsx'; +import type { DirectionType } from '../Message.dom.tsx'; +import type { PollWithResolvedVotersType } from '../../../state/selectors/message.preload.ts'; +import type { LocalizerType } from '../../../types/Util.std.ts'; +import { PollVotesModal } from './PollVotesModal.dom.tsx'; +import { SpinnerV2 } from '../../SpinnerV2.dom.tsx'; +import { usePrevious } from '../../../hooks/usePrevious.std.ts'; +import { UserText } from '../../UserText.dom.tsx'; function VotedCheckmark({ isIncoming, diff --git a/ts/components/conversation/poll-message/PollVotesModal.dom.tsx b/ts/components/conversation/poll-message/PollVotesModal.dom.tsx index 97094902d0..82a315970b 100644 --- a/ts/components/conversation/poll-message/PollVotesModal.dom.tsx +++ b/ts/components/conversation/poll-message/PollVotesModal.dom.tsx @@ -2,18 +2,18 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useMemo } from 'react'; -import { tw } from '../../../axo/tw.dom.js'; -import { AxoButton } from '../../../axo/AxoButton.dom.js'; -import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; -import { Modal } from '../../Modal.dom.js'; -import { Avatar, AvatarSize } from '../../Avatar.dom.js'; -import { ContactName } from '../ContactName.dom.js'; -import { UserText } from '../../UserText.dom.js'; -import type { LocalizerType } from '../../../types/Util.std.js'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { AxoButton } from '../../../axo/AxoButton.dom.tsx'; +import { AxoSymbol } from '../../../axo/AxoSymbol.dom.tsx'; +import { Modal } from '../../Modal.dom.tsx'; +import { Avatar, AvatarSize } from '../../Avatar.dom.tsx'; +import { ContactName } from '../ContactName.dom.tsx'; +import { UserText } from '../../UserText.dom.tsx'; +import type { LocalizerType } from '../../../types/Util.std.ts'; import type { PollVoteWithUserType, PollWithResolvedVotersType, -} from '../../../state/selectors/message.preload.js'; +} from '../../../state/selectors/message.preload.ts'; type PollVotesModalProps = { i18n: LocalizerType; diff --git a/ts/components/conversationList/BaseConversationListItem.dom.tsx b/ts/components/conversationList/BaseConversationListItem.dom.tsx index a51b240fb9..595a91d54f 100644 --- a/ts/components/conversationList/BaseConversationListItem.dom.tsx +++ b/ts/components/conversationList/BaseConversationListItem.dom.tsx @@ -7,16 +7,16 @@ import classNames from 'classnames'; import lodash from 'lodash'; import { v4 as generateUuid } from 'uuid'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import type { BadgeType } from '../../badges/types.std.js'; -import { isConversationUnread } from '../../util/isConversationUnread.std.js'; -import { cleanId } from '../_util.std.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { Spinner } from '../Spinner.dom.js'; -import { Time } from '../Time.dom.js'; -import { formatDateTimeShort } from '../../util/formatTimestamp.dom.js'; -import * as durations from '../../util/durations/index.std.js'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import type { BadgeType } from '../../badges/types.std.ts'; +import { isConversationUnread } from '../../util/isConversationUnread.std.ts'; +import { cleanId } from '../_util.std.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { Spinner } from '../Spinner.dom.tsx'; +import { Time } from '../Time.dom.tsx'; +import { formatDateTimeShort } from '../../util/formatTimestamp.dom.ts'; +import * as durations from '../../util/durations/index.std.ts'; const { isBoolean, isNumber } = lodash; diff --git a/ts/components/conversationList/ComposeStepButton.dom.tsx b/ts/components/conversationList/ComposeStepButton.dom.tsx index 13c59bf95f..31fb5077fd 100644 --- a/ts/components/conversationList/ComposeStepButton.dom.tsx +++ b/ts/components/conversationList/ComposeStepButton.dom.tsx @@ -4,7 +4,7 @@ import type { FunctionComponent } from 'react'; import React from 'react'; -import { ListTile } from '../ListTile.dom.js'; +import { ListTile } from '../ListTile.dom.tsx'; export enum Icon { Group = 'group', diff --git a/ts/components/conversationList/ContactCheckbox.dom.tsx b/ts/components/conversationList/ContactCheckbox.dom.tsx index 51f1c224eb..e9acf329bf 100644 --- a/ts/components/conversationList/ContactCheckbox.dom.tsx +++ b/ts/components/conversationList/ContactCheckbox.dom.tsx @@ -4,14 +4,14 @@ import React from 'react'; import type { FunctionComponent } from 'react'; -import { HEADER_CONTACT_NAME_CLASS_NAME } from './BaseConversationListItem.dom.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { BadgeType } from '../../badges/types.std.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import { ContactName } from '../conversation/ContactName.dom.js'; -import { About } from '../conversation/About.dom.js'; -import { ListTile } from '../ListTile.dom.js'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; +import { HEADER_CONTACT_NAME_CLASS_NAME } from './BaseConversationListItem.dom.tsx'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { BadgeType } from '../../badges/types.std.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import { ContactName } from '../conversation/ContactName.dom.tsx'; +import { About } from '../conversation/About.dom.tsx'; +import { ListTile } from '../ListTile.dom.tsx'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; export enum ContactCheckboxDisabledReason { // We start the enum at 1 because the default starting value of 0 is falsy. diff --git a/ts/components/conversationList/ContactListItem.dom.tsx b/ts/components/conversationList/ContactListItem.dom.tsx index 9ae93b18eb..cb593ec047 100644 --- a/ts/components/conversationList/ContactListItem.dom.tsx +++ b/ts/components/conversationList/ContactListItem.dom.tsx @@ -4,20 +4,20 @@ import type { FunctionComponent } from 'react'; import React, { useMemo, useState } from 'react'; -import { HEADER_CONTACT_NAME_CLASS_NAME } from './BaseConversationListItem.dom.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { BadgeType } from '../../badges/types.std.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import { ContactName } from '../conversation/ContactName.dom.js'; -import { About } from '../conversation/About.dom.js'; -import { ListTile } from '../ListTile.dom.js'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { ContextMenu } from '../ContextMenu.dom.js'; -import { I18n } from '../I18n.dom.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; -import { isInSystemContacts } from '../../util/isInSystemContacts.std.js'; -import { InContactsIcon } from '../InContactsIcon.dom.js'; +import { HEADER_CONTACT_NAME_CLASS_NAME } from './BaseConversationListItem.dom.tsx'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { BadgeType } from '../../badges/types.std.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import { ContactName } from '../conversation/ContactName.dom.tsx'; +import { About } from '../conversation/About.dom.tsx'; +import { ListTile } from '../ListTile.dom.tsx'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { ContextMenu } from '../ContextMenu.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; +import { isInSystemContacts } from '../../util/isInSystemContacts.std.ts'; +import { InContactsIcon } from '../InContactsIcon.dom.tsx'; export type ContactListItemConversationType = Pick< ConversationType, diff --git a/ts/components/conversationList/ConversationListItem.dom.tsx b/ts/components/conversationList/ConversationListItem.dom.tsx index 0547e7ad19..b56b374add 100644 --- a/ts/components/conversationList/ConversationListItem.dom.tsx +++ b/ts/components/conversationList/ConversationListItem.dom.tsx @@ -5,22 +5,22 @@ import type { FunctionComponent, ReactNode } from 'react'; import React, { useCallback } from 'react'; import classNames from 'classnames'; -import type { RenderConversationListItemContextMenuProps } from './BaseConversationListItem.dom.js'; +import type { RenderConversationListItemContextMenuProps } from './BaseConversationListItem.dom.tsx'; import { BaseConversationListItem, HEADER_NAME_CLASS_NAME, HEADER_CONTACT_NAME_CLASS_NAME, MESSAGE_TEXT_CLASS_NAME, -} from './BaseConversationListItem.dom.js'; -import { MessageBody } from '../conversation/MessageBody.dom.js'; -import { ContactName } from '../conversation/ContactName.dom.js'; -import { TypingAnimation } from '../conversation/TypingAnimation.dom.js'; +} from './BaseConversationListItem.dom.tsx'; +import { MessageBody } from '../conversation/MessageBody.dom.tsx'; +import { ContactName } from '../conversation/ContactName.dom.tsx'; +import { TypingAnimation } from '../conversation/TypingAnimation.dom.tsx'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { BadgeType } from '../../badges/types.std.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; -import { RenderLocation } from '../conversation/MessageTextRenderer.dom.js'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { BadgeType } from '../../badges/types.std.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; +import { RenderLocation } from '../conversation/MessageTextRenderer.dom.tsx'; const EMPTY_OBJECT = Object.freeze(Object.create(null)); const MESSAGE_STATUS_ICON_CLASS_NAME = `${MESSAGE_TEXT_CLASS_NAME}__status-icon`; diff --git a/ts/components/conversationList/GroupListItem.dom.tsx b/ts/components/conversationList/GroupListItem.dom.tsx index 903f4e1f87..f13ddb3e80 100644 --- a/ts/components/conversationList/GroupListItem.dom.tsx +++ b/ts/components/conversationList/GroupListItem.dom.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { ListTile } from '../ListTile.dom.js'; -import { UserText } from '../UserText.dom.js'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { ListTile } from '../ListTile.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; export enum DisabledReason { AlreadyMember = 'already-member', diff --git a/ts/components/conversationList/MessageSearchResult.dom.stories.tsx b/ts/components/conversationList/MessageSearchResult.dom.stories.tsx index 7346ef0c6d..466b416182 100644 --- a/ts/components/conversationList/MessageSearchResult.dom.stories.tsx +++ b/ts/components/conversationList/MessageSearchResult.dom.stories.tsx @@ -5,13 +5,13 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; import { StorybookThemeContext } from '../../../.storybook/StorybookThemeContext.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getFakeBadge } from '../../test-helpers/getFakeBadge.std.js'; -import type { PropsType } from './MessageSearchResult.dom.js'; -import { MessageSearchResult } from './MessageSearchResult.dom.js'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { BodyRange } from '../../types/BodyRange.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getFakeBadge } from '../../test-helpers/getFakeBadge.std.ts'; +import type { PropsType } from './MessageSearchResult.dom.tsx'; +import { MessageSearchResult } from './MessageSearchResult.dom.tsx'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { BodyRange } from '../../types/BodyRange.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; const SERVICE_ID_1 = generateAci(); const SERVICE_ID_2 = generateAci(); diff --git a/ts/components/conversationList/MessageSearchResult.dom.tsx b/ts/components/conversationList/MessageSearchResult.dom.tsx index 4e73d025ff..7875dc9d01 100644 --- a/ts/components/conversationList/MessageSearchResult.dom.tsx +++ b/ts/components/conversationList/MessageSearchResult.dom.tsx @@ -5,22 +5,22 @@ import type { FunctionComponent, ReactNode } from 'react'; import React, { useCallback } from 'react'; import lodash from 'lodash'; -import { ContactName } from '../conversation/ContactName.dom.js'; +import { ContactName } from '../conversation/ContactName.dom.tsx'; -import type { BodyRangesForDisplayType } from '../../types/BodyRange.std.js'; -import { processBodyRangesForSearchResult } from '../../types/BodyRange.std.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import { BaseConversationListItem } from './BaseConversationListItem.dom.js'; +import type { BodyRangesForDisplayType } from '../../types/BodyRange.std.ts'; +import { processBodyRangesForSearchResult } from '../../types/BodyRange.std.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import { BaseConversationListItem } from './BaseConversationListItem.dom.tsx'; import type { ConversationType, ShowConversationType, -} from '../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; -import { I18n } from '../I18n.dom.js'; +} from '../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; +import { I18n } from '../I18n.dom.tsx'; import { MessageTextRenderer, RenderLocation, -} from '../conversation/MessageTextRenderer.dom.js'; +} from '../conversation/MessageTextRenderer.dom.tsx'; const { noop } = lodash; diff --git a/ts/components/conversationList/PhoneNumberCheckbox.dom.tsx b/ts/components/conversationList/PhoneNumberCheckbox.dom.tsx index 67ad933698..cfee96c2f6 100644 --- a/ts/components/conversationList/PhoneNumberCheckbox.dom.tsx +++ b/ts/components/conversationList/PhoneNumberCheckbox.dom.tsx @@ -4,17 +4,17 @@ import type { FunctionComponent } from 'react'; import React, { useState } from 'react'; -import { ButtonVariant } from '../Button.dom.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { SPINNER_CLASS_NAME } from './BaseConversationListItem.dom.js'; -import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import { AvatarColors } from '../../types/Colors.std.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.js'; -import { ListTile } from '../ListTile.dom.js'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { Spinner } from '../Spinner.dom.js'; -import { UserText } from '../UserText.dom.js'; +import { ButtonVariant } from '../Button.dom.tsx'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { SPINNER_CLASS_NAME } from './BaseConversationListItem.dom.tsx'; +import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.ts'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import { AvatarColors } from '../../types/Colors.std.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.ts'; +import { ListTile } from '../ListTile.dom.tsx'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { Spinner } from '../Spinner.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; export type PropsDataType = { phoneNumber: ParsedE164Type; diff --git a/ts/components/conversationList/StartNewConversation.dom.tsx b/ts/components/conversationList/StartNewConversation.dom.tsx index f0afe19f04..71c05bace2 100644 --- a/ts/components/conversationList/StartNewConversation.dom.tsx +++ b/ts/components/conversationList/StartNewConversation.dom.tsx @@ -4,17 +4,17 @@ import type { FunctionComponent } from 'react'; import React, { useCallback, useState } from 'react'; -import { ButtonVariant } from '../Button.dom.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { SPINNER_CLASS_NAME } from './BaseConversationListItem.dom.js'; -import { ListTile } from '../ListTile.dom.js'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { Spinner } from '../Spinner.dom.js'; +import { ButtonVariant } from '../Button.dom.tsx'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { SPINNER_CLASS_NAME } from './BaseConversationListItem.dom.tsx'; +import { ListTile } from '../ListTile.dom.tsx'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { Spinner } from '../Spinner.dom.tsx'; -import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { ShowConversationType } from '../../state/ducks/conversations.preload.js'; +import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { ShowConversationType } from '../../state/ducks/conversations.preload.ts'; type PropsData = { phoneNumber: ParsedE164Type; diff --git a/ts/components/conversationList/UsernameCheckbox.dom.tsx b/ts/components/conversationList/UsernameCheckbox.dom.tsx index c47f530e54..7ace64be14 100644 --- a/ts/components/conversationList/UsernameCheckbox.dom.tsx +++ b/ts/components/conversationList/UsernameCheckbox.dom.tsx @@ -4,13 +4,13 @@ import React from 'react'; import type { FunctionComponent } from 'react'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import { AvatarColors } from '../../types/Colors.std.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.js'; -import { ListTile } from '../ListTile.dom.js'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { Spinner } from '../Spinner.dom.js'; -import { SPINNER_CLASS_NAME } from './BaseConversationListItem.dom.js'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import { AvatarColors } from '../../types/Colors.std.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.ts'; +import { ListTile } from '../ListTile.dom.tsx'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { Spinner } from '../Spinner.dom.tsx'; +import { SPINNER_CLASS_NAME } from './BaseConversationListItem.dom.tsx'; export type PropsDataType = { username: string; diff --git a/ts/components/conversationList/UsernameSearchResultListItem.dom.tsx b/ts/components/conversationList/UsernameSearchResultListItem.dom.tsx index 8f573b4619..bc05943324 100644 --- a/ts/components/conversationList/UsernameSearchResultListItem.dom.tsx +++ b/ts/components/conversationList/UsernameSearchResultListItem.dom.tsx @@ -3,14 +3,14 @@ import React, { useCallback } from 'react'; -import { SPINNER_CLASS_NAME } from './BaseConversationListItem.dom.js'; -import { ListTile } from '../ListTile.dom.js'; -import { Avatar, AvatarSize } from '../Avatar.dom.js'; -import { Spinner } from '../Spinner.dom.js'; +import { SPINNER_CLASS_NAME } from './BaseConversationListItem.dom.tsx'; +import { ListTile } from '../ListTile.dom.tsx'; +import { Avatar, AvatarSize } from '../Avatar.dom.tsx'; +import { Spinner } from '../Spinner.dom.tsx'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.js'; -import type { ShowConversationType } from '../../state/ducks/conversations.preload.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.ts'; +import type { ShowConversationType } from '../../state/ducks/conversations.preload.ts'; type PropsData = { username: string; diff --git a/ts/components/fun/FunButton.dom.tsx b/ts/components/fun/FunButton.dom.tsx index 95607d2d3d..2869167737 100644 --- a/ts/components/fun/FunButton.dom.tsx +++ b/ts/components/fun/FunButton.dom.tsx @@ -3,13 +3,13 @@ import React, { useMemo } from 'react'; import { VisuallyHidden } from 'react-aria'; import { Button } from 'react-aria-components'; -import type { LocalizerType } from '../../types/I18N.std.js'; +import type { LocalizerType } from '../../types/I18N.std.ts'; import { type EmojiVariantKey, getEmojiVariantByKey, -} from './data/emojis.std.js'; -import { FunStaticEmoji } from './FunEmoji.dom.js'; -import { useFunEmojiLocalizer } from './useFunEmojiLocalizer.dom.js'; +} from './data/emojis.std.ts'; +import { FunStaticEmoji } from './FunEmoji.dom.tsx'; +import { useFunEmojiLocalizer } from './useFunEmojiLocalizer.dom.tsx'; /** * Fun Picker Button diff --git a/ts/components/fun/FunEmoji.dom.stories.tsx b/ts/components/fun/FunEmoji.dom.stories.tsx index 906bed47e9..2bf17d7775 100644 --- a/ts/components/fun/FunEmoji.dom.stories.tsx +++ b/ts/components/fun/FunEmoji.dom.stories.tsx @@ -3,16 +3,16 @@ import { useVirtualizer } from '@tanstack/react-virtual'; import lodash from 'lodash'; import React, { useCallback, useEffect, useRef } from 'react'; -import { type ComponentMeta } from '../../storybook/types.std.js'; -import type { FunStaticEmojiProps } from './FunEmoji.dom.js'; -import { FunInlineEmoji, FunStaticEmoji } from './FunEmoji.dom.js'; +import { type ComponentMeta } from '../../storybook/types.std.ts'; +import type { FunStaticEmojiProps } from './FunEmoji.dom.tsx'; +import { FunInlineEmoji, FunStaticEmoji } from './FunEmoji.dom.tsx'; import { _getAllEmojiVariantKeys, EMOJI_VARIANT_KEY_CONSTANTS, getEmojiParentByKey, getEmojiParentKeyByVariantKey, getEmojiVariantByKey, -} from './data/emojis.std.js'; +} from './data/emojis.std.ts'; const { chunk } = lodash; diff --git a/ts/components/fun/FunEmoji.dom.tsx b/ts/components/fun/FunEmoji.dom.tsx index 04906aa4be..b3b97001f3 100644 --- a/ts/components/fun/FunEmoji.dom.tsx +++ b/ts/components/fun/FunEmoji.dom.tsx @@ -9,9 +9,9 @@ import { isSafeEmojifyEmoji, type EmojiVariantData, type EmojiVariantValue, -} from './data/emojis.std.js'; -import type { FunImageAriaProps } from './types.dom.js'; -import { createLogger } from '../../logging/log.std.js'; +} from './data/emojis.std.ts'; +import type { FunImageAriaProps } from './types.dom.tsx'; +import { createLogger } from '../../logging/log.std.ts'; const log = createLogger('FunEmoji'); diff --git a/ts/components/fun/FunEmojiLocalizationProvider.dom.tsx b/ts/components/fun/FunEmojiLocalizationProvider.dom.tsx index 4bab7823b0..184bf4c3db 100644 --- a/ts/components/fun/FunEmojiLocalizationProvider.dom.tsx +++ b/ts/components/fun/FunEmojiLocalizationProvider.dom.tsx @@ -9,25 +9,25 @@ import React, { useMemo, useState, } from 'react'; -import type { LocaleEmojiListType } from '../../types/emoji.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { drop } from '../../util/drop.std.js'; +import type { LocaleEmojiListType } from '../../types/emoji.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { drop } from '../../util/drop.std.ts'; import { getEmojiDefaultEnglishLocalizerIndex, getEmojiDefaultEnglishSearchIndex, -} from './data/emojis.std.js'; +} from './data/emojis.std.ts'; import { createFunEmojiLocalizerIndex, type FunEmojiLocalizerIndex, -} from './useFunEmojiLocalizer.dom.js'; +} from './useFunEmojiLocalizer.dom.tsx'; import { createFunEmojiSearchIndex, type FunEmojiSearchIndex, -} from './useFunEmojiSearch.dom.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { isTestOrMockEnvironment } from '../../environment.std.js'; +} from './useFunEmojiSearch.dom.tsx'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { isTestOrMockEnvironment } from '../../environment.std.ts'; const log = createLogger('FunEmojiLocalizationProvider'); diff --git a/ts/components/fun/FunEmojiPicker.dom.stories.tsx b/ts/components/fun/FunEmojiPicker.dom.stories.tsx index 3cfcf6972b..ec569b80f5 100644 --- a/ts/components/fun/FunEmojiPicker.dom.stories.tsx +++ b/ts/components/fun/FunEmojiPicker.dom.stories.tsx @@ -3,14 +3,14 @@ import React, { useCallback, useState } from 'react'; import { Button } from 'react-aria-components'; import { action } from '@storybook/addon-actions'; -import { type ComponentMeta } from '../../storybook/types.std.js'; -import type { FunEmojiPickerProps } from './FunEmojiPicker.dom.js'; -import { FunEmojiPicker } from './FunEmojiPicker.dom.js'; -import { MOCK_RECENT_EMOJIS, MOCK_THIS_MESSAGE_EMOJIS } from './mocks.dom.js'; -import { FunProvider } from './FunProvider.dom.js'; -import { packs, recentStickers } from '../stickers/mocks.std.js'; -import { EmojiSkinTone } from './data/emojis.std.js'; -import { Select } from '../Select.dom.js'; +import { type ComponentMeta } from '../../storybook/types.std.ts'; +import type { FunEmojiPickerProps } from './FunEmojiPicker.dom.tsx'; +import { FunEmojiPicker } from './FunEmojiPicker.dom.tsx'; +import { MOCK_RECENT_EMOJIS, MOCK_THIS_MESSAGE_EMOJIS } from './mocks.dom.tsx'; +import { FunProvider } from './FunProvider.dom.tsx'; +import { packs, recentStickers } from '../stickers/mocks.std.ts'; +import { EmojiSkinTone } from './data/emojis.std.ts'; +import { Select } from '../Select.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/fun/FunEmojiPicker.dom.tsx b/ts/components/fun/FunEmojiPicker.dom.tsx index 27e0d8e34d..b47f12f8c1 100644 --- a/ts/components/fun/FunEmojiPicker.dom.tsx +++ b/ts/components/fun/FunEmojiPicker.dom.tsx @@ -4,13 +4,13 @@ import type { ReactNode } from 'react'; import React, { memo, useCallback } from 'react'; import type { Placement } from 'react-aria'; import { DialogTrigger } from 'react-aria-components'; -import { FunPopover } from './base/FunPopover.dom.js'; -import type { FunEmojiSelection } from './panels/FunPanelEmojis.dom.js'; -import { FunPanelEmojis } from './panels/FunPanelEmojis.dom.js'; -import { useFunContext } from './FunProvider.dom.js'; -import type { ThemeType } from '../../types/Util.std.js'; -import { FunErrorBoundary } from './base/FunErrorBoundary.dom.js'; -import type { EmojiVariantKey } from './data/emojis.std.js'; +import { FunPopover } from './base/FunPopover.dom.tsx'; +import type { FunEmojiSelection } from './panels/FunPanelEmojis.dom.tsx'; +import { FunPanelEmojis } from './panels/FunPanelEmojis.dom.tsx'; +import { useFunContext } from './FunProvider.dom.tsx'; +import type { ThemeType } from '../../types/Util.std.ts'; +import { FunErrorBoundary } from './base/FunErrorBoundary.dom.tsx'; +import type { EmojiVariantKey } from './data/emojis.std.ts'; export type FunEmojiPickerProps = Readonly<{ open: boolean; diff --git a/ts/components/fun/FunGif.dom.stories.tsx b/ts/components/fun/FunGif.dom.stories.tsx index 6b28048f24..88dde102e6 100644 --- a/ts/components/fun/FunGif.dom.stories.tsx +++ b/ts/components/fun/FunGif.dom.stories.tsx @@ -3,8 +3,8 @@ import React, { useEffect, useState, useId } from 'react'; import type { Meta } from '@storybook/react'; import { VisuallyHidden } from 'react-aria'; -import { FunGif, FunGifPreview } from './FunGif.dom.js'; -import { LoadingState } from '../../util/loadable.std.js'; +import { FunGif, FunGifPreview } from './FunGif.dom.tsx'; +import { LoadingState } from '../../util/loadable.std.ts'; export default { title: 'Components/Fun/FunGif', diff --git a/ts/components/fun/FunGif.dom.tsx b/ts/components/fun/FunGif.dom.tsx index 7553eecfbf..3d31e235a6 100644 --- a/ts/components/fun/FunGif.dom.tsx +++ b/ts/components/fun/FunGif.dom.tsx @@ -3,14 +3,14 @@ import type { CSSProperties, ForwardedRef } from 'react'; import React, { forwardRef, useEffect, useRef, useState } from 'react'; import { useReducedMotion } from '@react-spring/web'; -import { SpinnerV2 } from '../SpinnerV2.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { Loadable } from '../../util/loadable.std.js'; -import { LoadingState } from '../../util/loadable.std.js'; -import { useIntent } from './base/FunImage.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { isAbortError } from '../../util/isAbortError.std.js'; +import { SpinnerV2 } from '../SpinnerV2.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { Loadable } from '../../util/loadable.std.ts'; +import { LoadingState } from '../../util/loadable.std.ts'; +import { useIntent } from './base/FunImage.dom.tsx'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { isAbortError } from '../../util/isAbortError.std.ts'; const log = createLogger('FunGif'); diff --git a/ts/components/fun/FunPicker.dom.stories.tsx b/ts/components/fun/FunPicker.dom.stories.tsx index dd745fb1f2..03cceadcb4 100644 --- a/ts/components/fun/FunPicker.dom.stories.tsx +++ b/ts/components/fun/FunPicker.dom.stories.tsx @@ -3,16 +3,16 @@ import React, { useCallback, useState } from 'react'; import { Button } from 'react-aria-components'; import { action } from '@storybook/addon-actions'; -import { type ComponentMeta } from '../../storybook/types.std.js'; -import { packs, recentStickers } from '../stickers/mocks.std.js'; -import type { FunPickerProps } from './FunPicker.dom.js'; -import { FunPicker } from './FunPicker.dom.js'; -import { FunProvider } from './FunProvider.dom.js'; +import { type ComponentMeta } from '../../storybook/types.std.ts'; +import { packs, recentStickers } from '../stickers/mocks.std.ts'; +import type { FunPickerProps } from './FunPicker.dom.tsx'; +import { FunPicker } from './FunPicker.dom.tsx'; +import { FunProvider } from './FunProvider.dom.tsx'; import { MOCK_GIFS_PAGINATED_ONE_PAGE, MOCK_RECENT_EMOJIS, -} from './mocks.dom.js'; -import { EmojiSkinTone } from './data/emojis.std.js'; +} from './mocks.dom.tsx'; +import { EmojiSkinTone } from './data/emojis.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/fun/FunPicker.dom.tsx b/ts/components/fun/FunPicker.dom.tsx index 7911687a62..ad36421cf7 100644 --- a/ts/components/fun/FunPicker.dom.tsx +++ b/ts/components/fun/FunPicker.dom.tsx @@ -6,23 +6,23 @@ import type { Placement } from 'react-aria'; import { DialogTrigger } from 'react-aria-components'; // @ts-expect-error - Needs tinykeys to update package.json type resolution import { createKeybindingsHandler } from 'tinykeys'; -import { FunPickerTabKey } from './constants.dom.js'; -import { FunPopover } from './base/FunPopover.dom.js'; +import { FunPickerTabKey } from './constants.dom.tsx'; +import { FunPopover } from './base/FunPopover.dom.tsx'; import { FunPickerTab, FunTabList, FunTabPanel, FunTabs, -} from './base/FunTabs.dom.js'; -import type { FunEmojiSelection } from './panels/FunPanelEmojis.dom.js'; -import { FunPanelEmojis } from './panels/FunPanelEmojis.dom.js'; -import type { FunGifSelection } from './panels/FunPanelGifs.dom.js'; -import { FunPanelGifs } from './panels/FunPanelGifs.dom.js'; -import type { FunStickerSelection } from './panels/FunPanelStickers.dom.js'; -import { FunPanelStickers } from './panels/FunPanelStickers.dom.js'; -import { useFunContext } from './FunProvider.dom.js'; -import type { ThemeType } from '../../types/Util.std.js'; -import { FunErrorBoundary } from './base/FunErrorBoundary.dom.js'; +} from './base/FunTabs.dom.tsx'; +import type { FunEmojiSelection } from './panels/FunPanelEmojis.dom.tsx'; +import { FunPanelEmojis } from './panels/FunPanelEmojis.dom.tsx'; +import type { FunGifSelection } from './panels/FunPanelGifs.dom.tsx'; +import { FunPanelGifs } from './panels/FunPanelGifs.dom.tsx'; +import type { FunStickerSelection } from './panels/FunPanelStickers.dom.tsx'; +import { FunPanelStickers } from './panels/FunPanelStickers.dom.tsx'; +import { useFunContext } from './FunProvider.dom.tsx'; +import type { ThemeType } from '../../types/Util.std.ts'; +import { FunErrorBoundary } from './base/FunErrorBoundary.dom.tsx'; /** * FunPicker diff --git a/ts/components/fun/FunProvider.dom.tsx b/ts/components/fun/FunProvider.dom.tsx index cab57df51e..cde188f3c7 100644 --- a/ts/components/fun/FunProvider.dom.tsx +++ b/ts/components/fun/FunProvider.dom.tsx @@ -7,23 +7,23 @@ import React, { useContext, useState, } from 'react'; -import { strictAssert } from '../../util/assert.std.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { LocalizerType } from '../../types/I18N.std.ts'; import type { StickerPackType, StickerType, -} from '../../state/ducks/stickers.preload.js'; -import type { EmojiSkinTone, EmojiParentKey } from './data/emojis.std.js'; -import type { FunGifSelection, GifType } from './panels/FunPanelGifs.dom.js'; -import { FunPickerTabKey } from './constants.dom.js'; -import type { FunEmojiSelection } from './panels/FunPanelEmojis.dom.js'; -import type { FunStickerSelection } from './panels/FunPanelStickers.dom.js'; -import { FunEmojiLocalizationProvider } from './FunEmojiLocalizationProvider.dom.js'; +} from '../../state/ducks/stickers.preload.ts'; +import type { EmojiSkinTone, EmojiParentKey } from './data/emojis.std.ts'; +import type { FunGifSelection, GifType } from './panels/FunPanelGifs.dom.tsx'; +import { FunPickerTabKey } from './constants.dom.tsx'; +import type { FunEmojiSelection } from './panels/FunPanelEmojis.dom.tsx'; +import type { FunStickerSelection } from './panels/FunPanelStickers.dom.tsx'; +import { FunEmojiLocalizationProvider } from './FunEmojiLocalizationProvider.dom.tsx'; import type { fetchGiphyFile, fetchGiphySearch, fetchGiphyTrending, -} from './data/giphy.preload.js'; +} from './data/giphy.preload.ts'; export type FunContextSmartProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/fun/FunSkinTones.dom.tsx b/ts/components/fun/FunSkinTones.dom.tsx index f18d8f022e..10085ba421 100644 --- a/ts/components/fun/FunSkinTones.dom.tsx +++ b/ts/components/fun/FunSkinTones.dom.tsx @@ -3,14 +3,14 @@ import React, { useCallback, useMemo } from 'react'; import type { Selection } from 'react-aria-components'; import { ListBox, ListBoxItem } from 'react-aria-components'; -import type { EmojiParentKey } from './data/emojis.std.js'; +import type { EmojiParentKey } from './data/emojis.std.ts'; import { EmojiSkinTone, getEmojiVariantByParentKeyAndSkinTone, -} from './data/emojis.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { FunStaticEmoji } from './FunEmoji.dom.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; +} from './data/emojis.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { FunStaticEmoji } from './FunEmoji.dom.tsx'; +import type { LocalizerType } from '../../types/I18N.std.ts'; export type FunSkinTonesListProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/fun/FunSticker.dom.stories.tsx b/ts/components/fun/FunSticker.dom.stories.tsx index 907d88dc42..f8fa62c139 100644 --- a/ts/components/fun/FunSticker.dom.stories.tsx +++ b/ts/components/fun/FunSticker.dom.stories.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import type { Meta } from '@storybook/react'; -import { FunSticker, type FunStickerProps } from './FunSticker.dom.js'; +import { FunSticker, type FunStickerProps } from './FunSticker.dom.tsx'; export default { title: 'Components/Fun/FunSticker', diff --git a/ts/components/fun/FunSticker.dom.tsx b/ts/components/fun/FunSticker.dom.tsx index f8b8f36528..e3f4169ab1 100644 --- a/ts/components/fun/FunSticker.dom.tsx +++ b/ts/components/fun/FunSticker.dom.tsx @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import { FunImage } from './base/FunImage.dom.js'; -import type { FunImageAriaProps } from './types.dom.js'; +import { FunImage } from './base/FunImage.dom.tsx'; +import type { FunImageAriaProps } from './types.dom.tsx'; export type FunStickerProps = FunImageAriaProps & Readonly<{ diff --git a/ts/components/fun/FunStickerPicker.dom.stories.tsx b/ts/components/fun/FunStickerPicker.dom.stories.tsx index 646586e567..ed7c287a11 100644 --- a/ts/components/fun/FunStickerPicker.dom.stories.tsx +++ b/ts/components/fun/FunStickerPicker.dom.stories.tsx @@ -3,13 +3,13 @@ import React, { useCallback, useState } from 'react'; import { Button } from 'react-aria-components'; import { action } from '@storybook/addon-actions'; -import { type ComponentMeta } from '../../storybook/types.std.js'; -import type { FunStickerPickerProps } from './FunStickerPicker.dom.js'; -import { FunStickerPicker } from './FunStickerPicker.dom.js'; -import { MOCK_RECENT_EMOJIS } from './mocks.dom.js'; -import { FunProvider } from './FunProvider.dom.js'; -import { packs, recentStickers } from '../stickers/mocks.std.js'; -import { EmojiSkinTone } from './data/emojis.std.js'; +import { type ComponentMeta } from '../../storybook/types.std.ts'; +import type { FunStickerPickerProps } from './FunStickerPicker.dom.tsx'; +import { FunStickerPicker } from './FunStickerPicker.dom.tsx'; +import { MOCK_RECENT_EMOJIS } from './mocks.dom.tsx'; +import { FunProvider } from './FunProvider.dom.tsx'; +import { packs, recentStickers } from '../stickers/mocks.std.ts'; +import { EmojiSkinTone } from './data/emojis.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/fun/FunStickerPicker.dom.tsx b/ts/components/fun/FunStickerPicker.dom.tsx index d2ae40692a..e030a09b92 100644 --- a/ts/components/fun/FunStickerPicker.dom.tsx +++ b/ts/components/fun/FunStickerPicker.dom.tsx @@ -4,13 +4,13 @@ import type { ReactNode } from 'react'; import React, { memo, useCallback } from 'react'; import type { Placement } from 'react-aria'; import { DialogTrigger } from 'react-aria-components'; -import { FunPopover } from './base/FunPopover.dom.js'; -import type { FunStickerSelection } from './panels/FunPanelStickers.dom.js'; -import { FunPanelStickers } from './panels/FunPanelStickers.dom.js'; -import { useFunContext } from './FunProvider.dom.js'; -import type { ThemeType } from '../../types/Util.std.js'; -import { FunErrorBoundary } from './base/FunErrorBoundary.dom.js'; -import type { FunTimeStickerStyle } from './constants.dom.js'; +import { FunPopover } from './base/FunPopover.dom.tsx'; +import type { FunStickerSelection } from './panels/FunPanelStickers.dom.tsx'; +import { FunPanelStickers } from './panels/FunPanelStickers.dom.tsx'; +import { useFunContext } from './FunProvider.dom.tsx'; +import type { ThemeType } from '../../types/Util.std.ts'; +import { FunErrorBoundary } from './base/FunErrorBoundary.dom.tsx'; +import type { FunTimeStickerStyle } from './constants.dom.tsx'; export type FunStickerPickerProps = Readonly<{ open: boolean; diff --git a/ts/components/fun/base/FunErrorBoundary.dom.tsx b/ts/components/fun/base/FunErrorBoundary.dom.tsx index 8ff0ed4928..ddbde68078 100644 --- a/ts/components/fun/base/FunErrorBoundary.dom.tsx +++ b/ts/components/fun/base/FunErrorBoundary.dom.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReactNode, ErrorInfo } from 'react'; import React, { Component, useCallback } from 'react'; -import { createLogger } from '../../../logging/log.std.js'; -import * as Errors from '../../../types/errors.std.js'; -import { ToastType } from '../../../types/Toast.dom.js'; -import { isProduction } from '../../../util/version.std.js'; +import { createLogger } from '../../../logging/log.std.ts'; +import * as Errors from '../../../types/errors.std.ts'; +import { ToastType } from '../../../types/Toast.dom.tsx'; +import { isProduction } from '../../../util/version.std.ts'; const log = createLogger('FunErrorBoundary'); diff --git a/ts/components/fun/base/FunGrid.dom.tsx b/ts/components/fun/base/FunGrid.dom.tsx index 4294e01a10..11efa841b4 100644 --- a/ts/components/fun/base/FunGrid.dom.tsx +++ b/ts/components/fun/base/FunGrid.dom.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { FocusScope } from 'react-aria'; import classNames from 'classnames'; import { Button, Dialog, Header, Popover } from 'react-aria-components'; -import { FunScrollerSection } from './FunScroller.dom.js'; +import { FunScrollerSection } from './FunScroller.dom.tsx'; /** * Grid Container diff --git a/ts/components/fun/base/FunImage.dom.tsx b/ts/components/fun/base/FunImage.dom.tsx index a0a168d30a..6c74a07839 100644 --- a/ts/components/fun/base/FunImage.dom.tsx +++ b/ts/components/fun/base/FunImage.dom.tsx @@ -4,9 +4,9 @@ import type { ForwardedRef, RefObject } from 'react'; import React, { useRef, useEffect, useState, forwardRef } from 'react'; import classNames from 'classnames'; import { isFocusable } from '@react-aria/focus'; -import { strictAssert } from '../../../util/assert.std.js'; -import { useReducedMotion } from '../../../hooks/useReducedMotion.dom.js'; -import type { FunImageAriaProps } from '../types.dom.js'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { useReducedMotion } from '../../../hooks/useReducedMotion.dom.ts'; +import type { FunImageAriaProps } from '../types.dom.tsx'; export type FunImageProps = FunImageAriaProps & Readonly<{ diff --git a/ts/components/fun/base/FunItem.dom.tsx b/ts/components/fun/base/FunItem.dom.tsx index 786815644d..2f648f541b 100644 --- a/ts/components/fun/base/FunItem.dom.tsx +++ b/ts/components/fun/base/FunItem.dom.tsx @@ -8,7 +8,7 @@ import type { } from 'react'; import React, { forwardRef, useCallback, useEffect, useMemo } from 'react'; import { mergeProps } from '@react-aria/utils'; -import { strictAssert } from '../../../util/assert.std.js'; +import { strictAssert } from '../../../util/assert.std.ts'; /** * Button diff --git a/ts/components/fun/base/FunLightbox.dom.tsx b/ts/components/fun/base/FunLightbox.dom.tsx index d286dd6979..f70fd2febf 100644 --- a/ts/components/fun/base/FunLightbox.dom.tsx +++ b/ts/components/fun/base/FunLightbox.dom.tsx @@ -3,7 +3,7 @@ import type { ReactNode, RefObject } from 'react'; import React, { createContext, useContext, useEffect, useState } from 'react'; import { createPortal } from 'react-dom'; -import { strictAssert } from '../../../util/assert.std.js'; +import { strictAssert } from '../../../util/assert.std.ts'; /** * Tracks the current `data-key` that has a long-press/long-focus diff --git a/ts/components/fun/base/FunPopover.dom.tsx b/ts/components/fun/base/FunPopover.dom.tsx index 1531fe54c6..4c63503735 100644 --- a/ts/components/fun/base/FunPopover.dom.tsx +++ b/ts/components/fun/base/FunPopover.dom.tsx @@ -6,7 +6,7 @@ import type { Placement } from 'react-aria'; import { Dialog, Popover } from 'react-aria-components'; import classNames from 'classnames'; import { Tooltip } from 'radix-ui'; -import { ThemeType } from '../../../types/Util.std.js'; +import { ThemeType } from '../../../types/Util.std.ts'; export type FunPopoverProps = Readonly<{ placement?: Placement; diff --git a/ts/components/fun/base/FunResults.dom.tsx b/ts/components/fun/base/FunResults.dom.tsx index 7919335896..1f48caa145 100644 --- a/ts/components/fun/base/FunResults.dom.tsx +++ b/ts/components/fun/base/FunResults.dom.tsx @@ -3,7 +3,7 @@ import type { ReactNode } from 'react'; import React from 'react'; import { Button, Header } from 'react-aria-components'; -import { SpinnerV2 } from '../../SpinnerV2.dom.js'; +import { SpinnerV2 } from '../../SpinnerV2.dom.tsx'; export type FunResultsProps = Readonly<{ 'aria-busy': boolean; diff --git a/ts/components/fun/base/FunScroller.dom.tsx b/ts/components/fun/base/FunScroller.dom.tsx index 72851e9ce8..d5a324aa08 100644 --- a/ts/components/fun/base/FunScroller.dom.tsx +++ b/ts/components/fun/base/FunScroller.dom.tsx @@ -18,8 +18,8 @@ import { isScrollAtTop, isScrollOverflowVertical, useScrollObserver, -} from '../../../hooks/useSizeObserver.dom.js'; -import { strictAssert } from '../../../util/assert.std.js'; +} from '../../../hooks/useSizeObserver.dom.tsx'; +import { strictAssert } from '../../../util/assert.std.ts'; const { maxBy } = lodash; diff --git a/ts/components/fun/base/FunSearch.dom.tsx b/ts/components/fun/base/FunSearch.dom.tsx index 19033fc14c..71bce1501f 100644 --- a/ts/components/fun/base/FunSearch.dom.tsx +++ b/ts/components/fun/base/FunSearch.dom.tsx @@ -4,8 +4,8 @@ import type { ChangeEvent } from 'react'; import React, { useCallback } from 'react'; import { VisuallyHidden } from 'react-aria'; import { getInteractionModality } from '@react-aria/interactions'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { useFunContext } from '../FunProvider.dom.js'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { useFunContext } from '../FunProvider.dom.tsx'; export type FunSearchProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/fun/base/FunSubNav.dom.tsx b/ts/components/fun/base/FunSubNav.dom.tsx index aab15df943..f4d670706d 100644 --- a/ts/components/fun/base/FunSubNav.dom.tsx +++ b/ts/components/fun/base/FunSubNav.dom.tsx @@ -21,12 +21,12 @@ import { getScrollLeftDistance, getScrollRightDistance, useScrollObserver, -} from '../../../hooks/useSizeObserver.dom.js'; -import { createLogger } from '../../../logging/log.std.js'; -import * as Errors from '../../../types/errors.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { FunImage } from './FunImage.dom.js'; -import { FunTooltip } from './FunTooltip.dom.js'; +} from '../../../hooks/useSizeObserver.dom.tsx'; +import { createLogger } from '../../../logging/log.std.ts'; +import * as Errors from '../../../types/errors.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { FunImage } from './FunImage.dom.tsx'; +import { FunTooltip } from './FunTooltip.dom.tsx'; const log = createLogger('FunSubNav'); diff --git a/ts/components/fun/base/FunTabs.dom.tsx b/ts/components/fun/base/FunTabs.dom.tsx index b09cf0a929..edead929b5 100644 --- a/ts/components/fun/base/FunTabs.dom.tsx +++ b/ts/components/fun/base/FunTabs.dom.tsx @@ -6,7 +6,7 @@ import type { ReactNode } from 'react'; import React, { useCallback, useId } from 'react'; import type { Key } from 'react-aria'; import { Tab, TabList, TabPanel, Tabs } from 'react-aria-components'; -import type { FunPickerTabKey } from '../constants.dom.js'; +import type { FunPickerTabKey } from '../constants.dom.tsx'; export type FunTabsProps = Readonly<{ value: FunPickerTabKey; diff --git a/ts/components/fun/base/FunTooltip.dom.tsx b/ts/components/fun/base/FunTooltip.dom.tsx index 144288b724..394021214c 100644 --- a/ts/components/fun/base/FunTooltip.dom.tsx +++ b/ts/components/fun/base/FunTooltip.dom.tsx @@ -8,7 +8,7 @@ import React, { type ReactNode, } from 'react'; import { Tooltip } from 'radix-ui'; -import { strictAssert } from '../../../util/assert.std.js'; +import { strictAssert } from '../../../util/assert.std.ts'; export type FunTooltipProps = Readonly<{ open?: boolean; diff --git a/ts/components/fun/constants.dom.tsx b/ts/components/fun/constants.dom.tsx index 6023a28060..ae2fcdd629 100644 --- a/ts/components/fun/constants.dom.tsx +++ b/ts/components/fun/constants.dom.tsx @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { EmojiPickerCategory } from './data/emojis.std.js'; -import type { StickerPackType } from '../../state/ducks/stickers.preload.js'; +import { EmojiPickerCategory } from './data/emojis.std.ts'; +import type { StickerPackType } from '../../state/ducks/stickers.preload.ts'; export enum FunPickerTabKey { Emoji = 'Emoji', diff --git a/ts/components/fun/data/emojis.std.ts b/ts/components/fun/data/emojis.std.ts index 985b55fb48..7c369d6f90 100644 --- a/ts/components/fun/data/emojis.std.ts +++ b/ts/components/fun/data/emojis.std.ts @@ -2,18 +2,18 @@ // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; import emojiRegex from 'emoji-regex'; -import { strictAssert } from '../../../util/assert.std.js'; -import { parseUnknown } from '../../../util/schemas.std.js'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { parseUnknown } from '../../../util/schemas.std.ts'; import type { FunEmojiSearchIndex, FunEmojiSearchIndexEntry, -} from '../useFunEmojiSearch.dom.js'; -import type { FunEmojiLocalizerIndex } from '../useFunEmojiLocalizer.dom.js'; -import { removeDiacritics } from '../../../util/removeDiacritics.std.js'; -import { createLogger } from '../../../logging/log.std.js'; -import { EmojiSkinTone } from '../../../types/emoji.std.js'; +} from '../useFunEmojiSearch.dom.tsx'; +import type { FunEmojiLocalizerIndex } from '../useFunEmojiLocalizer.dom.tsx'; +import { removeDiacritics } from '../../../util/removeDiacritics.std.ts'; +import { createLogger } from '../../../logging/log.std.ts'; +import { EmojiSkinTone } from '../../../types/emoji.std.ts'; -export { EmojiSkinTone } from '../../../types/emoji.std.js'; +export { EmojiSkinTone } from '../../../types/emoji.std.ts'; const log = createLogger('fun/data/emojis'); diff --git a/ts/components/fun/data/giphy.preload.ts b/ts/components/fun/data/giphy.preload.ts index 7fd9e701ec..e77ad1117c 100644 --- a/ts/components/fun/data/giphy.preload.ts +++ b/ts/components/fun/data/giphy.preload.ts @@ -1,19 +1,19 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; -import { parseUnknown } from '../../../util/schemas.std.js'; +import { parseUnknown } from '../../../util/schemas.std.ts'; import { fetchJsonViaProxy, fetchBytesViaProxy, -} from '../../../textsecure/WebAPI.preload.js'; -import { fetchInSegments } from './segments.std.js'; -import { safeParseInteger } from '../../../util/numbers.std.js'; -import type { PaginatedGifResults } from '../panels/FunPanelGifs.dom.js'; +} from '../../../textsecure/WebAPI.preload.ts'; +import { fetchInSegments } from './segments.std.ts'; +import { safeParseInteger } from '../../../util/numbers.std.ts'; +import type { PaginatedGifResults } from '../panels/FunPanelGifs.dom.tsx'; import { getGifCdnUrlOrigin, isGifCdnUrlOriginAllowed, isGiphyCdnUrlOrigin, -} from '../../../util/gifCdnUrls.dom.js'; +} from '../../../util/gifCdnUrls.dom.ts'; const BASE_API_URL = 'https://api.giphy.com'; const API_KEY = 'ApVVlSyeBfNKK6UWtnBRq9CvAkWsxayB'; diff --git a/ts/components/fun/data/infinite.std.ts b/ts/components/fun/data/infinite.std.ts index ead3f294cb..60f52b5082 100644 --- a/ts/components/fun/data/infinite.std.ts +++ b/ts/components/fun/data/infinite.std.ts @@ -1,10 +1,10 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { useCallback, useEffect, useRef, useState } from 'react'; -import { drop } from '../../../util/drop.std.js'; -import { createLogger } from '../../../logging/log.std.js'; -import * as Errors from '../../../types/errors.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; +import { drop } from '../../../util/drop.std.ts'; +import { createLogger } from '../../../logging/log.std.ts'; +import * as Errors from '../../../types/errors.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; const log = createLogger('infinite'); diff --git a/ts/components/fun/data/segments.std.ts b/ts/components/fun/data/segments.std.ts index 5e1b57570a..0d8b4a6af5 100644 --- a/ts/components/fun/data/segments.std.ts +++ b/ts/components/fun/data/segments.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { strictAssert } from '../../../util/assert.std.js'; -import type { fetchBytesViaProxy } from '../../../textsecure/WebAPI.preload.js'; +import { strictAssert } from '../../../util/assert.std.ts'; +import type { fetchBytesViaProxy } from '../../../textsecure/WebAPI.preload.ts'; /** @internal Exported for testing */ export const _SEGMENT_SIZE_BUCKETS: ReadonlyArray = [ diff --git a/ts/components/fun/keyboard/FunKeyboard.dom.tsx b/ts/components/fun/keyboard/FunKeyboard.dom.tsx index 5b4b3e7eb6..f92878aa71 100644 --- a/ts/components/fun/keyboard/FunKeyboard.dom.tsx +++ b/ts/components/fun/keyboard/FunKeyboard.dom.tsx @@ -5,7 +5,7 @@ import type { ReactNode, RefObject } from 'react'; import React, { useEffect, useRef } from 'react'; // @ts-expect-error - Needs tinykeys to update package.json type resolution import { createKeybindingsHandler } from 'tinykeys'; -import { strictAssert } from '../../../util/assert.std.js'; +import { strictAssert } from '../../../util/assert.std.ts'; export abstract class KeyboardDelegate { abstract scrollToState(state: State): void; diff --git a/ts/components/fun/keyboard/GridKeyboardDelegate.dom.tsx b/ts/components/fun/keyboard/GridKeyboardDelegate.dom.tsx index 66bfc3e02c..feaced0c92 100644 --- a/ts/components/fun/keyboard/GridKeyboardDelegate.dom.tsx +++ b/ts/components/fun/keyboard/GridKeyboardDelegate.dom.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { VirtualItem, Virtualizer } from '@tanstack/react-virtual'; import lodash from 'lodash'; -import { strictAssert } from '../../../util/assert.std.js'; +import { strictAssert } from '../../../util/assert.std.ts'; import type { CellKey, Layout, RowKey, SectionKey, -} from '../virtual/useFunVirtualGrid.dom.js'; -import { KeyboardDelegate } from './FunKeyboard.dom.js'; +} from '../virtual/useFunVirtualGrid.dom.tsx'; +import { KeyboardDelegate } from './FunKeyboard.dom.tsx'; const { findLast, sortBy } = lodash; diff --git a/ts/components/fun/keyboard/WaterfallKeyboardDelegate.dom.tsx b/ts/components/fun/keyboard/WaterfallKeyboardDelegate.dom.tsx index 6531a46675..5a6c37caf9 100644 --- a/ts/components/fun/keyboard/WaterfallKeyboardDelegate.dom.tsx +++ b/ts/components/fun/keyboard/WaterfallKeyboardDelegate.dom.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { VirtualItem, Virtualizer } from '@tanstack/react-virtual'; import lodash from 'lodash'; -import { strictAssert } from '../../../util/assert.std.js'; -import { KeyboardDelegate } from './FunKeyboard.dom.js'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { KeyboardDelegate } from './FunKeyboard.dom.tsx'; const { findLast, maxBy } = lodash; diff --git a/ts/components/fun/mocks.dom.tsx b/ts/components/fun/mocks.dom.tsx index 272cb4ccf8..957ddfb741 100644 --- a/ts/components/fun/mocks.dom.tsx +++ b/ts/components/fun/mocks.dom.tsx @@ -1,15 +1,15 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { strictAssert } from '../../util/assert.std.js'; -import type { EmojiParentKey, EmojiVariantKey } from './data/emojis.std.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { EmojiParentKey, EmojiVariantKey } from './data/emojis.std.ts'; import { EmojiSkinTone, getEmojiParentKeyByEnglishShortName, getEmojiVariantKeyByParentKeyAndSkinTone, isEmojiEnglishShortName, -} from './data/emojis.std.js'; -import type { PaginatedGifResults } from './panels/FunPanelGifs.dom.js'; +} from './data/emojis.std.ts'; +import type { PaginatedGifResults } from './panels/FunPanelGifs.dom.tsx'; function getEmoji(input: string): EmojiParentKey { strictAssert( diff --git a/ts/components/fun/panels/FunPanelEmojis.dom.tsx b/ts/components/fun/panels/FunPanelEmojis.dom.tsx index aa24b319a7..d8ee9bd27b 100644 --- a/ts/components/fun/panels/FunPanelEmojis.dom.tsx +++ b/ts/components/fun/panels/FunPanelEmojis.dom.tsx @@ -11,15 +11,15 @@ import { } from 'react-aria-components'; import { VisuallyHidden } from 'react-aria'; import { Tooltip } from 'radix-ui'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import type { FunEmojisSection } from '../constants.dom.js'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import type { FunEmojisSection } from '../constants.dom.tsx'; import { FunEmojisBase, FunEmojisSectionOrder, FunSectionCommon, -} from '../constants.dom.js'; +} from '../constants.dom.tsx'; import { FunGridCell, FunGridContainer, @@ -32,23 +32,23 @@ import { FunGridRow, FunGridRowGroup, FunGridScrollerSection, -} from '../base/FunGrid.dom.js'; -import { FunItemButton } from '../base/FunItem.dom.js'; +} from '../base/FunGrid.dom.tsx'; +import { FunItemButton } from '../base/FunItem.dom.tsx'; import { FunPanel, FunPanelBody, FunPanelFooter, FunPanelHeader, -} from '../base/FunPanel.dom.js'; -import { FunScroller } from '../base/FunScroller.dom.js'; -import { FunSearch } from '../base/FunSearch.dom.js'; +} from '../base/FunPanel.dom.tsx'; +import { FunScroller } from '../base/FunScroller.dom.tsx'; +import { FunSearch } from '../base/FunSearch.dom.tsx'; import { FunSubNav, FunSubNavIcon, FunSubNavListBox, FunSubNavListBoxItem, -} from '../base/FunSubNav.dom.js'; -import type { EmojiVariantKey } from '../data/emojis.std.js'; +} from '../base/FunSubNav.dom.tsx'; +import type { EmojiVariantKey } from '../data/emojis.std.ts'; import { EmojiSkinTone, EmojiPickerCategory, @@ -61,23 +61,23 @@ import { getEmojiVariantByKey, EMOJI_PARENT_KEY_CONSTANTS, EMOJI_VARIANT_KEY_CONSTANTS, -} from '../data/emojis.std.js'; -import { useFunEmojiSearch } from '../useFunEmojiSearch.dom.js'; -import { FunKeyboard } from '../keyboard/FunKeyboard.dom.js'; -import type { GridKeyboardState } from '../keyboard/GridKeyboardDelegate.dom.js'; -import { GridKeyboardDelegate } from '../keyboard/GridKeyboardDelegate.dom.js'; +} from '../data/emojis.std.ts'; +import { useFunEmojiSearch } from '../useFunEmojiSearch.dom.tsx'; +import { FunKeyboard } from '../keyboard/FunKeyboard.dom.tsx'; +import type { GridKeyboardState } from '../keyboard/GridKeyboardDelegate.dom.tsx'; +import { GridKeyboardDelegate } from '../keyboard/GridKeyboardDelegate.dom.tsx'; import type { CellKey, CellLayoutNode, GridSectionNode, -} from '../virtual/useFunVirtualGrid.dom.js'; -import { useFunVirtualGrid } from '../virtual/useFunVirtualGrid.dom.js'; -import { FunSkinTonesList } from '../FunSkinTones.dom.js'; -import { FunStaticEmoji } from '../FunEmoji.dom.js'; -import { useFunContext } from '../FunProvider.dom.js'; -import { FunResults, FunResultsHeader } from '../base/FunResults.dom.js'; -import { useFunEmojiLocalizer } from '../useFunEmojiLocalizer.dom.js'; -import { FunTooltip } from '../base/FunTooltip.dom.js'; +} from '../virtual/useFunVirtualGrid.dom.tsx'; +import { useFunVirtualGrid } from '../virtual/useFunVirtualGrid.dom.tsx'; +import { FunSkinTonesList } from '../FunSkinTones.dom.tsx'; +import { FunStaticEmoji } from '../FunEmoji.dom.tsx'; +import { useFunContext } from '../FunProvider.dom.tsx'; +import { FunResults, FunResultsHeader } from '../base/FunResults.dom.tsx'; +import { useFunEmojiLocalizer } from '../useFunEmojiLocalizer.dom.tsx'; +import { FunTooltip } from '../base/FunTooltip.dom.tsx'; function getTitleForSection( i18n: LocalizerType, diff --git a/ts/components/fun/panels/FunPanelGifs.dom.tsx b/ts/components/fun/panels/FunPanelGifs.dom.tsx index 3a54469996..95e2a1c1f0 100644 --- a/ts/components/fun/panels/FunPanelGifs.dom.tsx +++ b/ts/components/fun/panels/FunPanelGifs.dom.tsx @@ -15,67 +15,67 @@ import React, { import { VisuallyHidden } from 'react-aria'; import { LRUCache } from 'lru-cache'; import { AnimatePresence, motion } from 'motion/react'; -import { FunItemButton } from '../base/FunItem.dom.js'; +import { FunItemButton } from '../base/FunItem.dom.tsx'; import { FunPanel, FunPanelBody, FunPanelFooter, FunPanelHeader, -} from '../base/FunPanel.dom.js'; -import { FunScroller } from '../base/FunScroller.dom.js'; -import { FunSearch } from '../base/FunSearch.dom.js'; +} from '../base/FunPanel.dom.tsx'; +import { FunScroller } from '../base/FunScroller.dom.tsx'; +import { FunSearch } from '../base/FunSearch.dom.tsx'; import { FunSubNav, FunSubNavIcon, FunSubNavListBox, FunSubNavListBoxItem, -} from '../base/FunSubNav.dom.js'; +} from '../base/FunSubNav.dom.tsx'; import { FunWaterfallContainer, FunWaterfallItem, -} from '../base/FunWaterfall.dom.js'; -import type { FunGifsSection } from '../constants.dom.js'; -import { FunGifsCategory, FunSectionCommon } from '../constants.dom.js'; -import { FunKeyboard } from '../keyboard/FunKeyboard.dom.js'; -import type { WaterfallKeyboardState } from '../keyboard/WaterfallKeyboardDelegate.dom.js'; -import { WaterfallKeyboardDelegate } from '../keyboard/WaterfallKeyboardDelegate.dom.js'; -import { useInfiniteQuery } from '../data/infinite.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { drop } from '../../../util/drop.std.js'; -import { useFunContext } from '../FunProvider.dom.js'; +} from '../base/FunWaterfall.dom.tsx'; +import type { FunGifsSection } from '../constants.dom.tsx'; +import { FunGifsCategory, FunSectionCommon } from '../constants.dom.tsx'; +import { FunKeyboard } from '../keyboard/FunKeyboard.dom.tsx'; +import type { WaterfallKeyboardState } from '../keyboard/WaterfallKeyboardDelegate.dom.tsx'; +import { WaterfallKeyboardDelegate } from '../keyboard/WaterfallKeyboardDelegate.dom.tsx'; +import { useInfiniteQuery } from '../data/infinite.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { drop } from '../../../util/drop.std.ts'; +import { useFunContext } from '../FunProvider.dom.tsx'; import { FunResults, FunResultsButton, FunResultsFigure, FunResultsHeader, FunResultsSpinner, -} from '../base/FunResults.dom.js'; -import { FunStaticEmoji } from '../FunEmoji.dom.js'; +} from '../base/FunResults.dom.tsx'; +import { FunStaticEmoji } from '../FunEmoji.dom.tsx'; import { FunLightboxPortal, FunLightboxBackdrop, FunLightboxDialog, FunLightboxProvider, useFunLightboxKey, -} from '../base/FunLightbox.dom.js'; -import { FunGif } from '../FunGif.dom.js'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { isAbortError } from '../../../util/isAbortError.std.js'; -import { createLogger } from '../../../logging/log.std.js'; -import * as Errors from '../../../types/errors.std.js'; +} from '../base/FunLightbox.dom.tsx'; +import { FunGif } from '../FunGif.dom.tsx'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { isAbortError } from '../../../util/isAbortError.std.ts'; +import { createLogger } from '../../../logging/log.std.ts'; +import * as Errors from '../../../types/errors.std.ts'; import { EMOJI_VARIANT_KEY_CONSTANTS, getEmojiVariantByKey, -} from '../data/emojis.std.js'; -import type { fetchGiphyFile } from '../data/giphy.preload.js'; +} from '../data/emojis.std.ts'; +import type { fetchGiphyFile } from '../data/giphy.preload.ts'; import { getGifCdnUrlOrigin, isGifCdnUrlOriginAllowed, isTenorCdnUrlOrigin, -} from '../../../util/gifCdnUrls.dom.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { isScrollAtTop } from '../../../hooks/useSizeObserver.dom.js'; +} from '../../../util/gifCdnUrls.dom.ts'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { isScrollAtTop } from '../../../hooks/useSizeObserver.dom.tsx'; const log = createLogger('FunPanelGifs'); diff --git a/ts/components/fun/panels/FunPanelStickers.dom.tsx b/ts/components/fun/panels/FunPanelStickers.dom.tsx index 33cc0fbca0..d2a90daebb 100644 --- a/ts/components/fun/panels/FunPanelStickers.dom.tsx +++ b/ts/components/fun/panels/FunPanelStickers.dom.tsx @@ -13,20 +13,20 @@ import { VisuallyHidden } from 'react-aria'; import type { StickerPackType, StickerType, -} from '../../../state/ducks/stickers.preload.js'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; +} from '../../../state/ducks/stickers.preload.ts'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; import type { FunStickersPackSection, FunStickersSection, FunTimeStickerStyle, -} from '../constants.dom.js'; +} from '../constants.dom.tsx'; import { FunSectionCommon, FunStickersSectionBase, FunTimeStickerStylesOrder, toFunStickersPackSection, -} from '../constants.dom.js'; +} from '../constants.dom.tsx'; import { FunGridCell, FunGridContainer, @@ -35,16 +35,16 @@ import { FunGridRow, FunGridRowGroup, FunGridScrollerSection, -} from '../base/FunGrid.dom.js'; -import { FunItemButton } from '../base/FunItem.dom.js'; +} from '../base/FunGrid.dom.tsx'; +import { FunItemButton } from '../base/FunItem.dom.tsx'; import { FunPanel, FunPanelBody, FunPanelFooter, FunPanelHeader, -} from '../base/FunPanel.dom.js'; -import { FunScroller } from '../base/FunScroller.dom.js'; -import { FunSearch } from '../base/FunSearch.dom.js'; +} from '../base/FunPanel.dom.tsx'; +import { FunScroller } from '../base/FunScroller.dom.tsx'; +import { FunSearch } from '../base/FunSearch.dom.tsx'; import { FunSubNav, FunSubNavButton, @@ -54,37 +54,37 @@ import { FunSubNavListBox, FunSubNavListBoxItem, FunSubNavScroller, -} from '../base/FunSubNav.dom.js'; +} from '../base/FunSubNav.dom.tsx'; import { EMOJI_VARIANT_KEY_CONSTANTS, type EmojiParentKey, getEmojiParentKeyByValue, getEmojiVariantByKey, isEmojiParentValue, -} from '../data/emojis.std.js'; -import { FunKeyboard } from '../keyboard/FunKeyboard.dom.js'; -import type { GridKeyboardState } from '../keyboard/GridKeyboardDelegate.dom.js'; -import { GridKeyboardDelegate } from '../keyboard/GridKeyboardDelegate.dom.js'; +} from '../data/emojis.std.ts'; +import { FunKeyboard } from '../keyboard/FunKeyboard.dom.tsx'; +import type { GridKeyboardState } from '../keyboard/GridKeyboardDelegate.dom.tsx'; +import { GridKeyboardDelegate } from '../keyboard/GridKeyboardDelegate.dom.tsx'; import type { CellKey, CellLayoutNode, GridSectionNode, -} from '../virtual/useFunVirtualGrid.dom.js'; -import { useFunVirtualGrid } from '../virtual/useFunVirtualGrid.dom.js'; -import { useFunContext } from '../FunProvider.dom.js'; -import { FunResults, FunResultsHeader } from '../base/FunResults.dom.js'; -import { FunStaticEmoji } from '../FunEmoji.dom.js'; +} from '../virtual/useFunVirtualGrid.dom.tsx'; +import { useFunVirtualGrid } from '../virtual/useFunVirtualGrid.dom.tsx'; +import { useFunContext } from '../FunProvider.dom.tsx'; +import { FunResults, FunResultsHeader } from '../base/FunResults.dom.tsx'; +import { FunStaticEmoji } from '../FunEmoji.dom.tsx'; import { FunLightboxPortal, FunLightboxBackdrop, FunLightboxDialog, FunLightboxProvider, useFunLightboxKey, -} from '../base/FunLightbox.dom.js'; -import { FunSticker } from '../FunSticker.dom.js'; -import { getAnalogTime } from '../../../util/getAnalogTime.std.js'; -import { getDateTimeFormatter } from '../../../util/formatTimestamp.dom.js'; -import { useFunEmojiSearch } from '../useFunEmojiSearch.dom.js'; +} from '../base/FunLightbox.dom.tsx'; +import { FunSticker } from '../FunSticker.dom.tsx'; +import { getAnalogTime } from '../../../util/getAnalogTime.std.ts'; +import { getDateTimeFormatter } from '../../../util/formatTimestamp.dom.ts'; +import { useFunEmojiSearch } from '../useFunEmojiSearch.dom.tsx'; const STICKER_GRID_COLUMNS = 4; const STICKER_GRID_CELL_WIDTH = 80; diff --git a/ts/components/fun/useFunEmojiLocalizer.dom.tsx b/ts/components/fun/useFunEmojiLocalizer.dom.tsx index 3bb3284ced..bafd8a68f0 100644 --- a/ts/components/fun/useFunEmojiLocalizer.dom.tsx +++ b/ts/components/fun/useFunEmojiLocalizer.dom.tsx @@ -1,15 +1,15 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { useMemo } from 'react'; -import type { EmojiParentKey, EmojiVariantKey } from './data/emojis.std.js'; +import type { EmojiParentKey, EmojiVariantKey } from './data/emojis.std.ts'; import { getEmojiParentByKey, getEmojiParentKeyByVariantKey, getEmojiVariantKeyByValue, isEmojiVariantValue, -} from './data/emojis.std.js'; -import type { LocaleEmojiListType } from '../../types/emoji.std.js'; -import { useFunEmojiLocalization } from './FunEmojiLocalizationProvider.dom.js'; +} from './data/emojis.std.ts'; +import type { LocaleEmojiListType } from '../../types/emoji.std.ts'; +import { useFunEmojiLocalization } from './FunEmojiLocalizationProvider.dom.tsx'; export type FunEmojiLocalizerIndex = Readonly<{ parentKeyToLocaleShortName: ReadonlyMap; diff --git a/ts/components/fun/useFunEmojiSearch.dom.tsx b/ts/components/fun/useFunEmojiSearch.dom.tsx index fbe98a7a35..9bc38efd7a 100644 --- a/ts/components/fun/useFunEmojiSearch.dom.tsx +++ b/ts/components/fun/useFunEmojiSearch.dom.tsx @@ -3,16 +3,16 @@ import Fuse from 'fuse.js'; import lodash from 'lodash'; import { useMemo } from 'react'; -import type { EmojiParentKey } from './data/emojis.std.js'; +import type { EmojiParentKey } from './data/emojis.std.ts'; import { getEmojiParentByKey, getEmojiParentKeyByValue, isEmojiParentValue, isEmojiParentValueDeprecated, normalizeShortNameCompletionQuery, -} from './data/emojis.std.js'; -import type { LocaleEmojiListType } from '../../types/emoji.std.js'; -import { useFunEmojiLocalization } from './FunEmojiLocalizationProvider.dom.js'; +} from './data/emojis.std.ts'; +import type { LocaleEmojiListType } from '../../types/emoji.std.ts'; +import { useFunEmojiLocalization } from './FunEmojiLocalizationProvider.dom.tsx'; const { sortBy } = lodash; diff --git a/ts/components/fun/virtual/useFunVirtualGrid.dom.tsx b/ts/components/fun/virtual/useFunVirtualGrid.dom.tsx index 2e124b2ea0..a38e2c1925 100644 --- a/ts/components/fun/virtual/useFunVirtualGrid.dom.tsx +++ b/ts/components/fun/virtual/useFunVirtualGrid.dom.tsx @@ -9,8 +9,8 @@ import { import lodash from 'lodash'; import type { RefObject } from 'react'; import { useCallback, useMemo } from 'react'; -import { strictAssert } from '../../../util/assert.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; const { chunk, groupBy } = lodash; diff --git a/ts/components/installScreen/InstallScreenBackupImportStep.dom.stories.tsx b/ts/components/installScreen/InstallScreenBackupImportStep.dom.stories.tsx index bccb5e32f2..fc66d5c0a0 100644 --- a/ts/components/installScreen/InstallScreenBackupImportStep.dom.stories.tsx +++ b/ts/components/installScreen/InstallScreenBackupImportStep.dom.stories.tsx @@ -4,14 +4,14 @@ import React, { useState, useCallback, useEffect } from 'react'; import type { Meta, StoryFn } from '@storybook/react'; import { action } from '@storybook/addon-actions'; -import { sleep } from '../../util/sleep.std.js'; +import { sleep } from '../../util/sleep.std.ts'; import { InstallScreenBackupStep, InstallScreenBackupError, -} from '../../types/InstallScreen.std.js'; -import { DialogType } from '../../types/Dialogs.std.js'; -import type { PropsType } from './InstallScreenBackupImportStep.dom.js'; -import { InstallScreenBackupImportStep } from './InstallScreenBackupImportStep.dom.js'; +} from '../../types/InstallScreen.std.ts'; +import { DialogType } from '../../types/Dialogs.std.ts'; +import type { PropsType } from './InstallScreenBackupImportStep.dom.tsx'; +import { InstallScreenBackupImportStep } from './InstallScreenBackupImportStep.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/installScreen/InstallScreenBackupImportStep.dom.tsx b/ts/components/installScreen/InstallScreenBackupImportStep.dom.tsx index c3dc9a73ca..be0c73ad92 100644 --- a/ts/components/installScreen/InstallScreenBackupImportStep.dom.tsx +++ b/ts/components/installScreen/InstallScreenBackupImportStep.dom.tsx @@ -3,23 +3,23 @@ import React, { useState, useCallback } from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { UpdatesStateType } from '../../state/ducks/updates.preload.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { UpdatesStateType } from '../../state/ducks/updates.preload.ts'; import { InstallScreenStep, InstallScreenBackupStep, InstallScreenBackupError, -} from '../../types/InstallScreen.std.js'; -import { formatFileSize } from '../../util/formatFileSize.std.js'; -import { TitlebarDragArea } from '../TitlebarDragArea.dom.js'; -import { ProgressBar } from '../ProgressBar.dom.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { InstallScreenSignalLogo } from './InstallScreenSignalLogo.dom.js'; -import { roundFractionForProgressBar } from '../../util/numbers.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { SYNCING_MESSAGES_SECURITY_URL } from '../../types/support.std.js'; -import { I18n } from '../I18n.dom.js'; -import { InstallScreenUpdateDialog } from './InstallScreenUpdateDialog.dom.js'; +} from '../../types/InstallScreen.std.ts'; +import { formatFileSize } from '../../util/formatFileSize.std.ts'; +import { TitlebarDragArea } from '../TitlebarDragArea.dom.tsx'; +import { ProgressBar } from '../ProgressBar.dom.tsx'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { InstallScreenSignalLogo } from './InstallScreenSignalLogo.dom.tsx'; +import { roundFractionForProgressBar } from '../../util/numbers.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { SYNCING_MESSAGES_SECURITY_URL } from '../../types/support.std.ts'; +import { I18n } from '../I18n.dom.tsx'; +import { InstallScreenUpdateDialog } from './InstallScreenUpdateDialog.dom.tsx'; // We can't always use destructuring assignment because of the complexity of this props // type. diff --git a/ts/components/installScreen/InstallScreenErrorStep.dom.stories.tsx b/ts/components/installScreen/InstallScreenErrorStep.dom.stories.tsx index 6be2abc744..46876a0fe9 100644 --- a/ts/components/installScreen/InstallScreenErrorStep.dom.stories.tsx +++ b/ts/components/installScreen/InstallScreenErrorStep.dom.stories.tsx @@ -4,9 +4,9 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import { InstallScreenError } from '../../types/InstallScreen.std.js'; -import type { Props } from './InstallScreenErrorStep.dom.js'; -import { InstallScreenErrorStep } from './InstallScreenErrorStep.dom.js'; +import { InstallScreenError } from '../../types/InstallScreen.std.ts'; +import type { Props } from './InstallScreenErrorStep.dom.tsx'; +import { InstallScreenErrorStep } from './InstallScreenErrorStep.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/installScreen/InstallScreenErrorStep.dom.tsx b/ts/components/installScreen/InstallScreenErrorStep.dom.tsx index 5de44e1794..dc22ef04c8 100644 --- a/ts/components/installScreen/InstallScreenErrorStep.dom.tsx +++ b/ts/components/installScreen/InstallScreenErrorStep.dom.tsx @@ -3,14 +3,14 @@ import React, { type ReactElement, useCallback } from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.js'; -import { Button, ButtonVariant } from '../Button.dom.js'; -import { TitlebarDragArea } from '../TitlebarDragArea.dom.js'; -import { InstallScreenSignalLogo } from './InstallScreenSignalLogo.dom.js'; -import { LINK_SIGNAL_DESKTOP } from '../../types/support.std.js'; -import { InstallScreenError } from '../../types/InstallScreen.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.ts'; +import { Button, ButtonVariant } from '../Button.dom.tsx'; +import { TitlebarDragArea } from '../TitlebarDragArea.dom.tsx'; +import { InstallScreenSignalLogo } from './InstallScreenSignalLogo.dom.tsx'; +import { LINK_SIGNAL_DESKTOP } from '../../types/support.std.ts'; +import { InstallScreenError } from '../../types/InstallScreen.std.ts'; export type Props = Readonly<{ error: InstallScreenError; diff --git a/ts/components/installScreen/InstallScreenLinkInProgress.dom.stories.tsx b/ts/components/installScreen/InstallScreenLinkInProgress.dom.stories.tsx index 0ca6737d62..ff99f37ba6 100644 --- a/ts/components/installScreen/InstallScreenLinkInProgress.dom.stories.tsx +++ b/ts/components/installScreen/InstallScreenLinkInProgress.dom.stories.tsx @@ -3,8 +3,8 @@ import React from 'react'; import type { Meta } from '@storybook/react'; -import type { Props } from './InstallScreenLinkInProgressStep.dom.js'; -import { InstallScreenLinkInProgressStep } from './InstallScreenLinkInProgressStep.dom.js'; +import type { Props } from './InstallScreenLinkInProgressStep.dom.tsx'; +import { InstallScreenLinkInProgressStep } from './InstallScreenLinkInProgressStep.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/installScreen/InstallScreenLinkInProgressStep.dom.tsx b/ts/components/installScreen/InstallScreenLinkInProgressStep.dom.tsx index 9bd5b3456d..3569a21373 100644 --- a/ts/components/installScreen/InstallScreenLinkInProgressStep.dom.tsx +++ b/ts/components/installScreen/InstallScreenLinkInProgressStep.dom.tsx @@ -4,11 +4,11 @@ import type { ReactElement } from 'react'; import React from 'react'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; -import { Spinner } from '../Spinner.dom.js'; -import { TitlebarDragArea } from '../TitlebarDragArea.dom.js'; -import { InstallScreenSignalLogo } from './InstallScreenSignalLogo.dom.js'; +import { Spinner } from '../Spinner.dom.tsx'; +import { TitlebarDragArea } from '../TitlebarDragArea.dom.tsx'; +import { InstallScreenSignalLogo } from './InstallScreenSignalLogo.dom.tsx'; export type Props = Readonly<{ i18n: LocalizerType }>; diff --git a/ts/components/installScreen/InstallScreenQrCodeNotScannedStep.dom.stories.tsx b/ts/components/installScreen/InstallScreenQrCodeNotScannedStep.dom.stories.tsx index 343b7d556e..25157e64fc 100644 --- a/ts/components/installScreen/InstallScreenQrCodeNotScannedStep.dom.stories.tsx +++ b/ts/components/installScreen/InstallScreenQrCodeNotScannedStep.dom.stories.tsx @@ -4,12 +4,12 @@ import React, { useEffect, useState } from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta, StoryFn } from '@storybook/react'; -import { DialogType } from '../../types/Dialogs.std.js'; -import { InstallScreenQRCodeError } from '../../types/InstallScreen.std.js'; -import type { Loadable } from '../../util/loadable.std.js'; -import { LoadingState } from '../../util/loadable.std.js'; -import type { PropsType } from './InstallScreenQrCodeNotScannedStep.dom.js'; -import { InstallScreenQrCodeNotScannedStep } from './InstallScreenQrCodeNotScannedStep.dom.js'; +import { DialogType } from '../../types/Dialogs.std.ts'; +import { InstallScreenQRCodeError } from '../../types/InstallScreen.std.ts'; +import type { Loadable } from '../../util/loadable.std.ts'; +import { LoadingState } from '../../util/loadable.std.ts'; +import type { PropsType } from './InstallScreenQrCodeNotScannedStep.dom.tsx'; +import { InstallScreenQrCodeNotScannedStep } from './InstallScreenQrCodeNotScannedStep.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/components/installScreen/InstallScreenQrCodeNotScannedStep.dom.tsx b/ts/components/installScreen/InstallScreenQrCodeNotScannedStep.dom.tsx index 9a1c9583a1..ebddf48dd0 100644 --- a/ts/components/installScreen/InstallScreenQrCodeNotScannedStep.dom.tsx +++ b/ts/components/installScreen/InstallScreenQrCodeNotScannedStep.dom.tsx @@ -6,26 +6,26 @@ import React, { useCallback, useState, useEffect } from 'react'; import classNames from 'classnames'; import lodash from 'lodash'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; import { InstallScreenStep, InstallScreenQRCodeError, -} from '../../types/InstallScreen.std.js'; -import { DialogType } from '../../types/Dialogs.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import type { Loadable } from '../../util/loadable.std.js'; -import { LoadingState } from '../../util/loadable.std.js'; -import { drop } from '../../util/drop.std.js'; -import { getEnvironment, Environment } from '../../environment.std.js'; +} from '../../types/InstallScreen.std.ts'; +import { DialogType } from '../../types/Dialogs.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import type { Loadable } from '../../util/loadable.std.ts'; +import { LoadingState } from '../../util/loadable.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { getEnvironment, Environment } from '../../environment.std.ts'; -import { I18n } from '../I18n.dom.js'; -import { Spinner } from '../Spinner.dom.js'; -import { BrandedQRCode } from '../BrandedQRCode.dom.js'; -import { TitlebarDragArea } from '../TitlebarDragArea.dom.js'; -import { InstallScreenSignalLogo } from './InstallScreenSignalLogo.dom.js'; -import { InstallScreenUpdateDialog } from './InstallScreenUpdateDialog.dom.js'; -import { getClassNamesFor } from '../../util/getClassNamesFor.std.js'; -import type { UpdatesStateType } from '../../state/ducks/updates.preload.js'; +import { I18n } from '../I18n.dom.tsx'; +import { Spinner } from '../Spinner.dom.tsx'; +import { BrandedQRCode } from '../BrandedQRCode.dom.tsx'; +import { TitlebarDragArea } from '../TitlebarDragArea.dom.tsx'; +import { InstallScreenSignalLogo } from './InstallScreenSignalLogo.dom.tsx'; +import { InstallScreenUpdateDialog } from './InstallScreenUpdateDialog.dom.tsx'; +import { getClassNamesFor } from '../../util/getClassNamesFor.std.ts'; +import type { UpdatesStateType } from '../../state/ducks/updates.preload.ts'; const { noop } = lodash; diff --git a/ts/components/installScreen/InstallScreenUpdateDialog.dom.tsx b/ts/components/installScreen/InstallScreenUpdateDialog.dom.tsx index a767e249a8..474af4fcc4 100644 --- a/ts/components/installScreen/InstallScreenUpdateDialog.dom.tsx +++ b/ts/components/installScreen/InstallScreenUpdateDialog.dom.tsx @@ -4,22 +4,22 @@ import React from 'react'; import lodash from 'lodash'; -import { DialogType } from '../../types/Dialogs.std.js'; -import { InstallScreenStep } from '../../types/InstallScreen.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import { DialogType } from '../../types/Dialogs.std.ts'; +import { InstallScreenStep } from '../../types/InstallScreen.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; import { PRODUCTION_DOWNLOAD_URL, BETA_DOWNLOAD_URL, UNSUPPORTED_OS_URL, -} from '../../types/support.std.js'; -import type { UpdatesStateType } from '../../state/ducks/updates.preload.js'; -import { isBeta } from '../../util/version.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { roundFractionForProgressBar } from '../../util/numbers.std.js'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import { Modal } from '../Modal.dom.js'; -import { I18n } from '../I18n.dom.js'; -import { formatFileSize } from '../../util/formatFileSize.std.js'; +} from '../../types/support.std.ts'; +import type { UpdatesStateType } from '../../state/ducks/updates.preload.ts'; +import { isBeta } from '../../util/version.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { roundFractionForProgressBar } from '../../util/numbers.std.ts'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import { Modal } from '../Modal.dom.tsx'; +import { I18n } from '../I18n.dom.tsx'; +import { formatFileSize } from '../../util/formatFileSize.std.ts'; const { noop } = lodash; diff --git a/ts/components/leftPane/LeftPaneArchiveHelper.dom.tsx b/ts/components/leftPane/LeftPaneArchiveHelper.dom.tsx index 43b2e1f74d..3a1433b58f 100644 --- a/ts/components/leftPane/LeftPaneArchiveHelper.dom.tsx +++ b/ts/components/leftPane/LeftPaneArchiveHelper.dom.tsx @@ -5,21 +5,21 @@ import type { ReactNode } from 'react'; import React from 'react'; import lodash from 'lodash'; -import type { ToFindType } from './LeftPaneHelper.dom.js'; -import { LeftPaneHelper } from './LeftPaneHelper.dom.js'; -import { getConversationInDirection } from './getConversationInDirection.dom.js'; -import type { Row } from '../ConversationList.dom.js'; -import { RowType } from '../ConversationList.dom.js'; -import type { PropsData as ConversationListItemPropsType } from '../conversationList/ConversationListItem.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { ToFindType } from './LeftPaneHelper.dom.tsx'; +import { LeftPaneHelper } from './LeftPaneHelper.dom.tsx'; +import { getConversationInDirection } from './getConversationInDirection.dom.ts'; +import type { Row } from '../ConversationList.dom.tsx'; +import { RowType } from '../ConversationList.dom.tsx'; +import type { PropsData as ConversationListItemPropsType } from '../conversationList/ConversationListItem.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; import type { ConversationType, ShowConversationType, -} from '../../state/ducks/conversations.preload.js'; -import { LeftPaneSearchInput } from '../LeftPaneSearchInput.dom.js'; -import type { LeftPaneSearchPropsType } from './LeftPaneSearchHelper.dom.js'; -import { LeftPaneSearchHelper } from './LeftPaneSearchHelper.dom.js'; -import * as KeyboardLayout from '../../services/keyboardLayout.dom.js'; +} from '../../state/ducks/conversations.preload.ts'; +import { LeftPaneSearchInput } from '../LeftPaneSearchInput.dom.tsx'; +import type { LeftPaneSearchPropsType } from './LeftPaneSearchHelper.dom.tsx'; +import { LeftPaneSearchHelper } from './LeftPaneSearchHelper.dom.tsx'; +import * as KeyboardLayout from '../../services/keyboardLayout.dom.ts'; const { last } = lodash; diff --git a/ts/components/leftPane/LeftPaneChatFolders.dom.tsx b/ts/components/leftPane/LeftPaneChatFolders.dom.tsx index c8277b71a2..0bb2cc8cad 100644 --- a/ts/components/leftPane/LeftPaneChatFolders.dom.tsx +++ b/ts/components/leftPane/LeftPaneChatFolders.dom.tsx @@ -10,25 +10,25 @@ import { ChatFolderType, type ChatFolder, type ChatFolderId, -} from '../../types/ChatFolder.std.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import { ExperimentalAxoSegmentedControl } from '../../axo/AxoSegmentedControl.dom.js'; -import { tw } from '../../axo/tw.dom.js'; +} from '../../types/ChatFolder.std.ts'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import { ExperimentalAxoSegmentedControl } from '../../axo/AxoSegmentedControl.dom.tsx'; +import { tw } from '../../axo/tw.dom.tsx'; import type { AllChatFoldersUnreadStats, UnreadStats, -} from '../../util/countUnreadStats.std.js'; -import { WidthBreakpoint } from '../_util.std.js'; -import { AxoSelect } from '../../axo/AxoSelect.dom.js'; -import { AxoContextMenu } from '../../axo/AxoContextMenu.dom.js'; -import { getMuteValuesOptions } from '../../util/getMuteOptions.std.js'; +} from '../../util/countUnreadStats.std.ts'; +import { WidthBreakpoint } from '../_util.std.ts'; +import { AxoSelect } from '../../axo/AxoSelect.dom.tsx'; +import { AxoContextMenu } from '../../axo/AxoContextMenu.dom.tsx'; +import { getMuteValuesOptions } from '../../util/getMuteOptions.std.ts'; import type { AllChatFoldersMutedStats, MutedStats, -} from '../../util/countMutedStats.std.js'; -import type { AxoSymbol } from '../../axo/AxoSymbol.dom.js'; -import { UserText } from '../UserText.dom.js'; -import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.js'; +} from '../../util/countMutedStats.std.ts'; +import type { AxoSymbol } from '../../axo/AxoSymbol.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; +import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.ts'; export type LeftPaneChatFoldersProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/leftPane/LeftPaneChooseGroupMembersHelper.dom.tsx b/ts/components/leftPane/LeftPaneChooseGroupMembersHelper.dom.tsx index 35d08b3b73..6605669cd6 100644 --- a/ts/components/leftPane/LeftPaneChooseGroupMembersHelper.dom.tsx +++ b/ts/components/leftPane/LeftPaneChooseGroupMembersHelper.dom.tsx @@ -4,27 +4,27 @@ import type { ReactNode, ChangeEvent } from 'react'; import React from 'react'; -import { LeftPaneHelper } from './LeftPaneHelper.dom.js'; -import type { Row } from '../ConversationList.dom.js'; -import { RowType } from '../ConversationList.dom.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { ContactCheckboxDisabledReason } from '../conversationList/ContactCheckbox.dom.js'; -import { ContactPills } from '../ContactPills.dom.js'; -import { ContactPill } from '../ContactPill.dom.js'; -import { SearchInput } from '../SearchInput.dom.js'; +import { LeftPaneHelper } from './LeftPaneHelper.dom.tsx'; +import type { Row } from '../ConversationList.dom.tsx'; +import { RowType } from '../ConversationList.dom.tsx'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { ContactCheckboxDisabledReason } from '../conversationList/ContactCheckbox.dom.tsx'; +import { ContactPills } from '../ContactPills.dom.tsx'; +import { ContactPill } from '../ContactPill.dom.tsx'; +import { SearchInput } from '../SearchInput.dom.tsx'; import { AddGroupMemberErrorDialog, AddGroupMemberErrorDialogMode, -} from '../AddGroupMemberErrorDialog.dom.js'; -import { Button } from '../Button.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.js'; -import { parseAndFormatPhoneNumber } from '../../util/libphonenumberInstance.std.js'; -import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.js'; +} from '../AddGroupMemberErrorDialog.dom.tsx'; +import { Button } from '../Button.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.ts'; +import { parseAndFormatPhoneNumber } from '../../util/libphonenumberInstance.std.ts'; +import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.ts'; import { isFetchingByUsername, isFetchingByE164, -} from '../../util/uuidFetchState.std.js'; +} from '../../util/uuidFetchState.std.ts'; export type LeftPaneChooseGroupMembersPropsType = { uuidFetchState: UUIDFetchStateType; diff --git a/ts/components/leftPane/LeftPaneComposeHelper.dom.tsx b/ts/components/leftPane/LeftPaneComposeHelper.dom.tsx index a3a20cf5d6..0f23db564c 100644 --- a/ts/components/leftPane/LeftPaneComposeHelper.dom.tsx +++ b/ts/components/leftPane/LeftPaneComposeHelper.dom.tsx @@ -4,21 +4,21 @@ import type { ReactNode, ChangeEvent } from 'react'; import React from 'react'; -import { LeftPaneHelper } from './LeftPaneHelper.dom.js'; -import type { Row } from '../ConversationList.dom.js'; -import { RowType } from '../ConversationList.dom.js'; -import type { ContactListItemConversationType } from '../conversationList/ContactListItem.dom.js'; -import { SearchInput } from '../SearchInput.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.js'; -import { parseAndFormatPhoneNumber } from '../../util/libphonenumberInstance.std.js'; -import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.js'; +import { LeftPaneHelper } from './LeftPaneHelper.dom.tsx'; +import type { Row } from '../ConversationList.dom.tsx'; +import { RowType } from '../ConversationList.dom.tsx'; +import type { ContactListItemConversationType } from '../conversationList/ContactListItem.dom.tsx'; +import { SearchInput } from '../SearchInput.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.ts'; +import { parseAndFormatPhoneNumber } from '../../util/libphonenumberInstance.std.ts'; +import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.ts'; import { isFetchingByUsername, isFetchingByE164, -} from '../../util/uuidFetchState.std.js'; -import type { GroupListItemConversationType } from '../conversationList/GroupListItem.dom.js'; -import { isProbablyAUsername } from '../../util/Username.dom.js'; +} from '../../util/uuidFetchState.std.ts'; +import type { GroupListItemConversationType } from '../conversationList/GroupListItem.dom.tsx'; +import { isProbablyAUsername } from '../../util/Username.dom.ts'; export type LeftPaneComposePropsType = { composeContacts: ReadonlyArray; diff --git a/ts/components/leftPane/LeftPaneConversationListItemContextMenu.dom.tsx b/ts/components/leftPane/LeftPaneConversationListItemContextMenu.dom.tsx index 4eb395e7bc..ef298d90df 100644 --- a/ts/components/leftPane/LeftPaneConversationListItemContextMenu.dom.tsx +++ b/ts/components/leftPane/LeftPaneConversationListItemContextMenu.dom.tsx @@ -2,28 +2,28 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { FC, ReactNode } from 'react'; import React, { memo, useCallback, useMemo, useState } from 'react'; -import { AxoContextMenu } from '../../axo/AxoContextMenu.dom.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { isConversationUnread } from '../../util/isConversationUnread.std.js'; -import { drop } from '../../util/drop.std.js'; -import { DeleteMessagesConfirmationDialog } from '../DeleteMessagesConfirmationDialog.dom.js'; -import { getMuteOptions } from '../../util/getMuteOptions.std.js'; +import { AxoContextMenu } from '../../axo/AxoContextMenu.dom.tsx'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { isConversationUnread } from '../../util/isConversationUnread.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { DeleteMessagesConfirmationDialog } from '../DeleteMessagesConfirmationDialog.dom.tsx'; +import { getMuteOptions } from '../../util/getMuteOptions.std.ts'; import { CHAT_FOLDER_DEFAULTS, ChatFolderType, isConversationInChatFolder, -} from '../../types/ChatFolder.std.js'; +} from '../../types/ChatFolder.std.ts'; import type { ChatFolderParams, ChatFolder, ChatFolderId, -} from '../../types/ChatFolder.std.js'; -import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { UserText } from '../UserText.dom.js'; -import { isConversationMuted } from '../../util/isConversationMuted.std.js'; -import { isInternalFeaturesEnabled } from '../../util/isInternalFeaturesEnabled.dom.js'; +} from '../../types/ChatFolder.std.ts'; +import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { UserText } from '../UserText.dom.tsx'; +import { isConversationMuted } from '../../util/isConversationMuted.std.ts'; +import { isInternalFeaturesEnabled } from '../../util/isInternalFeaturesEnabled.dom.ts'; export type ChatFolderToggleChat = ( chatFolderId: ChatFolderId, diff --git a/ts/components/leftPane/LeftPaneFindByPhoneNumberHelper.dom.tsx b/ts/components/leftPane/LeftPaneFindByPhoneNumberHelper.dom.tsx index ef89f1c6bd..46d6cf2cdf 100644 --- a/ts/components/leftPane/LeftPaneFindByPhoneNumberHelper.dom.tsx +++ b/ts/components/leftPane/LeftPaneFindByPhoneNumberHelper.dom.tsx @@ -4,22 +4,22 @@ import type { ReactNode } from 'react'; import React from 'react'; -import { LeftPaneHelper } from './LeftPaneHelper.dom.js'; -import type { Row } from '../ConversationList.dom.js'; -import { RowType } from '../ConversationList.dom.js'; -import { SearchInput } from '../SearchInput.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { ShowConversationType } from '../../state/ducks/conversations.preload.js'; -import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.js'; -import { parseAndFormatPhoneNumber } from '../../util/libphonenumberInstance.std.js'; -import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.js'; -import type { CountryDataType } from '../../util/getCountryData.dom.js'; -import { isFetchingByE164 } from '../../util/uuidFetchState.std.js'; -import { drop } from '../../util/drop.std.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.js'; -import { Spinner } from '../Spinner.dom.js'; -import { Button } from '../Button.dom.js'; -import { CountryCodeSelect } from '../CountryCodeSelect.dom.js'; +import { LeftPaneHelper } from './LeftPaneHelper.dom.tsx'; +import type { Row } from '../ConversationList.dom.tsx'; +import { RowType } from '../ConversationList.dom.tsx'; +import { SearchInput } from '../SearchInput.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { ShowConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { ParsedE164Type } from '../../util/libphonenumberInstance.std.ts'; +import { parseAndFormatPhoneNumber } from '../../util/libphonenumberInstance.std.ts'; +import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.ts'; +import type { CountryDataType } from '../../util/getCountryData.dom.ts'; +import { isFetchingByE164 } from '../../util/uuidFetchState.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.ts'; +import { Spinner } from '../Spinner.dom.tsx'; +import { Button } from '../Button.dom.tsx'; +import { CountryCodeSelect } from '../CountryCodeSelect.dom.tsx'; export type LeftPaneFindByPhoneNumberPropsType = { searchTerm: string; diff --git a/ts/components/leftPane/LeftPaneFindByUsernameHelper.dom.tsx b/ts/components/leftPane/LeftPaneFindByUsernameHelper.dom.tsx index b2e9302d51..9f22ff82b6 100644 --- a/ts/components/leftPane/LeftPaneFindByUsernameHelper.dom.tsx +++ b/ts/components/leftPane/LeftPaneFindByUsernameHelper.dom.tsx @@ -4,18 +4,18 @@ import type { ReactNode } from 'react'; import React from 'react'; -import { LeftPaneHelper } from './LeftPaneHelper.dom.js'; -import type { Row } from '../ConversationList.dom.js'; -import { RowType } from '../ConversationList.dom.js'; -import { SearchInput } from '../SearchInput.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { ShowConversationType } from '../../state/ducks/conversations.preload.js'; -import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.js'; -import { isFetchingByUsername } from '../../util/uuidFetchState.std.js'; -import { drop } from '../../util/drop.std.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.js'; -import { Spinner } from '../Spinner.dom.js'; -import { Button } from '../Button.dom.js'; +import { LeftPaneHelper } from './LeftPaneHelper.dom.tsx'; +import type { Row } from '../ConversationList.dom.tsx'; +import { RowType } from '../ConversationList.dom.tsx'; +import { SearchInput } from '../SearchInput.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { ShowConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.ts'; +import { isFetchingByUsername } from '../../util/uuidFetchState.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.ts'; +import { Spinner } from '../Spinner.dom.tsx'; +import { Button } from '../Button.dom.tsx'; export type LeftPaneFindByUsernamePropsType = { searchTerm: string; diff --git a/ts/components/leftPane/LeftPaneHelper.dom.tsx b/ts/components/leftPane/LeftPaneHelper.dom.tsx index 759b6d7691..d432cfb40c 100644 --- a/ts/components/leftPane/LeftPaneHelper.dom.tsx +++ b/ts/components/leftPane/LeftPaneHelper.dom.tsx @@ -3,16 +3,16 @@ import type { ChangeEvent, ReactNode } from 'react'; -import type { Row } from '../ConversationList.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { Row } from '../ConversationList.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; import type { DeleteAvatarFromDiskActionType, ReplaceAvatarActionType, SaveAvatarToDiskActionType, -} from '../../types/Avatar.std.js'; -import type { DurationInSeconds } from '../../util/durations/index.std.js'; -import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.js'; -import type { ShowConversationType } from '../../state/ducks/conversations.preload.js'; +} from '../../types/Avatar.std.ts'; +import type { DurationInSeconds } from '../../util/durations/index.std.ts'; +import type { LookupConversationWithoutServiceIdActionsType } from '../../util/lookupConversationWithoutServiceId.preload.ts'; +import type { ShowConversationType } from '../../state/ducks/conversations.preload.ts'; export enum FindDirection { Up, diff --git a/ts/components/leftPane/LeftPaneInboxHelper.dom.tsx b/ts/components/leftPane/LeftPaneInboxHelper.dom.tsx index 70771353d9..4092f62e80 100644 --- a/ts/components/leftPane/LeftPaneInboxHelper.dom.tsx +++ b/ts/components/leftPane/LeftPaneInboxHelper.dom.tsx @@ -5,24 +5,24 @@ import lodash from 'lodash'; import type { ReactNode } from 'react'; import React from 'react'; -import type { ToFindType } from './LeftPaneHelper.dom.js'; +import type { ToFindType } from './LeftPaneHelper.dom.tsx'; import type { ConversationType, ShowConversationType, -} from '../../state/ducks/conversations.preload.js'; -import { LeftPaneHelper } from './LeftPaneHelper.dom.js'; -import { getConversationInDirection } from './getConversationInDirection.dom.js'; -import type { Row } from '../ConversationList.dom.js'; -import { RowType } from '../ConversationList.dom.js'; -import type { PropsData as ConversationListItemPropsType } from '../conversationList/ConversationListItem.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { handleKeydownForSearch } from './handleKeydownForSearch.dom.js'; -import { LeftPaneSearchInput } from '../LeftPaneSearchInput.dom.js'; -import type { ChatFolder } from '../../types/ChatFolder.std.js'; -import { ChatFolderType } from '../../types/ChatFolder.std.js'; -import { AxoButton } from '../../axo/AxoButton.dom.js'; -import { NavTab, SettingsPage, type Location } from '../../types/Nav.std.js'; -import { tw } from '../../axo/tw.dom.js'; +} from '../../state/ducks/conversations.preload.ts'; +import { LeftPaneHelper } from './LeftPaneHelper.dom.tsx'; +import { getConversationInDirection } from './getConversationInDirection.dom.ts'; +import type { Row } from '../ConversationList.dom.tsx'; +import { RowType } from '../ConversationList.dom.tsx'; +import type { PropsData as ConversationListItemPropsType } from '../conversationList/ConversationListItem.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { handleKeydownForSearch } from './handleKeydownForSearch.dom.ts'; +import { LeftPaneSearchInput } from '../LeftPaneSearchInput.dom.tsx'; +import type { ChatFolder } from '../../types/ChatFolder.std.ts'; +import { ChatFolderType } from '../../types/ChatFolder.std.ts'; +import { AxoButton } from '../../axo/AxoButton.dom.tsx'; +import { NavTab, SettingsPage, type Location } from '../../types/Nav.std.ts'; +import { tw } from '../../axo/tw.dom.tsx'; const { last } = lodash; diff --git a/ts/components/leftPane/LeftPaneSearchHelper.dom.tsx b/ts/components/leftPane/LeftPaneSearchHelper.dom.tsx index bf9ec6d1f4..152a1c2b16 100644 --- a/ts/components/leftPane/LeftPaneSearchHelper.dom.tsx +++ b/ts/components/leftPane/LeftPaneSearchHelper.dom.tsx @@ -4,22 +4,22 @@ import type { ReactNode } from 'react'; import React from 'react'; -import type { ToFindType } from './LeftPaneHelper.dom.js'; -import { LeftPaneHelper } from './LeftPaneHelper.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { Row } from '../ConversationList.dom.js'; -import { RowType } from '../ConversationList.dom.js'; -import type { PropsData as ConversationListItemPropsType } from '../conversationList/ConversationListItem.dom.js'; -import { handleKeydownForSearch } from './handleKeydownForSearch.dom.js'; +import type { ToFindType } from './LeftPaneHelper.dom.tsx'; +import { LeftPaneHelper } from './LeftPaneHelper.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { Row } from '../ConversationList.dom.tsx'; +import { RowType } from '../ConversationList.dom.tsx'; +import type { PropsData as ConversationListItemPropsType } from '../conversationList/ConversationListItem.dom.tsx'; +import { handleKeydownForSearch } from './handleKeydownForSearch.dom.ts'; import type { ConversationType, ShowConversationType, -} from '../../state/ducks/conversations.preload.js'; -import { LeftPaneSearchInput } from '../LeftPaneSearchInput.dom.js'; +} from '../../state/ducks/conversations.preload.ts'; +import { LeftPaneSearchInput } from '../LeftPaneSearchInput.dom.tsx'; -import { I18n } from '../I18n.dom.js'; -import { assertDev, strictAssert } from '../../util/assert.std.js'; -import { UserText } from '../UserText.dom.js'; +import { I18n } from '../I18n.dom.tsx'; +import { assertDev, strictAssert } from '../../util/assert.std.ts'; +import { UserText } from '../UserText.dom.tsx'; // The "correct" thing to do is to measure the size of the left pane and render enough // search results for the container height. But (1) that's slow (2) the list is diff --git a/ts/components/leftPane/LeftPaneSetGroupMetadataHelper.dom.tsx b/ts/components/leftPane/LeftPaneSetGroupMetadataHelper.dom.tsx index 384f0be05d..7e4e4f0f24 100644 --- a/ts/components/leftPane/LeftPaneSetGroupMetadataHelper.dom.tsx +++ b/ts/components/leftPane/LeftPaneSetGroupMetadataHelper.dom.tsx @@ -4,27 +4,27 @@ import type { ReactNode } from 'react'; import React from 'react'; -import { LeftPaneHelper } from './LeftPaneHelper.dom.js'; -import type { Row } from '../ConversationList.dom.js'; -import { RowType } from '../ConversationList.dom.js'; -import type { ContactListItemConversationType } from '../conversationList/ContactListItem.dom.js'; -import { DisappearingTimerSelect } from '../DisappearingTimerSelect.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { DurationInSeconds } from '../../util/durations/index.std.js'; -import { Alert } from '../Alert.dom.js'; -import { AvatarEditor } from '../AvatarEditor.dom.js'; -import { AvatarPreview } from '../AvatarPreview.dom.js'; -import { Spinner } from '../Spinner.dom.js'; -import { Button } from '../Button.dom.js'; -import { Modal } from '../Modal.dom.js'; -import { GroupTitleInput } from '../GroupTitleInput.dom.js'; +import { LeftPaneHelper } from './LeftPaneHelper.dom.tsx'; +import type { Row } from '../ConversationList.dom.tsx'; +import { RowType } from '../ConversationList.dom.tsx'; +import type { ContactListItemConversationType } from '../conversationList/ContactListItem.dom.tsx'; +import { DisappearingTimerSelect } from '../DisappearingTimerSelect.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { DurationInSeconds } from '../../util/durations/index.std.ts'; +import { Alert } from '../Alert.dom.tsx'; +import { AvatarEditor } from '../AvatarEditor.dom.tsx'; +import { AvatarPreview } from '../AvatarPreview.dom.tsx'; +import { Spinner } from '../Spinner.dom.tsx'; +import { Button } from '../Button.dom.tsx'; +import { Modal } from '../Modal.dom.tsx'; +import { GroupTitleInput } from '../GroupTitleInput.dom.tsx'; import type { AvatarDataType, DeleteAvatarFromDiskActionType, ReplaceAvatarActionType, SaveAvatarToDiskActionType, -} from '../../types/Avatar.std.js'; -import { AvatarColors } from '../../types/Colors.std.js'; +} from '../../types/Avatar.std.ts'; +import { AvatarColors } from '../../types/Colors.std.ts'; export type LeftPaneSetGroupMetadataPropsType = { groupAvatar: undefined | Uint8Array; diff --git a/ts/components/leftPane/getConversationInDirection.dom.ts b/ts/components/leftPane/getConversationInDirection.dom.ts index 6bfa09e4d0..7c4a987d2c 100644 --- a/ts/components/leftPane/getConversationInDirection.dom.ts +++ b/ts/components/leftPane/getConversationInDirection.dom.ts @@ -3,10 +3,10 @@ import lodash from 'lodash'; -import type { PropsData as ConversationListItemPropsType } from '../conversationList/ConversationListItem.dom.js'; -import { isConversationUnread } from '../../util/isConversationUnread.std.js'; -import type { ToFindType } from './LeftPaneHelper.dom.js'; -import { FindDirection } from './LeftPaneHelper.dom.js'; +import type { PropsData as ConversationListItemPropsType } from '../conversationList/ConversationListItem.dom.tsx'; +import { isConversationUnread } from '../../util/isConversationUnread.std.ts'; +import type { ToFindType } from './LeftPaneHelper.dom.tsx'; +import { FindDirection } from './LeftPaneHelper.dom.tsx'; const { find: findFirst, findLast, first, last } = lodash; diff --git a/ts/components/leftPane/handleKeydownForSearch.dom.ts b/ts/components/leftPane/handleKeydownForSearch.dom.ts index d30b807736..63902016b5 100644 --- a/ts/components/leftPane/handleKeydownForSearch.dom.ts +++ b/ts/components/leftPane/handleKeydownForSearch.dom.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as KeyboardLayout from '../../services/keyboardLayout.dom.js'; +import * as KeyboardLayout from '../../services/keyboardLayout.dom.ts'; export function handleKeydownForSearch( event: Readonly, diff --git a/ts/components/preferences/PreferencesSelectChatsDialog.dom.tsx b/ts/components/preferences/PreferencesSelectChatsDialog.dom.tsx index 6f1d26cb51..930f350e2f 100644 --- a/ts/components/preferences/PreferencesSelectChatsDialog.dom.tsx +++ b/ts/components/preferences/PreferencesSelectChatsDialog.dom.tsx @@ -3,29 +3,29 @@ import type { ChangeEvent } from 'react'; import React, { useCallback, useMemo, useState } from 'react'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import type { ThemeType } from '../../types/Util.std.js'; -import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.js'; -import { ContactPills } from '../ContactPills.dom.js'; -import { ContactPill } from '../ContactPill.dom.js'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import type { ThemeType } from '../../types/Util.std.ts'; +import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.ts'; +import { ContactPills } from '../ContactPills.dom.tsx'; +import { ContactPill } from '../ContactPill.dom.tsx'; import { asyncShouldNeverBeCalled, shouldNeverBeCalled, -} from '../../util/shouldNeverBeCalled.std.js'; -import { SearchInput } from '../SearchInput.dom.js'; -import { Button, ButtonVariant } from '../Button.dom.js'; -import { Modal } from '../Modal.dom.js'; -import type { Row } from '../ConversationList.dom.js'; +} from '../../util/shouldNeverBeCalled.std.ts'; +import { SearchInput } from '../SearchInput.dom.tsx'; +import { Button, ButtonVariant } from '../Button.dom.tsx'; +import { Modal } from '../Modal.dom.tsx'; +import type { Row } from '../ConversationList.dom.tsx'; import { ConversationList, GenericCheckboxRowIcon, RowType, -} from '../ConversationList.dom.js'; -import type { GetConversationByIdType } from '../../state/selectors/conversations.dom.js'; -import { SizeObserver } from '../../hooks/useSizeObserver.dom.js'; -import { tw } from '../../axo/tw.dom.js'; +} from '../ConversationList.dom.tsx'; +import type { GetConversationByIdType } from '../../state/selectors/conversations.dom.ts'; +import { SizeObserver } from '../../hooks/useSizeObserver.dom.tsx'; +import { tw } from '../../axo/tw.dom.tsx'; export type ChatFolderSelection = Readonly<{ selectedRecipientIds: ReadonlyArray; diff --git a/ts/components/preferences/chatFolders/DeleteChatFolderDialog.dom.tsx b/ts/components/preferences/chatFolders/DeleteChatFolderDialog.dom.tsx index f9b89f290d..798f6f26fb 100644 --- a/ts/components/preferences/chatFolders/DeleteChatFolderDialog.dom.tsx +++ b/ts/components/preferences/chatFolders/DeleteChatFolderDialog.dom.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReactNode } from 'react'; import React from 'react'; -import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.js'; +import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.tsx'; export function DeleteChatFolderDialog(props: { title: string; diff --git a/ts/components/preferences/chatFolders/PreferencesChatFolderItems.dom.tsx b/ts/components/preferences/chatFolders/PreferencesChatFolderItems.dom.tsx index d1999a3b0c..c7061b7f13 100644 --- a/ts/components/preferences/chatFolders/PreferencesChatFolderItems.dom.tsx +++ b/ts/components/preferences/chatFolders/PreferencesChatFolderItems.dom.tsx @@ -4,10 +4,10 @@ import classNames from 'classnames'; import React, { forwardRef } from 'react'; import type { ForwardedRef, HTMLAttributes, ReactNode } from 'react'; -import { tw } from '../../../axo/tw.dom.js'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { AxoSymbol } from '../../../axo/AxoSymbol.dom.js'; -import type { ChatFolderPresetId } from './PreferencesChatFoldersPage.dom.js'; +import { tw } from '../../../axo/tw.dom.tsx'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { AxoSymbol } from '../../../axo/AxoSymbol.dom.tsx'; +import type { ChatFolderPresetId } from './PreferencesChatFoldersPage.dom.tsx'; export const itemClassName = classNames( tw('group'), diff --git a/ts/components/preferences/chatFolders/PreferencesChatFoldersPage.dom.tsx b/ts/components/preferences/chatFolders/PreferencesChatFoldersPage.dom.tsx index 46d4ae7127..1890d2a4b8 100644 --- a/ts/components/preferences/chatFolders/PreferencesChatFoldersPage.dom.tsx +++ b/ts/components/preferences/chatFolders/PreferencesChatFoldersPage.dom.tsx @@ -6,30 +6,30 @@ import type { MutableRefObject, ReactNode } from 'react'; import { ListBox, ListBoxItem, useDragAndDrop } from 'react-aria-components'; import { isEqual, partition } from 'lodash'; import classNames from 'classnames'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { PreferencesContent } from '../../Preferences.dom.js'; -import { SettingsRow } from '../../PreferencesUtil.dom.js'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { PreferencesContent } from '../../Preferences.dom.tsx'; +import { SettingsRow } from '../../PreferencesUtil.dom.tsx'; import { CHAT_FOLDER_PRESETS, matchesChatFolderPreset, ChatFolderType, -} from '../../../types/ChatFolder.std.js'; +} from '../../../types/ChatFolder.std.ts'; import type { ChatFolderId, ChatFolderParams, ChatFolderPreset, ChatFolder, -} from '../../../types/ChatFolder.std.js'; -import { AxoContextMenu } from '../../../axo/AxoContextMenu.dom.js'; -import { DeleteChatFolderDialog } from './DeleteChatFolderDialog.dom.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { tw } from '../../../axo/tw.dom.js'; -import { UserText } from '../../UserText.dom.js'; -import { I18n } from '../../I18n.dom.js'; -import { NavTab, SettingsPage, type Location } from '../../../types/Nav.std.js'; -import { AxoButton } from '../../../axo/AxoButton.dom.js'; -import type { CurrentChatFolder } from '../../../types/CurrentChatFolders.std.js'; -import { CurrentChatFolders } from '../../../types/CurrentChatFolders.std.js'; +} from '../../../types/ChatFolder.std.ts'; +import { AxoContextMenu } from '../../../axo/AxoContextMenu.dom.tsx'; +import { DeleteChatFolderDialog } from './DeleteChatFolderDialog.dom.tsx'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { tw } from '../../../axo/tw.dom.tsx'; +import { UserText } from '../../UserText.dom.tsx'; +import { I18n } from '../../I18n.dom.tsx'; +import { NavTab, SettingsPage, type Location } from '../../../types/Nav.std.ts'; +import { AxoButton } from '../../../axo/AxoButton.dom.tsx'; +import type { CurrentChatFolder } from '../../../types/CurrentChatFolders.std.ts'; +import { CurrentChatFolders } from '../../../types/CurrentChatFolders.std.ts'; import { ItemAvatar, ItemBody, @@ -41,8 +41,8 @@ import { ItemDragHandle, itemListItemClassName, ItemTitle, -} from './PreferencesChatFolderItems.dom.js'; -import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.js'; +} from './PreferencesChatFolderItems.dom.tsx'; +import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.tsx'; function moveChatFolders( chatFolders: ReadonlyArray, diff --git a/ts/components/preferences/chatFolders/PreferencesEditChatFoldersPage.dom.tsx b/ts/components/preferences/chatFolders/PreferencesEditChatFoldersPage.dom.tsx index bd1f7d4925..2db263f050 100644 --- a/ts/components/preferences/chatFolders/PreferencesEditChatFoldersPage.dom.tsx +++ b/ts/components/preferences/chatFolders/PreferencesEditChatFoldersPage.dom.tsx @@ -3,41 +3,41 @@ import type { MutableRefObject } from 'react'; import React, { useCallback, useMemo, useRef, useState } from 'react'; import classNames from 'classnames'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.js'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import type { ThemeType } from '../../../types/Util.std.js'; -import { Input } from '../../Input.dom.js'; -import { ConfirmationDialog } from '../../ConfirmationDialog.dom.js'; -import type { ChatFolderSelection } from '../PreferencesSelectChatsDialog.dom.js'; -import { SettingsControl, SettingsRow } from '../../PreferencesUtil.dom.js'; -import { PreferencesSelectChatsDialog } from '../PreferencesSelectChatsDialog.dom.js'; -import { Avatar, AvatarSize } from '../../Avatar.dom.js'; -import { PreferencesContent } from '../../Preferences.dom.js'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import type { PreferredBadgeSelectorType } from '../../../state/selectors/badges.preload.ts'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import type { ThemeType } from '../../../types/Util.std.ts'; +import { Input } from '../../Input.dom.tsx'; +import { ConfirmationDialog } from '../../ConfirmationDialog.dom.tsx'; +import type { ChatFolderSelection } from '../PreferencesSelectChatsDialog.dom.tsx'; +import { SettingsControl, SettingsRow } from '../../PreferencesUtil.dom.tsx'; +import { PreferencesSelectChatsDialog } from '../PreferencesSelectChatsDialog.dom.tsx'; +import { Avatar, AvatarSize } from '../../Avatar.dom.tsx'; +import { PreferencesContent } from '../../Preferences.dom.tsx'; import { CHAT_FOLDER_NAME_MAX_CHAR_LENGTH, ChatFolderParamsSchema, isSameChatFolderParams, validateChatFolderParams, -} from '../../../types/ChatFolder.std.js'; +} from '../../../types/ChatFolder.std.ts'; import type { ChatFolderId, ChatFolderParams, -} from '../../../types/ChatFolder.std.js'; -import type { GetConversationByIdType } from '../../../state/selectors/conversations.dom.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { parseStrict } from '../../../util/schemas.std.js'; -import { BeforeNavigateResponse } from '../../../services/BeforeNavigate.std.js'; -import { NavTab, SettingsPage } from '../../../types/Nav.std.js'; -import type { Location } from '../../../types/Nav.std.js'; -import { useNavBlocker } from '../../../hooks/useNavBlocker.std.js'; -import { DeleteChatFolderDialog } from './DeleteChatFolderDialog.dom.js'; -import { UserText } from '../../UserText.dom.js'; -import { AxoSwitch } from '../../../axo/AxoSwitch.dom.js'; -import { FunEmojiPickerButton } from '../../fun/FunButton.dom.js'; -import { FunEmojiPicker } from '../../fun/FunEmojiPicker.dom.js'; -import type { FunEmojiSelection } from '../../fun/panels/FunPanelEmojis.dom.js'; -import { getEmojiVariantByKey } from '../../fun/data/emojis.std.js'; +} from '../../../types/ChatFolder.std.ts'; +import type { GetConversationByIdType } from '../../../state/selectors/conversations.dom.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { parseStrict } from '../../../util/schemas.std.ts'; +import { BeforeNavigateResponse } from '../../../services/BeforeNavigate.std.ts'; +import { NavTab, SettingsPage } from '../../../types/Nav.std.ts'; +import type { Location } from '../../../types/Nav.std.ts'; +import { useNavBlocker } from '../../../hooks/useNavBlocker.std.ts'; +import { DeleteChatFolderDialog } from './DeleteChatFolderDialog.dom.tsx'; +import { UserText } from '../../UserText.dom.tsx'; +import { AxoSwitch } from '../../../axo/AxoSwitch.dom.tsx'; +import { FunEmojiPickerButton } from '../../fun/FunButton.dom.tsx'; +import { FunEmojiPicker } from '../../fun/FunEmojiPicker.dom.tsx'; +import type { FunEmojiSelection } from '../../fun/panels/FunPanelEmojis.dom.tsx'; +import { getEmojiVariantByKey } from '../../fun/data/emojis.std.ts'; import { ItemAvatar, ItemBody, @@ -45,9 +45,9 @@ import { itemClassName, ItemContent, ItemTitle, -} from './PreferencesChatFolderItems.dom.js'; -import { AxoButton } from '../../../axo/AxoButton.dom.js'; -import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.js'; +} from './PreferencesChatFolderItems.dom.tsx'; +import { AxoButton } from '../../../axo/AxoButton.dom.tsx'; +import { AxoAlertDialog } from '../../../axo/AxoAlertDialog.dom.tsx'; export type PreferencesEditChatFolderPageProps = Readonly<{ i18n: LocalizerType; diff --git a/ts/components/preferences/donations/DonateInputAmount.dom.tsx b/ts/components/preferences/donations/DonateInputAmount.dom.tsx index 9c404ffe78..b2bfdd65e5 100644 --- a/ts/components/preferences/donations/DonateInputAmount.dom.tsx +++ b/ts/components/preferences/donations/DonateInputAmount.dom.tsx @@ -3,12 +3,12 @@ import type { FormEvent } from 'react'; import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react'; import type { Formatter, FormatterToken } from '@signalapp/minimask'; -import { useInputMask } from '../../../hooks/useInputMask.dom.js'; -import type { CurrencyFormatResult } from '../../../util/currency.dom.js'; +import { useInputMask } from '../../../hooks/useInputMask.dom.tsx'; +import type { CurrencyFormatResult } from '../../../util/currency.dom.ts'; import { getCurrencyFormat, ZERO_DECIMAL_CURRENCIES, -} from '../../../util/currency.dom.js'; +} from '../../../util/currency.dom.ts'; export type DonateInputAmountProps = Readonly<{ className: string; diff --git a/ts/components/preferences/donations/DonateInputCardCvc.dom.stories.tsx b/ts/components/preferences/donations/DonateInputCardCvc.dom.stories.tsx index 5e68065295..689f4dbd69 100644 --- a/ts/components/preferences/donations/DonateInputCardCvc.dom.stories.tsx +++ b/ts/components/preferences/donations/DonateInputCardCvc.dom.stories.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { action } from '@storybook/addon-actions'; import React, { useState } from 'react'; -import { DonateInputCardCvc } from './DonateInputCardCvc.dom.js'; -import type { DonateInputCardCvcProps } from './DonateInputCardCvc.dom.js'; -import type { ComponentMeta } from '../../../storybook/types.std.js'; +import { DonateInputCardCvc } from './DonateInputCardCvc.dom.tsx'; +import type { DonateInputCardCvcProps } from './DonateInputCardCvc.dom.tsx'; +import type { ComponentMeta } from '../../../storybook/types.std.ts'; export default { component: DonateInputCardCvc, diff --git a/ts/components/preferences/donations/DonateInputCardCvc.dom.tsx b/ts/components/preferences/donations/DonateInputCardCvc.dom.tsx index b28caffc17..2085ed2bb7 100644 --- a/ts/components/preferences/donations/DonateInputCardCvc.dom.tsx +++ b/ts/components/preferences/donations/DonateInputCardCvc.dom.tsx @@ -5,10 +5,10 @@ import React, { memo, useCallback, useRef } from 'react'; import { CC_CVC_FORMATTER, useInputMask, -} from '../../../hooks/useInputMask.dom.js'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { CardCvcError } from '../../../types/DonationsCardForm.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; +} from '../../../hooks/useInputMask.dom.tsx'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { CardCvcError } from '../../../types/DonationsCardForm.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; export function getCardCvcErrorMessage( i18n: LocalizerType, diff --git a/ts/components/preferences/donations/DonateInputCardExp.dom.stories.tsx b/ts/components/preferences/donations/DonateInputCardExp.dom.stories.tsx index 72e6220720..06f43bc52f 100644 --- a/ts/components/preferences/donations/DonateInputCardExp.dom.stories.tsx +++ b/ts/components/preferences/donations/DonateInputCardExp.dom.stories.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { action } from '@storybook/addon-actions'; import React, { useState } from 'react'; -import { DonateInputCardExp } from './DonateInputCardExp.dom.js'; -import type { DonateInputCardExpProps } from './DonateInputCardExp.dom.js'; -import type { ComponentMeta } from '../../../storybook/types.std.js'; +import { DonateInputCardExp } from './DonateInputCardExp.dom.tsx'; +import type { DonateInputCardExpProps } from './DonateInputCardExp.dom.tsx'; +import type { ComponentMeta } from '../../../storybook/types.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/preferences/donations/DonateInputCardExp.dom.tsx b/ts/components/preferences/donations/DonateInputCardExp.dom.tsx index 160a4a86f3..8520787fab 100644 --- a/ts/components/preferences/donations/DonateInputCardExp.dom.tsx +++ b/ts/components/preferences/donations/DonateInputCardExp.dom.tsx @@ -5,10 +5,10 @@ import React, { memo, useCallback, useRef } from 'react'; import { CC_EXP_FORMATTER, useInputMask, -} from '../../../hooks/useInputMask.dom.js'; -import { CardExpirationError } from '../../../types/DonationsCardForm.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import type { LocalizerType } from '../../../types/I18N.std.js'; +} from '../../../hooks/useInputMask.dom.tsx'; +import { CardExpirationError } from '../../../types/DonationsCardForm.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; export function getCardExpirationErrorMessage( i18n: LocalizerType, diff --git a/ts/components/preferences/donations/DonateInputCardNumber.dom.stories.tsx b/ts/components/preferences/donations/DonateInputCardNumber.dom.stories.tsx index 7e53a12231..f48d44c587 100644 --- a/ts/components/preferences/donations/DonateInputCardNumber.dom.stories.tsx +++ b/ts/components/preferences/donations/DonateInputCardNumber.dom.stories.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { action } from '@storybook/addon-actions'; import React, { useState } from 'react'; -import { DonateInputCardNumber } from './DonateInputCardNumber.dom.js'; -import type { DonateInputCardNumberProps } from './DonateInputCardNumber.dom.js'; -import type { ComponentMeta } from '../../../storybook/types.std.js'; +import { DonateInputCardNumber } from './DonateInputCardNumber.dom.tsx'; +import type { DonateInputCardNumberProps } from './DonateInputCardNumber.dom.tsx'; +import type { ComponentMeta } from '../../../storybook/types.std.ts'; export default { component: DonateInputCardNumber, diff --git a/ts/components/preferences/donations/DonateInputCardNumber.dom.tsx b/ts/components/preferences/donations/DonateInputCardNumber.dom.tsx index 553b7affec..1cb30b6359 100644 --- a/ts/components/preferences/donations/DonateInputCardNumber.dom.tsx +++ b/ts/components/preferences/donations/DonateInputCardNumber.dom.tsx @@ -5,10 +5,10 @@ import React, { memo, useCallback, useRef } from 'react'; import { CC_NUMBER_FORMATTER, useInputMask, -} from '../../../hooks/useInputMask.dom.js'; -import type { LocalizerType } from '../../../types/I18N.std.js'; -import { CardNumberError } from '../../../types/DonationsCardForm.std.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; +} from '../../../hooks/useInputMask.dom.tsx'; +import type { LocalizerType } from '../../../types/I18N.std.ts'; +import { CardNumberError } from '../../../types/DonationsCardForm.std.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; export function getCardNumberErrorMessage( i18n: LocalizerType, diff --git a/ts/components/stickers/StickerManager.dom.stories.tsx b/ts/components/stickers/StickerManager.dom.stories.tsx index 770618f507..0f242d75b7 100644 --- a/ts/components/stickers/StickerManager.dom.stories.tsx +++ b/ts/components/stickers/StickerManager.dom.stories.tsx @@ -4,9 +4,9 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './StickerManager.dom.js'; -import { StickerManager } from './StickerManager.dom.js'; -import { createPack, sticker1, sticker2 } from './mocks.std.js'; +import type { Props } from './StickerManager.dom.tsx'; +import { StickerManager } from './StickerManager.dom.tsx'; +import { createPack, sticker1, sticker2 } from './mocks.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/stickers/StickerManager.dom.tsx b/ts/components/stickers/StickerManager.dom.tsx index 3b6a4fed66..0d9a1f8289 100644 --- a/ts/components/stickers/StickerManager.dom.tsx +++ b/ts/components/stickers/StickerManager.dom.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import { StickerManagerPackRow } from './StickerManagerPackRow.dom.js'; -import { StickerPreviewModal } from './StickerPreviewModal.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { StickerPackType } from '../../state/ducks/stickers.preload.js'; -import { Tabs } from '../Tabs.dom.js'; +import { StickerManagerPackRow } from './StickerManagerPackRow.dom.tsx'; +import { StickerPreviewModal } from './StickerPreviewModal.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { StickerPackType } from '../../state/ducks/stickers.preload.ts'; +import { Tabs } from '../Tabs.dom.tsx'; export type OwnProps = { readonly blessedPacks: ReadonlyArray; diff --git a/ts/components/stickers/StickerManagerPackRow.dom.tsx b/ts/components/stickers/StickerManagerPackRow.dom.tsx index d17cb5c23f..7f9596250e 100644 --- a/ts/components/stickers/StickerManagerPackRow.dom.tsx +++ b/ts/components/stickers/StickerManagerPackRow.dom.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { StickerPackType } from '../../state/ducks/stickers.preload.js'; -import { Button, ButtonVariant } from '../Button.dom.js'; -import { UserText } from '../UserText.dom.js'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { StickerPackType } from '../../state/ducks/stickers.preload.ts'; +import { Button, ButtonVariant } from '../Button.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; export type OwnProps = { readonly i18n: LocalizerType; diff --git a/ts/components/stickers/StickerPackInstallButton.dom.tsx b/ts/components/stickers/StickerPackInstallButton.dom.tsx index 5e7b709821..be6f1769b1 100644 --- a/ts/components/stickers/StickerPackInstallButton.dom.tsx +++ b/ts/components/stickers/StickerPackInstallButton.dom.tsx @@ -4,7 +4,7 @@ import type { ButtonHTMLAttributes } from 'react'; import * as React from 'react'; import classNames from 'classnames'; -import type { LocalizerType } from '../../types/Util.std.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; export type OwnProps = { readonly installed: boolean; diff --git a/ts/components/stickers/StickerPreviewModal.dom.stories.tsx b/ts/components/stickers/StickerPreviewModal.dom.stories.tsx index ab123ea53c..6498e1eb88 100644 --- a/ts/components/stickers/StickerPreviewModal.dom.stories.tsx +++ b/ts/components/stickers/StickerPreviewModal.dom.stories.tsx @@ -4,13 +4,13 @@ import * as React from 'react'; import { action } from '@storybook/addon-actions'; import type { Meta } from '@storybook/react'; -import type { Props } from './StickerPreviewModal.dom.js'; -import { StickerPreviewModal } from './StickerPreviewModal.dom.js'; +import type { Props } from './StickerPreviewModal.dom.tsx'; +import { StickerPreviewModal } from './StickerPreviewModal.dom.tsx'; import { landscapeGreenUrl, portraitTealUrl, squareStickerUrl, -} from '../../storybook/Fixtures.std.js'; +} from '../../storybook/Fixtures.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/components/stickers/StickerPreviewModal.dom.tsx b/ts/components/stickers/StickerPreviewModal.dom.tsx index ce05ba2c8b..c8ba1ad7b2 100644 --- a/ts/components/stickers/StickerPreviewModal.dom.tsx +++ b/ts/components/stickers/StickerPreviewModal.dom.tsx @@ -4,14 +4,14 @@ import * as React from 'react'; import lodash from 'lodash'; import classNames from 'classnames'; -import { ConfirmationDialog } from '../ConfirmationDialog.dom.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { StickerPackType } from '../../state/ducks/stickers.preload.js'; -import { Spinner } from '../Spinner.dom.js'; -import { useRestoreFocus } from '../../hooks/useRestoreFocus.dom.js'; -import { Modal } from '../Modal.dom.js'; -import { Button, ButtonVariant } from '../Button.dom.js'; -import { UserText } from '../UserText.dom.js'; +import { ConfirmationDialog } from '../ConfirmationDialog.dom.tsx'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { StickerPackType } from '../../state/ducks/stickers.preload.ts'; +import { Spinner } from '../Spinner.dom.tsx'; +import { useRestoreFocus } from '../../hooks/useRestoreFocus.dom.ts'; +import { Modal } from '../Modal.dom.tsx'; +import { Button, ButtonVariant } from '../Button.dom.tsx'; +import { UserText } from '../UserText.dom.tsx'; const { isNumber, range } = lodash; diff --git a/ts/components/stickers/mocks.std.ts b/ts/components/stickers/mocks.std.ts index 9e538744a0..2a95eeeac1 100644 --- a/ts/components/stickers/mocks.std.ts +++ b/ts/components/stickers/mocks.std.ts @@ -5,7 +5,7 @@ import lodash from 'lodash'; import type { StickerPackType, StickerType, -} from '../../state/ducks/stickers.preload.js'; +} from '../../state/ducks/stickers.preload.ts'; const { sample } = lodash; diff --git a/ts/context/Crypto.node.ts b/ts/context/Crypto.node.ts index 0494a51d6b..abe65706e5 100644 --- a/ts/context/Crypto.node.ts +++ b/ts/context/Crypto.node.ts @@ -5,9 +5,9 @@ import { Buffer } from 'node:buffer'; import type { Decipheriv } from 'node:crypto'; import crypto from 'node:crypto'; -import { strictAssert } from '../util/assert.std.js'; -import type { HashType } from '../types/Crypto.std.js'; -import { CipherType } from '../types/Crypto.std.js'; +import { strictAssert } from '../util/assert.std.ts'; +import type { HashType } from '../types/Crypto.std.ts'; +import { CipherType } from '../types/Crypto.std.ts'; const AUTH_TAG_SIZE = 16; diff --git a/ts/context/activeWindowService.preload.ts b/ts/context/activeWindowService.preload.ts index e788ade216..e3ea783f9a 100644 --- a/ts/context/activeWindowService.preload.ts +++ b/ts/context/activeWindowService.preload.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { ipcRenderer } from 'electron'; -import { getActiveWindowService } from '../services/ActiveWindowService.std.js'; +import { getActiveWindowService } from '../services/ActiveWindowService.std.ts'; const activeWindowService = getActiveWindowService( window.document, diff --git a/ts/context/config.preload.ts b/ts/context/config.preload.ts index 90a37f18bb..f5456a0b4f 100644 --- a/ts/context/config.preload.ts +++ b/ts/context/config.preload.ts @@ -3,7 +3,7 @@ import { ipcRenderer } from 'electron'; -import type { RendererConfigType } from '../types/RendererConfig.std.js'; +import type { RendererConfigType } from '../types/RendererConfig.std.ts'; const config: RendererConfigType = ipcRenderer.sendSync('get-config'); diff --git a/ts/context/createNativeThemeListener.std.ts b/ts/context/createNativeThemeListener.std.ts index 869b472925..3df0821ef8 100644 --- a/ts/context/createNativeThemeListener.std.ts +++ b/ts/context/createNativeThemeListener.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { NativeThemeState } from '../types/NativeThemeNotifier.d.ts'; -import { SystemThemeType } from '../types/Util.std.js'; +import { SystemThemeType } from '../types/Util.std.ts'; export type Callback = (change: NativeThemeState) => void; diff --git a/ts/context/environment.preload.ts b/ts/context/environment.preload.ts index d67632fc4e..6783630f9a 100644 --- a/ts/context/environment.preload.ts +++ b/ts/context/environment.preload.ts @@ -1,12 +1,12 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { config } from './config.preload.js'; +import { config } from './config.preload.ts'; import { getEnvironment, parseEnvironment, setEnvironment, -} from '../environment.std.js'; +} from '../environment.std.ts'; setEnvironment( parseEnvironment(config.environment), diff --git a/ts/context/i18n.preload.ts b/ts/context/i18n.preload.ts index 6d50f19ef6..e654e81a48 100644 --- a/ts/context/i18n.preload.ts +++ b/ts/context/i18n.preload.ts @@ -1,10 +1,10 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { config } from './config.preload.js'; -import { localeMessages } from './localeMessages.preload.js'; -import { setupI18n } from '../util/setupI18n.dom.js'; -import { strictAssert } from '../util/assert.std.js'; +import { config } from './config.preload.ts'; +import { localeMessages } from './localeMessages.preload.ts'; +import { setupI18n } from '../util/setupI18n.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; const { resolvedTranslationsLocale } = config; strictAssert( diff --git a/ts/context/waitForSettingsChange.preload.ts b/ts/context/waitForSettingsChange.preload.ts index 313596ef0a..ea68d6da9f 100644 --- a/ts/context/waitForSettingsChange.preload.ts +++ b/ts/context/waitForSettingsChange.preload.ts @@ -3,7 +3,7 @@ import { ipcRenderer as ipc } from 'electron'; -import { explodePromise } from '../util/explodePromise.std.js'; +import { explodePromise } from '../util/explodePromise.std.ts'; let preferencesChangeResolvers = new Array<() => void>(); diff --git a/ts/conversations/isConversationTooBigToRing.dom.ts b/ts/conversations/isConversationTooBigToRing.dom.ts index b941880d8c..5b27fdcab6 100644 --- a/ts/conversations/isConversationTooBigToRing.dom.ts +++ b/ts/conversations/isConversationTooBigToRing.dom.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { parseIntWithFallback } from '../util/parseIntWithFallback.std.js'; -import { getValue } from '../RemoteConfig.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import { parseIntWithFallback } from '../util/parseIntWithFallback.std.ts'; +import { getValue } from '../RemoteConfig.dom.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; const getMaxGroupCallRingSize = (): number => parseIntWithFallback(getValue('global.calling.maxGroupCallRingSize'), 16); diff --git a/ts/environment.std.ts b/ts/environment.std.ts index 927621abc9..212f694b2e 100644 --- a/ts/environment.std.ts +++ b/ts/environment.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { makeEnumParser } from './util/enum.std.js'; -import { log } from './logging/log.std.js'; +import { makeEnumParser } from './util/enum.std.ts'; +import { log } from './logging/log.std.ts'; // Many places rely on this enum being a string. export enum Environment { diff --git a/ts/groupChange.std.ts b/ts/groupChange.std.ts index 934f16d4e8..bf708abd75 100644 --- a/ts/groupChange.std.ts +++ b/ts/groupChange.std.ts @@ -6,20 +6,20 @@ import type { LocalizerType, ICUStringMessageParamsByKeyType, ICUJSXMessageParamsByKeyType, -} from './types/Util.std.js'; +} from './types/Util.std.ts'; import type { ServiceIdString, AciString, PniString, -} from './types/ServiceId.std.js'; -import { missingCaseError } from './util/missingCaseError.std.js'; +} from './types/ServiceId.std.ts'; +import { missingCaseError } from './util/missingCaseError.std.ts'; import type { GroupV2ChangeDetailType, GroupV2ChangeType, -} from './types/groups.std.js'; -import { SignalService as Proto } from './protobuf/index.std.js'; -import { createLogger } from './logging/log.std.js'; +} from './types/groups.std.ts'; +import { SignalService as Proto } from './protobuf/index.std.ts'; +import { createLogger } from './logging/log.std.ts'; const log = createLogger('groupChange'); diff --git a/ts/groups.preload.ts b/ts/groups.preload.ts index af781f52e8..3a3e1b23ad 100644 --- a/ts/groups.preload.ts +++ b/ts/groups.preload.ts @@ -4,30 +4,30 @@ import lodash from 'lodash'; import type { ClientZkGroupCipher } from '@signalapp/libsignal-client/zkgroup.js'; import { LRUCache } from 'lru-cache'; -import { createLogger } from './logging/log.std.js'; +import { createLogger } from './logging/log.std.ts'; import { getCheckedGroupCredentialsForToday, maybeFetchNewCredentials, -} from './services/groupCredentialFetcher.preload.js'; -import { DataReader, DataWriter } from './sql/Client.preload.js'; +} from './services/groupCredentialFetcher.preload.ts'; +import { DataReader, DataWriter } from './sql/Client.preload.ts'; import { toWebSafeBase64, fromWebSafeBase64, -} from './util/webSafeBase64.std.js'; -import { assertDev, strictAssert } from './util/assert.std.js'; -import { isMoreRecentThan } from './util/timestamp.std.js'; +} from './util/webSafeBase64.std.ts'; +import { assertDev, strictAssert } from './util/assert.std.ts'; +import { isMoreRecentThan } from './util/timestamp.std.ts'; import { MINUTE, DurationInSeconds, SECOND, -} from './util/durations/index.std.js'; -import { drop } from './util/drop.std.js'; -import { dropNull } from './util/dropNull.std.js'; +} from './util/durations/index.std.ts'; +import { drop } from './util/drop.std.ts'; +import { dropNull } from './util/dropNull.std.ts'; import { writeNewAttachmentData, readAttachmentData, maybeDeleteAttachmentFile, -} from './util/migrations.preload.js'; +} from './util/migrations.preload.ts'; import type { ConversationAttributesType, GroupV2MemberType, @@ -54,16 +54,16 @@ import { getClientZkGroupCipher, getClientZkProfileOperations, verifyNotarySignature, -} from './util/zkgroup.node.js'; +} from './util/zkgroup.node.ts'; import { computeHash, deriveMasterKeyFromGroupV1, getRandomBytes, -} from './Crypto.node.js'; +} from './Crypto.node.ts'; import type { GroupCredentialsType, GroupLogResponseType, -} from './textsecure/WebAPI.preload.js'; +} from './textsecure/WebAPI.preload.ts'; import { createGroup, getGroup, @@ -73,66 +73,66 @@ import { getExternalGroupCredential, modifyGroup, uploadGroupAvatar, -} from './textsecure/WebAPI.preload.js'; -import { HTTPError } from './types/HTTPError.std.js'; -import { CURRENT_SCHEMA_VERSION as MAX_MESSAGE_SCHEMA } from './types/Message2.preload.js'; -import type { ConversationModel } from './models/conversations.preload.js'; -import { getGroupSizeHardLimit } from './groups/limits.dom.js'; +} from './textsecure/WebAPI.preload.ts'; +import { HTTPError } from './types/HTTPError.std.ts'; +import { CURRENT_SCHEMA_VERSION as MAX_MESSAGE_SCHEMA } from './types/Message2.preload.ts'; +import type { ConversationModel } from './models/conversations.preload.ts'; +import { getGroupSizeHardLimit } from './groups/limits.dom.ts'; import { isGroupV1 as getIsGroupV1, isGroupV2 as getIsGroupV2, isGroupV2, isMe, -} from './util/whatTypeOfConversation.dom.js'; -import * as Bytes from './Bytes.std.js'; -import type { AvatarDataType } from './types/Avatar.std.js'; -import type { GroupV2ChangeDetailType } from './types/groups.std.js'; +} from './util/whatTypeOfConversation.dom.ts'; +import * as Bytes from './Bytes.std.ts'; +import type { AvatarDataType } from './types/Avatar.std.ts'; +import type { GroupV2ChangeDetailType } from './types/groups.std.ts'; import type { ServiceIdString, AciString, PniString, -} from './types/ServiceId.std.js'; +} from './types/ServiceId.std.ts'; import { ServiceIdKind, isPniString, isServiceIdString, -} from './types/ServiceId.std.js'; -import { isAciString } from './util/isAciString.std.js'; -import * as Errors from './types/errors.std.js'; -import { SignalService as Proto } from './protobuf/index.std.js'; -import { isNotNil } from './util/isNotNil.std.js'; -import { isAccessControlEnabled } from './groups/util.std.js'; +} from './types/ServiceId.std.ts'; +import { isAciString } from './util/isAciString.std.ts'; +import * as Errors from './types/errors.std.ts'; +import { SignalService as Proto } from './protobuf/index.std.ts'; +import { isNotNil } from './util/isNotNil.std.ts'; +import { isAccessControlEnabled } from './groups/util.std.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from './jobs/conversationJobQueue.preload.js'; -import { ReadStatus } from './messages/MessageReadStatus.std.js'; -import { SeenStatus } from './MessageSeenStatus.std.js'; -import { incrementMessageCounter } from './util/incrementMessageCounter.preload.js'; -import { sleep } from './util/sleep.std.js'; -import { groupInvitesRoute } from './util/signalRoutes.std.js'; +} from './jobs/conversationJobQueue.preload.ts'; +import { ReadStatus } from './messages/MessageReadStatus.std.ts'; +import { SeenStatus } from './MessageSeenStatus.std.ts'; +import { incrementMessageCounter } from './util/incrementMessageCounter.preload.ts'; +import { sleep } from './util/sleep.std.ts'; +import { groupInvitesRoute } from './util/signalRoutes.std.ts'; import { decodeGroupSendEndorsementsResponse, validateGroupSendEndorsementsExpiration, -} from './util/groupSendEndorsements.preload.js'; -import { getProfile } from './util/getProfile.preload.js'; -import { generateMessageId } from './util/generateMessageId.node.js'; -import { postSaveUpdates } from './util/cleanup.preload.js'; -import { MessageModel } from './models/messages.preload.js'; -import { areWePending } from './util/groupMembershipUtils.preload.js'; +} from './util/groupSendEndorsements.preload.ts'; +import { getProfile } from './util/getProfile.preload.ts'; +import { generateMessageId } from './util/generateMessageId.node.ts'; +import { postSaveUpdates } from './util/cleanup.preload.ts'; +import { MessageModel } from './models/messages.preload.ts'; +import { areWePending } from './util/groupMembershipUtils.preload.ts'; import { isConversationAccepted, isTrustedContact, -} from './util/isConversationAccepted.preload.js'; -import { itemStorage } from './textsecure/Storage.preload.js'; +} from './util/isConversationAccepted.preload.ts'; +import { itemStorage } from './textsecure/Storage.preload.ts'; import { EMOJI_OUTGOING_BYTE_LIMIT, SERVER_EMOJI_BYTE_LIMIT, SERVER_STRING_BYTE_LIMIT, -} from './types/GroupMemberLabels.std.js'; -import { getConversationIdForLogging } from './util/idForLogging.preload.js'; -import { toNumber } from './util/toNumber.std.js'; +} from './types/GroupMemberLabels.std.ts'; +import { getConversationIdForLogging } from './util/idForLogging.preload.ts'; +import { toNumber } from './util/toNumber.std.ts'; import Actions = Proto.GroupChange.Actions; import AccessRequired = Proto.AccessControl.AccessRequired; @@ -143,7 +143,7 @@ const { compact, difference, flatten, fromPairs, isNumber, omit, values } = const log = createLogger('groups'); -export { joinViaLink } from './groups/joinViaLink.preload.js'; +export { joinViaLink } from './groups/joinViaLink.preload.ts'; export type GroupFields = { readonly id: Uint8Array; diff --git a/ts/groups/joinViaLink.preload.ts b/ts/groups/joinViaLink.preload.ts index 4ae24db4d8..8e9393dfc7 100644 --- a/ts/groups/joinViaLink.preload.ts +++ b/ts/groups/joinViaLink.preload.ts @@ -4,17 +4,17 @@ import { createRoot, type Root } from 'react-dom/client'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import type { PreJoinConversationType } from '../state/ducks/conversations.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import type { PreJoinConversationType } from '../state/ducks/conversations.preload.ts'; -import { DataWriter } from '../sql/Client.preload.js'; -import * as Bytes from '../Bytes.std.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import type { ContactAvatarType } from '../types/Avatar.std.js'; -import { ToastType } from '../types/Toast.dom.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import type { ContactAvatarType } from '../types/Avatar.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; import { applyNewAvatar, decryptGroupDescription, @@ -24,20 +24,20 @@ import { idForLogging, LINK_VERSION_ERROR, parseGroupLink, -} from '../groups.preload.js'; -import { createGroupV2JoinModal } from '../state/roots/createGroupV2JoinModal.dom.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { maybeDeleteAttachmentFile } from '../util/migrations.preload.js'; -import { isAccessControlEnabled } from './util.std.js'; -import { isGroupV1 } from '../util/whatTypeOfConversation.dom.js'; -import { longRunningTaskWrapper } from '../util/longRunningTaskWrapper.dom.js'; -import { sleep } from '../util/sleep.std.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { getLocalAttachmentUrl } from '../util/getLocalAttachmentUrl.std.js'; -import { type Loadable, LoadingState } from '../util/loadable.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { removeConversation } from '../util/Conversation.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../groups.preload.ts'; +import { createGroupV2JoinModal } from '../state/roots/createGroupV2JoinModal.dom.tsx'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { maybeDeleteAttachmentFile } from '../util/migrations.preload.ts'; +import { isAccessControlEnabled } from './util.std.ts'; +import { isGroupV1 } from '../util/whatTypeOfConversation.dom.ts'; +import { longRunningTaskWrapper } from '../util/longRunningTaskWrapper.dom.tsx'; +import { sleep } from '../util/sleep.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import { getLocalAttachmentUrl } from '../util/getLocalAttachmentUrl.std.ts'; +import { type Loadable, LoadingState } from '../util/loadable.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { removeConversation } from '../util/Conversation.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('joinViaLink'); const { i18n } = window.SignalContext; diff --git a/ts/groups/limits.dom.ts b/ts/groups/limits.dom.ts index cbdb4a6720..cb19d00c58 100644 --- a/ts/groups/limits.dom.ts +++ b/ts/groups/limits.dom.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { parseIntOrThrow } from '../util/parseIntOrThrow.std.js'; -import type { ConfigKeyType } from '../RemoteConfig.dom.js'; -import { getValue } from '../RemoteConfig.dom.js'; +import { parseIntOrThrow } from '../util/parseIntOrThrow.std.ts'; +import type { ConfigKeyType } from '../RemoteConfig.dom.ts'; +import { getValue } from '../RemoteConfig.dom.ts'; const { isNumber } = lodash; diff --git a/ts/groups/util.std.ts b/ts/groups/util.std.ts index 30929a8478..edead6849c 100644 --- a/ts/groups/util.std.ts +++ b/ts/groups/util.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { SignalService as Proto } from '../protobuf/index.std.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; import AccessRequired = Proto.AccessControl.AccessRequired; diff --git a/ts/hooks/useActivateSpeakerViewOnPresenting.std.ts b/ts/hooks/useActivateSpeakerViewOnPresenting.std.ts index 378310a5fc..161b7a61f7 100644 --- a/ts/hooks/useActivateSpeakerViewOnPresenting.std.ts +++ b/ts/hooks/useActivateSpeakerViewOnPresenting.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import { useEffect, useMemo } from 'react'; -import type { AciString } from '../types/ServiceId.std.js'; -import { usePrevious } from './usePrevious.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { usePrevious } from './usePrevious.std.ts'; type RemoteParticipant = { hasRemoteVideo: boolean; diff --git a/ts/hooks/useAnimated.dom.tsx b/ts/hooks/useAnimated.dom.tsx index dd0c87ba15..72bd0dacd5 100644 --- a/ts/hooks/useAnimated.dom.tsx +++ b/ts/hooks/useAnimated.dom.tsx @@ -4,7 +4,7 @@ import { useState, useCallback } from 'react'; import type { SpringValues } from '@react-spring/web'; import { useChain, useSpring, useSpringRef } from '@react-spring/web'; -import { useReducedMotion } from './useReducedMotion.dom.js'; +import { useReducedMotion } from './useReducedMotion.dom.ts'; export type ModalConfigType = { opacity: number; diff --git a/ts/hooks/useAttachmentStatus.std.ts b/ts/hooks/useAttachmentStatus.std.ts index 6bc1ba64f6..63feecb53b 100644 --- a/ts/hooks/useAttachmentStatus.std.ts +++ b/ts/hooks/useAttachmentStatus.std.ts @@ -1,12 +1,12 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentForUIType } from '../types/Attachment.std.js'; -import { getUrl } from '../util/Attachment.std.js'; -import { MediaTier } from '../types/AttachmentDownload.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { getAttachmentCiphertextSize } from '../util/AttachmentCrypto.std.js'; -import { useDelayedValue } from './useDelayedValue.std.js'; +import type { AttachmentForUIType } from '../types/Attachment.std.ts'; +import { getUrl } from '../util/Attachment.std.ts'; +import { MediaTier } from '../types/AttachmentDownload.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { getAttachmentCiphertextSize } from '../util/AttachmentCrypto.std.ts'; +import { useDelayedValue } from './useDelayedValue.std.ts'; const TRANSITION_DELAY = 200; diff --git a/ts/hooks/useComputePeaks.dom.ts b/ts/hooks/useComputePeaks.dom.ts index e7a3a65e71..24705bf941 100644 --- a/ts/hooks/useComputePeaks.dom.ts +++ b/ts/hooks/useComputePeaks.dom.ts @@ -3,8 +3,8 @@ import lodash from 'lodash'; import { useEffect, useState } from 'react'; -import { computePeaks } from '../components/VoiceNotesPlaybackContext.dom.js'; -import { createLogger } from '../logging/log.std.js'; +import { computePeaks } from '../components/VoiceNotesPlaybackContext.dom.tsx'; +import { createLogger } from '../logging/log.std.ts'; const { noop } = lodash; diff --git a/ts/hooks/useConfirmDiscard.dom.tsx b/ts/hooks/useConfirmDiscard.dom.tsx index 927f0b53c5..45f1d594ca 100644 --- a/ts/hooks/useConfirmDiscard.dom.tsx +++ b/ts/hooks/useConfirmDiscard.dom.tsx @@ -3,18 +3,18 @@ import React, { useEffect, useRef, useState } from 'react'; -import { ConfirmDiscardDialog } from '../components/ConfirmDiscardDialog.dom.js'; +import { ConfirmDiscardDialog } from '../components/ConfirmDiscardDialog.dom.tsx'; import { BeforeNavigateResponse, beforeNavigateService, -} from '../services/BeforeNavigate.std.js'; +} from '../services/BeforeNavigate.std.ts'; import { explodePromise, type ExplodePromiseResultType, -} from '../util/explodePromise.std.js'; +} from '../util/explodePromise.std.ts'; -import type { ConfirmDialogProps } from '../components/ConfirmDiscardDialog.dom.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { ConfirmDialogProps } from '../components/ConfirmDiscardDialog.dom.tsx'; +import type { LocalizerType } from '../types/Util.std.ts'; export function useConfirmDiscard({ i18n, diff --git a/ts/hooks/useInputMask.dom.tsx b/ts/hooks/useInputMask.dom.tsx index 9a8b2828cb..603ee27216 100644 --- a/ts/hooks/useInputMask.dom.tsx +++ b/ts/hooks/useInputMask.dom.tsx @@ -9,7 +9,7 @@ import type { FormatterToken, Formatter } from '@signalapp/minimask'; import type { RefObject } from 'react'; import { useEffect } from 'react'; import creditCardType from 'credit-card-type'; -import { strictAssert } from '../util/assert.std.js'; +import { strictAssert } from '../util/assert.std.ts'; export function useInputMask( inputRef: RefObject, diff --git a/ts/hooks/useIntersectionObserver.std.ts b/ts/hooks/useIntersectionObserver.std.ts index 32f0253641..902a9fa4f3 100644 --- a/ts/hooks/useIntersectionObserver.std.ts +++ b/ts/hooks/useIntersectionObserver.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { useCallback, useRef, useState } from 'react'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('useIntersectionObserver'); diff --git a/ts/hooks/useKeyboardShortcuts.dom.tsx b/ts/hooks/useKeyboardShortcuts.dom.tsx index 07ba7fa033..6153178b04 100644 --- a/ts/hooks/useKeyboardShortcuts.dom.tsx +++ b/ts/hooks/useKeyboardShortcuts.dom.tsx @@ -4,10 +4,10 @@ import { useCallback, useEffect } from 'react'; import lodash from 'lodash'; import { useSelector } from 'react-redux'; -import * as KeyboardLayout from '../services/keyboardLayout.dom.js'; -import { getHasPanelOpen } from '../state/selectors/nav.std.js'; -import { isInFullScreenCall } from '../state/selectors/calling.std.js'; -import { isShowingAnyModal } from '../state/selectors/globalModals.std.js'; +import * as KeyboardLayout from '../services/keyboardLayout.dom.ts'; +import { getHasPanelOpen } from '../state/selectors/nav.std.ts'; +import { isInFullScreenCall } from '../state/selectors/calling.std.ts'; +import { isShowingAnyModal } from '../state/selectors/globalModals.std.ts'; const { get } = lodash; diff --git a/ts/hooks/useMinimalConversation.std.ts b/ts/hooks/useMinimalConversation.std.ts index 27e1b5a9bc..db5b6e9120 100644 --- a/ts/hooks/useMinimalConversation.std.ts +++ b/ts/hooks/useMinimalConversation.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { useMemo } from 'react'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; type Primitive = undefined | null | boolean | number | bigint | string; type PrimitiveObject = Record; diff --git a/ts/hooks/useNavBlocker.std.ts b/ts/hooks/useNavBlocker.std.ts index 65920070ac..544cac6213 100644 --- a/ts/hooks/useNavBlocker.std.ts +++ b/ts/hooks/useNavBlocker.std.ts @@ -5,11 +5,11 @@ import { useEffect, useRef, useState } from 'react'; import { beforeNavigateService, BeforeNavigateResponse, -} from '../services/BeforeNavigate.std.js'; +} from '../services/BeforeNavigate.std.ts'; import type { BeforeNavigateCallback, BeforeNavigateTransitionDetails, -} from '../services/BeforeNavigate.std.js'; +} from '../services/BeforeNavigate.std.ts'; type NavBlockerBlocked = Readonly<{ state: 'blocked'; diff --git a/ts/hooks/useNowThatUpdatesEveryMinute.std.ts b/ts/hooks/useNowThatUpdatesEveryMinute.std.ts index 45f6547e3f..973b38a8b7 100644 --- a/ts/hooks/useNowThatUpdatesEveryMinute.std.ts +++ b/ts/hooks/useNowThatUpdatesEveryMinute.std.ts @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react'; -import { MINUTE } from '../util/durations/index.std.js'; +import { MINUTE } from '../util/durations/index.std.ts'; const listeners = new Set<() => void>(); diff --git a/ts/hooks/useProxySelector.std.ts b/ts/hooks/useProxySelector.std.ts index 3e86a590cd..0fd95d8ed2 100644 --- a/ts/hooks/useProxySelector.std.ts +++ b/ts/hooks/useProxySelector.std.ts @@ -5,7 +5,7 @@ import { useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; import { memoize } from '@indutny/sneequals'; -import type { StateType } from '../state/reducer.preload.js'; +import type { StateType } from '../state/reducer.preload.ts'; export function useProxySelector, Result>( selector: (state: StateType, ...params: Params) => Result, diff --git a/ts/hooks/useRefMerger.std.ts b/ts/hooks/useRefMerger.std.ts index 7d115b7c58..e0167f4679 100644 --- a/ts/hooks/useRefMerger.std.ts +++ b/ts/hooks/useRefMerger.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { useMemo } from 'react'; -import { createRefMerger } from '../util/refMerger.std.js'; +import { createRefMerger } from '../util/refMerger.std.ts'; export const useRefMerger = (): ReturnType => useMemo(createRefMerger, []); diff --git a/ts/hooks/useRetryStorySend.dom.tsx b/ts/hooks/useRetryStorySend.dom.tsx index d22c943602..a29f2767e2 100644 --- a/ts/hooks/useRetryStorySend.dom.tsx +++ b/ts/hooks/useRetryStorySend.dom.tsx @@ -3,10 +3,10 @@ import React, { useState, useEffect } from 'react'; -import type { LocalizerType } from '../types/Util.std.js'; -import { Alert } from '../components/Alert.dom.js'; -import { ResolvedSendStatus } from '../types/Stories.std.js'; -import { usePrevious } from './usePrevious.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { Alert } from '../components/Alert.dom.tsx'; +import { ResolvedSendStatus } from '../types/Stories.std.ts'; +import { usePrevious } from './usePrevious.std.ts'; export function useRetryStorySend( i18n: LocalizerType, diff --git a/ts/hooks/useScrollLock.dom.tsx b/ts/hooks/useScrollLock.dom.tsx index 5067c97d7b..04ebfaf54d 100644 --- a/ts/hooks/useScrollLock.dom.tsx +++ b/ts/hooks/useScrollLock.dom.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { useContext, createContext, useEffect, useRef } from 'react'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('useScrollLock'); diff --git a/ts/hooks/useSizeObserver.dom.tsx b/ts/hooks/useSizeObserver.dom.tsx index 94eac2aea2..f7168053a4 100644 --- a/ts/hooks/useSizeObserver.dom.tsx +++ b/ts/hooks/useSizeObserver.dom.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { RefObject } from 'react'; import { useCallback, useEffect, useRef, useState } from 'react'; -import { strictAssert } from '../util/assert.std.js'; +import { strictAssert } from '../util/assert.std.ts'; export type Size = Readonly< { hidden: false; width: number; height: number } | { hidden: true } diff --git a/ts/hooks/useTabs.dom.tsx b/ts/hooks/useTabs.dom.tsx index 2a5699058f..8a9dda405a 100644 --- a/ts/hooks/useTabs.dom.tsx +++ b/ts/hooks/useTabs.dom.tsx @@ -4,8 +4,8 @@ import type { KeyboardEvent } from 'react'; import React, { useState } from 'react'; import classNames from 'classnames'; -import { assertDev } from '../util/assert.std.js'; -import { getClassNamesFor } from '../util/getClassNamesFor.std.js'; +import { assertDev } from '../util/assert.std.ts'; +import { getClassNamesFor } from '../util/getClassNamesFor.std.ts'; type Tab = { id: string; diff --git a/ts/hooks/useTheme.dom.ts b/ts/hooks/useTheme.dom.ts index e564281089..8dcaab3b36 100644 --- a/ts/hooks/useTheme.dom.ts +++ b/ts/hooks/useTheme.dom.ts @@ -3,7 +3,7 @@ import { useState, useEffect } from 'react'; -import { ThemeType } from '../types/Util.std.js'; +import { ThemeType } from '../types/Util.std.ts'; // Note that this hook is used in non-main windows (e.g. "About" and // "Debug Log" windows), and thus can't access redux state. diff --git a/ts/indexeddb.dom.ts b/ts/indexeddb.dom.ts index e61a3a73c7..8f0afb8d5f 100644 --- a/ts/indexeddb.dom.ts +++ b/ts/indexeddb.dom.ts @@ -1,7 +1,7 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from './logging/log.std.js'; +import { createLogger } from './logging/log.std.ts'; const log = createLogger('indexeddb'); diff --git a/ts/jobs/AttachmentBackupManager.preload.ts b/ts/jobs/AttachmentBackupManager.preload.ts index de6438ae61..72503a4d06 100644 --- a/ts/jobs/AttachmentBackupManager.preload.ts +++ b/ts/jobs/AttachmentBackupManager.preload.ts @@ -4,66 +4,66 @@ import { existsSync } from 'node:fs'; import { PassThrough } from 'node:stream'; -import * as durations from '../util/durations/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; +import * as durations from '../util/durations/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; -import * as Errors from '../types/errors.std.js'; -import { redactGenericText } from '../util/privacy.node.js'; +import * as Errors from '../types/errors.std.ts'; +import { redactGenericText } from '../util/privacy.node.ts'; import { JobManager, type JobManagerParamsType, type JobManagerJobResultType, -} from './JobManager.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { getAbsoluteAttachmentPath as doGetAbsoluteAttachmentPath } from '../util/migrations.preload.js'; +} from './JobManager.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { getAbsoluteAttachmentPath as doGetAbsoluteAttachmentPath } from '../util/migrations.preload.ts'; import { type BackupsService, backupsService, -} from '../services/backups/index.preload.js'; +} from '../services/backups/index.preload.ts'; import { type EncryptedAttachmentV2, decryptAttachmentV2ToSink, -} from '../AttachmentCrypto.node.js'; +} from '../AttachmentCrypto.node.ts'; import { getBackupMediaRootKey, deriveBackupMediaKeyMaterial, deriveBackupThumbnailTransitKeyMaterial, -} from '../services/backups/crypto.preload.js'; +} from '../services/backups/crypto.preload.ts'; import { type AttachmentBackupJobType, type CoreAttachmentBackupJobType, type StandardAttachmentBackupJobType, type ThumbnailAttachmentBackupJobType, -} from '../types/AttachmentBackup.std.js'; -import { isInCall as isInCallSelector } from '../state/selectors/calling.std.js'; -import { encryptAndUploadAttachment } from '../util/uploadAttachment.preload.js'; -import { getAttachmentCiphertextSize } from '../util/AttachmentCrypto.std.js'; +} from '../types/AttachmentBackup.std.ts'; +import { isInCall as isInCallSelector } from '../state/selectors/calling.std.ts'; +import { encryptAndUploadAttachment } from '../util/uploadAttachment.preload.ts'; +import { getAttachmentCiphertextSize } from '../util/AttachmentCrypto.std.ts'; import { getMediaIdFromMediaName, getMediaNameForAttachmentThumbnail, -} from '../services/backups/util/mediaId.preload.js'; -import { fromBase64, toBase64 } from '../Bytes.std.js'; -import { backupMediaBatch as doBackupMediaBatch } from '../textsecure/WebAPI.preload.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import { canAttachmentHaveThumbnail } from '../util/Attachment.std.js'; -import { mightStillBeOnTransitTier } from '../util/mightStillBeOnTransitTier.dom.js'; +} from '../services/backups/util/mediaId.preload.ts'; +import { fromBase64, toBase64 } from '../Bytes.std.ts'; +import { backupMediaBatch as doBackupMediaBatch } from '../textsecure/WebAPI.preload.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import { canAttachmentHaveThumbnail } from '../util/Attachment.std.ts'; +import { mightStillBeOnTransitTier } from '../util/mightStillBeOnTransitTier.dom.ts'; import { type CreatedThumbnailType, makeImageThumbnailForBackup, makeVideoScreenshot, -} from '../types/VisualAttachment.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +} from '../types/VisualAttachment.dom.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; import { isImageTypeSupported, isVideoTypeSupported, -} from '../util/GoogleChrome.std.js'; -import { getLocalAttachmentUrl } from '../util/getLocalAttachmentUrl.std.js'; -import { findRetryAfterTimeFromError } from './helpers/findRetryAfterTimeFromError.std.js'; -import { BackupCredentialType } from '../types/backups.node.js'; -import { supportsIncrementalMac } from '../types/MIME.std.js'; -import type { MIMEType } from '../types/MIME.std.js'; -import { MediaTier } from '../types/AttachmentDownload.std.js'; +} from '../util/GoogleChrome.std.ts'; +import { getLocalAttachmentUrl } from '../util/getLocalAttachmentUrl.std.ts'; +import { findRetryAfterTimeFromError } from './helpers/findRetryAfterTimeFromError.std.ts'; +import { BackupCredentialType } from '../types/backups.node.ts'; +import { supportsIncrementalMac } from '../types/MIME.std.ts'; +import type { MIMEType } from '../types/MIME.std.ts'; +import { MediaTier } from '../types/AttachmentDownload.std.ts'; const log = createLogger('AttachmentBackupManager'); diff --git a/ts/jobs/AttachmentDownloadManager.preload.ts b/ts/jobs/AttachmentDownloadManager.preload.ts index 4efd3677e5..f5e1d208d1 100644 --- a/ts/jobs/AttachmentDownloadManager.preload.ts +++ b/ts/jobs/AttachmentDownloadManager.preload.ts @@ -3,9 +3,9 @@ import lodash from 'lodash'; import { statfs } from 'node:fs/promises'; -import * as durations from '../util/durations/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { AttachmentBackfillResponseSyncEvent } from '../textsecure/messageReceiverEvents.std.js'; +import * as durations from '../util/durations/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { AttachmentBackfillResponseSyncEvent } from '../textsecure/messageReceiverEvents.std.ts'; import { type MessageAttachmentType, type AttachmentDownloadJobType, @@ -13,26 +13,26 @@ import { AttachmentDownloadUrgency, coreAttachmentDownloadJobSchema, MediaTier, -} from '../types/AttachmentDownload.std.js'; +} from '../types/AttachmentDownload.std.ts'; import { downloadAttachment as downloadAttachmentUtil, isIncrementalMacVerificationError, -} from '../util/downloadAttachment.preload.js'; +} from '../util/downloadAttachment.preload.ts'; import { maybeDeleteAttachmentFile, deleteDownloadFile, processNewAttachment, -} from '../util/migrations.preload.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { getValue } from '../RemoteConfig.dom.js'; +} from '../util/migrations.preload.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { getValue } from '../RemoteConfig.dom.ts'; -import { isInCall as isInCallSelector } from '../state/selectors/calling.std.js'; +import { isInCall as isInCallSelector } from '../state/selectors/calling.std.ts'; import { AttachmentSizeError, type AttachmentType, AttachmentVariant, AttachmentPermanentlyUndownloadableError, -} from '../types/Attachment.std.js'; +} from '../types/Attachment.std.ts'; import { wasImportedFromLocalBackup, canAttachmentHaveThumbnail, @@ -40,54 +40,54 @@ import { getUndownloadedAttachmentSignature, isIncremental, hasRequiredInformationForRemoteBackup, -} from '../util/Attachment.std.js'; +} from '../util/Attachment.std.ts'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { backupsService } from '../services/backups/index.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; +import { backupsService } from '../services/backups/index.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; import { KIBIBYTE, getMaximumIncomingAttachmentSizeInKb, getMaximumIncomingTextAttachmentSizeInKb, -} from '../types/AttachmentSize.std.js'; +} from '../types/AttachmentSize.std.ts'; import { addAttachmentToMessage, AttachmentNotNeededForMessageError, -} from '../messageModifiers/AttachmentDownloads.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { redactGenericText } from '../util/privacy.node.js'; +} from '../messageModifiers/AttachmentDownloads.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { redactGenericText } from '../util/privacy.node.ts'; import { JobManager, type JobManagerParamsType, type JobManagerJobResultType, type JobManagerJobType, -} from './JobManager.std.js'; -import { IMAGE_WEBP } from '../types/MIME.std.js'; -import { AttachmentDownloadSource } from '../sql/Interface.std.js'; -import { drop } from '../util/drop.std.js'; -import { type ReencryptedAttachmentV2 } from '../AttachmentCrypto.node.js'; -import { safeParsePartial } from '../util/schemas.std.js'; -import { deleteDownloadsJobQueue } from './deleteDownloadsJobQueue.preload.js'; -import { createBatcher } from '../util/batcher.std.js'; -import { showDownloadFailedToast } from '../util/showDownloadFailedToast.dom.js'; -import { markAttachmentAsPermanentlyErrored } from '../util/attachments/markAttachmentAsPermanentlyErrored.std.js'; +} from './JobManager.std.ts'; +import { IMAGE_WEBP } from '../types/MIME.std.ts'; +import { AttachmentDownloadSource } from '../sql/Interface.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { type ReencryptedAttachmentV2 } from '../AttachmentCrypto.node.ts'; +import { safeParsePartial } from '../util/schemas.std.ts'; +import { deleteDownloadsJobQueue } from './deleteDownloadsJobQueue.preload.ts'; +import { createBatcher } from '../util/batcher.std.ts'; +import { showDownloadFailedToast } from '../util/showDownloadFailedToast.dom.ts'; +import { markAttachmentAsPermanentlyErrored } from '../util/attachments/markAttachmentAsPermanentlyErrored.std.ts'; import { AttachmentBackfill, isPermanentlyUndownloadable, isPermanentlyUndownloadableWithoutBackfill, -} from './helpers/attachmentBackfill.preload.js'; -import { formatCountForLogging } from '../logging/formatCountForLogging.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { getAttachmentCiphertextSize } from '../util/AttachmentCrypto.std.js'; -import { updateBackupMediaDownloadProgress } from '../util/updateBackupMediaDownloadProgress.preload.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { isOlderThan } from '../util/timestamp.std.js'; -import { getMessageQueueTime as doGetMessageQueueTime } from '../util/getMessageQueueTime.dom.js'; -import { JobCancelReason } from './types.std.js'; -import { isAbortError } from '../util/isAbortError.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { calculateExpirationTimestamp } from '../util/expirationTimer.std.js'; -import { cleanupAttachmentFiles } from '../util/cleanup.preload.js'; -import { getExistingAttachmentDataForReuse } from '../util/attachments/deduplicateAttachment.preload.js'; +} from './helpers/attachmentBackfill.preload.ts'; +import { formatCountForLogging } from '../logging/formatCountForLogging.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { getAttachmentCiphertextSize } from '../util/AttachmentCrypto.std.ts'; +import { updateBackupMediaDownloadProgress } from '../util/updateBackupMediaDownloadProgress.preload.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { isOlderThan } from '../util/timestamp.std.ts'; +import { getMessageQueueTime as doGetMessageQueueTime } from '../util/getMessageQueueTime.dom.ts'; +import { JobCancelReason } from './types.std.ts'; +import { isAbortError } from '../util/isAbortError.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { calculateExpirationTimestamp } from '../util/expirationTimer.std.ts'; +import { cleanupAttachmentFiles } from '../util/cleanup.preload.ts'; +import { getExistingAttachmentDataForReuse } from '../util/attachments/deduplicateAttachment.preload.ts'; const { noop, omit, throttle } = lodash; diff --git a/ts/jobs/AttachmentLocalBackupManager.preload.ts b/ts/jobs/AttachmentLocalBackupManager.preload.ts index 947d6cbaa4..ad002e35d0 100644 --- a/ts/jobs/AttachmentLocalBackupManager.preload.ts +++ b/ts/jobs/AttachmentLocalBackupManager.preload.ts @@ -14,16 +14,16 @@ import { exists } from 'fs-extra'; import { getAbsoluteAttachmentPath as doGetAbsoluteAttachmentPath, getAbsoluteTempPath as doGetAbsoluteTempPath, -} from '../util/migrations.preload.js'; -import { decryptAttachmentV2ToSink } from '../AttachmentCrypto.node.js'; +} from '../util/migrations.preload.ts'; +import { decryptAttachmentV2ToSink } from '../AttachmentCrypto.node.ts'; import { getLocalBackupDirectoryForMediaName, getLocalBackupPathForMediaName, -} from '../services/backups/util/localBackup.node.js'; -import { createName } from '../util/attachmentPath.node.js'; -import { redactGenericText } from '../util/privacy.node.js'; +} from '../services/backups/util/localBackup.node.ts'; +import { createName } from '../util/attachmentPath.node.ts'; +import { redactGenericText } from '../util/privacy.node.ts'; -import type { CoreAttachmentLocalBackupJobType } from '../types/AttachmentBackup.std.js'; +import type { CoreAttachmentLocalBackupJobType } from '../types/AttachmentBackup.std.ts'; export class AttachmentPermanentlyMissingError extends Error {} diff --git a/ts/jobs/CallLinkFinalizeDeleteManager.preload.ts b/ts/jobs/CallLinkFinalizeDeleteManager.preload.ts index a16e3736f9..1cbd57eb12 100644 --- a/ts/jobs/CallLinkFinalizeDeleteManager.preload.ts +++ b/ts/jobs/CallLinkFinalizeDeleteManager.preload.ts @@ -1,14 +1,14 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as durations from '../util/durations/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; +import * as durations from '../util/durations/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; import { JobManager, type JobManagerParamsType, type JobManagerJobResultType, type JobManagerJobType, -} from './JobManager.std.js'; +} from './JobManager.std.ts'; const log = createLogger('CallLinkFinalizeDeleteManager'); diff --git a/ts/jobs/Job.std.ts b/ts/jobs/Job.std.ts index 3756fe37cb..b4b689d8ca 100644 --- a/ts/jobs/Job.std.ts +++ b/ts/jobs/Job.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ParsedJob } from './types.std.js'; +import type { ParsedJob } from './types.std.ts'; /** * A single job instance. Shouldn't be instantiated directly, except by `JobQueue`. diff --git a/ts/jobs/JobError.std.ts b/ts/jobs/JobError.std.ts index a0574cb85c..b722adfa14 100644 --- a/ts/jobs/JobError.std.ts +++ b/ts/jobs/JobError.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { reallyJsonStringify } from '../util/reallyJsonStringify.std.js'; +import { reallyJsonStringify } from '../util/reallyJsonStringify.std.ts'; /** * An error that wraps job errors. diff --git a/ts/jobs/JobLogger.std.ts b/ts/jobs/JobLogger.std.ts index 77e78d4b17..b02025a373 100644 --- a/ts/jobs/JobLogger.std.ts +++ b/ts/jobs/JobLogger.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../types/Logging.std.js'; -import type { ParsedJob } from './types.std.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import type { ParsedJob } from './types.std.ts'; export class JobLogger implements LoggerType { #id: string; diff --git a/ts/jobs/JobManager.std.ts b/ts/jobs/JobManager.std.ts index 4b12e4df50..fe8f1dd190 100644 --- a/ts/jobs/JobManager.std.ts +++ b/ts/jobs/JobManager.std.ts @@ -1,22 +1,22 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as z from 'zod'; -import { MINUTE, SECOND } from '../util/durations/index.std.js'; +import { MINUTE, SECOND } from '../util/durations/index.std.ts'; import { explodePromise, type ExplodePromiseResultType, -} from '../util/explodePromise.std.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import { drop } from '../util/drop.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +} from '../util/explodePromise.std.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; import { type ExponentialBackoffOptionsType, exponentialBackoffSleepTime, -} from '../util/exponentialBackoff.std.js'; -import * as Errors from '../types/errors.std.js'; -import { sleep } from '../util/sleep.std.js'; -import type { JobCancelReason } from './types.std.js'; +} from '../util/exponentialBackoff.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import type { JobCancelReason } from './types.std.ts'; const log = createLogger('JobManager'); diff --git a/ts/jobs/JobQueue.std.ts b/ts/jobs/JobQueue.std.ts index 8be3ee50be..56276b6c93 100644 --- a/ts/jobs/JobQueue.std.ts +++ b/ts/jobs/JobQueue.std.ts @@ -5,17 +5,17 @@ import PQueue from 'p-queue'; import { v7 as uuid } from 'uuid'; import lodash from 'lodash'; -import { Job } from './Job.std.js'; -import { JobError } from './JobError.std.js'; -import type { ParsedJob, StoredJob, JobQueueStore } from './types.std.js'; -import { assertDev } from '../util/assert.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { JobLogger } from './JobLogger.std.js'; -import * as Errors from '../types/errors.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { drop } from '../util/drop.std.js'; -import { sleep } from '../util/sleep.std.js'; -import { SECOND } from '../util/durations/index.std.js'; +import { Job } from './Job.std.ts'; +import { JobError } from './JobError.std.ts'; +import type { ParsedJob, StoredJob, JobQueueStore } from './types.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { JobLogger } from './JobLogger.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; const { noop } = lodash; diff --git a/ts/jobs/JobQueueDatabaseStore.preload.ts b/ts/jobs/JobQueueDatabaseStore.preload.ts index d4b0c31c1c..d949ca577d 100644 --- a/ts/jobs/JobQueueDatabaseStore.preload.ts +++ b/ts/jobs/JobQueueDatabaseStore.preload.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { AsyncQueue } from '../util/AsyncQueue.std.js'; -import { concat, wrapPromise } from '../util/asyncIterables.std.js'; -import type { JobQueueStore, StoredJob } from './types.std.js'; -import { formatJobForInsert } from './formatJobForInsert.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { createLogger } from '../logging/log.std.js'; +import { AsyncQueue } from '../util/AsyncQueue.std.ts'; +import { concat, wrapPromise } from '../util/asyncIterables.std.ts'; +import type { JobQueueStore, StoredJob } from './types.std.ts'; +import { formatJobForInsert } from './formatJobForInsert.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; const { noop } = lodash; diff --git a/ts/jobs/callLinkRefreshJobQueue.preload.ts b/ts/jobs/callLinkRefreshJobQueue.preload.ts index a8bad28f59..d5d2e88e06 100644 --- a/ts/jobs/callLinkRefreshJobQueue.preload.ts +++ b/ts/jobs/callLinkRefreshJobQueue.preload.ts @@ -4,26 +4,26 @@ import * as z from 'zod'; import PQueue from 'p-queue'; import { CallLinkRootKey } from '@signalapp/ringrtc'; -import { createLogger } from '../logging/log.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.js'; -import type { ParsedJob, StoredJob } from './types.std.js'; -import type { JOB_STATUS } from './JobQueue.std.js'; -import { JobQueue } from './JobQueue.std.js'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; -import { DAY, SECOND } from '../util/durations/index.std.js'; -import { commonShouldJobContinue } from './helpers/commonShouldJobContinue.preload.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.ts'; +import type { ParsedJob, StoredJob } from './types.std.ts'; +import type { JOB_STATUS } from './JobQueue.std.ts'; +import { JobQueue } from './JobQueue.std.ts'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; +import { DAY, SECOND } from '../util/durations/index.std.ts'; +import { commonShouldJobContinue } from './helpers/commonShouldJobContinue.preload.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; import type { CallLinkType, PendingCallLinkType, -} from '../types/CallLink.std.js'; -import { calling } from '../services/calling.preload.js'; -import { sleeper } from '../util/sleeper.std.js'; -import { parseUnknown } from '../util/schemas.std.js'; -import { getRoomIdFromRootKey } from '../util/callLinksRingrtc.node.js'; -import { toCallHistoryFromUnusedCallLink } from '../util/callLinks.std.js'; -import type { StorageServiceFieldsType } from '../sql/Interface.std.js'; +} from '../types/CallLink.std.ts'; +import { calling } from '../services/calling.preload.ts'; +import { sleeper } from '../util/sleeper.std.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; +import { getRoomIdFromRootKey } from '../util/callLinksRingrtc.node.ts'; +import { toCallHistoryFromUnusedCallLink } from '../util/callLinks.std.ts'; +import type { StorageServiceFieldsType } from '../sql/Interface.std.ts'; const globalLogger = createLogger('callLinkRefreshJobQueue'); diff --git a/ts/jobs/conversationJobQueue.preload.ts b/ts/jobs/conversationJobQueue.preload.ts index ab8cba98a6..1619b54f82 100644 --- a/ts/jobs/conversationJobQueue.preload.ts +++ b/ts/jobs/conversationJobQueue.preload.ts @@ -3,62 +3,62 @@ import { z } from 'zod'; import type PQueue from 'p-queue'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; -import * as durations from '../util/durations/index.std.js'; -import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.js'; -import { InMemoryQueues } from './helpers/InMemoryQueues.std.js'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; -import { JOB_STATUS, JobQueue } from './JobQueue.std.js'; +import * as durations from '../util/durations/index.std.ts'; +import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.ts'; +import { InMemoryQueues } from './helpers/InMemoryQueues.std.ts'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; +import { JOB_STATUS, JobQueue } from './JobQueue.std.ts'; -import { sendNormalMessage } from './helpers/sendNormalMessage.preload.js'; -import { sendCallingMessage } from './helpers/sendCallingMessage.preload.js'; -import { sendDirectExpirationTimerUpdate } from './helpers/sendDirectExpirationTimerUpdate.preload.js'; -import { sendGroupCallUpdate } from './helpers/sendGroupCallUpdate.preload.js'; -import { sendGroupUpdate } from './helpers/sendGroupUpdate.preload.js'; -import { sendDeleteForEveryone } from './helpers/sendDeleteForEveryone.preload.js'; -import { sendDeleteStoryForEveryone } from './helpers/sendDeleteStoryForEveryone.preload.js'; -import { sendProfileKey } from './helpers/sendProfileKey.preload.js'; -import { sendReaction } from './helpers/sendReaction.preload.js'; -import { sendPollTerminate } from './helpers/sendPollTerminate.preload.js'; -import { sendPollVote } from './helpers/sendPollVote.preload.js'; -import { sendStory } from './helpers/sendStory.preload.js'; -import { sendReceipts } from './helpers/sendReceipts.preload.js'; +import { sendNormalMessage } from './helpers/sendNormalMessage.preload.ts'; +import { sendCallingMessage } from './helpers/sendCallingMessage.preload.ts'; +import { sendDirectExpirationTimerUpdate } from './helpers/sendDirectExpirationTimerUpdate.preload.ts'; +import { sendGroupCallUpdate } from './helpers/sendGroupCallUpdate.preload.ts'; +import { sendGroupUpdate } from './helpers/sendGroupUpdate.preload.ts'; +import { sendDeleteForEveryone } from './helpers/sendDeleteForEveryone.preload.ts'; +import { sendDeleteStoryForEveryone } from './helpers/sendDeleteStoryForEveryone.preload.ts'; +import { sendProfileKey } from './helpers/sendProfileKey.preload.ts'; +import { sendReaction } from './helpers/sendReaction.preload.ts'; +import { sendPollTerminate } from './helpers/sendPollTerminate.preload.ts'; +import { sendPollVote } from './helpers/sendPollVote.preload.ts'; +import { sendStory } from './helpers/sendStory.preload.ts'; +import { sendReceipts } from './helpers/sendReceipts.preload.ts'; -import type { LoggerType } from '../types/Logging.std.js'; -import { ConversationVerificationState } from '../state/ducks/conversationsEnums.std.js'; -import { MINUTE } from '../util/durations/index.std.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { ConversationVerificationState } from '../state/ducks/conversationsEnums.std.ts'; +import { MINUTE } from '../util/durations/index.std.ts'; import { OutgoingIdentityKeyError, SendMessageChallengeError, SendMessageProtoError, -} from '../textsecure/Errors.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import type { Job } from './Job.std.js'; -import type { ParsedJob, StoredJob } from './types.std.js'; +} from '../textsecure/Errors.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import type { Job } from './Job.std.ts'; +import type { ParsedJob, StoredJob } from './types.std.ts'; import { type MessageSender, messageSender, -} from '../textsecure/SendMessage.preload.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { commonShouldJobContinue } from './helpers/commonShouldJobContinue.preload.js'; -import { sleeper } from '../util/sleeper.std.js'; -import { receiptSchema, ReceiptType } from '../types/Receipt.std.js'; -import { serviceIdSchema, aciSchema } from '../types/ServiceId.std.js'; -import { sendResendRequest } from './helpers/sendResendRequest.preload.js'; -import { sendNullMessage } from './helpers/sendNullMessage.preload.js'; -import { sendSenderKeyDistribution } from './helpers/sendSenderKeyDistribution.preload.js'; -import { sendSavedProto } from './helpers/sendSavedProto.preload.js'; -import { drop } from '../util/drop.std.js'; -import { isInPast } from '../util/timestamp.std.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import { FIBONACCI } from '../util/BackOff.std.js'; -import { parseUnknown } from '../util/schemas.std.js'; -import { challengeHandler } from '../services/challengeHandler.preload.js'; -import { sendPinMessage } from './helpers/sendPinMessage.preload.js'; -import { sendUnpinMessage } from './helpers/sendUnpinMessage.preload.js'; +} from '../textsecure/SendMessage.preload.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { commonShouldJobContinue } from './helpers/commonShouldJobContinue.preload.ts'; +import { sleeper } from '../util/sleeper.std.ts'; +import { receiptSchema, ReceiptType } from '../types/Receipt.std.ts'; +import { serviceIdSchema, aciSchema } from '../types/ServiceId.std.ts'; +import { sendResendRequest } from './helpers/sendResendRequest.preload.ts'; +import { sendNullMessage } from './helpers/sendNullMessage.preload.ts'; +import { sendSenderKeyDistribution } from './helpers/sendSenderKeyDistribution.preload.ts'; +import { sendSavedProto } from './helpers/sendSavedProto.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { isInPast } from '../util/timestamp.std.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import { FIBONACCI } from '../util/BackOff.std.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; +import { challengeHandler } from '../services/challengeHandler.preload.ts'; +import { sendPinMessage } from './helpers/sendPinMessage.preload.ts'; +import { sendUnpinMessage } from './helpers/sendUnpinMessage.preload.ts'; const globalLogger = createLogger('conversationJobQueue'); diff --git a/ts/jobs/deleteDownloadsJobQueue.preload.ts b/ts/jobs/deleteDownloadsJobQueue.preload.ts index 6790d23871..1891e413e4 100644 --- a/ts/jobs/deleteDownloadsJobQueue.preload.ts +++ b/ts/jobs/deleteDownloadsJobQueue.preload.ts @@ -4,18 +4,18 @@ import { z } from 'zod'; import lodash from 'lodash'; -import { JobQueue } from './JobQueue.std.js'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; -import { parseUnknown } from '../util/schemas.std.js'; -import { deleteDownloadFile } from '../util/migrations.preload.js'; -import { DataReader } from '../sql/Client.preload.js'; +import { JobQueue } from './JobQueue.std.ts'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; +import { deleteDownloadFile } from '../util/migrations.preload.ts'; +import { DataReader } from '../sql/Client.preload.ts'; -import type { JOB_STATUS } from './JobQueue.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { commonShouldJobContinue } from './helpers/commonShouldJobContinue.preload.js'; -import { DAY } from '../util/durations/index.std.js'; -import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { JOB_STATUS } from './JobQueue.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { commonShouldJobContinue } from './helpers/commonShouldJobContinue.preload.ts'; +import { DAY } from '../util/durations/index.std.ts'; +import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { omit } = lodash; diff --git a/ts/jobs/formatJobForInsert.std.ts b/ts/jobs/formatJobForInsert.std.ts index dd5980078a..70dc589796 100644 --- a/ts/jobs/formatJobForInsert.std.ts +++ b/ts/jobs/formatJobForInsert.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ParsedJob, StoredJob } from './types.std.js'; +import type { ParsedJob, StoredJob } from './types.std.ts'; /** * Format a job to be inserted into the database. diff --git a/ts/jobs/groupAvatarJobQueue.preload.ts b/ts/jobs/groupAvatarJobQueue.preload.ts index ae9b55f059..11cc3851c4 100644 --- a/ts/jobs/groupAvatarJobQueue.preload.ts +++ b/ts/jobs/groupAvatarJobQueue.preload.ts @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as z from 'zod'; -import type { LoggerType } from '../types/Logging.std.js'; -import { applyNewAvatar } from '../groups.preload.js'; -import { isGroupV2 } from '../util/whatTypeOfConversation.dom.js'; -import { DataWriter } from '../sql/Client.preload.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { applyNewAvatar } from '../groups.preload.ts'; +import { isGroupV2 } from '../util/whatTypeOfConversation.dom.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; -import type { JOB_STATUS } from './JobQueue.std.js'; -import { JobQueue } from './JobQueue.std.js'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; -import { parseUnknown } from '../util/schemas.std.js'; -import { waitForOnline } from '../util/waitForOnline.dom.js'; -import { isOnline } from '../textsecure/WebAPI.preload.js'; +import type { JOB_STATUS } from './JobQueue.std.ts'; +import { JobQueue } from './JobQueue.std.ts'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; +import { waitForOnline } from '../util/waitForOnline.dom.ts'; +import { isOnline } from '../textsecure/WebAPI.preload.ts'; const groupAvatarJobDataSchema = z.object({ conversationId: z.string(), diff --git a/ts/jobs/helpers/addReportSpamJob.dom.ts b/ts/jobs/helpers/addReportSpamJob.dom.ts index 9e9e33d824..067c399705 100644 --- a/ts/jobs/helpers/addReportSpamJob.dom.ts +++ b/ts/jobs/helpers/addReportSpamJob.dom.ts @@ -1,12 +1,12 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { assertDev } from '../../util/assert.std.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import type { reportSpamJobQueue } from '../reportSpamJobQueue.preload.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; +import { assertDev } from '../../util/assert.std.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import type { reportSpamJobQueue } from '../reportSpamJobQueue.preload.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; const log = createLogger('addReportSpamJob'); diff --git a/ts/jobs/helpers/areAllErrorsUnregistered.dom.ts b/ts/jobs/helpers/areAllErrorsUnregistered.dom.ts index 79545a8a08..f98d37a1ee 100644 --- a/ts/jobs/helpers/areAllErrorsUnregistered.dom.ts +++ b/ts/jobs/helpers/areAllErrorsUnregistered.dom.ts @@ -5,8 +5,8 @@ import type { ConversationAttributesType } from '../../model-types.d.ts'; import { SendMessageProtoError, UnregisteredUserError, -} from '../../textsecure/Errors.std.js'; -import { isGroup } from '../../util/whatTypeOfConversation.dom.js'; +} from '../../textsecure/Errors.std.ts'; +import { isGroup } from '../../util/whatTypeOfConversation.dom.ts'; export function areAllErrorsUnregistered( conversation: ConversationAttributesType, diff --git a/ts/jobs/helpers/attachmentBackfill.preload.ts b/ts/jobs/helpers/attachmentBackfill.preload.ts index 7ca7e48880..847c95a588 100644 --- a/ts/jobs/helpers/attachmentBackfill.preload.ts +++ b/ts/jobs/helpers/attachmentBackfill.preload.ts @@ -1,49 +1,49 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentBackfillResponseSyncEvent } from '../../textsecure/messageReceiverEvents.std.js'; -import { MessageSender } from '../../textsecure/SendMessage.preload.js'; -import { createLogger } from '../../logging/log.std.js'; +import type { AttachmentBackfillResponseSyncEvent } from '../../textsecure/messageReceiverEvents.std.ts'; +import { MessageSender } from '../../textsecure/SendMessage.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; import type { ReadonlyMessageAttributesType } from '../../model-types.d.ts'; -import type { AttachmentType } from '../../types/Attachment.std.js'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; import { isDownloading, isDownloaded, isDownloadable, getUndownloadedAttachmentSignature, -} from '../../util/Attachment.std.js'; +} from '../../util/Attachment.std.ts'; import { type MessageAttachmentType, AttachmentDownloadUrgency, -} from '../../types/AttachmentDownload.std.js'; -import { AttachmentDownloadSource } from '../../sql/Interface.std.js'; -import { APPLICATION_OCTET_STREAM } from '../../types/MIME.std.js'; +} from '../../types/AttachmentDownload.std.ts'; +import { AttachmentDownloadSource } from '../../sql/Interface.std.ts'; +import { APPLICATION_OCTET_STREAM } from '../../types/MIME.std.ts'; import { getConversationIdentifier, getAddressableMessage, getConversationFromTarget, getMessageQueryFromTarget, findMatchingMessage, -} from '../../util/syncIdentifiers.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { drop } from '../../util/drop.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { isStagingServer } from '../../util/isStagingServer.dom.js'; +} from '../../util/syncIdentifiers.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { isStagingServer } from '../../util/isStagingServer.dom.ts'; import { ensureBodyAttachmentsAreSeparated, queueAttachmentDownloads, -} from '../../util/queueAttachmentDownloads.preload.js'; -import { SECOND } from '../../util/durations/index.std.js'; -import { showDownloadFailedToast } from '../../util/showDownloadFailedToast.dom.js'; -import { markAttachmentAsPermanentlyErrored } from '../../util/attachments/markAttachmentAsPermanentlyErrored.std.js'; -import { singleProtoJobQueue } from '../singleProtoJobQueue.preload.js'; -import { MessageModel } from '../../models/messages.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { addAttachmentToMessage } from '../../messageModifiers/AttachmentDownloads.preload.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; -import * as RemoteConfig from '../../RemoteConfig.dom.js'; -import { isTestOrMockEnvironment } from '../../environment.std.js'; -import { BackfillFailureKind } from '../../components/BackfillFailureModal.dom.js'; +} from '../../util/queueAttachmentDownloads.preload.ts'; +import { SECOND } from '../../util/durations/index.std.ts'; +import { showDownloadFailedToast } from '../../util/showDownloadFailedToast.dom.ts'; +import { markAttachmentAsPermanentlyErrored } from '../../util/attachments/markAttachmentAsPermanentlyErrored.std.ts'; +import { singleProtoJobQueue } from '../singleProtoJobQueue.preload.ts'; +import { MessageModel } from '../../models/messages.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { addAttachmentToMessage } from '../../messageModifiers/AttachmentDownloads.preload.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; +import * as RemoteConfig from '../../RemoteConfig.dom.ts'; +import { isTestOrMockEnvironment } from '../../environment.std.ts'; +import { BackfillFailureKind } from '../../components/BackfillFailureModal.dom.tsx'; const log = createLogger('attachmentBackfill'); diff --git a/ts/jobs/helpers/commonShouldJobContinue.preload.ts b/ts/jobs/helpers/commonShouldJobContinue.preload.ts index af6f30bcf5..556c335b25 100644 --- a/ts/jobs/helpers/commonShouldJobContinue.preload.ts +++ b/ts/jobs/helpers/commonShouldJobContinue.preload.ts @@ -1,13 +1,13 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { isOnline } from '../../textsecure/WebAPI.preload.js'; -import { waitForOnline } from '../../util/waitForOnline.dom.js'; -import { exponentialBackoffSleepTime } from '../../util/exponentialBackoff.std.js'; -import { isDone as isDeviceLinked } from '../../util/registration.preload.js'; -import { sleeper } from '../../util/sleeper.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { isOnline } from '../../textsecure/WebAPI.preload.ts'; +import { waitForOnline } from '../../util/waitForOnline.dom.ts'; +import { exponentialBackoffSleepTime } from '../../util/exponentialBackoff.std.ts'; +import { isDone as isDeviceLinked } from '../../util/registration.preload.ts'; +import { sleeper } from '../../util/sleeper.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; export async function commonShouldJobContinue({ attempt, diff --git a/ts/jobs/helpers/createSendMessageJob.preload.ts b/ts/jobs/helpers/createSendMessageJob.preload.ts index 50865b6d09..b53c02a678 100644 --- a/ts/jobs/helpers/createSendMessageJob.preload.ts +++ b/ts/jobs/helpers/createSendMessageJob.preload.ts @@ -2,24 +2,24 @@ // SPDX-License-Identifier: AGPL-3.0-only import { ContentHint } from '@signalapp/libsignal-client'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import { sendToGroup } from '../../util/sendToGroup.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import { sendToGroup } from '../../util/sendToGroup.preload.ts'; import { isDirectConversation, isGroupV2, -} from '../../util/whatTypeOfConversation.dom.js'; -import type { ConversationQueueJobBundle } from '../conversationJobQueue.preload.js'; -import { getSendRecipientLists } from './getSendRecipientLists.dom.js'; -import type { SendTypesType } from '../../util/handleMessageSend.preload.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import type { SharedMessageOptionsType } from '../../textsecure/SendMessage.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import type { ConversationQueueJobBundle } from '../conversationJobQueue.preload.ts'; +import { getSendRecipientLists } from './getSendRecipientLists.dom.ts'; +import type { SendTypesType } from '../../util/handleMessageSend.preload.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import type { SharedMessageOptionsType } from '../../textsecure/SendMessage.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; +} from './handleMultipleSendErrors.std.ts'; export type SendMessageJobOptions = Readonly<{ sendName: string; // ex: 'sendExampleMessage' diff --git a/ts/jobs/helpers/findRetryAfterTimeFromError.std.ts b/ts/jobs/helpers/findRetryAfterTimeFromError.std.ts index c2e50b440b..690e182153 100644 --- a/ts/jobs/helpers/findRetryAfterTimeFromError.std.ts +++ b/ts/jobs/helpers/findRetryAfterTimeFromError.std.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isRecord } from '../../util/isRecord.std.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; -import { parseRetryAfterWithDefault } from '../../util/parseRetryAfter.std.js'; +import { isRecord } from '../../util/isRecord.std.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; +import { parseRetryAfterWithDefault } from '../../util/parseRetryAfter.std.ts'; export function findRetryAfterTimeFromError( err: unknown, diff --git a/ts/jobs/helpers/getHttpErrorCode.std.ts b/ts/jobs/helpers/getHttpErrorCode.std.ts index e8abbe43dc..957bf40d1b 100644 --- a/ts/jobs/helpers/getHttpErrorCode.std.ts +++ b/ts/jobs/helpers/getHttpErrorCode.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isRecord } from '../../util/isRecord.std.js'; -import { parseIntWithFallback } from '../../util/parseIntWithFallback.std.js'; +import { isRecord } from '../../util/isRecord.std.ts'; +import { parseIntWithFallback } from '../../util/parseIntWithFallback.std.ts'; /** * Looks for an HTTP code. First tries the top level error, then looks at its `httpError` diff --git a/ts/jobs/helpers/getSendRecipientLists.dom.ts b/ts/jobs/helpers/getSendRecipientLists.dom.ts index 41fb9e5014..9269d0a0c8 100644 --- a/ts/jobs/helpers/getSendRecipientLists.dom.ts +++ b/ts/jobs/helpers/getSendRecipientLists.dom.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ServiceIdString } from '@signalapp/mock-server/src/types'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { isMe } from '../../util/whatTypeOfConversation.dom.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { isMe } from '../../util/whatTypeOfConversation.dom.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; export type SendRecipientLists = Readonly<{ allRecipientServiceIds: Array; diff --git a/ts/jobs/helpers/getUntrustedConversationServiceIds.dom.ts b/ts/jobs/helpers/getUntrustedConversationServiceIds.dom.ts index 65b5874555..b4062bd4d3 100644 --- a/ts/jobs/helpers/getUntrustedConversationServiceIds.dom.ts +++ b/ts/jobs/helpers/getUntrustedConversationServiceIds.dom.ts @@ -1,9 +1,9 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isNotNil } from '../../util/isNotNil.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; const log = createLogger('getUntrustedConversationServiceIds'); diff --git a/ts/jobs/helpers/getValidRecipients.dom.ts b/ts/jobs/helpers/getValidRecipients.dom.ts index d1acdad90b..d3048bd072 100644 --- a/ts/jobs/helpers/getValidRecipients.dom.ts +++ b/ts/jobs/helpers/getValidRecipients.dom.ts @@ -1,10 +1,10 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isNotNil } from '../../util/isNotNil.std.js'; +import { isNotNil } from '../../util/isNotNil.std.ts'; -import type { LoggerType } from '../../types/Logging.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; export function getValidRecipients( recipients: Array, diff --git a/ts/jobs/helpers/handleCommonJobRequestError.std.ts b/ts/jobs/helpers/handleCommonJobRequestError.std.ts index 21eda2839d..8270da47cd 100644 --- a/ts/jobs/helpers/handleCommonJobRequestError.std.ts +++ b/ts/jobs/helpers/handleCommonJobRequestError.std.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { sleepForRateLimitRetryAfterTime } from './sleepForRateLimitRetryAfterTime.std.js'; -import { getHttpErrorCode } from './getHttpErrorCode.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { sleepForRateLimitRetryAfterTime } from './sleepForRateLimitRetryAfterTime.std.ts'; +import { getHttpErrorCode } from './getHttpErrorCode.std.ts'; export async function handleCommonJobRequestError({ err, diff --git a/ts/jobs/helpers/handleMultipleSendErrors.std.ts b/ts/jobs/helpers/handleMultipleSendErrors.std.ts index dcd9709ab3..724c67a668 100644 --- a/ts/jobs/helpers/handleMultipleSendErrors.std.ts +++ b/ts/jobs/helpers/handleMultipleSendErrors.std.ts @@ -1,13 +1,13 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { sleepForRateLimitRetryAfterTime } from './sleepForRateLimitRetryAfterTime.std.js'; -import { getHttpErrorCode } from './getHttpErrorCode.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { findRetryAfterTimeFromError } from './findRetryAfterTimeFromError.std.js'; -import { SendMessageProtoError } from '../../textsecure/Errors.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { sleepForRateLimitRetryAfterTime } from './sleepForRateLimitRetryAfterTime.std.ts'; +import { getHttpErrorCode } from './getHttpErrorCode.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { findRetryAfterTimeFromError } from './findRetryAfterTimeFromError.std.ts'; +import { SendMessageProtoError } from '../../textsecure/Errors.std.ts'; export function maybeExpandErrors(error: unknown): ReadonlyArray { if (error instanceof SendMessageProtoError) { diff --git a/ts/jobs/helpers/sendCallingMessage.preload.ts b/ts/jobs/helpers/sendCallingMessage.preload.ts index a73d0a3fcf..89e1b142f9 100644 --- a/ts/jobs/helpers/sendCallingMessage.preload.ts +++ b/ts/jobs/helpers/sendCallingMessage.preload.ts @@ -3,32 +3,32 @@ import { ContentHint } from '@signalapp/libsignal-client'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; import { isDirectConversation, isGroup, -} from '../../util/whatTypeOfConversation.dom.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; +} from './handleMultipleSendErrors.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, CallingMessageJobData, -} from '../conversationJobQueue.preload.js'; -import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.js'; +} from '../conversationJobQueue.preload.ts'; +import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.ts'; import { OutgoingIdentityKeyError, UnregisteredUserError, -} from '../../textsecure/Errors.std.js'; -import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.js'; -import { sendContentMessageToGroup } from '../../util/sendToGroup.preload.js'; -import * as Bytes from '../../Bytes.std.js'; -import { getValidRecipients } from './getValidRecipients.dom.js'; +} from '../../textsecure/Errors.std.ts'; +import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.ts'; +import { sendContentMessageToGroup } from '../../util/sendToGroup.preload.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { getValidRecipients } from './getValidRecipients.dom.ts'; export async function sendCallingMessage( conversation: ConversationModel, diff --git a/ts/jobs/helpers/sendDeleteForEveryone.preload.ts b/ts/jobs/helpers/sendDeleteForEveryone.preload.ts index 4fd68049a7..89007de759 100644 --- a/ts/jobs/helpers/sendDeleteForEveryone.preload.ts +++ b/ts/jobs/helpers/sendDeleteForEveryone.preload.ts @@ -4,43 +4,43 @@ import { ContentHint } from '@signalapp/libsignal-client'; import lodash from 'lodash'; -import * as Errors from '../../types/errors.std.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; +import * as Errors from '../../types/errors.std.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; import { isDirectConversation, isGroupV2, isMe, -} from '../../util/whatTypeOfConversation.dom.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; -import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.js'; +} from './handleMultipleSendErrors.std.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; +import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, DeleteForEveryoneJobData, -} from '../conversationJobQueue.preload.js'; -import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; +} from '../conversationJobQueue.preload.ts'; +import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; import type { CallbackResultType } from '../../textsecure/Types.d.ts'; -import type { MessageModel } from '../../models/messages.preload.js'; -import { SendMessageProtoError } from '../../textsecure/Errors.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { isStory } from '../../messages/helpers.std.js'; -import { sendToGroup } from '../../util/sendToGroup.preload.js'; -import { getMessageSentTimestamp } from '../../util/getMessageSentTimestamp.std.js'; -import { getSourceServiceId } from '../../messages/sources.preload.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import type { SendDeleteForEveryoneType } from '../../textsecure/SendMessage.preload.js'; -import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.js'; +import type { MessageModel } from '../../models/messages.preload.ts'; +import { SendMessageProtoError } from '../../textsecure/Errors.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { isStory } from '../../messages/helpers.std.ts'; +import { sendToGroup } from '../../util/sendToGroup.preload.ts'; +import { getMessageSentTimestamp } from '../../util/getMessageSentTimestamp.std.ts'; +import { getSourceServiceId } from '../../messages/sources.preload.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import type { SendDeleteForEveryoneType } from '../../textsecure/SendMessage.preload.ts'; +import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.ts'; const { isNumber } = lodash; diff --git a/ts/jobs/helpers/sendDeleteStoryForEveryone.preload.ts b/ts/jobs/helpers/sendDeleteStoryForEveryone.preload.ts index e035726493..b3d0dd6cbb 100644 --- a/ts/jobs/helpers/sendDeleteStoryForEveryone.preload.ts +++ b/ts/jobs/helpers/sendDeleteStoryForEveryone.preload.ts @@ -3,36 +3,36 @@ import { ContentHint } from '@signalapp/libsignal-client'; -import * as Errors from '../../types/errors.std.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; +import * as Errors from '../../types/errors.std.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; import { isDirectConversation, isMe, -} from '../../util/whatTypeOfConversation.dom.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; +} from './handleMultipleSendErrors.std.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, DeleteStoryForEveryoneJobData, -} from '../conversationJobQueue.preload.js'; -import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; +} from '../conversationJobQueue.preload.ts'; +import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; import type { CallbackResultType } from '../../textsecure/Types.d.ts'; -import type { MessageModel } from '../../models/messages.preload.js'; -import { SendMessageProtoError } from '../../textsecure/Errors.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.js'; -import { isStory } from '../../messages/helpers.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.js'; +import type { MessageModel } from '../../models/messages.preload.ts'; +import { SendMessageProtoError } from '../../textsecure/Errors.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; +import { isStory } from '../../messages/helpers.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.ts'; export async function sendDeleteStoryForEveryone( ourConversation: ConversationModel, diff --git a/ts/jobs/helpers/sendDirectExpirationTimerUpdate.preload.ts b/ts/jobs/helpers/sendDirectExpirationTimerUpdate.preload.ts index 64d0f19d70..2757858916 100644 --- a/ts/jobs/helpers/sendDirectExpirationTimerUpdate.preload.ts +++ b/ts/jobs/helpers/sendDirectExpirationTimerUpdate.preload.ts @@ -3,27 +3,27 @@ import { ContentHint } from '@signalapp/libsignal-client'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; import { isDirectConversation, isMe, -} from '../../util/whatTypeOfConversation.dom.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; -import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; +} from './handleMultipleSendErrors.std.ts'; +import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ExpirationTimerUpdateJobData, ConversationQueueJobBundle, -} from '../conversationJobQueue.preload.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.js'; +} from '../conversationJobQueue.preload.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.ts'; export async function sendDirectExpirationTimerUpdate( conversation: ConversationModel, diff --git a/ts/jobs/helpers/sendGroupCallUpdate.preload.ts b/ts/jobs/helpers/sendGroupCallUpdate.preload.ts index 81ef0f607f..569e61e30c 100644 --- a/ts/jobs/helpers/sendGroupCallUpdate.preload.ts +++ b/ts/jobs/helpers/sendGroupCallUpdate.preload.ts @@ -3,22 +3,22 @@ import { ContentHint } from '@signalapp/libsignal-client'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import { isGroup } from '../../util/whatTypeOfConversation.dom.js'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import { isGroup } from '../../util/whatTypeOfConversation.dom.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; +} from './handleMultipleSendErrors.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, GroupCallUpdateJobData, -} from '../conversationJobQueue.preload.js'; -import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.js'; -import { sendToGroup } from '../../util/sendToGroup.preload.js'; -import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.js'; -import { getValidRecipients } from './getValidRecipients.dom.js'; +} from '../conversationJobQueue.preload.ts'; +import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.ts'; +import { sendToGroup } from '../../util/sendToGroup.preload.ts'; +import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.ts'; +import { getValidRecipients } from './getValidRecipients.dom.ts'; export async function sendGroupCallUpdate( conversation: ConversationModel, diff --git a/ts/jobs/helpers/sendGroupUpdate.preload.ts b/ts/jobs/helpers/sendGroupUpdate.preload.ts index 991d835e3d..6d8df45dd6 100644 --- a/ts/jobs/helpers/sendGroupUpdate.preload.ts +++ b/ts/jobs/helpers/sendGroupUpdate.preload.ts @@ -3,26 +3,26 @@ import { ContentHint } from '@signalapp/libsignal-client'; -import { getSendOptionsForRecipients } from '../../util/getSendOptions.preload.js'; -import { isGroupV2 } from '../../util/whatTypeOfConversation.dom.js'; +import { getSendOptionsForRecipients } from '../../util/getSendOptions.preload.ts'; +import { isGroupV2 } from '../../util/whatTypeOfConversation.dom.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; -import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.js'; -import * as Bytes from '../../Bytes.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; +} from './handleMultipleSendErrors.std.ts'; +import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import type { GroupV2InfoType } from '../../textsecure/SendMessage.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import type { GroupV2InfoType } from '../../textsecure/SendMessage.preload.ts'; import type { GroupUpdateJobData, ConversationQueueJobBundle, -} from '../conversationJobQueue.preload.js'; -import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.js'; -import { sendToGroup } from '../../util/sendToGroup.preload.js'; -import { getValidRecipients } from './getValidRecipients.dom.js'; +} from '../conversationJobQueue.preload.ts'; +import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.ts'; +import { sendToGroup } from '../../util/sendToGroup.preload.ts'; +import { getValidRecipients } from './getValidRecipients.dom.ts'; // Note: because we don't have a recipient map, if some sends fail, we will resend this // message to folks that got it on the first go-round. This is okay, because receivers diff --git a/ts/jobs/helpers/sendNormalMessage.preload.ts b/ts/jobs/helpers/sendNormalMessage.preload.ts index 83844b87a3..5ca670202e 100644 --- a/ts/jobs/helpers/sendNormalMessage.preload.ts +++ b/ts/jobs/helpers/sendNormalMessage.preload.ts @@ -5,81 +5,81 @@ import lodash from 'lodash'; import PQueue from 'p-queue'; import { ContentHint } from '@signalapp/libsignal-client'; -import * as Errors from '../../types/errors.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { MessageModel } from '../../models/messages.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import * as Errors from '../../types/errors.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { MessageModel } from '../../models/messages.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import { isGroup, isGroupV2, isMe, -} from '../../util/whatTypeOfConversation.dom.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { findAndFormatContact } from '../../util/findAndFormatContact.preload.js'; -import { uploadAttachment } from '../../util/uploadAttachment.preload.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { findAndFormatContact } from '../../util/findAndFormatContact.preload.ts'; +import { uploadAttachment } from '../../util/uploadAttachment.preload.ts'; import { loadAttachmentData, loadQuoteData, loadPreviewData, loadStickerData, loadContactData, -} from '../../util/migrations.preload.js'; +} from '../../util/migrations.preload.ts'; import type { CallbackResultType } from '../../textsecure/Types.d.ts'; -import { isSent } from '../../messages/MessageSendState.std.js'; -import { isOutgoing, canReact } from '../../state/selectors/message.preload.js'; +import { isSent } from '../../messages/MessageSendState.std.ts'; +import { isOutgoing, canReact } from '../../state/selectors/message.preload.ts'; import type { ReactionType, OutgoingQuoteType, OutgoingQuoteAttachmentType, OutgoingLinkPreviewType, OutgoingStickerType, -} from '../../textsecure/SendMessage.preload.js'; +} from '../../textsecure/SendMessage.preload.ts'; import type { AttachmentType, UploadedAttachmentType, -} from '../../types/Attachment.std.js'; -import { copyCdnFields } from '../../util/attachments.preload.js'; -import type { RawBodyRange } from '../../types/BodyRange.std.js'; -import type { EmbeddedContactWithUploadedAvatar } from '../../types/EmbeddedContact.std.js'; -import type { StoryContextType } from '../../types/Util.std.js'; -import type { PollCreateType } from '../../types/Polls.dom.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { GROUP } from '../../types/Message2.preload.js'; +} from '../../types/Attachment.std.ts'; +import { copyCdnFields } from '../../util/attachments.preload.ts'; +import type { RawBodyRange } from '../../types/BodyRange.std.ts'; +import type { EmbeddedContactWithUploadedAvatar } from '../../types/EmbeddedContact.std.ts'; +import type { StoryContextType } from '../../types/Util.std.ts'; +import type { PollCreateType } from '../../types/Polls.dom.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { GROUP } from '../../types/Message2.preload.ts'; import type { ConversationQueueJobBundle, NormalMessageSendJobData, -} from '../conversationJobQueue.preload.js'; +} from '../conversationJobQueue.preload.ts'; import type { QuotedMessageType } from '../../model-types.d.ts'; -import { handleMultipleSendErrors } from './handleMultipleSendErrors.std.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; -import { sendToGroup } from '../../util/sendToGroup.preload.js'; -import type { DurationInSeconds } from '../../util/durations/index.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; +import { handleMultipleSendErrors } from './handleMultipleSendErrors.std.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; +import { sendToGroup } from '../../util/sendToGroup.preload.ts'; +import type { DurationInSeconds } from '../../util/durations/index.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; import { getPropForTimestamp, getTargetOfThisEditTimestamp, getChangesForPropAtTimestamp, -} from '../../util/editHelpers.std.js'; -import { getMessageSentTimestamp } from '../../util/getMessageSentTimestamp.std.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; +} from '../../util/editHelpers.std.ts'; +import { getMessageSentTimestamp } from '../../util/getMessageSentTimestamp.std.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; import { isBodyTooLong, MAX_BODY_ATTACHMENT_BYTE_LENGTH, trimBody, -} from '../../util/longAttachment.std.js'; +} from '../../util/longAttachment.std.ts'; import { markFailed, saveErrorsOnMessage, -} from '../../test-node/util/messageFailures.preload.js'; -import { getMessageIdForLogging } from '../../util/idForLogging.preload.js'; -import { send, sendSyncMessageOnly } from '../../messages/send.preload.js'; -import type { SignalService } from '../../protobuf/index.std.js'; -import { eraseMessageContents } from '../../util/cleanup.preload.js'; -import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.js'; +} from '../../test-node/util/messageFailures.preload.ts'; +import { getMessageIdForLogging } from '../../util/idForLogging.preload.ts'; +import { send, sendSyncMessageOnly } from '../../messages/send.preload.ts'; +import type { SignalService } from '../../protobuf/index.std.ts'; +import { eraseMessageContents } from '../../util/cleanup.preload.ts'; +import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.ts'; const { isNumber } = lodash; diff --git a/ts/jobs/helpers/sendNullMessage.preload.ts b/ts/jobs/helpers/sendNullMessage.preload.ts index 0bf09c65e3..be881c1ff3 100644 --- a/ts/jobs/helpers/sendNullMessage.preload.ts +++ b/ts/jobs/helpers/sendNullMessage.preload.ts @@ -3,29 +3,29 @@ import { ContentHint } from '@signalapp/libsignal-client'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; +} from './handleMultipleSendErrors.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, NullMessageJobData, -} from '../conversationJobQueue.preload.js'; +} from '../conversationJobQueue.preload.ts'; import type { SessionResetsType } from '../../textsecure/Types.d.ts'; -import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.js'; +import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.ts'; import { OutgoingIdentityKeyError, UnregisteredUserError, -} from '../../textsecure/Errors.std.js'; -import { MessageSender } from '../../textsecure/SendMessage.preload.js'; -import { sendToGroup } from '../../util/sendToGroup.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../textsecure/Errors.std.ts'; +import { MessageSender } from '../../textsecure/SendMessage.preload.ts'; +import { sendToGroup } from '../../util/sendToGroup.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; async function clearResetsTracking(idForTracking: string | undefined) { if (!idForTracking) { diff --git a/ts/jobs/helpers/sendPinMessage.preload.ts b/ts/jobs/helpers/sendPinMessage.preload.ts index b8845c6712..ac5e7bbba9 100644 --- a/ts/jobs/helpers/sendPinMessage.preload.ts +++ b/ts/jobs/helpers/sendPinMessage.preload.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { PinMessageJobData } from '../conversationJobQueue.preload.js'; -import { createSendMessageJob } from './createSendMessageJob.preload.js'; +import type { PinMessageJobData } from '../conversationJobQueue.preload.ts'; +import { createSendMessageJob } from './createSendMessageJob.preload.ts'; export const sendPinMessage = createSendMessageJob({ sendName: 'sendPinMessage', diff --git a/ts/jobs/helpers/sendPollTerminate.preload.ts b/ts/jobs/helpers/sendPollTerminate.preload.ts index 42a3be8933..58d05785f7 100644 --- a/ts/jobs/helpers/sendPollTerminate.preload.ts +++ b/ts/jobs/helpers/sendPollTerminate.preload.ts @@ -4,39 +4,39 @@ import { ContentHint } from '@signalapp/libsignal-client'; import lodash from 'lodash'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, PollTerminateJobData, -} from '../conversationJobQueue.preload.js'; -import { PollTerminateSendStatus } from '../../types/Polls.dom.js'; -import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.js'; -import { sendContentMessageToGroup } from '../../util/sendToGroup.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; +} from '../conversationJobQueue.preload.ts'; +import { PollTerminateSendStatus } from '../../types/Polls.dom.ts'; +import { wrapWithSyncMessageSend } from '../../util/wrapWithSyncMessageSend.preload.ts'; +import { sendContentMessageToGroup } from '../../util/sendToGroup.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; import { isGroupV2, isDirectConversation, isMe, -} from '../../util/whatTypeOfConversation.dom.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; -import { getRecipients } from '../../util/getRecipients.dom.js'; -import type { MessageModel } from '../../models/messages.preload.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { cleanupMessages } from '../../util/cleanup.preload.js'; -import { addPniSignatureMessageToProto } from '../../textsecure/SendMessage.preload.js'; +} from './handleMultipleSendErrors.std.ts'; +import { getRecipients } from '../../util/getRecipients.dom.ts'; +import type { MessageModel } from '../../models/messages.preload.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { cleanupMessages } from '../../util/cleanup.preload.ts'; +import { addPniSignatureMessageToProto } from '../../textsecure/SendMessage.preload.ts'; import { shouldSendToConversation, shouldSendToDirectConversation, -} from './shouldSendToConversation.preload.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; +} from './shouldSendToConversation.preload.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; const { isNumber } = lodash; diff --git a/ts/jobs/helpers/sendPollVote.preload.ts b/ts/jobs/helpers/sendPollVote.preload.ts index ce89574c81..fa8a033583 100644 --- a/ts/jobs/helpers/sendPollVote.preload.ts +++ b/ts/jobs/helpers/sendPollVote.preload.ts @@ -2,38 +2,38 @@ // SPDX-License-Identifier: AGPL-3.0-only import { ContentHint } from '@signalapp/libsignal-client'; -import * as Errors from '../../types/errors.std.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { sendContentMessageToGroup } from '../../util/sendToGroup.preload.js'; -import { MessageModel } from '../../models/messages.preload.js'; -import { generateMessageId } from '../../util/generateMessageId.node.js'; -import { incrementMessageCounter } from '../../util/incrementMessageCounter.preload.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; -import { send, sendSyncMessageOnly } from '../../messages/send.preload.js'; -import { handleMultipleSendErrors } from './handleMultipleSendErrors.std.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; +import * as Errors from '../../types/errors.std.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { sendContentMessageToGroup } from '../../util/sendToGroup.preload.ts'; +import { MessageModel } from '../../models/messages.preload.ts'; +import { generateMessageId } from '../../util/generateMessageId.node.ts'; +import { incrementMessageCounter } from '../../util/incrementMessageCounter.preload.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; +import { send, sendSyncMessageOnly } from '../../messages/send.preload.ts'; +import { handleMultipleSendErrors } from './handleMultipleSendErrors.std.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; import { isSent, SendStatus, type SendStateByConversationId, -} from '../../messages/MessageSendState.std.js'; -import type { MessagePollVoteType } from '../../types/Polls.dom.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +} from '../../messages/MessageSendState.std.ts'; +import type { MessagePollVoteType } from '../../types/Polls.dom.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, PollVoteJobData, -} from '../conversationJobQueue.preload.js'; -import * as pollVoteUtil from '../../polls/util.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getSendRecipientLists } from './getSendRecipientLists.dom.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; +} from '../conversationJobQueue.preload.ts'; +import * as pollVoteUtil from '../../polls/util.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getSendRecipientLists } from './getSendRecipientLists.dom.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; import type { CallbackResultType } from '../../textsecure/Types.d.ts'; -import { addPniSignatureMessageToProto } from '../../textsecure/SendMessage.preload.js'; +import { addPniSignatureMessageToProto } from '../../textsecure/SendMessage.preload.ts'; import { shouldSendToConversation, shouldSendToDirectConversation, -} from './shouldSendToConversation.preload.js'; +} from './shouldSendToConversation.preload.ts'; export async function sendPollVote( conversation: ConversationModel, diff --git a/ts/jobs/helpers/sendProfileKey.preload.ts b/ts/jobs/helpers/sendProfileKey.preload.ts index a1ecfaf6fd..e1f549fc5f 100644 --- a/ts/jobs/helpers/sendProfileKey.preload.ts +++ b/ts/jobs/helpers/sendProfileKey.preload.ts @@ -4,38 +4,38 @@ import lodash from 'lodash'; import { ContentHint } from '@signalapp/libsignal-client'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; import { isDirectConversation, isGroup, isGroupV2, -} from '../../util/whatTypeOfConversation.dom.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; +} from './handleMultipleSendErrors.std.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, ProfileKeyJobData, -} from '../conversationJobQueue.preload.js'; +} from '../conversationJobQueue.preload.ts'; import type { CallbackResultType } from '../../textsecure/Types.d.ts'; -import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.js'; +import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.ts'; import type { ConversationAttributesType } from '../../model-types.d.ts'; import { OutgoingIdentityKeyError, SendMessageChallengeError, SendMessageProtoError, UnregisteredUserError, -} from '../../textsecure/Errors.std.js'; -import { shouldSendToConversation } from './shouldSendToConversation.preload.js'; -import { sendToGroup } from '../../util/sendToGroup.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../textsecure/Errors.std.ts'; +import { shouldSendToConversation } from './shouldSendToConversation.preload.ts'; +import { sendToGroup } from '../../util/sendToGroup.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; const { isNumber } = lodash; diff --git a/ts/jobs/helpers/sendReaction.preload.ts b/ts/jobs/helpers/sendReaction.preload.ts index 55e97b886e..44100fe8d7 100644 --- a/ts/jobs/helpers/sendReaction.preload.ts +++ b/ts/jobs/helpers/sendReaction.preload.ts @@ -4,43 +4,43 @@ import lodash from 'lodash'; import { ContentHint } from '@signalapp/libsignal-client'; -import * as Errors from '../../types/errors.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { repeat, zipObject } from '../../util/iterables.std.js'; +import * as Errors from '../../types/errors.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { repeat, zipObject } from '../../util/iterables.std.ts'; import type { CallbackResultType } from '../../textsecure/Types.d.ts'; -import { MessageModel } from '../../models/messages.preload.js'; +import { MessageModel } from '../../models/messages.preload.ts'; import type { MessageReactionType } from '../../model-types.d.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; -import * as reactionUtil from '../../reactions/util.std.js'; -import { isSent, SendStatus } from '../../messages/MessageSendState.std.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { isIncoming } from '../../messages/helpers.std.js'; +import * as reactionUtil from '../../reactions/util.std.ts'; +import { isSent, SendStatus } from '../../messages/MessageSendState.std.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { isIncoming } from '../../messages/helpers.std.ts'; import { isDirectConversation, isGroupV2, -} from '../../util/whatTypeOfConversation.dom.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; -import { canReact, isStory } from '../../state/selectors/message.preload.js'; -import { findAndFormatContact } from '../../util/findAndFormatContact.preload.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import { handleMultipleSendErrors } from './handleMultipleSendErrors.std.js'; -import { incrementMessageCounter } from '../../util/incrementMessageCounter.preload.js'; -import { generateMessageId } from '../../util/generateMessageId.node.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; +import { canReact, isStory } from '../../state/selectors/message.preload.ts'; +import { findAndFormatContact } from '../../util/findAndFormatContact.preload.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import { handleMultipleSendErrors } from './handleMultipleSendErrors.std.ts'; +import { incrementMessageCounter } from '../../util/incrementMessageCounter.preload.ts'; +import { generateMessageId } from '../../util/generateMessageId.node.ts'; import type { ConversationQueueJobBundle, ReactionJobData, -} from '../conversationJobQueue.preload.js'; -import { sendToGroup } from '../../util/sendToGroup.preload.js'; -import { hydrateStoryContext } from '../../util/hydrateStoryContext.preload.js'; -import { send, sendSyncMessageOnly } from '../../messages/send.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { getSendRecipientLists } from './getSendRecipientLists.dom.js'; -import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.js'; +} from '../conversationJobQueue.preload.ts'; +import { sendToGroup } from '../../util/sendToGroup.preload.ts'; +import { hydrateStoryContext } from '../../util/hydrateStoryContext.preload.ts'; +import { send, sendSyncMessageOnly } from '../../messages/send.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { getSendRecipientLists } from './getSendRecipientLists.dom.ts'; +import { shouldSendToDirectConversation } from './shouldSendToConversation.preload.ts'; const { isNumber } = lodash; diff --git a/ts/jobs/helpers/sendReceipts.preload.ts b/ts/jobs/helpers/sendReceipts.preload.ts index 221f0561f0..5bf8c68859 100644 --- a/ts/jobs/helpers/sendReceipts.preload.ts +++ b/ts/jobs/helpers/sendReceipts.preload.ts @@ -1,13 +1,13 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationModel } from '../../models/conversations.preload.js'; -import { sendReceipts as sendReceiptsTask } from '../../util/sendReceipts.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import { sendReceipts as sendReceiptsTask } from '../../util/sendReceipts.preload.ts'; import type { ConversationQueueJobBundle, ReceiptsJobData, -} from '../conversationJobQueue.preload.js'; -import { shouldSendToConversation } from './shouldSendToConversation.preload.js'; +} from '../conversationJobQueue.preload.ts'; +import { shouldSendToConversation } from './shouldSendToConversation.preload.ts'; export async function sendReceipts( conversation: ConversationModel, diff --git a/ts/jobs/helpers/sendResendRequest.preload.ts b/ts/jobs/helpers/sendResendRequest.preload.ts index 710415f2df..5cc5512b07 100644 --- a/ts/jobs/helpers/sendResendRequest.preload.ts +++ b/ts/jobs/helpers/sendResendRequest.preload.ts @@ -3,31 +3,31 @@ import { ContentHint, PlaintextContent } from '@signalapp/libsignal-client'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; +} from './handleMultipleSendErrors.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, ResendRequestJobData, -} from '../conversationJobQueue.preload.js'; -import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.js'; +} from '../conversationJobQueue.preload.ts'; +import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.ts'; import { OutgoingIdentityKeyError, UnregisteredUserError, -} from '../../textsecure/Errors.std.js'; -import { drop } from '../../util/drop.std.js'; -import type { DecryptionErrorEventData } from '../../textsecure/messageReceiverEvents.std.js'; -import { retryPlaceholders } from '../../services/retryPlaceholders.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { startAutomaticSessionReset } from '../../util/handleRetry.preload.js'; -import * as Bytes from '../../Bytes.std.js'; -import { getSelectedConversationId } from '../../state/selectors/nav.std.js'; +} from '../../textsecure/Errors.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import type { DecryptionErrorEventData } from '../../textsecure/messageReceiverEvents.std.ts'; +import { retryPlaceholders } from '../../services/retryPlaceholders.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { startAutomaticSessionReset } from '../../util/handleRetry.preload.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { getSelectedConversationId } from '../../state/selectors/nav.std.ts'; function failoverToLocalReset( logger: LoggerType, diff --git a/ts/jobs/helpers/sendSavedProto.preload.ts b/ts/jobs/helpers/sendSavedProto.preload.ts index f53a8f522b..43fb571032 100644 --- a/ts/jobs/helpers/sendSavedProto.preload.ts +++ b/ts/jobs/helpers/sendSavedProto.preload.ts @@ -1,26 +1,26 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; +} from './handleMultipleSendErrors.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, SavedProtoJobData, -} from '../conversationJobQueue.preload.js'; -import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.js'; +} from '../conversationJobQueue.preload.ts'; +import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.ts'; import { OutgoingIdentityKeyError, UnregisteredUserError, -} from '../../textsecure/Errors.std.js'; -import * as Bytes from '../../Bytes.std.js'; +} from '../../textsecure/Errors.std.ts'; +import * as Bytes from '../../Bytes.std.ts'; export async function sendSavedProto( conversation: ConversationModel, diff --git a/ts/jobs/helpers/sendSenderKeyDistribution.preload.ts b/ts/jobs/helpers/sendSenderKeyDistribution.preload.ts index 6cd3d3a703..cdb24b4716 100644 --- a/ts/jobs/helpers/sendSenderKeyDistribution.preload.ts +++ b/ts/jobs/helpers/sendSenderKeyDistribution.preload.ts @@ -1,26 +1,26 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './handleMultipleSendErrors.std.js'; +} from './handleMultipleSendErrors.std.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, SenderKeyDistributionJobData, -} from '../conversationJobQueue.preload.js'; -import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.js'; +} from '../conversationJobQueue.preload.ts'; +import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.ts'; import { NoSenderKeyError, OutgoingIdentityKeyError, UnregisteredUserError, -} from '../../textsecure/Errors.std.js'; -import { shouldSendToConversation } from './shouldSendToConversation.preload.js'; +} from '../../textsecure/Errors.std.ts'; +import { shouldSendToConversation } from './shouldSendToConversation.preload.ts'; // Note: in regular scenarios, sender keys are sent as part of a group send. This job type // is only used in decryption error recovery scenarios. diff --git a/ts/jobs/helpers/sendStory.preload.ts b/ts/jobs/helpers/sendStory.preload.ts index 8aa5394776..d9079a172e 100644 --- a/ts/jobs/helpers/sendStory.preload.ts +++ b/ts/jobs/helpers/sendStory.preload.ts @@ -4,55 +4,55 @@ import lodash from 'lodash'; import { ContentHint } from '@signalapp/libsignal-client'; -import type { UploadedAttachmentType } from '../../types/Attachment.std.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { UploadedAttachmentType } from '../../types/Attachment.std.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { ConversationQueueJobBundle, StoryJobData, -} from '../conversationJobQueue.preload.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import type { MessageModel } from '../../models/messages.preload.js'; +} from '../conversationJobQueue.preload.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { MessageModel } from '../../models/messages.preload.ts'; import type { SendState, SendStateByConversationId, -} from '../../messages/MessageSendState.std.js'; +} from '../../messages/MessageSendState.std.ts'; import { isSent, SendActionType, sendStateReducer, -} from '../../messages/MessageSendState.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import type { StoryDistributionIdString } from '../../types/StoryDistributionId.std.js'; -import * as Errors from '../../types/errors.std.js'; -import type { StoryMessageRecipientsType } from '../../types/Stories.std.js'; -import { DataReader } from '../../sql/Client.preload.js'; -import type { SignalService as Proto } from '../../protobuf/index.std.js'; -import { getMessagesById } from '../../messages/getMessagesById.preload.js'; +} from '../../messages/MessageSendState.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import type { StoryDistributionIdString } from '../../types/StoryDistributionId.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import type { StoryMessageRecipientsType } from '../../types/Stories.std.ts'; +import { DataReader } from '../../sql/Client.preload.ts'; +import type { SignalService as Proto } from '../../protobuf/index.std.ts'; +import { getMessagesById } from '../../messages/getMessagesById.preload.ts'; import { getSendOptions, getSendOptionsForRecipients, -} from '../../util/getSendOptions.preload.js'; +} from '../../util/getSendOptions.preload.ts'; import { loadPreviewData, loadAttachmentData, -} from '../../util/migrations.preload.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { handleMultipleSendErrors } from './handleMultipleSendErrors.std.js'; -import { isGroupV2, isMe } from '../../util/whatTypeOfConversation.dom.js'; -import { ourProfileKeyService } from '../../services/ourProfileKey.std.js'; -import { challengeHandler } from '../../services/challengeHandler.preload.js'; -import { sendContentMessageToGroup } from '../../util/sendToGroup.preload.js'; -import { distributionListToSendTarget } from '../../util/distributionListToSendTarget.preload.js'; -import { uploadAttachment } from '../../util/uploadAttachment.preload.js'; -import { SendMessageChallengeError } from '../../textsecure/Errors.std.js'; -import type { OutgoingTextAttachmentType } from '../../textsecure/SendMessage.preload.js'; +} from '../../util/migrations.preload.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { handleMultipleSendErrors } from './handleMultipleSendErrors.std.ts'; +import { isGroupV2, isMe } from '../../util/whatTypeOfConversation.dom.ts'; +import { ourProfileKeyService } from '../../services/ourProfileKey.std.ts'; +import { challengeHandler } from '../../services/challengeHandler.preload.ts'; +import { sendContentMessageToGroup } from '../../util/sendToGroup.preload.ts'; +import { distributionListToSendTarget } from '../../util/distributionListToSendTarget.preload.ts'; +import { uploadAttachment } from '../../util/uploadAttachment.preload.ts'; +import { SendMessageChallengeError } from '../../textsecure/Errors.std.ts'; +import type { OutgoingTextAttachmentType } from '../../textsecure/SendMessage.preload.ts'; import { markFailed, notifyStorySendFailed, saveErrorsOnMessage, -} from '../../test-node/util/messageFailures.preload.js'; -import { send } from '../../messages/send.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../test-node/util/messageFailures.preload.ts'; +import { send } from '../../messages/send.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; const { isEqual } = lodash; diff --git a/ts/jobs/helpers/sendUnpinMessage.preload.ts b/ts/jobs/helpers/sendUnpinMessage.preload.ts index 69bf2b582e..0f2cf897b9 100644 --- a/ts/jobs/helpers/sendUnpinMessage.preload.ts +++ b/ts/jobs/helpers/sendUnpinMessage.preload.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { UnpinMessageJobData } from '../conversationJobQueue.preload.js'; -import { createSendMessageJob } from './createSendMessageJob.preload.js'; +import type { UnpinMessageJobData } from '../conversationJobQueue.preload.ts'; +import { createSendMessageJob } from './createSendMessageJob.preload.ts'; export const sendUnpinMessage = createSendMessageJob({ sendName: 'sendUnpinMessage', diff --git a/ts/jobs/helpers/shouldSendToConversation.preload.ts b/ts/jobs/helpers/shouldSendToConversation.preload.ts index 25f8bb031a..956a750e9a 100644 --- a/ts/jobs/helpers/shouldSendToConversation.preload.ts +++ b/ts/jobs/helpers/shouldSendToConversation.preload.ts @@ -1,13 +1,13 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationModel } from '../../models/conversations.preload.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { getRecipients } from '../../util/getRecipients.dom.js'; -import { isConversationAccepted } from '../../util/isConversationAccepted.preload.js'; -import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; -import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { getRecipients } from '../../util/getRecipients.dom.ts'; +import { isConversationAccepted } from '../../util/isConversationAccepted.preload.ts'; +import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; +import { getUntrustedConversationServiceIds } from './getUntrustedConversationServiceIds.dom.ts'; type ConversationForDirectSendType = Pick< ConversationModel, diff --git a/ts/jobs/helpers/sleepForRateLimitRetryAfterTime.std.ts b/ts/jobs/helpers/sleepForRateLimitRetryAfterTime.std.ts index 5d1dd37664..3b0a8216ff 100644 --- a/ts/jobs/helpers/sleepForRateLimitRetryAfterTime.std.ts +++ b/ts/jobs/helpers/sleepForRateLimitRetryAfterTime.std.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { sleeper } from '../../util/sleeper.std.js'; -import { findRetryAfterTimeFromError } from './findRetryAfterTimeFromError.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { sleeper } from '../../util/sleeper.std.ts'; +import { findRetryAfterTimeFromError } from './findRetryAfterTimeFromError.std.ts'; export async function sleepForRateLimitRetryAfterTime({ err, diff --git a/ts/jobs/helpers/syncHelpers.preload.ts b/ts/jobs/helpers/syncHelpers.preload.ts index 0faf2f6153..b97e9af7a0 100644 --- a/ts/jobs/helpers/syncHelpers.preload.ts +++ b/ts/jobs/helpers/syncHelpers.preload.ts @@ -2,23 +2,23 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import type { LoggerType } from '../../types/Logging.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; -import { getSendOptions } from '../../util/getSendOptions.preload.js'; -import type { SendTypesType } from '../../util/handleMessageSend.preload.js'; -import { handleMessageSend } from '../../util/handleMessageSend.preload.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { isRecord } from '../../util/isRecord.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; +import { getSendOptions } from '../../util/getSendOptions.preload.ts'; +import type { SendTypesType } from '../../util/handleMessageSend.preload.ts'; +import { handleMessageSend } from '../../util/handleMessageSend.preload.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { isRecord } from '../../util/isRecord.std.ts'; -import { commonShouldJobContinue } from './commonShouldJobContinue.preload.js'; -import { handleCommonJobRequestError } from './handleCommonJobRequestError.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; +import { commonShouldJobContinue } from './commonShouldJobContinue.preload.ts'; +import { handleCommonJobRequestError } from './handleCommonJobRequestError.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; import { type MessageSender, messageSender, -} from '../../textsecure/SendMessage.preload.js'; +} from '../../textsecure/SendMessage.preload.ts'; const { chunk } = lodash; diff --git a/ts/jobs/initializeAllJobQueues.preload.ts b/ts/jobs/initializeAllJobQueues.preload.ts index 709d5e33d9..056243be18 100644 --- a/ts/jobs/initializeAllJobQueues.preload.ts +++ b/ts/jobs/initializeAllJobQueues.preload.ts @@ -1,21 +1,21 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { reportMessage, isOnline } from '../textsecure/WebAPI.preload.js'; -import { drop } from '../util/drop.std.js'; -import { CallLinkFinalizeDeleteManager } from './CallLinkFinalizeDeleteManager.preload.js'; -import { chatFolderCleanupService } from '../services/expiring/chatFolderCleanupService.preload.js'; -import { pinnedMessagesCleanupService } from '../services/expiring/pinnedMessagesCleanupService.preload.js'; -import { callLinkRefreshJobQueue } from './callLinkRefreshJobQueue.preload.js'; -import { conversationJobQueue } from './conversationJobQueue.preload.js'; -import { deleteDownloadsJobQueue } from './deleteDownloadsJobQueue.preload.js'; -import { groupAvatarJobQueue } from './groupAvatarJobQueue.preload.js'; -import { readSyncJobQueue } from './readSyncJobQueue.preload.js'; -import { removeStorageKeyJobQueue } from './removeStorageKeyJobQueue.preload.js'; -import { reportSpamJobQueue } from './reportSpamJobQueue.preload.js'; -import { singleProtoJobQueue } from './singleProtoJobQueue.preload.js'; -import { viewOnceOpenJobQueue } from './viewOnceOpenJobQueue.preload.js'; -import { viewSyncJobQueue } from './viewSyncJobQueue.preload.js'; +import type { reportMessage, isOnline } from '../textsecure/WebAPI.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { CallLinkFinalizeDeleteManager } from './CallLinkFinalizeDeleteManager.preload.ts'; +import { chatFolderCleanupService } from '../services/expiring/chatFolderCleanupService.preload.ts'; +import { pinnedMessagesCleanupService } from '../services/expiring/pinnedMessagesCleanupService.preload.ts'; +import { callLinkRefreshJobQueue } from './callLinkRefreshJobQueue.preload.ts'; +import { conversationJobQueue } from './conversationJobQueue.preload.ts'; +import { deleteDownloadsJobQueue } from './deleteDownloadsJobQueue.preload.ts'; +import { groupAvatarJobQueue } from './groupAvatarJobQueue.preload.ts'; +import { readSyncJobQueue } from './readSyncJobQueue.preload.ts'; +import { removeStorageKeyJobQueue } from './removeStorageKeyJobQueue.preload.ts'; +import { reportSpamJobQueue } from './reportSpamJobQueue.preload.ts'; +import { singleProtoJobQueue } from './singleProtoJobQueue.preload.ts'; +import { viewOnceOpenJobQueue } from './viewOnceOpenJobQueue.preload.ts'; +import { viewSyncJobQueue } from './viewSyncJobQueue.preload.ts'; type ServerType = { reportMessage: typeof reportMessage; diff --git a/ts/jobs/readSyncJobQueue.preload.ts b/ts/jobs/readSyncJobQueue.preload.ts index 9076361941..df43a388a4 100644 --- a/ts/jobs/readSyncJobQueue.preload.ts +++ b/ts/jobs/readSyncJobQueue.preload.ts @@ -1,21 +1,21 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as durations from '../util/durations/index.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.js'; -import type { SyncType } from './helpers/syncHelpers.preload.js'; +import * as durations from '../util/durations/index.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.ts'; +import type { SyncType } from './helpers/syncHelpers.preload.ts'; import { SyncTypeList, parseRawSyncDataArray, runSyncJob, -} from './helpers/syncHelpers.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { isRecord } from '../util/isRecord.std.js'; +} from './helpers/syncHelpers.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { isRecord } from '../util/isRecord.std.ts'; -import type { JOB_STATUS } from './JobQueue.std.js'; -import { JobQueue } from './JobQueue.std.js'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; +import type { JOB_STATUS } from './JobQueue.std.ts'; +import { JobQueue } from './JobQueue.std.ts'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; const MAX_RETRY_TIME = durations.DAY; diff --git a/ts/jobs/removeStorageKeyJobQueue.preload.ts b/ts/jobs/removeStorageKeyJobQueue.preload.ts index 6529dfabca..9dada4a7da 100644 --- a/ts/jobs/removeStorageKeyJobQueue.preload.ts +++ b/ts/jobs/removeStorageKeyJobQueue.preload.ts @@ -3,12 +3,12 @@ import { z } from 'zod'; -import type { JOB_STATUS } from './JobQueue.std.js'; -import { JobQueue } from './JobQueue.std.js'; +import type { JOB_STATUS } from './JobQueue.std.ts'; +import { JobQueue } from './JobQueue.std.ts'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; -import { parseUnknown } from '../util/schemas.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const removeStorageKeyJobDataSchema = z.object({ key: z.enum([ diff --git a/ts/jobs/reportSpamJobQueue.preload.ts b/ts/jobs/reportSpamJobQueue.preload.ts index 0a11850ca8..e3cee8926a 100644 --- a/ts/jobs/reportSpamJobQueue.preload.ts +++ b/ts/jobs/reportSpamJobQueue.preload.ts @@ -2,23 +2,23 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as z from 'zod'; -import * as durations from '../util/durations/index.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { waitForOnline } from '../util/waitForOnline.dom.js'; -import { isDone as isDeviceLinked } from '../util/registration.preload.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { aciSchema } from '../types/ServiceId.std.js'; -import { map } from '../util/iterables.std.js'; +import * as durations from '../util/durations/index.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { waitForOnline } from '../util/waitForOnline.dom.ts'; +import { isDone as isDeviceLinked } from '../util/registration.preload.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { aciSchema } from '../types/ServiceId.std.ts'; +import { map } from '../util/iterables.std.ts'; -import type { JOB_STATUS } from './JobQueue.std.js'; -import { JobQueue } from './JobQueue.std.js'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; -import { parseIntWithFallback } from '../util/parseIntWithFallback.std.js'; -import type { reportMessage, isOnline } from '../textsecure/WebAPI.preload.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { sleeper } from '../util/sleeper.std.js'; -import { parseUnknown } from '../util/schemas.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { JOB_STATUS } from './JobQueue.std.ts'; +import { JobQueue } from './JobQueue.std.ts'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; +import { parseIntWithFallback } from '../util/parseIntWithFallback.std.ts'; +import type { reportMessage, isOnline } from '../textsecure/WebAPI.preload.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { sleeper } from '../util/sleeper.std.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const RETRY_WAIT_TIME = durations.MINUTE; const RETRYABLE_4XX_FAILURE_STATUSES = new Set([ diff --git a/ts/jobs/singleProtoJobQueue.preload.ts b/ts/jobs/singleProtoJobQueue.preload.ts index b9a22a86a9..37ad32284f 100644 --- a/ts/jobs/singleProtoJobQueue.preload.ts +++ b/ts/jobs/singleProtoJobQueue.preload.ts @@ -4,29 +4,29 @@ import PQueue from 'p-queue'; import lodash from 'lodash'; -import * as Bytes from '../Bytes.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.js'; -import type { ParsedJob } from './types.std.js'; -import type { JOB_STATUS } from './JobQueue.std.js'; -import { JobQueue } from './JobQueue.std.js'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; -import { DAY } from '../util/durations/index.std.js'; -import { commonShouldJobContinue } from './helpers/commonShouldJobContinue.preload.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { handleMessageSend } from '../util/handleMessageSend.preload.js'; -import { getSendOptions } from '../util/getSendOptions.preload.js'; -import type { SingleProtoJobData } from '../textsecure/SendMessage.preload.js'; +import * as Bytes from '../Bytes.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.ts'; +import type { ParsedJob } from './types.std.ts'; +import type { JOB_STATUS } from './JobQueue.std.ts'; +import { JobQueue } from './JobQueue.std.ts'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; +import { DAY } from '../util/durations/index.std.ts'; +import { commonShouldJobContinue } from './helpers/commonShouldJobContinue.preload.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { handleMessageSend } from '../util/handleMessageSend.preload.ts'; +import { getSendOptions } from '../util/getSendOptions.preload.ts'; +import type { SingleProtoJobData } from '../textsecure/SendMessage.preload.ts'; import { singleProtoJobDataSchema, messageSender, -} from '../textsecure/SendMessage.preload.js'; +} from '../textsecure/SendMessage.preload.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from './helpers/handleMultipleSendErrors.std.js'; -import { parseUnknown } from '../util/schemas.std.js'; -import { shouldSendToDirectConversation } from './helpers/shouldSendToConversation.preload.js'; +} from './helpers/handleMultipleSendErrors.std.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; +import { shouldSendToDirectConversation } from './helpers/shouldSendToConversation.preload.ts'; const { isBoolean } = lodash; diff --git a/ts/jobs/viewOnceOpenJobQueue.preload.ts b/ts/jobs/viewOnceOpenJobQueue.preload.ts index f2cf16d861..82fbfe262b 100644 --- a/ts/jobs/viewOnceOpenJobQueue.preload.ts +++ b/ts/jobs/viewOnceOpenJobQueue.preload.ts @@ -1,21 +1,21 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as durations from '../util/durations/index.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.js'; -import type { SyncType } from './helpers/syncHelpers.preload.js'; +import * as durations from '../util/durations/index.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.ts'; +import type { SyncType } from './helpers/syncHelpers.preload.ts'; import { SyncTypeList, parseRawSyncDataArray, runSyncJob, -} from './helpers/syncHelpers.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { isRecord } from '../util/isRecord.std.js'; +} from './helpers/syncHelpers.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { isRecord } from '../util/isRecord.std.ts'; -import type { JOB_STATUS } from './JobQueue.std.js'; -import { JobQueue } from './JobQueue.std.js'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; +import type { JOB_STATUS } from './JobQueue.std.ts'; +import { JobQueue } from './JobQueue.std.ts'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; const MAX_RETRY_TIME = durations.DAY; diff --git a/ts/jobs/viewSyncJobQueue.preload.ts b/ts/jobs/viewSyncJobQueue.preload.ts index 7800be17ca..2aa4c77f6e 100644 --- a/ts/jobs/viewSyncJobQueue.preload.ts +++ b/ts/jobs/viewSyncJobQueue.preload.ts @@ -1,21 +1,21 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as durations from '../util/durations/index.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.js'; -import type { SyncType } from './helpers/syncHelpers.preload.js'; +import * as durations from '../util/durations/index.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { exponentialBackoffMaxAttempts } from '../util/exponentialBackoff.std.ts'; +import type { SyncType } from './helpers/syncHelpers.preload.ts'; import { SyncTypeList, parseRawSyncDataArray, runSyncJob, -} from './helpers/syncHelpers.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { isRecord } from '../util/isRecord.std.js'; +} from './helpers/syncHelpers.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { isRecord } from '../util/isRecord.std.ts'; -import type { JOB_STATUS } from './JobQueue.std.js'; -import { JobQueue } from './JobQueue.std.js'; -import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.js'; +import type { JOB_STATUS } from './JobQueue.std.ts'; +import { JobQueue } from './JobQueue.std.ts'; +import { jobQueueDatabaseStore } from './JobQueueDatabaseStore.preload.ts'; const MAX_RETRY_TIME = durations.DAY; diff --git a/ts/linkPreviews/linkPreviewFetch.preload.ts b/ts/linkPreviews/linkPreviewFetch.preload.ts index a87900daad..328fb72918 100644 --- a/ts/linkPreviews/linkPreviewFetch.preload.ts +++ b/ts/linkPreviews/linkPreviewFetch.preload.ts @@ -4,7 +4,7 @@ import type { RequestInit, Response } from 'node-fetch'; import { blobToArrayBuffer } from 'blob-util'; -import type { MIMEType } from '../types/MIME.std.js'; +import type { MIMEType } from '../types/MIME.std.ts'; import { IMAGE_GIF, IMAGE_ICO, @@ -12,10 +12,10 @@ import { IMAGE_PNG, IMAGE_WEBP, stringToMIMEType, -} from '../types/MIME.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { scaleImageToLevel } from '../util/scaleImageToLevel.preload.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../types/MIME.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { scaleImageToLevel } from '../util/scaleImageToLevel.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('linkPreviewFetch'); diff --git a/ts/linkPreviews/shouldUseFullSizeLinkPreviewImage.std.ts b/ts/linkPreviews/shouldUseFullSizeLinkPreviewImage.std.ts index d4f69805e3..517c76aaed 100644 --- a/ts/linkPreviews/shouldUseFullSizeLinkPreviewImage.std.ts +++ b/ts/linkPreviews/shouldUseFullSizeLinkPreviewImage.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LinkPreviewType } from '../types/message/LinkPreviews.std.js'; -import { isImageAttachment } from '../util/Attachment.std.js'; +import type { LinkPreviewType } from '../types/message/LinkPreviews.std.ts'; +import { isImageAttachment } from '../util/Attachment.std.ts'; const MINIMUM_FULL_SIZE_DIMENSION = 200; diff --git a/ts/logging/debuglogs.node.ts b/ts/logging/debuglogs.node.ts index 873d13e9cc..07dd001147 100644 --- a/ts/logging/debuglogs.node.ts +++ b/ts/logging/debuglogs.node.ts @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { reallyJsonStringify } from '../util/reallyJsonStringify.std.js'; -import type { FetchLogIpcData, LogEntryType } from './shared.std.js'; +import { reallyJsonStringify } from '../util/reallyJsonStringify.std.ts'; +import type { FetchLogIpcData, LogEntryType } from './shared.std.ts'; import { LogLevel, getLogLevelString, isFetchLogIpcData, isLogEntry, levelMaxLength, -} from './shared.std.js'; -import { redactAll } from '../util/privacy.node.js'; -import { getEnvironment } from '../environment.std.js'; +} from './shared.std.ts'; +import { redactAll } from '../util/privacy.node.ts'; +import { getEnvironment } from '../environment.std.ts'; const { memoize, sortBy } = lodash; diff --git a/ts/logging/log.std.ts b/ts/logging/log.std.ts index 22e0f59745..d710f3844a 100644 --- a/ts/logging/log.std.ts +++ b/ts/logging/log.std.ts @@ -6,10 +6,10 @@ import pino from 'pino'; import { LRUCache } from 'lru-cache'; -import type { LoggerType } from '../types/Logging.std.js'; -import { Environment, getEnvironment } from '../environment.std.js'; -import { reallyJsonStringify } from '../util/reallyJsonStringify.std.js'; -import { getLogLevelString, type LogLevel } from './shared.std.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { Environment, getEnvironment } from '../environment.std.ts'; +import { reallyJsonStringify } from '../util/reallyJsonStringify.std.ts'; +import { getLogLevelString, type LogLevel } from './shared.std.ts'; // This file is imported by some components so we can't import `ts/util/privacy` let redactAll = (value: string) => value; diff --git a/ts/logging/main_process_logging.main.ts b/ts/logging/main_process_logging.main.ts index 4c7b3e30fe..7b6c2f3fd4 100644 --- a/ts/logging/main_process_logging.main.ts +++ b/ts/logging/main_process_logging.main.ts @@ -18,16 +18,16 @@ import { join } from 'node:path'; import { read as readLastLines } from 'read-last-lines'; import split2 from 'split2'; -import type { LoggerType } from '../types/Logging.std.js'; -import * as Errors from '../types/errors.std.js'; -import { createRotatingPinoDest } from '../util/rotatingPinoDest.node.js'; -import { redactAll } from '../util/privacy.node.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createRotatingPinoDest } from '../util/rotatingPinoDest.node.ts'; +import { redactAll } from '../util/privacy.node.ts'; -import { setPinoDestination, log, setOnLogCallback } from './log.std.js'; +import { setPinoDestination, log, setOnLogCallback } from './log.std.ts'; -import type { FetchLogIpcData, LogEntryType } from './shared.std.js'; -import { LogLevel, isLogEntry } from './shared.std.js'; -import { isProduction } from '../util/version.std.js'; +import type { FetchLogIpcData, LogEntryType } from './shared.std.ts'; +import { LogLevel, isLogEntry } from './shared.std.ts'; +import { isProduction } from '../util/version.std.ts'; const { filter, flatten, map, pick, sortBy } = lodash; diff --git a/ts/logging/set_up_renderer_logging.preload.ts b/ts/logging/set_up_renderer_logging.preload.ts index c7bc8d767b..7f25a8a8a0 100644 --- a/ts/logging/set_up_renderer_logging.preload.ts +++ b/ts/logging/set_up_renderer_logging.preload.ts @@ -9,10 +9,10 @@ import { LogLevel as SignalClientLogLevel, } from '@signalapp/libsignal-client'; -import { setPinoDestination, log } from './log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { createRotatingPinoDest } from '../util/rotatingPinoDest.node.js'; -import { redactAll } from '../util/privacy.node.js'; +import { setPinoDestination, log } from './log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createRotatingPinoDest } from '../util/rotatingPinoDest.node.ts'; +import { redactAll } from '../util/privacy.node.ts'; let isInitialized = false; let shouldRestart = false; diff --git a/ts/logging/shared.std.ts b/ts/logging/shared.std.ts index 61e1d8ac43..d0dbe3129c 100644 --- a/ts/logging/shared.std.ts +++ b/ts/logging/shared.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import pino from 'pino'; -import { isRecord } from '../util/isRecord.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { LogLevel } from '../types/Logging.std.js'; +import { isRecord } from '../util/isRecord.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { LogLevel } from '../types/Logging.std.ts'; export { LogLevel }; diff --git a/ts/logging/uploadDebugLog.node.ts b/ts/logging/uploadDebugLog.node.ts index b4c4895416..b167fab6f7 100644 --- a/ts/logging/uploadDebugLog.node.ts +++ b/ts/logging/uploadDebugLog.node.ts @@ -7,11 +7,11 @@ import FormData from 'form-data'; import got from 'got'; import { gzip } from 'node:zlib'; import pify from 'pify'; -import { getUserAgent } from '../util/getUserAgent.node.js'; -import { maybeParseUrl } from '../util/url.std.js'; -import * as durations from '../util/durations/index.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { parseUnknown } from '../util/schemas.std.js'; +import { getUserAgent } from '../util/getUserAgent.node.ts'; +import { maybeParseUrl } from '../util/url.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; const BASE_URL = 'https://debuglogs.org'; diff --git a/ts/main/challengeMain.main.ts b/ts/main/challengeMain.main.ts index 6f2b55f332..ff491e0c70 100644 --- a/ts/main/challengeMain.main.ts +++ b/ts/main/challengeMain.main.ts @@ -4,13 +4,13 @@ import type { IpcMainEvent } from 'electron'; import { ipcMain as ipc } from 'electron'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; import type { IPCRequest, IPCResponse, ChallengeResponse, -} from '../challenge.dom.js'; -import { getEnvironment, Environment } from '../environment.std.js'; +} from '../challenge.dom.ts'; +import { getEnvironment, Environment } from '../environment.std.ts'; const log = createLogger('challengeMain'); diff --git a/ts/main/settingsChannel.main.ts b/ts/main/settingsChannel.main.ts index f83fb2909a..64cf7b1356 100644 --- a/ts/main/settingsChannel.main.ts +++ b/ts/main/settingsChannel.main.ts @@ -5,13 +5,13 @@ import type { BrowserWindow } from 'electron'; import { ipcMain as ipc, session } from 'electron'; import { EventEmitter } from 'node:events'; -import { createLogger } from '../logging/log.std.js'; -import { userConfig } from '../../app/user_config.main.js'; -import { ephemeralConfig } from '../../app/ephemeral_config.main.js'; -import { installPermissionsHandler } from '../../app/permissions.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { userConfig } from '../../app/user_config.main.ts'; +import { ephemeralConfig } from '../../app/ephemeral_config.main.ts'; +import { installPermissionsHandler } from '../../app/permissions.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; -import type { EphemeralSettings } from '../util/preload.preload.js'; +import type { EphemeralSettings } from '../util/preload.preload.ts'; const log = createLogger('settingsChannel'); diff --git a/ts/mediaEditor/MediaEditorFabricAnalogTimeSticker.dom.ts b/ts/mediaEditor/MediaEditorFabricAnalogTimeSticker.dom.ts index 40d1963027..295d78fde9 100644 --- a/ts/mediaEditor/MediaEditorFabricAnalogTimeSticker.dom.ts +++ b/ts/mediaEditor/MediaEditorFabricAnalogTimeSticker.dom.ts @@ -3,10 +3,10 @@ import lodash from 'lodash'; import { fabric } from 'fabric'; -import { customFabricObjectControls } from './util/customFabricObjectControls.dom.js'; -import { getAnalogTime } from '../util/getAnalogTime.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { moreStyles } from './util/moreStyles.dom.js'; +import { customFabricObjectControls } from './util/customFabricObjectControls.dom.ts'; +import { getAnalogTime } from '../util/getAnalogTime.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { moreStyles } from './util/moreStyles.dom.ts'; const { get } = lodash; diff --git a/ts/mediaEditor/MediaEditorFabricCropRect.dom.ts b/ts/mediaEditor/MediaEditorFabricCropRect.dom.ts index 82f403b81c..40b827db05 100644 --- a/ts/mediaEditor/MediaEditorFabricCropRect.dom.ts +++ b/ts/mediaEditor/MediaEditorFabricCropRect.dom.ts @@ -3,7 +3,7 @@ import { fabric } from 'fabric'; import lodash from 'lodash'; -import { strictAssert } from '../util/assert.std.js'; +import { strictAssert } from '../util/assert.std.ts'; const { clamp } = lodash; diff --git a/ts/mediaEditor/MediaEditorFabricDigitalTimeSticker.dom.ts b/ts/mediaEditor/MediaEditorFabricDigitalTimeSticker.dom.ts index 4ba4bdf216..3447f96579 100644 --- a/ts/mediaEditor/MediaEditorFabricDigitalTimeSticker.dom.ts +++ b/ts/mediaEditor/MediaEditorFabricDigitalTimeSticker.dom.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { fabric } from 'fabric'; -import { customFabricObjectControls } from './util/customFabricObjectControls.dom.js'; -import { moreStyles } from './util/moreStyles.dom.js'; -import { getDateTimeFormatter } from '../util/formatTimestamp.dom.js'; +import { customFabricObjectControls } from './util/customFabricObjectControls.dom.ts'; +import { moreStyles } from './util/moreStyles.dom.ts'; +import { getDateTimeFormatter } from '../util/formatTimestamp.dom.ts'; export enum DigitalClockStickerStyle { White = 'White', diff --git a/ts/mediaEditor/MediaEditorFabricIText.dom.ts b/ts/mediaEditor/MediaEditorFabricIText.dom.ts index 8171146559..d16e1d2b82 100644 --- a/ts/mediaEditor/MediaEditorFabricIText.dom.ts +++ b/ts/mediaEditor/MediaEditorFabricIText.dom.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { fabric } from 'fabric'; -import { customFabricObjectControls } from './util/customFabricObjectControls.dom.js'; +import { customFabricObjectControls } from './util/customFabricObjectControls.dom.ts'; export class MediaEditorFabricIText extends fabric.IText { constructor(text: string, options: fabric.ITextOptions) { diff --git a/ts/mediaEditor/MediaEditorFabricPencilBrush.dom.ts b/ts/mediaEditor/MediaEditorFabricPencilBrush.dom.ts index a1282f90b2..147b60e2a6 100644 --- a/ts/mediaEditor/MediaEditorFabricPencilBrush.dom.ts +++ b/ts/mediaEditor/MediaEditorFabricPencilBrush.dom.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { fabric } from 'fabric'; -import { MediaEditorFabricPath } from './MediaEditorFabricPath.dom.js'; +import { MediaEditorFabricPath } from './MediaEditorFabricPath.dom.ts'; export class MediaEditorFabricPencilBrush extends fabric.PencilBrush { public strokeMiterLimit: undefined | number; diff --git a/ts/mediaEditor/MediaEditorFabricSticker.dom.ts b/ts/mediaEditor/MediaEditorFabricSticker.dom.ts index abfd62efc0..09d1315597 100644 --- a/ts/mediaEditor/MediaEditorFabricSticker.dom.ts +++ b/ts/mediaEditor/MediaEditorFabricSticker.dom.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import { fabric } from 'fabric'; -import { loadImage } from '../util/loadImage.std.js'; -import { customFabricObjectControls } from './util/customFabricObjectControls.dom.js'; +import { loadImage } from '../util/loadImage.std.ts'; +import { customFabricObjectControls } from './util/customFabricObjectControls.dom.ts'; export class MediaEditorFabricSticker extends fabric.Image { constructor( diff --git a/ts/mediaEditor/useFabricHistory.dom.ts b/ts/mediaEditor/useFabricHistory.dom.ts index 1c7145a988..742666a91c 100644 --- a/ts/mediaEditor/useFabricHistory.dom.ts +++ b/ts/mediaEditor/useFabricHistory.dom.ts @@ -4,16 +4,16 @@ import { useCallback, useEffect, useState } from 'react'; import { fabric } from 'fabric'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; -import type { ImageStateType } from './ImageStateType.std.js'; -import { MediaEditorFabricAnalogTimeSticker } from './MediaEditorFabricAnalogTimeSticker.dom.js'; -import { MediaEditorFabricDigitalTimeSticker } from './MediaEditorFabricDigitalTimeSticker.dom.js'; -import { MediaEditorFabricIText } from './MediaEditorFabricIText.dom.js'; -import { MediaEditorFabricPath } from './MediaEditorFabricPath.dom.js'; -import { MediaEditorFabricSticker } from './MediaEditorFabricSticker.dom.js'; -import { fabricEffectListener } from './fabricEffectListener.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import type { ImageStateType } from './ImageStateType.std.ts'; +import { MediaEditorFabricAnalogTimeSticker } from './MediaEditorFabricAnalogTimeSticker.dom.ts'; +import { MediaEditorFabricDigitalTimeSticker } from './MediaEditorFabricDigitalTimeSticker.dom.ts'; +import { MediaEditorFabricIText } from './MediaEditorFabricIText.dom.ts'; +import { MediaEditorFabricPath } from './MediaEditorFabricPath.dom.ts'; +import { MediaEditorFabricSticker } from './MediaEditorFabricSticker.dom.ts'; +import { fabricEffectListener } from './fabricEffectListener.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; const log = createLogger('useFabricHistory'); diff --git a/ts/mediaEditor/util/color.std.ts b/ts/mediaEditor/util/color.std.ts index bb55c5641e..d0dcb755fc 100644 --- a/ts/mediaEditor/util/color.std.ts +++ b/ts/mediaEditor/util/color.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { hslToRGB } from '../../util/hslToRGB.std.js'; +import { hslToRGB } from '../../util/hslToRGB.std.ts'; function getRatio(min: number, max: number, value: number) { return (value - min) / (max - min); diff --git a/ts/mediaEditor/util/getTextStyleAttributes.std.ts b/ts/mediaEditor/util/getTextStyleAttributes.std.ts index 23eb29e4cc..0a56e83965 100644 --- a/ts/mediaEditor/util/getTextStyleAttributes.std.ts +++ b/ts/mediaEditor/util/getTextStyleAttributes.std.ts @@ -1,10 +1,10 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../../logging/log.std.js'; -import { getHSL } from './color.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { toLogFormat } from '../../types/errors.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { getHSL } from './color.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { toLogFormat } from '../../types/errors.std.ts'; const log = createLogger('getTextStyleAttributes'); diff --git a/ts/messageModifiers/AttachmentDownloads.preload.ts b/ts/messageModifiers/AttachmentDownloads.preload.ts index ecd125e175..9dc79b69b3 100644 --- a/ts/messageModifiers/AttachmentDownloads.preload.ts +++ b/ts/messageModifiers/AttachmentDownloads.preload.ts @@ -1,21 +1,21 @@ // Copyright 2019 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; -import * as Bytes from '../Bytes.std.js'; -import type { MessageAttachmentType } from '../types/AttachmentDownload.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import type { MessageAttachmentType } from '../types/AttachmentDownload.std.ts'; -import type { AttachmentType } from '../types/Attachment.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; import { doAttachmentsOnSameMessageMatch, isDownloaded, -} from '../util/Attachment.std.js'; +} from '../util/Attachment.std.ts'; import { loadAttachmentData, maybeDeleteAttachmentFile, -} from '../util/migrations.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { trimMessageWhitespace } from '../types/BodyRange.std.js'; +} from '../util/migrations.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { trimMessageWhitespace } from '../types/BodyRange.std.ts'; const { omit } = lodash; diff --git a/ts/messageModifiers/Deletes.preload.ts b/ts/messageModifiers/Deletes.preload.ts index b8893626f0..55a82455fb 100644 --- a/ts/messageModifiers/Deletes.preload.ts +++ b/ts/messageModifiers/Deletes.preload.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { MessageAttributesType } from '../model-types.d.ts'; -import type { AciString } from '../types/ServiceId.std.js'; -import { getAuthorId } from '../messages/sources.preload.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { receiveDeleteForEveryone } from '../util/deleteForEveryone.preload.js'; -import { drop } from '../util/drop.std.js'; -import { getMessageSentTimestampSet } from '../util/getMessageSentTimestampSet.std.js'; -import { MessageModel } from '../models/messages.preload.js'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { getAuthorId } from '../messages/sources.preload.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { receiveDeleteForEveryone } from '../util/deleteForEveryone.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { getMessageSentTimestampSet } from '../util/getMessageSentTimestampSet.std.ts'; +import { MessageModel } from '../models/messages.preload.ts'; const log = createLogger('Deletes'); diff --git a/ts/messageModifiers/DeletesForMe.preload.ts b/ts/messageModifiers/DeletesForMe.preload.ts index 81d1d9e8c1..e4349d004b 100644 --- a/ts/messageModifiers/DeletesForMe.preload.ts +++ b/ts/messageModifiers/DeletesForMe.preload.ts @@ -1,26 +1,26 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { drop } from '../util/drop.std.js'; -import { getMessageSentTimestampSet } from '../util/getMessageSentTimestampSet.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { getMessageSentTimestampSet } from '../util/getMessageSentTimestampSet.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; import type { ConversationIdentifier, AddressableMessage, -} from '../textsecure/messageReceiverEvents.std.js'; +} from '../textsecure/messageReceiverEvents.std.ts'; import { deleteAttachmentFromMessage, deleteMessage, -} from '../util/deleteForMe.preload.js'; +} from '../util/deleteForMe.preload.ts'; import { doesMessageMatch, getConversationFromTarget, getMessageQueryFromTarget, -} from '../util/syncIdentifiers.preload.js'; -import { DataWriter } from '../sql/Client.preload.js'; +} from '../util/syncIdentifiers.preload.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; const log = createLogger('DeletesForMe'); diff --git a/ts/messageModifiers/Edits.preload.ts b/ts/messageModifiers/Edits.preload.ts index cff66e685d..eb32cc2665 100644 --- a/ts/messageModifiers/Edits.preload.ts +++ b/ts/messageModifiers/Edits.preload.ts @@ -2,18 +2,18 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { MessageAttributesType } from '../model-types.d.ts'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { drop } from '../util/drop.std.js'; -import { getAuthorId } from '../messages/sources.preload.js'; -import { handleEditMessage } from '../util/handleEditMessage.preload.js'; -import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.js'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { getAuthorId } from '../messages/sources.preload.ts'; +import { handleEditMessage } from '../util/handleEditMessage.preload.ts'; +import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.ts'; import { isAttachmentDownloadQueueEmpty, registerQueueEmptyCallback, -} from '../util/attachmentDownloadQueue.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; +} from '../util/attachmentDownloadQueue.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; const log = createLogger('Edits'); diff --git a/ts/messageModifiers/MessageReceipts.preload.ts b/ts/messageModifiers/MessageReceipts.preload.ts index 9a2f84ffe4..ccc77c250c 100644 --- a/ts/messageModifiers/MessageReceipts.preload.ts +++ b/ts/messageModifiers/MessageReceipts.preload.ts @@ -8,34 +8,34 @@ import type { MessageAttributesType, ReadonlyMessageAttributesType, } from '../model-types.d.ts'; -import type { SendStateByConversationId } from '../messages/MessageSendState.std.js'; -import { isOutgoing, isStory } from '../state/selectors/message.preload.js'; -import { getOwn } from '../util/getOwn.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { createWaitBatcher } from '../util/waitBatcher.std.js'; -import { isServiceIdString } from '../types/ServiceId.std.js'; +import type { SendStateByConversationId } from '../messages/MessageSendState.std.ts'; +import { isOutgoing, isStory } from '../state/selectors/message.preload.ts'; +import { getOwn } from '../util/getOwn.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { createWaitBatcher } from '../util/waitBatcher.std.ts'; +import { isServiceIdString } from '../types/ServiceId.std.ts'; import { SendActionType, SendStatus, UNDELIVERED_SEND_STATUSES, sendStateReducer, -} from '../messages/MessageSendState.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import type { DeleteSentProtoRecipientOptionsType } from '../sql/Interface.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { getSourceServiceId } from '../messages/sources.preload.js'; -import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; -import { getPropForTimestamp } from '../util/editHelpers.std.js'; +} from '../messages/MessageSendState.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import type { DeleteSentProtoRecipientOptionsType } from '../sql/Interface.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { getSourceServiceId } from '../messages/sources.preload.ts'; +import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; +import { getPropForTimestamp } from '../util/editHelpers.std.ts'; import { DELETE_SENT_PROTO_BATCHER_WAIT_MS, RECEIPT_BATCHER_WAIT_MS, -} from '../types/Receipt.std.js'; -import { drop } from '../util/drop.std.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { areStoryViewReceiptsEnabled } from '../util/Settings.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../types/Receipt.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { areStoryViewReceiptsEnabled } from '../util/Settings.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { groupBy } = lodash; diff --git a/ts/messageModifiers/MessageRequests.preload.ts b/ts/messageModifiers/MessageRequests.preload.ts index dba201ecea..37de849d5e 100644 --- a/ts/messageModifiers/MessageRequests.preload.ts +++ b/ts/messageModifiers/MessageRequests.preload.ts @@ -1,13 +1,13 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from '../types/ServiceId.std.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { drop } from '../util/drop.std.js'; -import { getConversationIdForLogging } from '../util/idForLogging.preload.js'; -import type { MessageRequestResponseSource } from '../types/MessageRequestResponseEvent.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { getConversationIdForLogging } from '../util/idForLogging.preload.ts'; +import type { MessageRequestResponseSource } from '../types/MessageRequestResponseEvent.std.ts'; const log = createLogger('MessageRequests'); diff --git a/ts/messageModifiers/PinnedMessages.preload.ts b/ts/messageModifiers/PinnedMessages.preload.ts index 78c38fddd6..f7c7e35bbe 100644 --- a/ts/messageModifiers/PinnedMessages.preload.ts +++ b/ts/messageModifiers/PinnedMessages.preload.ts @@ -1,22 +1,22 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataWriter } from '../sql/Client.preload.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import type { DurationInSeconds } from '../util/durations/duration-in-seconds.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { MessageModifierTarget } from './helpers/findMessageModifierTarget.preload.js'; -import { findMessageModifierTarget } from './helpers/findMessageModifierTarget.preload.js'; -import { isValidSenderAciForConversation } from './helpers/isValidSenderAciForConversation.preload.js'; -import { isGroupV2 } from '../util/whatTypeOfConversation.dom.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import { getPinnedMessagesLimit } from '../util/pinnedMessages.dom.js'; -import { getPinnedMessageExpiresAt } from '../util/pinnedMessages.std.js'; -import { pinnedMessagesCleanupService } from '../services/expiring/pinnedMessagesCleanupService.preload.js'; -import { drop } from '../util/drop.std.js'; -import type { AppendPinnedMessageResult } from '../sql/server/pinnedMessages.std.js'; -import * as Errors from '../types/errors.std.js'; -import { isGiftBadge } from '../state/selectors/message.preload.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import type { DurationInSeconds } from '../util/durations/duration-in-seconds.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { MessageModifierTarget } from './helpers/findMessageModifierTarget.preload.ts'; +import { findMessageModifierTarget } from './helpers/findMessageModifierTarget.preload.ts'; +import { isValidSenderAciForConversation } from './helpers/isValidSenderAciForConversation.preload.ts'; +import { isGroupV2 } from '../util/whatTypeOfConversation.dom.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { getPinnedMessagesLimit } from '../util/pinnedMessages.dom.ts'; +import { getPinnedMessageExpiresAt } from '../util/pinnedMessages.std.ts'; +import { pinnedMessagesCleanupService } from '../services/expiring/pinnedMessagesCleanupService.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import type { AppendPinnedMessageResult } from '../sql/server/pinnedMessages.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { isGiftBadge } from '../state/selectors/message.preload.ts'; const { AccessRequired } = Proto.AccessControl; const { Role } = Proto.Member; diff --git a/ts/messageModifiers/Polls.preload.ts b/ts/messageModifiers/Polls.preload.ts index db4a28b483..19ecd647dd 100644 --- a/ts/messageModifiers/Polls.preload.ts +++ b/ts/messageModifiers/Polls.preload.ts @@ -1,29 +1,29 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from '../types/ServiceId.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; import type { MessageAttributesType, ReadonlyMessageAttributesType, } from '../model-types.d.ts'; -import type { MessagePollVoteType } from '../types/Polls.dom.js'; -import { PollTerminateSendStatus } from '../types/Polls.dom.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { DataReader } from '../sql/Client.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { isIncoming, isOutgoing } from '../messages/helpers.std.js'; -import { getAuthor } from '../messages/sources.preload.js'; +import type { MessagePollVoteType } from '../types/Polls.dom.ts'; +import { PollTerminateSendStatus } from '../types/Polls.dom.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { isIncoming, isOutgoing } from '../messages/helpers.std.ts'; +import { getAuthor } from '../messages/sources.preload.ts'; -import { isSent, SendStatus } from '../messages/MessageSendState.std.js'; -import { getPropForTimestamp } from '../util/editHelpers.std.js'; -import { isMe } from '../util/whatTypeOfConversation.dom.js'; +import { isSent, SendStatus } from '../messages/MessageSendState.std.ts'; +import { getPropForTimestamp } from '../util/editHelpers.std.ts'; +import { isMe } from '../util/whatTypeOfConversation.dom.ts'; -import { strictAssert } from '../util/assert.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; -import { drop } from '../util/drop.std.js'; -import { maybeNotify } from '../messages/maybeNotify.preload.js'; -import type { DurationInSeconds } from '../util/durations/duration-in-seconds.std.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { maybeNotify } from '../messages/maybeNotify.preload.ts'; +import type { DurationInSeconds } from '../util/durations/duration-in-seconds.std.ts'; const log = createLogger('Polls'); diff --git a/ts/messageModifiers/Reactions.preload.ts b/ts/messageModifiers/Reactions.preload.ts index 193441586f..0cc6514bd0 100644 --- a/ts/messageModifiers/Reactions.preload.ts +++ b/ts/messageModifiers/Reactions.preload.ts @@ -3,52 +3,52 @@ import lodash from 'lodash'; -import type { AciString } from '../types/ServiceId.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; import type { MessageAttributesType, MessageReactionType, ReadonlyMessageAttributesType, } from '../model-types.d.ts'; -import { MessageModel } from '../models/messages.preload.js'; -import { ReactionSource } from '../reactions/ReactionSource.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; +import { MessageModel } from '../models/messages.preload.ts'; +import { ReactionSource } from '../reactions/ReactionSource.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; import { isIncoming, isIncomingStory, isOutgoing, isOutgoingStory, -} from '../messages/helpers.std.js'; -import { getAuthor } from '../messages/sources.preload.js'; -import { getMessageSentTimestampSet } from '../util/getMessageSentTimestampSet.std.js'; +} from '../messages/helpers.std.ts'; +import { getAuthor } from '../messages/sources.preload.ts'; +import { getMessageSentTimestampSet } from '../util/getMessageSentTimestampSet.std.ts'; import { isDirectConversation, isMe, -} from '../util/whatTypeOfConversation.dom.js'; +} from '../util/whatTypeOfConversation.dom.ts'; import { getMessagePropStatus, hasErrors, isStory, -} from '../state/selectors/message.preload.js'; -import { getPropForTimestamp } from '../util/editHelpers.std.js'; -import { isSent } from '../messages/MessageSendState.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { repeat, zipObject } from '../util/iterables.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; -import { hydrateStoryContext } from '../util/hydrateStoryContext.preload.js'; -import { drop } from '../util/drop.std.js'; -import * as reactionUtil from '../reactions/util.std.js'; -import { isNewReactionReplacingPrevious } from '../reactions/util.std.js'; -import { notificationService } from '../services/notifications.preload.js'; -import { ReactionReadStatus } from '../types/Reactions.std.js'; -import type { ConversationQueueJobData } from '../jobs/conversationJobQueue.preload.js'; +} from '../state/selectors/message.preload.ts'; +import { getPropForTimestamp } from '../util/editHelpers.std.ts'; +import { isSent } from '../messages/MessageSendState.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { repeat, zipObject } from '../util/iterables.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; +import { hydrateStoryContext } from '../util/hydrateStoryContext.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import * as reactionUtil from '../reactions/util.std.ts'; +import { isNewReactionReplacingPrevious } from '../reactions/util.std.ts'; +import { notificationService } from '../services/notifications.preload.ts'; +import { ReactionReadStatus } from '../types/Reactions.std.ts'; +import type { ConversationQueueJobData } from '../jobs/conversationJobQueue.preload.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { maybeNotify } from '../messages/maybeNotify.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { maybeNotify } from '../messages/maybeNotify.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { maxBy } = lodash; diff --git a/ts/messageModifiers/ReadSyncs.preload.ts b/ts/messageModifiers/ReadSyncs.preload.ts index 87d956ceb9..82303897bf 100644 --- a/ts/messageModifiers/ReadSyncs.preload.ts +++ b/ts/messageModifiers/ReadSyncs.preload.ts @@ -4,27 +4,27 @@ import { z } from 'zod'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { StartupQueue } from '../util/StartupQueue.std.js'; -import { drop } from '../util/drop.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; -import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.js'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { StartupQueue } from '../util/StartupQueue.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; +import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.ts'; import { isIncoming, isPollTerminate, -} from '../state/selectors/message.preload.js'; -import { isMessageUnread } from '../util/isMessageUnread.std.js'; -import { notificationService } from '../services/notifications.preload.js'; -import { queueUpdateMessage } from '../util/messageBatcher.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { isAciString } from '../util/isAciString.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { markRead } from '../services/MessageUpdater.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { getSourceServiceId } from '../messages/sources.preload.js'; +} from '../state/selectors/message.preload.ts'; +import { isMessageUnread } from '../util/isMessageUnread.std.ts'; +import { notificationService } from '../services/notifications.preload.ts'; +import { queueUpdateMessage } from '../util/messageBatcher.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { markRead } from '../services/MessageUpdater.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { getSourceServiceId } from '../messages/sources.preload.ts'; const log = createLogger('ReadSyncs'); diff --git a/ts/messageModifiers/ViewOnceOpenSyncs.preload.ts b/ts/messageModifiers/ViewOnceOpenSyncs.preload.ts index f6ac3753a8..c58bccc0ef 100644 --- a/ts/messageModifiers/ViewOnceOpenSyncs.preload.ts +++ b/ts/messageModifiers/ViewOnceOpenSyncs.preload.ts @@ -1,14 +1,14 @@ // Copyright 2019 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from '../types/ServiceId.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { DataReader } from '../sql/Client.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; -import { markViewOnceMessageViewed } from '../services/MessageUpdater.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; +import { markViewOnceMessageViewed } from '../services/MessageUpdater.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; const log = createLogger('ViewOnceOpenSyncs'); diff --git a/ts/messageModifiers/ViewSyncs.preload.ts b/ts/messageModifiers/ViewSyncs.preload.ts index 25febf91b2..fb4edf6540 100644 --- a/ts/messageModifiers/ViewSyncs.preload.ts +++ b/ts/messageModifiers/ViewSyncs.preload.ts @@ -4,20 +4,20 @@ import { z } from 'zod'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { GiftBadgeStates } from '../types/GiftBadgeStates.std.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; -import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.js'; -import { isIncoming } from '../state/selectors/message.preload.js'; -import { markViewed } from '../services/MessageUpdater.preload.js'; -import { notificationService } from '../services/notifications.preload.js'; -import { queueUpdateMessage } from '../util/messageBatcher.preload.js'; -import { isAciString } from '../util/isAciString.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { drop } from '../util/drop.std.js'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { GiftBadgeStates } from '../types/GiftBadgeStates.std.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; +import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.ts'; +import { isIncoming } from '../state/selectors/message.preload.ts'; +import { markViewed } from '../services/MessageUpdater.preload.ts'; +import { notificationService } from '../services/notifications.preload.ts'; +import { queueUpdateMessage } from '../util/messageBatcher.preload.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { drop } from '../util/drop.std.ts'; const log = createLogger('ViewSyncs'); diff --git a/ts/messageModifiers/helpers/findMessageModifierTarget.preload.ts b/ts/messageModifiers/helpers/findMessageModifierTarget.preload.ts index 3cb8dd7a3a..ebdd153786 100644 --- a/ts/messageModifiers/helpers/findMessageModifierTarget.preload.ts +++ b/ts/messageModifiers/helpers/findMessageModifierTarget.preload.ts @@ -1,11 +1,11 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from '../../types/ServiceId.std.js'; -import { getAuthorId } from '../../messages/sources.preload.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { MessageModel } from '../../models/messages.preload.js'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { getAuthorId } from '../../messages/sources.preload.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { MessageModel } from '../../models/messages.preload.ts'; export type MessageModifierTarget = Readonly<{ targetMessage: MessageModel; diff --git a/ts/messageModifiers/helpers/isValidSenderAciForConversation.preload.ts b/ts/messageModifiers/helpers/isValidSenderAciForConversation.preload.ts index 80e401d8a6..672dfc2173 100644 --- a/ts/messageModifiers/helpers/isValidSenderAciForConversation.preload.ts +++ b/ts/messageModifiers/helpers/isValidSenderAciForConversation.preload.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { AciString } from '@signalapp/mock-server/src/types'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; export function isValidSenderAciForConversation( conversation: ConversationModel, diff --git a/ts/messages/MessageSendState.std.ts b/ts/messages/MessageSendState.std.ts index 1a452ca50d..439b82ca32 100644 --- a/ts/messages/MessageSendState.std.ts +++ b/ts/messages/MessageSendState.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import memoizee from 'memoizee'; -import { makeEnumParser } from '../util/enum.std.js'; +import { makeEnumParser } from '../util/enum.std.ts'; /** * `SendStatus` represents the send status of a message to a single recipient. For diff --git a/ts/messages/copyQuote.preload.ts b/ts/messages/copyQuote.preload.ts index 2214683e01..358059d3e1 100644 --- a/ts/messages/copyQuote.preload.ts +++ b/ts/messages/copyQuote.preload.ts @@ -3,23 +3,23 @@ import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; import type { QuotedMessageType } from '../model-types.d.ts'; -import { SignalService } from '../protobuf/index.std.js'; +import { SignalService } from '../protobuf/index.std.ts'; import { isGiftBadge, isTapToView, -} from '../state/selectors/message.preload.js'; +} from '../state/selectors/message.preload.ts'; import type { ProcessedQuote } from '../textsecure/Types.d.ts'; -import { IMAGE_JPEG } from '../types/MIME.std.js'; -import { VERSION_NEEDED_FOR_DISPLAY } from '../types/Message2.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { getQuoteBodyText } from '../util/getQuoteBodyText.std.js'; -import { isQuoteAMatch } from './quotes.preload.js'; -import { messageHasPaymentEvent } from './payments.std.js'; -import * as Errors from '../types/errors.std.js'; -import type { MessageModel } from '../models/messages.preload.js'; -import { isDownloadable } from '../util/Attachment.std.js'; +import { IMAGE_JPEG } from '../types/MIME.std.ts'; +import { VERSION_NEEDED_FOR_DISPLAY } from '../types/Message2.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { getQuoteBodyText } from '../util/getQuoteBodyText.std.ts'; +import { isQuoteAMatch } from './quotes.preload.ts'; +import { messageHasPaymentEvent } from './payments.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import type { MessageModel } from '../models/messages.preload.ts'; +import { isDownloadable } from '../util/Attachment.std.ts'; const { omit } = lodash; diff --git a/ts/messages/getMessageById.preload.ts b/ts/messages/getMessageById.preload.ts index 9acdb68ba2..6513df109d 100644 --- a/ts/messages/getMessageById.preload.ts +++ b/ts/messages/getMessageById.preload.ts @@ -1,10 +1,10 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; const log = createLogger('getMessageById'); diff --git a/ts/messages/getMessagesById.preload.ts b/ts/messages/getMessagesById.preload.ts index a5edd44655..0eaa48b682 100644 --- a/ts/messages/getMessagesById.preload.ts +++ b/ts/messages/getMessagesById.preload.ts @@ -1,11 +1,11 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import * as Errors from '../types/errors.std.js'; +import * as Errors from '../types/errors.std.ts'; const log = createLogger('getMessagesById'); diff --git a/ts/messages/handleDataMessage.preload.ts b/ts/messages/handleDataMessage.preload.ts index a31369e4d4..02869f5ed2 100644 --- a/ts/messages/handleDataMessage.preload.ts +++ b/ts/messages/handleDataMessage.preload.ts @@ -4,37 +4,37 @@ import lodash from 'lodash'; import type { z } from 'zod'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import * as LinkPreview from '../types/LinkPreview.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import * as LinkPreview from '../types/LinkPreview.std.ts'; -import { isStory } from './helpers.std.js'; -import { getAuthor } from './sources.preload.js'; -import { messageHasPaymentEvent } from './payments.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; +import { isStory } from './helpers.std.ts'; +import { getAuthor } from './sources.preload.ts'; +import { messageHasPaymentEvent } from './payments.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; import { deliveryReceiptQueue, deliveryReceiptBatcher, -} from '../util/deliveryReceipt.preload.js'; -import { upgradeMessageSchema } from '../util/migrations.preload.js'; -import { getOwn } from '../util/getOwn.std.js'; +} from '../util/deliveryReceipt.preload.ts'; +import { upgradeMessageSchema } from '../util/migrations.preload.ts'; +import { getOwn } from '../util/getOwn.std.ts'; import { SendActionType, sendStateReducer, SendStatus, -} from './MessageSendState.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { eraseMessageContents } from '../util/cleanup.preload.js'; +} from './MessageSendState.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { eraseMessageContents } from '../util/cleanup.preload.ts'; import { isDirectConversation, isGroup, isGroupV1, -} from '../util/whatTypeOfConversation.dom.js'; +} from '../util/whatTypeOfConversation.dom.ts'; import { respondToGroupV2Migration, maybeUpdateGroup, -} from '../groups.preload.js'; -import { generateMessageId } from '../util/generateMessageId.node.js'; +} from '../groups.preload.ts'; +import { generateMessageId } from '../util/generateMessageId.node.ts'; import { hasErrors, isEndSession, @@ -42,45 +42,45 @@ import { isGroupUpdate, isTapToView, isUnsupportedMessage, -} from '../state/selectors/message.preload.js'; -import { drop } from '../util/drop.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { isAciString } from '../util/isAciString.std.js'; -import { copyFromQuotedMessage } from './copyQuote.preload.js'; -import { findStoryMessage } from '../util/findStoryMessage.preload.js'; -import { getRoomIdFromCallLink } from '../util/callLinksRingrtc.node.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { normalizeServiceId } from '../types/ServiceId.std.js'; -import { BodyRange, trimMessageWhitespace } from '../types/BodyRange.std.js'; -import { hydrateStoryContext } from '../util/hydrateStoryContext.preload.js'; -import { isMessageEmpty } from '../util/isMessageEmpty.preload.js'; -import { isValidTapToView } from '../util/isValidTapToView.std.js'; -import { getNotificationTextForMessage } from '../util/getNotificationTextForMessage.preload.js'; +} from '../state/selectors/message.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import { copyFromQuotedMessage } from './copyQuote.preload.ts'; +import { findStoryMessage } from '../util/findStoryMessage.preload.ts'; +import { getRoomIdFromCallLink } from '../util/callLinksRingrtc.node.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { normalizeServiceId } from '../types/ServiceId.std.ts'; +import { BodyRange, trimMessageWhitespace } from '../types/BodyRange.std.ts'; +import { hydrateStoryContext } from '../util/hydrateStoryContext.preload.ts'; +import { isMessageEmpty } from '../util/isMessageEmpty.preload.ts'; +import { isValidTapToView } from '../util/isValidTapToView.std.ts'; +import { getNotificationTextForMessage } from '../util/getNotificationTextForMessage.preload.ts'; import { getMessageAuthorAci, getMessageAuthorText, -} from '../util/getMessageAuthorText.preload.js'; -import { GiftBadgeStates } from '../types/GiftBadgeStates.std.js'; -import { parseBoostBadgeListFromServer } from '../badges/parseBadgesFromServer.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +} from '../util/getMessageAuthorText.preload.ts'; +import { GiftBadgeStates } from '../types/GiftBadgeStates.std.ts'; +import { parseBoostBadgeListFromServer } from '../badges/parseBadgesFromServer.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; import { modifyTargetMessage, ModifyTargetMessageResult, -} from '../util/modifyTargetMessage.preload.js'; -import type { saveAndNotify } from './saveAndNotify.preload.js'; -import type { MessageModel } from '../models/messages.preload.js'; -import { safeParsePartial } from '../util/schemas.std.js'; -import { PollCreateSchema } from '../types/Polls.dom.js'; +} from '../util/modifyTargetMessage.preload.ts'; +import type { saveAndNotify } from './saveAndNotify.preload.ts'; +import type { MessageModel } from '../models/messages.preload.ts'; +import { safeParsePartial } from '../util/schemas.std.ts'; +import { PollCreateSchema } from '../types/Polls.dom.ts'; -import type { SentEventData } from '../textsecure/messageReceiverEvents.std.js'; +import type { SentEventData } from '../textsecure/messageReceiverEvents.std.ts'; import type { ProcessedDataMessage, ProcessedUnidentifiedDeliveryStatus, } from '../textsecure/Types.d.ts'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import type { LinkPreviewType } from '../types/message/LinkPreviews.std.js'; -import { getCachedSubscriptionConfiguration } from '../util/subscriptionConfiguration.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import type { LinkPreviewType } from '../types/message/LinkPreviews.std.ts'; +import { getCachedSubscriptionConfiguration } from '../util/subscriptionConfiguration.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { isNumber } = lodash; diff --git a/ts/messages/helpers.std.ts b/ts/messages/helpers.std.ts index 9d492303d8..2c30414a2d 100644 --- a/ts/messages/helpers.std.ts +++ b/ts/messages/helpers.std.ts @@ -8,7 +8,7 @@ import type { ReadonlyMessageAttributesType, QuotedAttachmentType, } from '../model-types.d.ts'; -import type { AciString } from '../types/ServiceId.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; export function isIncoming( message: Pick diff --git a/ts/messages/maybeNotify.preload.ts b/ts/messages/maybeNotify.preload.ts index c4cbdc9621..caaeb49134 100644 --- a/ts/messages/maybeNotify.preload.ts +++ b/ts/messages/maybeNotify.preload.ts @@ -1,29 +1,29 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; -import { isOutgoing } from './helpers.std.js'; -import { getAuthor } from './sources.preload.js'; +import { isOutgoing } from './helpers.std.ts'; +import { getAuthor } from './sources.preload.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import { getActiveProfile } from '../state/selectors/notificationProfiles.dom.js'; -import { shouldNotify as shouldNotifyDuringNotificationProfile } from '../types/NotificationProfile.std.js'; -import { NotificationType } from '../types/notifications.std.js'; -import { isMessageUnread } from '../util/isMessageUnread.std.js'; -import { isDirectConversation } from '../util/whatTypeOfConversation.dom.js'; -import { isExpiringMessage } from '../types/Message2.preload.js'; -import { notificationService } from '../services/notifications.preload.js'; -import { getNotificationTextForMessage } from '../util/getNotificationTextForMessage.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { getActiveProfile } from '../state/selectors/notificationProfiles.dom.ts'; +import { shouldNotify as shouldNotifyDuringNotificationProfile } from '../types/NotificationProfile.std.ts'; +import { NotificationType } from '../types/notifications.std.ts'; +import { isMessageUnread } from '../util/isMessageUnread.std.ts'; +import { isDirectConversation } from '../util/whatTypeOfConversation.dom.ts'; +import { isExpiringMessage } from '../types/Message2.preload.ts'; +import { notificationService } from '../services/notifications.preload.ts'; +import { getNotificationTextForMessage } from '../util/getNotificationTextForMessage.preload.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { ReactionAttributesType } from '../messageModifiers/Reactions.preload.js'; +import type { ReactionAttributesType } from '../messageModifiers/Reactions.preload.ts'; import { type PollVoteAttributesType, PollSource, -} from '../messageModifiers/Polls.preload.js'; -import { shouldStoryReplyNotifyUser } from '../util/shouldStoryReplyNotifyUser.preload.js'; -import { ReactionSource } from '../reactions/ReactionSource.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../messageModifiers/Polls.preload.ts'; +import { shouldStoryReplyNotifyUser } from '../util/shouldStoryReplyNotifyUser.preload.ts'; +import { ReactionSource } from '../reactions/ReactionSource.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('maybeNotify'); diff --git a/ts/messages/migrateLegacyReadStatus.std.ts b/ts/messages/migrateLegacyReadStatus.std.ts index 432c2e71c2..9611b9e8b9 100644 --- a/ts/messages/migrateLegacyReadStatus.std.ts +++ b/ts/messages/migrateLegacyReadStatus.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { MessageAttributesType } from '../model-types.d.ts'; -import { ReadStatus } from './MessageReadStatus.std.js'; +import { ReadStatus } from './MessageReadStatus.std.ts'; export function migrateLegacyReadStatus( message: Readonly> diff --git a/ts/messages/migrateLegacySendAttributes.preload.ts b/ts/messages/migrateLegacySendAttributes.preload.ts index 8c9e080e9a..4d5d5eba0b 100644 --- a/ts/messages/migrateLegacySendAttributes.preload.ts +++ b/ts/messages/migrateLegacySendAttributes.preload.ts @@ -2,19 +2,19 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { getOwn } from '../util/getOwn.std.js'; -import { map, concat, repeat, zipObject } from '../util/iterables.std.js'; -import { isOutgoing } from '../state/selectors/message.preload.js'; +import { getOwn } from '../util/getOwn.std.ts'; +import { map, concat, repeat, zipObject } from '../util/iterables.std.ts'; +import { isOutgoing } from '../state/selectors/message.preload.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; import type { SendState, SendStateByConversationId, -} from './MessageSendState.std.js'; +} from './MessageSendState.std.ts'; import { SendActionType, sendStateReducer, SendStatus, -} from './MessageSendState.std.js'; +} from './MessageSendState.std.ts'; const { get, isEmpty } = lodash; diff --git a/ts/messages/migrateMessageData.preload.ts b/ts/messages/migrateMessageData.preload.ts index 0e8629941d..6bbbd647ae 100644 --- a/ts/messages/migrateMessageData.preload.ts +++ b/ts/messages/migrateMessageData.preload.ts @@ -5,17 +5,17 @@ import lodash from 'lodash'; import pMap from 'p-map'; import PQueue from 'p-queue'; -import { CURRENT_SCHEMA_VERSION } from '../types/Message2.preload.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { MINUTE } from '../util/durations/index.std.js'; +import { CURRENT_SCHEMA_VERSION } from '../types/Message2.preload.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { MINUTE } from '../util/durations/index.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { AciString } from '../types/ServiceId.std.js'; -import * as Errors from '../types/errors.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { postSaveUpdates } from '../util/cleanup.preload.js'; -import { upgradeMessageSchema as doUpgradeMessageSchema } from '../util/migrations.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { AciString } from '../types/ServiceId.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { postSaveUpdates } from '../util/cleanup.preload.ts'; +import { upgradeMessageSchema as doUpgradeMessageSchema } from '../util/migrations.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { isFunction, isNumber } = lodash; diff --git a/ts/messages/payments.std.ts b/ts/messages/payments.std.ts index 7cba16dbbb..67a368ede7 100644 --- a/ts/messages/payments.std.ts +++ b/ts/messages/payments.std.ts @@ -3,11 +3,11 @@ import type { ReadonlyDeep } from 'type-fest'; -import { PaymentEventKind } from '../types/Payment.std.js'; -import type { AnyPaymentEvent } from '../types/Payment.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { PaymentEventKind } from '../types/Payment.std.ts'; +import type { AnyPaymentEvent } from '../types/Payment.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; export type MessageAttributesWithPaymentEvent = ReadonlyMessageAttributesType & ReadonlyDeep<{ diff --git a/ts/messages/quotes.preload.ts b/ts/messages/quotes.preload.ts index 4a45428f23..9e16051550 100644 --- a/ts/messages/quotes.preload.ts +++ b/ts/messages/quotes.preload.ts @@ -7,7 +7,7 @@ import type { ReadonlyMessageAttributesType, QuotedMessageType, } from '../model-types.d.ts'; -import { getSourceServiceId } from './sources.preload.js'; +import { getSourceServiceId } from './sources.preload.ts'; export function isQuoteAMatch( message: ReadonlyMessageAttributesType | null | undefined, diff --git a/ts/messages/saveAndNotify.preload.ts b/ts/messages/saveAndNotify.preload.ts index 99ecd06110..25621cdcdc 100644 --- a/ts/messages/saveAndNotify.preload.ts +++ b/ts/messages/saveAndNotify.preload.ts @@ -1,22 +1,22 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; -import { explodePromise } from '../util/explodePromise.std.js'; +import { explodePromise } from '../util/explodePromise.std.ts'; -import { saveNewMessageBatcher } from '../util/messageBatcher.preload.js'; -import { handleAttachmentDownloadsForNewMessage } from '../util/queueAttachmentDownloads.preload.js'; +import { saveNewMessageBatcher } from '../util/messageBatcher.preload.ts'; +import { handleAttachmentDownloadsForNewMessage } from '../util/queueAttachmentDownloads.preload.ts'; import { modifyTargetMessage, ModifyTargetMessageResult, -} from '../util/modifyTargetMessage.preload.js'; -import { isStory } from './helpers.std.js'; -import { drop } from '../util/drop.std.js'; +} from '../util/modifyTargetMessage.preload.ts'; +import { isStory } from './helpers.std.ts'; +import { drop } from '../util/drop.std.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import type { MessageModel } from '../models/messages.preload.js'; -import { maybeNotify } from './maybeNotify.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import type { MessageModel } from '../models/messages.preload.ts'; +import { maybeNotify } from './maybeNotify.preload.ts'; const log = createLogger('saveAndNotify'); diff --git a/ts/messages/send.preload.ts b/ts/messages/send.preload.ts index 7d014c1cc1..acb80ca20f 100644 --- a/ts/messages/send.preload.ts +++ b/ts/messages/send.preload.ts @@ -3,36 +3,36 @@ import lodash from 'lodash'; -import { filter, map } from '../util/iterables.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { SendMessageProtoError } from '../textsecure/Errors.std.js'; -import { getOwn } from '../util/getOwn.std.js'; -import { isGroup } from '../util/whatTypeOfConversation.dom.js'; -import { handleMessageSend } from '../util/handleMessageSend.preload.js'; -import { getSendOptions } from '../util/getSendOptions.preload.js'; -import { createLogger } from '../logging/log.std.js'; +import { filter, map } from '../util/iterables.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { SendMessageProtoError } from '../textsecure/Errors.std.ts'; +import { getOwn } from '../util/getOwn.std.ts'; +import { isGroup } from '../util/whatTypeOfConversation.dom.ts'; +import { handleMessageSend } from '../util/handleMessageSend.preload.ts'; +import { getSendOptions } from '../util/getSendOptions.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; import { getPropForTimestamp, getChangesForPropAtTimestamp, -} from '../util/editHelpers.std.js'; -import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.js'; +} from '../util/editHelpers.std.ts'; +import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.ts'; import { notifyStorySendFailed, saveErrorsOnMessage, -} from '../test-node/util/messageFailures.preload.js'; -import { isCustomError } from './helpers.std.js'; +} from '../test-node/util/messageFailures.preload.ts'; +import { isCustomError } from './helpers.std.ts'; import { SendActionType, isSent, sendStateReducer, -} from './MessageSendState.std.js'; +} from './MessageSendState.std.ts'; import type { CustomError, MessageAttributesType } from '../model-types.d.ts'; import type { CallbackResultType } from '../textsecure/Types.d.ts'; -import { messageSender } from '../textsecure/SendMessage.preload.js'; -import type { MessageModel } from '../models/messages.preload.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import type { SendStateByConversationId } from './MessageSendState.std.js'; +import { messageSender } from '../textsecure/SendMessage.preload.ts'; +import type { MessageModel } from '../models/messages.preload.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import type { SendStateByConversationId } from './MessageSendState.std.ts'; const { noop, union } = lodash; diff --git a/ts/messages/sources.preload.ts b/ts/messages/sources.preload.ts index 069553e26e..8f714cccae 100644 --- a/ts/messages/sources.preload.ts +++ b/ts/messages/sources.preload.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { createLogger } from '../logging/log.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { isIncoming, isOutgoing, isStory } from './helpers.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { isIncoming, isOutgoing, isStory } from './helpers.std.ts'; const log = createLogger('messages/sources'); diff --git a/ts/model-types.d.ts b/ts/model-types.d.ts index 572171f6bb..fd2b771c00 100644 --- a/ts/model-types.d.ts +++ b/ts/model-types.d.ts @@ -3,48 +3,48 @@ import type { ReadonlyDeep } from 'type-fest'; -import type { GroupV2ChangeType } from './types/groups.std.js'; -import type { DraftBodyRanges, RawBodyRange } from './types/BodyRange.std.js'; +import type { GroupV2ChangeType } from './types/groups.std.ts'; +import type { DraftBodyRanges, RawBodyRange } from './types/BodyRange.std.ts'; import type { CustomColorType, ConversationColorType, -} from './types/Colors.std.js'; -import type { SendMessageChallengeData } from './textsecure/Errors.std.js'; -import type { ProfileNameChangeType } from './util/getStringForProfileChange.std.js'; +} from './types/Colors.std.ts'; +import type { SendMessageChallengeData } from './textsecure/Errors.std.ts'; +import type { ProfileNameChangeType } from './util/getStringForProfileChange.std.ts'; import type { CapabilitiesType } from './types/Capabilities.d.ts'; -import type { ReadStatus } from './messages/MessageReadStatus.std.js'; -import type { SendStateByConversationId } from './messages/MessageSendState.std.js'; -import type { GroupNameCollisionsWithIdsByTitle } from './util/groupMemberNameCollisions.std.js'; +import type { ReadStatus } from './messages/MessageReadStatus.std.ts'; +import type { SendStateByConversationId } from './messages/MessageSendState.std.ts'; +import type { GroupNameCollisionsWithIdsByTitle } from './util/groupMemberNameCollisions.std.ts'; import type { AttachmentDraftType, AttachmentType, -} from './util/Attachment.std.js'; -import type { EmbeddedContactType } from './types/EmbeddedContact.std.js'; -import { SignalService as Proto } from './protobuf/index.std.js'; -import type { AvatarDataType, ContactAvatarType } from './types/Avatar.std.js'; +} from './util/Attachment.std.ts'; +import type { EmbeddedContactType } from './types/EmbeddedContact.std.ts'; +import { SignalService as Proto } from './protobuf/index.std.ts'; +import type { AvatarDataType, ContactAvatarType } from './types/Avatar.std.ts'; import type { AciString, PniString, ServiceIdString, -} from './types/ServiceId.std.js'; -import type { StoryDistributionIdString } from './types/StoryDistributionId.std.js'; -import type { SeenStatus } from './MessageSeenStatus.std.js'; -import type { GiftBadgeStates } from './types/GiftBadgeStates.std.js'; -import type { LinkPreviewType } from './types/message/LinkPreviews.std.js'; +} from './types/ServiceId.std.ts'; +import type { StoryDistributionIdString } from './types/StoryDistributionId.std.ts'; +import type { SeenStatus } from './MessageSeenStatus.std.ts'; +import type { GiftBadgeStates } from './types/GiftBadgeStates.std.ts'; +import type { LinkPreviewType } from './types/message/LinkPreviews.std.ts'; -import type { StickerType } from './types/Stickers.preload.js'; -import type { StorySendMode } from './types/Stories.std.js'; -import type { MIMEType } from './types/MIME.std.js'; -import type { DurationInSeconds } from './util/durations/index.std.js'; -import type { AnyPaymentEvent } from './types/Payment.std.js'; -import type { PollMessageAttribute } from './types/Polls.dom.js'; +import type { StickerType } from './types/Stickers.preload.ts'; +import type { StorySendMode } from './types/Stories.std.ts'; +import type { MIMEType } from './types/MIME.std.ts'; +import type { DurationInSeconds } from './util/durations/index.std.ts'; +import type { AnyPaymentEvent } from './types/Payment.std.ts'; +import type { PollMessageAttribute } from './types/Polls.dom.ts'; import AccessRequiredEnum = Proto.AccessControl.AccessRequired; import MemberRoleEnum = Proto.Member.Role; -import type { MessageRequestResponseEvent } from './types/MessageRequestResponseEvent.std.js'; -import type { QuotedMessageForComposerType } from './state/ducks/composer.preload.js'; -import type { SEALED_SENDER } from './types/SealedSender.std.js'; +import type { MessageRequestResponseEvent } from './types/MessageRequestResponseEvent.std.ts'; +import type { QuotedMessageForComposerType } from './state/ducks/composer.preload.ts'; +import type { SEALED_SENDER } from './types/SealedSender.std.ts'; export type LastMessageStatus = | 'paused' diff --git a/ts/models/conversations.preload.ts b/ts/models/conversations.preload.ts index bf7df4a357..fa5a6d8d5b 100644 --- a/ts/models/conversations.preload.ts +++ b/ts/models/conversations.preload.ts @@ -17,8 +17,8 @@ import type { SenderKeyInfoType, SettableConversationAttributesType, } from '../model-types.d.ts'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { getConversation } from '../util/getConversation.preload.js'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { getConversation } from '../util/getConversation.preload.ts'; import { copyAttachmentIntoTempDirectory, maybeDeleteAttachmentFile, @@ -28,46 +28,46 @@ import { readStickerData, upgradeMessageSchema, writeNewAttachmentData, -} from '../util/migrations.preload.js'; -import { drop } from '../util/drop.std.js'; -import { isShallowEqual } from '../util/isShallowEqual.std.js'; -import { getInitials } from '../util/getInitials.std.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.js'; -import { getNotificationTextForMessage } from '../util/getNotificationTextForMessage.preload.js'; -import { getNotificationDataForMessage } from '../util/getNotificationDataForMessage.preload.js'; -import type { ProfileNameChangeType } from '../util/getStringForProfileChange.std.js'; -import type { AttachmentType, ThumbnailType } from '../types/Attachment.std.js'; -import { toDayMillis } from '../util/timestamp.std.js'; -import { areWeAdmin } from '../util/areWeAdmin.preload.js'; -import { isBlocked } from '../util/isBlocked.preload.js'; -import { getAboutText } from '../util/getAboutText.dom.js'; +} from '../util/migrations.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { isShallowEqual } from '../util/isShallowEqual.std.ts'; +import { getInitials } from '../util/getInitials.std.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.ts'; +import { getNotificationTextForMessage } from '../util/getNotificationTextForMessage.preload.ts'; +import { getNotificationDataForMessage } from '../util/getNotificationDataForMessage.preload.ts'; +import type { ProfileNameChangeType } from '../util/getStringForProfileChange.std.ts'; +import type { AttachmentType, ThumbnailType } from '../types/Attachment.std.ts'; +import { toDayMillis } from '../util/timestamp.std.ts'; +import { areWeAdmin } from '../util/areWeAdmin.preload.ts'; +import { isBlocked } from '../util/isBlocked.preload.ts'; +import { getAboutText } from '../util/getAboutText.dom.ts'; import { getAvatar, getRawAvatarPath, getLocalAvatarUrl, -} from '../util/avatarUtils.preload.js'; -import { getDraftPreview } from '../util/getDraftPreview.preload.js'; -import { hasDraft } from '../util/hasDraft.std.js'; -import { hydrateStoryContext } from '../util/hydrateStoryContext.preload.js'; +} from '../util/avatarUtils.preload.ts'; +import { getDraftPreview } from '../util/getDraftPreview.preload.ts'; +import { hasDraft } from '../util/hasDraft.std.ts'; +import { hydrateStoryContext } from '../util/hydrateStoryContext.preload.ts'; import type { StickerType, StickerWithHydratedData, -} from '../types/Stickers.preload.js'; -import * as Stickers from '../types/Stickers.preload.js'; -import { StorySendMode } from '../types/Stories.std.js'; -import type { EmbeddedContactWithHydratedAvatar } from '../types/EmbeddedContact.std.js'; +} from '../types/Stickers.preload.ts'; +import * as Stickers from '../types/Stickers.preload.ts'; +import { StorySendMode } from '../types/Stories.std.ts'; +import type { EmbeddedContactWithHydratedAvatar } from '../types/EmbeddedContact.std.ts'; import { type GroupV2InfoType, messageSender, -} from '../textsecure/SendMessage.preload.js'; +} from '../textsecure/SendMessage.preload.ts'; import { getAvatar as doGetAvatar, cdsLookup, checkAccountExistence, -} from '../textsecure/WebAPI.preload.js'; -import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.js'; -import { MessageSender } from '../textsecure/SendMessage.preload.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.ts'; +import { MessageSender } from '../textsecure/SendMessage.preload.ts'; import type { CallbackResultType, PniSignatureMessageType, @@ -75,53 +75,53 @@ import type { import type { ConversationType, DraftPreviewType, -} from '../state/ducks/conversations.preload.js'; +} from '../state/ducks/conversations.preload.ts'; import type { AvatarColorType, ConversationColorType, CustomColorType, -} from '../types/Colors.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { isConversationMuted } from '../util/isConversationMuted.std.js'; -import { isConversationSMSOnly } from '../util/isConversationSMSOnly.std.js'; +} from '../types/Colors.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { isConversationMuted } from '../util/isConversationMuted.std.ts'; +import { isConversationSMSOnly } from '../util/isConversationSMSOnly.std.ts'; import { isConversationEverUnregistered, isConversationUnregistered, isConversationUnregisteredAndStale, -} from '../util/isConversationUnregistered.dom.js'; -import { sniffImageMimeType } from '../util/sniffImageMimeType.std.js'; -import { isValidE164 } from '../util/isValidE164.std.js'; -import type { MIMEType } from '../types/MIME.std.js'; -import { IMAGE_JPEG, IMAGE_WEBP } from '../types/MIME.std.js'; +} from '../util/isConversationUnregistered.dom.ts'; +import { sniffImageMimeType } from '../util/sniffImageMimeType.std.ts'; +import { isValidE164 } from '../util/isValidE164.std.ts'; +import type { MIMEType } from '../types/MIME.std.ts'; +import { IMAGE_JPEG, IMAGE_WEBP } from '../types/MIME.std.ts'; import type { AciString, PniString, ServiceIdString, -} from '../types/ServiceId.std.js'; +} from '../types/ServiceId.std.ts'; import { ServiceIdKind, normalizeServiceId, normalizePni, -} from '../types/ServiceId.std.js'; -import { isAciString } from '../util/isAciString.std.js'; +} from '../types/ServiceId.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; import { constantTimeEqual, decryptProfile, decryptProfileName, hashProfileKey, -} from '../Crypto.node.js'; -import { decryptAttachmentV2 } from '../AttachmentCrypto.node.js'; -import * as Bytes from '../Bytes.std.js'; -import type { DraftBodyRanges } from '../types/BodyRange.std.js'; -import { migrateColor } from '../util/migrateColor.node.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { shouldSaveNotificationAvatarToDisk } from '../services/notifications.preload.js'; -import { storageServiceUploadJob } from '../services/storage.preload.js'; -import { challengeHandler } from '../services/challengeHandler.preload.js'; -import { getSendOptions } from '../util/getSendOptions.preload.js'; -import type { IsConversationAcceptedOptionsType } from '../util/isConversationAccepted.preload.js'; -import { isConversationAccepted } from '../util/isConversationAccepted.preload.js'; +} from '../Crypto.node.ts'; +import { decryptAttachmentV2 } from '../AttachmentCrypto.node.ts'; +import * as Bytes from '../Bytes.std.ts'; +import type { DraftBodyRanges } from '../types/BodyRange.std.ts'; +import { migrateColor } from '../util/migrateColor.node.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { shouldSaveNotificationAvatarToDisk } from '../services/notifications.preload.ts'; +import { storageServiceUploadJob } from '../services/storage.preload.ts'; +import { challengeHandler } from '../services/challengeHandler.preload.ts'; +import { getSendOptions } from '../util/getSendOptions.preload.ts'; +import type { IsConversationAcceptedOptionsType } from '../util/isConversationAccepted.preload.ts'; +import { isConversationAccepted } from '../util/isConversationAccepted.preload.ts'; import { getNumber, getProfileName, @@ -130,110 +130,110 @@ import { hasNumberTitle, hasUsernameTitle, canHaveUsername, -} from '../util/getTitle.preload.js'; -import { markConversationRead } from '../util/markConversationRead.preload.js'; -import { handleMessageSend } from '../util/handleMessageSend.preload.js'; -import { getConversationMembers } from '../util/getConversationMembers.dom.js'; -import { updateConversationsWithUuidLookup } from '../updateConversationsWithUuidLookup.dom.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; +} from '../util/getTitle.preload.ts'; +import { markConversationRead } from '../util/markConversationRead.preload.ts'; +import { handleMessageSend } from '../util/handleMessageSend.preload.ts'; +import { getConversationMembers } from '../util/getConversationMembers.dom.ts'; +import { updateConversationsWithUuidLookup } from '../updateConversationsWithUuidLookup.dom.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; import type { LinkPreviewType, LinkPreviewWithHydratedData, -} from '../types/message/LinkPreviews.std.js'; -import type { PollCreateType } from '../types/Polls.dom.js'; +} from '../types/message/LinkPreviews.std.ts'; +import type { PollCreateType } from '../types/Polls.dom.ts'; import { MINUTE, SECOND, DurationInSeconds, -} from '../util/durations/index.std.js'; +} from '../util/durations/index.std.ts'; import { concat, filter, map, repeat, zipObject, -} from '../util/iterables.std.js'; -import * as universalExpireTimer from '../util/universalExpireTimer.preload.js'; -import type { GroupNameCollisionsWithIdsByTitle } from '../util/groupMemberNameCollisions.std.js'; +} from '../util/iterables.std.ts'; +import * as universalExpireTimer from '../util/universalExpireTimer.preload.ts'; +import type { GroupNameCollisionsWithIdsByTitle } from '../util/groupMemberNameCollisions.std.ts'; import { isDirectConversation, isGroup, isGroupV1, isGroupV2, isMe, -} from '../util/whatTypeOfConversation.dom.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +} from '../util/whatTypeOfConversation.dom.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; import { getMessagePropStatus, hasErrors, isIncoming, isStory, -} from '../state/selectors/message.preload.js'; -import { getPreloadedConversationId } from '../state/selectors/conversations.dom.js'; +} from '../state/selectors/message.preload.ts'; +import { getPreloadedConversationId } from '../state/selectors/conversations.dom.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { getProfile } from '../util/getProfile.preload.js'; -import { SEALED_SENDER } from '../types/SealedSender.std.js'; -import { createIdenticon } from '../util/createIdenticon.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { isMessageUnread } from '../util/isMessageUnread.std.js'; -import type { SenderKeyTargetType } from '../util/sendToGroup.preload.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { getProfile } from '../util/getProfile.preload.ts'; +import { SEALED_SENDER } from '../types/SealedSender.std.ts'; +import { createIdenticon } from '../util/createIdenticon.preload.tsx'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { isMessageUnread } from '../util/isMessageUnread.std.ts'; +import type { SenderKeyTargetType } from '../util/sendToGroup.preload.ts'; import { resetSenderKey, sendContentMessageToGroup, -} from '../util/sendToGroup.preload.js'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import { TimelineMessageLoadingState } from '../util/timelineUtil.std.js'; -import { SeenStatus } from '../MessageSeenStatus.std.js'; -import { getConversationIdForLogging } from '../util/idForLogging.preload.js'; -import { getSendTarget } from '../util/getSendTarget.std.js'; -import { getRecipients } from '../util/getRecipients.dom.js'; -import { validateConversation } from '../util/validateConversation.dom.js'; -import { isSignalConversation } from '../util/isSignalConversation.dom.js'; -import { removePendingMember } from '../util/removePendingMember.preload.js'; +} from '../util/sendToGroup.preload.ts'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import { TimelineMessageLoadingState } from '../util/timelineUtil.std.ts'; +import { SeenStatus } from '../MessageSeenStatus.std.ts'; +import { getConversationIdForLogging } from '../util/idForLogging.preload.ts'; +import { getSendTarget } from '../util/getSendTarget.std.ts'; +import { getRecipients } from '../util/getRecipients.dom.ts'; +import { validateConversation } from '../util/validateConversation.dom.ts'; +import { isSignalConversation } from '../util/isSignalConversation.dom.ts'; +import { removePendingMember } from '../util/removePendingMember.preload.ts'; import { isMember, isMemberAwaitingApproval, isMemberBanned, isMemberPending, isMemberRequestingToJoin, -} from '../util/groupMembershipUtils.preload.js'; -import { imageToBlurHash } from '../util/imageToBlurHash.dom.js'; -import { ReceiptType } from '../types/Receipt.std.js'; -import { getQuoteAttachment } from '../util/makeQuote.preload.js'; +} from '../util/groupMembershipUtils.preload.ts'; +import { imageToBlurHash } from '../util/imageToBlurHash.dom.ts'; +import { ReceiptType } from '../types/Receipt.std.ts'; +import { getQuoteAttachment } from '../util/makeQuote.preload.ts'; import { deriveAccessKeyFromProfileKey, deriveProfileKeyVersion, -} from '../util/zkgroup.node.js'; -import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.js'; -import { generateMessageId } from '../util/generateMessageId.node.js'; +} from '../util/zkgroup.node.ts'; +import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.ts'; +import { generateMessageId } from '../util/generateMessageId.node.ts'; import { getMessageAuthorAci, getMessageAuthorText, -} from '../util/getMessageAuthorText.preload.js'; -import { downscaleOutgoingAttachment } from '../util/attachments.preload.js'; +} from '../util/getMessageAuthorText.preload.ts'; +import { downscaleOutgoingAttachment } from '../util/attachments.preload.ts'; import { MessageRequestResponseSource, type MessageRequestResponseInfo, MessageRequestResponseEvent, -} from '../types/MessageRequestResponseEvent.std.js'; -import type { AddressableMessage } from '../textsecure/messageReceiverEvents.std.js'; +} from '../types/MessageRequestResponseEvent.std.ts'; +import type { AddressableMessage } from '../textsecure/messageReceiverEvents.std.ts'; import { getConversationIdentifier, getAddressableMessage, -} from '../util/syncIdentifiers.preload.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { getCallHistorySelector } from '../state/selectors/callHistory.std.js'; -import { migrateLegacyReadStatus } from '../messages/migrateLegacyReadStatus.std.js'; -import { migrateLegacySendAttributes } from '../messages/migrateLegacySendAttributes.preload.js'; -import { getIsInitialContactSync } from '../services/contactSync.preload.js'; -import { queueAttachmentDownloadsAndMaybeSaveMessage } from '../util/queueAttachmentDownloads.preload.js'; -import { cleanupMessages } from '../util/cleanup.preload.js'; -import { MessageModel } from './messages.preload.js'; +} from '../util/syncIdentifiers.preload.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { getCallHistorySelector } from '../state/selectors/callHistory.std.ts'; +import { migrateLegacyReadStatus } from '../messages/migrateLegacyReadStatus.std.ts'; +import { migrateLegacySendAttributes } from '../messages/migrateLegacySendAttributes.preload.ts'; +import { getIsInitialContactSync } from '../services/contactSync.preload.ts'; +import { queueAttachmentDownloadsAndMaybeSaveMessage } from '../util/queueAttachmentDownloads.preload.ts'; +import { cleanupMessages } from '../util/cleanup.preload.ts'; +import { MessageModel } from './messages.preload.ts'; import { applyNewAvatar, buildAccessControlAddFromInviteLinkChange, @@ -260,15 +260,15 @@ import { modifyGroupV2, waitThenMaybeUpdateGroup, waitThenRespondToGroupV2Migration, -} from '../groups.preload.js'; -import { safeSetTimeout } from '../util/timeout.std.js'; -import { getTypingIndicatorSetting } from '../util/Settings.preload.js'; -import { INITIAL_EXPIRE_TIMER_VERSION } from '../util/expirationTimer.std.js'; -import { maybeNotify } from '../messages/maybeNotify.preload.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import * as Message from '../types/Message2.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { isUsernameValid } from '../util/Username.dom.js'; +} from '../groups.preload.ts'; +import { safeSetTimeout } from '../util/timeout.std.ts'; +import { getTypingIndicatorSetting } from '../util/Settings.preload.ts'; +import { INITIAL_EXPIRE_TIMER_VERSION } from '../util/expirationTimer.std.ts'; +import { maybeNotify } from '../messages/maybeNotify.preload.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import * as Message from '../types/Message2.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { isUsernameValid } from '../util/Username.dom.ts'; const { compact, isNumber, throttle, debounce } = lodash; diff --git a/ts/models/messages.preload.ts b/ts/models/messages.preload.ts index eed4222a9d..6aa5351542 100644 --- a/ts/models/messages.preload.ts +++ b/ts/models/messages.preload.ts @@ -3,8 +3,8 @@ import type { MessageAttributesType } from '../model-types.d.ts'; import type { CallbackResultType } from '../textsecure/Types.d.ts'; -import { initializeSchemaVersion } from '../types/Message2.preload.js'; -import { createLogger } from '../logging/log.std.js'; +import { initializeSchemaVersion } from '../types/Message2.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('messages'); diff --git a/ts/polls/enqueuePollTerminateForSend.preload.ts b/ts/polls/enqueuePollTerminateForSend.preload.ts index 11e5a96336..0ed0ad266c 100644 --- a/ts/polls/enqueuePollTerminateForSend.preload.ts +++ b/ts/polls/enqueuePollTerminateForSend.preload.ts @@ -5,16 +5,16 @@ import { v7 as generateUuid } from 'uuid'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; import { handlePollTerminate, PollSource, type PollTerminateAttributesType, -} from '../messageModifiers/Polls.preload.js'; -import { isGroupV1 } from '../util/whatTypeOfConversation.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../messageModifiers/Polls.preload.ts'; +import { isGroupV1 } from '../util/whatTypeOfConversation.dom.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('enqueuePollTerminateForSend'); diff --git a/ts/polls/enqueuePollVoteForSend.preload.ts b/ts/polls/enqueuePollVoteForSend.preload.ts index e303e64b6e..2512539505 100644 --- a/ts/polls/enqueuePollVoteForSend.preload.ts +++ b/ts/polls/enqueuePollVoteForSend.preload.ts @@ -5,18 +5,18 @@ import { v7 as generateUuid } from 'uuid'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; import { handlePollVote, PollSource, -} from '../messageModifiers/Polls.preload.js'; -import type { PollVoteAttributesType } from '../messageModifiers/Polls.preload.js'; -import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.js'; -import { getSourceServiceId } from '../messages/sources.preload.js'; -import { isAciString } from '../util/isAciString.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../messageModifiers/Polls.preload.ts'; +import type { PollVoteAttributesType } from '../messageModifiers/Polls.preload.ts'; +import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.ts'; +import { getSourceServiceId } from '../messages/sources.preload.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('enqueuePollVoteForSend'); diff --git a/ts/polls/util.std.ts b/ts/polls/util.std.ts index 2218d740f2..4759ce71f0 100644 --- a/ts/polls/util.std.ts +++ b/ts/polls/util.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { omit } from 'lodash'; -import type { MessagePollVoteType } from '../types/Polls.dom.js'; -import { isSent } from '../messages/MessageSendState.std.js'; -import type { SendStateByConversationId } from '../messages/MessageSendState.std.js'; +import type { MessagePollVoteType } from '../types/Polls.dom.ts'; +import { isSent } from '../messages/MessageSendState.std.ts'; +import type { SendStateByConversationId } from '../messages/MessageSendState.std.ts'; export function* getUnsentConversationIds( pollVote: Readonly> diff --git a/ts/quill/auto-substitute-ascii-emojis/index.dom.tsx b/ts/quill/auto-substitute-ascii-emojis/index.dom.tsx index 4467beaa6b..116c53862a 100644 --- a/ts/quill/auto-substitute-ascii-emojis/index.dom.tsx +++ b/ts/quill/auto-substitute-ascii-emojis/index.dom.tsx @@ -5,13 +5,13 @@ import { Delta } from '@signalapp/quill-cjs'; import Emitter from '@signalapp/quill-cjs/core/emitter.js'; import type Quill from '@signalapp/quill-cjs'; -import { createLogger } from '../../logging/log.std.js'; -import type { EmojiParentKey } from '../../components/fun/data/emojis.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import type { EmojiParentKey } from '../../components/fun/data/emojis.std.ts'; import { EMOJI_PARENT_KEY_CONSTANTS, EmojiSkinTone, getEmojiVariantByParentKeyAndSkinTone, -} from '../../components/fun/data/emojis.std.js'; +} from '../../components/fun/data/emojis.std.ts'; const log = createLogger('index'); diff --git a/ts/quill/emoji/blot.dom.tsx b/ts/quill/emoji/blot.dom.tsx index 21d13ddedb..98b23163de 100644 --- a/ts/quill/emoji/blot.dom.tsx +++ b/ts/quill/emoji/blot.dom.tsx @@ -2,16 +2,16 @@ // SPDX-License-Identifier: AGPL-3.0-only import EmbedBlot from '@signalapp/quill-cjs/blots/embed.js'; -import type { EmojiVariantValue } from '../../components/fun/data/emojis.std.js'; +import type { EmojiVariantValue } from '../../components/fun/data/emojis.std.ts'; import { getEmojiVariantByKey, getEmojiVariantKeyByValue, -} from '../../components/fun/data/emojis.std.js'; +} from '../../components/fun/data/emojis.std.ts'; import { createStaticEmojiBlot, FUN_STATIC_EMOJI_CLASS, getFunEmojiElementValue, -} from '../../components/fun/FunEmoji.dom.js'; +} from '../../components/fun/FunEmoji.dom.tsx'; // the DOM structure of this EmojiBlot should match the other emoji implementations: // ts/components/fun/FunEmoji.tsx diff --git a/ts/quill/emoji/completion.dom.tsx b/ts/quill/emoji/completion.dom.tsx index 0eaf27ccb6..61a119534d 100644 --- a/ts/quill/emoji/completion.dom.tsx +++ b/ts/quill/emoji/completion.dom.tsx @@ -10,23 +10,23 @@ import { Popper } from 'react-popper'; import classNames from 'classnames'; import { createPortal } from 'react-dom'; import type { VirtualElement } from '@popperjs/core'; -import { getBlotTextPartitions, matchBlotTextPartitions } from '../util.dom.js'; -import { handleOutsideClick } from '../../util/handleOutsideClick.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import { FunStaticEmoji } from '../../components/fun/FunEmoji.dom.js'; -import type { EmojiParentKey } from '../../components/fun/data/emojis.std.js'; +import { getBlotTextPartitions, matchBlotTextPartitions } from '../util.dom.ts'; +import { handleOutsideClick } from '../../util/handleOutsideClick.dom.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { FunStaticEmoji } from '../../components/fun/FunEmoji.dom.tsx'; +import type { EmojiParentKey } from '../../components/fun/data/emojis.std.ts'; import { EmojiSkinTone, getEmojiVariantByParentKeyAndSkinTone, normalizeShortNameCompletionDisplay, -} from '../../components/fun/data/emojis.std.js'; +} from '../../components/fun/data/emojis.std.ts'; import type { FunEmojiSearchResult, FunEmojiSearch, -} from '../../components/fun/useFunEmojiSearch.dom.js'; -import { type FunEmojiLocalizer } from '../../components/fun/useFunEmojiLocalizer.dom.js'; -import type { FunEmojiSelection } from '../../components/fun/panels/FunPanelEmojis.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../components/fun/useFunEmojiSearch.dom.tsx'; +import { type FunEmojiLocalizer } from '../../components/fun/useFunEmojiLocalizer.dom.tsx'; +import type { FunEmojiSelection } from '../../components/fun/panels/FunPanelEmojis.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; const { isNumber, debounce } = lodash; diff --git a/ts/quill/emoji/index.dom.tsx b/ts/quill/emoji/index.dom.tsx index 452dd9ca92..e5557af195 100644 --- a/ts/quill/emoji/index.dom.tsx +++ b/ts/quill/emoji/index.dom.tsx @@ -1,5 +1,5 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -export { EmojiBlot } from './blot.dom.js'; -export { EmojiCompletion } from './completion.dom.js'; +export { EmojiBlot } from './blot.dom.tsx'; +export { EmojiCompletion } from './completion.dom.tsx'; diff --git a/ts/quill/emoji/matchers.dom.ts b/ts/quill/emoji/matchers.dom.ts index 301c03a9db..654d4d5b7a 100644 --- a/ts/quill/emoji/matchers.dom.ts +++ b/ts/quill/emoji/matchers.dom.ts @@ -3,9 +3,9 @@ import { Delta } from '@signalapp/quill-cjs'; -import { insertEmojiOps } from '../util.dom.js'; -import type { Matcher } from '../util.dom.js'; -import { getFunEmojiElementValue } from '../../components/fun/FunEmoji.dom.js'; +import { insertEmojiOps } from '../util.dom.ts'; +import type { Matcher } from '../util.dom.ts'; +import { getFunEmojiElementValue } from '../../components/fun/FunEmoji.dom.tsx'; export const matchEmojiBlot: Matcher = ( node, diff --git a/ts/quill/formatting/matchers.dom.ts b/ts/quill/formatting/matchers.dom.ts index 9a7b2178b6..aeac48cef1 100644 --- a/ts/quill/formatting/matchers.dom.ts +++ b/ts/quill/formatting/matchers.dom.ts @@ -4,8 +4,8 @@ import { Delta } from '@signalapp/quill-cjs'; import type { AttributeMap } from '@signalapp/quill-cjs'; -import { QuillFormattingStyle } from './menu.dom.js'; -import type { Matcher } from '../util.dom.js'; +import { QuillFormattingStyle } from './menu.dom.tsx'; +import type { Matcher } from '../util.dom.ts'; function applyStyleToOps( delta: Delta, diff --git a/ts/quill/formatting/menu.dom.tsx b/ts/quill/formatting/menu.dom.tsx index 2e5d6877ab..5369d54e97 100644 --- a/ts/quill/formatting/menu.dom.tsx +++ b/ts/quill/formatting/menu.dom.tsx @@ -12,10 +12,10 @@ import type { Op } from '@signalapp/quill-cjs'; import type { Context as KeyboardContext } from '@signalapp/quill-cjs/modules/keyboard.js'; import type { VirtualElement } from '@popperjs/core'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { handleOutsideClick } from '../../util/handleOutsideClick.dom.js'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { handleOutsideClick } from '../../util/handleOutsideClick.dom.ts'; const { isString } = lodash; diff --git a/ts/quill/memberRepository.std.ts b/ts/quill/memberRepository.std.ts index 65146b7e36..b7d38257c8 100644 --- a/ts/quill/memberRepository.std.ts +++ b/ts/quill/memberRepository.std.ts @@ -4,12 +4,12 @@ import Fuse from 'fuse.js'; import lodash from 'lodash'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { isAciString } from '../util/isAciString.std.js'; -import { filter, map } from '../util/iterables.std.js'; -import { removeDiacritics } from '../util/removeDiacritics.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import { filter, map } from '../util/iterables.std.ts'; +import { removeDiacritics } from '../util/removeDiacritics.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; const { get } = lodash; diff --git a/ts/quill/mentions/blot.dom.tsx b/ts/quill/mentions/blot.dom.tsx index 3d5c1762db..b961f1b0a1 100644 --- a/ts/quill/mentions/blot.dom.tsx +++ b/ts/quill/mentions/blot.dom.tsx @@ -5,11 +5,11 @@ import React, { StrictMode } from 'react'; import EmbedBlot from '@signalapp/quill-cjs/blots/embed.js'; import { createRoot } from 'react-dom/client'; -import { Emojify } from '../../components/conversation/Emojify.dom.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; -import type { MentionBlotValue } from '../util.dom.js'; -import { FunEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.js'; -import { AxoProvider } from '../../axo/AxoProvider.dom.js'; +import { Emojify } from '../../components/conversation/Emojify.dom.tsx'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; +import type { MentionBlotValue } from '../util.dom.ts'; +import { FunEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.tsx'; +import { AxoProvider } from '../../axo/AxoProvider.dom.tsx'; const { i18n } = window.SignalContext; diff --git a/ts/quill/mentions/completion.dom.tsx b/ts/quill/mentions/completion.dom.tsx index 05ab472c0f..6cf6f74598 100644 --- a/ts/quill/mentions/completion.dom.tsx +++ b/ts/quill/mentions/completion.dom.tsx @@ -11,15 +11,15 @@ import { Popper } from 'react-popper'; import classNames from 'classnames'; import { createPortal } from 'react-dom'; -import { Avatar, AvatarSize } from '../../components/Avatar.dom.js'; -import type { LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { MemberType, MemberRepository } from '../memberRepository.std.js'; -import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.js'; -import { matchBlotTextPartitions } from '../util.dom.js'; -import type { MentionBlotValue } from '../util.dom.js'; -import { handleOutsideClick } from '../../util/handleOutsideClick.dom.js'; -import { sameWidthModifier } from '../../util/popperUtil.std.js'; -import { UserText } from '../../components/UserText.dom.js'; +import { Avatar, AvatarSize } from '../../components/Avatar.dom.tsx'; +import type { LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { MemberType, MemberRepository } from '../memberRepository.std.ts'; +import type { PreferredBadgeSelectorType } from '../../state/selectors/badges.preload.ts'; +import { matchBlotTextPartitions } from '../util.dom.ts'; +import type { MentionBlotValue } from '../util.dom.ts'; +import { handleOutsideClick } from '../../util/handleOutsideClick.dom.ts'; +import { sameWidthModifier } from '../../util/popperUtil.std.ts'; +import { UserText } from '../../components/UserText.dom.tsx'; export type MentionCompletionOptions = { getPreferredBadge: PreferredBadgeSelectorType; diff --git a/ts/quill/mentions/matchers.std.ts b/ts/quill/mentions/matchers.std.ts index 751c95597f..c908bf87be 100644 --- a/ts/quill/mentions/matchers.std.ts +++ b/ts/quill/mentions/matchers.std.ts @@ -4,10 +4,10 @@ import { Delta } from '@signalapp/quill-cjs'; import type { RefObject } from 'react'; -import { assertDev } from '../../util/assert.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import type { MemberRepository } from '../memberRepository.std.js'; -import type { Matcher } from '../util.dom.js'; +import { assertDev } from '../../util/assert.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import type { MemberRepository } from '../memberRepository.std.ts'; +import type { Matcher } from '../util.dom.ts'; export const matchMention: ( memberRepositoryRef: RefObject diff --git a/ts/quill/signal-clipboard/index.dom.ts b/ts/quill/signal-clipboard/index.dom.ts index c1a56a791f..e8619623ca 100644 --- a/ts/quill/signal-clipboard/index.dom.ts +++ b/ts/quill/signal-clipboard/index.dom.ts @@ -8,9 +8,9 @@ import { deleteRange } from '@signalapp/quill-cjs/modules/keyboard.js'; import { FormattingMenu, QuillFormattingStyle, -} from '../formatting/menu.dom.js'; -import { insertEmojiOps } from '../util.dom.js'; -import { createEventHandler } from './util.dom.js'; +} from '../formatting/menu.dom.tsx'; +import { insertEmojiOps } from '../util.dom.ts'; +import { createEventHandler } from './util.dom.ts'; type ClipboardOptions = Readonly<{ isDisabled: boolean; diff --git a/ts/quill/signal-clipboard/util.dom.ts b/ts/quill/signal-clipboard/util.dom.ts index 3597c3319d..fdeb2d0d0c 100644 --- a/ts/quill/signal-clipboard/util.dom.ts +++ b/ts/quill/signal-clipboard/util.dom.ts @@ -1,7 +1,7 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getFunEmojiElementValue } from '../../components/fun/FunEmoji.dom.js'; +import { getFunEmojiElementValue } from '../../components/fun/FunEmoji.dom.tsx'; const QUILL_EMBED_GUARD = '\uFEFF'; diff --git a/ts/quill/util.dom.ts b/ts/quill/util.dom.ts index 681fca2b42..ce686eac5e 100644 --- a/ts/quill/util.dom.ts +++ b/ts/quill/util.dom.ts @@ -9,23 +9,23 @@ import type { DisplayNode, DraftBodyRange, DraftBodyRanges, -} from '../types/BodyRange.std.js'; -import { BodyRange } from '../types/BodyRange.std.js'; -import type { MentionBlot } from './mentions/blot.dom.js'; -import type { EmojiBlot } from './emoji/blot.dom.js'; +} from '../types/BodyRange.std.ts'; +import { BodyRange } from '../types/BodyRange.std.ts'; +import type { MentionBlot } from './mentions/blot.dom.tsx'; +import type { EmojiBlot } from './emoji/blot.dom.tsx'; import { isNewlineOnlyOp, QuillFormattingStyle, -} from './formatting/menu.dom.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; +} from './formatting/menu.dom.tsx'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; import { getEmojiDebugLabel, getEmojiVariantByKey, getEmojiVariantKeyByValue, isSafeEmojifyEmoji, -} from '../components/fun/data/emojis.std.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../components/fun/data/emojis.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('quill/util'); diff --git a/ts/reactions/constants.std.ts b/ts/reactions/constants.std.ts index cd80643866..ffc99833be 100644 --- a/ts/reactions/constants.std.ts +++ b/ts/reactions/constants.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { EMOJI_PARENT_KEY_CONSTANTS } from '../components/fun/data/emojis.std.js'; +import { EMOJI_PARENT_KEY_CONSTANTS } from '../components/fun/data/emojis.std.ts'; export const DEFAULT_PREFERRED_REACTION_EMOJI_PARENT_KEYS = [ EMOJI_PARENT_KEY_CONSTANTS.RED_HEART, diff --git a/ts/reactions/enqueueReactionForSend.preload.ts b/ts/reactions/enqueueReactionForSend.preload.ts index 078234388a..a405fe210b 100644 --- a/ts/reactions/enqueueReactionForSend.preload.ts +++ b/ts/reactions/enqueueReactionForSend.preload.ts @@ -4,26 +4,26 @@ import noop from 'lodash/noop.js'; import { v7 as generateUuid } from 'uuid'; -import { DataWriter } from '../sql/Client.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; import { handleReaction, type ReactionAttributesType, -} from '../messageModifiers/Reactions.preload.js'; -import { ReactionSource } from './ReactionSource.std.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { getSourceServiceId } from '../messages/sources.preload.js'; -import { isStory } from '../messages/helpers.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { isDirectConversation } from '../util/whatTypeOfConversation.dom.js'; -import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.js'; -import { generateMessageId } from '../util/generateMessageId.node.js'; -import { repeat, zipObject } from '../util/iterables.std.js'; -import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.js'; -import { isAciString } from '../util/isAciString.std.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; +} from '../messageModifiers/Reactions.preload.ts'; +import { ReactionSource } from './ReactionSource.std.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { getSourceServiceId } from '../messages/sources.preload.ts'; +import { isStory } from '../messages/helpers.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { isDirectConversation } from '../util/whatTypeOfConversation.dom.ts'; +import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.ts'; +import { generateMessageId } from '../util/generateMessageId.node.ts'; +import { repeat, zipObject } from '../util/iterables.std.ts'; +import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; const log = createLogger('enqueueReactionForSend'); diff --git a/ts/reactions/isValidReactionEmoji.std.ts b/ts/reactions/isValidReactionEmoji.std.ts index a149a23331..4ac416ff05 100644 --- a/ts/reactions/isValidReactionEmoji.std.ts +++ b/ts/reactions/isValidReactionEmoji.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import emojiRegex from 'emoji-regex'; -import { getGraphemes } from '../util/grapheme.std.js'; -import { take, size } from '../util/iterables.std.js'; +import { getGraphemes } from '../util/grapheme.std.ts'; +import { take, size } from '../util/iterables.std.ts'; export function isValidReactionEmoji(value: unknown): value is string { if (typeof value !== 'string') { diff --git a/ts/reactions/preferredReactionEmoji.std.ts b/ts/reactions/preferredReactionEmoji.std.ts index b7f1eec29f..d2b046fe8a 100644 --- a/ts/reactions/preferredReactionEmoji.std.ts +++ b/ts/reactions/preferredReactionEmoji.std.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; -import { DEFAULT_PREFERRED_REACTION_EMOJI_PARENT_KEYS } from './constants.std.js'; -import { isValidReactionEmoji } from './isValidReactionEmoji.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { DEFAULT_PREFERRED_REACTION_EMOJI_PARENT_KEYS } from './constants.std.ts'; +import { isValidReactionEmoji } from './isValidReactionEmoji.std.ts'; import { getEmojiVariantByParentKeyAndSkinTone, type EmojiSkinTone, -} from '../components/fun/data/emojis.std.js'; +} from '../components/fun/data/emojis.std.ts'; const { times } = lodash; diff --git a/ts/reactions/util.std.ts b/ts/reactions/util.std.ts index 3df0847a7d..26a0238670 100644 --- a/ts/reactions/util.std.ts +++ b/ts/reactions/util.std.ts @@ -3,7 +3,7 @@ import lodash from 'lodash'; import type { MessageReactionType } from '../model-types.d.ts'; -import { areObjectEntriesEqual } from '../util/areObjectEntriesEqual.std.js'; +import { areObjectEntriesEqual } from '../util/areObjectEntriesEqual.std.ts'; const { findLastIndex, has, identity, omit, negate } = lodash; diff --git a/ts/routineProfileRefresh.preload.ts b/ts/routineProfileRefresh.preload.ts index 3a193c5286..c2b19d5fb7 100644 --- a/ts/routineProfileRefresh.preload.ts +++ b/ts/routineProfileRefresh.preload.ts @@ -4,18 +4,18 @@ import lodash from 'lodash'; import PQueue from 'p-queue'; -import { createLogger } from './logging/log.std.js'; -import { assertDev } from './util/assert.std.js'; -import { sleep } from './util/sleep.std.js'; -import { isNormalNumber } from './util/isNormalNumber.std.js'; -import { take } from './util/iterables.std.js'; -import type { ConversationModel } from './models/conversations.preload.js'; +import { createLogger } from './logging/log.std.ts'; +import { assertDev } from './util/assert.std.ts'; +import { sleep } from './util/sleep.std.ts'; +import { isNormalNumber } from './util/isNormalNumber.std.ts'; +import { take } from './util/iterables.std.ts'; +import type { ConversationModel } from './models/conversations.preload.ts'; import type { StorageInterface } from './types/Storage.d.ts'; -import * as Errors from './types/errors.std.js'; -import { getProfile } from './util/getProfile.preload.js'; -import { drop } from './util/drop.std.js'; -import { MINUTE, HOUR, DAY, WEEK } from './util/durations/index.std.js'; -import { isDirectConversation } from './util/whatTypeOfConversation.dom.js'; +import * as Errors from './types/errors.std.ts'; +import { getProfile } from './util/getProfile.preload.ts'; +import { drop } from './util/drop.std.ts'; +import { MINUTE, HOUR, DAY, WEEK } from './util/durations/index.std.ts'; +import { isDirectConversation } from './util/whatTypeOfConversation.dom.ts'; const { isNil, sortBy } = lodash; diff --git a/ts/scripts/after-all-artifact-build.node.ts b/ts/scripts/after-all-artifact-build.node.ts index 2ab0c9930f..2e382253d8 100644 --- a/ts/scripts/after-all-artifact-build.node.ts +++ b/ts/scripts/after-all-artifact-build.node.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { BuildResult } from 'electron-builder'; -import { afterAllArtifactBuild as notarizeUniversalDMG } from './notarize-universal-dmg.node.js'; +import { afterAllArtifactBuild as notarizeUniversalDMG } from './notarize-universal-dmg.node.ts'; export async function afterAllArtifactBuild( result: BuildResult diff --git a/ts/scripts/after-pack.node.ts b/ts/scripts/after-pack.node.ts index 18d78e9de0..cd6f47b944 100644 --- a/ts/scripts/after-pack.node.ts +++ b/ts/scripts/after-pack.node.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { AfterPackContext } from 'electron-builder'; -import { afterPack as fuseElectron } from './fuse-electron.node.js'; -import { afterPack as copyPacks } from './copy-language-packs.node.js'; -import { afterPack as pruneMacOSRelease } from './prune-macos-release.node.js'; -import { afterPack as ensureLinuxFilePermissions } from './ensure-linux-file-permissions.node.js'; +import { afterPack as fuseElectron } from './fuse-electron.node.ts'; +import { afterPack as copyPacks } from './copy-language-packs.node.ts'; +import { afterPack as pruneMacOSRelease } from './prune-macos-release.node.ts'; +import { afterPack as ensureLinuxFilePermissions } from './ensure-linux-file-permissions.node.ts'; export async function afterPack(context: AfterPackContext): Promise { await pruneMacOSRelease(context); diff --git a/ts/scripts/after-sign.node.ts b/ts/scripts/after-sign.node.ts index 0353bce888..bc96864263 100644 --- a/ts/scripts/after-sign.node.ts +++ b/ts/scripts/after-sign.node.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { AfterPackContext } from 'electron-builder'; -import { afterSign as notarize } from './notarize.node.js'; +import { afterSign as notarize } from './notarize.node.ts'; // NOTE: It is AfterPackContext here even though it is afterSign. // See: https://www.electron.build/configuration/configuration.html#aftersign diff --git a/ts/scripts/build-localized-display-names.node.ts b/ts/scripts/build-localized-display-names.node.ts index 7195e9c35e..8274fe7e91 100644 --- a/ts/scripts/build-localized-display-names.node.ts +++ b/ts/scripts/build-localized-display-names.node.ts @@ -5,8 +5,8 @@ import { parse } from 'csv-parse'; import fs from 'node:fs/promises'; import { join } from 'node:path'; import { z } from 'zod'; -import { _getAvailableLocales } from '../../app/locale.node.js'; -import { parseUnknown } from '../util/schemas.std.js'; +import { _getAvailableLocales } from '../../app/locale.node.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; const type = process.argv[2]; if (type !== 'countries' && type !== 'locales') { diff --git a/ts/scripts/check-min-os-version.node.ts b/ts/scripts/check-min-os-version.node.ts index f5682a34fa..2890f4ae24 100644 --- a/ts/scripts/check-min-os-version.node.ts +++ b/ts/scripts/check-min-os-version.node.ts @@ -13,8 +13,8 @@ import { Format, NtExecutable } from 'pe-library'; // Note: because we don't run under electron - this is a path to binary import ELECTRON_BINARY from 'electron'; -import { drop } from '../util/drop.std.js'; -import { packageJson } from '../util/packageJson.node.js'; +import { drop } from '../util/drop.std.ts'; +import { packageJson } from '../util/packageJson.node.ts'; const { ImageDosHeader, ImageNtHeaders, ImageDirectoryEntry } = Format; diff --git a/ts/scripts/compile-stories-icu-lookup.node.ts b/ts/scripts/compile-stories-icu-lookup.node.ts index d53f07aa45..b4f1cdca71 100644 --- a/ts/scripts/compile-stories-icu-lookup.node.ts +++ b/ts/scripts/compile-stories-icu-lookup.node.ts @@ -5,7 +5,7 @@ import { readFile, writeFile, readdir, readlink } from 'node:fs/promises'; import { join, basename } from 'node:path'; import pMap from 'p-map'; -import { drop } from '../util/drop.std.js'; +import { drop } from '../util/drop.std.ts'; async function main(): Promise { const source = process.argv[2]; diff --git a/ts/scripts/copy.node.ts b/ts/scripts/copy.node.ts deleted file mode 100644 index ca0944b101..0000000000 --- a/ts/scripts/copy.node.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2021 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -import { join } from 'node:path'; -import { copyFileSync } from 'node:fs'; - -const BASE_BOWER = join(__dirname, '../../components'); - -// Copy - -console.log(); -console.log('Copying...'); - -const BASE_JS = join(__dirname, '../../js'); -const COPY_SOURCES = [ - { - src: join(BASE_BOWER, 'mp3lameencoder/lib/Mp3LameEncoder.js'), - dest: join(BASE_JS, 'Mp3LameEncoder.min.js'), - }, - { - src: join(BASE_BOWER, 'webaudiorecorder/lib/WebAudioRecorderMp3.js'), - dest: join(BASE_JS, 'WebAudioRecorderMp3.js'), - }, -]; - -for (const { src, dest } of COPY_SOURCES) { - console.log(`Copying ${src} to ${dest}`); - copyFileSync(src, dest); -} diff --git a/ts/scripts/gen-nsis-script.node.ts b/ts/scripts/gen-nsis-script.node.ts index a25be65daf..9ddbfdc115 100644 --- a/ts/scripts/gen-nsis-script.node.ts +++ b/ts/scripts/gen-nsis-script.node.ts @@ -11,7 +11,7 @@ import fs from 'node:fs'; // // Make sure to sync up the values in `util/nsis` with upstream // `app-builder-lib`. -import { REQUIRED_LANGUAGES, LCID } from '../util/nsis.std.js'; +import { REQUIRED_LANGUAGES, LCID } from '../util/nsis.std.ts'; const STRING_VARS = new Map([ [ diff --git a/ts/scripts/gen-policy-files.node.ts b/ts/scripts/gen-policy-files.node.ts index 3d0e0cc7e4..9a83b6c237 100644 --- a/ts/scripts/gen-policy-files.node.ts +++ b/ts/scripts/gen-policy-files.node.ts @@ -5,7 +5,7 @@ import fs from 'node:fs/promises'; import path from 'node:path'; import fastGlob from 'fast-glob'; -import { strictAssert } from '../util/assert.std.js'; +import { strictAssert } from '../util/assert.std.ts'; const ROOT_DIR = path.join(__dirname, '..', '..'); diff --git a/ts/scripts/generate-compact-locales.node.ts b/ts/scripts/generate-compact-locales.node.ts index 7a9813d42d..f10e10cdc2 100644 --- a/ts/scripts/generate-compact-locales.node.ts +++ b/ts/scripts/generate-compact-locales.node.ts @@ -4,7 +4,7 @@ import { readdir, mkdir, readFile, writeFile } from 'node:fs/promises'; import { join, dirname } from 'node:path'; import pMap from 'p-map'; -import { isLocaleMessageType } from '../util/setupI18nMain.std.js'; +import { isLocaleMessageType } from '../util/setupI18nMain.std.ts'; async function compact({ sourceDir, diff --git a/ts/scripts/generate-dns-fallback.node.ts b/ts/scripts/generate-dns-fallback.node.ts index 46a2131bfd..4df35e62be 100644 --- a/ts/scripts/generate-dns-fallback.node.ts +++ b/ts/scripts/generate-dns-fallback.node.ts @@ -6,7 +6,7 @@ import { writeFile } from 'node:fs/promises'; import { join } from 'node:path'; import { promisify } from 'node:util'; -import { isNotNil } from '../util/isNotNil.std.js'; +import { isNotNil } from '../util/isNotNil.std.ts'; const resolve4 = promisify(resolve4Cb); const resolve6 = promisify(resolve6Cb); diff --git a/ts/scripts/generate-icu-types.node.ts b/ts/scripts/generate-icu-types.node.ts index 4676168306..a05ba3c7af 100644 --- a/ts/scripts/generate-icu-types.node.ts +++ b/ts/scripts/generate-icu-types.node.ts @@ -7,12 +7,12 @@ import path from 'node:path'; import ts from 'typescript'; import prettier from 'prettier'; -import { getICUMessageParams } from '../util/getICUMessageParams.std.js'; -import type { ICUMessageParamType } from '../util/getICUMessageParams.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import { getICUMessageParams } from '../util/getICUMessageParams.std.ts'; +import type { ICUMessageParamType } from '../util/getICUMessageParams.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; import globalMessages from '../../_locales/en/messages.json'; -import { DELETED_REGEXP } from './constants.std.js'; +import { DELETED_REGEXP } from './constants.std.ts'; function translateParamType( param: ICUMessageParamType, diff --git a/ts/scripts/generate-preload-cache.node.ts b/ts/scripts/generate-preload-cache.node.ts index c98e7f607f..1220d809b1 100644 --- a/ts/scripts/generate-preload-cache.node.ts +++ b/ts/scripts/generate-preload-cache.node.ts @@ -8,8 +8,8 @@ import { mkdir, mkdtemp, rm, rename } from 'node:fs/promises'; import pTimeout from 'p-timeout'; import ELECTRON_BIN from 'electron'; -import { MINUTE } from '../util/durations/index.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; +import { MINUTE } from '../util/durations/index.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; const ROOT_DIR = join(__dirname, '..', '..'); diff --git a/ts/scripts/generate-tray-icons.node.ts b/ts/scripts/generate-tray-icons.node.ts index e4773c5015..d7906c652f 100644 --- a/ts/scripts/generate-tray-icons.node.ts +++ b/ts/scripts/generate-tray-icons.node.ts @@ -4,7 +4,7 @@ import { createCanvas, GlobalFonts, loadImage } from '@napi-rs/canvas'; import { join } from 'node:path'; import { mkdir, rm, writeFile } from 'node:fs/promises'; -import { strictAssert } from '../util/assert.std.js'; +import { strictAssert } from '../util/assert.std.ts'; const cwd = __dirname; const fontsDir = join(cwd, '..', '..', 'fonts'); diff --git a/ts/scripts/get-emoji-locales.node.ts b/ts/scripts/get-emoji-locales.node.ts index 2327582b56..3e933e4662 100644 --- a/ts/scripts/get-emoji-locales.node.ts +++ b/ts/scripts/get-emoji-locales.node.ts @@ -7,9 +7,9 @@ import { join } from 'node:path'; import z from 'zod'; import prettier from 'prettier'; -import type { OptionalResourceType } from '../types/OptionalResource.std.js'; -import { OptionalResourcesDictSchema } from '../types/OptionalResource.std.js'; -import { parseUnknown } from '../util/schemas.std.js'; +import type { OptionalResourceType } from '../types/OptionalResource.std.ts'; +import { OptionalResourcesDictSchema } from '../types/OptionalResource.std.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; const MANIFEST_URL = 'https://updates.signal.org/dynamic/android/emoji/search/manifest.json'; diff --git a/ts/scripts/get-expire-time.node.ts b/ts/scripts/get-expire-time.node.ts index 8db26d3179..deebfcee63 100644 --- a/ts/scripts/get-expire-time.node.ts +++ b/ts/scripts/get-expire-time.node.ts @@ -5,9 +5,9 @@ import { join } from 'node:path'; import { execSync } from 'node:child_process'; import { writeFileSync } from 'node:fs'; -import { DAY } from '../util/durations/index.std.js'; -import { packageJson } from '../util/packageJson.node.js'; -import { isNotUpdatable } from '../util/version.std.js'; +import { DAY } from '../util/durations/index.std.ts'; +import { packageJson } from '../util/packageJson.node.ts'; +import { isNotUpdatable } from '../util/version.std.ts'; const unixTimestamp = parseInt( process.env.SOURCE_DATE_EPOCH || diff --git a/ts/scripts/get-jumbomoji.node.ts b/ts/scripts/get-jumbomoji.node.ts index d6bb50a670..a6ab29a4d4 100644 --- a/ts/scripts/get-jumbomoji.node.ts +++ b/ts/scripts/get-jumbomoji.node.ts @@ -8,10 +8,10 @@ import { Buffer } from 'node:buffer'; import z from 'zod'; import prettier from 'prettier'; -import type { OptionalResourceType } from '../types/OptionalResource.std.js'; -import { OptionalResourcesDictSchema } from '../types/OptionalResource.std.js'; -import { parseUnknown } from '../util/schemas.std.js'; -import { utf16ToEmoji } from '../util/utf16ToEmoji.node.js'; +import type { OptionalResourceType } from '../types/OptionalResource.std.ts'; +import { OptionalResourcesDictSchema } from '../types/OptionalResource.std.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; +import { utf16ToEmoji } from '../util/utf16ToEmoji.node.ts'; const VERSION = 12; diff --git a/ts/scripts/get-strings.node.ts b/ts/scripts/get-strings.node.ts index 8d8cada148..15a29be986 100644 --- a/ts/scripts/get-strings.node.ts +++ b/ts/scripts/get-strings.node.ts @@ -8,7 +8,7 @@ import prettier from 'prettier'; import pMap from 'p-map'; import z from 'zod'; -import { authenticate, API_BASE, PROJECT_ID } from '../util/smartling.node.js'; +import { authenticate, API_BASE, PROJECT_ID } from '../util/smartling.node.ts'; const { SMARTLING_USER, SMARTLING_SECRET } = process.env; diff --git a/ts/scripts/mark-unused-strings-deleted.node.ts b/ts/scripts/mark-unused-strings-deleted.node.ts index a38eba298f..0a0fd681fe 100644 --- a/ts/scripts/mark-unused-strings-deleted.node.ts +++ b/ts/scripts/mark-unused-strings-deleted.node.ts @@ -3,7 +3,7 @@ import { spawnSync } from 'node:child_process'; import path from 'node:path'; import { readFileSync, writeFileSync } from 'node:fs'; -import { DELETED_REGEXP } from './constants.std.js'; +import { DELETED_REGEXP } from './constants.std.ts'; const rootDir = path.resolve(__dirname, '..', '..'); const messagesPath = path.join(rootDir, '_locales/en/messages.json'); diff --git a/ts/scripts/notarize-universal-dmg.node.ts b/ts/scripts/notarize-universal-dmg.node.ts index 1ad4668f3b..843a8b37a9 100644 --- a/ts/scripts/notarize-universal-dmg.node.ts +++ b/ts/scripts/notarize-universal-dmg.node.ts @@ -5,7 +5,7 @@ import type { BuildResult } from 'electron-builder'; import { notarize } from '@electron/notarize'; -import { packageJson } from '../util/packageJson.node.js'; +import { packageJson } from '../util/packageJson.node.ts'; export async function afterAllArtifactBuild({ platformToTargets, diff --git a/ts/scripts/notarize.node.ts b/ts/scripts/notarize.node.ts index 4ebf89e6df..3bb9b31b72 100644 --- a/ts/scripts/notarize.node.ts +++ b/ts/scripts/notarize.node.ts @@ -6,7 +6,7 @@ import type { AfterPackContext } from 'electron-builder'; import { notarize } from '@electron/notarize'; -import { packageJson } from '../util/packageJson.node.js'; +import { packageJson } from '../util/packageJson.node.ts'; export async function afterSign({ appOutDir, diff --git a/ts/scripts/publish-installer-size.node.ts b/ts/scripts/publish-installer-size.node.ts index 66d373b822..a740506fb0 100644 --- a/ts/scripts/publish-installer-size.node.ts +++ b/ts/scripts/publish-installer-size.node.ts @@ -4,7 +4,7 @@ import { stat } from 'node:fs/promises'; import { join } from 'node:path'; -import { packageJson } from '../util/packageJson.node.js'; +import { packageJson } from '../util/packageJson.node.ts'; const NAME = packageJson.name; const VERSION = packageJson.version; diff --git a/ts/scripts/push-strings.node.ts b/ts/scripts/push-strings.node.ts index 678f919586..5b177196ac 100644 --- a/ts/scripts/push-strings.node.ts +++ b/ts/scripts/push-strings.node.ts @@ -4,7 +4,7 @@ import { randomBytes } from 'node:crypto'; import { readFile } from 'node:fs/promises'; -import { API_BASE, PROJECT_ID, authenticate } from '../util/smartling.node.js'; +import { API_BASE, PROJECT_ID, authenticate } from '../util/smartling.node.ts'; const { SMARTLING_USER, SMARTLING_SECRET } = process.env; diff --git a/ts/scripts/remove-strings.node.ts b/ts/scripts/remove-strings.node.ts index 871ff3b85c..7eae60823b 100644 --- a/ts/scripts/remove-strings.node.ts +++ b/ts/scripts/remove-strings.node.ts @@ -7,9 +7,9 @@ import fs from 'node:fs/promises'; import pLimit from 'p-limit'; import path from 'node:path'; -import { MONTH } from '../util/durations/index.std.js'; -import { isOlderThan } from '../util/timestamp.std.js'; -import { DELETED_REGEXP, type DeletedMatch } from './constants.std.js'; +import { MONTH } from '../util/durations/index.std.ts'; +import { isOlderThan } from '../util/timestamp.std.ts'; +import { DELETED_REGEXP, type DeletedMatch } from './constants.std.ts'; const ROOT_DIR = path.join(__dirname, '..', '..'); const MESSAGES_FILE = path.join(ROOT_DIR, '_locales', 'en', 'messages.json'); diff --git a/ts/scripts/test-electron.node.ts b/ts/scripts/test-electron.node.ts index c53ca66937..667759b4e7 100644 --- a/ts/scripts/test-electron.node.ts +++ b/ts/scripts/test-electron.node.ts @@ -11,10 +11,10 @@ import z from 'zod'; import split2 from 'split2'; import logSymbols from 'log-symbols'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { parseUnknown } from '../util/schemas.std.js'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; const ROOT_DIR = join(__dirname, '..', '..'); @@ -100,6 +100,8 @@ async function launchElectron( SIGNAL_CI_CONFIG: JSON.stringify({ storagePath, }), + // Necessary for `tsx` to work in preload (there are no worker_threads) + ESBUILD_WORKER_THREADS: '0', }, // Since we run `.cmd` file on Windows - use shell shell: process.platform === 'win32', diff --git a/ts/scripts/test-release.node.ts b/ts/scripts/test-release.node.ts index 9d237f5005..9796684383 100644 --- a/ts/scripts/test-release.node.ts +++ b/ts/scripts/test-release.node.ts @@ -9,9 +9,9 @@ import { mkdtemp, cp } from 'node:fs/promises'; import { constants as fsConstants } from 'node:fs'; import { _electron as electron } from 'playwright'; -import { packageJson } from '../util/packageJson.node.js'; -import { gracefulRmRecursive } from '../util/gracefulFs.node.js'; -import { consoleLogger } from '../util/consoleLogger.std.js'; +import { packageJson } from '../util/packageJson.node.ts'; +import { gracefulRmRecursive } from '../util/gracefulFs.node.ts'; +import { consoleLogger } from '../util/consoleLogger.std.ts'; const ENVIRONMENT = 'production'; const RELEASE_DIR = join(__dirname, '..', '..', 'release'); diff --git a/ts/scripts/update-gha.node.ts b/ts/scripts/update-gha.node.ts index 1eda900eab..bd99e74298 100644 --- a/ts/scripts/update-gha.node.ts +++ b/ts/scripts/update-gha.node.ts @@ -6,8 +6,8 @@ import { readFile, readdir, writeFile } from 'node:fs/promises'; import z from 'zod'; import semver from 'semver'; -import { drop } from '../util/drop.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import { drop } from '../util/drop.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; const { GITHUB_TOKEN } = process.env; diff --git a/ts/services/ActiveWindowService.std.ts b/ts/services/ActiveWindowService.std.ts index 5cf84aa373..38572047fe 100644 --- a/ts/services/ActiveWindowService.std.ts +++ b/ts/services/ActiveWindowService.std.ts @@ -1,8 +1,8 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { SECOND } from '../util/durations/constants.std.js'; -import { throttle } from '../util/throttle.std.js'; +import { SECOND } from '../util/durations/constants.std.ts'; +import { throttle } from '../util/throttle.std.ts'; // Idle timer - you're active for ACTIVE_TIMEOUT after one of these events const ACTIVE_TIMEOUT = 15 * SECOND; diff --git a/ts/services/BeforeNavigate.std.ts b/ts/services/BeforeNavigate.std.ts index f7dcbdbb57..22d3ff4e69 100644 --- a/ts/services/BeforeNavigate.std.ts +++ b/ts/services/BeforeNavigate.std.ts @@ -1,12 +1,12 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; -import { SECOND } from '../util/durations/index.std.js'; -import { sleep } from '../util/sleep.std.js'; +import { SECOND } from '../util/durations/index.std.ts'; +import { sleep } from '../util/sleep.std.ts'; -import type { Location } from '../types/Nav.std.js'; +import type { Location } from '../types/Nav.std.ts'; const log = createLogger('BeforeNavigate'); diff --git a/ts/services/LinkPreview.preload.ts b/ts/services/LinkPreview.preload.ts index 1add1e054e..e52b035493 100644 --- a/ts/services/LinkPreview.preload.ts +++ b/ts/services/LinkPreview.preload.ts @@ -4,50 +4,50 @@ import lodash from 'lodash'; import { CallLinkRootKey } from '@signalapp/ringrtc'; -import type { LinkPreviewWithHydratedData } from '../types/message/LinkPreviews.std.js'; +import type { LinkPreviewWithHydratedData } from '../types/message/LinkPreviews.std.ts'; import type { LinkPreviewImage, LinkPreviewResult, LinkPreviewSourceType, MaybeGrabLinkPreviewOptionsType, AddLinkPreviewOptionsType, -} from '../types/LinkPreview.std.js'; -import type { LinkPreviewImage as LinkPreviewFetchImage } from '../linkPreviews/linkPreviewFetch.preload.js'; -import * as Errors from '../types/errors.std.js'; -import type { StickerPackType as StickerPackDBType } from '../sql/Interface.std.js'; -import type { MIMEType } from '../types/MIME.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { sha256 } from '../Crypto.node.js'; -import * as LinkPreview from '../types/LinkPreview.std.js'; -import { getLinkPreviewSetting } from '../util/Settings.preload.js'; -import { readTempData, readStickerData } from '../util/migrations.preload.js'; -import * as Stickers from '../types/Stickers.preload.js'; -import * as VisualAttachment from '../types/VisualAttachment.dom.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../types/LinkPreview.std.ts'; +import type { LinkPreviewImage as LinkPreviewFetchImage } from '../linkPreviews/linkPreviewFetch.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import type { StickerPackType as StickerPackDBType } from '../sql/Interface.std.ts'; +import type { MIMEType } from '../types/MIME.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { sha256 } from '../Crypto.node.ts'; +import * as LinkPreview from '../types/LinkPreview.std.ts'; +import { getLinkPreviewSetting } from '../util/Settings.preload.ts'; +import { readTempData, readStickerData } from '../util/migrations.preload.ts'; +import * as Stickers from '../types/Stickers.preload.ts'; +import * as VisualAttachment from '../types/VisualAttachment.dom.ts'; +import { createLogger } from '../logging/log.std.ts'; import { parseGroupLink, deriveGroupFields, getPreJoinGroupInfo, decryptGroupTitle, decryptGroupAvatar, -} from '../groups.preload.js'; -import { IMAGE_JPEG, IMAGE_WEBP, stringToMIMEType } from '../types/MIME.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { autoScale } from '../util/handleImageAttachment.preload.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { fileToBytes } from '../util/fileToBytes.std.js'; -import { imageToBlurHash } from '../util/imageToBlurHash.dom.js'; -import { maybeParseUrl } from '../util/url.std.js'; -import { sniffImageMimeType } from '../util/sniffImageMimeType.std.js'; -import { drop } from '../util/drop.std.js'; -import { calling } from './calling.preload.js'; -import { getKeyFromCallLink } from '../util/callLinks.std.js'; -import { getRoomIdFromCallLink } from '../util/callLinksRingrtc.node.js'; +} from '../groups.preload.ts'; +import { IMAGE_JPEG, IMAGE_WEBP, stringToMIMEType } from '../types/MIME.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { autoScale } from '../util/handleImageAttachment.preload.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import { fileToBytes } from '../util/fileToBytes.std.ts'; +import { imageToBlurHash } from '../util/imageToBlurHash.dom.ts'; +import { maybeParseUrl } from '../util/url.std.ts'; +import { sniffImageMimeType } from '../util/sniffImageMimeType.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { calling } from './calling.preload.ts'; +import { getKeyFromCallLink } from '../util/callLinks.std.ts'; +import { getRoomIdFromCallLink } from '../util/callLinksRingrtc.node.ts'; import { fetchLinkPreviewImage, fetchLinkPreviewMetadata, -} from '../textsecure/WebAPI.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { debounce, omit } = lodash; diff --git a/ts/services/MessageCache.preload.ts b/ts/services/MessageCache.preload.ts index c1f1a97f08..2515b5997c 100644 --- a/ts/services/MessageCache.preload.ts +++ b/ts/services/MessageCache.preload.ts @@ -4,20 +4,20 @@ import lodash from 'lodash'; import { LRUCache } from 'lru-cache'; -import { MessageModel } from '../models/messages.preload.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { getMessageConversation } from '../util/getMessageConversation.dom.js'; -import { upgradeMessageSchema } from '../util/migrations.preload.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { isStory } from '../messages/helpers.std.js'; -import { getStoryDataFromMessageAttributes } from './storyLoader.preload.js'; -import { postSaveUpdates } from '../util/cleanup.preload.js'; +import { MessageModel } from '../models/messages.preload.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { getMessageConversation } from '../util/getMessageConversation.dom.ts'; +import { upgradeMessageSchema } from '../util/migrations.preload.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { isStory } from '../messages/helpers.std.ts'; +import { getStoryDataFromMessageAttributes } from './storyLoader.preload.ts'; +import { postSaveUpdates } from '../util/cleanup.preload.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { SendStateByConversationId } from '../messages/MessageSendState.std.js'; -import type { StoredJob } from '../jobs/types.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { getSelectedConversationId } from '../state/selectors/nav.std.js'; +import type { SendStateByConversationId } from '../messages/MessageSendState.std.ts'; +import type { StoredJob } from '../jobs/types.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { getSelectedConversationId } from '../state/selectors/nav.std.ts'; const { throttle } = lodash; diff --git a/ts/services/MessageUpdater.preload.ts b/ts/services/MessageUpdater.preload.ts index 4742286881..9bb5dcf738 100644 --- a/ts/services/MessageUpdater.preload.ts +++ b/ts/services/MessageUpdater.preload.ts @@ -2,31 +2,31 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { MessageAttributesType } from '../model-types.d.ts'; -import type { MessageModel } from '../models/messages.preload.js'; +import type { MessageModel } from '../models/messages.preload.ts'; import { ReadStatus, maxReadStatus, -} from '../messages/MessageReadStatus.std.js'; -import { notificationService } from './notifications.preload.js'; -import { SeenStatus } from '../MessageSeenStatus.std.js'; -import { queueUpdateMessage } from '../util/messageBatcher.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { isValidTapToView } from '../util/isValidTapToView.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; -import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.js'; -import { eraseMessageContents } from '../util/cleanup.preload.js'; -import { getSource, getSourceServiceId } from '../messages/sources.preload.js'; -import { isAciString } from '../util/isAciString.std.js'; -import { viewOnceOpenJobQueue } from '../jobs/viewOnceOpenJobQueue.preload.js'; -import { drop } from '../util/drop.std.js'; -import { isIncoming } from '../messages/helpers.std.js'; +} from '../messages/MessageReadStatus.std.ts'; +import { notificationService } from './notifications.preload.ts'; +import { SeenStatus } from '../MessageSeenStatus.std.ts'; +import { queueUpdateMessage } from '../util/messageBatcher.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { isValidTapToView } from '../util/isValidTapToView.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; +import { getMessageSentTimestamp } from '../util/getMessageSentTimestamp.std.ts'; +import { eraseMessageContents } from '../util/cleanup.preload.ts'; +import { getSource, getSourceServiceId } from '../messages/sources.preload.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import { viewOnceOpenJobQueue } from '../jobs/viewOnceOpenJobQueue.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { isIncoming } from '../messages/helpers.std.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { ReceiptType } from '../types/Receipt.std.js'; -import { isDirectConversation } from '../util/whatTypeOfConversation.dom.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { ReceiptType } from '../types/Receipt.std.ts'; +import { isDirectConversation } from '../util/whatTypeOfConversation.dom.ts'; const log = createLogger('MessageUpdater'); diff --git a/ts/services/ZoomFactorService.main.ts b/ts/services/ZoomFactorService.main.ts index 0141a4f5de..1a24ace392 100644 --- a/ts/services/ZoomFactorService.main.ts +++ b/ts/services/ZoomFactorService.main.ts @@ -4,7 +4,7 @@ import type { BrowserWindow } from 'electron'; import { ipcMain } from 'electron'; import EventEmitter from 'node:events'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('ZoomFactorService'); diff --git a/ts/services/addGlobalKeyboardShortcuts.preload.ts b/ts/services/addGlobalKeyboardShortcuts.preload.ts index 83b0eed532..03413d4b4e 100644 --- a/ts/services/addGlobalKeyboardShortcuts.preload.ts +++ b/ts/services/addGlobalKeyboardShortcuts.preload.ts @@ -1,17 +1,17 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as KeyboardLayout from './keyboardLayout.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import { PanelType } from '../types/Panels.std.js'; -import { clearConversationDraftAttachments } from '../util/clearConversationDraftAttachments.preload.js'; -import { drop } from '../util/drop.std.js'; -import { matchOrQueryFocusable } from '../util/focusableSelectors.std.js'; -import { getQuotedMessageSelector } from '../state/selectors/composer.preload.js'; -import { removeLinkPreview } from './LinkPreview.preload.js'; -import { ForwardMessagesModalType } from '../components/ForwardMessagesModal.dom.js'; -import { getSelectedConversationId } from '../state/selectors/nav.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import * as KeyboardLayout from './keyboardLayout.dom.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { PanelType } from '../types/Panels.std.ts'; +import { clearConversationDraftAttachments } from '../util/clearConversationDraftAttachments.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { matchOrQueryFocusable } from '../util/focusableSelectors.std.ts'; +import { getQuotedMessageSelector } from '../state/selectors/composer.preload.ts'; +import { removeLinkPreview } from './LinkPreview.preload.ts'; +import { ForwardMessagesModalType } from '../components/ForwardMessagesModal.dom.tsx'; +import { getSelectedConversationId } from '../state/selectors/nav.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; const log = createLogger('addGlobalKeyboardShortcuts'); diff --git a/ts/services/allLoaders.preload.ts b/ts/services/allLoaders.preload.ts index 14e753570c..655f159d87 100644 --- a/ts/services/allLoaders.preload.ts +++ b/ts/services/allLoaders.preload.ts @@ -2,49 +2,49 @@ // SPDX-License-Identifier: AGPL-3.0-only // loader services -import { getBadgesForRedux, loadBadges } from './badgeLoader.preload.js'; +import { getBadgesForRedux, loadBadges } from './badgeLoader.preload.ts'; import { getCallsHistoryForRedux, getCallsHistoryUnreadCountForRedux, loadCallHistory, -} from './callHistoryLoader.preload.js'; +} from './callHistoryLoader.preload.ts'; import { getCallLinksForRedux, loadCallLinks, -} from './callLinksLoader.preload.js'; +} from './callLinksLoader.preload.ts'; import { getDistributionListsForRedux, loadDistributionLists, -} from './distributionListLoader.preload.js'; +} from './distributionListLoader.preload.ts'; import { getDonationsForRedux, loadDonationReceipts, -} from './donationsLoader.preload.js'; -import { getStoriesForRedux, loadStories } from './storyLoader.preload.js'; -import { getUserDataForRedux, loadUserData } from './userLoader.dom.js'; +} from './donationsLoader.preload.ts'; +import { getStoriesForRedux, loadStories } from './storyLoader.preload.ts'; +import { getUserDataForRedux, loadUserData } from './userLoader.dom.ts'; import { loadCachedProfiles as loadNotificationProfiles, getCachedProfiles as getNotificationProfiles, -} from './notificationProfilesService.preload.js'; +} from './notificationProfilesService.preload.ts'; // old-style loaders import { getEmojiReducerState, loadRecentEmojis, -} from '../util/loadRecentEmojis.preload.js'; +} from '../util/loadRecentEmojis.preload.ts'; import { load as loadStickers, getInitialState as getStickersReduxState, -} from '../types/Stickers.preload.js'; +} from '../types/Stickers.preload.ts'; -import { type ReduxInitData } from '../state/initializeRedux.preload.js'; -import { reinitializeRedux } from '../state/reinitializeRedux.preload.js'; -import { getGifsStateForRedux, loadGifsState } from './gifsLoader.preload.js'; +import { type ReduxInitData } from '../state/initializeRedux.preload.ts'; +import { reinitializeRedux } from '../state/reinitializeRedux.preload.ts'; +import { getGifsStateForRedux, loadGifsState } from './gifsLoader.preload.ts'; import { getChatFoldersForRedux, loadChatFolders, -} from './chatFoldersLoader.preload.js'; -import { getInitialMegaphonesState } from '../state/ducks/megaphones.preload.js'; +} from './chatFoldersLoader.preload.ts'; +import { getInitialMegaphonesState } from '../state/ducks/megaphones.preload.ts'; export async function loadAll(): Promise { await Promise.all([ diff --git a/ts/services/areWeASubscriber.dom.ts b/ts/services/areWeASubscriber.dom.ts index cc7d1a3d52..5ce7b66416 100644 --- a/ts/services/areWeASubscriber.dom.ts +++ b/ts/services/areWeASubscriber.dom.ts @@ -5,9 +5,9 @@ import type { StorageInterface } from '../types/Storage.d.ts'; import type { getHasSubscription, isOnline, -} from '../textsecure/WebAPI.preload.js'; -import { LatestQueue } from '../util/LatestQueue.std.js'; -import { waitForOnline } from '../util/waitForOnline.dom.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { LatestQueue } from '../util/LatestQueue.std.ts'; +import { waitForOnline } from '../util/waitForOnline.dom.ts'; // This is only exported for testing. export class AreWeASubscriberService { diff --git a/ts/services/audioRecorder.dom.ts b/ts/services/audioRecorder.dom.ts index 56d3a8187f..cc56ef4775 100644 --- a/ts/services/audioRecorder.dom.ts +++ b/ts/services/audioRecorder.dom.ts @@ -1,10 +1,10 @@ // Copyright 2016 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { requestMicrophonePermissions } from '../util/requestMicrophonePermissions.dom.js'; -import { WebAudioRecorder } from '../WebAudioRecorder.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { requestMicrophonePermissions } from '../util/requestMicrophonePermissions.dom.ts'; +import { WebAudioRecorder } from '../WebAudioRecorder.std.ts'; const log = createLogger('audioRecorder'); diff --git a/ts/services/backups/api.preload.ts b/ts/services/backups/api.preload.ts index 0dbbe30c98..46e316f7b5 100644 --- a/ts/services/backups/api.preload.ts +++ b/ts/services/backups/api.preload.ts @@ -15,7 +15,7 @@ import { getSubscription, getTransferArchive as doGetTransferArchive, refreshBackup, -} from '../../textsecure/WebAPI.preload.js'; +} from '../../textsecure/WebAPI.preload.ts'; import type { AttachmentUploadFormResponseType, GetBackupInfoResponseType, @@ -24,18 +24,18 @@ import type { BackupListMediaResponseType, TransferArchiveType, SubscriptionResponseType, -} from '../../textsecure/WebAPI.preload.js'; -import type { BackupCredentials } from './credentials.preload.js'; +} from '../../textsecure/WebAPI.preload.ts'; +import type { BackupCredentials } from './credentials.preload.ts'; import { BackupCredentialType, type BackupsSubscriptionType, type SubscriptionCostType, -} from '../../types/backups.node.js'; -import { uploadFile } from '../../util/uploadAttachment.preload.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { toLogFormat } from '../../types/errors.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../types/backups.node.ts'; +import { uploadFile } from '../../util/uploadAttachment.preload.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { toLogFormat } from '../../types/errors.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const log = createLogger('api'); diff --git a/ts/services/backups/constants.std.ts b/ts/services/backups/constants.std.ts index 6944ea38ec..9d47df6ccd 100644 --- a/ts/services/backups/constants.std.ts +++ b/ts/services/backups/constants.std.ts @@ -1,8 +1,8 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { Backups } from '../../protobuf/index.std.js'; -import type { ConversationColorType } from '../../types/Colors.std.js'; +import { Backups } from '../../protobuf/index.std.ts'; +import type { ConversationColorType } from '../../types/Colors.std.ts'; export const BACKUP_VERSION = 1n; diff --git a/ts/services/backups/credentials.preload.ts b/ts/services/backups/credentials.preload.ts index d25deb6f71..23f0dd2b7b 100644 --- a/ts/services/backups/credentials.preload.ts +++ b/ts/services/backups/credentials.preload.ts @@ -12,48 +12,48 @@ import { import { type BackupKey } from '@signalapp/libsignal-client/dist/AccountKeys.js'; import lodashFp from 'lodash/fp.js'; -import * as Bytes from '../../Bytes.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { isMoreRecentThan, toDayMillis } from '../../util/timestamp.std.js'; +import * as Bytes from '../../Bytes.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { isMoreRecentThan, toDayMillis } from '../../util/timestamp.std.ts'; import { DAY, DurationInSeconds, HOUR, MINUTE, -} from '../../util/durations/index.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; +} from '../../util/durations/index.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; import { type BackupCdnReadCredentialType, type BackupCredentialWrapperType, type BackupPresentationHeadersType, type BackupSignedPresentationType, BackupCredentialType, -} from '../../types/backups.node.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; +} from '../../types/backups.node.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; import type { GetBackupCredentialsResponseType, GetBackupCDNCredentialsResponseType, -} from '../../textsecure/WebAPI.preload.js'; +} from '../../textsecure/WebAPI.preload.ts'; import { setBackupSignatureKey, getBackupCDNCredentials, getBackupCredentials, setBackupId, -} from '../../textsecure/WebAPI.preload.js'; +} from '../../textsecure/WebAPI.preload.ts'; import { getBackupKey, getBackupMediaRootKey, getBackupSignatureKey, getBackupMediaSignatureKey, -} from './crypto.preload.js'; -import { isTestOrMockEnvironment } from '../../environment.std.js'; +} from './crypto.preload.ts'; +import { isTestOrMockEnvironment } from '../../environment.std.ts'; import { areRemoteBackupsTurnedOn, canAttemptRemoteBackupDownload, -} from '../../util/isBackupEnabled.preload.js'; -import { CheckScheduler } from '../../util/CheckScheduler.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../util/isBackupEnabled.preload.ts'; +import { CheckScheduler } from '../../util/CheckScheduler.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const { throttle } = lodashFp; diff --git a/ts/services/backups/crypto.preload.ts b/ts/services/backups/crypto.preload.ts index a3d7342c0f..60bf949532 100644 --- a/ts/services/backups/crypto.preload.ts +++ b/ts/services/backups/crypto.preload.ts @@ -9,11 +9,11 @@ import { } from '@signalapp/libsignal-client/dist/AccountKeys.js'; import { MessageBackupKey } from '@signalapp/libsignal-client/dist/MessageBackup.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { toAciObject } from '../../util/ServiceId.node.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { sha256 } from '../../Crypto.node.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { toAciObject } from '../../util/ServiceId.node.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { sha256 } from '../../Crypto.node.ts'; const getMemoizedBackupKey = memoizee((accountEntropyPool: string) => { return AccountEntropyPool.deriveBackupKey(accountEntropyPool); diff --git a/ts/services/backups/errors.std.ts b/ts/services/backups/errors.std.ts index bc7ebef209..e12932719b 100644 --- a/ts/services/backups/errors.std.ts +++ b/ts/services/backups/errors.std.ts @@ -1,6 +1,6 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { InstallScreenBackupError } from '../../types/InstallScreen.std.js'; +import { InstallScreenBackupError } from '../../types/InstallScreen.std.ts'; export class BackupInstallerError extends Error { constructor( diff --git a/ts/services/backups/export.preload.ts b/ts/services/backups/export.preload.ts index 158c9887fa..2d1d42d27e 100644 --- a/ts/services/backups/export.preload.ts +++ b/ts/services/backups/export.preload.ts @@ -9,68 +9,68 @@ import { Readable } from 'node:stream'; import lodash from 'lodash'; import { CallLinkRootKey } from '@signalapp/ringrtc'; -import { Backups, SignalService } from '../../protobuf/index.std.js'; +import { Backups, SignalService } from '../../protobuf/index.std.ts'; import { DataReader, DataWriter, pauseWriteAccess, resumeWriteAccess, -} from '../../sql/Client.preload.js'; +} from '../../sql/Client.preload.ts'; import type { PageBackupMessagesCursorType, IdentityKeyType, -} from '../../sql/Interface.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.js'; -import { type CustomColorType } from '../../types/Colors.std.js'; -import { StorySendMode, MY_STORY_ID } from '../../types/Stories.std.js'; -import { getStickerPacksForBackup } from '../../types/Stickers.preload.js'; +} from '../../sql/Interface.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.ts'; +import { type CustomColorType } from '../../types/Colors.std.ts'; +import { StorySendMode, MY_STORY_ID } from '../../types/Stories.std.ts'; +import { getStickerPacksForBackup } from '../../types/Stickers.preload.ts'; import { isPniString, isServiceIdString, type PniString, type AciString, type ServiceIdString, -} from '../../types/ServiceId.std.js'; +} from '../../types/ServiceId.std.ts'; import { bodyRangeSchema, type RawBodyRange, -} from '../../types/BodyRange.std.js'; -import { PaymentEventKind } from '../../types/Payment.std.js'; -import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.js'; +} from '../../types/BodyRange.std.ts'; +import { PaymentEventKind } from '../../types/Payment.std.ts'; +import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.ts'; import type { ConversationAttributesType, MessageAttributesType, QuotedAttachmentType, } from '../../model-types.d.ts'; -import { drop } from '../../util/drop.std.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import { explodePromise } from '../../util/explodePromise.std.js'; +import { drop } from '../../util/drop.std.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import { explodePromise } from '../../util/explodePromise.std.ts'; import { isDirectConversation, isGroup, isGroupV1, isGroupV2, isMe, -} from '../../util/whatTypeOfConversation.dom.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getSafeLongFromTimestamp } from '../../util/timestampLongUtils.std.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getSafeLongFromTimestamp } from '../../util/timestampLongUtils.std.ts'; import { DAY, MINUTE, SECOND, DurationInSeconds, -} from '../../util/durations/index.std.js'; +} from '../../util/durations/index.std.ts'; import { PhoneNumberDiscoverability, parsePhoneNumberDiscoverability, -} from '../../util/phoneNumberDiscoverability.std.js'; +} from '../../util/phoneNumberDiscoverability.std.ts'; import { PhoneNumberSharingMode, parsePhoneNumberSharingMode, -} from '../../types/PhoneNumberSharingMode.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; +} from '../../types/PhoneNumberSharingMode.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; import { isCallHistory, isChatSessionRefreshed, @@ -97,20 +97,20 @@ import { isTitleTransitionNotification, isMessageRequestResponse, isPinnedMessageNotification, -} from '../../state/selectors/message.preload.js'; -import * as Bytes from '../../Bytes.std.js'; -import { canBeSynced as canPreferredReactionEmojiBeSynced } from '../../reactions/preferredReactionEmoji.std.js'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import { BACKUP_VERSION } from './constants.std.js'; +} from '../../state/selectors/message.preload.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { canBeSynced as canPreferredReactionEmojiBeSynced } from '../../reactions/preferredReactionEmoji.std.ts'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import { BACKUP_VERSION } from './constants.std.ts'; import { getMessageIdForLogging, getConversationIdForLogging, -} from '../../util/idForLogging.preload.js'; -import { makeLookup } from '../../util/makeLookup.std.js'; +} from '../../util/idForLogging.preload.ts'; +import { makeLookup } from '../../util/makeLookup.std.ts'; import type { CallHistoryDetails, CallStatus, -} from '../../types/CallDisposition.std.js'; +} from '../../types/CallDisposition.std.ts'; import { CallMode, CallDirection, @@ -118,79 +118,79 @@ import { DirectCallStatus, GroupCallStatus, AdhocCallStatus, -} from '../../types/CallDisposition.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import { hslToRGBInt } from '../../util/hslToRGB.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import { hslToRGBInt } from '../../util/hslToRGB.std.ts'; import type { AboutMe, BackupExportOptions, LocalChatStyle, StatsType, -} from './types.std.js'; -import { messageHasPaymentEvent } from '../../messages/payments.std.js'; +} from './types.std.ts'; +import { messageHasPaymentEvent } from '../../messages/payments.std.ts'; import { numberToAddressType, numberToPhoneType, -} from '../../types/EmbeddedContact.std.js'; -import { toLogFormat } from '../../types/errors.std.js'; -import type { AttachmentType } from '../../types/Attachment.std.js'; +} from '../../types/EmbeddedContact.std.ts'; +import { toLogFormat } from '../../types/errors.std.ts'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; import { isGIF, isDownloaded, hasRequiredInformationForLocalBackup, hasRequiredInformationForRemoteBackup, -} from '../../util/Attachment.std.js'; -import { getFilePointerForAttachment } from './util/filePointers.preload.js'; -import { getBackupMediaRootKey } from './crypto.preload.js'; +} from '../../util/Attachment.std.ts'; +import { getFilePointerForAttachment } from './util/filePointers.preload.ts'; +import { getBackupMediaRootKey } from './crypto.preload.ts'; import type { CoreAttachmentBackupJobType, CoreAttachmentLocalBackupJobType, -} from '../../types/AttachmentBackup.std.js'; -import { AttachmentBackupManager } from '../../jobs/AttachmentBackupManager.preload.js'; +} from '../../types/AttachmentBackup.std.ts'; +import { AttachmentBackupManager } from '../../jobs/AttachmentBackupManager.preload.ts'; import { getBackupCdnInfo, getLocalBackupFileNameForAttachment, getMediaNameForAttachment, -} from './util/mediaId.preload.js'; -import { calculateExpirationTimestamp } from '../../util/expirationTimer.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { CallLinkRestrictions } from '../../types/CallLink.std.js'; +} from './util/mediaId.preload.ts'; +import { calculateExpirationTimestamp } from '../../util/expirationTimer.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { CallLinkRestrictions } from '../../types/CallLink.std.ts'; import { isCallHistoryForUnusedCallLink, toAdminKeyBytes, -} from '../../util/callLinks.std.js'; -import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; -import { migrateAllMessages } from '../../messages/migrateMessageData.preload.js'; +} from '../../util/callLinks.std.ts'; +import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; +import { migrateAllMessages } from '../../messages/migrateMessageData.preload.ts'; import { isBodyTooLong, MAX_MESSAGE_BODY_BYTE_LENGTH, trimBody, -} from '../../util/longAttachment.std.js'; -import { generateBackupsSubscriberData } from '../../util/backupSubscriptionData.preload.js'; +} from '../../util/longAttachment.std.ts'; +import { generateBackupsSubscriberData } from '../../util/backupSubscriptionData.preload.ts'; import { getEnvironment, isTestEnvironment, isTestOrMockEnvironment, -} from '../../environment.std.js'; -import { calculateLightness } from '../../util/getHSL.std.js'; -import { isSignalServiceId } from '../../util/isSignalConversation.dom.js'; -import { isValidE164 } from '../../util/isValidE164.std.js'; -import { toDayOfWeekArray } from '../../types/NotificationProfile.std.js'; +} from '../../environment.std.ts'; +import { calculateLightness } from '../../util/getHSL.std.ts'; +import { isSignalServiceId } from '../../util/isSignalConversation.dom.ts'; +import { isValidE164 } from '../../util/isValidE164.std.ts'; +import { toDayOfWeekArray } from '../../types/NotificationProfile.std.ts'; import { getLinkPreviewSetting, getTypingIndicatorSetting, -} from '../../util/Settings.preload.js'; -import { KIBIBYTE } from '../../types/AttachmentSize.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { ChatFolderType } from '../../types/ChatFolder.std.js'; -import { expiresTooSoonForBackup } from './util/expiration.std.js'; -import type { PinnedMessage } from '../../types/PinnedMessage.std.js'; -import type { ThemeType } from '../../util/preload.preload.js'; -import { MAX_VALUE as LONG_MAX_VALUE } from '../../util/long.std.js'; -import { encodeDelimited } from '../../util/encodeDelimited.std.js'; -import { safeParseStrict } from '../../util/schemas.std.js'; -import type { WithRequiredProperties } from '../../types/Util.std.js'; +} from '../../util/Settings.preload.ts'; +import { KIBIBYTE } from '../../types/AttachmentSize.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { ChatFolderType } from '../../types/ChatFolder.std.ts'; +import { expiresTooSoonForBackup } from './util/expiration.std.ts'; +import type { PinnedMessage } from '../../types/PinnedMessage.std.ts'; +import type { ThemeType } from '../../util/preload.preload.ts'; +import { MAX_VALUE as LONG_MAX_VALUE } from '../../util/long.std.ts'; +import { encodeDelimited } from '../../util/encodeDelimited.std.ts'; +import { safeParseStrict } from '../../util/schemas.std.ts'; +import type { WithRequiredProperties } from '../../types/Util.std.ts'; const { isNumber } = lodash; diff --git a/ts/services/backups/import.preload.ts b/ts/services/backups/import.preload.ts index fd8cb818f2..977f237c6c 100644 --- a/ts/services/backups/import.preload.ts +++ b/ts/services/backups/import.preload.ts @@ -12,44 +12,44 @@ import { Writable } from 'node:stream'; import lodash from 'lodash'; import { CallLinkRootKey } from '@signalapp/ringrtc'; -import { Backups, SignalService } from '../../protobuf/index.std.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; +import { Backups, SignalService } from '../../protobuf/index.std.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; import { AttachmentDownloadSource, type StoryDistributionWithMembersType, type IdentityKeyType, -} from '../../sql/Interface.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.js'; -import { StorySendMode, MY_STORY_ID } from '../../types/Stories.std.js'; -import type { AciString, ServiceIdString } from '../../types/ServiceId.std.js'; -import * as LinkPreview from '../../types/LinkPreview.std.js'; +} from '../../sql/Interface.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.ts'; +import { StorySendMode, MY_STORY_ID } from '../../types/Stories.std.ts'; +import type { AciString, ServiceIdString } from '../../types/ServiceId.std.ts'; +import * as LinkPreview from '../../types/LinkPreview.std.ts'; import { fromAciObject, fromPniObject, fromServiceIdObject, -} from '../../types/ServiceId.std.js'; -import { isStoryDistributionId } from '../../types/StoryDistributionId.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { PaymentEventKind } from '../../types/Payment.std.js'; -import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.js'; +} from '../../types/ServiceId.std.ts'; +import { isStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { PaymentEventKind } from '../../types/Payment.std.ts'; +import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.ts'; import { ContactFormType, AddressType as ContactAddressType, -} from '../../types/EmbeddedContact.std.js'; +} from '../../types/EmbeddedContact.std.ts'; import { STICKERPACK_ID_BYTE_LEN, STICKERPACK_KEY_BYTE_LEN, createPacksFromBackup, type StickerPackPointerType, -} from '../../types/Stickers.preload.js'; +} from '../../types/Stickers.preload.ts'; import type { ConversationColorType, CustomColorsItemType, CustomColorType, CustomColorDataType, -} from '../../types/Colors.std.js'; -import { SEALED_SENDER } from '../../types/SealedSender.std.js'; +} from '../../types/Colors.std.ts'; +import { SEALED_SENDER } from '../../types/SealedSender.std.ts'; import type { ConversationAttributesType, CustomError, @@ -58,62 +58,62 @@ import type { EditHistoryType, QuotedMessageType, } from '../../model-types.d.ts'; -import { assertDev, strictAssert } from '../../util/assert.std.js'; -import { upgradeMessageSchema } from '../../util/migrations.preload.js'; +import { assertDev, strictAssert } from '../../util/assert.std.ts'; +import { upgradeMessageSchema } from '../../util/migrations.preload.ts'; import { getCheckedTimestampFromLong, getCheckedTimestampOrUndefinedFromLong, getTimestampOrUndefinedFromLong, -} from '../../util/timestampLongUtils.std.js'; -import { MAX_SAFE_DATE } from '../../util/timestamp.std.js'; -import { DurationInSeconds, SECOND } from '../../util/durations/index.std.js'; -import { calculateExpirationTimestamp } from '../../util/expirationTimer.std.js'; -import { dropNull } from '../../util/dropNull.std.js'; +} from '../../util/timestampLongUtils.std.ts'; +import { MAX_SAFE_DATE } from '../../util/timestamp.std.ts'; +import { DurationInSeconds, SECOND } from '../../util/durations/index.std.ts'; +import { calculateExpirationTimestamp } from '../../util/expirationTimer.std.ts'; +import { dropNull } from '../../util/dropNull.std.ts'; import { deriveGroupID, deriveGroupSecretParams, deriveGroupPublicParams, deriveAccessKeyFromProfileKey, -} from '../../util/zkgroup.node.js'; -import { incrementMessageCounter } from '../../util/incrementMessageCounter.preload.js'; -import { generateMessageId } from '../../util/generateMessageId.node.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import { PhoneNumberDiscoverability } from '../../util/phoneNumberDiscoverability.std.js'; -import { PhoneNumberSharingMode } from '../../types/PhoneNumberSharingMode.std.js'; -import { bytesToUuid } from '../../util/uuidToBytes.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import type { SendStateByConversationId } from '../../messages/MessageSendState.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; -import { constantTimeEqual } from '../../Crypto.node.js'; -import { signalProtocolStore } from '../../SignalProtocolStore.preload.js'; -import * as Bytes from '../../Bytes.std.js'; -import { BACKUP_VERSION, WALLPAPER_TO_BUBBLE_COLOR } from './constants.std.js'; -import { UnsupportedBackupVersion } from './errors.std.js'; +} from '../../util/zkgroup.node.ts'; +import { incrementMessageCounter } from '../../util/incrementMessageCounter.preload.ts'; +import { generateMessageId } from '../../util/generateMessageId.node.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import { PhoneNumberDiscoverability } from '../../util/phoneNumberDiscoverability.std.ts'; +import { PhoneNumberSharingMode } from '../../types/PhoneNumberSharingMode.std.ts'; +import { bytesToUuid } from '../../util/uuidToBytes.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import type { SendStateByConversationId } from '../../messages/MessageSendState.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; +import { constantTimeEqual } from '../../Crypto.node.ts'; +import { signalProtocolStore } from '../../SignalProtocolStore.preload.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { BACKUP_VERSION, WALLPAPER_TO_BUBBLE_COLOR } from './constants.std.ts'; +import { UnsupportedBackupVersion } from './errors.std.ts'; import type { AboutMe, BackupImportOptions, LocalChatStyle, -} from './types.std.js'; -import { getBackupMediaRootKey } from './crypto.preload.js'; -import type { GroupV2ChangeDetailType } from '../../types/groups.std.js'; -import { queueAttachmentDownloads } from '../../util/queueAttachmentDownloads.preload.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import { isGroup } from '../../util/whatTypeOfConversation.dom.js'; -import { rgbIntToHSL } from '../../util/rgbToHSL.std.js'; +} from './types.std.ts'; +import { getBackupMediaRootKey } from './crypto.preload.ts'; +import type { GroupV2ChangeDetailType } from '../../types/groups.std.ts'; +import { queueAttachmentDownloads } from '../../util/queueAttachmentDownloads.preload.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import { isGroup } from '../../util/whatTypeOfConversation.dom.ts'; +import { rgbIntToHSL } from '../../util/rgbToHSL.std.ts'; import { convertBackupMessageAttachmentToAttachment, convertFilePointerToAttachment, -} from './util/filePointers.preload.js'; -import { trimMessageWhitespace } from '../../types/BodyRange.std.js'; -import { filterAndClean } from '../../util/BodyRange.node.js'; +} from './util/filePointers.preload.ts'; +import { trimMessageWhitespace } from '../../types/BodyRange.std.ts'; +import { filterAndClean } from '../../util/BodyRange.node.ts'; import { APPLICATION_OCTET_STREAM, stringToMIMEType, -} from '../../types/MIME.std.js'; -import { groupAvatarJobQueue } from '../../jobs/groupAvatarJobQueue.preload.js'; -import { AttachmentDownloadManager } from '../../jobs/AttachmentDownloadManager.preload.js'; +} from '../../types/MIME.std.ts'; +import { groupAvatarJobQueue } from '../../jobs/groupAvatarJobQueue.preload.ts'; +import { AttachmentDownloadManager } from '../../jobs/AttachmentDownloadManager.preload.ts'; import { AdhocCallStatus, CallDirection, @@ -121,53 +121,53 @@ import { CallType, DirectCallStatus, GroupCallStatus, -} from '../../types/CallDisposition.std.js'; -import type { CallHistoryDetails } from '../../types/CallDisposition.std.js'; +} from '../../types/CallDisposition.std.ts'; +import type { CallHistoryDetails } from '../../types/CallDisposition.std.ts'; import { CallLinkRestrictions, isCallLinkAdmin, -} from '../../types/CallLink.std.js'; -import type { CallLinkType } from '../../types/CallLink.std.js'; -import type { RawBodyRange } from '../../types/BodyRange.std.js'; +} from '../../types/CallLink.std.ts'; +import type { CallLinkType } from '../../types/CallLink.std.ts'; +import type { RawBodyRange } from '../../types/BodyRange.std.ts'; import { fromAdminKeyBytes, toCallHistoryFromUnusedCallLink, -} from '../../util/callLinks.std.js'; -import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.js'; -import { loadAllAndReinitializeRedux } from '../allLoaders.preload.js'; +} from '../../util/callLinks.std.ts'; +import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.ts'; +import { loadAllAndReinitializeRedux } from '../allLoaders.preload.ts'; import { startBackupMediaDownload, resetBackupMediaDownloadStats, -} from '../../util/backupMediaDownload.preload.js'; +} from '../../util/backupMediaDownload.preload.ts'; import { getEnvironment, isTestEnvironment, isTestOrMockEnvironment, -} from '../../environment.std.js'; -import { hasAttachmentDownloads } from '../../util/hasAttachmentDownloads.std.js'; -import { isAdhoc, isNightly } from '../../util/version.std.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import { isConversationAccepted } from '../../util/isConversationAccepted.preload.js'; -import { saveBackupsSubscriberData } from '../../util/backupSubscriptionData.preload.js'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; -import type { LinkPreviewType } from '../../types/message/LinkPreviews.std.js'; -import { MessageModel } from '../../models/messages.preload.js'; +} from '../../environment.std.ts'; +import { hasAttachmentDownloads } from '../../util/hasAttachmentDownloads.std.ts'; +import { isAdhoc, isNightly } from '../../util/version.std.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import { isConversationAccepted } from '../../util/isConversationAccepted.preload.ts'; +import { saveBackupsSubscriberData } from '../../util/backupSubscriptionData.preload.ts'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; +import type { LinkPreviewType } from '../../types/message/LinkPreviews.std.ts'; +import { MessageModel } from '../../models/messages.preload.ts'; import { DEFAULT_PROFILE_COLOR, fromDayOfWeekArray, type NotificationProfileType, -} from '../../types/NotificationProfile.std.js'; -import { normalizeNotificationProfileId } from '../../types/NotificationProfile-node.node.js'; -import { updateBackupMediaDownloadProgress } from '../../util/updateBackupMediaDownloadProgress.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { ChatFolderType } from '../../types/ChatFolder.std.js'; -import type { ChatFolderId, ChatFolder } from '../../types/ChatFolder.std.js'; -import { expiresTooSoonForBackup } from './util/expiration.std.js'; -import { getPinnedMessagesLimit } from '../../util/pinnedMessages.dom.js'; -import type { PinnedMessageParams } from '../../types/PinnedMessage.std.js'; -import type { ThemeType } from '../../util/preload.preload.js'; -import { toNumber } from '../../util/toNumber.std.js'; -import { isKnownProtoEnumMember } from '../../util/isKnownProtoEnumMember.std.js'; +} from '../../types/NotificationProfile.std.ts'; +import { normalizeNotificationProfileId } from '../../types/NotificationProfile-node.node.ts'; +import { updateBackupMediaDownloadProgress } from '../../util/updateBackupMediaDownloadProgress.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { ChatFolderType } from '../../types/ChatFolder.std.ts'; +import type { ChatFolderId, ChatFolder } from '../../types/ChatFolder.std.ts'; +import { expiresTooSoonForBackup } from './util/expiration.std.ts'; +import { getPinnedMessagesLimit } from '../../util/pinnedMessages.dom.ts'; +import type { PinnedMessageParams } from '../../types/PinnedMessage.std.ts'; +import type { ThemeType } from '../../util/preload.preload.ts'; +import { toNumber } from '../../util/toNumber.std.ts'; +import { isKnownProtoEnumMember } from '../../util/isKnownProtoEnumMember.std.ts'; const { isNumber } = lodash; diff --git a/ts/services/backups/index.preload.ts b/ts/services/backups/index.preload.ts index 5fd7c93078..ab65cf50f5 100644 --- a/ts/services/backups/index.preload.ts +++ b/ts/services/backups/index.preload.ts @@ -16,75 +16,75 @@ import { BackupKey } from '@signalapp/libsignal-client/dist/AccountKeys.js'; import lodashFp from 'lodash/fp.js'; import { ipcRenderer } from 'electron'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Bytes from '../../Bytes.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { drop } from '../../util/drop.std.js'; -import { TEMP_PATH } from '../../util/basePaths.preload.js'; -import { getAbsoluteDownloadsPath } from '../../util/migrations.preload.js'; -import { waitForAllBatchers } from '../../util/batcher.std.js'; -import { flushAllWaitBatchers } from '../../util/waitBatcher.std.js'; -import { DelimitedStream } from '../../util/DelimitedStream.node.js'; -import { appendPaddingStream } from '../../util/logPadding.node.js'; -import { prependStream } from '../../util/prependStream.node.js'; -import { appendMacStream } from '../../util/appendMacStream.node.js'; -import { getMacAndUpdateHmac } from '../../util/getMacAndUpdateHmac.node.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { HOUR, SECOND } from '../../util/durations/index.std.js'; -import type { ExplodePromiseResultType } from '../../util/explodePromise.std.js'; -import { explodePromise } from '../../util/explodePromise.std.js'; -import type { RetryBackupImportValue } from '../../state/ducks/installer.preload.js'; -import { CipherType, HashType } from '../../types/Crypto.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { TEMP_PATH } from '../../util/basePaths.preload.ts'; +import { getAbsoluteDownloadsPath } from '../../util/migrations.preload.ts'; +import { waitForAllBatchers } from '../../util/batcher.std.ts'; +import { flushAllWaitBatchers } from '../../util/waitBatcher.std.ts'; +import { DelimitedStream } from '../../util/DelimitedStream.node.ts'; +import { appendPaddingStream } from '../../util/logPadding.node.ts'; +import { prependStream } from '../../util/prependStream.node.ts'; +import { appendMacStream } from '../../util/appendMacStream.node.ts'; +import { getMacAndUpdateHmac } from '../../util/getMacAndUpdateHmac.node.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { HOUR, SECOND } from '../../util/durations/index.std.ts'; +import type { ExplodePromiseResultType } from '../../util/explodePromise.std.ts'; +import { explodePromise } from '../../util/explodePromise.std.ts'; +import type { RetryBackupImportValue } from '../../state/ducks/installer.preload.ts'; +import { CipherType, HashType } from '../../types/Crypto.std.ts'; import { InstallScreenBackupStep, InstallScreenBackupError, -} from '../../types/InstallScreen.std.js'; -import * as Errors from '../../types/errors.std.js'; +} from '../../types/InstallScreen.std.ts'; +import * as Errors from '../../types/errors.std.ts'; import { BackupCredentialType, type BackupsSubscriptionType, type BackupStatusType, -} from '../../types/backups.node.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; -import { constantTimeEqual } from '../../Crypto.node.js'; -import { measureSize } from '../../AttachmentCrypto.node.js'; -import { signalProtocolStore } from '../../SignalProtocolStore.preload.js'; -import { isTestOrMockEnvironment } from '../../environment.std.js'; -import { runStorageServiceSyncJob } from '../storage.preload.js'; -import { BackupExportStream } from './export.preload.js'; -import { BackupImportStream } from './import.preload.js'; +} from '../../types/backups.node.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; +import { constantTimeEqual } from '../../Crypto.node.ts'; +import { measureSize } from '../../AttachmentCrypto.node.ts'; +import { signalProtocolStore } from '../../SignalProtocolStore.preload.ts'; +import { isTestOrMockEnvironment } from '../../environment.std.ts'; +import { runStorageServiceSyncJob } from '../storage.preload.ts'; +import { BackupExportStream } from './export.preload.ts'; +import { BackupImportStream } from './import.preload.ts'; import { getBackupId, getKeyMaterial, getLocalBackupMetadataKey, -} from './crypto.preload.js'; -import { BackupCredentials } from './credentials.preload.js'; -import { BackupAPI } from './api.preload.js'; +} from './crypto.preload.ts'; +import { BackupCredentials } from './credentials.preload.ts'; +import { BackupAPI } from './api.preload.ts'; import { validateBackup, validateBackupStream, ValidationType, -} from './validator.preload.js'; +} from './validator.preload.ts'; import type { BackupExportOptions, BackupImportOptions, ExportResultType, LocalBackupExportResultType, OnProgressCallback, -} from './types.std.js'; +} from './types.std.ts'; import { BackupInstallerError, BackupDownloadFailedError, BackupImportCanceledError, BackupProcessingError, RelinkRequestedError, -} from './errors.std.js'; -import { FileStream } from './util/FileStream.node.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import { isAdhoc, isNightly } from '../../util/version.std.js'; -import { isLocalBackupsEnabled } from '../../util/isLocalBackupsEnabled.preload.js'; -import type { ValidateLocalBackupStructureResultType } from './util/localBackup.node.js'; +} from './errors.std.ts'; +import { FileStream } from './util/FileStream.node.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import { isAdhoc, isNightly } from '../../util/version.std.ts'; +import { isLocalBackupsEnabled } from '../../util/isLocalBackupsEnabled.preload.ts'; +import type { ValidateLocalBackupStructureResultType } from './util/localBackup.node.ts'; import { writeLocalBackupMetadata, verifyLocalBackupMetadata, @@ -95,29 +95,29 @@ import { getLocalBackupFilesDirectory, getLocalBackupSnapshotDirectory, LOCAL_BACKUP_DIR_NAME, -} from './util/localBackup.node.js'; +} from './util/localBackup.node.ts'; import { AttachmentPermanentlyMissingError, getJobIdForLogging, runAttachmentBackupJob, -} from '../../jobs/AttachmentLocalBackupManager.preload.js'; -import { decipherWithAesKey } from '../../util/decipherWithAesKey.node.js'; -import { areRemoteBackupsTurnedOn } from '../../util/isBackupEnabled.preload.js'; +} from '../../jobs/AttachmentLocalBackupManager.preload.ts'; +import { decipherWithAesKey } from '../../util/decipherWithAesKey.node.ts'; +import { areRemoteBackupsTurnedOn } from '../../util/isBackupEnabled.preload.ts'; import { isOnline, unlink as unlinkAccount, -} from '../../textsecure/WebAPI.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { LOCAL_BACKUP_VERSION } from './constants.std.js'; -import { getTimestampForFolder } from '../../util/timestamp.std.js'; -import { MEBIBYTE } from '../../types/AttachmentSize.std.js'; +} from '../../textsecure/WebAPI.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { LOCAL_BACKUP_VERSION } from './constants.std.ts'; +import { getTimestampForFolder } from '../../util/timestamp.std.ts'; +import { MEBIBYTE } from '../../types/AttachmentSize.std.ts'; import { NotEnoughStorageError, RanOutOfStorageError, StoragePermissionsError, -} from '../../types/LocalExport.std.js'; -import { getFreeDiskSpace } from '../../util/getFreeDiskSpace.node.js'; -import { isFeaturedEnabledNoRedux } from '../../util/isFeatureEnabled.dom.js'; +} from '../../types/LocalExport.std.ts'; +import { getFreeDiskSpace } from '../../util/getFreeDiskSpace.node.ts'; +import { isFeaturedEnabledNoRedux } from '../../util/isFeatureEnabled.dom.ts'; const { ensureFile, exists } = fsExtra; diff --git a/ts/services/backups/types.std.ts b/ts/services/backups/types.std.ts index 607e5c949b..ecec94b8b1 100644 --- a/ts/services/backups/types.std.ts +++ b/ts/services/backups/types.std.ts @@ -1,12 +1,12 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString, PniString } from '../../types/ServiceId.std.js'; -import type { ConversationColorType } from '../../types/Colors.std.js'; +import type { AciString, PniString } from '../../types/ServiceId.std.ts'; +import type { ConversationColorType } from '../../types/Colors.std.ts'; import type { CoreAttachmentBackupJobType, CoreAttachmentLocalBackupJobType, -} from '../../types/AttachmentBackup.std.js'; +} from '../../types/AttachmentBackup.std.ts'; // Duplicated here to allow loading it in a non-node environment export enum BackupLevel { diff --git a/ts/services/backups/util/expiration.std.ts b/ts/services/backups/util/expiration.std.ts index 6daaf4954d..e2b834409b 100644 --- a/ts/services/backups/util/expiration.std.ts +++ b/ts/services/backups/util/expiration.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DAY } from '../../../util/durations/constants.std.js'; +import { DAY } from '../../../util/durations/constants.std.ts'; // Messages that expire with 24 hours are excluded from regular backups (and their // attachments may not be backed up), but they will be present in link & sync backups diff --git a/ts/services/backups/util/filePointers.preload.ts b/ts/services/backups/util/filePointers.preload.ts index fcf7e2a222..445b2baa09 100644 --- a/ts/services/backups/util/filePointers.preload.ts +++ b/ts/services/backups/util/filePointers.preload.ts @@ -5,25 +5,25 @@ import { BackupLevel } from '@signalapp/libsignal-client/zkgroup.js'; import { APPLICATION_OCTET_STREAM, stringToMIMEType, -} from '../../../types/MIME.std.js'; -import type { AttachmentType } from '../../../types/Attachment.std.js'; -import { doesAttachmentExist } from '../../../util/migrations.preload.js'; +} from '../../../types/MIME.std.ts'; +import type { AttachmentType } from '../../../types/Attachment.std.ts'; +import { doesAttachmentExist } from '../../../util/migrations.preload.ts'; import { hasRequiredInformationForLocalBackup, hasRequiredInformationForRemoteBackup, hasRequiredInformationToDownloadFromTransitTier, -} from '../../../util/Attachment.std.js'; -import { Backups, SignalService } from '../../../protobuf/index.std.js'; -import * as Bytes from '../../../Bytes.std.js'; +} from '../../../util/Attachment.std.ts'; +import { Backups, SignalService } from '../../../protobuf/index.std.ts'; +import * as Bytes from '../../../Bytes.std.ts'; import { getSafeLongFromTimestamp, getTimestampFromLong, -} from '../../../util/timestampLongUtils.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; +} from '../../../util/timestampLongUtils.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; import type { CoreAttachmentBackupJobType, CoreAttachmentLocalBackupJobType, -} from '../../../types/AttachmentBackup.std.js'; +} from '../../../types/AttachmentBackup.std.ts'; import { type GetBackupCdnInfoType, getMediaIdFromMediaName, @@ -32,21 +32,21 @@ import { type BackupCdnInfoType, getLocalBackupFileNameForAttachment, getLocalBackupFileName, -} from './mediaId.preload.js'; -import { missingCaseError } from '../../../util/missingCaseError.std.js'; -import { bytesToUuid } from '../../../util/uuidToBytes.std.js'; -import { createName } from '../../../util/attachmentPath.node.js'; -import { generateAttachmentKeys } from '../../../AttachmentCrypto.node.js'; -import { getAttachmentLocalBackupPathFromSnapshotDir } from './localBackup.node.js'; +} from './mediaId.preload.ts'; +import { missingCaseError } from '../../../util/missingCaseError.std.ts'; +import { bytesToUuid } from '../../../util/uuidToBytes.std.ts'; +import { createName } from '../../../util/attachmentPath.node.ts'; +import { generateAttachmentKeys } from '../../../AttachmentCrypto.node.ts'; +import { getAttachmentLocalBackupPathFromSnapshotDir } from './localBackup.node.ts'; import { isValidAttachmentKey, isValidDigest, isValidPlaintextHash, -} from '../../../types/Crypto.std.js'; -import type { BackupExportOptions, BackupImportOptions } from '../types.std.js'; -import { isTestOrMockEnvironment } from '../../../environment.std.js'; -import { toNumber } from '../../../util/toNumber.std.js'; -import { isKnownProtoEnumMember } from '../../../util/isKnownProtoEnumMember.std.js'; +} from '../../../types/Crypto.std.ts'; +import type { BackupExportOptions, BackupImportOptions } from '../types.std.ts'; +import { isTestOrMockEnvironment } from '../../../environment.std.ts'; +import { toNumber } from '../../../util/toNumber.std.ts'; +import { isKnownProtoEnumMember } from '../../../util/isKnownProtoEnumMember.std.ts'; export function convertFilePointerToAttachment( filePointer: Backups.FilePointer, diff --git a/ts/services/backups/util/localBackup.node.ts b/ts/services/backups/util/localBackup.node.ts index 24029bfba0..c87fbebc5a 100644 --- a/ts/services/backups/util/localBackup.node.ts +++ b/ts/services/backups/util/localBackup.node.ts @@ -7,21 +7,21 @@ import { readdir, readFile, rm, stat, writeFile } from 'node:fs/promises'; import { createReadStream, createWriteStream } from 'node:fs'; import { Readable, Writable } from 'node:stream'; import { pipeline } from 'node:stream/promises'; -import { createLogger } from '../../../logging/log.std.js'; -import * as Bytes from '../../../Bytes.std.js'; -import * as Errors from '../../../types/errors.std.js'; -import { Signal } from '../../../protobuf/index.std.js'; -import { DelimitedStream } from '../../../util/DelimitedStream.node.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { encodeDelimited } from '../../../util/encodeDelimited.std.js'; -import { decryptAesCtr, encryptAesCtr } from '../../../Crypto.node.js'; -import type { LocalBackupMetadataVerificationType } from '../../../types/backups.node.js'; +import { createLogger } from '../../../logging/log.std.ts'; +import * as Bytes from '../../../Bytes.std.ts'; +import * as Errors from '../../../types/errors.std.ts'; +import { Signal } from '../../../protobuf/index.std.ts'; +import { DelimitedStream } from '../../../util/DelimitedStream.node.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { encodeDelimited } from '../../../util/encodeDelimited.std.ts'; +import { decryptAesCtr, encryptAesCtr } from '../../../Crypto.node.ts'; +import type { LocalBackupMetadataVerificationType } from '../../../types/backups.node.ts'; import { LOCAL_BACKUP_VERSION, LOCAL_BACKUP_BACKUP_ID_IV_LENGTH, -} from '../constants.std.js'; -import { getTimestampForFolder } from '../../../util/timestamp.std.js'; -import { isPathInside } from '../../../util/isPathInside.node.js'; +} from '../constants.std.ts'; +import { getTimestampForFolder } from '../../../util/timestamp.std.ts'; +import { isPathInside } from '../../../util/isPathInside.node.ts'; const log = createLogger('localBackup'); diff --git a/ts/services/backups/util/mediaId.preload.ts b/ts/services/backups/util/mediaId.preload.ts index c4fdae1581..10b3867839 100644 --- a/ts/services/backups/util/mediaId.preload.ts +++ b/ts/services/backups/util/mediaId.preload.ts @@ -1,14 +1,14 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader } from '../../../sql/Client.preload.js'; -import * as Bytes from '../../../Bytes.std.js'; -import { getBackupMediaRootKey } from '../crypto.preload.js'; +import { DataReader } from '../../../sql/Client.preload.ts'; +import * as Bytes from '../../../Bytes.std.ts'; +import { getBackupMediaRootKey } from '../crypto.preload.ts'; import type { BackupableAttachmentType, AttachmentReadyForLocalBackup, -} from '../../../types/Attachment.std.js'; -import { sha256 } from '../../../Crypto.node.js'; +} from '../../../types/Attachment.std.ts'; +import { sha256 } from '../../../Crypto.node.ts'; export function getMediaIdFromMediaName(mediaName: string): { string: string; diff --git a/ts/services/backups/validator.preload.ts b/ts/services/backups/validator.preload.ts index 7cbf50f043..eb296f13a2 100644 --- a/ts/services/backups/validator.preload.ts +++ b/ts/services/backups/validator.preload.ts @@ -6,11 +6,11 @@ import { pipeline } from 'node:stream/promises'; import * as libsignal from '@signalapp/libsignal-client/dist/MessageBackup.js'; import type { InputStream } from '@signalapp/libsignal-client/dist/io.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { toAciObject } from '../../util/ServiceId.node.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { DelimitedStream } from '../../util/DelimitedStream.node.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import { toAciObject } from '../../util/ServiceId.node.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { DelimitedStream } from '../../util/DelimitedStream.node.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; export enum ValidationType { Export = 'Export', diff --git a/ts/services/badgeLoader.preload.ts b/ts/services/badgeLoader.preload.ts index f6066acc32..06a8feea51 100644 --- a/ts/services/badgeLoader.preload.ts +++ b/ts/services/badgeLoader.preload.ts @@ -1,12 +1,12 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader } from '../sql/Client.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { makeLookup } from '../util/makeLookup.std.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { makeLookup } from '../util/makeLookup.std.ts'; -import type { BadgeType } from '../badges/types.std.js'; -import type { BadgesStateType } from '../state/ducks/badges.preload.js'; +import type { BadgeType } from '../badges/types.std.ts'; +import type { BadgesStateType } from '../state/ducks/badges.preload.ts'; let badges: Array | undefined; diff --git a/ts/services/buildExpiration.preload.ts b/ts/services/buildExpiration.preload.ts index b9639c6959..e7b17dc46f 100644 --- a/ts/services/buildExpiration.preload.ts +++ b/ts/services/buildExpiration.preload.ts @@ -6,10 +6,10 @@ import EventEmitter from 'node:events'; import { hasBuildExpired, getBuildExpirationTimestamp, -} from '../util/buildExpiration.std.js'; -import { LongTimeout } from '../util/timeout.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../util/buildExpiration.std.ts'; +import { LongTimeout } from '../util/timeout.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('buildExpiration'); diff --git a/ts/services/callHistoryLoader.preload.ts b/ts/services/callHistoryLoader.preload.ts index 9b69a9224d..1387f2c90c 100644 --- a/ts/services/callHistoryLoader.preload.ts +++ b/ts/services/callHistoryLoader.preload.ts @@ -1,9 +1,9 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import type { CallHistoryDetails } from '../types/CallDisposition.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import type { CallHistoryDetails } from '../types/CallDisposition.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; let callsHistoryData: ReadonlyArray; let callsHistoryUnreadCount: number; diff --git a/ts/services/callLinksLoader.preload.ts b/ts/services/callLinksLoader.preload.ts index 0693ef7a65..7e5b73e8c1 100644 --- a/ts/services/callLinksLoader.preload.ts +++ b/ts/services/callLinksLoader.preload.ts @@ -1,9 +1,9 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader } from '../sql/Client.preload.js'; -import type { CallLinkType } from '../types/CallLink.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import type { CallLinkType } from '../types/CallLink.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; let callLinksData: ReadonlyArray; diff --git a/ts/services/calling.preload.ts b/ts/services/calling.preload.ts index 9cc096eb6e..096a6a2790 100644 --- a/ts/services/calling.preload.ts +++ b/ts/services/calling.preload.ts @@ -56,61 +56,61 @@ import { Aci } from '@signalapp/libsignal-client'; import { CanvasVideoRenderer, GumVideoCapturer, -} from '../calling/VideoSupport.preload.js'; +} from '../calling/VideoSupport.preload.ts'; import type { GumVideoCaptureOptions, SizeCallbackType, -} from '../calling/VideoSupport.preload.js'; +} from '../calling/VideoSupport.preload.ts'; import type { ActionsType as CallingReduxActionsType, GroupCallParticipantInfoType, GroupCallPeekInfoType, -} from '../state/ducks/calling.preload.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { getConversationCallMode } from '../util/getConversationCallMode.std.js'; -import { isMe } from '../util/whatTypeOfConversation.dom.js'; -import { getAbsoluteTempPath } from '../util/migrations.preload.js'; -import { isKnownProtoEnumMember } from '../util/isKnownProtoEnumMember.std.js'; +} from '../state/ducks/calling.preload.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { getConversationCallMode } from '../util/getConversationCallMode.std.ts'; +import { isMe } from '../util/whatTypeOfConversation.dom.ts'; +import { getAbsoluteTempPath } from '../util/migrations.preload.ts'; +import { isKnownProtoEnumMember } from '../util/isKnownProtoEnumMember.std.ts'; import type { AvailableIODevicesType, IceServerType, IceServerCacheType, MediaDeviceSettings, PresentedSource, -} from '../types/Calling.std.js'; +} from '../types/Calling.std.ts'; import { CallEndedReason, GroupCallConnectionState, GroupCallJoinState, ScreenShareStatus, -} from '../types/Calling.std.js'; -import { CallMode, LocalCallEvent } from '../types/CallDisposition.std.js'; +} from '../types/Calling.std.ts'; +import { CallMode, LocalCallEvent } from '../types/CallDisposition.std.ts'; import { findBestMatchingAudioDeviceIndex, findBestMatchingCameraId, -} from '../calling/findBestMatchingDevice.std.js'; -import { normalizeAci } from '../util/normalizeAci.std.js'; -import { isAciString } from '../util/isAciString.std.js'; -import * as Errors from '../types/errors.std.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import * as Bytes from '../Bytes.std.js'; -import { uuidToBytes, bytesToUuid } from '../util/uuidToBytes.std.js'; -import { drop } from '../util/drop.std.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { getOwn } from '../util/getOwn.std.js'; -import * as durations from '../util/durations/index.std.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import { fetchMembershipProof, getMembershipList } from '../groups.preload.js'; +} from '../calling/findBestMatchingDevice.std.ts'; +import { normalizeAci } from '../util/normalizeAci.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { uuidToBytes, bytesToUuid } from '../util/uuidToBytes.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import { getOwn } from '../util/getOwn.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import { fetchMembershipProof, getMembershipList } from '../groups.preload.ts'; import type { ProcessedEnvelope } from '../textsecure/Types.d.ts'; -import type { GetIceServersResultType } from '../textsecure/WebAPI.preload.js'; +import type { GetIceServersResultType } from '../textsecure/WebAPI.preload.ts'; import { callLinkCreateAuth, getIceServers, makeSfuRequest, -} from '../textsecure/WebAPI.preload.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { normalizeGroupCallTimestamp } from '../util/ringrtc/normalizeGroupCallTimestamp.std.js'; -import { requestCameraPermissions } from '../util/callingPermissions.dom.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { normalizeGroupCallTimestamp } from '../util/ringrtc/normalizeGroupCallTimestamp.std.ts'; +import { requestCameraPermissions } from '../util/callingPermissions.dom.ts'; import { AUDIO_LEVEL_INTERVAL_MS, REQUESTED_VIDEO_WIDTH, @@ -121,19 +121,19 @@ import { REQUESTED_SCREEN_SHARE_WIDTH, REQUESTED_SCREEN_SHARE_HEIGHT, REQUESTED_SCREEN_SHARE_FRAMERATE, -} from '../calling/constants.std.js'; -import { callingMessageToProto } from '../util/callingMessageToProto.node.js'; -import { requestMicrophonePermissions } from '../util/requestMicrophonePermissions.dom.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; +} from '../calling/constants.std.ts'; +import { callingMessageToProto } from '../util/callingMessageToProto.node.ts'; +import { requestMicrophonePermissions } from '../util/requestMicrophonePermissions.dom.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; import { notificationService, NotificationSetting, FALLBACK_NOTIFICATION_TITLE, shouldSaveNotificationAvatarToDisk, -} from './notifications.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { assertDev, strictAssert } from '../util/assert.std.js'; +} from './notifications.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { assertDev, strictAssert } from '../util/assert.std.ts'; import { formatLocalDeviceState, formatPeekInfo, @@ -152,41 +152,41 @@ import { updateAdhocCallHistory, getCallIdFromEra, getCallDetailsForAdhocCall, -} from '../util/callDisposition.preload.js'; -import { isNormalNumber } from '../util/isNormalNumber.std.js'; -import type { AciString, ServiceIdString } from '../types/ServiceId.std.js'; -import { isServiceIdString, isPniString } from '../types/ServiceId.std.js'; -import { NotificationType } from '../types/notifications.std.js'; -import { isSignalConnection } from '../util/getSignalConnections.preload.js'; -import { toAdminKeyBytes } from '../util/callLinks.std.js'; +} from '../util/callDisposition.preload.ts'; +import { isNormalNumber } from '../util/isNormalNumber.std.ts'; +import type { AciString, ServiceIdString } from '../types/ServiceId.std.ts'; +import { isServiceIdString, isPniString } from '../types/ServiceId.std.ts'; +import { NotificationType } from '../types/notifications.std.ts'; +import { isSignalConnection } from '../util/getSignalConnections.preload.ts'; +import { toAdminKeyBytes } from '../util/callLinks.std.ts'; import { getRoomIdFromRootKey, callLinkRestrictionsToRingRTC, callLinkStateFromRingRTC, -} from '../util/callLinksRingrtc.node.js'; -import { getCallLinkAuthCredentialPresentation } from '../util/callLinks/zkgroup.preload.js'; +} from '../util/callLinksRingrtc.node.ts'; +import { getCallLinkAuthCredentialPresentation } from '../util/callLinks/zkgroup.preload.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import type { CallLinkType, CallLinkStateType } from '../types/CallLink.std.js'; -import { CallLinkRestrictions } from '../types/CallLink.std.js'; -import { getConversationIdForLogging } from '../util/idForLogging.preload.js'; -import { sendCallLinkUpdateSync } from '../util/sendCallLinkUpdateSync.preload.js'; -import { createIdenticon } from '../util/createIdenticon.preload.js'; -import { getColorForCallLink } from '../util/getColorForCallLink.std.js'; -import OS from '../util/os/osMain.node.js'; -import { sleep } from '../util/sleep.std.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { CallQualitySurvey } from '../types/CallQualitySurvey.std.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import type { CallLinkType, CallLinkStateType } from '../types/CallLink.std.ts'; +import { CallLinkRestrictions } from '../types/CallLink.std.ts'; +import { getConversationIdForLogging } from '../util/idForLogging.preload.ts'; +import { sendCallLinkUpdateSync } from '../util/sendCallLinkUpdateSync.preload.ts'; +import { createIdenticon } from '../util/createIdenticon.preload.tsx'; +import { getColorForCallLink } from '../util/getColorForCallLink.std.ts'; +import OS from '../util/os/osMain.node.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { CallQualitySurvey } from '../types/CallQualitySurvey.std.ts'; import { isCallFailure, shouldShowCallQualitySurvey, -} from '../util/callQualitySurvey.dom.js'; -import * as RemoteConfig from '../RemoteConfig.dom.js'; -import { isAlpha, isBeta, isProduction } from '../util/version.std.js'; -import { parseIntOrThrow } from '../util/parseIntOrThrow.std.js'; +} from '../util/callQualitySurvey.dom.ts'; +import * as RemoteConfig from '../RemoteConfig.dom.ts'; +import { isAlpha, isBeta, isProduction } from '../util/version.std.ts'; +import { parseIntOrThrow } from '../util/parseIntOrThrow.std.ts'; const { i18n } = window.SignalContext; diff --git a/ts/services/challengeHandler.preload.ts b/ts/services/challengeHandler.preload.ts index 7bade2c24a..3afbd74933 100644 --- a/ts/services/challengeHandler.preload.ts +++ b/ts/services/challengeHandler.preload.ts @@ -1,11 +1,11 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { ChallengeHandler } from '../challenge.dom.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { sendChallengeResponse as doSendChallengeResponse } from '../textsecure/WebAPI.preload.js'; -import { conversationJobQueue } from '../jobs/conversationJobQueue.preload.js'; -import { ToastType } from '../types/Toast.dom.js'; +import { ChallengeHandler } from '../challenge.dom.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { sendChallengeResponse as doSendChallengeResponse } from '../textsecure/WebAPI.preload.ts'; +import { conversationJobQueue } from '../jobs/conversationJobQueue.preload.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; export const challengeHandler = new ChallengeHandler({ storage: itemStorage, diff --git a/ts/services/chatFoldersLoader.preload.ts b/ts/services/chatFoldersLoader.preload.ts index a576c96b98..52287d2243 100644 --- a/ts/services/chatFoldersLoader.preload.ts +++ b/ts/services/chatFoldersLoader.preload.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader } from '../sql/Client.preload.js'; -import type { CurrentChatFolder } from '../types/CurrentChatFolders.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import type { CurrentChatFolder } from '../types/CurrentChatFolders.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; let chatFolders: ReadonlyArray; diff --git a/ts/services/contactSync.preload.ts b/ts/services/contactSync.preload.ts index d02edba739..ff19edc18a 100644 --- a/ts/services/contactSync.preload.ts +++ b/ts/services/contactSync.preload.ts @@ -4,39 +4,39 @@ import PQueue from 'p-queue'; import lodash from 'lodash'; -import { DataWriter } from '../sql/Client.preload.js'; -import type { ContactSyncEvent } from '../textsecure/messageReceiverEvents.std.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import type { ContactSyncEvent } from '../textsecure/messageReceiverEvents.std.ts'; import { parseContactsV2, type ContactDetailsWithAvatar, -} from '../textsecure/ContactsParser.preload.js'; +} from '../textsecure/ContactsParser.preload.ts'; import { isOnline, getAttachment, getAttachmentFromBackupTier, -} from '../textsecure/WebAPI.preload.js'; -import * as Errors from '../types/errors.std.js'; +} from '../textsecure/WebAPI.preload.ts'; +import * as Errors from '../types/errors.std.ts'; import type { ValidateConversationType } from '../model-types.d.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import { validateConversation } from '../util/validateConversation.dom.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { validateConversation } from '../util/validateConversation.dom.ts'; import { maybeDeleteAttachmentFile, doesAttachmentExist, -} from '../util/migrations.preload.js'; +} from '../util/migrations.preload.ts'; import { isDirectConversation, isMe, -} from '../util/whatTypeOfConversation.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import { dropNull } from '../util/dropNull.std.js'; +} from '../util/whatTypeOfConversation.dom.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; import type { ProcessedAttachment } from '../textsecure/Types.d.ts'; -import { downloadAttachment } from '../textsecure/downloadAttachment.preload.js'; -import type { ReencryptedAttachmentV2 } from '../AttachmentCrypto.node.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { AttachmentVariant } from '../types/Attachment.std.js'; -import { MediaTier } from '../types/AttachmentDownload.std.js'; -import { waitForOnline } from '../util/waitForOnline.dom.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { downloadAttachment } from '../textsecure/downloadAttachment.preload.ts'; +import type { ReencryptedAttachmentV2 } from '../AttachmentCrypto.node.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { AttachmentVariant } from '../types/Attachment.std.ts'; +import { MediaTier } from '../types/AttachmentDownload.std.ts'; +import { waitForOnline } from '../util/waitForOnline.dom.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { noop } = lodash; diff --git a/ts/services/distributionListLoader.preload.ts b/ts/services/distributionListLoader.preload.ts index 0d88d8ca39..9b92dc54bf 100644 --- a/ts/services/distributionListLoader.preload.ts +++ b/ts/services/distributionListLoader.preload.ts @@ -1,10 +1,10 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader } from '../sql/Client.preload.js'; -import type { StoryDistributionWithMembersType } from '../sql/Interface.std.js'; -import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists.preload.js'; -import { strictAssert } from '../util/assert.std.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import type { StoryDistributionWithMembersType } from '../sql/Interface.std.ts'; +import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; let distributionLists: Array | undefined; diff --git a/ts/services/donations.preload.ts b/ts/services/donations.preload.ts index e10c774bdc..13d7e807aa 100644 --- a/ts/services/donations.preload.ts +++ b/ts/services/donations.preload.ts @@ -11,30 +11,30 @@ import { } from '@signalapp/libsignal-client/zkgroup.js'; import * as countryCodes from 'country-codes-list'; -import * as Bytes from '../Bytes.std.js'; -import * as Errors from '../types/errors.std.js'; -import { getRandomBytes, sha256 } from '../Crypto.node.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { getProfile } from '../util/getProfile.preload.js'; +import * as Bytes from '../Bytes.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { getRandomBytes, sha256 } from '../Crypto.node.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { getProfile } from '../util/getProfile.preload.ts'; import { donationPaypalApprovedRoute, donationPaypalCanceledRoute, donationValidationCompleteRoute, -} from '../util/signalRoutes.std.js'; -import { safeParseStrict, safeParseUnknown } from '../util/schemas.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { exponentialBackoffSleepTime } from '../util/exponentialBackoff.std.js'; -import { sleeper } from '../util/sleeper.std.js'; -import { isInPast, isOlderThan } from '../util/timestamp.std.js'; -import { DAY, DurationInSeconds } from '../util/durations/index.std.js'; -import { waitForOnline } from '../util/waitForOnline.dom.js'; +} from '../util/signalRoutes.std.ts'; +import { safeParseStrict, safeParseUnknown } from '../util/schemas.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { exponentialBackoffSleepTime } from '../util/exponentialBackoff.std.ts'; +import { sleeper } from '../util/sleeper.std.ts'; +import { isInPast, isOlderThan } from '../util/timestamp.std.ts'; +import { DAY, DurationInSeconds } from '../util/durations/index.std.ts'; +import { waitForOnline } from '../util/waitForOnline.dom.ts'; import { donationErrorTypeSchema, donationStateSchema, donationWorkflowSchema, donationProcessorSchema, -} from '../types/Donations.std.js'; +} from '../types/Donations.std.ts'; import type { CardDetail, @@ -43,10 +43,10 @@ import type { DonationWorkflow, ReceiptContext, StripeDonationAmount, -} from '../types/Donations.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { NavTab, SettingsPage } from '../types/Nav.std.js'; -import { getRegionCodeForNumber } from '../util/libphonenumberUtil.std.js'; +} from '../types/Donations.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { NavTab, SettingsPage } from '../types/Nav.std.ts'; +import { getRegionCodeForNumber } from '../util/libphonenumberUtil.std.ts'; import { createBoostPaymentIntent, createPaymentMethodWithStripe, @@ -56,8 +56,8 @@ import { isOnline, createPaypalBoostPayment, confirmPaypalBoostPayment, -} from '../textsecure/WebAPI.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { createDonationReceipt } = DataWriter; diff --git a/ts/services/donationsLoader.preload.ts b/ts/services/donationsLoader.preload.ts index b61e09a5bc..eaccc9d227 100644 --- a/ts/services/donationsLoader.preload.ts +++ b/ts/services/donationsLoader.preload.ts @@ -1,13 +1,13 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader } from '../sql/Client.preload.js'; -import { strictAssert } from '../util/assert.std.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; -import { _getWorkflowFromStorage } from './donations.preload.js'; +import { _getWorkflowFromStorage } from './donations.preload.ts'; -import type { DonationReceipt } from '../types/Donations.std.js'; -import type { DonationsStateType } from '../state/ducks/donations.preload.js'; +import type { DonationReceipt } from '../types/Donations.std.ts'; +import type { DonationsStateType } from '../state/ducks/donations.preload.ts'; let donationReceipts: Array | undefined; diff --git a/ts/services/expiring/chatFolderCleanupService.preload.ts b/ts/services/expiring/chatFolderCleanupService.preload.ts index 416aed2b4f..a0e1fdb0a0 100644 --- a/ts/services/expiring/chatFolderCleanupService.preload.ts +++ b/ts/services/expiring/chatFolderCleanupService.preload.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { getMessageQueueTime } from '../../util/getMessageQueueTime.dom.js'; -import { createExpiringEntityCleanupService } from './createExpiringEntityCleanupService.std.js'; -import * as RemoteConfig from '../../RemoteConfig.dom.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { getMessageQueueTime } from '../../util/getMessageQueueTime.dom.ts'; +import { createExpiringEntityCleanupService } from './createExpiringEntityCleanupService.std.ts'; +import * as RemoteConfig from '../../RemoteConfig.dom.ts'; export const chatFolderCleanupService = createExpiringEntityCleanupService({ logPrefix: 'ChatFolders', diff --git a/ts/services/expiring/createExpiringEntityCleanupService.std.ts b/ts/services/expiring/createExpiringEntityCleanupService.std.ts index 08a867139e..ca04859d5d 100644 --- a/ts/services/expiring/createExpiringEntityCleanupService.std.ts +++ b/ts/services/expiring/createExpiringEntityCleanupService.std.ts @@ -1,12 +1,12 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getEnvironment, isTestEnvironment } from '../../environment.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { drop } from '../../util/drop.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { longTimeoutAsync } from '../../util/timeout.std.js'; +import { getEnvironment, isTestEnvironment } from '../../environment.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { longTimeoutAsync } from '../../util/timeout.std.ts'; const parentLog = createLogger('ExpiringEntityCleanupService'); diff --git a/ts/services/expiring/pinnedMessagesCleanupService.preload.ts b/ts/services/expiring/pinnedMessagesCleanupService.preload.ts index dc6baae4c5..2051fb733b 100644 --- a/ts/services/expiring/pinnedMessagesCleanupService.preload.ts +++ b/ts/services/expiring/pinnedMessagesCleanupService.preload.ts @@ -1,15 +1,15 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { createExpiringEntityCleanupService } from './createExpiringEntityCleanupService.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { createExpiringEntityCleanupService } from './createExpiringEntityCleanupService.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../../jobs/conversationJobQueue.preload.js'; -import { getPinnedMessageTarget } from '../../util/getPinMessageTarget.preload.js'; -import { drop } from '../../util/drop.std.js'; +} from '../../jobs/conversationJobQueue.preload.ts'; +import { getPinnedMessageTarget } from '../../util/getPinMessageTarget.preload.ts'; +import { drop } from '../../util/drop.std.ts'; export const pinnedMessagesCleanupService = createExpiringEntityCleanupService({ logPrefix: 'PinnedMessages', diff --git a/ts/services/expiringMessagesDeletion.preload.ts b/ts/services/expiringMessagesDeletion.preload.ts index 4b5b92879c..c95a8d95ed 100644 --- a/ts/services/expiringMessagesDeletion.preload.ts +++ b/ts/services/expiringMessagesDeletion.preload.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import { sleep } from '../util/sleep.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { cleanupMessages } from '../util/cleanup.preload.js'; -import { drop } from '../util/drop.std.js'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { cleanupMessages } from '../util/cleanup.preload.ts'; +import { drop } from '../util/drop.std.ts'; const { debounce } = lodash; diff --git a/ts/services/gifsLoader.preload.ts b/ts/services/gifsLoader.preload.ts index 68277ad1f3..de8caa371b 100644 --- a/ts/services/gifsLoader.preload.ts +++ b/ts/services/gifsLoader.preload.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader } from '../sql/Client.preload.js'; -import type { GifsStateType } from '../state/ducks/gifs.preload.js'; -import { MAX_RECENT_GIFS } from '../state/ducks/gifs.preload.js'; -import { strictAssert } from '../util/assert.std.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import type { GifsStateType } from '../state/ducks/gifs.preload.ts'; +import { MAX_RECENT_GIFS } from '../state/ducks/gifs.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; let state: GifsStateType; diff --git a/ts/services/globalMessageAudio.std.ts b/ts/services/globalMessageAudio.std.ts index e453db234a..ade34506e1 100644 --- a/ts/services/globalMessageAudio.std.ts +++ b/ts/services/globalMessageAudio.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { isAbortError } from '../util/isAbortError.std.js'; +import { isAbortError } from '../util/isAbortError.std.ts'; const { noop } = lodash; diff --git a/ts/services/groupCredentialFetcher.preload.ts b/ts/services/groupCredentialFetcher.preload.ts index e4b57f6577..5d013c7646 100644 --- a/ts/services/groupCredentialFetcher.preload.ts +++ b/ts/services/groupCredentialFetcher.preload.ts @@ -8,20 +8,20 @@ import { GenericServerPublicParams, } from '@signalapp/libsignal-client/zkgroup.js'; -import { getClientZkAuthOperations } from '../util/zkgroup.node.js'; +import { getClientZkAuthOperations } from '../util/zkgroup.node.ts'; -import type { GroupCredentialType } from '../textsecure/WebAPI.preload.js'; -import { getGroupCredentials } from '../textsecure/WebAPI.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import * as durations from '../util/durations/index.std.js'; -import { BackOff } from '../util/BackOff.std.js'; -import { sleep } from '../util/sleep.std.js'; -import { toDayMillis } from '../util/timestamp.std.js'; -import { toTaggedPni } from '../types/ServiceId.std.js'; -import { toPniObject, toAciObject } from '../util/ServiceId.node.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { GroupCredentialType } from '../textsecure/WebAPI.preload.ts'; +import { getGroupCredentials } from '../textsecure/WebAPI.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import { BackOff } from '../util/BackOff.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { toDayMillis } from '../util/timestamp.std.ts'; +import { toTaggedPni } from '../types/ServiceId.std.ts'; +import { toPniObject, toAciObject } from '../util/ServiceId.node.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { first, last, sortBy } = lodash; diff --git a/ts/services/keyTransparency.preload.ts b/ts/services/keyTransparency.preload.ts index d893cae411..514437d2a2 100644 --- a/ts/services/keyTransparency.preload.ts +++ b/ts/services/keyTransparency.preload.ts @@ -13,25 +13,25 @@ import type { } from '@signalapp/libsignal-client/dist/net/KeyTransparency.js'; import pTimeout from 'p-timeout'; -import { keyTransparencyCheck } from '../textsecure/WebAPI.preload.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { toLogFormat } from '../types/errors.std.js'; -import { toAciObject } from '../util/ServiceId.node.js'; -import { TaskDeduplicator } from '../util/TaskDeduplicator.std.js'; -import { BackOff, FIBONACCI_TIMEOUTS } from '../util/BackOff.std.js'; -import { sleep } from '../util/sleep.std.js'; -import { SECOND, MINUTE, DAY, WEEK } from '../util/durations/constants.std.js'; -import { CheckScheduler } from '../util/CheckScheduler.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { isFeaturedEnabledNoRedux } from '../util/isFeatureEnabled.dom.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { isEnabled } from '../RemoteConfig.dom.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { runStorageServiceSyncJob } from './storage.preload.js'; +import { keyTransparencyCheck } from '../textsecure/WebAPI.preload.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import { toAciObject } from '../util/ServiceId.node.ts'; +import { TaskDeduplicator } from '../util/TaskDeduplicator.std.ts'; +import { BackOff, FIBONACCI_TIMEOUTS } from '../util/BackOff.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { SECOND, MINUTE, DAY, WEEK } from '../util/durations/constants.std.ts'; +import { CheckScheduler } from '../util/CheckScheduler.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { isFeaturedEnabledNoRedux } from '../util/isFeatureEnabled.dom.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { isEnabled } from '../RemoteConfig.dom.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { runStorageServiceSyncJob } from './storage.preload.ts'; const log = createLogger('KeyTransparency'); diff --git a/ts/services/keyboardLayout.dom.ts b/ts/services/keyboardLayout.dom.ts index 39709b817e..ffcb89ca80 100644 --- a/ts/services/keyboardLayout.dom.ts +++ b/ts/services/keyboardLayout.dom.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { strictAssert } from '../util/assert.std.js'; +import { strictAssert } from '../util/assert.std.ts'; type LayoutMapType = { get(code: string): string | undefined }; diff --git a/ts/services/megaphone.preload.ts b/ts/services/megaphone.preload.ts index 8cb44b5ddc..92409505fc 100644 --- a/ts/services/megaphone.preload.ts +++ b/ts/services/megaphone.preload.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; import { getMegaphoneLastSnoozeDurationMs, MegaphoneCtaId, @@ -10,17 +10,17 @@ import { type RemoteMegaphoneId, type RemoteMegaphoneType, type VisibleRemoteMegaphoneType, -} from '../types/Megaphone.std.js'; -import { DAY, HOUR } from '../util/durations/index.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { drop } from '../util/drop.std.js'; -import { isMockEnvironment } from '../environment.std.js'; -import { isEnabled } from '../RemoteConfig.dom.js'; -import { safeSetTimeout } from '../util/timeout.std.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { isMoreRecentThan } from '../util/timestamp.std.js'; -import { maybeHydrateDonationConfigCache } from '../util/subscriptionConfiguration.preload.js'; +} from '../types/Megaphone.std.ts'; +import { DAY, HOUR } from '../util/durations/index.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { isMockEnvironment } from '../environment.std.ts'; +import { isEnabled } from '../RemoteConfig.dom.ts'; +import { safeSetTimeout } from '../util/timeout.std.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { isMoreRecentThan } from '../util/timestamp.std.ts'; +import { maybeHydrateDonationConfigCache } from '../util/subscriptionConfiguration.preload.ts'; const log = createLogger('megaphoneService'); diff --git a/ts/services/messageStateCleanup.dom.ts b/ts/services/messageStateCleanup.dom.ts index 7c19022bfb..8859e44bc7 100644 --- a/ts/services/messageStateCleanup.dom.ts +++ b/ts/services/messageStateCleanup.dom.ts @@ -1,8 +1,8 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as durations from '../util/durations/index.std.js'; -import { isEnabled } from '../RemoteConfig.dom.js'; +import * as durations from '../util/durations/index.std.ts'; +import { isEnabled } from '../RemoteConfig.dom.ts'; const TEN_MINUTES = 10 * durations.MINUTE; diff --git a/ts/services/networkObserver.preload.ts b/ts/services/networkObserver.preload.ts index 7651ba4615..64075c9dbf 100644 --- a/ts/services/networkObserver.preload.ts +++ b/ts/services/networkObserver.preload.ts @@ -4,12 +4,12 @@ import type { SetNetworkStatusPayloadType, NetworkActionType, -} from '../state/ducks/network.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { electronLookup } from '../util/dns.node.js'; -import { drop } from '../util/drop.std.js'; -import { SocketStatus } from '../types/SocketStatus.std.js'; +} from '../state/ducks/network.dom.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { electronLookup } from '../util/dns.node.ts'; +import { drop } from '../util/drop.std.ts'; +import { SocketStatus } from '../types/SocketStatus.std.ts'; const log = createLogger('networkObserver'); diff --git a/ts/services/notificationProfilesService.preload.ts b/ts/services/notificationProfilesService.preload.ts index 9672ef0a53..6510171435 100644 --- a/ts/services/notificationProfilesService.preload.ts +++ b/ts/services/notificationProfilesService.preload.ts @@ -3,32 +3,32 @@ import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import { isInPast, isMoreRecentThan } from '../util/timestamp.std.js'; -import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.js'; -import { drop } from '../util/drop.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import { isInPast, isMoreRecentThan } from '../util/timestamp.std.ts'; +import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.ts'; +import { drop } from '../util/drop.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; import { findNextProfileEvent, redactNotificationProfileId, -} from '../types/NotificationProfile.std.js'; +} from '../types/NotificationProfile.std.ts'; import { getActiveProfile, getCurrentState, getDeletedProfiles, getOverride, getProfiles, -} from '../state/selectors/notificationProfiles.dom.js'; -import { safeSetTimeout } from '../util/timeout.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { toLogFormat } from '../types/errors.std.js'; +} from '../state/selectors/notificationProfiles.dom.ts'; +import { safeSetTimeout } from '../util/timeout.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { toLogFormat } from '../types/errors.std.ts'; import type { NextProfileEvent, NotificationProfileType, -} from '../types/NotificationProfile.std.js'; +} from '../types/NotificationProfile.std.ts'; const { debounce, isEqual, isNumber } = lodash; diff --git a/ts/services/notifications.preload.ts b/ts/services/notifications.preload.ts index 03ad822da7..e7fbb915ef 100644 --- a/ts/services/notifications.preload.ts +++ b/ts/services/notifications.preload.ts @@ -6,18 +6,18 @@ import lodash from 'lodash'; import EventEmitter from 'node:events'; import { v4 as getGuid } from 'uuid'; -import { Sound, SoundType } from '../util/Sound.std.js'; -import { shouldHideExpiringMessageBody } from '../types/Settings.std.js'; -import { itemStorage as fallbackStorage } from '../textsecure/Storage.preload.js'; -import OS from '../util/os/osMain.node.js'; -import { createLogger } from '../logging/log.std.js'; -import { makeEnumParser } from '../util/enum.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { toLogFormat } from '../types/errors.std.js'; +import { Sound, SoundType } from '../util/Sound.std.ts'; +import { shouldHideExpiringMessageBody } from '../types/Settings.std.ts'; +import { itemStorage as fallbackStorage } from '../textsecure/Storage.preload.ts'; +import OS from '../util/os/osMain.node.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { makeEnumParser } from '../util/enum.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; import type { StorageInterface } from '../types/Storage.d.ts'; -import type { LocalizerType } from '../types/Util.std.js'; -import { NotificationType } from '../types/notifications.std.js'; -import { drop } from '../util/drop.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { NotificationType } from '../types/notifications.std.ts'; +import { drop } from '../util/drop.std.ts'; const { debounce } = lodash; @@ -53,6 +53,13 @@ export type NotificationClickData = Readonly<{ messageId: string | undefined; storyId: string | undefined; }>; +export type WindowsNotificationData = { + avatarPath?: string; + body: string; + heading: string; + token: string; + type: NotificationType; +}; // The keys and values don't match here. This is because the values correspond to old // setting names. In the future, we may wish to migrate these to match. @@ -223,9 +230,6 @@ class NotificationService extends EventEmitter { window.reduxActions?.calling?.cancelPresenting(); } else if (type === NotificationType.IncomingCall) { window.IPC.showWindow(); - } else if (type === NotificationType.MinimizedToTray) { - // Unused since the notification is shown by main process instead - window.IPC.showWindow(); } else { throw missingCaseError(type); } diff --git a/ts/services/ourProfileKey.std.ts b/ts/services/ourProfileKey.std.ts index 792054378a..8983a76f8a 100644 --- a/ts/services/ourProfileKey.std.ts +++ b/ts/services/ourProfileKey.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { assertDev, strictAssert } from '../util/assert.std.js'; -import { createLogger } from '../logging/log.std.js'; +import { assertDev, strictAssert } from '../util/assert.std.ts'; +import { createLogger } from '../logging/log.std.ts'; import type { StorageInterface } from '../types/Storage.d.ts'; diff --git a/ts/services/profiles.preload.ts b/ts/services/profiles.preload.ts index 0775be7155..a1024e80c5 100644 --- a/ts/services/profiles.preload.ts +++ b/ts/services/profiles.preload.ts @@ -9,54 +9,54 @@ import PQueue from 'p-queue'; import { IdentityChange } from '@signalapp/libsignal-client'; import type { ReadonlyDeep } from 'type-fest'; -import type { ConversationModel } from '../models/conversations.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; import type { CapabilitiesType } from '../types/Capabilities.d.ts'; -import type { ProfileType } from '../textsecure/WebAPI.preload.js'; +import type { ProfileType } from '../textsecure/WebAPI.preload.ts'; import { checkAccountExistence, getProfile, getProfileUnauth, -} from '../textsecure/WebAPI.preload.js'; -import { MessageSender } from '../textsecure/SendMessage.preload.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { isRecord } from '../util/isRecord.std.js'; -import { sleep } from '../util/sleep.std.js'; -import { MINUTE, SECOND } from '../util/durations/index.std.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { MessageSender } from '../textsecure/SendMessage.preload.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { isRecord } from '../util/isRecord.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { MINUTE, SECOND } from '../util/durations/index.std.ts'; import { generateProfileKeyCredentialRequest, getClientZkProfileOperations, handleProfileKeyCredential, -} from '../util/zkgroup.node.js'; -import { isMe } from '../util/whatTypeOfConversation.dom.js'; -import { parseBadgesFromServer } from '../badges/parseBadgesFromServer.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { drop } from '../util/drop.std.js'; -import { findRetryAfterTimeFromError } from '../jobs/helpers/findRetryAfterTimeFromError.std.js'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import { SEALED_SENDER } from '../types/SealedSender.std.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { Address } from '../types/Address.std.js'; -import { QualifiedAddress } from '../types/QualifiedAddress.std.js'; +} from '../util/zkgroup.node.ts'; +import { isMe } from '../util/whatTypeOfConversation.dom.ts'; +import { parseBadgesFromServer } from '../badges/parseBadgesFromServer.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { findRetryAfterTimeFromError } from '../jobs/helpers/findRetryAfterTimeFromError.std.ts'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import { SEALED_SENDER } from '../types/SealedSender.std.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { Address } from '../types/Address.std.ts'; +import { QualifiedAddress } from '../types/QualifiedAddress.std.ts'; import { trimForDisplay, verifyAccessKey, decryptProfile, -} from '../Crypto.node.js'; +} from '../Crypto.node.ts'; import type { ConversationLastProfileType } from '../model-types.d.ts'; -import type { GroupSendToken } from '../types/GroupSendEndorsements.std.js'; +import type { GroupSendToken } from '../types/GroupSendEndorsements.std.ts'; import { maybeCreateGroupSendEndorsementState, onFailedToSendWithEndorsements, -} from '../util/groupSendEndorsements.preload.js'; -import { ProfileDecryptError } from '../types/errors.std.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { runMegaphoneCheck } from './megaphone.preload.js'; +} from '../util/groupSendEndorsements.preload.ts'; +import { ProfileDecryptError } from '../types/errors.std.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { runMegaphoneCheck } from './megaphone.preload.ts'; const log = createLogger('profiles'); diff --git a/ts/services/releaseNoteAndMegaphoneFetcher.preload.ts b/ts/services/releaseNoteAndMegaphoneFetcher.preload.ts index ba584734a2..7fdd440569 100644 --- a/ts/services/releaseNoteAndMegaphoneFetcher.preload.ts +++ b/ts/services/releaseNoteAndMegaphoneFetcher.preload.ts @@ -4,27 +4,27 @@ import semver from 'semver'; import lodash from 'lodash'; -import * as durations from '../util/durations/index.std.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import * as Registration from '../util/registration.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { drop } from '../util/drop.std.js'; +import * as durations from '../util/durations/index.std.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import * as Registration from '../util/registration.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { drop } from '../util/drop.std.ts'; import { writeNewAttachmentData, processNewAttachment, writeNewMegaphoneImageFileData, -} from '../util/migrations.preload.js'; -import { strictAssert } from '../util/assert.std.js'; +} from '../util/migrations.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.js'; -import { SeenStatus } from '../MessageSeenStatus.std.js'; -import { saveNewMessageBatcher } from '../util/messageBatcher.preload.js'; -import { generateMessageId } from '../util/generateMessageId.node.js'; -import type { RawBodyRange } from '../types/BodyRange.std.js'; -import { BodyRange } from '../types/BodyRange.std.js'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.ts'; +import { SeenStatus } from '../MessageSeenStatus.std.ts'; +import { saveNewMessageBatcher } from '../util/messageBatcher.preload.ts'; +import { generateMessageId } from '../util/generateMessageId.node.ts'; +import type { RawBodyRange } from '../types/BodyRange.std.ts'; +import { BodyRange } from '../types/BodyRange.std.ts'; import type { ReleaseNotesManifestResponseType, ReleaseNoteResponseType, @@ -36,20 +36,20 @@ import type { getReleaseNotesManifest as doGetReleaseNotesManifest, getReleaseNotesManifestHash as doGetReleaseNotesManifestHash, MegaphoneResponseType, -} from '../textsecure/WebAPI.preload.js'; -import type { WithRequiredProperties } from '../types/Util.std.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { stringToMIMEType } from '../types/MIME.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { type RemoteMegaphoneType } from '../types/Megaphone.std.js'; -import { isCountryPpmCsvBucketEnabled } from '../RemoteConfig.dom.js'; -import type { AciString } from '../types/ServiceId.std.js'; +} from '../textsecure/WebAPI.preload.ts'; +import type { WithRequiredProperties } from '../types/Util.std.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { stringToMIMEType } from '../types/MIME.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { type RemoteMegaphoneType } from '../types/Megaphone.std.ts'; +import { isCountryPpmCsvBucketEnabled } from '../RemoteConfig.dom.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; import { deleteMegaphoneAndRemoveFromRedux, runMegaphoneCheck, -} from './megaphone.preload.js'; +} from './megaphone.preload.ts'; const { last } = lodash; diff --git a/ts/services/retryPlaceholders.std.ts b/ts/services/retryPlaceholders.std.ts index e02fff1d91..e701b6ad63 100644 --- a/ts/services/retryPlaceholders.std.ts +++ b/ts/services/retryPlaceholders.std.ts @@ -3,10 +3,10 @@ import { z } from 'zod'; import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; -import { aciSchema } from '../types/ServiceId.std.js'; -import { safeParseStrict } from '../util/schemas.std.js'; -import { HOUR } from '../util/durations/index.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { aciSchema } from '../types/ServiceId.std.ts'; +import { safeParseStrict } from '../util/schemas.std.ts'; +import { HOUR } from '../util/durations/index.std.ts'; import type { StorageInterface } from '../types/Storage.d.ts'; const { groupBy } = lodash; diff --git a/ts/services/senderCertificate.preload.ts b/ts/services/senderCertificate.preload.ts index 8f3b287e03..c339da1c69 100644 --- a/ts/services/senderCertificate.preload.ts +++ b/ts/services/senderCertificate.preload.ts @@ -3,25 +3,25 @@ import { SenderCertificate } from '@signalapp/libsignal-client'; -import type { SerializedCertificateType } from '../textsecure/OutgoingMessage.preload.js'; +import type { SerializedCertificateType } from '../textsecure/OutgoingMessage.preload.ts'; import { SenderCertificateMode, serializedCertificateSchema, -} from '../textsecure/OutgoingMessage.preload.js'; -import * as Bytes from '../Bytes.std.js'; -import { assertDev } from '../util/assert.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { waitForOnline } from '../util/waitForOnline.dom.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../textsecure/OutgoingMessage.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { waitForOnline } from '../util/waitForOnline.dom.ts'; +import { createLogger } from '../logging/log.std.ts'; import type { StorageInterface } from '../types/Storage.d.ts'; -import * as Errors from '../types/errors.std.js'; +import * as Errors from '../types/errors.std.ts'; import type { isOnline, getSenderCertificate, -} from '../textsecure/WebAPI.preload.js'; -import { safeParseUnknown } from '../util/schemas.std.js'; -import { isInFuture } from '../util/timestamp.std.js'; -import { HOUR } from '../util/durations/constants.std.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { safeParseUnknown } from '../util/schemas.std.ts'; +import { isInFuture } from '../util/timestamp.std.ts'; +import { HOUR } from '../util/durations/constants.std.ts'; const log = createLogger('senderCertificate'); diff --git a/ts/services/singleServePromise.std.ts b/ts/services/singleServePromise.std.ts index f2d819f8de..77b72c4bc3 100644 --- a/ts/services/singleServePromise.std.ts +++ b/ts/services/singleServePromise.std.ts @@ -3,7 +3,7 @@ import { v4 as generateUuid } from 'uuid'; -import type { ExplodePromiseResultType } from '../util/explodePromise.std.js'; +import type { ExplodePromiseResultType } from '../util/explodePromise.std.ts'; export type SingleServePromiseIdString = string & { __single_serve: never }; diff --git a/ts/services/storage.preload.ts b/ts/services/storage.preload.ts index 1d7e1bc3c4..a2f3c6e1b9 100644 --- a/ts/services/storage.preload.ts +++ b/ts/services/storage.preload.ts @@ -4,8 +4,8 @@ import lodash from 'lodash'; import pMap from 'p-map'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import * as Bytes from '../Bytes.std.js'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; import { getRandomBytes, deriveStorageItemKey, @@ -14,7 +14,7 @@ import { decryptProfile, deriveMasterKeyFromGroupV1, deriveStorageServiceKey, -} from '../Crypto.node.js'; +} from '../Crypto.node.ts'; import { mergeAccountRecord, mergeContactRecord, @@ -35,30 +35,30 @@ import { toChatFolderRecord, mergeChatFolderRecord, mergeNotificationProfileRecord, -} from './storageRecordOps.preload.js'; -import type { MergeResultType } from './storageRecordOps.preload.js'; -import { MAX_READ_KEYS } from './storageConstants.std.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { drop } from '../util/drop.std.js'; -import { dropNull } from '../util/dropNull.std.js'; -import * as durations from '../util/durations/index.std.js'; -import { BackOff } from '../util/BackOff.std.js'; -import { storageJobQueue } from '../util/JobQueue.std.js'; -import { sleep } from '../util/sleep.std.js'; -import { isMoreRecentThan, isOlderThan } from '../util/timestamp.std.js'; -import { map, filter } from '../util/iterables.std.js'; -import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.js'; -import { ourProfileKeyService } from './ourProfileKey.std.js'; +} from './storageRecordOps.preload.ts'; +import type { MergeResultType } from './storageRecordOps.preload.ts'; +import { MAX_READ_KEYS } from './storageConstants.std.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import { BackOff } from '../util/BackOff.std.ts'; +import { storageJobQueue } from '../util/JobQueue.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { isMoreRecentThan, isOlderThan } from '../util/timestamp.std.ts'; +import { map, filter } from '../util/iterables.std.ts'; +import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.ts'; +import { ourProfileKeyService } from './ourProfileKey.std.ts'; import { ConversationTypes, isDirectConversation, typeofConversation, -} from '../util/whatTypeOfConversation.dom.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import * as Errors from '../types/errors.std.js'; +} from '../util/whatTypeOfConversation.dom.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import * as Errors from '../types/errors.std.ts'; import type { ExtendedStorageID, RemoteRecord, @@ -69,41 +69,41 @@ import { getStorageCredentials, getStorageManifest, getStorageRecords, -} from '../textsecure/WebAPI.preload.js'; -import { MessageSender } from '../textsecure/SendMessage.preload.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { MessageSender } from '../textsecure/SendMessage.preload.ts'; import type { StoryDistributionWithMembersType, StorageServiceFieldsType, StickerPackType, UninstalledStickerPackType, -} from '../sql/Interface.std.js'; -import { MY_STORY_ID } from '../types/Stories.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { isSignalConversation } from '../util/isSignalConversation.dom.js'; +} from '../sql/Interface.std.ts'; +import { MY_STORY_ID } from '../types/Stories.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { isSignalConversation } from '../util/isSignalConversation.dom.ts'; import { redactExtendedStorageID, redactStorageID, -} from '../util/privacy.node.js'; +} from '../util/privacy.node.ts'; import type { CallLinkRecord, DefunctCallLinkType, PendingCallLinkType, -} from '../types/CallLink.std.js'; +} from '../types/CallLink.std.ts'; import { callLinkFromRecord, getRoomIdFromRootKeyString, -} from '../util/callLinksRingrtc.node.js'; -import { fromPniUuidBytesOrUntaggedString } from '../util/ServiceId.node.js'; -import { isDone as isRegistrationDone } from '../util/registration.preload.js'; -import { callLinkRefreshJobQueue } from '../jobs/callLinkRefreshJobQueue.preload.js'; -import { isMockEnvironment } from '../environment.std.js'; -import { validateConversation } from '../util/validateConversation.dom.js'; -import type { ChatFolder } from '../types/ChatFolder.std.js'; -import { isCurrentAllChatFolder } from '../types/CurrentChatFolders.std.js'; -import type { NotificationProfileType } from '../types/NotificationProfile.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../util/callLinksRingrtc.node.ts'; +import { fromPniUuidBytesOrUntaggedString } from '../util/ServiceId.node.ts'; +import { isDone as isRegistrationDone } from '../util/registration.preload.ts'; +import { callLinkRefreshJobQueue } from '../jobs/callLinkRefreshJobQueue.preload.ts'; +import { isMockEnvironment } from '../environment.std.ts'; +import { validateConversation } from '../util/validateConversation.dom.ts'; +import type { ChatFolder } from '../types/ChatFolder.std.ts'; +import { isCurrentAllChatFolder } from '../types/CurrentChatFolders.std.ts'; +import type { NotificationProfileType } from '../types/NotificationProfile.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; -import { toNumber } from '../util/toNumber.std.js'; +import { toNumber } from '../util/toNumber.std.ts'; const { debounce, isNumber, chunk } = lodash; diff --git a/ts/services/storageRecordOps.preload.ts b/ts/services/storageRecordOps.preload.ts index 721d9a598e..82ab35d17d 100644 --- a/ts/services/storageRecordOps.preload.ts +++ b/ts/services/storageRecordOps.preload.ts @@ -4,87 +4,87 @@ import lodash, { omit, partition, without } from 'lodash'; import { ServiceId } from '@signalapp/libsignal-client'; -import { uuidToBytes, bytesToUuid } from '../util/uuidToBytes.std.js'; -import { deriveMasterKeyFromGroupV1 } from '../Crypto.node.js'; -import * as Bytes from '../Bytes.std.js'; +import { uuidToBytes, bytesToUuid } from '../util/uuidToBytes.std.ts'; +import { deriveMasterKeyFromGroupV1 } from '../Crypto.node.ts'; +import * as Bytes from '../Bytes.std.ts'; import { deriveGroupFields, waitThenMaybeUpdateGroup, waitThenRespondToGroupV2Migration, -} from '../groups.preload.js'; -import { assertDev, strictAssert } from '../util/assert.std.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; +} from '../groups.preload.ts'; +import { assertDev, strictAssert } from '../util/assert.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; import { PhoneNumberSharingMode, parsePhoneNumberSharingMode, -} from '../types/PhoneNumberSharingMode.std.js'; +} from '../types/PhoneNumberSharingMode.std.ts'; import { PhoneNumberDiscoverability, parsePhoneNumberDiscoverability, -} from '../util/phoneNumberDiscoverability.std.js'; -import { arePinnedConversationsEqual } from '../util/arePinnedConversationsEqual.node.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; +} from '../util/phoneNumberDiscoverability.std.ts'; +import { arePinnedConversationsEqual } from '../util/arePinnedConversationsEqual.node.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; import { getSafeLongFromTimestamp, getTimestampFromLong, -} from '../util/timestampLongUtils.std.js'; -import { canHaveUsername } from '../util/getTitle.preload.js'; +} from '../util/timestampLongUtils.std.ts'; +import { canHaveUsername } from '../util/getTitle.preload.ts'; import { get as getUniversalExpireTimer, set as setUniversalExpireTimer, -} from '../util/universalExpireTimer.preload.js'; -import { ourProfileKeyService } from './ourProfileKey.std.js'; +} from '../util/universalExpireTimer.preload.ts'; +import { ourProfileKeyService } from './ourProfileKey.std.ts'; import { isDirectConversation, isGroupV1, isGroupV2, -} from '../util/whatTypeOfConversation.dom.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; -import * as preferredReactionEmoji from '../reactions/preferredReactionEmoji.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { normalizeStoryDistributionId } from '../types/StoryDistributionId.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; +} from '../util/whatTypeOfConversation.dom.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; +import * as preferredReactionEmoji from '../reactions/preferredReactionEmoji.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { normalizeStoryDistributionId } from '../types/StoryDistributionId.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; import { ServiceIdKind, normalizeServiceId, toUntaggedPni, -} from '../types/ServiceId.std.js'; -import { isAciString } from '../util/isAciString.std.js'; -import * as Stickers from '../types/Stickers.preload.js'; +} from '../types/ServiceId.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import * as Stickers from '../types/Stickers.preload.ts'; import type { StoryDistributionWithMembersType, StickerPackInfoType, -} from '../sql/Interface.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { MY_STORY_ID, StorySendMode } from '../types/Stories.std.js'; -import { findAndDeleteOnboardingStoryIfExists } from '../util/findAndDeleteOnboardingStoryIfExists.preload.js'; -import { downloadOnboardingStory } from '../util/downloadOnboardingStory.preload.js'; -import { drop } from '../util/drop.std.js'; -import { redactExtendedStorageID } from '../util/privacy.node.js'; +} from '../sql/Interface.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { MY_STORY_ID, StorySendMode } from '../types/Stories.std.ts'; +import { findAndDeleteOnboardingStoryIfExists } from '../util/findAndDeleteOnboardingStoryIfExists.preload.ts'; +import { downloadOnboardingStory } from '../util/downloadOnboardingStory.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { redactExtendedStorageID } from '../util/privacy.node.ts'; import type { CallLinkRecord, DefunctCallLinkType, PendingCallLinkType, -} from '../types/CallLink.std.js'; +} from '../types/CallLink.std.ts'; import { callLinkFromRecord, fromRootKeyBytes, getRoomIdFromRootKeyString, toRootKeyBytes, -} from '../util/callLinksRingrtc.node.js'; -import { fromAdminKeyBytes, toAdminKeyBytes } from '../util/callLinks.std.js'; -import { isOlderThan } from '../util/timestamp.std.js'; -import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.js'; -import { callLinkRefreshJobQueue } from '../jobs/callLinkRefreshJobQueue.preload.js'; +} from '../util/callLinksRingrtc.node.ts'; +import { fromAdminKeyBytes, toAdminKeyBytes } from '../util/callLinks.std.ts'; +import { isOlderThan } from '../util/timestamp.std.ts'; +import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.ts'; +import { callLinkRefreshJobQueue } from '../jobs/callLinkRefreshJobQueue.preload.ts'; import { generateBackupsSubscriberData, saveBackupsSubscriberData, saveBackupTier, -} from '../util/backupSubscriptionData.preload.js'; +} from '../util/backupSubscriptionData.preload.ts'; import { toAciObject, toPniObject, @@ -92,46 +92,46 @@ import { fromServiceIdBinaryOrString, fromAciUuidBytesOrString, fromPniUuidBytesOrUntaggedString, -} from '../util/ServiceId.node.js'; -import { isProtoBinaryEncodingEnabled } from '../util/isProtoBinaryEncodingEnabled.dom.js'; +} from '../util/ServiceId.node.ts'; +import { isProtoBinaryEncodingEnabled } from '../util/isProtoBinaryEncodingEnabled.dom.ts'; import { getLinkPreviewSetting, getReadReceiptSetting, getSealedSenderIndicatorSetting, getTypingIndicatorSetting, -} from '../util/Settings.preload.js'; -import { MessageRequestResponseSource } from '../types/MessageRequestResponseEvent.std.js'; -import type { ChatFolder, ChatFolderId } from '../types/ChatFolder.std.js'; +} from '../util/Settings.preload.ts'; +import { MessageRequestResponseSource } from '../types/MessageRequestResponseEvent.std.ts'; +import type { ChatFolder, ChatFolderId } from '../types/ChatFolder.std.ts'; import { CHAT_FOLDER_DELETED_POSITION, ChatFolderType, -} from '../types/ChatFolder.std.js'; +} from '../types/ChatFolder.std.ts'; import { deriveGroupID, deriveGroupSecretParams, -} from '../util/zkgroup.node.js'; -import { chatFolderCleanupService } from './expiring/chatFolderCleanupService.preload.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; +} from '../util/zkgroup.node.ts'; +import { chatFolderCleanupService } from './expiring/chatFolderCleanupService.preload.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; import type { NotificationProfileOverride, NotificationProfileType, -} from '../types/NotificationProfile.std.js'; +} from '../types/NotificationProfile.std.ts'; import { DEFAULT_PROFILE_COLOR, fromDayOfWeekArray, redactNotificationProfileId, toDayOfWeekArray, -} from '../types/NotificationProfile.std.js'; +} from '../types/NotificationProfile.std.ts'; import { generateNotificationProfileId, normalizeNotificationProfileId, -} from '../types/NotificationProfile-node.node.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { onHasStoriesDisabledChange } from '../textsecure/WebAPI.preload.js'; -import { keyTransparency } from './keyTransparency.preload.js'; -import { toNumber } from '../util/toNumber.std.js'; -import { MAX_VALUE } from '../util/long.std.js'; -import { isKnownProtoEnumMember } from '../util/isKnownProtoEnumMember.std.js'; +} from '../types/NotificationProfile-node.node.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { onHasStoriesDisabledChange } from '../textsecure/WebAPI.preload.ts'; +import { keyTransparency } from './keyTransparency.preload.ts'; +import { toNumber } from '../util/toNumber.std.ts'; +import { MAX_VALUE } from '../util/long.std.ts'; +import { isKnownProtoEnumMember } from '../util/isKnownProtoEnumMember.std.ts'; const { isEqual } = lodash; diff --git a/ts/services/storyLoader.preload.ts b/ts/services/storyLoader.preload.ts index eadaa2039d..2314ea154e 100644 --- a/ts/services/storyLoader.preload.ts +++ b/ts/services/storyLoader.preload.ts @@ -3,22 +3,22 @@ import lodash from 'lodash'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import type { StoryDataType } from '../state/ducks/stories.preload.js'; -import * as durations from '../util/durations/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { DataReader } from '../sql/Client.preload.js'; -import type { GetAllStoriesResultType } from '../sql/Interface.std.js'; +import type { StoryDataType } from '../state/ducks/stories.preload.ts'; +import * as durations from '../util/durations/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import type { GetAllStoriesResultType } from '../sql/Interface.std.ts'; import { getAttachmentsForMessage, getPropsForAttachment, -} from '../state/selectors/message.preload.js'; -import type { LinkPreviewType } from '../types/message/LinkPreviews.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; -import { SIGNAL_ACI } from '../types/SignalConversation.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../state/selectors/message.preload.ts'; +import type { LinkPreviewType } from '../types/message/LinkPreviews.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; +import { SIGNAL_ACI } from '../types/SignalConversation.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { pick } = lodash; diff --git a/ts/services/tapToViewMessagesDeletionService.preload.ts b/ts/services/tapToViewMessagesDeletionService.preload.ts index ffb9cd54a0..ccfa13a483 100644 --- a/ts/services/tapToViewMessagesDeletionService.preload.ts +++ b/ts/services/tapToViewMessagesDeletionService.preload.ts @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { DataReader } from '../sql/Client.preload.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.js'; -import * as Errors from '../types/errors.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { toBoundedDate } from '../util/timestamp.std.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; -import { eraseMessageContents } from '../util/cleanup.preload.js'; -import { drop } from '../util/drop.std.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { createLogger } from '../logging/log.std.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.ts'; +import * as Errors from '../types/errors.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { toBoundedDate } from '../util/timestamp.std.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; +import { eraseMessageContents } from '../util/cleanup.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; const { debounce } = lodash; diff --git a/ts/services/updateListener.preload.ts b/ts/services/updateListener.preload.ts index 41143b8e9e..cb0f4cbfc0 100644 --- a/ts/services/updateListener.preload.ts +++ b/ts/services/updateListener.preload.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import { ipcRenderer } from 'electron'; -import type { DialogType } from '../types/Dialogs.std.js'; +import type { DialogType } from '../types/Dialogs.std.ts'; import type { UpdateDialogOptionsType, ShowUpdateDialogActionType, -} from '../state/ducks/updates.preload.js'; +} from '../state/ducks/updates.preload.ts'; type UpdatesActions = { showUpdateDialog: ( diff --git a/ts/services/userLoader.dom.ts b/ts/services/userLoader.dom.ts index 5bfdc91373..8a5cc48ef7 100644 --- a/ts/services/userLoader.dom.ts +++ b/ts/services/userLoader.dom.ts @@ -1,12 +1,12 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { strictAssert } from '../util/assert.std.js'; -import { getThemeType } from '../util/getThemeType.dom.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { getThemeType } from '../util/getThemeType.dom.ts'; -import type { MenuOptionsType } from '../types/menu.std.js'; -import type { MainWindowStatsType } from '../windows/context.preload.js'; -import type { ThemeType } from '../types/Util.std.js'; +import type { MenuOptionsType } from '../types/menu.std.ts'; +import type { MainWindowStatsType } from '../windows/context.preload.ts'; +import type { ThemeType } from '../types/Util.std.ts'; let mainWindowStats: MainWindowStatsType | undefined; let menuOptions: MenuOptionsType | undefined; diff --git a/ts/services/username.preload.ts b/ts/services/username.preload.ts index d0631e66f2..5b08f8c34e 100644 --- a/ts/services/username.preload.ts +++ b/ts/services/username.preload.ts @@ -7,35 +7,35 @@ import { ErrorCode, } from '@signalapp/libsignal-client'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { sleep } from '../util/sleep.std.js'; -import { getMinNickname, getMaxNickname } from '../util/Username.dom.js'; -import { bytesToUuid, uuidToBytes } from '../util/uuidToBytes.std.js'; -import type { UsernameReservationType } from '../types/Username.std.js'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import { getMinNickname, getMaxNickname } from '../util/Username.dom.ts'; +import { bytesToUuid, uuidToBytes } from '../util/uuidToBytes.std.ts'; +import type { UsernameReservationType } from '../types/Username.std.ts'; import { ReserveUsernameError, ConfirmUsernameResult, getNickname, getDiscriminator, isCaseChange, -} from '../types/Username.std.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { MessageSender } from '../textsecure/SendMessage.preload.js'; +} from '../types/Username.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { MessageSender } from '../textsecure/SendMessage.preload.ts'; import { reserveUsername as doReserveUsername, replaceUsernameLink, confirmUsername as doConfirmUsername, deleteUsername as doDeleteUsername, resolveUsernameLink, -} from '../textsecure/WebAPI.preload.js'; -import type { ResolveUsernameByLinkOptionsType } from '../textsecure/WebAPI.preload.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { findRetryAfterTimeFromError } from '../jobs/helpers/findRetryAfterTimeFromError.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { storageServiceUploadJob } from './storage.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../textsecure/WebAPI.preload.ts'; +import type { ResolveUsernameByLinkOptionsType } from '../textsecure/WebAPI.preload.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { findRetryAfterTimeFromError } from '../jobs/helpers/findRetryAfterTimeFromError.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { storageServiceUploadJob } from './storage.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('username'); diff --git a/ts/services/usernameIntegrity.preload.ts b/ts/services/usernameIntegrity.preload.ts index b22981323e..9dc21d4168 100644 --- a/ts/services/usernameIntegrity.preload.ts +++ b/ts/services/usernameIntegrity.preload.ts @@ -4,22 +4,22 @@ import pTimeout from 'p-timeout'; import { usernames } from '@signalapp/libsignal-client'; -import { whoami } from '../textsecure/WebAPI.preload.js'; -import { isDone as isRegistrationDone } from '../util/registration.preload.js'; -import { getConversation } from '../util/getConversation.preload.js'; -import { MINUTE, DAY } from '../util/durations/index.std.js'; -import { drop } from '../util/drop.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { storageJobQueue } from '../util/JobQueue.std.js'; -import { getProfile } from '../util/getProfile.preload.js'; -import { isSharingPhoneNumberWithEverybody } from '../util/phoneNumberSharingMode.preload.js'; -import { bytesToUuid } from '../util/uuidToBytes.std.js'; -import { CheckScheduler } from '../util/CheckScheduler.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { runStorageServiceSyncJob } from './storage.preload.js'; -import { writeProfile } from './writeProfile.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { whoami } from '../textsecure/WebAPI.preload.ts'; +import { isDone as isRegistrationDone } from '../util/registration.preload.ts'; +import { getConversation } from '../util/getConversation.preload.ts'; +import { MINUTE, DAY } from '../util/durations/index.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { storageJobQueue } from '../util/JobQueue.std.ts'; +import { getProfile } from '../util/getProfile.preload.ts'; +import { isSharingPhoneNumberWithEverybody } from '../util/phoneNumberSharingMode.preload.ts'; +import { bytesToUuid } from '../util/uuidToBytes.std.ts'; +import { CheckScheduler } from '../util/CheckScheduler.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { runStorageServiceSyncJob } from './storage.preload.ts'; +import { writeProfile } from './writeProfile.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('usernameIntegrity'); diff --git a/ts/services/writeProfile.preload.ts b/ts/services/writeProfile.preload.ts index 41d402ce16..4d3e2aea19 100644 --- a/ts/services/writeProfile.preload.ts +++ b/ts/services/writeProfile.preload.ts @@ -1,28 +1,28 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataWriter } from '../sql/Client.preload.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { putProfile, uploadAvatar } from '../textsecure/WebAPI.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { computeHash } from '../Crypto.node.js'; -import { encryptProfileData } from '../util/encryptProfileData.preload.js'; -import { getProfile } from '../util/getProfile.preload.js'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import { strictAssert } from '../util/assert.std.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { putProfile, uploadAvatar } from '../textsecure/WebAPI.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { computeHash } from '../Crypto.node.ts'; +import { encryptProfileData } from '../util/encryptProfileData.preload.ts'; +import { getProfile } from '../util/getProfile.preload.ts'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; import { writeNewAttachmentData, maybeDeleteAttachmentFile, -} from '../util/migrations.preload.js'; -import { imagePathToBytes } from '../util/imagePathToBytes.dom.js'; -import { getLocalAvatarUrl } from '../util/avatarUtils.preload.js'; +} from '../util/migrations.preload.ts'; +import { imagePathToBytes } from '../util/imagePathToBytes.dom.ts'; +import { getLocalAvatarUrl } from '../util/avatarUtils.preload.ts'; import type { AvatarUpdateOptionsType, AvatarUpdateType, -} from '../types/Avatar.std.js'; -import { MessageSender } from '../textsecure/SendMessage.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../types/Avatar.std.ts'; +import { MessageSender } from '../textsecure/SendMessage.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('writeProfile'); diff --git a/ts/setAppLoadingScreenMessage.dom.ts b/ts/setAppLoadingScreenMessage.dom.ts index f22d6715aa..db2fd35178 100644 --- a/ts/setAppLoadingScreenMessage.dom.ts +++ b/ts/setAppLoadingScreenMessage.dom.ts @@ -1,7 +1,7 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LocalizerType } from './types/Util.std.js'; +import type { LocalizerType } from './types/Util.std.ts'; const DISPLAY_THRESHOLD = 3000; // milliseconds const SELECTOR = '.app-loading-screen .message'; diff --git a/ts/shims/deleteAllData.preload.ts b/ts/shims/deleteAllData.preload.ts index d4831db496..184ec29cb2 100644 --- a/ts/shims/deleteAllData.preload.ts +++ b/ts/shims/deleteAllData.preload.ts @@ -1,11 +1,11 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { deleteAllLogs } from '../util/deleteAllLogs.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { unlink } from '../textsecure/WebAPI.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { deleteAllLogs } from '../util/deleteAllLogs.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { unlink } from '../textsecure/WebAPI.preload.ts'; const log = createLogger('deleteAllData'); diff --git a/ts/shims/dispatchItemsMiddleware.preload.ts b/ts/shims/dispatchItemsMiddleware.preload.ts index 8cb893b837..48ad22d686 100644 --- a/ts/shims/dispatchItemsMiddleware.preload.ts +++ b/ts/shims/dispatchItemsMiddleware.preload.ts @@ -8,7 +8,7 @@ import { COLORS_CHANGED, COLOR_SELECTED, SET_VOICE_NOTE_PLAYBACK_RATE, -} from '../state/ducks/conversations.preload.js'; +} from '../state/ducks/conversations.preload.ts'; export const dispatchItemsMiddleware: Middleware = ({ getState }) => diff --git a/ts/shims/events.dom.ts b/ts/shims/events.dom.ts index 9f013eb9b3..fe9905933f 100644 --- a/ts/shims/events.dom.ts +++ b/ts/shims/events.dom.ts @@ -1,8 +1,8 @@ // Copyright 2019 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; +import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; // Matching Whisper.events.trigger API // oxlint-disable-next-line typescript/no-explicit-any diff --git a/ts/shims/getUserTheme.dom.ts b/ts/shims/getUserTheme.dom.ts index 5bb99d8a11..b229163de8 100644 --- a/ts/shims/getUserTheme.dom.ts +++ b/ts/shims/getUserTheme.dom.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ThemeType } from '../types/Util.std.js'; -import { getTheme } from '../state/selectors/user.std.js'; +import type { ThemeType } from '../types/Util.std.ts'; +import { getTheme } from '../state/selectors/user.std.ts'; export function getUserTheme(): ThemeType { return getTheme(window.reduxStore.getState()); diff --git a/ts/shims/reloadSelectedConversation.dom.ts b/ts/shims/reloadSelectedConversation.dom.ts index 75b0bbe461..1fbbcd4471 100644 --- a/ts/shims/reloadSelectedConversation.dom.ts +++ b/ts/shims/reloadSelectedConversation.dom.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getSelectedConversationId } from '../state/selectors/nav.std.js'; +import { getSelectedConversationId } from '../state/selectors/nav.std.ts'; export function reloadSelectedConversation(): void { const selectedConversationId = getSelectedConversationId( diff --git a/ts/shims/renderClearingDataView.preload.tsx b/ts/shims/renderClearingDataView.preload.tsx index e838c43a33..eeabff259a 100644 --- a/ts/shims/renderClearingDataView.preload.tsx +++ b/ts/shims/renderClearingDataView.preload.tsx @@ -4,11 +4,11 @@ import React, { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; -import { ClearingData } from '../components/ClearingData.dom.js'; -import { strictAssert } from '../util/assert.std.js'; -import { deleteAllData } from './deleteAllData.preload.js'; -import { FunDefaultEnglishEmojiLocalizationProvider } from '../components/fun/FunEmojiLocalizationProvider.dom.js'; -import { AxoProvider } from '../axo/AxoProvider.dom.js'; +import { ClearingData } from '../components/ClearingData.dom.tsx'; +import { strictAssert } from '../util/assert.std.ts'; +import { deleteAllData } from './deleteAllData.preload.ts'; +import { FunDefaultEnglishEmojiLocalizationProvider } from '../components/fun/FunEmojiLocalizationProvider.dom.tsx'; +import { AxoProvider } from '../axo/AxoProvider.dom.tsx'; export function renderClearingDataView(): void { const appContainer = document.getElementById('app-container'); diff --git a/ts/shims/storage.preload.ts b/ts/shims/storage.preload.ts index 2f1f9d1cfd..f5f7649577 100644 --- a/ts/shims/storage.preload.ts +++ b/ts/shims/storage.preload.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { StorageAccessType } from '../types/Storage.d.ts'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; // Matching storage.put API export async function put( diff --git a/ts/shims/textsecure.preload.ts b/ts/shims/textsecure.preload.ts index d13ff3203f..55ba362e6e 100644 --- a/ts/shims/textsecure.preload.ts +++ b/ts/shims/textsecure.preload.ts @@ -1,10 +1,10 @@ // Copyright 2019 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { MessageSender } from '../textsecure/SendMessage.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { MessageSender } from '../textsecure/SendMessage.preload.ts'; const log = createLogger('textsecure'); diff --git a/ts/shims/themeChanged.dom.ts b/ts/shims/themeChanged.dom.ts index 5496123a1c..5428286c5c 100644 --- a/ts/shims/themeChanged.dom.ts +++ b/ts/shims/themeChanged.dom.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getThemeType } from '../util/getThemeType.dom.js'; +import { getThemeType } from '../util/getThemeType.dom.ts'; export async function themeChanged(): Promise { if (window.reduxActions && window.reduxActions.user) { diff --git a/ts/signal.preload.ts b/ts/signal.preload.ts index 2fed91d80d..a0faa3aca5 100644 --- a/ts/signal.preload.ts +++ b/ts/signal.preload.ts @@ -3,15 +3,15 @@ // The idea with this file is to make it webpackable for the style guide -import OS from './util/os/osMain.node.js'; -import { isProduction } from './util/version.std.js'; -import { DataReader, DataWriter } from './sql/Client.preload.js'; +import OS from './util/os/osMain.node.ts'; +import { isProduction } from './util/version.std.ts'; +import { DataReader, DataWriter } from './sql/Client.preload.ts'; // Processes / Services -import { calling } from './services/calling.preload.js'; -import * as storage from './services/storage.preload.js'; -import { backupsService } from './services/backups/index.preload.js'; -import * as donations from './services/donations.preload.js'; +import { calling } from './services/calling.preload.ts'; +import * as storage from './services/storage.preload.ts'; +import { backupsService } from './services/backups/index.preload.ts'; +import * as donations from './services/donations.preload.ts'; import type { SignalCoreType } from './window.d.ts'; diff --git a/ts/sql/Client.preload.ts b/ts/sql/Client.preload.ts index 3f5b58f233..d707db5abb 100644 --- a/ts/sql/Client.preload.ts +++ b/ts/sql/Client.preload.ts @@ -9,31 +9,31 @@ import type { ReadonlyDeep } from 'type-fest'; // Note: nothing imported here can come back and require Client.ts, and that includes // their imports too. That circularity causes problems. Anything that would do that needs // to be passed in, like cleanupMessages below. -import * as Bytes from '../Bytes.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; +import * as Bytes from '../Bytes.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; -import { createBatcher } from '../util/batcher.std.js'; -import { assertDev, softAssert } from '../util/assert.std.js'; -import { mapObjectWithSpec } from '../util/mapObjectWithSpec.std.js'; -import { cleanDataForIpc } from './cleanDataForIpc.std.js'; -import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.js'; -import { isValidUuid, isValidUuidV7 } from '../util/isValidUuid.std.js'; -import { formatJobForInsert } from '../jobs/formatJobForInsert.std.js'; +import { createBatcher } from '../util/batcher.std.ts'; +import { assertDev, softAssert } from '../util/assert.std.ts'; +import { mapObjectWithSpec } from '../util/mapObjectWithSpec.std.ts'; +import { cleanDataForIpc } from './cleanDataForIpc.std.ts'; +import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.ts'; +import { isValidUuid, isValidUuidV7 } from '../util/isValidUuid.std.ts'; +import { formatJobForInsert } from '../jobs/formatJobForInsert.std.ts'; import { AccessType, ipcInvoke, doShutdown, removeDB, -} from './channels.preload.js'; -import { getMessageIdForLogging } from '../util/idForLogging.preload.js'; -import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.js'; -import { generateSnippetAroundMention } from '../util/search.std.js'; -import { drop } from '../util/drop.std.js'; +} from './channels.preload.ts'; +import { getMessageIdForLogging } from '../util/idForLogging.preload.ts'; +import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.ts'; +import { generateSnippetAroundMention } from '../util/search.std.ts'; +import { drop } from '../util/drop.std.ts'; -import type { ObjectMappingSpecType } from '../util/mapObjectWithSpec.std.js'; -import type { AciString, ServiceIdString } from '../types/ServiceId.std.js'; -import type { StoredJob } from '../jobs/types.std.js'; +import type { ObjectMappingSpecType } from '../util/mapObjectWithSpec.std.ts'; +import type { AciString, ServiceIdString } from '../types/ServiceId.std.ts'; +import type { StoredJob } from '../jobs/types.std.ts'; import type { ClientInterfaceWrap, AdjacentMessagesByConversationOptionsType, @@ -65,14 +65,14 @@ import type { ClientOnlyReadableInterface, ClientOnlyWritableInterface, RemoveMessageOptions, -} from './Interface.std.js'; -import { AttachmentDownloadSource } from './Interface.std.js'; +} from './Interface.std.ts'; +import { AttachmentDownloadSource } from './Interface.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { AttachmentDownloadJobType } from '../types/AttachmentDownload.std.js'; +import type { AttachmentDownloadJobType } from '../types/AttachmentDownload.std.ts'; import { throttledUpdateBackupMediaDownloadProgress, updateBackupMediaDownloadProgress, -} from '../util/updateBackupMediaDownloadProgress.preload.js'; +} from '../util/updateBackupMediaDownloadProgress.preload.ts'; const { groupBy, isTypedArray, last, map, omit } = lodash; diff --git a/ts/sql/Interface.std.ts b/ts/sql/Interface.std.ts index ce074468df..560b4871b3 100644 --- a/ts/sql/Interface.std.ts +++ b/ts/sql/Interface.std.ts @@ -4,81 +4,81 @@ import type { Database, RowType } from '@signalapp/sqlcipher'; import type { ReadonlyDeep } from 'type-fest'; -import { strictAssert } from '../util/assert.std.js'; +import { strictAssert } from '../util/assert.std.ts'; import type { ConversationAttributesType, MessageAttributesType, SenderKeyInfoType, } from '../model-types.d.ts'; -import type { StoredJob } from '../jobs/types.std.js'; +import type { StoredJob } from '../jobs/types.std.ts'; import type { ReactionType, ReactionReadStatus, -} from '../types/Reactions.std.js'; +} from '../types/Reactions.std.ts'; import type { ConversationColorType, CustomColorType, -} from '../types/Colors.std.js'; +} from '../types/Colors.std.ts'; import type { StorageAccessType } from '../types/Storage.d.ts'; -import type { BytesToStrings } from '../types/Util.std.js'; -import type { QualifiedAddressStringType } from '../types/QualifiedAddress.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; +import type { BytesToStrings } from '../types/Util.std.ts'; +import type { QualifiedAddressStringType } from '../types/QualifiedAddress.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; import type { AciString, PniString, ServiceIdString, -} from '../types/ServiceId.std.js'; -import type { BadgeType } from '../badges/types.std.js'; -import type { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import type { RawBodyRange } from '../types/BodyRange.std.js'; -import type { MessageTimestamps } from '../state/ducks/conversations.preload.js'; +} from '../types/ServiceId.std.ts'; +import type { BadgeType } from '../badges/types.std.ts'; +import type { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import type { RawBodyRange } from '../types/BodyRange.std.ts'; +import type { MessageTimestamps } from '../state/ducks/conversations.preload.ts'; import type { CallHistoryDetails, CallHistoryFilter, CallHistoryGroup, CallHistoryPagination, CallLogEventTarget, -} from '../types/CallDisposition.std.js'; +} from '../types/CallDisposition.std.ts'; import type { CallLinkRecord, CallLinkStateType, CallLinkType, DefunctCallLinkType, -} from '../types/CallLink.std.js'; +} from '../types/CallLink.std.ts'; import type { AttachmentDownloadJobType, MessageAttachmentType, -} from '../types/AttachmentDownload.std.js'; +} from '../types/AttachmentDownload.std.ts'; import type { GroupSendEndorsementsData, GroupSendMemberEndorsementRecord, -} from '../types/GroupSendEndorsements.std.js'; -import type { SyncTaskType } from '../util/syncTasks.preload.js'; -import type { AttachmentBackupJobType } from '../types/AttachmentBackup.std.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { MediaItemMessageType } from '../types/MediaItem.std.js'; -import type { LinkPreviewType } from '../types/message/LinkPreviews.std.js'; -import type { EmbeddedContactType } from '../types/EmbeddedContact.std.js'; -import type { GifType } from '../components/fun/panels/FunPanelGifs.dom.js'; -import type { NotificationProfileType } from '../types/NotificationProfile.std.js'; -import type { DonationReceipt } from '../types/Donations.std.js'; -import type { InsertOrUpdateCallLinkFromSyncResult } from './server/callLinks.node.js'; -import type { ChatFolderId, ChatFolder } from '../types/ChatFolder.std.js'; -import type { CurrentChatFolder } from '../types/CurrentChatFolders.std.js'; +} from '../types/GroupSendEndorsements.std.ts'; +import type { SyncTaskType } from '../util/syncTasks.preload.ts'; +import type { AttachmentBackupJobType } from '../types/AttachmentBackup.std.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { MediaItemMessageType } from '../types/MediaItem.std.ts'; +import type { LinkPreviewType } from '../types/message/LinkPreviews.std.ts'; +import type { EmbeddedContactType } from '../types/EmbeddedContact.std.ts'; +import type { GifType } from '../components/fun/panels/FunPanelGifs.dom.tsx'; +import type { NotificationProfileType } from '../types/NotificationProfile.std.ts'; +import type { DonationReceipt } from '../types/Donations.std.ts'; +import type { InsertOrUpdateCallLinkFromSyncResult } from './server/callLinks.node.ts'; +import type { ChatFolderId, ChatFolder } from '../types/ChatFolder.std.ts'; +import type { CurrentChatFolder } from '../types/CurrentChatFolders.std.ts'; import type { PinnedMessage, PinnedMessageId, PinnedMessageParams, PinnedMessagePreloadData, -} from '../types/PinnedMessage.std.js'; -import type { AppendPinnedMessageResult } from './server/pinnedMessages.std.js'; +} from '../types/PinnedMessage.std.ts'; +import type { AppendPinnedMessageResult } from './server/pinnedMessages.std.ts'; import type { RemoteMegaphoneId, RemoteMegaphoneType, -} from '../types/Megaphone.std.js'; -import { sqlFragment, sqlId, sqlJoin } from './util.std.js'; -import type { MIMEType } from '../types/MIME.std.js'; +} from '../types/Megaphone.std.ts'; +import { sqlFragment, sqlId, sqlJoin } from './util.std.ts'; +import type { MIMEType } from '../types/MIME.std.ts'; export type ReadableDB = Database & { __readable_db: never }; export type WritableDB = ReadableDB & { __writable_db: never }; diff --git a/ts/sql/Server.node.ts b/ts/sql/Server.node.ts index 55da1ce869..fba6d67398 100644 --- a/ts/sql/Server.node.ts +++ b/ts/sql/Server.node.ts @@ -13,41 +13,41 @@ import { z } from 'zod'; import type { Dictionary } from 'lodash'; import lodash from 'lodash'; -import { parseBadgeCategory } from '../badges/BadgeCategory.std.js'; +import { parseBadgeCategory } from '../badges/BadgeCategory.std.ts'; import { parseBadgeImageTheme, type BadgeImageTheme, -} from '../badges/BadgeImageTheme.std.js'; -import type { BadgeImageType, BadgeType } from '../badges/types.std.js'; -import type { StoredJob } from '../jobs/types.std.js'; -import { formatCountForLogging } from '../logging/formatCountForLogging.std.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; +} from '../badges/BadgeImageTheme.std.ts'; +import type { BadgeImageType, BadgeType } from '../badges/types.std.ts'; +import type { StoredJob } from '../jobs/types.std.ts'; +import { formatCountForLogging } from '../logging/formatCountForLogging.std.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; import type { GroupV2MemberType, MessageAttributesType, } from '../model-types.d.ts'; -import type { ReactionType } from '../types/Reactions.std.js'; -import { ReactionReadStatus } from '../types/Reactions.std.js'; -import type { AciString, ServiceIdString } from '../types/ServiceId.std.js'; -import { isServiceIdString } from '../types/ServiceId.std.js'; -import { STORAGE_KEYS_TO_PRESERVE_AFTER_UNLINK } from '../types/StorageKeys.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import * as Errors from '../types/errors.std.js'; -import { assertDev, strictAssert } from '../util/assert.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { combineNames } from '../util/combineNames.std.js'; -import { consoleLogger } from '../util/consoleLogger.std.js'; +import type { ReactionType } from '../types/Reactions.std.ts'; +import { ReactionReadStatus } from '../types/Reactions.std.ts'; +import type { AciString, ServiceIdString } from '../types/ServiceId.std.ts'; +import { isServiceIdString } from '../types/ServiceId.std.ts'; +import { STORAGE_KEYS_TO_PRESERVE_AFTER_UNLINK } from '../types/StorageKeys.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { assertDev, strictAssert } from '../util/assert.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { combineNames } from '../util/combineNames.std.ts'; +import { consoleLogger } from '../util/consoleLogger.std.ts'; import { dropNull, shallowConvertUndefinedToNull, type ShallowNullToUndefined, type ShallowUndefinedToNull, -} from '../util/dropNull.std.js'; -import { isNormalNumber } from '../util/isNormalNumber.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { parseIntOrThrow } from '../util/parseIntOrThrow.std.js'; -import { updateSchema } from './migrations/index.node.js'; -import type { JSONRows, QueryTemplate, QueryFragment } from './util.std.js'; +} from '../util/dropNull.std.ts'; +import { isNormalNumber } from '../util/isNormalNumber.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { parseIntOrThrow } from '../util/parseIntOrThrow.std.ts'; +import { updateSchema } from './migrations/index.node.ts'; +import type { JSONRows, QueryTemplate, QueryFragment } from './util.std.ts'; import { batchMultiVarQuery, bulkAdd, @@ -68,33 +68,33 @@ import { sqlJoin, convertOptionalBooleanToInteger, sqlId, -} from './util.std.js'; +} from './util.std.ts'; import { hydrateMessage, hydrateMessages, convertAttachmentDBFieldsToAttachmentType, getAttachmentReferencesForMessages, ROOT_MESSAGE_ATTACHMENT_EDIT_HISTORY_INDEX, -} from './hydration.std.js'; +} from './hydration.std.ts'; -import { SignalService } from '../protobuf/index.std.js'; -import { SeenStatus } from '../MessageSeenStatus.std.js'; +import { SignalService } from '../protobuf/index.std.ts'; +import { SeenStatus } from '../MessageSeenStatus.std.ts'; import { attachmentBackupJobSchema, type AttachmentBackupJobType, -} from '../types/AttachmentBackup.std.js'; +} from '../types/AttachmentBackup.std.ts'; import { attachmentDownloadJobSchema, type MessageAttachmentType, type AttachmentDownloadJobType, -} from '../types/AttachmentDownload.std.js'; +} from '../types/AttachmentDownload.std.ts'; import type { CallHistoryDetails, CallHistoryFilter, CallHistoryGroup, CallHistoryPagination, CallLogEventTarget, -} from '../types/CallDisposition.std.js'; +} from '../types/CallDisposition.std.ts'; import { CallDirection, CallHistoryFilterStatus, @@ -105,21 +105,21 @@ import { GroupCallStatus, callHistoryDetailsSchema, callHistoryGroupSchema, -} from '../types/CallDisposition.std.js'; -import { redactGenericText } from '../util/privacy.node.js'; +} from '../types/CallDisposition.std.ts'; +import { redactGenericText } from '../util/privacy.node.ts'; import { parseLoose, parseStrict, parseUnknown, safeParseUnknown, -} from '../util/schemas.std.js'; +} from '../util/schemas.std.ts'; import { SNIPPET_LEFT_PLACEHOLDER, SNIPPET_RIGHT_PLACEHOLDER, SNIPPET_TRUNCATION_PLACEHOLDER, -} from '../util/search.std.js'; -import type { SyncTaskType } from '../util/syncTasks.preload.js'; -import { MAX_SYNC_TASK_ATTEMPTS } from '../util/syncTasks.types.std.js'; +} from '../util/search.std.ts'; +import type { SyncTaskType } from '../util/syncTasks.preload.ts'; +import { MAX_SYNC_TASK_ATTEMPTS } from '../util/syncTasks.types.std.ts'; import type { AdjacentMessagesByConversationOptionsType, BackupCdnMediaObjectType, @@ -199,14 +199,14 @@ import type { MaybeStaleCallHistory, ExistingAttachmentData, ExistingAttachmentUploadData, -} from './Interface.std.js'; +} from './Interface.std.ts'; import { AttachmentDownloadSource, MESSAGE_COLUMNS, MESSAGE_COLUMNS_FRAGMENT, MESSAGE_ATTACHMENT_COLUMNS, MESSAGE_NON_PRIMARY_KEY_COLUMNS, -} from './Interface.std.js'; +} from './Interface.std.ts'; import { _removeAllCallLinks, beginDeleteAllCallLinks, @@ -230,21 +230,21 @@ import { updateCallLink, updateCallLinkState, updateDefunctCallLink, -} from './server/callLinks.node.js'; +} from './server/callLinks.node.ts'; import { _deleteAllDonationReceipts, createDonationReceipt, deleteDonationReceiptById, getAllDonationReceipts, getDonationReceiptById, -} from './server/donationReceipts.std.js'; +} from './server/donationReceipts.std.ts'; import { deleteAllEndorsementsForGroup, getGroupSendCombinedEndorsementExpiration, getGroupSendEndorsementsData, getGroupSendMemberEndorsement, replaceAllEndorsementsForGroup, -} from './server/groupSendEndorsements.std.js'; +} from './server/groupSendEndorsements.std.ts'; import { getAllChatFolders, getCurrentChatFolders, @@ -260,7 +260,7 @@ import { updateChatFolderPositions, updateChatFolderDeletedAtTimestampMsFromSync, deleteExpiredChatFolders, -} from './server/chatFolders.std.js'; +} from './server/chatFolders.std.ts'; import { getAllPinnedMessages, getPinnedMessagesPreloadDataForConversation, @@ -268,7 +268,7 @@ import { appendPinnedMessage, deletePinnedMessageByMessageId, deleteAllExpiredPinnedMessagesBefore, -} from './server/pinnedMessages.std.js'; +} from './server/pinnedMessages.std.ts'; import { getAllMegaphones, getAllMegaphoneIds, @@ -280,29 +280,29 @@ import { internalDeleteAllMegaphones, getAllMegaphoneImageLocalPaths, hasMegaphone, -} from './server/megaphones.std.js'; +} from './server/megaphones.std.ts'; import { getAllKTAcis, getKTAccountData, setKTAccountData, removeAllKTAccountData, -} from './server/keyTransparency.std.js'; -import { INITIAL_EXPIRE_TIMER_VERSION } from '../util/expirationTimer.std.js'; -import type { GifType } from '../components/fun/panels/FunPanelGifs.dom.js'; -import type { NotificationProfileType } from '../types/NotificationProfile.std.js'; -import * as durations from '../util/durations/index.std.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import { isFile, isVisualMedia } from '../util/Attachment.std.js'; -import { generateMessageId } from '../util/generateMessageId.node.js'; +} from './server/keyTransparency.std.ts'; +import { INITIAL_EXPIRE_TIMER_VERSION } from '../util/expirationTimer.std.ts'; +import type { GifType } from '../components/fun/panels/FunPanelGifs.dom.tsx'; +import type { NotificationProfileType } from '../types/NotificationProfile.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import { isFile, isVisualMedia } from '../util/Attachment.std.ts'; +import { generateMessageId } from '../util/generateMessageId.node.ts'; import type { ConversationColorType, CustomColorType, -} from '../types/Colors.std.js'; -import { sqlLogger } from './sqlLogger.node.js'; -import { permissiveMessageAttachmentSchema } from './server/messageAttachments.std.js'; -import { getFilePathsReferencedByMessage } from '../util/messageFilePaths.std.js'; -import { createMessagesOnInsertTrigger } from './migrations/1500-search-polls.std.js'; -import { isValidPlaintextHash } from '../types/Crypto.std.js'; +} from '../types/Colors.std.ts'; +import { sqlLogger } from './sqlLogger.node.ts'; +import { permissiveMessageAttachmentSchema } from './server/messageAttachments.std.ts'; +import { getFilePathsReferencedByMessage } from '../util/messageFilePaths.std.ts'; +import { createMessagesOnInsertTrigger } from './migrations/1500-search-polls.std.ts'; +import { isValidPlaintextHash } from '../types/Crypto.std.ts'; const { forEach, diff --git a/ts/sql/channels.preload.ts b/ts/sql/channels.preload.ts index 5e09ea4476..e9eee969ff 100644 --- a/ts/sql/channels.preload.ts +++ b/ts/sql/channels.preload.ts @@ -3,10 +3,10 @@ import { ipcRenderer } from 'electron'; import { serialize, deserialize } from 'node:v8'; -import { createLogger } from '../logging/log.std.js'; -import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; const log = createLogger('channels'); diff --git a/ts/sql/cleanDataForIpc.std.ts b/ts/sql/cleanDataForIpc.std.ts index e429cb2a46..abbd282547 100644 --- a/ts/sql/cleanDataForIpc.std.ts +++ b/ts/sql/cleanDataForIpc.std.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; -import { isIterable } from '../util/iterables.std.js'; +import { isIterable } from '../util/iterables.std.ts'; -import { toNumber } from '../util/toNumber.std.js'; -import { isNonSharedUint8Array } from '../Bytes.std.js'; +import { toNumber } from '../util/toNumber.std.ts'; +import { isNonSharedUint8Array } from '../Bytes.std.ts'; const { isPlainObject } = lodash; diff --git a/ts/sql/hydration.std.ts b/ts/sql/hydration.std.ts index 4073aa3e37..1c17043060 100644 --- a/ts/sql/hydration.std.ts +++ b/ts/sql/hydration.std.ts @@ -2,34 +2,34 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import type { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import type { SeenStatus } from '../MessageSeenStatus.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { dropNull, shallowDropNull } from '../util/dropNull.std.js'; +import type { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import type { SeenStatus } from '../MessageSeenStatus.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { dropNull, shallowDropNull } from '../util/dropNull.std.ts'; import type { MessageTypeUnhydrated, MessageType, MESSAGE_COLUMNS, ReadableDB, MessageAttachmentDBType, -} from './Interface.std.js'; +} from './Interface.std.ts'; import { batchMultiVarQuery, convertOptionalIntegerToBoolean, jsonToObject, sql, sqlJoin, -} from './util.std.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; +} from './util.std.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; import { APPLICATION_OCTET_STREAM, IMAGE_JPEG, IMAGE_PNG, stringToMIMEType, -} from '../types/MIME.std.js'; -import { strictAssert } from '../util/assert.std.js'; +} from '../types/MIME.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; const { groupBy } = lodash; diff --git a/ts/sql/main.main.ts b/ts/sql/main.main.ts index 5fc637c022..1f42f60314 100644 --- a/ts/sql/main.main.ts +++ b/ts/sql/main.main.ts @@ -6,16 +6,16 @@ import { Worker } from 'node:worker_threads'; import { format } from 'node:util'; import { app } from 'electron'; -import { strictAssert } from '../util/assert.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { getAppRootDir } from '../util/appRootDir.main.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import * as Errors from '../types/errors.std.js'; -import { SqliteErrorKind } from './errors.std.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { getAppRootDir } from '../util/appRootDir.main.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { SqliteErrorKind } from './errors.std.ts'; import type { ServerReadableDirectInterface, ServerWritableDirectInterface, -} from './Interface.std.js'; +} from './Interface.std.ts'; const MIN_TRACE_DURATION = 40; @@ -552,7 +552,7 @@ export class MainSQL { } #createWorker(): CreateWorkerResultType { - const scriptPath = join(getAppRootDir(), 'ts', 'sql', 'mainWorker.node.js'); + const scriptPath = join(getAppRootDir(), 'bundles', 'workers', 'sql.js'); const worker = new Worker(scriptPath); diff --git a/ts/sql/mainWorker.node.ts b/ts/sql/mainWorker.node.ts index 85e0fecd0b..414631c141 100644 --- a/ts/sql/mainWorker.node.ts +++ b/ts/sql/mainWorker.node.ts @@ -7,11 +7,11 @@ import { serialize, deserialize } from 'node:v8'; import type { WrappedWorkerRequest, WrappedWorkerResponse, -} from './main.main.js'; -import type { WritableDB } from './Interface.std.js'; -import { initialize, DataReader, DataWriter, removeDB } from './Server.node.js'; -import { SqliteErrorKind, parseSqliteError } from './errors.std.js'; -import { sqlLogger as logger } from './sqlLogger.node.js'; +} from './main.main.ts'; +import type { WritableDB } from './Interface.std.ts'; +import { initialize, DataReader, DataWriter, removeDB } from './Server.node.ts'; +import { SqliteErrorKind, parseSqliteError } from './errors.std.ts'; +import { sqlLogger as logger } from './sqlLogger.node.ts'; if (!parentPort) { throw new Error('Must run as a worker thread'); diff --git a/ts/sql/migrations/1000-mark-unread-call-history-messages-as-unseen.std.ts b/ts/sql/migrations/1000-mark-unread-call-history-messages-as-unseen.std.ts index 55f0b82286..444c897d66 100644 --- a/ts/sql/migrations/1000-mark-unread-call-history-messages-as-unseen.std.ts +++ b/ts/sql/migrations/1000-mark-unread-call-history-messages-as-unseen.std.ts @@ -3,10 +3,10 @@ import type { Database } from '@signalapp/sqlcipher'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { sql, sqlConstant } from '../util.std.js'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { sql, sqlConstant } from '../util.std.ts'; const READ_STATUS_UNREAD = sqlConstant(ReadStatus.Unread); const READ_STATUS_READ = sqlConstant(ReadStatus.Read); diff --git a/ts/sql/migrations/1010-call-links-table.std.ts b/ts/sql/migrations/1010-call-links-table.std.ts index 56aa4643c9..da06069112 100644 --- a/ts/sql/migrations/1010-call-links-table.std.ts +++ b/ts/sql/migrations/1010-call-links-table.std.ts @@ -3,7 +3,7 @@ import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1010(db: Database): void { const [createTable] = sql` diff --git a/ts/sql/migrations/1020-self-merges.std.ts b/ts/sql/migrations/1020-self-merges.std.ts index 1edd13a8eb..033125a1d4 100644 --- a/ts/sql/migrations/1020-self-merges.std.ts +++ b/ts/sql/migrations/1020-self-merges.std.ts @@ -1,10 +1,10 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { sql } from '../util.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { getOurUuid } from './41-uuid-keys.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { sql } from '../util.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { getOurUuid } from './41-uuid-keys.std.ts'; export default function updateToSchemaVersion1020( db: WritableDB, diff --git a/ts/sql/migrations/1030-unblock-event.std.ts b/ts/sql/migrations/1030-unblock-event.std.ts index 334d103523..ea767218ef 100644 --- a/ts/sql/migrations/1030-unblock-event.std.ts +++ b/ts/sql/migrations/1030-unblock-event.std.ts @@ -3,7 +3,7 @@ import type { Database } from '@signalapp/sqlcipher'; -import { sql, sqlFragment } from '../util.std.js'; +import { sql, sqlFragment } from '../util.std.ts'; export default function updateToSchemaVersion1030(db: Database): void { // From migration 81 diff --git a/ts/sql/migrations/1040-undownloaded-backed-up-media.std.ts b/ts/sql/migrations/1040-undownloaded-backed-up-media.std.ts index d054479a17..b9838ebb1f 100644 --- a/ts/sql/migrations/1040-undownloaded-backed-up-media.std.ts +++ b/ts/sql/migrations/1040-undownloaded-backed-up-media.std.ts @@ -4,21 +4,21 @@ import type { Database } from '@signalapp/sqlcipher'; import * as z from 'zod'; -import type { LoggerType } from '../../types/Logging.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; import { messageAttachmentTypeSchema, type AttachmentDownloadJobType, type MessageAttachmentType, -} from '../../types/AttachmentDownload.std.js'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import { jsonToObject, objectToJSON, sql } from '../util.std.js'; -import { AttachmentDownloadSource } from '../Interface.std.js'; -import { parsePartial } from '../../util/schemas.std.js'; -import { MIMETypeSchema } from '../../types/MIME.std.js'; +} from '../../types/AttachmentDownload.std.ts'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import { jsonToObject, objectToJSON, sql } from '../util.std.ts'; +import { AttachmentDownloadSource } from '../Interface.std.ts'; +import { parsePartial } from '../../util/schemas.std.ts'; +import { MIMETypeSchema } from '../../types/MIME.std.ts'; import { jobManagerJobSchema, type JobManagerJobType, -} from '../../jobs/JobManager.std.js'; +} from '../../jobs/JobManager.std.ts'; export type _AttachmentDownloadJobTypeV1030 = { attachment: AttachmentType; diff --git a/ts/sql/migrations/1050-group-send-endorsements.std.ts b/ts/sql/migrations/1050-group-send-endorsements.std.ts index f0ad853fa9..0cf11ae09e 100644 --- a/ts/sql/migrations/1050-group-send-endorsements.std.ts +++ b/ts/sql/migrations/1050-group-send-endorsements.std.ts @@ -3,7 +3,7 @@ import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1050(db: Database): void { const [createTables] = sql` diff --git a/ts/sql/migrations/1100-optimize-mark-call-history-read-in-conversation.std.ts b/ts/sql/migrations/1100-optimize-mark-call-history-read-in-conversation.std.ts index 8718d769a7..72d8ea68fb 100644 --- a/ts/sql/migrations/1100-optimize-mark-call-history-read-in-conversation.std.ts +++ b/ts/sql/migrations/1100-optimize-mark-call-history-read-in-conversation.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1100(db: Database): void { const [query] = sql` diff --git a/ts/sql/migrations/1160-optimize-calls-unread-count.std.ts b/ts/sql/migrations/1160-optimize-calls-unread-count.std.ts index 55167045fb..fd26fc1b63 100644 --- a/ts/sql/migrations/1160-optimize-calls-unread-count.std.ts +++ b/ts/sql/migrations/1160-optimize-calls-unread-count.std.ts @@ -1,11 +1,11 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { sql, sqlConstant } from '../util.std.js'; +import { sql, sqlConstant } from '../util.std.ts'; import { CallDirection, CallStatusValue, -} from '../../types/CallDisposition.std.js'; +} from '../../types/CallDisposition.std.ts'; const CALL_STATUS_MISSED = sqlConstant(CallStatusValue.Missed); const CALL_DIRECTION_INCOMING = sqlConstant(CallDirection.Incoming); diff --git a/ts/sql/migrations/1170-update-call-history-unread-index.std.ts b/ts/sql/migrations/1170-update-call-history-unread-index.std.ts index 64d7ba8283..98f90906c8 100644 --- a/ts/sql/migrations/1170-update-call-history-unread-index.std.ts +++ b/ts/sql/migrations/1170-update-call-history-unread-index.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1170(db: Database): void { const [query] = sql` diff --git a/ts/sql/migrations/1180-add-attachment-download-source.std.ts b/ts/sql/migrations/1180-add-attachment-download-source.std.ts index 1f6f44f28e..dd6a782edf 100644 --- a/ts/sql/migrations/1180-add-attachment-download-source.std.ts +++ b/ts/sql/migrations/1180-add-attachment-download-source.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { AttachmentDownloadSource } from '../Interface.std.js'; +import { AttachmentDownloadSource } from '../Interface.std.ts'; export default function updateToSchemaVersion1180(db: Database): void { db.exec(` diff --git a/ts/sql/migrations/1220-blob-sessions.node.ts b/ts/sql/migrations/1220-blob-sessions.node.ts index 928fd039ab..d008b8847e 100644 --- a/ts/sql/migrations/1220-blob-sessions.node.ts +++ b/ts/sql/migrations/1220-blob-sessions.node.ts @@ -3,14 +3,14 @@ import assert from 'node:assert'; import z from 'zod'; import type { Database } from '@signalapp/sqlcipher'; -import type { LoggerType } from '../../types/Logging.std.js'; -import * as Errors from '../../types/errors.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import * as Errors from '../../types/errors.std.ts'; import { sessionRecordToProtobuf, sessionStructureToBytes, -} from '../../util/sessionTranslation.node.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; +} from '../../util/sessionTranslation.node.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; export const version = 1220; diff --git a/ts/sql/migrations/1240-defunct-call-links-table.std.ts b/ts/sql/migrations/1240-defunct-call-links-table.std.ts index 7f02ab9a16..edfe9850cd 100644 --- a/ts/sql/migrations/1240-defunct-call-links-table.std.ts +++ b/ts/sql/migrations/1240-defunct-call-links-table.std.ts @@ -3,7 +3,7 @@ import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1240(db: Database): void { const [createTable] = sql` diff --git a/ts/sql/migrations/1260-sync-tasks-rowid.std.ts b/ts/sql/migrations/1260-sync-tasks-rowid.std.ts index ed944487f2..a9fc3db35e 100644 --- a/ts/sql/migrations/1260-sync-tasks-rowid.std.ts +++ b/ts/sql/migrations/1260-sync-tasks-rowid.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1260(db: Database): void { const [query] = sql` diff --git a/ts/sql/migrations/1270-normalize-messages.std.ts b/ts/sql/migrations/1270-normalize-messages.std.ts index b8f4bac229..312d4cf873 100644 --- a/ts/sql/migrations/1270-normalize-messages.std.ts +++ b/ts/sql/migrations/1270-normalize-messages.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1270(db: Database): void { const [query] = sql` diff --git a/ts/sql/migrations/1280-blob-unprocessed.std.ts b/ts/sql/migrations/1280-blob-unprocessed.std.ts index 0844959507..c18393d1db 100644 --- a/ts/sql/migrations/1280-blob-unprocessed.std.ts +++ b/ts/sql/migrations/1280-blob-unprocessed.std.ts @@ -2,19 +2,19 @@ // SPDX-License-Identifier: AGPL-3.0-only import { v7 as getGuid } from 'uuid'; -import type { LoggerType } from '../../types/Logging.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; import { normalizePni, normalizeServiceId, toTaggedPni, isUntaggedPniString, -} from '../../types/ServiceId.std.js'; -import { isKnownProtoEnumMember } from '../../util/isKnownProtoEnumMember.std.js'; -import { Migrations as Proto } from '../../protobuf/index.std.js'; -import { sql } from '../util.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { getOurUuid } from './41-uuid-keys.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../types/ServiceId.std.ts'; +import { isKnownProtoEnumMember } from '../../util/isKnownProtoEnumMember.std.ts'; +import { Migrations as Proto } from '../../protobuf/index.std.ts'; +import { sql } from '../util.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { getOurUuid } from './41-uuid-keys.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; export default function updateToSchemaVersion1280( db: WritableDB, diff --git a/ts/sql/migrations/1290-int-unprocessed-source-device.std.ts b/ts/sql/migrations/1290-int-unprocessed-source-device.std.ts index 7d0641dfde..bb19062b78 100644 --- a/ts/sql/migrations/1290-int-unprocessed-source-device.std.ts +++ b/ts/sql/migrations/1290-int-unprocessed-source-device.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { sql } from '../util.std.js'; -import type { WritableDB } from '../Interface.std.js'; +import { sql } from '../util.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1290(db: WritableDB): void { const [query] = sql` diff --git a/ts/sql/migrations/1300-sticker-pack-refs.std.ts b/ts/sql/migrations/1300-sticker-pack-refs.std.ts index 6b5c1da2a3..00b7ed7038 100644 --- a/ts/sql/migrations/1300-sticker-pack-refs.std.ts +++ b/ts/sql/migrations/1300-sticker-pack-refs.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { sql } from '../util.std.js'; -import type { WritableDB } from '../Interface.std.js'; +import { sql } from '../util.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1300(db: WritableDB): void { const [query] = sql` diff --git a/ts/sql/migrations/1310-muted-fixup.std.ts b/ts/sql/migrations/1310-muted-fixup.std.ts index 0e827136bd..788a21ad3e 100644 --- a/ts/sql/migrations/1310-muted-fixup.std.ts +++ b/ts/sql/migrations/1310-muted-fixup.std.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { sql } from '../util.std.js'; -import type { WritableDB } from '../Interface.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { sql } from '../util.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; // Value from ts/util/timestamp.ts at the time of creation of this migration const MAX_SAFE_DATE = 8640000000000000; diff --git a/ts/sql/migrations/1320-unprocessed-received-at-date.std.ts b/ts/sql/migrations/1320-unprocessed-received-at-date.std.ts index 56cec9bd98..1b41037d1e 100644 --- a/ts/sql/migrations/1320-unprocessed-received-at-date.std.ts +++ b/ts/sql/migrations/1320-unprocessed-received-at-date.std.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { sql } from '../util.std.js'; -import type { WritableDB } from '../Interface.std.js'; +import { sql } from '../util.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1320(db: WritableDB): void { const [query] = sql` diff --git a/ts/sql/migrations/1330-sync-tasks-type-index.std.ts b/ts/sql/migrations/1330-sync-tasks-type-index.std.ts index 3d3fc5cb6b..f4f0d2fc92 100644 --- a/ts/sql/migrations/1330-sync-tasks-type-index.std.ts +++ b/ts/sql/migrations/1330-sync-tasks-type-index.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1330(db: Database): void { const [query] = sql` diff --git a/ts/sql/migrations/1340-recent-gifs.std.ts b/ts/sql/migrations/1340-recent-gifs.std.ts index 1d550b91b0..52abe40376 100644 --- a/ts/sql/migrations/1340-recent-gifs.std.ts +++ b/ts/sql/migrations/1340-recent-gifs.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1340(db: Database): void { const [query] = sql` diff --git a/ts/sql/migrations/1350-notification-profiles.std.ts b/ts/sql/migrations/1350-notification-profiles.std.ts index c19dd04318..07b285cabf 100644 --- a/ts/sql/migrations/1350-notification-profiles.std.ts +++ b/ts/sql/migrations/1350-notification-profiles.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1350(db: Database): void { const [query] = sql` diff --git a/ts/sql/migrations/1360-attachments.std.ts b/ts/sql/migrations/1360-attachments.std.ts index 0aebc143e3..110d18eaa2 100644 --- a/ts/sql/migrations/1360-attachments.std.ts +++ b/ts/sql/migrations/1360-attachments.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1360(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1370-message-attachment-indexes.std.ts b/ts/sql/migrations/1370-message-attachment-indexes.std.ts index d6646144d3..5d7e9bb58c 100644 --- a/ts/sql/migrations/1370-message-attachment-indexes.std.ts +++ b/ts/sql/migrations/1370-message-attachment-indexes.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1370(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1380-donation-receipts.std.ts b/ts/sql/migrations/1380-donation-receipts.std.ts index facbd3289d..35dc95475c 100644 --- a/ts/sql/migrations/1380-donation-receipts.std.ts +++ b/ts/sql/migrations/1380-donation-receipts.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1380(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1390-attachment-download-keys.std.ts b/ts/sql/migrations/1390-attachment-download-keys.std.ts index 3b5a946bf2..8fb2382c0b 100644 --- a/ts/sql/migrations/1390-attachment-download-keys.std.ts +++ b/ts/sql/migrations/1390-attachment-download-keys.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { type WritableDB } from '../Interface.std.js'; +import { type WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1390(db: WritableDB): void { // TODO: DESKTOP-8879 Digest column is only used for deduplication purposes; here we diff --git a/ts/sql/migrations/1400-simplify-receipts.std.ts b/ts/sql/migrations/1400-simplify-receipts.std.ts index 286ae5e936..131d3493d8 100644 --- a/ts/sql/migrations/1400-simplify-receipts.std.ts +++ b/ts/sql/migrations/1400-simplify-receipts.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1400(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1410-remove-wallpaper.std.ts b/ts/sql/migrations/1410-remove-wallpaper.std.ts index 446d298969..6204c1f59a 100644 --- a/ts/sql/migrations/1410-remove-wallpaper.std.ts +++ b/ts/sql/migrations/1410-remove-wallpaper.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { type WritableDB } from '../Interface.std.js'; +import { type WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1410(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1420-backup-downloads.std.ts b/ts/sql/migrations/1420-backup-downloads.std.ts index 7e5846572d..d8d2e5d0db 100644 --- a/ts/sql/migrations/1420-backup-downloads.std.ts +++ b/ts/sql/migrations/1420-backup-downloads.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { AttachmentDownloadSource, type WritableDB } from '../Interface.std.js'; +import { AttachmentDownloadSource, type WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1420(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1430-call-links-epoch-id.std.ts b/ts/sql/migrations/1430-call-links-epoch-id.std.ts index 6fe2733a73..834d896231 100644 --- a/ts/sql/migrations/1430-call-links-epoch-id.std.ts +++ b/ts/sql/migrations/1430-call-links-epoch-id.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { type WritableDB } from '../Interface.std.js'; +import { type WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1430(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1440-chat-folders.std.ts b/ts/sql/migrations/1440-chat-folders.std.ts index 43e84efb4b..f9544fe460 100644 --- a/ts/sql/migrations/1440-chat-folders.std.ts +++ b/ts/sql/migrations/1440-chat-folders.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1440(db: WritableDB): void { const [query] = sql` diff --git a/ts/sql/migrations/1450-all-media.std.ts b/ts/sql/migrations/1450-all-media.std.ts index 7ecb67e0a2..351bc495b5 100644 --- a/ts/sql/migrations/1450-all-media.std.ts +++ b/ts/sql/migrations/1450-all-media.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1450(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1460-attachment-duration.std.ts b/ts/sql/migrations/1460-attachment-duration.std.ts index d06a905fd6..a61cd52213 100644 --- a/ts/sql/migrations/1460-attachment-duration.std.ts +++ b/ts/sql/migrations/1460-attachment-duration.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1460(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1470-kyber-triple.std.ts b/ts/sql/migrations/1470-kyber-triple.std.ts index f616988bf6..25e1c4dad8 100644 --- a/ts/sql/migrations/1470-kyber-triple.std.ts +++ b/ts/sql/migrations/1470-kyber-triple.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1460(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1480-chat-folders-remove-duplicates.std.ts b/ts/sql/migrations/1480-chat-folders-remove-duplicates.std.ts index 39c7aaf3e3..f8a0f07ec1 100644 --- a/ts/sql/migrations/1480-chat-folders-remove-duplicates.std.ts +++ b/ts/sql/migrations/1480-chat-folders-remove-duplicates.std.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1480( db: WritableDB, diff --git a/ts/sql/migrations/1490-lowercase-notification-profiles.std.ts b/ts/sql/migrations/1490-lowercase-notification-profiles.std.ts index 40bacd00f0..b0126eade1 100644 --- a/ts/sql/migrations/1490-lowercase-notification-profiles.std.ts +++ b/ts/sql/migrations/1490-lowercase-notification-profiles.std.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1490( db: WritableDB, diff --git a/ts/sql/migrations/1500-search-polls.std.ts b/ts/sql/migrations/1500-search-polls.std.ts index b30272c761..f452746137 100644 --- a/ts/sql/migrations/1500-search-polls.std.ts +++ b/ts/sql/migrations/1500-search-polls.std.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export const createMessagesOnInsertTrigger = sql` CREATE TRIGGER messages_on_insert AFTER INSERT ON messages diff --git a/ts/sql/migrations/1510-chat-folders-normalize-all-chats.std.ts b/ts/sql/migrations/1510-chat-folders-normalize-all-chats.std.ts index 2d2cc67e62..35aa4fd412 100644 --- a/ts/sql/migrations/1510-chat-folders-normalize-all-chats.std.ts +++ b/ts/sql/migrations/1510-chat-folders-normalize-all-chats.std.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1510( db: WritableDB, diff --git a/ts/sql/migrations/1550-has-link-preview.std.ts b/ts/sql/migrations/1550-has-link-preview.std.ts index ea5269837f..838aed2772 100644 --- a/ts/sql/migrations/1550-has-link-preview.std.ts +++ b/ts/sql/migrations/1550-has-link-preview.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1550(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1560-pinned-messages.std.ts b/ts/sql/migrations/1560-pinned-messages.std.ts index 8e25c7f8fd..e3a76bf300 100644 --- a/ts/sql/migrations/1560-pinned-messages.std.ts +++ b/ts/sql/migrations/1560-pinned-messages.std.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1560(db: WritableDB): void { const [query] = sql` diff --git a/ts/sql/migrations/1561-cleanup-polls.std.ts b/ts/sql/migrations/1561-cleanup-polls.std.ts index fe8aa5f625..561f1fc255 100644 --- a/ts/sql/migrations/1561-cleanup-polls.std.ts +++ b/ts/sql/migrations/1561-cleanup-polls.std.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; // This migration was backported to earlier branches as 1541 and 1551 export default function updateToSchemaVersion1561( diff --git a/ts/sql/migrations/1570-pinned-messages-updates.std.ts b/ts/sql/migrations/1570-pinned-messages-updates.std.ts index 58e9f06793..119664cef6 100644 --- a/ts/sql/migrations/1570-pinned-messages-updates.std.ts +++ b/ts/sql/migrations/1570-pinned-messages-updates.std.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1570(db: WritableDB): void { const [query] = sql` diff --git a/ts/sql/migrations/1580-expired-group-replies.std.ts b/ts/sql/migrations/1580-expired-group-replies.std.ts index b916750775..b664f38c34 100644 --- a/ts/sql/migrations/1580-expired-group-replies.std.ts +++ b/ts/sql/migrations/1580-expired-group-replies.std.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1580( db: WritableDB, diff --git a/ts/sql/migrations/1590-megaphones.std.ts b/ts/sql/migrations/1590-megaphones.std.ts index f4d03a97a2..0691b871f7 100644 --- a/ts/sql/migrations/1590-megaphones.std.ts +++ b/ts/sql/migrations/1590-megaphones.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1590(db: WritableDB): void { const [query] = sql` diff --git a/ts/sql/migrations/1600-deduplicate-usernames.std.ts b/ts/sql/migrations/1600-deduplicate-usernames.std.ts index 716899e03d..82fa84ffa1 100644 --- a/ts/sql/migrations/1600-deduplicate-usernames.std.ts +++ b/ts/sql/migrations/1600-deduplicate-usernames.std.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1600( db: WritableDB, diff --git a/ts/sql/migrations/1610-has-contacts.std.ts b/ts/sql/migrations/1610-has-contacts.std.ts index 21d0af9948..d16b5f72db 100644 --- a/ts/sql/migrations/1610-has-contacts.std.ts +++ b/ts/sql/migrations/1610-has-contacts.std.ts @@ -1,7 +1,7 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1610(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1620-sort-bigger-media.std.ts b/ts/sql/migrations/1620-sort-bigger-media.std.ts index cbc60896ed..5b34b5fadc 100644 --- a/ts/sql/migrations/1620-sort-bigger-media.std.ts +++ b/ts/sql/migrations/1620-sort-bigger-media.std.ts @@ -1,7 +1,7 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1620(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1630-message-pin-message-data.std.ts b/ts/sql/migrations/1630-message-pin-message-data.std.ts index 622e868f08..abeb0338e2 100644 --- a/ts/sql/migrations/1630-message-pin-message-data.std.ts +++ b/ts/sql/migrations/1630-message-pin-message-data.std.ts @@ -1,9 +1,9 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; type Pin = Readonly<{ pinMessageId: string; diff --git a/ts/sql/migrations/1640-key-transparency.std.ts b/ts/sql/migrations/1640-key-transparency.std.ts index fcd5c556ff..f9743179b5 100644 --- a/ts/sql/migrations/1640-key-transparency.std.ts +++ b/ts/sql/migrations/1640-key-transparency.std.ts @@ -1,6 +1,6 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1640(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1650-protected-attachments.std.ts b/ts/sql/migrations/1650-protected-attachments.std.ts index e64d550410..8bead8e904 100644 --- a/ts/sql/migrations/1650-protected-attachments.std.ts +++ b/ts/sql/migrations/1650-protected-attachments.std.ts @@ -1,6 +1,6 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1650(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1660-protected-attachments-non-unique.std.ts b/ts/sql/migrations/1660-protected-attachments-non-unique.std.ts index a62844a2b2..77cba51d33 100644 --- a/ts/sql/migrations/1660-protected-attachments-non-unique.std.ts +++ b/ts/sql/migrations/1660-protected-attachments-non-unique.std.ts @@ -1,6 +1,6 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion1660(db: WritableDB): void { db.exec(` diff --git a/ts/sql/migrations/1670-drop-call-link-epoch.std.ts b/ts/sql/migrations/1670-drop-call-link-epoch.std.ts index d6363d0c1f..56856b05e9 100644 --- a/ts/sql/migrations/1670-drop-call-link-epoch.std.ts +++ b/ts/sql/migrations/1670-drop-call-link-epoch.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1670(db: WritableDB): void { const [query] = sql` diff --git a/ts/sql/migrations/1680-cleanup-empty-strings.std.ts b/ts/sql/migrations/1680-cleanup-empty-strings.std.ts index b82521045b..a95366dab1 100644 --- a/ts/sql/migrations/1680-cleanup-empty-strings.std.ts +++ b/ts/sql/migrations/1680-cleanup-empty-strings.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import z from 'zod'; -import type { WritableDB } from '../Interface.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { safeParseUnknown } from '../../util/schemas.std.js'; +import type { WritableDB } from '../Interface.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { safeParseUnknown } from '../../util/schemas.std.ts'; const toNullable = z .string() diff --git a/ts/sql/migrations/1690-poll-terminate-notification-timestamp.std.ts b/ts/sql/migrations/1690-poll-terminate-notification-timestamp.std.ts index cd65db80f2..22014a52f4 100644 --- a/ts/sql/migrations/1690-poll-terminate-notification-timestamp.std.ts +++ b/ts/sql/migrations/1690-poll-terminate-notification-timestamp.std.ts @@ -1,9 +1,9 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion1690( db: WritableDB, diff --git a/ts/sql/migrations/41-uuid-keys.std.ts b/ts/sql/migrations/41-uuid-keys.std.ts index 213f1385c3..bc9d3009df 100644 --- a/ts/sql/migrations/41-uuid-keys.std.ts +++ b/ts/sql/migrations/41-uuid-keys.std.ts @@ -1,11 +1,11 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { isValidUuid } from '../../util/isValidUuid.std.js'; -import { createOrUpdate, getById, removeById } from '../util.std.js'; -import type { ItemKeyType, ReadableDB, WritableDB } from '../Interface.std.js'; -import { unencodeNumber } from '../../util/unencodeNumber.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { isValidUuid } from '../../util/isValidUuid.std.ts'; +import { createOrUpdate, getById, removeById } from '../util.std.ts'; +import type { ItemKeyType, ReadableDB, WritableDB } from '../Interface.std.ts'; +import { unencodeNumber } from '../../util/unencodeNumber.std.ts'; export function getOurUuid(db: ReadableDB): string | undefined { const UUID_ID: ItemKeyType = 'uuid_id'; diff --git a/ts/sql/migrations/42-stale-reactions.std.ts b/ts/sql/migrations/42-stale-reactions.std.ts index 92301d0df2..0cc6be6074 100644 --- a/ts/sql/migrations/42-stale-reactions.std.ts +++ b/ts/sql/migrations/42-stale-reactions.std.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { batchMultiVarQuery } from '../util.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; +import { batchMultiVarQuery } from '../util.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; export default function updateToSchemaVersion42( db: WritableDB, diff --git a/ts/sql/migrations/43-gv2-uuid.std.ts b/ts/sql/migrations/43-gv2-uuid.std.ts index 1bafd45753..52c6a1e270 100644 --- a/ts/sql/migrations/43-gv2-uuid.std.ts +++ b/ts/sql/migrations/43-gv2-uuid.std.ts @@ -3,18 +3,18 @@ import lodash from 'lodash'; -import type { LoggerType } from '../../types/Logging.std.js'; -import type { AciString, ServiceIdString } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import { assertDev } from '../../util/assert.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { AciString, ServiceIdString } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import { assertDev } from '../../util/assert.std.ts'; import { TableIterator, getCountFromTable, jsonToObject, objectToJSON, -} from '../util.std.js'; -import type { WritableDB } from '../Interface.std.js'; +} from '../util.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; const { omit } = lodash; diff --git a/ts/sql/migrations/47-further-optimize.std.ts b/ts/sql/migrations/47-further-optimize.std.ts index 5acafe7090..03e23dda28 100644 --- a/ts/sql/migrations/47-further-optimize.std.ts +++ b/ts/sql/migrations/47-further-optimize.std.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getOurUuid } from './41-uuid-keys.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import type { WritableDB } from '../Interface.std.js'; +import { getOurUuid } from './41-uuid-keys.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; export default function updateToSchemaVersion47( db: WritableDB, diff --git a/ts/sql/migrations/51-centralize-conversation-jobs.node.ts b/ts/sql/migrations/51-centralize-conversation-jobs.node.ts index 7b8ca8268f..cb9f396d70 100644 --- a/ts/sql/migrations/51-centralize-conversation-jobs.node.ts +++ b/ts/sql/migrations/51-centralize-conversation-jobs.node.ts @@ -1,10 +1,10 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { isRecord } from '../../util/isRecord.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { getJobsInQueue, insertJob } from '../Server.node.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { isRecord } from '../../util/isRecord.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { getJobsInQueue, insertJob } from '../Server.node.ts'; export default function updateToSchemaVersion51( db: WritableDB, diff --git a/ts/sql/migrations/53-gv2-banned-members.std.ts b/ts/sql/migrations/53-gv2-banned-members.std.ts index 0244966783..edcef6b8af 100644 --- a/ts/sql/migrations/53-gv2-banned-members.std.ts +++ b/ts/sql/migrations/53-gv2-banned-members.std.ts @@ -3,8 +3,8 @@ import type { Database } from '@signalapp/sqlcipher'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { jsonToObject } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { jsonToObject } from '../util.std.ts'; export default function updateToSchemaVersion53( db: Database, diff --git a/ts/sql/migrations/55-report-message-aci.node.ts b/ts/sql/migrations/55-report-message-aci.node.ts index 5b8e84bcec..2067aa95b9 100644 --- a/ts/sql/migrations/55-report-message-aci.node.ts +++ b/ts/sql/migrations/55-report-message-aci.node.ts @@ -1,11 +1,11 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { getJobsInQueue, insertJob } from '../Server.node.js'; -import type { WritableDB } from '../Interface.std.js'; -import { isRecord } from '../../util/isRecord.std.js'; -import { isIterable } from '../../util/iterables.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { getJobsInQueue, insertJob } from '../Server.node.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { isRecord } from '../../util/isRecord.std.ts'; +import { isIterable } from '../../util/iterables.std.ts'; export default function updateToSchemaVersion55( db: WritableDB, diff --git a/ts/sql/migrations/56-add-unseen-to-message.std.ts b/ts/sql/migrations/56-add-unseen-to-message.std.ts index b687f53faa..ea04600753 100644 --- a/ts/sql/migrations/56-add-unseen-to-message.std.ts +++ b/ts/sql/migrations/56-add-unseen-to-message.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; export default function updateToSchemaVersion56(db: Database): void { db.exec( diff --git a/ts/sql/migrations/58-update-unread.std.ts b/ts/sql/migrations/58-update-unread.std.ts index 3790c73f85..32eb14df3b 100644 --- a/ts/sql/migrations/58-update-unread.std.ts +++ b/ts/sql/migrations/58-update-unread.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { Database } from '@signalapp/sqlcipher'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; export default function updateToSchemaVersion58(db: Database): void { db.exec( diff --git a/ts/sql/migrations/78-merge-receipt-jobs.node.ts b/ts/sql/migrations/78-merge-receipt-jobs.node.ts index 5a398c7957..83b4ef24d6 100644 --- a/ts/sql/migrations/78-merge-receipt-jobs.node.ts +++ b/ts/sql/migrations/78-merge-receipt-jobs.node.ts @@ -1,10 +1,10 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../../types/Logging.std.js'; -import { isRecord } from '../../util/isRecord.std.js'; -import type { WritableDB } from '../Interface.std.js'; -import { getJobsInQueue, insertJob } from '../Server.node.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { isRecord } from '../../util/isRecord.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; +import { getJobsInQueue, insertJob } from '../Server.node.ts'; export default function updateToSchemaVersion78( db: WritableDB, diff --git a/ts/sql/migrations/87-cleanup.std.ts b/ts/sql/migrations/87-cleanup.std.ts index d586d3ab84..6831f09172 100644 --- a/ts/sql/migrations/87-cleanup.std.ts +++ b/ts/sql/migrations/87-cleanup.std.ts @@ -3,9 +3,9 @@ import type { Database } from '@signalapp/sqlcipher'; -import { cleanKeys } from './920-clean-more-keys.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { sqlFragment } from '../util.std.js'; +import { cleanKeys } from './920-clean-more-keys.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { sqlFragment } from '../util.std.ts'; // Note: for many users, this is not what ran for them as migration 87. You can see that // migration here: https://github.com/signalapp/Signal-Desktop/commit/671e16ae1f869627f355113d6397ccb62d5461d2 diff --git a/ts/sql/migrations/88-service-ids.std.ts b/ts/sql/migrations/88-service-ids.std.ts index 135d42f054..b577b1fef3 100644 --- a/ts/sql/migrations/88-service-ids.std.ts +++ b/ts/sql/migrations/88-service-ids.std.ts @@ -4,16 +4,16 @@ import type { Database } from '@signalapp/sqlcipher'; import lodash from 'lodash'; -import type { LoggerType } from '../../types/Logging.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; import type { ServiceIdString, AciString, PniString, -} from '../../types/ServiceId.std.js'; -import { normalizeServiceId, normalizePni } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; -import type { JSONWithUnknownFields } from '../../types/Util.std.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; +} from '../../types/ServiceId.std.ts'; +import { normalizeServiceId, normalizePni } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; +import type { JSONWithUnknownFields } from '../../types/Util.std.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; const { omit } = lodash; diff --git a/ts/sql/migrations/89-call-history.node.ts b/ts/sql/migrations/89-call-history.node.ts index 3563afad4d..fbb832297c 100644 --- a/ts/sql/migrations/89-call-history.node.ts +++ b/ts/sql/migrations/89-call-history.node.ts @@ -6,10 +6,10 @@ import { v4 as generateUuid } from 'uuid'; import lodash from 'lodash'; import type { SetOptional } from 'type-fest'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { jsonToObject, sql } from '../util.std.js'; -import { getOurUuid } from './41-uuid-keys.std.js'; -import type { CallHistoryDetails } from '../../types/CallDisposition.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { jsonToObject, sql } from '../util.std.ts'; +import { getOurUuid } from './41-uuid-keys.std.ts'; +import type { CallHistoryDetails } from '../../types/CallDisposition.std.ts'; import { DirectCallStatus, CallDirection, @@ -17,16 +17,16 @@ import { GroupCallStatus, callHistoryDetailsSchema, CallMode, -} from '../../types/CallDisposition.std.js'; +} from '../../types/CallDisposition.std.ts'; import type { WritableDB, MessageType, ConversationType, -} from '../Interface.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import { safeParseStrict } from '../../util/schemas.std.js'; +} from '../Interface.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import { safeParseStrict } from '../../util/schemas.std.ts'; const { isObject } = lodash; diff --git a/ts/sql/migrations/90-delete-story-reply-screenshot.std.ts b/ts/sql/migrations/90-delete-story-reply-screenshot.std.ts index e8c91d4d41..981ee082a2 100644 --- a/ts/sql/migrations/90-delete-story-reply-screenshot.std.ts +++ b/ts/sql/migrations/90-delete-story-reply-screenshot.std.ts @@ -3,8 +3,8 @@ import type { Database } from '@signalapp/sqlcipher'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { sql } from '../util.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { sql } from '../util.std.ts'; export default function updateToSchemaVersion90( db: Database, diff --git a/ts/sql/migrations/91-clean-keys.std.ts b/ts/sql/migrations/91-clean-keys.std.ts index c891d1296b..947c5d3206 100644 --- a/ts/sql/migrations/91-clean-keys.std.ts +++ b/ts/sql/migrations/91-clean-keys.std.ts @@ -3,11 +3,11 @@ import type { Database, RunResult } from '@signalapp/sqlcipher'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { sql } from '../util.std.js'; -import type { PniString } from '../../types/ServiceId.std.js'; -import { normalizePni } from '../../types/ServiceId.std.js'; -import * as Errors from '../../types/errors.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { sql } from '../util.std.ts'; +import type { PniString } from '../../types/ServiceId.std.ts'; +import { normalizePni } from '../../types/ServiceId.std.ts'; +import * as Errors from '../../types/errors.std.ts'; export default function updateToSchemaVersion91( db: Database, diff --git a/ts/sql/migrations/920-clean-more-keys.std.ts b/ts/sql/migrations/920-clean-more-keys.std.ts index 6a3e545089..9927368475 100644 --- a/ts/sql/migrations/920-clean-more-keys.std.ts +++ b/ts/sql/migrations/920-clean-more-keys.std.ts @@ -3,13 +3,13 @@ import type { Database, RunResult } from '@signalapp/sqlcipher'; -import type { LoggerType } from '../../types/Logging.std.js'; -import type { QueryFragment } from '../util.std.js'; -import type { PniString } from '../../types/ServiceId.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import type { QueryFragment } from '../util.std.ts'; +import type { PniString } from '../../types/ServiceId.std.ts'; -import { sql, sqlFragment } from '../util.std.js'; -import { normalizePni } from '../../types/ServiceId.std.js'; -import * as Errors from '../../types/errors.std.js'; +import { sql, sqlFragment } from '../util.std.ts'; +import { normalizePni } from '../../types/ServiceId.std.ts'; +import * as Errors from '../../types/errors.std.ts'; export default function updateToSchemaVersion920( db: Database, diff --git a/ts/sql/migrations/960-untag-pni.std.ts b/ts/sql/migrations/960-untag-pni.std.ts index e4ee2a5d81..05011b691d 100644 --- a/ts/sql/migrations/960-untag-pni.std.ts +++ b/ts/sql/migrations/960-untag-pni.std.ts @@ -3,15 +3,15 @@ import type { Database } from '@signalapp/sqlcipher'; -import type { LoggerType } from '../../types/Logging.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; import type { ServiceIdString, AciString, PniString, -} from '../../types/ServiceId.std.js'; -import { normalizePni } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; -import type { JSONWithUnknownFields } from '../../types/Util.std.js'; +} from '../../types/ServiceId.std.ts'; +import { normalizePni } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; +import type { JSONWithUnknownFields } from '../../types/Util.std.ts'; export default function updateToSchemaVersion960( db: Database, diff --git a/ts/sql/migrations/index.node.ts b/ts/sql/migrations/index.node.ts index f468830db2..a466864b9f 100644 --- a/ts/sql/migrations/index.node.ts +++ b/ts/sql/migrations/index.node.ts @@ -5,7 +5,7 @@ import type { Database } from '@signalapp/sqlcipher'; import lodash from 'lodash'; import { v4 as generateUuid } from 'uuid'; -import type { LoggerType } from '../../types/Logging.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; import { getSchemaVersion, getUserVersion, @@ -13,142 +13,142 @@ import { getSQLiteVersion, objectToJSON, jsonToObject, -} from '../util.std.js'; -import type { WritableDB } from '../Interface.std.js'; +} from '../util.std.ts'; +import type { WritableDB } from '../Interface.std.ts'; -import updateToSchemaVersion41 from './41-uuid-keys.std.js'; -import updateToSchemaVersion42 from './42-stale-reactions.std.js'; -import updateToSchemaVersion43 from './43-gv2-uuid.std.js'; -import updateToSchemaVersion44 from './44-badges.std.js'; -import updateToSchemaVersion45 from './45-stories.std.js'; -import updateToSchemaVersion46 from './46-optimize-stories.std.js'; -import updateToSchemaVersion47 from './47-further-optimize.std.js'; -import updateToSchemaVersion48 from './48-fix-user-initiated-index.std.js'; -import updateToSchemaVersion49 from './49-fix-preview-index.std.js'; -import updateToSchemaVersion50 from './50-fix-messages-unread-index.std.js'; -import updateToSchemaVersion51 from './51-centralize-conversation-jobs.node.js'; -import updateToSchemaVersion52 from './52-optimize-stories.std.js'; -import updateToSchemaVersion53 from './53-gv2-banned-members.std.js'; -import updateToSchemaVersion54 from './54-unprocessed-received-at-counter.std.js'; -import updateToSchemaVersion55 from './55-report-message-aci.node.js'; -import updateToSchemaVersion56 from './56-add-unseen-to-message.std.js'; -import updateToSchemaVersion57 from './57-rm-message-history-unsynced.std.js'; -import updateToSchemaVersion58 from './58-update-unread.std.js'; -import updateToSchemaVersion59 from './59-unprocessed-received-at-counter-index.std.js'; -import updateToSchemaVersion60 from './60-update-expiring-index.std.js'; -import updateToSchemaVersion61 from './61-distribution-list-storage.std.js'; -import updateToSchemaVersion62 from './62-add-urgent-to-send-log.std.js'; -import updateToSchemaVersion63 from './63-add-urgent-to-unprocessed.std.js'; -import updateToSchemaVersion64 from './64-uuid-column-for-pre-keys.std.js'; -import updateToSchemaVersion65 from './65-add-storage-id-to-stickers.std.js'; -import updateToSchemaVersion66 from './66-add-pni-signature-to-sent-protos.std.js'; -import updateToSchemaVersion67 from './67-add-story-to-unprocessed.std.js'; -import updateToSchemaVersion68 from './68-drop-deprecated-columns.std.js'; -import updateToSchemaVersion69 from './69-group-call-ring-cancellations.std.js'; -import updateToSchemaVersion70 from './70-story-reply-index.std.js'; -import updateToSchemaVersion71 from './71-merge-notifications.std.js'; -import updateToSchemaVersion72 from './72-optimize-call-id-message-lookup.std.js'; -import updateToSchemaVersion73 from './73-remove-phone-number-discovery.std.js'; -import updateToSchemaVersion74 from './74-optimize-convo-open.std.js'; -import updateToSchemaVersion75 from './75-noop.std.js'; -import updateToSchemaVersion76 from './76-optimize-convo-open-2.std.js'; -import updateToSchemaVersion77 from './77-signal-tokenizer.std.js'; -import updateToSchemaVersion78 from './78-merge-receipt-jobs.node.js'; -import updateToSchemaVersion79 from './79-paging-lightbox.std.js'; -import updateToSchemaVersion80 from './80-edited-messages.std.js'; -import updateToSchemaVersion81 from './81-contact-removed-notification.std.js'; -import updateToSchemaVersion82 from './82-edited-messages-read-index.std.js'; -import updateToSchemaVersion83 from './83-mentions.std.js'; -import updateToSchemaVersion84 from './84-all-mentions.std.js'; -import updateToSchemaVersion85 from './85-add-kyber-keys.std.js'; -import updateToSchemaVersion86 from './86-story-replies-index.std.js'; -import updateToSchemaVersion87 from './87-cleanup.std.js'; -import updateToSchemaVersion88 from './88-service-ids.std.js'; -import updateToSchemaVersion89 from './89-call-history.node.js'; -import updateToSchemaVersion90 from './90-delete-story-reply-screenshot.std.js'; -import updateToSchemaVersion91 from './91-clean-keys.std.js'; -import updateToSchemaVersion920 from './920-clean-more-keys.std.js'; -import updateToSchemaVersion930 from './930-fts5-secure-delete.std.js'; -import updateToSchemaVersion940 from './940-fts5-revert.std.js'; -import updateToSchemaVersion950 from './950-fts5-secure-delete.std.js'; -import updateToSchemaVersion960 from './960-untag-pni.std.js'; -import updateToSchemaVersion970 from './970-fts5-optimize.std.js'; -import updateToSchemaVersion980 from './980-reaction-timestamp.std.js'; -import updateToSchemaVersion990 from './990-phone-number-sharing.std.js'; -import updateToSchemaVersion1000 from './1000-mark-unread-call-history-messages-as-unseen.std.js'; -import updateToSchemaVersion1010 from './1010-call-links-table.std.js'; -import updateToSchemaVersion1020 from './1020-self-merges.std.js'; -import updateToSchemaVersion1030 from './1030-unblock-event.std.js'; -import updateToSchemaVersion1040 from './1040-undownloaded-backed-up-media.std.js'; -import updateToSchemaVersion1050 from './1050-group-send-endorsements.std.js'; -import updateToSchemaVersion1060 from './1060-addressable-messages-and-sync-tasks.std.js'; -import updateToSchemaVersion1070 from './1070-attachment-backup.std.js'; -import updateToSchemaVersion1080 from './1080-nondisappearing-addressable.std.js'; -import updateToSchemaVersion1090 from './1090-message-delete-indexes.std.js'; -import updateToSchemaVersion1100 from './1100-optimize-mark-call-history-read-in-conversation.std.js'; -import updateToSchemaVersion1110 from './1110-sticker-local-key.std.js'; -import updateToSchemaVersion1120 from './1120-messages-foreign-keys-indexes.std.js'; -import updateToSchemaVersion1130 from './1130-isStory-index.std.js'; -import updateToSchemaVersion1140 from './1140-call-links-deleted-column.std.js'; -import updateToSchemaVersion1150 from './1150-expire-timer-version.std.js'; -import updateToSchemaVersion1160 from './1160-optimize-calls-unread-count.std.js'; -import updateToSchemaVersion1170 from './1170-update-call-history-unread-index.std.js'; -import updateToSchemaVersion1180 from './1180-add-attachment-download-source.std.js'; -import updateToSchemaVersion1190 from './1190-call-links-storage.std.js'; -import updateToSchemaVersion1200 from './1200-attachment-download-source-index.std.js'; -import updateToSchemaVersion1210 from './1210-call-history-started-id.std.js'; -import updateToSchemaVersion1220 from './1220-blob-sessions.node.js'; -import updateToSchemaVersion1230 from './1230-call-links-admin-key-index.std.js'; -import updateToSchemaVersion1240 from './1240-defunct-call-links-table.std.js'; -import updateToSchemaVersion1250 from './1250-defunct-call-links-storage.std.js'; -import updateToSchemaVersion1260 from './1260-sync-tasks-rowid.std.js'; -import updateToSchemaVersion1270 from './1270-normalize-messages.std.js'; -import updateToSchemaVersion1280 from './1280-blob-unprocessed.std.js'; -import updateToSchemaVersion1290 from './1290-int-unprocessed-source-device.std.js'; -import updateToSchemaVersion1300 from './1300-sticker-pack-refs.std.js'; -import updateToSchemaVersion1310 from './1310-muted-fixup.std.js'; -import updateToSchemaVersion1320 from './1320-unprocessed-received-at-date.std.js'; -import updateToSchemaVersion1330 from './1330-sync-tasks-type-index.std.js'; -import updateToSchemaVersion1340 from './1340-recent-gifs.std.js'; -import updateToSchemaVersion1350 from './1350-notification-profiles.std.js'; -import updateToSchemaVersion1360 from './1360-attachments.std.js'; -import updateToSchemaVersion1370 from './1370-message-attachment-indexes.std.js'; -import updateToSchemaVersion1380 from './1380-donation-receipts.std.js'; -import updateToSchemaVersion1390 from './1390-attachment-download-keys.std.js'; -import updateToSchemaVersion1400 from './1400-simplify-receipts.std.js'; -import updateToSchemaVersion1410 from './1410-remove-wallpaper.std.js'; -import updateToSchemaVersion1420 from './1420-backup-downloads.std.js'; -import updateToSchemaVersion1430 from './1430-call-links-epoch-id.std.js'; -import updateToSchemaVersion1440 from './1440-chat-folders.std.js'; -import updateToSchemaVersion1450 from './1450-all-media.std.js'; -import updateToSchemaVersion1460 from './1460-attachment-duration.std.js'; -import updateToSchemaVersion1470 from './1470-kyber-triple.std.js'; -import updateToSchemaVersion1480 from './1480-chat-folders-remove-duplicates.std.js'; -import updateToSchemaVersion1490 from './1490-lowercase-notification-profiles.std.js'; -import updateToSchemaVersion1500 from './1500-search-polls.std.js'; -import updateToSchemaVersion1510 from './1510-chat-folders-normalize-all-chats.std.js'; -import updateToSchemaVersion1520 from './1520-poll-votes-unread.std.js'; -import updateToSchemaVersion1530 from './1530-update-expiring-index.std.js'; -import updateToSchemaVersion1540 from './1540-partial-expiring-index.std.js'; -import updateToSchemaVersion1550 from './1550-has-link-preview.std.js'; -import updateToSchemaVersion1560 from './1560-pinned-messages.std.js'; -import updateToSchemaVersion1561 from './1561-cleanup-polls.std.js'; -import updateToSchemaVersion1570 from './1570-pinned-messages-updates.std.js'; -import updateToSchemaVersion1580 from './1580-expired-group-replies.std.js'; -import updateToSchemaVersion1590 from './1590-megaphones.std.js'; -import updateToSchemaVersion1600 from './1600-deduplicate-usernames.std.js'; -import updateToSchemaVersion1610 from './1610-has-contacts.std.js'; -import updateToSchemaVersion1620 from './1620-sort-bigger-media.std.js'; -import updateToSchemaVersion1630 from './1630-message-pin-message-data.std.js'; -import updateToSchemaVersion1640 from './1640-key-transparency.std.js'; -import updateToSchemaVersion1650 from './1650-protected-attachments.std.js'; -import updateToSchemaVersion1660 from './1660-protected-attachments-non-unique.std.js'; -import updateToSchemaVersion1670 from './1670-drop-call-link-epoch.std.js'; -import updateToSchemaVersion1680 from './1680-cleanup-empty-strings.std.js'; -import updateToSchemaVersion1690 from './1690-poll-terminate-notification-timestamp.std.js'; +import updateToSchemaVersion41 from './41-uuid-keys.std.ts'; +import updateToSchemaVersion42 from './42-stale-reactions.std.ts'; +import updateToSchemaVersion43 from './43-gv2-uuid.std.ts'; +import updateToSchemaVersion44 from './44-badges.std.ts'; +import updateToSchemaVersion45 from './45-stories.std.ts'; +import updateToSchemaVersion46 from './46-optimize-stories.std.ts'; +import updateToSchemaVersion47 from './47-further-optimize.std.ts'; +import updateToSchemaVersion48 from './48-fix-user-initiated-index.std.ts'; +import updateToSchemaVersion49 from './49-fix-preview-index.std.ts'; +import updateToSchemaVersion50 from './50-fix-messages-unread-index.std.ts'; +import updateToSchemaVersion51 from './51-centralize-conversation-jobs.node.ts'; +import updateToSchemaVersion52 from './52-optimize-stories.std.ts'; +import updateToSchemaVersion53 from './53-gv2-banned-members.std.ts'; +import updateToSchemaVersion54 from './54-unprocessed-received-at-counter.std.ts'; +import updateToSchemaVersion55 from './55-report-message-aci.node.ts'; +import updateToSchemaVersion56 from './56-add-unseen-to-message.std.ts'; +import updateToSchemaVersion57 from './57-rm-message-history-unsynced.std.ts'; +import updateToSchemaVersion58 from './58-update-unread.std.ts'; +import updateToSchemaVersion59 from './59-unprocessed-received-at-counter-index.std.ts'; +import updateToSchemaVersion60 from './60-update-expiring-index.std.ts'; +import updateToSchemaVersion61 from './61-distribution-list-storage.std.ts'; +import updateToSchemaVersion62 from './62-add-urgent-to-send-log.std.ts'; +import updateToSchemaVersion63 from './63-add-urgent-to-unprocessed.std.ts'; +import updateToSchemaVersion64 from './64-uuid-column-for-pre-keys.std.ts'; +import updateToSchemaVersion65 from './65-add-storage-id-to-stickers.std.ts'; +import updateToSchemaVersion66 from './66-add-pni-signature-to-sent-protos.std.ts'; +import updateToSchemaVersion67 from './67-add-story-to-unprocessed.std.ts'; +import updateToSchemaVersion68 from './68-drop-deprecated-columns.std.ts'; +import updateToSchemaVersion69 from './69-group-call-ring-cancellations.std.ts'; +import updateToSchemaVersion70 from './70-story-reply-index.std.ts'; +import updateToSchemaVersion71 from './71-merge-notifications.std.ts'; +import updateToSchemaVersion72 from './72-optimize-call-id-message-lookup.std.ts'; +import updateToSchemaVersion73 from './73-remove-phone-number-discovery.std.ts'; +import updateToSchemaVersion74 from './74-optimize-convo-open.std.ts'; +import updateToSchemaVersion75 from './75-noop.std.ts'; +import updateToSchemaVersion76 from './76-optimize-convo-open-2.std.ts'; +import updateToSchemaVersion77 from './77-signal-tokenizer.std.ts'; +import updateToSchemaVersion78 from './78-merge-receipt-jobs.node.ts'; +import updateToSchemaVersion79 from './79-paging-lightbox.std.ts'; +import updateToSchemaVersion80 from './80-edited-messages.std.ts'; +import updateToSchemaVersion81 from './81-contact-removed-notification.std.ts'; +import updateToSchemaVersion82 from './82-edited-messages-read-index.std.ts'; +import updateToSchemaVersion83 from './83-mentions.std.ts'; +import updateToSchemaVersion84 from './84-all-mentions.std.ts'; +import updateToSchemaVersion85 from './85-add-kyber-keys.std.ts'; +import updateToSchemaVersion86 from './86-story-replies-index.std.ts'; +import updateToSchemaVersion87 from './87-cleanup.std.ts'; +import updateToSchemaVersion88 from './88-service-ids.std.ts'; +import updateToSchemaVersion89 from './89-call-history.node.ts'; +import updateToSchemaVersion90 from './90-delete-story-reply-screenshot.std.ts'; +import updateToSchemaVersion91 from './91-clean-keys.std.ts'; +import updateToSchemaVersion920 from './920-clean-more-keys.std.ts'; +import updateToSchemaVersion930 from './930-fts5-secure-delete.std.ts'; +import updateToSchemaVersion940 from './940-fts5-revert.std.ts'; +import updateToSchemaVersion950 from './950-fts5-secure-delete.std.ts'; +import updateToSchemaVersion960 from './960-untag-pni.std.ts'; +import updateToSchemaVersion970 from './970-fts5-optimize.std.ts'; +import updateToSchemaVersion980 from './980-reaction-timestamp.std.ts'; +import updateToSchemaVersion990 from './990-phone-number-sharing.std.ts'; +import updateToSchemaVersion1000 from './1000-mark-unread-call-history-messages-as-unseen.std.ts'; +import updateToSchemaVersion1010 from './1010-call-links-table.std.ts'; +import updateToSchemaVersion1020 from './1020-self-merges.std.ts'; +import updateToSchemaVersion1030 from './1030-unblock-event.std.ts'; +import updateToSchemaVersion1040 from './1040-undownloaded-backed-up-media.std.ts'; +import updateToSchemaVersion1050 from './1050-group-send-endorsements.std.ts'; +import updateToSchemaVersion1060 from './1060-addressable-messages-and-sync-tasks.std.ts'; +import updateToSchemaVersion1070 from './1070-attachment-backup.std.ts'; +import updateToSchemaVersion1080 from './1080-nondisappearing-addressable.std.ts'; +import updateToSchemaVersion1090 from './1090-message-delete-indexes.std.ts'; +import updateToSchemaVersion1100 from './1100-optimize-mark-call-history-read-in-conversation.std.ts'; +import updateToSchemaVersion1110 from './1110-sticker-local-key.std.ts'; +import updateToSchemaVersion1120 from './1120-messages-foreign-keys-indexes.std.ts'; +import updateToSchemaVersion1130 from './1130-isStory-index.std.ts'; +import updateToSchemaVersion1140 from './1140-call-links-deleted-column.std.ts'; +import updateToSchemaVersion1150 from './1150-expire-timer-version.std.ts'; +import updateToSchemaVersion1160 from './1160-optimize-calls-unread-count.std.ts'; +import updateToSchemaVersion1170 from './1170-update-call-history-unread-index.std.ts'; +import updateToSchemaVersion1180 from './1180-add-attachment-download-source.std.ts'; +import updateToSchemaVersion1190 from './1190-call-links-storage.std.ts'; +import updateToSchemaVersion1200 from './1200-attachment-download-source-index.std.ts'; +import updateToSchemaVersion1210 from './1210-call-history-started-id.std.ts'; +import updateToSchemaVersion1220 from './1220-blob-sessions.node.ts'; +import updateToSchemaVersion1230 from './1230-call-links-admin-key-index.std.ts'; +import updateToSchemaVersion1240 from './1240-defunct-call-links-table.std.ts'; +import updateToSchemaVersion1250 from './1250-defunct-call-links-storage.std.ts'; +import updateToSchemaVersion1260 from './1260-sync-tasks-rowid.std.ts'; +import updateToSchemaVersion1270 from './1270-normalize-messages.std.ts'; +import updateToSchemaVersion1280 from './1280-blob-unprocessed.std.ts'; +import updateToSchemaVersion1290 from './1290-int-unprocessed-source-device.std.ts'; +import updateToSchemaVersion1300 from './1300-sticker-pack-refs.std.ts'; +import updateToSchemaVersion1310 from './1310-muted-fixup.std.ts'; +import updateToSchemaVersion1320 from './1320-unprocessed-received-at-date.std.ts'; +import updateToSchemaVersion1330 from './1330-sync-tasks-type-index.std.ts'; +import updateToSchemaVersion1340 from './1340-recent-gifs.std.ts'; +import updateToSchemaVersion1350 from './1350-notification-profiles.std.ts'; +import updateToSchemaVersion1360 from './1360-attachments.std.ts'; +import updateToSchemaVersion1370 from './1370-message-attachment-indexes.std.ts'; +import updateToSchemaVersion1380 from './1380-donation-receipts.std.ts'; +import updateToSchemaVersion1390 from './1390-attachment-download-keys.std.ts'; +import updateToSchemaVersion1400 from './1400-simplify-receipts.std.ts'; +import updateToSchemaVersion1410 from './1410-remove-wallpaper.std.ts'; +import updateToSchemaVersion1420 from './1420-backup-downloads.std.ts'; +import updateToSchemaVersion1430 from './1430-call-links-epoch-id.std.ts'; +import updateToSchemaVersion1440 from './1440-chat-folders.std.ts'; +import updateToSchemaVersion1450 from './1450-all-media.std.ts'; +import updateToSchemaVersion1460 from './1460-attachment-duration.std.ts'; +import updateToSchemaVersion1470 from './1470-kyber-triple.std.ts'; +import updateToSchemaVersion1480 from './1480-chat-folders-remove-duplicates.std.ts'; +import updateToSchemaVersion1490 from './1490-lowercase-notification-profiles.std.ts'; +import updateToSchemaVersion1500 from './1500-search-polls.std.ts'; +import updateToSchemaVersion1510 from './1510-chat-folders-normalize-all-chats.std.ts'; +import updateToSchemaVersion1520 from './1520-poll-votes-unread.std.ts'; +import updateToSchemaVersion1530 from './1530-update-expiring-index.std.ts'; +import updateToSchemaVersion1540 from './1540-partial-expiring-index.std.ts'; +import updateToSchemaVersion1550 from './1550-has-link-preview.std.ts'; +import updateToSchemaVersion1560 from './1560-pinned-messages.std.ts'; +import updateToSchemaVersion1561 from './1561-cleanup-polls.std.ts'; +import updateToSchemaVersion1570 from './1570-pinned-messages-updates.std.ts'; +import updateToSchemaVersion1580 from './1580-expired-group-replies.std.ts'; +import updateToSchemaVersion1590 from './1590-megaphones.std.ts'; +import updateToSchemaVersion1600 from './1600-deduplicate-usernames.std.ts'; +import updateToSchemaVersion1610 from './1610-has-contacts.std.ts'; +import updateToSchemaVersion1620 from './1620-sort-bigger-media.std.ts'; +import updateToSchemaVersion1630 from './1630-message-pin-message-data.std.ts'; +import updateToSchemaVersion1640 from './1640-key-transparency.std.ts'; +import updateToSchemaVersion1650 from './1650-protected-attachments.std.ts'; +import updateToSchemaVersion1660 from './1660-protected-attachments-non-unique.std.ts'; +import updateToSchemaVersion1670 from './1670-drop-call-link-epoch.std.ts'; +import updateToSchemaVersion1680 from './1680-cleanup-empty-strings.std.ts'; +import updateToSchemaVersion1690 from './1690-poll-terminate-notification-timestamp.std.ts'; -import { DataWriter } from '../Server.node.js'; -import { strictAssert } from '../../util/assert.std.js'; +import { DataWriter } from '../Server.node.ts'; +import { strictAssert } from '../../util/assert.std.ts'; const { keyBy } = lodash; diff --git a/ts/sql/server/callLinks.node.ts b/ts/sql/server/callLinks.node.ts index 3d84dba991..6f9e018e3a 100644 --- a/ts/sql/server/callLinks.node.ts +++ b/ts/sql/server/callLinks.node.ts @@ -2,33 +2,33 @@ // SPDX-License-Identifier: AGPL-3.0-only import { CallLinkRootKey } from '@signalapp/ringrtc'; -import * as Bytes from '../../Bytes.std.js'; +import * as Bytes from '../../Bytes.std.ts'; import type { CallLinkRecord, CallLinkStateType, CallLinkType, DefunctCallLinkType, -} from '../../types/CallLink.std.js'; +} from '../../types/CallLink.std.ts'; import { callLinkRestrictionsSchema, callLinkRecordSchema, defunctCallLinkRecordSchema, -} from '../../types/CallLink.std.js'; -import { toAdminKeyBytes } from '../../util/callLinks.std.js'; +} from '../../types/CallLink.std.ts'; +import { toAdminKeyBytes } from '../../util/callLinks.std.ts'; import { callLinkToRecord, callLinkFromRecord, defunctCallLinkToRecord, defunctCallLinkFromRecord, -} from '../../util/callLinksRingrtc.node.js'; -import type { ReadableDB, WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../util/callLinksRingrtc.node.ts'; +import type { ReadableDB, WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; import { CallStatusValue, DirectCallStatus, -} from '../../types/CallDisposition.std.js'; -import { parseStrict, parseUnknown } from '../../util/schemas.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { parseStrict, parseUnknown } from '../../util/schemas.std.ts'; export function callLinkExists(db: ReadableDB, roomId: string): boolean { const [query, params] = sql` diff --git a/ts/sql/server/chatFolders.std.ts b/ts/sql/server/chatFolders.std.ts index d989abf7a9..8029e7420d 100644 --- a/ts/sql/server/chatFolders.std.ts +++ b/ts/sql/server/chatFolders.std.ts @@ -7,12 +7,12 @@ import { CHAT_FOLDER_DELETED_POSITION, ChatFolderType, ALL_CHATS_FOLDER_REQUIRED_PARAMS, -} from '../../types/ChatFolder.std.js'; -import type { ReadableDB, WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { CurrentChatFolder } from '../../types/CurrentChatFolders.std.js'; -import { isCurrentChatFolder } from '../../types/CurrentChatFolders.std.js'; +} from '../../types/ChatFolder.std.ts'; +import type { ReadableDB, WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { CurrentChatFolder } from '../../types/CurrentChatFolders.std.ts'; +import { isCurrentChatFolder } from '../../types/CurrentChatFolders.std.ts'; export type ChatFolderRow = Readonly< Omit< diff --git a/ts/sql/server/donationReceipts.std.ts b/ts/sql/server/donationReceipts.std.ts index d978643c66..d141ff2591 100644 --- a/ts/sql/server/donationReceipts.std.ts +++ b/ts/sql/server/donationReceipts.std.ts @@ -1,10 +1,10 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { sql } from '../util.std.js'; +import { sql } from '../util.std.ts'; -import type { DonationReceipt } from '../../types/Donations.std.js'; -import type { ReadableDB, WritableDB } from '../Interface.std.js'; +import type { DonationReceipt } from '../../types/Donations.std.ts'; +import type { ReadableDB, WritableDB } from '../Interface.std.ts'; export function getAllDonationReceipts(db: ReadableDB): Array { const donationReceipts = db diff --git a/ts/sql/server/groupSendEndorsements.std.ts b/ts/sql/server/groupSendEndorsements.std.ts index 4b704ed241..4ee4ba6c1d 100644 --- a/ts/sql/server/groupSendEndorsements.std.ts +++ b/ts/sql/server/groupSendEndorsements.std.ts @@ -5,17 +5,17 @@ import type { GroupSendCombinedEndorsementRecord, GroupSendEndorsementsData, GroupSendMemberEndorsementRecord, -} from '../../types/GroupSendEndorsements.std.js'; +} from '../../types/GroupSendEndorsements.std.ts'; import { groupSendEndorsementExpirationSchema, groupSendMemberEndorsementSchema, groupSendEndorsementsDataSchema, -} from '../../types/GroupSendEndorsements.std.js'; -import type { ReadableDB, WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { parseLoose, parseUnknown } from '../../util/schemas.std.js'; +} from '../../types/GroupSendEndorsements.std.ts'; +import type { ReadableDB, WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { parseLoose, parseUnknown } from '../../util/schemas.std.ts'; /** * We don't need to store more than one endorsement per group or per member. diff --git a/ts/sql/server/keyTransparency.std.ts b/ts/sql/server/keyTransparency.std.ts index d9980dd75e..aa6dd515b9 100644 --- a/ts/sql/server/keyTransparency.std.ts +++ b/ts/sql/server/keyTransparency.std.ts @@ -1,8 +1,8 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from '../../types/ServiceId.std.js'; -import type { ReadableDB, WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import type { ReadableDB, WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; export function getAllKTAcis(db: ReadableDB): Array { const [query, params] = sql` diff --git a/ts/sql/server/megaphones.std.ts b/ts/sql/server/megaphones.std.ts index 0f2513115d..de5ab5a236 100644 --- a/ts/sql/server/megaphones.std.ts +++ b/ts/sql/server/megaphones.std.ts @@ -1,12 +1,12 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ReadableDB, WritableDB } from '../Interface.std.js'; -import { sql } from '../util.std.js'; +import type { ReadableDB, WritableDB } from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; import type { RemoteMegaphoneId, RemoteMegaphoneType, -} from '../../types/Megaphone.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../types/Megaphone.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; type MegaphoneRow = Readonly< Omit< diff --git a/ts/sql/server/messageAttachments.std.ts b/ts/sql/server/messageAttachments.std.ts index 8cd1e286ca..5f1042ac8c 100644 --- a/ts/sql/server/messageAttachments.std.ts +++ b/ts/sql/server/messageAttachments.std.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; -import { convertUndefinedToNull } from '../../util/dropNull.std.js'; -import { messageAttachmentTypeSchema } from '../../types/AttachmentDownload.std.js'; -import { APPLICATION_OCTET_STREAM } from '../../types/MIME.std.js'; -import type { MessageAttachmentDBType } from '../Interface.std.js'; +import { convertUndefinedToNull } from '../../util/dropNull.std.ts'; +import { messageAttachmentTypeSchema } from '../../types/AttachmentDownload.std.ts'; +import { APPLICATION_OCTET_STREAM } from '../../types/MIME.std.ts'; +import type { MessageAttachmentDBType } from '../Interface.std.ts'; const permissiveStringOrNull = z .string() diff --git a/ts/sql/server/pinnedMessages.std.ts b/ts/sql/server/pinnedMessages.std.ts index 354da8dbdd..59528c62d6 100644 --- a/ts/sql/server/pinnedMessages.std.ts +++ b/ts/sql/server/pinnedMessages.std.ts @@ -6,16 +6,16 @@ import type { PinnedMessageId, PinnedMessageParams, PinnedMessagePreloadData, -} from '../../types/PinnedMessage.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { hydrateMessage } from '../hydration.std.js'; +} from '../../types/PinnedMessage.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { hydrateMessage } from '../hydration.std.ts'; import type { MessageTypeUnhydrated, MessageType, ReadableDB, WritableDB, -} from '../Interface.std.js'; -import { sql } from '../util.std.js'; +} from '../Interface.std.ts'; +import { sql } from '../util.std.ts'; function _getMessageById( db: ReadableDB, diff --git a/ts/sql/sqlLogger.node.ts b/ts/sql/sqlLogger.node.ts index 2fa519f708..091e67a75c 100644 --- a/ts/sql/sqlLogger.node.ts +++ b/ts/sql/sqlLogger.node.ts @@ -3,13 +3,13 @@ import { parentPort } from 'node:worker_threads'; import { format } from 'node:util'; -import type { LoggerType } from '../types/Logging.std.js'; +import type { LoggerType } from '../types/Logging.std.ts'; import type { WrappedWorkerLogEntry, WrappedWorkerResponse, -} from './main.main.js'; -import { consoleLogger } from '../util/consoleLogger.std.js'; -import { strictAssert } from '../util/assert.std.js'; +} from './main.main.ts'; +import { consoleLogger } from '../util/consoleLogger.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; class SQLLogger { #msgPrefix: string; diff --git a/ts/sql/util.std.ts b/ts/sql/util.std.ts index e4da3a0138..49a8b4220d 100644 --- a/ts/sql/util.std.ts +++ b/ts/sql/util.std.ts @@ -3,9 +3,9 @@ import lodash from 'lodash'; -import type { ReadableDB, WritableDB } from './Interface.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import type { ReadableDB, WritableDB } from './Interface.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; const { isNumber, last } = lodash; diff --git a/ts/state/actions.preload.ts b/ts/state/actions.preload.ts index 8beb3715eb..f84ec4f313 100644 --- a/ts/state/actions.preload.ts +++ b/ts/state/actions.preload.ts @@ -1,43 +1,43 @@ // Copyright 2019 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { actions as accounts } from './ducks/accounts.preload.js'; -import { actions as app } from './ducks/app.preload.js'; -import { actions as audioPlayer } from './ducks/audioPlayer.preload.js'; -import { actions as audioRecorder } from './ducks/audioRecorder.preload.js'; -import { actions as backups } from './ducks/backups.preload.js'; -import { actions as badges } from './ducks/badges.preload.js'; -import { actions as callHistory } from './ducks/callHistory.preload.js'; -import { actions as calling } from './ducks/calling.preload.js'; -import { actions as chatFolders } from './ducks/chatFolders.preload.js'; -import { actions as composer } from './ducks/composer.preload.js'; -import { actions as conversations } from './ducks/conversations.preload.js'; -import { actions as crashReports } from './ducks/crashReports.preload.js'; -import { actions as donations } from './ducks/donations.preload.js'; -import { actions as emojis } from './ducks/emojis.preload.js'; -import { actions as expiration } from './ducks/expiration.std.js'; -import { actions as gifs } from './ducks/gifs.preload.js'; -import { actions as globalModals } from './ducks/globalModals.preload.js'; -import { actions as inbox } from './ducks/inbox.std.js'; -import { actions as installer } from './ducks/installer.preload.js'; -import { actions as items } from './ducks/items.preload.js'; -import { actions as lightbox } from './ducks/lightbox.preload.js'; -import { actions as linkPreviews } from './ducks/linkPreviews.preload.js'; -import { actions as mediaGallery } from './ducks/mediaGallery.preload.js'; -import { actions as megaphones } from './ducks/megaphones.preload.js'; -import { actions as nav } from './ducks/nav.std.js'; -import { actions as network } from './ducks/network.dom.js'; -import { actions as notificationProfiles } from './ducks/notificationProfiles.preload.js'; -import { actions as safetyNumber } from './ducks/safetyNumber.preload.js'; -import { actions as search } from './ducks/search.preload.js'; -import { actions as stickers } from './ducks/stickers.preload.js'; -import { actions as stories } from './ducks/stories.preload.js'; -import { actions as storyDistributionLists } from './ducks/storyDistributionLists.preload.js'; -import { actions as toast } from './ducks/toast.preload.js'; -import { actions as updates } from './ducks/updates.preload.js'; -import { actions as user } from './ducks/user.preload.js'; -import { actions as username } from './ducks/username.preload.js'; -import type { ReduxActions } from './types.std.js'; +import { actions as accounts } from './ducks/accounts.preload.ts'; +import { actions as app } from './ducks/app.preload.ts'; +import { actions as audioPlayer } from './ducks/audioPlayer.preload.ts'; +import { actions as audioRecorder } from './ducks/audioRecorder.preload.ts'; +import { actions as backups } from './ducks/backups.preload.ts'; +import { actions as badges } from './ducks/badges.preload.ts'; +import { actions as callHistory } from './ducks/callHistory.preload.ts'; +import { actions as calling } from './ducks/calling.preload.ts'; +import { actions as chatFolders } from './ducks/chatFolders.preload.ts'; +import { actions as composer } from './ducks/composer.preload.ts'; +import { actions as conversations } from './ducks/conversations.preload.ts'; +import { actions as crashReports } from './ducks/crashReports.preload.ts'; +import { actions as donations } from './ducks/donations.preload.ts'; +import { actions as emojis } from './ducks/emojis.preload.ts'; +import { actions as expiration } from './ducks/expiration.std.ts'; +import { actions as gifs } from './ducks/gifs.preload.ts'; +import { actions as globalModals } from './ducks/globalModals.preload.ts'; +import { actions as inbox } from './ducks/inbox.std.ts'; +import { actions as installer } from './ducks/installer.preload.ts'; +import { actions as items } from './ducks/items.preload.ts'; +import { actions as lightbox } from './ducks/lightbox.preload.ts'; +import { actions as linkPreviews } from './ducks/linkPreviews.preload.ts'; +import { actions as mediaGallery } from './ducks/mediaGallery.preload.ts'; +import { actions as megaphones } from './ducks/megaphones.preload.ts'; +import { actions as nav } from './ducks/nav.std.ts'; +import { actions as network } from './ducks/network.dom.ts'; +import { actions as notificationProfiles } from './ducks/notificationProfiles.preload.ts'; +import { actions as safetyNumber } from './ducks/safetyNumber.preload.ts'; +import { actions as search } from './ducks/search.preload.ts'; +import { actions as stickers } from './ducks/stickers.preload.ts'; +import { actions as stories } from './ducks/stories.preload.ts'; +import { actions as storyDistributionLists } from './ducks/storyDistributionLists.preload.ts'; +import { actions as toast } from './ducks/toast.preload.ts'; +import { actions as updates } from './ducks/updates.preload.ts'; +import { actions as user } from './ducks/user.preload.ts'; +import { actions as username } from './ducks/username.preload.ts'; +import type { ReduxActions } from './types.std.ts'; export const actionCreators: ReduxActions = { accounts, diff --git a/ts/state/createStore.preload.ts b/ts/state/createStore.preload.ts index a8e117e10a..69c89a315c 100644 --- a/ts/state/createStore.preload.ts +++ b/ts/state/createStore.preload.ts @@ -8,13 +8,13 @@ import promise from 'redux-promise-middleware'; import { thunk } from 'redux-thunk'; import { createLogger as createReduxLogger } from 'redux-logger'; -import { createLogger } from '../logging/log.std.js'; -import type { StateType } from './reducer.preload.js'; -import { reducer } from './reducer.preload.js'; -import { dispatchItemsMiddleware } from '../shims/dispatchItemsMiddleware.preload.js'; -import { isOlderThan } from '../util/timestamp.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { getEnvironment } from '../environment.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import type { StateType } from './reducer.preload.ts'; +import { reducer } from './reducer.preload.ts'; +import { dispatchItemsMiddleware } from '../shims/dispatchItemsMiddleware.preload.ts'; +import { isOlderThan } from '../util/timestamp.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { getEnvironment } from '../environment.std.ts'; const log = createLogger('createStore'); diff --git a/ts/state/ducks/accounts.preload.ts b/ts/state/ducks/accounts.preload.ts index c8bb877c7d..15ad58c954 100644 --- a/ts/state/ducks/accounts.preload.ts +++ b/ts/state/ducks/accounts.preload.ts @@ -4,17 +4,17 @@ import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import * as Errors from '../../types/errors.std.js'; -import { cdsLookup } from '../../textsecure/WebAPI.preload.js'; -import { createLogger } from '../../logging/log.std.js'; +import * as Errors from '../../types/errors.std.ts'; +import { cdsLookup } from '../../textsecure/WebAPI.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { getServiceIdsForE164s } from '../../util/getServiceIdsForE164s.dom.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { getServiceIdsForE164s } from '../../util/getServiceIdsForE164s.dom.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; -import type { NoopActionType } from './noop.std.js'; +import type { NoopActionType } from './noop.std.ts'; const log = createLogger('accounts'); diff --git a/ts/state/ducks/app.preload.ts b/ts/state/ducks/app.preload.ts index ddda047dc6..7ccdc0c6f0 100644 --- a/ts/state/ducks/app.preload.ts +++ b/ts/state/ducks/app.preload.ts @@ -3,17 +3,17 @@ import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { getEnvironment, Environment } from '../../environment.std.js'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { getEnvironment, Environment } from '../../environment.std.ts'; import { START_INSTALLER, type StartInstallerActionType, SHOW_BACKUP_IMPORT, type ShowBackupImportActionType, -} from './installer.preload.js'; +} from './installer.preload.ts'; const log = createLogger('app'); diff --git a/ts/state/ducks/audioPlayer.preload.ts b/ts/state/ducks/audioPlayer.preload.ts index 0025f99d97..0136017da7 100644 --- a/ts/state/ducks/audioPlayer.preload.ts +++ b/ts/state/ducks/audioPlayer.preload.ts @@ -3,17 +3,17 @@ import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import { setVoiceNotePlaybackRate } from './conversations.preload.js'; -import { extractVoiceNoteForPlayback } from '../selectors/audioPlayer.preload.js'; -import { getUserConversationId } from '../selectors/user.std.js'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import { setVoiceNotePlaybackRate } from './conversations.preload.ts'; +import { extractVoiceNoteForPlayback } from '../selectors/audioPlayer.preload.ts'; +import { getUserConversationId } from '../selectors/user.std.ts'; import type { VoiceNoteAndConsecutiveForPlayback, VoiceNoteForPlayback, -} from '../selectors/audioPlayer.preload.js'; +} from '../selectors/audioPlayer.preload.ts'; import type { MessagesAddedActionType, @@ -21,15 +21,15 @@ import type { MessageChangedActionType, TargetedConversationChangedActionType, ConversationsUpdatedActionType, -} from './conversations.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { isAudio } from '../../util/Attachment.std.js'; -import { getLocalAttachmentUrl } from '../../util/getLocalAttachmentUrl.std.js'; -import { assertDev } from '../../util/assert.std.js'; -import { drop } from '../../util/drop.std.js'; +} from './conversations.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { isAudio } from '../../util/Attachment.std.ts'; +import { getLocalAttachmentUrl } from '../../util/getLocalAttachmentUrl.std.ts'; +import { assertDev } from '../../util/assert.std.ts'; +import { drop } from '../../util/drop.std.ts'; import type { RenderingContextType } from '../../types/RenderingContext.d.ts'; -import { Sound, SoundType } from '../../util/Sound.std.js'; -import { DataReader } from '../../sql/Client.preload.js'; +import { Sound, SoundType } from '../../util/Sound.std.ts'; +import { DataReader } from '../../sql/Client.preload.ts'; const stateChangeConfirmUpSound = new Sound({ soundType: SoundType.VoiceNoteEnd, diff --git a/ts/state/ducks/audioRecorder.preload.ts b/ts/state/ducks/audioRecorder.preload.ts index 2fe3da3e7b..9692746b33 100644 --- a/ts/state/ducks/audioRecorder.preload.ts +++ b/ts/state/ducks/audioRecorder.preload.ts @@ -5,23 +5,23 @@ import type { ThunkAction } from 'redux-thunk'; import { v4 as generateUuid } from 'uuid'; import type { ReadonlyDeep } from 'type-fest'; -import { createLogger } from '../../logging/log.std.js'; -import type { InMemoryAttachmentDraftType } from '../../types/Attachment.std.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import { fileToBytes } from '../../util/fileToBytes.std.js'; -import { recorder } from '../../services/audioRecorder.dom.js'; -import { stringToMIMEType } from '../../types/MIME.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { getComposerStateForConversation } from './composer.preload.js'; +import { createLogger } from '../../logging/log.std.ts'; +import type { InMemoryAttachmentDraftType } from '../../types/Attachment.std.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import { fileToBytes } from '../../util/fileToBytes.std.ts'; +import { recorder } from '../../services/audioRecorder.dom.ts'; +import { stringToMIMEType } from '../../types/MIME.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { getComposerStateForConversation } from './composer.preload.ts'; -import * as Errors from '../../types/errors.std.js'; +import * as Errors from '../../types/errors.std.ts'; import { ErrorDialogAudioRecorderType, RecordingState, -} from '../../types/AudioRecorder.std.js'; -import { getSelectedConversationId } from '../selectors/nav.std.js'; +} from '../../types/AudioRecorder.std.ts'; +import { getSelectedConversationId } from '../selectors/nav.std.ts'; const log = createLogger('audioRecorder'); diff --git a/ts/state/ducks/backups.preload.ts b/ts/state/ducks/backups.preload.ts index cd42209335..b40d19adea 100644 --- a/ts/state/ducks/backups.preload.ts +++ b/ts/state/ducks/backups.preload.ts @@ -7,13 +7,13 @@ import { ipcRenderer } from 'electron'; import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import { createLogger } from '../../logging/log.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { getBackups, getPlaintextWorkflow } from '../selectors/backups.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import { promptOSAuth } from '../../util/promptOSAuth.preload.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { backupsService } from '../../services/backups/index.preload.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { getBackups, getPlaintextWorkflow } from '../selectors/backups.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { promptOSAuth } from '../../util/promptOSAuth.preload.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { backupsService } from '../../services/backups/index.preload.ts'; import { NotEnoughStorageError, LocalExportErrors, @@ -23,18 +23,18 @@ import { plaintextExportValidTransitions, LocalBackupExportSteps, localBackupExportValidTransitions, -} from '../../types/LocalExport.std.js'; +} from '../../types/LocalExport.std.ts'; -import type { StateType } from '../reducer.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; import type { PlaintextExportWorkflowType, LocalBackupExportWorkflowType, LocalExportErrorDetails, -} from '../../types/LocalExport.std.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import { toLogFormat } from '../../types/errors.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../types/LocalExport.std.ts'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import { toLogFormat } from '../../types/errors.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const log = createLogger('ducks/backups'); diff --git a/ts/state/ducks/badges.preload.ts b/ts/state/ducks/badges.preload.ts index 5dde061796..09611a0b50 100644 --- a/ts/state/ducks/badges.preload.ts +++ b/ts/state/ducks/badges.preload.ts @@ -4,13 +4,13 @@ import type { ThunkAction } from 'redux-thunk'; import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import { DataWriter } from '../../sql/Client.preload.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import type { BadgeType, BadgeImageType } from '../../badges/types.std.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import { badgeImageFileDownloader } from '../../badges/badgeImageFileDownloader.preload.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import type { BadgeType, BadgeImageType } from '../../badges/types.std.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import { badgeImageFileDownloader } from '../../badges/badgeImageFileDownloader.preload.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; const { isEqual, mapValues } = lodash; diff --git a/ts/state/ducks/callHistory.preload.ts b/ts/state/ducks/callHistory.preload.ts index 10e9ec6773..28e54e6a95 100644 --- a/ts/state/ducks/callHistory.preload.ts +++ b/ts/state/ducks/callHistory.preload.ts @@ -4,38 +4,38 @@ import type { ReadonlyDeep } from 'type-fest'; import type { ThunkAction, ThunkDispatch } from 'redux-thunk'; import lodash from 'lodash'; -import type { StateType as RootStateType } from '../reducer.preload.js'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; import { clearCallHistoryDataAndSync, markAllCallHistoryReadAndSync, -} from '../../util/callDisposition.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import type { ToastActionType } from './toast.preload.js'; -import { showToast } from './toast.preload.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { ToastType } from '../../types/Toast.dom.js'; +} from '../../util/callDisposition.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import type { ToastActionType } from './toast.preload.ts'; +import { showToast } from './toast.preload.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; import { ClearCallHistoryResult, type CallHistoryDetails, -} from '../../types/CallDisposition.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; import { getCallHistoryLatestCall, getCallHistorySelector, -} from '../selectors/callHistory.std.js'; +} from '../selectors/callHistory.std.ts'; import { getCallsHistoryForRedux, getCallsHistoryUnreadCountForRedux, loadCallHistory, -} from '../../services/callHistoryLoader.preload.js'; -import { makeLookup } from '../../util/makeLookup.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import { ButtonVariant } from '../../components/Button.dom.js'; -import type { ShowErrorModalActionType } from './globalModals.preload.js'; -import { SHOW_ERROR_MODAL } from './globalModals.preload.js'; +} from '../../services/callHistoryLoader.preload.ts'; +import { makeLookup } from '../../util/makeLookup.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { ButtonVariant } from '../../components/Button.dom.tsx'; +import type { ShowErrorModalActionType } from './globalModals.preload.ts'; +import { SHOW_ERROR_MODAL } from './globalModals.preload.ts'; const { debounce, omit } = lodash; diff --git a/ts/state/ducks/calling.preload.ts b/ts/state/ducks/calling.preload.ts index 42d89ae7b7..0e3e016f11 100644 --- a/ts/state/ducks/calling.preload.ts +++ b/ts/state/ducks/calling.preload.ts @@ -11,20 +11,20 @@ import { type Reaction as CallReaction, type CallSummary, } from '@signalapp/ringrtc'; -import { getOwn } from '../../util/getOwn.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { getIntl, getPlatform } from '../selectors/user.std.js'; -import { isConversationTooBigToRing } from '../../conversations/isConversationTooBigToRing.dom.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { drop } from '../../util/drop.std.js'; +import { getOwn } from '../../util/getOwn.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { getIntl, getPlatform } from '../selectors/user.std.ts'; +import { isConversationTooBigToRing } from '../../conversations/isConversationTooBigToRing.dom.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { drop } from '../../util/drop.std.ts'; import { DesktopCapturer, isNativeMacScreenShareSupported, type DesktopCapturerBaton, -} from '../../util/desktopCapturer.preload.js'; -import { calling } from '../../services/calling.preload.js'; -import { truncateAudioLevel } from '../../calling/truncateAudioLevel.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; +} from '../../util/desktopCapturer.preload.ts'; +import { calling } from '../../services/calling.preload.ts'; +import { truncateAudioLevel } from '../../calling/truncateAudioLevel.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; import type { ActiveCallReaction, ActiveCallReactionsType, @@ -35,13 +35,13 @@ import type { PresentedSource, PresentableSource, RemoveClientType, -} from '../../types/Calling.std.js'; +} from '../../types/Calling.std.ts'; import { isCallLinkAdmin, type CallLinkRestrictions, type CallLinkStateType, type CallLinkType, -} from '../../types/CallLink.std.js'; +} from '../../types/CallLink.std.ts'; import { CALLING_REACTIONS_LIFETIME, MAX_CALLING_REACTIONS, @@ -51,85 +51,85 @@ import { CallState, GroupCallConnectionState, GroupCallJoinState, -} from '../../types/Calling.std.js'; -import { CallMode } from '../../types/CallDisposition.std.js'; -import { callingTones } from '../../util/callingTones.preload.js'; -import { requestCameraPermissions } from '../../util/callingPermissions.dom.js'; +} from '../../types/Calling.std.ts'; +import { CallMode } from '../../types/CallDisposition.std.ts'; +import { callingTones } from '../../util/callingTones.preload.ts'; +import { requestCameraPermissions } from '../../util/callingPermissions.dom.ts'; import { CALL_LINK_DEFAULT_STATE, toAdminKeyBytes, toCallHistoryFromUnusedCallLink, -} from '../../util/callLinks.std.js'; -import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.js'; -import { sendCallLinkUpdateSync } from '../../util/sendCallLinkUpdateSync.preload.js'; -import { sleep } from '../../util/sleep.std.js'; -import { LatestQueue } from '../../util/LatestQueue.std.js'; -import type { AciString, ServiceIdString } from '../../types/ServiceId.std.js'; +} from '../../util/callLinks.std.ts'; +import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.ts'; +import { sendCallLinkUpdateSync } from '../../util/sendCallLinkUpdateSync.preload.ts'; +import { sleep } from '../../util/sleep.std.ts'; +import { LatestQueue } from '../../util/LatestQueue.std.ts'; +import type { AciString, ServiceIdString } from '../../types/ServiceId.std.ts'; import type { ConversationsUpdatedActionType, ConversationRemovedActionType, -} from './conversations.preload.js'; -import { updateLastMessage } from './conversations.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getConversationCallMode } from '../../util/getConversationCallMode.std.js'; -import { waitForOnline } from '../../util/waitForOnline.dom.js'; -import * as mapUtil from '../../util/mapUtil.std.js'; -import { isCallSafe } from '../../util/isCallSafe.dom.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; -import { SHOW_TOAST } from './toast.preload.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import type { ShowToastActionType } from './toast.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +} from './conversations.preload.ts'; +import { updateLastMessage } from './conversations.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getConversationCallMode } from '../../util/getConversationCallMode.std.ts'; +import { waitForOnline } from '../../util/waitForOnline.dom.ts'; +import * as mapUtil from '../../util/mapUtil.std.ts'; +import { isCallSafe } from '../../util/isCallSafe.dom.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; +import { SHOW_TOAST } from './toast.preload.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import type { ShowToastActionType } from './toast.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; import { isAnybodyElseInGroupCall, isAnybodyInGroupCall, MAX_CALL_PARTICIPANTS_FOR_DEFAULT_MUTE, -} from './callingHelpers.std.js'; -import { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.js'; +} from './callingHelpers.std.ts'; +import { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.ts'; import { isGroupOrAdhocCallMode, isGroupOrAdhocCallState, -} from '../../util/isGroupOrAdhocCall.std.js'; +} from '../../util/isGroupOrAdhocCall.std.ts'; import type { CallQualitySurveyPropsType, HideCallQualitySurveyActionType, ShowCallQualitySurveyActionType, ShowErrorModalActionType, ToggleConfirmLeaveCallModalActionType, -} from './globalModals.preload.js'; +} from './globalModals.preload.ts'; import { SHOW_CALL_QUALITY_SURVEY, SHOW_ERROR_MODAL, toggleConfirmLeaveCallModal, hideCallQualitySurvey, -} from './globalModals.preload.js'; -import { CallQualitySurvey } from '../../types/CallQualitySurvey.std.js'; -import { isCallFailure } from '../../util/callQualitySurvey.dom.js'; -import { ButtonVariant } from '../../components/Button.dom.js'; -import { getConversationIdForLogging } from '../../util/idForLogging.preload.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import type { CallHistoryAdd } from './callHistory.preload.js'; -import { addCallHistory, reloadCallHistory } from './callHistory.preload.js'; -import { saveDraftRecordingIfNeeded } from './composer.preload.js'; -import type { StartCallData } from '../../components/ConfirmLeaveCallModal.dom.js'; +} from './globalModals.preload.ts'; +import { CallQualitySurvey } from '../../types/CallQualitySurvey.std.ts'; +import { isCallFailure } from '../../util/callQualitySurvey.dom.ts'; +import { ButtonVariant } from '../../components/Button.dom.tsx'; +import { getConversationIdForLogging } from '../../util/idForLogging.preload.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import type { CallHistoryAdd } from './callHistory.preload.ts'; +import { addCallHistory, reloadCallHistory } from './callHistory.preload.ts'; +import { saveDraftRecordingIfNeeded } from './composer.preload.ts'; +import type { StartCallData } from '../../components/ConfirmLeaveCallModal.dom.tsx'; import { getCallLinksByRoomId, getPresentingSource, -} from '../selectors/calling.std.js'; -import { storageServiceUploadJob } from '../../services/storage.preload.js'; -import { CallLinkFinalizeDeleteManager } from '../../jobs/CallLinkFinalizeDeleteManager.preload.js'; -import { callLinkRefreshJobQueue } from '../../jobs/callLinkRefreshJobQueue.preload.js'; +} from '../selectors/calling.std.ts'; +import { storageServiceUploadJob } from '../../services/storage.preload.ts'; +import { CallLinkFinalizeDeleteManager } from '../../jobs/CallLinkFinalizeDeleteManager.preload.ts'; +import { callLinkRefreshJobQueue } from '../../jobs/callLinkRefreshJobQueue.preload.ts'; import { isOnline, submitCallQualitySurvey as submitCallQualitySurveyToServer, -} from '../../textsecure/WebAPI.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import type { SizeCallbackType } from '../../calling/VideoSupport.preload.js'; -import type { NoopActionType } from './noop.std.js'; -import type { SignalService } from '../../protobuf/index.std.js'; +} from '../../textsecure/WebAPI.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import type { SizeCallbackType } from '../../calling/VideoSupport.preload.ts'; +import type { NoopActionType } from './noop.std.ts'; +import type { SignalService } from '../../protobuf/index.std.ts'; const { omit } = lodash; diff --git a/ts/state/ducks/callingHelpers.std.ts b/ts/state/ducks/callingHelpers.std.ts index fe30fefe5a..151711a986 100644 --- a/ts/state/ducks/callingHelpers.std.ts +++ b/ts/state/ducks/callingHelpers.std.ts @@ -7,11 +7,11 @@ import { CallState, GroupCallConnectionState, GroupCallJoinState, -} from '../../types/Calling.std.js'; -import { CallMode } from '../../types/CallDisposition.std.js'; +} from '../../types/Calling.std.ts'; +import { CallMode } from '../../types/CallDisposition.std.ts'; -import type { CallingConversationType } from '../../types/Calling.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; +import type { CallingConversationType } from '../../types/Calling.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; import type { DirectCallStateType, CallsByConversationType, @@ -19,7 +19,7 @@ import type { GroupCallStateType, GroupCallParticipantInfoType, ActiveCallStateType, -} from './calling.preload.js'; +} from './calling.preload.ts'; export const MAX_CALL_PARTICIPANTS_FOR_DEFAULT_MUTE = 8; diff --git a/ts/state/ducks/chatFolders.preload.ts b/ts/state/ducks/chatFolders.preload.ts index 381f89d04b..7447d7684c 100644 --- a/ts/state/ducks/chatFolders.preload.ts +++ b/ts/state/ducks/chatFolders.preload.ts @@ -4,33 +4,33 @@ import type { ReadonlyDeep } from 'type-fest'; import { v4 as generateUuid } from 'uuid'; import type { ThunkAction } from 'redux-thunk'; import { throttle } from 'lodash'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; import { ChatFolderParamsSchema, isConversationInChatFolder, type ChatFolder, type ChatFolderId, type ChatFolderParams, -} from '../../types/ChatFolder.std.js'; +} from '../../types/ChatFolder.std.ts'; import { getCurrentChatFolders, getSelectedChatFolder, -} from '../selectors/chatFolders.std.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { storageServiceUploadJob } from '../../services/storage.preload.js'; -import { parseStrict } from '../../util/schemas.std.js'; -import { chatFolderCleanupService } from '../../services/expiring/chatFolderCleanupService.preload.js'; -import { drop } from '../../util/drop.std.js'; -import type { ShowToastActionType } from './toast.preload.js'; -import { showToast } from './toast.preload.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import type { CurrentChatFolder } from '../../types/CurrentChatFolders.std.js'; -import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.js'; -import { getConversationLookup } from '../selectors/conversations.dom.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../selectors/chatFolders.std.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { storageServiceUploadJob } from '../../services/storage.preload.ts'; +import { parseStrict } from '../../util/schemas.std.ts'; +import { chatFolderCleanupService } from '../../services/expiring/chatFolderCleanupService.preload.ts'; +import { drop } from '../../util/drop.std.ts'; +import type { ShowToastActionType } from './toast.preload.ts'; +import { showToast } from './toast.preload.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import type { CurrentChatFolder } from '../../types/CurrentChatFolders.std.ts'; +import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.ts'; +import { getConversationLookup } from '../selectors/conversations.dom.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; export type ChatFoldersState = ReadonlyDeep<{ currentChatFolders: CurrentChatFolders; diff --git a/ts/state/ducks/composer.preload.ts b/ts/state/ducks/composer.preload.ts index 49bf505c50..5e003cafcf 100644 --- a/ts/state/ducks/composer.preload.ts +++ b/ts/state/ducks/composer.preload.ts @@ -10,47 +10,47 @@ import type { ReadonlyDeep } from 'type-fest'; import type { AddLinkPreviewActionType, RemoveLinkPreviewActionType, -} from './linkPreviews.preload.js'; +} from './linkPreviews.preload.ts'; import type { AttachmentType, AttachmentDraftType, InMemoryAttachmentDraftType, -} from '../../types/Attachment.std.js'; +} from '../../types/Attachment.std.ts'; import { isImageAttachment, isVideoAttachment, -} from '../../util/Attachment.std.js'; -import { isViewOnceEligible } from '../../util/viewOnceEligibility.std.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import type { DraftBodyRanges } from '../../types/BodyRange.std.js'; -import type { LinkPreviewForUIType } from '../../types/message/LinkPreviews.std.js'; +} from '../../util/Attachment.std.ts'; +import { isViewOnceEligible } from '../../util/viewOnceEligibility.std.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import type { DraftBodyRanges } from '../../types/BodyRange.std.ts'; +import type { LinkPreviewForUIType } from '../../types/message/LinkPreviews.std.ts'; import type { PinMessageData, ReadonlyMessageAttributesType, } from '../../model-types.d.ts'; -import type { NoopActionType } from './noop.std.js'; -import type { ShowToastActionType } from './toast.preload.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import type { PollCreateType } from '../../types/Polls.dom.js'; -import { enqueuePollCreateForSend } from '../../util/enqueuePollCreateForSend.dom.js'; +import type { NoopActionType } from './noop.std.ts'; +import type { ShowToastActionType } from './toast.preload.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import type { PollCreateType } from '../../types/Polls.dom.ts'; +import { enqueuePollCreateForSend } from '../../util/enqueuePollCreateForSend.dom.ts'; import { ADD_PREVIEW as ADD_LINK_PREVIEW, REMOVE_PREVIEW as REMOVE_LINK_PREVIEW, -} from './linkPreviews.preload.js'; -import { LinkPreviewSourceType } from '../../types/LinkPreview.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { completeRecording, getIsRecording } from './audioRecorder.preload.js'; -import { SHOW_TOAST, showToast } from './toast.preload.js'; -import type { AnyToast } from '../../types/Toast.dom.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.js'; -import { assignWithNoUnnecessaryAllocation } from '../../util/assignWithNoUnnecessaryAllocation.std.js'; -import { blockSendUntilConversationsAreVerified } from '../../util/blockSendUntilConversationsAreVerified.dom.js'; -import { clearConversationDraftAttachments } from '../../util/clearConversationDraftAttachments.preload.js'; -import { deleteDraftAttachment } from '../../util/deleteDraftAttachment.preload.js'; +} from './linkPreviews.preload.ts'; +import { LinkPreviewSourceType } from '../../types/LinkPreview.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { completeRecording, getIsRecording } from './audioRecorder.preload.ts'; +import { SHOW_TOAST, showToast } from './toast.preload.ts'; +import type { AnyToast } from '../../types/Toast.dom.tsx'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.ts'; +import { assignWithNoUnnecessaryAllocation } from '../../util/assignWithNoUnnecessaryAllocation.std.ts'; +import { blockSendUntilConversationsAreVerified } from '../../util/blockSendUntilConversationsAreVerified.dom.ts'; +import { clearConversationDraftAttachments } from '../../util/clearConversationDraftAttachments.preload.ts'; +import { deleteDraftAttachment } from '../../util/deleteDraftAttachment.preload.ts'; import { getLinkPreviewForSend, hasLinkPreviewLoaded, @@ -58,57 +58,57 @@ import { removeLinkPreview, resetLinkPreview, suspendLinkPreviews, -} from '../../services/LinkPreview.preload.js'; +} from '../../services/LinkPreview.preload.ts'; import { getMaximumOutgoingAttachmentSizeInKb, getRenderDetailsForLimit, KIBIBYTE, -} from '../../types/AttachmentSize.std.js'; -import { getValue as getRemoteConfigValue } from '../../RemoteConfig.dom.js'; -import { getRecipientsByConversation } from '../../util/getRecipientsByConversation.dom.js'; -import { processAttachment } from '../../util/processAttachment.preload.js'; -import { hasDraftAttachments } from '../../util/hasDraftAttachments.std.js'; -import { isFileDangerous } from '../../util/isFileDangerous.std.js'; -import { stringToMIMEType } from '../../types/MIME.std.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import { replaceIndex } from '../../util/replaceIndex.std.js'; -import { resolveAttachmentDraftData } from '../../util/resolveAttachmentDraftData.preload.js'; -import { resolveDraftAttachmentOnDisk } from '../../util/resolveDraftAttachmentOnDisk.preload.js'; -import { shouldShowInvalidMessageToast } from '../../util/shouldShowInvalidMessageToast.preload.js'; -import { writeDraftAttachment } from '../../util/writeDraftAttachment.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { canReply, isNormalBubble } from '../selectors/message.preload.js'; -import { getAuthorId } from '../../messages/sources.preload.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { enqueueReactionForSend } from '../../reactions/enqueueReactionForSend.preload.js'; -import { enqueuePollTerminateForSend } from '../../polls/enqueuePollTerminateForSend.preload.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +} from '../../types/AttachmentSize.std.ts'; +import { getValue as getRemoteConfigValue } from '../../RemoteConfig.dom.ts'; +import { getRecipientsByConversation } from '../../util/getRecipientsByConversation.dom.ts'; +import { processAttachment } from '../../util/processAttachment.preload.ts'; +import { hasDraftAttachments } from '../../util/hasDraftAttachments.std.ts'; +import { isFileDangerous } from '../../util/isFileDangerous.std.ts'; +import { stringToMIMEType } from '../../types/MIME.std.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import { replaceIndex } from '../../util/replaceIndex.std.ts'; +import { resolveAttachmentDraftData } from '../../util/resolveAttachmentDraftData.preload.ts'; +import { resolveDraftAttachmentOnDisk } from '../../util/resolveDraftAttachmentOnDisk.preload.ts'; +import { shouldShowInvalidMessageToast } from '../../util/shouldShowInvalidMessageToast.preload.ts'; +import { writeDraftAttachment } from '../../util/writeDraftAttachment.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { canReply, isNormalBubble } from '../selectors/message.preload.ts'; +import { getAuthorId } from '../../messages/sources.preload.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { enqueueReactionForSend } from '../../reactions/enqueueReactionForSend.preload.ts'; +import { enqueuePollTerminateForSend } from '../../polls/enqueuePollTerminateForSend.preload.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; import { CONVERSATION_UNLOADED, scrollToMessage, -} from './conversations.preload.js'; +} from './conversations.preload.ts'; import type { ConversationUnloadedActionType, TargetedConversationChangedActionType, ScrollToMessageActionType, -} from './conversations.preload.js'; -import { longRunningTaskWrapper } from '../../util/longRunningTaskWrapper.dom.js'; -import { drop } from '../../util/drop.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { makeQuote } from '../../util/makeQuote.preload.js'; -import { sendEditedMessage as doSendEditedMessage } from '../../util/sendEditedMessage.preload.js'; -import { Sound, SoundType } from '../../util/Sound.std.js'; +} from './conversations.preload.ts'; +import { longRunningTaskWrapper } from '../../util/longRunningTaskWrapper.dom.tsx'; +import { drop } from '../../util/drop.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { makeQuote } from '../../util/makeQuote.preload.ts'; +import { sendEditedMessage as doSendEditedMessage } from '../../util/sendEditedMessage.preload.ts'; +import { Sound, SoundType } from '../../util/Sound.std.ts'; import { isImageTypeSupported, isVideoTypeSupported, -} from '../../util/GoogleChrome.std.js'; -import type { StateThunk } from '../types.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../util/GoogleChrome.std.ts'; +import type { StateThunk } from '../types.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; import { getActivePanel, getSelectedConversationId, -} from '../selectors/nav.std.js'; -import { isPoll } from '../../messages/helpers.std.js'; +} from '../selectors/nav.std.ts'; +import { isPoll } from '../../messages/helpers.std.ts'; const { debounce, isEqual } = lodash; diff --git a/ts/state/ducks/conversations.preload.ts b/ts/state/ducks/conversations.preload.ts index 15d3151430..36206fd86c 100644 --- a/ts/state/ducks/conversations.preload.ts +++ b/ts/state/ducks/conversations.preload.ts @@ -7,61 +7,61 @@ import { type PhoneNumber } from 'google-libphonenumber'; import { clipboard, ipcRenderer } from 'electron'; import type { ReadonlyDeep, SetOptional } from 'type-fest'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import * as groups from '../../groups.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { calling } from '../../services/calling.preload.js'; -import { retryPlaceholders } from '../../services/retryPlaceholders.std.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import { hasDraft } from '../../util/hasDraft.std.js'; -import { assertDev, strictAssert } from '../../util/assert.std.js'; -import { drop } from '../../util/drop.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import * as groups from '../../groups.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { calling } from '../../services/calling.preload.ts'; +import { retryPlaceholders } from '../../services/retryPlaceholders.std.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import { hasDraft } from '../../util/hasDraft.std.ts'; +import { assertDev, strictAssert } from '../../util/assert.std.ts'; +import { drop } from '../../util/drop.std.ts'; import { deleteAvatar, writeNewAvatarData, getUnusedFilename, readAttachmentData, saveAttachmentToDisk, -} from '../../util/migrations.preload.js'; -import type { DurationInSeconds } from '../../util/durations/index.std.js'; -import * as universalExpireTimer from '../../util/universalExpireTimer.preload.js'; -import * as Attachment from '../../util/Attachment.std.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import { AttachmentDownloadUrgency } from '../../types/AttachmentDownload.std.js'; -import { isFileDangerous } from '../../util/isFileDangerous.std.js'; -import { getLocalAttachmentUrl } from '../../util/getLocalAttachmentUrl.std.js'; -import { instance as libphonenumberInstance } from '../../util/libphonenumberInstance.std.js'; +} from '../../util/migrations.preload.ts'; +import type { DurationInSeconds } from '../../util/durations/index.std.ts'; +import * as universalExpireTimer from '../../util/universalExpireTimer.preload.ts'; +import * as Attachment from '../../util/Attachment.std.ts'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import { AttachmentDownloadUrgency } from '../../types/AttachmentDownload.std.ts'; +import { isFileDangerous } from '../../util/isFileDangerous.std.ts'; +import { getLocalAttachmentUrl } from '../../util/getLocalAttachmentUrl.std.ts'; +import { instance as libphonenumberInstance } from '../../util/libphonenumberInstance.std.ts'; import { type ShowSendAnywayDialogActionType, type ShowErrorModalActionType, type ShowTerminateGroupFailedModalActionType, type ToggleDiscardDraftDialogActionType, -} from './globalModals.preload.js'; +} from './globalModals.preload.ts'; import { SHOW_SEND_ANYWAY_DIALOG, SHOW_TERMINATE_GROUP_FAILED_MODAL, SHOW_ERROR_MODAL, TOGGLE_DISCARD_DRAFT_DIALOG, -} from './globalModals.preload.js'; +} from './globalModals.preload.ts'; import { MODIFY_LIST, DELETE_LIST, HIDE_MY_STORIES_FROM, VIEWERS_CHANGED, -} from './storyDistributionLists.preload.js'; -import type { StoryDistributionListsActionType } from './storyDistributionLists.preload.js'; +} from './storyDistributionLists.preload.ts'; +import type { StoryDistributionListsActionType } from './storyDistributionLists.preload.ts'; import type { UUIDFetchStateKeyType, UUIDFetchStateType, -} from '../../util/uuidFetchState.std.js'; +} from '../../util/uuidFetchState.std.ts'; import type { AvatarColorType, ConversationColorType, CustomColorType, -} from '../../types/Colors.std.js'; +} from '../../types/Colors.std.ts'; import type { ConversationAttributesType, DraftEditMessageType, @@ -72,27 +72,27 @@ import type { import type { DraftBodyRanges, HydratedBodyRangesType, -} from '../../types/BodyRange.std.js'; -import { CallMode } from '../../types/CallDisposition.std.js'; -import type { MediaItemType } from '../../types/MediaItem.std.js'; -import type { StoryDistributionIdString } from '../../types/StoryDistributionId.std.js'; -import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.js'; +} from '../../types/BodyRange.std.ts'; +import { CallMode } from '../../types/CallDisposition.std.ts'; +import type { MediaItemType } from '../../types/MediaItem.std.ts'; +import type { StoryDistributionIdString } from '../../types/StoryDistributionId.std.ts'; +import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; import type { ServiceIdString, AciString, PniString, -} from '../../types/ServiceId.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import { MY_STORY_ID, StorySendMode } from '../../types/Stories.std.js'; -import * as Errors from '../../types/errors.std.js'; +} from '../../types/ServiceId.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import { MY_STORY_ID, StorySendMode } from '../../types/Stories.std.ts'; +import * as Errors from '../../types/errors.std.ts'; import { getGroupSizeRecommendedLimit, getGroupSizeHardLimit, -} from '../../groups/limits.dom.js'; -import { isMessageUnread } from '../../util/isMessageUnread.std.js'; -import { toggleSelectedContactForGroupAddition } from '../../groups/toggleSelectedContactForGroupAddition.std.js'; -import type { GroupNameCollisionsWithIdsByTitle } from '../../util/groupMemberNameCollisions.std.js'; -import { writeProfile } from '../../services/writeProfile.preload.js'; +} from '../../groups/limits.dom.ts'; +import { isMessageUnread } from '../../util/isMessageUnread.std.ts'; +import { toggleSelectedContactForGroupAddition } from '../../groups/toggleSelectedContactForGroupAddition.std.ts'; +import type { GroupNameCollisionsWithIdsByTitle } from '../../util/groupMemberNameCollisions.std.ts'; +import { writeProfile } from '../../services/writeProfile.preload.ts'; import { getConversationServiceIdsStoppingSend, getConversationIdsStoppedForVerification, @@ -101,79 +101,79 @@ import { getMessagesByConversation, getPendingAvatarDownloadSelector, getAllConversations, -} from '../selectors/conversations.dom.js'; -import { getIntl } from '../selectors/user.std.js'; +} from '../selectors/conversations.dom.ts'; +import { getIntl } from '../selectors/user.std.ts'; import type { AvatarDataType, AvatarUpdateOptionsType, -} from '../../types/Avatar.std.js'; -import { getDefaultAvatars } from '../../types/Avatar.std.js'; -import { getAvatarData } from '../../util/getAvatarData.dom.js'; -import { isSameAvatarData } from '../../util/isSameAvatarData.std.js'; -import { longRunningTaskWrapper } from '../../util/longRunningTaskWrapper.dom.js'; +} from '../../types/Avatar.std.ts'; +import { getDefaultAvatars } from '../../types/Avatar.std.ts'; +import { getAvatarData } from '../../util/getAvatarData.dom.ts'; +import { isSameAvatarData } from '../../util/isSameAvatarData.std.ts'; +import { longRunningTaskWrapper } from '../../util/longRunningTaskWrapper.dom.tsx'; import { ComposerStep, ConversationVerificationState, OneTimeModalState, TargetedMessageSource, -} from './conversationsEnums.std.js'; -import { markViewed as messageUpdaterMarkViewed } from '../../services/MessageUpdater.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +} from './conversationsEnums.std.ts'; +import { markViewed as messageUpdaterMarkViewed } from '../../services/MessageUpdater.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; -import type { NoopActionType } from './noop.std.js'; +import type { NoopActionType } from './noop.std.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../../jobs/conversationJobQueue.preload.js'; -import type { TimelineMessageLoadingState } from '../../util/timelineUtil.std.js'; +} from '../../jobs/conversationJobQueue.preload.ts'; +import type { TimelineMessageLoadingState } from '../../util/timelineUtil.std.ts'; import { isDirectConversation, isGroup, isGroupV2, isMe, -} from '../../util/whatTypeOfConversation.dom.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { viewSyncJobQueue } from '../../jobs/viewSyncJobQueue.preload.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { viewSyncJobQueue } from '../../jobs/viewSyncJobQueue.preload.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; import { isIncoming, isStory, processBodyRanges, -} from '../selectors/message.preload.js'; -import { getActiveCall, getActiveCallState } from '../selectors/calling.std.js'; -import { sendDeleteForEveryoneMessage } from '../../util/sendDeleteForEveryoneMessage.preload.js'; -import type { ShowToastActionType } from './toast.preload.js'; -import { SHOW_TOAST } from './toast.preload.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import { isMemberRequestingToJoin } from '../../util/groupMembershipUtils.preload.js'; -import { removePendingMember } from '../../util/removePendingMember.preload.js'; -import { denyPendingApprovalRequest } from '../../util/denyPendingApprovalRequest.preload.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; -import { addReportSpamJob } from '../../jobs/helpers/addReportSpamJob.dom.js'; -import { reportSpamJobQueue } from '../../jobs/reportSpamJobQueue.preload.js'; +} from '../selectors/message.preload.ts'; +import { getActiveCall, getActiveCallState } from '../selectors/calling.std.ts'; +import { sendDeleteForEveryoneMessage } from '../../util/sendDeleteForEveryoneMessage.preload.ts'; +import type { ShowToastActionType } from './toast.preload.ts'; +import { SHOW_TOAST } from './toast.preload.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import { isMemberRequestingToJoin } from '../../util/groupMembershipUtils.preload.ts'; +import { removePendingMember } from '../../util/removePendingMember.preload.ts'; +import { denyPendingApprovalRequest } from '../../util/denyPendingApprovalRequest.preload.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; +import { addReportSpamJob } from '../../jobs/helpers/addReportSpamJob.dom.ts'; +import { reportSpamJobQueue } from '../../jobs/reportSpamJobQueue.preload.ts'; import { modifyGroupV2, buildAddMembersChange, buildPromotePendingAdminApprovalMemberChange, buildUpdateAttributesChange, initiateMigrationToGroupV2 as doInitiateMigrationToGroupV2, -} from '../../groups.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import type { PanelArgsType } from '../../types/Panels.std.js'; -import type { ConversationQueueJobData } from '../../jobs/conversationJobQueue.preload.js'; -import { areWeAdmin } from '../../util/areWeAdmin.preload.js'; -import { canRetrySendDeleteForEveryone } from '../../util/canDeleteForEveryone.preload.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import { getMessageSentTimestamp } from '../../util/getMessageSentTimestamp.std.js'; -import { removeLinkPreview } from '../../services/LinkPreview.preload.js'; +} from '../../groups.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import type { PanelArgsType } from '../../types/Panels.std.ts'; +import type { ConversationQueueJobData } from '../../jobs/conversationJobQueue.preload.ts'; +import { areWeAdmin } from '../../util/areWeAdmin.preload.ts'; +import { canRetrySendDeleteForEveryone } from '../../util/canDeleteForEveryone.preload.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import { getMessageSentTimestamp } from '../../util/getMessageSentTimestamp.std.ts'; +import { removeLinkPreview } from '../../services/LinkPreview.preload.ts'; import type { ReplaceAttachmentsActionType, ResetComposerActionType, SetFocusActionType, SetQuotedMessageActionType, SetViewOnceActionType, -} from './composer.preload.js'; +} from './composer.preload.ts'; import { SET_FOCUS, replaceAttachments, @@ -181,80 +181,80 @@ import { setQuoteByMessageId, resetComposer, setViewOnce, -} from './composer.preload.js'; -import { ReceiptType } from '../../types/Receipt.std.js'; -import { Sound, SoundType } from '../../util/Sound.std.js'; +} from './composer.preload.ts'; +import { ReceiptType } from '../../types/Receipt.std.ts'; +import { Sound, SoundType } from '../../util/Sound.std.ts'; import { canEditMessage, isWithinMaxEdits, MESSAGE_MAX_EDIT_COUNT, -} from '../../util/canEditMessage.dom.js'; -import { changeLocation, popPanelForConversation } from './nav.std.js'; +} from '../../util/canEditMessage.dom.ts'; +import { changeLocation, popPanelForConversation } from './nav.std.ts'; import { NavTab, ProfileEditorPage, SettingsPage, -} from '../../types/Nav.std.js'; -import { sortByMessageOrder } from '../../types/ForwardDraft.std.js'; -import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.js'; +} from '../../types/Nav.std.ts'; +import { sortByMessageOrder } from '../../types/ForwardDraft.std.ts'; +import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.ts'; import { getConversationIdForLogging, getMessageIdForLogging, -} from '../../util/idForLogging.preload.js'; -import { singleProtoJobQueue } from '../../jobs/singleProtoJobQueue.preload.js'; -import { MessageSender } from '../../textsecure/SendMessage.preload.js'; -import { AttachmentDownloadManager } from '../../jobs/AttachmentDownloadManager.preload.js'; +} from '../../util/idForLogging.preload.ts'; +import { singleProtoJobQueue } from '../../jobs/singleProtoJobQueue.preload.ts'; +import { MessageSender } from '../../textsecure/SendMessage.preload.ts'; +import { AttachmentDownloadManager } from '../../jobs/AttachmentDownloadManager.preload.ts'; import type { DeleteForMeSyncEventData, AddressableMessage, -} from '../../textsecure/messageReceiverEvents.std.js'; +} from '../../textsecure/messageReceiverEvents.std.ts'; import { getConversationIdentifier, getAddressableMessage, -} from '../../util/syncIdentifiers.preload.js'; -import { MAX_MESSAGE_COUNT } from '../../util/deleteForMe.types.std.js'; -import { markCallHistoryReadInConversation } from './callHistory.preload.js'; +} from '../../util/syncIdentifiers.preload.ts'; +import { MAX_MESSAGE_COUNT } from '../../util/deleteForMe.types.std.ts'; +import { markCallHistoryReadInConversation } from './callHistory.preload.ts'; import type { CapabilitiesType } from '../../types/Capabilities.d.ts'; import { updateSearchResultsOnConversationUpdate, maybeRemoveReadConversations, -} from './search.preload.js'; -import type { SearchActionType } from './search.preload.js'; -import { getNotificationTextForMessage } from '../../util/getNotificationTextForMessage.preload.js'; -import { doubleCheckMissingQuoteReference as doDoubleCheckMissingQuoteReference } from '../../util/doubleCheckMissingQuoteReference.preload.js'; -import { queueAttachmentDownloads } from '../../util/queueAttachmentDownloads.preload.js'; -import { markAttachmentAsCorrupted as doMarkAttachmentAsCorrupted } from '../../messageModifiers/AttachmentDownloads.preload.js'; +} from './search.preload.ts'; +import type { SearchActionType } from './search.preload.ts'; +import { getNotificationTextForMessage } from '../../util/getNotificationTextForMessage.preload.ts'; +import { doubleCheckMissingQuoteReference as doDoubleCheckMissingQuoteReference } from '../../util/doubleCheckMissingQuoteReference.preload.ts'; +import { queueAttachmentDownloads } from '../../util/queueAttachmentDownloads.preload.ts'; +import { markAttachmentAsCorrupted as doMarkAttachmentAsCorrupted } from '../../messageModifiers/AttachmentDownloads.preload.ts'; import { isSent, SendActionType, sendStateReducer, -} from '../../messages/MessageSendState.std.js'; -import { markFailed } from '../../test-node/util/messageFailures.preload.js'; -import { cleanupMessages } from '../../util/cleanup.preload.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import { MessageRequestResponseSource } from '../../types/MessageRequestResponseEvent.std.js'; -import { JobCancelReason } from '../../jobs/types.std.js'; -import type { ChatFolderId } from '../../types/ChatFolder.std.js'; -import { isConversationInChatFolder } from '../../types/ChatFolder.std.js'; -import { getCurrentChatFolders } from '../selectors/chatFolders.std.js'; -import { isConversationUnread } from '../../util/isConversationUnread.std.js'; -import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { enqueuePollVoteForSend as enqueuePollVoteForSendHelper } from '../../polls/enqueuePollVoteForSend.preload.js'; +} from '../../messages/MessageSendState.std.ts'; +import { markFailed } from '../../test-node/util/messageFailures.preload.ts'; +import { cleanupMessages } from '../../util/cleanup.preload.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import { MessageRequestResponseSource } from '../../types/MessageRequestResponseEvent.std.ts'; +import { JobCancelReason } from '../../jobs/types.std.ts'; +import type { ChatFolderId } from '../../types/ChatFolder.std.ts'; +import { isConversationInChatFolder } from '../../types/ChatFolder.std.ts'; +import { getCurrentChatFolders } from '../selectors/chatFolders.std.ts'; +import { isConversationUnread } from '../../util/isConversationUnread.std.ts'; +import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { enqueuePollVoteForSend as enqueuePollVoteForSendHelper } from '../../polls/enqueuePollVoteForSend.preload.ts'; import type { PinnedMessage, PinnedMessagePreloadData, -} from '../../types/PinnedMessage.std.js'; -import type { StateThunk } from '../types.std.js'; -import { getPinnedMessagesLimit } from '../../util/pinnedMessages.dom.js'; -import { getPinnedMessageExpiresAt } from '../../util/pinnedMessages.std.js'; -import { pinnedMessagesCleanupService } from '../../services/expiring/pinnedMessagesCleanupService.preload.js'; -import { getPinnedMessageTarget } from '../../util/getPinMessageTarget.preload.js'; +} from '../../types/PinnedMessage.std.ts'; +import type { StateThunk } from '../types.std.ts'; +import { getPinnedMessagesLimit } from '../../util/pinnedMessages.dom.ts'; +import { getPinnedMessageExpiresAt } from '../../util/pinnedMessages.std.ts'; +import { pinnedMessagesCleanupService } from '../../services/expiring/pinnedMessagesCleanupService.preload.ts'; +import { getPinnedMessageTarget } from '../../util/getPinMessageTarget.preload.ts'; import { getActivePanel, getPanels, getSelectedConversationId, -} from '../selectors/nav.std.js'; +} from '../selectors/nav.std.ts'; const { chunk, difference, fromPairs, omit, orderBy, pick, values, without } = lodash; diff --git a/ts/state/ducks/crashReports.preload.ts b/ts/state/ducks/crashReports.preload.ts index 317de6e896..3447db21cd 100644 --- a/ts/state/ducks/crashReports.preload.ts +++ b/ts/state/ducks/crashReports.preload.ts @@ -4,15 +4,15 @@ import type { ReadonlyDeep } from 'type-fest'; import type { ThunkAction } from 'redux-thunk'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import { showToast } from './toast.preload.js'; -import type { ShowToastActionType } from './toast.preload.js'; -import type { PromiseAction } from '../util.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import { showToast } from './toast.preload.ts'; +import type { ShowToastActionType } from './toast.preload.ts'; +import type { PromiseAction } from '../util.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; const log = createLogger('crashReports'); diff --git a/ts/state/ducks/donations.preload.ts b/ts/state/ducks/donations.preload.ts index 2897327f81..e00e758330 100644 --- a/ts/state/ducks/donations.preload.ts +++ b/ts/state/ducks/donations.preload.ts @@ -4,26 +4,26 @@ import type { ReadonlyDeep, Simplify } from 'type-fest'; import type { ThunkAction } from 'redux-thunk'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { isStagingServer } from '../../util/isStagingServer.dom.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import * as donations from '../../services/donations.preload.js'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { isStagingServer } from '../../util/isStagingServer.dom.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import * as donations from '../../services/donations.preload.ts'; import { donationStateSchema, DonationProcessor, -} from '../../types/Donations.std.js'; -import { drop } from '../../util/drop.std.js'; -import { storageServiceUploadJob } from '../../services/storage.preload.js'; -import { getMe } from '../selectors/conversations.dom.js'; -import { actions as conversationActions } from './conversations.preload.js'; +} from '../../types/Donations.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { storageServiceUploadJob } from '../../services/storage.preload.ts'; +import { getMe } from '../selectors/conversations.dom.ts'; +import { actions as conversationActions } from './conversations.preload.ts'; import type { ProfileDataType, SetProfileUpdateErrorActionType, -} from './conversations.preload.js'; +} from './conversations.preload.ts'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; import type { CardDetail, DonationErrorType, @@ -31,11 +31,11 @@ import type { DonationWorkflow, OneTimeDonationHumanAmounts, StripeDonationAmount, -} from '../../types/Donations.std.js'; -import type { BadgeType } from '../../badges/types.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; +} from '../../types/Donations.std.ts'; +import type { BadgeType } from '../../badges/types.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; const log = createLogger('donations'); diff --git a/ts/state/ducks/emojis.preload.ts b/ts/state/ducks/emojis.preload.ts index 5f11409155..72b14114f3 100644 --- a/ts/state/ducks/emojis.preload.ts +++ b/ts/state/ducks/emojis.preload.ts @@ -4,14 +4,14 @@ import lodash from 'lodash'; import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import { DataWriter } from '../../sql/Client.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import type { FunEmojiSelection } from '../../components/fun/panels/FunPanelEmojis.dom.js'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import type { FunEmojiSelection } from '../../components/fun/panels/FunPanelEmojis.dom.tsx'; import { getEmojiParentByKey, getEmojiParentKeyByVariantKey, -} from '../../components/fun/data/emojis.std.js'; +} from '../../components/fun/data/emojis.std.ts'; const { take, uniq } = lodash; diff --git a/ts/state/ducks/gifs.preload.ts b/ts/state/ducks/gifs.preload.ts index 8372a18b1e..df75d98ce4 100644 --- a/ts/state/ducks/gifs.preload.ts +++ b/ts/state/ducks/gifs.preload.ts @@ -3,12 +3,12 @@ import type { ReadonlyDeep } from 'type-fest'; import type { ThunkAction } from 'redux-thunk'; import lodash from 'lodash'; -import type { GifType } from '../../components/fun/panels/FunPanelGifs.dom.js'; -import { DataWriter } from '../../sql/Client.preload.js'; +import type { GifType } from '../../components/fun/panels/FunPanelGifs.dom.tsx'; +import { DataWriter } from '../../sql/Client.preload.ts'; import { type BoundActionCreatorsMapObject, useBoundActions, -} from '../../hooks/useBoundActions.std.js'; +} from '../../hooks/useBoundActions.std.ts'; const { take } = lodash; diff --git a/ts/state/ducks/globalModals.preload.ts b/ts/state/ducks/globalModals.preload.ts index 26961a6a83..a4744f3e71 100644 --- a/ts/state/ducks/globalModals.preload.ts +++ b/ts/state/ducks/globalModals.preload.ts @@ -4,8 +4,8 @@ import type { CallSummary } from '@signalapp/ringrtc'; import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import OS from '../../util/os/osMain.node.js'; -import type { ExplodePromiseResultType } from '../../util/explodePromise.std.js'; +import OS from '../../util/os/osMain.node.ts'; +import type { ExplodePromiseResultType } from '../../util/explodePromise.std.ts'; import type { GroupV2PendingMemberType, ReadonlyMessageAttributesType, @@ -14,59 +14,59 @@ import type { ActionCreator, MessageChangedActionType, MessageDeletedActionType, -} from './conversations.preload.js'; -import type { MessagePropsType } from '../selectors/message.preload.js'; -import type { RecipientsByConversation } from './stories.preload.js'; -import type { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import * as SingleServePromise from '../../services/singleServePromise.std.js'; -import { isKeyTransparencyAvailable } from '../../services/keyTransparency.preload.js'; -import * as Stickers from '../../types/Stickers.preload.js'; -import type { ContactModalStateType } from '../../types/globalModals.std.js'; -import { UsernameOnboardingState } from '../../types/globalModals.std.js'; -import { createLogger } from '../../logging/log.std.js'; +} from './conversations.preload.ts'; +import type { MessagePropsType } from '../selectors/message.preload.ts'; +import type { RecipientsByConversation } from './stories.preload.ts'; +import type { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import * as SingleServePromise from '../../services/singleServePromise.std.ts'; +import { isKeyTransparencyAvailable } from '../../services/keyTransparency.preload.ts'; +import * as Stickers from '../../types/Stickers.preload.ts'; +import type { ContactModalStateType } from '../../types/globalModals.std.ts'; +import { UsernameOnboardingState } from '../../types/globalModals.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; import { getMessagePropsSelector, getPropsForAttachment, -} from '../selectors/message.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { longRunningTaskWrapper } from '../../util/longRunningTaskWrapper.dom.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { isGroupV1 } from '../../util/whatTypeOfConversation.dom.js'; -import { sleep } from '../../util/sleep.std.js'; -import { SECOND } from '../../util/durations/index.std.js'; -import { getGroupMigrationMembers } from '../../groups.preload.js'; +} from '../selectors/message.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { longRunningTaskWrapper } from '../../util/longRunningTaskWrapper.dom.tsx'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { isGroupV1 } from '../../util/whatTypeOfConversation.dom.ts'; +import { sleep } from '../../util/sleep.std.ts'; +import { SECOND } from '../../util/durations/index.std.ts'; +import { getGroupMigrationMembers } from '../../groups.preload.ts'; import { MESSAGE_CHANGED, MESSAGE_DELETED, actions as conversationsActions, -} from './conversations.preload.js'; -import { isDownloaded } from '../../util/Attachment.std.js'; -import { isPermanentlyUndownloadable } from '../../jobs/AttachmentDownloadManager.preload.js'; -import type { ButtonVariant } from '../../components/Button.dom.js'; -import type { MessageRequestState } from '../../components/conversation/MessageRequestActionsConfirmation.dom.js'; -import type { MessageForwardDraft } from '../../types/ForwardDraft.std.js'; -import { hydrateRanges } from '../../util/BodyRange.node.js'; +} from './conversations.preload.ts'; +import { isDownloaded } from '../../util/Attachment.std.ts'; +import { isPermanentlyUndownloadable } from '../../jobs/AttachmentDownloadManager.preload.ts'; +import type { ButtonVariant } from '../../components/Button.dom.tsx'; +import type { MessageRequestState } from '../../components/conversation/MessageRequestActionsConfirmation.dom.tsx'; +import type { MessageForwardDraft } from '../../types/ForwardDraft.std.ts'; +import { hydrateRanges } from '../../util/BodyRange.node.ts'; import { getConversationSelector, getHasMaxPinnedMessages, type GetConversationByIdType, -} from '../selectors/conversations.dom.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { ForwardMessagesModalType } from '../../components/ForwardMessagesModal.dom.js'; -import type { CallLinkType } from '../../types/CallLink.std.js'; -import type { LocalizerType } from '../../types/I18N.std.js'; -import { linkCallRoute } from '../../util/signalRoutes.std.js'; -import type { StartCallData } from '../../components/ConfirmLeaveCallModal.dom.js'; -import type { CallQualitySurvey } from '../../types/CallQualitySurvey.std.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import type { DataPropsType as TapToViewNotAvailablePropsType } from '../../components/TapToViewNotAvailableModal.dom.js'; -import type { DataPropsType as BackfillFailureModalPropsType } from '../../components/BackfillFailureModal.dom.js'; -import type { SmartDraftGifMessageSendModalProps } from '../smart/DraftGifMessageSendModal.preload.js'; -import { onCriticalIdlePrimaryDeviceModalDismissed } from '../../util/handleServerAlerts.preload.js'; -import type { PinMessageDialogData } from '../smart/PinMessageDialog.preload.js'; -import type { StateThunk } from '../types.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { ForwardMessagesModalType } from '../../components/ForwardMessagesModal.dom.tsx'; +import type { CallLinkType } from '../../types/CallLink.std.ts'; +import type { LocalizerType } from '../../types/I18N.std.ts'; +import { linkCallRoute } from '../../util/signalRoutes.std.ts'; +import type { StartCallData } from '../../components/ConfirmLeaveCallModal.dom.tsx'; +import type { CallQualitySurvey } from '../../types/CallQualitySurvey.std.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import type { DataPropsType as TapToViewNotAvailablePropsType } from '../../components/TapToViewNotAvailableModal.dom.tsx'; +import type { DataPropsType as BackfillFailureModalPropsType } from '../../components/BackfillFailureModal.dom.tsx'; +import type { SmartDraftGifMessageSendModalProps } from '../smart/DraftGifMessageSendModal.preload.tsx'; +import { onCriticalIdlePrimaryDeviceModalDismissed } from '../../util/handleServerAlerts.preload.ts'; +import type { PinMessageDialogData } from '../smart/PinMessageDialog.preload.tsx'; +import type { StateThunk } from '../types.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const log = createLogger('globalModals'); diff --git a/ts/state/ducks/installer.preload.ts b/ts/state/ducks/installer.preload.ts index 1e5e939533..4e0ce4656b 100644 --- a/ts/state/ducks/installer.preload.ts +++ b/ts/state/ducks/installer.preload.ts @@ -4,34 +4,34 @@ import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import type { StateType as RootStateType } from '../reducer.preload.js'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; import { type InstallScreenBackupError, InstallScreenBackupStep, InstallScreenStep, InstallScreenError, InstallScreenQRCodeError, -} from '../../types/InstallScreen.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { type Loadable, LoadingState } from '../../util/loadable.std.js'; -import { isRecord } from '../../util/isRecord.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import * as Registration from '../../util/registration.preload.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; +} from '../../types/InstallScreen.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { type Loadable, LoadingState } from '../../util/loadable.std.ts'; +import { isRecord } from '../../util/isRecord.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import * as Registration from '../../util/registration.preload.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; import { Provisioner, EventKind as ProvisionEventKind, type EnvelopeType as ProvisionEnvelopeType, -} from '../../textsecure/Provisioner.preload.js'; -import { accountManager } from '../../textsecure/AccountManager.preload.js'; -import { getProvisioningConnection } from '../../textsecure/WebAPI.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { backupsService } from '../../services/backups/index.preload.js'; -import OS from '../../util/os/osMain.node.js'; -import { signalProtocolStore } from '../../SignalProtocolStore.preload.js'; +} from '../../textsecure/Provisioner.preload.ts'; +import { accountManager } from '../../textsecure/AccountManager.preload.ts'; +import { getProvisioningConnection } from '../../textsecure/WebAPI.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { backupsService } from '../../services/backups/index.preload.ts'; +import OS from '../../util/os/osMain.node.ts'; +import { signalProtocolStore } from '../../SignalProtocolStore.preload.ts'; const log = createLogger('installer'); diff --git a/ts/state/ducks/items.preload.ts b/ts/state/ducks/items.preload.ts index 2efe5403ac..4e7994bacf 100644 --- a/ts/state/ducks/items.preload.ts +++ b/ts/state/ducks/items.preload.ts @@ -5,23 +5,23 @@ import lodash from 'lodash'; import { v4 as getGuid } from 'uuid'; import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import * as storageShim from '../../shims/storage.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { drop } from '../../util/drop.std.js'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import * as storageShim from '../../shims/storage.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { drop } from '../../util/drop.std.ts'; import type { ConversationColorType, CustomColorType, -} from '../../types/Colors.std.js'; -import { ConversationColors } from '../../types/Colors.std.js'; -import { reloadSelectedConversation } from '../../shims/reloadSelectedConversation.dom.js'; +} from '../../types/Colors.std.ts'; +import { ConversationColors } from '../../types/Colors.std.ts'; +import { reloadSelectedConversation } from '../../shims/reloadSelectedConversation.dom.ts'; import type { StorageAccessType } from '../../types/Storage.d.ts'; -import { actions as conversationActions } from './conversations.preload.js'; -import type { ConfigMapType as RemoteConfigType } from '../../RemoteConfig.dom.js'; -import type { EmojiSkinTone } from '../../components/fun/data/emojis.std.js'; -import type { StateThunk } from '../types.std.js'; -import { storageServiceUploadJob } from '../../services/storage.preload.js'; +import { actions as conversationActions } from './conversations.preload.ts'; +import type { ConfigMapType as RemoteConfigType } from '../../RemoteConfig.dom.ts'; +import type { EmojiSkinTone } from '../../components/fun/data/emojis.std.ts'; +import type { StateThunk } from '../types.std.ts'; +import { storageServiceUploadJob } from '../../services/storage.preload.ts'; const { omit } = lodash; diff --git a/ts/state/ducks/lightbox.preload.ts b/ts/state/ducks/lightbox.preload.ts index 05304fe893..79240704e0 100644 --- a/ts/state/ducks/lightbox.preload.ts +++ b/ts/state/ducks/lightbox.preload.ts @@ -4,56 +4,56 @@ import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import type { MediaItemType } from '../../types/MediaItem.std.js'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import type { MediaItemType } from '../../types/MediaItem.std.ts'; import type { MessageChangedActionType, MessageDeletedActionType, -} from './conversations.preload.js'; -import type { ShowStickerPackPreviewActionType } from './globalModals.preload.js'; -import type { ShowToastActionType } from './toast.preload.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; +} from './conversations.preload.ts'; +import type { ShowStickerPackPreviewActionType } from './globalModals.preload.ts'; +import type { ShowToastActionType } from './toast.preload.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; -import { createLogger } from '../../logging/log.std.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; import type { ReadonlyMessageAttributesType } from '../../model-types.d.ts'; import { getUndownloadedAttachmentSignature, isIncremental, -} from '../../util/Attachment.std.js'; +} from '../../util/Attachment.std.ts'; import { isImageTypeSupported, isVideoTypeSupported, -} from '../../util/GoogleChrome.std.js'; +} from '../../util/GoogleChrome.std.ts'; import { getLocalAttachmentUrl, AttachmentDisposition, -} from '../../util/getLocalAttachmentUrl.std.js'; +} from '../../util/getLocalAttachmentUrl.std.ts'; import { deleteTempFile, copyAttachmentIntoTempDirectory, getAbsoluteAttachmentPath, -} from '../../util/migrations.preload.js'; +} from '../../util/migrations.preload.ts'; import { isTapToView, getPropsForAttachment, -} from '../selectors/message.preload.js'; -import { SHOW_TOAST } from './toast.preload.js'; -import { ToastType } from '../../types/Toast.dom.js'; +} from '../selectors/message.preload.ts'; +import { SHOW_TOAST } from './toast.preload.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; import { MESSAGE_CHANGED, MESSAGE_DELETED, saveAttachmentFromMessage, -} from './conversations.preload.js'; -import { showStickerPackPreview } from './globalModals.preload.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { DataReader } from '../../sql/Client.preload.js'; -import { deleteDownloadsJobQueue } from '../../jobs/deleteDownloadsJobQueue.preload.js'; -import { AttachmentDownloadUrgency } from '../../types/AttachmentDownload.std.js'; -import { queueAttachmentDownloadsAndMaybeSaveMessage } from '../../util/queueAttachmentDownloads.preload.js'; -import { getMessageIdForLogging } from '../../util/idForLogging.preload.js'; -import { markViewOnceMessageViewed } from '../../services/MessageUpdater.preload.js'; +} from './conversations.preload.ts'; +import { showStickerPackPreview } from './globalModals.preload.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { DataReader } from '../../sql/Client.preload.ts'; +import { deleteDownloadsJobQueue } from '../../jobs/deleteDownloadsJobQueue.preload.ts'; +import { AttachmentDownloadUrgency } from '../../types/AttachmentDownload.std.ts'; +import { queueAttachmentDownloadsAndMaybeSaveMessage } from '../../util/queueAttachmentDownloads.preload.ts'; +import { getMessageIdForLogging } from '../../util/idForLogging.preload.ts'; +import { markViewOnceMessageViewed } from '../../services/MessageUpdater.preload.ts'; const log = createLogger('lightbox'); diff --git a/ts/state/ducks/linkPreviews.preload.ts b/ts/state/ducks/linkPreviews.preload.ts index f371aa08b8..f761bc9516 100644 --- a/ts/state/ducks/linkPreviews.preload.ts +++ b/ts/state/ducks/linkPreviews.preload.ts @@ -4,21 +4,21 @@ import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; import type { LinkPreviewType, LinkPreviewForUIType, -} from '../../types/message/LinkPreviews.std.js'; -import type { AttachmentForUIType } from '../../types/Attachment.std.js'; -import type { MaybeGrabLinkPreviewOptionsType } from '../../types/LinkPreview.std.js'; -import type { NoopActionType } from './noop.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import { LinkPreviewSourceType } from '../../types/LinkPreview.std.js'; -import { assignWithNoUnnecessaryAllocation } from '../../util/assignWithNoUnnecessaryAllocation.std.js'; -import { maybeGrabLinkPreview } from '../../services/LinkPreview.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { getPropsForAttachment } from '../selectors/message.preload.js'; +} from '../../types/message/LinkPreviews.std.ts'; +import type { AttachmentForUIType } from '../../types/Attachment.std.ts'; +import type { MaybeGrabLinkPreviewOptionsType } from '../../types/LinkPreview.std.ts'; +import type { NoopActionType } from './noop.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import { LinkPreviewSourceType } from '../../types/LinkPreview.std.ts'; +import { assignWithNoUnnecessaryAllocation } from '../../util/assignWithNoUnnecessaryAllocation.std.ts'; +import { maybeGrabLinkPreview } from '../../services/LinkPreview.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { getPropsForAttachment } from '../selectors/message.preload.ts'; // State diff --git a/ts/state/ducks/mediaGallery.preload.ts b/ts/state/ducks/mediaGallery.preload.ts index fb7482f33c..1be24448c9 100644 --- a/ts/state/ducks/mediaGallery.preload.ts +++ b/ts/state/ducks/mediaGallery.preload.ts @@ -6,26 +6,26 @@ import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; import type { ReadonlyMessageAttributesType } from '../../model-types.d.ts'; -import { createLogger } from '../../logging/log.std.js'; -import { DataReader } from '../../sql/Client.preload.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { DataReader } from '../../sql/Client.preload.ts'; import type { MediaItemDBType, NonAttachmentMediaItemDBType, ContactMediaItemDBType, -} from '../../sql/Interface.std.js'; +} from '../../sql/Interface.std.ts'; import { CONVERSATION_UNLOADED, MESSAGE_CHANGED, MESSAGE_DELETED, -} from './conversations.preload.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +} from './conversations.preload.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; import type { ConversationUnloadedActionType, MessageChangedActionType, MessageDeletedActionType, -} from './conversations.preload.js'; +} from './conversations.preload.ts'; import type { MediaTabType, MediaSortOrderType, @@ -34,18 +34,18 @@ import type { LinkPreviewMediaItemType, ContactMediaItemType, GenericMediaItemType, -} from '../../types/MediaItem.std.js'; -import type { AttachmentForUIType } from '../../types/Attachment.std.js'; +} from '../../types/MediaItem.std.ts'; +import type { AttachmentForUIType } from '../../types/Attachment.std.ts'; import { isFile, isVisualMedia, isVoiceMessage, isAudio, -} from '../../util/Attachment.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import { getPropsForAttachment } from '../selectors/message.preload.js'; +} from '../../util/Attachment.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import { getPropsForAttachment } from '../selectors/message.preload.ts'; const { orderBy } = lodash; diff --git a/ts/state/ducks/megaphones.preload.ts b/ts/state/ducks/megaphones.preload.ts index d897cca532..dcdebf1a5a 100644 --- a/ts/state/ducks/megaphones.preload.ts +++ b/ts/state/ducks/megaphones.preload.ts @@ -3,21 +3,21 @@ import type { ReadonlyDeep } from 'type-fest'; import type { ThunkAction } from 'redux-thunk'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; import type { MegaphoneCtaId, RemoteMegaphoneId, VisibleRemoteMegaphoneType, -} from '../../types/Megaphone.std.js'; -import type { ChangeLocationAction } from './nav.std.js'; -import { actions as navActions } from './nav.std.js'; -import { NavTab, SettingsPage } from '../../types/Nav.std.js'; -import { isTestMegaphoneId } from '../../util/getTestMegaphone.std.js'; +} from '../../types/Megaphone.std.ts'; +import type { ChangeLocationAction } from './nav.std.ts'; +import { actions as navActions } from './nav.std.ts'; +import { NavTab, SettingsPage } from '../../types/Nav.std.ts'; +import { isTestMegaphoneId } from '../../util/getTestMegaphone.std.ts'; const log = createLogger('megaphones'); diff --git a/ts/state/ducks/nav.std.ts b/ts/state/ducks/nav.std.ts index 90c93a455f..ccc7a92b91 100644 --- a/ts/state/ducks/nav.std.ts +++ b/ts/state/ducks/nav.std.ts @@ -6,20 +6,20 @@ import { isEqual } from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; import type { ThunkAction } from 'redux-thunk'; -import { createLogger } from '../../logging/log.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { beforeNavigateService } from '../../services/BeforeNavigate.std.js'; -import { NavTab, SettingsPage } from '../../types/Nav.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { beforeNavigateService } from '../../services/BeforeNavigate.std.ts'; +import { NavTab, SettingsPage } from '../../types/Nav.std.ts'; import { getActivePanel, getPanels, getSelectedLocation, -} from '../selectors/nav.std.js'; +} from '../selectors/nav.std.ts'; -import type { PanelArgsType } from '../../types/Panels.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import type { Location, PanelInfo } from '../../types/Nav.std.js'; +import type { PanelArgsType } from '../../types/Panels.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import type { Location, PanelInfo } from '../../types/Nav.std.ts'; const log = createLogger('nav'); diff --git a/ts/state/ducks/network.dom.ts b/ts/state/ducks/network.dom.ts index 00ca98f3c7..bde0745603 100644 --- a/ts/state/ducks/network.dom.ts +++ b/ts/state/ducks/network.dom.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyDeep } from 'type-fest'; -import { SocketStatus } from '../../types/SocketStatus.std.js'; -import { trigger } from '../../shims/events.dom.js'; -import { assignWithNoUnnecessaryAllocation } from '../../util/assignWithNoUnnecessaryAllocation.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +import { SocketStatus } from '../../types/SocketStatus.std.ts'; +import { trigger } from '../../shims/events.dom.ts'; +import { assignWithNoUnnecessaryAllocation } from '../../util/assignWithNoUnnecessaryAllocation.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; // State diff --git a/ts/state/ducks/notificationProfiles.preload.ts b/ts/state/ducks/notificationProfiles.preload.ts index 7bfe976536..7b9531b777 100644 --- a/ts/state/ducks/notificationProfiles.preload.ts +++ b/ts/state/ducks/notificationProfiles.preload.ts @@ -6,39 +6,39 @@ import { debounce, difference } from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; import type { ThunkAction } from 'redux-thunk'; -import { createLogger } from '../../logging/log.std.js'; +import { createLogger } from '../../logging/log.std.ts'; import { update as updateProfileService, fastUpdate as fastUpdateProfileService, -} from '../../services/notificationProfilesService.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../services/notificationProfilesService.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; import { type BoundActionCreatorsMapObject, useBoundActions, -} from '../../hooks/useBoundActions.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; +} from '../../hooks/useBoundActions.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; import { redactNotificationProfileId, sortProfiles, -} from '../../types/NotificationProfile.std.js'; -import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.js'; -import { getOverride } from '../selectors/notificationProfiles.dom.js'; -import { getItems } from '../selectors/items.dom.js'; +} from '../../types/NotificationProfile.std.ts'; +import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.ts'; +import { getOverride } from '../selectors/notificationProfiles.dom.ts'; +import { getItems } from '../selectors/items.dom.ts'; import { prepareForDisabledNotificationProfileSync, prepareForEnabledNotificationProfileSync, -} from '../../services/storageRecordOps.preload.js'; -import { storageServiceUploadJob } from '../../services/storage.preload.js'; -import { SECOND } from '../../util/durations/constants.std.js'; +} from '../../services/storageRecordOps.preload.ts'; +import { storageServiceUploadJob } from '../../services/storage.preload.ts'; +import { SECOND } from '../../util/durations/constants.std.ts'; import type { NextProfileEvent, NotificationProfileIdString, NotificationProfileOverride, NotificationProfileType, -} from '../../types/NotificationProfile.std.js'; -import type { StateType } from '../reducer.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../types/NotificationProfile.std.ts'; +import type { StateType } from '../reducer.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const log = createLogger('ducks/notificationProfiles'); diff --git a/ts/state/ducks/preferredReactions.preload.ts b/ts/state/ducks/preferredReactions.preload.ts index ae2fc732d2..2bc50a8d09 100644 --- a/ts/state/ducks/preferredReactions.preload.ts +++ b/ts/state/ducks/preferredReactions.preload.ts @@ -4,20 +4,20 @@ import type { ThunkAction } from 'redux-thunk'; import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { replaceIndex } from '../../util/replaceIndex.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import { DEFAULT_PREFERRED_REACTION_EMOJI_PARENT_KEYS } from '../../reactions/constants.std.js'; -import { getPreferredReactionEmoji } from '../../reactions/preferredReactionEmoji.std.js'; -import { getEmojiSkinToneDefault } from '../selectors/items.dom.js'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { replaceIndex } from '../../util/replaceIndex.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import { DEFAULT_PREFERRED_REACTION_EMOJI_PARENT_KEYS } from '../../reactions/constants.std.ts'; +import { getPreferredReactionEmoji } from '../../reactions/preferredReactionEmoji.std.ts'; +import { getEmojiSkinToneDefault } from '../selectors/items.dom.ts'; import { EmojiSkinTone, getEmojiVariantByParentKeyAndSkinTone, -} from '../../components/fun/data/emojis.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../components/fun/data/emojis.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const { omit } = lodash; diff --git a/ts/state/ducks/safetyNumber.preload.ts b/ts/state/ducks/safetyNumber.preload.ts index 44915bcf49..767b522cc4 100644 --- a/ts/state/ducks/safetyNumber.preload.ts +++ b/ts/state/ducks/safetyNumber.preload.ts @@ -5,19 +5,19 @@ import type { ReadonlyDeep } from 'type-fest'; import type { ThunkAction } from 'redux-thunk'; import lodash from 'lodash'; -import { generateSafetyNumber } from '../../util/safetyNumber.preload.js'; -import type { SafetyNumberType } from '../../types/safetyNumber.std.js'; -import type { ConversationType } from './conversations.preload.js'; +import { generateSafetyNumber } from '../../util/safetyNumber.preload.ts'; +import type { SafetyNumberType } from '../../types/safetyNumber.std.ts'; +import type { ConversationType } from './conversations.preload.ts'; import { reloadProfiles, toggleVerification, -} from '../../shims/contactVerification.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../shims/contactVerification.dom.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; const { omit } = lodash; diff --git a/ts/state/ducks/search.preload.ts b/ts/state/ducks/search.preload.ts index 83cabf58a3..9acf227856 100644 --- a/ts/state/ducks/search.preload.ts +++ b/ts/state/ducks/search.preload.ts @@ -5,15 +5,15 @@ import type { ThunkAction, ThunkDispatch } from 'redux-thunk'; import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.js'; -import type { ClientSearchResultMessageType } from '../../sql/Interface.std.js'; -import { DataReader } from '../../sql/Client.preload.js'; -import { makeLookup } from '../../util/makeLookup.std.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.ts'; +import type { ClientSearchResultMessageType } from '../../sql/Interface.std.ts'; +import { DataReader } from '../../sql/Client.preload.ts'; +import { makeLookup } from '../../util/makeLookup.std.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; import type { ConversationType, @@ -24,31 +24,31 @@ import type { ShowArchivedConversationsActionType, MessageType, ConversationLookupType, -} from './conversations.preload.js'; +} from './conversations.preload.ts'; import { getFilterByUnread, getIsActivelySearching, getQuery, getSearchConversation, -} from '../selectors/search.preload.js'; -import { getAllConversations } from '../selectors/conversations.dom.js'; +} from '../selectors/search.preload.ts'; +import { getAllConversations } from '../selectors/conversations.dom.ts'; import { getIntl, getRegionCode, getUserConversationId, -} from '../selectors/user.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../selectors/user.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; import { CONVERSATION_UNLOADED, TARGETED_CONVERSATION_CHANGED, -} from './conversations.preload.js'; -import { removeDiacritics } from '../../util/removeDiacritics.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { searchConversationTitles } from '../../util/searchConversationTitles.std.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; -import { isConversationSMSOnly } from '../../util/isConversationSMSOnly.std.js'; -import { isConversationUnread } from '../../util/countUnreadStats.std.js'; -import { getSelectedConversationId } from '../selectors/nav.std.js'; +} from './conversations.preload.ts'; +import { removeDiacritics } from '../../util/removeDiacritics.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { searchConversationTitles } from '../../util/searchConversationTitles.std.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; +import { isConversationSMSOnly } from '../../util/isConversationSMSOnly.std.ts'; +import { isConversationUnread } from '../../util/countUnreadStats.std.ts'; +import { getSelectedConversationId } from '../selectors/nav.std.ts'; const { debounce, omit, reject } = lodash; diff --git a/ts/state/ducks/stickers.preload.ts b/ts/state/ducks/stickers.preload.ts index 02e7de004b..50091f9911 100644 --- a/ts/state/ducks/stickers.preload.ts +++ b/ts/state/ducks/stickers.preload.ts @@ -7,27 +7,27 @@ import type { StickerPackStatusType, StickerType as StickerDBType, StickerPackType as StickerPackDBType, -} from '../../sql/Interface.std.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; +} from '../../sql/Interface.std.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; import type { ActionSourceType, RecentStickerType, -} from '../../types/Stickers.preload.js'; +} from '../../types/Stickers.preload.ts'; import { downloadStickerPack as externalDownloadStickerPack, maybeDeletePack, -} from '../../types/Stickers.preload.js'; -import { drop } from '../../util/drop.std.js'; -import { storageServiceUploadJob } from '../../services/storage.preload.js'; -import { sendStickerPackSync } from '../../shims/textsecure.preload.js'; -import { trigger } from '../../shims/events.dom.js'; -import { ERASE_STORAGE_SERVICE } from './user.preload.js'; -import type { EraseStorageServiceStateAction } from './user.preload.js'; +} from '../../types/Stickers.preload.ts'; +import { drop } from '../../util/drop.std.ts'; +import { storageServiceUploadJob } from '../../services/storage.preload.ts'; +import { sendStickerPackSync } from '../../shims/textsecure.preload.ts'; +import { trigger } from '../../shims/events.dom.ts'; +import { ERASE_STORAGE_SERVICE } from './user.preload.ts'; +import type { EraseStorageServiceStateAction } from './user.preload.ts'; -import type { NoopActionType } from './noop.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +import type { NoopActionType } from './noop.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; const { omit, reject } = lodash; diff --git a/ts/state/ducks/stories.preload.ts b/ts/state/ducks/stories.preload.ts index 9ff1359391..e639e0e979 100644 --- a/ts/state/ducks/stories.preload.ts +++ b/ts/state/ducks/stories.preload.ts @@ -5,85 +5,85 @@ import type { ThunkAction, ThunkDispatch } from 'redux-thunk'; import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import * as Errors from '../../types/errors.std.js'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import type { DraftBodyRanges } from '../../types/BodyRange.std.js'; +import * as Errors from '../../types/errors.std.ts'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import type { DraftBodyRanges } from '../../types/BodyRange.std.ts'; import type { ReadonlyMessageAttributesType } from '../../model-types.d.ts'; import type { MessageChangedActionType, MessageDeletedActionType, MessagesAddedActionType, TargetedConversationChangedActionType, -} from './conversations.preload.js'; -import type { NoopActionType } from './noop.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; +} from './conversations.preload.ts'; +import type { NoopActionType } from './noop.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; import type { StoryViewTargetType, StoryViewType, -} from '../../types/Stories.std.js'; -import type { SyncType } from '../../jobs/helpers/syncHelpers.preload.js'; -import type { StoryDistributionIdString } from '../../types/StoryDistributionId.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { TARGETED_CONVERSATION_CHANGED } from './conversations.preload.js'; -import { SIGNAL_ACI } from '../../types/SignalConversation.std.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.js'; +} from '../../types/Stories.std.ts'; +import type { SyncType } from '../../jobs/helpers/syncHelpers.preload.ts'; +import type { StoryDistributionIdString } from '../../types/StoryDistributionId.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { TARGETED_CONVERSATION_CHANGED } from './conversations.preload.ts'; +import { SIGNAL_ACI } from '../../types/SignalConversation.std.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.ts'; import { StoryViewDirectionType, StoryViewModeType, -} from '../../types/Stories.std.js'; -import { areStoryViewReceiptsEnabled } from '../../util/Settings.preload.js'; -import { assertDev, strictAssert } from '../../util/assert.std.js'; -import { drop } from '../../util/drop.std.js'; -import { blockSendUntilConversationsAreVerified } from '../../util/blockSendUntilConversationsAreVerified.dom.js'; -import { deleteStoryForEveryone as doDeleteStoryForEveryone } from '../../util/deleteStoryForEveryone.preload.js'; -import { deleteGroupStoryReplyForEveryone as doDeleteGroupStoryReplyForEveryone } from '../../util/deleteGroupStoryReplyForEveryone.preload.js'; -import { enqueueReactionForSend } from '../../reactions/enqueueReactionForSend.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { markOnboardingStoryAsRead } from '../../util/markOnboardingStoryAsRead.preload.js'; -import { markViewed } from '../../services/MessageUpdater.preload.js'; -import { queueAttachmentDownloads } from '../../util/queueAttachmentDownloads.preload.js'; -import { replaceIndex } from '../../util/replaceIndex.std.js'; -import type { DurationInSeconds } from '../../util/durations/index.std.js'; +} from '../../types/Stories.std.ts'; +import { areStoryViewReceiptsEnabled } from '../../util/Settings.preload.ts'; +import { assertDev, strictAssert } from '../../util/assert.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { blockSendUntilConversationsAreVerified } from '../../util/blockSendUntilConversationsAreVerified.dom.ts'; +import { deleteStoryForEveryone as doDeleteStoryForEveryone } from '../../util/deleteStoryForEveryone.preload.ts'; +import { deleteGroupStoryReplyForEveryone as doDeleteGroupStoryReplyForEveryone } from '../../util/deleteGroupStoryReplyForEveryone.preload.ts'; +import { enqueueReactionForSend } from '../../reactions/enqueueReactionForSend.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { markOnboardingStoryAsRead } from '../../util/markOnboardingStoryAsRead.preload.ts'; +import { markViewed } from '../../services/MessageUpdater.preload.ts'; +import { queueAttachmentDownloads } from '../../util/queueAttachmentDownloads.preload.ts'; +import { replaceIndex } from '../../util/replaceIndex.std.ts'; +import type { DurationInSeconds } from '../../util/durations/index.std.ts'; import { hasFailed, isDownloaded, isDownloading, -} from '../../util/Attachment.std.js'; +} from '../../util/Attachment.std.ts'; import { getConversationSelector, getHideStoryConversationIds, -} from '../selectors/conversations.dom.js'; +} from '../selectors/conversations.dom.ts'; import { getStories, getStoryDownloadableAttachment, -} from '../selectors/stories.preload.js'; -import { setStoriesDisabled as utilSetStoriesDisabled } from '../../util/stories.preload.js'; -import { getStoryDataFromMessageAttributes } from '../../services/storyLoader.preload.js'; -import { isGroup } from '../../util/whatTypeOfConversation.dom.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import { isStory } from '../../messages/helpers.std.js'; -import { sendStoryMessage as doSendStoryMessage } from '../../util/sendStoryMessage.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { verifyStoryListMembers as doVerifyStoryListMembers } from '../../util/verifyStoryListMembers.preload.js'; -import { viewSyncJobQueue } from '../../jobs/viewSyncJobQueue.preload.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import { SHOW_TOAST } from './toast.preload.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import type { ShowToastActionType } from './toast.preload.js'; +} from '../selectors/stories.preload.ts'; +import { setStoriesDisabled as utilSetStoriesDisabled } from '../../util/stories.preload.ts'; +import { getStoryDataFromMessageAttributes } from '../../services/storyLoader.preload.ts'; +import { isGroup } from '../../util/whatTypeOfConversation.dom.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import { isStory } from '../../messages/helpers.std.ts'; +import { sendStoryMessage as doSendStoryMessage } from '../../util/sendStoryMessage.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { verifyStoryListMembers as doVerifyStoryListMembers } from '../../util/verifyStoryListMembers.preload.ts'; +import { viewSyncJobQueue } from '../../jobs/viewSyncJobQueue.preload.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import { SHOW_TOAST } from './toast.preload.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import type { ShowToastActionType } from './toast.preload.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../../jobs/conversationJobQueue.preload.js'; -import { ReceiptType } from '../../types/Receipt.std.js'; -import { cleanupMessages } from '../../util/cleanup.preload.js'; -import { AttachmentDownloadUrgency } from '../../types/AttachmentDownload.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../jobs/conversationJobQueue.preload.ts'; +import { ReceiptType } from '../../types/Receipt.std.ts'; +import { cleanupMessages } from '../../util/cleanup.preload.ts'; +import { AttachmentDownloadUrgency } from '../../types/AttachmentDownload.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const { isEqual, pick } = lodash; diff --git a/ts/state/ducks/storyDistributionLists.preload.ts b/ts/state/ducks/storyDistributionLists.preload.ts index 46a6f34df3..6c63f8eb37 100644 --- a/ts/state/ducks/storyDistributionLists.preload.ts +++ b/ts/state/ducks/storyDistributionLists.preload.ts @@ -5,21 +5,21 @@ import lodash from 'lodash'; import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import type { StoryDistributionWithMembersType } from '../../sql/Interface.std.js'; -import type { StoryDistributionIdString } from '../../types/StoryDistributionId.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.js'; -import { deleteStoryForEveryone } from '../../util/deleteStoryForEveryone.preload.js'; -import { replaceIndex } from '../../util/replaceIndex.std.js'; -import { storageServiceUploadJob } from '../../services/storage.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import type { StoryDistributionWithMembersType } from '../../sql/Interface.std.ts'; +import type { StoryDistributionIdString } from '../../types/StoryDistributionId.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; +import { deleteStoryForEveryone } from '../../util/deleteStoryForEveryone.preload.ts'; +import { replaceIndex } from '../../util/replaceIndex.std.ts'; +import { storageServiceUploadJob } from '../../services/storage.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; const { omit } = lodash; diff --git a/ts/state/ducks/toast.preload.ts b/ts/state/ducks/toast.preload.ts index 38d894c44e..e07b509fae 100644 --- a/ts/state/ducks/toast.preload.ts +++ b/ts/state/ducks/toast.preload.ts @@ -4,10 +4,10 @@ import { ipcRenderer } from 'electron'; import type { ReadonlyDeep } from 'type-fest'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import type { NoopActionType } from './noop.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import type { AnyToast } from '../../types/Toast.dom.js'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import type { NoopActionType } from './noop.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import type { AnyToast } from '../../types/Toast.dom.tsx'; // State diff --git a/ts/state/ducks/updates.preload.ts b/ts/state/ducks/updates.preload.ts index 0dab50a123..3f99696e80 100644 --- a/ts/state/ducks/updates.preload.ts +++ b/ts/state/ducks/updates.preload.ts @@ -3,12 +3,12 @@ import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import * as updateIpc from '../../shims/updateIpc.preload.js'; -import { DialogType } from '../../types/Dialogs.std.js'; -import { DAY } from '../../util/durations/index.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import * as updateIpc from '../../shims/updateIpc.preload.ts'; +import { DialogType } from '../../types/Dialogs.std.ts'; +import { DAY } from '../../util/durations/index.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; // State diff --git a/ts/state/ducks/user.preload.ts b/ts/state/ducks/user.preload.ts index 57db2d809b..7b0467df15 100644 --- a/ts/state/ducks/user.preload.ts +++ b/ts/state/ducks/user.preload.ts @@ -2,16 +2,16 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyDeep } from 'type-fest'; -import { trigger } from '../../shims/events.dom.js'; -import type { LocaleMessagesType } from '../../types/I18N.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import type { MenuOptionsType } from '../../types/menu.std.js'; -import type { NoopActionType } from './noop.std.js'; -import type { AciString, PniString } from '../../types/ServiceId.std.js'; -import OS from '../../util/os/osMain.node.js'; -import { ThemeType } from '../../types/Util.std.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; +import { trigger } from '../../shims/events.dom.ts'; +import type { LocaleMessagesType } from '../../types/I18N.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import type { MenuOptionsType } from '../../types/menu.std.ts'; +import type { NoopActionType } from './noop.std.ts'; +import type { AciString, PniString } from '../../types/ServiceId.std.ts'; +import OS from '../../util/os/osMain.node.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; // State diff --git a/ts/state/ducks/username.preload.ts b/ts/state/ducks/username.preload.ts index 10c0c727ac..67866bab93 100644 --- a/ts/state/ducks/username.preload.ts +++ b/ts/state/ducks/username.preload.ts @@ -4,33 +4,33 @@ import type { ThunkAction } from 'redux-thunk'; import type { ReadonlyDeep } from 'type-fest'; -import type { UsernameReservationType } from '../../types/Username.std.js'; +import type { UsernameReservationType } from '../../types/Username.std.ts'; import { ReserveUsernameError, ConfirmUsernameResult, -} from '../../types/Username.std.js'; -import * as usernameServices from '../../services/username.preload.js'; -import { storageServiceUploadJob } from '../../services/storage.preload.js'; -import type { ReserveUsernameResultType } from '../../services/username.preload.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { sleep } from '../../util/sleep.std.js'; -import { assertDev } from '../../util/assert.std.js'; -import type { StateType as RootStateType } from '../reducer.preload.js'; -import type { PromiseAction } from '../util.std.js'; -import { getMe } from '../selectors/conversations.dom.js'; -import { getUsernameCorrupted } from '../selectors/items.dom.js'; +} from '../../types/Username.std.ts'; +import * as usernameServices from '../../services/username.preload.ts'; +import { storageServiceUploadJob } from '../../services/storage.preload.ts'; +import type { ReserveUsernameResultType } from '../../services/username.preload.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { sleep } from '../../util/sleep.std.ts'; +import { assertDev } from '../../util/assert.std.ts'; +import type { StateType as RootStateType } from '../reducer.preload.ts'; +import type { PromiseAction } from '../util.std.ts'; +import { getMe } from '../selectors/conversations.dom.ts'; +import { getUsernameCorrupted } from '../selectors/items.dom.ts'; import { UsernameEditState, UsernameLinkState, UsernameReservationState, UsernameReservationError, -} from './usernameEnums.std.js'; -import { showToast } from './toast.preload.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import type { ToastActionType } from './toast.preload.js'; -import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.js'; -import { useBoundActions } from '../../hooks/useBoundActions.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from './usernameEnums.std.ts'; +import { showToast } from './toast.preload.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import type { ToastActionType } from './toast.preload.ts'; +import type { BoundActionCreatorsMapObject } from '../../hooks/useBoundActions.std.ts'; +import { useBoundActions } from '../../hooks/useBoundActions.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; export type UsernameReservationStateType = ReadonlyDeep<{ state: UsernameReservationState; diff --git a/ts/state/getInitialState.preload.ts b/ts/state/getInitialState.preload.ts index 05f5e69769..0dff3c2db6 100644 --- a/ts/state/getInitialState.preload.ts +++ b/ts/state/getInitialState.preload.ts @@ -1,68 +1,68 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getEmptyState as accountsEmptyState } from './ducks/accounts.preload.js'; -import { getEmptyState as appEmptyState } from './ducks/app.preload.js'; -import { getEmptyState as audioPlayerEmptyState } from './ducks/audioPlayer.preload.js'; -import { getEmptyState as audioRecorderEmptyState } from './ducks/audioRecorder.preload.js'; -import { getEmptyState as backupsEmptyState } from './ducks/backups.preload.js'; -import { getEmptyState as badgesEmptyState } from './ducks/badges.preload.js'; -import { getEmptyState as callHistoryEmptyState } from './ducks/callHistory.preload.js'; -import { getEmptyState as callingEmptyState } from './ducks/calling.preload.js'; +import { getEmptyState as accountsEmptyState } from './ducks/accounts.preload.ts'; +import { getEmptyState as appEmptyState } from './ducks/app.preload.ts'; +import { getEmptyState as audioPlayerEmptyState } from './ducks/audioPlayer.preload.ts'; +import { getEmptyState as audioRecorderEmptyState } from './ducks/audioRecorder.preload.ts'; +import { getEmptyState as backupsEmptyState } from './ducks/backups.preload.ts'; +import { getEmptyState as badgesEmptyState } from './ducks/badges.preload.ts'; +import { getEmptyState as callHistoryEmptyState } from './ducks/callHistory.preload.ts'; +import { getEmptyState as callingEmptyState } from './ducks/calling.preload.ts'; import { getEmptyState as chatFoldersEmptyState, getInitialChatFoldersState, -} from './ducks/chatFolders.preload.js'; -import { getEmptyState as composerEmptyState } from './ducks/composer.preload.js'; -import { getEmptyState as conversationsEmptyState } from './ducks/conversations.preload.js'; -import { getEmptyState as crashReportsEmptyState } from './ducks/crashReports.preload.js'; -import { getEmptyState as donationsEmptyState } from './ducks/donations.preload.js'; -import { getEmptyState as emojiEmptyState } from './ducks/emojis.preload.js'; -import { getEmptyState as expirationEmptyState } from './ducks/expiration.std.js'; -import { getEmptyState as gifsEmptyState } from './ducks/gifs.preload.js'; -import { getEmptyState as globalModalsEmptyState } from './ducks/globalModals.preload.js'; -import { getEmptyState as inboxEmptyState } from './ducks/inbox.std.js'; -import { getEmptyState as installerEmptyState } from './ducks/installer.preload.js'; -import { getEmptyState as itemsEmptyState } from './ducks/items.preload.js'; -import { getEmptyState as lightboxEmptyState } from './ducks/lightbox.preload.js'; -import { getEmptyState as linkPreviewsEmptyState } from './ducks/linkPreviews.preload.js'; -import { getEmptyState as mediaGalleryEmptyState } from './ducks/mediaGallery.preload.js'; -import { getEmptyState as megaphonesEmptyState } from './ducks/megaphones.preload.js'; -import { getEmptyState as navEmptyState } from './ducks/nav.std.js'; -import { getEmptyState as networkEmptyState } from './ducks/network.dom.js'; -import { getEmptyState as notificationProfilesEmptyState } from './ducks/notificationProfiles.preload.js'; -import { getEmptyState as preferredReactionsEmptyState } from './ducks/preferredReactions.preload.js'; -import { getEmptyState as safetyNumberEmptyState } from './ducks/safetyNumber.preload.js'; -import { getEmptyState as searchEmptyState } from './ducks/search.preload.js'; -import { getEmptyState as stickersEmptyState } from './ducks/stickers.preload.js'; -import { getEmptyState as storiesEmptyState } from './ducks/stories.preload.js'; -import { getEmptyState as storyDistributionListsEmptyState } from './ducks/storyDistributionLists.preload.js'; -import { getEmptyState as toastEmptyState } from './ducks/toast.preload.js'; -import { getEmptyState as updatesEmptyState } from './ducks/updates.preload.js'; -import { getEmptyState as userEmptyState } from './ducks/user.preload.js'; -import { getEmptyState as usernameEmptyState } from './ducks/username.preload.js'; +} from './ducks/chatFolders.preload.ts'; +import { getEmptyState as composerEmptyState } from './ducks/composer.preload.ts'; +import { getEmptyState as conversationsEmptyState } from './ducks/conversations.preload.ts'; +import { getEmptyState as crashReportsEmptyState } from './ducks/crashReports.preload.ts'; +import { getEmptyState as donationsEmptyState } from './ducks/donations.preload.ts'; +import { getEmptyState as emojiEmptyState } from './ducks/emojis.preload.ts'; +import { getEmptyState as expirationEmptyState } from './ducks/expiration.std.ts'; +import { getEmptyState as gifsEmptyState } from './ducks/gifs.preload.ts'; +import { getEmptyState as globalModalsEmptyState } from './ducks/globalModals.preload.ts'; +import { getEmptyState as inboxEmptyState } from './ducks/inbox.std.ts'; +import { getEmptyState as installerEmptyState } from './ducks/installer.preload.ts'; +import { getEmptyState as itemsEmptyState } from './ducks/items.preload.ts'; +import { getEmptyState as lightboxEmptyState } from './ducks/lightbox.preload.ts'; +import { getEmptyState as linkPreviewsEmptyState } from './ducks/linkPreviews.preload.ts'; +import { getEmptyState as mediaGalleryEmptyState } from './ducks/mediaGallery.preload.ts'; +import { getEmptyState as megaphonesEmptyState } from './ducks/megaphones.preload.ts'; +import { getEmptyState as navEmptyState } from './ducks/nav.std.ts'; +import { getEmptyState as networkEmptyState } from './ducks/network.dom.ts'; +import { getEmptyState as notificationProfilesEmptyState } from './ducks/notificationProfiles.preload.ts'; +import { getEmptyState as preferredReactionsEmptyState } from './ducks/preferredReactions.preload.ts'; +import { getEmptyState as safetyNumberEmptyState } from './ducks/safetyNumber.preload.ts'; +import { getEmptyState as searchEmptyState } from './ducks/search.preload.ts'; +import { getEmptyState as stickersEmptyState } from './ducks/stickers.preload.ts'; +import { getEmptyState as storiesEmptyState } from './ducks/stories.preload.ts'; +import { getEmptyState as storyDistributionListsEmptyState } from './ducks/storyDistributionLists.preload.ts'; +import { getEmptyState as toastEmptyState } from './ducks/toast.preload.ts'; +import { getEmptyState as updatesEmptyState } from './ducks/updates.preload.ts'; +import { getEmptyState as userEmptyState } from './ducks/user.preload.ts'; +import { getEmptyState as usernameEmptyState } from './ducks/username.preload.ts'; -import OS from '../util/os/osMain.node.js'; -import { getInteractionMode } from '../services/InteractionMode.dom.js'; -import { makeLookup } from '../util/makeLookup.std.js'; +import OS from '../util/os/osMain.node.ts'; +import { getInteractionMode } from '../services/InteractionMode.dom.ts'; +import { makeLookup } from '../util/makeLookup.std.ts'; import { ATTACHMENTS_PATH, STICKERS_PATH, TEMP_PATH, -} from '../util/basePaths.preload.js'; +} from '../util/basePaths.preload.ts'; -import type { StateType } from './reducer.preload.js'; -import type { MainWindowStatsType } from '../windows/context.preload.js'; -import type { ConversationsStateType } from './ducks/conversations.preload.js'; -import type { MenuOptionsType } from '../types/menu.std.js'; +import type { StateType } from './reducer.preload.ts'; +import type { MainWindowStatsType } from '../windows/context.preload.ts'; +import type { ConversationsStateType } from './ducks/conversations.preload.ts'; +import type { MenuOptionsType } from '../types/menu.std.ts'; import type { StoryDistributionListDataType, StoryDistributionListStateType, -} from './ducks/storyDistributionLists.preload.js'; -import type { ThemeType } from '../types/Util.std.js'; -import type { UserStateType } from './ducks/user.preload.js'; -import type { ReduxInitData } from './initializeRedux.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from './ducks/storyDistributionLists.preload.ts'; +import type { ThemeType } from '../types/Util.std.ts'; +import type { UserStateType } from './ducks/user.preload.ts'; +import type { ReduxInitData } from './initializeRedux.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export function getInitialState( { diff --git a/ts/state/initializeRedux.preload.ts b/ts/state/initializeRedux.preload.ts index 45060b86a9..50fa250738 100644 --- a/ts/state/initializeRedux.preload.ts +++ b/ts/state/initializeRedux.preload.ts @@ -2,25 +2,25 @@ // SPDX-License-Identifier: AGPL-3.0-only import { bindActionCreators } from 'redux'; -import { actionCreators } from './actions.preload.js'; -import { createStore } from './createStore.preload.js'; -import { getInitialState } from './getInitialState.preload.js'; +import { actionCreators } from './actions.preload.ts'; +import { createStore } from './createStore.preload.ts'; +import { getInitialState } from './getInitialState.preload.ts'; -import type { BadgesStateType } from './ducks/badges.preload.js'; -import type { CallHistoryDetails } from '../types/CallDisposition.std.js'; -import type { DonationsStateType } from './ducks/donations.preload.js'; -import type { MainWindowStatsType } from '../windows/context.preload.js'; -import type { MenuOptionsType } from '../types/menu.std.js'; -import type { StoryDataType } from './ducks/stories.preload.js'; -import type { StoryDistributionListDataType } from './ducks/storyDistributionLists.preload.js'; -import type { ThemeType } from '../types/Util.std.js'; -import type { CallLinkType } from '../types/CallLink.std.js'; -import type { RecentEmojiObjectType } from '../util/loadRecentEmojis.preload.js'; -import type { StickersStateType } from './ducks/stickers.preload.js'; -import type { GifsStateType } from './ducks/gifs.preload.js'; -import type { NotificationProfileType } from '../types/NotificationProfile.std.js'; -import type { CurrentChatFolder } from '../types/CurrentChatFolders.std.js'; -import type { MegaphonesStateType } from './ducks/megaphones.preload.js'; +import type { BadgesStateType } from './ducks/badges.preload.ts'; +import type { CallHistoryDetails } from '../types/CallDisposition.std.ts'; +import type { DonationsStateType } from './ducks/donations.preload.ts'; +import type { MainWindowStatsType } from '../windows/context.preload.ts'; +import type { MenuOptionsType } from '../types/menu.std.ts'; +import type { StoryDataType } from './ducks/stories.preload.ts'; +import type { StoryDistributionListDataType } from './ducks/storyDistributionLists.preload.ts'; +import type { ThemeType } from '../types/Util.std.ts'; +import type { CallLinkType } from '../types/CallLink.std.ts'; +import type { RecentEmojiObjectType } from '../util/loadRecentEmojis.preload.ts'; +import type { StickersStateType } from './ducks/stickers.preload.ts'; +import type { GifsStateType } from './ducks/gifs.preload.ts'; +import type { NotificationProfileType } from '../types/NotificationProfile.std.ts'; +import type { CurrentChatFolder } from '../types/CurrentChatFolders.std.ts'; +import type { MegaphonesStateType } from './ducks/megaphones.preload.ts'; export type ReduxInitData = { badgesState: BadgesStateType; diff --git a/ts/state/reducer.preload.ts b/ts/state/reducer.preload.ts index 5dbc553182..4fe89f7a69 100644 --- a/ts/state/reducer.preload.ts +++ b/ts/state/reducer.preload.ts @@ -3,43 +3,43 @@ import { combineReducers } from 'redux'; -import { reducer as accounts } from './ducks/accounts.preload.js'; -import { reducer as app } from './ducks/app.preload.js'; -import { reducer as audioPlayer } from './ducks/audioPlayer.preload.js'; -import { reducer as audioRecorder } from './ducks/audioRecorder.preload.js'; -import { reducer as backups } from './ducks/backups.preload.js'; -import { reducer as badges } from './ducks/badges.preload.js'; -import { reducer as calling } from './ducks/calling.preload.js'; -import { reducer as callHistory } from './ducks/callHistory.preload.js'; -import { reducer as chatFolders } from './ducks/chatFolders.preload.js'; -import { reducer as composer } from './ducks/composer.preload.js'; -import { reducer as conversations } from './ducks/conversations.preload.js'; -import { reducer as crashReports } from './ducks/crashReports.preload.js'; -import { reducer as donations } from './ducks/donations.preload.js'; -import { reducer as emojis } from './ducks/emojis.preload.js'; -import { reducer as expiration } from './ducks/expiration.std.js'; -import { reducer as gifs } from './ducks/gifs.preload.js'; -import { reducer as globalModals } from './ducks/globalModals.preload.js'; -import { reducer as inbox } from './ducks/inbox.std.js'; -import { reducer as installer } from './ducks/installer.preload.js'; -import { reducer as items } from './ducks/items.preload.js'; -import { reducer as lightbox } from './ducks/lightbox.preload.js'; -import { reducer as linkPreviews } from './ducks/linkPreviews.preload.js'; -import { reducer as mediaGallery } from './ducks/mediaGallery.preload.js'; -import { reducer as megaphones } from './ducks/megaphones.preload.js'; -import { reducer as nav } from './ducks/nav.std.js'; -import { reducer as network } from './ducks/network.dom.js'; -import { reducer as notificationProfiles } from './ducks/notificationProfiles.preload.js'; -import { reducer as preferredReactions } from './ducks/preferredReactions.preload.js'; -import { reducer as safetyNumber } from './ducks/safetyNumber.preload.js'; -import { reducer as search } from './ducks/search.preload.js'; -import { reducer as stickers } from './ducks/stickers.preload.js'; -import { reducer as stories } from './ducks/stories.preload.js'; -import { reducer as storyDistributionLists } from './ducks/storyDistributionLists.preload.js'; -import { reducer as toast } from './ducks/toast.preload.js'; -import { reducer as updates } from './ducks/updates.preload.js'; -import { reducer as user } from './ducks/user.preload.js'; -import { reducer as username } from './ducks/username.preload.js'; +import { reducer as accounts } from './ducks/accounts.preload.ts'; +import { reducer as app } from './ducks/app.preload.ts'; +import { reducer as audioPlayer } from './ducks/audioPlayer.preload.ts'; +import { reducer as audioRecorder } from './ducks/audioRecorder.preload.ts'; +import { reducer as backups } from './ducks/backups.preload.ts'; +import { reducer as badges } from './ducks/badges.preload.ts'; +import { reducer as calling } from './ducks/calling.preload.ts'; +import { reducer as callHistory } from './ducks/callHistory.preload.ts'; +import { reducer as chatFolders } from './ducks/chatFolders.preload.ts'; +import { reducer as composer } from './ducks/composer.preload.ts'; +import { reducer as conversations } from './ducks/conversations.preload.ts'; +import { reducer as crashReports } from './ducks/crashReports.preload.ts'; +import { reducer as donations } from './ducks/donations.preload.ts'; +import { reducer as emojis } from './ducks/emojis.preload.ts'; +import { reducer as expiration } from './ducks/expiration.std.ts'; +import { reducer as gifs } from './ducks/gifs.preload.ts'; +import { reducer as globalModals } from './ducks/globalModals.preload.ts'; +import { reducer as inbox } from './ducks/inbox.std.ts'; +import { reducer as installer } from './ducks/installer.preload.ts'; +import { reducer as items } from './ducks/items.preload.ts'; +import { reducer as lightbox } from './ducks/lightbox.preload.ts'; +import { reducer as linkPreviews } from './ducks/linkPreviews.preload.ts'; +import { reducer as mediaGallery } from './ducks/mediaGallery.preload.ts'; +import { reducer as megaphones } from './ducks/megaphones.preload.ts'; +import { reducer as nav } from './ducks/nav.std.ts'; +import { reducer as network } from './ducks/network.dom.ts'; +import { reducer as notificationProfiles } from './ducks/notificationProfiles.preload.ts'; +import { reducer as preferredReactions } from './ducks/preferredReactions.preload.ts'; +import { reducer as safetyNumber } from './ducks/safetyNumber.preload.ts'; +import { reducer as search } from './ducks/search.preload.ts'; +import { reducer as stickers } from './ducks/stickers.preload.ts'; +import { reducer as stories } from './ducks/stories.preload.ts'; +import { reducer as storyDistributionLists } from './ducks/storyDistributionLists.preload.ts'; +import { reducer as toast } from './ducks/toast.preload.ts'; +import { reducer as updates } from './ducks/updates.preload.ts'; +import { reducer as user } from './ducks/user.preload.ts'; +import { reducer as username } from './ducks/username.preload.ts'; export const reducer = combineReducers({ accounts, diff --git a/ts/state/reinitializeRedux.preload.ts b/ts/state/reinitializeRedux.preload.ts index 7a4ad0fd30..dbd980e708 100644 --- a/ts/state/reinitializeRedux.preload.ts +++ b/ts/state/reinitializeRedux.preload.ts @@ -3,12 +3,12 @@ import type { UnknownAction } from 'redux'; -import { createLogger } from '../logging/log.std.js'; -import { getInitialState } from './getInitialState.preload.js'; -import { reducer as normalReducer } from './reducer.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { getInitialState } from './getInitialState.preload.ts'; +import { reducer as normalReducer } from './reducer.preload.ts'; -import type { StateType } from './reducer.preload.js'; -import type { ReduxInitData } from './initializeRedux.preload.js'; +import type { StateType } from './reducer.preload.ts'; +import type { ReduxInitData } from './initializeRedux.preload.ts'; const log = createLogger('reinitializeRedux'); diff --git a/ts/state/roots/createApp.preload.tsx b/ts/state/roots/createApp.preload.tsx index 3ae614ef47..1bbb93be3a 100644 --- a/ts/state/roots/createApp.preload.tsx +++ b/ts/state/roots/createApp.preload.tsx @@ -7,9 +7,9 @@ import { Provider } from 'react-redux'; import type { Store } from 'redux'; -import { SmartApp } from '../smart/App.preload.js'; -import { SmartVoiceNotesPlaybackProvider } from '../smart/VoiceNotesPlaybackProvider.preload.js'; -import { AxoProvider } from '../../axo/AxoProvider.dom.js'; +import { SmartApp } from '../smart/App.preload.tsx'; +import { SmartVoiceNotesPlaybackProvider } from '../smart/VoiceNotesPlaybackProvider.preload.tsx'; +import { AxoProvider } from '../../axo/AxoProvider.dom.tsx'; export const createApp = (store: Store): ReactElement => ( diff --git a/ts/state/roots/createGroupV2JoinModal.dom.tsx b/ts/state/roots/createGroupV2JoinModal.dom.tsx index fcb863deb9..4c5a0cd2ef 100644 --- a/ts/state/roots/createGroupV2JoinModal.dom.tsx +++ b/ts/state/roots/createGroupV2JoinModal.dom.tsx @@ -8,10 +8,10 @@ import { Provider } from 'react-redux'; import type { Store } from 'redux'; -import { ModalHost } from '../../components/ModalHost.dom.js'; -import type { SmartGroupV2JoinDialogProps } from '../smart/GroupV2JoinDialog.dom.js'; -import { SmartGroupV2JoinDialog } from '../smart/GroupV2JoinDialog.dom.js'; -import { FunEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.js'; +import { ModalHost } from '../../components/ModalHost.dom.tsx'; +import type { SmartGroupV2JoinDialogProps } from '../smart/GroupV2JoinDialog.dom.tsx'; +import { SmartGroupV2JoinDialog } from '../smart/GroupV2JoinDialog.dom.tsx'; +import { FunEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.tsx'; export const createGroupV2JoinModal = ( store: Store, diff --git a/ts/state/selectors/accounts.std.ts b/ts/state/selectors/accounts.std.ts index 5b62c9cd04..c6847c4273 100644 --- a/ts/state/selectors/accounts.std.ts +++ b/ts/state/selectors/accounts.std.ts @@ -3,9 +3,9 @@ import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { AccountsStateType } from '../ducks/accounts.preload.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { AccountsStateType } from '../ducks/accounts.preload.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; export const getAccounts = (state: StateType): AccountsStateType => state.accounts; diff --git a/ts/state/selectors/app.std.ts b/ts/state/selectors/app.std.ts index f25d491c37..e8fa986082 100644 --- a/ts/state/selectors/app.std.ts +++ b/ts/state/selectors/app.std.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { AppStateType } from '../ducks/app.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { AppStateType } from '../ducks/app.preload.ts'; export const getApp = (state: StateType): AppStateType => state.app; diff --git a/ts/state/selectors/audioPlayer.preload.ts b/ts/state/selectors/audioPlayer.preload.ts index 604f4c9cd3..32c5c3bce6 100644 --- a/ts/state/selectors/audioPlayer.preload.ts +++ b/ts/state/selectors/audioPlayer.preload.ts @@ -7,23 +7,23 @@ import { getUserACI, getUserConversationId, getUserNumber, -} from './user.std.js'; -import { getSource, getSourceServiceId } from './message.preload.js'; +} from './user.std.ts'; +import { getSource, getSourceServiceId } from './message.preload.ts'; import { getConversationByIdSelector, getConversations, getConversationSelector, -} from './conversations.dom.js'; -import type { StateType } from '../reducer.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { getLocalAttachmentUrl } from '../../util/getLocalAttachmentUrl.std.js'; +} from './conversations.dom.ts'; +import type { StateType } from '../reducer.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { getLocalAttachmentUrl } from '../../util/getLocalAttachmentUrl.std.ts'; import type { ReadonlyMessageAttributesType } from '../../model-types.d.ts'; -import { getMessageIdForLogging } from '../../util/idForLogging.preload.js'; -import * as Attachment from '../../util/Attachment.std.js'; -import type { ActiveAudioPlayerStateType } from '../ducks/audioPlayer.preload.js'; -import { isVoiceMessagePlayed } from '../../util/isVoiceMessagePlayed.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { getSelectedConversationId } from './nav.std.js'; +import { getMessageIdForLogging } from '../../util/idForLogging.preload.ts'; +import * as Attachment from '../../util/Attachment.std.ts'; +import type { ActiveAudioPlayerStateType } from '../ducks/audioPlayer.preload.ts'; +import { isVoiceMessagePlayed } from '../../util/isVoiceMessagePlayed.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { getSelectedConversationId } from './nav.std.ts'; const log = createLogger('audioPlayer'); diff --git a/ts/state/selectors/audioRecorder.std.ts b/ts/state/selectors/audioRecorder.std.ts index 8f45811321..a12900613a 100644 --- a/ts/state/selectors/audioRecorder.std.ts +++ b/ts/state/selectors/audioRecorder.std.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { AudioRecorderStateType } from '../ducks/audioRecorder.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { AudioRecorderStateType } from '../ducks/audioRecorder.preload.ts'; export function getAudioRecorder(state: StateType): AudioRecorderStateType { return state.audioRecorder; diff --git a/ts/state/selectors/backups.std.ts b/ts/state/selectors/backups.std.ts index 09eb864f49..5324b7f7f1 100644 --- a/ts/state/selectors/backups.std.ts +++ b/ts/state/selectors/backups.std.ts @@ -3,12 +3,12 @@ import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { BackupsStateType } from '../ducks/backups.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { BackupsStateType } from '../ducks/backups.preload.ts'; import type { PlaintextExportWorkflowType, LocalBackupExportWorkflowType, -} from '../../types/LocalExport.std.js'; +} from '../../types/LocalExport.std.ts'; export const getBackups = (state: StateType): BackupsStateType => state.backups; diff --git a/ts/state/selectors/badges.preload.ts b/ts/state/selectors/badges.preload.ts index 31986be5ba..6da2bf29ea 100644 --- a/ts/state/selectors/badges.preload.ts +++ b/ts/state/selectors/badges.preload.ts @@ -3,13 +3,13 @@ import { createSelector } from 'reselect'; import lodash from 'lodash'; -import { createLogger } from '../../logging/log.std.js'; -import type { StateType } from '../reducer.preload.js'; -import type { BadgesStateType } from '../ducks/badges.preload.js'; -import type { BadgeType } from '../../badges/types.std.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import { getAbsoluteBadgeImageFilePath } from '../../util/migrations.preload.js'; -import type { ConversationType } from '../ducks/conversations.preload.js'; +import { createLogger } from '../../logging/log.std.ts'; +import type { StateType } from '../reducer.preload.ts'; +import type { BadgesStateType } from '../ducks/badges.preload.ts'; +import type { BadgeType } from '../../badges/types.std.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import { getAbsoluteBadgeImageFilePath } from '../../util/migrations.preload.ts'; +import type { ConversationType } from '../ducks/conversations.preload.ts'; const { mapValues } = lodash; diff --git a/ts/state/selectors/callHistory.std.ts b/ts/state/selectors/callHistory.std.ts index e52d442779..6500894dbb 100644 --- a/ts/state/selectors/callHistory.std.ts +++ b/ts/state/selectors/callHistory.std.ts @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import type { CallHistoryState } from '../ducks/callHistory.preload.js'; -import type { StateType } from '../reducer.preload.js'; +import type { CallHistoryState } from '../ducks/callHistory.preload.ts'; +import type { StateType } from '../reducer.preload.ts'; import { AdhocCallStatus, CallType, type CallHistoryDetails, -} from '../../types/CallDisposition.std.js'; -import { getOwn } from '../../util/getOwn.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; const getCallHistory = (state: StateType): CallHistoryState => state.callHistory; diff --git a/ts/state/selectors/calling.std.ts b/ts/state/selectors/calling.std.ts index c210cd5a7a..50f369337f 100644 --- a/ts/state/selectors/calling.std.ts +++ b/ts/state/selectors/calling.std.ts @@ -3,7 +3,7 @@ import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; +import type { StateType } from '../reducer.preload.ts'; import type { CallingStateType, CallsByConversationType, @@ -13,18 +13,18 @@ import type { GroupCallStateType, ActiveCallStateType, GroupCallParticipantInfoType, -} from '../ducks/calling.preload.js'; -import { getRingingCall as getRingingCallHelper } from '../ducks/callingHelpers.std.js'; -import type { PresentedSource } from '../../types/Calling.std.js'; -import { CallMode } from '../../types/CallDisposition.std.js'; +} from '../ducks/calling.preload.ts'; +import { getRingingCall as getRingingCallHelper } from '../ducks/callingHelpers.std.ts'; +import type { PresentedSource } from '../../types/Calling.std.ts'; +import { CallMode } from '../../types/CallDisposition.std.ts'; import { isCallLinkAdmin, type CallLinkType, -} from '../../types/CallLink.std.js'; -import { getUserACI } from './user.std.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { isGroupOrAdhocCallState } from '../../util/isGroupOrAdhocCall.std.js'; +} from '../../types/CallLink.std.ts'; +import { getUserACI } from './user.std.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { isGroupOrAdhocCallState } from '../../util/isGroupOrAdhocCall.std.ts'; export type CallStateType = DirectCallStateType | GroupCallStateType; diff --git a/ts/state/selectors/chatFolders.std.ts b/ts/state/selectors/chatFolders.std.ts index c1215740b1..ab6f5cc211 100644 --- a/ts/state/selectors/chatFolders.std.ts +++ b/ts/state/selectors/chatFolders.std.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { StateSelector } from '../types.std.js'; -import type { ChatFoldersState } from '../ducks/chatFolders.preload.js'; -import type { CurrentChatFolder } from '../../types/CurrentChatFolders.std.js'; -import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { StateSelector } from '../types.std.ts'; +import type { ChatFoldersState } from '../ducks/chatFolders.preload.ts'; +import type { CurrentChatFolder } from '../../types/CurrentChatFolders.std.ts'; +import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.ts'; export function getChatFoldersState(state: StateType): ChatFoldersState { return state.chatFolders; diff --git a/ts/state/selectors/composer.preload.ts b/ts/state/selectors/composer.preload.ts index 1d7cc3e6dd..c64a8681ed 100644 --- a/ts/state/selectors/composer.preload.ts +++ b/ts/state/selectors/composer.preload.ts @@ -3,12 +3,12 @@ import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; +import type { StateType } from '../reducer.preload.ts'; import type { ComposerStateType, QuotedMessageForComposerType, -} from '../ducks/composer.preload.js'; -import { getComposerStateForConversation } from '../ducks/composer.preload.js'; +} from '../ducks/composer.preload.ts'; +import { getComposerStateForConversation } from '../ducks/composer.preload.ts'; export const getComposerState = (state: StateType): ComposerStateType => state.composer; diff --git a/ts/state/selectors/conversations-extra.preload.ts b/ts/state/selectors/conversations-extra.preload.ts index 82b20868c2..2741fbd07a 100644 --- a/ts/state/selectors/conversations-extra.preload.ts +++ b/ts/state/selectors/conversations-extra.preload.ts @@ -6,21 +6,21 @@ import { createSelector } from 'reselect'; -import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.js'; -import type { ContactsByStory } from '../../components/SafetyNumberChangeDialog.dom.js'; -import type { ConversationVerificationData } from '../ducks/conversations.preload.js'; -import type { StoryDistributionListDataType } from '../ducks/storyDistributionLists.preload.js'; -import type { GetConversationByIdType } from './conversations.dom.js'; -import { isSignalConnection } from '../../util/getSignalConnections.preload.js'; +import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; +import type { ContactsByStory } from '../../components/SafetyNumberChangeDialog.dom.tsx'; +import type { ConversationVerificationData } from '../ducks/conversations.preload.ts'; +import type { StoryDistributionListDataType } from '../ducks/storyDistributionLists.preload.ts'; +import type { GetConversationByIdType } from './conversations.dom.ts'; +import { isSignalConnection } from '../../util/getSignalConnections.preload.ts'; -import { isGroup } from '../../util/whatTypeOfConversation.dom.js'; +import { isGroup } from '../../util/whatTypeOfConversation.dom.ts'; import { getAllConversations, getConversationSelector, getConversationVerificationData, -} from './conversations.dom.js'; -import { ConversationVerificationState } from '../ducks/conversationsEnums.std.js'; -import { getDistributionListSelector } from './storyDistributionLists.dom.js'; +} from './conversations.dom.ts'; +import { ConversationVerificationState } from '../ducks/conversationsEnums.std.ts'; +import { getDistributionListSelector } from './storyDistributionLists.dom.ts'; export const getByDistributionListConversationsStoppingSend = createSelector( getConversationSelector, diff --git a/ts/state/selectors/conversations.dom.ts b/ts/state/selectors/conversations.dom.ts index bb56ef4c1c..d703eec816 100644 --- a/ts/state/selectors/conversations.dom.ts +++ b/ts/state/selectors/conversations.dom.ts @@ -5,8 +5,8 @@ import memoizee from 'memoizee'; import { memoize } from '@indutny/sneequals'; import lodash from 'lodash'; import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { StateSelector } from '../types.std.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { StateSelector } from '../types.std.ts'; import type { ConversationLookupType, ConversationMessageType, @@ -17,84 +17,84 @@ import type { MessagesByConversationType, MessageTimestamps, PreJoinConversationType, -} from '../ducks/conversations.preload.js'; +} from '../ducks/conversations.preload.ts'; import type { StoriesStateType, StoryDataType, -} from '../ducks/stories.preload.js'; +} from '../ducks/stories.preload.ts'; import { ComposerStep, OneTimeModalState, ConversationVerificationState, type TargetedMessageSource, -} from '../ducks/conversationsEnums.std.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.js'; -import { deconstructLookup } from '../../util/deconstructLookup.std.js'; -import type { PropsDataType as TimelinePropsType } from '../../components/conversation/Timeline.dom.js'; -import { assertDev } from '../../util/assert.std.js'; -import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.js'; -import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.js'; -import type { ContactNameColorType } from '../../types/Colors.std.js'; -import { ContactNameColors } from '../../types/Colors.std.js'; -import type { AvatarDataType } from '../../types/Avatar.std.js'; -import type { AciString, ServiceIdString } from '../../types/ServiceId.std.js'; -import { normalizeServiceId } from '../../types/ServiceId.std.js'; -import { isInSystemContacts } from '../../util/isInSystemContacts.std.js'; -import { sortByTitle } from '../../util/sortByTitle.std.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; +} from '../ducks/conversationsEnums.std.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import type { UUIDFetchStateType } from '../../util/uuidFetchState.std.ts'; +import { deconstructLookup } from '../../util/deconstructLookup.std.ts'; +import type { PropsDataType as TimelinePropsType } from '../../components/conversation/Timeline.dom.tsx'; +import { assertDev } from '../../util/assert.std.ts'; +import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.ts'; +import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.ts'; +import type { ContactNameColorType } from '../../types/Colors.std.ts'; +import { ContactNameColors } from '../../types/Colors.std.ts'; +import type { AvatarDataType } from '../../types/Avatar.std.ts'; +import type { AciString, ServiceIdString } from '../../types/ServiceId.std.ts'; +import { normalizeServiceId } from '../../types/ServiceId.std.ts'; +import { isInSystemContacts } from '../../util/isInSystemContacts.std.ts'; +import { sortByTitle } from '../../util/sortByTitle.std.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; import { isDirectConversation, isGroupV1, isGroupV2, -} from '../../util/whatTypeOfConversation.dom.js'; -import { isGroupInStoryMode } from '../../util/isGroupInStoryMode.std.js'; +} from '../../util/whatTypeOfConversation.dom.ts'; +import { isGroupInStoryMode } from '../../util/isGroupInStoryMode.std.ts'; import { getIntl, getRegionCode, getUserConversationId, getUserNumber, -} from './user.std.js'; +} from './user.std.ts'; import { getBadgeCountMutedConversations, getPinnedConversationIds, getStoriesEnabled, -} from './items.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import { TimelineMessageLoadingState } from '../../util/timelineUtil.std.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; -import { reduce } from '../../util/iterables.std.js'; -import type { HasStories } from '../../types/Stories.std.js'; -import { getHasStoriesSelector } from './stories2.dom.js'; -import { canEditMessage } from '../../util/canEditMessage.dom.js'; -import { isOutgoing } from '../../messages/helpers.std.js'; +} from './items.dom.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { TimelineMessageLoadingState } from '../../util/timelineUtil.std.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; +import { reduce } from '../../util/iterables.std.ts'; +import type { HasStories } from '../../types/Stories.std.ts'; +import { getHasStoriesSelector } from './stories2.dom.ts'; +import { canEditMessage } from '../../util/canEditMessage.dom.ts'; +import { isOutgoing } from '../../messages/helpers.std.ts'; import type { AllChatFoldersUnreadStats, UnreadStats, -} from '../../util/countUnreadStats.std.js'; +} from '../../util/countUnreadStats.std.ts'; import { type ChatFolder, isConversationInChatFolder, -} from '../../types/ChatFolder.std.js'; +} from '../../types/ChatFolder.std.ts'; import { getSelectedChatFolder, getCurrentChatFolders, getStableSelectedConversationIdInChatFolder, -} from './chatFolders.std.js'; +} from './chatFolders.std.ts'; import { countAllChatFoldersUnreadStats, countAllConversationsUnreadStats, -} from '../../util/countUnreadStats.std.js'; -import type { AllChatFoldersMutedStats } from '../../util/countMutedStats.std.js'; -import { countAllChatFoldersMutedStats } from '../../util/countMutedStats.std.js'; -import { getActiveProfile } from './notificationProfiles.dom.js'; -import type { PinnedMessage } from '../../types/PinnedMessage.std.js'; -import { getPinnedMessagesLimit } from '../../util/pinnedMessages.dom.js'; -import { getSelectedConversationId, getSelectedNavTab } from './nav.std.js'; -import { getCallHistoryUnreadCount } from './callHistory.std.js'; -import { NavTab } from '../../types/Nav.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; +} from '../../util/countUnreadStats.std.ts'; +import type { AllChatFoldersMutedStats } from '../../util/countMutedStats.std.ts'; +import { countAllChatFoldersMutedStats } from '../../util/countMutedStats.std.ts'; +import { getActiveProfile } from './notificationProfiles.dom.ts'; +import type { PinnedMessage } from '../../types/PinnedMessage.std.ts'; +import { getPinnedMessagesLimit } from '../../util/pinnedMessages.dom.ts'; +import { getSelectedConversationId, getSelectedNavTab } from './nav.std.ts'; +import { getCallHistoryUnreadCount } from './callHistory.std.ts'; +import { NavTab } from '../../types/Nav.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; const { isNumber, pick } = lodash; diff --git a/ts/state/selectors/crashReports.std.ts b/ts/state/selectors/crashReports.std.ts index 3df77c308b..5725c4d725 100644 --- a/ts/state/selectors/crashReports.std.ts +++ b/ts/state/selectors/crashReports.std.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { CrashReportsStateType } from '../ducks/crashReports.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { CrashReportsStateType } from '../ducks/crashReports.preload.ts'; const getCrashReports = (state: StateType): CrashReportsStateType => state.crashReports; diff --git a/ts/state/selectors/donations.std.ts b/ts/state/selectors/donations.std.ts index 33ece04742..1728ed80f0 100644 --- a/ts/state/selectors/donations.std.ts +++ b/ts/state/selectors/donations.std.ts @@ -3,9 +3,9 @@ import { createSelector } from 'reselect'; import type { ReadonlyDeep } from 'type-fest'; -import type { StateType } from '../reducer.preload.js'; -import type { DonationsStateType } from '../ducks/donations.preload.js'; -import type { OneTimeDonationHumanAmounts } from '../../types/Donations.std.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { DonationsStateType } from '../ducks/donations.preload.ts'; +import type { OneTimeDonationHumanAmounts } from '../../types/Donations.std.ts'; export const getDonationsState = ( state: Readonly diff --git a/ts/state/selectors/emojis.std.ts b/ts/state/selectors/emojis.std.ts index 0530a0263f..a76ce92050 100644 --- a/ts/state/selectors/emojis.std.ts +++ b/ts/state/selectors/emojis.std.ts @@ -3,8 +3,8 @@ import { createSelector } from 'reselect'; import { useSelector } from 'react-redux'; -import type { StateType } from '../reducer.preload.js'; -import { isEmojiEnglishShortName } from '../../components/fun/data/emojis.std.js'; +import type { StateType } from '../reducer.preload.ts'; +import { isEmojiEnglishShortName } from '../../components/fun/data/emojis.std.ts'; export const selectRecentEmojis = createSelector( ({ emojis }: StateType) => emojis.recents, diff --git a/ts/state/selectors/expiration.dom.ts b/ts/state/selectors/expiration.dom.ts index 94c732685f..067babc885 100644 --- a/ts/state/selectors/expiration.dom.ts +++ b/ts/state/selectors/expiration.dom.ts @@ -3,17 +3,17 @@ import { createSelector } from 'reselect'; -import { createLogger } from '../../logging/log.std.js'; -import type { StateType } from '../reducer.preload.js'; -import type { ExpirationStateType } from '../ducks/expiration.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import type { StateType } from '../reducer.preload.ts'; +import type { ExpirationStateType } from '../ducks/expiration.std.ts'; import { getRemoteBuildExpiration, getAutoDownloadUpdate, -} from './items.dom.js'; +} from './items.dom.ts'; import { getBuildExpirationTimestamp, hasBuildExpired, -} from '../../util/buildExpiration.std.js'; +} from '../../util/buildExpiration.std.ts'; const log = createLogger('expiration'); diff --git a/ts/state/selectors/gifs.std.ts b/ts/state/selectors/gifs.std.ts index 3cb696206c..f400f96bb0 100644 --- a/ts/state/selectors/gifs.std.ts +++ b/ts/state/selectors/gifs.std.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { GifsStateType } from '../ducks/gifs.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { GifsStateType } from '../ducks/gifs.preload.ts'; export const selectGifs = (state: StateType): GifsStateType => state.gifs; diff --git a/ts/state/selectors/globalModals.std.ts b/ts/state/selectors/globalModals.std.ts index eb7360521b..17c380ee4d 100644 --- a/ts/state/selectors/globalModals.std.ts +++ b/ts/state/selectors/globalModals.std.ts @@ -3,11 +3,11 @@ import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { GlobalModalsStateType } from '../ducks/globalModals.preload.js'; -import { UsernameOnboardingState } from '../../types/globalModals.std.js'; -import type { StateSelector } from '../types.std.js'; -import type { PinMessageDialogData } from '../smart/PinMessageDialog.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { GlobalModalsStateType } from '../ducks/globalModals.preload.ts'; +import { UsernameOnboardingState } from '../../types/globalModals.std.ts'; +import type { StateSelector } from '../types.std.ts'; +import type { PinMessageDialogData } from '../smart/PinMessageDialog.preload.tsx'; export const getGlobalModalsState = (state: StateType): GlobalModalsStateType => state.globalModals; diff --git a/ts/state/selectors/inbox.std.ts b/ts/state/selectors/inbox.std.ts index 77fa6e409e..ca2cfcbb78 100644 --- a/ts/state/selectors/inbox.std.ts +++ b/ts/state/selectors/inbox.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; +import type { StateType } from '../reducer.preload.ts'; const getInboxState = (state: StateType) => state.inbox; diff --git a/ts/state/selectors/installer.std.ts b/ts/state/selectors/installer.std.ts index 5c456d3cbf..2c6f602673 100644 --- a/ts/state/selectors/installer.std.ts +++ b/ts/state/selectors/installer.std.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { StateType } from '../reducer.preload.js'; -import type { InstallerStateType } from '../ducks/installer.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { InstallerStateType } from '../ducks/installer.preload.ts'; export const getInstallerState = (state: StateType): InstallerStateType => state.installer; diff --git a/ts/state/selectors/items.dom.ts b/ts/state/selectors/items.dom.ts index 492d2ec9bf..afb0c67306 100644 --- a/ts/state/selectors/items.dom.ts +++ b/ts/state/selectors/items.dom.ts @@ -3,27 +3,27 @@ import { createSelector } from 'reselect'; -import { isCountryPpmCsvBucketEnabled } from '../../RemoteConfig.dom.js'; -import type { ConfigKeyType, ConfigMapType } from '../../RemoteConfig.dom.js'; -import type { StateType } from '../reducer.preload.js'; -import type { ItemsStateType } from '../ducks/items.preload.js'; +import { isCountryPpmCsvBucketEnabled } from '../../RemoteConfig.dom.ts'; +import type { ConfigKeyType, ConfigMapType } from '../../RemoteConfig.dom.ts'; +import type { StateType } from '../reducer.preload.ts'; +import type { ItemsStateType } from '../ducks/items.preload.ts'; import type { ConversationColorType, CustomColorType, -} from '../../types/Colors.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { DEFAULT_CONVERSATION_COLOR } from '../../types/Colors.std.js'; -import { getPreferredReactionEmoji as getPreferredReactionEmojiFromStoredValue } from '../../reactions/preferredReactionEmoji.std.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import * as Bytes from '../../Bytes.std.js'; -import { contactByEncryptedUsernameRoute } from '../../util/signalRoutes.std.js'; -import { isNotUpdatable } from '../../util/version.std.js'; +} from '../../types/Colors.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { DEFAULT_CONVERSATION_COLOR } from '../../types/Colors.std.ts'; +import { getPreferredReactionEmoji as getPreferredReactionEmojiFromStoredValue } from '../../reactions/preferredReactionEmoji.std.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { contactByEncryptedUsernameRoute } from '../../util/signalRoutes.std.ts'; +import { isNotUpdatable } from '../../util/version.std.ts'; import { EmojiSkinTone, isValidEmojiSkinTone, -} from '../../components/fun/data/emojis.std.js'; -import { BackupLevel } from '../../services/backups/types.std.js'; -import type { StateSelector } from '../types.std.js'; +} from '../../components/fun/data/emojis.std.ts'; +import { BackupLevel } from '../../services/backups/types.std.ts'; +import type { StateSelector } from '../types.std.ts'; const DEFAULT_PREFERRED_LEFT_PANE_WIDTH = 320; diff --git a/ts/state/selectors/lightbox.std.ts b/ts/state/selectors/lightbox.std.ts index a77d4cceca..7b5ece00bc 100644 --- a/ts/state/selectors/lightbox.std.ts +++ b/ts/state/selectors/lightbox.std.ts @@ -3,9 +3,9 @@ import { createSelector } from 'reselect'; import type { ReadonlyDeep } from 'type-fest'; -import type { MediaItemType } from '../../types/MediaItem.std.js'; -import type { StateType } from '../reducer.preload.js'; -import type { LightboxStateType } from '../ducks/lightbox.preload.js'; +import type { MediaItemType } from '../../types/MediaItem.std.ts'; +import type { StateType } from '../reducer.preload.ts'; +import type { LightboxStateType } from '../ducks/lightbox.preload.ts'; export const getLightboxState = (state: StateType): LightboxStateType => state.lightbox; diff --git a/ts/state/selectors/linkPreviews.std.ts b/ts/state/selectors/linkPreviews.std.ts index bfe198454a..f2a612bfa2 100644 --- a/ts/state/selectors/linkPreviews.std.ts +++ b/ts/state/selectors/linkPreviews.std.ts @@ -3,8 +3,8 @@ import { createSelector } from 'reselect'; -import type { LinkPreviewSourceType } from '../../types/LinkPreview.std.js'; -import type { StateType } from '../reducer.preload.js'; +import type { LinkPreviewSourceType } from '../../types/LinkPreview.std.ts'; +import type { StateType } from '../reducer.preload.ts'; export const getLinkPreview = createSelector( ({ linkPreviews }: StateType) => linkPreviews, diff --git a/ts/state/selectors/mediaGallery.std.ts b/ts/state/selectors/mediaGallery.std.ts index cd82ff1474..3223f64892 100644 --- a/ts/state/selectors/mediaGallery.std.ts +++ b/ts/state/selectors/mediaGallery.std.ts @@ -1,8 +1,8 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { StateType } from '../reducer.preload.js'; -import type { MediaGalleryStateType } from '../ducks/mediaGallery.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { MediaGalleryStateType } from '../ducks/mediaGallery.preload.ts'; export const getMediaGalleryState = (state: StateType): MediaGalleryStateType => state.mediaGallery; diff --git a/ts/state/selectors/megaphones.preload.ts b/ts/state/selectors/megaphones.preload.ts index cb123c8564..2b02dbd1fa 100644 --- a/ts/state/selectors/megaphones.preload.ts +++ b/ts/state/selectors/megaphones.preload.ts @@ -2,19 +2,19 @@ // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { MegaphonesStateType } from '../ducks/megaphones.preload.js'; -import { getAbsoluteMegaphoneImageFilePath } from '../../util/migrations.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { MegaphonesStateType } from '../ducks/megaphones.preload.ts'; +import { getAbsoluteMegaphoneImageFilePath } from '../../util/migrations.preload.ts'; import { MegaphoneType, type RemoteMegaphoneDisplayType, type VisibleRemoteMegaphoneType, -} from '../../types/Megaphone.std.js'; -import type { StateSelector } from '../types.std.js'; +} from '../../types/Megaphone.std.ts'; +import type { StateSelector } from '../types.std.ts'; import { isTestMegaphone, TEST_MEGAPHONE_IMAGE, -} from '../../util/getTestMegaphone.std.js'; +} from '../../util/getTestMegaphone.std.ts'; export function getMegaphonesState( state: Readonly diff --git a/ts/state/selectors/message.preload.ts b/ts/state/selectors/message.preload.ts index d8ec387985..145a407206 100644 --- a/ts/state/selectors/message.preload.ts +++ b/ts/state/selectors/message.preload.ts @@ -20,90 +20,90 @@ import type { import type { Contact as SmartMessageDetailContact, OwnProps as SmartMessageDetailPropsType, -} from '../smart/MessageDetail.preload.js'; -import type { TimelineItemType } from '../../components/conversation/TimelineItem.dom.js'; -import type { PropsData } from '../../components/conversation/Message.dom.js'; -import type { PropsData as TimelineMessagePropsData } from '../../components/conversation/TimelineMessage.dom.js'; -import { TextDirection } from '../../components/conversation/Message.dom.js'; -import type { PropsData as TimerNotificationProps } from '../../components/conversation/TimerNotification.dom.js'; -import type { PropsData as ChangeNumberNotificationProps } from '../../components/conversation/ChangeNumberNotification.dom.js'; -import type { PropsData as JoinedSignalNotificationProps } from '../../components/conversation/JoinedSignalNotification.dom.js'; -import type { PropsData as SafetyNumberNotificationProps } from '../../components/conversation/SafetyNumberNotification.dom.js'; -import type { PropsData as VerificationNotificationProps } from '../../components/conversation/VerificationNotification.dom.js'; -import type { PropsData as TitleTransitionNotificationProps } from '../../components/conversation/TitleTransitionNotification.dom.js'; -import type { PropsDataType as GroupsV2Props } from '../../components/conversation/GroupV2Change.dom.js'; -import type { PropsDataType as GroupV1MigrationPropsType } from '../../components/conversation/GroupV1Migration.dom.js'; -import type { PropsDataType as DeliveryIssuePropsType } from '../../components/conversation/DeliveryIssueNotification.dom.js'; -import type { PropsType as PaymentEventNotificationPropsType } from '../../components/conversation/PaymentEventNotification.dom.js'; -import type { PropsDataType as ConversationMergePropsType } from '../../components/conversation/ConversationMergeNotification.dom.js'; -import type { PropsDataType as PhoneNumberDiscoveryPropsType } from '../../components/conversation/PhoneNumberDiscoveryNotification.dom.js'; +} from '../smart/MessageDetail.preload.tsx'; +import type { TimelineItemType } from '../../components/conversation/TimelineItem.dom.tsx'; +import type { PropsData } from '../../components/conversation/Message.dom.tsx'; +import type { PropsData as TimelineMessagePropsData } from '../../components/conversation/TimelineMessage.dom.tsx'; +import { TextDirection } from '../../components/conversation/Message.dom.tsx'; +import type { PropsData as TimerNotificationProps } from '../../components/conversation/TimerNotification.dom.tsx'; +import type { PropsData as ChangeNumberNotificationProps } from '../../components/conversation/ChangeNumberNotification.dom.tsx'; +import type { PropsData as JoinedSignalNotificationProps } from '../../components/conversation/JoinedSignalNotification.dom.tsx'; +import type { PropsData as SafetyNumberNotificationProps } from '../../components/conversation/SafetyNumberNotification.dom.tsx'; +import type { PropsData as VerificationNotificationProps } from '../../components/conversation/VerificationNotification.dom.tsx'; +import type { PropsData as TitleTransitionNotificationProps } from '../../components/conversation/TitleTransitionNotification.dom.tsx'; +import type { PropsDataType as GroupsV2Props } from '../../components/conversation/GroupV2Change.dom.tsx'; +import type { PropsDataType as GroupV1MigrationPropsType } from '../../components/conversation/GroupV1Migration.dom.tsx'; +import type { PropsDataType as DeliveryIssuePropsType } from '../../components/conversation/DeliveryIssueNotification.dom.tsx'; +import type { PropsType as PaymentEventNotificationPropsType } from '../../components/conversation/PaymentEventNotification.dom.tsx'; +import type { PropsDataType as ConversationMergePropsType } from '../../components/conversation/ConversationMergeNotification.dom.tsx'; +import type { PropsDataType as PhoneNumberDiscoveryPropsType } from '../../components/conversation/PhoneNumberDiscoveryNotification.dom.tsx'; import type { PropsData as GroupNotificationProps, ChangeType, -} from '../../components/conversation/GroupNotification.dom.js'; -import type { PropsType as ProfileChangeNotificationPropsType } from '../../components/conversation/ProfileChangeNotification.dom.js'; +} from '../../components/conversation/GroupNotification.dom.tsx'; +import type { PropsType as ProfileChangeNotificationPropsType } from '../../components/conversation/ProfileChangeNotification.dom.tsx'; import { getSafeDomain, isCallLink, isStickerPack, -} from '../../types/LinkPreview.std.js'; +} from '../../types/LinkPreview.std.ts'; import type { AciString, PniString, ServiceIdString, -} from '../../types/ServiceId.std.js'; +} from '../../types/ServiceId.std.ts'; -import type { EmbeddedContactForUIType } from '../../types/EmbeddedContact.std.js'; -import { embeddedContactSelector } from '../../types/EmbeddedContact.std.js'; -import type { HydratedBodyRangesType } from '../../types/BodyRange.std.js'; -import { hydrateRanges } from '../../util/BodyRange.node.js'; -import type { AssertProps, LocalizerType } from '../../types/Util.std.js'; -import type { LinkPreviewForUIType } from '../../types/message/LinkPreviews.std.js'; -import { getMentionsRegex } from '../../types/Message.std.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +import type { EmbeddedContactForUIType } from '../../types/EmbeddedContact.std.ts'; +import { embeddedContactSelector } from '../../types/EmbeddedContact.std.ts'; +import type { HydratedBodyRangesType } from '../../types/BodyRange.std.ts'; +import { hydrateRanges } from '../../util/BodyRange.node.ts'; +import type { AssertProps, LocalizerType } from '../../types/Util.std.ts'; +import type { LinkPreviewForUIType } from '../../types/message/LinkPreviews.std.ts'; +import { getMentionsRegex } from '../../types/Message.std.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; import type { AttachmentForUIType, AttachmentType, -} from '../../types/Attachment.std.js'; +} from '../../types/Attachment.std.ts'; import { isVoiceMessage, isIncremental, defaultBlurHash, -} from '../../util/Attachment.std.js'; -import type { MessageAttachmentType } from '../../types/AttachmentDownload.std.js'; +} from '../../util/Attachment.std.ts'; +import type { MessageAttachmentType } from '../../types/AttachmentDownload.std.ts'; import type { ContactNameColorType, DefaultConversationColorType, -} from '../../types/Colors.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; +} from '../../types/Colors.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; -import type { CallingNotificationType } from '../../util/callingNotification.std.js'; -import { getRecipients } from '../../util/getRecipients.dom.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; +import type { CallingNotificationType } from '../../util/callingNotification.std.ts'; +import { getRecipients } from '../../util/getRecipients.dom.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; import { canSendDeleteForEveryone, canRetrySendDeleteForEveryone, -} from '../../util/canDeleteForEveryone.preload.js'; -import { isAdminDeleteSendEnabled } from '../../util/isAdminDeleteEnabled.dom.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; -import * as iterables from '../../util/iterables.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { canEditMessage } from '../../util/canEditMessage.dom.js'; +} from '../../util/canDeleteForEveryone.preload.ts'; +import { isAdminDeleteSendEnabled } from '../../util/isAdminDeleteEnabled.dom.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; +import * as iterables from '../../util/iterables.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { canEditMessage } from '../../util/canEditMessage.dom.ts'; import { getLocalAttachmentUrl, AttachmentDisposition, -} from '../../util/getLocalAttachmentUrl.std.js'; -import { isVoiceMessagePlayed } from '../../util/isVoiceMessagePlayed.std.js'; -import { isPermanentlyUndownloadable } from '../../jobs/helpers/attachmentBackfill.preload.js'; +} from '../../util/getLocalAttachmentUrl.std.ts'; +import { isVoiceMessagePlayed } from '../../util/isVoiceMessagePlayed.std.ts'; +import { isPermanentlyUndownloadable } from '../../jobs/helpers/attachmentBackfill.preload.ts'; -import { getAccountSelector } from './accounts.std.js'; +import { getAccountSelector } from './accounts.std.ts'; import { getDefaultConversationColor, getHasUnidentifiedDeliveryIndicators, -} from './items.dom.js'; +} from './items.dom.ts'; import { getConversationSelector, getSelectedMessageIds, @@ -113,7 +113,7 @@ import { getCachedConversationMemberColorsSelector, getContactNameColor, getPinnedMessagesMessageIds, -} from './conversations.dom.js'; +} from './conversations.dom.ts'; import { getIntl, getRegionCode, @@ -121,16 +121,16 @@ import { getUserPNI, getUserConversationId, getUserNumber, -} from './user.std.js'; +} from './user.std.ts'; import type { ConversationType, MessageWithUIFieldsType, -} from '../ducks/conversations.preload.js'; +} from '../ducks/conversations.preload.ts'; -import type { AccountSelectorType } from './accounts.std.js'; -import type { CallSelectorType, CallStateType } from './calling.std.js'; -import type { GetConversationByIdType } from './conversations.dom.js'; +import type { AccountSelectorType } from './accounts.std.ts'; +import type { CallSelectorType, CallStateType } from './calling.std.ts'; +import type { GetConversationByIdType } from './conversations.dom.ts'; import { SendStatus, isDelivered, @@ -142,41 +142,41 @@ import { someRecipientSendStatus, getHighestSuccessfulRecipientStatus, someSendStatus, -} from '../../messages/MessageSendState.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { getConversationColorAttributes } from '../../util/getConversationColorAttributes.std.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import { getStoryReplyText } from '../../util/getStoryReplyText.std.js'; -import type { MessageAttributesWithPaymentEvent } from '../../messages/payments.std.js'; +} from '../../messages/MessageSendState.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { getConversationColorAttributes } from '../../util/getConversationColorAttributes.std.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import { getStoryReplyText } from '../../util/getStoryReplyText.std.ts'; +import type { MessageAttributesWithPaymentEvent } from '../../messages/payments.std.ts'; import { isIncoming, isOutgoing, isPoll, isStory, -} from '../../messages/helpers.std.js'; -import { messageHasPaymentEvent } from '../../messages/payments.std.js'; +} from '../../messages/helpers.std.ts'; +import { messageHasPaymentEvent } from '../../messages/payments.std.ts'; -import { calculateExpirationTimestamp } from '../../util/expirationTimer.std.js'; -import type { AnyPaymentEvent } from '../../types/Payment.std.js'; -import { isPaymentNotificationEvent } from '../../types/Payment.std.js'; +import { calculateExpirationTimestamp } from '../../util/expirationTimer.std.ts'; +import type { AnyPaymentEvent } from '../../types/Payment.std.ts'; +import { isPaymentNotificationEvent } from '../../types/Payment.std.ts'; import type { MessagePollVoteType, PollMessageAttribute, -} from '../../types/Polls.dom.js'; +} from '../../types/Polls.dom.ts'; import { getTitleNoDefault, getTitle, getNumber, renderNumber, -} from '../../util/getTitle.preload.js'; -import { getMessageSentTimestamp } from '../../util/getMessageSentTimestamp.std.js'; -import type { CallHistorySelectorType } from './callHistory.std.js'; -import { CallMode, CallDirection } from '../../types/CallDisposition.std.js'; -import { getCallIdFromEra } from '../../util/callDisposition.preload.js'; -import { LONG_MESSAGE } from '../../types/MIME.std.js'; -import type { MessageRequestResponseNotificationData } from '../../components/conversation/MessageRequestResponseNotification.dom.js'; -import type { PinnedMessageNotificationData } from '../../components/conversation/pinned-messages/PinnedMessageNotification.dom.js'; -import type { PollTerminateNotificationDataType } from '../../components/conversation/PollTerminateNotification.dom.js'; +} from '../../util/getTitle.preload.ts'; +import { getMessageSentTimestamp } from '../../util/getMessageSentTimestamp.std.ts'; +import type { CallHistorySelectorType } from './callHistory.std.ts'; +import { CallMode, CallDirection } from '../../types/CallDisposition.std.ts'; +import { getCallIdFromEra } from '../../util/callDisposition.preload.ts'; +import { LONG_MESSAGE } from '../../types/MIME.std.ts'; +import type { MessageRequestResponseNotificationData } from '../../components/conversation/MessageRequestResponseNotification.dom.tsx'; +import type { PinnedMessageNotificationData } from '../../components/conversation/pinned-messages/PinnedMessageNotification.dom.tsx'; +import type { PollTerminateNotificationDataType } from '../../components/conversation/PollTerminateNotification.dom.tsx'; const { groupBy, isEmpty, isNumber, isObject, map } = lodash; diff --git a/ts/state/selectors/nav.std.ts b/ts/state/selectors/nav.std.ts index 717b1d5029..10740c506c 100644 --- a/ts/state/selectors/nav.std.ts +++ b/ts/state/selectors/nav.std.ts @@ -3,12 +3,12 @@ import { createSelector } from 'reselect'; -import { NavTab } from '../../types/Nav.std.js'; +import { NavTab } from '../../types/Nav.std.ts'; -import type { PanelArgsType } from '../../types/Panels.std.js'; -import type { Location, PanelInfo } from '../../types/Nav.std.js'; -import type { StateType } from '../reducer.preload.js'; -import type { NavStateType } from '../ducks/nav.std.js'; +import type { PanelArgsType } from '../../types/Panels.std.ts'; +import type { Location, PanelInfo } from '../../types/Nav.std.ts'; +import type { StateType } from '../reducer.preload.ts'; +import type { NavStateType } from '../ducks/nav.std.ts'; function getNav(state: StateType): NavStateType { return state.nav; diff --git a/ts/state/selectors/network.preload.ts b/ts/state/selectors/network.preload.ts index 678c4333b9..5869e7c853 100644 --- a/ts/state/selectors/network.preload.ts +++ b/ts/state/selectors/network.preload.ts @@ -3,9 +3,9 @@ import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { NetworkStateType } from '../ducks/network.dom.js'; -import { isDone } from '../../util/registration.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { NetworkStateType } from '../ducks/network.dom.ts'; +import { isDone } from '../../util/registration.preload.ts'; const getNetwork = (state: StateType): NetworkStateType => state.network; diff --git a/ts/state/selectors/notificationProfiles.dom.ts b/ts/state/selectors/notificationProfiles.dom.ts index b2801396d3..c39d292abf 100644 --- a/ts/state/selectors/notificationProfiles.dom.ts +++ b/ts/state/selectors/notificationProfiles.dom.ts @@ -5,15 +5,15 @@ import { createSelector } from 'reselect'; -import { getNotificationProfileSyncDisabled } from './items.dom.js'; +import { getNotificationProfileSyncDisabled } from './items.dom.ts'; -import type { StateType } from '../reducer.preload.js'; -import type { NotificationProfilesStateType } from '../ducks/notificationProfiles.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { NotificationProfilesStateType } from '../ducks/notificationProfiles.preload.ts'; import type { NextProfileEvent, NotificationProfileOverride, NotificationProfileType, -} from '../../types/NotificationProfile.std.js'; +} from '../../types/NotificationProfile.std.ts'; export const getNotificationProfileData = ( state: StateType diff --git a/ts/state/selectors/preferredReactions.std.ts b/ts/state/selectors/preferredReactions.std.ts index c6b726bb56..614e51314f 100644 --- a/ts/state/selectors/preferredReactions.std.ts +++ b/ts/state/selectors/preferredReactions.std.ts @@ -3,8 +3,8 @@ import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { PreferredReactionsStateType } from '../ducks/preferredReactions.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { PreferredReactionsStateType } from '../ducks/preferredReactions.preload.ts'; const getPreferredReactionsState = ( state: Readonly diff --git a/ts/state/selectors/safetyNumber.std.ts b/ts/state/selectors/safetyNumber.std.ts index 326051f07e..0ac4d96902 100644 --- a/ts/state/selectors/safetyNumber.std.ts +++ b/ts/state/selectors/safetyNumber.std.ts @@ -3,11 +3,11 @@ import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; +import type { StateType } from '../reducer.preload.ts'; import type { SafetyNumberContactType, SafetyNumberStateType, -} from '../ducks/safetyNumber.preload.js'; +} from '../ducks/safetyNumber.preload.ts'; const getSafetyNumber = (state: StateType): SafetyNumberStateType => state.safetyNumber; diff --git a/ts/state/selectors/search.preload.ts b/ts/state/selectors/search.preload.ts index f80650b166..f3d04e71d8 100644 --- a/ts/state/selectors/search.preload.ts +++ b/ts/state/selectors/search.preload.ts @@ -4,36 +4,36 @@ import memoizee from 'memoizee'; import { createSelector } from 'reselect'; -import { deconstructLookup } from '../../util/deconstructLookup.std.js'; +import { deconstructLookup } from '../../util/deconstructLookup.std.ts'; -import type { StateType } from '../reducer.preload.js'; +import type { StateType } from '../reducer.preload.ts'; import type { MessageSearchResultLookupType, MessageSearchResultType, SearchStateType, -} from '../ducks/search.preload.js'; +} from '../ducks/search.preload.ts'; import type { ConversationLookupType, ConversationType, -} from '../ducks/conversations.preload.js'; +} from '../ducks/conversations.preload.ts'; -import type { LeftPaneSearchPropsType } from '../../components/leftPane/LeftPaneSearchHelper.dom.js'; -import type { PropsDataType as MessageSearchResultPropsDataType } from '../../components/conversationList/MessageSearchResult.dom.js'; +import type { LeftPaneSearchPropsType } from '../../components/leftPane/LeftPaneSearchHelper.dom.tsx'; +import type { PropsDataType as MessageSearchResultPropsDataType } from '../../components/conversationList/MessageSearchResult.dom.tsx'; -import { getIntl, getUserConversationId } from './user.std.js'; -import type { GetConversationByIdType } from './conversations.dom.js'; +import { getIntl, getUserConversationId } from './user.std.ts'; +import type { GetConversationByIdType } from './conversations.dom.ts'; import { getConversationLookup, getConversationSelector, -} from './conversations.dom.js'; +} from './conversations.dom.ts'; -import { hydrateRanges } from '../../util/BodyRange.node.js'; -import type { RawBodyRange } from '../../types/BodyRange.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import type { MessageAttributesType } from '../../model-types.js'; -import { getSelectedConversationId } from './nav.std.js'; +import { hydrateRanges } from '../../util/BodyRange.node.ts'; +import type { RawBodyRange } from '../../types/BodyRange.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import type { MessageAttributesType } from '../../model-types.d.ts'; +import { getSelectedConversationId } from './nav.std.ts'; const log = createLogger('search'); diff --git a/ts/state/selectors/stickers.std.ts b/ts/state/selectors/stickers.std.ts index 5dc3352d5c..d73064a263 100644 --- a/ts/state/selectors/stickers.std.ts +++ b/ts/state/selectors/stickers.std.ts @@ -4,21 +4,21 @@ import lodash, { type Dictionary } from 'lodash'; import { createSelector } from 'reselect'; -import type { RecentStickerType } from '../../types/Stickers.preload.js'; +import type { RecentStickerType } from '../../types/Stickers.preload.ts'; import { getLocalAttachmentUrl, AttachmentDisposition, -} from '../../util/getLocalAttachmentUrl.std.js'; +} from '../../util/getLocalAttachmentUrl.std.ts'; import type { StickerType as StickerDBType, StickerPackType as StickerPackDBType, -} from '../../sql/Interface.std.js'; -import type { StateType } from '../reducer.preload.js'; +} from '../../sql/Interface.std.ts'; +import type { StateType } from '../reducer.preload.ts'; import type { StickersStateType, StickerPackType, StickerType, -} from '../ducks/stickers.preload.js'; +} from '../ducks/stickers.preload.ts'; const { compact, filter, map, orderBy, reject, sortBy, values } = lodash; diff --git a/ts/state/selectors/stories.preload.ts b/ts/state/selectors/stories.preload.ts index 1a1c2b5a63..40d713e6ad 100644 --- a/ts/state/selectors/stories.preload.ts +++ b/ts/state/selectors/stories.preload.ts @@ -4,9 +4,9 @@ import { createSelector } from 'reselect'; import lodash from 'lodash'; -import type { GetConversationByIdType } from './conversations.dom.js'; -import type { ConversationType } from '../ducks/conversations.preload.js'; -import type { AttachmentType } from '../../types/Attachment.std.js'; +import type { GetConversationByIdType } from './conversations.dom.ts'; +import type { ConversationType } from '../ducks/conversations.preload.ts'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; import type { ConversationStoryType, MyStoryType, @@ -14,17 +14,17 @@ import type { StoryDistributionListWithMembersDataType, StorySendStateType, StoryViewType, -} from '../../types/Stories.std.js'; +} from '../../types/Stories.std.ts'; import type { SelectedStoryDataType, StoryDataType, StoriesStateType, AddStoryData, -} from '../ducks/stories.preload.js'; -import { MY_STORY_ID, ResolvedSendStatus } from '../../types/Stories.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import { canReply } from './message.preload.js'; +} from '../ducks/stories.preload.ts'; +import { MY_STORY_ID, ResolvedSendStatus } from '../../types/Stories.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import { canReply } from './message.preload.ts'; import { getContactNameColorSelector, getConversationSelector, @@ -32,20 +32,20 @@ import { getMe, PLACEHOLDER_CONTACT_ID, getStoriesState, -} from './conversations.dom.js'; -import { getStoriesEnabled } from './items.dom.js'; -import { getUserConversationId } from './user.std.js'; -import { getDistributionListSelector } from './storyDistributionLists.dom.js'; -import { calculateExpirationTimestamp } from '../../util/expirationTimer.std.js'; -import { getMessageIdForLogging } from '../../util/idForLogging.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { SIGNAL_ACI } from '../../types/SignalConversation.std.js'; +} from './conversations.dom.ts'; +import { getStoriesEnabled } from './items.dom.ts'; +import { getUserConversationId } from './user.std.ts'; +import { getDistributionListSelector } from './storyDistributionLists.dom.ts'; +import { calculateExpirationTimestamp } from '../../util/expirationTimer.std.ts'; +import { getMessageIdForLogging } from '../../util/idForLogging.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { SIGNAL_ACI } from '../../types/SignalConversation.std.ts'; import { reduceStorySendStatus, resolveStorySendStatus, -} from '../../util/resolveStorySendStatus.std.js'; -import { BodyRange } from '../../types/BodyRange.std.js'; -import { hydrateRanges } from '../../util/BodyRange.node.js'; +} from '../../util/resolveStorySendStatus.std.ts'; +import { BodyRange } from '../../types/BodyRange.std.ts'; +import { hydrateRanges } from '../../util/BodyRange.node.ts'; const { pick } = lodash; diff --git a/ts/state/selectors/stories2.dom.ts b/ts/state/selectors/stories2.dom.ts index aff7a1b826..af26e6a2db 100644 --- a/ts/state/selectors/stories2.dom.ts +++ b/ts/state/selectors/stories2.dom.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { HasStories } from '../../types/Stories.std.js'; -import { getStoriesEnabled } from './items.dom.js'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { HasStories } from '../../types/Stories.std.ts'; +import { getStoriesEnabled } from './items.dom.ts'; -import type { StateType } from '../reducer.preload.js'; -import type { StoriesStateType } from '../ducks/stories.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { StoriesStateType } from '../ducks/stories.preload.ts'; const getStoriesState = (state: StateType): StoriesStateType => state.stories; diff --git a/ts/state/selectors/storyDistributionLists.dom.ts b/ts/state/selectors/storyDistributionLists.dom.ts index c692f26d5e..a4b4e3e26d 100644 --- a/ts/state/selectors/storyDistributionLists.dom.ts +++ b/ts/state/selectors/storyDistributionLists.dom.ts @@ -3,11 +3,11 @@ import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { StoryDistributionListDataType } from '../ducks/storyDistributionLists.preload.js'; -import type { StoryDistributionListWithMembersDataType } from '../../types/Stories.std.js'; -import { getConversationSelector } from './conversations.dom.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { StoryDistributionListDataType } from '../ducks/storyDistributionLists.preload.ts'; +import type { StoryDistributionListWithMembersDataType } from '../../types/Stories.std.ts'; +import { getConversationSelector } from './conversations.dom.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; export const getDistributionLists = ( state: StateType diff --git a/ts/state/selectors/timeline.preload.ts b/ts/state/selectors/timeline.preload.ts index 8b46a31bc4..f9df5a90fc 100644 --- a/ts/state/selectors/timeline.preload.ts +++ b/ts/state/selectors/timeline.preload.ts @@ -5,9 +5,9 @@ import { useSelector } from 'react-redux'; import { createSelector } from 'reselect'; import { isEmpty } from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import type { TimelineItemType } from '../../components/conversation/TimelineItem.dom.js'; +import type { TimelineItemType } from '../../components/conversation/TimelineItem.dom.tsx'; -import type { StateType } from '../reducer.preload.js'; +import type { StateType } from '../reducer.preload.ts'; import { getConversationSelector, getTargetedMessage, @@ -17,31 +17,31 @@ import { getPinnedMessagesMessageIds, getSafeConversationWithSameTitle, getConversationByServiceIdSelector, -} from './conversations.dom.js'; -import { getAccountSelector } from './accounts.std.js'; +} from './conversations.dom.ts'; +import { getAccountSelector } from './accounts.std.ts'; import { getRegionCode, getUserConversationId, getUserNumber, getUserACI, getUserPNI, -} from './user.std.js'; -import { getDefaultConversationColor } from './items.dom.js'; -import { getActiveCall, getCallSelector } from './calling.std.js'; -import { getPropsForBubble } from './message.preload.js'; -import { getCallHistorySelector } from './callHistory.std.js'; -import { useProxySelector } from '../../hooks/useProxySelector.std.js'; -import type { StateSelector } from '../types.std.js'; -import { ContactSpoofingType } from '../../util/contactSpoofing.std.js'; +} from './user.std.ts'; +import { getDefaultConversationColor } from './items.dom.ts'; +import { getActiveCall, getCallSelector } from './calling.std.ts'; +import { getPropsForBubble } from './message.preload.ts'; +import { getCallHistorySelector } from './callHistory.std.ts'; +import { useProxySelector } from '../../hooks/useProxySelector.std.ts'; +import type { StateSelector } from '../types.std.ts'; +import { ContactSpoofingType } from '../../util/contactSpoofing.std.ts'; import { dehydrateCollisionsWithConversations, getCollisionsFromMemberships, type GroupNameCollisionsWithIdsByTitle, -} from '../../util/groupMemberNameCollisions.std.js'; -import type { ConversationType } from '../ducks/conversations.preload.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { getGroupMemberships } from '../../util/getGroupMemberships.dom.js'; -import type { ContactNameColorType } from '../../types/Colors.std.js'; +} from '../../util/groupMemberNameCollisions.std.ts'; +import type { ConversationType } from '../ducks/conversations.preload.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { getGroupMemberships } from '../../util/getGroupMemberships.dom.ts'; +import type { ContactNameColorType } from '../../types/Colors.std.ts'; const getTimelineItem = ( state: StateType, diff --git a/ts/state/selectors/toast.std.ts b/ts/state/selectors/toast.std.ts index 8bf8cd35af..0eabcf62ab 100644 --- a/ts/state/selectors/toast.std.ts +++ b/ts/state/selectors/toast.std.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { createSelector } from 'reselect'; -import type { StateType } from '../reducer.preload.js'; -import type { ToastStateType } from '../ducks/toast.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { ToastStateType } from '../ducks/toast.preload.ts'; export function getToastState(state: StateType): ToastStateType { return state.toast; diff --git a/ts/state/selectors/updates.std.ts b/ts/state/selectors/updates.std.ts index 2504029440..10c2416c81 100644 --- a/ts/state/selectors/updates.std.ts +++ b/ts/state/selectors/updates.std.ts @@ -3,10 +3,10 @@ import { createSelector } from 'reselect'; -import { DialogType } from '../../types/Dialogs.std.js'; +import { DialogType } from '../../types/Dialogs.std.ts'; -import type { StateType } from '../reducer.preload.js'; -import type { UpdatesStateType } from '../ducks/updates.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { UpdatesStateType } from '../ducks/updates.preload.ts'; export const getUpdatesState = (state: Readonly): UpdatesStateType => state.updates; diff --git a/ts/state/selectors/user.std.ts b/ts/state/selectors/user.std.ts index b4560bdaba..2d3228e829 100644 --- a/ts/state/selectors/user.std.ts +++ b/ts/state/selectors/user.std.ts @@ -3,16 +3,16 @@ import { createSelector } from 'reselect'; -import { type LocalizerType, ThemeType } from '../../types/Util.std.js'; -import type { AciString, PniString } from '../../types/ServiceId.std.js'; -import type { LocaleMessagesType } from '../../types/I18N.std.js'; -import type { MenuOptionsType } from '../../types/menu.std.js'; +import { type LocalizerType, ThemeType } from '../../types/Util.std.ts'; +import type { AciString, PniString } from '../../types/ServiceId.std.ts'; +import type { LocaleMessagesType } from '../../types/I18N.std.ts'; +import type { MenuOptionsType } from '../../types/menu.std.ts'; -import type { StateType } from '../reducer.preload.js'; -import type { CallingStateType } from '../ducks/calling.preload.js'; -import type { UserStateType } from '../ducks/user.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import type { CallingStateType } from '../ducks/calling.preload.ts'; +import type { UserStateType } from '../ducks/user.preload.ts'; -import { isNightly, isBeta } from '../../util/version.std.js'; +import { isNightly, isBeta } from '../../util/version.std.ts'; export const getUser = (state: StateType): UserStateType => state.user; diff --git a/ts/state/selectors/username.std.ts b/ts/state/selectors/username.std.ts index b018ad2c06..13a85c019a 100644 --- a/ts/state/selectors/username.std.ts +++ b/ts/state/selectors/username.std.ts @@ -3,18 +3,18 @@ import { createSelector } from 'reselect'; -import type { UsernameReservationType } from '../../types/Username.std.js'; -import type { StateType } from '../reducer.preload.js'; +import type { UsernameReservationType } from '../../types/Username.std.ts'; +import type { StateType } from '../reducer.preload.ts'; import type { UsernameStateType, UsernameReservationStateType, -} from '../ducks/username.preload.js'; +} from '../ducks/username.preload.ts'; import type { UsernameEditState, UsernameLinkState, UsernameReservationState, UsernameReservationError, -} from '../ducks/usernameEnums.std.js'; +} from '../ducks/usernameEnums.std.ts'; export const getUsernameState = (state: StateType): UsernameStateType => state.username; diff --git a/ts/state/smart/AboutContactModal.preload.tsx b/ts/state/smart/AboutContactModal.preload.tsx index 600416bb55..0f2fd2bf5d 100644 --- a/ts/state/smart/AboutContactModal.preload.tsx +++ b/ts/state/smart/AboutContactModal.preload.tsx @@ -3,33 +3,33 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { AboutContactModal } from '../../components/conversation/AboutContactModal.dom.js'; -import { isSignalConnection } from '../../util/getSignalConnections.preload.js'; -import { getIntl, getVersion } from '../selectors/user.std.js'; -import { getAboutContactModalState } from '../selectors/globalModals.std.js'; +import { AboutContactModal } from '../../components/conversation/AboutContactModal.dom.tsx'; +import { isSignalConnection } from '../../util/getSignalConnections.preload.ts'; +import { getIntl, getVersion } from '../selectors/user.std.ts'; +import { getAboutContactModalState } from '../selectors/globalModals.std.ts'; import { getCachedConversationMemberColorsSelector, getConversationSelector, getPendingAvatarDownloadSelector, -} from '../selectors/conversations.dom.js'; -import { useSharedGroupNamesOnMount } from '../../util/sharedGroupNames.dom.js'; -import type { ConversationType } from '../ducks/conversations.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.js'; -import { getItems } from '../selectors/items.dom.js'; -import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.js'; -import { getCanAddLabel } from '../../types/GroupMemberLabels.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { PanelType } from '../../types/Panels.std.js'; +} from '../selectors/conversations.dom.ts'; +import { useSharedGroupNamesOnMount } from '../../util/sharedGroupNames.dom.ts'; +import type { ConversationType } from '../ducks/conversations.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.ts'; +import { getItems } from '../selectors/items.dom.ts'; +import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.ts'; +import { getCanAddLabel } from '../../types/GroupMemberLabels.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { PanelType } from '../../types/Panels.std.ts'; import { NavTab, ProfileEditorPage, SettingsPage, -} from '../../types/Nav.std.js'; -import { getSelectedLocation } from '../selectors/nav.std.js'; -import { getLeafPanelOnly } from '../../components/conversation/conversation-details/GroupMemberLabelEditor.dom.js'; +} from '../../types/Nav.std.ts'; +import { getSelectedLocation } from '../selectors/nav.std.ts'; +import { getLeafPanelOnly } from '../../components/conversation/conversation-details/GroupMemberLabelEditor.dom.tsx'; function isFromOrAddedByTrustedContact( conversation: ConversationType diff --git a/ts/state/smart/AddUserToAnotherGroupModal.preload.tsx b/ts/state/smart/AddUserToAnotherGroupModal.preload.tsx index 8e27681a9a..781caed1de 100644 --- a/ts/state/smart/AddUserToAnotherGroupModal.preload.tsx +++ b/ts/state/smart/AddUserToAnotherGroupModal.preload.tsx @@ -3,15 +3,15 @@ import { useSelector } from 'react-redux'; import React, { memo } from 'react'; -import { AddUserToAnotherGroupModal } from '../../components/AddUserToAnotherGroupModal.dom.js'; +import { AddUserToAnotherGroupModal } from '../../components/AddUserToAnotherGroupModal.dom.tsx'; import { getAllGroupsWithInviteAccess, getContactSelector, -} from '../selectors/conversations.dom.js'; -import { getIntl, getRegionCode } from '../selectors/user.std.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getIntl, getRegionCode } from '../selectors/user.std.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; export type SmartAddUserToAnotherGroupModalProps = Readonly<{ contactID: string; diff --git a/ts/state/smart/AllMedia.preload.tsx b/ts/state/smart/AllMedia.preload.tsx index aed598116f..e1ecf8b330 100644 --- a/ts/state/smart/AllMedia.preload.tsx +++ b/ts/state/smart/AllMedia.preload.tsx @@ -2,22 +2,22 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { MediaGallery } from '../../components/conversation/media-gallery/MediaGallery.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import type { MediaItemType } from '../../types/MediaItem.std.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { getMediaGalleryState } from '../selectors/mediaGallery.std.js'; -import { extractVoiceNoteForPlayback } from '../selectors/audioPlayer.preload.js'; -import { getIntl, getUserConversationId } from '../selectors/user.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useLightboxActions } from '../ducks/lightbox.preload.js'; -import { useMediaGalleryActions } from '../ducks/mediaGallery.preload.js'; -import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.js'; +import { MediaGallery } from '../../components/conversation/media-gallery/MediaGallery.dom.tsx'; +import { createLogger } from '../../logging/log.std.ts'; +import type { MediaItemType } from '../../types/MediaItem.std.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { getMediaGalleryState } from '../selectors/mediaGallery.std.ts'; +import { extractVoiceNoteForPlayback } from '../selectors/audioPlayer.preload.ts'; +import { getIntl, getUserConversationId } from '../selectors/user.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useLightboxActions } from '../ducks/lightbox.preload.ts'; +import { useMediaGalleryActions } from '../ducks/mediaGallery.preload.ts'; +import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.ts'; import { MediaItem, type PropsType as MediaItemPropsType, -} from './MediaItem.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; +} from './MediaItem.preload.tsx'; +import { useNavActions } from '../ducks/nav.std.ts'; const log = createLogger('AllMedia'); diff --git a/ts/state/smart/AllMediaHeader.preload.tsx b/ts/state/smart/AllMediaHeader.preload.tsx index 0dd438ff22..28fb86da34 100644 --- a/ts/state/smart/AllMediaHeader.preload.tsx +++ b/ts/state/smart/AllMediaHeader.preload.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { PanelHeader } from '../../components/conversation/media-gallery/PanelHeader.dom.js'; -import { getMediaGalleryState } from '../selectors/mediaGallery.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useMediaGalleryActions } from '../ducks/mediaGallery.preload.js'; +import { PanelHeader } from '../../components/conversation/media-gallery/PanelHeader.dom.tsx'; +import { getMediaGalleryState } from '../selectors/mediaGallery.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useMediaGalleryActions } from '../ducks/mediaGallery.preload.ts'; export const SmartAllMediaHeader = memo(function SmartAllMediaHeader() { const { tab, sortOrder } = useSelector(getMediaGalleryState); diff --git a/ts/state/smart/App.preload.tsx b/ts/state/smart/App.preload.tsx index dedfa66c1e..74893ea8c2 100644 --- a/ts/state/smart/App.preload.tsx +++ b/ts/state/smart/App.preload.tsx @@ -2,34 +2,34 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { requestVerification as doRequestVerification } from '../../textsecure/WebAPI.preload.js'; -import { accountManager } from '../../textsecure/AccountManager.preload.js'; -import type { VerificationTransport } from '../../types/VerificationTransport.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { App } from '../../components/App.preload.js'; -import OS from '../../util/os/osMain.node.js'; -import { getConversation } from '../../util/getConversation.preload.js'; -import { getChallengeURL } from '../../challenge.dom.js'; -import { writeProfile } from '../../services/writeProfile.preload.js'; -import { challengeHandler } from '../../services/challengeHandler.preload.js'; -import { SmartCallManager } from './CallManager.preload.js'; -import { SmartGlobalModalContainer } from './GlobalModalContainer.preload.js'; -import { SmartLightbox } from './Lightbox.preload.js'; -import { SmartStoryViewer } from './StoryViewer.preload.js'; +import { requestVerification as doRequestVerification } from '../../textsecure/WebAPI.preload.ts'; +import { accountManager } from '../../textsecure/AccountManager.preload.ts'; +import type { VerificationTransport } from '../../types/VerificationTransport.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { App } from '../../components/App.preload.tsx'; +import OS from '../../util/os/osMain.node.ts'; +import { getConversation } from '../../util/getConversation.preload.ts'; +import { getChallengeURL } from '../../challenge.dom.ts'; +import { writeProfile } from '../../services/writeProfile.preload.ts'; +import { challengeHandler } from '../../services/challengeHandler.preload.ts'; +import { SmartCallManager } from './CallManager.preload.tsx'; +import { SmartGlobalModalContainer } from './GlobalModalContainer.preload.tsx'; +import { SmartLightbox } from './Lightbox.preload.tsx'; +import { SmartStoryViewer } from './StoryViewer.preload.tsx'; import { getIsMainWindowMaximized, getIsMainWindowFullScreen, getTheme, -} from '../selectors/user.std.js'; -import { hasSelectedStoryData as getHasSelectedStoryData } from '../selectors/stories.preload.js'; -import { useAppActions } from '../ducks/app.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { ErrorBoundary } from '../../components/ErrorBoundary.dom.js'; -import { ModalContainer } from '../../components/ModalContainer.dom.js'; -import { SmartInbox } from './Inbox.preload.js'; -import { getApp } from '../selectors/app.std.js'; -import { SmartFunProvider } from './FunProvider.preload.js'; +} from '../selectors/user.std.ts'; +import { hasSelectedStoryData as getHasSelectedStoryData } from '../selectors/stories.preload.ts'; +import { useAppActions } from '../ducks/app.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { ErrorBoundary } from '../../components/ErrorBoundary.dom.tsx'; +import { ModalContainer } from '../../components/ModalContainer.dom.tsx'; +import { SmartInbox } from './Inbox.preload.tsx'; +import { getApp } from '../selectors/app.std.ts'; +import { SmartFunProvider } from './FunProvider.preload.tsx'; function renderInbox(): React.JSX.Element { return ; diff --git a/ts/state/smart/CallLinkAddNameModal.preload.tsx b/ts/state/smart/CallLinkAddNameModal.preload.tsx index 28b85625ed..a257d6b61c 100644 --- a/ts/state/smart/CallLinkAddNameModal.preload.tsx +++ b/ts/state/smart/CallLinkAddNameModal.preload.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { getCallLinkSelector } from '../selectors/calling.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { getCallLinkAddNameModalRoomId } from '../selectors/globalModals.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { isCallLinkAdmin } from '../../types/CallLink.std.js'; -import { CallLinkAddNameModal } from '../../components/CallLinkAddNameModal.dom.js'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { getCallLinkSelector } from '../selectors/calling.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { getCallLinkAddNameModalRoomId } from '../selectors/globalModals.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { isCallLinkAdmin } from '../../types/CallLink.std.ts'; +import { CallLinkAddNameModal } from '../../components/CallLinkAddNameModal.dom.tsx'; const log = createLogger('CallLinkAddNameModal'); diff --git a/ts/state/smart/CallLinkDetails.preload.tsx b/ts/state/smart/CallLinkDetails.preload.tsx index dd55d312bf..3238126c8d 100644 --- a/ts/state/smart/CallLinkDetails.preload.tsx +++ b/ts/state/smart/CallLinkDetails.preload.tsx @@ -2,22 +2,22 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import type { CallHistoryGroup } from '../../types/CallDisposition.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import { CallLinkDetails } from '../../components/CallLinkDetails.dom.js'; +import type { CallHistoryGroup } from '../../types/CallDisposition.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { CallLinkDetails } from '../../components/CallLinkDetails.dom.tsx'; import { getActiveCallState, getAdhocCallSelector, getCallLinkSelector, -} from '../selectors/calling.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { CallLinkRestrictions } from '../../types/CallLink.std.js'; +} from '../selectors/calling.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { CallLinkRestrictions } from '../../types/CallLink.std.ts'; import { isAnybodyInGroupCall, isGroupCallActiveOnServer, -} from '../ducks/callingHelpers.std.js'; +} from '../ducks/callingHelpers.std.ts'; export type SmartCallLinkDetailsProps = Readonly<{ roomId: string; diff --git a/ts/state/smart/CallLinkEditModal.preload.tsx b/ts/state/smart/CallLinkEditModal.preload.tsx index e9f35f35f0..8e357a07ba 100644 --- a/ts/state/smart/CallLinkEditModal.preload.tsx +++ b/ts/state/smart/CallLinkEditModal.preload.tsx @@ -2,21 +2,21 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { CallLinkEditModal } from '../../components/CallLinkEditModal.dom.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; +import { CallLinkEditModal } from '../../components/CallLinkEditModal.dom.tsx'; +import { useCallingActions } from '../ducks/calling.preload.ts'; import { getActiveCallState, getCallLinkSelector, -} from '../selectors/calling.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import type { CallLinkRestrictions } from '../../types/CallLink.std.js'; -import { getCallLinkEditModalRoomId } from '../selectors/globalModals.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { linkCallRoute } from '../../util/signalRoutes.std.js'; -import { copyCallLink } from '../../util/copyLinksWithToast.dom.js'; -import { drop } from '../../util/drop.std.js'; +} from '../selectors/calling.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import type { CallLinkRestrictions } from '../../types/CallLink.std.ts'; +import { getCallLinkEditModalRoomId } from '../selectors/globalModals.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { linkCallRoute } from '../../util/signalRoutes.std.ts'; +import { copyCallLink } from '../../util/copyLinksWithToast.dom.ts'; +import { drop } from '../../util/drop.std.ts'; const log = createLogger('CallLinkEditModal'); diff --git a/ts/state/smart/CallLinkPendingParticipantModal.preload.tsx b/ts/state/smart/CallLinkPendingParticipantModal.preload.tsx index 6f2a25db40..22074c9858 100644 --- a/ts/state/smart/CallLinkPendingParticipantModal.preload.tsx +++ b/ts/state/smart/CallLinkPendingParticipantModal.preload.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { CallLinkPendingParticipantModal } from '../../components/CallLinkPendingParticipantModal.dom.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { useSharedGroupNamesOnMount } from '../../util/sharedGroupNames.dom.js'; -import { getCallLinkPendingParticipantContactId } from '../selectors/globalModals.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +import { CallLinkPendingParticipantModal } from '../../components/CallLinkPendingParticipantModal.dom.tsx'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { useSharedGroupNamesOnMount } from '../../util/sharedGroupNames.dom.ts'; +import { getCallLinkPendingParticipantContactId } from '../selectors/globalModals.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; export const SmartCallLinkPendingParticipantModal = memo( function SmartCallLinkPendingParticipantModal(): React.JSX.Element | null { diff --git a/ts/state/smart/CallManager.preload.tsx b/ts/state/smart/CallManager.preload.tsx index 67937d5343..be0c77bb26 100644 --- a/ts/state/smart/CallManager.preload.tsx +++ b/ts/state/smart/CallManager.preload.tsx @@ -7,17 +7,17 @@ import { useSelector } from 'react-redux'; import type { DirectIncomingCall, GroupIncomingCall, -} from '../../components/CallManager.dom.js'; -import { CallManager } from '../../components/CallManager.dom.js'; -import { isConversationTooBigToRing as getIsConversationTooBigToRing } from '../../conversations/isConversationTooBigToRing.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import { calling as callingService } from '../../services/calling.preload.js'; -import type { SetLocalPreviewContainerType } from '../../services/calling.preload.js'; +} from '../../components/CallManager.dom.tsx'; +import { CallManager } from '../../components/CallManager.dom.tsx'; +import { isConversationTooBigToRing as getIsConversationTooBigToRing } from '../../conversations/isConversationTooBigToRing.dom.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { calling as callingService } from '../../services/calling.preload.ts'; +import type { SetLocalPreviewContainerType } from '../../services/calling.preload.ts'; import { bounceAppIconStart, bounceAppIconStop, -} from '../../shims/bounceAppIcon.preload.js'; -import type { CallLinkType } from '../../types/CallLink.std.js'; +} from '../../shims/bounceAppIcon.preload.ts'; +import type { CallLinkType } from '../../types/CallLink.std.ts'; import type { ActiveCallBaseType, ActiveCallType, @@ -26,36 +26,36 @@ import type { CallingConversationType, ConversationsByDemuxIdType, GroupCallRemoteParticipantType, -} from '../../types/Calling.std.js'; -import { CallState } from '../../types/Calling.std.js'; -import { CallMode } from '../../types/CallDisposition.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { callLinkToConversation } from '../../util/callLinks.std.js'; -import { callingTones } from '../../util/callingTones.preload.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.js'; -import { getActiveCall, useCallingActions } from '../ducks/calling.preload.js'; -import type { ConversationType } from '../ducks/conversations.preload.js'; -import type { StateType } from '../reducer.preload.js'; -import { getHasInitialLoadCompleted } from '../selectors/app.std.js'; +} from '../../types/Calling.std.ts'; +import { CallState } from '../../types/Calling.std.ts'; +import { CallMode } from '../../types/CallDisposition.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { callLinkToConversation } from '../../util/callLinks.std.ts'; +import { callingTones } from '../../util/callingTones.preload.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.ts'; +import { getActiveCall, useCallingActions } from '../ducks/calling.preload.ts'; +import type { ConversationType } from '../ducks/conversations.preload.ts'; +import type { StateType } from '../reducer.preload.ts'; +import { getHasInitialLoadCompleted } from '../selectors/app.std.ts'; import { getActiveCallState, getAvailableCameras, getCallLinkSelector, getRingingCall, -} from '../selectors/calling.std.js'; +} from '../selectors/calling.std.ts'; import { getConversationSelector, getMe, -} from '../selectors/conversations.dom.js'; -import { getIntl, getUserACI } from '../selectors/user.std.js'; -import { SmartCallingDeviceSelection } from './CallingDeviceSelection.preload.js'; -import { renderReactionPicker } from './renderReactionPicker.dom.js'; -import { isSharingPhoneNumberWithEverybody as getIsSharingPhoneNumberWithEverybody } from '../../util/phoneNumberSharingMode.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { isLonelyGroup } from '../ducks/callingHelpers.std.js'; -import { getActiveProfile } from '../selectors/notificationProfiles.dom.js'; -import { isOnline as isWebAPIOnline } from '../../textsecure/WebAPI.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getIntl, getUserACI } from '../selectors/user.std.ts'; +import { SmartCallingDeviceSelection } from './CallingDeviceSelection.preload.tsx'; +import { renderReactionPicker } from './renderReactionPicker.dom.tsx'; +import { isSharingPhoneNumberWithEverybody as getIsSharingPhoneNumberWithEverybody } from '../../util/phoneNumberSharingMode.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { isLonelyGroup } from '../ducks/callingHelpers.std.ts'; +import { getActiveProfile } from '../selectors/notificationProfiles.dom.ts'; +import { isOnline as isWebAPIOnline } from '../../textsecure/WebAPI.preload.ts'; const { memoize } = lodash; diff --git a/ts/state/smart/CallQualitySurveyDialog.preload.tsx b/ts/state/smart/CallQualitySurveyDialog.preload.tsx index fc3dcbf490..2430a716b2 100644 --- a/ts/state/smart/CallQualitySurveyDialog.preload.tsx +++ b/ts/state/smart/CallQualitySurveyDialog.preload.tsx @@ -3,14 +3,14 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { CallQualitySurveyDialog } from '../../components/CallQualitySurveyDialog.dom.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { getCallQualitySurveyProps } from '../selectors/globalModals.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import type { CallQualitySurvey } from '../../types/CallQualitySurvey.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { StateType } from '../reducer.preload.js'; +import { CallQualitySurveyDialog } from '../../components/CallQualitySurveyDialog.dom.tsx'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { getCallQualitySurveyProps } from '../selectors/globalModals.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import type { CallQualitySurvey } from '../../types/CallQualitySurvey.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { StateType } from '../reducer.preload.ts'; const getCallQualitySurveySubmission = (state: StateType) => state.calling.callQualitySurveySubmission; diff --git a/ts/state/smart/CallingDeviceSelection.preload.tsx b/ts/state/smart/CallingDeviceSelection.preload.tsx index 8015e3c855..e0e27bee0d 100644 --- a/ts/state/smart/CallingDeviceSelection.preload.tsx +++ b/ts/state/smart/CallingDeviceSelection.preload.tsx @@ -3,8 +3,8 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { CallingDeviceSelection } from '../../components/CallingDeviceSelection.dom.js'; -import { getIntl } from '../selectors/user.std.js'; +import { CallingDeviceSelection } from '../../components/CallingDeviceSelection.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; import { getAvailableCameras, getAvailableMicrophones, @@ -12,8 +12,8 @@ import { getSelectedCamera, getSelectedMicrophone, getSelectedSpeaker, -} from '../selectors/calling.std.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; +} from '../selectors/calling.std.ts'; +import { useCallingActions } from '../ducks/calling.preload.ts'; export const SmartCallingDeviceSelection = memo( function SmartCallingDeviceSelection() { diff --git a/ts/state/smart/CallsTab.preload.tsx b/ts/state/smart/CallsTab.preload.tsx index 78aee32109..24b02c1942 100644 --- a/ts/state/smart/CallsTab.preload.tsx +++ b/ts/state/smart/CallsTab.preload.tsx @@ -2,30 +2,30 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback, useEffect } from 'react'; import { useSelector } from 'react-redux'; -import { DataReader } from '../../sql/Client.preload.js'; -import { useItemsActions } from '../ducks/items.preload.js'; +import { DataReader } from '../../sql/Client.preload.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; import { getNavTabsCollapsed, getPreferredLeftPaneWidth, -} from '../selectors/items.dom.js'; -import { getIntl, getRegionCode } from '../selectors/user.std.js'; -import { CallsTab } from '../../components/CallsTab.preload.js'; +} from '../selectors/items.dom.ts'; +import { getIntl, getRegionCode } from '../selectors/user.std.ts'; +import { CallsTab } from '../../components/CallsTab.preload.tsx'; import { getAllConversations, getConversationSelector, getOtherTabsUnreadStats, -} from '../selectors/conversations.dom.js'; -import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.js'; +} from '../selectors/conversations.dom.ts'; +import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.ts'; import type { CallHistoryFilter, CallHistoryFilterOptions, CallHistoryGroup, CallHistoryPagination, -} from '../../types/CallDisposition.std.js'; -import type { ConversationType } from '../ducks/conversations.preload.js'; -import { SmartConversationDetails } from './ConversationDetails.preload.js'; -import { renderToastManagerWithoutMegaphone } from './ToastManager.preload.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; +} from '../../types/CallDisposition.std.ts'; +import type { ConversationType } from '../ducks/conversations.preload.ts'; +import { SmartConversationDetails } from './ConversationDetails.preload.tsx'; +import { renderToastManagerWithoutMegaphone } from './ToastManager.preload.tsx'; +import { useCallingActions } from '../ducks/calling.preload.ts'; import { getActiveCallState, getAdhocCallSelector, @@ -33,15 +33,15 @@ import { getCallSelector, getCallLinkSelector, getHasAnyAdminCallLinks, -} from '../selectors/calling.std.js'; -import { useCallHistoryActions } from '../ducks/callHistory.preload.js'; -import { getCallHistoryEdition } from '../selectors/callHistory.std.js'; -import { getHasPendingUpdate } from '../selectors/updates.std.js'; -import { getHasAnyFailedStorySends } from '../selectors/stories.preload.js'; -import { SmartCallLinkDetails } from './CallLinkDetails.preload.js'; -import type { CallLinkType } from '../../types/CallLink.std.js'; -import { filterCallLinks } from '../../util/filterCallLinks.dom.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +} from '../selectors/calling.std.ts'; +import { useCallHistoryActions } from '../ducks/callHistory.preload.ts'; +import { getCallHistoryEdition } from '../selectors/callHistory.std.ts'; +import { getHasPendingUpdate } from '../selectors/updates.std.ts'; +import { getHasAnyFailedStorySends } from '../selectors/stories.preload.ts'; +import { SmartCallLinkDetails } from './CallLinkDetails.preload.tsx'; +import type { CallLinkType } from '../../types/CallLink.std.ts'; +import { filterCallLinks } from '../../util/filterCallLinks.dom.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; function getCallHistoryFilter({ allCallLinks, diff --git a/ts/state/smart/CaptchaDialog.preload.tsx b/ts/state/smart/CaptchaDialog.preload.tsx index 07329c0dd6..3f0fbe1e1d 100644 --- a/ts/state/smart/CaptchaDialog.preload.tsx +++ b/ts/state/smart/CaptchaDialog.preload.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { CaptchaDialog } from '../../components/CaptchaDialog.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { isChallengePending } from '../selectors/network.preload.js'; -import { getChallengeURL } from '../../challenge.dom.js'; -import { createLogger } from '../../logging/log.std.js'; +import { CaptchaDialog } from '../../components/CaptchaDialog.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { isChallengePending } from '../selectors/network.preload.ts'; +import { getChallengeURL } from '../../challenge.dom.ts'; +import { createLogger } from '../../logging/log.std.ts'; const log = createLogger('CaptchaDialog'); diff --git a/ts/state/smart/ChatColorPicker.preload.tsx b/ts/state/smart/ChatColorPicker.preload.tsx index de2b4bcd3a..88ae7d3488 100644 --- a/ts/state/smart/ChatColorPicker.preload.tsx +++ b/ts/state/smart/ChatColorPicker.preload.tsx @@ -2,22 +2,22 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { ChatColorPicker } from '../../components/ChatColorPicker.dom.js'; +import { ChatColorPicker } from '../../components/ChatColorPicker.dom.tsx'; import { getConversationSelector, getConversationsWithCustomColorSelector, -} from '../selectors/conversations.dom.js'; -import { getIntl } from '../selectors/user.std.js'; +} from '../selectors/conversations.dom.ts'; +import { getIntl } from '../selectors/user.std.ts'; import { getCustomColors, getDefaultConversationColor, -} from '../selectors/items.dom.js'; -import { getConversationColorAttributes } from '../../util/getConversationColorAttributes.std.js'; +} from '../selectors/items.dom.ts'; +import { getConversationColorAttributes } from '../../util/getConversationColorAttributes.std.ts'; import { useConversationsActions, type ConversationType, -} from '../ducks/conversations.preload.js'; -import { useItemsActions } from '../ducks/items.preload.js'; +} from '../ducks/conversations.preload.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; export type SmartChatColorPickerProps = Readonly<{ conversationId?: string; diff --git a/ts/state/smart/ChatsTab.preload.tsx b/ts/state/smart/ChatsTab.preload.tsx index 05bd3bb987..4d7d6f9036 100644 --- a/ts/state/smart/ChatsTab.preload.tsx +++ b/ts/state/smart/ChatsTab.preload.tsx @@ -3,31 +3,31 @@ import React, { memo, useEffect, useRef } from 'react'; import { useSelector } from 'react-redux'; -import { ChatsTab } from '../../components/ChatsTab.dom.js'; -import type { SmartConversationViewProps } from './ConversationView.preload.js'; -import { SmartConversationView } from './ConversationView.preload.js'; -import { SmartMiniPlayer } from './MiniPlayer.preload.js'; -import { SmartLeftPane } from './LeftPane.preload.js'; -import type { NavTabPanelProps } from '../../components/NavTabs.dom.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { getIntl } from '../selectors/user.std.js'; -import { TargetedMessageSource } from '../ducks/conversationsEnums.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { isStagingServer } from '../../util/isStagingServer.dom.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import { getNavTabsCollapsed } from '../selectors/items.dom.js'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { getHasAnyFailedStorySends } from '../selectors/stories.preload.js'; -import { getHasPendingUpdate } from '../selectors/updates.std.js'; -import { getSelectedConversationId } from '../selectors/nav.std.js'; +import { ChatsTab } from '../../components/ChatsTab.dom.tsx'; +import type { SmartConversationViewProps } from './ConversationView.preload.tsx'; +import { SmartConversationView } from './ConversationView.preload.tsx'; +import { SmartMiniPlayer } from './MiniPlayer.preload.tsx'; +import { SmartLeftPane } from './LeftPane.preload.tsx'; +import type { NavTabPanelProps } from '../../components/NavTabs.dom.tsx'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { TargetedMessageSource } from '../ducks/conversationsEnums.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { isStagingServer } from '../../util/isStagingServer.dom.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import { getNavTabsCollapsed } from '../selectors/items.dom.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { getHasAnyFailedStorySends } from '../selectors/stories.preload.ts'; +import { getHasPendingUpdate } from '../selectors/updates.std.ts'; +import { getSelectedConversationId } from '../selectors/nav.std.ts'; import { getOtherTabsUnreadStats, getTargetedMessage, getTargetedMessageSource, -} from '../selectors/conversations.dom.js'; -import { useChatFolderActions } from '../ducks/chatFolders.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { useChatFolderActions } from '../ducks/chatFolders.preload.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; function renderConversationView(props: SmartConversationViewProps) { return ; diff --git a/ts/state/smart/ChooseGroupMembersModal.preload.tsx b/ts/state/smart/ChooseGroupMembersModal.preload.tsx index 9aab4ab334..29ad700070 100644 --- a/ts/state/smart/ChooseGroupMembersModal.preload.tsx +++ b/ts/state/smart/ChooseGroupMembersModal.preload.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { strictAssert } from '../../util/assert.std.js'; -import { lookupConversationWithoutServiceId } from '../../util/lookupConversationWithoutServiceId.preload.js'; -import { getUsernameFromSearch } from '../../util/Username.dom.js'; -import { ChooseGroupMembersModal } from '../../components/conversation/conversation-details/AddGroupMembersModal/ChooseGroupMembersModal.dom.js'; -import { getIntl, getTheme, getRegionCode } from '../selectors/user.std.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import { lookupConversationWithoutServiceId } from '../../util/lookupConversationWithoutServiceId.preload.ts'; +import { getUsernameFromSearch } from '../../util/Username.dom.ts'; +import { ChooseGroupMembersModal } from '../../components/conversation/conversation-details/AddGroupMembersModal/ChooseGroupMembersModal.dom.tsx'; +import { getIntl, getTheme, getRegionCode } from '../selectors/user.std.ts'; import { getCandidateContactsForNewGroup, getConversationByIdSelector, getMe, -} from '../selectors/conversations.dom.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; export type SmartChooseGroupMembersModalPropsType = Readonly<{ conversationIdsAlreadyInGroup: Set; diff --git a/ts/state/smart/CollidingAvatars.dom.tsx b/ts/state/smart/CollidingAvatars.dom.tsx index da4b03dfa9..66d616ff66 100644 --- a/ts/state/smart/CollidingAvatars.dom.tsx +++ b/ts/state/smart/CollidingAvatars.dom.tsx @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { CollidingAvatars } from '../../components/CollidingAvatars.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; +import { CollidingAvatars } from '../../components/CollidingAvatars.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; export type SmartCollidingAvatarsProps = Readonly<{ conversationIds: ReadonlyArray; diff --git a/ts/state/smart/CompositionArea.preload.tsx b/ts/state/smart/CompositionArea.preload.tsx index de4415b255..75e62be403 100644 --- a/ts/state/smart/CompositionArea.preload.tsx +++ b/ts/state/smart/CompositionArea.preload.tsx @@ -3,25 +3,25 @@ import React, { useCallback, useMemo, memo } from 'react'; import { useSelector } from 'react-redux'; -import { CompositionArea } from '../../components/CompositionArea.dom.js'; -import { useContactNameData } from '../../components/conversation/ContactName.dom.js'; +import { CompositionArea } from '../../components/CompositionArea.dom.tsx'; +import { useContactNameData } from '../../components/conversation/ContactName.dom.tsx'; import type { DraftBodyRanges, HydratedBodyRangesType, -} from '../../types/BodyRange.std.js'; -import { hydrateRanges } from '../../util/BodyRange.node.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.js'; -import { AutoSubstituteAsciiEmojis } from '../../quill/auto-substitute-ascii-emojis/index.dom.js'; -import { imageToBlurHash } from '../../util/imageToBlurHash.dom.js'; -import { isConversationSMSOnly } from '../../util/isConversationSMSOnly.std.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; +} from '../../types/BodyRange.std.ts'; +import { hydrateRanges } from '../../util/BodyRange.node.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.ts'; +import { AutoSubstituteAsciiEmojis } from '../../quill/auto-substitute-ascii-emojis/index.dom.tsx'; +import { imageToBlurHash } from '../../util/imageToBlurHash.dom.ts'; +import { isConversationSMSOnly } from '../../util/isConversationSMSOnly.std.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; import { getErrorDialogAudioRecorderType, getRecordingState, -} from '../selectors/audioRecorder.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { getComposerStateForConversationIdSelector } from '../selectors/composer.preload.js'; +} from '../selectors/audioRecorder.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { getComposerStateForConversationIdSelector } from '../selectors/composer.preload.ts'; import { getCachedConversationMemberColorsSelector, getConversationSelector, @@ -30,39 +30,39 @@ import { getMessages, getSelectedMessageIds, isMissingRequiredProfileSharing, -} from '../selectors/conversations.dom.js'; -import { getHasPanelOpen } from '../selectors/nav.std.js'; -import { getSharedGroupNames } from '../../util/sharedGroupNames.dom.js'; +} from '../selectors/conversations.dom.ts'; +import { getHasPanelOpen } from '../selectors/nav.std.ts'; +import { getSharedGroupNames } from '../../util/sharedGroupNames.dom.ts'; import { getDefaultConversationColor, getEmojiSkinToneDefault, getItems, getTextFormattingEnabled, -} from '../selectors/items.dom.js'; -import { canForward, getPropsForQuote } from '../selectors/message.preload.js'; +} from '../selectors/items.dom.ts'; +import { canForward, getPropsForQuote } from '../selectors/message.preload.ts'; import { getIntl, getPlatform, getTheme, getUserConversationId, getVersion, -} from '../selectors/user.std.js'; -import { SmartCompositionRecording } from './CompositionRecording.preload.js'; -import type { SmartCompositionRecordingDraftProps } from './CompositionRecordingDraft.preload.js'; -import { SmartCompositionRecordingDraft } from './CompositionRecordingDraft.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useAudioRecorderActions } from '../ducks/audioRecorder.preload.js'; -import { useEmojisActions } from '../ducks/emojis.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { isShowingAnyModal } from '../selectors/globalModals.std.js'; -import { isConversationEverUnregistered } from '../../util/isConversationUnregistered.dom.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; -import { isConversationMuted } from '../../util/isConversationMuted.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.js'; +} from '../selectors/user.std.ts'; +import { SmartCompositionRecording } from './CompositionRecording.preload.tsx'; +import type { SmartCompositionRecordingDraftProps } from './CompositionRecordingDraft.preload.tsx'; +import { SmartCompositionRecordingDraft } from './CompositionRecordingDraft.preload.tsx'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useAudioRecorderActions } from '../ducks/audioRecorder.preload.ts'; +import { useEmojisActions } from '../ducks/emojis.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { isShowingAnyModal } from '../selectors/globalModals.std.ts'; +import { isConversationEverUnregistered } from '../../util/isConversationUnregistered.dom.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; +import { isConversationMuted } from '../../util/isConversationMuted.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.ts'; function renderSmartCompositionRecording() { return ; diff --git a/ts/state/smart/CompositionRecording.preload.tsx b/ts/state/smart/CompositionRecording.preload.tsx index 2a0a158e99..c9327aa8ff 100644 --- a/ts/state/smart/CompositionRecording.preload.tsx +++ b/ts/state/smart/CompositionRecording.preload.tsx @@ -3,12 +3,12 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { CompositionRecording } from '../../components/CompositionRecording.dom.js'; -import { useAudioRecorderActions } from '../ducks/audioRecorder.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { getSelectedConversationId } from '../selectors/nav.std.js'; -import { getIntl } from '../selectors/user.std.js'; +import { CompositionRecording } from '../../components/CompositionRecording.dom.tsx'; +import { useAudioRecorderActions } from '../ducks/audioRecorder.preload.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { getSelectedConversationId } from '../selectors/nav.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; export const SmartCompositionRecording = memo( function SmartCompositionRecording() { diff --git a/ts/state/smart/CompositionRecordingDraft.preload.tsx b/ts/state/smart/CompositionRecordingDraft.preload.tsx index 9a138124e3..8a02d4e2ee 100644 --- a/ts/state/smart/CompositionRecordingDraft.preload.tsx +++ b/ts/state/smart/CompositionRecordingDraft.preload.tsx @@ -3,17 +3,17 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { CompositionRecordingDraft } from '../../components/CompositionRecordingDraft.dom.js'; -import type { AttachmentDraftType } from '../../types/Attachment.std.js'; +import { CompositionRecordingDraft } from '../../components/CompositionRecordingDraft.dom.tsx'; +import type { AttachmentDraftType } from '../../types/Attachment.std.ts'; import { AudioPlayerContent, useAudioPlayerActions, -} from '../ducks/audioPlayer.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import { selectAudioPlayerActive } from '../selectors/audioPlayer.preload.js'; -import { getConversationByIdSelector } from '../selectors/conversations.dom.js'; -import { getSelectedConversationId } from '../selectors/nav.std.js'; -import { getIntl } from '../selectors/user.std.js'; +} from '../ducks/audioPlayer.preload.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import { selectAudioPlayerActive } from '../selectors/audioPlayer.preload.ts'; +import { getConversationByIdSelector } from '../selectors/conversations.dom.ts'; +import { getSelectedConversationId } from '../selectors/nav.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; export type SmartCompositionRecordingDraftProps = { voiceNoteAttachment: AttachmentDraftType; diff --git a/ts/state/smart/CompositionTextArea.preload.tsx b/ts/state/smart/CompositionTextArea.preload.tsx index ac34d4f1a7..0eba6a7aed 100644 --- a/ts/state/smart/CompositionTextArea.preload.tsx +++ b/ts/state/smart/CompositionTextArea.preload.tsx @@ -2,24 +2,24 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import type { CompositionTextAreaProps } from '../../components/CompositionTextArea.dom.js'; -import { CompositionTextArea } from '../../components/CompositionTextArea.dom.js'; +import type { CompositionTextAreaProps } from '../../components/CompositionTextArea.dom.tsx'; +import { CompositionTextArea } from '../../components/CompositionTextArea.dom.tsx'; import type { DraftBodyRanges, HydratedBodyRangesType, -} from '../../types/BodyRange.std.js'; -import { hydrateRanges } from '../../util/BodyRange.node.js'; +} from '../../types/BodyRange.std.ts'; +import { hydrateRanges } from '../../util/BodyRange.node.ts'; import { getIntl, getPlatform, getUserConversationId, -} from '../selectors/user.std.js'; -import { useEmojisActions as useEmojiActions } from '../ducks/emojis.preload.js'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import { getTextFormattingEnabled } from '../selectors/items.dom.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; +} from '../selectors/user.std.ts'; +import { useEmojisActions as useEmojiActions } from '../ducks/emojis.preload.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import { getTextFormattingEnabled } from '../selectors/items.dom.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; export type SmartCompositionTextAreaProps = Pick< CompositionTextAreaProps, diff --git a/ts/state/smart/ConfirmAdditionsModal.dom.tsx b/ts/state/smart/ConfirmAdditionsModal.dom.tsx index aa2d98f7d2..984e98bc9f 100644 --- a/ts/state/smart/ConfirmAdditionsModal.dom.tsx +++ b/ts/state/smart/ConfirmAdditionsModal.dom.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { strictAssert } from '../../util/assert.std.js'; -import { ConfirmAdditionsModal } from '../../components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.dom.js'; -import type { RequestState } from '../../components/conversation/conversation-details/util.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import { getConversationByIdSelector } from '../selectors/conversations.dom.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import { ConfirmAdditionsModal } from '../../components/conversation/conversation-details/AddGroupMembersModal/ConfirmAdditionsModal.dom.tsx'; +import type { RequestState } from '../../components/conversation/conversation-details/util.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { getConversationByIdSelector } from '../selectors/conversations.dom.ts'; export type SmartConfirmAdditionsModalPropsType = { selectedConversationIds: ReadonlyArray; diff --git a/ts/state/smart/ConfirmLeaveCallModal.preload.tsx b/ts/state/smart/ConfirmLeaveCallModal.preload.tsx index 3d67c39b25..d721ec0d6d 100644 --- a/ts/state/smart/ConfirmLeaveCallModal.preload.tsx +++ b/ts/state/smart/ConfirmLeaveCallModal.preload.tsx @@ -3,11 +3,11 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { getConfirmLeaveCallModalState } from '../selectors/globalModals.std.js'; -import { ConfirmLeaveCallModal } from '../../components/ConfirmLeaveCallModal.dom.js'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { getConfirmLeaveCallModalState } from '../selectors/globalModals.std.ts'; +import { ConfirmLeaveCallModal } from '../../components/ConfirmLeaveCallModal.dom.tsx'; export const SmartConfirmLeaveCallModal = memo( function SmartConfirmLeaveCallModal(): React.JSX.Element | null { diff --git a/ts/state/smart/ContactDetail.preload.tsx b/ts/state/smart/ContactDetail.preload.tsx index 3d4370020f..61bd41e72a 100644 --- a/ts/state/smart/ContactDetail.preload.tsx +++ b/ts/state/smart/ContactDetail.preload.tsx @@ -4,20 +4,20 @@ import React, { memo, useEffect, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import type { Props as ContactDetailProps } from '../../components/conversation/ContactDetail.dom.js'; -import { ContactDetail } from '../../components/conversation/ContactDetail.dom.js'; -import { useAccountsActions } from '../ducks/accounts.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { getMessages } from '../selectors/conversations.dom.js'; -import { getIntl, getRegionCode } from '../selectors/user.std.js'; -import { embeddedContactSelector } from '../../types/EmbeddedContact.std.js'; -import { startConversation } from '../../util/startConversation.dom.js'; +import type { Props as ContactDetailProps } from '../../components/conversation/ContactDetail.dom.tsx'; +import { ContactDetail } from '../../components/conversation/ContactDetail.dom.tsx'; +import { useAccountsActions } from '../ducks/accounts.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { getMessages } from '../selectors/conversations.dom.ts'; +import { getIntl, getRegionCode } from '../selectors/user.std.ts'; +import { embeddedContactSelector } from '../../types/EmbeddedContact.std.ts'; +import { startConversation } from '../../util/startConversation.dom.ts'; import type { EmbeddedContactType, EmbeddedContactForUIType, -} from '../../types/EmbeddedContact.std.js'; -import { getAccountSelector } from '../selectors/accounts.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; +} from '../../types/EmbeddedContact.std.ts'; +import { getAccountSelector } from '../selectors/accounts.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; export type OwnProps = Pick; diff --git a/ts/state/smart/ContactModal.preload.tsx b/ts/state/smart/ContactModal.preload.tsx index 7f8d5ee0b4..e0c16ecb38 100644 --- a/ts/state/smart/ContactModal.preload.tsx +++ b/ts/state/smart/ContactModal.preload.tsx @@ -3,30 +3,30 @@ import React, { memo, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { ContactModal } from '../../components/conversation/ContactModal.dom.js'; -import { getAreWeASubscriber, getItems } from '../selectors/items.dom.js'; -import { getIntl, getTheme, getVersion } from '../selectors/user.std.js'; -import { getBadgesSelector } from '../selectors/badges.preload.js'; +import { ContactModal } from '../../components/conversation/ContactModal.dom.tsx'; +import { getAreWeASubscriber, getItems } from '../selectors/items.dom.ts'; +import { getIntl, getTheme, getVersion } from '../selectors/user.std.ts'; +import { getBadgesSelector } from '../selectors/badges.preload.ts'; import { getCachedConversationMemberColorsSelector, getConversationSelector, -} from '../selectors/conversations.dom.js'; -import { getHasStoriesSelector } from '../selectors/stories2.dom.js'; +} from '../selectors/conversations.dom.ts'; +import { getHasStoriesSelector } from '../selectors/stories2.dom.ts'; import { getActiveCallState, getCallLinkSelector, isInFullScreenCall as getIsInFullScreenCall, getParticipantInActiveCall, -} from '../selectors/calling.std.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { getContactModalState } from '../selectors/globalModals.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { CallMode } from '../../types/CallDisposition.std.js'; -import { isCallLinkAdmin } from '../../types/CallLink.std.js'; -import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.js'; +} from '../selectors/calling.std.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { getContactModalState } from '../selectors/globalModals.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { CallMode } from '../../types/CallDisposition.std.ts'; +import { isCallLinkAdmin } from '../../types/CallLink.std.ts'; +import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.ts'; export const SmartContactModal = memo(function SmartContactModal() { const i18n = useSelector(getIntl); diff --git a/ts/state/smart/ContactName.preload.tsx b/ts/state/smart/ContactName.preload.tsx index 7afcee98a0..214dd58549 100644 --- a/ts/state/smart/ContactName.preload.tsx +++ b/ts/state/smart/ContactName.preload.tsx @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { ContactName } from '../../components/conversation/ContactName.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getSelectedConversationId } from '../selectors/nav.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +import { ContactName } from '../../components/conversation/ContactName.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getSelectedConversationId } from '../selectors/nav.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; type ExternalProps = { contactId: string; diff --git a/ts/state/smart/ContactSpoofingReviewDialog.preload.tsx b/ts/state/smart/ContactSpoofingReviewDialog.preload.tsx index 280b866831..77cfb7a7a5 100644 --- a/ts/state/smart/ContactSpoofingReviewDialog.preload.tsx +++ b/ts/state/smart/ContactSpoofingReviewDialog.preload.tsx @@ -4,27 +4,27 @@ import React, { memo, useCallback } from 'react'; import { useSelector, useStore } from 'react-redux'; import lodash from 'lodash'; -import type { StateType } from '../reducer.preload.js'; -import { ContactSpoofingReviewDialog } from '../../components/conversation/ContactSpoofingReviewDialog.dom.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import { ContactSpoofingReviewDialog } from '../../components/conversation/ContactSpoofingReviewDialog.dom.tsx'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; import { getConversationSelector, getConversationByServiceIdSelector, getSafeConversationWithSameTitle, -} from '../selectors/conversations.dom.js'; -import { getSharedGroupNames } from '../../util/sharedGroupNames.dom.js'; -import { getOwn } from '../../util/getOwn.std.js'; -import { assertDev } from '../../util/assert.std.js'; -import { ContactSpoofingType } from '../../util/contactSpoofing.std.js'; -import { getGroupMemberships } from '../../util/getGroupMemberships.dom.js'; -import { isSignalConnection } from '../../util/getSignalConnections.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getSharedGroupNames } from '../../util/sharedGroupNames.dom.ts'; +import { getOwn } from '../../util/getOwn.std.ts'; +import { assertDev } from '../../util/assert.std.ts'; +import { ContactSpoofingType } from '../../util/contactSpoofing.std.ts'; +import { getGroupMemberships } from '../../util/getGroupMemberships.dom.ts'; +import { isSignalConnection } from '../../util/getSignalConnections.preload.ts'; import { getCollisionsFromMemberships, invertIdsByTitle, -} from '../../util/groupMemberNameCollisions.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; +} from '../../util/groupMemberNameCollisions.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; const { mapValues } = lodash; diff --git a/ts/state/smart/ConversationDetails.preload.tsx b/ts/state/smart/ConversationDetails.preload.tsx index a976f17cb3..24cf899fc3 100644 --- a/ts/state/smart/ConversationDetails.preload.tsx +++ b/ts/state/smart/ConversationDetails.preload.tsx @@ -4,56 +4,56 @@ import lodash from 'lodash'; import React, { memo, useCallback, useState, useEffect } from 'react'; import { useSelector } from 'react-redux'; -import { ConversationDetails } from '../../components/conversation/conversation-details/ConversationDetails.dom.js'; +import { ConversationDetails } from '../../components/conversation/conversation-details/ConversationDetails.dom.tsx'; import { getGroupSizeHardLimit, getGroupSizeRecommendedLimit, -} from '../../groups/limits.dom.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; -import type { CallHistoryGroup } from '../../types/CallDisposition.std.js'; -import { assertDev } from '../../util/assert.std.js'; -import { getConversationColorAttributes } from '../../util/getConversationColorAttributes.std.js'; -import { getGroupMemberships } from '../../util/getGroupMemberships.dom.js'; +} from '../../groups/limits.dom.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; +import type { CallHistoryGroup } from '../../types/CallDisposition.std.ts'; +import { assertDev } from '../../util/assert.std.ts'; +import { getConversationColorAttributes } from '../../util/getConversationColorAttributes.std.ts'; +import { getGroupMemberships } from '../../util/getGroupMemberships.dom.ts'; import { getBadgesSelector, getPreferredBadgeSelector, -} from '../selectors/badges.preload.js'; -import { getActiveCallState } from '../selectors/calling.std.js'; +} from '../selectors/badges.preload.ts'; +import { getActiveCallState } from '../selectors/calling.std.ts'; import { getAllComposableConversations, getCachedConversationMemberColorsSelector, getConversationByIdSelector, getConversationByServiceIdSelector, getPendingAvatarDownloadSelector, -} from '../selectors/conversations.dom.js'; +} from '../selectors/conversations.dom.ts'; import { getAreWeASubscriber, getDefaultConversationColor, getItems, -} from '../selectors/items.dom.js'; -import { getSelectedNavTab } from '../selectors/nav.std.js'; +} from '../selectors/items.dom.ts'; +import { getSelectedNavTab } from '../selectors/nav.std.ts'; import { getIntl, getTheme, getUserACI, getVersion, -} from '../selectors/user.std.js'; -import type { SmartChooseGroupMembersModalPropsType } from './ChooseGroupMembersModal.preload.js'; -import { SmartChooseGroupMembersModal } from './ChooseGroupMembersModal.preload.js'; -import type { SmartConfirmAdditionsModalPropsType } from './ConfirmAdditionsModal.dom.js'; -import { SmartConfirmAdditionsModal } from './ConfirmAdditionsModal.dom.js'; -import type { ConversationType } from '../ducks/conversations.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { useSearchActions } from '../ducks/search.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; -import { drop } from '../../util/drop.std.js'; -import { DataReader } from '../../sql/Client.preload.js'; -import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.js'; -import { getCanAddLabel } from '../../types/GroupMemberLabels.std.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; +} from '../selectors/user.std.ts'; +import type { SmartChooseGroupMembersModalPropsType } from './ChooseGroupMembersModal.preload.tsx'; +import { SmartChooseGroupMembersModal } from './ChooseGroupMembersModal.preload.tsx'; +import type { SmartConfirmAdditionsModalPropsType } from './ConfirmAdditionsModal.dom.tsx'; +import { SmartConfirmAdditionsModal } from './ConfirmAdditionsModal.dom.tsx'; +import type { ConversationType } from '../ducks/conversations.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { useSearchActions } from '../ducks/search.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; +import { drop } from '../../util/drop.std.ts'; +import { DataReader } from '../../sql/Client.preload.ts'; +import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.ts'; +import { getCanAddLabel } from '../../types/GroupMemberLabels.std.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; const { sortBy } = lodash; diff --git a/ts/state/smart/ConversationHeader.preload.tsx b/ts/state/smart/ConversationHeader.preload.tsx index f4f3e5a3e7..30e1b1cb6b 100644 --- a/ts/state/smart/ConversationHeader.preload.tsx +++ b/ts/state/smart/ConversationHeader.preload.tsx @@ -3,55 +3,55 @@ import React, { memo, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { useContactNameData } from '../../components/conversation/ContactName.dom.js'; +import { useContactNameData } from '../../components/conversation/ContactName.dom.tsx'; import { ConversationHeader, OutgoingCallButtonStyle, -} from '../../components/conversation/ConversationHeader.dom.js'; -import { getCannotLeaveBecauseYouAreLastAdmin } from '../../components/conversation/conversation-details/ConversationDetails.dom.js'; -import { useMinimalConversation } from '../../hooks/useMinimalConversation.std.js'; -import { CallMode } from '../../types/CallDisposition.std.js'; -import { PanelType } from '../../types/Panels.std.js'; -import { StoryViewModeType } from '../../types/Stories.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.js'; -import { getGroupMemberships } from '../../util/getGroupMemberships.dom.js'; -import { isConversationSMSOnly } from '../../util/isConversationSMSOnly.std.js'; -import { isGroupOrAdhocCallState } from '../../util/isGroupOrAdhocCall.std.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { getConversationCallMode } from '../../util/getConversationCallMode.std.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { isAnybodyElseInGroupCall } from '../ducks/callingHelpers.std.js'; -import type { ConversationType } from '../ducks/conversations.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useSearchActions } from '../ducks/search.preload.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +} from '../../components/conversation/ConversationHeader.dom.tsx'; +import { getCannotLeaveBecauseYouAreLastAdmin } from '../../components/conversation/conversation-details/ConversationDetails.dom.tsx'; +import { useMinimalConversation } from '../../hooks/useMinimalConversation.std.ts'; +import { CallMode } from '../../types/CallDisposition.std.ts'; +import { PanelType } from '../../types/Panels.std.ts'; +import { StoryViewModeType } from '../../types/Stories.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.ts'; +import { getGroupMemberships } from '../../util/getGroupMemberships.dom.ts'; +import { isConversationSMSOnly } from '../../util/isConversationSMSOnly.std.ts'; +import { isGroupOrAdhocCallState } from '../../util/isGroupOrAdhocCall.std.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { getConversationCallMode } from '../../util/getConversationCallMode.std.ts'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { isAnybodyElseInGroupCall } from '../ducks/callingHelpers.std.ts'; +import type { ConversationType } from '../ducks/conversations.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useSearchActions } from '../ducks/search.preload.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; import { getActiveCallState, getCallSelector, -} from '../selectors/calling.std.js'; +} from '../selectors/calling.std.ts'; import { getConversationByServiceIdSelector, getConversationSelector, isMissingRequiredProfileSharing as getIsMissingRequiredProfileSharing, getSelectedMessageIds, -} from '../selectors/conversations.dom.js'; -import { getHasPanelOpen } from '../selectors/nav.std.js'; -import { getHasStoriesSelector } from '../selectors/stories2.dom.js'; -import { getIntl, getTheme, getUserACI } from '../selectors/user.std.js'; -import { isConversationEverUnregistered } from '../../util/isConversationUnregistered.dom.js'; -import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.js'; -import type { DurationInSeconds } from '../../util/durations/index.std.js'; -import { selectAudioPlayerActive } from '../selectors/audioPlayer.preload.js'; -import type { SmartCollidingAvatarsProps } from './CollidingAvatars.dom.js'; -import { SmartCollidingAvatars } from './CollidingAvatars.dom.js'; -import type { SmartMiniPlayerProps } from './MiniPlayer.preload.js'; -import { SmartMiniPlayer } from './MiniPlayer.preload.js'; -import { SmartPinnedMessagesBar } from './PinnedMessagesBar.preload.js'; -import { getContactSpoofingWarningSelector } from '../selectors/timeline.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; +} from '../selectors/conversations.dom.ts'; +import { getHasPanelOpen } from '../selectors/nav.std.ts'; +import { getHasStoriesSelector } from '../selectors/stories2.dom.ts'; +import { getIntl, getTheme, getUserACI } from '../selectors/user.std.ts'; +import { isConversationEverUnregistered } from '../../util/isConversationUnregistered.dom.ts'; +import { isDirectConversation } from '../../util/whatTypeOfConversation.dom.ts'; +import type { DurationInSeconds } from '../../util/durations/index.std.ts'; +import { selectAudioPlayerActive } from '../selectors/audioPlayer.preload.ts'; +import type { SmartCollidingAvatarsProps } from './CollidingAvatars.dom.tsx'; +import { SmartCollidingAvatars } from './CollidingAvatars.dom.tsx'; +import type { SmartMiniPlayerProps } from './MiniPlayer.preload.tsx'; +import { SmartMiniPlayer } from './MiniPlayer.preload.tsx'; +import { SmartPinnedMessagesBar } from './PinnedMessagesBar.preload.tsx'; +import { getContactSpoofingWarningSelector } from '../selectors/timeline.preload.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; function renderCollidingAvatars( props: SmartCollidingAvatarsProps diff --git a/ts/state/smart/ConversationNotificationsSettings.preload.tsx b/ts/state/smart/ConversationNotificationsSettings.preload.tsx index 56f8cc7635..616f28c9e0 100644 --- a/ts/state/smart/ConversationNotificationsSettings.preload.tsx +++ b/ts/state/smart/ConversationNotificationsSettings.preload.tsx @@ -3,11 +3,11 @@ import { useSelector } from 'react-redux'; import React, { memo } from 'react'; -import { ConversationNotificationsSettings } from '../../components/conversation/conversation-details/ConversationNotificationsSettings.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { getConversationByIdSelector } from '../selectors/conversations.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +import { ConversationNotificationsSettings } from '../../components/conversation/conversation-details/ConversationNotificationsSettings.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { getConversationByIdSelector } from '../selectors/conversations.dom.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; export type SmartConversationNotificationsSettingsProps = { conversationId: string; diff --git a/ts/state/smart/ConversationPanel.preload.tsx b/ts/state/smart/ConversationPanel.preload.tsx index 72c0152ca2..9a76a30a35 100644 --- a/ts/state/smart/ConversationPanel.preload.tsx +++ b/ts/state/smart/ConversationPanel.preload.tsx @@ -12,36 +12,36 @@ import React, { } from 'react'; import { useSelector } from 'react-redux'; import classNames from 'classnames'; -import type { PanelArgsType } from '../../types/Panels.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { PanelType } from '../../types/Panels.std.js'; -import { toLogFormat } from '../../types/errors.std.js'; -import { SmartAllMedia } from './AllMedia.preload.js'; -import { SmartAllMediaHeader } from './AllMediaHeader.preload.js'; -import { SmartChatColorPicker } from './ChatColorPicker.preload.js'; -import { SmartContactDetail } from './ContactDetail.preload.js'; -import { SmartConversationDetails } from './ConversationDetails.preload.js'; -import { SmartConversationNotificationsSettings } from './ConversationNotificationsSettings.preload.js'; -import { SmartGV1Members } from './GV1Members.preload.js'; -import { SmartGroupLinkManagement } from './GroupLinkManagement.preload.js'; -import { SmartGroupV2Permissions } from './GroupV2Permissions.preload.js'; -import { SmartMessageDetail } from './MessageDetail.preload.js'; -import { SmartPendingInvites } from './PendingInvites.preload.js'; -import { SmartStickerManager } from './StickerManager.preload.js'; -import { getConversationTitleForPanelType } from '../../util/getConversationTitleForPanelType.std.js'; -import { getIntl } from '../selectors/user.std.js'; +import type { PanelArgsType } from '../../types/Panels.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { PanelType } from '../../types/Panels.std.ts'; +import { toLogFormat } from '../../types/errors.std.ts'; +import { SmartAllMedia } from './AllMedia.preload.tsx'; +import { SmartAllMediaHeader } from './AllMediaHeader.preload.tsx'; +import { SmartChatColorPicker } from './ChatColorPicker.preload.tsx'; +import { SmartContactDetail } from './ContactDetail.preload.tsx'; +import { SmartConversationDetails } from './ConversationDetails.preload.tsx'; +import { SmartConversationNotificationsSettings } from './ConversationNotificationsSettings.preload.tsx'; +import { SmartGV1Members } from './GV1Members.preload.tsx'; +import { SmartGroupLinkManagement } from './GroupLinkManagement.preload.tsx'; +import { SmartGroupV2Permissions } from './GroupV2Permissions.preload.tsx'; +import { SmartMessageDetail } from './MessageDetail.preload.tsx'; +import { SmartPendingInvites } from './PendingInvites.preload.tsx'; +import { SmartStickerManager } from './StickerManager.preload.tsx'; +import { getConversationTitleForPanelType } from '../../util/getConversationTitleForPanelType.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; import { getPanelInformation, getWasPanelAnimated, -} from '../selectors/nav.std.js'; -import { focusableSelector } from '../../util/focusableSelectors.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { useReducedMotion } from '../../hooks/useReducedMotion.dom.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { SmartPinnedMessagesPanel } from './PinnedMessagesPanel.preload.js'; -import { SmartMiniPlayer } from './MiniPlayer.preload.js'; -import { SmartGroupMemberLabelEditor } from './GroupMemberLabelEditor.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; +} from '../selectors/nav.std.ts'; +import { focusableSelector } from '../../util/focusableSelectors.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { useReducedMotion } from '../../hooks/useReducedMotion.dom.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { SmartPinnedMessagesPanel } from './PinnedMessagesPanel.preload.tsx'; +import { SmartMiniPlayer } from './MiniPlayer.preload.tsx'; +import { SmartGroupMemberLabelEditor } from './GroupMemberLabelEditor.preload.tsx'; +import { useNavActions } from '../ducks/nav.std.ts'; const log = createLogger('ConversationPanel'); diff --git a/ts/state/smart/ConversationView.preload.tsx b/ts/state/smart/ConversationView.preload.tsx index 202fadb75d..b63953f0c6 100644 --- a/ts/state/smart/ConversationView.preload.tsx +++ b/ts/state/smart/ConversationView.preload.tsx @@ -3,16 +3,16 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { ConversationPanel } from './ConversationPanel.preload.js'; -import { ConversationView } from '../../components/conversation/ConversationView.dom.js'; -import { SmartCompositionArea } from './CompositionArea.preload.js'; -import { SmartConversationHeader } from './ConversationHeader.preload.js'; -import { SmartTimeline } from './Timeline.preload.js'; -import { getSelectedMessageIds } from '../selectors/conversations.dom.js'; -import { getActivePanel, getIsPanelAnimating } from '../selectors/nav.std.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { isShowingAnyModal } from '../selectors/globalModals.std.js'; +import { ConversationPanel } from './ConversationPanel.preload.tsx'; +import { ConversationView } from '../../components/conversation/ConversationView.dom.tsx'; +import { SmartCompositionArea } from './CompositionArea.preload.tsx'; +import { SmartConversationHeader } from './ConversationHeader.preload.tsx'; +import { SmartTimeline } from './Timeline.preload.tsx'; +import { getSelectedMessageIds } from '../selectors/conversations.dom.ts'; +import { getActivePanel, getIsPanelAnimating } from '../selectors/nav.std.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { isShowingAnyModal } from '../selectors/globalModals.std.ts'; function renderCompositionArea(conversationId: string) { return ; diff --git a/ts/state/smart/CrashReportDialog.preload.tsx b/ts/state/smart/CrashReportDialog.preload.tsx index aa44205dd0..4f05554993 100644 --- a/ts/state/smart/CrashReportDialog.preload.tsx +++ b/ts/state/smart/CrashReportDialog.preload.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import { useSelector } from 'react-redux'; import React, { memo } from 'react'; -import { CrashReportDialog } from '../../components/CrashReportDialog.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useCrashReportsActions } from '../ducks/crashReports.preload.js'; -import { getCrashReportsIsPending } from '../selectors/crashReports.std.js'; +import { CrashReportDialog } from '../../components/CrashReportDialog.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { useCrashReportsActions } from '../ducks/crashReports.preload.ts'; +import { getCrashReportsIsPending } from '../selectors/crashReports.std.ts'; export const SmartCrashReportDialog = memo(function SmartCrashReportDialog() { const i18n = useSelector(getIntl); diff --git a/ts/state/smart/CustomizingPreferredReactionsModal.preload.tsx b/ts/state/smart/CustomizingPreferredReactionsModal.preload.tsx index 72d5eb4b77..d546761a5f 100644 --- a/ts/state/smart/CustomizingPreferredReactionsModal.preload.tsx +++ b/ts/state/smart/CustomizingPreferredReactionsModal.preload.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { usePreferredReactionsActions } from '../ducks/preferredReactions.preload.js'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { getIntl } from '../selectors/user.std.js'; -import { getEmojiSkinToneDefault } from '../selectors/items.dom.js'; -import { useRecentEmojis } from '../selectors/emojis.std.js'; -import { getCustomizeModalState } from '../selectors/preferredReactions.std.js'; -import { CustomizingPreferredReactionsModal } from '../../components/CustomizingPreferredReactionsModal.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; +import { usePreferredReactionsActions } from '../ducks/preferredReactions.preload.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { getEmojiSkinToneDefault } from '../selectors/items.dom.ts'; +import { useRecentEmojis } from '../selectors/emojis.std.ts'; +import { getCustomizeModalState } from '../selectors/preferredReactions.std.ts'; +import { CustomizingPreferredReactionsModal } from '../../components/CustomizingPreferredReactionsModal.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; export const SmartCustomizingPreferredReactionsModal = memo( function SmartCustomizingPreferredReactionsModal(): React.JSX.Element { diff --git a/ts/state/smart/DeleteMessagesModal.preload.tsx b/ts/state/smart/DeleteMessagesModal.preload.tsx index ba3da962dd..e040b2eb6d 100644 --- a/ts/state/smart/DeleteMessagesModal.preload.tsx +++ b/ts/state/smart/DeleteMessagesModal.preload.tsx @@ -3,22 +3,22 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import type { StateType } from '../reducer.preload.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import DeleteMessagesModal from '../../components/DeleteMessagesModal.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getMessagesCanDeleteForEveryone } from '../selectors/message.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; +import type { StateType } from '../reducer.preload.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import DeleteMessagesModal from '../../components/DeleteMessagesModal.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getMessagesCanDeleteForEveryone } from '../selectors/message.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; import { getConversationSelector, getLastSelectedMessage, -} from '../selectors/conversations.dom.js'; -import { getDeleteMessagesProps } from '../selectors/globalModals.std.js'; -import { getHasSeenAdminDeleteEducationDialog } from '../selectors/items.dom.js'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getDeleteMessagesProps } from '../selectors/globalModals.std.ts'; +import { getHasSeenAdminDeleteEducationDialog } from '../selectors/items.dom.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; export const SmartDeleteMessagesModal = memo( function SmartDeleteMessagesModal() { diff --git a/ts/state/smart/DiscardDraftDialog.preload.tsx b/ts/state/smart/DiscardDraftDialog.preload.tsx index 1860b0c458..e6f85c240b 100644 --- a/ts/state/smart/DiscardDraftDialog.preload.tsx +++ b/ts/state/smart/DiscardDraftDialog.preload.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import { getDiscardDraftDialogProps } from '../selectors/globalModals.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { DiscardDraftDialog } from '../../components/DiscardDraftDialog.dom.js'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import { getDiscardDraftDialogProps } from '../selectors/globalModals.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { DiscardDraftDialog } from '../../components/DiscardDraftDialog.dom.tsx'; export const SmartDiscardDraftDialog = memo(function SmartDiscardDraftDialog() { const discardDraftDialogProps = useSelector(getDiscardDraftDialogProps); diff --git a/ts/state/smart/DraftGifMessageSendModal.preload.tsx b/ts/state/smart/DraftGifMessageSendModal.preload.tsx index 001e1f7adf..c8bcd0fb47 100644 --- a/ts/state/smart/DraftGifMessageSendModal.preload.tsx +++ b/ts/state/smart/DraftGifMessageSendModal.preload.tsx @@ -2,26 +2,26 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback, useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import type { DraftGifMessageSendModalProps } from '../../components/DraftGifMessageSendModal.dom.js'; -import { DraftGifMessageSendModal } from '../../components/DraftGifMessageSendModal.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { HydratedBodyRangesType } from '../../types/BodyRange.std.js'; -import { SmartCompositionTextArea } from './CompositionTextArea.preload.js'; -import { getDraftGifMessageSendModalProps } from '../selectors/globalModals.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import type { FunGifSelection } from '../../components/fun/panels/FunPanelGifs.dom.js'; -import { fetchGiphyFile } from '../../components/fun/data/giphy.preload.js'; -import { drop } from '../../util/drop.std.js'; -import { processAttachment } from '../../util/processAttachment.preload.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; -import { writeDraftAttachment } from '../../util/writeDraftAttachment.preload.js'; -import type { AttachmentDraftType } from '../../types/Attachment.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { type Loadable, LoadingState } from '../../util/loadable.std.js'; -import { isAbortError } from '../../util/isAbortError.std.js'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import type { DraftGifMessageSendModalProps } from '../../components/DraftGifMessageSendModal.dom.tsx'; +import { DraftGifMessageSendModal } from '../../components/DraftGifMessageSendModal.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { HydratedBodyRangesType } from '../../types/BodyRange.std.ts'; +import { SmartCompositionTextArea } from './CompositionTextArea.preload.tsx'; +import { getDraftGifMessageSendModalProps } from '../selectors/globalModals.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import type { FunGifSelection } from '../../components/fun/panels/FunPanelGifs.dom.tsx'; +import { fetchGiphyFile } from '../../components/fun/data/giphy.preload.ts'; +import { drop } from '../../util/drop.std.ts'; +import { processAttachment } from '../../util/processAttachment.preload.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; +import { writeDraftAttachment } from '../../util/writeDraftAttachment.preload.ts'; +import type { AttachmentDraftType } from '../../types/Attachment.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { type Loadable, LoadingState } from '../../util/loadable.std.ts'; +import { isAbortError } from '../../util/isAbortError.std.ts'; const log = createLogger('DraftGifMessageSendModal'); diff --git a/ts/state/smart/EditHistoryMessagesModal.preload.tsx b/ts/state/smart/EditHistoryMessagesModal.preload.tsx index 3363777b8a..deb4b7a250 100644 --- a/ts/state/smart/EditHistoryMessagesModal.preload.tsx +++ b/ts/state/smart/EditHistoryMessagesModal.preload.tsx @@ -4,15 +4,15 @@ import React, { memo, useMemo } from 'react'; import { useSelector } from 'react-redux'; import type { ReadonlyMessageAttributesType } from '../../model-types.d.ts'; -import { EditHistoryMessagesModal } from '../../components/EditHistoryMessagesModal.dom.js'; -import { getIntl, getPlatform } from '../selectors/user.std.js'; -import { getMessagePropsSelector } from '../selectors/message.preload.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useLightboxActions } from '../ducks/lightbox.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getEditHistoryMessages } from '../selectors/globalModals.std.js'; +import { EditHistoryMessagesModal } from '../../components/EditHistoryMessagesModal.dom.tsx'; +import { getIntl, getPlatform } from '../selectors/user.std.ts'; +import { getMessagePropsSelector } from '../selectors/message.preload.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useLightboxActions } from '../ducks/lightbox.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getEditHistoryMessages } from '../selectors/globalModals.std.ts'; export const SmartEditHistoryMessagesModal = memo( function SmartEditHistoryMessagesModal(): React.JSX.Element { diff --git a/ts/state/smart/EditNicknameAndNoteModal.preload.tsx b/ts/state/smart/EditNicknameAndNoteModal.preload.tsx index 34b79ace59..5849c60a5a 100644 --- a/ts/state/smart/EditNicknameAndNoteModal.preload.tsx +++ b/ts/state/smart/EditNicknameAndNoteModal.preload.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getEditNicknameAndNoteModalProps } from '../selectors/globalModals.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { EditNicknameAndNoteModal } from '../../components/EditNicknameAndNoteModal.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import type { NicknameAndNote } from '../ducks/conversations.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getEditNicknameAndNoteModalProps } from '../selectors/globalModals.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { EditNicknameAndNoteModal } from '../../components/EditNicknameAndNoteModal.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import type { NicknameAndNote } from '../ducks/conversations.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; export const SmartEditNicknameAndNoteModal = memo( function SmartEditNicknameAndNoteModal(): React.JSX.Element { diff --git a/ts/state/smart/ForwardMessagesModal.preload.tsx b/ts/state/smart/ForwardMessagesModal.preload.tsx index a9ac0a9f91..1a04503996 100644 --- a/ts/state/smart/ForwardMessagesModal.preload.tsx +++ b/ts/state/smart/ForwardMessagesModal.preload.tsx @@ -3,33 +3,33 @@ import React, { useCallback, useState } from 'react'; import { useSelector } from 'react-redux'; -import type { ForwardMessagesPropsType } from '../ducks/globalModals.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { ForwardMessagesModal } from '../../components/ForwardMessagesModal.dom.js'; -import { LinkPreviewSourceType } from '../../types/LinkPreview.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { getAllComposableConversations } from '../selectors/conversations.dom.js'; -import { getIntl, getTheme, getRegionCode } from '../selectors/user.std.js'; -import { getLinkPreview } from '../selectors/linkPreviews.std.js'; -import { isInFullScreenCall as getIsInFullScreenCall } from '../selectors/calling.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { maybeForwardMessages } from '../../util/maybeForwardMessages.preload.js'; +import type { ForwardMessagesPropsType } from '../ducks/globalModals.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { ForwardMessagesModal } from '../../components/ForwardMessagesModal.dom.tsx'; +import { LinkPreviewSourceType } from '../../types/LinkPreview.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { getAllComposableConversations } from '../selectors/conversations.dom.ts'; +import { getIntl, getTheme, getRegionCode } from '../selectors/user.std.ts'; +import { getLinkPreview } from '../selectors/linkPreviews.std.ts'; +import { isInFullScreenCall as getIsInFullScreenCall } from '../selectors/calling.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { maybeForwardMessages } from '../../util/maybeForwardMessages.preload.ts'; import { maybeGrabLinkPreview, resetLinkPreview, -} from '../../services/LinkPreview.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useLinkPreviewActions } from '../ducks/linkPreviews.preload.js'; -import { SmartCompositionTextArea } from './CompositionTextArea.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { isDownloaded } from '../../util/Attachment.std.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../services/LinkPreview.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useLinkPreviewActions } from '../ducks/linkPreviews.preload.ts'; +import { SmartCompositionTextArea } from './CompositionTextArea.preload.tsx'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { isDownloaded } from '../../util/Attachment.std.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; import type { ForwardMessageData, MessageForwardDraft, -} from '../../types/ForwardDraft.std.js'; -import { getForwardMessagesProps } from '../selectors/globalModals.std.js'; +} from '../../types/ForwardDraft.std.ts'; +import { getForwardMessagesProps } from '../selectors/globalModals.std.ts'; const log = createLogger('ForwardMessagesModal'); diff --git a/ts/state/smart/FunProvider.preload.tsx b/ts/state/smart/FunProvider.preload.tsx index f8facdea93..7ab63658a5 100644 --- a/ts/state/smart/FunProvider.preload.tsx +++ b/ts/state/smart/FunProvider.preload.tsx @@ -4,37 +4,37 @@ import type { ReactNode } from 'react'; import React, { memo, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { FunProvider } from '../../components/fun/FunProvider.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { selectRecentEmojis } from '../selectors/emojis.std.js'; -import type { FunGifSelection } from '../../components/fun/panels/FunPanelGifs.dom.js'; +import { FunProvider } from '../../components/fun/FunProvider.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { selectRecentEmojis } from '../selectors/emojis.std.ts'; +import type { FunGifSelection } from '../../components/fun/panels/FunPanelGifs.dom.tsx'; import { getInstalledStickerPacks, getRecentStickers, -} from '../selectors/stickers.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { EmojiSkinTone } from '../../components/fun/data/emojis.std.js'; +} from '../selectors/stickers.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { EmojiSkinTone } from '../../components/fun/data/emojis.std.ts'; import { getEmojiParentKeyByEnglishShortName, isEmojiEnglishShortName, -} from '../../components/fun/data/emojis.std.js'; +} from '../../components/fun/data/emojis.std.ts'; import { getEmojiSkinToneDefault, getShowStickerPickerHint, -} from '../selectors/items.dom.js'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { useGifsActions } from '../ducks/gifs.preload.js'; +} from '../selectors/items.dom.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { useGifsActions } from '../ducks/gifs.preload.ts'; import { fetchGiphySearch, fetchGiphyTrending, fetchGiphyFile, -} from '../../components/fun/data/giphy.preload.js'; -import { usePreferredReactionsActions } from '../ducks/preferredReactions.preload.js'; -import { useEmojisActions } from '../ducks/emojis.preload.js'; -import { useStickersActions } from '../ducks/stickers.preload.js'; -import type { FunStickerSelection } from '../../components/fun/panels/FunPanelStickers.dom.js'; -import type { FunEmojiSelection } from '../../components/fun/panels/FunPanelEmojis.dom.js'; -import { getRecentGifs } from '../selectors/gifs.std.js'; +} from '../../components/fun/data/giphy.preload.ts'; +import { usePreferredReactionsActions } from '../ducks/preferredReactions.preload.ts'; +import { useEmojisActions } from '../ducks/emojis.preload.ts'; +import { useStickersActions } from '../ducks/stickers.preload.ts'; +import type { FunStickerSelection } from '../../components/fun/panels/FunPanelStickers.dom.tsx'; +import type { FunEmojiSelection } from '../../components/fun/panels/FunPanelEmojis.dom.tsx'; +import { getRecentGifs } from '../selectors/gifs.std.ts'; export type SmartFunProviderProps = Readonly<{ children: ReactNode; diff --git a/ts/state/smart/GV1Members.preload.tsx b/ts/state/smart/GV1Members.preload.tsx index 02211a1eb4..eea5785966 100644 --- a/ts/state/smart/GV1Members.preload.tsx +++ b/ts/state/smart/GV1Members.preload.tsx @@ -5,17 +5,17 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; import { noop } from 'lodash'; -import { ConversationDetailsMembershipList } from '../../components/conversation/conversation-details/ConversationDetailsMembershipList.dom.js'; -import { assertDev } from '../../util/assert.std.js'; -import { getGroupMemberships } from '../../util/getGroupMemberships.dom.js'; +import { ConversationDetailsMembershipList } from '../../components/conversation/conversation-details/ConversationDetailsMembershipList.dom.tsx'; +import { assertDev } from '../../util/assert.std.ts'; +import { getGroupMemberships } from '../../util/getGroupMemberships.dom.ts'; import { getCachedConversationMemberColorsSelector, getConversationByIdSelector, getConversationByServiceIdSelector, -} from '../selectors/conversations.dom.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; export type PropsType = { conversationId: string; diff --git a/ts/state/smart/GlobalModalContainer.preload.tsx b/ts/state/smart/GlobalModalContainer.preload.tsx index 514dd85f71..14de5e0df4 100644 --- a/ts/state/smart/GlobalModalContainer.preload.tsx +++ b/ts/state/smart/GlobalModalContainer.preload.tsx @@ -3,47 +3,47 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import type { ButtonVariant } from '../../components/Button.dom.js'; -import { ErrorModal } from '../../components/ErrorModal.dom.js'; -import { GlobalModalContainer } from '../../components/GlobalModalContainer.dom.js'; -import { SmartAboutContactModal } from './AboutContactModal.preload.js'; -import { SmartAddUserToAnotherGroupModal } from './AddUserToAnotherGroupModal.preload.js'; -import { SmartContactModal } from './ContactModal.preload.js'; -import { SmartEditHistoryMessagesModal } from './EditHistoryMessagesModal.preload.js'; -import { SmartForwardMessagesModal } from './ForwardMessagesModal.preload.js'; -import { SmartUsernameOnboardingModal } from './UsernameOnboardingModal.preload.js'; -import { SmartSafetyNumberModal } from './SafetyNumberModal.preload.js'; -import { SmartSendAnywayDialog } from './SendAnywayDialog.preload.js'; -import { SmartShortcutGuideModal } from './ShortcutGuideModal.preload.js'; -import { SmartStickerPreviewModal } from './StickerPreviewModal.preload.js'; -import { SmartStoriesSettingsModal } from './StoriesSettingsModal.preload.js'; -import { getConversationsStoppingSend } from '../selectors/conversations.dom.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { SmartDeleteMessagesModal } from './DeleteMessagesModal.preload.js'; -import { SmartDiscardDraftDialog } from './DiscardDraftDialog.preload.js'; -import { SmartMessageRequestActionsConfirmation } from './MessageRequestActionsConfirmation.preload.js'; -import { getGlobalModalsState } from '../selectors/globalModals.std.js'; -import { SmartEditNicknameAndNoteModal } from './EditNicknameAndNoteModal.preload.js'; -import { SmartNotePreviewModal } from './NotePreviewModal.preload.js'; -import { SmartCallLinkEditModal } from './CallLinkEditModal.preload.js'; -import { SmartCallQualitySurveyDialog } from './CallQualitySurveyDialog.preload.js'; -import { SmartCallLinkAddNameModal } from './CallLinkAddNameModal.preload.js'; -import { SmartConfirmLeaveCallModal } from './ConfirmLeaveCallModal.preload.js'; -import { SmartCallLinkPendingParticipantModal } from './CallLinkPendingParticipantModal.preload.js'; -import { SmartProfileNameWarningModal } from './ProfileNameWarningModal.preload.js'; -import { SmartDraftGifMessageSendModal } from './DraftGifMessageSendModal.preload.js'; -import { SmartKeyTransparencyErrorDialog } from './KeyTransparencyErrorDialog.preload.js'; -import { DebugLogErrorModal } from '../../components/DebugLogErrorModal.dom.js'; -import { SmartPlaintextExportWorkflow } from './PlaintextExportWorkflow.preload.js'; -import { SmartLocalBackupExportWorkflow } from './LocalBackupExportWorkflow.preload.js'; +import type { ButtonVariant } from '../../components/Button.dom.tsx'; +import { ErrorModal } from '../../components/ErrorModal.dom.tsx'; +import { GlobalModalContainer } from '../../components/GlobalModalContainer.dom.tsx'; +import { SmartAboutContactModal } from './AboutContactModal.preload.tsx'; +import { SmartAddUserToAnotherGroupModal } from './AddUserToAnotherGroupModal.preload.tsx'; +import { SmartContactModal } from './ContactModal.preload.tsx'; +import { SmartEditHistoryMessagesModal } from './EditHistoryMessagesModal.preload.tsx'; +import { SmartForwardMessagesModal } from './ForwardMessagesModal.preload.tsx'; +import { SmartUsernameOnboardingModal } from './UsernameOnboardingModal.preload.tsx'; +import { SmartSafetyNumberModal } from './SafetyNumberModal.preload.tsx'; +import { SmartSendAnywayDialog } from './SendAnywayDialog.preload.tsx'; +import { SmartShortcutGuideModal } from './ShortcutGuideModal.preload.tsx'; +import { SmartStickerPreviewModal } from './StickerPreviewModal.preload.tsx'; +import { SmartStoriesSettingsModal } from './StoriesSettingsModal.preload.tsx'; +import { getConversationsStoppingSend } from '../selectors/conversations.dom.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { SmartDeleteMessagesModal } from './DeleteMessagesModal.preload.tsx'; +import { SmartDiscardDraftDialog } from './DiscardDraftDialog.preload.tsx'; +import { SmartMessageRequestActionsConfirmation } from './MessageRequestActionsConfirmation.preload.tsx'; +import { getGlobalModalsState } from '../selectors/globalModals.std.ts'; +import { SmartEditNicknameAndNoteModal } from './EditNicknameAndNoteModal.preload.tsx'; +import { SmartNotePreviewModal } from './NotePreviewModal.preload.tsx'; +import { SmartCallLinkEditModal } from './CallLinkEditModal.preload.tsx'; +import { SmartCallQualitySurveyDialog } from './CallQualitySurveyDialog.preload.tsx'; +import { SmartCallLinkAddNameModal } from './CallLinkAddNameModal.preload.tsx'; +import { SmartConfirmLeaveCallModal } from './ConfirmLeaveCallModal.preload.tsx'; +import { SmartCallLinkPendingParticipantModal } from './CallLinkPendingParticipantModal.preload.tsx'; +import { SmartProfileNameWarningModal } from './ProfileNameWarningModal.preload.tsx'; +import { SmartDraftGifMessageSendModal } from './DraftGifMessageSendModal.preload.tsx'; +import { SmartKeyTransparencyErrorDialog } from './KeyTransparencyErrorDialog.preload.tsx'; +import { DebugLogErrorModal } from '../../components/DebugLogErrorModal.dom.tsx'; +import { SmartPlaintextExportWorkflow } from './PlaintextExportWorkflow.preload.tsx'; +import { SmartLocalBackupExportWorkflow } from './LocalBackupExportWorkflow.preload.tsx'; import { shouldShowPlaintextWorkflow, shouldShowLocalBackupWorkflow, -} from '../selectors/backups.std.js'; -import { SmartPinMessageDialog } from './PinMessageDialog.preload.js'; -import { SmartGroupMemberLabelInfoModal } from './GroupMemberLabelInfoModal.preload.js'; -import { SmartTerminateGroupFailedModal } from './TerminateGroupFailedModal.preload.js'; +} from '../selectors/backups.std.ts'; +import { SmartPinMessageDialog } from './PinMessageDialog.preload.tsx'; +import { SmartGroupMemberLabelInfoModal } from './GroupMemberLabelInfoModal.preload.tsx'; +import { SmartTerminateGroupFailedModal } from './TerminateGroupFailedModal.preload.tsx'; function renderCallLinkAddNameModal(): React.JSX.Element { return ; diff --git a/ts/state/smart/GroupLinkManagement.preload.tsx b/ts/state/smart/GroupLinkManagement.preload.tsx index 09126a48b3..b2fe2f6ef2 100644 --- a/ts/state/smart/GroupLinkManagement.preload.tsx +++ b/ts/state/smart/GroupLinkManagement.preload.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { GroupLinkManagement } from '../../components/conversation/conversation-details/GroupLinkManagement.dom.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +import { GroupLinkManagement } from '../../components/conversation/conversation-details/GroupLinkManagement.dom.tsx'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; export type SmartGroupLinkManagementProps = Readonly<{ conversationId: string; diff --git a/ts/state/smart/GroupMemberLabelEditor.preload.tsx b/ts/state/smart/GroupMemberLabelEditor.preload.tsx index ccdcd39083..1bf8d7d3cd 100644 --- a/ts/state/smart/GroupMemberLabelEditor.preload.tsx +++ b/ts/state/smart/GroupMemberLabelEditor.preload.tsx @@ -4,18 +4,18 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { GroupMemberLabelEditor } from '../../components/conversation/conversation-details/GroupMemberLabelEditor.dom.js'; +import { GroupMemberLabelEditor } from '../../components/conversation/conversation-details/GroupMemberLabelEditor.dom.tsx'; import { getCachedConversationMemberColorsSelector, getConversationSelector, -} from '../selectors/conversations.dom.js'; -import { getIntl, getTheme, getUser } from '../selectors/user.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { isNotNil } from '../../util/isNotNil.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { getCanAddLabel } from '../../types/GroupMemberLabels.std.js'; +} from '../selectors/conversations.dom.ts'; +import { getIntl, getTheme, getUser } from '../selectors/user.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { isNotNil } from '../../util/isNotNil.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { getCanAddLabel } from '../../types/GroupMemberLabels.std.ts'; const log = createLogger('SmartGroupMemberLabelEditor'); diff --git a/ts/state/smart/GroupMemberLabelInfoModal.preload.tsx b/ts/state/smart/GroupMemberLabelInfoModal.preload.tsx index 9f0c4c6393..24b1adbd8f 100644 --- a/ts/state/smart/GroupMemberLabelInfoModal.preload.tsx +++ b/ts/state/smart/GroupMemberLabelInfoModal.preload.tsx @@ -3,19 +3,19 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { GroupMemberLabelInfoModal } from '../../components/GroupMemberLabelInfoModal.dom.js'; -import { getIntl, getUser, getVersion } from '../selectors/user.std.js'; -import { getGroupMemberLabelInfoModalState } from '../selectors/globalModals.std.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { getItems } from '../selectors/items.dom.js'; -import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.js'; -import { getCanAddLabel } from '../../types/GroupMemberLabels.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { NavTab } from '../../types/Nav.std.js'; -import { PanelType } from '../../types/Panels.std.js'; -import { getSelectedLocation } from '../selectors/nav.std.js'; -import { getLeafPanelOnly } from '../../components/conversation/conversation-details/GroupMemberLabelEditor.dom.js'; +import { GroupMemberLabelInfoModal } from '../../components/GroupMemberLabelInfoModal.dom.tsx'; +import { getIntl, getUser, getVersion } from '../selectors/user.std.ts'; +import { getGroupMemberLabelInfoModalState } from '../selectors/globalModals.std.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { getItems } from '../selectors/items.dom.ts'; +import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.ts'; +import { getCanAddLabel } from '../../types/GroupMemberLabels.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { NavTab } from '../../types/Nav.std.ts'; +import { PanelType } from '../../types/Panels.std.ts'; +import { getSelectedLocation } from '../selectors/nav.std.ts'; +import { getLeafPanelOnly } from '../../components/conversation/conversation-details/GroupMemberLabelEditor.dom.tsx'; export const SmartGroupMemberLabelInfoModal = memo( function SmartGroupMemberLabelInfoModal() { diff --git a/ts/state/smart/GroupV1MigrationDialog.preload.tsx b/ts/state/smart/GroupV1MigrationDialog.preload.tsx index 02eee3246d..92af637d1f 100644 --- a/ts/state/smart/GroupV1MigrationDialog.preload.tsx +++ b/ts/state/smart/GroupV1MigrationDialog.preload.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import type { DataPropsType as GroupV1MigrationDialogPropsType } from '../../components/GroupV1MigrationDialog.dom.js'; -import { GroupV1MigrationDialog } from '../../components/GroupV1MigrationDialog.dom.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +import type { DataPropsType as GroupV1MigrationDialogPropsType } from '../../components/GroupV1MigrationDialog.dom.tsx'; +import { GroupV1MigrationDialog } from '../../components/GroupV1MigrationDialog.dom.tsx'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; const log = createLogger('GroupV1MigrationDialog'); diff --git a/ts/state/smart/GroupV2JoinDialog.dom.tsx b/ts/state/smart/GroupV2JoinDialog.dom.tsx index 6224c757f6..435356c1fb 100644 --- a/ts/state/smart/GroupV2JoinDialog.dom.tsx +++ b/ts/state/smart/GroupV2JoinDialog.dom.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import type { PropsType as GroupV2JoinDialogPropsType } from '../../components/GroupV2JoinDialog.dom.js'; -import { GroupV2JoinDialog } from '../../components/GroupV2JoinDialog.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { getPreJoinConversation } from '../selectors/conversations.dom.js'; +import type { PropsType as GroupV2JoinDialogPropsType } from '../../components/GroupV2JoinDialog.dom.tsx'; +import { GroupV2JoinDialog } from '../../components/GroupV2JoinDialog.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { getPreJoinConversation } from '../selectors/conversations.dom.ts'; export type SmartGroupV2JoinDialogProps = Pick< GroupV2JoinDialogPropsType, diff --git a/ts/state/smart/GroupV2Permissions.preload.tsx b/ts/state/smart/GroupV2Permissions.preload.tsx index 0c2355bb7f..487203354f 100644 --- a/ts/state/smart/GroupV2Permissions.preload.tsx +++ b/ts/state/smart/GroupV2Permissions.preload.tsx @@ -3,10 +3,10 @@ import { useSelector } from 'react-redux'; import React, { memo } from 'react'; -import { GroupV2Permissions } from '../../components/conversation/conversation-details/GroupV2Permissions.dom.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +import { GroupV2Permissions } from '../../components/conversation/conversation-details/GroupV2Permissions.dom.tsx'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; export type SmartGroupV2PermissionsProps = { conversationId: string; diff --git a/ts/state/smart/HeroRow.preload.tsx b/ts/state/smart/HeroRow.preload.tsx index 890de6cc64..09cde23fb0 100644 --- a/ts/state/smart/HeroRow.preload.tsx +++ b/ts/state/smart/HeroRow.preload.tsx @@ -2,27 +2,27 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { PanelType } from '../../types/Panels.std.js'; -import { ConversationHero } from '../../components/conversation/ConversationHero.dom.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { getHasStoriesSelector } from '../selectors/stories2.dom.js'; -import { isSignalConversation } from '../../util/isSignalConversation.dom.js'; +import { PanelType } from '../../types/Panels.std.ts'; +import { ConversationHero } from '../../components/conversation/ConversationHero.dom.tsx'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { getHasStoriesSelector } from '../selectors/stories2.dom.ts'; +import { isSignalConversation } from '../../util/isSignalConversation.dom.ts'; import { getConversationByServiceIdSelector, getConversationSelector, getPendingAvatarDownloadSelector, -} from '../selectors/conversations.dom.js'; -import { useSharedGroupNamesOnMount } from '../../util/sharedGroupNames.dom.js'; +} from '../selectors/conversations.dom.ts'; +import { useSharedGroupNamesOnMount } from '../../util/sharedGroupNames.dom.ts'; import { type ConversationType, useConversationsActions, -} from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.js'; -import { getGroupMemberships } from '../../util/getGroupMemberships.dom.js'; -import { useNavActions } from '../ducks/nav.std.js'; +} from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.ts'; +import { getGroupMemberships } from '../../util/getGroupMemberships.dom.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; type SmartHeroRowProps = Readonly<{ id: string; diff --git a/ts/state/smart/Inbox.preload.tsx b/ts/state/smart/Inbox.preload.tsx index cd939979ae..64972b7f4d 100644 --- a/ts/state/smart/Inbox.preload.tsx +++ b/ts/state/smart/Inbox.preload.tsx @@ -3,24 +3,24 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { Inbox } from '../../components/Inbox.dom.js'; -import { isNightly } from '../../util/version.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import { SmartCustomizingPreferredReactionsModal } from './CustomizingPreferredReactionsModal.preload.js'; -import { getIsCustomizingPreferredReactions } from '../selectors/preferredReactions.std.js'; -import type { SmartNavTabsProps } from './NavTabs.preload.js'; -import { SmartNavTabs } from './NavTabs.preload.js'; -import { SmartStoriesTab } from './StoriesTab.preload.js'; -import { SmartCallsTab } from './CallsTab.preload.js'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { getNavTabsCollapsed } from '../selectors/items.dom.js'; -import { SmartChatsTab } from './ChatsTab.preload.js'; -import { getHasInitialLoadCompleted } from '../selectors/app.std.js'; +import { Inbox } from '../../components/Inbox.dom.tsx'; +import { isNightly } from '../../util/version.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { SmartCustomizingPreferredReactionsModal } from './CustomizingPreferredReactionsModal.preload.tsx'; +import { getIsCustomizingPreferredReactions } from '../selectors/preferredReactions.std.ts'; +import type { SmartNavTabsProps } from './NavTabs.preload.tsx'; +import { SmartNavTabs } from './NavTabs.preload.tsx'; +import { SmartStoriesTab } from './StoriesTab.preload.tsx'; +import { SmartCallsTab } from './CallsTab.preload.tsx'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { getNavTabsCollapsed } from '../selectors/items.dom.ts'; +import { SmartChatsTab } from './ChatsTab.preload.tsx'; +import { getHasInitialLoadCompleted } from '../selectors/app.std.ts'; import { getInboxEnvelopeTimestamp, getInboxFirstEnvelopeTimestamp, -} from '../selectors/inbox.std.js'; -import { SmartPreferences } from './Preferences.preload.js'; +} from '../selectors/inbox.std.ts'; +import { SmartPreferences } from './Preferences.preload.tsx'; function renderChatsTab() { return ; diff --git a/ts/state/smart/InstallScreen.preload.tsx b/ts/state/smart/InstallScreen.preload.tsx index 60dc270d49..9f0365828e 100644 --- a/ts/state/smart/InstallScreen.preload.tsx +++ b/ts/state/smart/InstallScreen.preload.tsx @@ -5,22 +5,22 @@ import type { ComponentProps } from 'react'; import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl } from '../selectors/user.std.js'; -import { getUpdatesState } from '../selectors/updates.std.js'; -import { getInstallerState } from '../selectors/installer.std.js'; -import { useInstallerActions } from '../ducks/installer.preload.js'; -import { useUpdatesActions } from '../ducks/updates.preload.js'; -import { hasExpired as hasExpiredSelector } from '../selectors/expiration.dom.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { backupsService } from '../../services/backups/index.preload.js'; -import { InstallScreen } from '../../components/InstallScreen.dom.js'; -import { WidthBreakpoint } from '../../components/_util.std.js'; -import { InstallScreenStep } from '../../types/InstallScreen.std.js'; -import OS from '../../util/os/osMain.node.js'; -import { isStagingServer } from '../../util/isStagingServer.dom.js'; -import { createLogger } from '../../logging/log.std.js'; -import { SmartToastManager } from './ToastManager.preload.js'; -import { shouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.js'; +import { getIntl } from '../selectors/user.std.ts'; +import { getUpdatesState } from '../selectors/updates.std.ts'; +import { getInstallerState } from '../selectors/installer.std.ts'; +import { useInstallerActions } from '../ducks/installer.preload.ts'; +import { useUpdatesActions } from '../ducks/updates.preload.ts'; +import { hasExpired as hasExpiredSelector } from '../selectors/expiration.dom.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { backupsService } from '../../services/backups/index.preload.ts'; +import { InstallScreen } from '../../components/InstallScreen.dom.tsx'; +import { WidthBreakpoint } from '../../components/_util.std.ts'; +import { InstallScreenStep } from '../../types/InstallScreen.std.ts'; +import OS from '../../util/os/osMain.node.ts'; +import { isStagingServer } from '../../util/isStagingServer.dom.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { SmartToastManager } from './ToastManager.preload.tsx'; +import { shouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.ts'; const log = createLogger('InstallScreen'); diff --git a/ts/state/smart/KeyTransparencyErrorDialog.preload.tsx b/ts/state/smart/KeyTransparencyErrorDialog.preload.tsx index e42dd7ff32..d8452affb4 100644 --- a/ts/state/smart/KeyTransparencyErrorDialog.preload.tsx +++ b/ts/state/smart/KeyTransparencyErrorDialog.preload.tsx @@ -5,12 +5,12 @@ import React, { memo, useCallback, useState, useEffect } from 'react'; import { useSelector } from 'react-redux'; import { ipcRenderer } from 'electron'; import lodash from 'lodash'; -import { KeyTransparencyErrorDialog } from '../../components/KeyTransparencyErrorDialog.dom.js'; -import { createSupportUrl } from '../../util/createSupportUrl.std.js'; -import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.js'; -import { drop } from '../../util/drop.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { getIntl } from '../selectors/user.std.js'; +import { KeyTransparencyErrorDialog } from '../../components/KeyTransparencyErrorDialog.dom.tsx'; +import { createSupportUrl } from '../../util/createSupportUrl.std.ts'; +import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser.dom.ts'; +import { drop } from '../../util/drop.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { getIntl } from '../selectors/user.std.ts'; const { noop } = lodash; diff --git a/ts/state/smart/LeftPane.preload.tsx b/ts/state/smart/LeftPane.preload.tsx index 66d2f8ecf1..0f68ef165e 100644 --- a/ts/state/smart/LeftPane.preload.tsx +++ b/ts/state/smart/LeftPane.preload.tsx @@ -4,38 +4,38 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; import { createSelector } from 'reselect'; -import type { PropsType as DialogExpiredBuildPropsType } from '../../components/DialogExpiredBuild.dom.js'; -import { DialogExpiredBuild } from '../../components/DialogExpiredBuild.dom.js'; -import type { PropsType as LeftPanePropsType } from '../../components/LeftPane.dom.js'; -import { LeftPane } from '../../components/LeftPane.dom.js'; -import type { NavTabPanelProps } from '../../components/NavTabs.dom.js'; -import type { WidthBreakpoint } from '../../components/_util.std.js'; +import type { PropsType as DialogExpiredBuildPropsType } from '../../components/DialogExpiredBuild.dom.tsx'; +import { DialogExpiredBuild } from '../../components/DialogExpiredBuild.dom.tsx'; +import type { PropsType as LeftPanePropsType } from '../../components/LeftPane.dom.tsx'; +import { LeftPane } from '../../components/LeftPane.dom.tsx'; +import type { NavTabPanelProps } from '../../components/NavTabs.dom.tsx'; +import type { WidthBreakpoint } from '../../components/_util.std.ts'; import { getGroupSizeHardLimit, getGroupSizeRecommendedLimit, -} from '../../groups/limits.dom.js'; -import { LeftPaneMode } from '../../types/leftPane.std.js'; -import { getUsernameFromSearch } from '../../util/Username.dom.js'; -import { getCountryDataForLocale } from '../../util/getCountryData.dom.js'; -import { lookupConversationWithoutServiceId } from '../../util/lookupConversationWithoutServiceId.preload.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { isDone as isRegistrationDone } from '../../util/registration.preload.js'; -import { drop } from '../../util/drop.std.js'; -import type { ServerAlertsType } from '../../types/ServerAlert.std.js'; -import { getServerAlertToShow } from '../../util/handleServerAlerts.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +} from '../../groups/limits.dom.ts'; +import { LeftPaneMode } from '../../types/leftPane.std.ts'; +import { getUsernameFromSearch } from '../../util/Username.dom.ts'; +import { getCountryDataForLocale } from '../../util/getCountryData.dom.ts'; +import { lookupConversationWithoutServiceId } from '../../util/lookupConversationWithoutServiceId.preload.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { isDone as isRegistrationDone } from '../../util/registration.preload.ts'; +import { drop } from '../../util/drop.std.ts'; +import type { ServerAlertsType } from '../../types/ServerAlert.std.ts'; +import { getServerAlertToShow } from '../../util/handleServerAlerts.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; import { ComposerStep, OneTimeModalState, -} from '../ducks/conversationsEnums.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { useNetworkActions } from '../ducks/network.dom.js'; -import { useSearchActions } from '../ducks/search.preload.js'; -import { useUsernameActions } from '../ducks/username.preload.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +} from '../ducks/conversationsEnums.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { useNetworkActions } from '../ducks/network.dom.ts'; +import { useSearchActions } from '../ducks/search.preload.ts'; +import { useUsernameActions } from '../ducks/username.preload.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; import { getComposeAvatarData, getComposeGroupAvatar, @@ -58,13 +58,13 @@ import { hasGroupCreationError, isCreatingGroup, isEditingAvatar, -} from '../selectors/conversations.dom.js'; +} from '../selectors/conversations.dom.ts'; import { getSelectedConversationId, getSelectedLocation, -} from '../selectors/nav.std.js'; -import { getCrashReportCount } from '../selectors/crashReports.std.js'; -import { hasExpired } from '../selectors/expiration.dom.js'; +} from '../selectors/nav.std.ts'; +import { getCrashReportCount } from '../selectors/crashReports.std.ts'; +import { hasExpired } from '../selectors/expiration.dom.ts'; import { getBackupMediaDownloadProgress, getNavTabsCollapsed, @@ -72,12 +72,12 @@ import { getServerAlerts, getUsernameCorrupted, getUsernameLinkCorrupted, -} from '../selectors/items.dom.js'; +} from '../selectors/items.dom.ts'; import { getChallengeStatus, hasNetworkDialog as getHasNetworkDialog, getNetworkIsOnline, -} from '../selectors/network.preload.js'; +} from '../selectors/network.preload.ts'; import { getFilterByUnread, getHasSearchQuery, @@ -88,49 +88,49 @@ import { getSearchConversation, getSearchResults, getStartSearchCounter, -} from '../selectors/search.preload.js'; +} from '../selectors/search.preload.ts'; import { isUpdateDownloaded as getIsUpdateDownloaded, isOSUnsupported, isUpdateDialogVisible, -} from '../selectors/updates.std.js'; +} from '../selectors/updates.std.ts'; import { getIntl, getIsMacOS, getRegionCode, getTheme, -} from '../selectors/user.std.js'; -import { SmartCaptchaDialog } from './CaptchaDialog.preload.js'; -import { SmartCrashReportDialog } from './CrashReportDialog.preload.js'; -import { SmartMessageSearchResult } from './MessageSearchResult.preload.js'; -import { SmartNetworkStatus } from './NetworkStatus.preload.js'; -import { SmartRelinkDialog } from './RelinkDialog.dom.js'; +} from '../selectors/user.std.ts'; +import { SmartCaptchaDialog } from './CaptchaDialog.preload.tsx'; +import { SmartCrashReportDialog } from './CrashReportDialog.preload.tsx'; +import { SmartMessageSearchResult } from './MessageSearchResult.preload.tsx'; +import { SmartNetworkStatus } from './NetworkStatus.preload.tsx'; +import { SmartRelinkDialog } from './RelinkDialog.dom.tsx'; import { renderToastManagerWithoutMegaphone, SmartToastManager, -} from './ToastManager.preload.js'; -import type { SmartPropsType as SmartToastManagerPropsType } from './ToastManager.preload.js'; -import type { PropsType as SmartUnsupportedOSDialogPropsType } from './UnsupportedOSDialog.preload.js'; -import { SmartUnsupportedOSDialog } from './UnsupportedOSDialog.preload.js'; -import { SmartUpdateDialog } from './UpdateDialog.preload.js'; +} from './ToastManager.preload.tsx'; +import type { SmartPropsType as SmartToastManagerPropsType } from './ToastManager.preload.tsx'; +import type { PropsType as SmartUnsupportedOSDialogPropsType } from './UnsupportedOSDialog.preload.tsx'; +import { SmartUnsupportedOSDialog } from './UnsupportedOSDialog.preload.tsx'; +import { SmartUpdateDialog } from './UpdateDialog.preload.tsx'; import { cancelBackupMediaDownload, dismissBackupMediaDownloadBanner, pauseBackupMediaDownload, resumeBackupMediaDownload, -} from '../../util/backupMediaDownload.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { SmartLeftPaneChatFolders } from './LeftPaneChatFolders.preload.js'; -import { SmartLeftPaneConversationListItemContextMenu } from './LeftPaneConversationListItemContextMenu.preload.js'; -import type { RenderConversationListItemContextMenuProps } from '../../components/conversationList/BaseConversationListItem.dom.js'; +} from '../../util/backupMediaDownload.preload.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { SmartLeftPaneChatFolders } from './LeftPaneChatFolders.preload.tsx'; +import { SmartLeftPaneConversationListItemContextMenu } from './LeftPaneConversationListItemContextMenu.preload.tsx'; +import type { RenderConversationListItemContextMenuProps } from '../../components/conversationList/BaseConversationListItem.dom.tsx'; import { getHasAnyCurrentCustomChatFolders, getSelectedChatFolder, -} from '../selectors/chatFolders.std.js'; -import { NavTab, SettingsPage } from '../../types/Nav.std.js'; -import { SmartNotificationProfilesMenu } from './NotificationProfilesMenu.preload.js'; -import { getActiveProfile } from '../selectors/notificationProfiles.dom.js'; -import type { StateSelector } from '../types.std.js'; +} from '../selectors/chatFolders.std.ts'; +import { NavTab, SettingsPage } from '../../types/Nav.std.ts'; +import { SmartNotificationProfilesMenu } from './NotificationProfilesMenu.preload.tsx'; +import { getActiveProfile } from '../selectors/notificationProfiles.dom.ts'; +import type { StateSelector } from '../types.std.ts'; function renderMessageSearchResult(id: string): React.JSX.Element { return ; diff --git a/ts/state/smart/LeftPaneChatFolders.preload.tsx b/ts/state/smart/LeftPaneChatFolders.preload.tsx index f22343d0e1..68c2f48b3c 100644 --- a/ts/state/smart/LeftPaneChatFolders.preload.tsx +++ b/ts/state/smart/LeftPaneChatFolders.preload.tsx @@ -2,23 +2,23 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback, useContext } from 'react'; import { useSelector } from 'react-redux'; -import { LeftPaneChatFolders } from '../../components/leftPane/LeftPaneChatFolders.dom.js'; +import { LeftPaneChatFolders } from '../../components/leftPane/LeftPaneChatFolders.dom.tsx'; import { getCurrentChatFolders, getSelectedChatFolder, -} from '../selectors/chatFolders.std.js'; -import { getIntl } from '../selectors/user.std.js'; +} from '../selectors/chatFolders.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; import { getAllChatFoldersMutedStats, getAllChatFoldersUnreadStats, -} from '../selectors/conversations.dom.js'; -import { useChatFolderActions } from '../ducks/chatFolders.preload.js'; -import { NavSidebarWidthBreakpointContext } from '../../components/NavSidebar.dom.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { NavTab, SettingsPage } from '../../types/Nav.std.js'; -import type { ChatFolderId } from '../../types/ChatFolder.std.js'; -import { getSelectedLocation } from '../selectors/nav.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { useChatFolderActions } from '../ducks/chatFolders.preload.ts'; +import { NavSidebarWidthBreakpointContext } from '../../components/NavSidebar.dom.tsx'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { NavTab, SettingsPage } from '../../types/Nav.std.ts'; +import type { ChatFolderId } from '../../types/ChatFolder.std.ts'; +import { getSelectedLocation } from '../selectors/nav.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; export const SmartLeftPaneChatFolders = memo( function SmartLeftPaneChatFolders() { diff --git a/ts/state/smart/LeftPaneConversationListItemContextMenu.preload.tsx b/ts/state/smart/LeftPaneConversationListItemContextMenu.preload.tsx index 6b4496e84b..2ad3d6b61c 100644 --- a/ts/state/smart/LeftPaneConversationListItemContextMenu.preload.tsx +++ b/ts/state/smart/LeftPaneConversationListItemContextMenu.preload.tsx @@ -4,23 +4,23 @@ import type { FC } from 'react'; import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl } from '../selectors/user.std.js'; -import { getConversationByIdSelector } from '../selectors/conversations.dom.js'; -import type { ChatFolderToggleChat } from '../../components/leftPane/LeftPaneConversationListItemContextMenu.dom.js'; -import { LeftPaneConversationListItemContextMenu } from '../../components/leftPane/LeftPaneConversationListItemContextMenu.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { RenderConversationListItemContextMenuProps } from '../../components/conversationList/BaseConversationListItem.dom.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +import { getIntl } from '../selectors/user.std.ts'; +import { getConversationByIdSelector } from '../selectors/conversations.dom.ts'; +import type { ChatFolderToggleChat } from '../../components/leftPane/LeftPaneConversationListItemContextMenu.dom.tsx'; +import { LeftPaneConversationListItemContextMenu } from '../../components/leftPane/LeftPaneConversationListItemContextMenu.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { RenderConversationListItemContextMenuProps } from '../../components/conversationList/BaseConversationListItem.dom.tsx'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; import { getCurrentChatFolders, getSelectedChatFolder, -} from '../selectors/chatFolders.std.js'; -import { useChatFolderActions } from '../ducks/chatFolders.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { NavTab, SettingsPage } from '../../types/Nav.std.js'; -import type { ChatFolderParams } from '../../types/ChatFolder.std.js'; -import { getSelectedLocation } from '../selectors/nav.std.js'; -import { getIsActivelySearching } from '../selectors/search.preload.js'; +} from '../selectors/chatFolders.std.ts'; +import { useChatFolderActions } from '../ducks/chatFolders.preload.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { NavTab, SettingsPage } from '../../types/Nav.std.ts'; +import type { ChatFolderParams } from '../../types/ChatFolder.std.ts'; +import { getSelectedLocation } from '../selectors/nav.std.ts'; +import { getIsActivelySearching } from '../selectors/search.preload.ts'; export const SmartLeftPaneConversationListItemContextMenu: FC = memo(function SmartLeftPaneConversationListItemContextMenu(props) { diff --git a/ts/state/smart/Lightbox.preload.tsx b/ts/state/smart/Lightbox.preload.tsx index 2fc46677af..821f4282ec 100644 --- a/ts/state/smart/Lightbox.preload.tsx +++ b/ts/state/smart/Lightbox.preload.tsx @@ -3,13 +3,13 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { Lightbox } from '../../components/Lightbox.dom.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useLightboxActions } from '../ducks/lightbox.preload.js'; -import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.js'; +import { Lightbox } from '../../components/Lightbox.dom.tsx'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useLightboxActions } from '../ducks/lightbox.preload.ts'; +import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.ts'; import { getIsViewOnce, getMedia, @@ -18,7 +18,7 @@ import { getPlaybackDisabled, getSelectedIndex, shouldShowLightbox, -} from '../selectors/lightbox.std.js'; +} from '../selectors/lightbox.std.ts'; export const SmartLightbox = memo(function SmartLightbox() { const i18n = useSelector(getIntl); diff --git a/ts/state/smart/LocalBackupExportWorkflow.preload.tsx b/ts/state/smart/LocalBackupExportWorkflow.preload.tsx index 5e73d09f5b..9723ca4fdc 100644 --- a/ts/state/smart/LocalBackupExportWorkflow.preload.tsx +++ b/ts/state/smart/LocalBackupExportWorkflow.preload.tsx @@ -4,16 +4,16 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { createLogger } from '../../logging/log.std.js'; -import { getIntl, getUser } from '../selectors/user.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { getIntl, getUser } from '../selectors/user.std.ts'; import { getBackups, getLocalBackupWorkflow, shouldShowLocalBackupWorkflow, -} from '../selectors/backups.std.js'; -import { useBackupActions } from '../ducks/backups.preload.js'; -import { LocalBackupExportWorkflow } from '../../components/LocalBackupExportWorkflow.dom.js'; -import { useToastActions } from '../ducks/toast.preload.js'; +} from '../selectors/backups.std.ts'; +import { useBackupActions } from '../ducks/backups.preload.ts'; +import { LocalBackupExportWorkflow } from '../../components/LocalBackupExportWorkflow.dom.tsx'; +import { useToastActions } from '../ducks/toast.preload.ts'; const log = createLogger('smart/LocalBackupExportWorkflow'); diff --git a/ts/state/smart/MediaContextMenu.preload.tsx b/ts/state/smart/MediaContextMenu.preload.tsx index 96ba34e528..2b66f0de90 100644 --- a/ts/state/smart/MediaContextMenu.preload.tsx +++ b/ts/state/smart/MediaContextMenu.preload.tsx @@ -2,35 +2,35 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback, type ReactNode } from 'react'; import { useSelector } from 'react-redux'; -import { MediaContextMenu } from '../../components/conversation/media-gallery/MediaContextMenu.dom.js'; -import { ForwardMessagesModalType } from '../../components/ForwardMessagesModal.dom.js'; +import { MediaContextMenu } from '../../components/conversation/media-gallery/MediaContextMenu.dom.tsx'; +import { ForwardMessagesModalType } from '../../components/ForwardMessagesModal.dom.tsx'; import type { GenericMediaItemType, MediaItemType, LinkPreviewMediaItemType, ContactMediaItemType, -} from '../../types/MediaItem.std.js'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { startConversation } from '../../util/startConversation.dom.js'; -import { drop } from '../../util/drop.std.js'; +} from '../../types/MediaItem.std.ts'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { startConversation } from '../../util/startConversation.dom.ts'; +import { drop } from '../../util/drop.std.ts'; import { applyDeleteMessage, applyDeleteAttachmentFromMessage, -} from '../../util/deleteForMe.preload.js'; +} from '../../util/deleteForMe.preload.ts'; import { getConversationIdentifier, getAddressableMessage, -} from '../../util/syncIdentifiers.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { singleProtoJobQueue } from '../../jobs/singleProtoJobQueue.preload.js'; -import { MessageSender } from '../../textsecure/SendMessage.preload.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useLookupContact } from './ContactDetail.preload.js'; +} from '../../util/syncIdentifiers.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { singleProtoJobQueue } from '../../jobs/singleProtoJobQueue.preload.ts'; +import { MessageSender } from '../../textsecure/SendMessage.preload.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useLookupContact } from './ContactDetail.preload.tsx'; const log = createLogger('MediaContextMenu'); diff --git a/ts/state/smart/MediaItem.preload.tsx b/ts/state/smart/MediaItem.preload.tsx index 1b5d99750b..6e5c3d54cf 100644 --- a/ts/state/smart/MediaItem.preload.tsx +++ b/ts/state/smart/MediaItem.preload.tsx @@ -2,26 +2,26 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback, type ReactNode } from 'react'; import { useSelector } from 'react-redux'; -import { LinkPreviewItem } from '../../components/conversation/media-gallery/LinkPreviewItem.dom.js'; -import { MediaGridItem } from '../../components/conversation/media-gallery/MediaGridItem.dom.js'; -import { DocumentListItem } from '../../components/conversation/media-gallery/DocumentListItem.dom.js'; -import { ContactListItem } from '../../components/conversation/media-gallery/ContactListItem.dom.js'; -import { AudioListItem } from '../../components/conversation/media-gallery/AudioListItem.dom.js'; -import type { ItemClickEvent } from '../../components/conversation/media-gallery/types/ItemClickEvent.std.js'; -import { getSafeDomain } from '../../types/LinkPreview.std.js'; -import type { GenericMediaItemType } from '../../types/MediaItem.std.js'; -import type { AttachmentStatusType } from '../../hooks/useAttachmentStatus.std.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { isVoiceMessagePlayed } from '../../util/isVoiceMessagePlayed.std.js'; +import { LinkPreviewItem } from '../../components/conversation/media-gallery/LinkPreviewItem.dom.tsx'; +import { MediaGridItem } from '../../components/conversation/media-gallery/MediaGridItem.dom.tsx'; +import { DocumentListItem } from '../../components/conversation/media-gallery/DocumentListItem.dom.tsx'; +import { ContactListItem } from '../../components/conversation/media-gallery/ContactListItem.dom.tsx'; +import { AudioListItem } from '../../components/conversation/media-gallery/AudioListItem.dom.tsx'; +import type { ItemClickEvent } from '../../components/conversation/media-gallery/types/ItemClickEvent.std.ts'; +import { getSafeDomain } from '../../types/LinkPreview.std.ts'; +import type { GenericMediaItemType } from '../../types/MediaItem.std.ts'; +import type { AttachmentStatusType } from '../../hooks/useAttachmentStatus.std.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { isVoiceMessagePlayed } from '../../util/isVoiceMessagePlayed.std.ts'; import { getIntl, getTheme, getUserConversationId, -} from '../selectors/user.std.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getMediaGalleryState } from '../selectors/mediaGallery.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { SmartMediaContextMenu } from './MediaContextMenu.preload.js'; +} from '../selectors/user.std.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getMediaGalleryState } from '../selectors/mediaGallery.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { SmartMediaContextMenu } from './MediaContextMenu.preload.tsx'; export type PropsType = Readonly<{ onItemClick: (event: ItemClickEvent) => unknown; diff --git a/ts/state/smart/MessageAudio.preload.tsx b/ts/state/smart/MessageAudio.preload.tsx index 3ebd13e80a..0c4b74e5c0 100644 --- a/ts/state/smart/MessageAudio.preload.tsx +++ b/ts/state/smart/MessageAudio.preload.tsx @@ -4,21 +4,21 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; import type { RenderingContextType } from '../../types/RenderingContext.d.ts'; -import { MessageAudio } from '../../components/conversation/MessageAudio.dom.js'; -import type { OwnProps as MessageAudioOwnProps } from '../../components/conversation/MessageAudio.dom.js'; -import type { ActiveAudioPlayerStateType } from '../ducks/audioPlayer.preload.js'; +import { MessageAudio } from '../../components/conversation/MessageAudio.dom.tsx'; +import type { OwnProps as MessageAudioOwnProps } from '../../components/conversation/MessageAudio.dom.tsx'; +import type { ActiveAudioPlayerStateType } from '../ducks/audioPlayer.preload.ts'; import { AudioPlayerContent, useAudioPlayerActions, -} from '../ducks/audioPlayer.preload.js'; +} from '../ducks/audioPlayer.preload.ts'; import { selectAudioPlayerActive, selectVoiceNoteAndConsecutive, -} from '../selectors/audioPlayer.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { getConversationByIdSelector } from '../selectors/conversations.dom.js'; -import { getSelectedConversationId } from '../selectors/nav.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; +} from '../selectors/audioPlayer.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { getConversationByIdSelector } from '../selectors/conversations.dom.ts'; +import { getSelectedConversationId } from '../selectors/nav.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; const log = createLogger('MessageAudio'); diff --git a/ts/state/smart/MessageDetail.preload.tsx b/ts/state/smart/MessageDetail.preload.tsx index 3b035d08fc..e898f631c2 100644 --- a/ts/state/smart/MessageDetail.preload.tsx +++ b/ts/state/smart/MessageDetail.preload.tsx @@ -4,31 +4,31 @@ import React, { memo, useEffect } from 'react'; import { useSelector } from 'react-redux'; -import type { Props as MessageDetailProps } from '../../components/conversation/MessageDetail.dom.js'; -import { MessageDetail } from '../../components/conversation/MessageDetail.dom.js'; -import { getContactNameColorSelector } from '../selectors/conversations.dom.js'; +import type { Props as MessageDetailProps } from '../../components/conversation/MessageDetail.dom.tsx'; +import { MessageDetail } from '../../components/conversation/MessageDetail.dom.tsx'; +import { getContactNameColorSelector } from '../selectors/conversations.dom.ts'; import { getIntl, getInteractionMode, getTheme, getPlatform, -} from '../selectors/user.std.js'; -import { getMessageDetailsSelector } from '../selectors/message.preload.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { renderAudioAttachment } from './renderAudioAttachment.preload.js'; -import { startConversation } from '../../util/startConversation.dom.js'; -import { useAccountsActions } from '../ducks/accounts.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useLightboxActions } from '../ducks/lightbox.preload.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { getPanelInformation } from '../selectors/nav.std.js'; -import { PanelType } from '../../types/Panels.std.js'; +} from '../selectors/user.std.ts'; +import { getMessageDetailsSelector } from '../selectors/message.preload.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { renderAudioAttachment } from './renderAudioAttachment.preload.tsx'; +import { startConversation } from '../../util/startConversation.dom.ts'; +import { useAccountsActions } from '../ducks/accounts.preload.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useLightboxActions } from '../ducks/lightbox.preload.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { getPanelInformation } from '../selectors/nav.std.ts'; +import { PanelType } from '../../types/Panels.std.ts'; -export type { Contact } from '../../components/conversation/MessageDetail.dom.js'; +export type { Contact } from '../../components/conversation/MessageDetail.dom.tsx'; export type OwnProps = Pick< MessageDetailProps, 'contacts' | 'errors' | 'message' | 'receivedAt' diff --git a/ts/state/smart/MessageRequestActionsConfirmation.preload.tsx b/ts/state/smart/MessageRequestActionsConfirmation.preload.tsx index 069f86e048..c5d7500607 100644 --- a/ts/state/smart/MessageRequestActionsConfirmation.preload.tsx +++ b/ts/state/smart/MessageRequestActionsConfirmation.preload.tsx @@ -3,18 +3,18 @@ import React, { memo, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl } from '../selectors/user.std.js'; -import { getGlobalModalsState } from '../selectors/globalModals.std.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +import { getIntl } from '../selectors/user.std.ts'; +import { getGlobalModalsState } from '../selectors/globalModals.std.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; import { MessageRequestActionsConfirmation, MessageRequestState, -} from '../../components/conversation/MessageRequestActionsConfirmation.dom.js'; -import { useContactNameData } from '../../components/conversation/ContactName.dom.js'; -import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +} from '../../components/conversation/MessageRequestActionsConfirmation.dom.tsx'; +import { useContactNameData } from '../../components/conversation/ContactName.dom.tsx'; +import { getAddedByForOurPendingInvitation } from '../../util/getAddedByForOurPendingInvitation.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; export const SmartMessageRequestActionsConfirmation = memo( function SmartMessageRequestActionsConfirmation() { diff --git a/ts/state/smart/MessageSearchResult.preload.tsx b/ts/state/smart/MessageSearchResult.preload.tsx index 968a5cea9c..e0ecf10c4b 100644 --- a/ts/state/smart/MessageSearchResult.preload.tsx +++ b/ts/state/smart/MessageSearchResult.preload.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { MessageSearchResult } from '../../components/conversationList/MessageSearchResult.dom.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { getMessageSearchResultSelector } from '../selectors/search.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +import { MessageSearchResult } from '../../components/conversationList/MessageSearchResult.dom.tsx'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { getMessageSearchResultSelector } from '../selectors/search.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; const log = createLogger('MessageSearchResult'); diff --git a/ts/state/smart/MiniPlayer.preload.tsx b/ts/state/smart/MiniPlayer.preload.tsx index 69197f1e17..973df497d9 100644 --- a/ts/state/smart/MiniPlayer.preload.tsx +++ b/ts/state/smart/MiniPlayer.preload.tsx @@ -3,17 +3,17 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { MiniPlayer, PlayerState } from '../../components/MiniPlayer.dom.js'; -import type { Props as DumbProps } from '../../components/MiniPlayer.dom.js'; +import { MiniPlayer, PlayerState } from '../../components/MiniPlayer.dom.tsx'; +import type { Props as DumbProps } from '../../components/MiniPlayer.dom.tsx'; import { AudioPlayerContent, useAudioPlayerActions, -} from '../ducks/audioPlayer.preload.js'; +} from '../ducks/audioPlayer.preload.ts'; import { selectAudioPlayerActive, selectVoiceNoteTitle, -} from '../selectors/audioPlayer.preload.js'; -import { getIntl } from '../selectors/user.std.js'; +} from '../selectors/audioPlayer.preload.ts'; +import { getIntl } from '../selectors/user.std.ts'; export type SmartMiniPlayerProps = Pick; diff --git a/ts/state/smart/NavTabs.preload.tsx b/ts/state/smart/NavTabs.preload.tsx index c0759c03c0..31cf1692ce 100644 --- a/ts/state/smart/NavTabs.preload.tsx +++ b/ts/state/smart/NavTabs.preload.tsx @@ -6,29 +6,29 @@ import React, { memo, useCallback } from 'react'; import type { ReactNode } from 'react'; import { useSelector } from 'react-redux'; -import { NavTabs } from '../../components/NavTabs.dom.js'; -import { getIntl, getTheme, getIsNightly } from '../selectors/user.std.js'; +import { NavTabs } from '../../components/NavTabs.dom.tsx'; +import { getIntl, getTheme, getIsNightly } from '../selectors/user.std.ts'; import { getAllConversationsUnreadStats, getMe, -} from '../selectors/conversations.dom.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; import { getHasAnyFailedStorySends, getStoriesNotificationCount, -} from '../selectors/stories.preload.js'; +} from '../selectors/stories.preload.ts'; import { getProfileMovedModalNeeded, getStoriesEnabled, -} from '../selectors/items.dom.js'; -import { getSelectedNavTab } from '../selectors/nav.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { getHasPendingUpdate } from '../selectors/updates.std.js'; -import { getCallHistoryUnreadCount } from '../selectors/callHistory.std.js'; -import { Environment } from '../../environment.std.js'; -import { useItemsActions } from '../ducks/items.preload.js'; +} from '../selectors/items.dom.ts'; +import { getSelectedNavTab } from '../selectors/nav.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { getHasPendingUpdate } from '../selectors/updates.std.ts'; +import { getCallHistoryUnreadCount } from '../selectors/callHistory.std.ts'; +import { Environment } from '../../environment.std.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; -import type { Location } from '../../types/Nav.std.js'; +import type { Location } from '../../types/Nav.std.ts'; export type SmartNavTabsProps = Readonly<{ navTabsCollapsed: boolean; diff --git a/ts/state/smart/NetworkStatus.preload.tsx b/ts/state/smart/NetworkStatus.preload.tsx index 3d42bb2af5..31c4b481e5 100644 --- a/ts/state/smart/NetworkStatus.preload.tsx +++ b/ts/state/smart/NetworkStatus.preload.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { DialogNetworkStatus } from '../../components/DialogNetworkStatus.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import type { WidthBreakpoint } from '../../components/_util.std.js'; +import { DialogNetworkStatus } from '../../components/DialogNetworkStatus.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import type { WidthBreakpoint } from '../../components/_util.std.ts'; import { getNetworkIsOnline, getNetworkIsOutage, getNetworkSocketStatus, -} from '../selectors/network.preload.js'; -import { useUserActions } from '../ducks/user.preload.js'; +} from '../selectors/network.preload.ts'; +import { useUserActions } from '../ducks/user.preload.ts'; type SmartNetworkStatusProps = Readonly<{ containerWidthBreakpoint: WidthBreakpoint; diff --git a/ts/state/smart/NotePreviewModal.preload.tsx b/ts/state/smart/NotePreviewModal.preload.tsx index 4d503a949e..257886d9a3 100644 --- a/ts/state/smart/NotePreviewModal.preload.tsx +++ b/ts/state/smart/NotePreviewModal.preload.tsx @@ -3,12 +3,12 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { NotePreviewModal } from '../../components/NotePreviewModal.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getNotePreviewModalProps } from '../selectors/globalModals.std.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +import { NotePreviewModal } from '../../components/NotePreviewModal.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getNotePreviewModalProps } from '../selectors/globalModals.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; export const SmartNotePreviewModal = memo(function SmartNotePreviewModal() { const i18n = useSelector(getIntl); diff --git a/ts/state/smart/NotificationProfilesMenu.preload.tsx b/ts/state/smart/NotificationProfilesMenu.preload.tsx index cd54004cde..9970d666b0 100644 --- a/ts/state/smart/NotificationProfilesMenu.preload.tsx +++ b/ts/state/smart/NotificationProfilesMenu.preload.tsx @@ -4,17 +4,17 @@ import React from 'react'; import { useSelector } from 'react-redux'; -import { getIntl } from '../selectors/user.std.js'; -import { NotificationProfilesMenu } from '../../components/NotificationProfilesMenu.dom.js'; -import { useNotificationProfilesActions } from '../ducks/notificationProfiles.preload.js'; +import { getIntl } from '../selectors/user.std.ts'; +import { NotificationProfilesMenu } from '../../components/NotificationProfilesMenu.dom.tsx'; +import { useNotificationProfilesActions } from '../ducks/notificationProfiles.preload.ts'; import { getActiveProfile, getLoading, getOverride, getProfiles, -} from '../selectors/notificationProfiles.dom.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { NavTab, SettingsPage } from '../../types/Nav.std.js'; +} from '../selectors/notificationProfiles.dom.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { NavTab, SettingsPage } from '../../types/Nav.std.ts'; export function SmartNotificationProfilesMenu(): React.JSX.Element { const i18n = useSelector(getIntl); diff --git a/ts/state/smart/PendingInvites.preload.tsx b/ts/state/smart/PendingInvites.preload.tsx index 0be80022bd..b3b3c87d4e 100644 --- a/ts/state/smart/PendingInvites.preload.tsx +++ b/ts/state/smart/PendingInvites.preload.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { PendingInvites } from '../../components/conversation/conversation-details/PendingInvites.dom.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +import { PendingInvites } from '../../components/conversation/conversation-details/PendingInvites.dom.tsx'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; import { getConversationByIdSelector, getConversationByServiceIdSelector, -} from '../selectors/conversations.dom.js'; -import { getGroupMemberships } from '../../util/getGroupMemberships.dom.js'; -import { assertDev } from '../../util/assert.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getGroupMemberships } from '../../util/getGroupMemberships.dom.ts'; +import { assertDev } from '../../util/assert.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; export type SmartPendingInvitesProps = { conversationId: string; diff --git a/ts/state/smart/PinMessageDialog.preload.tsx b/ts/state/smart/PinMessageDialog.preload.tsx index 0e7c0508d0..3ed56e443c 100644 --- a/ts/state/smart/PinMessageDialog.preload.tsx +++ b/ts/state/smart/PinMessageDialog.preload.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl } from '../selectors/user.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { PinMessageDialog } from '../../components/conversation/pinned-messages/PinMessageDialog.dom.js'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { getSeenPinMessageDisappearingMessagesWarningCount } from '../selectors/items.dom.js'; -import { getPinMessageDialogData } from '../selectors/globalModals.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +import { getIntl } from '../selectors/user.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { PinMessageDialog } from '../../components/conversation/pinned-messages/PinMessageDialog.dom.tsx'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { getSeenPinMessageDisappearingMessagesWarningCount } from '../selectors/items.dom.ts'; +import { getPinMessageDialogData } from '../selectors/globalModals.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; export type PinMessageDialogData = Readonly<{ messageId: string; diff --git a/ts/state/smart/PinnedMessagesBar.preload.tsx b/ts/state/smart/PinnedMessagesBar.preload.tsx index e249849b0a..3ddfaab320 100644 --- a/ts/state/smart/PinnedMessagesBar.preload.tsx +++ b/ts/state/smart/PinnedMessagesBar.preload.tsx @@ -11,16 +11,16 @@ import React, { import { useSelector } from 'react-redux'; import { createSelector } from 'reselect'; import { orderBy } from 'lodash'; -import { getIntl } from '../selectors/user.std.js'; +import { getIntl } from '../selectors/user.std.ts'; import { getConversationSelector, getPinnedMessages, getMessages, getConversationIsReady, -} from '../selectors/conversations.dom.js'; -import { getSelectedConversationId } from '../selectors/nav.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getSelectedConversationId } from '../selectors/nav.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; import type { Pin, PinMessage, @@ -29,20 +29,20 @@ import type { PinMessagePoll, PinMessageText, PinSender, -} from '../../components/conversation/pinned-messages/PinnedMessagesBar.dom.js'; -import { PinnedMessagesBar } from '../../components/conversation/pinned-messages/PinnedMessagesBar.dom.js'; -import { PanelType } from '../../types/Panels.std.js'; -import type { PinnedMessageId } from '../../types/PinnedMessage.std.js'; +} from '../../components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx'; +import { PinnedMessagesBar } from '../../components/conversation/pinned-messages/PinnedMessagesBar.dom.tsx'; +import { PanelType } from '../../types/Panels.std.ts'; +import type { PinnedMessageId } from '../../types/PinnedMessage.std.ts'; import { canPinMessages as getCanPinMessages, getMessagePropsSelector, type MessagePropsType, -} from '../selectors/message.preload.js'; -import * as Attachment from '../../util/Attachment.std.js'; -import * as MIME from '../../types/MIME.std.js'; -import * as EmbeddedContact from '../../types/EmbeddedContact.std.js'; -import type { StateSelector } from '../types.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; +} from '../selectors/message.preload.ts'; +import * as Attachment from '../../util/Attachment.std.ts'; +import * as MIME from '../../types/MIME.std.ts'; +import * as EmbeddedContact from '../../types/EmbeddedContact.std.ts'; +import type { StateSelector } from '../types.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; function getPinMessageAttachment( props: MessagePropsType diff --git a/ts/state/smart/PinnedMessagesPanel.preload.tsx b/ts/state/smart/PinnedMessagesPanel.preload.tsx index c45e322dce..96c234339b 100644 --- a/ts/state/smart/PinnedMessagesPanel.preload.tsx +++ b/ts/state/smart/PinnedMessagesPanel.preload.tsx @@ -3,18 +3,18 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl } from '../selectors/user.std.js'; +import { getIntl } from '../selectors/user.std.ts'; import { getConversationByIdSelector, getPinnedMessages, -} from '../selectors/conversations.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { PinnedMessagesPanel } from '../../components/conversation/pinned-messages/PinnedMessagesPanel.dom.js'; -import type { SmartTimelineItemProps } from './TimelineItem.preload.js'; -import { SmartTimelineItem } from './TimelineItem.preload.js'; -import { canPinMessages as getCanPinMessages } from '../selectors/message.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; +} from '../selectors/conversations.dom.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { PinnedMessagesPanel } from '../../components/conversation/pinned-messages/PinnedMessagesPanel.dom.tsx'; +import type { SmartTimelineItemProps } from './TimelineItem.preload.tsx'; +import { SmartTimelineItem } from './TimelineItem.preload.tsx'; +import { canPinMessages as getCanPinMessages } from '../selectors/message.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; export type SmartPinnedMessagesPanelProps = Readonly<{ conversationId: string; diff --git a/ts/state/smart/PlaintextExportWorkflow.preload.tsx b/ts/state/smart/PlaintextExportWorkflow.preload.tsx index 129e373b99..67d80e4ad6 100644 --- a/ts/state/smart/PlaintextExportWorkflow.preload.tsx +++ b/ts/state/smart/PlaintextExportWorkflow.preload.tsx @@ -4,16 +4,16 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { createLogger } from '../../logging/log.std.js'; -import { getIntl, getUser } from '../selectors/user.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { getIntl, getUser } from '../selectors/user.std.ts'; import { getBackups, getPlaintextWorkflow, shouldShowPlaintextWorkflow, -} from '../selectors/backups.std.js'; -import { useBackupActions } from '../ducks/backups.preload.js'; -import { PlaintextExportWorkflow } from '../../components/PlaintextExportWorkflow.dom.js'; -import { useToastActions } from '../ducks/toast.preload.js'; +} from '../selectors/backups.std.ts'; +import { useBackupActions } from '../ducks/backups.preload.ts'; +import { PlaintextExportWorkflow } from '../../components/PlaintextExportWorkflow.dom.tsx'; +import { useToastActions } from '../ducks/toast.preload.ts'; const log = createLogger('smart/PlaintextExportWorkflow'); diff --git a/ts/state/smart/Preferences.preload.tsx b/ts/state/smart/Preferences.preload.tsx index 3703fe8114..1b525fdf8c 100644 --- a/ts/state/smart/Preferences.preload.tsx +++ b/ts/state/smart/Preferences.preload.tsx @@ -7,119 +7,119 @@ import { useSelector } from 'react-redux'; import type { AudioDevice } from '@signalapp/ringrtc'; import type { MutableRefObject } from 'react'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; import { getConversationsWithCustomColorSelector, getMe, getOtherTabsUnreadStats, -} from '../selectors/conversations.dom.js'; +} from '../selectors/conversations.dom.ts'; import { getBackupKey, getCustomColors, getItems, getNavTabsCollapsed, getPreferredLeftPaneWidth, -} from '../selectors/items.dom.js'; +} from '../selectors/items.dom.ts'; import { itemStorage, DEFAULT_AUTO_DOWNLOAD_ATTACHMENT, -} from '../../textsecure/Storage.preload.js'; +} from '../../textsecure/Storage.preload.ts'; import { onHasStoriesDisabledChange, setPhoneNumberDiscoverability, -} from '../../textsecure/WebAPI.preload.js'; -import { DEFAULT_CONVERSATION_COLOR } from '../../types/Colors.std.js'; -import { saveAttachmentToDisk } from '../../util/migrations.preload.js'; -import { format } from '../../types/PhoneNumber.std.js'; +} from '../../textsecure/WebAPI.preload.ts'; +import { DEFAULT_CONVERSATION_COLOR } from '../../types/Colors.std.ts'; +import { saveAttachmentToDisk } from '../../util/migrations.preload.ts'; +import { format } from '../../types/PhoneNumber.std.ts'; import { getIntl, getTheme, getUser, getUserDeviceId, getUserNumber, -} from '../selectors/user.std.js'; -import { EmojiSkinTone } from '../../components/fun/data/emojis.std.js'; -import { renderClearingDataView } from '../../shims/renderClearingDataView.preload.js'; -import OS from '../../util/os/osPreload.preload.js'; -import { themeChanged } from '../../shims/themeChanged.dom.js'; -import * as Settings from '../../types/Settings.std.js'; -import * as universalExpireTimerUtil from '../../util/universalExpireTimer.preload.js'; +} from '../selectors/user.std.ts'; +import { EmojiSkinTone } from '../../components/fun/data/emojis.std.ts'; +import { renderClearingDataView } from '../../shims/renderClearingDataView.preload.tsx'; +import OS from '../../util/os/osPreload.preload.ts'; +import { themeChanged } from '../../shims/themeChanged.dom.ts'; +import * as Settings from '../../types/Settings.std.ts'; +import * as universalExpireTimerUtil from '../../util/universalExpireTimer.preload.ts'; import { parseSystemTraySetting, shouldMinimizeToSystemTray, SystemTraySetting, -} from '../../types/SystemTraySetting.std.js'; -import { calling } from '../../services/calling.preload.js'; -import { drop } from '../../util/drop.std.js'; -import { assertDev } from '../../util/assert.std.js'; -import { backupsService } from '../../services/backups/index.preload.js'; -import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.js'; -import { PhoneNumberDiscoverability } from '../../util/phoneNumberDiscoverability.std.js'; -import { PhoneNumberSharingMode } from '../../types/PhoneNumberSharingMode.std.js'; -import { writeProfile } from '../../services/writeProfile.preload.js'; -import { keyTransparency } from '../../services/keyTransparency.preload.js'; -import { getConversation } from '../../util/getConversation.preload.js'; -import { waitForEvent } from '../../shims/events.dom.js'; -import { DAY } from '../../util/durations/index.std.js'; -import { sendSyncRequests } from '../../textsecure/syncRequests.preload.js'; -import { SmartUpdateDialog } from './UpdateDialog.preload.js'; -import { Preferences } from '../../components/Preferences.dom.js'; -import { useUpdatesActions } from '../ducks/updates.preload.js'; -import { getUpdateDialogType } from '../selectors/updates.std.js'; -import { getHasAnyFailedStorySends } from '../selectors/stories.preload.js'; +} from '../../types/SystemTraySetting.std.ts'; +import { calling } from '../../services/calling.preload.ts'; +import { drop } from '../../util/drop.std.ts'; +import { assertDev } from '../../util/assert.std.ts'; +import { backupsService } from '../../services/backups/index.preload.ts'; +import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.ts'; +import { PhoneNumberDiscoverability } from '../../util/phoneNumberDiscoverability.std.ts'; +import { PhoneNumberSharingMode } from '../../types/PhoneNumberSharingMode.std.ts'; +import { writeProfile } from '../../services/writeProfile.preload.ts'; +import { keyTransparency } from '../../services/keyTransparency.preload.ts'; +import { getConversation } from '../../util/getConversation.preload.ts'; +import { waitForEvent } from '../../shims/events.dom.ts'; +import { DAY } from '../../util/durations/index.std.ts'; +import { sendSyncRequests } from '../../textsecure/syncRequests.preload.ts'; +import { SmartUpdateDialog } from './UpdateDialog.preload.tsx'; +import { Preferences } from '../../components/Preferences.dom.tsx'; +import { useUpdatesActions } from '../ducks/updates.preload.ts'; +import { getUpdateDialogType } from '../selectors/updates.std.ts'; +import { getHasAnyFailedStorySends } from '../selectors/stories.preload.ts'; import { getSelectedConversationId, getSelectedLocation, -} from '../selectors/nav.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { SmartProfileEditor } from './ProfileEditor.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { NavTab } from '../../types/Nav.std.js'; -import { renderToastManagerWithoutMegaphone } from './ToastManager.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { deleteAllMyStories } from '../../util/deleteAllMyStories.preload.js'; -import { SmartPreferencesDonations } from './PreferencesDonations.preload.js'; -import { useDonationsActions } from '../ducks/donations.preload.js'; -import { generateDonationReceiptBlob } from '../../util/generateDonationReceipt.dom.js'; -import { getProfiles } from '../selectors/notificationProfiles.dom.js'; -import { backupLevelFromNumber } from '../../services/backups/types.std.js'; -import { getMessageQueueTime } from '../../util/getMessageQueueTime.dom.js'; -import { useBackupActions } from '../ducks/backups.preload.js'; -import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.js'; -import { SmartPreferencesChatFoldersPage } from './PreferencesChatFoldersPage.preload.js'; -import { SmartPreferencesEditChatFolderPage } from './PreferencesEditChatFolderPage.preload.js'; -import { AxoProvider } from '../../axo/AxoProvider.dom.js'; +} from '../selectors/nav.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { SmartProfileEditor } from './ProfileEditor.preload.tsx'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { NavTab } from '../../types/Nav.std.ts'; +import { renderToastManagerWithoutMegaphone } from './ToastManager.preload.tsx'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { deleteAllMyStories } from '../../util/deleteAllMyStories.preload.ts'; +import { SmartPreferencesDonations } from './PreferencesDonations.preload.tsx'; +import { useDonationsActions } from '../ducks/donations.preload.ts'; +import { generateDonationReceiptBlob } from '../../util/generateDonationReceipt.dom.ts'; +import { getProfiles } from '../selectors/notificationProfiles.dom.ts'; +import { backupLevelFromNumber } from '../../services/backups/types.std.ts'; +import { getMessageQueueTime } from '../../util/getMessageQueueTime.dom.ts'; +import { useBackupActions } from '../ducks/backups.preload.ts'; +import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.ts'; +import { SmartPreferencesChatFoldersPage } from './PreferencesChatFoldersPage.preload.tsx'; +import { SmartPreferencesEditChatFolderPage } from './PreferencesEditChatFolderPage.preload.tsx'; +import { AxoProvider } from '../../axo/AxoProvider.dom.tsx'; import { getCurrentChatFoldersCount, getHasAnyCurrentCustomChatFolders, -} from '../selectors/chatFolders.std.js'; +} from '../selectors/chatFolders.std.ts'; import { SmartNotificationProfilesCreateFlow, SmartNotificationProfilesHome, -} from './PreferencesNotificationProfiles.preload.js'; +} from './PreferencesNotificationProfiles.preload.tsx'; -import type { SettingsLocation } from '../../types/Nav.std.js'; +import type { SettingsLocation } from '../../types/Nav.std.ts'; import type { StorageAccessType } from '../../types/Storage.d.ts'; -import type { ThemeType } from '../../util/preload.preload.js'; -import type { WidthBreakpoint } from '../../components/_util.std.js'; -import { DialogType } from '../../types/Dialogs.std.js'; -import { promptOSAuth } from '../../util/promptOSAuth.preload.js'; -import type { StateType } from '../reducer.preload.js'; +import type { ThemeType } from '../../util/preload.preload.ts'; +import type { WidthBreakpoint } from '../../components/_util.std.ts'; +import { DialogType } from '../../types/Dialogs.std.ts'; +import { promptOSAuth } from '../../util/promptOSAuth.preload.ts'; +import type { StateType } from '../reducer.preload.ts'; import { pauseBackupMediaDownload, resumeBackupMediaDownload, cancelBackupMediaDownload, -} from '../../util/backupMediaDownload.preload.js'; -import { DonationsErrorBoundary } from '../../components/DonationsErrorBoundary.dom.js'; -import type { SmartPreferencesChatFoldersPageProps } from './PreferencesChatFoldersPage.preload.js'; -import type { SmartPreferencesEditChatFolderPageProps } from './PreferencesEditChatFolderPage.preload.js'; -import type { ExternalProps as SmartNotificationProfilesProps } from './PreferencesNotificationProfiles.preload.js'; -import { useMegaphonesActions } from '../ducks/megaphones.preload.js'; -import type { ZoomFactorType } from '../../types/StorageKeys.std.js'; -import { isLocalBackupsEnabled } from '../../util/isLocalBackupsEnabled.preload.js'; -import { getBackupKeyHash } from '../../services/backups/crypto.preload.js'; +} from '../../util/backupMediaDownload.preload.ts'; +import { DonationsErrorBoundary } from '../../components/DonationsErrorBoundary.dom.tsx'; +import type { SmartPreferencesChatFoldersPageProps } from './PreferencesChatFoldersPage.preload.tsx'; +import type { SmartPreferencesEditChatFolderPageProps } from './PreferencesEditChatFolderPage.preload.tsx'; +import type { ExternalProps as SmartNotificationProfilesProps } from './PreferencesNotificationProfiles.preload.tsx'; +import { useMegaphonesActions } from '../ducks/megaphones.preload.ts'; +import type { ZoomFactorType } from '../../types/StorageKeys.std.ts'; +import { isLocalBackupsEnabled } from '../../util/isLocalBackupsEnabled.preload.ts'; +import { getBackupKeyHash } from '../../services/backups/crypto.preload.ts'; const DEFAULT_NOTIFICATION_SETTING = 'message'; diff --git a/ts/state/smart/PreferencesChatFoldersPage.preload.tsx b/ts/state/smart/PreferencesChatFoldersPage.preload.tsx index e8629ce1a1..f923f46ef5 100644 --- a/ts/state/smart/PreferencesChatFoldersPage.preload.tsx +++ b/ts/state/smart/PreferencesChatFoldersPage.preload.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import { useSelector } from 'react-redux'; -import type { PreferencesChatFoldersPageProps } from '../../components/preferences/chatFolders/PreferencesChatFoldersPage.dom.js'; -import { PreferencesChatFoldersPage } from '../../components/preferences/chatFolders/PreferencesChatFoldersPage.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { getCurrentChatFolders } from '../selectors/chatFolders.std.js'; -import type { ChatFolderId } from '../../types/ChatFolder.std.js'; -import { useChatFolderActions } from '../ducks/chatFolders.preload.js'; -import type { Location } from '../../types/Nav.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; +import type { PreferencesChatFoldersPageProps } from '../../components/preferences/chatFolders/PreferencesChatFoldersPage.dom.tsx'; +import { PreferencesChatFoldersPage } from '../../components/preferences/chatFolders/PreferencesChatFoldersPage.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { getCurrentChatFolders } from '../selectors/chatFolders.std.ts'; +import type { ChatFolderId } from '../../types/ChatFolder.std.ts'; +import { useChatFolderActions } from '../ducks/chatFolders.preload.ts'; +import type { Location } from '../../types/Nav.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; export type SmartPreferencesChatFoldersPageProps = Readonly<{ settingsPaneRef: PreferencesChatFoldersPageProps['settingsPaneRef']; diff --git a/ts/state/smart/PreferencesDonations.preload.tsx b/ts/state/smart/PreferencesDonations.preload.tsx index 73382250a5..e6424bdff4 100644 --- a/ts/state/smart/PreferencesDonations.preload.tsx +++ b/ts/state/smart/PreferencesDonations.preload.tsx @@ -6,38 +6,38 @@ import { useSelector } from 'react-redux'; import type { MutableRefObject } from 'react'; -import { getIntl, getTheme, getUserNumber } from '../selectors/user.std.js'; -import { getMe } from '../selectors/conversations.dom.js'; -import { PreferencesDonations } from '../../components/PreferencesDonations.dom.js'; -import type { SettingsLocation } from '../../types/Nav.std.js'; -import { useDonationsActions } from '../ducks/donations.preload.js'; -import type { StateType } from '../reducer.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { generateDonationReceiptBlob } from '../../util/generateDonationReceipt.dom.js'; -import { useToastActions } from '../ducks/toast.preload.js'; +import { getIntl, getTheme, getUserNumber } from '../selectors/user.std.ts'; +import { getMe } from '../selectors/conversations.dom.ts'; +import { PreferencesDonations } from '../../components/PreferencesDonations.dom.tsx'; +import type { SettingsLocation } from '../../types/Nav.std.ts'; +import { useDonationsActions } from '../ducks/donations.preload.ts'; +import type { StateType } from '../reducer.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { generateDonationReceiptBlob } from '../../util/generateDonationReceipt.dom.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; import { getCachedSubscriptionConfiguration, maybeHydrateDonationConfigCache, -} from '../../util/subscriptionConfiguration.preload.js'; -import { drop } from '../../util/drop.std.js'; -import { saveAttachmentToDisk } from '../../util/migrations.preload.js'; +} from '../../util/subscriptionConfiguration.preload.ts'; +import { drop } from '../../util/drop.std.ts'; +import { saveAttachmentToDisk } from '../../util/migrations.preload.ts'; import { ONE_TIME_DONATION_CONFIG_ID, BOOST_ID, -} from '../../types/Donations.std.js'; -import { phoneNumberToCurrencyCode } from '../../services/donations.preload.js'; +} from '../../types/Donations.std.ts'; +import { phoneNumberToCurrencyCode } from '../../services/donations.preload.ts'; import { getPreferredBadgeSelector, getBadgesById, -} from '../selectors/badges.preload.js'; -import { parseBoostBadgeListFromServer } from '../../badges/parseBadgesFromServer.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { useBadgesActions } from '../ducks/badges.preload.js'; -import { getNetworkIsOnline } from '../selectors/network.preload.js'; +} from '../selectors/badges.preload.ts'; +import { parseBoostBadgeListFromServer } from '../../badges/parseBadgesFromServer.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { useBadgesActions } from '../ducks/badges.preload.ts'; +import { getNetworkIsOnline } from '../selectors/network.preload.ts'; import { getDonationConfigCache, getDonationsState, -} from '../selectors/donations.std.js'; +} from '../selectors/donations.std.ts'; const log = createLogger('SmartPreferencesDonations'); diff --git a/ts/state/smart/PreferencesEditChatFolderPage.preload.tsx b/ts/state/smart/PreferencesEditChatFolderPage.preload.tsx index 45ce9ff934..021cd33739 100644 --- a/ts/state/smart/PreferencesEditChatFolderPage.preload.tsx +++ b/ts/state/smart/PreferencesEditChatFolderPage.preload.tsx @@ -2,21 +2,21 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import type { PreferencesEditChatFolderPageProps } from '../../components/preferences/chatFolders/PreferencesEditChatFoldersPage.dom.js'; -import { PreferencesEditChatFolderPage } from '../../components/preferences/chatFolders/PreferencesEditChatFoldersPage.dom.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import type { ChatFolderParams } from '../../types/ChatFolder.std.js'; -import { CHAT_FOLDER_DEFAULTS } from '../../types/ChatFolder.std.js'; +import type { PreferencesEditChatFolderPageProps } from '../../components/preferences/chatFolders/PreferencesEditChatFoldersPage.dom.tsx'; +import { PreferencesEditChatFolderPage } from '../../components/preferences/chatFolders/PreferencesEditChatFoldersPage.dom.tsx'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import type { ChatFolderParams } from '../../types/ChatFolder.std.ts'; +import { CHAT_FOLDER_DEFAULTS } from '../../types/ChatFolder.std.ts'; import { getAllComposableConversations, getConversationSelector, -} from '../selectors/conversations.dom.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { useChatFolderActions } from '../ducks/chatFolders.preload.js'; -import { getCurrentChatFolders } from '../selectors/chatFolders.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import type { Location } from '../../types/Nav.std.js'; -import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.js'; +} from '../selectors/conversations.dom.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { useChatFolderActions } from '../ducks/chatFolders.preload.ts'; +import { getCurrentChatFolders } from '../selectors/chatFolders.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import type { Location } from '../../types/Nav.std.ts'; +import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.ts'; export type SmartPreferencesEditChatFolderPageProps = Readonly<{ previousLocation: Location | null; diff --git a/ts/state/smart/PreferencesNotificationProfiles.preload.tsx b/ts/state/smart/PreferencesNotificationProfiles.preload.tsx index d900d22226..570e8149cd 100644 --- a/ts/state/smart/PreferencesNotificationProfiles.preload.tsx +++ b/ts/state/smart/PreferencesNotificationProfiles.preload.tsx @@ -5,25 +5,25 @@ import React, { memo } from 'react'; import type { MutableRefObject } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl, getTheme } from '../selectors/user.std.js'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; import { NotificationProfilesCreateFlow, NotificationProfilesHome, -} from '../../components/PreferencesNotificationProfiles.dom.js'; +} from '../../components/PreferencesNotificationProfiles.dom.tsx'; import { getAllComposableConversations, getConversationSelector, -} from '../selectors/conversations.dom.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { useNotificationProfilesActions } from '../ducks/notificationProfiles.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { useNotificationProfilesActions } from '../ducks/notificationProfiles.preload.ts'; import { getActiveProfile, getLoading, getProfiles, -} from '../selectors/notificationProfiles.dom.js'; -import type { SettingsLocation } from '../../types/Nav.std.js'; -import { getItems } from '../selectors/items.dom.js'; -import { useItemsActions } from '../ducks/items.preload.js'; +} from '../selectors/notificationProfiles.dom.ts'; +import type { SettingsLocation } from '../../types/Nav.std.ts'; +import { getItems } from '../selectors/items.dom.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; export type ExternalProps = { contentsRef: MutableRefObject; diff --git a/ts/state/smart/ProfileEditor.preload.tsx b/ts/state/smart/ProfileEditor.preload.tsx index 71940e989e..1e3b0acd5d 100644 --- a/ts/state/smart/ProfileEditor.preload.tsx +++ b/ts/state/smart/ProfileEditor.preload.tsx @@ -5,14 +5,14 @@ import { useSelector } from 'react-redux'; import type { MutableRefObject } from 'react'; -import { ProfileEditor } from '../../components/ProfileEditor.dom.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { useUsernameActions } from '../ducks/username.preload.js'; +import { ProfileEditor } from '../../components/ProfileEditor.dom.tsx'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { useUsernameActions } from '../ducks/username.preload.ts'; import { getMe, getProfileUpdateError, -} from '../selectors/conversations.dom.js'; +} from '../selectors/conversations.dom.ts'; import { getEmojiSkinToneDefault, getHasCompletedUsernameLinkOnboarding, @@ -20,20 +20,20 @@ import { getUsernameLink, getUsernameLinkColor, getUsernameLinkCorrupted, -} from '../selectors/items.dom.js'; -import { getIntl } from '../selectors/user.std.js'; +} from '../selectors/items.dom.ts'; +import { getIntl } from '../selectors/user.std.ts'; import { getUsernameEditState, getUsernameLinkState, -} from '../selectors/username.std.js'; -import { SmartUsernameEditor } from './UsernameEditor.preload.js'; -import { getSelectedLocation } from '../selectors/nav.std.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { NavTab, SettingsPage } from '../../types/Nav.std.js'; +} from '../selectors/username.std.ts'; +import { SmartUsernameEditor } from './UsernameEditor.preload.tsx'; +import { getSelectedLocation } from '../selectors/nav.std.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { NavTab, SettingsPage } from '../../types/Nav.std.ts'; -import type { ProfileEditorPage } from '../../types/Nav.std.js'; -import type { SmartUsernameEditorProps } from './UsernameEditor.preload.js'; -import { ConfirmationDialog } from '../../components/ConfirmationDialog.dom.js'; +import type { ProfileEditorPage } from '../../types/Nav.std.ts'; +import type { SmartUsernameEditorProps } from './UsernameEditor.preload.tsx'; +import { ConfirmationDialog } from '../../components/ConfirmationDialog.dom.tsx'; function renderUsernameEditor( props: SmartUsernameEditorProps diff --git a/ts/state/smart/ProfileNameWarningModal.preload.tsx b/ts/state/smart/ProfileNameWarningModal.preload.tsx index 0ad702cef5..f40e3c07db 100644 --- a/ts/state/smart/ProfileNameWarningModal.preload.tsx +++ b/ts/state/smart/ProfileNameWarningModal.preload.tsx @@ -3,10 +3,10 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl } from '../selectors/user.std.js'; -import { getGlobalModalsState } from '../selectors/globalModals.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { ProfileNameWarningModal } from '../../components/conversation/ProfileNameWarningModal.dom.js'; +import { getIntl } from '../selectors/user.std.ts'; +import { getGlobalModalsState } from '../selectors/globalModals.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { ProfileNameWarningModal } from '../../components/conversation/ProfileNameWarningModal.dom.tsx'; export const SmartProfileNameWarningModal = memo( function SmartProfileNameWarningModal() { diff --git a/ts/state/smart/ReactionPicker.dom.tsx b/ts/state/smart/ReactionPicker.dom.tsx index bf97ebb7a4..9afbece108 100644 --- a/ts/state/smart/ReactionPicker.dom.tsx +++ b/ts/state/smart/ReactionPicker.dom.tsx @@ -4,10 +4,10 @@ import type { Ref } from 'react'; import React, { forwardRef, memo } from 'react'; import { useSelector } from 'react-redux'; -import { getIntl } from '../selectors/user.std.js'; -import { getPreferredReactionEmoji } from '../selectors/items.dom.js'; -import type { Props as InternalProps } from '../../components/conversation/ReactionPicker.dom.js'; -import { ReactionPicker } from '../../components/conversation/ReactionPicker.dom.js'; +import { getIntl } from '../selectors/user.std.ts'; +import { getPreferredReactionEmoji } from '../selectors/items.dom.ts'; +import type { Props as InternalProps } from '../../components/conversation/ReactionPicker.dom.tsx'; +import { ReactionPicker } from '../../components/conversation/ReactionPicker.dom.tsx'; type ExternalProps = Omit< InternalProps, diff --git a/ts/state/smart/RelinkDialog.dom.tsx b/ts/state/smart/RelinkDialog.dom.tsx index f116bc9646..1181565aaa 100644 --- a/ts/state/smart/RelinkDialog.dom.tsx +++ b/ts/state/smart/RelinkDialog.dom.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { DialogRelink } from '../../components/DialogRelink.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import type { WidthBreakpoint } from '../../components/_util.std.js'; -import { useNetworkActions } from '../ducks/network.dom.js'; +import { DialogRelink } from '../../components/DialogRelink.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import type { WidthBreakpoint } from '../../components/_util.std.ts'; +import { useNetworkActions } from '../ducks/network.dom.ts'; type SmartRelinkDialogProps = Readonly<{ containerWidthBreakpoint: WidthBreakpoint; diff --git a/ts/state/smart/SafetyNumberModal.preload.tsx b/ts/state/smart/SafetyNumberModal.preload.tsx index 189a47e7af..b48cbd908f 100644 --- a/ts/state/smart/SafetyNumberModal.preload.tsx +++ b/ts/state/smart/SafetyNumberModal.preload.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { SafetyNumberModal } from '../../components/SafetyNumberModal.dom.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import type { SafetyNumberProps } from '../../components/SafetyNumberChangeDialog.dom.js'; -import { SmartSafetyNumberViewer } from './SafetyNumberViewer.preload.js'; +import { SafetyNumberModal } from '../../components/SafetyNumberModal.dom.tsx'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import type { SafetyNumberProps } from '../../components/SafetyNumberChangeDialog.dom.tsx'; +import { SmartSafetyNumberViewer } from './SafetyNumberViewer.preload.tsx'; export type SmartSafetyNumberModalProps = { contactID: string; diff --git a/ts/state/smart/SafetyNumberViewer.preload.tsx b/ts/state/smart/SafetyNumberViewer.preload.tsx index 9464cd55a1..af74e454e6 100644 --- a/ts/state/smart/SafetyNumberViewer.preload.tsx +++ b/ts/state/smart/SafetyNumberViewer.preload.tsx @@ -4,16 +4,16 @@ import React, { memo, useState, useEffect, useCallback } from 'react'; import lodash from 'lodash'; import { useSelector } from 'react-redux'; -import { SafetyNumberViewer } from '../../components/SafetyNumberViewer.dom.js'; -import type { SafetyNumberProps } from '../../components/SafetyNumberChangeDialog.dom.js'; -import { getContactSafetyNumberSelector } from '../selectors/safetyNumber.std.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; -import { getIntl, getVersion } from '../selectors/user.std.js'; -import { getItems, getKeyTransparencyEnabled } from '../selectors/items.dom.js'; -import { useSafetyNumberActions } from '../ducks/safetyNumber.preload.js'; -import { keyTransparency } from '../../services/keyTransparency.preload.js'; -import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.js'; -import { drop } from '../../util/drop.std.js'; +import { SafetyNumberViewer } from '../../components/SafetyNumberViewer.dom.tsx'; +import type { SafetyNumberProps } from '../../components/SafetyNumberChangeDialog.dom.tsx'; +import { getContactSafetyNumberSelector } from '../selectors/safetyNumber.std.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; +import { getIntl, getVersion } from '../selectors/user.std.ts'; +import { getItems, getKeyTransparencyEnabled } from '../selectors/items.dom.ts'; +import { useSafetyNumberActions } from '../ducks/safetyNumber.preload.ts'; +import { keyTransparency } from '../../services/keyTransparency.preload.ts'; +import { isFeaturedEnabledSelector } from '../../util/isFeatureEnabled.dom.ts'; +import { drop } from '../../util/drop.std.ts'; import type { KeyTransparencyStatusType } from '../../types/KeyTransparency.d.ts'; const { noop } = lodash; diff --git a/ts/state/smart/SendAnywayDialog.preload.tsx b/ts/state/smart/SendAnywayDialog.preload.tsx index 223208ce2e..d37accebd1 100644 --- a/ts/state/smart/SendAnywayDialog.preload.tsx +++ b/ts/state/smart/SendAnywayDialog.preload.tsx @@ -3,18 +3,18 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.js'; -import * as SingleServePromise from '../../services/singleServePromise.std.js'; -import type { SafetyNumberProps } from '../../components/SafetyNumberChangeDialog.dom.js'; -import { SafetyNumberChangeDialog } from '../../components/SafetyNumberChangeDialog.dom.js'; -import { SmartSafetyNumberViewer } from './SafetyNumberViewer.preload.js'; -import { getByDistributionListConversationsStoppingSend } from '../selectors/conversations-extra.preload.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useStoryDistributionListsActions } from '../ducks/storyDistributionLists.preload.js'; -import { getSafetyNumberChangedBlockingData } from '../selectors/globalModals.std.js'; +import { SafetyNumberChangeSource } from '../../types/SafetyNumberChangeSource.std.ts'; +import * as SingleServePromise from '../../services/singleServePromise.std.ts'; +import type { SafetyNumberProps } from '../../components/SafetyNumberChangeDialog.dom.tsx'; +import { SafetyNumberChangeDialog } from '../../components/SafetyNumberChangeDialog.dom.tsx'; +import { SmartSafetyNumberViewer } from './SafetyNumberViewer.preload.tsx'; +import { getByDistributionListConversationsStoppingSend } from '../selectors/conversations-extra.preload.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useStoryDistributionListsActions } from '../ducks/storyDistributionLists.preload.ts'; +import { getSafetyNumberChangedBlockingData } from '../selectors/globalModals.std.ts'; function renderSafetyNumber({ contactID, onClose }: SafetyNumberProps) { return ; diff --git a/ts/state/smart/ShortcutGuideModal.preload.tsx b/ts/state/smart/ShortcutGuideModal.preload.tsx index 5844c362fd..8dded80cc3 100644 --- a/ts/state/smart/ShortcutGuideModal.preload.tsx +++ b/ts/state/smart/ShortcutGuideModal.preload.tsx @@ -3,9 +3,9 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { ShortcutGuideModal } from '../../components/ShortcutGuideModal.dom.js'; -import { getIntl, getPlatform } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +import { ShortcutGuideModal } from '../../components/ShortcutGuideModal.dom.tsx'; +import { getIntl, getPlatform } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; export const SmartShortcutGuideModal = memo(function SmartShortcutGuideModal() { const i18n = useSelector(getIntl); diff --git a/ts/state/smart/StickerManager.preload.tsx b/ts/state/smart/StickerManager.preload.tsx index 7c45fca6e7..53915c70ad 100644 --- a/ts/state/smart/StickerManager.preload.tsx +++ b/ts/state/smart/StickerManager.preload.tsx @@ -3,16 +3,16 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { StickerManager } from '../../components/stickers/StickerManager.dom.js'; -import { getIntl } from '../selectors/user.std.js'; +import { StickerManager } from '../../components/stickers/StickerManager.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; import { getBlessedStickerPacks, getInstalledStickerPacks, getKnownStickerPacks, getReceivedStickerPacks, -} from '../selectors/stickers.std.js'; -import { useStickersActions } from '../ducks/stickers.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +} from '../selectors/stickers.std.ts'; +import { useStickersActions } from '../ducks/stickers.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; export const SmartStickerManager = memo(function SmartStickerManager() { const i18n = useSelector(getIntl); diff --git a/ts/state/smart/StickerPreviewModal.preload.tsx b/ts/state/smart/StickerPreviewModal.preload.tsx index 83c207077d..b37b4d4a72 100644 --- a/ts/state/smart/StickerPreviewModal.preload.tsx +++ b/ts/state/smart/StickerPreviewModal.preload.tsx @@ -3,15 +3,15 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { StickerPreviewModal } from '../../components/stickers/StickerPreviewModal.dom.js'; -import { getIntl } from '../selectors/user.std.js'; +import { StickerPreviewModal } from '../../components/stickers/StickerPreviewModal.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; import { getBlessedPacks, getPacks, translatePackFromDB, -} from '../selectors/stickers.std.js'; -import { useStickersActions } from '../ducks/stickers.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +} from '../selectors/stickers.std.ts'; +import { useStickersActions } from '../ducks/stickers.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; export type ExternalProps = { packId: string; diff --git a/ts/state/smart/StoriesSettingsModal.preload.tsx b/ts/state/smart/StoriesSettingsModal.preload.tsx index 1d7b169b94..c08d58a91f 100644 --- a/ts/state/smart/StoriesSettingsModal.preload.tsx +++ b/ts/state/smart/StoriesSettingsModal.preload.tsx @@ -3,22 +3,22 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { StoriesSettingsModal } from '../../components/StoriesSettingsModal.dom.js'; +import { StoriesSettingsModal } from '../../components/StoriesSettingsModal.dom.tsx'; import { getCandidateContactsForNewGroup, getConversationByServiceIdSelector, getGroupStories, getMe, -} from '../selectors/conversations.dom.js'; -import { getAllSignalConnections } from '../selectors/conversations-extra.preload.js'; -import { getDistributionListsWithMembers } from '../selectors/storyDistributionLists.dom.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; -import { getHasStoryViewReceiptSetting } from '../selectors/items.dom.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useStoryDistributionListsActions } from '../ducks/storyDistributionLists.preload.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getAllSignalConnections } from '../selectors/conversations-extra.preload.ts'; +import { getDistributionListsWithMembers } from '../selectors/storyDistributionLists.dom.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; +import { getHasStoryViewReceiptSetting } from '../selectors/items.dom.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useStoryDistributionListsActions } from '../ducks/storyDistributionLists.preload.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; export const SmartStoriesSettingsModal = memo( function SmartStoriesSettingsModal() { diff --git a/ts/state/smart/StoriesTab.preload.tsx b/ts/state/smart/StoriesTab.preload.tsx index 6825ab472b..263d308b75 100644 --- a/ts/state/smart/StoriesTab.preload.tsx +++ b/ts/state/smart/StoriesTab.preload.tsx @@ -3,40 +3,40 @@ import React, { memo, useCallback, useEffect } from 'react'; import { useSelector } from 'react-redux'; -import { SmartStoryCreator } from './StoryCreator.preload.js'; -import { renderToastManagerWithoutMegaphone } from './ToastManager.preload.js'; -import { StoriesTab } from '../../components/StoriesTab.dom.js'; -import { getMaximumOutgoingAttachmentSizeInKb } from '../../types/AttachmentSize.std.js'; -import type { ConfigKeyType } from '../../RemoteConfig.dom.js'; +import { SmartStoryCreator } from './StoryCreator.preload.tsx'; +import { renderToastManagerWithoutMegaphone } from './ToastManager.preload.tsx'; +import { StoriesTab } from '../../components/StoriesTab.dom.tsx'; +import { getMaximumOutgoingAttachmentSizeInKb } from '../../types/AttachmentSize.std.ts'; +import type { ConfigKeyType } from '../../RemoteConfig.dom.ts'; import { getMe, getOtherTabsUnreadStats, -} from '../selectors/conversations.dom.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; import { getHasStoryViewReceiptSetting, getNavTabsCollapsed, getPreferredLeftPaneWidth, getRemoteConfig, -} from '../selectors/items.dom.js'; +} from '../selectors/items.dom.ts'; import { getAddStoryData, getHasAnyFailedStorySends, getSelectedStoryData, getStories, -} from '../selectors/stories.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.js'; -import { useItemsActions } from '../ducks/items.preload.js'; -import { getHasPendingUpdate } from '../selectors/updates.std.js'; +} from '../selectors/stories.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.ts'; +import { useItemsActions } from '../ducks/items.preload.ts'; +import { getHasPendingUpdate } from '../selectors/updates.std.ts'; -import { getIsStoriesSettingsVisible } from '../selectors/globalModals.std.js'; -import type { StoryViewType } from '../../types/Stories.std.js'; -import { ForwardMessagesModalType } from '../../components/ForwardMessagesModal.dom.js'; +import { getIsStoriesSettingsVisible } from '../selectors/globalModals.std.ts'; +import type { StoryViewType } from '../../types/Stories.std.ts'; +import { ForwardMessagesModalType } from '../../components/ForwardMessagesModal.dom.tsx'; function renderStoryCreator(): React.JSX.Element { return ; diff --git a/ts/state/smart/StoryCreator.preload.tsx b/ts/state/smart/StoryCreator.preload.tsx index 79e30c1db1..2230846a99 100644 --- a/ts/state/smart/StoryCreator.preload.tsx +++ b/ts/state/smart/StoryCreator.preload.tsx @@ -3,13 +3,13 @@ import React, { memo, useMemo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { ThemeType } from '../../types/Util.std.js'; -import { LinkPreviewSourceType } from '../../types/LinkPreview.std.js'; +import { ThemeType } from '../../types/Util.std.ts'; +import { LinkPreviewSourceType } from '../../types/LinkPreview.std.ts'; import type { DraftBodyRanges, HydratedBodyRangesType, -} from '../../types/BodyRange.std.js'; -import { StoryCreator } from '../../components/StoryCreator.dom.js'; +} from '../../types/BodyRange.std.ts'; +import { StoryCreator } from '../../components/StoryCreator.dom.tsx'; import { getCandidateContactsForNewGroup, getConversationSelector, @@ -17,33 +17,33 @@ import { getMe, getNonGroupStories, selectMostRecentActiveStoryTimestampByGroupOrDistributionList, -} from '../selectors/conversations.dom.js'; -import { getAllSignalConnections } from '../selectors/conversations-extra.preload.js'; -import { getDistributionListsWithMembers } from '../selectors/storyDistributionLists.dom.js'; +} from '../selectors/conversations.dom.ts'; +import { getAllSignalConnections } from '../selectors/conversations-extra.preload.ts'; +import { getDistributionListsWithMembers } from '../selectors/storyDistributionLists.dom.ts'; import { getIntl, getPlatform, getUserConversationId, -} from '../selectors/user.std.js'; -import { getAddStoryData } from '../selectors/stories.preload.js'; -import { getLinkPreview } from '../selectors/linkPreviews.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +} from '../selectors/user.std.ts'; +import { getAddStoryData } from '../selectors/stories.preload.ts'; +import { getLinkPreview } from '../selectors/linkPreviews.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; import { getEmojiSkinToneDefault, getHasSetMyStoriesPrivacy, getTextFormattingEnabled, -} from '../selectors/items.dom.js'; -import { imageToBlurHash } from '../../util/imageToBlurHash.dom.js'; -import { processAttachment } from '../../util/processAttachment.preload.js'; -import { hydrateRanges } from '../../util/BodyRange.node.js'; -import { useEmojisActions } from '../ducks/emojis.preload.js'; -import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useLinkPreviewActions } from '../ducks/linkPreviews.preload.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { useStoryDistributionListsActions } from '../ducks/storyDistributionLists.preload.js'; +} from '../selectors/items.dom.ts'; +import { imageToBlurHash } from '../../util/imageToBlurHash.dom.ts'; +import { processAttachment } from '../../util/processAttachment.preload.ts'; +import { hydrateRanges } from '../../util/BodyRange.node.ts'; +import { useEmojisActions } from '../ducks/emojis.preload.ts'; +import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useLinkPreviewActions } from '../ducks/linkPreviews.preload.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { useStoryDistributionListsActions } from '../ducks/storyDistributionLists.preload.ts'; export type PropsType = { file?: File; diff --git a/ts/state/smart/StoryViewer.preload.tsx b/ts/state/smart/StoryViewer.preload.tsx index ba4f1c96a6..1933cc3fcb 100644 --- a/ts/state/smart/StoryViewer.preload.tsx +++ b/ts/state/smart/StoryViewer.preload.tsx @@ -3,41 +3,41 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { StoryViewer } from '../../components/StoryViewer.dom.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { getConversationSelector } from '../selectors/conversations.dom.js'; +import { StoryViewer } from '../../components/StoryViewer.dom.tsx'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { getConversationSelector } from '../selectors/conversations.dom.ts'; import { getEmojiSkinToneDefault, getHasStoryViewReceiptSetting, getPreferredReactionEmoji, getTextFormattingEnabled, isInternalUser, -} from '../selectors/items.dom.js'; +} from '../selectors/items.dom.ts'; import { getIntl, getPlatform, getUserConversationId, -} from '../selectors/user.std.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +} from '../selectors/user.std.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; import { getSelectedStoryData, getStoryReplies, getStoryByIdSelector, getHasAllStoriesUnmuted, -} from '../selectors/stories.preload.js'; -import { isInFullScreenCall } from '../selectors/calling.std.js'; -import { isSignalConversation as getIsSignalConversation } from '../../util/isSignalConversation.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { asyncShouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.js'; -import { useEmojisActions } from '../ducks/emojis.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { useIsWindowActive } from '../../hooks/useIsWindowActive.dom.js'; -import type { DraftBodyRanges } from '../../types/BodyRange.std.js'; -import type { StoryViewType } from '../../types/Stories.std.js'; +} from '../selectors/stories.preload.ts'; +import { isInFullScreenCall } from '../selectors/calling.std.ts'; +import { isSignalConversation as getIsSignalConversation } from '../../util/isSignalConversation.dom.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { asyncShouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.ts'; +import { useEmojisActions } from '../ducks/emojis.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useAudioPlayerActions } from '../ducks/audioPlayer.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { useIsWindowActive } from '../../hooks/useIsWindowActive.dom.ts'; +import type { DraftBodyRanges } from '../../types/BodyRange.std.ts'; +import type { StoryViewType } from '../../types/Stories.std.ts'; export const SmartStoryViewer = memo(function SmartStoryViewer() { const { diff --git a/ts/state/smart/TerminateGroupFailedModal.preload.tsx b/ts/state/smart/TerminateGroupFailedModal.preload.tsx index 7659fb0c9e..c3a699093b 100644 --- a/ts/state/smart/TerminateGroupFailedModal.preload.tsx +++ b/ts/state/smart/TerminateGroupFailedModal.preload.tsx @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { TerminateGroupFailedModal } from '../../components/TerminateGroupFailedModal.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; +import { TerminateGroupFailedModal } from '../../components/TerminateGroupFailedModal.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; export type SmartTerminateGroupFailedModalProps = { conversationId: string; diff --git a/ts/state/smart/Timeline.preload.tsx b/ts/state/smart/Timeline.preload.tsx index 8849a0524f..b66102adb9 100644 --- a/ts/state/smart/Timeline.preload.tsx +++ b/ts/state/smart/Timeline.preload.tsx @@ -5,10 +5,10 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; import { isEqual } from 'lodash'; -import { Timeline } from '../../components/conversation/Timeline.dom.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +import { Timeline } from '../../components/conversation/Timeline.dom.tsx'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; import { getConversationMessagesSelector, getConversationSelector, @@ -16,27 +16,27 @@ import { getInvitedContactsForNewlyCreatedGroup, getMessages, getTargetedMessage, -} from '../selectors/conversations.dom.js'; -import { getSelectedConversationId } from '../selectors/nav.std.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { SmartContactSpoofingReviewDialog } from './ContactSpoofingReviewDialog.preload.js'; -import { SmartHeroRow } from './HeroRow.preload.js'; -import { SmartTimelineItem } from './TimelineItem.preload.js'; -import { SmartTypingBubble } from './TypingBubble.preload.js'; -import { AttachmentDownloadManager } from '../../jobs/AttachmentDownloadManager.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getSelectedConversationId } from '../selectors/nav.std.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { SmartContactSpoofingReviewDialog } from './ContactSpoofingReviewDialog.preload.tsx'; +import { SmartHeroRow } from './HeroRow.preload.tsx'; +import { SmartTimelineItem } from './TimelineItem.preload.tsx'; +import { SmartTypingBubble } from './TypingBubble.preload.tsx'; +import { AttachmentDownloadManager } from '../../jobs/AttachmentDownloadManager.preload.ts'; import { getActiveCall, getCallSelector, isInFullScreenCall as getIsInFullScreenCall, -} from '../selectors/calling.std.js'; -import { getMidnight } from '../../types/NotificationProfile.std.js'; +} from '../selectors/calling.std.ts'; +import { getMidnight } from '../../types/NotificationProfile.std.ts'; -import type { PropsType as SmartContactSpoofingReviewDialogPropsType } from './ContactSpoofingReviewDialog.preload.js'; -import type { RenderItemProps } from './TimelineItem.preload.js'; -import { getCallHistorySelector } from '../selectors/callHistory.std.js'; -import { getCallIdFromEra } from '../../util/callDisposition.preload.js'; -import { mapItemsIntoCollapseSets } from '../../util/CollapseSet.std.js'; -import type { CollapseSet } from '../../util/CollapseSet.std.js'; +import type { PropsType as SmartContactSpoofingReviewDialogPropsType } from './ContactSpoofingReviewDialog.preload.tsx'; +import type { RenderItemProps } from './TimelineItem.preload.tsx'; +import { getCallHistorySelector } from '../selectors/callHistory.std.ts'; +import { getCallIdFromEra } from '../../util/callDisposition.preload.ts'; +import { mapItemsIntoCollapseSets } from '../../util/CollapseSet.std.ts'; +import type { CollapseSet } from '../../util/CollapseSet.std.ts'; type ExternalProps = { id: string; diff --git a/ts/state/smart/TimelineItem.preload.tsx b/ts/state/smart/TimelineItem.preload.tsx index 81661430e4..4fbdb97e82 100644 --- a/ts/state/smart/TimelineItem.preload.tsx +++ b/ts/state/smart/TimelineItem.preload.tsx @@ -5,48 +5,48 @@ import type { RefObject } from 'react'; import React, { useCallback, memo } from 'react'; import { useSelector } from 'react-redux'; -import { TimelineItem } from '../../components/conversation/TimelineItem.dom.js'; -import type { WidthBreakpoint } from '../../components/_util.std.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useComposerActions } from '../ducks/composer.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useAccountsActions } from '../ducks/accounts.preload.js'; -import { useLightboxActions } from '../ducks/lightbox.preload.js'; -import { useStoriesActions } from '../ducks/stories.preload.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +import { TimelineItem } from '../../components/conversation/TimelineItem.dom.tsx'; +import type { WidthBreakpoint } from '../../components/_util.std.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useComposerActions } from '../ducks/composer.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useAccountsActions } from '../ducks/accounts.preload.ts'; +import { useLightboxActions } from '../ducks/lightbox.preload.ts'; +import { useStoriesActions } from '../ducks/stories.preload.ts'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; import { getIntl, getInteractionMode, getTheme, getPlatform, -} from '../selectors/user.std.js'; +} from '../selectors/user.std.ts'; import { getSelectedMessageIds, getTargetedMessage, getTargetedMessageSource, -} from '../selectors/conversations.dom.js'; -import { getSharedGroupNames } from '../../util/sharedGroupNames.dom.js'; -import { startConversation } from '../../util/startConversation.dom.js'; -import { useTimelineItem } from '../selectors/timeline.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getSharedGroupNames } from '../../util/sharedGroupNames.dom.ts'; +import { startConversation } from '../../util/startConversation.dom.ts'; +import { useTimelineItem } from '../selectors/timeline.preload.ts'; import { areMessagesInSameGroup, shouldCurrentMessageHideMetadata, UnreadIndicatorPlacement, -} from '../../util/timelineUtil.std.js'; +} from '../../util/timelineUtil.std.ts'; -import { SmartContactName } from './ContactName.preload.js'; -import { SmartUniversalTimerNotification } from './UniversalTimerNotification.dom.js'; -import { isSameDay } from '../../util/timestamp.std.js'; -import { renderAudioAttachment } from './renderAudioAttachment.preload.js'; -import { renderReactionPicker } from './renderReactionPicker.dom.js'; -import type { MessageRequestState } from '../../components/conversation/MessageRequestActionsConfirmation.dom.js'; -import { TargetedMessageSource } from '../ducks/conversationsEnums.std.js'; -import { MessageInteractivity } from '../../components/conversation/Message.dom.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { DataReader } from '../../sql/Client.preload.js'; -import { isInternalFeaturesEnabled } from '../../util/isInternalFeaturesEnabled.dom.js'; -import type { CollapseSet } from '../../util/CollapseSet.std.js'; +import { SmartContactName } from './ContactName.preload.tsx'; +import { SmartUniversalTimerNotification } from './UniversalTimerNotification.dom.tsx'; +import { isSameDay } from '../../util/timestamp.std.ts'; +import { renderAudioAttachment } from './renderAudioAttachment.preload.tsx'; +import { renderReactionPicker } from './renderReactionPicker.dom.tsx'; +import type { MessageRequestState } from '../../components/conversation/MessageRequestActionsConfirmation.dom.tsx'; +import { TargetedMessageSource } from '../ducks/conversationsEnums.std.ts'; +import { MessageInteractivity } from '../../components/conversation/Message.dom.tsx'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { DataReader } from '../../sql/Client.preload.ts'; +import { isInternalFeaturesEnabled } from '../../util/isInternalFeaturesEnabled.dom.ts'; +import type { CollapseSet } from '../../util/CollapseSet.std.ts'; export type RenderItemProps = Omit; diff --git a/ts/state/smart/ToastManager.preload.tsx b/ts/state/smart/ToastManager.preload.tsx index f51b942983..182c1fb769 100644 --- a/ts/state/smart/ToastManager.preload.tsx +++ b/ts/state/smart/ToastManager.preload.tsx @@ -3,39 +3,39 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import type { AnyActionableMegaphone } from '../../types/Megaphone.std.js'; -import { MegaphoneType } from '../../types/Megaphone.std.js'; -import { UsernameOnboardingState } from '../../types/globalModals.std.js'; -import OS from '../../util/os/osMain.node.js'; -import { drop } from '../../util/drop.std.js'; -import { getIntl } from '../selectors/user.std.js'; +import type { AnyActionableMegaphone } from '../../types/Megaphone.std.ts'; +import { MegaphoneType } from '../../types/Megaphone.std.ts'; +import { UsernameOnboardingState } from '../../types/globalModals.std.ts'; +import OS from '../../util/os/osMain.node.ts'; +import { drop } from '../../util/drop.std.ts'; +import { getIntl } from '../selectors/user.std.ts'; import { getGlobalModalsState, isShowingAnyModal as getIsShowingAnyModal, -} from '../selectors/globalModals.std.js'; -import { hasSelectedStoryData } from '../selectors/stories.preload.js'; -import { shouldShowLightbox } from '../selectors/lightbox.std.js'; -import { isInFullScreenCall as getIsInFullScreenCall } from '../selectors/calling.std.js'; +} from '../selectors/globalModals.std.ts'; +import { hasSelectedStoryData } from '../selectors/stories.preload.ts'; +import { shouldShowLightbox } from '../selectors/lightbox.std.ts'; +import { isInFullScreenCall as getIsInFullScreenCall } from '../selectors/calling.std.ts'; import { getSelectedConversationId, getSelectedNavTab, -} from '../selectors/nav.std.js'; -import { getMe } from '../selectors/conversations.dom.js'; -import { useConversationsActions } from '../ducks/conversations.preload.js'; -import { useCallingActions } from '../ducks/calling.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; -import { NavTab } from '../../types/Nav.std.js'; -import { getHasCompletedUsernameOnboarding } from '../selectors/items.dom.js'; -import { ToastManager } from '../../components/ToastManager.dom.js'; -import type { WidthBreakpoint } from '../../components/_util.std.js'; -import { getToast } from '../selectors/toast.std.js'; -import { useDonationsActions } from '../ducks/donations.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { getVisibleMegaphonesForDisplay } from '../selectors/megaphones.preload.js'; -import { useMegaphonesActions } from '../ducks/megaphones.preload.js'; -import { shouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.js'; +} from '../selectors/nav.std.ts'; +import { getMe } from '../selectors/conversations.dom.ts'; +import { useConversationsActions } from '../ducks/conversations.preload.ts'; +import { useCallingActions } from '../ducks/calling.preload.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; +import { NavTab } from '../../types/Nav.std.ts'; +import { getHasCompletedUsernameOnboarding } from '../selectors/items.dom.ts'; +import { ToastManager } from '../../components/ToastManager.dom.tsx'; +import type { WidthBreakpoint } from '../../components/_util.std.ts'; +import { getToast } from '../selectors/toast.std.ts'; +import { useDonationsActions } from '../ducks/donations.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { getVisibleMegaphonesForDisplay } from '../selectors/megaphones.preload.ts'; +import { useMegaphonesActions } from '../ducks/megaphones.preload.ts'; +import { shouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.ts'; export type SmartPropsType = Readonly<{ disableMegaphone?: boolean; diff --git a/ts/state/smart/TypingBubble.preload.tsx b/ts/state/smart/TypingBubble.preload.tsx index 2b4bc71887..ee3ff741c5 100644 --- a/ts/state/smart/TypingBubble.preload.tsx +++ b/ts/state/smart/TypingBubble.preload.tsx @@ -4,15 +4,15 @@ import lodash from 'lodash'; import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { TypingBubble } from '../../components/conversation/TypingBubble.dom.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { getIntl, getTheme } from '../selectors/user.std.js'; -import { useTimelineItem } from '../selectors/timeline.preload.js'; +import { TypingBubble } from '../../components/conversation/TypingBubble.dom.tsx'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { getIntl, getTheme } from '../selectors/user.std.ts'; +import { useTimelineItem } from '../selectors/timeline.preload.ts'; import { getConversationSelector, getConversationMessagesSelector, -} from '../selectors/conversations.dom.js'; -import { getPreferredBadgeSelector } from '../selectors/badges.preload.js'; +} from '../selectors/conversations.dom.ts'; +import { getPreferredBadgeSelector } from '../selectors/badges.preload.ts'; const { last } = lodash; diff --git a/ts/state/smart/UniversalTimerNotification.dom.tsx b/ts/state/smart/UniversalTimerNotification.dom.tsx index 91669cc8bb..91b340e534 100644 --- a/ts/state/smart/UniversalTimerNotification.dom.tsx +++ b/ts/state/smart/UniversalTimerNotification.dom.tsx @@ -3,9 +3,9 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { UniversalTimerNotification } from '../../components/conversation/UniversalTimerNotification.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { getUniversalExpireTimer } from '../selectors/items.dom.js'; +import { UniversalTimerNotification } from '../../components/conversation/UniversalTimerNotification.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { getUniversalExpireTimer } from '../selectors/items.dom.ts'; export const SmartUniversalTimerNotification = memo( function SmartUniversalTimerNotification() { diff --git a/ts/state/smart/UnsupportedOSDialog.preload.tsx b/ts/state/smart/UnsupportedOSDialog.preload.tsx index 83391c683a..14217e1e74 100644 --- a/ts/state/smart/UnsupportedOSDialog.preload.tsx +++ b/ts/state/smart/UnsupportedOSDialog.preload.tsx @@ -3,11 +3,11 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { UnsupportedOSDialog } from '../../components/UnsupportedOSDialog.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { getExpirationTimestamp } from '../selectors/expiration.dom.js'; -import type { WidthBreakpoint } from '../../components/_util.std.js'; -import OS from '../../util/os/osMain.node.js'; +import { UnsupportedOSDialog } from '../../components/UnsupportedOSDialog.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { getExpirationTimestamp } from '../selectors/expiration.dom.ts'; +import type { WidthBreakpoint } from '../../components/_util.std.ts'; +import OS from '../../util/os/osMain.node.ts'; export type PropsType = Readonly<{ type: 'warning' | 'error'; diff --git a/ts/state/smart/UpdateDialog.preload.tsx b/ts/state/smart/UpdateDialog.preload.tsx index a6f7307412..8f0dd9b02e 100644 --- a/ts/state/smart/UpdateDialog.preload.tsx +++ b/ts/state/smart/UpdateDialog.preload.tsx @@ -3,17 +3,17 @@ import { useSelector } from 'react-redux'; import React, { memo } from 'react'; -import { DialogUpdate } from '../../components/DialogUpdate.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import type { WidthBreakpoint } from '../../components/_util.std.js'; -import { useUpdatesActions } from '../ducks/updates.preload.js'; +import { DialogUpdate } from '../../components/DialogUpdate.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import type { WidthBreakpoint } from '../../components/_util.std.ts'; +import { useUpdatesActions } from '../ducks/updates.preload.ts'; import { getUpdateDialogType, getUpdateDownloadSize, getUpdateDownloadedSize, getUpdateVersion, -} from '../selectors/updates.std.js'; -import { DialogType } from '../../types/Dialogs.std.js'; +} from '../selectors/updates.std.ts'; +import { DialogType } from '../../types/Dialogs.std.ts'; type SmartUpdateDialogProps = Readonly<{ containerWidthBreakpoint: WidthBreakpoint; diff --git a/ts/state/smart/UsernameEditor.preload.tsx b/ts/state/smart/UsernameEditor.preload.tsx index 12d956318a..c4d77addb2 100644 --- a/ts/state/smart/UsernameEditor.preload.tsx +++ b/ts/state/smart/UsernameEditor.preload.tsx @@ -2,19 +2,19 @@ // SPDX-License-Identifier: AGPL-3.0-only import React, { memo } from 'react'; import { useSelector } from 'react-redux'; -import { UsernameEditor } from '../../components/UsernameEditor.dom.js'; -import { getMinNickname, getMaxNickname } from '../../util/Username.dom.js'; -import { getIntl } from '../selectors/user.std.js'; +import { UsernameEditor } from '../../components/UsernameEditor.dom.tsx'; +import { getMinNickname, getMaxNickname } from '../../util/Username.dom.ts'; +import { getIntl } from '../selectors/user.std.ts'; import { getUsernameReservationState, getUsernameReservationObject, getUsernameReservationError, getRecoveredUsername, -} from '../selectors/username.std.js'; -import { getUsernameCorrupted } from '../selectors/items.dom.js'; -import { getMe } from '../selectors/conversations.dom.js'; -import { useUsernameActions } from '../ducks/username.preload.js'; -import { useToastActions } from '../ducks/toast.preload.js'; +} from '../selectors/username.std.ts'; +import { getUsernameCorrupted } from '../selectors/items.dom.ts'; +import { getMe } from '../selectors/conversations.dom.ts'; +import { useUsernameActions } from '../ducks/username.preload.ts'; +import { useToastActions } from '../ducks/toast.preload.ts'; export type SmartUsernameEditorProps = Readonly<{ onClose(): void; diff --git a/ts/state/smart/UsernameOnboardingModal.preload.tsx b/ts/state/smart/UsernameOnboardingModal.preload.tsx index b5aee76c29..8b34bc53cf 100644 --- a/ts/state/smart/UsernameOnboardingModal.preload.tsx +++ b/ts/state/smart/UsernameOnboardingModal.preload.tsx @@ -4,17 +4,17 @@ import React, { memo, useCallback } from 'react'; import { useSelector } from 'react-redux'; -import { UsernameOnboardingModal } from '../../components/UsernameOnboardingModal.dom.js'; -import { getIntl } from '../selectors/user.std.js'; -import { useGlobalModalActions } from '../ducks/globalModals.preload.js'; -import { useUsernameActions } from '../ducks/username.preload.js'; -import { useNavActions } from '../ducks/nav.std.js'; +import { UsernameOnboardingModal } from '../../components/UsernameOnboardingModal.dom.tsx'; +import { getIntl } from '../selectors/user.std.ts'; +import { useGlobalModalActions } from '../ducks/globalModals.preload.ts'; +import { useUsernameActions } from '../ducks/username.preload.ts'; +import { useNavActions } from '../ducks/nav.std.ts'; import { NavTab, SettingsPage, ProfileEditorPage, -} from '../../types/Nav.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../types/Nav.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; export const SmartUsernameOnboardingModal = memo( function SmartUsernameOnboardingModal(): React.JSX.Element { diff --git a/ts/state/smart/VoiceNotesPlaybackProvider.preload.tsx b/ts/state/smart/VoiceNotesPlaybackProvider.preload.tsx index 7f8abc2621..8bd086e12e 100644 --- a/ts/state/smart/VoiceNotesPlaybackProvider.preload.tsx +++ b/ts/state/smart/VoiceNotesPlaybackProvider.preload.tsx @@ -3,23 +3,23 @@ import React, { memo, useEffect } from 'react'; import { useSelector } from 'react-redux'; -import type { VoiceNotesPlaybackProps } from '../../components/VoiceNotesPlaybackContext.dom.js'; -import { VoiceNotesPlaybackProvider } from '../../components/VoiceNotesPlaybackContext.dom.js'; -import { selectAudioPlayerActive } from '../selectors/audioPlayer.preload.js'; +import type { VoiceNotesPlaybackProps } from '../../components/VoiceNotesPlaybackContext.dom.tsx'; +import { VoiceNotesPlaybackProvider } from '../../components/VoiceNotesPlaybackContext.dom.tsx'; +import { selectAudioPlayerActive } from '../selectors/audioPlayer.preload.ts'; import { AudioPlayerContent, useAudioPlayerActions, -} from '../ducks/audioPlayer.preload.js'; -import { globalMessageAudio } from '../../services/globalMessageAudio.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { drop } from '../../util/drop.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { Sound, SoundType } from '../../util/Sound.std.js'; -import { getConversations } from '../selectors/conversations.dom.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; -import { markViewed } from '../ducks/conversations.preload.js'; -import * as Errors from '../../types/errors.std.js'; -import { usePrevious } from '../../hooks/usePrevious.std.js'; +} from '../ducks/audioPlayer.preload.ts'; +import { globalMessageAudio } from '../../services/globalMessageAudio.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { Sound, SoundType } from '../../util/Sound.std.ts'; +import { getConversations } from '../selectors/conversations.dom.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; +import { markViewed } from '../ducks/conversations.preload.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { usePrevious } from '../../hooks/usePrevious.std.ts'; const log = createLogger('VoiceNotesPlaybackProvider'); diff --git a/ts/state/smart/Waveform.dom.tsx b/ts/state/smart/Waveform.dom.tsx index 5c540e6f5a..f36981b68e 100644 --- a/ts/state/smart/Waveform.dom.tsx +++ b/ts/state/smart/Waveform.dom.tsx @@ -3,10 +3,10 @@ import lodash from 'lodash'; import React, { memo, useEffect, useState } from 'react'; -import { Waveform } from '../../components/conversation/Waveform.dom.js'; -import type { ComputePeaksResult } from '../../components/VoiceNotesPlaybackContext.dom.js'; -import { VoiceNotesPlaybackContext } from '../../components/VoiceNotesPlaybackContext.dom.js'; -import { createLogger } from '../../logging/log.std.js'; +import { Waveform } from '../../components/conversation/Waveform.dom.tsx'; +import type { ComputePeaksResult } from '../../components/VoiceNotesPlaybackContext.dom.tsx'; +import { VoiceNotesPlaybackContext } from '../../components/VoiceNotesPlaybackContext.dom.tsx'; +import { createLogger } from '../../logging/log.std.ts'; const { noop } = lodash; diff --git a/ts/state/smart/renderAudioAttachment.preload.tsx b/ts/state/smart/renderAudioAttachment.preload.tsx index 02d5e214cf..43f211d307 100644 --- a/ts/state/smart/renderAudioAttachment.preload.tsx +++ b/ts/state/smart/renderAudioAttachment.preload.tsx @@ -3,9 +3,9 @@ import type { ReactElement } from 'react'; import React from 'react'; -import { VoiceNotesPlaybackContext } from '../../components/VoiceNotesPlaybackContext.dom.js'; -import type { Props as MessageAudioProps } from './MessageAudio.preload.js'; -import { SmartMessageAudio } from './MessageAudio.preload.js'; +import { VoiceNotesPlaybackContext } from '../../components/VoiceNotesPlaybackContext.dom.tsx'; +import type { Props as MessageAudioProps } from './MessageAudio.preload.tsx'; +import { SmartMessageAudio } from './MessageAudio.preload.tsx'; export type RenderAudioAttachmentProps = Omit< MessageAudioProps, diff --git a/ts/state/smart/renderReactionPicker.dom.tsx b/ts/state/smart/renderReactionPicker.dom.tsx index 8d32cac72c..05be40968e 100644 --- a/ts/state/smart/renderReactionPicker.dom.tsx +++ b/ts/state/smart/renderReactionPicker.dom.tsx @@ -4,7 +4,7 @@ import type { ComponentProps } from 'react'; import React from 'react'; -import { SmartReactionPicker } from './ReactionPicker.dom.js'; +import { SmartReactionPicker } from './ReactionPicker.dom.tsx'; export const renderReactionPicker = ( props: ComponentProps diff --git a/ts/state/types.std.ts b/ts/state/types.std.ts index 1ac20b8c84..8904765909 100644 --- a/ts/state/types.std.ts +++ b/ts/state/types.std.ts @@ -4,43 +4,43 @@ import type { Selector } from 'reselect'; import type { ThunkAction } from 'redux-thunk'; import type { Action } from 'redux'; -import type { StateType } from './reducer.preload.js'; -import type { actions as accounts } from './ducks/accounts.preload.js'; -import type { actions as app } from './ducks/app.preload.js'; -import type { actions as audioPlayer } from './ducks/audioPlayer.preload.js'; -import type { actions as audioRecorder } from './ducks/audioRecorder.preload.js'; -import type { actions as backups } from './ducks/backups.preload.js'; -import type { actions as badges } from './ducks/badges.preload.js'; -import type { actions as callHistory } from './ducks/callHistory.preload.js'; -import type { actions as calling } from './ducks/calling.preload.js'; -import type { actions as chatFolders } from './ducks/chatFolders.preload.js'; -import type { actions as composer } from './ducks/composer.preload.js'; -import type { actions as conversations } from './ducks/conversations.preload.js'; -import type { actions as crashReports } from './ducks/crashReports.preload.js'; -import type { actions as donations } from './ducks/donations.preload.js'; -import type { actions as emojis } from './ducks/emojis.preload.js'; -import type { actions as expiration } from './ducks/expiration.std.js'; -import type { actions as gifs } from './ducks/gifs.preload.js'; -import type { actions as globalModals } from './ducks/globalModals.preload.js'; -import type { actions as inbox } from './ducks/inbox.std.js'; -import type { actions as installer } from './ducks/installer.preload.js'; -import type { actions as items } from './ducks/items.preload.js'; -import type { actions as lightbox } from './ducks/lightbox.preload.js'; -import type { actions as linkPreviews } from './ducks/linkPreviews.preload.js'; -import type { actions as mediaGallery } from './ducks/mediaGallery.preload.js'; -import type { actions as megaphones } from './ducks/megaphones.preload.js'; -import type { actions as nav } from './ducks/nav.std.js'; -import type { actions as network } from './ducks/network.dom.js'; -import type { actions as notificationProfiles } from './ducks/notificationProfiles.preload.js'; -import type { actions as safetyNumber } from './ducks/safetyNumber.preload.js'; -import type { actions as search } from './ducks/search.preload.js'; -import type { actions as stickers } from './ducks/stickers.preload.js'; -import type { actions as stories } from './ducks/stories.preload.js'; -import type { actions as storyDistributionLists } from './ducks/storyDistributionLists.preload.js'; -import type { actions as toast } from './ducks/toast.preload.js'; -import type { actions as updates } from './ducks/updates.preload.js'; -import type { actions as user } from './ducks/user.preload.js'; -import type { actions as username } from './ducks/username.preload.js'; +import type { StateType } from './reducer.preload.ts'; +import type { actions as accounts } from './ducks/accounts.preload.ts'; +import type { actions as app } from './ducks/app.preload.ts'; +import type { actions as audioPlayer } from './ducks/audioPlayer.preload.ts'; +import type { actions as audioRecorder } from './ducks/audioRecorder.preload.ts'; +import type { actions as backups } from './ducks/backups.preload.ts'; +import type { actions as badges } from './ducks/badges.preload.ts'; +import type { actions as callHistory } from './ducks/callHistory.preload.ts'; +import type { actions as calling } from './ducks/calling.preload.ts'; +import type { actions as chatFolders } from './ducks/chatFolders.preload.ts'; +import type { actions as composer } from './ducks/composer.preload.ts'; +import type { actions as conversations } from './ducks/conversations.preload.ts'; +import type { actions as crashReports } from './ducks/crashReports.preload.ts'; +import type { actions as donations } from './ducks/donations.preload.ts'; +import type { actions as emojis } from './ducks/emojis.preload.ts'; +import type { actions as expiration } from './ducks/expiration.std.ts'; +import type { actions as gifs } from './ducks/gifs.preload.ts'; +import type { actions as globalModals } from './ducks/globalModals.preload.ts'; +import type { actions as inbox } from './ducks/inbox.std.ts'; +import type { actions as installer } from './ducks/installer.preload.ts'; +import type { actions as items } from './ducks/items.preload.ts'; +import type { actions as lightbox } from './ducks/lightbox.preload.ts'; +import type { actions as linkPreviews } from './ducks/linkPreviews.preload.ts'; +import type { actions as mediaGallery } from './ducks/mediaGallery.preload.ts'; +import type { actions as megaphones } from './ducks/megaphones.preload.ts'; +import type { actions as nav } from './ducks/nav.std.ts'; +import type { actions as network } from './ducks/network.dom.ts'; +import type { actions as notificationProfiles } from './ducks/notificationProfiles.preload.ts'; +import type { actions as safetyNumber } from './ducks/safetyNumber.preload.ts'; +import type { actions as search } from './ducks/search.preload.ts'; +import type { actions as stickers } from './ducks/stickers.preload.ts'; +import type { actions as stories } from './ducks/stories.preload.ts'; +import type { actions as storyDistributionLists } from './ducks/storyDistributionLists.preload.ts'; +import type { actions as toast } from './ducks/toast.preload.ts'; +import type { actions as updates } from './ducks/updates.preload.ts'; +import type { actions as user } from './ducks/user.preload.ts'; +import type { actions as username } from './ducks/username.preload.ts'; export type ReduxActions = { accounts: typeof accounts; diff --git a/ts/storybook/Fixtures.std.ts b/ts/storybook/Fixtures.std.ts index 18ccbf6796..c53fe6f193 100644 --- a/ts/storybook/Fixtures.std.ts +++ b/ts/storybook/Fixtures.std.ts @@ -1,31 +1,20 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -// @ts-expect-error -- image file -import gif from '../../fixtures/giphy-GVNvOUpeYmI7e.gif'; -// @ts-expect-error -- image file -import png from '../../fixtures/freepngs-2cd43b_bed7d1327e88454487397574d87b64dc_mv2.png'; -// @ts-expect-error -- image file -import landscapeGreen from '../../fixtures/1000x50-green.jpeg'; -// @ts-expect-error -- image file -import landscapePurple from '../../fixtures/200x50-purple.png'; -// @ts-expect-error -- image file -import portraitTeal from '../../fixtures/50x1000-teal.jpeg'; -// @ts-expect-error -- image file -import squareSticker from '../../fixtures/512x515-thumbs-up-lincoln.webp'; // 320x240 -export const gifUrl = `/${gif}`; +export const gifUrl = '/fixtures/giphy-GVNvOUpeYmI7e.gif'; // 800×1200 -export const pngUrl = `/${png}`; +export const pngUrl = + '/fixtures/freepngs-2cd43b_bed7d1327e88454487397574d87b64dc_mv2.png'; // 1000x50 -export const landscapeGreenUrl = `/${landscapeGreen}`; +export const landscapeGreenUrl = '/fixtures/1000x50-green.jpeg'; // 200x50 -export const landscapePurpleUrl = `/${landscapePurple}`; +export const landscapePurpleUrl = '/fixtures/200x50-purple.png'; // 50x1000 -export const portraitTealUrl = `/${portraitTeal}`; +export const portraitTealUrl = '/fixtures/50x1000-teal.jpeg'; -export const squareStickerUrl = `/${squareSticker}`; +export const squareStickerUrl = '/fixtures/512x515-thumbs-up-lincoln.webp'; diff --git a/ts/test-electron/ContactsParser_test.preload.ts b/ts/test-electron/ContactsParser_test.preload.ts index 94ccc348c8..69b3053281 100644 --- a/ts/test-electron/ContactsParser_test.preload.ts +++ b/ts/test-electron/ContactsParser_test.preload.ts @@ -15,29 +15,29 @@ import { pipeline } from 'node:stream/promises'; import { Transform } from 'node:stream'; import fse from 'fs-extra'; -import { createLogger } from '../logging/log.std.js'; -import * as Bytes from '../Bytes.std.js'; -import * as Errors from '../types/errors.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import * as Errors from '../types/errors.std.ts'; import { getAbsoluteAttachmentPath, maybeDeleteAttachmentFile, readAttachmentData, -} from '../util/migrations.preload.js'; -import { APPLICATION_OCTET_STREAM } from '../types/MIME.std.js'; -import { type AciString, generateAci } from '../types/ServiceId.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +} from '../util/migrations.preload.ts'; +import { APPLICATION_OCTET_STREAM } from '../types/MIME.std.ts'; +import { type AciString, generateAci } from '../types/ServiceId.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; import { ParseContactsTransform, parseContactsV2, -} from '../textsecure/ContactsParser.preload.js'; -import type { ContactDetailsWithAvatar } from '../textsecure/ContactsParser.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { encodeDelimited } from '../util/encodeDelimited.std.js'; -import { toAciObject } from '../util/ServiceId.node.js'; +} from '../textsecure/ContactsParser.preload.ts'; +import type { ContactDetailsWithAvatar } from '../textsecure/ContactsParser.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { encodeDelimited } from '../util/encodeDelimited.std.ts'; +import { toAciObject } from '../util/ServiceId.node.ts'; import { generateKeys, encryptAttachmentV2ToDisk, -} from '../AttachmentCrypto.node.js'; +} from '../AttachmentCrypto.node.ts'; const log = createLogger('ContactsParser_test'); diff --git a/ts/test-electron/ConversationController_test.preload.ts b/ts/test-electron/ConversationController_test.preload.ts index 468eacb0ab..9ba128f456 100644 --- a/ts/test-electron/ConversationController_test.preload.ts +++ b/ts/test-electron/ConversationController_test.preload.ts @@ -3,18 +3,18 @@ import { assert } from 'chai'; -import { strictAssert } from '../util/assert.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; import type { AciString, PniString, ServiceIdString, -} from '../types/ServiceId.std.js'; -import { generateAci, generatePni } from '../types/ServiceId.std.js'; -import type { SafeCombineConversationsParams } from '../ConversationController.preload.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; +} from '../types/ServiceId.std.ts'; +import { generateAci, generatePni } from '../types/ServiceId.std.ts'; +import type { SafeCombineConversationsParams } from '../ConversationController.preload.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; const ACI_1 = generateAci(); const ACI_2 = generateAci(); diff --git a/ts/test-electron/Crypto_test.preload.ts b/ts/test-electron/Crypto_test.preload.ts index 770c267f0a..16927f4959 100644 --- a/ts/test-electron/Crypto_test.preload.ts +++ b/ts/test-electron/Crypto_test.preload.ts @@ -10,8 +10,8 @@ import fsExtra from 'fs-extra'; import { assert } from 'chai'; import lodash from 'lodash'; -import * as Bytes from '../Bytes.std.js'; -import * as Curve from '../Curve.node.js'; +import * as Bytes from '../Bytes.std.ts'; +import * as Curve from '../Curve.node.ts'; import { PaddedLengths, encryptProfileItemWithPadding, @@ -40,7 +40,7 @@ import { CipherType, encryptDeviceCreatedAt, decryptDeviceCreatedAt, -} from '../Crypto.node.js'; +} from '../Crypto.node.ts'; import { _generateAttachmentIv, decryptAttachmentV2, @@ -49,17 +49,17 @@ import { generateAttachmentKeys, type DecryptedAttachmentV2, decryptAttachmentV2ToSink, -} from '../AttachmentCrypto.node.js'; -import type { AciString, PniString } from '../types/ServiceId.std.js'; -import { getAbsoluteAttachmentPath } from '../util/migrations.preload.js'; -import { uuidToBytes, bytesToUuid } from '../util/uuidToBytes.std.js'; +} from '../AttachmentCrypto.node.ts'; +import type { AciString, PniString } from '../types/ServiceId.std.ts'; +import { getAbsoluteAttachmentPath } from '../util/migrations.preload.ts'; +import { uuidToBytes, bytesToUuid } from '../util/uuidToBytes.std.ts'; import { getAesCbcCiphertextSize, getAttachmentCiphertextSize, -} from '../util/AttachmentCrypto.std.js'; -import { getAttachmentsPath } from '../windows/main/attachments.preload.js'; -import { MediaTier } from '../types/AttachmentDownload.std.js'; -import { deriveAccessKeyFromProfileKey } from '../util/zkgroup.node.js'; +} from '../util/AttachmentCrypto.std.ts'; +import { getAttachmentsPath } from '../../app/attachments.node.ts'; +import { MediaTier } from '../types/AttachmentDownload.std.ts'; +import { deriveAccessKeyFromProfileKey } from '../util/zkgroup.node.ts'; const { emptyDir } = fsExtra; diff --git a/ts/test-electron/Curve_test.node.ts b/ts/test-electron/Curve_test.node.ts index a837beb743..7a2daaf5ba 100644 --- a/ts/test-electron/Curve_test.node.ts +++ b/ts/test-electron/Curve_test.node.ts @@ -3,8 +3,8 @@ import { assert } from 'chai'; -import * as Bytes from '../Bytes.std.js'; -import { constantTimeEqual } from '../Crypto.node.js'; +import * as Bytes from '../Bytes.std.ts'; +import { constantTimeEqual } from '../Crypto.node.ts'; import { calculateSignature, clampPrivateKey, @@ -15,7 +15,7 @@ import { generateSignedPreKey, isNonNegativeInteger, verifySignature, -} from '../Curve.node.js'; +} from '../Curve.node.ts'; describe('Curve', () => { it('verifySignature roundtrip', () => { diff --git a/ts/test-electron/MessageReceipts_test.preload.ts b/ts/test-electron/MessageReceipts_test.preload.ts index 580d13d126..9f59930e2e 100644 --- a/ts/test-electron/MessageReceipts_test.preload.ts +++ b/ts/test-electron/MessageReceipts_test.preload.ts @@ -4,20 +4,20 @@ import { v4 as uuid } from 'uuid'; import { assert } from 'chai'; -import { type AciString, generateAci } from '../types/ServiceId.std.js'; +import { type AciString, generateAci } from '../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; import type { MessageReceiptAttributesType, MessageReceiptType, -} from '../messageModifiers/MessageReceipts.preload.js'; +} from '../messageModifiers/MessageReceipts.preload.ts'; import { onReceipt, messageReceiptTypeSchema, -} from '../messageModifiers/MessageReceipts.preload.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../messageModifiers/MessageReceipts.preload.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; describe('MessageReceipts', () => { let ourAci: AciString; diff --git a/ts/test-electron/MessageReceiver_test.preload.ts b/ts/test-electron/MessageReceiver_test.preload.ts index e0ecb1c9ce..aa492b50d8 100644 --- a/ts/test-electron/MessageReceiver_test.preload.ts +++ b/ts/test-electron/MessageReceiver_test.preload.ts @@ -3,20 +3,20 @@ import { assert } from 'chai'; -import MessageReceiver from '../textsecure/MessageReceiver.preload.js'; +import MessageReceiver from '../textsecure/MessageReceiver.preload.ts'; import { IncomingWebSocketRequest, ServerRequestType, -} from '../textsecure/WebsocketResources.preload.js'; -import type { DecryptionErrorEvent } from '../textsecure/messageReceiverEvents.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { toAciObject } from '../util/ServiceId.node.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import * as Crypto from '../Crypto.node.js'; -import { toBase64 } from '../Bytes.std.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../textsecure/WebsocketResources.preload.ts'; +import type { DecryptionErrorEvent } from '../textsecure/messageReceiverEvents.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { toAciObject } from '../util/ServiceId.node.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import * as Crypto from '../Crypto.node.ts'; +import { toBase64 } from '../Bytes.std.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; describe('MessageReceiver', () => { const someAci = generateAci(); diff --git a/ts/test-electron/SignalProtocolStore_test.preload.ts b/ts/test-electron/SignalProtocolStore_test.preload.ts index 0104458ba5..f68236e212 100644 --- a/ts/test-electron/SignalProtocolStore_test.preload.ts +++ b/ts/test-electron/SignalProtocolStore_test.preload.ts @@ -11,31 +11,31 @@ import { } from '@signalapp/libsignal-client'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; import { signal } from '../protobuf/compiled.std.js'; -import { sessionStructureToBytes } from '../util/sessionTranslation.node.js'; -import * as durations from '../util/durations/index.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { Zone } from '../util/Zone.std.js'; +import { sessionStructureToBytes } from '../util/sessionTranslation.node.ts'; +import * as durations from '../util/durations/index.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { Zone } from '../util/Zone.std.ts'; -import * as Bytes from '../Bytes.std.js'; -import { getRandomBytes, constantTimeEqual } from '../Crypto.node.js'; +import * as Bytes from '../Bytes.std.ts'; +import { getRandomBytes, constantTimeEqual } from '../Crypto.node.ts'; import { clampPrivateKey, setPublicKeyTypeByte, generateSignedPreKey, generateKyberPreKey, -} from '../Curve.node.js'; -import type { SignalProtocolStore } from '../SignalProtocolStore.preload.js'; +} from '../Curve.node.ts'; +import type { SignalProtocolStore } from '../SignalProtocolStore.preload.ts'; import { GLOBAL_ZONE, signalProtocolStore, -} from '../SignalProtocolStore.preload.js'; -import { Address } from '../types/Address.std.js'; -import { QualifiedAddress } from '../types/QualifiedAddress.std.js'; -import { generateAci, generatePni } from '../types/ServiceId.std.js'; +} from '../SignalProtocolStore.preload.ts'; +import { Address } from '../types/Address.std.ts'; +import { QualifiedAddress } from '../types/QualifiedAddress.std.ts'; +import { generateAci, generatePni } from '../types/ServiceId.std.ts'; import type { IdentityKeyType, KeyPairType } from '../textsecure/Types.d.ts'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { clone } = lodash; diff --git a/ts/test-electron/background_test.preload.ts b/ts/test-electron/background_test.preload.ts index d06a978abd..cc16f2ca09 100644 --- a/ts/test-electron/background_test.preload.ts +++ b/ts/test-electron/background_test.preload.ts @@ -7,9 +7,9 @@ import lodash from 'lodash'; import { isOverHourIntoPast, cleanupSessionResets, -} from '../background.preload.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../background.preload.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { pick } = lodash; diff --git a/ts/test-electron/backup/attachments_test.preload.ts b/ts/test-electron/backup/attachments_test.preload.ts index c5528c0d02..3df0a42c02 100644 --- a/ts/test-electron/backup/attachments_test.preload.ts +++ b/ts/test-electron/backup/attachments_test.preload.ts @@ -6,13 +6,13 @@ import { BackupLevel } from '@signalapp/libsignal-client/zkgroup.js'; import lodash from 'lodash'; import { assert } from 'chai'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import * as Bytes from '../../Bytes.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { type AciString, generateAci } from '../../types/ServiceId.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; -import { setupBasics, asymmetricRoundtripHarness } from './helpers.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { type AciString, generateAci } from '../../types/ServiceId.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; +import { setupBasics, asymmetricRoundtripHarness } from './helpers.preload.ts'; import { AUDIO_MP3, IMAGE_JPEG, @@ -20,7 +20,7 @@ import { IMAGE_WEBP, LONG_MESSAGE, VIDEO_MP4, -} from '../../types/MIME.std.js'; +} from '../../types/MIME.std.ts'; import type { MessageAttributesType, QuotedMessageType, @@ -28,19 +28,19 @@ import type { import { hasRequiredInformationForRemoteBackup, isVoiceMessage, -} from '../../util/Attachment.std.js'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { SignalService } from '../../protobuf/index.std.js'; -import { getRandomBytes } from '../../Crypto.node.js'; -import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.js'; +} from '../../util/Attachment.std.ts'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { SignalService } from '../../protobuf/index.std.ts'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.ts'; import { generateAttachmentKeys, generateKeys, getPlaintextHashForInMemoryAttachment, -} from '../../AttachmentCrypto.node.js'; -import { KIBIBYTE } from '../../types/AttachmentSize.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../AttachmentCrypto.node.ts'; +import { KIBIBYTE } from '../../types/AttachmentSize.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const { omit } = lodash; diff --git a/ts/test-electron/backup/backup_groupv2_notifications_test.preload.ts b/ts/test-electron/backup/backup_groupv2_notifications_test.preload.ts index df24722c27..8ca466c65b 100644 --- a/ts/test-electron/backup/backup_groupv2_notifications_test.preload.ts +++ b/ts/test-electron/backup/backup_groupv2_notifications_test.preload.ts @@ -3,27 +3,27 @@ import { v4 as generateGuid } from 'uuid'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; -import { generateAci, generatePni } from '../../types/ServiceId.std.js'; +import { generateAci, generatePni } from '../../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import type { GroupV2ChangeType } from '../../types/groups.std.js'; -import { getRandomBytes } from '../../Crypto.node.js'; -import * as Bytes from '../../Bytes.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; +import type { GroupV2ChangeType } from '../../types/groups.std.ts'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; import { OUR_ACI, OUR_PNI, setupBasics, asymmetricRoundtripHarness, symmetricRoundtripHarness, -} from './helpers.preload.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; -import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from './helpers.preload.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; +import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; // Note: this should be kept up to date with GroupV2Change.stories.tsx, to // maintain the comprehensive set of GroupV2 notifications we need to handle diff --git a/ts/test-electron/backup/bubble_test.preload.ts b/ts/test-electron/backup/bubble_test.preload.ts index 75ae9dd83f..70091b262d 100644 --- a/ts/test-electron/backup/bubble_test.preload.ts +++ b/ts/test-electron/backup/bubble_test.preload.ts @@ -3,32 +3,32 @@ import { v4 as generateGuid } from 'uuid'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.js'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import { GiftBadgeStates } from '../../types/GiftBadgeStates.std.ts'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { getRandomBytes } from '../../Crypto.node.js'; -import * as Bytes from '../../Bytes.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; -import { ID_V1_LENGTH } from '../../types/groups.std.js'; -import { DurationInSeconds, WEEK } from '../../util/durations/index.std.js'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; +import { ID_V1_LENGTH } from '../../types/groups.std.ts'; +import { DurationInSeconds, WEEK } from '../../util/durations/index.std.ts'; import { setupBasics, asymmetricRoundtripHarness, symmetricRoundtripHarness, OUR_ACI, -} from './helpers.preload.js'; -import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from './helpers.preload.ts'; +import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { IMAGE_PNG, TEXT_ATTACHMENT } from '../../types/MIME.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { generateAttachmentKeys } from '../../AttachmentCrypto.node.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { BodyRange } from '../../types/BodyRange.std.js'; +import { IMAGE_PNG, TEXT_ATTACHMENT } from '../../types/MIME.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { generateAttachmentKeys } from '../../AttachmentCrypto.node.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { BodyRange } from '../../types/BodyRange.std.ts'; const CONTACT_A = generateAci(); const CONTACT_B = generateAci(); diff --git a/ts/test-electron/backup/calling_test.preload.ts b/ts/test-electron/backup/calling_test.preload.ts index 0b48c5c890..0076d14aa2 100644 --- a/ts/test-electron/backup/calling_test.preload.ts +++ b/ts/test-electron/backup/calling_test.preload.ts @@ -5,16 +5,16 @@ import assert from 'node:assert'; import { v4 as generateGuid } from 'uuid'; import { CallLinkRootKey } from '@signalapp/ringrtc'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import type { CallHistoryDetails } from '../../types/CallDisposition.std.js'; -import type { CallLinkType } from '../../types/CallLink.std.js'; +import type { CallHistoryDetails } from '../../types/CallDisposition.std.ts'; +import type { CallLinkType } from '../../types/CallLink.std.ts'; -import * as Bytes from '../../Bytes.std.js'; -import { getRandomBytes } from '../../Crypto.node.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { setupBasics, symmetricRoundtripHarness } from './helpers.preload.js'; +import * as Bytes from '../../Bytes.std.ts'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { setupBasics, symmetricRoundtripHarness } from './helpers.preload.ts'; import { AdhocCallStatus, CallDirection, @@ -22,18 +22,18 @@ import { CallType, DirectCallStatus, GroupCallStatus, -} from '../../types/CallDisposition.std.js'; -import { CallLinkRestrictions } from '../../types/CallLink.std.js'; -import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.js'; -import { fromAdminKeyBytes } from '../../util/callLinks.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { CallLinkRestrictions } from '../../types/CallLink.std.ts'; +import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.ts'; +import { fromAdminKeyBytes } from '../../util/callLinks.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; import { deriveGroupID, deriveGroupSecretParams, -} from '../../util/zkgroup.node.js'; -import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../util/zkgroup.node.ts'; +import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const CONTACT_A = generateAci(); const GROUP_MASTER_KEY = getRandomBytes(32); diff --git a/ts/test-electron/backup/conversations_test.preload.ts b/ts/test-electron/backup/conversations_test.preload.ts index 078ebf671c..dbd1f0d1a8 100644 --- a/ts/test-electron/backup/conversations_test.preload.ts +++ b/ts/test-electron/backup/conversations_test.preload.ts @@ -3,19 +3,19 @@ import { assert } from 'chai'; import { randomBytes } from 'node:crypto'; -import { getRandomBytes } from '../../Crypto.node.js'; -import * as Bytes from '../../Bytes.std.js'; -import { setupBasics, symmetricRoundtripHarness } from './helpers.preload.js'; -import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.js'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { setupBasics, symmetricRoundtripHarness } from './helpers.preload.ts'; +import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.ts'; import { deriveGroupID, deriveGroupSecretParams, -} from '../../util/zkgroup.node.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { generateAci, generatePni } from '../../types/ServiceId.std.js'; +} from '../../util/zkgroup.node.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci, generatePni } from '../../types/ServiceId.std.ts'; import type { ConversationAttributesType } from '../../model-types.d.ts'; -import { strictAssert } from '../../util/assert.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; function getGroupTestInfo() { const masterKey = getRandomBytes(32); diff --git a/ts/test-electron/backup/filePointer_test.preload.ts b/ts/test-electron/backup/filePointer_test.preload.ts index eb82f55343..2ce9e5e0e1 100644 --- a/ts/test-electron/backup/filePointer_test.preload.ts +++ b/ts/test-electron/backup/filePointer_test.preload.ts @@ -7,24 +7,24 @@ import { randomBytes } from 'node:crypto'; import { join } from 'node:path'; import { emptyDir, ensureFile } from 'fs-extra'; -import type { Backups } from '../../protobuf/index.std.js'; +import type { Backups } from '../../protobuf/index.std.ts'; import { getFilePointerForAttachment, convertFilePointerToAttachment, -} from '../../services/backups/util/filePointers.preload.js'; -import { IMAGE_PNG } from '../../types/MIME.std.js'; -import * as Bytes from '../../Bytes.std.js'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import { MASTER_KEY, MEDIA_ROOT_KEY } from './helpers.preload.js'; -import { generateKeys } from '../../AttachmentCrypto.node.js'; -import type { GetBackupCdnInfoType } from '../../services/backups/util/mediaId.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { isValidAttachmentKey } from '../../types/Crypto.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.js'; -import { getAttachmentsPath } from '../../../app/attachments.node.js'; -import { sha256 } from '../../Crypto.node.js'; +} from '../../services/backups/util/filePointers.preload.ts'; +import { IMAGE_PNG } from '../../types/MIME.std.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import { MASTER_KEY, MEDIA_ROOT_KEY } from './helpers.preload.ts'; +import { generateKeys } from '../../AttachmentCrypto.node.ts'; +import type { GetBackupCdnInfoType } from '../../services/backups/util/mediaId.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { isValidAttachmentKey } from '../../types/Crypto.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.ts'; +import { getAttachmentsPath } from '../../../app/attachments.node.ts'; +import { sha256 } from '../../Crypto.node.ts'; describe('convertFilePointerToAttachment', () => { const commonFilePointerProps = { diff --git a/ts/test-electron/backup/helpers.preload.ts b/ts/test-electron/backup/helpers.preload.ts index 8af9dde522..a4c94ac807 100644 --- a/ts/test-electron/backup/helpers.preload.ts +++ b/ts/test-electron/backup/helpers.preload.ts @@ -19,16 +19,16 @@ import type { import type { SendStateByConversationId, SendState, -} from '../../messages/MessageSendState.std.js'; +} from '../../messages/MessageSendState.std.ts'; -import { backupsService } from '../../services/backups/index.preload.js'; -import { isUnsupportedMessage } from '../../state/selectors/message.preload.js'; -import { generateAci, generatePni } from '../../types/ServiceId.std.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { getRandomBytes } from '../../Crypto.node.js'; -import * as Bytes from '../../Bytes.std.js'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +import { backupsService } from '../../services/backups/index.preload.ts'; +import { isUnsupportedMessage } from '../../state/selectors/message.preload.ts'; +import { generateAci, generatePni } from '../../types/ServiceId.std.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const { omit, sortBy } = lodash; diff --git a/ts/test-electron/backup/integration_test.preload.ts b/ts/test-electron/backup/integration_test.preload.ts index d316f0d457..72613d846b 100644 --- a/ts/test-electron/backup/integration_test.preload.ts +++ b/ts/test-electron/backup/integration_test.preload.ts @@ -12,11 +12,11 @@ import { } from '@signalapp/libsignal-client/dist/MessageBackup.js'; import assert from 'node:assert/strict'; -import { clearData } from './helpers.preload.js'; -import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.js'; -import { backupsService } from '../../services/backups/index.preload.js'; -import { initialize as initializeExpiringMessageService } from '../../services/expiringMessagesDeletion.preload.js'; -import { MemoryStream } from '../../util/MemoryStream.node.js'; +import { clearData } from './helpers.preload.ts'; +import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.ts'; +import { backupsService } from '../../services/backups/index.preload.ts'; +import { initialize as initializeExpiringMessageService } from '../../services/expiringMessagesDeletion.preload.ts'; +import { MemoryStream } from '../../util/MemoryStream.node.ts'; const { BACKUP_INTEGRATION_DIR } = process.env; diff --git a/ts/test-electron/backup/non_bubble_test.preload.ts b/ts/test-electron/backup/non_bubble_test.preload.ts index a94f2b3aaf..1c6a21f9d3 100644 --- a/ts/test-electron/backup/non_bubble_test.preload.ts +++ b/ts/test-electron/backup/non_bubble_test.preload.ts @@ -3,28 +3,28 @@ import { v4 as generateGuid } from 'uuid'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; -import { getRandomBytes } from '../../Crypto.node.js'; -import * as Bytes from '../../Bytes.std.js'; -import { SignalService as Proto, Backups } from '../../protobuf/index.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { APPLICATION_OCTET_STREAM } from '../../types/MIME.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { PaymentEventKind } from '../../types/Payment.std.js'; -import { ContactFormType } from '../../types/EmbeddedContact.std.js'; -import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { SignalService as Proto, Backups } from '../../protobuf/index.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { APPLICATION_OCTET_STREAM } from '../../types/MIME.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { PaymentEventKind } from '../../types/Payment.std.ts'; +import { ContactFormType } from '../../types/EmbeddedContact.std.ts'; +import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; import { setupBasics, asymmetricRoundtripHarness, symmetricRoundtripHarness, OUR_ACI, -} from './helpers.preload.js'; -import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from './helpers.preload.ts'; +import { loadAllAndReinitializeRedux } from '../../services/allLoaders.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const CONTACT_A = generateAci(); const GROUP_ID = Bytes.toBase64(getRandomBytes(32)); diff --git a/ts/test-electron/cleanupOrphanedAttachments_test.preload.ts b/ts/test-electron/cleanupOrphanedAttachments_test.preload.ts index 8d020bb463..88f3f1aca5 100644 --- a/ts/test-electron/cleanupOrphanedAttachments_test.preload.ts +++ b/ts/test-electron/cleanupOrphanedAttachments_test.preload.ts @@ -7,25 +7,25 @@ import { v4 as generateUuid } from 'uuid'; import { readdirSync } from 'node:fs'; import { dirname } from 'node:path'; -import { DataWriter } from '../sql/Client.preload.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; import { getAbsoluteAttachmentPath, getAbsoluteDownloadsPath, getAbsoluteDraftPath, getAbsoluteMegaphoneImageFilePath, -} from '../util/migrations.preload.js'; +} from '../util/migrations.preload.ts'; import { getDownloadsPath, getDraftPath, getAttachmentsPath, getMegaphonesPath, -} from '../windows/main/attachments.preload.js'; +} from '../../app/attachments.node.ts'; -import { generateAci } from '../types/ServiceId.std.js'; -import { IMAGE_JPEG, LONG_MESSAGE } from '../types/MIME.std.js'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { IMAGE_JPEG, LONG_MESSAGE } from '../types/MIME.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { RemoteMegaphoneId } from '../types/Megaphone.std.js'; +import type { RemoteMegaphoneId } from '../types/Megaphone.std.ts'; const { emptyDir, ensureFile } = fsExtra; diff --git a/ts/test-electron/components/Avatar_test.dom.tsx b/ts/test-electron/components/Avatar_test.dom.tsx index f3388fb0ec..e44b320d76 100644 --- a/ts/test-electron/components/Avatar_test.dom.tsx +++ b/ts/test-electron/components/Avatar_test.dom.tsx @@ -6,7 +6,7 @@ import { assert } from 'chai'; import { _getBadgeSize, _getBadgePlacement, -} from '../../components/Avatar.dom.js'; +} from '../../components/Avatar.dom.tsx'; describe('', () => { describe('_getBadgeSize', () => { diff --git a/ts/test-electron/context/Crypto_test.node.ts b/ts/test-electron/context/Crypto_test.node.ts index 0d0f0cc9fc..517dea26dd 100644 --- a/ts/test-electron/context/Crypto_test.node.ts +++ b/ts/test-electron/context/Crypto_test.node.ts @@ -11,7 +11,7 @@ import { sign, encrypt, decrypt, -} from '../../Crypto.node.js'; +} from '../../Crypto.node.ts'; describe('SignalContext.Crypto', () => { describe('hash', () => { diff --git a/ts/test-electron/context/createNativeThemeListener_test.node.ts b/ts/test-electron/context/createNativeThemeListener_test.node.ts index 658bce80cd..179a646d39 100644 --- a/ts/test-electron/context/createNativeThemeListener_test.node.ts +++ b/ts/test-electron/context/createNativeThemeListener_test.node.ts @@ -7,10 +7,10 @@ import { EventEmitter } from 'node:events'; import type { MinimalIPC, SystemThemeHolder, -} from '../../context/createNativeThemeListener.std.js'; -import { createNativeThemeListener } from '../../context/createNativeThemeListener.std.js'; +} from '../../context/createNativeThemeListener.std.ts'; +import { createNativeThemeListener } from '../../context/createNativeThemeListener.std.ts'; import type { NativeThemeState } from '../../types/NativeThemeNotifier.d.ts'; -import { SystemThemeType } from '../../types/Util.std.js'; +import { SystemThemeType } from '../../types/Util.std.ts'; class FakeIPC extends EventEmitter implements MinimalIPC { constructor(private readonly state: NativeThemeState) { diff --git a/ts/test-electron/deleteMessageAttachments_test.preload.ts b/ts/test-electron/deleteMessageAttachments_test.preload.ts index 8b6da1bed3..30d1853207 100644 --- a/ts/test-electron/deleteMessageAttachments_test.preload.ts +++ b/ts/test-electron/deleteMessageAttachments_test.preload.ts @@ -7,33 +7,33 @@ import { v4 as generateUuid } from 'uuid'; import { readdirSync } from 'node:fs'; import { dirname } from 'node:path'; -import { missingCaseError } from '../util/missingCaseError.std.js'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; import { getDownloadsPath, getAttachmentsPath, -} from '../windows/main/attachments.preload.js'; +} from '../../app/attachments.node.ts'; -import { IMAGE_JPEG, LONG_MESSAGE } from '../types/MIME.std.js'; +import { IMAGE_JPEG, LONG_MESSAGE } from '../types/MIME.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { AttachmentType } from '../types/Attachment.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; import { getAbsoluteAttachmentPath, getAbsoluteDownloadsPath, getAbsoluteDraftPath, maybeDeleteAttachmentFile, -} from '../util/migrations.preload.js'; -import { strictAssert } from '../util/assert.std.js'; +} from '../util/migrations.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; import { cleanupAllMessageAttachmentFiles, cleanupAttachmentFiles, cleanupMessages, -} from '../util/cleanup.preload.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { generateAci } from '../types/ServiceId.std.js'; +} from '../util/cleanup.preload.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; import { testAttachmentLocalKey, testPlaintextHash, -} from '../test-helpers/attachments.node.js'; +} from '../test-helpers/attachments.node.ts'; const { emptyDir, ensureFile } = fsExtra; diff --git a/ts/test-electron/linkPreviews/linkPreviewFetch_test.preload.ts b/ts/test-electron/linkPreviews/linkPreviewFetch_test.preload.ts index 1bcd435ecc..38c8f15470 100644 --- a/ts/test-electron/linkPreviews/linkPreviewFetch_test.preload.ts +++ b/ts/test-electron/linkPreviews/linkPreviewFetch_test.preload.ts @@ -10,13 +10,13 @@ import { IMAGE_JPEG, IMAGE_WEBP, stringToMIMEType, -} from '../../types/MIME.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; +} from '../../types/MIME.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; import { fetchLinkPreviewImage, fetchLinkPreviewMetadata, -} from '../../linkPreviews/linkPreviewFetch.preload.js'; +} from '../../linkPreviews/linkPreviewFetch.preload.ts'; async function readFixtureImage( filename: string diff --git a/ts/test-electron/messages/handleDataMessage_test.preload.ts b/ts/test-electron/messages/handleDataMessage_test.preload.ts index ee885726f9..1781685718 100644 --- a/ts/test-electron/messages/handleDataMessage_test.preload.ts +++ b/ts/test-electron/messages/handleDataMessage_test.preload.ts @@ -5,20 +5,20 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import { v4 as uuid } from 'uuid'; -import { handleDataMessage } from '../../messages/handleDataMessage.preload.js'; +import { handleDataMessage } from '../../messages/handleDataMessage.preload.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { MessageModel } from '../../models/messages.preload.js'; -import { MessageCache } from '../../services/MessageCache.preload.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +import { MessageModel } from '../../models/messages.preload.ts'; +import { MessageCache } from '../../services/MessageCache.preload.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; import type { ProcessedDataMessage } from '../../textsecure/Types.d.ts'; import { type AciString, generateAci, generatePni, -} from '../../types/ServiceId.std.js'; -import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.js'; -import { SignalService } from '../../protobuf/index.std.js'; +} from '../../types/ServiceId.std.ts'; +import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.ts'; +import { SignalService } from '../../protobuf/index.std.ts'; describe('handleDataMessage', () => { let ourAci: AciString; diff --git a/ts/test-electron/models/conversations_test.preload.ts b/ts/test-electron/models/conversations_test.preload.ts index b1419955d2..fa3aa86715 100644 --- a/ts/test-electron/models/conversations_test.preload.ts +++ b/ts/test-electron/models/conversations_test.preload.ts @@ -4,15 +4,15 @@ import { assert } from 'chai'; import { v7 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import { IMAGE_PNG } from '../../types/MIME.std.js'; -import { generateAci, generatePni } from '../../types/ServiceId.std.js'; -import { MessageModel } from '../../models/messages.preload.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import { ConversationModel } from '../../models/conversations.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import { IMAGE_PNG } from '../../types/MIME.std.ts'; +import { generateAci, generatePni } from '../../types/ServiceId.std.ts'; +import { MessageModel } from '../../models/messages.preload.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import { ConversationModel } from '../../models/conversations.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; describe('Conversations', () => { async function resetConversationController(): Promise { diff --git a/ts/test-electron/models/messages_test.preload.ts b/ts/test-electron/models/messages_test.preload.ts index 10723e718f..4401de8b23 100644 --- a/ts/test-electron/models/messages_test.preload.ts +++ b/ts/test-electron/models/messages_test.preload.ts @@ -5,19 +5,19 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import { v4 as generateUuid } from 'uuid'; -import type { AttachmentType } from '../../types/Attachment.std.js'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; import type { CallbackResultType } from '../../textsecure/Types.d.ts'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { MessageModel } from '../../models/messages.preload.js'; -import type { RawBodyRange } from '../../types/BodyRange.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; +import { MessageModel } from '../../models/messages.preload.ts'; +import type { RawBodyRange } from '../../types/BodyRange.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; import enMessages from '../../../_locales/en/messages.json'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { getAuthor } from '../../messages/sources.preload.js'; -import { setupI18n } from '../../util/setupI18n.dom.js'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { getAuthor } from '../../messages/sources.preload.ts'; +import { setupI18n } from '../../util/setupI18n.dom.tsx'; import { APPLICATION_JSON, AUDIO_MP3, @@ -26,12 +26,12 @@ import { LONG_MESSAGE, TEXT_ATTACHMENT, VIDEO_MP4, -} from '../../types/MIME.std.js'; -import { getNotificationDataForMessage } from '../../util/getNotificationDataForMessage.preload.js'; -import { getNotificationTextForMessage } from '../../util/getNotificationTextForMessage.preload.js'; -import { send } from '../../messages/send.preload.js'; -import { messageSender } from '../../textsecure/SendMessage.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../types/MIME.std.ts'; +import { getNotificationDataForMessage } from '../../util/getNotificationDataForMessage.preload.ts'; +import { getNotificationTextForMessage } from '../../util/getNotificationTextForMessage.preload.ts'; +import { send } from '../../messages/send.preload.ts'; +import { messageSender } from '../../textsecure/SendMessage.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; describe('Message', () => { const i18n = setupI18n('en', enMessages); diff --git a/ts/test-electron/normalizedAttachments_test.preload.ts b/ts/test-electron/normalizedAttachments_test.preload.ts index 7c64627e25..eadd15616c 100644 --- a/ts/test-electron/normalizedAttachments_test.preload.ts +++ b/ts/test-electron/normalizedAttachments_test.preload.ts @@ -4,33 +4,33 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; -import * as Bytes from '../Bytes.std.js'; +import * as Bytes from '../Bytes.std.ts'; import type { EphemeralAttachmentFields, ScreenshotType, AttachmentType, ThumbnailType, BackupThumbnailType, -} from '../types/Attachment.std.js'; +} from '../types/Attachment.std.ts'; import { APPLICATION_OCTET_STREAM, IMAGE_JPEG, IMAGE_PNG, LONG_MESSAGE, -} from '../types/MIME.std.js'; +} from '../types/MIME.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import { generateAci } from '../types/ServiceId.std.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../MessageSeenStatus.std.js'; -import { DataWriter, DataReader } from '../sql/Client.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import { HOUR, MINUTE } from '../util/durations/index.std.js'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../MessageSeenStatus.std.ts'; +import { DataWriter, DataReader } from '../sql/Client.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { HOUR, MINUTE } from '../util/durations/index.std.ts'; import { testAttachmentDigest, testAttachmentKey, testAttachmentLocalKey, testPlaintextHash, -} from '../test-helpers/attachments.node.js'; +} from '../test-helpers/attachments.node.ts'; const CONTACT_A = generateAci(); const contactAConversationId = generateGuid(); diff --git a/ts/test-electron/quill/emoji/completion_test.dom.tsx b/ts/test-electron/quill/emoji/completion_test.dom.tsx index d9c7142505..66288f262d 100644 --- a/ts/test-electron/quill/emoji/completion_test.dom.tsx +++ b/ts/test-electron/quill/emoji/completion_test.dom.tsx @@ -4,26 +4,26 @@ import { assert } from 'chai'; import sinon from 'sinon'; -import { EmojiCompletion } from '../../../quill/emoji/completion.dom.js'; +import { EmojiCompletion } from '../../../quill/emoji/completion.dom.tsx'; import type { EmojiCompletionOptions, InsertEmojiOptionsType, -} from '../../../quill/emoji/completion.dom.js'; +} from '../../../quill/emoji/completion.dom.tsx'; import { EMOJI_VARIANT_KEY_CONSTANTS, EmojiSkinTone, getEmojiParentKeyByVariantKey, getEmojiVariantByKey, -} from '../../../components/fun/data/emojis.std.js'; +} from '../../../components/fun/data/emojis.std.ts'; import { _createFunEmojiSearch, createFunEmojiSearchIndex, -} from '../../../components/fun/useFunEmojiSearch.dom.js'; +} from '../../../components/fun/useFunEmojiSearch.dom.tsx'; import { _createFunEmojiLocalizer, createFunEmojiLocalizerIndex, -} from '../../../components/fun/useFunEmojiLocalizer.dom.js'; -import type { LocaleEmojiListType } from '../../../types/emoji.std.js'; +} from '../../../components/fun/useFunEmojiLocalizer.dom.tsx'; +import type { LocaleEmojiListType } from '../../../types/emoji.std.ts'; const EMOJI_VARIANTS = { SMILE: getEmojiVariantByKey( diff --git a/ts/test-electron/quill/memberRepository_test.std.ts b/ts/test-electron/quill/memberRepository_test.std.ts index efa5420f58..672fc370ce 100644 --- a/ts/test-electron/quill/memberRepository_test.std.ts +++ b/ts/test-electron/quill/memberRepository_test.std.ts @@ -3,14 +3,14 @@ import { assert } from 'chai'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; import { MemberRepository, _toMembers, -} from '../../quill/memberRepository.std.js'; -import { getDefaultConversationWithServiceId } from '../../test-helpers/getDefaultConversation.std.js'; +} from '../../quill/memberRepository.std.ts'; +import { getDefaultConversationWithServiceId } from '../../test-helpers/getDefaultConversation.std.ts'; const UNKNOWN_SERVICE_ID = generateAci(); diff --git a/ts/test-electron/quill/mentions/completion_test.dom.tsx b/ts/test-electron/quill/mentions/completion_test.dom.tsx index d5bb88a215..588f014210 100644 --- a/ts/test-electron/quill/mentions/completion_test.dom.tsx +++ b/ts/test-electron/quill/mentions/completion_test.dom.tsx @@ -9,17 +9,17 @@ import type Quill from '@signalapp/quill-cjs'; import type Keyboard from '@signalapp/quill-cjs/modules/keyboard.js'; import type { MutableRefObject } from 'react'; -import type { MentionCompletionOptions } from '../../../quill/mentions/completion.dom.js'; -import { MentionCompletion } from '../../../quill/mentions/completion.dom.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; +import type { MentionCompletionOptions } from '../../../quill/mentions/completion.dom.tsx'; +import { MentionCompletion } from '../../../quill/mentions/completion.dom.tsx'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; import { MemberRepository, _toMembers, -} from '../../../quill/memberRepository.std.js'; -import type { MemberType } from '../../../quill/memberRepository.std.js'; -import { ThemeType } from '../../../types/Util.std.js'; -import { getDefaultConversationWithServiceId } from '../../../test-helpers/getDefaultConversation.std.js'; -import { setupI18n } from '../../../util/setupI18n.dom.js'; +} from '../../../quill/memberRepository.std.ts'; +import type { MemberType } from '../../../quill/memberRepository.std.ts'; +import { ThemeType } from '../../../types/Util.std.ts'; +import { getDefaultConversationWithServiceId } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { setupI18n } from '../../../util/setupI18n.dom.tsx'; type MiniLeafBlot = { value: () => string; diff --git a/ts/test-electron/quill/mentions/matchers_test.std.ts b/ts/test-electron/quill/mentions/matchers_test.std.ts index a2366967ad..5f1c169031 100644 --- a/ts/test-electron/quill/mentions/matchers_test.std.ts +++ b/ts/test-electron/quill/mentions/matchers_test.std.ts @@ -5,12 +5,12 @@ import { assert } from 'chai'; import type { RefObject } from 'react'; import { Delta } from '@signalapp/quill-cjs'; -import type { AciString } from '../../../types/ServiceId.std.js'; -import { generateAci } from '../../../types/ServiceId.std.js'; -import { matchMention } from '../../../quill/mentions/matchers.std.js'; -import { MemberRepository } from '../../../quill/memberRepository.std.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import { getDefaultConversationWithServiceId } from '../../../test-helpers/getDefaultConversation.std.js'; +import type { AciString } from '../../../types/ServiceId.std.ts'; +import { generateAci } from '../../../types/ServiceId.std.ts'; +import { matchMention } from '../../../quill/mentions/matchers.std.ts'; +import { MemberRepository } from '../../../quill/memberRepository.std.ts'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import { getDefaultConversationWithServiceId } from '../../../test-helpers/getDefaultConversation.std.ts'; const ACI_1 = generateAci(); diff --git a/ts/test-electron/quill/signal-clipboard_test.dom.ts b/ts/test-electron/quill/signal-clipboard_test.dom.ts index a2ac1af3de..962b744691 100644 --- a/ts/test-electron/quill/signal-clipboard_test.dom.ts +++ b/ts/test-electron/quill/signal-clipboard_test.dom.ts @@ -5,8 +5,8 @@ import { assert } from 'chai'; import { Delta } from '@signalapp/quill-cjs'; import type Quill from '@signalapp/quill-cjs'; -import { SignalClipboard } from '../../quill/signal-clipboard/index.dom.js'; -import { QuillFormattingStyle } from '../../quill/formatting/menu.dom.js'; +import { SignalClipboard } from '../../quill/signal-clipboard/index.dom.ts'; +import { QuillFormattingStyle } from '../../quill/formatting/menu.dom.tsx'; class MockQuill { public root: HTMLElement; diff --git a/ts/test-electron/quill/util_test.dom.ts b/ts/test-electron/quill/util_test.dom.ts index 3fb83cc531..9c98380379 100644 --- a/ts/test-electron/quill/util_test.dom.ts +++ b/ts/test-electron/quill/util_test.dom.ts @@ -7,9 +7,9 @@ import { getDeltaToRemoveStaleMentions, getTextAndRangesFromOps, getDeltaToRestartMention, -} from '../../quill/util.dom.js'; -import { BodyRange } from '../../types/BodyRange.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +} from '../../quill/util.dom.ts'; +import { BodyRange } from '../../types/BodyRange.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; const SERVICE_ID_1 = generateAci(); const SERVICE_ID_2 = generateAci(); diff --git a/ts/test-electron/routineProfileRefresh_test.preload.ts b/ts/test-electron/routineProfileRefresh_test.preload.ts index 3b0ac0d4f4..de32dec402 100644 --- a/ts/test-electron/routineProfileRefresh_test.preload.ts +++ b/ts/test-electron/routineProfileRefresh_test.preload.ts @@ -5,13 +5,13 @@ import * as sinon from 'sinon'; import { v4 as generateUuid } from 'uuid'; import lodash from 'lodash'; -import { ConversationModel } from '../models/conversations.preload.js'; +import { ConversationModel } from '../models/conversations.preload.ts'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import { generateAci } from '../types/ServiceId.std.js'; -import { DAY, HOUR, MINUTE, MONTH } from '../util/durations/index.std.js'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { DAY, HOUR, MINUTE, MONTH } from '../util/durations/index.std.ts'; -import { routineProfileRefresh } from '../routineProfileRefresh.preload.js'; -import type { getProfile } from '../util/getProfile.preload.js'; +import { routineProfileRefresh } from '../routineProfileRefresh.preload.ts'; +import type { getProfile } from '../util/getProfile.preload.ts'; const { times } = lodash; diff --git a/ts/test-electron/scrollUtil_test.dom.ts b/ts/test-electron/scrollUtil_test.dom.ts index cd6d53b81e..a125e7d4b8 100644 --- a/ts/test-electron/scrollUtil_test.dom.ts +++ b/ts/test-electron/scrollUtil_test.dom.ts @@ -7,7 +7,7 @@ import { getScrollBottom, scrollToBottom, setScrollBottom, -} from '../util/scrollUtil.std.js'; +} from '../util/scrollUtil.std.ts'; describe('scroll utilities', () => { let sandbox: HTMLDivElement; diff --git a/ts/test-electron/services/ActiveWindowService_test.preload.ts b/ts/test-electron/services/ActiveWindowService_test.preload.ts index 3dc938bd35..d588df6b0f 100644 --- a/ts/test-electron/services/ActiveWindowService_test.preload.ts +++ b/ts/test-electron/services/ActiveWindowService_test.preload.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import { EventEmitter } from 'node:events'; -import { getActiveWindowService } from '../../services/ActiveWindowService.std.js'; +import { getActiveWindowService } from '../../services/ActiveWindowService.std.ts'; describe('ActiveWindowService', () => { const fakeIpcEvent = {}; diff --git a/ts/test-electron/services/AttachmentBackupManager_test.preload.ts b/ts/test-electron/services/AttachmentBackupManager_test.preload.ts index bd43f181a7..927815f86a 100644 --- a/ts/test-electron/services/AttachmentBackupManager_test.preload.ts +++ b/ts/test-electron/services/AttachmentBackupManager_test.preload.ts @@ -7,30 +7,30 @@ import { join } from 'node:path'; import { createWriteStream } from 'node:fs'; import fsExtra from 'fs-extra'; -import * as Bytes from '../../Bytes.std.js'; +import * as Bytes from '../../Bytes.std.ts'; import { AttachmentBackupManager, FILE_NOT_FOUND_ON_TRANSIT_TIER_STATUS, runAttachmentBackupJob, -} from '../../jobs/AttachmentBackupManager.preload.js'; +} from '../../jobs/AttachmentBackupManager.preload.ts'; import type { AttachmentBackupJobType, CoreAttachmentBackupJobType, StandardAttachmentBackupJobType, ThumbnailAttachmentBackupJobType, -} from '../../types/AttachmentBackup.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { getRandomBytes } from '../../Crypto.node.js'; -import { APPLICATION_OCTET_STREAM, VIDEO_MP4 } from '../../types/MIME.std.js'; -import { createName, getRelativePath } from '../../util/attachmentPath.node.js'; -import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.js'; +} from '../../types/AttachmentBackup.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import { APPLICATION_OCTET_STREAM, VIDEO_MP4 } from '../../types/MIME.std.ts'; +import { createName, getRelativePath } from '../../util/attachmentPath.node.ts'; +import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.ts'; import { encryptAttachmentV2, generateKeys, -} from '../../AttachmentCrypto.node.js'; -import { SECOND } from '../../util/durations/index.std.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../AttachmentCrypto.node.ts'; +import { SECOND } from '../../util/durations/index.std.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const { ensureFile } = fsExtra; diff --git a/ts/test-electron/services/AttachmentDownloadManager_test.preload.ts b/ts/test-electron/services/AttachmentDownloadManager_test.preload.ts index aaf6f3cac4..35103d9fec 100644 --- a/ts/test-electron/services/AttachmentDownloadManager_test.preload.ts +++ b/ts/test-electron/services/AttachmentDownloadManager_test.preload.ts @@ -7,50 +7,50 @@ import { type StatsFs } from 'node:fs'; import { v7 } from 'uuid'; import { emptyDir, ensureFile } from 'fs-extra'; -import * as MIME from '../../types/MIME.std.js'; +import * as MIME from '../../types/MIME.std.ts'; import { AttachmentDownloadManager, runDownloadAttachmentJob, runDownloadAttachmentJobInner, type NewAttachmentDownloadJobType, -} from '../../jobs/AttachmentDownloadManager.preload.js'; +} from '../../jobs/AttachmentDownloadManager.preload.ts'; import { type AttachmentDownloadJobType, AttachmentDownloadUrgency, MediaTier, -} from '../../types/AttachmentDownload.std.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { DAY, MINUTE, MONTH } from '../../util/durations/index.std.js'; +} from '../../types/AttachmentDownload.std.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { DAY, MINUTE, MONTH } from '../../util/durations/index.std.ts'; import { type AttachmentType, AttachmentVariant, -} from '../../types/Attachment.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import type { downloadAttachment as downloadAttachmentUtil } from '../../util/downloadAttachment.preload.js'; -import { AttachmentDownloadSource } from '../../sql/Interface.std.js'; -import { generateAttachmentKeys } from '../../AttachmentCrypto.node.js'; -import { getAttachmentCiphertextSize } from '../../util/AttachmentCrypto.std.js'; -import { MEBIBYTE } from '../../types/AttachmentSize.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { toBase64 } from '../../Bytes.std.js'; -import { JobCancelReason } from '../../jobs/types.std.js'; +} from '../../types/Attachment.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import type { downloadAttachment as downloadAttachmentUtil } from '../../util/downloadAttachment.preload.ts'; +import { AttachmentDownloadSource } from '../../sql/Interface.std.ts'; +import { generateAttachmentKeys } from '../../AttachmentCrypto.node.ts'; +import { getAttachmentCiphertextSize } from '../../util/AttachmentCrypto.std.ts'; +import { MEBIBYTE } from '../../types/AttachmentSize.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { toBase64 } from '../../Bytes.std.ts'; +import { JobCancelReason } from '../../jobs/types.std.ts'; import { explodePromise, type ExplodePromiseResultType, -} from '../../util/explodePromise.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { composeAttachment } from '../../test-node/util/queueAttachmentDownloads_test.preload.js'; -import { MessageCache } from '../../services/MessageCache.preload.js'; -import { AttachmentNotNeededForMessageError } from '../../messageModifiers/AttachmentDownloads.preload.js'; +} from '../../util/explodePromise.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { composeAttachment } from '../../test-node/util/queueAttachmentDownloads_test.preload.ts'; +import { MessageCache } from '../../services/MessageCache.preload.ts'; +import { AttachmentNotNeededForMessageError } from '../../messageModifiers/AttachmentDownloads.preload.ts'; import { testAttachmentDigest, testAttachmentKey, testAttachmentLocalKey, testPlaintextHash, -} from '../../test-helpers/attachments.node.js'; -import type { MessageAttributesType } from '../../model-types.js'; -import { getAttachmentsPath } from '../../../app/attachments.node.js'; -import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.js'; +} from '../../test-helpers/attachments.node.ts'; +import type { MessageAttributesType } from '../../model-types.d.ts'; +import { getAttachmentsPath } from '../../../app/attachments.node.ts'; +import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.ts'; const { omit } = lodash; diff --git a/ts/test-electron/services/MessageCache_test.preload.ts b/ts/test-electron/services/MessageCache_test.preload.ts index 02986f291b..0eaee116b7 100644 --- a/ts/test-electron/services/MessageCache_test.preload.ts +++ b/ts/test-electron/services/MessageCache_test.preload.ts @@ -3,13 +3,13 @@ import { assert } from 'chai'; import { v4 as uuid } from 'uuid'; -import { MessageModel } from '../../models/messages.preload.js'; -import { strictAssert } from '../../util/assert.std.js'; +import { MessageModel } from '../../models/messages.preload.ts'; +import { strictAssert } from '../../util/assert.std.ts'; -import { MessageCache } from '../../services/MessageCache.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +import { MessageCache } from '../../services/MessageCache.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; describe('MessageCache', () => { beforeEach(async () => { diff --git a/ts/test-electron/services/ReleaseNoteAndMegaphoneFetcher_test.preload.ts b/ts/test-electron/services/ReleaseNoteAndMegaphoneFetcher_test.preload.ts index 2d71f73545..11cc495dca 100644 --- a/ts/test-electron/services/ReleaseNoteAndMegaphoneFetcher_test.preload.ts +++ b/ts/test-electron/services/ReleaseNoteAndMegaphoneFetcher_test.preload.ts @@ -6,15 +6,15 @@ import * as sinon from 'sinon'; import { EventEmitter } from 'node:events'; import { v4 as uuid } from 'uuid'; -import { ReleaseNoteAndMegaphoneFetcher } from '../../services/releaseNoteAndMegaphoneFetcher.preload.js'; -import * as durations from '../../util/durations/index.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { saveNewMessageBatcher } from '../../util/messageBatcher.preload.js'; -import type { CIType } from '../../CI.preload.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import type { RemoteMegaphoneId } from '../../types/Megaphone.std.js'; +import { ReleaseNoteAndMegaphoneFetcher } from '../../services/releaseNoteAndMegaphoneFetcher.preload.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { saveNewMessageBatcher } from '../../util/messageBatcher.preload.ts'; +import type { CIType } from '../../CI.preload.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import type { RemoteMegaphoneId } from '../../types/Megaphone.std.ts'; const { getAllMegaphones, hasMegaphone } = DataReader; diff --git a/ts/test-electron/services/areWeASubscriber_test.dom.ts b/ts/test-electron/services/areWeASubscriber_test.dom.ts index e08c6231be..4877c72424 100644 --- a/ts/test-electron/services/areWeASubscriber_test.dom.ts +++ b/ts/test-electron/services/areWeASubscriber_test.dom.ts @@ -3,8 +3,8 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { AreWeASubscriberService } from '../../services/areWeASubscriber.dom.js'; -import { explodePromise } from '../../util/explodePromise.std.js'; +import { AreWeASubscriberService } from '../../services/areWeASubscriber.dom.ts'; +import { explodePromise } from '../../util/explodePromise.std.ts'; describe('"are we a subscriber?" service', () => { const subscriberId = new Uint8Array([1, 2, 3]); diff --git a/ts/test-electron/services/profiles_test.preload.ts b/ts/test-electron/services/profiles_test.preload.ts index 3bb7d5e3d1..0d75ce9813 100644 --- a/ts/test-electron/services/profiles_test.preload.ts +++ b/ts/test-electron/services/profiles_test.preload.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { sleep } from '../../util/sleep.std.js'; -import { MINUTE } from '../../util/durations/index.std.js'; -import { drop } from '../../util/drop.std.js'; +import { sleep } from '../../util/sleep.std.ts'; +import { MINUTE } from '../../util/durations/index.std.ts'; +import { drop } from '../../util/drop.std.ts'; -import { ProfileService } from '../../services/profiles.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; +import { ProfileService } from '../../services/profiles.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; describe('util/profiles', () => { const SERVICE_ID_1 = generateAci(); diff --git a/ts/test-electron/services/senderCertificate_test.preload.ts b/ts/test-electron/services/senderCertificate_test.preload.ts index f864468fb6..381ee0a380 100644 --- a/ts/test-electron/services/senderCertificate_test.preload.ts +++ b/ts/test-electron/services/senderCertificate_test.preload.ts @@ -12,15 +12,15 @@ import { ServerCertificate, } from '@signalapp/libsignal-client'; -import { drop } from '../../util/drop.std.js'; -import * as Bytes from '../../Bytes.std.js'; -import { SenderCertificateMode } from '../../textsecure/OutgoingMessage.preload.js'; +import { drop } from '../../util/drop.std.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { SenderCertificateMode } from '../../textsecure/OutgoingMessage.preload.ts'; import { SENDER_CERTIFICATE_EXPIRATION_BUFFER, SenderCertificateService, -} from '../../services/senderCertificate.preload.js'; -import { DAY } from '../../util/durations/constants.std.js'; +} from '../../services/senderCertificate.preload.ts'; +import { DAY } from '../../util/durations/constants.std.ts'; describe('SenderCertificateService', () => { let fakeValidCertificate: SenderCertificate; diff --git a/ts/test-electron/sql/attachment_download_backup_stats_test.preload.ts b/ts/test-electron/sql/attachment_download_backup_stats_test.preload.ts index b487fc4a60..283e5c31ce 100644 --- a/ts/test-electron/sql/attachment_download_backup_stats_test.preload.ts +++ b/ts/test-electron/sql/attachment_download_backup_stats_test.preload.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; -import { createAttachmentDownloadJob } from '../../test-helpers/attachmentDownloads.std.js'; +import { createAttachmentDownloadJob } from '../../test-helpers/attachmentDownloads.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { AttachmentDownloadSource } from '../../sql/Interface.std.js'; -import { cleanupMessages } from '../../util/cleanup.preload.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { AttachmentDownloadSource } from '../../sql/Interface.std.ts'; +import { cleanupMessages } from '../../util/cleanup.preload.ts'; describe('sql/AttachmentDownloadBackupStats', () => { beforeEach(async () => { diff --git a/ts/test-electron/sql/callLinks_test.preload.ts b/ts/test-electron/sql/callLinks_test.preload.ts index d6210b62da..1dec198940 100644 --- a/ts/test-electron/sql/callLinks_test.preload.ts +++ b/ts/test-electron/sql/callLinks_test.preload.ts @@ -3,12 +3,12 @@ import { assert } from 'chai'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; import { FAKE_CALL_LINK, FAKE_CALL_LINK_WITH_ADMIN_KEY, -} from '../../test-helpers/fakeCallLink.std.js'; +} from '../../test-helpers/fakeCallLink.std.ts'; const { getCallLinkByRoomId } = DataReader; const { removeAll, insertCallLink, insertOrUpdateCallLinkFromSync } = diff --git a/ts/test-electron/sql/conversationSummary_test.preload.ts b/ts/test-electron/sql/conversationSummary_test.preload.ts index a35f261a24..8db2280d33 100644 --- a/ts/test-electron/sql/conversationSummary_test.preload.ts +++ b/ts/test-electron/sql/conversationSummary_test.preload.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllMessages, getConversationMessageStats } = DataReader; const { removeAll, saveMessages } = DataWriter; diff --git a/ts/test-electron/sql/donationReceipts_test.preload.ts b/ts/test-electron/sql/donationReceipts_test.preload.ts index 40c84665b6..8a074e7b68 100644 --- a/ts/test-electron/sql/donationReceipts_test.preload.ts +++ b/ts/test-electron/sql/donationReceipts_test.preload.ts @@ -4,9 +4,9 @@ import { assert } from 'chai'; import { v1 as getGuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; -import type { DonationReceipt } from '../../types/Donations.std.js'; +import type { DonationReceipt } from '../../types/Donations.std.ts'; const { getAllDonationReceipts, getDonationReceiptById } = DataReader; const { diff --git a/ts/test-electron/sql/fullTextSearch_test.preload.ts b/ts/test-electron/sql/fullTextSearch_test.preload.ts index da1faf4208..3bfca1619b 100644 --- a/ts/test-electron/sql/fullTextSearch_test.preload.ts +++ b/ts/test-electron/sql/fullTextSearch_test.preload.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllMessages, searchMessages } = DataReader; const { removeAll, saveMessages, saveMessage } = DataWriter; diff --git a/ts/test-electron/sql/getCallHistoryGroups_test.preload.ts b/ts/test-electron/sql/getCallHistoryGroups_test.preload.ts index d6b395df49..e9cd18351f 100644 --- a/ts/test-electron/sql/getCallHistoryGroups_test.preload.ts +++ b/ts/test-electron/sql/getCallHistoryGroups_test.preload.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; import { CallMode, @@ -13,20 +13,20 @@ import { CallHistoryFilterStatus, CallType, DirectCallStatus, -} from '../../types/CallDisposition.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; import type { CallHistoryDetails, CallHistoryGroup, CallStatus, -} from '../../types/CallDisposition.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; import type { ConversationAttributesType } from '../../model-types.d.ts'; import { FAKE_CALL_LINK, FAKE_CALL_LINK_WITH_ADMIN_KEY, -} from '../../test-helpers/fakeCallLink.std.js'; +} from '../../test-helpers/fakeCallLink.std.ts'; const { getCallHistoryGroups, getCallHistoryGroupsCount } = DataReader; const { removeAll, insertCallLink, saveCallHistory, saveConversation } = diff --git a/ts/test-electron/sql/getCallHistoryMessageByCallId_test.preload.ts b/ts/test-electron/sql/getCallHistoryMessageByCallId_test.preload.ts index acd3b9b2fe..b9d2dafd89 100644 --- a/ts/test-electron/sql/getCallHistoryMessageByCallId_test.preload.ts +++ b/ts/test-electron/sql/getCallHistoryMessageByCallId_test.preload.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllMessages, getCallHistoryMessageByCallId } = DataReader; const { removeAll, saveMessages } = DataWriter; diff --git a/ts/test-electron/sql/getMessagesBetween_test.preload.ts b/ts/test-electron/sql/getMessagesBetween_test.preload.ts index 76fc32150d..1e2bfbec70 100644 --- a/ts/test-electron/sql/getMessagesBetween_test.preload.ts +++ b/ts/test-electron/sql/getMessagesBetween_test.preload.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllMessages, getMessagesBetween } = DataReader; const { saveMessages, _removeAllMessages } = DataWriter; diff --git a/ts/test-electron/sql/getMostRecentAttachmentUploadData_test.preload.ts b/ts/test-electron/sql/getMostRecentAttachmentUploadData_test.preload.ts index e176474b9c..fd39324c90 100644 --- a/ts/test-electron/sql/getMostRecentAttachmentUploadData_test.preload.ts +++ b/ts/test-electron/sql/getMostRecentAttachmentUploadData_test.preload.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; -import { IMAGE_JPEG } from '../../types/MIME.std.js'; -import { testPlaintextHash } from '../../test-helpers/attachments.node.js'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; +import { IMAGE_JPEG } from '../../types/MIME.std.ts'; +import { testPlaintextHash } from '../../test-helpers/attachments.node.ts'; const { getMostRecentAttachmentUploadData } = DataReader; const { removeAll, saveMessages } = DataWriter; diff --git a/ts/test-electron/sql/getNearbyMessageFromDeletedSet_test.preload.ts b/ts/test-electron/sql/getNearbyMessageFromDeletedSet_test.preload.ts index 2153108a5a..c3c57ce932 100644 --- a/ts/test-electron/sql/getNearbyMessageFromDeletedSet_test.preload.ts +++ b/ts/test-electron/sql/getNearbyMessageFromDeletedSet_test.preload.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllMessages, getNearbyMessageFromDeletedSet } = DataReader; const { saveMessages, _removeAllMessages } = DataWriter; diff --git a/ts/test-electron/sql/getRecentStaleRingsAndMarkOlderMissed_test.preload.ts b/ts/test-electron/sql/getRecentStaleRingsAndMarkOlderMissed_test.preload.ts index 34f814bc32..034a972dc7 100644 --- a/ts/test-electron/sql/getRecentStaleRingsAndMarkOlderMissed_test.preload.ts +++ b/ts/test-electron/sql/getRecentStaleRingsAndMarkOlderMissed_test.preload.ts @@ -5,17 +5,17 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; import lodash from 'lodash'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; import { CallMode, CallDirection, CallType, GroupCallStatus, -} from '../../types/CallDisposition.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import type { CallHistoryDetails } from '../../types/CallDisposition.std.js'; -import type { MaybeStaleCallHistory } from '../../sql/Interface.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import type { CallHistoryDetails } from '../../types/CallDisposition.std.ts'; +import type { MaybeStaleCallHistory } from '../../sql/Interface.std.ts'; const { times } = lodash; diff --git a/ts/test-electron/sql/getRecentStoryReplies_test.preload.ts b/ts/test-electron/sql/getRecentStoryReplies_test.preload.ts index 79b0eb4067..31075a8f6d 100644 --- a/ts/test-electron/sql/getRecentStoryReplies_test.preload.ts +++ b/ts/test-electron/sql/getRecentStoryReplies_test.preload.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllMessages, getRecentStoryReplies } = DataReader; const { removeAll, saveMessages } = DataWriter; diff --git a/ts/test-electron/sql/markRead_test.preload.ts b/ts/test-electron/sql/markRead_test.preload.ts index 973d5e234f..2215a64dcc 100644 --- a/ts/test-electron/sql/markRead_test.preload.ts +++ b/ts/test-electron/sql/markRead_test.preload.ts @@ -4,15 +4,15 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; -import type { ReactionType } from '../../types/Reactions.std.js'; -import { ReactionReadStatus } from '../../types/Reactions.std.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; +import type { ReactionType } from '../../types/Reactions.std.ts'; +import { ReactionReadStatus } from '../../types/Reactions.std.ts'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllReactions, _getAllMessages, getTotalUnreadForConversation } = DataReader; diff --git a/ts/test-electron/sql/notificationProfiles_test.preload.ts b/ts/test-electron/sql/notificationProfiles_test.preload.ts index decebb4d85..cd6876f3d9 100644 --- a/ts/test-electron/sql/notificationProfiles_test.preload.ts +++ b/ts/test-electron/sql/notificationProfiles_test.preload.ts @@ -3,12 +3,12 @@ import { assert } from 'chai'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; -import { DayOfWeek } from '../../types/NotificationProfile.std.js'; -import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.js'; +import { DayOfWeek } from '../../types/NotificationProfile.std.ts'; +import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.ts'; -import type { NotificationProfileType } from '../../types/NotificationProfile.std.js'; +import type { NotificationProfileType } from '../../types/NotificationProfile.std.ts'; const { getAllNotificationProfiles } = DataReader; const { diff --git a/ts/test-electron/sql/pollVoteMarkRead_test.preload.ts b/ts/test-electron/sql/pollVoteMarkRead_test.preload.ts index 38319c797c..f50d7958dd 100644 --- a/ts/test-electron/sql/pollVoteMarkRead_test.preload.ts +++ b/ts/test-electron/sql/pollVoteMarkRead_test.preload.ts @@ -4,10 +4,10 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllMessages } = DataReader; diff --git a/ts/test-electron/sql/removeAllConfiguration_test.preload.ts b/ts/test-electron/sql/removeAllConfiguration_test.preload.ts index 2924d8bc24..ff14e41f24 100644 --- a/ts/test-electron/sql/removeAllConfiguration_test.preload.ts +++ b/ts/test-electron/sql/removeAllConfiguration_test.preload.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; -import { DataWriter, DataReader } from '../../sql/Client.preload.js'; +import { DataWriter, DataReader } from '../../sql/Client.preload.ts'; describe('Remove all configuration test', () => { beforeEach(async () => { diff --git a/ts/test-electron/sql/sendLog_test.preload.ts b/ts/test-electron/sql/sendLog_test.preload.ts index 25a0064d2a..8311cab123 100644 --- a/ts/test-electron/sql/sendLog_test.preload.ts +++ b/ts/test-electron/sql/sendLog_test.preload.ts @@ -4,13 +4,13 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { constantTimeEqual, getRandomBytes } from '../../Crypto.node.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { constantTimeEqual, getRandomBytes } from '../../Crypto.node.ts'; import { cleanupMessages, postSaveUpdates, -} from '../../util/cleanup.preload.js'; +} from '../../util/cleanup.preload.ts'; const { _getAllSentProtoMessageIds, diff --git a/ts/test-electron/sql/stories_test.preload.ts b/ts/test-electron/sql/stories_test.preload.ts index 32605a27fb..a67516974c 100644 --- a/ts/test-electron/sql/stories_test.preload.ts +++ b/ts/test-electron/sql/stories_test.preload.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllMessages, getAllStories } = DataReader; const { removeAll, saveMessages } = DataWriter; diff --git a/ts/test-electron/sql/storyDistribution_test.preload.ts b/ts/test-electron/sql/storyDistribution_test.preload.ts index 4d36c482fa..e97c4b53c0 100644 --- a/ts/test-electron/sql/storyDistribution_test.preload.ts +++ b/ts/test-electron/sql/storyDistribution_test.preload.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; -import type { StoryDistributionWithMembersType } from '../../sql/Interface.std.js'; +import type { StoryDistributionWithMembersType } from '../../sql/Interface.std.ts'; const { _getAllStoryDistributionMembers, diff --git a/ts/test-electron/sql/storyReads_test.preload.ts b/ts/test-electron/sql/storyReads_test.preload.ts index 4f0ac34411..476b35f75e 100644 --- a/ts/test-electron/sql/storyReads_test.preload.ts +++ b/ts/test-electron/sql/storyReads_test.preload.ts @@ -4,10 +4,10 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; -import type { StoryReadType } from '../../sql/Interface.std.js'; +import type { StoryReadType } from '../../sql/Interface.std.ts'; const { _getAllStoryReads, getLastStoryReadsForAuthor } = DataReader; diff --git a/ts/test-electron/sql/timelineFetches_test.preload.ts b/ts/test-electron/sql/timelineFetches_test.preload.ts index 7b39d4b66e..227c9e0cc2 100644 --- a/ts/test-electron/sql/timelineFetches_test.preload.ts +++ b/ts/test-electron/sql/timelineFetches_test.preload.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; const { _getAllMessages, diff --git a/ts/test-electron/sql/utils_test.node.ts b/ts/test-electron/sql/utils_test.node.ts index 6df232742f..98667ac917 100644 --- a/ts/test-electron/sql/utils_test.node.ts +++ b/ts/test-electron/sql/utils_test.node.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import type { Database } from '@signalapp/sqlcipher'; import SQL from '@signalapp/sqlcipher'; -import { sql, sqlFragment, sqlJoin } from '../../sql/util.std.js'; +import { sql, sqlFragment, sqlJoin } from '../../sql/util.std.ts'; describe('sql/utils/sql', () => { let db: Database; diff --git a/ts/test-electron/state/ducks/calling_test.preload.ts b/ts/test-electron/state/ducks/calling_test.preload.ts index d01c71d954..7d7cb043eb 100644 --- a/ts/test-electron/state/ducks/calling_test.preload.ts +++ b/ts/test-electron/state/ducks/calling_test.preload.ts @@ -8,9 +8,9 @@ import type { PeekInfo } from '@signalapp/ringrtc'; import type { StateType as RootStateType, StateType, -} from '../../../state/reducer.preload.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; +} from '../../../state/reducer.preload.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; import type { ActiveCallStateType, CallingActionType, @@ -22,35 +22,35 @@ import type { HandleCallLinkUpdateType, SendGroupCallReactionActionType, StartCallLinkLobbyType, -} from '../../../state/ducks/calling.preload.js'; +} from '../../../state/ducks/calling.preload.ts'; import { actions, getActiveCall, getEmptyState, reducer, -} from '../../../state/ducks/calling.preload.js'; -import { isAnybodyElseInGroupCall } from '../../../state/ducks/callingHelpers.std.js'; -import { truncateAudioLevel } from '../../../calling/truncateAudioLevel.std.js'; -import { calling as callingService } from '../../../services/calling.preload.js'; +} from '../../../state/ducks/calling.preload.ts'; +import { isAnybodyElseInGroupCall } from '../../../state/ducks/callingHelpers.std.ts'; +import { truncateAudioLevel } from '../../../calling/truncateAudioLevel.std.ts'; +import { calling as callingService } from '../../../services/calling.preload.ts'; import { CallState, CallViewMode, GroupCallConnectionState, GroupCallJoinState, -} from '../../../types/Calling.std.js'; -import { CallMode } from '../../../types/CallDisposition.std.js'; -import { generateAci } from '../../../types/ServiceId.std.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import type { UnwrapPromise } from '../../../types/Util.std.js'; +} from '../../../types/Calling.std.ts'; +import { CallMode } from '../../../types/CallDisposition.std.ts'; +import { generateAci } from '../../../types/ServiceId.std.ts'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import type { UnwrapPromise } from '../../../types/Util.std.ts'; import { FAKE_CALL_LINK, FAKE_CALL_LINK_WITH_ADMIN_KEY, getCallLinkState, -} from '../../../test-helpers/fakeCallLink.std.js'; -import { strictAssert } from '../../../util/assert.std.js'; -import { callLinkRefreshJobQueue } from '../../../jobs/callLinkRefreshJobQueue.preload.js'; -import { CALL_LINK_DEFAULT_STATE } from '../../../util/callLinks.std.js'; -import { DataWriter } from '../../../sql/Client.preload.js'; +} from '../../../test-helpers/fakeCallLink.std.ts'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { callLinkRefreshJobQueue } from '../../../jobs/callLinkRefreshJobQueue.preload.ts'; +import { CALL_LINK_DEFAULT_STATE } from '../../../util/callLinks.std.ts'; +import { DataWriter } from '../../../sql/Client.preload.ts'; const { cloneDeep, noop } = lodash; diff --git a/ts/test-electron/state/ducks/conversations_test.preload.ts b/ts/test-electron/state/ducks/conversations_test.preload.ts index 8fe33575b7..aceb172864 100644 --- a/ts/test-electron/state/ducks/conversations_test.preload.ts +++ b/ts/test-electron/state/ducks/conversations_test.preload.ts @@ -7,13 +7,13 @@ import { v4 as generateUuid } from 'uuid'; import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; import { ComposerStep, ConversationVerificationState, OneTimeModalState, -} from '../../../state/ducks/conversationsEnums.std.js'; +} from '../../../state/ducks/conversationsEnums.std.ts'; import type { CancelVerificationDataByConversationActionType, ConversationMessageType, @@ -24,7 +24,7 @@ import type { ToggleConversationInChooseMembersActionType, MessageChangedActionType, ConversationsUpdatedActionType, -} from '../../../state/ducks/conversations.preload.js'; +} from '../../../state/ducks/conversations.preload.ts'; import { TARGETED_CONVERSATION_CHANGED, actions, @@ -33,43 +33,43 @@ import { getEmptyState, reducer, updateConversationLookups, -} from '../../../state/ducks/conversations.preload.js'; -import { ReadStatus } from '../../../messages/MessageReadStatus.std.js'; -import type { SingleServePromiseIdString } from '../../../services/singleServePromise.std.js'; -import { CallMode } from '../../../types/CallDisposition.std.js'; +} from '../../../state/ducks/conversations.preload.ts'; +import { ReadStatus } from '../../../messages/MessageReadStatus.std.ts'; +import type { SingleServePromiseIdString } from '../../../services/singleServePromise.std.ts'; +import { CallMode } from '../../../types/CallDisposition.std.ts'; import { type AciString, type PniString, generateAci, getAciFromPrefix, -} from '../../../types/ServiceId.std.js'; -import { generateStoryDistributionId } from '../../../types/StoryDistributionId.std.js'; +} from '../../../types/ServiceId.std.ts'; +import { generateStoryDistributionId } from '../../../types/StoryDistributionId.std.ts'; import { getDefaultConversation, getDefaultConversationWithServiceId, getDefaultGroup, -} from '../../../test-helpers/getDefaultConversation.std.js'; -import { getDefaultAvatars } from '../../../types/Avatar.std.js'; +} from '../../../test-helpers/getDefaultConversation.std.ts'; +import { getDefaultAvatars } from '../../../types/Avatar.std.ts'; import { defaultStartDirectConversationComposerState, defaultChooseGroupMembersComposerState, defaultSetGroupMetadataComposerState, -} from '../../../test-helpers/defaultComposerStates.std.js'; -import { updateRemoteConfig } from '../../../test-helpers/RemoteConfigStub.dom.js'; -import type { ShowSendAnywayDialogActionType } from '../../../state/ducks/globalModals.preload.js'; -import { SHOW_SEND_ANYWAY_DIALOG } from '../../../state/ducks/globalModals.preload.js'; -import type { StoryDistributionListsActionType } from '../../../state/ducks/storyDistributionLists.preload.js'; +} from '../../../test-helpers/defaultComposerStates.std.ts'; +import { updateRemoteConfig } from '../../../test-helpers/RemoteConfigStub.dom.ts'; +import type { ShowSendAnywayDialogActionType } from '../../../state/ducks/globalModals.preload.ts'; +import { SHOW_SEND_ANYWAY_DIALOG } from '../../../state/ducks/globalModals.preload.ts'; +import type { StoryDistributionListsActionType } from '../../../state/ducks/storyDistributionLists.preload.ts'; import { DELETE_LIST, HIDE_MY_STORIES_FROM, MODIFY_LIST, VIEWERS_CHANGED, -} from '../../../state/ducks/storyDistributionLists.preload.js'; -import { MY_STORY_ID } from '../../../types/Stories.std.js'; +} from '../../../state/ducks/storyDistributionLists.preload.ts'; +import { MY_STORY_ID } from '../../../types/Stories.std.ts'; import type { ReadonlyMessageAttributesType } from '../../../model-types.d.ts'; -import { strictAssert } from '../../../util/assert.std.js'; -import { getConversationCallMode } from '../../../util/getConversationCallMode.std.js'; -import { itemStorage } from '../../../textsecure/Storage.preload.js'; +import { strictAssert } from '../../../util/assert.std.ts'; +import { getConversationCallMode } from '../../../util/getConversationCallMode.std.ts'; +import { itemStorage } from '../../../textsecure/Storage.preload.ts'; const { times } = lodash; diff --git a/ts/test-electron/state/ducks/stories_test.preload.ts b/ts/test-electron/state/ducks/stories_test.preload.ts index d5640d5314..42cb71d552 100644 --- a/ts/test-electron/state/ducks/stories_test.preload.ts +++ b/ts/test-electron/state/ducks/stories_test.preload.ts @@ -8,30 +8,30 @@ import { v4 as generateUuid } from 'uuid'; import type { DispatchableViewStoryType, StoryDataType, -} from '../../../state/ducks/stories.preload.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; +} from '../../../state/ducks/stories.preload.ts'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; import type { MessageAttributesType } from '../../../model-types.d.ts'; -import type { StateType as RootStateType } from '../../../state/reducer.preload.js'; -import { DurationInSeconds } from '../../../util/durations/index.std.js'; -import { TEXT_ATTACHMENT, IMAGE_JPEG } from '../../../types/MIME.std.js'; -import { ReadStatus } from '../../../messages/MessageReadStatus.std.js'; +import type { StateType as RootStateType } from '../../../state/reducer.preload.ts'; +import { DurationInSeconds } from '../../../util/durations/index.std.ts'; +import { TEXT_ATTACHMENT, IMAGE_JPEG } from '../../../types/MIME.std.ts'; +import { ReadStatus } from '../../../messages/MessageReadStatus.std.ts'; import { StoryViewDirectionType, StoryViewModeType, -} from '../../../types/Stories.std.js'; -import type { StoryDistributionIdString } from '../../../types/StoryDistributionId.std.js'; -import { generateAci, generatePni } from '../../../types/ServiceId.std.js'; -import { generateStoryDistributionId } from '../../../types/StoryDistributionId.std.js'; +} from '../../../types/Stories.std.ts'; +import type { StoryDistributionIdString } from '../../../types/StoryDistributionId.std.ts'; +import { generateAci, generatePni } from '../../../types/ServiceId.std.ts'; +import { generateStoryDistributionId } from '../../../types/StoryDistributionId.std.ts'; import { actions, getEmptyState, -} from '../../../state/ducks/stories.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import { dropNull } from '../../../util/dropNull.std.js'; -import { MessageModel } from '../../../models/messages.preload.js'; -import { DataWriter } from '../../../sql/Client.preload.js'; -import { itemStorage } from '../../../textsecure/Storage.preload.js'; +} from '../../../state/ducks/stories.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import { dropNull } from '../../../util/dropNull.std.ts'; +import { MessageModel } from '../../../models/messages.preload.ts'; +import { DataWriter } from '../../../sql/Client.preload.ts'; +import { itemStorage } from '../../../textsecure/Storage.preload.ts'; describe('both/state/ducks/stories', () => { const ourAci = generateAci(); diff --git a/ts/test-electron/state/ducks/username_test.preload.ts b/ts/test-electron/state/ducks/username_test.preload.ts index 68c24e915d..8c18ce5c7a 100644 --- a/ts/test-electron/state/ducks/username_test.preload.ts +++ b/ts/test-electron/state/ducks/username_test.preload.ts @@ -4,26 +4,26 @@ import * as sinon from 'sinon'; import { assert } from 'chai'; -import type { UsernameStateType } from '../../../state/ducks/username.preload.js'; +import type { UsernameStateType } from '../../../state/ducks/username.preload.ts'; import { getUsernameEditState, getUsernameReservationState, getUsernameReservationError, getUsernameReservationObject, -} from '../../../state/selectors/username.std.js'; +} from '../../../state/selectors/username.std.ts'; import { UsernameEditState, UsernameReservationState, UsernameReservationError, -} from '../../../state/ducks/usernameEnums.std.js'; -import { actions } from '../../../state/ducks/username.preload.js'; -import { ToastType } from '../../../types/Toast.dom.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import { reducer } from '../../../state/reducer.preload.js'; +} from '../../../state/ducks/usernameEnums.std.ts'; +import { actions } from '../../../state/ducks/username.preload.ts'; +import { ToastType } from '../../../types/Toast.dom.tsx'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import { reducer } from '../../../state/reducer.preload.ts'; import { ReserveUsernameError, ConfirmUsernameResult, -} from '../../../types/Username.std.js'; +} from '../../../types/Username.std.ts'; const DEFAULT_RESERVATION = { username: 'abc.12', diff --git a/ts/test-electron/state/selectors/audioPlayer_test.preload.ts b/ts/test-electron/state/selectors/audioPlayer_test.preload.ts index 334b4d8362..5928ce5f7f 100644 --- a/ts/test-electron/state/selectors/audioPlayer_test.preload.ts +++ b/ts/test-electron/state/selectors/audioPlayer_test.preload.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import type { VoiceNoteAndConsecutiveForPlayback } from '../../../state/selectors/audioPlayer.preload.js'; -import { isPaused } from '../../../state/selectors/audioPlayer.preload.js'; -import { actions } from '../../../state/ducks/audioPlayer.preload.js'; -import type { StateType } from '../../../state/reducer.preload.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import type { VoiceNoteAndConsecutiveForPlayback } from '../../../state/selectors/audioPlayer.preload.ts'; +import { isPaused } from '../../../state/selectors/audioPlayer.preload.ts'; +import { actions } from '../../../state/ducks/audioPlayer.preload.ts'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; function voiceNoteDataForMessage( messageId: string diff --git a/ts/test-electron/state/selectors/calling_test.preload.ts b/ts/test-electron/state/selectors/calling_test.preload.ts index 44c8ab5645..02f2441b48 100644 --- a/ts/test-electron/state/selectors/calling_test.preload.ts +++ b/ts/test-electron/state/selectors/calling_test.preload.ts @@ -2,34 +2,34 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import { actions as userActions } from '../../../state/ducks/user.preload.js'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import { actions as userActions } from '../../../state/ducks/user.preload.ts'; import { CallState, CallViewMode, GroupCallConnectionState, GroupCallJoinState, -} from '../../../types/Calling.std.js'; -import { CallMode } from '../../../types/CallDisposition.std.js'; -import { generateAci } from '../../../types/ServiceId.std.js'; +} from '../../../types/Calling.std.ts'; +import { CallMode } from '../../../types/CallDisposition.std.ts'; +import { generateAci } from '../../../types/ServiceId.std.ts'; import { getCallsByConversation, getCallSelector, getHasAnyAdminCallLinks, getRingingCall, isInCall, -} from '../../../state/selectors/calling.std.js'; +} from '../../../state/selectors/calling.std.ts'; import type { CallingStateType, DirectCallStateType, GroupCallStateType, -} from '../../../state/ducks/calling.preload.js'; -import { getEmptyState } from '../../../state/ducks/calling.preload.js'; +} from '../../../state/ducks/calling.preload.ts'; +import { getEmptyState } from '../../../state/ducks/calling.preload.ts'; import { FAKE_CALL_LINK, FAKE_CALL_LINK_WITH_ADMIN_KEY, -} from '../../../test-helpers/fakeCallLink.std.js'; +} from '../../../test-helpers/fakeCallLink.std.ts'; const OUR_ACI = generateAci(); const ACI_1 = generateAci(); diff --git a/ts/test-electron/state/selectors/conversations-extra_test.preload.ts b/ts/test-electron/state/selectors/conversations-extra_test.preload.ts index 5c6c014e92..0962b892ce 100644 --- a/ts/test-electron/state/selectors/conversations-extra_test.preload.ts +++ b/ts/test-electron/state/selectors/conversations-extra_test.preload.ts @@ -3,23 +3,23 @@ import { assert } from 'chai'; -import type { StateType } from '../../../state/reducer.preload.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import type { StoryDistributionListDataType } from '../../../state/ducks/storyDistributionLists.preload.js'; -import type { StoryDistributionIdString } from '../../../types/StoryDistributionId.std.js'; -import type { ServiceIdString } from '../../../types/ServiceId.std.js'; -import type { ContactsByStory } from '../../../components/SafetyNumberChangeDialog.dom.js'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import type { StoryDistributionListDataType } from '../../../state/ducks/storyDistributionLists.preload.ts'; +import type { StoryDistributionIdString } from '../../../types/StoryDistributionId.std.ts'; +import type { ServiceIdString } from '../../../types/ServiceId.std.ts'; +import type { ContactsByStory } from '../../../components/SafetyNumberChangeDialog.dom.tsx'; -import * as Bytes from '../../../Bytes.std.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { getEmptyState } from '../../../state/ducks/conversations.preload.js'; -import { getByDistributionListConversationsStoppingSend } from '../../../state/selectors/conversations-extra.preload.js'; -import { generateAci } from '../../../types/ServiceId.std.js'; -import { generateStoryDistributionId } from '../../../types/StoryDistributionId.std.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import { ID_LENGTH } from '../../../types/groups.std.js'; -import { ConversationVerificationState } from '../../../state/ducks/conversationsEnums.std.js'; +import * as Bytes from '../../../Bytes.std.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { getEmptyState } from '../../../state/ducks/conversations.preload.ts'; +import { getByDistributionListConversationsStoppingSend } from '../../../state/selectors/conversations-extra.preload.ts'; +import { generateAci } from '../../../types/ServiceId.std.ts'; +import { generateStoryDistributionId } from '../../../types/StoryDistributionId.std.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import { ID_LENGTH } from '../../../types/groups.std.ts'; +import { ConversationVerificationState } from '../../../state/ducks/conversationsEnums.std.ts'; describe('both/state/selectors/conversations-extra', () => { const SERVICE_ID_1 = generateAci(); diff --git a/ts/test-electron/state/selectors/messages_test.preload.ts b/ts/test-electron/state/selectors/messages_test.preload.ts index fd5c32a071..eaec97cbdb 100644 --- a/ts/test-electron/state/selectors/messages_test.preload.ts +++ b/ts/test-electron/state/selectors/messages_test.preload.ts @@ -4,17 +4,17 @@ import { assert } from 'chai'; import * as moment from 'moment'; import { v4 as uuid } from 'uuid'; -import { SendStatus } from '../../../messages/MessageSendState.std.js'; +import { SendStatus } from '../../../messages/MessageSendState.std.ts'; import type { MessageAttributesType, ShallowChallengeError, } from '../../../model-types.d.ts'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; import { generateGroupId, getDefaultConversation, getDefaultGroup, -} from '../../../test-helpers/getDefaultConversation.std.js'; +} from '../../../test-helpers/getDefaultConversation.std.ts'; import { canReact, @@ -25,15 +25,15 @@ import { isGroupUpdate, isIncoming, isOutgoing, -} from '../../../state/selectors/message.preload.js'; +} from '../../../state/selectors/message.preload.ts'; import type { DeleteForEveryoneConversation, DeleteForEveryoneMessage, -} from '../../../util/canDeleteForEveryone.preload.js'; -import { canSendDeleteForEveryone } from '../../../util/canDeleteForEveryone.preload.js'; -import type { AciString } from '../../../types/ServiceId.std.js'; -import { SIGNAL_ACI } from '../../../types/SignalConversation.std.js'; -import { OUR_ACI, setupBasics } from '../../backup/helpers.preload.js'; +} from '../../../util/canDeleteForEveryone.preload.ts'; +import { canSendDeleteForEveryone } from '../../../util/canDeleteForEveryone.preload.ts'; +import type { AciString } from '../../../types/ServiceId.std.ts'; +import { SIGNAL_ACI } from '../../../types/SignalConversation.std.ts'; +import { OUR_ACI, setupBasics } from '../../backup/helpers.preload.ts'; describe('state/selectors/messages', () => { let ourConversationId: string; diff --git a/ts/test-electron/textsecure/AccountManager_test.preload.ts b/ts/test-electron/textsecure/AccountManager_test.preload.ts index 03330a28ca..fc4d84aa84 100644 --- a/ts/test-electron/textsecure/AccountManager_test.preload.ts +++ b/ts/test-electron/textsecure/AccountManager_test.preload.ts @@ -5,9 +5,9 @@ import { assert } from 'chai'; import lodash from 'lodash'; import * as sinon from 'sinon'; -import { generateRegistrationId, getRandomBytes } from '../../Crypto.node.js'; -import { generateKeyPair } from '../../Curve.node.js'; -import AccountManager from '../../textsecure/AccountManager.preload.js'; +import { generateRegistrationId, getRandomBytes } from '../../Crypto.node.ts'; +import { generateKeyPair } from '../../Curve.node.ts'; +import AccountManager from '../../textsecure/AccountManager.preload.ts'; import type { KyberPreKeyType, OuterSignedPrekeyType, @@ -17,10 +17,10 @@ import { ServiceIdKind, generateAci, generatePni, -} from '../../types/ServiceId.std.js'; -import { DAY } from '../../util/durations/index.std.js'; -import { signalProtocolStore } from '../../SignalProtocolStore.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../types/ServiceId.std.ts'; +import { DAY } from '../../util/durations/index.std.ts'; +import { signalProtocolStore } from '../../SignalProtocolStore.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const { range } = lodash; diff --git a/ts/test-electron/textsecure/KeyChangeListener_test.preload.ts b/ts/test-electron/textsecure/KeyChangeListener_test.preload.ts index d65925ea6a..5648f1173d 100644 --- a/ts/test-electron/textsecure/KeyChangeListener_test.preload.ts +++ b/ts/test-electron/textsecure/KeyChangeListener_test.preload.ts @@ -3,18 +3,18 @@ import { assert } from 'chai'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { getRandomBytes } from '../../Crypto.node.js'; -import { Address } from '../../types/Address.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { explodePromise } from '../../util/explodePromise.std.js'; -import { SignalProtocolStore } from '../../SignalProtocolStore.preload.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; -import * as KeyChangeListener from '../../textsecure/KeyChangeListener.dom.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import * as Bytes from '../../Bytes.std.js'; -import { cleanupMessages } from '../../util/cleanup.preload.js'; -import { removeConversation } from '../../util/Conversation.preload.js'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import { Address } from '../../types/Address.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { explodePromise } from '../../util/explodePromise.std.ts'; +import { SignalProtocolStore } from '../../SignalProtocolStore.preload.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; +import * as KeyChangeListener from '../../textsecure/KeyChangeListener.dom.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { cleanupMessages } from '../../util/cleanup.preload.ts'; +import { removeConversation } from '../../util/Conversation.preload.ts'; describe('KeyChangeListener', () => { let oldNumberId: string | undefined; diff --git a/ts/test-electron/textsecure/WebAPI_test.preload.ts b/ts/test-electron/textsecure/WebAPI_test.preload.ts index bf3b3c56fa..9f8245cffe 100644 --- a/ts/test-electron/textsecure/WebAPI_test.preload.ts +++ b/ts/test-electron/textsecure/WebAPI_test.preload.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { makeKeysLowercase } from '../../textsecure/WebAPI.preload.js'; +import { makeKeysLowercase } from '../../textsecure/WebAPI.preload.ts'; describe('WebAPI', () => { describe('makeKeysLowercase', () => { diff --git a/ts/test-electron/textsecure/generate_keys_test.preload.ts b/ts/test-electron/textsecure/generate_keys_test.preload.ts index 9b5bfa4336..e1c1eba8df 100644 --- a/ts/test-electron/textsecure/generate_keys_test.preload.ts +++ b/ts/test-electron/textsecure/generate_keys_test.preload.ts @@ -3,18 +3,18 @@ import { assert } from 'chai'; -import { constantTimeEqual } from '../../Crypto.node.js'; -import { generateKeyPair } from '../../Curve.node.js'; +import { constantTimeEqual } from '../../Crypto.node.ts'; +import { generateKeyPair } from '../../Curve.node.ts'; import type { UploadKeysType, UploadPreKeyType, -} from '../../textsecure/WebAPI.preload.js'; -import AccountManager from '../../textsecure/AccountManager.preload.js'; -import { ServiceIdKind } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { signalProtocolStore } from '../../SignalProtocolStore.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../textsecure/WebAPI.preload.ts'; +import AccountManager from '../../textsecure/AccountManager.preload.ts'; +import { ServiceIdKind } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { signalProtocolStore } from '../../SignalProtocolStore.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const assertEqualBuffers = ( a: Uint8Array, diff --git a/ts/test-electron/updateConversationsWithUuidLookup_test.preload.ts b/ts/test-electron/updateConversationsWithUuidLookup_test.preload.ts index c43ec72c23..28f506f100 100644 --- a/ts/test-electron/updateConversationsWithUuidLookup_test.preload.ts +++ b/ts/test-electron/updateConversationsWithUuidLookup_test.preload.ts @@ -3,16 +3,16 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; import sinon from 'sinon'; -import { DataWriter } from '../sql/Client.preload.js'; -import { ConversationModel } from '../models/conversations.preload.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { ConversationModel } from '../models/conversations.preload.ts'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import { generateAci, normalizeServiceId } from '../types/ServiceId.std.js'; -import { normalizeAci } from '../util/normalizeAci.std.js'; +import { generateAci, normalizeServiceId } from '../types/ServiceId.std.ts'; +import { normalizeAci } from '../util/normalizeAci.std.ts'; import { updateConversationsWithUuidLookup, type ServerType, -} from '../updateConversationsWithUuidLookup.dom.js'; +} from '../updateConversationsWithUuidLookup.dom.ts'; describe('updateConversationsWithUuidLookup', () => { class FakeConversationController { diff --git a/ts/test-electron/util/Username_test.dom.ts b/ts/test-electron/util/Username_test.dom.ts index 07005fb0e0..fb32d94596 100644 --- a/ts/test-electron/util/Username_test.dom.ts +++ b/ts/test-electron/util/Username_test.dom.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import * as Username from '../../util/Username.dom.js'; +import * as Username from '../../util/Username.dom.ts'; describe('Username', () => { describe('isUsernameValid', () => { diff --git a/ts/test-electron/util/addAttachmentToMessage_test.preload.ts b/ts/test-electron/util/addAttachmentToMessage_test.preload.ts index bb293bda3e..b6066170be 100644 --- a/ts/test-electron/util/addAttachmentToMessage_test.preload.ts +++ b/ts/test-electron/util/addAttachmentToMessage_test.preload.ts @@ -7,17 +7,17 @@ import { randomBytes } from 'node:crypto'; import { readdir, writeFile } from 'node:fs/promises'; import { v7 } from 'uuid'; -import * as MIME from '../../types/MIME.std.js'; -import { composeAttachment } from '../../test-node/util/queueAttachmentDownloads_test.preload.js'; -import { addAttachmentToMessage } from '../../messageModifiers/AttachmentDownloads.preload.js'; -import { getMessageById } from '../../messages/getMessageById.preload.js'; -import { MessageCache } from '../../services/MessageCache.preload.js'; -import { getAttachmentsPath } from '../../../app/attachments.node.js'; -import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import type { MessageAttributesType } from '../../model-types.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import * as MIME from '../../types/MIME.std.ts'; +import { composeAttachment } from '../../test-node/util/queueAttachmentDownloads_test.preload.ts'; +import { addAttachmentToMessage } from '../../messageModifiers/AttachmentDownloads.preload.ts'; +import { getMessageById } from '../../messages/getMessageById.preload.ts'; +import { MessageCache } from '../../services/MessageCache.preload.ts'; +import { getAttachmentsPath } from '../../../app/attachments.node.ts'; +import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import type { MessageAttributesType } from '../../model-types.d.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; describe('addAttachmentToMessage', () => { beforeEach(async () => { diff --git a/ts/test-electron/util/canvasToBlob_test.dom.ts b/ts/test-electron/util/canvasToBlob_test.dom.ts index e94e240d1b..d968b3e401 100644 --- a/ts/test-electron/util/canvasToBlob_test.dom.ts +++ b/ts/test-electron/util/canvasToBlob_test.dom.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { IMAGE_JPEG, IMAGE_PNG } from '../../types/MIME.std.js'; -import { sniffImageMimeType } from '../../util/sniffImageMimeType.std.js'; +import { IMAGE_JPEG, IMAGE_PNG } from '../../types/MIME.std.ts'; +import { sniffImageMimeType } from '../../util/sniffImageMimeType.std.ts'; -import { canvasToBlob } from '../../util/canvasToBlob.std.js'; +import { canvasToBlob } from '../../util/canvasToBlob.std.ts'; describe('canvasToBlob', () => { let canvas: HTMLCanvasElement; diff --git a/ts/test-electron/util/canvasToBytes_test.dom.ts b/ts/test-electron/util/canvasToBytes_test.dom.ts index f64e21d6c4..47e087b21b 100644 --- a/ts/test-electron/util/canvasToBytes_test.dom.ts +++ b/ts/test-electron/util/canvasToBytes_test.dom.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { IMAGE_JPEG, IMAGE_PNG } from '../../types/MIME.std.js'; -import { sniffImageMimeType } from '../../util/sniffImageMimeType.std.js'; +import { IMAGE_JPEG, IMAGE_PNG } from '../../types/MIME.std.ts'; +import { sniffImageMimeType } from '../../util/sniffImageMimeType.std.ts'; -import { canvasToBytes } from '../../util/canvasToBytes.std.js'; +import { canvasToBytes } from '../../util/canvasToBytes.std.ts'; describe('canvasToBytes', () => { let canvas: HTMLCanvasElement; diff --git a/ts/test-electron/util/cleanup_message_test.preload.ts b/ts/test-electron/util/cleanup_message_test.preload.ts index 0da33b2998..b8d1d3e999 100644 --- a/ts/test-electron/util/cleanup_message_test.preload.ts +++ b/ts/test-electron/util/cleanup_message_test.preload.ts @@ -8,17 +8,17 @@ import { emptyDir, ensureFile, readdirSync } from 'fs-extra'; import { eraseMessageContents, cleanupFilesAndReferencesToMessage, -} from '../../util/cleanup.preload.js'; -import { MessageModel } from '../../models/messages.preload.js'; -import type { PollMessageAttribute } from '../../types/Polls.dom.js'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import type { MessageAttributesType } from '../../model-types.js'; -import { IMAGE_BMP, IMAGE_JPEG } from '../../types/MIME.std.js'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.js'; -import { getAttachmentsPath } from '../../../app/attachments.node.js'; +} from '../../util/cleanup.preload.ts'; +import { MessageModel } from '../../models/messages.preload.ts'; +import type { PollMessageAttribute } from '../../types/Polls.dom.ts'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import type { MessageAttributesType } from '../../model-types.d.ts'; +import { IMAGE_BMP, IMAGE_JPEG } from '../../types/MIME.std.ts'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import { getAbsoluteAttachmentPath } from '../../util/migrations.preload.ts'; +import { getAttachmentsPath } from '../../../app/attachments.node.ts'; async function writeAttachmentFile(path: string) { await ensureFile(getAbsoluteAttachmentPath(path)); diff --git a/ts/test-electron/util/downloadAttachment_test.preload.ts b/ts/test-electron/util/downloadAttachment_test.preload.ts index 2042bb2c4a..2c54202b53 100644 --- a/ts/test-electron/util/downloadAttachment_test.preload.ts +++ b/ts/test-electron/util/downloadAttachment_test.preload.ts @@ -5,24 +5,24 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import lodash from 'lodash'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { IMAGE_PNG } from '../../types/MIME.std.js'; -import { downloadAttachment } from '../../util/downloadAttachment.preload.js'; -import { MediaTier } from '../../types/AttachmentDownload.std.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; -import { getCdnNumberForBackupTier } from '../../textsecure/downloadAttachment.preload.js'; -import { MASTER_KEY, MEDIA_ROOT_KEY } from '../backup/helpers.preload.js'; -import { getMediaIdFromMediaName } from '../../services/backups/util/mediaId.preload.js'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { IMAGE_PNG } from '../../types/MIME.std.ts'; +import { downloadAttachment } from '../../util/downloadAttachment.preload.ts'; +import { MediaTier } from '../../types/AttachmentDownload.std.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; +import { getCdnNumberForBackupTier } from '../../textsecure/downloadAttachment.preload.ts'; +import { MASTER_KEY, MEDIA_ROOT_KEY } from '../backup/helpers.preload.ts'; +import { getMediaIdFromMediaName } from '../../services/backups/util/mediaId.preload.ts'; import { AttachmentVariant, AttachmentPermanentlyUndownloadableError, -} from '../../types/Attachment.std.js'; -import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.js'; -import { toHex, toBase64 } from '../../Bytes.std.js'; -import { generateAttachmentKeys } from '../../AttachmentCrypto.node.js'; -import { getRandomBytes } from '../../Crypto.node.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { DAY, HOUR } from '../../util/durations/constants.std.js'; +} from '../../types/Attachment.std.ts'; +import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.ts'; +import { toHex, toBase64 } from '../../Bytes.std.ts'; +import { generateAttachmentKeys } from '../../AttachmentCrypto.node.ts'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { DAY, HOUR } from '../../util/durations/constants.std.ts'; const { noop } = lodash; diff --git a/ts/test-electron/util/encryptProfileData_test.preload.ts b/ts/test-electron/util/encryptProfileData_test.preload.ts index 342651c7ce..6bca1a79cf 100644 --- a/ts/test-electron/util/encryptProfileData_test.preload.ts +++ b/ts/test-electron/util/encryptProfileData_test.preload.ts @@ -3,16 +3,16 @@ import { assert } from 'chai'; -import * as Bytes from '../../Bytes.std.js'; +import * as Bytes from '../../Bytes.std.ts'; import { trimForDisplay, getRandomBytes, decryptProfileName, decryptProfile, -} from '../../Crypto.node.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { encryptProfileData } from '../../util/encryptProfileData.preload.js'; +} from '../../Crypto.node.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { encryptProfileData } from '../../util/encryptProfileData.preload.ts'; describe('encryptProfileData', () => { let keyBuffer: Uint8Array; diff --git a/ts/test-electron/util/formatTimestamp_test.preload.ts b/ts/test-electron/util/formatTimestamp_test.preload.ts index afbaf432ae..858d011e2f 100644 --- a/ts/test-electron/util/formatTimestamp_test.preload.ts +++ b/ts/test-electron/util/formatTimestamp_test.preload.ts @@ -10,9 +10,9 @@ import { formatDateTimeLong, formatDateTimeShort, formatTime, -} from '../../util/formatTimestamp.dom.js'; -import { HourCyclePreference } from '../../types/I18N.std.js'; -import i18n from '../../test-node/util/i18n.node.js'; +} from '../../util/formatTimestamp.dom.ts'; +import { HourCyclePreference } from '../../types/I18N.std.ts'; +import i18n from '../../test-node/util/i18n.node.ts'; const min = new Date(2023, 0, 1, 0).getTime(); const max = new Date(2023, 0, 1, 23).getTime(); diff --git a/ts/test-electron/util/imagePathToBytes_test.preload.ts b/ts/test-electron/util/imagePathToBytes_test.preload.ts index 792ee45289..4237cbfdc0 100644 --- a/ts/test-electron/util/imagePathToBytes_test.preload.ts +++ b/ts/test-electron/util/imagePathToBytes_test.preload.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import path from 'node:path'; -import { imagePathToBytes } from '../../util/imagePathToBytes.dom.js'; +import { imagePathToBytes } from '../../util/imagePathToBytes.dom.ts'; describe('imagePathToBytes', () => { it('converts an image to an Bytes', async () => { diff --git a/ts/test-electron/util/isFeatureEnabled_test.dom.ts b/ts/test-electron/util/isFeatureEnabled_test.dom.ts index c9c56a5783..bb70feb105 100644 --- a/ts/test-electron/util/isFeatureEnabled_test.dom.ts +++ b/ts/test-electron/util/isFeatureEnabled_test.dom.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { _isFeatureEnabledInner } from '../../util/isFeatureEnabled.dom.js'; +import { _isFeatureEnabledInner } from '../../util/isFeatureEnabled.dom.ts'; const isTestEnvironment = () => false; diff --git a/ts/test-electron/util/isWindowDragElement_test.dom.ts b/ts/test-electron/util/isWindowDragElement_test.dom.ts index 11a78deac2..47d7c6a61b 100644 --- a/ts/test-electron/util/isWindowDragElement_test.dom.ts +++ b/ts/test-electron/util/isWindowDragElement_test.dom.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isWindowDragElement } from '../../util/isWindowDragElement.std.js'; +import { isWindowDragElement } from '../../util/isWindowDragElement.std.ts'; describe('isWindowDragElement', () => { const crel = (tagName: string, appRegion?: string): Element => { diff --git a/ts/test-electron/util/migrateMessageData_test.preload.ts b/ts/test-electron/util/migrateMessageData_test.preload.ts index 91609d4bc3..9e4695101e 100644 --- a/ts/test-electron/util/migrateMessageData_test.preload.ts +++ b/ts/test-electron/util/migrateMessageData_test.preload.ts @@ -3,13 +3,13 @@ import assert from 'node:assert'; import { v7 as uuid } from 'uuid'; -import { _migrateMessageData as migrateMessageData } from '../../messages/migrateMessageData.preload.js'; +import { _migrateMessageData as migrateMessageData } from '../../messages/migrateMessageData.preload.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { DataReader, DataWriter } from '../../sql/Client.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { postSaveUpdates } from '../../util/cleanup.preload.js'; -import { upgradeMessageSchema } from '../../util/migrations.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +import { DataReader, DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { postSaveUpdates } from '../../util/cleanup.preload.ts'; +import { upgradeMessageSchema } from '../../util/migrations.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; function composeMessage(timestamp: number): MessageAttributesType { return { diff --git a/ts/test-electron/util/reactions_test.preload.ts b/ts/test-electron/util/reactions_test.preload.ts index 5d7605598b..4652f8b7df 100644 --- a/ts/test-electron/util/reactions_test.preload.ts +++ b/ts/test-electron/util/reactions_test.preload.ts @@ -3,15 +3,15 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { generateAci, generatePni } from '../../types/ServiceId.std.js'; -import { isMessageAMatchForReaction } from '../../messageModifiers/Reactions.preload.js'; -import { generateMessageId } from '../../util/generateMessageId.node.js'; -import { incrementMessageCounter } from '../../util/incrementMessageCounter.preload.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { generateAci, generatePni } from '../../types/ServiceId.std.ts'; +import { isMessageAMatchForReaction } from '../../messageModifiers/Reactions.preload.ts'; +import { generateMessageId } from '../../util/generateMessageId.node.ts'; +import { incrementMessageCounter } from '../../util/incrementMessageCounter.preload.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; describe('isMessageAMatchForReaction', () => { let contactA: ConversationModel; diff --git a/ts/test-electron/util/scaleImageToLevel_test.preload.ts b/ts/test-electron/util/scaleImageToLevel_test.preload.ts index 4c8f5d6a54..db74ed30f1 100644 --- a/ts/test-electron/util/scaleImageToLevel_test.preload.ts +++ b/ts/test-electron/util/scaleImageToLevel_test.preload.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; import loadImage from 'blueimp-load-image'; -import { IMAGE_JPEG, IMAGE_PNG } from '../../types/MIME.std.js'; +import { IMAGE_JPEG, IMAGE_PNG } from '../../types/MIME.std.ts'; -import { scaleImageToLevel } from '../../util/scaleImageToLevel.preload.js'; +import { scaleImageToLevel } from '../../util/scaleImageToLevel.preload.ts'; describe('scaleImageToLevel', () => { // NOTE: These tests are incomplete. diff --git a/ts/test-electron/util/sendToGroup_test.preload.ts b/ts/test-electron/util/sendToGroup_test.preload.ts index ff974c1d7a..52581d00f4 100644 --- a/ts/test-electron/util/sendToGroup_test.preload.ts +++ b/ts/test-electron/util/sendToGroup_test.preload.ts @@ -7,8 +7,8 @@ import { LibSignalErrorBase } from '@signalapp/libsignal-client'; import { _analyzeSenderKeyDevices, _shouldFailSend, -} from '../../util/sendToGroup.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +} from '../../util/sendToGroup.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import type { DeviceType } from '../../textsecure/Types.d.ts'; import { @@ -22,8 +22,8 @@ import { SendMessageProtoError, UnknownRecipientError, UnregisteredUserError, -} from '../../textsecure/Errors.std.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; +} from '../../textsecure/Errors.std.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; describe('sendToGroup', () => { const serviceIdOne = generateAci(); diff --git a/ts/test-electron/util/waitForOnline_test.preload.ts b/ts/test-electron/util/waitForOnline_test.preload.ts index e96357b726..df232a5c9a 100644 --- a/ts/test-electron/util/waitForOnline_test.preload.ts +++ b/ts/test-electron/util/waitForOnline_test.preload.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import { EventEmitter } from 'node:events'; import * as sinon from 'sinon'; -import { waitForOnline } from '../../util/waitForOnline.dom.js'; +import { waitForOnline } from '../../util/waitForOnline.dom.ts'; describe('waitForOnline', () => { let sandbox: sinon.SinonSandbox; diff --git a/ts/test-electron/windows/attachments_test.preload.ts b/ts/test-electron/windows/attachments_test.preload.ts index 817636ad9e..f0d636c868 100644 --- a/ts/test-electron/windows/attachments_test.preload.ts +++ b/ts/test-electron/windows/attachments_test.preload.ts @@ -6,9 +6,10 @@ import path from 'node:path'; import fs from 'node:fs'; import os from 'node:os'; import fse from 'fs-extra'; -import * as Attachments from '../../windows/main/attachments.preload.js'; -import * as Bytes from '../../Bytes.std.js'; -import { createName, getRelativePath } from '../../util/attachmentPath.node.js'; +import * as Attachments from '../../windows/main/attachments.preload.ts'; +import { createDeleter } from '../../../app/attachments.node.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { createName, getRelativePath } from '../../util/attachmentPath.node.ts'; const PREFIX_LENGTH = 2; const NUM_SEPARATORS = 1; @@ -194,7 +195,7 @@ describe('Attachments', () => { const inputBuffer = Buffer.from(input); await fse.ensureFile(fullPath); await fse.writeFile(fullPath, inputBuffer); - await Attachments.createDeleter(tempDirectory)(relativePath); + await createDeleter(tempDirectory)(relativePath); const existsFile = await fse.pathExists(fullPath); assert.isFalse(existsFile); @@ -209,7 +210,7 @@ describe('Attachments', () => { const relativePath = '../../parent'; try { - await Attachments.createDeleter(tempDirectory)(relativePath); + await createDeleter(tempDirectory)(relativePath); } catch (error) { assert.strictEqual(error.message, 'Invalid relative path'); return; diff --git a/ts/test-helpers/FakeLeftPaneContainer.dom.tsx b/ts/test-helpers/FakeLeftPaneContainer.dom.tsx index 626eafb6c6..face8cbf43 100644 --- a/ts/test-helpers/FakeLeftPaneContainer.dom.tsx +++ b/ts/test-helpers/FakeLeftPaneContainer.dom.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; -import { WidthBreakpoint } from '../components/_util.std.js'; +import { WidthBreakpoint } from '../components/_util.std.ts'; type PropsType = { children?: React.ReactNode; diff --git a/ts/test-helpers/RemoteConfigStub.dom.ts b/ts/test-helpers/RemoteConfigStub.dom.ts index 0cf7ca920f..eb61cb8e4a 100644 --- a/ts/test-helpers/RemoteConfigStub.dom.ts +++ b/ts/test-helpers/RemoteConfigStub.dom.ts @@ -1,8 +1,8 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { _refreshRemoteConfig } from '../RemoteConfig.dom.js'; -import type { RemoteConfigResponseType } from '../textsecure/WebAPI.preload.js'; +import { _refreshRemoteConfig } from '../RemoteConfig.dom.ts'; +import type { RemoteConfigResponseType } from '../textsecure/WebAPI.preload.ts'; export async function updateRemoteConfig( newConfig: Array<{ name: string; value: string }> diff --git a/ts/test-helpers/attachmentDownloads.std.ts b/ts/test-helpers/attachmentDownloads.std.ts index 44355c51b5..e9e4404f60 100644 --- a/ts/test-helpers/attachmentDownloads.std.ts +++ b/ts/test-helpers/attachmentDownloads.std.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { AttachmentDownloadSource } from '../sql/Interface.std.js'; -import { IMAGE_JPEG, IMAGE_PNG } from '../types/MIME.std.js'; -import type { AttachmentDownloadJobType } from '../types/AttachmentDownload.std.js'; +import { AttachmentDownloadSource } from '../sql/Interface.std.ts'; +import { IMAGE_JPEG, IMAGE_PNG } from '../types/MIME.std.ts'; +import type { AttachmentDownloadJobType } from '../types/AttachmentDownload.std.ts'; export function createAttachmentDownloadJob( index: number, diff --git a/ts/test-helpers/attachments.node.ts b/ts/test-helpers/attachments.node.ts index bda1e07e08..71997020d2 100644 --- a/ts/test-helpers/attachments.node.ts +++ b/ts/test-helpers/attachments.node.ts @@ -1,8 +1,8 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as Bytes from '../Bytes.std.js'; -import { getRandomBytes } from '../Crypto.node.js'; +import * as Bytes from '../Bytes.std.ts'; +import { getRandomBytes } from '../Crypto.node.ts'; export function testPlaintextHash(): string { return Bytes.toHex(getRandomBytes(32)); diff --git a/ts/test-helpers/createCallParticipant.std.ts b/ts/test-helpers/createCallParticipant.std.ts index 5b24f6d39b..951e187d7a 100644 --- a/ts/test-helpers/createCallParticipant.std.ts +++ b/ts/test-helpers/createCallParticipant.std.ts @@ -3,11 +3,11 @@ import lodash from 'lodash'; -import { AvatarColors } from '../types/Colors.std.js'; -import type { GroupCallRemoteParticipantType } from '../types/Calling.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; +import { AvatarColors } from '../types/Colors.std.ts'; +import type { GroupCallRemoteParticipantType } from '../types/Calling.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; -import { getDefaultConversationWithServiceId } from './getDefaultConversation.std.js'; +import { getDefaultConversationWithServiceId } from './getDefaultConversation.std.ts'; const { sample } = lodash; diff --git a/ts/test-helpers/defaultComposerStates.std.ts b/ts/test-helpers/defaultComposerStates.std.ts index 95927f332e..e36b7b214a 100644 --- a/ts/test-helpers/defaultComposerStates.std.ts +++ b/ts/test-helpers/defaultComposerStates.std.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { ComposerStep } from '../state/ducks/conversationsEnums.std.js'; -import { OneTimeModalState } from '../groups/toggleSelectedContactForGroupAddition.std.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; +import { ComposerStep } from '../state/ducks/conversationsEnums.std.ts'; +import { OneTimeModalState } from '../groups/toggleSelectedContactForGroupAddition.std.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; export const defaultStartDirectConversationComposerState = { step: ComposerStep.StartDirectConversation as const, diff --git a/ts/test-helpers/expireTimers.std.ts b/ts/test-helpers/expireTimers.std.ts index 439537384b..73325a29d4 100644 --- a/ts/test-helpers/expireTimers.std.ts +++ b/ts/test-helpers/expireTimers.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as durations from '../util/durations/index.std.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; +import * as durations from '../util/durations/index.std.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; const { fromMillis } = DurationInSeconds; diff --git a/ts/test-helpers/fakeAttachment.std.ts b/ts/test-helpers/fakeAttachment.std.ts index 9a05d023fc..7676c529a0 100644 --- a/ts/test-helpers/fakeAttachment.std.ts +++ b/ts/test-helpers/fakeAttachment.std.ts @@ -7,8 +7,8 @@ import type { AttachmentDraftType, ThumbnailType, AttachmentForUIType, -} from '../types/Attachment.std.js'; -import { IMAGE_JPEG } from '../types/MIME.std.js'; +} from '../types/Attachment.std.ts'; +import { IMAGE_JPEG } from '../types/MIME.std.ts'; export const fakeAttachment = ( overrides: Partial = {} diff --git a/ts/test-helpers/fakeCallLink.std.ts b/ts/test-helpers/fakeCallLink.std.ts index 13052e7847..ad4157655e 100644 --- a/ts/test-helpers/fakeCallLink.std.ts +++ b/ts/test-helpers/fakeCallLink.std.ts @@ -1,9 +1,9 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { CallLinkStateType, CallLinkType } from '../types/CallLink.std.js'; -import type { CallingConversationType } from '../types/Calling.std.js'; -import { CallLinkRestrictions } from '../types/CallLink.std.js'; -import { MONTH } from '../util/durations/constants.std.js'; +import type { CallLinkStateType, CallLinkType } from '../types/CallLink.std.ts'; +import type { CallingConversationType } from '../types/Calling.std.ts'; +import { CallLinkRestrictions } from '../types/CallLink.std.ts'; +import { MONTH } from '../util/durations/constants.std.ts'; export const FAKE_CALL_LINK: CallLinkType = { adminKey: null, diff --git a/ts/test-helpers/fakeLookupConversationWithoutServiceId.std.ts b/ts/test-helpers/fakeLookupConversationWithoutServiceId.std.ts index c1eceadca3..c7c1b5c745 100644 --- a/ts/test-helpers/fakeLookupConversationWithoutServiceId.std.ts +++ b/ts/test-helpers/fakeLookupConversationWithoutServiceId.std.ts @@ -6,12 +6,12 @@ import { useState } from 'react'; import type { UUIDFetchStateType, UUIDFetchStateKeyType, -} from '../util/uuidFetchState.std.js'; -import type { lookupConversationWithoutServiceId } from '../util/lookupConversationWithoutServiceId.preload.js'; -import { sleep } from '../util/sleep.std.js'; -import * as durations from '../util/durations/index.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { getDefaultConversation } from './getDefaultConversation.std.js'; +} from '../util/uuidFetchState.std.ts'; +import type { lookupConversationWithoutServiceId } from '../util/lookupConversationWithoutServiceId.preload.ts'; +import { sleep } from '../util/sleep.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { getDefaultConversation } from './getDefaultConversation.std.ts'; const VALID_IDENTIFIERS = new Set([ 'e164:+12125551234', diff --git a/ts/test-helpers/generateBackup.node.ts b/ts/test-helpers/generateBackup.node.ts index 75ea7175f5..45807ab6c2 100644 --- a/ts/test-helpers/generateBackup.node.ts +++ b/ts/test-helpers/generateBackup.node.ts @@ -10,16 +10,16 @@ import { } from '@signalapp/libsignal-client/dist/AccountKeys.js'; import { MessageBackupKey } from '@signalapp/libsignal-client/dist/MessageBackup.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import { CipherType } from '../types/Crypto.std.js'; -import { appendPaddingStream } from '../util/logPadding.node.js'; -import { prependStream } from '../util/prependStream.node.js'; -import { appendMacStream } from '../util/appendMacStream.node.js'; -import { toAciObject } from '../util/ServiceId.node.js'; -import { encodeDelimited } from '../util/encodeDelimited.std.js'; -import { BACKUP_VERSION } from '../services/backups/constants.std.js'; -import { Backups } from '../protobuf/index.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { CipherType } from '../types/Crypto.std.ts'; +import { appendPaddingStream } from '../util/logPadding.node.ts'; +import { prependStream } from '../util/prependStream.node.ts'; +import { appendMacStream } from '../util/appendMacStream.node.ts'; +import { toAciObject } from '../util/ServiceId.node.ts'; +import { encodeDelimited } from '../util/encodeDelimited.std.ts'; +import { BACKUP_VERSION } from '../services/backups/constants.std.ts'; +import { Backups } from '../protobuf/index.std.ts'; export type BackupGeneratorConfigType = Readonly< { diff --git a/ts/test-helpers/getDefaultConversation.std.ts b/ts/test-helpers/getDefaultConversation.std.ts index ec142d5fa2..bc8c67bcc8 100644 --- a/ts/test-helpers/getDefaultConversation.std.ts +++ b/ts/test-helpers/getDefaultConversation.std.ts @@ -5,15 +5,15 @@ import casual from 'casual'; import lodash from 'lodash'; import { v4 as generateUuid } from 'uuid'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import type { GroupListItemConversationType } from '../components/conversationList/GroupListItem.dom.js'; -import { toBase64 } from '../Bytes.std.js'; -import { getRandomColor } from './getRandomColor.std.js'; -import { ConversationColors } from '../types/Colors.std.js'; -import { StorySendMode } from '../types/Stories.std.js'; -import { getAvatarPlaceholderGradient } from '../utils/getAvatarPlaceholderGradient.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import type { GroupListItemConversationType } from '../components/conversationList/GroupListItem.dom.tsx'; +import { toBase64 } from '../Bytes.std.ts'; +import { getRandomColor } from './getRandomColor.std.ts'; +import { ConversationColors } from '../types/Colors.std.ts'; +import { StorySendMode } from '../types/Stories.std.ts'; +import { getAvatarPlaceholderGradient } from '../utils/getAvatarPlaceholderGradient.std.ts'; const { sample } = lodash; diff --git a/ts/test-helpers/getFakeBadge.std.ts b/ts/test-helpers/getFakeBadge.std.ts index 8ef4f7a3a8..748d98fce1 100644 --- a/ts/test-helpers/getFakeBadge.std.ts +++ b/ts/test-helpers/getFakeBadge.std.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import type { BadgeType } from '../badges/types.std.js'; -import { BadgeCategory } from '../badges/BadgeCategory.std.js'; -import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.js'; -import { repeat, zipObject } from '../util/iterables.std.js'; +import type { BadgeType } from '../badges/types.std.ts'; +import { BadgeCategory } from '../badges/BadgeCategory.std.ts'; +import { BadgeImageTheme } from '../badges/BadgeImageTheme.std.ts'; +import { repeat, zipObject } from '../util/iterables.std.ts'; const { times } = lodash; diff --git a/ts/test-helpers/getFakeCallHistoryGroup.std.ts b/ts/test-helpers/getFakeCallHistoryGroup.std.ts index 174c42ff2b..18bb67d452 100644 --- a/ts/test-helpers/getFakeCallHistoryGroup.std.ts +++ b/ts/test-helpers/getFakeCallHistoryGroup.std.ts @@ -1,15 +1,15 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { CallHistoryGroup } from '../types/CallDisposition.std.js'; +import type { CallHistoryGroup } from '../types/CallDisposition.std.ts'; import { AdhocCallStatus, CallDirection, CallType, DirectCallStatus, CallMode, -} from '../types/CallDisposition.std.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; +} from '../types/CallDisposition.std.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; function mins(n: number) { return DurationInSeconds.toMillis(DurationInSeconds.fromMinutes(n)); diff --git a/ts/test-helpers/getFakeDistributionLists.std.ts b/ts/test-helpers/getFakeDistributionLists.std.ts index 0133a787c2..ea285773e6 100644 --- a/ts/test-helpers/getFakeDistributionLists.std.ts +++ b/ts/test-helpers/getFakeDistributionLists.std.ts @@ -3,12 +3,12 @@ import casual from 'casual'; -import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists.preload.js'; -import type { StoryDistributionListWithMembersDataType } from '../types/Stories.std.js'; -import { MY_STORY_ID } from '../types/Stories.std.js'; -import { generateStoryDistributionId } from '../types/StoryDistributionId.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import { getDefaultConversation } from './getDefaultConversation.std.js'; +import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists.preload.ts'; +import type { StoryDistributionListWithMembersDataType } from '../types/Stories.std.ts'; +import { MY_STORY_ID } from '../types/Stories.std.ts'; +import { generateStoryDistributionId } from '../types/StoryDistributionId.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { getDefaultConversation } from './getDefaultConversation.std.ts'; export function getFakeDistributionListsWithMembers(): Array { return [ diff --git a/ts/test-helpers/getFakeStory.dom.tsx b/ts/test-helpers/getFakeStory.dom.tsx index 79730f4ea2..95afd298b1 100644 --- a/ts/test-helpers/getFakeStory.dom.tsx +++ b/ts/test-helpers/getFakeStory.dom.tsx @@ -4,17 +4,17 @@ import casual from 'casual'; import { v4 as generateUuid } from 'uuid'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; import type { ConversationStoryType, MyStoryType, StoryViewType, -} from '../types/Stories.std.js'; -import * as durations from '../util/durations/index.std.js'; -import { getDefaultConversation } from './getDefaultConversation.std.js'; -import { fakeAttachment, fakeThumbnail } from './fakeAttachment.std.js'; -import { MY_STORY_ID, ResolvedSendStatus } from '../types/Stories.std.js'; +} from '../types/Stories.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import { getDefaultConversation } from './getDefaultConversation.std.ts'; +import { fakeAttachment, fakeThumbnail } from './fakeAttachment.std.ts'; +import { MY_STORY_ID, ResolvedSendStatus } from '../types/Stories.std.ts'; function getAttachmentWithThumbnail(url: string): AttachmentType { return fakeAttachment({ diff --git a/ts/test-helpers/getRandomColor.std.ts b/ts/test-helpers/getRandomColor.std.ts index 0cf32c6133..7c66fc190e 100644 --- a/ts/test-helpers/getRandomColor.std.ts +++ b/ts/test-helpers/getRandomColor.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import { AvatarColors } from '../types/Colors.std.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import { AvatarColors } from '../types/Colors.std.ts'; const { sample } = lodash; diff --git a/ts/test-helpers/getStickerPacks.std.ts b/ts/test-helpers/getStickerPacks.std.ts index 662e766315..f030dafb74 100644 --- a/ts/test-helpers/getStickerPacks.std.ts +++ b/ts/test-helpers/getStickerPacks.std.ts @@ -4,7 +4,7 @@ import type { StickerPackType, StickerType, -} from '../state/ducks/stickers.preload.js'; +} from '../state/ducks/stickers.preload.ts'; export const createPack = ( props: Partial, diff --git a/ts/test-mock/backups/backups_test.node.ts b/ts/test-mock/backups/backups_test.node.ts index 763544f63d..e45e2c8236 100644 --- a/ts/test-mock/backups/backups_test.node.ts +++ b/ts/test-mock/backups/backups_test.node.ts @@ -11,25 +11,25 @@ import { Proto, StorageState } from '@signalapp/mock-server'; import { assert } from 'chai'; import { expect } from 'playwright/test'; -import * as Bytes from '../../Bytes.std.js'; -import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { generateBackup } from '../../test-helpers/generateBackup.node.js'; -import { IMAGE_JPEG } from '../../types/MIME.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap, type LinkOptionsType } from '../bootstrap.node.js'; +import * as Bytes from '../../Bytes.std.ts'; +import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { generateBackup } from '../../test-helpers/generateBackup.node.ts'; +import { IMAGE_JPEG } from '../../types/MIME.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap, type LinkOptionsType } from '../bootstrap.node.ts'; import { getMessageInTimelineByTimestamp, sendTextMessage, sendReaction, -} from '../helpers.node.js'; -import { toBase64 } from '../../Bytes.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { BackupLevel } from '../../services/backups/types.std.js'; -import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.js'; +} from '../helpers.node.ts'; +import { toBase64 } from '../../Bytes.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { BackupLevel } from '../../services/backups/types.std.ts'; +import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.ts'; export const debug = createDebug('mock:test:backups'); diff --git a/ts/test-mock/benchmarks/backup_bench.node.ts b/ts/test-mock/benchmarks/backup_bench.node.ts index 0509764df5..4e59e6cfb2 100644 --- a/ts/test-mock/benchmarks/backup_bench.node.ts +++ b/ts/test-mock/benchmarks/backup_bench.node.ts @@ -1,9 +1,9 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { Bootstrap, MAX_CYCLES } from './fixtures.node.js'; -import { type RegressionSample } from '../bootstrap.node.js'; -import { generateBackup } from '../../test-helpers/generateBackup.node.js'; +import { Bootstrap, MAX_CYCLES } from './fixtures.node.ts'; +import { type RegressionSample } from '../bootstrap.node.ts'; +import { generateBackup } from '../../test-helpers/generateBackup.node.ts'; const INITIAL_MESSAGE_COUNT = 10000; const FINAL_MESSAGE_COUNT = 30000; diff --git a/ts/test-mock/benchmarks/call_history_search_bench.node.ts b/ts/test-mock/benchmarks/call_history_search_bench.node.ts index ffd29530ec..84227b8848 100644 --- a/ts/test-mock/benchmarks/call_history_search_bench.node.ts +++ b/ts/test-mock/benchmarks/call_history_search_bench.node.ts @@ -6,11 +6,11 @@ import { Proto, StorageState } from '@signalapp/mock-server'; import lodash from 'lodash'; import { expect } from 'playwright/test'; -import { Bootstrap, debug, RUN_COUNT, DISCARD_COUNT } from './fixtures.node.js'; -import { stats } from '../../util/benchmark/stats.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { typeIntoInput } from '../helpers.node.js'; +import { Bootstrap, debug, RUN_COUNT, DISCARD_COUNT } from './fixtures.node.ts'; +import { stats } from '../../util/benchmark/stats.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { typeIntoInput } from '../helpers.node.ts'; const { sample } = lodash; diff --git a/ts/test-mock/benchmarks/convo_open_bench.node.ts b/ts/test-mock/benchmarks/convo_open_bench.node.ts index dd384eb4ee..279289f0b6 100644 --- a/ts/test-mock/benchmarks/convo_open_bench.node.ts +++ b/ts/test-mock/benchmarks/convo_open_bench.node.ts @@ -4,9 +4,9 @@ import assert from 'node:assert'; import type { PrimaryDevice } from '@signalapp/mock-server'; -import { Bootstrap, debug, RUN_COUNT, DISCARD_COUNT } from './fixtures.node.js'; -import { stats } from '../../util/benchmark/stats.std.js'; -import { sleep } from '../../util/sleep.std.js'; +import { Bootstrap, debug, RUN_COUNT, DISCARD_COUNT } from './fixtures.node.ts'; +import { stats } from '../../util/benchmark/stats.std.ts'; +import { sleep } from '../../util/sleep.std.ts'; const CONVERSATION_SIZE = 1000; // messages const DELAY = 50; // milliseconds diff --git a/ts/test-mock/benchmarks/fixtures.node.ts b/ts/test-mock/benchmarks/fixtures.node.ts index 215589141b..5a509d0434 100644 --- a/ts/test-mock/benchmarks/fixtures.node.ts +++ b/ts/test-mock/benchmarks/fixtures.node.ts @@ -3,12 +3,12 @@ import createDebug from 'debug'; -import { Bootstrap } from '../bootstrap.node.js'; +import { Bootstrap } from '../bootstrap.node.ts'; export const debug = createDebug('mock:benchmarks'); export { Bootstrap }; -export { App } from '../playwright.node.js'; +export { App } from '../playwright.node.ts'; export const RUN_COUNT = process.env.RUN_COUNT ? parseInt(process.env.RUN_COUNT, 10) diff --git a/ts/test-mock/benchmarks/group_send_bench.node.ts b/ts/test-mock/benchmarks/group_send_bench.node.ts index 9ed9fcfd28..79540fef6f 100644 --- a/ts/test-mock/benchmarks/group_send_bench.node.ts +++ b/ts/test-mock/benchmarks/group_send_bench.node.ts @@ -18,11 +18,11 @@ import { DISCARD_COUNT, GROUP_DELIVERY_RECEIPTS, BLOCKED_COUNT, -} from './fixtures.node.js'; -import { stats } from '../../util/benchmark/stats.std.js'; -import { sleep } from '../../util/sleep.std.js'; -import { typeIntoInput, waitForEnabledComposer } from '../helpers.node.js'; -import { MINUTE } from '../../util/durations/index.std.js'; +} from './fixtures.node.ts'; +import { stats } from '../../util/benchmark/stats.std.ts'; +import { sleep } from '../../util/sleep.std.ts'; +import { typeIntoInput, waitForEnabledComposer } from '../helpers.node.ts'; +import { MINUTE } from '../../util/durations/index.std.ts'; const LAST_MESSAGE = 'start sending messages now'; diff --git a/ts/test-mock/benchmarks/send_bench.node.ts b/ts/test-mock/benchmarks/send_bench.node.ts index 70c8060a1a..c49cc4e60f 100644 --- a/ts/test-mock/benchmarks/send_bench.node.ts +++ b/ts/test-mock/benchmarks/send_bench.node.ts @@ -6,9 +6,9 @@ import assert from 'node:assert'; import type { PrimaryDevice } from '@signalapp/mock-server'; import { ReceiptType } from '@signalapp/mock-server'; -import { Bootstrap, debug, RUN_COUNT, DISCARD_COUNT } from './fixtures.node.js'; -import { stats } from '../../util/benchmark/stats.std.js'; -import { typeIntoInput, waitForEnabledComposer } from '../helpers.node.js'; +import { Bootstrap, debug, RUN_COUNT, DISCARD_COUNT } from './fixtures.node.ts'; +import { stats } from '../../util/benchmark/stats.std.ts'; +import { typeIntoInput, waitForEnabledComposer } from '../helpers.node.ts'; const CONVERSATION_SIZE = 500; // messages diff --git a/ts/test-mock/benchmarks/startup_bench.node.ts b/ts/test-mock/benchmarks/startup_bench.node.ts index 7ac97d6049..be35846c4d 100644 --- a/ts/test-mock/benchmarks/startup_bench.node.ts +++ b/ts/test-mock/benchmarks/startup_bench.node.ts @@ -4,8 +4,8 @@ import { ReceiptType } from '@signalapp/mock-server'; import lodash from 'lodash'; -import { debug, Bootstrap, MAX_CYCLES } from './fixtures.node.js'; -import { type RegressionSample } from '../bootstrap.node.js'; +import { debug, Bootstrap, MAX_CYCLES } from './fixtures.node.ts'; +import { type RegressionSample } from '../bootstrap.node.ts'; const { omit } = lodash; diff --git a/ts/test-mock/benchmarks/storage_sync_bench.node.ts b/ts/test-mock/benchmarks/storage_sync_bench.node.ts index 68ab32fa52..a94b865fb4 100644 --- a/ts/test-mock/benchmarks/storage_sync_bench.node.ts +++ b/ts/test-mock/benchmarks/storage_sync_bench.node.ts @@ -4,7 +4,7 @@ import type { PrimaryDevice } from '@signalapp/mock-server'; import { StorageState } from '@signalapp/mock-server'; -import { Bootstrap } from './fixtures.node.js'; +import { Bootstrap } from './fixtures.node.ts'; const CONTACT_COUNT = 1000; diff --git a/ts/test-mock/bootstrap.node.ts b/ts/test-mock/bootstrap.node.ts index 946a855ee3..052068de42 100644 --- a/ts/test-mock/bootstrap.node.ts +++ b/ts/test-mock/bootstrap.node.ts @@ -21,20 +21,20 @@ import { ServiceIdKind, loadCertificates, } from '@signalapp/mock-server'; -import { MAX_READ_KEYS as MAX_STORAGE_READ_KEYS } from '../services/storageConstants.std.js'; -import { SECOND, MINUTE, WEEK, MONTH } from '../util/durations/index.std.js'; -import { drop } from '../util/drop.std.js'; -import { regress } from '../util/benchmark/stats.std.js'; -import type { RendererConfigType } from '../types/RendererConfig.std.js'; -import type { MIMEType } from '../types/MIME.std.js'; -import { App } from './playwright.node.js'; -import { CONTACT_COUNT } from './benchmarks/fixtures.node.js'; -import { strictAssert } from '../util/assert.std.js'; +import { MAX_READ_KEYS as MAX_STORAGE_READ_KEYS } from '../services/storageConstants.std.ts'; +import { SECOND, MINUTE, WEEK, MONTH } from '../util/durations/index.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { regress } from '../util/benchmark/stats.std.ts'; +import type { RendererConfigType } from '../types/RendererConfig.std.ts'; +import type { MIMEType } from '../types/MIME.std.ts'; +import { App } from './playwright.node.ts'; +import { CONTACT_COUNT } from './benchmarks/fixtures.node.ts'; +import { strictAssert } from '../util/assert.std.ts'; import { encryptAttachmentV2, generateAttachmentKeys, -} from '../AttachmentCrypto.node.js'; -import { isVideoTypeSupported } from '../util/GoogleChrome.std.js'; +} from '../AttachmentCrypto.node.ts'; +import { isVideoTypeSupported } from '../util/GoogleChrome.std.ts'; export { App }; @@ -947,7 +947,6 @@ export class Bootstrap { return JSON.stringify({ ...(await loadCertificates()), - forcePreloadBundle: this.#options.benchmark, ciMode: 'full', buildExpiration: Date.now() + MONTH, diff --git a/ts/test-mock/calling/callLinkAdmin_test.node.ts b/ts/test-mock/calling/callLinkAdmin_test.node.ts index 765ac62cb3..99241ce312 100644 --- a/ts/test-mock/calling/callLinkAdmin_test.node.ts +++ b/ts/test-mock/calling/callLinkAdmin_test.node.ts @@ -1,10 +1,10 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { expect } from 'playwright/test'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { createCallLink } from '../helpers.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { createCallLink } from '../helpers.node.ts'; describe('calling/callLinkAdmin', function (this: Mocha.Suite) { this.timeout(durations.MINUTE); diff --git a/ts/test-mock/calling/callMessages_test.docker.node.ts b/ts/test-mock/calling/callMessages_test.docker.node.ts index 3f2f1c92c4..a5c8132d6c 100644 --- a/ts/test-mock/calling/callMessages_test.docker.node.ts +++ b/ts/test-mock/calling/callMessages_test.docker.node.ts @@ -8,10 +8,10 @@ import { StorageState } from '@signalapp/mock-server'; import { expect } from 'playwright/test'; import type { Page } from 'playwright'; import { promisify } from 'node:util'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { runTurnInContainer, tearDownTurnContainer } from './helpers.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { runTurnInContainer, tearDownTurnContainer } from './helpers.node.ts'; const FIXTURES = join(__dirname, '..', '..', '..', 'fixtures'); const VIRTUAL_AUDIO = join( diff --git a/ts/test-mock/helpers.node.ts b/ts/test-mock/helpers.node.ts index 1ca5522559..3169464893 100644 --- a/ts/test-mock/helpers.node.ts +++ b/ts/test-mock/helpers.node.ts @@ -13,9 +13,9 @@ import { import { assert } from 'chai'; import type { Locator, Page } from 'playwright'; import { expect } from 'playwright/test'; -import { strictAssert } from '../util/assert.std.js'; -import { SECOND } from '../util/durations/constants.std.js'; -import { toNumber } from '../util/toNumber.std.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { SECOND } from '../util/durations/constants.std.ts'; +import { toNumber } from '../util/toNumber.std.ts'; const debug = createDebug('mock:test:helpers'); diff --git a/ts/test-mock/messaging/attachments_test.node.ts b/ts/test-mock/messaging/attachments_test.node.ts index af9232eba1..80c4250465 100644 --- a/ts/test-mock/messaging/attachments_test.node.ts +++ b/ts/test-mock/messaging/attachments_test.node.ts @@ -13,19 +13,19 @@ import { join } from 'node:path'; import { access, readFile } from 'node:fs/promises'; import { v4 } from 'uuid'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; import { getMessageInTimelineByTimestamp, getTimelineMessageWithText, sendMessageWithAttachments, sendTextMessage, -} from '../helpers.node.js'; -import * as durations from '../../util/durations/index.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { IMAGE_PNG, VIDEO_MP4 } from '../../types/MIME.std.js'; -import { toBase64 } from '../../Bytes.std.js'; -import type { AttachmentType } from '../../types/Attachment.std.js'; +} from '../helpers.node.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { IMAGE_PNG, VIDEO_MP4 } from '../../types/MIME.std.ts'; +import { toBase64 } from '../../Bytes.std.ts'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; export const debug = createDebug('mock:test:attachments'); diff --git a/ts/test-mock/messaging/backfill_test.node.ts b/ts/test-mock/messaging/backfill_test.node.ts index 856fdfb104..f0dfd84a4f 100644 --- a/ts/test-mock/messaging/backfill_test.node.ts +++ b/ts/test-mock/messaging/backfill_test.node.ts @@ -9,15 +9,15 @@ import createDebug from 'debug'; import type { Page } from 'playwright'; import assert from 'node:assert'; -import { LONG_MESSAGE, IMAGE_JPEG } from '../../types/MIME.std.js'; -import * as durations from '../../util/durations/index.std.js'; -import { toNumber } from '../../util/toNumber.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import { LONG_MESSAGE, IMAGE_JPEG } from '../../types/MIME.std.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { toNumber } from '../../util/toNumber.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; import { sendTextMessage, getTimelineMessageWithText, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:backfill'); diff --git a/ts/test-mock/messaging/edit_test.node.ts b/ts/test-mock/messaging/edit_test.node.ts index 66678c6537..97e0906393 100644 --- a/ts/test-mock/messaging/edit_test.node.ts +++ b/ts/test-mock/messaging/edit_test.node.ts @@ -8,22 +8,22 @@ import createDebug from 'debug'; import type { Page } from 'playwright'; import type { RequireExactlyOne } from 'type-fest'; -import type { App } from '../playwright.node.js'; -import * as durations from '../../util/durations/index.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import type { App } from '../playwright.node.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; import { RECEIPT_BATCHER_WAIT_MS, ReceiptType, -} from '../../types/Receipt.std.js'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; -import { drop } from '../../util/drop.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { toNumber } from '../../util/toNumber.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { IMAGE_GIF } from '../../types/MIME.std.js'; -import { typeIntoInput, waitForEnabledComposer } from '../helpers.node.js'; +} from '../../types/Receipt.std.ts'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { toNumber } from '../../util/toNumber.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { IMAGE_GIF } from '../../types/MIME.std.ts'; +import { typeIntoInput, waitForEnabledComposer } from '../helpers.node.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { sleep } from '../../util/sleep.std.js'; +import { sleep } from '../../util/sleep.std.ts'; export const debug = createDebug('mock:test:edit'); diff --git a/ts/test-mock/messaging/expire_timer_version_test.node.ts b/ts/test-mock/messaging/expire_timer_version_test.node.ts index 87c87436d8..0bde8ed3a6 100644 --- a/ts/test-mock/messaging/expire_timer_version_test.node.ts +++ b/ts/test-mock/messaging/expire_timer_version_test.node.ts @@ -10,17 +10,17 @@ import { } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; import { expectSystemMessages, typeIntoInput, waitForEnabledComposer, waitForNonProfileKeyUpdateMessage, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:messaging'); diff --git a/ts/test-mock/messaging/lightbox_test.node.ts b/ts/test-mock/messaging/lightbox_test.node.ts index 24a43eb41e..f7e2619516 100644 --- a/ts/test-mock/messaging/lightbox_test.node.ts +++ b/ts/test-mock/messaging/lightbox_test.node.ts @@ -10,16 +10,16 @@ import { StorageState, } from '@signalapp/mock-server'; import * as path from 'node:path'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; import { getMessageInTimelineByTimestamp, getTimelineMessageWithText, sendMessageWithAttachments, sendTextMessage, -} from '../helpers.node.js'; -import * as durations from '../../util/durations/index.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../helpers.node.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; const debug = createDebug('mock:test:lightbox'); diff --git a/ts/test-mock/messaging/reaction_test.node.ts b/ts/test-mock/messaging/reaction_test.node.ts index 00a42801f2..92e77ced24 100644 --- a/ts/test-mock/messaging/reaction_test.node.ts +++ b/ts/test-mock/messaging/reaction_test.node.ts @@ -8,17 +8,17 @@ import { type Page } from 'playwright'; import { expect } from 'playwright/test'; import { assert } from 'chai'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { MINUTE } from '../../util/durations/index.std.js'; -import { strictAssert } from '../../util/assert.std.js'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { MINUTE } from '../../util/durations/index.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; import { clickOnConversation, getMessageInTimelineByTimestamp, sendTextMessage, sendReaction, createGroup, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:reactions'); diff --git a/ts/test-mock/messaging/readSync_test.node.ts b/ts/test-mock/messaging/readSync_test.node.ts index 31f015b76f..dc5792558f 100644 --- a/ts/test-mock/messaging/readSync_test.node.ts +++ b/ts/test-mock/messaging/readSync_test.node.ts @@ -4,9 +4,9 @@ import createDebug from 'debug'; import type { PrimaryDevice } from '@signalapp/mock-server'; -import type { App } from '../playwright.node.js'; -import * as durations from '../../util/durations/index.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import type { App } from '../playwright.node.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:readSync'); diff --git a/ts/test-mock/messaging/relink_test.node.ts b/ts/test-mock/messaging/relink_test.node.ts index d2f3916403..9195a7f9b0 100644 --- a/ts/test-mock/messaging/relink_test.node.ts +++ b/ts/test-mock/messaging/relink_test.node.ts @@ -5,10 +5,10 @@ import createDebug from 'debug'; import type { PrimaryDevice } from '@signalapp/mock-server'; import { Proto, StorageState } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { expectSystemMessages } from '../helpers.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { expectSystemMessages } from '../helpers.node.ts'; export const debug = createDebug('mock:test:relink'); diff --git a/ts/test-mock/messaging/retries_test.node.ts b/ts/test-mock/messaging/retries_test.node.ts index 4003db6b7d..00bc7bebd7 100644 --- a/ts/test-mock/messaging/retries_test.node.ts +++ b/ts/test-mock/messaging/retries_test.node.ts @@ -6,10 +6,10 @@ import createDebug from 'debug'; import type { PrimaryDevice } from '@signalapp/mock-server'; import { EnvelopeType, StorageState } from '@signalapp/mock-server'; -import type { App } from '../playwright.node.js'; -import * as durations from '../../util/durations/index.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { sleep } from '../../util/sleep.std.js'; +import type { App } from '../playwright.node.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { sleep } from '../../util/sleep.std.ts'; export const debug = createDebug('mock:test:retries'); diff --git a/ts/test-mock/messaging/safety_number_test.node.ts b/ts/test-mock/messaging/safety_number_test.node.ts index efdaacf66f..1325cb0592 100644 --- a/ts/test-mock/messaging/safety_number_test.node.ts +++ b/ts/test-mock/messaging/safety_number_test.node.ts @@ -6,17 +6,17 @@ import type { PrimaryDevice } from '@signalapp/mock-server'; import { StorageState, Proto } from '@signalapp/mock-server'; import { assert } from 'chai'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { MINUTE } from '../../util/durations/index.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { MINUTE } from '../../util/durations/index.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; import { clickOnConversation, typeIntoInput, expectSystemMessages, waitForEnabledComposer, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:safetyNumber'); diff --git a/ts/test-mock/messaging/sendSync_test.node.ts b/ts/test-mock/messaging/sendSync_test.node.ts index 2242084e59..7e132a6886 100644 --- a/ts/test-mock/messaging/sendSync_test.node.ts +++ b/ts/test-mock/messaging/sendSync_test.node.ts @@ -5,9 +5,9 @@ import createDebug from 'debug'; import { StorageState, EMPTY_DATA_MESSAGE } from '@signalapp/mock-server'; import type { Proto } from '@signalapp/mock-server'; -import type { App } from '../playwright.node.js'; -import * as durations from '../../util/durations/index.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import type { App } from '../playwright.node.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:sendSync'); diff --git a/ts/test-mock/messaging/sender_key_test.node.ts b/ts/test-mock/messaging/sender_key_test.node.ts index 1e114e3091..5bf0e38da3 100644 --- a/ts/test-mock/messaging/sender_key_test.node.ts +++ b/ts/test-mock/messaging/sender_key_test.node.ts @@ -5,9 +5,9 @@ import createDebug from 'debug'; import { StorageState } from '@signalapp/mock-server'; import type { Group, PrimaryDevice } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:senderKey'); diff --git a/ts/test-mock/messaging/stories_test.node.ts b/ts/test-mock/messaging/stories_test.node.ts index 8a3052feeb..712122d2b2 100644 --- a/ts/test-mock/messaging/stories_test.node.ts +++ b/ts/test-mock/messaging/stories_test.node.ts @@ -9,12 +9,12 @@ import { } from '@signalapp/mock-server'; import type { Group, PrimaryDevice } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:stories'); diff --git a/ts/test-mock/messaging/twoClients_test.node.ts b/ts/test-mock/messaging/twoClients_test.node.ts index a0ed52a4ff..b2eb39a06b 100644 --- a/ts/test-mock/messaging/twoClients_test.node.ts +++ b/ts/test-mock/messaging/twoClients_test.node.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import { StorageState } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { typeIntoInput, waitForEnabledComposer } from '../helpers.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { typeIntoInput, waitForEnabledComposer } from '../helpers.node.ts'; describe('twoClients', function twoClients(this: Mocha.Suite) { this.timeout(durations.MINUTE); diff --git a/ts/test-mock/messaging/unknown_contact_test.node.ts b/ts/test-mock/messaging/unknown_contact_test.node.ts index 9efa672260..8793026315 100644 --- a/ts/test-mock/messaging/unknown_contact_test.node.ts +++ b/ts/test-mock/messaging/unknown_contact_test.node.ts @@ -6,10 +6,10 @@ import { Proto } from '@signalapp/mock-server'; import createDebug from 'debug'; import type { Page } from 'playwright'; import assert from 'node:assert'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { acceptConversation } from '../helpers.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { acceptConversation } from '../helpers.node.ts'; export const debug = createDebug('mock:test:edit'); diff --git a/ts/test-mock/messaging/unprocessed_test.node.ts b/ts/test-mock/messaging/unprocessed_test.node.ts index a7ac4e8ec3..4c31453d11 100644 --- a/ts/test-mock/messaging/unprocessed_test.node.ts +++ b/ts/test-mock/messaging/unprocessed_test.node.ts @@ -5,9 +5,9 @@ import createDebug from 'debug'; import type { PrimaryDevice } from '@signalapp/mock-server'; import { StorageState } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:unprocessed'); diff --git a/ts/test-mock/network/serverAlerts_test.node.ts b/ts/test-mock/network/serverAlerts_test.node.ts index 0a2d7f822c..efcba6dcf3 100644 --- a/ts/test-mock/network/serverAlerts_test.node.ts +++ b/ts/test-mock/network/serverAlerts_test.node.ts @@ -4,10 +4,10 @@ import createDebug from 'debug'; import type { Page } from 'playwright'; import { StorageState, type PrimaryDevice } from '@signalapp/mock-server'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { getLeftPane } from '../helpers.node.js'; -import { MINUTE } from '../../util/durations/index.std.js'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { getLeftPane } from '../helpers.node.ts'; +import { MINUTE } from '../../util/durations/index.std.ts'; export const debug = createDebug('mock:test:serverAlerts'); diff --git a/ts/test-mock/playwright.node.ts b/ts/test-mock/playwright.node.ts index 9b444a9f4a..67fcfa4221 100644 --- a/ts/test-mock/playwright.node.ts +++ b/ts/test-mock/playwright.node.ts @@ -9,13 +9,13 @@ import pTimeout from 'p-timeout'; import type { IPCRequest as ChallengeRequestType, IPCResponse as ChallengeResponseType, -} from '../challenge.dom.js'; -import type { ReceiptType } from '../types/Receipt.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { drop } from '../util/drop.std.js'; -import { toNumber } from '../util/toNumber.std.js'; +} from '../challenge.dom.ts'; +import type { ReceiptType } from '../types/Receipt.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { toNumber } from '../util/toNumber.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { SocketStatuses } from '../textsecure/SocketManager.preload.js'; +import type { SocketStatuses } from '../textsecure/SocketManager.preload.ts'; export type AppLoadedInfoType = Readonly<{ loadTime: number; diff --git a/ts/test-mock/pnp/accept_gv2_invite_test.node.ts b/ts/test-mock/pnp/accept_gv2_invite_test.node.ts index 1223167980..22b9ed88aa 100644 --- a/ts/test-mock/pnp/accept_gv2_invite_test.node.ts +++ b/ts/test-mock/pnp/accept_gv2_invite_test.node.ts @@ -6,14 +6,14 @@ import type { Group, PrimaryDevice } from '@signalapp/mock-server'; import { Proto, ServiceIdKind, StorageState } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; +import * as durations from '../../util/durations/index.std.ts'; import { parseAndFormatPhoneNumber, PhoneNumberFormat, -} from '../../util/libphonenumberInstance.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; -import { acceptConversation, expectSystemMessages } from '../helpers.node.js'; +} from '../../util/libphonenumberInstance.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; +import { acceptConversation, expectSystemMessages } from '../helpers.node.ts'; export const debug = createDebug('mock:test:gv2'); diff --git a/ts/test-mock/pnp/calling_test.node.ts b/ts/test-mock/pnp/calling_test.node.ts index 2c05dee81d..ded32e7b79 100644 --- a/ts/test-mock/pnp/calling_test.node.ts +++ b/ts/test-mock/pnp/calling_test.node.ts @@ -6,10 +6,10 @@ import chaiAsPromised from 'chai-as-promised'; import { type PrimaryDevice, ServiceIdKind } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; -import { acceptConversation } from '../helpers.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; +import { acceptConversation } from '../helpers.node.ts'; chai.use(chaiAsPromised); diff --git a/ts/test-mock/pnp/change_number_test.node.ts b/ts/test-mock/pnp/change_number_test.node.ts index cb82137ce9..9782425cd6 100644 --- a/ts/test-mock/pnp/change_number_test.node.ts +++ b/ts/test-mock/pnp/change_number_test.node.ts @@ -5,9 +5,9 @@ import type { PrimaryDevice } from '@signalapp/mock-server'; import { ServiceIdKind } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:change-number'); diff --git a/ts/test-mock/pnp/merge_test.node.ts b/ts/test-mock/pnp/merge_test.node.ts index 9b24797fb2..37c1991bdc 100644 --- a/ts/test-mock/pnp/merge_test.node.ts +++ b/ts/test-mock/pnp/merge_test.node.ts @@ -12,17 +12,17 @@ import { import type { PrimaryDevice } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { generateConfigMatrix } from '../../util/generateConfigMatrix.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { generateConfigMatrix } from '../../util/generateConfigMatrix.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; import { expectSystemMessages, typeIntoInput, waitForEnabledComposer, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:merge'); diff --git a/ts/test-mock/pnp/phone_discovery_test.node.ts b/ts/test-mock/pnp/phone_discovery_test.node.ts index 0c84207b5f..46914a5682 100644 --- a/ts/test-mock/pnp/phone_discovery_test.node.ts +++ b/ts/test-mock/pnp/phone_discovery_test.node.ts @@ -6,16 +6,16 @@ import { ServiceIdKind, Proto, StorageState } from '@signalapp/mock-server'; import type { PrimaryDevice } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; import { expectSystemMessages, typeIntoInput, waitForEnabledComposer, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:merge'); diff --git a/ts/test-mock/pnp/pni_change_test.node.ts b/ts/test-mock/pnp/pni_change_test.node.ts index ec35d3d0d0..7c6b184388 100644 --- a/ts/test-mock/pnp/pni_change_test.node.ts +++ b/ts/test-mock/pnp/pni_change_test.node.ts @@ -7,16 +7,16 @@ import { ServiceIdKind, StorageState, Proto } from '@signalapp/mock-server'; import type { PrimaryDevice } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { generatePni } from '../../types/ServiceId.std.js'; -import { toPniObject } from '../../util/ServiceId.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { generatePni } from '../../types/ServiceId.std.ts'; +import { toPniObject } from '../../util/ServiceId.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; import { expectSystemMessages, typeIntoInput, waitForEnabledComposer, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:pni-change'); diff --git a/ts/test-mock/pnp/pni_signature_test.node.ts b/ts/test-mock/pnp/pni_signature_test.node.ts index 28c301c490..b3589ffc66 100644 --- a/ts/test-mock/pnp/pni_signature_test.node.ts +++ b/ts/test-mock/pnp/pni_signature_test.node.ts @@ -12,24 +12,24 @@ import { } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { toNumber } from '../../util/toNumber.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { toNumber } from '../../util/toNumber.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; import { DELETE_SENT_PROTO_BATCHER_WAIT_MS, RECEIPT_BATCHER_WAIT_MS, -} from '../../types/Receipt.std.js'; -import { sleep } from '../../util/sleep.std.js'; +} from '../../types/Receipt.std.ts'; +import { sleep } from '../../util/sleep.std.ts'; import { acceptConversation, expectSystemMessages, typeIntoInput, waitForNonProfileKeyUpdateMessage, waitForEnabledComposer, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:pni-signature'); diff --git a/ts/test-mock/pnp/pni_unlink_test.node.ts b/ts/test-mock/pnp/pni_unlink_test.node.ts index d536f96032..8708fc2f3f 100644 --- a/ts/test-mock/pnp/pni_unlink_test.node.ts +++ b/ts/test-mock/pnp/pni_unlink_test.node.ts @@ -11,10 +11,10 @@ import { } from '@signalapp/libsignal-client'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { generatePni } from '../../types/ServiceId.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { generatePni } from '../../types/ServiceId.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:pni-unlink'); diff --git a/ts/test-mock/pnp/send_gv2_invite_test.node.ts b/ts/test-mock/pnp/send_gv2_invite_test.node.ts index eaf523a053..f9d653a873 100644 --- a/ts/test-mock/pnp/send_gv2_invite_test.node.ts +++ b/ts/test-mock/pnp/send_gv2_invite_test.node.ts @@ -6,11 +6,11 @@ import type { PrimaryDevice, Group } from '@signalapp/mock-server'; import { StorageState, Proto, ServiceIdKind } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; const IdentifierType = Proto.ManifestRecord.Identifier.Type; diff --git a/ts/test-mock/pnp/username_test.node.ts b/ts/test-mock/pnp/username_test.node.ts index 2c06cf280a..a43b814221 100644 --- a/ts/test-mock/pnp/username_test.node.ts +++ b/ts/test-mock/pnp/username_test.node.ts @@ -7,17 +7,17 @@ import type { PrimaryDevice } from '@signalapp/mock-server'; import { usernames } from '@signalapp/libsignal-client'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; import { bufferToUuid, typeIntoInput, waitForEnabledComposer, -} from '../helpers.node.js'; -import { contactByEncryptedUsernameRoute } from '../../util/signalRoutes.std.js'; +} from '../helpers.node.ts'; +import { contactByEncryptedUsernameRoute } from '../../util/signalRoutes.std.ts'; export const debug = createDebug('mock:test:username'); diff --git a/ts/test-mock/rate-limit/story_test.node.ts b/ts/test-mock/rate-limit/story_test.node.ts index 4022058171..8405dcc299 100644 --- a/ts/test-mock/rate-limit/story_test.node.ts +++ b/ts/test-mock/rate-limit/story_test.node.ts @@ -5,11 +5,11 @@ import { assert } from 'chai'; import createDebug from 'debug'; import { Proto, StorageState } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:rate-limit'); diff --git a/ts/test-mock/rate-limit/viewed_test.node.ts b/ts/test-mock/rate-limit/viewed_test.node.ts index d08792f76d..f367838296 100644 --- a/ts/test-mock/rate-limit/viewed_test.node.ts +++ b/ts/test-mock/rate-limit/viewed_test.node.ts @@ -5,15 +5,15 @@ import { assert } from 'chai'; import type { PrimaryDevice } from '@signalapp/mock-server'; import { StorageState, ServiceIdKind } from '@signalapp/mock-server'; import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { App } from '../bootstrap.node.js'; -import { ReceiptType } from '../../types/Receipt.std.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { App } from '../bootstrap.node.ts'; +import { ReceiptType } from '../../types/Receipt.std.ts'; import { acceptConversation, typeIntoInput, waitForEnabledComposer, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:challenge:receipts'); diff --git a/ts/test-mock/release-notes/megaphone_test.node.ts b/ts/test-mock/release-notes/megaphone_test.node.ts index 0269305821..1f247df2f7 100644 --- a/ts/test-mock/release-notes/megaphone_test.node.ts +++ b/ts/test-mock/release-notes/megaphone_test.node.ts @@ -7,9 +7,9 @@ import { expect } from 'playwright/test'; import { StorageState } from '@signalapp/mock-server'; import { BackupLevel } from '@signalapp/libsignal-client/zkgroup.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { MINUTE } from '../../util/durations/index.std.js'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { MINUTE } from '../../util/durations/index.std.ts'; export const debug = createDebug('mock:test:megaphone'); diff --git a/ts/test-mock/release-notes/release_notes_test.node.ts b/ts/test-mock/release-notes/release_notes_test.node.ts index b38390de8e..640813d383 100644 --- a/ts/test-mock/release-notes/release_notes_test.node.ts +++ b/ts/test-mock/release-notes/release_notes_test.node.ts @@ -5,15 +5,15 @@ import createDebug from 'debug'; import { expect } from 'playwright/test'; import { assert } from 'chai'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import { MINUTE } from '../../util/durations/index.std.js'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import { MINUTE } from '../../util/durations/index.std.ts'; -import { SIGNAL_ACI } from '../../types/SignalConversation.std.js'; +import { SIGNAL_ACI } from '../../types/SignalConversation.std.ts'; import { clickOnConversationWithAci, getTimelineMessageWithText, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; export const debug = createDebug('mock:test:releaseNotes'); diff --git a/ts/test-mock/routing/routing_test.node.ts b/ts/test-mock/routing/routing_test.node.ts index 069869cf86..1fcfb6cf99 100644 --- a/ts/test-mock/routing/routing_test.node.ts +++ b/ts/test-mock/routing/routing_test.node.ts @@ -3,18 +3,18 @@ import { assert } from 'chai'; import type { PrimaryDevice } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { Bootstrap, App } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { Bootstrap, App } from '../bootstrap.node.ts'; import { artAddStickersRoute, showConversationRoute, -} from '../../util/signalRoutes.std.js'; +} from '../../util/signalRoutes.std.ts'; import { initStorage, STICKER_PACKS, storeStickerPacks, -} from '../storage/fixtures.node.js'; -import { strictAssert } from '../../util/assert.std.js'; +} from '../storage/fixtures.node.ts'; +import { strictAssert } from '../../util/assert.std.ts'; describe('routing', function (this: Mocha.Suite) { this.timeout(durations.MINUTE); diff --git a/ts/test-mock/settings/language_test.node.ts b/ts/test-mock/settings/language_test.node.ts index 792f214257..9e6fe1bddb 100644 --- a/ts/test-mock/settings/language_test.node.ts +++ b/ts/test-mock/settings/language_test.node.ts @@ -6,9 +6,9 @@ import createDebug from 'debug'; import type { Locator } from 'playwright/test'; import { expect } from 'playwright/test'; import { writeFile } from 'node:fs/promises'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:language'); diff --git a/ts/test-mock/settings/settings_test.node.ts b/ts/test-mock/settings/settings_test.node.ts index 4df2fa6382..5c54e40900 100644 --- a/ts/test-mock/settings/settings_test.node.ts +++ b/ts/test-mock/settings/settings_test.node.ts @@ -3,9 +3,9 @@ import createDebug from 'debug'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; export const debug = createDebug('mock:test:settings'); diff --git a/ts/test-mock/setup-ci.node.ts b/ts/test-mock/setup-ci.node.ts index 0e2590028b..71acbd116d 100644 --- a/ts/test-mock/setup-ci.node.ts +++ b/ts/test-mock/setup-ci.node.ts @@ -3,7 +3,7 @@ import createDebug from 'debug'; -import { Bootstrap } from './bootstrap.node.js'; +import { Bootstrap } from './bootstrap.node.ts'; const debug = createDebug('mock:test:setup-ci'); diff --git a/ts/test-mock/storage/archive_test.node.ts b/ts/test-mock/storage/archive_test.node.ts index c04c6558bb..f68a85ab32 100644 --- a/ts/test-mock/storage/archive_test.node.ts +++ b/ts/test-mock/storage/archive_test.node.ts @@ -4,9 +4,9 @@ import { assert } from 'chai'; import type { PrimaryDevice } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { App, Bootstrap } from './fixtures.node.js'; -import { initStorage, debug } from './fixtures.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App, Bootstrap } from './fixtures.node.ts'; +import { initStorage, debug } from './fixtures.node.ts'; describe('storage service', function (this: Mocha.Suite) { this.timeout(durations.MINUTE); diff --git a/ts/test-mock/storage/call_links_test.node.ts b/ts/test-mock/storage/call_links_test.node.ts index 81bb1219ef..46590339a5 100644 --- a/ts/test-mock/storage/call_links_test.node.ts +++ b/ts/test-mock/storage/call_links_test.node.ts @@ -3,16 +3,16 @@ import { assert } from 'chai'; import { Proto, StorageState } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from './fixtures.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from './fixtures.node.ts'; import { Bootstrap, debug, getCallLinkRecordPredicate, -} from './fixtures.node.js'; -import { createCallLink } from '../helpers.node.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; +} from './fixtures.node.ts'; +import { createCallLink } from '../helpers.node.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; const IdentifierType = Proto.ManifestRecord.Identifier.Type; diff --git a/ts/test-mock/storage/chat_folder_test.node.ts b/ts/test-mock/storage/chat_folder_test.node.ts index e6696844c0..445f4ec50b 100644 --- a/ts/test-mock/storage/chat_folder_test.node.ts +++ b/ts/test-mock/storage/chat_folder_test.node.ts @@ -5,17 +5,17 @@ import { Proto, StorageState } from '@signalapp/mock-server'; import type { Page } from 'playwright/test'; import { expect } from 'playwright/test'; import type { StorageStateNewRecord } from '@signalapp/mock-server/src/api/storage-state.js'; -import * as durations from '../../util/durations/index.std.js'; -import type { App } from './fixtures.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App } from './fixtures.node.ts'; import { Bootstrap, debug, getChatFolderRecordPredicate, -} from './fixtures.node.js'; -import { bytesToUuid, uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { CHAT_FOLDER_DELETED_POSITION } from '../../types/ChatFolder.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { toNumber } from '../../util/toNumber.std.js'; +} from './fixtures.node.ts'; +import { bytesToUuid, uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { CHAT_FOLDER_DELETED_POSITION } from '../../types/ChatFolder.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { toNumber } from '../../util/toNumber.std.ts'; const IdentifierType = Proto.ManifestRecord.Identifier.Type; diff --git a/ts/test-mock/storage/conflict_test.node.ts b/ts/test-mock/storage/conflict_test.node.ts index be5b60e6b8..b5ddf44a40 100644 --- a/ts/test-mock/storage/conflict_test.node.ts +++ b/ts/test-mock/storage/conflict_test.node.ts @@ -11,14 +11,14 @@ import type { } from '@signalapp/mock-server'; import { Proto } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import { createCallLink } from '../helpers.node.js'; -import type { App, Bootstrap } from './fixtures.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { createCallLink } from '../helpers.node.ts'; +import type { App, Bootstrap } from './fixtures.node.ts'; import { initStorage, debug, getCallLinkRecordPredicate, -} from './fixtures.node.js'; +} from './fixtures.node.ts'; const IdentifierType = Proto.ManifestRecord.Identifier.Type; diff --git a/ts/test-mock/storage/drop_test.node.ts b/ts/test-mock/storage/drop_test.node.ts index 960a73a440..1e5f9dc7a6 100644 --- a/ts/test-mock/storage/drop_test.node.ts +++ b/ts/test-mock/storage/drop_test.node.ts @@ -4,9 +4,9 @@ import { assert } from 'chai'; import { Proto, type StorageStateRecord } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { App, Bootstrap } from './fixtures.node.js'; -import { initStorage, debug } from './fixtures.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App, Bootstrap } from './fixtures.node.ts'; +import { initStorage, debug } from './fixtures.node.ts'; const IdentifierType = Proto.ManifestRecord.Identifier.Type; diff --git a/ts/test-mock/storage/fixtures.node.ts b/ts/test-mock/storage/fixtures.node.ts index b8256ec337..7cdc908e72 100644 --- a/ts/test-mock/storage/fixtures.node.ts +++ b/ts/test-mock/storage/fixtures.node.ts @@ -14,13 +14,13 @@ import path from 'node:path'; import fs from 'node:fs/promises'; import lodash from 'lodash'; import { CallLinkRootKey } from '@signalapp/ringrtc'; -import { App } from '../playwright.node.js'; -import { Bootstrap } from '../bootstrap.node.js'; -import type { BootstrapOptions } from '../bootstrap.node.js'; -import { MY_STORY_ID } from '../../types/Stories.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; -import { artAddStickersRoute } from '../../util/signalRoutes.std.js'; -import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.js'; +import { App } from '../playwright.node.ts'; +import { Bootstrap } from '../bootstrap.node.ts'; +import type { BootstrapOptions } from '../bootstrap.node.ts'; +import { MY_STORY_ID } from '../../types/Stories.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; +import { artAddStickersRoute } from '../../util/signalRoutes.std.ts'; +import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc.node.ts'; const { range } = lodash; diff --git a/ts/test-mock/storage/max_read_keys_test.node.ts b/ts/test-mock/storage/max_read_keys_test.node.ts index 39cdd217c1..295fb99a93 100644 --- a/ts/test-mock/storage/max_read_keys_test.node.ts +++ b/ts/test-mock/storage/max_read_keys_test.node.ts @@ -5,12 +5,12 @@ import { assert } from 'chai'; import type { PrimaryDevice } from '@signalapp/mock-server'; import { Proto } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { toAciObject } from '../../util/ServiceId.node.js'; -import { MAX_READ_KEYS } from '../../services/storageConstants.std.js'; -import type { App, Bootstrap } from './fixtures.node.js'; -import { initStorage, debug } from './fixtures.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { toAciObject } from '../../util/ServiceId.node.ts'; +import { MAX_READ_KEYS } from '../../services/storageConstants.std.ts'; +import type { App, Bootstrap } from './fixtures.node.ts'; +import { initStorage, debug } from './fixtures.node.ts'; const IdentifierType = Proto.ManifestRecord.Identifier.Type; diff --git a/ts/test-mock/storage/message_request_test.node.ts b/ts/test-mock/storage/message_request_test.node.ts index 1c84da5512..582bc75947 100644 --- a/ts/test-mock/storage/message_request_test.node.ts +++ b/ts/test-mock/storage/message_request_test.node.ts @@ -3,14 +3,14 @@ import { assert } from 'chai'; -import * as durations from '../../util/durations/index.std.js'; -import type { App, Bootstrap } from './fixtures.node.js'; -import { initStorage, debug } from './fixtures.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App, Bootstrap } from './fixtures.node.ts'; +import { initStorage, debug } from './fixtures.node.ts'; import { acceptConversation, typeIntoInput, waitForEnabledComposer, -} from '../helpers.node.js'; +} from '../helpers.node.ts'; describe('storage service', function (this: Mocha.Suite) { this.timeout(durations.MINUTE); diff --git a/ts/test-mock/storage/notification_profiles_test.node.ts b/ts/test-mock/storage/notification_profiles_test.node.ts index 3a4d1d3cb2..944b8d4b4c 100644 --- a/ts/test-mock/storage/notification_profiles_test.node.ts +++ b/ts/test-mock/storage/notification_profiles_test.node.ts @@ -5,16 +5,16 @@ import assert from 'node:assert'; import { Proto, StorageState } from '@signalapp/mock-server'; import { expect } from 'playwright/test'; -import * as Bytes from '../../Bytes.std.js'; -import * as durations from '../../util/durations/index.std.js'; -import { dropNull } from '../../util/dropNull.std.js'; -import { constantTimeEqual } from '../../Crypto.node.js'; -import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.js'; -import { Bootstrap, debug } from './fixtures.node.js'; -import { typeIntoInput } from '../helpers.node.js'; +import * as Bytes from '../../Bytes.std.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { dropNull } from '../../util/dropNull.std.ts'; +import { constantTimeEqual } from '../../Crypto.node.ts'; +import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.ts'; +import { Bootstrap, debug } from './fixtures.node.ts'; +import { typeIntoInput } from '../helpers.node.ts'; -import type { App } from './fixtures.node.js'; -import { DayOfWeek } from '../../types/NotificationProfile.std.js'; +import type { App } from './fixtures.node.ts'; +import { DayOfWeek } from '../../types/NotificationProfile.std.ts'; const IdentifierType = Proto.ManifestRecord.Identifier.Type; diff --git a/ts/test-mock/storage/pin_unpin_test.node.ts b/ts/test-mock/storage/pin_unpin_test.node.ts index 23c1fe9cda..3232b3d53d 100644 --- a/ts/test-mock/storage/pin_unpin_test.node.ts +++ b/ts/test-mock/storage/pin_unpin_test.node.ts @@ -5,9 +5,9 @@ import { assert } from 'chai'; import type { Group } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { App, Bootstrap } from './fixtures.node.js'; -import { initStorage, debug } from './fixtures.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App, Bootstrap } from './fixtures.node.ts'; +import { initStorage, debug } from './fixtures.node.ts'; describe('storage service', function (this: Mocha.Suite) { this.timeout(durations.MINUTE); diff --git a/ts/test-mock/storage/sticker_test.node.ts b/ts/test-mock/storage/sticker_test.node.ts index a80ac717e9..72deed62d3 100644 --- a/ts/test-mock/storage/sticker_test.node.ts +++ b/ts/test-mock/storage/sticker_test.node.ts @@ -4,8 +4,8 @@ import { assert } from 'chai'; import type { PrimaryDevice } from '@signalapp/mock-server'; import { Proto } from '@signalapp/mock-server'; -import * as durations from '../../util/durations/index.std.js'; -import type { App, Bootstrap } from './fixtures.node.js'; +import * as durations from '../../util/durations/index.std.ts'; +import type { App, Bootstrap } from './fixtures.node.ts'; import { initStorage, debug, @@ -14,13 +14,13 @@ import { storeStickerPacks, getStickerPackRecordPredicate, getStickerPackLink, -} from './fixtures.node.js'; +} from './fixtures.node.ts'; import { getMessageInTimelineByTimestamp, sendTextMessage, -} from '../helpers.node.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { toNumber } from '../../util/toNumber.std.js'; +} from '../helpers.node.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { toNumber } from '../../util/toNumber.std.ts'; const { StickerPackOperation } = Proto.SyncMessage; diff --git a/ts/test-node/AsyncQueue_test.std.ts b/ts/test-node/AsyncQueue_test.std.ts index 3b7208b748..dcb67bc635 100644 --- a/ts/test-node/AsyncQueue_test.std.ts +++ b/ts/test-node/AsyncQueue_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { AsyncQueue } from '../util/AsyncQueue.std.js'; +import { AsyncQueue } from '../util/AsyncQueue.std.ts'; describe('AsyncQueue', () => { it('yields values as they are added, even if they were added before consuming', async () => { diff --git a/ts/test-node/RemoteConfig_test.dom.ts b/ts/test-node/RemoteConfig_test.dom.ts index 825c5072d8..84e1a624a0 100644 --- a/ts/test-node/RemoteConfig_test.dom.ts +++ b/ts/test-node/RemoteConfig_test.dom.ts @@ -5,8 +5,8 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import lodash from 'lodash'; -import { normalizeAci } from '../util/normalizeAci.std.js'; -import type { ConfigKeyType, ConfigListenerType } from '../RemoteConfig.dom.js'; +import { normalizeAci } from '../util/normalizeAci.std.ts'; +import type { ConfigKeyType, ConfigListenerType } from '../RemoteConfig.dom.ts'; import { COUNTRY_CODE_FALLBACK, getCountryCodeValue, @@ -15,8 +15,8 @@ import { onChange, getValue, isEnabled, -} from '../RemoteConfig.dom.js'; -import { updateRemoteConfig } from '../test-helpers/RemoteConfigStub.dom.js'; +} from '../RemoteConfig.dom.ts'; +import { updateRemoteConfig } from '../test-helpers/RemoteConfigStub.dom.ts'; const { omit } = lodash; diff --git a/ts/test-node/TaskWithTimeout_test.std.ts b/ts/test-node/TaskWithTimeout_test.std.ts index 5210a2138c..047cad551c 100644 --- a/ts/test-node/TaskWithTimeout_test.std.ts +++ b/ts/test-node/TaskWithTimeout_test.std.ts @@ -4,14 +4,14 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { sleep } from '../util/sleep.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { MINUTE } from '../util/durations/index.std.js'; +import { sleep } from '../util/sleep.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { MINUTE } from '../util/durations/index.std.ts'; import { runTaskWithTimeout, suspendTasksWithTimeout, resumeTasksWithTimeout, -} from '../textsecure/TaskWithTimeout.std.js'; +} from '../textsecure/TaskWithTimeout.std.ts'; describe('runTaskWithTimeout', () => { let sandbox: sinon.SinonSandbox; diff --git a/ts/test-node/app/PreventDisplaySleepService_test.std.ts b/ts/test-node/app/PreventDisplaySleepService_test.std.ts index 2822a3a58a..f45471499c 100644 --- a/ts/test-node/app/PreventDisplaySleepService_test.std.ts +++ b/ts/test-node/app/PreventDisplaySleepService_test.std.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import type { PowerSaveBlocker } from 'electron'; -import { PreventDisplaySleepService } from '../../../app/PreventDisplaySleepService.std.js'; +import { PreventDisplaySleepService } from '../../../app/PreventDisplaySleepService.std.ts'; describe('PreventDisplaySleepService', () => { class FakePowerSaveBlocker implements PowerSaveBlocker { diff --git a/ts/test-node/app/SystemTrayService_test.main.ts b/ts/test-node/app/SystemTrayService_test.main.ts index 33cd7fbb41..8d6a2d2a90 100644 --- a/ts/test-node/app/SystemTrayService_test.main.ts +++ b/ts/test-node/app/SystemTrayService_test.main.ts @@ -5,11 +5,11 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import type { MenuItem } from 'electron'; import { BrowserWindow, Tray, nativeImage } from 'electron'; -import { MINUTE } from '../../util/durations/index.std.js'; +import { MINUTE } from '../../util/durations/index.std.ts'; -import type { SystemTrayServiceOptionsType } from '../../../app/SystemTrayService.main.js'; -import { SystemTrayService } from '../../../app/SystemTrayService.main.js'; -import i18n from '../util/i18n.node.js'; +import type { SystemTrayServiceOptionsType } from '../../../app/SystemTrayService.main.ts'; +import { SystemTrayService } from '../../../app/SystemTrayService.main.ts'; +import i18n from '../util/i18n.node.ts'; describe('SystemTrayService', function (this: Mocha.Suite) { // These tests take more time on CI in some cases, so we increase the timeout. diff --git a/ts/test-node/app/SystemTraySettingCache_test.node.ts b/ts/test-node/app/SystemTraySettingCache_test.node.ts index 6d0f18ec16..237de14c61 100644 --- a/ts/test-node/app/SystemTraySettingCache_test.node.ts +++ b/ts/test-node/app/SystemTraySettingCache_test.node.ts @@ -3,10 +3,10 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { SystemTraySetting } from '../../types/SystemTraySetting.std.js'; +import { SystemTraySetting } from '../../types/SystemTraySetting.std.ts'; -import type { ConfigType } from '../../../app/base_config.node.js'; -import { SystemTraySettingCache } from '../../../app/SystemTraySettingCache.node.js'; +import type { ConfigType } from '../../../app/base_config.node.ts'; +import { SystemTraySettingCache } from '../../../app/SystemTraySettingCache.node.ts'; describe('SystemTraySettingCache', () => { let sandbox: sinon.SinonSandbox; diff --git a/ts/test-node/app/base_config_test.node.ts b/ts/test-node/app/base_config_test.node.ts index f5b60a73ea..c2ebec2398 100644 --- a/ts/test-node/app/base_config_test.node.ts +++ b/ts/test-node/app/base_config_test.node.ts @@ -9,8 +9,8 @@ import fsExtra from 'fs-extra'; import { v4 as generateGuid } from 'uuid'; import { assert } from 'chai'; -import type { ConfigType } from '../../../app/base_config.node.js'; -import { start } from '../../../app/base_config.node.js'; +import type { ConfigType } from '../../../app/base_config.node.ts'; +import { start } from '../../../app/base_config.node.ts'; const { pathExists, readJsonSync } = fsExtra; diff --git a/ts/test-node/app/locale_test.main.ts b/ts/test-node/app/locale_test.main.ts index 73e745b6c0..0ad5b69f4b 100644 --- a/ts/test-node/app/locale_test.main.ts +++ b/ts/test-node/app/locale_test.main.ts @@ -5,9 +5,9 @@ import { join } from 'node:path'; import { assert } from 'chai'; import { stub } from 'sinon'; import * as LocaleMatcher from '@formatjs/intl-localematcher'; -import { load, _getAvailableLocales } from '../../../app/locale.node.js'; -import { FAKE_DEFAULT_LOCALE } from '../../../app/spell_check.main.js'; -import { HourCyclePreference } from '../../types/I18N.std.js'; +import { load, _getAvailableLocales } from '../../../app/locale.node.ts'; +import { FAKE_DEFAULT_LOCALE } from '../../../app/spell_check.main.ts'; +import { HourCyclePreference } from '../../types/I18N.std.ts'; const rootDir = join(__dirname, '..', '..', '..'); diff --git a/ts/test-node/app/menu_test.node.ts b/ts/test-node/app/menu_test.node.ts index f266fdb307..a091bfa18c 100644 --- a/ts/test-node/app/menu_test.node.ts +++ b/ts/test-node/app/menu_test.node.ts @@ -7,12 +7,12 @@ import { stub } from 'sinon'; import type { MenuItemConstructorOptions } from 'electron'; import type pino from 'pino'; -import type { CreateTemplateOptionsType } from '../../../app/menu.std.js'; -import { createTemplate } from '../../../app/menu.std.js'; -import { load as loadLocale } from '../../../app/locale.node.js'; -import type { MenuListType } from '../../types/menu.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { HourCyclePreference } from '../../types/I18N.std.js'; +import type { CreateTemplateOptionsType } from '../../../app/menu.std.ts'; +import { createTemplate } from '../../../app/menu.std.ts'; +import { load as loadLocale } from '../../../app/locale.node.ts'; +import type { MenuListType } from '../../types/menu.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { HourCyclePreference } from '../../types/I18N.std.ts'; const forceUpdate = stub(); const openArtCreator = stub(); diff --git a/ts/test-node/app/protocol_filter_test.node.ts b/ts/test-node/app/protocol_filter_test.node.ts index 2ab31d7705..5fca862f53 100644 --- a/ts/test-node/app/protocol_filter_test.node.ts +++ b/ts/test-node/app/protocol_filter_test.node.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { _urlToPath } from '../../../app/protocol_filter.node.js'; +import { _urlToPath } from '../../../app/protocol_filter.node.ts'; describe('Protocol Filter', () => { describe('_urlToPath', () => { diff --git a/ts/test-node/app/renderWindowsToast_test.std.tsx b/ts/test-node/app/renderWindowsToast_test.std.tsx index 9c1b6b1681..4907df6195 100644 --- a/ts/test-node/app/renderWindowsToast_test.std.tsx +++ b/ts/test-node/app/renderWindowsToast_test.std.tsx @@ -3,8 +3,8 @@ import { assert } from 'chai'; -import { renderWindowsToast } from '../../../app/renderWindowsToast.std.js'; -import { NotificationType } from '../../types/notifications.std.js'; +import { renderWindowsToast } from '../../../app/renderWindowsToast.std.tsx'; +import { NotificationType } from '../../types/notifications.std.ts'; describe('renderWindowsToast', () => { it('handles toast with image', () => { diff --git a/ts/test-node/app/spell_check_test.main.ts b/ts/test-node/app/spell_check_test.main.ts index db4517033f..db05a714d9 100644 --- a/ts/test-node/app/spell_check_test.main.ts +++ b/ts/test-node/app/spell_check_test.main.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { getLanguages } from '../../../app/spell_check.main.js'; +import { getLanguages } from '../../../app/spell_check.main.ts'; describe('SpellCheck', () => { describe('getLanguages', () => { diff --git a/ts/test-node/app/updateDefaultSession_test.main.ts b/ts/test-node/app/updateDefaultSession_test.main.ts index 1448526739..d3aa6c5f7e 100644 --- a/ts/test-node/app/updateDefaultSession_test.main.ts +++ b/ts/test-node/app/updateDefaultSession_test.main.ts @@ -5,7 +5,7 @@ import * as sinon from 'sinon'; import { session } from 'electron'; import { v4 as uuid } from 'uuid'; -import { updateDefaultSession } from '../../../app/updateDefaultSession.main.js'; +import { updateDefaultSession } from '../../../app/updateDefaultSession.main.ts'; describe('updateDefaultSession', () => { let sandbox: sinon.SinonSandbox; diff --git a/ts/test-node/badges/getBadgeImageFileLocalPath_test.std.ts b/ts/test-node/badges/getBadgeImageFileLocalPath_test.std.ts index c468f94ff9..35c0228451 100644 --- a/ts/test-node/badges/getBadgeImageFileLocalPath_test.std.ts +++ b/ts/test-node/badges/getBadgeImageFileLocalPath_test.std.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { BadgeCategory } from '../../badges/BadgeCategory.std.js'; -import { BadgeImageTheme } from '../../badges/BadgeImageTheme.std.js'; +import { BadgeCategory } from '../../badges/BadgeCategory.std.ts'; +import { BadgeImageTheme } from '../../badges/BadgeImageTheme.std.ts'; -import { getBadgeImageFileLocalPath } from '../../badges/getBadgeImageFileLocalPath.std.js'; +import { getBadgeImageFileLocalPath } from '../../badges/getBadgeImageFileLocalPath.std.ts'; describe('getBadgeImageFileLocalPath', () => { const image = (localPath?: string) => ({ diff --git a/ts/test-node/badges/isBadgeImageFileUrlValid_test.std.ts b/ts/test-node/badges/isBadgeImageFileUrlValid_test.std.ts index d279dc740c..132e183307 100644 --- a/ts/test-node/badges/isBadgeImageFileUrlValid_test.std.ts +++ b/ts/test-node/badges/isBadgeImageFileUrlValid_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isBadgeImageFileUrlValid } from '../../badges/isBadgeImageFileUrlValid.std.js'; +import { isBadgeImageFileUrlValid } from '../../badges/isBadgeImageFileUrlValid.std.ts'; describe('isBadgeImageFileUrlValid', () => { const UPDATES_URL = 'https://updates2.signal.org/desktop'; diff --git a/ts/test-node/badges/isBadgeVisible_test.std.ts b/ts/test-node/badges/isBadgeVisible_test.std.ts index e290db9e33..37f9f8b16d 100644 --- a/ts/test-node/badges/isBadgeVisible_test.std.ts +++ b/ts/test-node/badges/isBadgeVisible_test.std.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import type { BadgeType } from '../../badges/types.std.js'; +import type { BadgeType } from '../../badges/types.std.ts'; -import { isBadgeVisible } from '../../badges/isBadgeVisible.std.js'; -import { BadgeCategory } from '../../badges/BadgeCategory.std.js'; +import { isBadgeVisible } from '../../badges/isBadgeVisible.std.ts'; +import { BadgeCategory } from '../../badges/BadgeCategory.std.ts'; describe('isBadgeVisible', () => { const fakeBadge = (isVisible?: boolean): BadgeType => ({ diff --git a/ts/test-node/badges/parseBadgesFromServer_test.std.ts b/ts/test-node/badges/parseBadgesFromServer_test.std.ts index 72f7021309..04d8b89733 100644 --- a/ts/test-node/badges/parseBadgesFromServer_test.std.ts +++ b/ts/test-node/badges/parseBadgesFromServer_test.std.ts @@ -3,10 +3,10 @@ import { assert } from 'chai'; import lodash from 'lodash'; -import { BadgeCategory } from '../../badges/BadgeCategory.std.js'; -import { BadgeImageTheme } from '../../badges/BadgeImageTheme.std.js'; +import { BadgeCategory } from '../../badges/BadgeCategory.std.ts'; +import { BadgeImageTheme } from '../../badges/BadgeImageTheme.std.ts'; -import { parseBadgesFromServer } from '../../badges/parseBadgesFromServer.std.js'; +import { parseBadgesFromServer } from '../../badges/parseBadgesFromServer.std.ts'; const { omit } = lodash; diff --git a/ts/test-node/calling/findBestMatchingDevice_test.std.ts b/ts/test-node/calling/findBestMatchingDevice_test.std.ts index 6223347321..515915d3d7 100644 --- a/ts/test-node/calling/findBestMatchingDevice_test.std.ts +++ b/ts/test-node/calling/findBestMatchingDevice_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { findBestMatchingAudioDeviceIndex } from '../../calling/findBestMatchingDevice.std.js'; +import { findBestMatchingAudioDeviceIndex } from '../../calling/findBestMatchingDevice.std.ts'; describe('"find best matching device" helpers', () => { describe('findBestMatchingAudioDeviceIndex', () => { diff --git a/ts/test-node/challenge_test.dom.ts b/ts/test-node/challenge_test.dom.ts index bac0fd6521..9262ce2c40 100644 --- a/ts/test-node/challenge_test.dom.ts +++ b/ts/test-node/challenge_test.dom.ts @@ -5,9 +5,9 @@ import { assert } from 'chai'; import lodash from 'lodash'; import * as sinon from 'sinon'; -import { STORAGE_KEY, ChallengeHandler } from '../challenge.dom.js'; -import type { RegisteredChallengeType } from '../challenge.dom.js'; -import { DAY, SECOND } from '../util/durations/index.std.js'; +import { STORAGE_KEY, ChallengeHandler } from '../challenge.dom.ts'; +import type { RegisteredChallengeType } from '../challenge.dom.ts'; +import { DAY, SECOND } from '../util/durations/index.std.ts'; const { noop } = lodash; diff --git a/ts/test-node/components/fun/emojis_test.node.ts b/ts/test-node/components/fun/emojis_test.node.ts index b8ff0d3cde..fbd4117b0e 100644 --- a/ts/test-node/components/fun/emojis_test.node.ts +++ b/ts/test-node/components/fun/emojis_test.node.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import assert from 'node:assert/strict'; -import { getEmojifyData } from '../../../components/fun/data/emojis.std.js'; +import { getEmojifyData } from '../../../components/fun/data/emojis.std.ts'; describe('getEmojifyData', () => { function check(text: string, emojiCount: number, isEmojiOnlyText: boolean) { diff --git a/ts/test-node/components/fun/segments_test.node.ts b/ts/test-node/components/fun/segments_test.node.ts index f19075e715..49bfb4ebe1 100644 --- a/ts/test-node/components/fun/segments_test.node.ts +++ b/ts/test-node/components/fun/segments_test.node.ts @@ -6,7 +6,7 @@ import { _getSegmentSize, _SEGMENT_SIZE_BUCKETS, type _SegmentRange, -} from '../../../components/fun/data/segments.std.js'; +} from '../../../components/fun/data/segments.std.ts'; const SMALLEST_BUCKET = Math.min(..._SEGMENT_SIZE_BUCKETS); diff --git a/ts/test-node/components/leftPane/LeftPaneArchiveHelper_test.dom.ts b/ts/test-node/components/leftPane/LeftPaneArchiveHelper_test.dom.ts index 20852829fd..cc49c5abf0 100644 --- a/ts/test-node/components/leftPane/LeftPaneArchiveHelper_test.dom.ts +++ b/ts/test-node/components/leftPane/LeftPaneArchiveHelper_test.dom.ts @@ -4,12 +4,12 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import { v4 as uuid } from 'uuid'; -import { RowType } from '../../../components/ConversationList.dom.js'; -import { FindDirection } from '../../../components/leftPane/LeftPaneHelper.dom.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { LeftPaneSearchHelper } from '../../../components/leftPane/LeftPaneSearchHelper.dom.js'; +import { RowType } from '../../../components/ConversationList.dom.tsx'; +import { FindDirection } from '../../../components/leftPane/LeftPaneHelper.dom.tsx'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { LeftPaneSearchHelper } from '../../../components/leftPane/LeftPaneSearchHelper.dom.tsx'; -import { LeftPaneArchiveHelper } from '../../../components/leftPane/LeftPaneArchiveHelper.dom.js'; +import { LeftPaneArchiveHelper } from '../../../components/leftPane/LeftPaneArchiveHelper.dom.tsx'; describe('LeftPaneArchiveHelper', () => { let sandbox: sinon.SinonSandbox; diff --git a/ts/test-node/components/leftPane/LeftPaneChooseGroupMembersHelper_test.dom.ts b/ts/test-node/components/leftPane/LeftPaneChooseGroupMembersHelper_test.dom.ts index 14eb9add99..657386ce84 100644 --- a/ts/test-node/components/leftPane/LeftPaneChooseGroupMembersHelper_test.dom.ts +++ b/ts/test-node/components/leftPane/LeftPaneChooseGroupMembersHelper_test.dom.ts @@ -7,11 +7,11 @@ import lodash from 'lodash'; import { RowType, _testHeaderText, -} from '../../../components/ConversationList.dom.js'; -import { ContactCheckboxDisabledReason } from '../../../components/conversationList/ContactCheckbox.dom.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; +} from '../../../components/ConversationList.dom.tsx'; +import { ContactCheckboxDisabledReason } from '../../../components/conversationList/ContactCheckbox.dom.tsx'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; -import { LeftPaneChooseGroupMembersHelper } from '../../../components/leftPane/LeftPaneChooseGroupMembersHelper.dom.js'; +import { LeftPaneChooseGroupMembersHelper } from '../../../components/leftPane/LeftPaneChooseGroupMembersHelper.dom.tsx'; const { times } = lodash; diff --git a/ts/test-node/components/leftPane/LeftPaneComposeHelper_test.dom.ts b/ts/test-node/components/leftPane/LeftPaneComposeHelper_test.dom.ts index 048e40d320..540d8d2f18 100644 --- a/ts/test-node/components/leftPane/LeftPaneComposeHelper_test.dom.ts +++ b/ts/test-node/components/leftPane/LeftPaneComposeHelper_test.dom.ts @@ -6,14 +6,14 @@ import * as sinon from 'sinon'; import { RowType, _testHeaderText, -} from '../../../components/ConversationList.dom.js'; -import { FindDirection } from '../../../components/leftPane/LeftPaneHelper.dom.js'; +} from '../../../components/ConversationList.dom.tsx'; +import { FindDirection } from '../../../components/leftPane/LeftPaneHelper.dom.tsx'; import { getDefaultConversation, getDefaultGroupListItem, -} from '../../../test-helpers/getDefaultConversation.std.js'; +} from '../../../test-helpers/getDefaultConversation.std.ts'; -import { LeftPaneComposeHelper } from '../../../components/leftPane/LeftPaneComposeHelper.dom.js'; +import { LeftPaneComposeHelper } from '../../../components/leftPane/LeftPaneComposeHelper.dom.tsx'; describe('LeftPaneComposeHelper', () => { let sinonSandbox: sinon.SinonSandbox; diff --git a/ts/test-node/components/leftPane/LeftPaneInboxHelper_test.dom.tsx b/ts/test-node/components/leftPane/LeftPaneInboxHelper_test.dom.tsx index 77eceac1cb..11fa902217 100644 --- a/ts/test-node/components/leftPane/LeftPaneInboxHelper_test.dom.tsx +++ b/ts/test-node/components/leftPane/LeftPaneInboxHelper_test.dom.tsx @@ -6,12 +6,12 @@ import * as sinon from 'sinon'; import { RowType, _testHeaderText, -} from '../../../components/ConversationList.dom.js'; -import { FindDirection } from '../../../components/leftPane/LeftPaneHelper.dom.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; +} from '../../../components/ConversationList.dom.tsx'; +import { FindDirection } from '../../../components/leftPane/LeftPaneHelper.dom.tsx'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; -import type { LeftPaneInboxPropsType } from '../../../components/leftPane/LeftPaneInboxHelper.dom.js'; -import { LeftPaneInboxHelper } from '../../../components/leftPane/LeftPaneInboxHelper.dom.js'; +import type { LeftPaneInboxPropsType } from '../../../components/leftPane/LeftPaneInboxHelper.dom.tsx'; +import { LeftPaneInboxHelper } from '../../../components/leftPane/LeftPaneInboxHelper.dom.tsx'; describe('LeftPaneInboxHelper', () => { const defaultProps: LeftPaneInboxPropsType = { diff --git a/ts/test-node/components/leftPane/LeftPaneSearchHelper_test.dom.ts b/ts/test-node/components/leftPane/LeftPaneSearchHelper_test.dom.ts index 70ab1bc13a..a9c3217e37 100644 --- a/ts/test-node/components/leftPane/LeftPaneSearchHelper_test.dom.ts +++ b/ts/test-node/components/leftPane/LeftPaneSearchHelper_test.dom.ts @@ -7,10 +7,10 @@ import { v4 as uuid } from 'uuid'; import { RowType, _testHeaderText, -} from '../../../components/ConversationList.dom.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; +} from '../../../components/ConversationList.dom.tsx'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; -import { LeftPaneSearchHelper } from '../../../components/leftPane/LeftPaneSearchHelper.dom.js'; +import { LeftPaneSearchHelper } from '../../../components/leftPane/LeftPaneSearchHelper.dom.tsx'; const baseSearchHelperArgs = { conversationResults: { isLoading: false, results: [] }, diff --git a/ts/test-node/components/leftPane/LeftPaneSetGroupMetadataHelper_test.dom.ts b/ts/test-node/components/leftPane/LeftPaneSetGroupMetadataHelper_test.dom.ts index 1c70f75b23..0c616e6d07 100644 --- a/ts/test-node/components/leftPane/LeftPaneSetGroupMetadataHelper_test.dom.ts +++ b/ts/test-node/components/leftPane/LeftPaneSetGroupMetadataHelper_test.dom.ts @@ -6,11 +6,11 @@ import * as sinon from 'sinon'; import { RowType, _testHeaderText, -} from '../../../components/ConversationList.dom.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; -import { DurationInSeconds } from '../../../util/durations/index.std.js'; +} from '../../../components/ConversationList.dom.tsx'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; +import { DurationInSeconds } from '../../../util/durations/index.std.ts'; -import { LeftPaneSetGroupMetadataHelper } from '../../../components/leftPane/LeftPaneSetGroupMetadataHelper.dom.js'; +import { LeftPaneSetGroupMetadataHelper } from '../../../components/leftPane/LeftPaneSetGroupMetadataHelper.dom.tsx'; function getComposeState() { return { diff --git a/ts/test-node/components/leftPane/getConversationInDirection_test.dom.ts b/ts/test-node/components/leftPane/getConversationInDirection_test.dom.ts index c46a665f08..4629a0a7a1 100644 --- a/ts/test-node/components/leftPane/getConversationInDirection_test.dom.ts +++ b/ts/test-node/components/leftPane/getConversationInDirection_test.dom.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import type { ToFindType } from '../../../components/leftPane/LeftPaneHelper.dom.js'; -import { FindDirection } from '../../../components/leftPane/LeftPaneHelper.dom.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; +import type { ToFindType } from '../../../components/leftPane/LeftPaneHelper.dom.tsx'; +import { FindDirection } from '../../../components/leftPane/LeftPaneHelper.dom.tsx'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; -import { getConversationInDirection } from '../../../components/leftPane/getConversationInDirection.dom.js'; +import { getConversationInDirection } from '../../../components/leftPane/getConversationInDirection.dom.ts'; describe('getConversationInDirection', () => { const fakeConversation = (markedUnread = false) => diff --git a/ts/test-node/components/media-gallery/groupMediaItemsByDate.std.ts b/ts/test-node/components/media-gallery/groupMediaItemsByDate.std.ts index 3a0b1841ea..5feaea0088 100644 --- a/ts/test-node/components/media-gallery/groupMediaItemsByDate.std.ts +++ b/ts/test-node/components/media-gallery/groupMediaItemsByDate.std.ts @@ -4,10 +4,10 @@ import { assert } from 'chai'; import lodash from 'lodash'; -import { IMAGE_JPEG } from '../../../types/MIME.std.js'; -import { groupMediaItemsByDate } from '../../../components/conversation/media-gallery/groupMediaItemsByDate.std.js'; -import type { MediaItemType } from '../../../types/MediaItem.std.js'; -import { fakeAttachment } from '../../../test-helpers/fakeAttachment.std.js'; +import { IMAGE_JPEG } from '../../../types/MIME.std.ts'; +import { groupMediaItemsByDate } from '../../../components/conversation/media-gallery/groupMediaItemsByDate.std.ts'; +import type { MediaItemType } from '../../../types/MediaItem.std.ts'; +import { fakeAttachment } from '../../../test-helpers/fakeAttachment.std.ts'; const { shuffle } = lodash; diff --git a/ts/test-node/conversations/isConversationTooBigToRing_test.dom.ts b/ts/test-node/conversations/isConversationTooBigToRing_test.dom.ts index 05d30bd1f9..0be057e549 100644 --- a/ts/test-node/conversations/isConversationTooBigToRing_test.dom.ts +++ b/ts/test-node/conversations/isConversationTooBigToRing_test.dom.ts @@ -3,10 +3,10 @@ import { assert } from 'chai'; import lodash from 'lodash'; -import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; -import { isConversationTooBigToRing } from '../../conversations/isConversationTooBigToRing.dom.js'; +import { isConversationTooBigToRing } from '../../conversations/isConversationTooBigToRing.dom.ts'; const { times } = lodash; diff --git a/ts/test-node/environment_test.std.ts b/ts/test-node/environment_test.std.ts index a2a3474e25..9ef8e241fc 100644 --- a/ts/test-node/environment_test.std.ts +++ b/ts/test-node/environment_test.std.ts @@ -7,7 +7,7 @@ import { Environment, isTestEnvironment, parseEnvironment, -} from '../environment.std.js'; +} from '../environment.std.ts'; describe('environment utilities', () => { describe('parseEnvironment', () => { diff --git a/ts/test-node/groups/add_banned_member_test.preload.ts b/ts/test-node/groups/add_banned_member_test.preload.ts index aa4f16b6b6..eb6b785dcf 100644 --- a/ts/test-node/groups/add_banned_member_test.preload.ts +++ b/ts/test-node/groups/add_banned_member_test.preload.ts @@ -3,13 +3,13 @@ import { assert } from 'chai'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { _maybeBuildAddBannedMemberActions } from '../../groups.preload.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { _maybeBuildAddBannedMemberActions } from '../../groups.preload.ts'; import { getClientZkGroupCipher, decryptServiceId, -} from '../../util/zkgroup.node.js'; -import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.js'; +} from '../../util/zkgroup.node.ts'; +import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.ts'; const HARD_LIMIT_KEY = 'global.groupsv2.groupSizeHardLimit'; diff --git a/ts/test-node/groups/limits_test.dom.ts b/ts/test-node/groups/limits_test.dom.ts index 2e7aa4dcb0..3351382258 100644 --- a/ts/test-node/groups/limits_test.dom.ts +++ b/ts/test-node/groups/limits_test.dom.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.js'; +import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.ts'; import { getGroupSizeRecommendedLimit, getGroupSizeHardLimit, -} from '../../groups/limits.dom.js'; +} from '../../groups/limits.dom.ts'; const RECOMMENDED_SIZE_KEY = 'global.groupsv2.maxGroupSize'; const HARD_LIMIT_KEY = 'global.groupsv2.groupSizeHardLimit'; diff --git a/ts/test-node/groups/message_merge_test.preload.ts b/ts/test-node/groups/message_merge_test.preload.ts index 183f9ecf09..c31ee86d06 100644 --- a/ts/test-node/groups/message_merge_test.preload.ts +++ b/ts/test-node/groups/message_merge_test.preload.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; import { _isGroupChangeMessageBounceable, _mergeGroupChangeMessages, -} from '../../groups.preload.js'; +} from '../../groups.preload.ts'; describe('group message merging', () => { const defaultMessage = { diff --git a/ts/test-node/jobs/JobError_test.std.ts b/ts/test-node/jobs/JobError_test.std.ts index 1ec2326424..3c58395e16 100644 --- a/ts/test-node/jobs/JobError_test.std.ts +++ b/ts/test-node/jobs/JobError_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { JobError } from '../../jobs/JobError.std.js'; +import { JobError } from '../../jobs/JobError.std.ts'; describe('JobError', () => { it('stores the provided argument as a property', () => { diff --git a/ts/test-node/jobs/JobLogger_test.std.ts b/ts/test-node/jobs/JobLogger_test.std.ts index 109df51a14..a33ffb121a 100644 --- a/ts/test-node/jobs/JobLogger_test.std.ts +++ b/ts/test-node/jobs/JobLogger_test.std.ts @@ -3,7 +3,7 @@ import * as sinon from 'sinon'; -import { JobLogger } from '../../jobs/JobLogger.std.js'; +import { JobLogger } from '../../jobs/JobLogger.std.ts'; describe('JobLogger', () => { const LEVELS = ['fatal', 'error', 'warn', 'info', 'debug', 'trace'] as const; diff --git a/ts/test-node/jobs/JobQueueDatabaseStore_test.preload.ts b/ts/test-node/jobs/JobQueueDatabaseStore_test.preload.ts index 0338caa210..222fdc1991 100644 --- a/ts/test-node/jobs/JobQueueDatabaseStore_test.preload.ts +++ b/ts/test-node/jobs/JobQueueDatabaseStore_test.preload.ts @@ -4,9 +4,9 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import lodash from 'lodash'; -import type { StoredJob } from '../../jobs/types.std.js'; +import type { StoredJob } from '../../jobs/types.std.ts'; -import { JobQueueDatabaseStore } from '../../jobs/JobQueueDatabaseStore.preload.js'; +import { JobQueueDatabaseStore } from '../../jobs/JobQueueDatabaseStore.preload.ts'; const { noop } = lodash; diff --git a/ts/test-node/jobs/JobQueue_test.node.ts b/ts/test-node/jobs/JobQueue_test.node.ts index 9b0c83a2ef..d8e13a6d93 100644 --- a/ts/test-node/jobs/JobQueue_test.node.ts +++ b/ts/test-node/jobs/JobQueue_test.node.ts @@ -8,21 +8,21 @@ import { z } from 'zod'; import lodash from 'lodash'; import { v4 as uuid } from 'uuid'; import PQueue from 'p-queue'; -import { JobError } from '../../jobs/JobError.std.js'; -import { TestJobQueueStore } from './TestJobQueueStore.node.js'; -import { missingCaseError } from '../../util/missingCaseError.std.js'; -import { drop } from '../../util/drop.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; +import { JobError } from '../../jobs/JobError.std.ts'; +import { TestJobQueueStore } from './TestJobQueueStore.node.ts'; +import { missingCaseError } from '../../util/missingCaseError.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; -import type { JOB_STATUS } from '../../jobs/JobQueue.std.js'; -import { JobQueue } from '../../jobs/JobQueue.std.js'; +import type { JOB_STATUS } from '../../jobs/JobQueue.std.ts'; +import { JobQueue } from '../../jobs/JobQueue.std.ts'; import type { ParsedJob, StoredJob, JobQueueStore, -} from '../../jobs/types.std.js'; -import { sleep } from '../../util/sleep.std.js'; -import { parseUnknown } from '../../util/schemas.std.js'; +} from '../../jobs/types.std.ts'; +import { sleep } from '../../util/sleep.std.ts'; +import { parseUnknown } from '../../util/schemas.std.ts'; const { noop, groupBy } = lodash; diff --git a/ts/test-node/jobs/Job_test.std.ts b/ts/test-node/jobs/Job_test.std.ts index b280b86834..3a7b61bd1a 100644 --- a/ts/test-node/jobs/Job_test.std.ts +++ b/ts/test-node/jobs/Job_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { Job } from '../../jobs/Job.std.js'; +import { Job } from '../../jobs/Job.std.ts'; describe('Job', () => { it('stores its arguments', () => { diff --git a/ts/test-node/jobs/TestJobQueueStore.node.ts b/ts/test-node/jobs/TestJobQueueStore.node.ts index 223fadf3a4..21c5cedaa6 100644 --- a/ts/test-node/jobs/TestJobQueueStore.node.ts +++ b/ts/test-node/jobs/TestJobQueueStore.node.ts @@ -3,9 +3,9 @@ import EventEmitter, { once } from 'node:events'; -import type { JobQueueStore, StoredJob } from '../../jobs/types.std.js'; -import { sleep } from '../../util/sleep.std.js'; -import { drop } from '../../util/drop.std.js'; +import type { JobQueueStore, StoredJob } from '../../jobs/types.std.ts'; +import { sleep } from '../../util/sleep.std.ts'; +import { drop } from '../../util/drop.std.ts'; export class TestJobQueueStore implements JobQueueStore { events = new EventEmitter(); diff --git a/ts/test-node/jobs/formatJobForInsert_test.std.ts b/ts/test-node/jobs/formatJobForInsert_test.std.ts index c74382d015..f4a9c023f8 100644 --- a/ts/test-node/jobs/formatJobForInsert_test.std.ts +++ b/ts/test-node/jobs/formatJobForInsert_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { formatJobForInsert } from '../../jobs/formatJobForInsert.std.js'; +import { formatJobForInsert } from '../../jobs/formatJobForInsert.std.ts'; describe('formatJobForInsert', () => { it('removes non-essential properties', () => { diff --git a/ts/test-node/jobs/helpers/InMemoryQueues_test.std.ts b/ts/test-node/jobs/helpers/InMemoryQueues_test.std.ts index d94fb6db15..b56d0e31ba 100644 --- a/ts/test-node/jobs/helpers/InMemoryQueues_test.std.ts +++ b/ts/test-node/jobs/helpers/InMemoryQueues_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { InMemoryQueues } from '../../../jobs/helpers/InMemoryQueues.std.js'; +import { InMemoryQueues } from '../../../jobs/helpers/InMemoryQueues.std.ts'; describe('InMemoryQueues', () => { describe('get', () => { diff --git a/ts/test-node/jobs/helpers/addReportSpamJob_test.dom.ts b/ts/test-node/jobs/helpers/addReportSpamJob_test.dom.ts index f68028fe37..53faa97cf6 100644 --- a/ts/test-node/jobs/helpers/addReportSpamJob_test.dom.ts +++ b/ts/test-node/jobs/helpers/addReportSpamJob_test.dom.ts @@ -1,10 +1,10 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as sinon from 'sinon'; -import { Job } from '../../../jobs/Job.std.js'; -import { addReportSpamJob } from '../../../jobs/helpers/addReportSpamJob.dom.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.js'; +import { Job } from '../../../jobs/Job.std.ts'; +import { addReportSpamJob } from '../../../jobs/helpers/addReportSpamJob.dom.ts'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import { getDefaultConversation } from '../../../test-helpers/getDefaultConversation.std.ts'; describe('addReportSpamJob', () => { let getMessageServerGuidsForSpam: sinon.SinonStub; diff --git a/ts/test-node/jobs/helpers/findRetryAfterTimeFromError_test.std.ts b/ts/test-node/jobs/helpers/findRetryAfterTimeFromError_test.std.ts index 330add3c9b..e2a3334fcb 100644 --- a/ts/test-node/jobs/helpers/findRetryAfterTimeFromError_test.std.ts +++ b/ts/test-node/jobs/helpers/findRetryAfterTimeFromError_test.std.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; -import { findRetryAfterTimeFromError } from '../../../jobs/helpers/findRetryAfterTimeFromError.std.js'; -import { HTTPError } from '../../../types/HTTPError.std.js'; -import { MINUTE } from '../../../util/durations/index.std.js'; +import { findRetryAfterTimeFromError } from '../../../jobs/helpers/findRetryAfterTimeFromError.std.ts'; +import { HTTPError } from '../../../types/HTTPError.std.ts'; +import { MINUTE } from '../../../util/durations/index.std.ts'; describe('findRetryAfterTimeFromError', () => { it('returns 1 minute or provided default if no Retry-After time is found', () => { diff --git a/ts/test-node/jobs/helpers/getHttpErrorCode_test.std.ts b/ts/test-node/jobs/helpers/getHttpErrorCode_test.std.ts index b70a8fc433..4d78cd3350 100644 --- a/ts/test-node/jobs/helpers/getHttpErrorCode_test.std.ts +++ b/ts/test-node/jobs/helpers/getHttpErrorCode_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { getHttpErrorCode } from '../../../jobs/helpers/getHttpErrorCode.std.js'; +import { getHttpErrorCode } from '../../../jobs/helpers/getHttpErrorCode.std.ts'; describe('getHttpErrorCode', () => { it('returns -1 if not passed an object', () => { diff --git a/ts/test-node/jobs/helpers/handleMultipleSendErrors_test.std.ts b/ts/test-node/jobs/helpers/handleMultipleSendErrors_test.std.ts index 67b492eec5..714d3622f9 100644 --- a/ts/test-node/jobs/helpers/handleMultipleSendErrors_test.std.ts +++ b/ts/test-node/jobs/helpers/handleMultipleSendErrors_test.std.ts @@ -4,14 +4,14 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import lodash from 'lodash'; -import { SendMessageProtoError } from '../../../textsecure/Errors.std.js'; -import { HTTPError } from '../../../types/HTTPError.std.js'; -import { SECOND } from '../../../util/durations/index.std.js'; +import { SendMessageProtoError } from '../../../textsecure/Errors.std.ts'; +import { HTTPError } from '../../../types/HTTPError.std.ts'; +import { SECOND } from '../../../util/durations/index.std.ts'; import { handleMultipleSendErrors, maybeExpandErrors, -} from '../../../jobs/helpers/handleMultipleSendErrors.std.js'; +} from '../../../jobs/helpers/handleMultipleSendErrors.std.ts'; const { noop, omit } = lodash; diff --git a/ts/test-node/jobs/helpers/sleepForRateLimitRetryAfterTime_test.std.ts b/ts/test-node/jobs/helpers/sleepForRateLimitRetryAfterTime_test.std.ts index 624a3ada9f..364a747539 100644 --- a/ts/test-node/jobs/helpers/sleepForRateLimitRetryAfterTime_test.std.ts +++ b/ts/test-node/jobs/helpers/sleepForRateLimitRetryAfterTime_test.std.ts @@ -3,11 +3,11 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { HTTPError } from '../../../types/HTTPError.std.js'; -import * as durations from '../../../util/durations/index.std.js'; -import { drop } from '../../../util/drop.std.js'; +import { HTTPError } from '../../../types/HTTPError.std.ts'; +import * as durations from '../../../util/durations/index.std.ts'; +import { drop } from '../../../util/drop.std.ts'; -import { sleepForRateLimitRetryAfterTime } from '../../../jobs/helpers/sleepForRateLimitRetryAfterTime.std.js'; +import { sleepForRateLimitRetryAfterTime } from '../../../jobs/helpers/sleepForRateLimitRetryAfterTime.std.ts'; describe('sleepFor413RetryAfterTimeIfApplicable', () => { const createLogger = () => ({ info: sinon.spy() }); diff --git a/ts/test-node/jobs/helpers/syncHelpers_test.preload.ts b/ts/test-node/jobs/helpers/syncHelpers_test.preload.ts index ab134a0aac..3a5549c8d8 100644 --- a/ts/test-node/jobs/helpers/syncHelpers_test.preload.ts +++ b/ts/test-node/jobs/helpers/syncHelpers_test.preload.ts @@ -3,8 +3,8 @@ import { assert } from 'chai'; -import { parseRawSyncDataArray } from '../../../jobs/helpers/syncHelpers.preload.js'; -import { generateAci } from '../../../types/ServiceId.std.js'; +import { parseRawSyncDataArray } from '../../../jobs/helpers/syncHelpers.preload.ts'; +import { generateAci } from '../../../types/ServiceId.std.ts'; const SERVICE_ID_1 = generateAci(); const SERVICE_ID_2 = generateAci(); diff --git a/ts/test-node/linkPreviews/isLinkPreviewDateValid_test.std.ts b/ts/test-node/linkPreviews/isLinkPreviewDateValid_test.std.ts index 37e001e2bc..cd12168f43 100644 --- a/ts/test-node/linkPreviews/isLinkPreviewDateValid_test.std.ts +++ b/ts/test-node/linkPreviews/isLinkPreviewDateValid_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isLinkPreviewDateValid } from '../../linkPreviews/isLinkPreviewDateValid.std.js'; +import { isLinkPreviewDateValid } from '../../linkPreviews/isLinkPreviewDateValid.std.ts'; describe('isLinkPreviewDateValid', () => { it('returns false for non-numbers', () => { diff --git a/ts/test-node/linkPreviews/shouldUseFullSizeLinkPreviewImage_test.std.ts b/ts/test-node/linkPreviews/shouldUseFullSizeLinkPreviewImage_test.std.ts index fe18903f3c..0ee0655bbb 100644 --- a/ts/test-node/linkPreviews/shouldUseFullSizeLinkPreviewImage_test.std.ts +++ b/ts/test-node/linkPreviews/shouldUseFullSizeLinkPreviewImage_test.std.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { VIDEO_MP4 } from '../../types/MIME.std.js'; +import { VIDEO_MP4 } from '../../types/MIME.std.ts'; -import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js'; +import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts'; -import { shouldUseFullSizeLinkPreviewImage } from '../../linkPreviews/shouldUseFullSizeLinkPreviewImage.std.js'; +import { shouldUseFullSizeLinkPreviewImage } from '../../linkPreviews/shouldUseFullSizeLinkPreviewImage.std.ts'; describe('shouldUseFullSizeLinkPreviewImage', () => { const baseLinkPreview = { diff --git a/ts/test-node/logging/formatCountForLogging_test.std.ts b/ts/test-node/logging/formatCountForLogging_test.std.ts index 9215f5519a..c815882b14 100644 --- a/ts/test-node/logging/formatCountForLogging_test.std.ts +++ b/ts/test-node/logging/formatCountForLogging_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { formatCountForLogging } from '../../logging/formatCountForLogging.std.js'; +import { formatCountForLogging } from '../../logging/formatCountForLogging.std.ts'; describe('formatCountForLogging', () => { it('returns "0" if passed zero', () => { diff --git a/ts/test-node/logging/uploadDebugLogs_test.node.ts b/ts/test-node/logging/uploadDebugLogs_test.node.ts index dcd49f0f51..19aa0b79cc 100644 --- a/ts/test-node/logging/uploadDebugLogs_test.node.ts +++ b/ts/test-node/logging/uploadDebugLogs_test.node.ts @@ -8,9 +8,9 @@ import FormData from 'form-data'; import * as util from 'node:util'; import * as zlib from 'node:zlib'; -import * as durations from '../../util/durations/index.std.js'; -import { upload } from '../../logging/uploadDebugLog.node.js'; -import { createLogger } from '../../logging/log.std.js'; +import * as durations from '../../util/durations/index.std.ts'; +import { upload } from '../../logging/uploadDebugLog.node.ts'; +import { createLogger } from '../../logging/log.std.ts'; const logger = createLogger('uploadDebugLogs_test'); diff --git a/ts/test-node/logging_test.main.ts b/ts/test-node/logging_test.main.ts index 3456e3ca50..b7aeaae751 100644 --- a/ts/test-node/logging_test.main.ts +++ b/ts/test-node/logging_test.main.ts @@ -13,7 +13,7 @@ import { isLineAfterDate, fetchLog, fetchLogs, -} from '../logging/main_process_logging.main.js'; +} from '../logging/main_process_logging.main.ts'; describe('logging', () => { const fakeLogEntry = ({ diff --git a/ts/test-node/messages/MessageReadStatus_test.std.ts b/ts/test-node/messages/MessageReadStatus_test.std.ts index 36f3a2bd45..f154e90df7 100644 --- a/ts/test-node/messages/MessageReadStatus_test.std.ts +++ b/ts/test-node/messages/MessageReadStatus_test.std.ts @@ -6,7 +6,7 @@ import { assert } from 'chai'; import { ReadStatus, maxReadStatus, -} from '../../messages/MessageReadStatus.std.js'; +} from '../../messages/MessageReadStatus.std.ts'; describe('message read status utilities', () => { describe('maxReadStatus', () => { diff --git a/ts/test-node/messages/MessageSendState_test.std.ts b/ts/test-node/messages/MessageSendState_test.std.ts index 94f1cd2150..b083c67e09 100644 --- a/ts/test-node/messages/MessageSendState_test.std.ts +++ b/ts/test-node/messages/MessageSendState_test.std.ts @@ -9,7 +9,7 @@ import type { SendAction, SendState, SendStateByConversationId, -} from '../../messages/MessageSendState.std.js'; +} from '../../messages/MessageSendState.std.ts'; import { SendActionType, SendStatus, @@ -24,7 +24,7 @@ import { sendStateReducer, someRecipientSendStatus, someSendStatus, -} from '../../messages/MessageSendState.std.js'; +} from '../../messages/MessageSendState.std.ts'; const { sampleSize, times } = lodash; diff --git a/ts/test-node/messages/migrateLegacyReadStatus_test.std.ts b/ts/test-node/messages/migrateLegacyReadStatus_test.std.ts index 786d5642b4..b7594835b1 100644 --- a/ts/test-node/messages/migrateLegacyReadStatus_test.std.ts +++ b/ts/test-node/messages/migrateLegacyReadStatus_test.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; -import { migrateLegacyReadStatus } from '../../messages/migrateLegacyReadStatus.std.js'; +import { migrateLegacyReadStatus } from '../../messages/migrateLegacyReadStatus.std.ts'; describe('migrateLegacyReadStatus', () => { it("doesn't migrate messages that already have the modern read state", () => { diff --git a/ts/test-node/messages/migrateLegacySendAttributes_test.preload.ts b/ts/test-node/messages/migrateLegacySendAttributes_test.preload.ts index 6504560cb2..5cce03daf6 100644 --- a/ts/test-node/messages/migrateLegacySendAttributes_test.preload.ts +++ b/ts/test-node/messages/migrateLegacySendAttributes_test.preload.ts @@ -3,11 +3,11 @@ import { assert } from 'chai'; import { v4 as uuid } from 'uuid'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { SendStatus } from '../../messages/MessageSendState.std.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { SendStatus } from '../../messages/MessageSendState.std.ts'; -import { migrateLegacySendAttributes } from '../../messages/migrateLegacySendAttributes.preload.js'; +import { migrateLegacySendAttributes } from '../../messages/migrateLegacySendAttributes.preload.ts'; describe('migrateLegacySendAttributes', () => { const defaultMessage = { diff --git a/ts/test-node/processDataMessage_test.preload.ts b/ts/test-node/processDataMessage_test.preload.ts index d743a92104..dce581fbad 100644 --- a/ts/test-node/processDataMessage_test.preload.ts +++ b/ts/test-node/processDataMessage_test.preload.ts @@ -7,13 +7,13 @@ import { v4 as generateUuid } from 'uuid'; import { processDataMessage, ATTACHMENT_MAX, -} from '../textsecure/processDataMessage.preload.js'; +} from '../textsecure/processDataMessage.preload.ts'; import type { ProcessedAttachment } from '../textsecure/Types.d.ts'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { IMAGE_GIF, IMAGE_JPEG, LONG_MESSAGE } from '../types/MIME.std.js'; -import { generateAci } from '../types/ServiceId.std.js'; -import { toAciObject } from '../util/ServiceId.node.js'; -import { uuidToBytes } from '../util/uuidToBytes.std.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { IMAGE_GIF, IMAGE_JPEG, LONG_MESSAGE } from '../types/MIME.std.ts'; +import { generateAci } from '../types/ServiceId.std.ts'; +import { toAciObject } from '../util/ServiceId.node.ts'; +import { uuidToBytes } from '../util/uuidToBytes.std.ts'; const ACI_1 = generateAci(); const ACI_BINARY_1 = toAciObject(ACI_1).getRawUuidBytes(); diff --git a/ts/test-node/processSent_test.node.ts b/ts/test-node/processSent_test.node.ts index 5d42c59bb3..6619f31e76 100644 --- a/ts/test-node/processSent_test.node.ts +++ b/ts/test-node/processSent_test.node.ts @@ -3,10 +3,10 @@ import { assert } from 'chai'; import lodash from 'lodash'; -import { generateAci } from '../types/ServiceId.std.js'; +import { generateAci } from '../types/ServiceId.std.ts'; import { signalservice as Proto } from '../protobuf/compiled.std.js'; -import { processSent } from '../textsecure/processSyncMessage.node.js'; +import { processSent } from '../textsecure/processSyncMessage.node.ts'; const { omit } = lodash; diff --git a/ts/test-node/reactions/isValidReactionEmoji_test.std.ts b/ts/test-node/reactions/isValidReactionEmoji_test.std.ts index 70ad129160..aaa1a2dafe 100644 --- a/ts/test-node/reactions/isValidReactionEmoji_test.std.ts +++ b/ts/test-node/reactions/isValidReactionEmoji_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isValidReactionEmoji } from '../../reactions/isValidReactionEmoji.std.js'; +import { isValidReactionEmoji } from '../../reactions/isValidReactionEmoji.std.ts'; describe('isValidReactionEmoji', () => { it('returns false for non-strings', () => { diff --git a/ts/test-node/reactions/preferredReactionEmoji_test.std.ts b/ts/test-node/reactions/preferredReactionEmoji_test.std.ts index 7da7c24de4..f02cb243ff 100644 --- a/ts/test-node/reactions/preferredReactionEmoji_test.std.ts +++ b/ts/test-node/reactions/preferredReactionEmoji_test.std.ts @@ -6,8 +6,8 @@ import { assert } from 'chai'; import { canBeSynced, getPreferredReactionEmoji, -} from '../../reactions/preferredReactionEmoji.std.js'; -import { EmojiSkinTone } from '../../components/fun/data/emojis.std.js'; +} from '../../reactions/preferredReactionEmoji.std.ts'; +import { EmojiSkinTone } from '../../components/fun/data/emojis.std.ts'; describe('preferred reaction emoji utilities', () => { describe('getPreferredReactionEmoji', () => { diff --git a/ts/test-node/reactions/util_test.std.ts b/ts/test-node/reactions/util_test.std.ts index 96ff5f48ac..9dfb8f8b30 100644 --- a/ts/test-node/reactions/util_test.std.ts +++ b/ts/test-node/reactions/util_test.std.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import { v4 as uuid } from 'uuid'; import lodash from 'lodash'; import type { MessageReactionType } from '../../model-types.d.ts'; -import { isEmpty } from '../../util/iterables.std.js'; +import { isEmpty } from '../../util/iterables.std.ts'; import { addOutgoingReaction, @@ -13,7 +13,7 @@ import { getUnsentConversationIds, markOutgoingReactionFailed, markOutgoingReactionSent, -} from '../../reactions/util.std.js'; +} from '../../reactions/util.std.ts'; const { omit } = lodash; diff --git a/ts/test-node/services/backups/localBackup_test.node.ts b/ts/test-node/services/backups/localBackup_test.node.ts index 7d82ee7eaa..bb75b2107d 100644 --- a/ts/test-node/services/backups/localBackup_test.node.ts +++ b/ts/test-node/services/backups/localBackup_test.node.ts @@ -12,7 +12,7 @@ import { getLocalBackupPathForMediaName, pruneLocalBackups, writeLocalBackupFilesList, -} from '../../../services/backups/util/localBackup.node.js'; +} from '../../../services/backups/util/localBackup.node.ts'; async function createSnapshot({ backupsBaseDir, diff --git a/ts/test-node/services/donations_test.preload.ts b/ts/test-node/services/donations_test.preload.ts index 59f20133ae..be9aa3d5dd 100644 --- a/ts/test-node/services/donations_test.preload.ts +++ b/ts/test-node/services/donations_test.preload.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { phoneNumberToCurrencyCode } from '../../services/donations.preload.js'; +import { phoneNumberToCurrencyCode } from '../../services/donations.preload.ts'; describe('donations', () => { describe('phoneNumberToCurrency', () => { diff --git a/ts/test-node/services/expiring/createExpiringEntityCleanupService_test.node.ts b/ts/test-node/services/expiring/createExpiringEntityCleanupService_test.node.ts index dd58a0ee0c..2fd32580a8 100644 --- a/ts/test-node/services/expiring/createExpiringEntityCleanupService_test.node.ts +++ b/ts/test-node/services/expiring/createExpiringEntityCleanupService_test.node.ts @@ -4,8 +4,8 @@ import assert from 'node:assert/strict'; import type { ExpiringEntity, ExpiringEntityCleanupService, -} from '../../../services/expiring/createExpiringEntityCleanupService.std.js'; -import { createExpiringEntityCleanupService } from '../../../services/expiring/createExpiringEntityCleanupService.std.js'; +} from '../../../services/expiring/createExpiringEntityCleanupService.std.ts'; +import { createExpiringEntityCleanupService } from '../../../services/expiring/createExpiringEntityCleanupService.std.ts'; function waitForMicrotasks() { return new Promise(resolve => { diff --git a/ts/test-node/services/megaphone_test.preload.ts b/ts/test-node/services/megaphone_test.preload.ts index c84e3b850a..46fb3dd733 100644 --- a/ts/test-node/services/megaphone_test.preload.ts +++ b/ts/test-node/services/megaphone_test.preload.ts @@ -9,16 +9,16 @@ import { isMegaphoneCtaIdValid, isMegaphoneDeletable, isMegaphoneShowable, -} from '../../services/megaphone.preload.js'; -import { DAY } from '../../util/durations/index.std.js'; +} from '../../services/megaphone.preload.ts'; +import { DAY } from '../../util/durations/index.std.ts'; import type { RemoteMegaphoneId, RemoteMegaphoneType, -} from '../../types/Megaphone.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import type { ConversationController } from '../../ConversationController.preload.js'; -import type { ConversationModel } from '../../models/conversations.preload.js'; +} from '../../types/Megaphone.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import type { ConversationController } from '../../ConversationController.preload.ts'; +import type { ConversationModel } from '../../models/conversations.preload.ts'; const FAKE_MEGAPHONE: RemoteMegaphoneType = { id: uuid() as RemoteMegaphoneId, diff --git a/ts/test-node/services/ourProfileKey_test.node.ts b/ts/test-node/services/ourProfileKey_test.node.ts index d5ac5f5476..f695c49b8b 100644 --- a/ts/test-node/services/ourProfileKey_test.node.ts +++ b/ts/test-node/services/ourProfileKey_test.node.ts @@ -4,10 +4,10 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import lodash from 'lodash'; -import { sleep } from '../../util/sleep.std.js'; +import { sleep } from '../../util/sleep.std.ts'; -import { constantTimeEqual } from '../../Crypto.node.js'; -import { OurProfileKeyService } from '../../services/ourProfileKey.std.js'; +import { constantTimeEqual } from '../../Crypto.node.ts'; +import { OurProfileKeyService } from '../../services/ourProfileKey.std.ts'; const { noop } = lodash; diff --git a/ts/test-node/services/retryPlaceholders_test.std.ts b/ts/test-node/services/retryPlaceholders_test.std.ts index a521a9ec07..88dbc0c08b 100644 --- a/ts/test-node/services/retryPlaceholders_test.std.ts +++ b/ts/test-node/services/retryPlaceholders_test.std.ts @@ -4,13 +4,13 @@ import { assert } from 'chai'; import sinon from 'sinon'; -import { generateAci } from '../../types/ServiceId.std.js'; -import type { RetryItemType } from '../../services/retryPlaceholders.std.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import type { RetryItemType } from '../../services/retryPlaceholders.std.ts'; import { getDeltaIntoPast, RetryPlaceholders, STORAGE_KEY, -} from '../../services/retryPlaceholders.std.js'; +} from '../../services/retryPlaceholders.std.ts'; describe('RetryPlaceholders', () => { const NOW = 1_000_000; diff --git a/ts/test-node/setup.preload.ts b/ts/test-node/setup.preload.ts new file mode 100644 index 0000000000..4b085d5527 --- /dev/null +++ b/ts/test-node/setup.preload.ts @@ -0,0 +1,39 @@ +// Copyright 2021 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; + +import type { SignalContextType } from '../windows/context.preload.ts'; +import { Crypto } from '../context/Crypto.node.ts'; +import { setEnvironment, Environment } from '../environment.std.ts'; +import { HourCyclePreference } from '../types/I18N.std.ts'; +import { packageJson } from '../util/packageJson.node.ts'; + +chai.use(chaiAsPromised); + +setEnvironment(Environment.Test, true); + +// To replicate logic we have on the client side +global.window = { + Date, + performance, + SignalContext: { + i18n: (key: string) => `i18n(${key})`, + getPath: () => '/tmp', + getVersion: () => packageJson.version, + config: { + serverUrl: 'https://127.0.0.1:9', + storageUrl: 'https://127.0.0.1:9', + updatesUrl: 'https://127.0.0.1:9', + resourcesUrl: 'https://127.0.0.1:9', + version: packageJson.version, + }, + crypto: new Crypto(), + getResolvedMessagesLocale: () => 'en', + getResolvedMessagesLocaleDirection: () => 'ltr', + getHourCyclePreference: () => HourCyclePreference.UnknownPreference, + getPreferredSystemLocales: () => ['en'], + getLocaleOverride: () => null, + } as unknown as SignalContextType, +} as unknown as typeof window; diff --git a/ts/test-node/sql/cleanDataForIpc_test.std.ts b/ts/test-node/sql/cleanDataForIpc_test.std.ts index 6872e663e6..dd237d97b4 100644 --- a/ts/test-node/sql/cleanDataForIpc_test.std.ts +++ b/ts/test-node/sql/cleanDataForIpc_test.std.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import lodash from 'lodash'; -import { cleanDataForIpc } from '../../sql/cleanDataForIpc.std.js'; +import { cleanDataForIpc } from '../../sql/cleanDataForIpc.std.ts'; const { noop } = lodash; diff --git a/ts/test-node/sql/cleanMessageData_test.preload.ts b/ts/test-node/sql/cleanMessageData_test.preload.ts index 234db6f96f..ddbece1b4e 100644 --- a/ts/test-node/sql/cleanMessageData_test.preload.ts +++ b/ts/test-node/sql/cleanMessageData_test.preload.ts @@ -3,8 +3,8 @@ import { assert } from 'chai'; -import { _cleanMessageData } from '../../sql/Client.preload.js'; -import { IMAGE_GIF } from '../../types/MIME.std.js'; +import { _cleanMessageData } from '../../sql/Client.preload.ts'; +import { IMAGE_GIF } from '../../types/MIME.std.ts'; describe('_cleanMessageData', () => { it('throws if message is missing received_at', () => { diff --git a/ts/test-node/sql/helpers.node.ts b/ts/test-node/sql/helpers.node.ts index 8b40bb9bea..1d9bb94a91 100644 --- a/ts/test-node/sql/helpers.node.ts +++ b/ts/test-node/sql/helpers.node.ts @@ -4,10 +4,10 @@ import lodash from 'lodash'; import SQL from '@signalapp/sqlcipher'; -import type { ReadableDB, WritableDB } from '../../sql/Interface.std.js'; -import type { QueryTemplate } from '../../sql/util.std.js'; -import { SCHEMA_VERSIONS } from '../../sql/migrations/index.node.js'; -import { consoleLogger } from '../../util/consoleLogger.std.js'; +import type { ReadableDB, WritableDB } from '../../sql/Interface.std.ts'; +import type { QueryTemplate } from '../../sql/util.std.ts'; +import { SCHEMA_VERSIONS } from '../../sql/migrations/index.node.ts'; +import { consoleLogger } from '../../util/consoleLogger.std.ts'; const { noop } = lodash; diff --git a/ts/test-node/sql/incrementMessagesMigrationAttempts_test.node.ts b/ts/test-node/sql/incrementMessagesMigrationAttempts_test.node.ts index 75da131285..53745ff7d4 100644 --- a/ts/test-node/sql/incrementMessagesMigrationAttempts_test.node.ts +++ b/ts/test-node/sql/incrementMessagesMigrationAttempts_test.node.ts @@ -3,12 +3,12 @@ import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { incrementMessagesMigrationAttempts, setupTests, -} from '../../sql/Server.node.js'; -import { createDB, insertData, getTableData } from './helpers.node.js'; +} from '../../sql/Server.node.ts'; +import { createDB, insertData, getTableData } from './helpers.node.ts'; describe('SQL/incrementMessagesMigrationAttempts', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migrateConversationMessages_test.node.ts b/ts/test-node/sql/migrateConversationMessages_test.node.ts index 2d346b2a44..308c50e50d 100644 --- a/ts/test-node/sql/migrateConversationMessages_test.node.ts +++ b/ts/test-node/sql/migrateConversationMessages_test.node.ts @@ -3,12 +3,12 @@ import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { migrateConversationMessages, setupTests, -} from '../../sql/Server.node.js'; -import { createDB, insertData, getTableData } from './helpers.node.js'; +} from '../../sql/Server.node.ts'; +import { createDB, insertData, getTableData } from './helpers.node.ts'; describe('SQL/migrateConversationMessages', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1000_test.node.ts b/ts/test-node/sql/migration_1000_test.node.ts index a741c3386b..a19d3355a4 100644 --- a/ts/test-node/sql/migration_1000_test.node.ts +++ b/ts/test-node/sql/migration_1000_test.node.ts @@ -4,11 +4,11 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; -import { jsonToObject, sql } from '../../sql/util.std.js'; -import { createDB, updateToVersion } from './helpers.node.js'; -import type { WritableDB, MessageType } from '../../sql/Interface.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; +import { jsonToObject, sql } from '../../sql/util.std.ts'; +import { createDB, updateToVersion } from './helpers.node.ts'; +import type { WritableDB, MessageType } from '../../sql/Interface.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; describe('SQL/updateToSchemaVersion1000', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1020_test.node.ts b/ts/test-node/sql/migration_1020_test.node.ts index 430a23ac53..ce5a00e807 100644 --- a/ts/test-node/sql/migration_1020_test.node.ts +++ b/ts/test-node/sql/migration_1020_test.node.ts @@ -4,14 +4,14 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { createDB, insertData, getTableData, updateToVersion, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1020', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1030_test.node.ts b/ts/test-node/sql/migration_1030_test.node.ts index fdaffb33b1..a275daef73 100644 --- a/ts/test-node/sql/migration_1030_test.node.ts +++ b/ts/test-node/sql/migration_1030_test.node.ts @@ -3,10 +3,10 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; -import { sql } from '../../sql/util.std.js'; -import { createDB, updateToVersion } from './helpers.node.js'; -import type { WritableDB, MessageType } from '../../sql/Interface.std.js'; -import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.js'; +import { sql } from '../../sql/util.std.ts'; +import { createDB, updateToVersion } from './helpers.node.ts'; +import type { WritableDB, MessageType } from '../../sql/Interface.std.ts'; +import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.ts'; describe('SQL/updateToSchemaVersion1030', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1040_test.node.ts b/ts/test-node/sql/migration_1040_test.node.ts index 3250a43578..47adfbbdc4 100644 --- a/ts/test-node/sql/migration_1040_test.node.ts +++ b/ts/test-node/sql/migration_1040_test.node.ts @@ -3,20 +3,20 @@ import lodash from 'lodash'; import { assert } from 'chai'; -import type { ReadableDB, WritableDB } from '../../sql/Interface.std.js'; +import type { ReadableDB, WritableDB } from '../../sql/Interface.std.ts'; import { jsonToObject, objectToJSON, sql, sqlJoin, -} from '../../sql/util.std.js'; -import { createDB, updateToVersion, explain } from './helpers.node.js'; +} from '../../sql/util.std.ts'; +import { createDB, updateToVersion, explain } from './helpers.node.ts'; import type { _AttachmentDownloadJobTypeV1030, _AttachmentDownloadJobTypeV1040, -} from '../../sql/migrations/1040-undownloaded-backed-up-media.std.js'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import { IMAGE_JPEG } from '../../types/MIME.std.js'; +} from '../../sql/migrations/1040-undownloaded-backed-up-media.std.ts'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import { IMAGE_JPEG } from '../../types/MIME.std.ts'; const { omit } = lodash; diff --git a/ts/test-node/sql/migration_1060_test.node.ts b/ts/test-node/sql/migration_1060_test.node.ts index ff480ec0fa..37ddbb6e6b 100644 --- a/ts/test-node/sql/migration_1060_test.node.ts +++ b/ts/test-node/sql/migration_1060_test.node.ts @@ -8,24 +8,24 @@ import { dequeueOldestSyncTasks, removeSyncTaskById, saveSyncTasks, -} from '../../sql/Server.node.js'; +} from '../../sql/Server.node.ts'; import type { WritableDB, ReadableDB, MessageType, -} from '../../sql/Interface.std.js'; -import { sql, jsonToObject } from '../../sql/util.std.js'; +} from '../../sql/Interface.std.ts'; +import { sql, jsonToObject } from '../../sql/util.std.ts'; import { insertData, updateToVersion, createDB, explain, -} from './helpers.node.js'; -import { MAX_SYNC_TASK_ATTEMPTS } from '../../util/syncTasks.types.std.js'; -import { WEEK } from '../../util/durations/index.std.js'; +} from './helpers.node.ts'; +import { MAX_SYNC_TASK_ATTEMPTS } from '../../util/syncTasks.types.std.ts'; +import { WEEK } from '../../util/durations/index.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import type { SyncTaskType } from '../../util/syncTasks.preload.js'; +import type { SyncTaskType } from '../../util/syncTasks.preload.ts'; // Snapshot before: 1270 export function getMostRecentAddressableMessages( diff --git a/ts/test-node/sql/migration_1080_test.node.ts b/ts/test-node/sql/migration_1080_test.node.ts index 82fe078c1b..7c81f6132f 100644 --- a/ts/test-node/sql/migration_1080_test.node.ts +++ b/ts/test-node/sql/migration_1080_test.node.ts @@ -8,17 +8,17 @@ import type { WritableDB, ReadableDB, MessageType, -} from '../../sql/Interface.std.js'; -import { sql, jsonToObject } from '../../sql/util.std.js'; +} from '../../sql/Interface.std.ts'; +import { sql, jsonToObject } from '../../sql/util.std.ts'; import { createDB, insertData, updateToVersion, explain, -} from './helpers.node.js'; +} from './helpers.node.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.js'; +import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.ts'; function generateMessage(json: MessageAttributesType) { const { conversationId, expireTimer, received_at, sent_at, type } = json; diff --git a/ts/test-node/sql/migration_1090_test.node.ts b/ts/test-node/sql/migration_1090_test.node.ts index 05f4ba7601..a6d23759d7 100644 --- a/ts/test-node/sql/migration_1090_test.node.ts +++ b/ts/test-node/sql/migration_1090_test.node.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { sql } from '../../sql/util.std.js'; -import { createDB, updateToVersion, explain } from './helpers.node.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { sql } from '../../sql/util.std.ts'; +import { createDB, updateToVersion, explain } from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1090', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1100_test.node.ts b/ts/test-node/sql/migration_1100_test.node.ts index 3b83da02ce..a6b9624c9e 100644 --- a/ts/test-node/sql/migration_1100_test.node.ts +++ b/ts/test-node/sql/migration_1100_test.node.ts @@ -3,17 +3,17 @@ import { assert } from 'chai'; import lodash from 'lodash'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { markAllCallHistoryRead } from '../../sql/Server.node.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { markAllCallHistoryRead } from '../../sql/Server.node.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; import { CallMode, CallDirection, CallType, DirectCallStatus, -} from '../../types/CallDisposition.std.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { createDB, insertData, updateToVersion } from './helpers.node.js'; +} from '../../types/CallDisposition.std.ts'; +import { strictAssert } from '../../util/assert.std.ts'; +import { createDB, insertData, updateToVersion } from './helpers.node.ts'; const { findLast } = lodash; diff --git a/ts/test-node/sql/migration_1120_test.node.ts b/ts/test-node/sql/migration_1120_test.node.ts index 07d7aca8e7..cf7f058bed 100644 --- a/ts/test-node/sql/migration_1120_test.node.ts +++ b/ts/test-node/sql/migration_1120_test.node.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { sql } from '../../sql/util.std.js'; -import { createDB, updateToVersion, explain } from './helpers.node.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { sql } from '../../sql/util.std.ts'; +import { createDB, updateToVersion, explain } from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1120', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1130_test.node.ts b/ts/test-node/sql/migration_1130_test.node.ts index 806685bfe9..e42c12f36f 100644 --- a/ts/test-node/sql/migration_1130_test.node.ts +++ b/ts/test-node/sql/migration_1130_test.node.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { sql } from '../../sql/util.std.js'; -import { createDB, updateToVersion, explain } from './helpers.node.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { sql } from '../../sql/util.std.ts'; +import { createDB, updateToVersion, explain } from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1130', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1180_test.node.ts b/ts/test-node/sql/migration_1180_test.node.ts index 62ab331016..68d0618475 100644 --- a/ts/test-node/sql/migration_1180_test.node.ts +++ b/ts/test-node/sql/migration_1180_test.node.ts @@ -3,11 +3,11 @@ import { assert } from 'chai'; import lodash from 'lodash'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { createDB, updateToVersion, explain } from './helpers.node.js'; -import { jsonToObject, objectToJSON, sql } from '../../sql/util.std.js'; -import { IMAGE_BMP } from '../../types/MIME.std.js'; -import type { _AttachmentDownloadJobTypeV1040 } from '../../sql/migrations/1040-undownloaded-backed-up-media.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { createDB, updateToVersion, explain } from './helpers.node.ts'; +import { jsonToObject, objectToJSON, sql } from '../../sql/util.std.ts'; +import { IMAGE_BMP } from '../../types/MIME.std.ts'; +import type { _AttachmentDownloadJobTypeV1040 } from '../../sql/migrations/1040-undownloaded-backed-up-media.std.ts'; const { omit } = lodash; diff --git a/ts/test-node/sql/migration_1200_test.node.ts b/ts/test-node/sql/migration_1200_test.node.ts index f5dbac0819..50d0601d23 100644 --- a/ts/test-node/sql/migration_1200_test.node.ts +++ b/ts/test-node/sql/migration_1200_test.node.ts @@ -6,11 +6,11 @@ import { assert } from 'chai'; import { AttachmentDownloadSource, type WritableDB, -} from '../../sql/Interface.std.js'; -import { objectToJSON, sql } from '../../sql/util.std.js'; -import { createDB, updateToVersion, explain } from './helpers.node.js'; -import { IMAGE_JPEG } from '../../types/MIME.std.js'; -import type { _AttachmentDownloadJobTypeV1040 } from '../../sql/migrations/1040-undownloaded-backed-up-media.std.js'; +} from '../../sql/Interface.std.ts'; +import { objectToJSON, sql } from '../../sql/util.std.ts'; +import { createDB, updateToVersion, explain } from './helpers.node.ts'; +import { IMAGE_JPEG } from '../../types/MIME.std.ts'; +import type { _AttachmentDownloadJobTypeV1040 } from '../../sql/migrations/1040-undownloaded-backed-up-media.std.ts'; type UnflattenedAttachmentDownloadJobType = Omit< _AttachmentDownloadJobTypeV1040, diff --git a/ts/test-node/sql/migration_1220_test.node.ts b/ts/test-node/sql/migration_1220_test.node.ts index da78956a81..8b1c1461e5 100644 --- a/ts/test-node/sql/migration_1220_test.node.ts +++ b/ts/test-node/sql/migration_1220_test.node.ts @@ -3,18 +3,18 @@ import { assert } from 'chai'; -import { type WritableDB } from '../../sql/Interface.std.js'; +import { type WritableDB } from '../../sql/Interface.std.ts'; import { sessionRecordToProtobuf, sessionStructureToBytes, -} from '../../util/sessionTranslation.node.js'; +} from '../../util/sessionTranslation.node.ts'; import { createDB, updateToVersion, insertData, getTableData, -} from './helpers.node.js'; -import { SESSION_V1_RECORD } from '../util/sessionTranslation_test.node.js'; +} from './helpers.node.ts'; +import { SESSION_V1_RECORD } from '../util/sessionTranslation_test.node.ts'; const MAPS = [ { diff --git a/ts/test-node/sql/migration_1280_test.node.ts b/ts/test-node/sql/migration_1280_test.node.ts index 00490194b3..7756c43fd4 100644 --- a/ts/test-node/sql/migration_1280_test.node.ts +++ b/ts/test-node/sql/migration_1280_test.node.ts @@ -3,15 +3,15 @@ import { assert } from 'chai'; -import { type WritableDB } from '../../sql/Interface.std.js'; -import { Migrations as Proto } from '../../protobuf/index.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { type WritableDB } from '../../sql/Interface.std.ts'; +import { Migrations as Proto } from '../../protobuf/index.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; import { createDB, updateToVersion, insertData, getTableData, -} from './helpers.node.js'; +} from './helpers.node.ts'; const EMPTY_ENVELOPE: Proto.Envelope.Params = { content: null, diff --git a/ts/test-node/sql/migration_1290_test.node.ts b/ts/test-node/sql/migration_1290_test.node.ts index 13627772dc..0db3feb5fc 100644 --- a/ts/test-node/sql/migration_1290_test.node.ts +++ b/ts/test-node/sql/migration_1290_test.node.ts @@ -3,13 +3,13 @@ import { assert } from 'chai'; -import { type WritableDB } from '../../sql/Interface.std.js'; +import { type WritableDB } from '../../sql/Interface.std.ts'; import { createDB, updateToVersion, insertData, getTableData, -} from './helpers.node.js'; +} from './helpers.node.ts'; const DEFAULTS = { id: 'id', diff --git a/ts/test-node/sql/migration_1310_test.node.ts b/ts/test-node/sql/migration_1310_test.node.ts index bfc3dad7b3..2eb1f0605c 100644 --- a/ts/test-node/sql/migration_1310_test.node.ts +++ b/ts/test-node/sql/migration_1310_test.node.ts @@ -3,13 +3,13 @@ import { assert } from 'chai'; -import { type WritableDB } from '../../sql/Interface.std.js'; +import { type WritableDB } from '../../sql/Interface.std.ts'; import { createDB, updateToVersion, insertData, getTableData, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1310', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1330_test.node.ts b/ts/test-node/sql/migration_1330_test.node.ts index 7f995b038b..ee824fca37 100644 --- a/ts/test-node/sql/migration_1330_test.node.ts +++ b/ts/test-node/sql/migration_1330_test.node.ts @@ -8,12 +8,12 @@ import { dequeueOldestSyncTasks, saveSyncTasks, incrementAllSyncTaskAttempts, -} from '../../sql/Server.node.js'; -import { sql } from '../../sql/util.std.js'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { updateToVersion, createDB, explain } from './helpers.node.js'; +} from '../../sql/Server.node.ts'; +import { sql } from '../../sql/util.std.ts'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { updateToVersion, createDB, explain } from './helpers.node.ts'; -import type { SyncTaskType } from '../../util/syncTasks.preload.js'; +import type { SyncTaskType } from '../../util/syncTasks.preload.ts'; describe('SQL/updateToSchemaVersion1330', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1350_test.node.ts b/ts/test-node/sql/migration_1350_test.node.ts index 4f96fa2e7e..5a82d1d76a 100644 --- a/ts/test-node/sql/migration_1350_test.node.ts +++ b/ts/test-node/sql/migration_1350_test.node.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { sql } from '../../sql/util.std.js'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { updateToVersion, createDB } from './helpers.node.js'; +import { sql } from '../../sql/util.std.ts'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { updateToVersion, createDB } from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1350', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1360_test.node.ts b/ts/test-node/sql/migration_1360_test.node.ts index 541db0b677..720741b5ba 100644 --- a/ts/test-node/sql/migration_1360_test.node.ts +++ b/ts/test-node/sql/migration_1360_test.node.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; -import { sql } from '../../sql/util.std.js'; -import { createDB, explain, updateToVersion } from './helpers.node.js'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import { sql } from '../../sql/util.std.ts'; +import { createDB, explain, updateToVersion } from './helpers.node.ts'; +import type { WritableDB } from '../../sql/Interface.std.ts'; describe('SQL/updateToSchemaVersion1360', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1380_test.node.ts b/ts/test-node/sql/migration_1380_test.node.ts index 1356823792..0e0f99e930 100644 --- a/ts/test-node/sql/migration_1380_test.node.ts +++ b/ts/test-node/sql/migration_1380_test.node.ts @@ -4,16 +4,16 @@ import { assert } from 'chai'; import { v1 as getGuid } from 'uuid'; -import { sql } from '../../sql/util.std.js'; +import { sql } from '../../sql/util.std.ts'; import { updateToVersion, createDB, explain, insertData, getTableData, -} from './helpers.node.js'; +} from './helpers.node.ts'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; describe('SQL/updateToSchemaVersion1380', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1410_test.node.ts b/ts/test-node/sql/migration_1410_test.node.ts index 07e343bf7a..371ea6377e 100644 --- a/ts/test-node/sql/migration_1410_test.node.ts +++ b/ts/test-node/sql/migration_1410_test.node.ts @@ -3,14 +3,14 @@ import { assert } from 'chai'; -import { type WritableDB } from '../../sql/Interface.std.js'; +import { type WritableDB } from '../../sql/Interface.std.ts'; import { createDB, updateToVersion, insertData, getTableData, -} from './helpers.node.js'; -import { createOrUpdate, getById } from '../../sql/util.std.js'; +} from './helpers.node.ts'; +import { createOrUpdate, getById } from '../../sql/util.std.ts'; describe('SQL/updateToSchemaVersion1410', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1420_test.node.ts b/ts/test-node/sql/migration_1420_test.node.ts index 0682fcfe7f..03edc4d101 100644 --- a/ts/test-node/sql/migration_1420_test.node.ts +++ b/ts/test-node/sql/migration_1420_test.node.ts @@ -6,11 +6,11 @@ import { assert } from 'chai'; import { AttachmentDownloadSource, type WritableDB, -} from '../../sql/Interface.std.js'; -import { objectToJSON, sql } from '../../sql/util.std.js'; -import { createDB, updateToVersion } from './helpers.node.js'; -import type { AttachmentDownloadJobType } from '../../types/AttachmentDownload.std.js'; -import { createAttachmentDownloadJob } from '../../test-helpers/attachmentDownloads.std.js'; +} from '../../sql/Interface.std.ts'; +import { objectToJSON, sql } from '../../sql/util.std.ts'; +import { createDB, updateToVersion } from './helpers.node.ts'; +import type { AttachmentDownloadJobType } from '../../types/AttachmentDownload.std.ts'; +import { createAttachmentDownloadJob } from '../../test-helpers/attachmentDownloads.std.ts'; function createJobAndEnsureMessage( db: WritableDB, diff --git a/ts/test-node/sql/migration_1520_test.node.ts b/ts/test-node/sql/migration_1520_test.node.ts index bab54bf881..3e9eae63c7 100644 --- a/ts/test-node/sql/migration_1520_test.node.ts +++ b/ts/test-node/sql/migration_1520_test.node.ts @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { sql } from '../../sql/util.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { sql } from '../../sql/util.std.ts'; import { createDB, updateToVersion, insertData, explain, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1520', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1540_test.node.ts b/ts/test-node/sql/migration_1540_test.node.ts index e7067d13a6..5301a70ead 100644 --- a/ts/test-node/sql/migration_1540_test.node.ts +++ b/ts/test-node/sql/migration_1540_test.node.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { type WritableDB } from '../../sql/Interface.std.js'; -import { sql, sqlFragment } from '../../sql/util.std.js'; -import { createDB, explain, updateToVersion } from './helpers.node.js'; +import { type WritableDB } from '../../sql/Interface.std.ts'; +import { sql, sqlFragment } from '../../sql/util.std.ts'; +import { createDB, explain, updateToVersion } from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1540', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1561_test.node.ts b/ts/test-node/sql/migration_1561_test.node.ts index 8661dc1ac4..295e78a3ac 100644 --- a/ts/test-node/sql/migration_1561_test.node.ts +++ b/ts/test-node/sql/migration_1561_test.node.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { type WritableDB } from '../../sql/Interface.std.js'; +import { type WritableDB } from '../../sql/Interface.std.ts'; import { createDB, getTableData, insertData, updateToVersion, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1561', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1580_test.node.ts b/ts/test-node/sql/migration_1580_test.node.ts index 63dddab2c7..50be9a22c1 100644 --- a/ts/test-node/sql/migration_1580_test.node.ts +++ b/ts/test-node/sql/migration_1580_test.node.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { type WritableDB } from '../../sql/Interface.std.js'; +import { type WritableDB } from '../../sql/Interface.std.ts'; import { createDB, getTableData, insertData, updateToVersion, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1580', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1600_test.node.ts b/ts/test-node/sql/migration_1600_test.node.ts index 13f425f16c..6add1c4cf1 100644 --- a/ts/test-node/sql/migration_1600_test.node.ts +++ b/ts/test-node/sql/migration_1600_test.node.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { type WritableDB } from '../../sql/Interface.std.js'; +import { type WritableDB } from '../../sql/Interface.std.ts'; import { createDB, getTableData, insertData, updateToVersion, -} from './helpers.node.js'; +} from './helpers.node.ts'; type ConversationRow = { id: string; diff --git a/ts/test-node/sql/migration_1630_test.node.ts b/ts/test-node/sql/migration_1630_test.node.ts index 7be5205e0f..e5a5a61557 100644 --- a/ts/test-node/sql/migration_1630_test.node.ts +++ b/ts/test-node/sql/migration_1630_test.node.ts @@ -3,13 +3,13 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { createDB, getTableData, insertData, updateToVersion, -} from './helpers.node.js'; +} from './helpers.node.ts'; type MessageRow = Readonly<{ type: 'incoming' | 'pinned-message-notification'; diff --git a/ts/test-node/sql/migration_1650_test.node.ts b/ts/test-node/sql/migration_1650_test.node.ts index c286895f9f..14614d8139 100644 --- a/ts/test-node/sql/migration_1650_test.node.ts +++ b/ts/test-node/sql/migration_1650_test.node.ts @@ -3,15 +3,15 @@ import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { createDB, explain, getTableData, insertData, updateToVersion, -} from './helpers.node.js'; -import { sql } from '../../sql/util.std.js'; +} from './helpers.node.ts'; +import { sql } from '../../sql/util.std.ts'; describe('SQL/updateToSchemaVersion1650', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1660_test.node.ts b/ts/test-node/sql/migration_1660_test.node.ts index 441658450c..62c5ae6094 100644 --- a/ts/test-node/sql/migration_1660_test.node.ts +++ b/ts/test-node/sql/migration_1660_test.node.ts @@ -3,13 +3,13 @@ import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { createDB, getTableData, insertData, updateToVersion, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1660', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1680_test.node.ts b/ts/test-node/sql/migration_1680_test.node.ts index f4bf11717e..7205e00ae8 100644 --- a/ts/test-node/sql/migration_1680_test.node.ts +++ b/ts/test-node/sql/migration_1680_test.node.ts @@ -3,13 +3,13 @@ import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { createDB, getTableData, insertData, updateToVersion, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1680', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_1690_test.node.ts b/ts/test-node/sql/migration_1690_test.node.ts index fd4f788512..c585e4d94f 100644 --- a/ts/test-node/sql/migration_1690_test.node.ts +++ b/ts/test-node/sql/migration_1690_test.node.ts @@ -3,13 +3,13 @@ import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { createDB, getTableData, insertData, updateToVersion, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion1690', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_87_test.node.ts b/ts/test-node/sql/migration_87_test.node.ts index 754a7df32d..c28873bff7 100644 --- a/ts/test-node/sql/migration_87_test.node.ts +++ b/ts/test-node/sql/migration_87_test.node.ts @@ -5,20 +5,20 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; import lodash from 'lodash'; -import { createDB, insertData, updateToVersion } from './helpers.node.js'; +import { createDB, insertData, updateToVersion } from './helpers.node.ts'; import type { AciString, PniString, ServiceIdString, -} from '../../types/ServiceId.std.js'; -import { normalizePni } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; +} from '../../types/ServiceId.std.ts'; +import { normalizePni } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; import type { WritableDB, KyberPreKeyType, PreKeyType, SignedPreKeyType, -} from '../../sql/Interface.std.js'; +} from '../../sql/Interface.std.ts'; const { range } = lodash; diff --git a/ts/test-node/sql/migration_88_test.node.ts b/ts/test-node/sql/migration_88_test.node.ts index 3d61f491f1..4fb26ed5b5 100644 --- a/ts/test-node/sql/migration_88_test.node.ts +++ b/ts/test-node/sql/migration_88_test.node.ts @@ -4,13 +4,13 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { createDB, updateToVersion, insertData, getTableData, -} from './helpers.node.js'; +} from './helpers.node.ts'; const CONVO_ID = generateGuid(); const GROUP_ID = generateGuid(); diff --git a/ts/test-node/sql/migration_89_test.preload.ts b/ts/test-node/sql/migration_89_test.preload.ts index 2abb347b48..6e6031393e 100644 --- a/ts/test-node/sql/migration_89_test.preload.ts +++ b/ts/test-node/sql/migration_89_test.preload.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; -import { jsonToObject, sql } from '../../sql/util.std.js'; +import { jsonToObject, sql } from '../../sql/util.std.ts'; import { CallMode, CallDirection, @@ -12,17 +12,17 @@ import { DirectCallStatus, GroupCallStatus, callHistoryDetailsSchema, -} from '../../types/CallDisposition.std.js'; -import type { CallHistoryDetails } from '../../types/CallDisposition.std.js'; +} from '../../types/CallDisposition.std.ts'; +import type { CallHistoryDetails } from '../../types/CallDisposition.std.ts'; import type { CallHistoryDetailsFromDiskType, MessageWithCallHistoryDetails, -} from '../../sql/migrations/89-call-history.node.js'; -import { getCallIdFromEra } from '../../util/callDisposition.preload.js'; -import { isValidUuid } from '../../util/isValidUuid.std.js'; -import { createDB, updateToVersion } from './helpers.node.js'; -import type { WritableDB, MessageType } from '../../sql/Interface.std.js'; -import { parsePartial } from '../../util/schemas.std.js'; +} from '../../sql/migrations/89-call-history.node.ts'; +import { getCallIdFromEra } from '../../util/callDisposition.preload.ts'; +import { isValidUuid } from '../../util/isValidUuid.std.ts'; +import { createDB, updateToVersion } from './helpers.node.ts'; +import type { WritableDB, MessageType } from '../../sql/Interface.std.ts'; +import { parsePartial } from '../../util/schemas.std.ts'; describe('SQL/updateToSchemaVersion89', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_90_test.node.ts b/ts/test-node/sql/migration_90_test.node.ts index ff4c2d80ae..16b69c987b 100644 --- a/ts/test-node/sql/migration_90_test.node.ts +++ b/ts/test-node/sql/migration_90_test.node.ts @@ -3,15 +3,15 @@ import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { sql } from '../../sql/util.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { sql } from '../../sql/util.std.ts'; import { createDB, updateToVersion, insertData, getTableData, explain, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion90', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migration_91_test.node.ts b/ts/test-node/sql/migration_91_test.node.ts index 3f5cd977ee..4637e96e63 100644 --- a/ts/test-node/sql/migration_91_test.node.ts +++ b/ts/test-node/sql/migration_91_test.node.ts @@ -10,11 +10,11 @@ import { getTableData, insertData, updateToVersion, -} from './helpers.node.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { normalizePni } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; -import type { WritableDB, PreKeyType } from '../../sql/Interface.std.js'; +} from './helpers.node.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { normalizePni } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; +import type { WritableDB, PreKeyType } from '../../sql/Interface.std.ts'; const { range } = lodash; diff --git a/ts/test-node/sql/migration_920_test.node.ts b/ts/test-node/sql/migration_920_test.node.ts index ab48ab8ea6..010062d378 100644 --- a/ts/test-node/sql/migration_920_test.node.ts +++ b/ts/test-node/sql/migration_920_test.node.ts @@ -5,15 +5,15 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; import lodash from 'lodash'; -import { createDB, insertData, updateToVersion } from './helpers.node.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { normalizePni } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; +import { createDB, insertData, updateToVersion } from './helpers.node.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { normalizePni } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; import type { WritableDB, KyberPreKeyType, SignedPreKeyType, -} from '../../sql/Interface.std.js'; +} from '../../sql/Interface.std.ts'; const { range } = lodash; diff --git a/ts/test-node/sql/migration_960_test.node.ts b/ts/test-node/sql/migration_960_test.node.ts index ea789971da..facd998ed8 100644 --- a/ts/test-node/sql/migration_960_test.node.ts +++ b/ts/test-node/sql/migration_960_test.node.ts @@ -4,13 +4,13 @@ import { assert } from 'chai'; import { v4 as generateGuid } from 'uuid'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { createDB, updateToVersion, insertData, getTableData, -} from './helpers.node.js'; +} from './helpers.node.ts'; const CONVO_ID = generateGuid(); const OUR_ACI = generateGuid(); diff --git a/ts/test-node/sql/migration_990_test.node.ts b/ts/test-node/sql/migration_990_test.node.ts index ae6a2366b5..48857657e5 100644 --- a/ts/test-node/sql/migration_990_test.node.ts +++ b/ts/test-node/sql/migration_990_test.node.ts @@ -3,13 +3,13 @@ import { assert } from 'chai'; -import type { WritableDB } from '../../sql/Interface.std.js'; +import type { WritableDB } from '../../sql/Interface.std.ts'; import { createDB, updateToVersion, insertData, getTableData, -} from './helpers.node.js'; +} from './helpers.node.ts'; describe('SQL/updateToSchemaVersion990', () => { let db: WritableDB; diff --git a/ts/test-node/sql/migrations_test.node.ts b/ts/test-node/sql/migrations_test.node.ts index bb56644ed4..03e8f91ef2 100644 --- a/ts/test-node/sql/migrations_test.node.ts +++ b/ts/test-node/sql/migrations_test.node.ts @@ -8,15 +8,15 @@ import { _storyIdPredicate, getJobsInQueue, insertJob, -} from '../../sql/Server.node.js'; -import type { WritableDB } from '../../sql/Interface.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; -import { objectToJSON, sql, sqlJoin } from '../../sql/util.std.js'; -import { BodyRange } from '../../types/BodyRange.std.js'; -import type { AciString } from '../../types/ServiceId.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { createDB, updateToVersion, explain } from './helpers.node.js'; +} from '../../sql/Server.node.ts'; +import type { WritableDB } from '../../sql/Interface.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; +import { objectToJSON, sql, sqlJoin } from '../../sql/util.std.ts'; +import { BodyRange } from '../../types/BodyRange.std.ts'; +import type { AciString } from '../../types/ServiceId.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { createDB, updateToVersion, explain } from './helpers.node.ts'; const OUR_UUID = generateGuid(); diff --git a/ts/test-node/sql/server/pinnedMessages_test.node.ts b/ts/test-node/sql/server/pinnedMessages_test.node.ts index 9d5804fd07..d92bc661e4 100644 --- a/ts/test-node/sql/server/pinnedMessages_test.node.ts +++ b/ts/test-node/sql/server/pinnedMessages_test.node.ts @@ -1,20 +1,20 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import assert from 'node:assert/strict'; -import type { WritableDB } from '../../../sql/Interface.std.js'; -import { setupTests } from '../../../sql/Server.node.js'; +import type { WritableDB } from '../../../sql/Interface.std.ts'; +import { setupTests } from '../../../sql/Server.node.ts'; import type { AppendPinnedMessageResult } from '../../../sql/server/pinnedMessages.std.ts'; import { appendPinnedMessage, deletePinnedMessageByMessageId, getNextExpiringPinnedMessageAcrossConversations, deleteAllExpiredPinnedMessagesBefore, -} from '../../../sql/server/pinnedMessages.std.js'; -import { createDB, insertData } from '../helpers.node.js'; +} from '../../../sql/server/pinnedMessages.std.ts'; +import { createDB, insertData } from '../helpers.node.ts'; import type { PinnedMessage, PinnedMessageParams, -} from '../../../types/PinnedMessage.std.js'; +} from '../../../types/PinnedMessage.std.ts'; function setupData(db: WritableDB) { insertData(db, 'conversations', [{ id: 'c1' }, { id: 'c2' }]); diff --git a/ts/test-node/state/ducks/audioPlayer_test.preload.ts b/ts/test-node/state/ducks/audioPlayer_test.preload.ts index 35e06963c8..c15c42e8ed 100644 --- a/ts/test-node/state/ducks/audioPlayer_test.preload.ts +++ b/ts/test-node/state/ducks/audioPlayer_test.preload.ts @@ -3,20 +3,20 @@ import { assert } from 'chai'; -import type { TargetedConversationChangedActionType } from '../../../state/ducks/conversations.preload.js'; +import type { TargetedConversationChangedActionType } from '../../../state/ducks/conversations.preload.ts'; import { TARGETED_CONVERSATION_CHANGED, actions as conversationsActions, -} from '../../../state/ducks/conversations.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; +} from '../../../state/ducks/conversations.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; -import type { StateType } from '../../../state/reducer.preload.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; import { actions, AudioPlayerContent, -} from '../../../state/ducks/audioPlayer.preload.js'; -import type { VoiceNoteAndConsecutiveForPlayback } from '../../../state/selectors/audioPlayer.preload.js'; +} from '../../../state/ducks/audioPlayer.preload.ts'; +import type { VoiceNoteAndConsecutiveForPlayback } from '../../../state/selectors/audioPlayer.preload.ts'; const { messageDeleted, messageChanged } = conversationsActions; diff --git a/ts/test-node/state/ducks/badges_test.preload.ts b/ts/test-node/state/ducks/badges_test.preload.ts index 70d7f71469..2fbba30a4b 100644 --- a/ts/test-node/state/ducks/badges_test.preload.ts +++ b/ts/test-node/state/ducks/badges_test.preload.ts @@ -3,12 +3,12 @@ import { assert } from 'chai'; -import { getFakeBadge } from '../../../test-helpers/getFakeBadge.std.js'; -import { repeat, zipObject } from '../../../util/iterables.std.js'; -import { BadgeImageTheme } from '../../../badges/BadgeImageTheme.std.js'; +import { getFakeBadge } from '../../../test-helpers/getFakeBadge.std.ts'; +import { repeat, zipObject } from '../../../util/iterables.std.ts'; +import { BadgeImageTheme } from '../../../badges/BadgeImageTheme.std.ts'; -import type { BadgesStateType } from '../../../state/ducks/badges.preload.js'; -import { actions, reducer } from '../../../state/ducks/badges.preload.js'; +import type { BadgesStateType } from '../../../state/ducks/badges.preload.ts'; +import { actions, reducer } from '../../../state/ducks/badges.preload.ts'; describe('both/state/ducks/badges', () => { describe('badgeImageFileDownloaded', () => { diff --git a/ts/test-node/state/ducks/composer_test.preload.ts b/ts/test-node/state/ducks/composer_test.preload.ts index be8d39054a..354ea71d87 100644 --- a/ts/test-node/state/ducks/composer_test.preload.ts +++ b/ts/test-node/state/ducks/composer_test.preload.ts @@ -6,20 +6,20 @@ import * as sinon from 'sinon'; import lodash from 'lodash'; import { v4 as generateUuid } from 'uuid'; -import type { ReduxActions } from '../../../state/types.std.js'; +import type { ReduxActions } from '../../../state/types.std.ts'; import { actions, getComposerStateForConversation, getEmptyState, reducer, -} from '../../../state/ducks/composer.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; +} from '../../../state/ducks/composer.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; -import { IMAGE_JPEG } from '../../../types/MIME.std.js'; -import type { AttachmentDraftType } from '../../../types/Attachment.std.js'; -import { fakeDraftAttachment } from '../../../test-helpers/fakeAttachment.std.js'; -import { NavTab } from '../../../types/Nav.std.js'; +import { IMAGE_JPEG } from '../../../types/MIME.std.ts'; +import type { AttachmentDraftType } from '../../../types/Attachment.std.ts'; +import { fakeDraftAttachment } from '../../../test-helpers/fakeAttachment.std.ts'; +import { NavTab } from '../../../types/Nav.std.ts'; const { noop } = lodash; diff --git a/ts/test-node/state/ducks/donations_test.preload.ts b/ts/test-node/state/ducks/donations_test.preload.ts index 83151c6d5d..c56af0f57c 100644 --- a/ts/test-node/state/ducks/donations_test.preload.ts +++ b/ts/test-node/state/ducks/donations_test.preload.ts @@ -4,15 +4,15 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import type { StateType } from '../../../state/reducer.preload.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import { applyDonationBadge } from '../../../state/ducks/donations.preload.js'; -import * as conversations from '../../../state/ducks/conversations.preload.js'; -import type { BadgeType } from '../../../badges/types.std.js'; -import { BadgeCategory } from '../../../badges/BadgeCategory.std.js'; -import type { ConversationType } from '../../../state/ducks/conversations.preload.js'; -import { generateAci } from '../../../types/ServiceId.std.js'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import { applyDonationBadge } from '../../../state/ducks/donations.preload.ts'; +import * as conversations from '../../../state/ducks/conversations.preload.ts'; +import type { BadgeType } from '../../../badges/types.std.ts'; +import { BadgeCategory } from '../../../badges/BadgeCategory.std.ts'; +import type { ConversationType } from '../../../state/ducks/conversations.preload.ts'; +import { generateAci } from '../../../types/ServiceId.std.ts'; describe('donations duck', () => { const getEmptyRootState = (): StateType => diff --git a/ts/test-node/state/ducks/globalModals_test.preload.ts b/ts/test-node/state/ducks/globalModals_test.preload.ts index 69bcb7ab01..d392122c20 100644 --- a/ts/test-node/state/ducks/globalModals_test.preload.ts +++ b/ts/test-node/state/ducks/globalModals_test.preload.ts @@ -7,7 +7,7 @@ import { actions, getEmptyState, reducer, -} from '../../../state/ducks/globalModals.preload.js'; +} from '../../../state/ducks/globalModals.preload.ts'; describe('both/state/ducks/globalModals', () => { describe('showWhatsNewModal/hideWhatsNewModal', () => { diff --git a/ts/test-node/state/ducks/linkPreviews_test.preload.ts b/ts/test-node/state/ducks/linkPreviews_test.preload.ts index 22c6231925..81d6500366 100644 --- a/ts/test-node/state/ducks/linkPreviews_test.preload.ts +++ b/ts/test-node/state/ducks/linkPreviews_test.preload.ts @@ -7,8 +7,8 @@ import { actions, getEmptyState, reducer, -} from '../../../state/ducks/linkPreviews.preload.js'; -import type { LinkPreviewForUIType } from '../../../types/message/LinkPreviews.std.js'; +} from '../../../state/ducks/linkPreviews.preload.ts'; +import type { LinkPreviewForUIType } from '../../../types/message/LinkPreviews.std.ts'; describe('both/state/ducks/linkPreviews', () => { function getMockLinkPreview(): LinkPreviewForUIType { diff --git a/ts/test-node/state/ducks/network_test.dom.ts b/ts/test-node/state/ducks/network_test.dom.ts index befdeef3fe..76de67f858 100644 --- a/ts/test-node/state/ducks/network_test.dom.ts +++ b/ts/test-node/state/ducks/network_test.dom.ts @@ -7,7 +7,7 @@ import { actions, getEmptyState, reducer, -} from '../../../state/ducks/network.dom.js'; +} from '../../../state/ducks/network.dom.ts'; describe('both/state/ducks/network', () => { describe('setChallengeStatus', () => { diff --git a/ts/test-node/state/ducks/preferredReactions_test.preload.ts b/ts/test-node/state/ducks/preferredReactions_test.preload.ts index 4cc0d91df3..5a88d7a83d 100644 --- a/ts/test-node/state/ducks/preferredReactions_test.preload.ts +++ b/ts/test-node/state/ducks/preferredReactions_test.preload.ts @@ -3,18 +3,18 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import type { StateType } from '../../../state/reducer.preload.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; -import type { PreferredReactionsStateType } from '../../../state/ducks/preferredReactions.preload.js'; +import type { PreferredReactionsStateType } from '../../../state/ducks/preferredReactions.preload.ts'; import { actions, getEmptyState, reducer, -} from '../../../state/ducks/preferredReactions.preload.js'; -import { EmojiSkinTone } from '../../../components/fun/data/emojis.std.js'; -import { itemStorage } from '../../../textsecure/Storage.preload.js'; +} from '../../../state/ducks/preferredReactions.preload.ts'; +import { EmojiSkinTone } from '../../../components/fun/data/emojis.std.ts'; +import { itemStorage } from '../../../textsecure/Storage.preload.ts'; describe('preferred reactions duck', () => { const getEmptyRootState = (): StateType => diff --git a/ts/test-node/state/selectors/conversations_test.preload.ts b/ts/test-node/state/selectors/conversations_test.preload.ts index e20b1e9007..24f7adf5f8 100644 --- a/ts/test-node/state/selectors/conversations_test.preload.ts +++ b/ts/test-node/state/selectors/conversations_test.preload.ts @@ -8,12 +8,12 @@ import { ComposerStep, ConversationVerificationState, OneTimeModalState, -} from '../../../state/ducks/conversationsEnums.std.js'; +} from '../../../state/ducks/conversationsEnums.std.ts'; import type { ConversationLookupType, ConversationType, -} from '../../../state/ducks/conversations.preload.js'; -import { getEmptyState } from '../../../state/ducks/conversations.preload.js'; +} from '../../../state/ducks/conversations.preload.ts'; +import { getEmptyState } from '../../../state/ducks/conversations.preload.ts'; import { _getConversationComparator, _getLeftPaneLists, @@ -41,26 +41,26 @@ import { getRecommendedGroupSizeModalState, hasGroupCreationError, isCreatingGroup, -} from '../../../state/selectors/conversations.dom.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import type { StateType } from '../../../state/reducer.preload.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import i18n from '../../util/i18n.node.js'; +} from '../../../state/selectors/conversations.dom.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import i18n from '../../util/i18n.node.ts'; import type { AciString, ServiceIdString, -} from '../../../types/ServiceId.std.js'; -import { generateAci, getAciFromPrefix } from '../../../types/ServiceId.std.js'; +} from '../../../types/ServiceId.std.ts'; +import { generateAci, getAciFromPrefix } from '../../../types/ServiceId.std.ts'; import { getDefaultConversation, getDefaultGroup, getDefaultConversationWithServiceId, -} from '../../../test-helpers/getDefaultConversation.std.js'; +} from '../../../test-helpers/getDefaultConversation.std.ts'; import { defaultStartDirectConversationComposerState, defaultChooseGroupMembersComposerState, defaultSetGroupMetadataComposerState, -} from '../../../test-helpers/defaultComposerStates.std.js'; +} from '../../../test-helpers/defaultComposerStates.std.ts'; describe('both/state/selectors/conversations-extra', () => { const SERVICE_ID_1 = generateAci(); diff --git a/ts/test-node/state/selectors/items_test.dom.ts b/ts/test-node/state/selectors/items_test.dom.ts index d608b384e0..e5808cacdf 100644 --- a/ts/test-node/state/selectors/items_test.dom.ts +++ b/ts/test-node/state/selectors/items_test.dom.ts @@ -8,13 +8,13 @@ import { getPinnedConversationIds, getPreferredLeftPaneWidth, getPreferredReactionEmoji, -} from '../../../state/selectors/items.dom.js'; -import type { StateType } from '../../../state/reducer.preload.js'; -import type { ItemsStateType } from '../../../state/ducks/items.preload.js'; +} from '../../../state/selectors/items.dom.ts'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import type { ItemsStateType } from '../../../state/ducks/items.preload.ts'; import { EMOJI_SKIN_TONE_ORDER, EmojiSkinTone, -} from '../../../components/fun/data/emojis.std.js'; +} from '../../../components/fun/data/emojis.std.ts'; describe('both/state/selectors/items', () => { // Note: we would like to use the full reducer here, to get a real empty state object diff --git a/ts/test-node/state/selectors/preferredReactions_test.preload.ts b/ts/test-node/state/selectors/preferredReactions_test.preload.ts index d42b89edcd..a419b19901 100644 --- a/ts/test-node/state/selectors/preferredReactions_test.preload.ts +++ b/ts/test-node/state/selectors/preferredReactions_test.preload.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import type { StateType } from '../../../state/reducer.preload.js'; -import type { PreferredReactionsStateType } from '../../../state/ducks/preferredReactions.preload.js'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import type { PreferredReactionsStateType } from '../../../state/ducks/preferredReactions.preload.ts'; -import { getIsCustomizingPreferredReactions } from '../../../state/selectors/preferredReactions.std.js'; +import { getIsCustomizingPreferredReactions } from '../../../state/selectors/preferredReactions.std.ts'; describe('both/state/selectors/preferredReactions', () => { const getEmptyRootState = (): StateType => diff --git a/ts/test-node/state/selectors/search_test.preload.ts b/ts/test-node/state/selectors/search_test.preload.ts index af86a7ed9f..8d7c34ba59 100644 --- a/ts/test-node/state/selectors/search_test.preload.ts +++ b/ts/test-node/state/selectors/search_test.preload.ts @@ -7,30 +7,30 @@ import sinon from 'sinon'; import type { ConversationType, MessageType, -} from '../../../state/ducks/conversations.preload.js'; -import { getEmptyState as getEmptyConversationState } from '../../../state/ducks/conversations.preload.js'; -import { noopAction } from '../../../state/ducks/noop.std.js'; -import type { MessageSearchResultType } from '../../../state/ducks/search.preload.js'; -import { getEmptyState as getEmptySearchState } from '../../../state/ducks/search.preload.js'; -import { getEmptyState as getEmptyUserState } from '../../../state/ducks/user.preload.js'; +} from '../../../state/ducks/conversations.preload.ts'; +import { getEmptyState as getEmptyConversationState } from '../../../state/ducks/conversations.preload.ts'; +import { noopAction } from '../../../state/ducks/noop.std.ts'; +import type { MessageSearchResultType } from '../../../state/ducks/search.preload.ts'; +import { getEmptyState as getEmptySearchState } from '../../../state/ducks/search.preload.ts'; +import { getEmptyState as getEmptyUserState } from '../../../state/ducks/user.preload.ts'; import { getIsSearching, getIsSearchingGlobally, getIsSearchingInAConversation, getMessageSearchResultSelector, getSearchResults, -} from '../../../state/selectors/search.preload.js'; -import { makeLookup } from '../../../util/makeLookup.std.js'; -import { generateAci } from '../../../types/ServiceId.std.js'; +} from '../../../state/selectors/search.preload.ts'; +import { makeLookup } from '../../../util/makeLookup.std.ts'; +import { generateAci } from '../../../types/ServiceId.std.ts'; import { getDefaultConversation, getDefaultConversationWithServiceId, -} from '../../../test-helpers/getDefaultConversation.std.js'; -import { ReadStatus } from '../../../messages/MessageReadStatus.std.js'; +} from '../../../test-helpers/getDefaultConversation.std.ts'; +import { ReadStatus } from '../../../messages/MessageReadStatus.std.ts'; -import type { StateType } from '../../../state/reducer.preload.js'; -import { reducer as rootReducer } from '../../../state/reducer.preload.js'; -import { NavTab } from '../../../types/Nav.std.js'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import { reducer as rootReducer } from '../../../state/reducer.preload.ts'; +import { NavTab } from '../../../types/Nav.std.ts'; describe('both/state/selectors/search', () => { const NOW = 1_000_000; diff --git a/ts/test-node/state/selectors/user_test.preload.ts b/ts/test-node/state/selectors/user_test.preload.ts index 5da7a14b5c..9eb06ab538 100644 --- a/ts/test-node/state/selectors/user_test.preload.ts +++ b/ts/test-node/state/selectors/user_test.preload.ts @@ -3,11 +3,11 @@ import { assert } from 'chai'; -import type { StateType } from '../../../state/reducer.preload.js'; -import type { UserStateType } from '../../../state/ducks/user.preload.js'; -import { getEmptyState } from '../../../state/ducks/user.preload.js'; +import type { StateType } from '../../../state/reducer.preload.ts'; +import type { UserStateType } from '../../../state/ducks/user.preload.ts'; +import { getEmptyState } from '../../../state/ducks/user.preload.ts'; -import { getIsNightly, getIsBeta } from '../../../state/selectors/user.std.js'; +import { getIsNightly, getIsBeta } from '../../../state/selectors/user.std.ts'; describe('both/state/selectors/user', () => { function getRootState( diff --git a/ts/test-node/types/Attachment_test.std.ts b/ts/test-node/types/Attachment_test.std.ts index b287c261a5..1aa6be8b0e 100644 --- a/ts/test-node/types/Attachment_test.std.ts +++ b/ts/test-node/types/Attachment_test.std.ts @@ -4,19 +4,19 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import * as Attachment from '../../util/Attachment.std.js'; +import * as Attachment from '../../util/Attachment.std.ts'; import type { LocalAttachmentV2Type, AttachmentType, -} from '../../types/Attachment.std.js'; -import * as MIME from '../../types/MIME.std.js'; -import { SignalService } from '../../protobuf/index.std.js'; -import * as Bytes from '../../Bytes.std.js'; -import { createLogger } from '../../logging/log.std.js'; +} from '../../types/Attachment.std.ts'; +import * as MIME from '../../types/MIME.std.ts'; +import { SignalService } from '../../protobuf/index.std.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; -import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js'; -import { DAY } from '../../util/durations/index.std.js'; -import { migrateDataToFileSystem } from '../../util/attachments/migrateDataToFilesystem.std.js'; +import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts'; +import { DAY } from '../../util/durations/index.std.ts'; +import { migrateDataToFileSystem } from '../../util/attachments/migrateDataToFilesystem.std.ts'; const logger = createLogger('Attachment_test'); diff --git a/ts/test-node/types/Avatar_test.std.ts b/ts/test-node/types/Avatar_test.std.ts index ff49c94c44..e3ac8fd73d 100644 --- a/ts/test-node/types/Avatar_test.std.ts +++ b/ts/test-node/types/Avatar_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { getDefaultAvatars } from '../../types/Avatar.std.js'; +import { getDefaultAvatars } from '../../types/Avatar.std.ts'; describe('Avatar', () => { describe('getDefaultAvatars', () => { diff --git a/ts/test-node/types/BodyRange_test.std.ts b/ts/test-node/types/BodyRange_test.std.ts index 67f4409bf9..8f71de21ab 100644 --- a/ts/test-node/types/BodyRange_test.std.ts +++ b/ts/test-node/types/BodyRange_test.std.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import type { HydratedBodyRangeMention, RangeNode, -} from '../../types/BodyRange.std.js'; +} from '../../types/BodyRange.std.ts'; import { BodyRange, DisplayStyle, @@ -15,8 +15,8 @@ import { insertRange, processBodyRangesForSearchResult, trimMessageWhitespace, -} from '../../types/BodyRange.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +} from '../../types/BodyRange.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; const SERVICE_ID_1 = generateAci(); const SERVICE_ID_2 = generateAci(); diff --git a/ts/test-node/types/DonationsCardForm_test.node.ts b/ts/test-node/types/DonationsCardForm_test.node.ts index da2bceb565..561ac3b332 100644 --- a/ts/test-node/types/DonationsCardForm_test.node.ts +++ b/ts/test-node/types/DonationsCardForm_test.node.ts @@ -6,7 +6,7 @@ import type { CardFormFields, CardFormResult, CardFormSettings, -} from '../../types/DonationsCardForm.std.js'; +} from '../../types/DonationsCardForm.std.ts'; import { CardCvcError, CardExpirationError, @@ -19,8 +19,8 @@ import { parseCardExpiration, parseCardForm, parseCardNumber, -} from '../../types/DonationsCardForm.std.js'; -import type { CardDetail } from '../../types/Donations.std.js'; +} from '../../types/DonationsCardForm.std.ts'; +import type { CardDetail } from '../../types/Donations.std.ts'; function testCard(cardNumber: string, cvcSize: number) { return { cardNumber, cvcSize }; diff --git a/ts/test-node/types/EmbeddedContact_test.std.ts b/ts/test-node/types/EmbeddedContact_test.std.ts index 8da9eb22a2..28c21020ac 100644 --- a/ts/test-node/types/EmbeddedContact_test.std.ts +++ b/ts/test-node/types/EmbeddedContact_test.std.ts @@ -4,10 +4,10 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { createLogger } from '../../logging/log.std.js'; -import { IMAGE_GIF, IMAGE_PNG } from '../../types/MIME.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { IMAGE_GIF, IMAGE_PNG } from '../../types/MIME.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import type { Avatar, Email, Phone } from '../../types/EmbeddedContact.std.js'; +import type { Avatar, Email, Phone } from '../../types/EmbeddedContact.std.ts'; import { _validate, ContactFormType, @@ -15,9 +15,9 @@ import { getName, parseAndWriteAvatar, parsePhoneItem, -} from '../../types/EmbeddedContact.std.js'; -import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; +} from '../../types/EmbeddedContact.std.ts'; +import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; const logger = createLogger('EmbeddedContact_test'); diff --git a/ts/test-node/types/LinkPreview_test.std.ts b/ts/test-node/types/LinkPreview_test.std.ts index d169e6e3ed..8b73268577 100644 --- a/ts/test-node/types/LinkPreview_test.std.ts +++ b/ts/test-node/types/LinkPreview_test.std.ts @@ -9,7 +9,7 @@ import { isValidLink, shouldLinkifyMessage, shouldPreviewHref, -} from '../../types/LinkPreview.std.js'; +} from '../../types/LinkPreview.std.ts'; describe('Link previews', () => { describe('#isValidLink', () => { diff --git a/ts/test-node/types/MIME_test.std.ts b/ts/test-node/types/MIME_test.std.ts index 71a9d21e8d..aee3efee44 100644 --- a/ts/test-node/types/MIME_test.std.ts +++ b/ts/test-node/types/MIME_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import * as MIME from '../../types/MIME.std.js'; +import * as MIME from '../../types/MIME.std.ts'; describe('MIME', () => { describe('isGif', () => { diff --git a/ts/test-node/types/Message2_test.preload.ts b/ts/test-node/types/Message2_test.preload.ts index 29e0c7758a..43b25e1ba7 100644 --- a/ts/test-node/types/Message2_test.preload.ts +++ b/ts/test-node/types/Message2_test.preload.ts @@ -4,20 +4,20 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import * as Message from '../../types/Message2.preload.js'; -import { SignalService } from '../../protobuf/index.std.js'; -import * as Bytes from '../../Bytes.std.js'; -import * as MIME from '../../types/MIME.std.js'; +import * as Message from '../../types/Message2.preload.ts'; +import { SignalService } from '../../protobuf/index.std.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import * as MIME from '../../types/MIME.std.ts'; -import type { EmbeddedContactType } from '../../types/EmbeddedContact.std.js'; +import type { EmbeddedContactType } from '../../types/EmbeddedContact.std.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; import type { AddressableAttachmentType, AttachmentType, LocalAttachmentV2Type, -} from '../../types/Attachment.std.js'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { testPlaintextHash } from '../../test-helpers/attachments.node.js'; +} from '../../types/Attachment.std.ts'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { testPlaintextHash } from '../../test-helpers/attachments.node.ts'; const FAKE_LOCAL_ATTACHMENT: LocalAttachmentV2Type = { version: 2, diff --git a/ts/test-node/types/NotificationProfile_test.node.ts b/ts/test-node/types/NotificationProfile_test.node.ts index 13ab3d5770..ab0f026105 100644 --- a/ts/test-node/types/NotificationProfile_test.node.ts +++ b/ts/test-node/types/NotificationProfile_test.node.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { DAY, HOUR, MINUTE } from '../../util/durations/index.std.js'; +import { DAY, HOUR, MINUTE } from '../../util/durations/index.std.ts'; import { DayOfWeek, @@ -14,13 +14,13 @@ import { getStartTime, loopThroughWeek, sortProfiles, -} from '../../types/NotificationProfile.std.js'; -import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.js'; +} from '../../types/NotificationProfile.std.ts'; +import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.ts'; import type { NextProfileEvent, NotificationProfileType, -} from '../../types/NotificationProfile.std.js'; +} from '../../types/NotificationProfile.std.ts'; describe('NotificationProfile', () => { const startingTime = Date.now(); diff --git a/ts/test-node/types/PhoneNumber_test.std.ts b/ts/test-node/types/PhoneNumber_test.std.ts index 3470a9498f..b39381bdaf 100644 --- a/ts/test-node/types/PhoneNumber_test.std.ts +++ b/ts/test-node/types/PhoneNumber_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { getCountryCode } from '../../types/PhoneNumber.std.js'; +import { getCountryCode } from '../../types/PhoneNumber.std.ts'; describe('types/PhoneNumber', () => { describe('#getCountryCode', () => { diff --git a/ts/test-node/types/SchemaVersion_test.std.ts b/ts/test-node/types/SchemaVersion_test.std.ts index a9e8de6b30..b16370772a 100644 --- a/ts/test-node/types/SchemaVersion_test.std.ts +++ b/ts/test-node/types/SchemaVersion_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isValid } from '../../types/SchemaVersion.std.js'; +import { isValid } from '../../types/SchemaVersion.std.ts'; describe('SchemaVersion', () => { describe('isValid', () => { diff --git a/ts/test-node/types/Settings_test.node.ts b/ts/test-node/types/Settings_test.node.ts index 0e522df670..58402e5d1e 100644 --- a/ts/test-node/types/Settings_test.node.ts +++ b/ts/test-node/types/Settings_test.node.ts @@ -5,9 +5,9 @@ import os from 'node:os'; import Sinon from 'sinon'; import { assert } from 'chai'; -import { getOSFunctions } from '../../util/os/shared.std.js'; -import * as Settings from '../../types/Settings.std.js'; -import { SystemTraySetting } from '../../types/SystemTraySetting.std.js'; +import { getOSFunctions } from '../../util/os/shared.std.ts'; +import * as Settings from '../../types/Settings.std.ts'; +import { SystemTraySetting } from '../../types/SystemTraySetting.std.ts'; describe('Settings', () => { let sandbox: Sinon.SinonSandbox; diff --git a/ts/test-node/types/Stickers_test.preload.ts b/ts/test-node/types/Stickers_test.preload.ts index 5c6f38229a..f364acae34 100644 --- a/ts/test-node/types/Stickers_test.preload.ts +++ b/ts/test-node/types/Stickers_test.preload.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import * as Stickers from '../../types/Stickers.preload.js'; -import { isPackIdValid, redactPackId } from '../../util/Stickers.std.js'; +import * as Stickers from '../../types/Stickers.preload.ts'; +import { isPackIdValid, redactPackId } from '../../util/Stickers.std.ts'; describe('Stickers', () => { describe('getDataFromLink', () => { diff --git a/ts/test-node/types/StoryDistributionId_test.std.ts b/ts/test-node/types/StoryDistributionId_test.std.ts index 8ff4830086..995781ae64 100644 --- a/ts/test-node/types/StoryDistributionId_test.std.ts +++ b/ts/test-node/types/StoryDistributionId_test.std.ts @@ -5,8 +5,8 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; import * as sinon from 'sinon'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; describe('StoryDistributionId', () => { let warn: sinon.SinonStub; diff --git a/ts/test-node/types/SystemTraySetting_test.std.ts b/ts/test-node/types/SystemTraySetting_test.std.ts index 4148dbbc21..ce71514484 100644 --- a/ts/test-node/types/SystemTraySetting_test.std.ts +++ b/ts/test-node/types/SystemTraySetting_test.std.ts @@ -7,7 +7,7 @@ import { SystemTraySetting, parseSystemTraySetting, shouldMinimizeToSystemTray, -} from '../../types/SystemTraySetting.std.js'; +} from '../../types/SystemTraySetting.std.ts'; describe('system tray setting utilities', () => { describe('shouldMinimizeToSystemTray', () => { diff --git a/ts/test-node/types/errors_test.node.ts b/ts/test-node/types/errors_test.node.ts index 04bc9efb27..e9c1707174 100644 --- a/ts/test-node/types/errors_test.node.ts +++ b/ts/test-node/types/errors_test.node.ts @@ -3,7 +3,7 @@ import * as Path from 'node:path'; import { assert } from 'chai'; -import * as Errors from '../../types/errors.std.js'; +import * as Errors from '../../types/errors.std.ts'; const APP_ROOT_PATH = Path.join(__dirname, '..', '..', '..'); @@ -14,7 +14,7 @@ describe('Errors', () => { assert.typeOf(error, 'Error'); const formattedError = Errors.toLogFormat(error); - assert.include(formattedError, 'errors_test.node.js'); + assert.include(formattedError, 'errors_test.node.ts'); assert.include( formattedError, APP_ROOT_PATH, diff --git a/ts/test-node/types/setupI18n_test.preload.ts b/ts/test-node/types/setupI18n_test.preload.ts index 257cd54174..9f5c2957c5 100644 --- a/ts/test-node/types/setupI18n_test.preload.ts +++ b/ts/test-node/types/setupI18n_test.preload.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import type { LocalizerType } from '../../types/Util.std.js'; -import { setupI18n } from '../../util/setupI18n.dom.js'; -import { enMessages } from '../util/i18n.node.js'; +import type { LocalizerType } from '../../types/Util.std.ts'; +import { setupI18n } from '../../util/setupI18n.dom.tsx'; +import { enMessages } from '../util/i18n.node.ts'; describe('setupI18n', () => { let i18n: LocalizerType; diff --git a/ts/test-node/updater/common_test.main.ts b/ts/test-node/updater/common_test.main.ts index ce0bb545f9..df3e5165f7 100644 --- a/ts/test-node/updater/common_test.main.ts +++ b/ts/test-node/updater/common_test.main.ts @@ -16,8 +16,8 @@ import { createTempDir, getTempDir, deleteTempDir, -} from '../../updater/common.main.js'; -import { createLogger } from '../../logging/log.std.js'; +} from '../../updater/common.main.ts'; +import { createLogger } from '../../logging/log.std.ts'; const { pathExists } = fsExtra; diff --git a/ts/test-node/updater/curve_test.node.ts b/ts/test-node/updater/curve_test.node.ts index cb57f02cc8..55ad6d061f 100644 --- a/ts/test-node/updater/curve_test.node.ts +++ b/ts/test-node/updater/curve_test.node.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import config from 'config'; -import { keyPair, sign, verify } from '../../updater/curve.node.js'; +import { keyPair, sign, verify } from '../../updater/curve.node.ts'; describe('updater/curve', () => { it('roundtrips', () => { diff --git a/ts/test-node/updater/differential_test.main.ts b/ts/test-node/updater/differential_test.main.ts index 25f050de28..d720c1f835 100644 --- a/ts/test-node/updater/differential_test.main.ts +++ b/ts/test-node/updater/differential_test.main.ts @@ -7,16 +7,16 @@ import http from 'node:http'; import fs from 'node:fs/promises'; import { tmpdir } from 'node:os'; -import { strictAssert } from '../../util/assert.std.js'; -import * as durations from '../../util/durations/index.std.js'; -import { getGotOptions } from '../../updater/got.main.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import * as durations from '../../util/durations/index.std.ts'; +import { getGotOptions } from '../../updater/got.main.ts'; import { computeDiff, getBlockMapFileName, prepareDownload, isValidPreparedData, download, -} from '../../updater/differential.main.js'; +} from '../../updater/differential.main.ts'; const FIXTURES = path.join(__dirname, '..', '..', '..', 'fixtures'); const CRLF = '\r\n'; diff --git a/ts/test-node/updater/signature_test.main.ts b/ts/test-node/updater/signature_test.main.ts index cd939268fe..1f7229880a 100644 --- a/ts/test-node/updater/signature_test.main.ts +++ b/ts/test-node/updater/signature_test.main.ts @@ -14,10 +14,10 @@ import { verifySignature, writeHexToPath, writeSignature, -} from '../../updater/signature.node.js'; -import { createTempDir, deleteTempDir } from '../../updater/common.main.js'; -import { keyPair } from '../../updater/curve.node.js'; -import { createLogger } from '../../logging/log.std.js'; +} from '../../updater/signature.node.ts'; +import { createTempDir, deleteTempDir } from '../../updater/common.main.ts'; +import { keyPair } from '../../updater/curve.node.ts'; +import { createLogger } from '../../logging/log.std.ts'; const { copy } = fsExtra; diff --git a/ts/test-node/updater/util_test.node.ts b/ts/test-node/updater/util_test.node.ts index afba7c55ef..8b37f8b096 100644 --- a/ts/test-node/updater/util_test.node.ts +++ b/ts/test-node/updater/util_test.node.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; -import { isTimeToUpdate } from '../../updater/util.node.js'; -import { HOUR } from '../../util/durations/index.std.js'; -import { createLogger } from '../../logging/log.std.js'; +import { isTimeToUpdate } from '../../updater/util.node.ts'; +import { HOUR } from '../../util/durations/index.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; const logger = createLogger('util_test'); diff --git a/ts/test-node/util/AbortableProcess_test.std.ts b/ts/test-node/util/AbortableProcess_test.std.ts index 0f6c901e32..d6f7c3c8c4 100644 --- a/ts/test-node/util/AbortableProcess_test.std.ts +++ b/ts/test-node/util/AbortableProcess_test.std.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import lodash from 'lodash'; -import { AbortableProcess } from '../../util/AbortableProcess.std.js'; +import { AbortableProcess } from '../../util/AbortableProcess.std.ts'; const { noop } = lodash; diff --git a/ts/test-node/util/BackOff_test.std.ts b/ts/test-node/util/BackOff_test.std.ts index c74f8d36ef..ddcf6061e3 100644 --- a/ts/test-node/util/BackOff_test.std.ts +++ b/ts/test-node/util/BackOff_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { BackOff } from '../../util/BackOff.std.js'; +import { BackOff } from '../../util/BackOff.std.ts'; describe('BackOff', () => { it('should return increasing timeouts', () => { diff --git a/ts/test-node/util/Bytes_test.std.ts b/ts/test-node/util/Bytes_test.std.ts index 32efd43135..d377607835 100644 --- a/ts/test-node/util/Bytes_test.std.ts +++ b/ts/test-node/util/Bytes_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import * as Bytes from '../../Bytes.std.js'; +import * as Bytes from '../../Bytes.std.ts'; describe('Bytes', () => { it('converts to base64 and back', () => { diff --git a/ts/test-node/util/CollapseSet_test.std.ts b/ts/test-node/util/CollapseSet_test.std.ts index b16db261e9..ec789beee3 100644 --- a/ts/test-node/util/CollapseSet_test.std.ts +++ b/ts/test-node/util/CollapseSet_test.std.ts @@ -4,26 +4,26 @@ import { assert } from 'chai'; import { v4 as generateUuid } from 'uuid'; -import { getMidnight } from '../../types/NotificationProfile.std.js'; -import { mapItemsIntoCollapseSets } from '../../util/CollapseSet.std.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../../MessageSeenStatus.std.js'; -import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.js'; +import { getMidnight } from '../../types/NotificationProfile.std.ts'; +import { mapItemsIntoCollapseSets } from '../../util/CollapseSet.std.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../../MessageSeenStatus.std.ts'; +import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.ts'; import { CallDirection, CallMode, CallType, DirectCallStatus, -} from '../../types/CallDisposition.std.js'; -import { DAY } from '../../util/durations/constants.std.js'; +} from '../../types/CallDisposition.std.ts'; +import { DAY } from '../../util/durations/constants.std.ts'; -import type { CallHistoryDetails } from '../../types/CallDisposition.std.js'; +import type { CallHistoryDetails } from '../../types/CallDisposition.std.ts'; import type { MessageLookupType, MessageType, -} from '../../state/ducks/conversations.preload.js'; -import type { CollapseSet } from '../../util/CollapseSet.std.js'; +} from '../../state/ducks/conversations.preload.ts'; +import type { CollapseSet } from '../../util/CollapseSet.std.ts'; describe('util/CollapseSets', () => { describe('mapItemsIntoCollapseSets', () => { diff --git a/ts/test-node/util/DelimitedStream_test.node.ts b/ts/test-node/util/DelimitedStream_test.node.ts index 340db663e7..317974e9b7 100644 --- a/ts/test-node/util/DelimitedStream_test.node.ts +++ b/ts/test-node/util/DelimitedStream_test.node.ts @@ -5,8 +5,8 @@ import { assert } from 'chai'; import { Readable, Writable } from 'node:stream'; import { pipeline } from 'node:stream/promises'; -import { DelimitedStream } from '../../util/DelimitedStream.node.js'; -import { encodeDelimited } from '../../util/encodeDelimited.std.js'; +import { DelimitedStream } from '../../util/DelimitedStream.node.ts'; +import { encodeDelimited } from '../../util/encodeDelimited.std.ts'; describe('DelimitedStream', () => { function collect(out: Array): Writable { diff --git a/ts/test-node/util/LatestQueue_test.std.ts b/ts/test-node/util/LatestQueue_test.std.ts index 0652db2d30..1d4f05d64e 100644 --- a/ts/test-node/util/LatestQueue_test.std.ts +++ b/ts/test-node/util/LatestQueue_test.std.ts @@ -3,7 +3,7 @@ import * as sinon from 'sinon'; -import { LatestQueue } from '../../util/LatestQueue.std.js'; +import { LatestQueue } from '../../util/LatestQueue.std.ts'; describe('LatestQueue', () => { it('if the queue is empty, new tasks are started immediately', done => { diff --git a/ts/test-node/util/TaskDeduplicator_test.std.ts b/ts/test-node/util/TaskDeduplicator_test.std.ts index 04e28f90e2..ed0e65349e 100644 --- a/ts/test-node/util/TaskDeduplicator_test.std.ts +++ b/ts/test-node/util/TaskDeduplicator_test.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { TaskDeduplicator } from '../../util/TaskDeduplicator.std.js'; -import { explodePromise } from '../../util/explodePromise.std.js'; -import { drop } from '../../util/drop.std.js'; +import { TaskDeduplicator } from '../../util/TaskDeduplicator.std.ts'; +import { explodePromise } from '../../util/explodePromise.std.ts'; +import { drop } from '../../util/drop.std.ts'; describe('TaskDeduplicator', () => { it('should run a task', async () => { diff --git a/ts/test-node/util/appendMacStream_test.node.ts b/ts/test-node/util/appendMacStream_test.node.ts index 8b2d6094ff..38b94efe9e 100644 --- a/ts/test-node/util/appendMacStream_test.node.ts +++ b/ts/test-node/util/appendMacStream_test.node.ts @@ -8,8 +8,8 @@ import { appendMacStream, MAC_KEY_SIZE, MAC_SIZE, -} from '../../util/appendMacStream.node.js'; -import { generateConfigMatrix } from '../../util/generateConfigMatrix.std.js'; +} from '../../util/appendMacStream.node.ts'; +import { generateConfigMatrix } from '../../util/generateConfigMatrix.std.ts'; describe('appendMacStream', () => { generateConfigMatrix({ diff --git a/ts/test-node/util/areObjectEntriesEqual_test.std.ts b/ts/test-node/util/areObjectEntriesEqual_test.std.ts index 65df7044bc..1e996c3eaa 100644 --- a/ts/test-node/util/areObjectEntriesEqual_test.std.ts +++ b/ts/test-node/util/areObjectEntriesEqual_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { areObjectEntriesEqual } from '../../util/areObjectEntriesEqual.std.js'; +import { areObjectEntriesEqual } from '../../util/areObjectEntriesEqual.std.ts'; describe('areObjectEntriesEqual', () => { type TestObject = { foo?: number; bar?: number }; diff --git a/ts/test-node/util/arePinnedConversationsEqual_test.node.ts b/ts/test-node/util/arePinnedConversationsEqual_test.node.ts index 0c61b1a82c..b5e757ee3f 100644 --- a/ts/test-node/util/arePinnedConversationsEqual_test.node.ts +++ b/ts/test-node/util/arePinnedConversationsEqual_test.node.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { arePinnedConversationsEqual } from '../../util/arePinnedConversationsEqual.node.js'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +import { arePinnedConversationsEqual } from '../../util/arePinnedConversationsEqual.node.ts'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; import PinnedConversation = Proto.AccountRecord.PinnedConversation.Params; diff --git a/ts/test-node/util/assert_test.std.ts b/ts/test-node/util/assert_test.std.ts index 38e4084ce8..3df33fcaac 100644 --- a/ts/test-node/util/assert_test.std.ts +++ b/ts/test-node/util/assert_test.std.ts @@ -3,7 +3,7 @@ import { assert as chaiAssert } from 'chai'; -import { assertDev, strictAssert } from '../../util/assert.std.js'; +import { assertDev, strictAssert } from '../../util/assert.std.ts'; describe('assert utilities', () => { describe('assert', () => { diff --git a/ts/test-node/util/assignWithNoUnnecessaryAllocation_test.std.ts b/ts/test-node/util/assignWithNoUnnecessaryAllocation_test.std.ts index 13b13ec0df..54c7cb7b0f 100644 --- a/ts/test-node/util/assignWithNoUnnecessaryAllocation_test.std.ts +++ b/ts/test-node/util/assignWithNoUnnecessaryAllocation_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { assignWithNoUnnecessaryAllocation } from '../../util/assignWithNoUnnecessaryAllocation.std.js'; +import { assignWithNoUnnecessaryAllocation } from '../../util/assignWithNoUnnecessaryAllocation.std.ts'; describe('assignWithNoUnnecessaryAllocation', () => { type Person = { diff --git a/ts/test-node/util/asyncIterables_test.std.ts b/ts/test-node/util/asyncIterables_test.std.ts index fb0051fae6..589ad04d87 100644 --- a/ts/test-node/util/asyncIterables_test.std.ts +++ b/ts/test-node/util/asyncIterables_test.std.ts @@ -3,8 +3,8 @@ import { assert } from 'chai'; -import type { MaybeAsyncIterable } from '../../util/asyncIterables.std.js'; -import { concat, wrapPromise } from '../../util/asyncIterables.std.js'; +import type { MaybeAsyncIterable } from '../../util/asyncIterables.std.ts'; +import { concat, wrapPromise } from '../../util/asyncIterables.std.ts'; describe('async iterable utilities', () => { describe('concat', () => { diff --git a/ts/test-node/util/awaitObject_test.std.ts b/ts/test-node/util/awaitObject_test.std.ts index a2eaf07ab5..96c971644c 100644 --- a/ts/test-node/util/awaitObject_test.std.ts +++ b/ts/test-node/util/awaitObject_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { awaitObject } from '../../util/awaitObject.std.js'; +import { awaitObject } from '../../util/awaitObject.std.ts'; describe('awaitObject', () => { it('returns correct result', async () => { diff --git a/ts/test-node/util/batcher_test.std.ts b/ts/test-node/util/batcher_test.std.ts index 7f40feb4b7..31659b27ec 100644 --- a/ts/test-node/util/batcher_test.std.ts +++ b/ts/test-node/util/batcher_test.std.ts @@ -4,8 +4,8 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { createBatcher } from '../../util/batcher.std.js'; -import { sleep } from '../../util/sleep.std.js'; +import { createBatcher } from '../../util/batcher.std.ts'; +import { sleep } from '../../util/sleep.std.ts'; describe('batcher', () => { it('should schedule a full batch', async () => { diff --git a/ts/test-node/util/blockSendUntilConversationsAreVerified_test.dom.ts b/ts/test-node/util/blockSendUntilConversationsAreVerified_test.dom.ts index 8f85c4bdb8..df102d9655 100644 --- a/ts/test-node/util/blockSendUntilConversationsAreVerified_test.dom.ts +++ b/ts/test-node/util/blockSendUntilConversationsAreVerified_test.dom.ts @@ -3,15 +3,15 @@ import { assert } from 'chai'; -import type { RecipientsByConversation } from '../../state/ducks/stories.preload.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; +import type { RecipientsByConversation } from '../../state/ducks/stories.preload.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { generateStoryDistributionId } from '../../types/StoryDistributionId.std.ts'; import { getAllServiceIds, filterServiceIds, -} from '../../util/blockSendUntilConversationsAreVerified.dom.js'; +} from '../../util/blockSendUntilConversationsAreVerified.dom.ts'; describe('both/util/blockSendUntilConversationsAreVerified', () => { const SERVICE_ID_1 = generateAci(); diff --git a/ts/test-node/util/callDisposition_test.preload.ts b/ts/test-node/util/callDisposition_test.preload.ts index 9d96f78820..7726088c4e 100644 --- a/ts/test-node/util/callDisposition_test.preload.ts +++ b/ts/test-node/util/callDisposition_test.preload.ts @@ -8,12 +8,12 @@ import { getPeerIdFromConversation, getCallIdFromEra, getGroupCallMeta, -} from '../../util/callDisposition.preload.js'; +} from '../../util/callDisposition.preload.ts'; import { getDefaultConversation, getDefaultGroup, -} from '../../test-helpers/getDefaultConversation.std.js'; -import { uuidToBytes } from '../../util/uuidToBytes.std.js'; +} from '../../test-helpers/getDefaultConversation.std.ts'; +import { uuidToBytes } from '../../util/uuidToBytes.std.ts'; const MOCK_ERA = 'abc'; const MOCK_CALL_ID = '16919744041952114874'; diff --git a/ts/test-node/util/callLinks_test.node.ts b/ts/test-node/util/callLinks_test.node.ts index f064e91e14..f3d3777ad6 100644 --- a/ts/test-node/util/callLinks_test.node.ts +++ b/ts/test-node/util/callLinks_test.node.ts @@ -6,11 +6,11 @@ import { assert } from 'chai'; import { callLinkToRecord, callLinkFromRecord, -} from '../../util/callLinksRingrtc.node.js'; +} from '../../util/callLinksRingrtc.node.ts'; import { FAKE_CALL_LINK as CALL_LINK, FAKE_CALL_LINK_WITH_ADMIN_KEY as CALL_LINK_WITH_ADMIN_KEY, -} from '../../test-helpers/fakeCallLink.std.js'; +} from '../../test-helpers/fakeCallLink.std.ts'; describe('callLinks', () => { it('callLinkToRecord() and callLinkFromRecord() can convert to record and back', () => { diff --git a/ts/test-node/util/callingGetParticipantName_test.std.ts b/ts/test-node/util/callingGetParticipantName_test.std.ts index 011e7d78a5..685b257938 100644 --- a/ts/test-node/util/callingGetParticipantName_test.std.ts +++ b/ts/test-node/util/callingGetParticipantName_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { getParticipantName } from '../../util/callingGetParticipantName.std.js'; +import { getParticipantName } from '../../util/callingGetParticipantName.std.ts'; describe('getParticipantName', () => { it('returns the first name if available', () => { diff --git a/ts/test-node/util/callingMessageToProto_test.node.ts b/ts/test-node/util/callingMessageToProto_test.node.ts index 99c61ac7fe..64359a42fa 100644 --- a/ts/test-node/util/callingMessageToProto_test.node.ts +++ b/ts/test-node/util/callingMessageToProto_test.node.ts @@ -10,9 +10,9 @@ import { HangupType, OpaqueMessage, } from '@signalapp/ringrtc'; -import { SignalService as Proto } from '../../protobuf/index.std.js'; +import { SignalService as Proto } from '../../protobuf/index.std.ts'; -import { callingMessageToProto } from '../../util/callingMessageToProto.node.js'; +import { callingMessageToProto } from '../../util/callingMessageToProto.node.ts'; describe('callingMessageToProto', () => { // NOTE: These tests are incomplete. diff --git a/ts/test-node/util/callingNotification_test.preload.ts b/ts/test-node/util/callingNotification_test.preload.ts index 49ea4e699e..ddf22e07c8 100644 --- a/ts/test-node/util/callingNotification_test.preload.ts +++ b/ts/test-node/util/callingNotification_test.preload.ts @@ -2,20 +2,20 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { getCallingNotificationText } from '../../util/callingNotification.std.js'; +import { getCallingNotificationText } from '../../util/callingNotification.std.ts'; import { CallMode, CallDirection, CallType, GroupCallStatus, -} from '../../types/CallDisposition.std.js'; -import i18n from './i18n.node.js'; +} from '../../types/CallDisposition.std.ts'; +import i18n from './i18n.node.ts'; import { getDefaultConversation, getDefaultGroup, -} from '../../test-helpers/getDefaultConversation.std.js'; -import { getPeerIdFromConversation } from '../../util/callDisposition.preload.js'; -import { HOUR } from '../../util/durations/index.std.js'; +} from '../../test-helpers/getDefaultConversation.std.ts'; +import { getPeerIdFromConversation } from '../../util/callDisposition.preload.ts'; +import { HOUR } from '../../util/durations/index.std.ts'; describe('calling notification helpers', () => { describe('getCallingNotificationText', () => { diff --git a/ts/test-node/util/characters_test.std.ts b/ts/test-node/util/characters_test.std.ts index 73958645ba..f170da1b76 100644 --- a/ts/test-node/util/characters_test.std.ts +++ b/ts/test-node/util/characters_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { count } from '../../util/characters.std.js'; +import { count } from '../../util/characters.std.ts'; describe('character utilities', () => { describe('count', () => { diff --git a/ts/test-node/util/clearTimeoutIfNecessary_test.std.ts b/ts/test-node/util/clearTimeoutIfNecessary_test.std.ts index 672e360dad..ae6a15bb54 100644 --- a/ts/test-node/util/clearTimeoutIfNecessary_test.std.ts +++ b/ts/test-node/util/clearTimeoutIfNecessary_test.std.ts @@ -3,7 +3,7 @@ import * as sinon from 'sinon'; -import { clearTimeoutIfNecessary } from '../../util/clearTimeoutIfNecessary.std.js'; +import { clearTimeoutIfNecessary } from '../../util/clearTimeoutIfNecessary.std.ts'; describe('clearTimeoutIfNecessary', () => { let sandbox: sinon.SinonSandbox; diff --git a/ts/test-node/util/combineNames_test.std.ts b/ts/test-node/util/combineNames_test.std.ts index 5f13ced411..3334b587c0 100644 --- a/ts/test-node/util/combineNames_test.std.ts +++ b/ts/test-node/util/combineNames_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { combineNames } from '../../util/combineNames.std.js'; +import { combineNames } from '../../util/combineNames.std.ts'; describe('combineNames', () => { it('returns undefined if no names provided', () => { diff --git a/ts/test-node/util/countUnreadStats_test.node.ts b/ts/test-node/util/countUnreadStats_test.node.ts index 5a3ecb3d89..c64bc0aed2 100644 --- a/ts/test-node/util/countUnreadStats_test.node.ts +++ b/ts/test-node/util/countUnreadStats_test.node.ts @@ -12,16 +12,16 @@ import { countAllConversationsUnreadStats, countConversationUnreadStats, isConversationUnread, -} from '../../util/countUnreadStats.std.js'; +} from '../../util/countUnreadStats.std.ts'; import type { UnreadStats, ConversationPropsForUnreadStats, UnreadStatsIncludeMuted, -} from '../../util/countUnreadStats.std.js'; -import type { CurrentChatFolder } from '../../types/CurrentChatFolders.std.js'; -import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.js'; -import type { ChatFolderId } from '../../types/ChatFolder.std.js'; -import { CHAT_FOLDER_DEFAULTS } from '../../types/ChatFolder.std.js'; +} from '../../util/countUnreadStats.std.ts'; +import type { CurrentChatFolder } from '../../types/CurrentChatFolders.std.ts'; +import { CurrentChatFolders } from '../../types/CurrentChatFolders.std.ts'; +import type { ChatFolderId } from '../../types/ChatFolder.std.ts'; +import { CHAT_FOLDER_DEFAULTS } from '../../types/ChatFolder.std.ts'; function getFutureMutedTimestamp() { return Date.now() + 12345; diff --git a/ts/test-node/util/createSupportUrl_test.std.ts b/ts/test-node/util/createSupportUrl_test.std.ts index f4813139d8..6be3437229 100644 --- a/ts/test-node/util/createSupportUrl_test.std.ts +++ b/ts/test-node/util/createSupportUrl_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { createSupportUrl } from '../../util/createSupportUrl.std.js'; +import { createSupportUrl } from '../../util/createSupportUrl.std.ts'; describe('createSupportUrl', () => { it('returns support url for "en" locale', () => { diff --git a/ts/test-node/util/currency_test.dom.ts b/ts/test-node/util/currency_test.dom.ts index 0a9aa922dd..95a3f05092 100644 --- a/ts/test-node/util/currency_test.dom.ts +++ b/ts/test-node/util/currency_test.dom.ts @@ -10,7 +10,7 @@ import { toHumanDonationAmount, toHumanCurrencyString, toStripeDonationAmount, -} from '../../util/currency.dom.js'; +} from '../../util/currency.dom.ts'; describe('parseCurrencyString', () => { function testFn( diff --git a/ts/test-node/util/deconstructLookup_test.std.ts b/ts/test-node/util/deconstructLookup_test.std.ts index dc2efeeb87..8f5eb4f064 100644 --- a/ts/test-node/util/deconstructLookup_test.std.ts +++ b/ts/test-node/util/deconstructLookup_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { deconstructLookup } from '../../util/deconstructLookup.std.js'; +import { deconstructLookup } from '../../util/deconstructLookup.std.ts'; describe('deconstructLookup', () => { it('looks up an array of properties in a lookup', () => { diff --git a/ts/test-node/util/diffArraysAsSets_test.std.ts b/ts/test-node/util/diffArraysAsSets_test.std.ts index f3893e68dc..22c491de0f 100644 --- a/ts/test-node/util/diffArraysAsSets_test.std.ts +++ b/ts/test-node/util/diffArraysAsSets_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { diffArraysAsSets } from '../../util/diffArraysAsSets.std.js'; +import { diffArraysAsSets } from '../../util/diffArraysAsSets.std.ts'; function assertMatch({ added, diff --git a/ts/test-node/util/dropNull_test.std.ts b/ts/test-node/util/dropNull_test.std.ts index 32e71627bd..a4fb8d8ae7 100644 --- a/ts/test-node/util/dropNull_test.std.ts +++ b/ts/test-node/util/dropNull_test.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { dropNull, shallowDropNull } from '../../util/dropNull.std.js'; +import { dropNull, shallowDropNull } from '../../util/dropNull.std.ts'; type Test = { a: number | null; diff --git a/ts/test-node/util/emoji_test.std.ts b/ts/test-node/util/emoji_test.std.ts index 215b645a49..efaeb55a86 100644 --- a/ts/test-node/util/emoji_test.std.ts +++ b/ts/test-node/util/emoji_test.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { replaceEmojiWithSpaces, splitByEmoji } from '../../util/emoji.std.js'; +import { replaceEmojiWithSpaces, splitByEmoji } from '../../util/emoji.std.ts'; describe('emoji', () => { describe('replaceEmojiWithSpaces', () => { diff --git a/ts/test-node/util/enum_test.std.ts b/ts/test-node/util/enum_test.std.ts index 510fcdda05..996eaac31c 100644 --- a/ts/test-node/util/enum_test.std.ts +++ b/ts/test-node/util/enum_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { makeEnumParser } from '../../util/enum.std.js'; +import { makeEnumParser } from '../../util/enum.std.ts'; describe('enum utils', () => { describe('makeEnumParser', () => { diff --git a/ts/test-node/util/expirationTimer_test.preload.ts b/ts/test-node/util/expirationTimer_test.preload.ts index 7ac6254dad..d771a867ef 100644 --- a/ts/test-node/util/expirationTimer_test.preload.ts +++ b/ts/test-node/util/expirationTimer_test.preload.ts @@ -5,11 +5,11 @@ import { readFileSync } from 'node:fs'; import { join } from 'node:path'; import { assert } from 'chai'; import * as moment from 'moment'; -import { setupI18n } from '../../util/setupI18n.dom.js'; -import { DurationInSeconds } from '../../util/durations/index.std.js'; -import type { LocaleMessagesType } from '../../types/I18N.std.js'; +import { setupI18n } from '../../util/setupI18n.dom.tsx'; +import { DurationInSeconds } from '../../util/durations/index.std.ts'; +import type { LocaleMessagesType } from '../../types/I18N.std.ts'; -import * as expirationTimer from '../../util/expirationTimer.std.js'; +import * as expirationTimer from '../../util/expirationTimer.std.ts'; function loadMessages(locale: string): LocaleMessagesType { const localePath = join( diff --git a/ts/test-node/util/explodePromise_test.std.ts b/ts/test-node/util/explodePromise_test.std.ts index 45c7bb95f3..b117e45469 100644 --- a/ts/test-node/util/explodePromise_test.std.ts +++ b/ts/test-node/util/explodePromise_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { explodePromise } from '../../util/explodePromise.std.js'; +import { explodePromise } from '../../util/explodePromise.std.ts'; describe('explodePromise', () => { it('resolves the promise', async () => { diff --git a/ts/test-node/util/exponentialBackoff_test.std.ts b/ts/test-node/util/exponentialBackoff_test.std.ts index a225d5fbbc..bb097e8ac1 100644 --- a/ts/test-node/util/exponentialBackoff_test.std.ts +++ b/ts/test-node/util/exponentialBackoff_test.std.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import * as durations from '../../util/durations/index.std.js'; +import * as durations from '../../util/durations/index.std.ts'; import { exponentialBackoffSleepTime, exponentialBackoffMaxAttempts, -} from '../../util/exponentialBackoff.std.js'; +} from '../../util/exponentialBackoff.std.ts'; describe('exponential backoff utilities', () => { describe('exponentialBackoffSleepTime', () => { diff --git a/ts/test-node/util/filterAndSortConversations_test.std.ts b/ts/test-node/util/filterAndSortConversations_test.std.ts index 7097c7dcc4..60c88bf51a 100644 --- a/ts/test-node/util/filterAndSortConversations_test.std.ts +++ b/ts/test-node/util/filterAndSortConversations_test.std.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; import lodash from 'lodash'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.js'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { filterAndSortConversations } from '../../util/filterAndSortConversations.std.ts'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; const { pick } = lodash; diff --git a/ts/test-node/util/finalStream_test.node.ts b/ts/test-node/util/finalStream_test.node.ts index 8dfc2ce716..8f0e1824eb 100644 --- a/ts/test-node/util/finalStream_test.node.ts +++ b/ts/test-node/util/finalStream_test.node.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import { Readable } from 'node:stream'; import { pipeline } from 'node:stream/promises'; -import { finalStream } from '../../util/finalStream.node.js'; +import { finalStream } from '../../util/finalStream.node.ts'; describe('finalStream', () => { it('should invoke callback before pipeline resolves', async () => { diff --git a/ts/test-node/util/generateConfigMatrix_test.std.ts b/ts/test-node/util/generateConfigMatrix_test.std.ts index a41b16ef86..39663eb405 100644 --- a/ts/test-node/util/generateConfigMatrix_test.std.ts +++ b/ts/test-node/util/generateConfigMatrix_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { generateConfigMatrix } from '../../util/generateConfigMatrix.std.js'; +import { generateConfigMatrix } from '../../util/generateConfigMatrix.std.ts'; describe('generateConfigMatrix', () => { it('generates an empty list', () => { diff --git a/ts/test-node/util/getAvatarData_test.dom.ts b/ts/test-node/util/getAvatarData_test.dom.ts index b276904e89..e4f947f419 100644 --- a/ts/test-node/util/getAvatarData_test.dom.ts +++ b/ts/test-node/util/getAvatarData_test.dom.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; import { v4 as uuid } from 'uuid'; -import { getRandomColor } from '../../test-helpers/getRandomColor.std.js'; +import { getRandomColor } from '../../test-helpers/getRandomColor.std.ts'; -import { getAvatarData } from '../../util/getAvatarData.dom.js'; +import { getAvatarData } from '../../util/getAvatarData.dom.ts'; describe('getAvatarData', () => { it('returns existing avatars if present', () => { diff --git a/ts/test-node/util/getClassNamesFor_test.std.ts b/ts/test-node/util/getClassNamesFor_test.std.ts index 74bfa23ea0..553048250f 100644 --- a/ts/test-node/util/getClassNamesFor_test.std.ts +++ b/ts/test-node/util/getClassNamesFor_test.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { getClassNamesFor } from '../../util/getClassNamesFor.std.js'; +import { getClassNamesFor } from '../../util/getClassNamesFor.std.ts'; describe('getClassNamesFor', () => { it('returns a function', () => { diff --git a/ts/test-node/util/getCustomColorStyle.dom.ts b/ts/test-node/util/getCustomColorStyle.dom.ts index 4fad8c816d..01b622c3bf 100644 --- a/ts/test-node/util/getCustomColorStyle.dom.ts +++ b/ts/test-node/util/getCustomColorStyle.dom.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { getCustomColorStyle } from '../../util/getCustomColorStyle.dom.js'; +import { getCustomColorStyle } from '../../util/getCustomColorStyle.dom.ts'; describe('getCustomColorStyle', () => { it('returns undefined if no color passed in', () => { diff --git a/ts/test-node/util/getFontNameByTextScript_test.dom.ts b/ts/test-node/util/getFontNameByTextScript_test.dom.ts index 6893bad60e..cf6aecd9e9 100644 --- a/ts/test-node/util/getFontNameByTextScript_test.dom.ts +++ b/ts/test-node/util/getFontNameByTextScript_test.dom.ts @@ -6,8 +6,8 @@ import { assert } from 'chai'; import { fontSniffer, getFontNameByTextScript, -} from '../../util/getFontNameByTextScript.std.js'; -import { setupI18n } from '../../util/setupI18n.dom.js'; +} from '../../util/getFontNameByTextScript.std.ts'; +import { setupI18n } from '../../util/setupI18n.dom.tsx'; describe('getFontNameByTextScript', () => { it('has arabic', () => { diff --git a/ts/test-node/util/getGroupMemberships_test.dom.ts b/ts/test-node/util/getGroupMemberships_test.dom.ts index bf14682918..a7849c70d8 100644 --- a/ts/test-node/util/getGroupMemberships_test.dom.ts +++ b/ts/test-node/util/getGroupMemberships_test.dom.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import type { ConversationType } from '../../state/ducks/conversations.preload.js'; -import { generateAci } from '../../types/ServiceId.std.js'; -import { normalizeAci } from '../../util/normalizeAci.std.js'; -import type { ServiceIdString } from '../../types/ServiceId.std.js'; -import { getDefaultConversationWithServiceId } from '../../test-helpers/getDefaultConversation.std.js'; +import type { ConversationType } from '../../state/ducks/conversations.preload.ts'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import { normalizeAci } from '../../util/normalizeAci.std.ts'; +import type { ServiceIdString } from '../../types/ServiceId.std.ts'; +import { getDefaultConversationWithServiceId } from '../../test-helpers/getDefaultConversation.std.ts'; -import { getGroupMemberships } from '../../util/getGroupMemberships.dom.js'; +import { getGroupMemberships } from '../../util/getGroupMemberships.dom.ts'; describe('getGroupMemberships', () => { const normalConversation1 = getDefaultConversationWithServiceId(); diff --git a/ts/test-node/util/getHSL_test.std.ts b/ts/test-node/util/getHSL_test.std.ts index ffbca732db..6e2a097073 100644 --- a/ts/test-node/util/getHSL_test.std.ts +++ b/ts/test-node/util/getHSL_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { getHSL } from '../../util/getHSL.std.js'; +import { getHSL } from '../../util/getHSL.std.ts'; describe('getHSL', () => { it('returns expected lightness values', () => { diff --git a/ts/test-node/util/getInitials_test.std.ts b/ts/test-node/util/getInitials_test.std.ts index 2167dab764..490250fa4b 100644 --- a/ts/test-node/util/getInitials_test.std.ts +++ b/ts/test-node/util/getInitials_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { getInitials } from '../../util/getInitials.std.js'; +import { getInitials } from '../../util/getInitials.std.ts'; describe('getInitials', () => { it('returns undefined when passed undefined', () => { diff --git a/ts/test-node/util/getMuteOptions_test.node.ts b/ts/test-node/util/getMuteOptions_test.node.ts index 0a2347a7c1..3ea7257dc8 100644 --- a/ts/test-node/util/getMuteOptions_test.node.ts +++ b/ts/test-node/util/getMuteOptions_test.node.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import i18n from './i18n.node.js'; +import i18n from './i18n.node.ts'; -import { getMuteOptions } from '../../util/getMuteOptions.std.js'; +import { getMuteOptions } from '../../util/getMuteOptions.std.ts'; describe('getMuteOptions', () => { const HOUR = 3600000; diff --git a/ts/test-node/util/getMutedUntilText_test.node.ts b/ts/test-node/util/getMutedUntilText_test.node.ts index 322a4606de..a85f7b89d4 100644 --- a/ts/test-node/util/getMutedUntilText_test.node.ts +++ b/ts/test-node/util/getMutedUntilText_test.node.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import i18n from './i18n.node.js'; +import i18n from './i18n.node.ts'; -import { getMutedUntilText } from '../../util/getMutedUntilText.std.js'; +import { getMutedUntilText } from '../../util/getMutedUntilText.std.ts'; describe('getMutedUntilText', () => { let sandbox: sinon.SinonSandbox; diff --git a/ts/test-node/util/getOwn_test.std.ts b/ts/test-node/util/getOwn_test.std.ts index b95d152437..cc31b02bf0 100644 --- a/ts/test-node/util/getOwn_test.std.ts +++ b/ts/test-node/util/getOwn_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { getOwn } from '../../util/getOwn.std.js'; +import { getOwn } from '../../util/getOwn.std.ts'; describe('getOwn', () => { class Person { diff --git a/ts/test-node/util/getStreamWithTimeout_test.node.ts b/ts/test-node/util/getStreamWithTimeout_test.node.ts index 694760aecf..27795bfecd 100644 --- a/ts/test-node/util/getStreamWithTimeout_test.node.ts +++ b/ts/test-node/util/getStreamWithTimeout_test.node.ts @@ -7,7 +7,7 @@ import * as sinon from 'sinon'; import lodash from 'lodash'; import { once } from 'node:events'; -import { getStreamWithTimeout } from '../../util/getStreamWithTimeout.node.js'; +import { getStreamWithTimeout } from '../../util/getStreamWithTimeout.node.ts'; const { noop } = lodash; diff --git a/ts/test-node/util/getUserAgent_test.node.ts b/ts/test-node/util/getUserAgent_test.node.ts index bcc49a5e9b..f561b57f5f 100644 --- a/ts/test-node/util/getUserAgent_test.node.ts +++ b/ts/test-node/util/getUserAgent_test.node.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { getUserAgent } from '../../util/getUserAgent.node.js'; +import { getUserAgent } from '../../util/getUserAgent.node.ts'; describe('getUserAgent', () => { beforeEach(function (this: Mocha.Context) { diff --git a/ts/test-node/util/graphemeAndLinkAwareSlice.std.ts b/ts/test-node/util/graphemeAndLinkAwareSlice.std.ts index c80597a100..cdeda2ea31 100644 --- a/ts/test-node/util/graphemeAndLinkAwareSlice.std.ts +++ b/ts/test-node/util/graphemeAndLinkAwareSlice.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { graphemeAndLinkAwareSlice } from '../../util/graphemeAndLinkAwareSlice.std.js'; +import { graphemeAndLinkAwareSlice } from '../../util/graphemeAndLinkAwareSlice.std.ts'; describe('graphemeAndLinkAwareSlice', () => { it('returns entire string when shorter than maximum', () => { diff --git a/ts/test-node/util/grapheme_test.std.ts b/ts/test-node/util/grapheme_test.std.ts index 3355fec0b9..56410afd07 100644 --- a/ts/test-node/util/grapheme_test.std.ts +++ b/ts/test-node/util/grapheme_test.std.ts @@ -8,7 +8,7 @@ import { count, hasAtMostGraphemes, isSingleGrapheme, -} from '../../util/grapheme.std.js'; +} from '../../util/grapheme.std.ts'; describe('grapheme utilities', () => { describe('getGraphemes', () => { diff --git a/ts/test-node/util/groupBy_test.std.ts b/ts/test-node/util/groupBy_test.std.ts index d36f6de319..62cfcf339d 100644 --- a/ts/test-node/util/groupBy_test.std.ts +++ b/ts/test-node/util/groupBy_test.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { groupWhile, formatGroups } from '../../util/groupWhile.std.js'; +import { groupWhile, formatGroups } from '../../util/groupWhile.std.ts'; describe('groupWhile/formatGroups', () => { function check( diff --git a/ts/test-node/util/groupMemberNameCollisions_test.std.ts b/ts/test-node/util/groupMemberNameCollisions_test.std.ts index fe52463162..8cb9084063 100644 --- a/ts/test-node/util/groupMemberNameCollisions_test.std.ts +++ b/ts/test-node/util/groupMemberNameCollisions_test.std.ts @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; import { dehydrateCollisionsWithConversations, getCollisionsFromMemberships, hasUnacknowledgedCollisions, invertIdsByTitle, -} from '../../util/groupMemberNameCollisions.std.js'; +} from '../../util/groupMemberNameCollisions.std.ts'; describe('group member name collision utilities', () => { describe('dehydrateCollisionsWithConversations', () => { diff --git a/ts/test-node/util/groupSendEndorsements_test.preload.ts b/ts/test-node/util/groupSendEndorsements_test.preload.ts index d0f1fc66bd..69a9075e8b 100644 --- a/ts/test-node/util/groupSendEndorsements_test.preload.ts +++ b/ts/test-node/util/groupSendEndorsements_test.preload.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import assert from 'node:assert/strict'; -import { validateGroupSendEndorsementsExpiration } from '../../util/groupSendEndorsements.preload.js'; -import { DAY, HOUR, SECOND } from '../../util/durations/index.std.js'; +import { validateGroupSendEndorsementsExpiration } from '../../util/groupSendEndorsements.preload.ts'; +import { DAY, HOUR, SECOND } from '../../util/durations/index.std.ts'; describe('groupSendEndorsements', () => { describe('validateGroupSendEndorsementsExpiration', () => { diff --git a/ts/test-node/util/hslToRGB_test.std.ts b/ts/test-node/util/hslToRGB_test.std.ts index 5601564eed..d34b5e689a 100644 --- a/ts/test-node/util/hslToRGB_test.std.ts +++ b/ts/test-node/util/hslToRGB_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { hslToRGB, hslToRGBInt } from '../../util/hslToRGB.std.js'; +import { hslToRGB, hslToRGBInt } from '../../util/hslToRGB.std.ts'; describe('hslToRGB', () => { it('converts pure rgb colors', () => { diff --git a/ts/test-node/util/i18n.node.ts b/ts/test-node/util/i18n.node.ts index a0e294f1f6..93c729a662 100644 --- a/ts/test-node/util/i18n.node.ts +++ b/ts/test-node/util/i18n.node.ts @@ -4,8 +4,8 @@ import { readFileSync } from 'node:fs'; import { join } from 'node:path'; -import { setupI18n } from '../../util/setupI18nMain.std.js'; -import { shouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.js'; +import { setupI18n } from '../../util/setupI18nMain.std.ts'; +import { shouldNeverBeCalled } from '../../util/shouldNeverBeCalled.std.ts'; const PATH = join( __dirname, diff --git a/ts/test-node/util/isConversationMuted_test.std.ts b/ts/test-node/util/isConversationMuted_test.std.ts index 70a4e04bdf..340a9a7883 100644 --- a/ts/test-node/util/isConversationMuted_test.std.ts +++ b/ts/test-node/util/isConversationMuted_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isConversationMuted } from '../../util/isConversationMuted.std.js'; +import { isConversationMuted } from '../../util/isConversationMuted.std.ts'; describe('isConversationMuted', () => { it('returns false if passed an undefined expiry time', () => { diff --git a/ts/test-node/util/isConversationNameKnown_test.std.ts b/ts/test-node/util/isConversationNameKnown_test.std.ts index c200fc0c18..c9bee09bd2 100644 --- a/ts/test-node/util/isConversationNameKnown_test.std.ts +++ b/ts/test-node/util/isConversationNameKnown_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isConversationNameKnown } from '../../util/isConversationNameKnown.std.js'; +import { isConversationNameKnown } from '../../util/isConversationNameKnown.std.ts'; describe('isConversationNameKnown', () => { describe('for direct conversations', () => { diff --git a/ts/test-node/util/isConversationSMSOnly_test.std.ts b/ts/test-node/util/isConversationSMSOnly_test.std.ts index 4a760ccecf..68e0d3efc9 100644 --- a/ts/test-node/util/isConversationSMSOnly_test.std.ts +++ b/ts/test-node/util/isConversationSMSOnly_test.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { generateAci } from '../../types/ServiceId.std.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; -import { isConversationSMSOnly } from '../../util/isConversationSMSOnly.std.js'; +import { isConversationSMSOnly } from '../../util/isConversationSMSOnly.std.ts'; const serviceId = generateAci(); diff --git a/ts/test-node/util/isConversationUnread_test.std.ts b/ts/test-node/util/isConversationUnread_test.std.ts index 699b63c7fe..fe219470bb 100644 --- a/ts/test-node/util/isConversationUnread_test.std.ts +++ b/ts/test-node/util/isConversationUnread_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isConversationUnread } from '../../util/isConversationUnread.std.js'; +import { isConversationUnread } from '../../util/isConversationUnread.std.ts'; describe('isConversationUnread', () => { it('returns false if both markedUnread and unreadCount are undefined', () => { diff --git a/ts/test-node/util/isConversationUnregistered_test.dom.ts b/ts/test-node/util/isConversationUnregistered_test.dom.ts index 6ed8057185..abe6b508a5 100644 --- a/ts/test-node/util/isConversationUnregistered_test.dom.ts +++ b/ts/test-node/util/isConversationUnregistered_test.dom.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { generateAci } from '../../types/ServiceId.std.js'; -import * as durations from '../../util/durations/index.std.js'; +import { generateAci } from '../../types/ServiceId.std.ts'; +import * as durations from '../../util/durations/index.std.ts'; -import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.js'; +import { isConversationUnregistered } from '../../util/isConversationUnregistered.dom.ts'; const serviceId = generateAci(); diff --git a/ts/test-node/util/isFileDangerous_test.std.ts b/ts/test-node/util/isFileDangerous_test.std.ts index 36ae8013f6..dbc2062e9e 100644 --- a/ts/test-node/util/isFileDangerous_test.std.ts +++ b/ts/test-node/util/isFileDangerous_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isFileDangerous } from '../../util/isFileDangerous.std.js'; +import { isFileDangerous } from '../../util/isFileDangerous.std.ts'; describe('isFileDangerous', () => { it('returns false for images', () => { diff --git a/ts/test-node/util/isInSystemContacts_test.std.ts b/ts/test-node/util/isInSystemContacts_test.std.ts index 152da6c394..073a487899 100644 --- a/ts/test-node/util/isInSystemContacts_test.std.ts +++ b/ts/test-node/util/isInSystemContacts_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isInSystemContacts } from '../../util/isInSystemContacts.std.js'; +import { isInSystemContacts } from '../../util/isInSystemContacts.std.ts'; describe('isInSystemContacts', () => { it('returns true for direct conversations that have a `name` property', () => { diff --git a/ts/test-node/util/isMessageUnread_test.std.ts b/ts/test-node/util/isMessageUnread_test.std.ts index c1616b04f3..f13f8f0d08 100644 --- a/ts/test-node/util/isMessageUnread_test.std.ts +++ b/ts/test-node/util/isMessageUnread_test.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { ReadStatus } from '../../messages/MessageReadStatus.std.js'; +import { ReadStatus } from '../../messages/MessageReadStatus.std.ts'; -import { isMessageUnread } from '../../util/isMessageUnread.std.js'; +import { isMessageUnread } from '../../util/isMessageUnread.std.ts'; describe('isMessageUnread', () => { it("returns false if the message's `readStatus` field is undefined", () => { diff --git a/ts/test-node/util/isNormalNumber_test.std.ts b/ts/test-node/util/isNormalNumber_test.std.ts index 564044f964..94740f44aa 100644 --- a/ts/test-node/util/isNormalNumber_test.std.ts +++ b/ts/test-node/util/isNormalNumber_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isNormalNumber } from '../../util/isNormalNumber.std.js'; +import { isNormalNumber } from '../../util/isNormalNumber.std.ts'; describe('isNormalNumber', () => { it('returns false for non-numbers', () => { diff --git a/ts/test-node/util/isNotNil_test.std.ts b/ts/test-node/util/isNotNil_test.std.ts index 1f9be75564..e05604c798 100644 --- a/ts/test-node/util/isNotNil_test.std.ts +++ b/ts/test-node/util/isNotNil_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isNotNil } from '../../util/isNotNil.std.js'; +import { isNotNil } from '../../util/isNotNil.std.ts'; describe('isNotNil', () => { it('returns false if provided null value', () => { diff --git a/ts/test-node/util/isPathInside_test.node.ts b/ts/test-node/util/isPathInside_test.node.ts index e5a07df360..bb85779f6f 100644 --- a/ts/test-node/util/isPathInside_test.node.ts +++ b/ts/test-node/util/isPathInside_test.node.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isPathInside } from '../../util/isPathInside.node.js'; +import { isPathInside } from '../../util/isPathInside.node.ts'; describe('isPathInside', () => { it('returns false if the child path is not inside the parent path', () => { diff --git a/ts/test-node/util/isRecord_test.std.ts b/ts/test-node/util/isRecord_test.std.ts index eba3696675..7920735bb6 100644 --- a/ts/test-node/util/isRecord_test.std.ts +++ b/ts/test-node/util/isRecord_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isRecord } from '../../util/isRecord.std.js'; +import { isRecord } from '../../util/isRecord.std.ts'; describe('isRecord', () => { it('returns false for primitives', () => { diff --git a/ts/test-node/util/isSorted_test.std.ts b/ts/test-node/util/isSorted_test.std.ts index ed96bdf846..a9c0643cd1 100644 --- a/ts/test-node/util/isSorted_test.std.ts +++ b/ts/test-node/util/isSorted_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isSorted } from '../../util/isSorted.std.js'; +import { isSorted } from '../../util/isSorted.std.ts'; describe('isSorted', () => { it('returns true for empty lists', () => { diff --git a/ts/test-node/util/isValidE164_test.std.ts b/ts/test-node/util/isValidE164_test.std.ts index 03278f91ba..ec1adc5d71 100644 --- a/ts/test-node/util/isValidE164_test.std.ts +++ b/ts/test-node/util/isValidE164_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isValidE164 } from '../../util/isValidE164.std.js'; +import { isValidE164 } from '../../util/isValidE164.std.ts'; describe('isValidE164', () => { it('returns false for non-strings', () => { diff --git a/ts/test-node/util/isValidUuid.std.ts b/ts/test-node/util/isValidUuid.std.ts index 803c3246ae..95cd83c05d 100644 --- a/ts/test-node/util/isValidUuid.std.ts +++ b/ts/test-node/util/isValidUuid.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { isValidUuid } from '../../util/isValidUuid.std.js'; +import { isValidUuid } from '../../util/isValidUuid.std.ts'; describe('isValidUuid', () => { const LOWERCASE_V4_UUID = '9cb737ce-2bb3-4c21-9fe0-d286caa0ca68'; diff --git a/ts/test-node/util/iterables_test.std.ts b/ts/test-node/util/iterables_test.std.ts index 9313bb0732..40c2d5eb06 100644 --- a/ts/test-node/util/iterables_test.std.ts +++ b/ts/test-node/util/iterables_test.std.ts @@ -20,7 +20,7 @@ import { size, take, zipObject, -} from '../../util/iterables.std.js'; +} from '../../util/iterables.std.ts'; describe('iterable utilities', () => { describe('isIterable', () => { diff --git a/ts/test-node/util/libphonenumberUtil_test.std.ts b/ts/test-node/util/libphonenumberUtil_test.std.ts index ab07eec5a2..271971f985 100644 --- a/ts/test-node/util/libphonenumberUtil_test.std.ts +++ b/ts/test-node/util/libphonenumberUtil_test.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert, AssertionError } from 'chai'; -import { parseNumber } from '../../util/libphonenumberUtil.std.js'; +import { parseNumber } from '../../util/libphonenumberUtil.std.ts'; describe('libphonenumber util', () => { describe('parseNumber', () => { diff --git a/ts/test-node/util/logPadding_test.node.ts b/ts/test-node/util/logPadding_test.node.ts index df710152c6..2707d10119 100644 --- a/ts/test-node/util/logPadding_test.node.ts +++ b/ts/test-node/util/logPadding_test.node.ts @@ -4,8 +4,8 @@ import { assert } from 'chai'; import { Readable } from 'node:stream'; -import { appendPaddingStream } from '../../util/logPadding.node.js'; -import { logPadSize } from '../../util/logPadSize.std.js'; +import { appendPaddingStream } from '../../util/logPadding.node.ts'; +import { logPadSize } from '../../util/logPadSize.std.ts'; const BUCKET_SIZES = [ 541, 568, 596, 626, 657, 690, 725, 761, 799, 839, 881, 925, 972, 1020, 1071, diff --git a/ts/test-node/util/makeLookup_test.std.ts b/ts/test-node/util/makeLookup_test.std.ts index c0243a82b9..9c7fa973f1 100644 --- a/ts/test-node/util/makeLookup_test.std.ts +++ b/ts/test-node/util/makeLookup_test.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { makeLookup } from '../../util/makeLookup.std.js'; +import { makeLookup } from '../../util/makeLookup.std.ts'; describe('makeLookup', () => { it('returns an empty object if passed an empty array', () => { diff --git a/ts/test-node/util/mapEmplace_test.node.ts b/ts/test-node/util/mapEmplace_test.node.ts index 14563c883d..f855a2730a 100644 --- a/ts/test-node/util/mapEmplace_test.node.ts +++ b/ts/test-node/util/mapEmplace_test.node.ts @@ -3,8 +3,8 @@ import * as sinon from 'sinon'; import assert from 'node:assert/strict'; -import type { MapEmplaceOptions } from '../../util/mapEmplace.std.js'; -import { mapEmplace } from '../../util/mapEmplace.std.js'; +import type { MapEmplaceOptions } from '../../util/mapEmplace.std.ts'; +import { mapEmplace } from '../../util/mapEmplace.std.ts'; type InsertFn = NonNullable>['insert']>; type UpdateFn = NonNullable>['update']>; diff --git a/ts/test-node/util/mapObjectWithSpec_test.std.ts b/ts/test-node/util/mapObjectWithSpec_test.std.ts index a610d23b0d..c816dfd306 100644 --- a/ts/test-node/util/mapObjectWithSpec_test.std.ts +++ b/ts/test-node/util/mapObjectWithSpec_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { mapObjectWithSpec } from '../../util/mapObjectWithSpec.std.js'; +import { mapObjectWithSpec } from '../../util/mapObjectWithSpec.std.ts'; describe('mapObjectWithSpec', () => { const increment = (value: number) => value + 1; diff --git a/ts/test-node/util/mapUtil_test.std.ts b/ts/test-node/util/mapUtil_test.std.ts index c2783346ff..ed8d1db063 100644 --- a/ts/test-node/util/mapUtil_test.std.ts +++ b/ts/test-node/util/mapUtil_test.std.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { groupBy, isEqual } from '../../util/mapUtil.std.js'; +import { groupBy, isEqual } from '../../util/mapUtil.std.ts'; describe('map utilities', () => { describe('groupBy', () => { diff --git a/ts/test-node/util/messageFailures.preload.ts b/ts/test-node/util/messageFailures.preload.ts index 113730faab..0f10e14937 100644 --- a/ts/test-node/util/messageFailures.preload.ts +++ b/ts/test-node/util/messageFailures.preload.ts @@ -6,22 +6,22 @@ import lodash from 'lodash'; import type { CustomError } from '../../textsecure/Types.d.ts'; import type { MessageAttributesType } from '../../model-types.d.ts'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { NotificationType } from '../../types/notifications.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { NotificationType } from '../../types/notifications.std.ts'; import { getChangesForPropAtTimestamp, getPropForTimestamp, -} from '../../util/editHelpers.std.js'; +} from '../../util/editHelpers.std.ts'; import { isSent, SendActionType, sendStateReducer, someRecipientSendStatus, -} from '../../messages/MessageSendState.std.js'; -import { isStory } from '../../messages/helpers.std.js'; -import { notificationService } from '../../services/notifications.preload.js'; -import type { MessageModel } from '../../models/messages.preload.js'; +} from '../../messages/MessageSendState.std.ts'; +import { isStory } from '../../messages/helpers.std.ts'; +import { notificationService } from '../../services/notifications.preload.ts'; +import type { MessageModel } from '../../models/messages.preload.ts'; const { mapValues, pick } = lodash; diff --git a/ts/test-node/util/normalizeDeviceName_test.std.ts b/ts/test-node/util/normalizeDeviceName_test.std.ts index e15630836e..c96eef1efc 100644 --- a/ts/test-node/util/normalizeDeviceName_test.std.ts +++ b/ts/test-node/util/normalizeDeviceName_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { normalizeDeviceName } from '../../util/normalizeDeviceName.std.js'; +import { normalizeDeviceName } from '../../util/normalizeDeviceName.std.ts'; describe('normalizeDeviceName', () => { it('leaves normal device names untouched', () => { diff --git a/ts/test-node/util/parseIntOrThrow_test.std.ts b/ts/test-node/util/parseIntOrThrow_test.std.ts index 10a61c7cb1..89f3266872 100644 --- a/ts/test-node/util/parseIntOrThrow_test.std.ts +++ b/ts/test-node/util/parseIntOrThrow_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { parseIntOrThrow } from '../../util/parseIntOrThrow.std.js'; +import { parseIntOrThrow } from '../../util/parseIntOrThrow.std.ts'; describe('parseIntOrThrow', () => { describe('when passed a number argument', () => { diff --git a/ts/test-node/util/parseIntWithFallback_test.std.ts b/ts/test-node/util/parseIntWithFallback_test.std.ts index 75823b87f5..5d540ee38f 100644 --- a/ts/test-node/util/parseIntWithFallback_test.std.ts +++ b/ts/test-node/util/parseIntWithFallback_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { parseIntWithFallback } from '../../util/parseIntWithFallback.std.js'; +import { parseIntWithFallback } from '../../util/parseIntWithFallback.std.ts'; describe('parseIntWithFallback', () => { describe('when passed a number argument', () => { diff --git a/ts/test-node/util/parseRetryAfter_test.std.ts b/ts/test-node/util/parseRetryAfter_test.std.ts index 7885e5a7c2..dd522808b7 100644 --- a/ts/test-node/util/parseRetryAfter_test.std.ts +++ b/ts/test-node/util/parseRetryAfter_test.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { MINUTE } from '../../util/durations/index.std.js'; +import { MINUTE } from '../../util/durations/index.std.ts'; -import { parseRetryAfterWithDefault } from '../../util/parseRetryAfter.std.js'; +import { parseRetryAfterWithDefault } from '../../util/parseRetryAfter.std.ts'; describe('parseRetryAfter', () => { it('should return 1 minute when passed non-strings', () => { diff --git a/ts/test-node/util/prependStream_test.node.ts b/ts/test-node/util/prependStream_test.node.ts index af1a43c23f..a958d06de0 100644 --- a/ts/test-node/util/prependStream_test.node.ts +++ b/ts/test-node/util/prependStream_test.node.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { prependStream } from '../../util/prependStream.node.js'; +import { prependStream } from '../../util/prependStream.node.ts'; describe('prependStream', () => { it('should prepend stream with a prefix', async () => { diff --git a/ts/test-node/util/privacy_test.node.ts b/ts/test-node/util/privacy_test.node.ts index 1262b8582c..be048d0b94 100644 --- a/ts/test-node/util/privacy_test.node.ts +++ b/ts/test-node/util/privacy_test.node.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import * as Privacy from '../../util/privacy.node.js'; +import * as Privacy from '../../util/privacy.node.ts'; Privacy.addSensitivePath('sensitive-path'); diff --git a/ts/test-node/util/queueAttachmentDownloads_test.preload.ts b/ts/test-node/util/queueAttachmentDownloads_test.preload.ts index 9d425d2597..c4e3fb4307 100644 --- a/ts/test-node/util/queueAttachmentDownloads_test.preload.ts +++ b/ts/test-node/util/queueAttachmentDownloads_test.preload.ts @@ -6,11 +6,11 @@ import type { EditHistoryType, MessageAttributesType, } from '../../model-types.d.ts'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import { IMAGE_JPEG, LONG_MESSAGE } from '../../types/MIME.std.js'; -import { generateMessageId } from '../../util/generateMessageId.node.js'; -import { ensureBodyAttachmentsAreSeparated } from '../../util/queueAttachmentDownloads.preload.js'; -import { createLogger } from '../../logging/log.std.js'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import { IMAGE_JPEG, LONG_MESSAGE } from '../../types/MIME.std.ts'; +import { generateMessageId } from '../../util/generateMessageId.node.ts'; +import { ensureBodyAttachmentsAreSeparated } from '../../util/queueAttachmentDownloads.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; const logger = createLogger('queueAttachmentDownloads_test'); diff --git a/ts/test-node/util/reallyJsonStringify_test.std.ts b/ts/test-node/util/reallyJsonStringify_test.std.ts index 6e7cc72684..1174a813e1 100644 --- a/ts/test-node/util/reallyJsonStringify_test.std.ts +++ b/ts/test-node/util/reallyJsonStringify_test.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { reallyJsonStringify } from '../../util/reallyJsonStringify.std.js'; +import { reallyJsonStringify } from '../../util/reallyJsonStringify.std.ts'; describe('reallyJsonStringify', () => { it('returns the same thing as JSON.stringify when JSON.stringify returns a string', () => { diff --git a/ts/test-node/util/replaceIndex_test.std.ts b/ts/test-node/util/replaceIndex_test.std.ts index 277f305c14..a10e69b17b 100644 --- a/ts/test-node/util/replaceIndex_test.std.ts +++ b/ts/test-node/util/replaceIndex_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { replaceIndex } from '../../util/replaceIndex.std.js'; +import { replaceIndex } from '../../util/replaceIndex.std.ts'; describe('replaceIndex', () => { it('returns a new array with an index replaced', () => { diff --git a/ts/test-node/util/resolveCanonicalLocales_test.node.ts b/ts/test-node/util/resolveCanonicalLocales_test.node.ts index c875fb2b60..d5dc57c68e 100644 --- a/ts/test-node/util/resolveCanonicalLocales_test.node.ts +++ b/ts/test-node/util/resolveCanonicalLocales_test.node.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import assert from 'node:assert/strict'; -import { resolveCanonicalLocales } from '../../util/resolveCanonicalLocales.std.js'; +import { resolveCanonicalLocales } from '../../util/resolveCanonicalLocales.std.ts'; describe('resolveCanonicalLocales', () => { it('returns an array of canonical locales', () => { diff --git a/ts/test-node/util/rgbToHSL_test.std.ts b/ts/test-node/util/rgbToHSL_test.std.ts index ace487b64e..65765fe954 100644 --- a/ts/test-node/util/rgbToHSL_test.std.ts +++ b/ts/test-node/util/rgbToHSL_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { rgbIntToHSL, rgbToHSL } from '../../util/rgbToHSL.std.js'; +import { rgbIntToHSL, rgbToHSL } from '../../util/rgbToHSL.std.ts'; describe('rgbToHSL', () => { it('converts pure rgb colors', () => { diff --git a/ts/test-node/util/ringrtc/nonRenderedRemoteParticipant_test.std.ts b/ts/test-node/util/ringrtc/nonRenderedRemoteParticipant_test.std.ts index c89cef29ec..e4989a940b 100644 --- a/ts/test-node/util/ringrtc/nonRenderedRemoteParticipant_test.std.ts +++ b/ts/test-node/util/ringrtc/nonRenderedRemoteParticipant_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { nonRenderedRemoteParticipant } from '../../../util/ringrtc/nonRenderedRemoteParticipant.std.js'; +import { nonRenderedRemoteParticipant } from '../../../util/ringrtc/nonRenderedRemoteParticipant.std.ts'; describe('nonRenderedRemoteParticipant', () => { it('returns a video request object a width and height of 0', () => { diff --git a/ts/test-node/util/ringrtc/normalizeGroupCallTimestamp_test.std.ts b/ts/test-node/util/ringrtc/normalizeGroupCallTimestamp_test.std.ts index b9b09320c3..5db81468dc 100644 --- a/ts/test-node/util/ringrtc/normalizeGroupCallTimestamp_test.std.ts +++ b/ts/test-node/util/ringrtc/normalizeGroupCallTimestamp_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { normalizeGroupCallTimestamp } from '../../../util/ringrtc/normalizeGroupCallTimestamp.std.js'; +import { normalizeGroupCallTimestamp } from '../../../util/ringrtc/normalizeGroupCallTimestamp.std.ts'; describe('normalizeGroupCallTimestamp', () => { it('returns undefined if passed a string that cannot be parsed as a number', () => { diff --git a/ts/test-node/util/schemas_test.node.ts b/ts/test-node/util/schemas_test.node.ts index 016bf4a9e9..ccf7db3a41 100644 --- a/ts/test-node/util/schemas_test.node.ts +++ b/ts/test-node/util/schemas_test.node.ts @@ -9,7 +9,7 @@ import { parseStrict, parseUnknown, SchemaParseError, -} from '../../util/schemas.std.js'; +} from '../../util/schemas.std.ts'; describe('schemas', () => { const schema = z.object({ prop: z.literal('value') }); diff --git a/ts/test-node/util/searchConversationTitles_test.std.ts b/ts/test-node/util/searchConversationTitles_test.std.ts index ee13497eae..4ebee16fab 100644 --- a/ts/test-node/util/searchConversationTitles_test.std.ts +++ b/ts/test-node/util/searchConversationTitles_test.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.js'; -import { searchConversationTitles } from '../../util/searchConversationTitles.std.js'; +import { getDefaultConversation } from '../../test-helpers/getDefaultConversation.std.ts'; +import { searchConversationTitles } from '../../util/searchConversationTitles.std.ts'; describe('searchContactTitles', () => { const conversations = [ diff --git a/ts/test-node/util/search_test.std.ts b/ts/test-node/util/search_test.std.ts index a3cd2fcc28..a22966923e 100644 --- a/ts/test-node/util/search_test.std.ts +++ b/ts/test-node/util/search_test.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { generateSnippetAroundMention } from '../../util/search.std.js'; +import { generateSnippetAroundMention } from '../../util/search.std.ts'; describe('generateSnippetAroundMention', () => { it('generates snippet around mention at start of body', () => { diff --git a/ts/test-node/util/serverAlerts_test.preload.ts b/ts/test-node/util/serverAlerts_test.preload.ts index ee0de61adf..bd58275ec4 100644 --- a/ts/test-node/util/serverAlerts_test.preload.ts +++ b/ts/test-node/util/serverAlerts_test.preload.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { getServerAlertToShow } from '../../util/handleServerAlerts.preload.js'; -import { ServerAlert } from '../../types/ServerAlert.std.js'; -import { DAY, MONTH, WEEK } from '../../util/durations/index.std.js'; +import { getServerAlertToShow } from '../../util/handleServerAlerts.preload.ts'; +import { ServerAlert } from '../../types/ServerAlert.std.ts'; +import { DAY, MONTH, WEEK } from '../../util/durations/index.std.ts'; describe('serverAlerts', () => { it('should prefer critical alerts', () => { diff --git a/ts/test-node/util/sessionTranslation_test.node.ts b/ts/test-node/util/sessionTranslation_test.node.ts index 93c91bbe0b..6d8c8423dc 100644 --- a/ts/test-node/util/sessionTranslation_test.node.ts +++ b/ts/test-node/util/sessionTranslation_test.node.ts @@ -3,11 +3,11 @@ import { assert } from 'chai'; -import * as Bytes from '../../Bytes.std.js'; -import type { LocalUserDataType } from '../../util/sessionTranslation.node.js'; -import { sessionRecordToProtobuf } from '../../util/sessionTranslation.node.js'; +import * as Bytes from '../../Bytes.std.ts'; +import type { LocalUserDataType } from '../../util/sessionTranslation.node.ts'; +import { sessionRecordToProtobuf } from '../../util/sessionTranslation.node.ts'; -import { toNumber } from '../../util/toNumber.std.js'; +import { toNumber } from '../../util/toNumber.std.ts'; // oxlint-disable-next-line typescript/no-explicit-any const getRecordCopy = (record: any): any => JSON.parse(JSON.stringify(record)); diff --git a/ts/test-node/util/setUtil_test.std.ts b/ts/test-node/util/setUtil_test.std.ts index 76fe45df92..fd83a2c985 100644 --- a/ts/test-node/util/setUtil_test.std.ts +++ b/ts/test-node/util/setUtil_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { difference, isEqual, remove, toggle } from '../../util/setUtil.std.js'; +import { difference, isEqual, remove, toggle } from '../../util/setUtil.std.ts'; describe('set utilities', () => { const original = new Set([1, 2, 3]); diff --git a/ts/test-node/util/signalRoutes_test.std.ts b/ts/test-node/util/signalRoutes_test.std.ts index a80c0059c5..d1573645f7 100644 --- a/ts/test-node/util/signalRoutes_test.std.ts +++ b/ts/test-node/util/signalRoutes_test.std.ts @@ -1,14 +1,14 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import type { ParsedSignalRoute } from '../../util/signalRoutes.std.js'; +import type { ParsedSignalRoute } from '../../util/signalRoutes.std.ts'; import { isSignalRoute, parseSignalRoute, toSignalRouteAppUrl, toSignalRouteUrl, toSignalRouteWebUrl, -} from '../../util/signalRoutes.std.js'; +} from '../../util/signalRoutes.std.ts'; describe('signalRoutes', () => { type CheckConfig = { diff --git a/ts/test-node/util/sleep_test.std.ts b/ts/test-node/util/sleep_test.std.ts index 1cd9f6333d..b4ed7ec057 100644 --- a/ts/test-node/util/sleep_test.std.ts +++ b/ts/test-node/util/sleep_test.std.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import { useFakeTimers } from 'sinon'; -import { sleep } from '../../util/sleep.std.js'; +import { sleep } from '../../util/sleep.std.ts'; describe('sleep', () => { beforeEach(function (this: Mocha.Context) { diff --git a/ts/test-node/util/sniffImageMimeType_test.node.ts b/ts/test-node/util/sniffImageMimeType_test.node.ts index 7e1865102a..d6c25e68df 100644 --- a/ts/test-node/util/sniffImageMimeType_test.node.ts +++ b/ts/test-node/util/sniffImageMimeType_test.node.ts @@ -11,9 +11,9 @@ import { IMAGE_JPEG, IMAGE_PNG, IMAGE_WEBP, -} from '../../types/MIME.std.js'; +} from '../../types/MIME.std.ts'; -import { sniffImageMimeType } from '../../util/sniffImageMimeType.std.js'; +import { sniffImageMimeType } from '../../util/sniffImageMimeType.std.ts'; describe('sniffImageMimeType', () => { const fixture = (filename: string): Promise> => { diff --git a/ts/test-node/util/sortByTitle_test.std.ts b/ts/test-node/util/sortByTitle_test.std.ts index 7d4e2b45a2..042c08b93f 100644 --- a/ts/test-node/util/sortByTitle_test.std.ts +++ b/ts/test-node/util/sortByTitle_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { sortByTitle } from '../../util/sortByTitle.std.js'; +import { sortByTitle } from '../../util/sortByTitle.std.ts'; describe('sortByTitle', () => { it("does nothing to arrays that don't need to be sorted", () => { diff --git a/ts/test-node/util/splitText_test.std.ts b/ts/test-node/util/splitText_test.std.ts index 7ad463fc0e..594a1a5f7c 100644 --- a/ts/test-node/util/splitText_test.std.ts +++ b/ts/test-node/util/splitText_test.std.ts @@ -3,8 +3,8 @@ import { assert } from 'chai'; -import type { SplitTextOptionsType } from '../../util/splitText.std.js'; -import { splitText } from '../../util/splitText.std.js'; +import type { SplitTextOptionsType } from '../../util/splitText.std.ts'; +import { splitText } from '../../util/splitText.std.ts'; describe('splitText', () => { describe('grapheme granularity', () => { diff --git a/ts/test-node/util/startTimeTravelDetector_test.std.ts b/ts/test-node/util/startTimeTravelDetector_test.std.ts index 7374ef5231..3db0a13e9b 100644 --- a/ts/test-node/util/startTimeTravelDetector_test.std.ts +++ b/ts/test-node/util/startTimeTravelDetector_test.std.ts @@ -3,7 +3,7 @@ import * as sinon from 'sinon'; -import { startTimeTravelDetector } from '../../util/startTimeTravelDetector.std.js'; +import { startTimeTravelDetector } from '../../util/startTimeTravelDetector.std.ts'; describe('startTimeTravelDetector', () => { let sandbox: sinon.SinonSandbox; diff --git a/ts/test-node/util/theme_test.std.ts b/ts/test-node/util/theme_test.std.ts index 95e2e88da8..47e3488c4c 100644 --- a/ts/test-node/util/theme_test.std.ts +++ b/ts/test-node/util/theme_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; -import { Theme, themeClassName } from '../../util/theme.std.js'; +import { Theme, themeClassName } from '../../util/theme.std.ts'; describe('themeClassName', () => { it('returns "light-theme" when passed a light theme', () => { diff --git a/ts/test-node/util/timelineUtil_test.std.ts b/ts/test-node/util/timelineUtil_test.std.ts index 86bcf21218..4d8ddc058a 100644 --- a/ts/test-node/util/timelineUtil_test.std.ts +++ b/ts/test-node/util/timelineUtil_test.std.ts @@ -5,15 +5,15 @@ import { assert } from 'chai'; import lodash from 'lodash'; import { v4 as uuid } from 'uuid'; import type { LastMessageStatus } from '../../model-types.d.ts'; -import { MINUTE, SECOND } from '../../util/durations/index.std.js'; -import type { MaybeMessageTimelineItemType } from '../../util/timelineUtil.std.js'; +import { MINUTE, SECOND } from '../../util/durations/index.std.ts'; +import type { MaybeMessageTimelineItemType } from '../../util/timelineUtil.std.ts'; import { ScrollAnchor, areMessagesInSameGroup, getScrollAnchorBeforeUpdate, shouldCurrentMessageHideMetadata, TimelineMessageLoadingState, -} from '../../util/timelineUtil.std.js'; +} from '../../util/timelineUtil.std.ts'; const { times } = lodash; diff --git a/ts/test-node/util/timestampLongUtils_test.std.ts b/ts/test-node/util/timestampLongUtils_test.std.ts index d42fed8bce..0ebfb237a6 100644 --- a/ts/test-node/util/timestampLongUtils_test.std.ts +++ b/ts/test-node/util/timestampLongUtils_test.std.ts @@ -9,11 +9,11 @@ import { getTimestampOrUndefinedFromLong, getCheckedTimestampFromLong, getCheckedTimestampOrUndefinedFromLong, -} from '../../util/timestampLongUtils.std.js'; -import { MAX_SAFE_DATE } from '../../util/timestamp.std.js'; -import { MAX_VALUE } from '../../util/long.std.js'; +} from '../../util/timestampLongUtils.std.ts'; +import { MAX_SAFE_DATE } from '../../util/timestamp.std.ts'; +import { MAX_VALUE } from '../../util/long.std.ts'; -import { toNumber } from '../../util/toNumber.std.js'; +import { toNumber } from '../../util/toNumber.std.ts'; describe('getSafeLongFromTimestamp', () => { it('returns zero when passed undefined', () => { diff --git a/ts/test-node/util/timestamp_test.std.ts b/ts/test-node/util/timestamp_test.std.ts index b55fd17d5c..2a60a650ec 100644 --- a/ts/test-node/util/timestamp_test.std.ts +++ b/ts/test-node/util/timestamp_test.std.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { HOUR, DAY } from '../../util/durations/index.std.js'; +import { HOUR, DAY } from '../../util/durations/index.std.ts'; import { isMoreRecentThan, @@ -11,7 +11,7 @@ import { isSameDay, isToday, toDayMillis, -} from '../../util/timestamp.std.js'; +} from '../../util/timestamp.std.ts'; const FAKE_NOW = new Date('2020-01-23T04:56:00.000'); diff --git a/ts/test-node/util/toWebStream_test.node.ts b/ts/test-node/util/toWebStream_test.node.ts index d9203ef533..600c61c356 100644 --- a/ts/test-node/util/toWebStream_test.node.ts +++ b/ts/test-node/util/toWebStream_test.node.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import { Readable } from 'node:stream'; import { once } from 'node:events'; -import { toWebStream } from '../../util/toWebStream.node.js'; +import { toWebStream } from '../../util/toWebStream.node.ts'; describe('toWebStream', () => { it('only reads what it needs', async () => { diff --git a/ts/test-node/util/toggleMaximizedBrowserWindow_test.std.ts b/ts/test-node/util/toggleMaximizedBrowserWindow_test.std.ts index 3fee0d5821..e7b8853b41 100644 --- a/ts/test-node/util/toggleMaximizedBrowserWindow_test.std.ts +++ b/ts/test-node/util/toggleMaximizedBrowserWindow_test.std.ts @@ -4,7 +4,7 @@ import * as sinon from 'sinon'; import type { BrowserWindow } from 'electron'; -import { toggleMaximizedBrowserWindow } from '../../util/toggleMaximizedBrowserWindow.std.js'; +import { toggleMaximizedBrowserWindow } from '../../util/toggleMaximizedBrowserWindow.std.ts'; describe('toggleMaximizedBrowserWindow', () => { const createFakeWindow = () => ({ diff --git a/ts/test-node/util/unicodeBidi_test.std.ts b/ts/test-node/util/unicodeBidi_test.std.ts index 2456a10b8b..6ca8290ec0 100644 --- a/ts/test-node/util/unicodeBidi_test.std.ts +++ b/ts/test-node/util/unicodeBidi_test.std.ts @@ -13,7 +13,7 @@ import { LTR_OVERRIDE, RTL_EMBEDDING, RTL_OVERRIDE, -} from '../../util/unicodeBidi.std.js'; +} from '../../util/unicodeBidi.std.ts'; function debugUnicode(text: string) { return text diff --git a/ts/test-node/util/unicodeSlice_test.node.ts b/ts/test-node/util/unicodeSlice_test.node.ts index 04efae568c..a529d28e83 100644 --- a/ts/test-node/util/unicodeSlice_test.node.ts +++ b/ts/test-node/util/unicodeSlice_test.node.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import assert from 'node:assert/strict'; -import { unicodeSlice } from '../../util/unicodeSlice.std.js'; -import { byteLength } from '../../Bytes.std.js'; +import { unicodeSlice } from '../../util/unicodeSlice.std.ts'; +import { byteLength } from '../../Bytes.std.ts'; describe('unicodeSlice()', () => { function test( diff --git a/ts/test-node/util/uploads/helpers.node.ts b/ts/test-node/util/uploads/helpers.node.ts index 818d8a1c1b..3986a465f5 100644 --- a/ts/test-node/util/uploads/helpers.node.ts +++ b/ts/test-node/util/uploads/helpers.node.ts @@ -9,7 +9,7 @@ import type { Server, OutgoingHttpHeaders, } from 'node:http'; -import { strictAssert } from '../../../util/assert.std.js'; +import { strictAssert } from '../../../util/assert.std.ts'; export type NextResponse = Readonly<{ status: number; diff --git a/ts/test-node/util/uploads/tusProtocol_test.node.ts b/ts/test-node/util/uploads/tusProtocol_test.node.ts index 6346d4a295..ab994d6e63 100644 --- a/ts/test-node/util/uploads/tusProtocol_test.node.ts +++ b/ts/test-node/util/uploads/tusProtocol_test.node.ts @@ -8,9 +8,9 @@ import { _tusGetCurrentOffsetRequest, _tusResumeUploadRequest, tusUpload, -} from '../../../util/uploads/tusProtocol.node.js'; -import { TestServer, body } from './helpers.node.js'; -import { toLogFormat } from '../../../types/errors.std.js'; +} from '../../../util/uploads/tusProtocol.node.ts'; +import { TestServer, body } from './helpers.node.ts'; +import { toLogFormat } from '../../../types/errors.std.ts'; describe('tusProtocol', () => { describe('_getUploadMetadataHeader', () => { diff --git a/ts/test-node/util/url_test.std.ts b/ts/test-node/util/url_test.std.ts index 465984ea2b..5c2aad308b 100644 --- a/ts/test-node/util/url_test.std.ts +++ b/ts/test-node/util/url_test.std.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { size } from '../../util/iterables.std.js'; +import { size } from '../../util/iterables.std.ts'; import { maybeParseUrl, setUrlSearchParams, urlPathFromComponents, -} from '../../util/url.std.js'; +} from '../../util/url.std.ts'; describe('URL utilities', () => { describe('maybeParseUrl', () => { diff --git a/ts/test-node/util/userLanguages_test.std.ts b/ts/test-node/util/userLanguages_test.std.ts index 3e001b2d44..39aa2c4c02 100644 --- a/ts/test-node/util/userLanguages_test.std.ts +++ b/ts/test-node/util/userLanguages_test.std.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import { formatAcceptLanguageHeader, getUserLanguages, -} from '../../util/userLanguages.std.js'; +} from '../../util/userLanguages.std.ts'; describe('user language utilities', () => { describe('formatAcceptLanguageHeader', () => { diff --git a/ts/test-node/util/version_test.std.ts b/ts/test-node/util/version_test.std.ts index 23f9655b00..703de07239 100644 --- a/ts/test-node/util/version_test.std.ts +++ b/ts/test-node/util/version_test.std.ts @@ -13,7 +13,7 @@ import { isBeta, isProduction, isStaging, -} from '../../util/version.std.js'; +} from '../../util/version.std.ts'; describe('version utilities', () => { describe('isProduction', () => { diff --git a/ts/test-node/util/waitBatcher_test.std.ts b/ts/test-node/util/waitBatcher_test.std.ts index fdaf16ced7..0cc4523a41 100644 --- a/ts/test-node/util/waitBatcher_test.std.ts +++ b/ts/test-node/util/waitBatcher_test.std.ts @@ -4,9 +4,9 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { createWaitBatcher } from '../../util/waitBatcher.std.js'; -import { drop } from '../../util/drop.std.js'; -import { sleep } from '../../util/sleep.std.js'; +import { createWaitBatcher } from '../../util/waitBatcher.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { sleep } from '../../util/sleep.std.ts'; describe('waitBatcher', () => { let processBatch: sinon.SinonSpy; diff --git a/ts/test-node/util/waitForAll.std.ts b/ts/test-node/util/waitForAll.std.ts index c67638ec2a..62b63c7bbf 100644 --- a/ts/test-node/util/waitForAll.std.ts +++ b/ts/test-node/util/waitForAll.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; -import { waitForAll } from '../../util/waitForAll.std.js'; +import { waitForAll } from '../../util/waitForAll.std.ts'; describe('util/waitForAll', () => { it('returns result of provided tasks', async () => { diff --git a/ts/test-node/util/webSafeBase64_test.std.ts b/ts/test-node/util/webSafeBase64_test.std.ts index 89141f76ef..7920eff98d 100644 --- a/ts/test-node/util/webSafeBase64_test.std.ts +++ b/ts/test-node/util/webSafeBase64_test.std.ts @@ -6,7 +6,7 @@ import { assert } from 'chai'; import { toWebSafeBase64, fromWebSafeBase64, -} from '../../util/webSafeBase64.std.js'; +} from '../../util/webSafeBase64.std.ts'; describe('both/util/webSafeBase64', () => { it('roundtrips with all elements', () => { diff --git a/ts/test-node/util/windowsZoneIdentifier_test.node.ts b/ts/test-node/util/windowsZoneIdentifier_test.node.ts index e86f2005ac..7f729b6aa6 100644 --- a/ts/test-node/util/windowsZoneIdentifier_test.node.ts +++ b/ts/test-node/util/windowsZoneIdentifier_test.node.ts @@ -8,7 +8,7 @@ import * as fs from 'node:fs'; import * as fse from 'fs-extra'; import * as Sinon from 'sinon'; -import { writeWindowsZoneIdentifier } from '../../util/windowsZoneIdentifier.node.js'; +import { writeWindowsZoneIdentifier } from '../../util/windowsZoneIdentifier.node.ts'; describe('writeWindowsZoneIdentifier', () => { before(function (this: Mocha.Context) { diff --git a/ts/test-node/util/wrapEventEmitterOnce_test.node.ts b/ts/test-node/util/wrapEventEmitterOnce_test.node.ts index d3c97d3b5e..dcd3c49e9c 100644 --- a/ts/test-node/util/wrapEventEmitterOnce_test.node.ts +++ b/ts/test-node/util/wrapEventEmitterOnce_test.node.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import { EventEmitter } from 'node:events'; -import { wrapEventEmitterOnce as once } from '../../util/wrapEventEmitterOnce.node.js'; +import { wrapEventEmitterOnce as once } from '../../util/wrapEventEmitterOnce.node.ts'; describe('wrapEventEmitterOnce', () => { let ee: EventEmitter; diff --git a/ts/textsecure/AccountManager.preload.ts b/ts/textsecure/AccountManager.preload.ts index 719bbce892..bb8e584159 100644 --- a/ts/textsecure/AccountManager.preload.ts +++ b/ts/textsecure/AccountManager.preload.ts @@ -9,7 +9,7 @@ import { BackupKey, } from '@signalapp/libsignal-client/dist/AccountKeys.js'; -import EventTarget from './EventTarget.std.js'; +import EventTarget from './EventTarget.std.ts'; import { type UploadKeysType, type UploadKyberPreKeyType, @@ -23,7 +23,7 @@ import { createAccount, linkDevice, authenticate, -} from './WebAPI.preload.js'; +} from './WebAPI.preload.ts'; import type { CompatPreKeyType, CompatSignedPreKeyType, @@ -31,15 +31,15 @@ import type { KyberPreKeyType, PniKeyMaterialType, } from './Types.d.ts'; -import { runTaskWithTimeout } from './TaskWithTimeout.std.js'; -import * as Bytes from '../Bytes.std.js'; -import * as Errors from '../types/errors.std.js'; +import { runTaskWithTimeout } from './TaskWithTimeout.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import * as Errors from '../types/errors.std.ts'; import { isTestEnvironment, isMockEnvironment, getEnvironment, -} from '../environment.std.js'; -import { senderCertificateService } from '../services/senderCertificate.preload.js'; +} from '../environment.std.ts'; +import { senderCertificateService } from '../services/senderCertificate.preload.ts'; import { decryptDeviceName, deriveStorageServiceKey, @@ -49,45 +49,45 @@ import { getRandomBytes, decryptDeviceCreatedAt, encryptDeviceCreatedAt, -} from '../Crypto.node.js'; +} from '../Crypto.node.ts'; import { generateKeyPair, generateKyberPreKey, generatePreKey, generateSignedPreKey, -} from '../Curve.node.js'; +} from '../Curve.node.ts'; import type { AciString, PniString, ServiceIdString, -} from '../types/ServiceId.std.js'; +} from '../types/ServiceId.std.ts'; import { isUntaggedPniString, normalizePni, ServiceIdKind, toTaggedPni, -} from '../types/ServiceId.std.js'; -import { normalizeAci } from '../util/normalizeAci.std.js'; -import { drop } from '../util/drop.std.js'; -import { isMoreRecentThan, isOlderThan } from '../util/timestamp.std.js'; -import { ourProfileKeyService } from '../services/ourProfileKey.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { getRegionCodeForNumber } from '../util/libphonenumberUtil.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../types/ServiceId.std.ts'; +import { normalizeAci } from '../util/normalizeAci.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { isMoreRecentThan, isOlderThan } from '../util/timestamp.std.ts'; +import { ourProfileKeyService } from '../services/ourProfileKey.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { getRegionCodeForNumber } from '../util/libphonenumberUtil.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; import type { StorageAccessType } from '../types/Storage.d.ts'; -import { getRelativePath, createName } from '../util/attachmentPath.node.js'; -import { isLinkAndSyncEnabled } from '../util/isLinkAndSyncEnabled.preload.js'; -import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.js'; -import { canAttemptRemoteBackupDownload } from '../util/isBackupEnabled.preload.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { itemStorage } from './Storage.preload.js'; -import { deriveAccessKeyFromProfileKey } from '../util/zkgroup.node.js'; -import { wrappingAdd24 } from '../util/wrappingAdd.std.js'; -import { everDone as registrationEverDone } from '../util/registration.preload.js'; -import { isAciString } from '../util/isAciString.std.js'; +import { getRelativePath, createName } from '../util/attachmentPath.node.ts'; +import { isLinkAndSyncEnabled } from '../util/isLinkAndSyncEnabled.preload.ts'; +import { getMessageQueueTime } from '../util/getMessageQueueTime.dom.ts'; +import { canAttemptRemoteBackupDownload } from '../util/isBackupEnabled.preload.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { itemStorage } from './Storage.preload.ts'; +import { deriveAccessKeyFromProfileKey } from '../util/zkgroup.node.ts'; +import { wrappingAdd24 } from '../util/wrappingAdd.std.ts'; +import { everDone as registrationEverDone } from '../util/registration.preload.ts'; +import { isAciString } from '../util/isAciString.std.ts'; const { isNumber, omit, orderBy } = lodash; diff --git a/ts/textsecure/ContactsParser.preload.ts b/ts/textsecure/ContactsParser.preload.ts index ec14032240..821bd23bbf 100644 --- a/ts/textsecure/ContactsParser.preload.ts +++ b/ts/textsecure/ContactsParser.preload.ts @@ -1,25 +1,25 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; -import { DelimitedStream } from '../util/DelimitedStream.node.js'; +import { createLogger } from '../logging/log.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; +import { DelimitedStream } from '../util/DelimitedStream.node.ts'; import { getAbsoluteAttachmentPath, writeNewAttachmentData, -} from '../util/migrations.preload.js'; -import { strictAssert } from '../util/assert.std.js'; -import type { ContactAvatarType } from '../types/Avatar.std.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { computeHash } from '../Crypto.node.js'; -import { fromAciUuidBytesOrString } from '../util/ServiceId.node.js'; -import * as Bytes from '../Bytes.std.js'; -import { decryptAttachmentV2ToSink } from '../AttachmentCrypto.node.js'; +} from '../util/migrations.preload.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import type { ContactAvatarType } from '../types/Avatar.std.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { computeHash } from '../Crypto.node.ts'; +import { fromAciUuidBytesOrString } from '../util/ServiceId.node.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { decryptAttachmentV2ToSink } from '../AttachmentCrypto.node.ts'; import Avatar = Proto.ContactDetails.Avatar.Params; -import { stringToMIMEType } from '../types/MIME.std.js'; +import { stringToMIMEType } from '../types/MIME.std.ts'; const log = createLogger('ContactsParser'); diff --git a/ts/textsecure/Errors.std.ts b/ts/textsecure/Errors.std.ts index 55b73919c0..06f173ef2e 100644 --- a/ts/textsecure/Errors.std.ts +++ b/ts/textsecure/Errors.std.ts @@ -3,9 +3,9 @@ import type { LibSignalErrorBase } from '@signalapp/libsignal-client'; -import { parseRetryAfter } from '../util/parseRetryAfter.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import type { HTTPError } from '../types/HTTPError.std.js'; +import { parseRetryAfter } from '../util/parseRetryAfter.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import type { HTTPError } from '../types/HTTPError.std.ts'; import type { HeaderListType } from '../types/WebAPI.d.ts'; import type { CallbackResultType } from './Types.d.ts'; diff --git a/ts/textsecure/KeyChangeListener.dom.ts b/ts/textsecure/KeyChangeListener.dom.ts index ad4a451a53..97358d257c 100644 --- a/ts/textsecure/KeyChangeListener.dom.ts +++ b/ts/textsecure/KeyChangeListener.dom.ts @@ -1,8 +1,8 @@ // Copyright 2017 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import type { SignalProtocolStore } from '../SignalProtocolStore.preload.js'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import type { SignalProtocolStore } from '../SignalProtocolStore.preload.ts'; export function init(signalProtocolStore: SignalProtocolStore): void { signalProtocolStore.on( diff --git a/ts/textsecure/MessageReceiver.preload.ts b/ts/textsecure/MessageReceiver.preload.ts index 29ef39f2d8..4cb664a9aa 100644 --- a/ts/textsecure/MessageReceiver.preload.ts +++ b/ts/textsecure/MessageReceiver.preload.ts @@ -36,24 +36,24 @@ import { SenderKeys, Sessions, SignedPreKeys, -} from '../LibSignalStores.node.js'; -import { createName } from '../util/attachmentPath.node.js'; -import { assertDev, strictAssert } from '../util/assert.std.js'; -import type { BatcherType } from '../util/batcher.std.js'; -import { createBatcher } from '../util/batcher.std.js'; -import { drop } from '../util/drop.std.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { parseIntOrThrow } from '../util/parseIntOrThrow.std.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import { Zone } from '../util/Zone.std.js'; -import * as durations from '../util/durations/index.std.js'; -import { DurationInSeconds } from '../util/durations/index.std.js'; -import { isKnownProtoEnumMember } from '../util/isKnownProtoEnumMember.std.js'; -import { Address } from '../types/Address.std.js'; -import { QualifiedAddress } from '../types/QualifiedAddress.std.js'; -import { normalizeStoryDistributionId } from '../types/StoryDistributionId.std.js'; -import type { ServiceIdString, AciString } from '../types/ServiceId.std.js'; -import type { TextAttachmentType } from '../types/Attachment.std.js'; +} from '../LibSignalStores.node.ts'; +import { createName } from '../util/attachmentPath.node.ts'; +import { assertDev, strictAssert } from '../util/assert.std.ts'; +import type { BatcherType } from '../util/batcher.std.ts'; +import { createBatcher } from '../util/batcher.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import { parseIntOrThrow } from '../util/parseIntOrThrow.std.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import { Zone } from '../util/Zone.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import { DurationInSeconds } from '../util/durations/index.std.ts'; +import { isKnownProtoEnumMember } from '../util/isKnownProtoEnumMember.std.ts'; +import { Address } from '../types/Address.std.ts'; +import { QualifiedAddress } from '../types/QualifiedAddress.std.ts'; +import { normalizeStoryDistributionId } from '../types/StoryDistributionId.std.ts'; +import type { ServiceIdString, AciString } from '../types/ServiceId.std.ts'; +import type { TextAttachmentType } from '../types/Attachment.std.ts'; import { fromPniObject, isPniString, @@ -63,34 +63,34 @@ import { normalizeServiceId, ServiceIdKind, toTaggedPni, -} from '../types/ServiceId.std.js'; -import { normalizeAci } from '../util/normalizeAci.std.js'; -import { isAciString } from '../util/isAciString.std.js'; -import { calling } from '../services/calling.preload.js'; -import { retryPlaceholders } from '../services/retryPlaceholders.std.js'; -import * as Errors from '../types/errors.std.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; +} from '../types/ServiceId.std.ts'; +import { normalizeAci } from '../util/normalizeAci.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; +import { calling } from '../services/calling.preload.ts'; +import { retryPlaceholders } from '../services/retryPlaceholders.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { deriveGroupFields, MASTER_KEY_LENGTH } from '../groups.preload.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { deriveGroupFields, MASTER_KEY_LENGTH } from '../groups.preload.ts'; -import { runTaskWithTimeout } from './TaskWithTimeout.std.js'; +import { runTaskWithTimeout } from './TaskWithTimeout.std.ts'; import { processAttachment, processDataMessage, processBodyRange, processGroupV2Context, processPreview, -} from './processDataMessage.preload.js'; -import { processSent } from './processSyncMessage.node.js'; -import type { EventHandler } from './EventTarget.std.js'; -import EventTarget from './EventTarget.std.js'; -import type { IncomingWebSocketRequest } from './WebsocketResources.preload.js'; -import { ServerRequestType } from './WebsocketResources.preload.js'; -import { type Storage } from './Storage.preload.js'; -import { accountManager } from './AccountManager.preload.js'; -import { WarnOnlyError } from './Errors.std.js'; -import * as Bytes from '../Bytes.std.js'; +} from './processDataMessage.preload.ts'; +import { processSent } from './processSyncMessage.node.ts'; +import type { EventHandler } from './EventTarget.std.ts'; +import EventTarget from './EventTarget.std.ts'; +import type { IncomingWebSocketRequest } from './WebsocketResources.preload.ts'; +import { ServerRequestType } from './WebsocketResources.preload.ts'; +import { type Storage } from './Storage.preload.ts'; +import { accountManager } from './AccountManager.preload.ts'; +import { WarnOnlyError } from './Errors.std.ts'; +import * as Bytes from '../Bytes.std.ts'; import type { IRequestHandler, ProcessedAttachment, @@ -109,7 +109,7 @@ import type { AddressableMessage, ReadSyncEventData, ViewSyncEventData, -} from './messageReceiverEvents.std.js'; +} from './messageReceiverEvents.std.ts'; import { AttachmentBackfillResponseSyncEvent, CallEventSyncEvent, @@ -142,38 +142,38 @@ import { ViewEvent, ViewOnceOpenSyncEvent, ViewSyncEvent, -} from './messageReceiverEvents.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { diffArraysAsSets } from '../util/diffArraysAsSets.std.js'; -import { generateBlurHash } from '../util/generateBlurHash.std.js'; -import { TEXT_ATTACHMENT } from '../types/MIME.std.js'; -import type { SendTypesType } from '../util/handleMessageSend.preload.js'; -import { getStoriesBlocked } from '../util/stories.preload.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { chunk } from '../util/iterables.std.js'; -import { inspectUnknownFieldTags } from '../util/inspectProtobufs.std.js'; -import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.js'; -import { filterAndClean } from '../util/BodyRange.node.js'; +} from './messageReceiverEvents.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { diffArraysAsSets } from '../util/diffArraysAsSets.std.ts'; +import { generateBlurHash } from '../util/generateBlurHash.std.ts'; +import { TEXT_ATTACHMENT } from '../types/MIME.std.ts'; +import type { SendTypesType } from '../util/handleMessageSend.preload.ts'; +import { getStoriesBlocked } from '../util/stories.preload.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { chunk } from '../util/iterables.std.ts'; +import { inspectUnknownFieldTags } from '../util/inspectProtobufs.std.ts'; +import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.ts'; +import { filterAndClean } from '../util/BodyRange.node.ts'; import { getCallEventForProto, getCallLogEventForProto, -} from '../util/callDisposition.preload.js'; -import { checkOurPniIdentityKey } from '../util/checkOurPniIdentityKey.preload.js'; -import { CallLinkUpdateSyncType } from '../types/CallLink.std.js'; -import { bytesToUuid } from '../util/uuidToBytes.std.js'; -import { isBodyTooLong } from '../util/longAttachment.std.js'; +} from '../util/callDisposition.preload.ts'; +import { checkOurPniIdentityKey } from '../util/checkOurPniIdentityKey.preload.ts'; +import { CallLinkUpdateSyncType } from '../types/CallLink.std.ts'; +import { bytesToUuid } from '../util/uuidToBytes.std.ts'; +import { isBodyTooLong } from '../util/longAttachment.std.ts'; import { fromServiceIdBinaryOrString, fromAciUuidBytes, fromAciUuidBytesOrString, fromPniUuidBytesOrUntaggedString, -} from '../util/ServiceId.node.js'; +} from '../util/ServiceId.node.ts'; import { type MessageRequestResponseInfo, MessageRequestResponseSource, -} from '../types/MessageRequestResponseEvent.std.js'; +} from '../types/MessageRequestResponseEvent.std.ts'; -import { toNumber } from '../util/toNumber.std.js'; +import { toNumber } from '../util/toNumber.std.ts'; const { isBoolean, isNumber, isString, noop } = lodash; diff --git a/ts/textsecure/OutgoingMessage.preload.ts b/ts/textsecure/OutgoingMessage.preload.ts index 646fdd0b52..95a49c649c 100644 --- a/ts/textsecure/OutgoingMessage.preload.ts +++ b/ts/textsecure/OutgoingMessage.preload.ts @@ -22,34 +22,34 @@ import { sendMessagesUnauth, getKeysForServiceId as doGetKeysForServiceId, getKeysForServiceIdUnauth, -} from './WebAPI.preload.js'; -import type { MessageType } from './WebAPI.preload.js'; +} from './WebAPI.preload.ts'; +import type { MessageType } from './WebAPI.preload.ts'; import type { SendMetadataType, SendOptionsType, -} from './SendMessage.preload.js'; +} from './SendMessage.preload.ts'; import { OutgoingIdentityKeyError, OutgoingMessageError, SendMessageNetworkError, SendMessageChallengeError, UnregisteredUserError, -} from './Errors.std.js'; +} from './Errors.std.ts'; import type { CallbackResultType, CustomError } from './Types.d.ts'; -import { Address } from '../types/Address.std.js'; -import * as Errors from '../types/errors.std.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { QualifiedAddress } from '../types/QualifiedAddress.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { Sessions, IdentityKeys } from '../LibSignalStores.node.js'; -import { getKeysForServiceId } from './getKeysForServiceId.preload.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { GroupSendToken } from '../types/GroupSendEndorsements.std.js'; -import { isSignalServiceId } from '../util/isSignalConversation.dom.js'; -import * as Bytes from '../Bytes.std.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { itemStorage } from './Storage.preload.js'; +import { Address } from '../types/Address.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { QualifiedAddress } from '../types/QualifiedAddress.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { Sessions, IdentityKeys } from '../LibSignalStores.node.ts'; +import { getKeysForServiceId } from './getKeysForServiceId.preload.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { GroupSendToken } from '../types/GroupSendEndorsements.std.ts'; +import { isSignalServiceId } from '../util/isSignalConversation.dom.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { itemStorage } from './Storage.preload.ts'; const { reject } = lodash; diff --git a/ts/textsecure/Provisioner.preload.ts b/ts/textsecure/Provisioner.preload.ts index 4a34ff2ab3..c9bbede4c2 100644 --- a/ts/textsecure/Provisioner.preload.ts +++ b/ts/textsecure/Provisioner.preload.ts @@ -5,30 +5,30 @@ import pTimeout, { TimeoutError as PTimeoutError } from 'p-timeout'; import type { LibSignalError } from '@signalapp/libsignal-client'; import type { ProvisioningConnection } from '@signalapp/libsignal-client/dist/net/Chat.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { MAX_DEVICE_NAME_LENGTH } from '../types/InstallScreen.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { BackOff, FIBONACCI_TIMEOUTS } from '../util/BackOff.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { drop } from '../util/drop.std.js'; -import { isLinkAndSyncEnabled } from '../util/isLinkAndSyncEnabled.preload.js'; -import { normalizeDeviceName } from '../util/normalizeDeviceName.std.js'; -import { linkDeviceRoute } from '../util/signalRoutes.std.js'; -import { sleep } from '../util/sleep.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { MAX_DEVICE_NAME_LENGTH } from '../types/InstallScreen.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { BackOff, FIBONACCI_TIMEOUTS } from '../util/BackOff.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { isLinkAndSyncEnabled } from '../util/isLinkAndSyncEnabled.preload.ts'; +import { normalizeDeviceName } from '../util/normalizeDeviceName.std.ts'; +import { linkDeviceRoute } from '../util/signalRoutes.std.ts'; +import { sleep } from '../util/sleep.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; import { type CreateLinkedDeviceOptionsType, AccountType, -} from './AccountManager.preload.js'; +} from './AccountManager.preload.ts'; import ProvisioningCipher, { type ProvisionDecryptResult, -} from './ProvisioningCipher.node.js'; -import { ConnectTimeoutError } from './Errors.std.js'; -import type { getProvisioningConnection } from './WebAPI.preload.js'; +} from './ProvisioningCipher.node.ts'; +import { ConnectTimeoutError } from './Errors.std.ts'; +import type { getProvisioningConnection } from './WebAPI.preload.ts'; const log = createLogger('Provisioner'); diff --git a/ts/textsecure/ProvisioningCipher.node.ts b/ts/textsecure/ProvisioningCipher.node.ts index 8756fdc1e6..7c55e80d8e 100644 --- a/ts/textsecure/ProvisioningCipher.node.ts +++ b/ts/textsecure/ProvisioningCipher.node.ts @@ -3,21 +3,21 @@ import { PublicKey, Aci, Pni } from '@signalapp/libsignal-client'; import type { KeyPairType } from './Types.d.ts'; -import * as Bytes from '../Bytes.std.js'; +import * as Bytes from '../Bytes.std.ts'; import { decryptAes256CbcPkcsPadding, deriveSecrets, verifyHmacSha256, -} from '../Crypto.node.js'; +} from '../Crypto.node.ts'; import { calculateAgreement, createKeyPair, generateKeyPair, -} from '../Curve.node.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { normalizeAci } from '../util/normalizeAci.std.js'; +} from '../Curve.node.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import { normalizeAci } from '../util/normalizeAci.std.ts'; import { type AciString, type PniString, @@ -26,7 +26,7 @@ import { isUntaggedPniString, fromAciObject, fromPniObject, -} from '../types/ServiceId.std.js'; +} from '../types/ServiceId.std.ts'; export type ProvisionDecryptResult = Readonly<{ aciKeyPair: KeyPairType; diff --git a/ts/textsecure/SendMessage.preload.ts b/ts/textsecure/SendMessage.preload.ts index 531d3bbcb6..87d749351e 100644 --- a/ts/textsecure/SendMessage.preload.ts +++ b/ts/textsecure/SendMessage.preload.ts @@ -15,93 +15,93 @@ import type { RequireExactlyOne } from 'type-fest'; import { GLOBAL_ZONE, signalProtocolStore, -} from '../SignalProtocolStore.preload.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import { assertDev, strictAssert } from '../util/assert.std.js'; -import { parseIntOrThrow } from '../util/parseIntOrThrow.std.js'; -import { uuidToBytes } from '../util/uuidToBytes.std.js'; -import { Address } from '../types/Address.std.js'; -import { QualifiedAddress } from '../types/QualifiedAddress.std.js'; -import type { StoryMessageRecipientsType } from '../types/Stories.std.js'; -import { SenderKeys } from '../LibSignalStores.node.js'; +} from '../SignalProtocolStore.preload.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { assertDev, strictAssert } from '../util/assert.std.ts'; +import { parseIntOrThrow } from '../util/parseIntOrThrow.std.ts'; +import { uuidToBytes } from '../util/uuidToBytes.std.ts'; +import { Address } from '../types/Address.std.ts'; +import { QualifiedAddress } from '../types/QualifiedAddress.std.ts'; +import type { StoryMessageRecipientsType } from '../types/Stories.std.ts'; +import { SenderKeys } from '../LibSignalStores.node.ts'; import type { TextAttachmentType, UploadedAttachmentType, -} from '../types/Attachment.std.js'; -import type { AciString, ServiceIdString } from '../types/ServiceId.std.js'; +} from '../types/Attachment.std.ts'; +import type { AciString, ServiceIdString } from '../types/ServiceId.std.ts'; import { ServiceIdKind, serviceIdSchema, isPniString, -} from '../types/ServiceId.std.js'; +} from '../types/ServiceId.std.ts'; import { toAciObject, toPniObject, toServiceIdObject, -} from '../util/ServiceId.node.js'; -import { runTaskWithTimeout } from './TaskWithTimeout.std.js'; +} from '../util/ServiceId.node.ts'; +import { runTaskWithTimeout } from './TaskWithTimeout.std.ts'; import type { CallbackResultType } from './Types.d.ts'; import type { SerializedCertificateType, SendLogCallbackType, -} from './OutgoingMessage.preload.js'; -import OutgoingMessage from './OutgoingMessage.preload.js'; -import * as Bytes from '../Bytes.std.js'; -import { getRandomBytes } from '../Crypto.node.js'; -import { SendMessageProtoError, NoSenderKeyError } from './Errors.std.js'; -import { BodyRange } from '../types/BodyRange.std.js'; -import type { RawBodyRange } from '../types/BodyRange.std.js'; -import type { StoryContextType } from '../types/Util.std.js'; -import { concat, isEmpty } from '../util/iterables.std.js'; -import type { SendTypesType } from '../util/handleMessageSend.preload.js'; +} from './OutgoingMessage.preload.ts'; +import OutgoingMessage from './OutgoingMessage.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { getRandomBytes } from '../Crypto.node.ts'; +import { SendMessageProtoError, NoSenderKeyError } from './Errors.std.ts'; +import { BodyRange } from '../types/BodyRange.std.ts'; +import type { RawBodyRange } from '../types/BodyRange.std.ts'; +import type { StoryContextType } from '../types/Util.std.ts'; +import { concat, isEmpty } from '../util/iterables.std.ts'; +import type { SendTypesType } from '../util/handleMessageSend.preload.ts'; import { shouldSaveProto, sendTypesEnum, -} from '../util/handleMessageSend.preload.js'; -import type { DurationInSeconds } from '../util/durations/index.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { EmbeddedContactWithUploadedAvatar } from '../types/EmbeddedContact.std.js'; +} from '../util/handleMessageSend.preload.ts'; +import type { DurationInSeconds } from '../util/durations/index.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { EmbeddedContactWithUploadedAvatar } from '../types/EmbeddedContact.std.ts'; import { numberToPhoneType, numberToEmailType, numberToAddressType, -} from '../types/EmbeddedContact.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { drop } from '../util/drop.std.js'; +} from '../types/EmbeddedContact.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { drop } from '../util/drop.std.ts'; import type { ConversationIdentifier, DeleteForMeSyncEventData, DeleteMessageSyncTarget, AddressableMessage, -} from './messageReceiverEvents.std.js'; -import { getConversationFromTarget } from '../util/syncIdentifiers.preload.js'; +} from './messageReceiverEvents.std.ts'; +import { getConversationFromTarget } from '../util/syncIdentifiers.preload.ts'; import type { CallDetails, CallHistoryDetails, -} from '../types/CallDisposition.std.js'; +} from '../types/CallDisposition.std.ts'; import { AdhocCallStatus, DirectCallStatus, GroupCallStatus, CallMode, -} from '../types/CallDisposition.std.js'; +} from '../types/CallDisposition.std.ts'; import { getBytesForPeerId, getCallIdForProto, getProtoForCallHistory, -} from '../util/callDisposition.preload.js'; -import { MAX_MESSAGE_COUNT } from '../util/deleteForMe.types.std.js'; -import { isProtoBinaryEncodingEnabled } from '../util/isProtoBinaryEncodingEnabled.dom.js'; -import type { GroupSendToken } from '../types/GroupSendEndorsements.std.js'; -import type { OutgoingPollVote, PollCreateType } from '../types/Polls.dom.js'; -import { itemStorage } from './Storage.preload.js'; -import { accountManager } from './AccountManager.preload.js'; +} from '../util/callDisposition.preload.ts'; +import { MAX_MESSAGE_COUNT } from '../util/deleteForMe.types.std.ts'; +import { isProtoBinaryEncodingEnabled } from '../util/isProtoBinaryEncodingEnabled.dom.ts'; +import type { GroupSendToken } from '../types/GroupSendEndorsements.std.ts'; +import type { OutgoingPollVote, PollCreateType } from '../types/Polls.dom.ts'; +import { itemStorage } from './Storage.preload.ts'; +import { accountManager } from './AccountManager.preload.ts'; import type { SendPinMessageType, SendUnpinMessageType, -} from '../types/PinnedMessage.std.js'; +} from '../types/PinnedMessage.std.ts'; const log = createLogger('SendMessage'); diff --git a/ts/textsecure/SocketManager.preload.ts b/ts/textsecure/SocketManager.preload.ts index 3e6db9f746..73a9f58295 100644 --- a/ts/textsecure/SocketManager.preload.ts +++ b/ts/textsecure/SocketManager.preload.ts @@ -18,36 +18,36 @@ import type { ProvisioningConnectionListener, } from '@signalapp/libsignal-client/dist/net/Chat.js'; -import { strictAssert } from '../util/assert.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; import { BackOff, EXTENDED_FIBONACCI_TIMEOUTS, FIBONACCI_TIMEOUTS, -} from '../util/BackOff.std.js'; -import * as durations from '../util/durations/index.std.js'; -import { drop } from '../util/drop.std.js'; -import { type SocketInfo, SocketStatus } from '../types/SocketStatus.std.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import * as Errors from '../types/errors.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../util/BackOff.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { type SocketInfo, SocketStatus } from '../types/SocketStatus.std.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { createLogger } from '../logging/log.std.ts'; -import type { AbortableProcess } from '../util/AbortableProcess.std.js'; +import type { AbortableProcess } from '../util/AbortableProcess.std.ts'; import type { ChatKind, IChatConnection, IncomingWebSocketRequest, -} from './WebsocketResources.preload.js'; +} from './WebsocketResources.preload.ts'; import { connectAuthenticated, connectUnauthenticated, ServerRequestType, -} from './WebsocketResources.preload.js'; -import { ConnectTimeoutError } from './Errors.std.js'; +} from './WebsocketResources.preload.ts'; +import { ConnectTimeoutError } from './Errors.std.ts'; import type { IRequestHandler, WebAPICredentials } from './Types.d.ts'; -import type { ServerAlert } from '../types/ServerAlert.std.js'; -import { getUserLanguages } from '../util/userLanguages.std.js'; +import type { ServerAlert } from '../types/ServerAlert.std.ts'; +import { getUserLanguages } from '../util/userLanguages.std.ts'; const log = createLogger('SocketManager'); diff --git a/ts/textsecure/Storage.preload.ts b/ts/textsecure/Storage.preload.ts index e6b4b759b9..f587f32c44 100644 --- a/ts/textsecure/Storage.preload.ts +++ b/ts/textsecure/Storage.preload.ts @@ -5,11 +5,11 @@ import type { StorageAccessType as Access, StorageInterface, } from '../types/Storage.d.ts'; -import { User } from './storage/User.dom.js'; -import { Blocked } from './storage/Blocked.std.js'; +import { User } from './storage/User.dom.ts'; +import { Blocked } from './storage/Blocked.std.ts'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { createLogger } from '../logging/log.std.js'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('Storage'); diff --git a/ts/textsecure/TaskWithTimeout.std.ts b/ts/textsecure/TaskWithTimeout.std.ts index 299ea6a6ad..44ccd94f91 100644 --- a/ts/textsecure/TaskWithTimeout.std.ts +++ b/ts/textsecure/TaskWithTimeout.std.ts @@ -1,10 +1,10 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { MINUTE } from '../util/durations/index.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { createLogger } from '../logging/log.std.js'; +import { MINUTE } from '../util/durations/index.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const TICK_INTERVAL = MINUTE / 2; diff --git a/ts/textsecure/Types.d.ts b/ts/textsecure/Types.d.ts index 53f3af3f25..d6df8d6c05 100644 --- a/ts/textsecure/Types.d.ts +++ b/ts/textsecure/Types.d.ts @@ -3,20 +3,20 @@ import type * as client from '@signalapp/libsignal-client'; -import type { SignalService as Proto } from '../protobuf/index.std.js'; -import type { IncomingWebSocketRequest } from './WebsocketResources.preload.js'; +import type { SignalService as Proto } from '../protobuf/index.std.ts'; +import type { IncomingWebSocketRequest } from './WebsocketResources.preload.ts'; import type { ServiceIdString, AciString, PniString, -} from '../types/ServiceId.std.js'; -import type { TextAttachmentType } from '../types/Attachment.std.js'; -import type { GiftBadgeStates } from '../types/GiftBadgeStates.std.js'; -import type { MIMEType } from '../types/MIME.std.js'; -import type { DurationInSeconds } from '../util/durations/index.std.js'; -import type { AnyPaymentEvent } from '../types/Payment.std.js'; -import type { RawBodyRange } from '../types/BodyRange.std.js'; -import type { StoryMessageRecipientsType } from '../types/Stories.std.js'; +} from '../types/ServiceId.std.ts'; +import type { TextAttachmentType } from '../types/Attachment.std.ts'; +import type { GiftBadgeStates } from '../types/GiftBadgeStates.std.ts'; +import type { MIMEType } from '../types/MIME.std.ts'; +import type { DurationInSeconds } from '../util/durations/index.std.ts'; +import type { AnyPaymentEvent } from '../types/Payment.std.ts'; +import type { RawBodyRange } from '../types/BodyRange.std.ts'; +import type { StoryMessageRecipientsType } from '../types/Stories.std.ts'; export { IdentityKeyType, @@ -31,7 +31,7 @@ export { SignedPreKeyIdType, SignedPreKeyType, UnprocessedType, -} from '../sql/Interface.std.js'; +} from '../sql/Interface.std.ts'; export type StorageServiceCallOptionsType = { credentials?: StorageServiceCredentials; diff --git a/ts/textsecure/UpdateKeysListener.preload.ts b/ts/textsecure/UpdateKeysListener.preload.ts index 9a0d59070d..d0565fa27f 100644 --- a/ts/textsecure/UpdateKeysListener.preload.ts +++ b/ts/textsecure/UpdateKeysListener.preload.ts @@ -1,16 +1,16 @@ // Copyright 2017 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as durations from '../util/durations/index.std.js'; -import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.js'; -import * as Registration from '../util/registration.preload.js'; -import { ServiceIdKind } from '../types/ServiceId.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { isOnline } from './WebAPI.preload.js'; -import { itemStorage } from './Storage.preload.js'; -import { accountManager } from './AccountManager.preload.js'; +import * as durations from '../util/durations/index.std.ts'; +import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary.std.ts'; +import * as Registration from '../util/registration.preload.ts'; +import { ServiceIdKind } from '../types/ServiceId.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { isOnline } from './WebAPI.preload.ts'; +import { itemStorage } from './Storage.preload.ts'; +import { accountManager } from './AccountManager.preload.ts'; const log = createLogger('UpdateKeysListener'); diff --git a/ts/textsecure/Utils.dom.ts b/ts/textsecure/Utils.dom.ts index d7d251da9e..ea63ddf30f 100644 --- a/ts/textsecure/Utils.dom.ts +++ b/ts/textsecure/Utils.dom.ts @@ -1,7 +1,7 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { HTTPError } from '../types/HTTPError.std.js'; +import type { HTTPError } from '../types/HTTPError.std.ts'; export async function handleStatusCode(status: number): Promise { if (status === 499) { diff --git a/ts/textsecure/WebAPI.preload.ts b/ts/textsecure/WebAPI.preload.ts index 949e3e225c..e509dc7848 100644 --- a/ts/textsecure/WebAPI.preload.ts +++ b/ts/textsecure/WebAPI.preload.ts @@ -27,35 +27,35 @@ import type { import { GroupSendFullToken } from '@signalapp/libsignal-client/zkgroup.js'; import type { Request as KTRequest } from '@signalapp/libsignal-client/dist/net/KeyTransparency.js'; -import { assertDev, strictAssert } from '../util/assert.std.js'; -import * as durations from '../util/durations/index.std.js'; -import type { ExplodePromiseResultType } from '../util/explodePromise.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { getUserAgent } from '../util/getUserAgent.node.js'; -import { getTimeoutStream } from '../util/getStreamWithTimeout.node.js'; +import { assertDev, strictAssert } from '../util/assert.std.ts'; +import * as durations from '../util/durations/index.std.ts'; +import type { ExplodePromiseResultType } from '../util/explodePromise.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { getUserAgent } from '../util/getUserAgent.node.ts'; +import { getTimeoutStream } from '../util/getStreamWithTimeout.node.ts'; import { toWebSafeBase64, fromWebSafeBase64, -} from '../util/webSafeBase64.std.js'; -import { getBasicAuth } from '../util/getBasicAuth.std.js'; -import { createHTTPSAgent } from '../util/createHTTPSAgent.node.js'; -import { createProxyAgent } from '../util/createProxyAgent.node.js'; -import type { ProxyAgent } from '../util/createProxyAgent.node.js'; -import type { FetchFunctionType } from '../util/uploads/tusProtocol.node.js'; -import { VerificationTransport } from '../types/VerificationTransport.std.js'; +} from '../util/webSafeBase64.std.ts'; +import { getBasicAuth } from '../util/getBasicAuth.std.ts'; +import { createHTTPSAgent } from '../util/createHTTPSAgent.node.ts'; +import { createProxyAgent } from '../util/createProxyAgent.node.ts'; +import type { ProxyAgent } from '../util/createProxyAgent.node.ts'; +import type { FetchFunctionType } from '../util/uploads/tusProtocol.node.ts'; +import { VerificationTransport } from '../types/VerificationTransport.std.ts'; import type { CapabilitiesType, CapabilitiesUploadType, } from '../types/Capabilities.d.ts'; import type { HeaderListType } from '../types/WebAPI.d.ts'; -import { ZERO_ACCESS_KEY } from '../types/SealedSender.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import { isPackIdValid, redactPackId } from '../util/Stickers.std.js'; +import { ZERO_ACCESS_KEY } from '../types/SealedSender.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import { isPackIdValid, redactPackId } from '../util/Stickers.std.ts'; import type { ServiceIdString, AciString, UntaggedPniString, -} from '../types/ServiceId.std.js'; +} from '../types/ServiceId.std.ts'; import { fromAciObject, ServiceIdKind, @@ -63,22 +63,22 @@ import { aciSchema, untaggedPniSchema, fromServiceIdObject, -} from '../types/ServiceId.std.js'; -import type { BackupPresentationHeadersType } from '../types/backups.node.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { getRandomBytes, randomInt } from '../Crypto.node.js'; -import * as linkPreviewFetch from '../linkPreviews/linkPreviewFetch.preload.js'; -import { isBadgeImageFileUrlValid } from '../badges/isBadgeImageFileUrlValid.std.js'; +} from '../types/ServiceId.std.ts'; +import type { BackupPresentationHeadersType } from '../types/backups.node.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { getRandomBytes, randomInt } from '../Crypto.node.ts'; +import * as linkPreviewFetch from '../linkPreviews/linkPreviewFetch.preload.ts'; +import { isBadgeImageFileUrlValid } from '../badges/isBadgeImageFileUrlValid.std.ts'; import { SocketManager, type SocketStatuses, type SocketExpirationReason, -} from './SocketManager.preload.js'; +} from './SocketManager.preload.ts'; import type { CDSAuthType, CDSResponseType } from './cds/Types.d.ts'; -import { CDSI } from './cds/CDSI.node.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +import { CDSI } from './cds/CDSI.node.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; import type { WebAPICredentials, @@ -86,43 +86,43 @@ import type { StorageServiceCallOptionsType, StorageServiceCredentials, } from './Types.d.ts'; -import { handleStatusCode, translateError } from './Utils.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import { maybeParseUrl, urlPathFromComponents } from '../util/url.std.js'; -import { HOUR, MINUTE, SECOND } from '../util/durations/index.std.js'; -import { safeParseNumber } from '../util/numbers.std.js'; -import { getLibsignalNet } from './preconnect.preload.js'; -import type { GroupSendToken } from '../types/GroupSendEndorsements.std.js'; +import { handleStatusCode, translateError } from './Utils.dom.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { maybeParseUrl, urlPathFromComponents } from '../util/url.std.ts'; +import { HOUR, MINUTE, SECOND } from '../util/durations/index.std.ts'; +import { safeParseNumber } from '../util/numbers.std.ts'; +import { getLibsignalNet } from './preconnect.preload.ts'; +import type { GroupSendToken } from '../types/GroupSendEndorsements.std.ts'; import { parseUnknown, safeParseUnknown, type Schema, -} from '../util/schemas.std.js'; +} from '../util/schemas.std.ts'; import type { ProfileFetchAuthRequestOptions, ProfileFetchUnauthRequestOptions, -} from '../services/profiles.preload.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { isProduction } from '../util/version.std.js'; -import type { ServerAlert } from '../types/ServerAlert.std.js'; -import { isAbortError } from '../util/isAbortError.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { drop } from '../util/drop.std.js'; -import { subscriptionConfigurationCurrencyZod } from '../types/Donations.std.js'; +} from '../services/profiles.preload.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { isProduction } from '../util/version.std.ts'; +import type { ServerAlert } from '../types/ServerAlert.std.ts'; +import { isAbortError } from '../util/isAbortError.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { subscriptionConfigurationCurrencyZod } from '../types/Donations.std.ts'; import type { StripeDonationAmount, CardDetail, -} from '../types/Donations.std.js'; -import { badgeFromServerSchema } from '../badges/parseBadgesFromServer.std.js'; -import { ZERO_DECIMAL_CURRENCIES } from '../util/currency.dom.js'; -import type { JobCancelReason } from '../jobs/types.std.js'; +} from '../types/Donations.std.ts'; +import { badgeFromServerSchema } from '../badges/parseBadgesFromServer.std.ts'; +import { ZERO_DECIMAL_CURRENCIES } from '../util/currency.dom.ts'; +import type { JobCancelReason } from '../jobs/types.std.ts'; import { RemoteMegaphoneCtaDataSchema, type RemoteMegaphoneId, -} from '../types/Megaphone.std.js'; -import { bindRemoteConfigToLibsignalNet } from '../LibsignalNetRemoteConfig.preload.js'; -import { KeyTransparencyStore } from '../LibSignalStores.node.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; +} from '../types/Megaphone.std.ts'; +import { bindRemoteConfigToLibsignalNet } from '../LibsignalNetRemoteConfig.preload.ts'; +import { KeyTransparencyStore } from '../LibSignalStores.node.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; const { escapeRegExp, isNumber, throttle } = lodash; diff --git a/ts/textsecure/WebsocketResources.preload.ts b/ts/textsecure/WebsocketResources.preload.ts index 50ce2c5d7e..825629c444 100644 --- a/ts/textsecure/WebsocketResources.preload.ts +++ b/ts/textsecure/WebsocketResources.preload.ts @@ -35,22 +35,22 @@ import type { ConnectionEventsListener, UnauthenticatedChatConnection, } from '@signalapp/libsignal-client/dist/net/Chat.js'; -import type { EventHandler } from './EventTarget.std.js'; -import EventTarget from './EventTarget.std.js'; +import type { EventHandler } from './EventTarget.std.ts'; +import EventTarget from './EventTarget.std.ts'; -import * as durations from '../util/durations/index.std.js'; -import { drop } from '../util/drop.std.js'; -import { isOlderThan } from '../util/timestamp.std.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Timers from '../Timers.preload.js'; +import * as durations from '../util/durations/index.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { isOlderThan } from '../util/timestamp.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Timers from '../Timers.preload.ts'; -import { AbortableProcess } from '../util/AbortableProcess.std.js'; +import { AbortableProcess } from '../util/AbortableProcess.std.ts'; import type { WebAPICredentials } from './Types.d.ts'; -import { NORMAL_DISCONNECT_CODE } from './SocketManager.preload.js'; -import { parseUnknown } from '../util/schemas.std.js'; -import { parseServerAlertsFromHeader } from '../util/handleServerAlerts.preload.js'; -import type { ServerAlert } from '../types/ServerAlert.std.js'; +import { NORMAL_DISCONNECT_CODE } from './SocketManager.preload.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; +import { parseServerAlertsFromHeader } from '../util/handleServerAlerts.preload.ts'; +import type { ServerAlert } from '../types/ServerAlert.std.ts'; const log = createLogger('WebsocketResources'); diff --git a/ts/textsecure/cds/CDSBase.node.ts b/ts/textsecure/cds/CDSBase.node.ts index 33164d1bc1..c9249b6bbd 100644 --- a/ts/textsecure/cds/CDSBase.node.ts +++ b/ts/textsecure/cds/CDSBase.node.ts @@ -6,11 +6,11 @@ import type { CDSRequestOptionsType, CDSResponseType, } from './Types.d.ts'; -import type { LoggerType } from '../../types/Logging.std.js'; -import { isOlderThan } from '../../util/timestamp.std.js'; -import { HOUR } from '../../util/durations/index.std.js'; -import { createProxyAgent } from '../../util/createProxyAgent.node.js'; -import type { ProxyAgent } from '../../util/createProxyAgent.node.js'; +import type { LoggerType } from '../../types/Logging.std.ts'; +import { isOlderThan } from '../../util/timestamp.std.ts'; +import { HOUR } from '../../util/durations/index.std.ts'; +import { createProxyAgent } from '../../util/createProxyAgent.node.ts'; +import type { ProxyAgent } from '../../util/createProxyAgent.node.ts'; // It is 24 hours, but we don't want latency between server and client to be // count. diff --git a/ts/textsecure/cds/CDSI.node.ts b/ts/textsecure/cds/CDSI.node.ts index 7b4bc34362..7a8f980710 100644 --- a/ts/textsecure/cds/CDSI.node.ts +++ b/ts/textsecure/cds/CDSI.node.ts @@ -10,11 +10,11 @@ import { LibSignalErrorBase, } from '@signalapp/libsignal-client'; import pTimeout from 'p-timeout'; -import type { CDSBaseOptionsType } from './CDSBase.node.js'; -import { CDSBase } from './CDSBase.node.js'; +import type { CDSBaseOptionsType } from './CDSBase.node.ts'; +import { CDSBase } from './CDSBase.node.ts'; import type { CDSRequestOptionsType, CDSResponseType } from './Types.d.ts'; -import { sleep } from '../../util/sleep.std.js'; -import * as durations from '../../util/durations/index.std.js'; +import { sleep } from '../../util/sleep.std.ts'; +import * as durations from '../../util/durations/index.std.ts'; export type CDSIOptionsType = CDSBaseOptionsType; diff --git a/ts/textsecure/cds/Types.d.ts b/ts/textsecure/cds/Types.d.ts index 3306b1182c..013c79f68d 100644 --- a/ts/textsecure/cds/Types.d.ts +++ b/ts/textsecure/cds/Types.d.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { Net } from '@signalapp/libsignal-client'; -import type { AciString, PniString } from '../../types/ServiceId.std.js'; +import type { AciString, PniString } from '../../types/ServiceId.std.ts'; export type CDSAuthType = Net.ServiceAuth; export type CDSResponseEntryType = Net.CDSResponseEntryType< diff --git a/ts/textsecure/downloadAttachment.preload.ts b/ts/textsecure/downloadAttachment.preload.ts index 39ea8e5ef3..939046504f 100644 --- a/ts/textsecure/downloadAttachment.preload.ts +++ b/ts/textsecure/downloadAttachment.preload.ts @@ -9,22 +9,22 @@ import { Transform } from 'node:stream'; import { pipeline } from 'node:stream/promises'; import fsExtra from 'fs-extra'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; import { getAbsoluteDownloadsPath, getAbsoluteAttachmentPath, -} from '../util/migrations.preload.js'; -import { hasRequiredInformationForRemoteBackup } from '../util/Attachment.std.js'; +} from '../util/migrations.preload.ts'; +import { hasRequiredInformationForRemoteBackup } from '../util/Attachment.std.ts'; import { AttachmentSizeError, type AttachmentType, AttachmentVariant, AttachmentPermanentlyUndownloadableError, type BackupableAttachmentType, -} from '../types/Attachment.std.js'; -import * as Bytes from '../Bytes.std.js'; +} from '../types/Attachment.std.ts'; +import * as Bytes from '../Bytes.std.ts'; import { safeUnlink, splitKeys, @@ -32,33 +32,33 @@ import { decryptAndReencryptLocally, measureSize, type IntegrityCheckType, -} from '../AttachmentCrypto.node.js'; +} from '../AttachmentCrypto.node.ts'; import type { ProcessedAttachment } from './Types.d.ts'; import type { getAttachment, getAttachmentFromBackupTier, -} from './WebAPI.preload.js'; -import { getAttachmentCiphertextSize } from '../util/AttachmentCrypto.std.js'; -import { createName, getRelativePath } from '../util/attachmentPath.node.js'; -import { MediaTier } from '../types/AttachmentDownload.std.js'; +} from './WebAPI.preload.ts'; +import { getAttachmentCiphertextSize } from '../util/AttachmentCrypto.std.ts'; +import { createName, getRelativePath } from '../util/attachmentPath.node.ts'; +import { MediaTier } from '../types/AttachmentDownload.std.ts'; import { getBackupMediaRootKey, deriveBackupMediaKeyMaterial, type BackupMediaKeyMaterialType, deriveBackupThumbnailTransitKeyMaterial, -} from '../services/backups/crypto.preload.js'; -import { backupsService } from '../services/backups/index.preload.js'; +} from '../services/backups/crypto.preload.ts'; +import { backupsService } from '../services/backups/index.preload.ts'; import { getMediaIdForAttachment, getMediaIdForAttachmentThumbnail, -} from '../services/backups/util/mediaId.preload.js'; -import { MAX_BACKUP_THUMBNAIL_SIZE } from '../types/VisualAttachment.dom.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { IV_LENGTH, MAC_LENGTH } from '../types/Crypto.std.js'; -import { BackupCredentialType } from '../types/backups.node.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { getValue } from '../RemoteConfig.dom.js'; -import { parseIntOrThrow } from '../util/parseIntOrThrow.std.js'; +} from '../services/backups/util/mediaId.preload.ts'; +import { MAX_BACKUP_THUMBNAIL_SIZE } from '../types/VisualAttachment.dom.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { IV_LENGTH, MAC_LENGTH } from '../types/Crypto.std.ts'; +import { BackupCredentialType } from '../types/backups.node.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { getValue } from '../RemoteConfig.dom.ts'; +import { parseIntOrThrow } from '../util/parseIntOrThrow.std.ts'; const { ensureFile } = fsExtra; diff --git a/ts/textsecure/getKeysForServiceId.preload.ts b/ts/textsecure/getKeysForServiceId.preload.ts index 353fd4b895..2538f2add9 100644 --- a/ts/textsecure/getKeysForServiceId.preload.ts +++ b/ts/textsecure/getKeysForServiceId.preload.ts @@ -14,23 +14,23 @@ import { import { OutgoingIdentityKeyError, UnregisteredUserError, -} from './Errors.std.js'; -import { Sessions, IdentityKeys } from '../LibSignalStores.node.js'; -import { Address } from '../types/Address.std.js'; -import { QualifiedAddress } from '../types/QualifiedAddress.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; +} from './Errors.std.ts'; +import { Sessions, IdentityKeys } from '../LibSignalStores.node.ts'; +import { Address } from '../types/Address.std.ts'; +import { QualifiedAddress } from '../types/QualifiedAddress.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; import type { getKeysForServiceId as doGetKeysForServiceId, getKeysForServiceIdUnauth, ServerKeysType, -} from './WebAPI.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { isRecord } from '../util/isRecord.std.js'; -import type { GroupSendToken } from '../types/GroupSendEndorsements.std.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { onFailedToSendWithEndorsements } from '../util/groupSendEndorsements.preload.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { itemStorage } from './Storage.preload.js'; +} from './WebAPI.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { isRecord } from '../util/isRecord.std.ts'; +import type { GroupSendToken } from '../types/GroupSendEndorsements.std.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { onFailedToSendWithEndorsements } from '../util/groupSendEndorsements.preload.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { itemStorage } from './Storage.preload.ts'; const log = createLogger('getKeysForServiceId'); diff --git a/ts/textsecure/messageReceiverEvents.std.ts b/ts/textsecure/messageReceiverEvents.std.ts index bfcc1a0677..d373f4dc30 100644 --- a/ts/textsecure/messageReceiverEvents.std.ts +++ b/ts/textsecure/messageReceiverEvents.std.ts @@ -4,14 +4,14 @@ import type { PublicKey } from '@signalapp/libsignal-client'; import { z } from 'zod'; -import type { SignalService as Proto } from '../protobuf/index.std.js'; +import type { SignalService as Proto } from '../protobuf/index.std.ts'; import { type ServiceIdString, type AciString, isPniString, -} from '../types/ServiceId.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import type { StoryMessageRecipientsType } from '../types/Stories.std.js'; +} from '../types/ServiceId.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import type { StoryMessageRecipientsType } from '../types/Stories.std.ts'; import type { ProcessedEnvelope, ProcessedDataMessage, @@ -21,9 +21,9 @@ import type { import type { CallEventDetails, CallLogEventDetails, -} from '../types/CallDisposition.std.js'; -import type { CallLinkUpdateSyncType } from '../types/CallLink.std.js'; -import { isAciString } from '../util/isAciString.std.js'; +} from '../types/CallDisposition.std.ts'; +import type { CallLinkUpdateSyncType } from '../types/CallLink.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; export class EmptyEvent extends Event { constructor() { diff --git a/ts/textsecure/preconnect.preload.ts b/ts/textsecure/preconnect.preload.ts index 81bdab1c7b..79fc3443b3 100644 --- a/ts/textsecure/preconnect.preload.ts +++ b/ts/textsecure/preconnect.preload.ts @@ -3,14 +3,14 @@ import { Net } from '@signalapp/libsignal-client'; -import { getUserAgent } from '../util/getUserAgent.node.js'; -import { isStagingServer } from '../util/isStagingServer.dom.js'; -import { getMockServerPort } from '../util/getMockServerPort.dom.js'; -import { isMockServer } from '../util/isMockServer.dom.js'; -import { pemToDer } from '../util/pemToDer.std.js'; -import { drop } from '../util/drop.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; +import { getUserAgent } from '../util/getUserAgent.node.ts'; +import { isStagingServer } from '../util/isStagingServer.dom.ts'; +import { getMockServerPort } from '../util/getMockServerPort.dom.ts'; +import { isMockServer } from '../util/isMockServer.dom.ts'; +import { pemToDer } from '../util/pemToDer.std.ts'; +import { drop } from '../util/drop.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('preconnect'); diff --git a/ts/textsecure/processDataMessage.preload.ts b/ts/textsecure/processDataMessage.preload.ts index 63b70223e8..beb8497427 100644 --- a/ts/textsecure/processDataMessage.preload.ts +++ b/ts/textsecure/processDataMessage.preload.ts @@ -4,17 +4,17 @@ import { ReceiptCredentialPresentation } from '@signalapp/libsignal-client/zkgroup.js'; import lodash from 'lodash'; -import { assertDev, strictAssert } from '../util/assert.std.js'; -import { dropNull } from '../util/dropNull.std.js'; +import { assertDev, strictAssert } from '../util/assert.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; import { fromAciUuidBytes, fromAciUuidBytesOrString, -} from '../util/ServiceId.node.js'; -import { getTimestampFromLong } from '../util/timestampLongUtils.std.js'; -import { isKnownProtoEnumMember } from '../util/isKnownProtoEnumMember.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { deriveGroupFields } from '../groups.preload.js'; -import * as Bytes from '../Bytes.std.js'; +} from '../util/ServiceId.node.ts'; +import { getTimestampFromLong } from '../util/timestampLongUtils.std.ts'; +import { isKnownProtoEnumMember } from '../util/isKnownProtoEnumMember.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { deriveGroupFields } from '../groups.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; import type { ProcessedAttachment, @@ -35,27 +35,27 @@ import type { ProcessedPinMessage, ProcessedUnpinMessage, } from './Types.d.ts'; -import { GiftBadgeStates } from '../types/GiftBadgeStates.std.js'; -import type { RawBodyRange } from '../types/BodyRange.std.js'; +import { GiftBadgeStates } from '../types/GiftBadgeStates.std.ts'; +import type { RawBodyRange } from '../types/BodyRange.std.ts'; import { APPLICATION_OCTET_STREAM, stringToMIMEType, -} from '../types/MIME.std.js'; +} from '../types/MIME.std.ts'; import { SECOND, DurationInSeconds, HOUR, -} from '../util/durations/index.std.js'; -import type { AnyPaymentEvent } from '../types/Payment.std.js'; -import { PaymentEventKind } from '../types/Payment.std.js'; -import { filterAndClean } from '../util/BodyRange.node.js'; -import { bytesToUuid } from '../util/uuidToBytes.std.js'; -import { createName } from '../util/attachmentPath.node.js'; -import { partitionBodyAndNormalAttachments } from '../util/Attachment.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../util/durations/index.std.ts'; +import type { AnyPaymentEvent } from '../types/Payment.std.ts'; +import { PaymentEventKind } from '../types/Payment.std.ts'; +import { filterAndClean } from '../util/BodyRange.node.ts'; +import { bytesToUuid } from '../util/uuidToBytes.std.ts'; +import { createName } from '../util/attachmentPath.node.ts'; +import { partitionBodyAndNormalAttachments } from '../util/Attachment.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { createLogger } from '../logging/log.std.ts'; -import { toNumber } from '../util/toNumber.std.js'; +import { toNumber } from '../util/toNumber.std.ts'; const { isNumber } = lodash; diff --git a/ts/textsecure/processSyncMessage.node.ts b/ts/textsecure/processSyncMessage.node.ts index c3291f78f7..d1754c115f 100644 --- a/ts/textsecure/processSyncMessage.node.ts +++ b/ts/textsecure/processSyncMessage.node.ts @@ -1,10 +1,10 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { SignalService as Proto } from '../protobuf/index.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { normalizeStoryDistributionId } from '../types/StoryDistributionId.std.js'; -import { fromServiceIdBinaryOrString } from '../util/ServiceId.node.js'; +import type { SignalService as Proto } from '../protobuf/index.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { normalizeStoryDistributionId } from '../types/StoryDistributionId.std.ts'; +import { fromServiceIdBinaryOrString } from '../util/ServiceId.node.ts'; import type { ProcessedSent } from './Types.d.ts'; type ProtoServiceId = Readonly<{ diff --git a/ts/textsecure/storage/Blocked.std.ts b/ts/textsecure/storage/Blocked.std.ts index f39c933bd5..c130a7b479 100644 --- a/ts/textsecure/storage/Blocked.std.ts +++ b/ts/textsecure/storage/Blocked.std.ts @@ -3,11 +3,11 @@ import lodash from 'lodash'; -import { createLogger } from '../../logging/log.std.js'; -import * as Bytes from '../../Bytes.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Bytes from '../../Bytes.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; import type { StorageInterface } from '../../types/Storage.d.ts'; -import type { AciString, ServiceIdString } from '../../types/ServiceId.std.js'; +import type { AciString, ServiceIdString } from '../../types/ServiceId.std.ts'; const { without } = lodash; diff --git a/ts/textsecure/storage/User.dom.ts b/ts/textsecure/storage/User.dom.ts index 5f1bcc5300..bab44924ea 100644 --- a/ts/textsecure/storage/User.dom.ts +++ b/ts/textsecure/storage/User.dom.ts @@ -3,17 +3,17 @@ import type { WebAPICredentials } from '../Types.d.ts'; -import { strictAssert } from '../../util/assert.std.js'; +import { strictAssert } from '../../util/assert.std.ts'; import type { StorageInterface } from '../../types/Storage.d.ts'; import type { AciString, PniString, ServiceIdString, -} from '../../types/ServiceId.std.js'; -import { ServiceIdKind, isPniString } from '../../types/ServiceId.std.js'; -import { isAciString } from '../../util/isAciString.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import { unencodeNumber } from '../../util/unencodeNumber.std.js'; +} from '../../types/ServiceId.std.ts'; +import { ServiceIdKind, isPniString } from '../../types/ServiceId.std.ts'; +import { isAciString } from '../../util/isAciString.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { unencodeNumber } from '../../util/unencodeNumber.std.ts'; const log = createLogger('User'); diff --git a/ts/textsecure/syncRequests.preload.ts b/ts/textsecure/syncRequests.preload.ts index 8e20c5939f..8913f8a2d4 100644 --- a/ts/textsecure/syncRequests.preload.ts +++ b/ts/textsecure/syncRequests.preload.ts @@ -1,10 +1,10 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import { MessageSender } from './SendMessage.preload.js'; -import { toLogFormat } from '../types/errors.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import { MessageSender } from './SendMessage.preload.ts'; +import { toLogFormat } from '../types/errors.std.ts'; const log = createLogger('syncRequests'); diff --git a/ts/types/Address.std.ts b/ts/types/Address.std.ts index 738f933d5b..920228714e 100644 --- a/ts/types/Address.std.ts +++ b/ts/types/Address.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ServiceIdString } from './ServiceId.std.js'; +import type { ServiceIdString } from './ServiceId.std.ts'; export type AddressStringType = `${ServiceIdString}.${number}`; diff --git a/ts/types/Attachment.std.ts b/ts/types/Attachment.std.ts index b62cee7bc1..f4430b5036 100644 --- a/ts/types/Attachment.std.ts +++ b/ts/types/Attachment.std.ts @@ -1,13 +1,13 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LinkPreviewForUIType } from './message/LinkPreviews.std.js'; -import type { MIMEType } from './MIME.std.js'; +import type { LinkPreviewForUIType } from './message/LinkPreviews.std.ts'; +import type { MIMEType } from './MIME.std.ts'; import type { WithOptionalProperties, WithRequiredProperties, -} from './Util.std.js'; -import type { SignalService as Proto } from '../protobuf/index.std.js'; +} from './Util.std.ts'; +import type { SignalService as Proto } from '../protobuf/index.std.ts'; export type ThumbnailType = EphemeralAttachmentFields & { size: number; diff --git a/ts/types/AttachmentBackup.std.ts b/ts/types/AttachmentBackup.std.ts index b49282c29c..2b7b89ed66 100644 --- a/ts/types/AttachmentBackup.std.ts +++ b/ts/types/AttachmentBackup.std.ts @@ -4,8 +4,8 @@ import { z } from 'zod'; import { type JobManagerJobType, jobManagerJobSchema, -} from '../jobs/JobManager.std.js'; -import { type MIMEType, MIMETypeSchema } from './MIME.std.js'; +} from '../jobs/JobManager.std.ts'; +import { type MIMEType, MIMETypeSchema } from './MIME.std.ts'; export type CoreAttachmentBackupJobType = | StandardAttachmentBackupJobType diff --git a/ts/types/AttachmentDownload.std.ts b/ts/types/AttachmentDownload.std.ts index ca54b74f3e..c6e46e600c 100644 --- a/ts/types/AttachmentDownload.std.ts +++ b/ts/types/AttachmentDownload.std.ts @@ -1,13 +1,13 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; -import { MIMETypeSchema, type MIMEType } from './MIME.std.js'; -import type { AttachmentType } from './Attachment.std.js'; +import { MIMETypeSchema, type MIMEType } from './MIME.std.ts'; +import type { AttachmentType } from './Attachment.std.ts'; import { type JobManagerJobType, jobManagerJobSchema, -} from '../jobs/JobManager.std.js'; -import { AttachmentDownloadSource } from '../sql/Interface.std.js'; +} from '../jobs/JobManager.std.ts'; +import { AttachmentDownloadSource } from '../sql/Interface.std.ts'; export enum MediaTier { STANDARD = 'standard', diff --git a/ts/types/AttachmentSize.std.ts b/ts/types/AttachmentSize.std.ts index 521e8f73bd..d116f123b8 100644 --- a/ts/types/AttachmentSize.std.ts +++ b/ts/types/AttachmentSize.std.ts @@ -1,9 +1,9 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { parseIntOrThrow } from '../util/parseIntOrThrow.std.js'; -import type * as RemoteConfig from '../RemoteConfig.dom.js'; +import { createLogger } from '../logging/log.std.ts'; +import { parseIntOrThrow } from '../util/parseIntOrThrow.std.ts'; +import type * as RemoteConfig from '../RemoteConfig.dom.ts'; const log = createLogger('AttachmentSize'); diff --git a/ts/types/Avatar.std.ts b/ts/types/Avatar.std.ts index 200e01f6b1..dcc2ac829e 100644 --- a/ts/types/Avatar.std.ts +++ b/ts/types/Avatar.std.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AvatarColorType } from './Colors.std.js'; -import type { AddressableAttachmentType } from './Attachment.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import type { AvatarColorType } from './Colors.std.ts'; +import type { AddressableAttachmentType } from './Attachment.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; export const PersonalAvatarIcons = [ 'abstract_01', diff --git a/ts/types/BodyRange.std.ts b/ts/types/BodyRange.std.ts index 7af43c394c..7f80e6774f 100644 --- a/ts/types/BodyRange.std.ts +++ b/ts/types/BodyRange.std.ts @@ -4,17 +4,17 @@ import lodash from 'lodash'; import * as z from 'zod'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; import { SNIPPET_LEFT_PLACEHOLDER, SNIPPET_RIGHT_PLACEHOLDER, SNIPPET_TRUNCATION_PLACEHOLDER, -} from '../util/search.std.js'; -import { assertDev } from '../util/assert.std.js'; -import { aciSchema, type AciString } from './ServiceId.std.js'; +} from '../util/search.std.ts'; +import { assertDev } from '../util/assert.std.ts'; +import { aciSchema, type AciString } from './ServiceId.std.ts'; import { signalservice } from '../protobuf/compiled.std.js'; const { isEqual, isNumber, omit, orderBy, partition } = lodash; diff --git a/ts/types/CallDisposition.std.ts b/ts/types/CallDisposition.std.ts index d75f743151..52d92805a2 100644 --- a/ts/types/CallDisposition.std.ts +++ b/ts/types/CallDisposition.std.ts @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; -import type { AciString } from './ServiceId.std.js'; -import { aciSchema } from './ServiceId.std.js'; -import { bytesToUuid } from '../util/uuidToBytes.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { UUID_BYTE_SIZE } from './Crypto.std.js'; +import type { AciString } from './ServiceId.std.ts'; +import { aciSchema } from './ServiceId.std.ts'; +import { bytesToUuid } from '../util/uuidToBytes.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { UUID_BYTE_SIZE } from './Crypto.std.ts'; -import { toNumber } from '../util/toNumber.std.js'; +import { toNumber } from '../util/toNumber.std.ts'; // These are strings (1) for the backup (2) for Storybook. export enum CallMode { diff --git a/ts/types/CallLink.std.ts b/ts/types/CallLink.std.ts index 9948f4f537..1af663e9f5 100644 --- a/ts/types/CallLink.std.ts +++ b/ts/types/CallLink.std.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyDeep } from 'type-fest'; import { z } from 'zod'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { safeParseInteger } from '../util/numbers.std.js'; -import { byteLength } from '../Bytes.std.js'; -import type { StorageServiceFieldsType } from '../sql/Interface.std.js'; -import { parsePartial } from '../util/schemas.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { safeParseInteger } from '../util/numbers.std.ts'; +import { byteLength } from '../Bytes.std.ts'; +import type { StorageServiceFieldsType } from '../sql/Interface.std.ts'; +import { parsePartial } from '../util/schemas.std.ts'; export enum CallLinkUpdateSyncType { Update = 'Update', diff --git a/ts/types/Calling.std.ts b/ts/types/Calling.std.ts index 27b2a955c3..a03d8b5509 100644 --- a/ts/types/Calling.std.ts +++ b/ts/types/Calling.std.ts @@ -3,10 +3,10 @@ import type { ReadonlyDeep } from 'type-fest'; import type { AudioDevice, Reaction as CallReaction } from '@signalapp/ringrtc'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { AciString, ServiceIdString } from './ServiceId.std.js'; -import type { CallLinkConversationType } from './CallLink.std.js'; -import type { CallMode } from './CallDisposition.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { AciString, ServiceIdString } from './ServiceId.std.ts'; +import type { CallLinkConversationType } from './CallLink.std.ts'; +import type { CallMode } from './CallDisposition.std.ts'; export const MAX_CALLING_REACTIONS = 5; export const CALLING_REACTIONS_LIFETIME = 4000; diff --git a/ts/types/ChatFolder.std.ts b/ts/types/ChatFolder.std.ts index 48b191e83c..d03bf90760 100644 --- a/ts/types/ChatFolder.std.ts +++ b/ts/types/ChatFolder.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; import type { Simplify } from 'type-fest'; -import * as grapheme from '../util/grapheme.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { isConversationUnread } from '../util/isConversationUnread.std.js'; +import * as grapheme from '../util/grapheme.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { isConversationUnread } from '../util/isConversationUnread.std.ts'; export const CHAT_FOLDER_NAME_MAX_CHAR_LENGTH = 32; diff --git a/ts/types/Colors.std.ts b/ts/types/Colors.std.ts index 6a5fb2196b..5e680b0645 100644 --- a/ts/types/Colors.std.ts +++ b/ts/types/Colors.std.ts @@ -1,7 +1,7 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { AxoTokens } from '../axo/AxoTokens.std.js'; +import { AxoTokens } from '../axo/AxoTokens.std.ts'; export const AvatarColorMap = new Map( AxoTokens.Avatar.getAllColorNames().map(colorName => { diff --git a/ts/types/Crypto.std.ts b/ts/types/Crypto.std.ts index 5d221f0cfb..0dfdba83fd 100644 --- a/ts/types/Crypto.std.ts +++ b/ts/types/Crypto.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { fromBase64, fromHex } from '../Bytes.std.js'; +import { fromBase64, fromHex } from '../Bytes.std.ts'; export enum HashType { size256 = 'sha256', diff --git a/ts/types/CurrentChatFolders.std.ts b/ts/types/CurrentChatFolders.std.ts index dc3a4d9dba..da2ca2ca6d 100644 --- a/ts/types/CurrentChatFolders.std.ts +++ b/ts/types/CurrentChatFolders.std.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { strictAssert } from '../util/assert.std.js'; -import { ChatFolderType } from './ChatFolder.std.js'; -import type { ChatFolder, ChatFolderId } from './ChatFolder.std.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { ChatFolderType } from './ChatFolder.std.ts'; +import type { ChatFolder, ChatFolderId } from './ChatFolder.std.ts'; export type CurrentChatFolder = ChatFolder & Readonly<{ diff --git a/ts/types/DonationsCardForm.std.ts b/ts/types/DonationsCardForm.std.ts index 9402198613..425494f30c 100644 --- a/ts/types/DonationsCardForm.std.ts +++ b/ts/types/DonationsCardForm.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import cardValidator from 'card-validator'; import creditCardType from 'credit-card-type'; -import { strictAssert } from '../util/assert.std.js'; -import type { CardDetail } from './Donations.std.js'; +import { strictAssert } from '../util/assert.std.ts'; +import type { CardDetail } from './Donations.std.ts'; export type CardFormat = Readonly<{ _debugName: string; diff --git a/ts/types/EmbeddedContact.std.ts b/ts/types/EmbeddedContact.std.ts index 310c9c1485..1885f17cfe 100644 --- a/ts/types/EmbeddedContact.std.ts +++ b/ts/types/EmbeddedContact.std.ts @@ -4,25 +4,25 @@ import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { isNotNil } from '../util/isNotNil.std.js'; +import { isNotNil } from '../util/isNotNil.std.ts'; import { format as formatPhoneNumber, normalize as normalizePhoneNumber, -} from './PhoneNumber.std.js'; +} from './PhoneNumber.std.ts'; import type { AttachmentType, AttachmentForUIType, AttachmentWithHydratedData, UploadedAttachmentType, -} from './Attachment.std.js'; -import { toLogFormat } from './errors.std.js'; -import type { ServiceIdString } from './ServiceId.std.js'; -import type { migrateDataToFileSystem } from '../util/attachments/migrateDataToFilesystem.std.js'; -import { getLocalAttachmentUrl } from '../util/getLocalAttachmentUrl.std.js'; -import type { ContextType } from './Message2.preload.js'; +} from './Attachment.std.ts'; +import { toLogFormat } from './errors.std.ts'; +import type { ServiceIdString } from './ServiceId.std.ts'; +import type { migrateDataToFileSystem } from '../util/attachments/migrateDataToFilesystem.std.ts'; +import { getLocalAttachmentUrl } from '../util/getLocalAttachmentUrl.std.ts'; +import type { ContextType } from './Message2.preload.ts'; const { omit } = lodash; diff --git a/ts/types/ErrorWithToast.std.ts b/ts/types/ErrorWithToast.std.ts index c93c4166b2..483b3ce970 100644 --- a/ts/types/ErrorWithToast.std.ts +++ b/ts/types/ErrorWithToast.std.ts @@ -1,7 +1,7 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ToastType } from './Toast.dom.js'; +import type { ToastType } from './Toast.dom.tsx'; export class ErrorWithToast extends Error { public toastType: ToastType; diff --git a/ts/types/ForwardDraft.std.ts b/ts/types/ForwardDraft.std.ts index ba27e4cd06..df000b41db 100644 --- a/ts/types/ForwardDraft.std.ts +++ b/ts/types/ForwardDraft.std.ts @@ -3,10 +3,10 @@ import lodash from 'lodash'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import type { AttachmentForUIType } from './Attachment.std.js'; -import { isVoiceMessage, isDownloaded } from '../util/Attachment.std.js'; -import type { HydratedBodyRangesType } from './BodyRange.std.js'; -import type { LinkPreviewForUIType } from './message/LinkPreviews.std.js'; +import type { AttachmentForUIType } from './Attachment.std.ts'; +import { isVoiceMessage, isDownloaded } from '../util/Attachment.std.ts'; +import type { HydratedBodyRangesType } from './BodyRange.std.ts'; +import type { LinkPreviewForUIType } from './message/LinkPreviews.std.ts'; const { orderBy } = lodash; diff --git a/ts/types/GroupMemberLabels.std.ts b/ts/types/GroupMemberLabels.std.ts index bdee660acf..616bffd01a 100644 --- a/ts/types/GroupMemberLabels.std.ts +++ b/ts/types/GroupMemberLabels.std.ts @@ -4,8 +4,8 @@ import type { ConversationType, MembershipType, -} from '../state/ducks/conversations.preload.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +} from '../state/ducks/conversations.preload.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; export const missingEmojiPlaceholder = '⍰'; diff --git a/ts/types/GroupSendEndorsements.std.ts b/ts/types/GroupSendEndorsements.std.ts index aea7b29fd6..13c44ad40f 100644 --- a/ts/types/GroupSendEndorsements.std.ts +++ b/ts/types/GroupSendEndorsements.std.ts @@ -1,9 +1,9 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; -import { aciSchema, type AciString } from './ServiceId.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { parseStrict } from '../util/schemas.std.js'; +import { aciSchema, type AciString } from './ServiceId.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { parseStrict } from '../util/schemas.std.ts'; const GROUPV2_ID_LENGTH = 32; // 32 bytes diff --git a/ts/types/I18N.std.ts b/ts/types/I18N.std.ts index 974024a597..8296ad42bc 100644 --- a/ts/types/I18N.std.ts +++ b/ts/types/I18N.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; -import type { LocalizerType } from './Util.std.js'; +import type { LocalizerType } from './Util.std.ts'; -export type { LocalizerType } from './Util.std.js'; +export type { LocalizerType } from './Util.std.ts'; type SmartlingConfigType = { placeholder_format_custom: string; diff --git a/ts/types/LinkPreview.std.ts b/ts/types/LinkPreview.std.ts index 54086c0fdf..b4909e2262 100644 --- a/ts/types/LinkPreview.std.ts +++ b/ts/types/LinkPreview.std.ts @@ -8,18 +8,18 @@ import lodash from 'lodash'; import nodeUrl from 'url'; import LinkifyIt from 'linkify-it'; -import { maybeParseUrl } from '../util/url.std.js'; -import { replaceEmojiWithSpaces } from '../util/emoji.std.js'; -import { count } from '../util/grapheme.std.js'; +import { maybeParseUrl } from '../util/url.std.ts'; +import { replaceEmojiWithSpaces } from '../util/emoji.std.ts'; +import { count } from '../util/grapheme.std.ts'; -import type { AttachmentWithHydratedData } from './Attachment.std.js'; +import type { AttachmentWithHydratedData } from './Attachment.std.ts'; import { artAddStickersRoute, groupInvitesRoute, linkCallRoute, -} from '../util/signalRoutes.std.js'; -import type { Backups } from '../protobuf/index.std.js'; -import type { LinkPreviewType } from './message/LinkPreviews.std.js'; +} from '../util/signalRoutes.std.ts'; +import type { Backups } from '../protobuf/index.std.ts'; +import type { LinkPreviewType } from './message/LinkPreviews.std.ts'; const { isNumber, compact, isEmpty, range } = lodash; diff --git a/ts/types/MediaItem.std.ts b/ts/types/MediaItem.std.ts index 2387eacf0f..b6ec16b459 100644 --- a/ts/types/MediaItem.std.ts +++ b/ts/types/MediaItem.std.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { MessageAttributesType, CustomError } from '../model-types.d.ts'; -import type { SendStateByConversationId } from '../messages/MessageSendState.std.js'; -import type { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import type { AttachmentForUIType } from './Attachment.std.js'; -import type { LinkPreviewForUIType } from './message/LinkPreviews.std.js'; -import type { ServiceIdString } from './ServiceId.std.js'; -import type { EmbeddedContactForUIType } from './EmbeddedContact.std.js'; +import type { SendStateByConversationId } from '../messages/MessageSendState.std.ts'; +import type { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import type { AttachmentForUIType } from './Attachment.std.ts'; +import type { LinkPreviewForUIType } from './message/LinkPreviews.std.ts'; +import type { ServiceIdString } from './ServiceId.std.ts'; +import type { EmbeddedContactForUIType } from './EmbeddedContact.std.ts'; export type MediaTabType = 'media' | 'audio' | 'links' | 'documents'; diff --git a/ts/types/Megaphone.std.ts b/ts/types/Megaphone.std.ts index 42d21ada5f..25fb351ae9 100644 --- a/ts/types/Megaphone.std.ts +++ b/ts/types/Megaphone.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; import type { Simplify } from 'type-fest'; -import { safeParsePartial } from '../util/schemas.std.js'; -import { DAY } from '../util/durations/index.std.js'; +import { safeParsePartial } from '../util/schemas.std.ts'; +import { DAY } from '../util/durations/index.std.ts'; const SNOOZE_DEFAULT_DURATION_DAYS = 3; const SNOOZE_DEFAULT_CTA_DATA: RemoteMegaphoneSnoozeCtaType = { diff --git a/ts/types/Message.std.ts b/ts/types/Message.std.ts index 6972c3b735..36ad1c2f17 100644 --- a/ts/types/Message.std.ts +++ b/ts/types/Message.std.ts @@ -1,12 +1,12 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { MessageAttributesType } from '../model-types.js'; -import { strictAssert } from '../util/assert.std.js'; -import type { DurationInSeconds } from '../util/durations/index.std.js'; -import type { AttachmentType } from './Attachment.std.js'; -import type { EmbeddedContactType } from './EmbeddedContact.std.js'; -import type { ErrorIfOverlapping, ExactKeys } from './Util.std.js'; +import type { MessageAttributesType } from '../model-types.d.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import type { DurationInSeconds } from '../util/durations/index.std.ts'; +import type { AttachmentType } from './Attachment.std.ts'; +import type { EmbeddedContactType } from './EmbeddedContact.std.ts'; +import type { ErrorIfOverlapping, ExactKeys } from './Util.std.ts'; export function getMentionsRegex(): RegExp { return /\uFFFC/g; diff --git a/ts/types/Message2.preload.ts b/ts/types/Message2.preload.ts index 9a2b59f3ae..4e34d87c80 100644 --- a/ts/types/Message2.preload.ts +++ b/ts/types/Message2.preload.ts @@ -4,13 +4,13 @@ import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import * as Contact from './EmbeddedContact.std.js'; +import * as Contact from './EmbeddedContact.std.ts'; import type { AddressableAttachmentType, AttachmentType, AttachmentWithHydratedData, LocalAttachmentV2Type, -} from './Attachment.std.js'; +} from './Attachment.std.ts'; import { isAudio, isVoiceMessage, @@ -18,20 +18,20 @@ import { replaceUnicodeOrderOverrides, replaceUnicodeV2, shouldGenerateThumbnailForAttachmentType, -} from '../util/Attachment.std.js'; -import { captureDimensionsAndScreenshot } from '../util/captureDimensionsAndScreenshot.dom.js'; -import { captureAudioDuration } from '../util/captureAudioDuration.dom.js'; -import type { MakeVideoScreenshotResultType } from './VisualAttachment.dom.js'; -import * as Errors from './errors.std.js'; -import * as SchemaVersion from './SchemaVersion.std.js'; +} from '../util/Attachment.std.ts'; +import { captureDimensionsAndScreenshot } from '../util/captureDimensionsAndScreenshot.dom.ts'; +import { captureAudioDuration } from '../util/captureAudioDuration.dom.ts'; +import type { MakeVideoScreenshotResultType } from './VisualAttachment.dom.ts'; +import * as Errors from './errors.std.ts'; +import * as SchemaVersion from './SchemaVersion.std.ts'; -import { LONG_MESSAGE } from './MIME.std.js'; -import type * as MIME from './MIME.std.js'; -import type { LoggerType } from './Logging.std.js'; +import { LONG_MESSAGE } from './MIME.std.ts'; +import type * as MIME from './MIME.std.ts'; +import type { LoggerType } from './Logging.std.ts'; import type { EmbeddedContactType, EmbeddedContactWithHydratedAvatar, -} from './EmbeddedContact.std.js'; +} from './EmbeddedContact.std.ts'; import type { MessageAttributesType, @@ -41,26 +41,26 @@ import type { import type { LinkPreviewType, LinkPreviewWithHydratedData, -} from './message/LinkPreviews.std.js'; +} from './message/LinkPreviews.std.ts'; import type { StickerType, StickerWithHydratedData, -} from './Stickers.preload.js'; -import { migrateDataToFileSystem } from '../util/attachments/migrateDataToFilesystem.std.js'; +} from './Stickers.preload.ts'; +import { migrateDataToFileSystem } from '../util/attachments/migrateDataToFilesystem.std.ts'; import { getLocalAttachmentUrl, AttachmentDisposition, -} from '../util/getLocalAttachmentUrl.std.js'; -import { encryptLegacyAttachment } from '../util/encryptLegacyAttachment.preload.js'; -import { deepClone } from '../util/deepClone.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { isBodyTooLong } from '../util/longAttachment.std.js'; -import type { MessageAttachmentType } from './AttachmentDownload.std.js'; -import type { getExistingAttachmentDataForReuse } from '../util/attachments/deduplicateAttachment.preload.js'; -import type { getPlaintextHashForInMemoryAttachment } from '../AttachmentCrypto.node.js'; -import { strictAssert } from '../util/assert.std.js'; +} from '../util/getLocalAttachmentUrl.std.ts'; +import { encryptLegacyAttachment } from '../util/encryptLegacyAttachment.preload.ts'; +import { deepClone } from '../util/deepClone.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { isBodyTooLong } from '../util/longAttachment.std.ts'; +import type { MessageAttachmentType } from './AttachmentDownload.std.ts'; +import type { getExistingAttachmentDataForReuse } from '../util/attachments/deduplicateAttachment.preload.ts'; +import type { getPlaintextHashForInMemoryAttachment } from '../AttachmentCrypto.node.ts'; +import { strictAssert } from '../util/assert.std.ts'; -const { isFunction, isObject, identity } = lodash; +const { isFunction, isObject } = lodash; export const GROUP = 'group'; export const PRIVATE = 'private'; @@ -288,11 +288,6 @@ export type UpgradeAttachmentType = ( message: MessageAttributesType ) => Promise; -// As regrettable as it is we have to fight back against esbuild's `__name` -// wrapper for functions that are created at high rate, because `__name` affects -// runtime performance. -const esbuildAnonymize = identity; - export const _mapAttachments = (upgradeAttachment: UpgradeAttachmentType) => async ( @@ -303,9 +298,8 @@ export const _mapAttachments = return message; } - const upgradeWithContext = esbuildAnonymize((attachment: AttachmentType) => - upgradeAttachment(attachment, context, message) - ); + const upgradeWithContext = (attachment: AttachmentType) => + upgradeAttachment(attachment, context, message); const attachments = await Promise.all( (message.attachments || []).map(upgradeWithContext) ); @@ -378,10 +372,8 @@ export const _mapContact = return message; } - const upgradeWithContext = esbuildAnonymize( - (contact: EmbeddedContactType) => - upgradeContact(contact, context, message) - ); + const upgradeWithContext = (contact: EmbeddedContactType) => + upgradeContact(contact, context, message); const contact = await Promise.all( (message.contact || []).map(upgradeWithContext) ); @@ -404,23 +396,21 @@ export const _mapQuotedAttachments = throw new Error('_mapQuotedAttachments: context must have logger object'); } - const upgradeWithContext = esbuildAnonymize( - async ( - attachment: QuotedAttachmentType - ): Promise => { - const { thumbnail } = attachment; - if (!thumbnail) { - return attachment; - } - - const upgradedThumbnail = await upgradeAttachment( - thumbnail as AttachmentType, - context, - message - ); - return { ...attachment, thumbnail: upgradedThumbnail }; + const upgradeWithContext = async ( + attachment: QuotedAttachmentType + ): Promise => { + const { thumbnail } = attachment; + if (!thumbnail) { + return attachment; } - ); + + const upgradedThumbnail = await upgradeAttachment( + thumbnail as AttachmentType, + context, + message + ); + return { ...attachment, thumbnail: upgradedThumbnail }; + }; const quotedAttachments = (message.quote && message.quote.attachments) || []; @@ -449,17 +439,15 @@ export const _mapPreviewAttachments = ); } - const upgradeWithContext = esbuildAnonymize( - async (preview: LinkPreviewType) => { - const { image } = preview; - if (!image) { - return preview; - } - - const upgradedImage = await upgradeAttachment(image, context, message); - return { ...preview, image: upgradedImage }; + const upgradeWithContext = async (preview: LinkPreviewType) => { + const { image } = preview; + if (!image) { + return preview; } - ); + + const upgradedImage = await upgradeAttachment(image, context, message); + return { ...preview, image: upgradedImage }; + }; const preview = await Promise.all( (message.preview || []).map(upgradeWithContext) @@ -527,29 +515,27 @@ const toVersion10 = _withSchemaVersion({ schemaVersion: 10, upgrade: async (message, context) => { const processPreviews = _mapPreviewAttachments(migrateDataToFileSystem); - const processSticker = esbuildAnonymize( - async ( - stickerMessage: MessageAttributesType, - stickerContext: ContextType - ): Promise => { - const { sticker } = stickerMessage; - if (!sticker || !sticker.data || !sticker.data.data) { - return stickerMessage; - } - - return { - ...stickerMessage, - sticker: { - ...sticker, - data: await migrateDataToFileSystem( - sticker.data, - stickerContext, - stickerMessage - ), - }, - }; + const processSticker = async ( + stickerMessage: MessageAttributesType, + stickerContext: ContextType + ): Promise => { + const { sticker } = stickerMessage; + if (!sticker || !sticker.data || !sticker.data.data) { + return stickerMessage; } - ); + + return { + ...stickerMessage, + sticker: { + ...sticker, + data: await migrateDataToFileSystem( + sticker.data, + stickerContext, + stickerMessage + ), + }, + }; + }; const previewProcessed = await processPreviews(message, context); const stickerProcessed = await processSticker(previewProcessed, context); diff --git a/ts/types/Nav.std.ts b/ts/types/Nav.std.ts index 809e344c0e..fc2755b1bc 100644 --- a/ts/types/Nav.std.ts +++ b/ts/types/Nav.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyDeep } from 'type-fest'; -import type { ChatFolderId, ChatFolderParams } from './ChatFolder.std.js'; -import type { PanelArgsType } from './Panels.std.js'; +import type { ChatFolderId, ChatFolderParams } from './ChatFolder.std.ts'; +import type { PanelArgsType } from './Panels.std.ts'; export type Location = ReadonlyDeep< | { diff --git a/ts/types/NotificationProfile-node.node.ts b/ts/types/NotificationProfile-node.node.ts index 8986f23c41..f55f8943b5 100644 --- a/ts/types/NotificationProfile-node.node.ts +++ b/ts/types/NotificationProfile-node.node.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only // Note: this is a dangerous import; it will break storybook -import { getRandomBytes } from '../Crypto.node.js'; +import { getRandomBytes } from '../Crypto.node.ts'; -import * as Bytes from '../Bytes.std.js'; -import { createLogger } from '../logging/log.std.js'; +import * as Bytes from '../Bytes.std.ts'; +import { createLogger } from '../logging/log.std.ts'; -import { NOTIFICATION_PROFILE_ID_LENGTH } from './NotificationProfile.std.js'; +import { NOTIFICATION_PROFILE_ID_LENGTH } from './NotificationProfile.std.ts'; -import type { NotificationProfileIdString } from './NotificationProfile.std.js'; -import type { LoggerType } from './Logging.std.js'; +import type { NotificationProfileIdString } from './NotificationProfile.std.ts'; +import type { LoggerType } from './Logging.std.ts'; const log = createLogger('NotificationProfile-node'); diff --git a/ts/types/NotificationProfile.std.ts b/ts/types/NotificationProfile.std.ts index 611d584815..a2f44f5247 100644 --- a/ts/types/NotificationProfile.std.ts +++ b/ts/types/NotificationProfile.std.ts @@ -3,10 +3,10 @@ import lodash from 'lodash'; -import { DAY, HOUR, MINUTE } from '../util/durations/index.std.js'; -import { strictAssert } from '../util/assert.std.js'; +import { DAY, HOUR, MINUTE } from '../util/durations/index.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; -import type { StorageServiceFieldsType } from '../sql/Interface.std.js'; +import type { StorageServiceFieldsType } from '../sql/Interface.std.ts'; const { isNumber, orderBy } = lodash; diff --git a/ts/types/PhoneNumber.std.ts b/ts/types/PhoneNumber.std.ts index 498fc2efe9..3b3c66f00a 100644 --- a/ts/types/PhoneNumber.std.ts +++ b/ts/types/PhoneNumber.std.ts @@ -5,9 +5,9 @@ import memoizee from 'memoizee'; import { instance, PhoneNumberFormat, -} from '../util/libphonenumberInstance.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from './errors.std.js'; +} from '../util/libphonenumberInstance.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from './errors.std.ts'; const log = createLogger('PhoneNumber'); diff --git a/ts/types/PhoneNumberSharingMode.std.ts b/ts/types/PhoneNumberSharingMode.std.ts index 390a2c4227..7ba74a5274 100644 --- a/ts/types/PhoneNumberSharingMode.std.ts +++ b/ts/types/PhoneNumberSharingMode.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { makeEnumParser } from '../util/enum.std.js'; +import { makeEnumParser } from '../util/enum.std.ts'; // These strings are saved to disk, so be careful when changing them. export enum PhoneNumberSharingMode { diff --git a/ts/types/PinnedMessage.std.ts b/ts/types/PinnedMessage.std.ts index b3fd6d2d8f..d6766e6d36 100644 --- a/ts/types/PinnedMessage.std.ts +++ b/ts/types/PinnedMessage.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { AciString } from '@signalapp/mock-server/src/types.js'; -import type { ReadonlyMessageAttributesType } from '../model-types.js'; +import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; export type PinnedMessageId = number & { PinnedMessageId: never }; diff --git a/ts/types/Polls.dom.ts b/ts/types/Polls.dom.ts index ff7308d048..7f5ce08096 100644 --- a/ts/types/Polls.dom.ts +++ b/ts/types/Polls.dom.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; -import { hasAtMostGraphemes } from '../util/grapheme.std.js'; -import { isFeaturedEnabledNoRedux } from '../util/isFeatureEnabled.dom.js'; -import type { SendStateByConversationId } from '../messages/MessageSendState.std.js'; -import { aciSchema } from './ServiceId.std.js'; -import { MAX_MESSAGE_BODY_BYTE_LENGTH } from '../util/longAttachment.std.js'; +import { hasAtMostGraphemes } from '../util/grapheme.std.ts'; +import { isFeaturedEnabledNoRedux } from '../util/isFeatureEnabled.dom.ts'; +import type { SendStateByConversationId } from '../messages/MessageSendState.std.ts'; +import { aciSchema } from './ServiceId.std.ts'; +import { MAX_MESSAGE_BODY_BYTE_LENGTH } from '../util/longAttachment.std.ts'; // temporarily limit poll questions to an outbound 100 char and an inbound 200 char export const POLL_QUESTION_MAX_LENGTH_RECEIVE = 200; diff --git a/ts/types/PreferencesBackupPage.std.ts b/ts/types/PreferencesBackupPage.std.ts index d23f24fbb4..d54ad4da9f 100644 --- a/ts/types/PreferencesBackupPage.std.ts +++ b/ts/types/PreferencesBackupPage.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { SettingsPage } from './Nav.std.js'; +import { SettingsPage } from './Nav.std.ts'; // Should be in sync with isBackupPage() export type PreferencesBackupPage = diff --git a/ts/types/QualifiedAddress.std.ts b/ts/types/QualifiedAddress.std.ts index 56cf57f58a..31d4825d75 100644 --- a/ts/types/QualifiedAddress.std.ts +++ b/ts/types/QualifiedAddress.std.ts @@ -1,12 +1,12 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { strictAssert } from '../util/assert.std.js'; +import { strictAssert } from '../util/assert.std.ts'; -import type { ServiceIdString } from './ServiceId.std.js'; -import { isServiceIdString } from './ServiceId.std.js'; -import type { AddressStringType } from './Address.std.js'; -import { Address } from './Address.std.js'; +import type { ServiceIdString } from './ServiceId.std.ts'; +import { isServiceIdString } from './ServiceId.std.ts'; +import type { AddressStringType } from './Address.std.ts'; +import { Address } from './Address.std.ts'; type QualifiedAddressMatch = RegExpMatchArray & { 1: string; diff --git a/ts/types/Reactions.std.ts b/ts/types/Reactions.std.ts index a97c783f88..c2412ba781 100644 --- a/ts/types/Reactions.std.ts +++ b/ts/types/Reactions.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from './ServiceId.std.js'; +import type { AciString } from './ServiceId.std.ts'; export type ReactionType = Readonly<{ conversationId: string; diff --git a/ts/types/Receipt.std.ts b/ts/types/Receipt.std.ts index 64a2496661..5fd5894d96 100644 --- a/ts/types/Receipt.std.ts +++ b/ts/types/Receipt.std.ts @@ -3,7 +3,7 @@ import { z } from 'zod'; -import { aciSchema } from './ServiceId.std.js'; +import { aciSchema } from './ServiceId.std.ts'; export const receiptSchema = z.object({ messageId: z.string(), diff --git a/ts/types/RendererConfig.std.ts b/ts/types/RendererConfig.std.ts index b086af96b9..89f80bbf3c 100644 --- a/ts/types/RendererConfig.std.ts +++ b/ts/types/RendererConfig.std.ts @@ -3,10 +3,10 @@ import { z } from 'zod'; -import { Environment } from '../environment.std.js'; -import { HourCyclePreferenceSchema } from './I18N.std.js'; -import { DNSFallbackSchema } from './DNSFallback.std.js'; -import { themeSettingSchema } from '../util/theme.std.js'; +import { Environment } from '../environment.std.ts'; +import { HourCyclePreferenceSchema } from './I18N.std.ts'; +import { DNSFallbackSchema } from './DNSFallback.std.ts'; +import { themeSettingSchema } from '../util/theme.std.ts'; const environmentSchema = z.nativeEnum(Environment); diff --git a/ts/types/ServiceId.std.ts b/ts/types/ServiceId.std.ts index b9c7776c2a..567a3aac8a 100644 --- a/ts/types/ServiceId.std.ts +++ b/ts/types/ServiceId.std.ts @@ -5,10 +5,10 @@ import { v4 as generateUuid } from 'uuid'; import { z } from 'zod'; import type { ServiceId, Aci, Pni } from '@signalapp/libsignal-client'; -import { isValidUuid } from '../util/isValidUuid.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { LoggerType } from './Logging.std.js'; -import { isAciString } from '../util/isAciString.std.js'; +import { isValidUuid } from '../util/isValidUuid.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { LoggerType } from './Logging.std.ts'; +import { isAciString } from '../util/isAciString.std.ts'; const log = createLogger('ServiceId'); diff --git a/ts/types/Settings.std.ts b/ts/types/Settings.std.ts index 9a5e528969..ca48375489 100644 --- a/ts/types/Settings.std.ts +++ b/ts/types/Settings.std.ts @@ -3,9 +3,9 @@ import semver from 'semver'; -import type { OSType } from '../util/os/shared.std.js'; -import { SystemTraySetting } from './SystemTraySetting.std.js'; -import { isNotUpdatable, isProduction } from '../util/version.std.js'; +import type { OSType } from '../util/os/shared.std.ts'; +import { SystemTraySetting } from './SystemTraySetting.std.ts'; +import { isNotUpdatable, isProduction } from '../util/version.std.ts'; const MIN_WINDOWS_VERSION = '8.0.0'; diff --git a/ts/types/SignalConversation.std.ts b/ts/types/SignalConversation.std.ts index 0605bdfd3a..5beb240281 100644 --- a/ts/types/SignalConversation.std.ts +++ b/ts/types/SignalConversation.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from './ServiceId.std.js'; +import type { AciString } from './ServiceId.std.ts'; export const SIGNAL_ACI = '11111111-1111-4111-8111-111111111111' as AciString; export const SIGNAL_AVATAR_PATH = 'images/profile-avatar.svg'; diff --git a/ts/types/Stickers.preload.ts b/ts/types/Stickers.preload.ts index 483590cdd1..e4fb7a351b 100644 --- a/ts/types/Stickers.preload.ts +++ b/ts/types/Stickers.preload.ts @@ -5,31 +5,31 @@ import lodash from 'lodash'; import pMap from 'p-map'; import Queue from 'p-queue'; -import { strictAssert } from '../util/assert.std.js'; -import { dropNull } from '../util/dropNull.std.js'; -import { makeLookup } from '../util/makeLookup.std.js'; -import { maybeParseUrl } from '../util/url.std.js'; -import { getMessagesById } from '../messages/getMessagesById.preload.js'; -import * as Bytes from '../Bytes.std.js'; -import * as Errors from './errors.std.js'; -import { deriveStickerPackKey, decryptAttachmentV1 } from '../Crypto.node.js'; -import { IMAGE_WEBP, type MIMEType } from './MIME.std.js'; -import { sniffImageMimeType } from '../util/sniffImageMimeType.std.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { dropNull } from '../util/dropNull.std.ts'; +import { makeLookup } from '../util/makeLookup.std.ts'; +import { maybeParseUrl } from '../util/url.std.ts'; +import { getMessagesById } from '../messages/getMessagesById.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; +import * as Errors from './errors.std.ts'; +import { deriveStickerPackKey, decryptAttachmentV1 } from '../Crypto.node.ts'; +import { IMAGE_WEBP, type MIMEType } from './MIME.std.ts'; +import { sniffImageMimeType } from '../util/sniffImageMimeType.std.ts'; import type { AttachmentType, AttachmentWithHydratedData, -} from './Attachment.std.js'; +} from './Attachment.std.ts'; import type { StickerType as StickerFromDBType, StickerPackType, StickerPackStatusType, UninstalledStickerPackType, -} from '../sql/Interface.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { StickersStateType } from '../state/ducks/stickers.preload.js'; -import { MINUTE } from '../util/durations/index.std.js'; +} from '../sql/Interface.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { StickersStateType } from '../state/ducks/stickers.preload.ts'; +import { MINUTE } from '../util/durations/index.std.ts'; import { processNewEphemeralSticker, processNewSticker, @@ -38,19 +38,19 @@ import { readStickerData, writeNewStickerData, writeNewAttachmentData, -} from '../util/migrations.preload.js'; -import { drop } from '../util/drop.std.js'; -import { isNotNil } from '../util/isNotNil.std.js'; -import { encryptLegacyAttachment } from '../util/encryptLegacyAttachment.preload.js'; -import { AttachmentDisposition } from '../util/getLocalAttachmentUrl.std.js'; -import { isPackIdValid, redactPackId } from '../util/Stickers.std.js'; -import { getPlaintextHashForInMemoryAttachment } from '../AttachmentCrypto.node.js'; +} from '../util/migrations.preload.ts'; +import { drop } from '../util/drop.std.ts'; +import { isNotNil } from '../util/isNotNil.std.ts'; +import { encryptLegacyAttachment } from '../util/encryptLegacyAttachment.preload.ts'; +import { AttachmentDisposition } from '../util/getLocalAttachmentUrl.std.ts'; +import { isPackIdValid, redactPackId } from '../util/Stickers.std.ts'; +import { getPlaintextHashForInMemoryAttachment } from '../AttachmentCrypto.node.ts'; import { isOnline, getSticker as doGetSticker, getStickerPackManifest, -} from '../textsecure/WebAPI.preload.js'; -import { getExistingAttachmentDataForReuse } from '../util/attachments/deduplicateAttachment.preload.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { getExistingAttachmentDataForReuse } from '../util/attachments/deduplicateAttachment.preload.ts'; const { isNumber, reject, groupBy, values, chunk } = lodash; diff --git a/ts/types/Storage.d.ts b/ts/types/Storage.d.ts index f860d45f1d..b786b5799b 100644 --- a/ts/types/Storage.d.ts +++ b/ts/types/Storage.d.ts @@ -1,9 +1,9 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { StorageAccessType } from './StorageKeys.std.js'; +import type { StorageAccessType } from './StorageKeys.std.ts'; -export type { StorageAccessType } from './StorageKeys.std.js'; +export type { StorageAccessType } from './StorageKeys.std.ts'; export type StorageInterface = { onready(callback: () => void): void; diff --git a/ts/types/StorageKeys.std.ts b/ts/types/StorageKeys.std.ts index c479f07758..4da1bfcea4 100644 --- a/ts/types/StorageKeys.std.ts +++ b/ts/types/StorageKeys.std.ts @@ -5,30 +5,30 @@ import type { AudioDevice } from '@signalapp/ringrtc'; import type { CustomColorsItemType, DefaultConversationColorType, -} from './Colors.std.js'; -import type { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability.std.js'; -import type { RetryItemType } from '../services/retryPlaceholders.std.js'; -import type { ConfigMapType as RemoteConfigType } from '../RemoteConfig.dom.js'; -import type { ExtendedStorageID, UnknownRecord } from './StorageService.js'; +} from './Colors.std.ts'; +import type { PhoneNumberDiscoverability } from '../util/phoneNumberDiscoverability.std.ts'; +import type { RetryItemType } from '../services/retryPlaceholders.std.ts'; +import type { ConfigMapType as RemoteConfigType } from '../RemoteConfig.dom.ts'; +import type { ExtendedStorageID, UnknownRecord } from './StorageService.d.ts'; -import type { GroupCredentialType } from '../textsecure/WebAPI.preload.js'; +import type { GroupCredentialType } from '../textsecure/WebAPI.preload.ts'; import type { SessionResetsType, StorageServiceCredentials, -} from '../textsecure/Types.js'; +} from '../textsecure/Types.d.ts'; import type { BackupCredentialWrapperType, BackupsSubscriptionType, BackupStatusType, -} from './backups.node.js'; -import type { ServiceIdString } from './ServiceId.std.js'; -import type { RegisteredChallengeType } from '../challenge.dom.js'; -import type { NotificationProfileOverride } from './NotificationProfile.std.js'; -import type { PhoneNumberSharingMode } from './PhoneNumberSharingMode.std.js'; -import type { LocalBackupExportMetadata } from './LocalExport.std.js'; -import type { ServerAlertsType } from './ServerAlert.std.js'; -import type { EmojiSkinTone } from './emoji.std.js'; -import type { AssertSameMembers } from './Util.std.js'; +} from './backups.node.ts'; +import type { ServiceIdString } from './ServiceId.std.ts'; +import type { RegisteredChallengeType } from '../challenge.dom.ts'; +import type { NotificationProfileOverride } from './NotificationProfile.std.ts'; +import type { PhoneNumberSharingMode } from './PhoneNumberSharingMode.std.ts'; +import type { LocalBackupExportMetadata } from './LocalExport.std.ts'; +import type { ServerAlertsType } from './ServerAlert.std.ts'; +import type { EmojiSkinTone } from './emoji.std.ts'; +import type { AssertSameMembers } from './Util.std.ts'; export type AutoDownloadAttachmentType = { photos: boolean; diff --git a/ts/types/Stories.std.ts b/ts/types/Stories.std.ts index e23a8f60e1..bdc3f19b9e 100644 --- a/ts/types/Stories.std.ts +++ b/ts/types/Stories.std.ts @@ -1,16 +1,16 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentType } from './Attachment.std.js'; -import type { HydratedBodyRangesType } from './BodyRange.std.js'; -import type { LocalizerType } from './Util.std.js'; -import type { ContactNameColorType } from './Colors.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import type { SendStatus } from '../messages/MessageSendState.std.js'; -import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists.preload.js'; -import type { ServiceIdString } from './ServiceId.std.js'; -import type { StoryDistributionIdString } from './StoryDistributionId.std.js'; +import type { AttachmentType } from './Attachment.std.ts'; +import type { HydratedBodyRangesType } from './BodyRange.std.ts'; +import type { LocalizerType } from './Util.std.ts'; +import type { ContactNameColorType } from './Colors.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import type { SendStatus } from '../messages/MessageSendState.std.ts'; +import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists.preload.ts'; +import type { ServiceIdString } from './ServiceId.std.ts'; +import type { StoryDistributionIdString } from './StoryDistributionId.std.ts'; export type ReplyType = { author: Pick< diff --git a/ts/types/StoryDistributionId.std.ts b/ts/types/StoryDistributionId.std.ts index 003b7efb8b..f7b2f75f49 100644 --- a/ts/types/StoryDistributionId.std.ts +++ b/ts/types/StoryDistributionId.std.ts @@ -3,9 +3,9 @@ import { v4 as generateUuid } from 'uuid'; -import { isValidUuid } from '../util/isValidUuid.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { LoggerType } from './Logging.std.js'; +import { isValidUuid } from '../util/isValidUuid.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { LoggerType } from './Logging.std.ts'; const log = createLogger('StoryDistributionId'); diff --git a/ts/types/SystemTraySetting.std.ts b/ts/types/SystemTraySetting.std.ts index f06f4731f4..a4804ba813 100644 --- a/ts/types/SystemTraySetting.std.ts +++ b/ts/types/SystemTraySetting.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { makeEnumParser } from '../util/enum.std.js'; +import { makeEnumParser } from '../util/enum.std.ts'; // Be careful when changing these values, as they are persisted. export enum SystemTraySetting { diff --git a/ts/types/Util.std.ts b/ts/types/Util.std.ts index 010f6100fc..ff16fadab5 100644 --- a/ts/types/Util.std.ts +++ b/ts/types/Util.std.ts @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { IntlShape } from 'react-intl'; -import type { AciString } from './ServiceId.std.js'; -import type { LocaleDirection } from '../../app/locale.node.js'; +import type { AciString } from './ServiceId.std.ts'; +import type { LocaleDirection } from '../../app/locale.node.ts'; import type { ICUJSXMessageParamsByKeyType, ICUStringMessageParamsByKeyType, } from '../../build/ICUMessageParams.d.ts'; -import type { HourCyclePreference, LocaleMessagesType } from './I18N.std.js'; +import type { HourCyclePreference, LocaleMessagesType } from './I18N.std.ts'; export type StoryContextType = { authorAci?: AciString; diff --git a/ts/types/VisualAttachment.dom.ts b/ts/types/VisualAttachment.dom.ts index 3f7bb6b963..2a3a19cb26 100644 --- a/ts/types/VisualAttachment.dom.ts +++ b/ts/types/VisualAttachment.dom.ts @@ -3,16 +3,16 @@ import loadImage from 'blueimp-load-image'; import { blobToArrayBuffer } from 'blob-util'; -import { toLogFormat } from './errors.std.js'; -import type { MIMEType } from './MIME.std.js'; -import { IMAGE_JPEG, IMAGE_PNG } from './MIME.std.js'; -import type { LoggerType } from './Logging.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { canvasToBlob } from '../util/canvasToBlob.std.js'; -import { KIBIBYTE } from './AttachmentSize.std.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import { SECOND } from '../util/durations/index.std.js'; -import { createLogger } from '../logging/log.std.js'; +import { toLogFormat } from './errors.std.ts'; +import type { MIMEType } from './MIME.std.ts'; +import { IMAGE_JPEG, IMAGE_PNG } from './MIME.std.ts'; +import type { LoggerType } from './Logging.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { canvasToBlob } from '../util/canvasToBlob.std.ts'; +import { KIBIBYTE } from './AttachmentSize.std.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import { SECOND } from '../util/durations/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const logging = createLogger('VisualAttachment'); diff --git a/ts/types/backups.node.ts b/ts/types/backups.node.ts index f455ec77ce..e50cc2a395 100644 --- a/ts/types/backups.node.ts +++ b/ts/types/backups.node.ts @@ -3,7 +3,7 @@ import type { BackupLevel } from '@signalapp/libsignal-client/dist/zkgroup/index.js'; import { BackupCredentialType } from '@signalapp/libsignal-client/dist/zkgroup/index.js'; -import type { GetBackupCDNCredentialsResponseType } from '../textsecure/WebAPI.preload.js'; +import type { GetBackupCDNCredentialsResponseType } from '../textsecure/WebAPI.preload.ts'; export { BackupCredentialType }; diff --git a/ts/types/errors.std.ts b/ts/types/errors.std.ts index 311b3e81da..d2d98fa0e0 100644 --- a/ts/types/errors.std.ts +++ b/ts/types/errors.std.ts @@ -1,7 +1,7 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { HTTPError } from './HTTPError.std.js'; +import { HTTPError } from './HTTPError.std.ts'; export function toLogFormat(error: unknown): string { let result = ''; diff --git a/ts/types/groups.std.ts b/ts/types/groups.std.ts index 217b75c1a8..4029ef258d 100644 --- a/ts/types/groups.std.ts +++ b/ts/types/groups.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ServiceIdString, AciString, PniString } from './ServiceId.std.js'; +import type { ServiceIdString, AciString, PniString } from './ServiceId.std.ts'; export const ID_V1_LENGTH = 16; export const ID_LENGTH = 32; diff --git a/ts/types/message/LinkPreviews.std.ts b/ts/types/message/LinkPreviews.std.ts index 32f82cb84b..17517d8fa2 100644 --- a/ts/types/message/LinkPreviews.std.ts +++ b/ts/types/message/LinkPreviews.std.ts @@ -5,7 +5,7 @@ import type { AttachmentType, AttachmentForUIType, AttachmentWithHydratedData, -} from '../Attachment.std.js'; +} from '../Attachment.std.ts'; type GenericLinkPreviewType = { title?: string; diff --git a/ts/types/notifications.std.ts b/ts/types/notifications.std.ts index 0cd0268054..5e0bf7d865 100644 --- a/ts/types/notifications.std.ts +++ b/ts/types/notifications.std.ts @@ -1,50 +1,10 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import z from 'zod'; - export enum NotificationType { IncomingCall = 'IncomingCall', IncomingGroupCall = 'IncomingGroupCall', IsPresenting = 'IsPresenting', Message = 'Message', Reaction = 'Reaction', - MinimizedToTray = 'MinimizedToTray', } - -export const WindowsNotificationDataSchema = z.object({ - avatarPath: z.string().optional(), - body: z.string(), - heading: z.string(), - token: z.string(), - type: z.nativeEnum(NotificationType), -}); - -export type WindowsNotificationData = z.infer< - typeof WindowsNotificationDataSchema ->; - -export const WindowsNotificationWorkerDataSchema = z.object({ - AUMID: z.string(), -}); - -export type WindowsNotificationWorkerDataType = z.infer< - typeof WindowsNotificationWorkerDataSchema ->; - -export const WindowsNotificationRequestSchema = z.union([ - z.object({ - command: z.literal('show'), - notificationData: WindowsNotificationDataSchema, - }), - z.object({ - command: z.literal('clearAll'), - }), - z.object({ - command: z.literal('sendDummyKeystroke'), - }), -]); - -export type WindowsNotificationRequestType = z.infer< - typeof WindowsNotificationRequestSchema ->; diff --git a/ts/updateConversationsWithUuidLookup.dom.ts b/ts/updateConversationsWithUuidLookup.dom.ts index 8913473547..f79b676a52 100644 --- a/ts/updateConversationsWithUuidLookup.dom.ts +++ b/ts/updateConversationsWithUuidLookup.dom.ts @@ -1,15 +1,15 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationController } from './ConversationController.preload.js'; -import type { ConversationModel } from './models/conversations.preload.js'; +import type { ConversationController } from './ConversationController.preload.ts'; +import type { ConversationModel } from './models/conversations.preload.ts'; import type { cdsLookup, checkAccountExistence, -} from './textsecure/WebAPI.preload.js'; -import { assertDev } from './util/assert.std.js'; -import { isNotNil } from './util/isNotNil.std.js'; -import { getServiceIdsForE164s } from './util/getServiceIdsForE164s.dom.js'; +} from './textsecure/WebAPI.preload.ts'; +import { assertDev } from './util/assert.std.ts'; +import { isNotNil } from './util/isNotNil.std.ts'; +import { getServiceIdsForE164s } from './util/getServiceIdsForE164s.dom.ts'; export type ServerType = Readonly<{ cdsLookup: typeof cdsLookup; diff --git a/ts/updater/common.main.ts b/ts/updater/common.main.ts index 85bb34ce40..8e0f1a1029 100644 --- a/ts/updater/common.main.ts +++ b/ts/updater/common.main.ts @@ -16,49 +16,49 @@ import { v4 as getGuid } from 'uuid'; import type { BrowserWindow } from 'electron'; import { app, ipcMain } from 'electron'; -import { missingCaseError } from '../util/missingCaseError.std.js'; -import { getTempPath, getUpdateCachePath } from '../../app/attachments.node.js'; +import { missingCaseError } from '../util/missingCaseError.std.ts'; +import { getTempPath, getUpdateCachePath } from '../../app/attachments.node.ts'; import { markShouldNotQuit, markShouldQuit, -} from '../../app/window_state.std.js'; -import { DialogType } from '../types/Dialogs.std.js'; -import * as Errors from '../types/errors.std.js'; -import { strictAssert } from '../util/assert.std.js'; -import { drop } from '../util/drop.std.js'; -import * as durations from '../util/durations/index.std.js'; +} from '../../app/window_state.std.ts'; +import { DialogType } from '../types/Dialogs.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { strictAssert } from '../util/assert.std.ts'; +import { drop } from '../util/drop.std.ts'; +import * as durations from '../util/durations/index.std.ts'; import { isAlpha, isAxolotl, isBeta, isNotUpdatable, isStaging, -} from '../util/version.std.js'; -import { isPathInside } from '../util/isPathInside.node.js'; +} from '../util/version.std.ts'; +import { isPathInside } from '../util/isPathInside.node.ts'; -import { packageJson } from '../util/packageJson.main.js'; +import { packageJson } from '../util/packageJson.main.ts'; import { getSignatureFileName, hexToBinary, verifySignature, -} from './signature.node.js'; +} from './signature.node.ts'; import { download as downloadDifferentialData, getBlockMapFileName, isValidPreparedData as isValidDifferentialData, prepareDownload as prepareDifferentialDownload, -} from './differential.main.js'; -import { getGotOptions } from './got.main.js'; -import { checkIntegrity, isTimeToUpdate } from './util.node.js'; +} from './differential.main.ts'; +import { getGotOptions } from './got.main.ts'; +import { checkIntegrity, isTimeToUpdate } from './util.node.ts'; import { gracefulRename, gracefulRmRecursive, -} from '../util/gracefulFs.node.js'; +} from '../util/gracefulFs.node.ts'; -import type { LoggerType } from '../types/Logging.std.js'; -import type { PrepareDownloadResultType as DifferentialDownloadDataType } from './differential.main.js'; -import type { MainSQL } from '../sql/main.main.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import type { PrepareDownloadResultType as DifferentialDownloadDataType } from './differential.main.ts'; +import type { MainSQL } from '../sql/main.main.ts'; const { pathExists } = fsExtra; diff --git a/ts/updater/differential.main.ts b/ts/updater/differential.main.ts index 0bcfcd3e94..ccad2cd00e 100644 --- a/ts/updater/differential.main.ts +++ b/ts/updater/differential.main.ts @@ -12,12 +12,12 @@ import lodash from 'lodash'; import pMap from 'p-map'; import Dicer from '@indutny/dicer'; -import { strictAssert } from '../util/assert.std.js'; -import { wrapEventEmitterOnce } from '../util/wrapEventEmitterOnce.node.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { getGotOptions } from './got.main.js'; -import type { GotOptions } from './got.main.js'; -import { checkIntegrity } from './util.node.js'; +import { strictAssert } from '../util/assert.std.ts'; +import { wrapEventEmitterOnce } from '../util/wrapEventEmitterOnce.node.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { getGotOptions } from './got.main.ts'; +import type { GotOptions } from './got.main.ts'; +import { checkIntegrity } from './util.node.ts'; const { chunk: lodashChunk, noop } = lodash; diff --git a/ts/updater/got.main.ts b/ts/updater/got.main.ts index 0fcdc45518..9e0e99b016 100644 --- a/ts/updater/got.main.ts +++ b/ts/updater/got.main.ts @@ -5,11 +5,11 @@ import type { StrictOptions as GotOptions } from 'got'; import config from 'config'; import { Agent as HTTPAgent } from 'node:http'; -import { packageJson } from '../util/packageJson.main.js'; -import { getUserAgent } from '../util/getUserAgent.node.js'; -import * as durations from '../util/durations/index.std.js'; -import { createHTTPSAgent } from '../util/createHTTPSAgent.node.js'; -import { createProxyAgent } from '../util/createProxyAgent.node.js'; +import { packageJson } from '../util/packageJson.main.ts'; +import { getUserAgent } from '../util/getUserAgent.node.ts'; +import * as durations from '../util/durations/index.std.ts'; +import { createHTTPSAgent } from '../util/createHTTPSAgent.node.ts'; +import { createProxyAgent } from '../util/createProxyAgent.node.ts'; export const GOT_CONNECT_TIMEOUT = durations.MINUTE; export const GOT_LOOKUP_TIMEOUT = durations.MINUTE; diff --git a/ts/updater/index.main.ts b/ts/updater/index.main.ts index 5434d7129c..ca7e71631d 100644 --- a/ts/updater/index.main.ts +++ b/ts/updater/index.main.ts @@ -3,11 +3,11 @@ import config from 'config'; import { app } from 'electron'; -import type { Updater, UpdaterOptionsType } from './common.main.js'; -import { MacOSUpdater } from './macos.main.js'; -import { WindowsUpdater } from './windows.main.js'; -import { LinuxAppImageUpdater } from './linuxAppImage.main.js'; -import { initLinux } from './linux.main.js'; +import type { Updater, UpdaterOptionsType } from './common.main.ts'; +import { MacOSUpdater } from './macos.main.ts'; +import { WindowsUpdater } from './windows.main.ts'; +import { LinuxAppImageUpdater } from './linuxAppImage.main.ts'; +import { initLinux } from './linux.main.ts'; let initialized = false; diff --git a/ts/updater/linux.main.ts b/ts/updater/linux.main.ts index aa656a0bd4..27550835d8 100644 --- a/ts/updater/linux.main.ts +++ b/ts/updater/linux.main.ts @@ -8,13 +8,13 @@ import { app, ipcMain } from 'electron'; import { extractFile } from '@electron/asar'; import z from 'zod'; -import { markShouldQuit } from '../../app/window_state.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { DialogType } from '../types/Dialogs.std.js'; -import * as Errors from '../types/errors.std.js'; -import type { UpdaterOptionsType } from './common.main.js'; -import { appRelaunch } from '../util/relaunch.main.js'; -import { getAppRootDir } from '../util/appRootDir.main.js'; +import { markShouldQuit } from '../../app/window_state.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { DialogType } from '../types/Dialogs.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import type { UpdaterOptionsType } from './common.main.ts'; +import { appRelaunch } from '../util/relaunch.main.ts'; +import { getAppRootDir } from '../util/appRootDir.main.ts'; const MIN_UBUNTU_VERSION = '22.04'; diff --git a/ts/updater/linuxAppImage.main.ts b/ts/updater/linuxAppImage.main.ts index afbbe8f6f0..052afb12dd 100644 --- a/ts/updater/linuxAppImage.main.ts +++ b/ts/updater/linuxAppImage.main.ts @@ -8,11 +8,11 @@ import config from 'config'; import { app } from 'electron'; import { coerce, lt } from 'semver'; -import type { JSONVendorSchema } from './common.main.js'; -import { Updater } from './common.main.js'; -import { appRelaunch } from '../util/relaunch.main.js'; -import { hexToBinary } from './signature.node.js'; -import { DialogType } from '../types/Dialogs.std.js'; +import type { JSONVendorSchema } from './common.main.ts'; +import { Updater } from './common.main.ts'; +import { appRelaunch } from '../util/relaunch.main.ts'; +import { hexToBinary } from './signature.node.ts'; +import { DialogType } from '../types/Dialogs.std.ts'; export class LinuxAppImageUpdater extends Updater { #installing = false; diff --git a/ts/updater/macos.main.ts b/ts/updater/macos.main.ts index b175b9e37d..b7a2dc30d8 100644 --- a/ts/updater/macos.main.ts +++ b/ts/updater/macos.main.ts @@ -6,10 +6,10 @@ import { autoUpdater } from 'electron'; import { writeFile } from 'node:fs/promises'; import { join } from 'node:path'; -import { Updater, createTempDir, deleteTempDir } from './common.main.js'; -import { explodePromise } from '../util/explodePromise.std.js'; -import * as Errors from '../types/errors.std.js'; -import { DialogType } from '../types/Dialogs.std.js'; +import { Updater, createTempDir, deleteTempDir } from './common.main.ts'; +import { explodePromise } from '../util/explodePromise.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { DialogType } from '../types/Dialogs.std.ts'; export class MacOSUpdater extends Updater { protected async deletePreviousInstallers(): Promise { diff --git a/ts/updater/signature.node.ts b/ts/updater/signature.node.ts index ae28530ce4..d76c3f92b6 100644 --- a/ts/updater/signature.node.ts +++ b/ts/updater/signature.node.ts @@ -12,7 +12,7 @@ import { basename, dirname, join, resolve as resolvePath } from 'node:path'; import pify from 'pify'; -import { sign, verify } from './curve.node.js'; +import { sign, verify } from './curve.node.ts'; const readFile = pify(readFileCallback); const writeFile = pify(writeFileCallback); diff --git a/ts/updater/util.node.ts b/ts/updater/util.node.ts index 437f8eb8b7..7d2f909972 100644 --- a/ts/updater/util.node.ts +++ b/ts/updater/util.node.ts @@ -5,9 +5,9 @@ import { createHash } from 'node:crypto'; import { createReadStream } from 'node:fs'; import { pipeline } from 'node:stream/promises'; -import type { LoggerType } from '../types/Logging.std.js'; -import * as Errors from '../types/errors.std.js'; -import { MINUTE, HOUR } from '../util/durations/index.std.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { MINUTE, HOUR } from '../util/durations/index.std.ts'; export type CheckIntegrityResultType = Readonly< | { diff --git a/ts/updater/windows.main.ts b/ts/updater/windows.main.ts index d5d6e38da4..315efbbbd5 100644 --- a/ts/updater/windows.main.ts +++ b/ts/updater/windows.main.ts @@ -9,8 +9,8 @@ import { readdir as readdirCallback, unlink as unlinkCallback } from 'node:fs'; import { app } from 'electron'; import pify from 'pify'; -import { getAppRootDir } from '../util/appRootDir.main.js'; -import { Updater } from './common.main.js'; +import { getAppRootDir } from '../util/appRootDir.main.ts'; +import { Updater } from './common.main.ts'; const readdir = pify(readdirCallback); const unlink = pify(unlinkCallback); diff --git a/ts/util/AbortableProcess.std.ts b/ts/util/AbortableProcess.std.ts index f07a61645f..fecc309b3a 100644 --- a/ts/util/AbortableProcess.std.ts +++ b/ts/util/AbortableProcess.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { explodePromise } from './explodePromise.std.js'; +import { explodePromise } from './explodePromise.std.ts'; export type IController = { abort(): void; diff --git a/ts/util/Attachment.std.ts b/ts/util/Attachment.std.ts index 5d29db641c..5a5e989414 100644 --- a/ts/util/Attachment.std.ts +++ b/ts/util/Attachment.std.ts @@ -13,24 +13,24 @@ import type { AttachmentDownloadableFromTransitTier, LocallySavedAttachment, AttachmentReadyForLocalBackup, -} from '../types/Attachment.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as MIME from '../types/MIME.std.js'; -import { SignalService } from '../protobuf/index.std.js'; +} from '../types/Attachment.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as MIME from '../types/MIME.std.ts'; +import { SignalService } from '../protobuf/index.std.ts'; import { isImageTypeSupported, isVideoTypeSupported, -} from './GoogleChrome.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { ThemeType } from '../types/Util.std.js'; +} from './GoogleChrome.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; import { isValidAttachmentKey, isValidDigest, isValidPlaintextHash, -} from '../types/Crypto.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import type { MessageAttachmentType } from '../types/AttachmentDownload.std.js'; +} from '../types/Crypto.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import type { MessageAttachmentType } from '../types/AttachmentDownload.std.ts'; const { isNumber, diff --git a/ts/util/AttachmentCrypto.std.ts b/ts/util/AttachmentCrypto.std.ts index 59bbc25c72..a270de5d69 100644 --- a/ts/util/AttachmentCrypto.std.ts +++ b/ts/util/AttachmentCrypto.std.ts @@ -1,10 +1,10 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { IV_LENGTH, ATTACHMENT_MAC_LENGTH } from '../types/Crypto.std.js'; -import { MediaTier } from '../types/AttachmentDownload.std.js'; -import { logPadSize } from './logPadSize.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; +import { IV_LENGTH, ATTACHMENT_MAC_LENGTH } from '../types/Crypto.std.ts'; +import { MediaTier } from '../types/AttachmentDownload.std.ts'; +import { logPadSize } from './logPadSize.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; export function getCiphertextSize(plaintextLength: number): number { const paddedPlaintextSize = logPadSize(plaintextLength); diff --git a/ts/util/BodyRange.node.ts b/ts/util/BodyRange.node.ts index 52720caa12..993446828e 100644 --- a/ts/util/BodyRange.node.ts +++ b/ts/util/BodyRange.node.ts @@ -7,13 +7,13 @@ import { BodyRange, type RawBodyRange, type HydratedBodyRangeType, -} from '../types/BodyRange.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { isNotNil } from './isNotNil.std.js'; -import { dropNull } from './dropNull.std.js'; -import { fromAciUuidBytesOrString } from './ServiceId.node.js'; -import { isNonSharedUint8Array } from '../Bytes.std.js'; +} from '../types/BodyRange.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { dropNull } from './dropNull.std.ts'; +import { fromAciUuidBytesOrString } from './ServiceId.node.ts'; +import { isNonSharedUint8Array } from '../Bytes.std.ts'; const { isNumber } = lodash; diff --git a/ts/util/CheckScheduler.preload.ts b/ts/util/CheckScheduler.preload.ts index 95e1dde53d..911d259fef 100644 --- a/ts/util/CheckScheduler.preload.ts +++ b/ts/util/CheckScheduler.preload.ts @@ -4,13 +4,13 @@ import type { ConditionalKeys } from 'type-fest'; import type { StorageAccessType } from '../types/Storage.d.ts'; -import { toLogFormat } from '../types/errors.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { LongTimeout } from './timeout.std.js'; -import { drop } from './drop.std.js'; -import { strictAssert } from './assert.std.js'; -import { BackOff, FIBONACCI_TIMEOUTS } from './BackOff.std.js'; +import { toLogFormat } from '../types/errors.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { LongTimeout } from './timeout.std.ts'; +import { drop } from './drop.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { BackOff, FIBONACCI_TIMEOUTS } from './BackOff.std.ts'; const log = createLogger('CheckScheduler'); diff --git a/ts/util/CollapseSet.std.ts b/ts/util/CollapseSet.std.ts index 414f88874d..e195349f96 100644 --- a/ts/util/CollapseSet.std.ts +++ b/ts/util/CollapseSet.std.ts @@ -3,22 +3,22 @@ import { last } from 'lodash'; -import { CallMode } from '../types/CallDisposition.std.js'; -import { strictAssert } from './assert.std.js'; -import { getMidnight } from '../types/NotificationProfile.std.js'; -import { SeenStatus } from '../MessageSeenStatus.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { getMidnight } from '../types/NotificationProfile.std.ts'; +import { SeenStatus } from '../MessageSeenStatus.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; import type { MessageLookupType, MessageType, -} from '../state/ducks/conversations.preload.js'; +} from '../state/ducks/conversations.preload.ts'; import type { CallSelectorType, CallStateType, -} from '../state/selectors/calling.std.js'; -import type { DurationInSeconds } from './durations/duration-in-seconds.std.js'; -import type { CallHistorySelectorType } from '../state/selectors/callHistory.std.js'; +} from '../state/selectors/calling.std.ts'; +import type { DurationInSeconds } from './durations/duration-in-seconds.std.ts'; +import type { CallHistorySelectorType } from '../state/selectors/callHistory.std.ts'; export type CollapsedMessage = { id: string; diff --git a/ts/util/Conversation.preload.ts b/ts/util/Conversation.preload.ts index a96070bbfe..53d28aafba 100644 --- a/ts/util/Conversation.preload.ts +++ b/ts/util/Conversation.preload.ts @@ -1,9 +1,9 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DataReader, DataWriter } from '../sql/Client.preload.js'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import { maybeDeleteAttachmentFile } from './migrations.preload.js'; +import { maybeDeleteAttachmentFile } from './migrations.preload.ts'; async function deleteExternalFiles( conversation: ConversationAttributesType diff --git a/ts/util/DelimitedStream.node.ts b/ts/util/DelimitedStream.node.ts index e314df4958..e7586bb10f 100644 --- a/ts/util/DelimitedStream.node.ts +++ b/ts/util/DelimitedStream.node.ts @@ -3,7 +3,7 @@ import { Transform } from 'node:stream'; -import { missingCaseError } from './missingCaseError.std.js'; +import { missingCaseError } from './missingCaseError.std.ts'; type State = | { diff --git a/ts/util/GoogleChrome.std.ts b/ts/util/GoogleChrome.std.ts index 556dbadc9c..e86791dac1 100644 --- a/ts/util/GoogleChrome.std.ts +++ b/ts/util/GoogleChrome.std.ts @@ -1,7 +1,7 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type * as MIME from '../types/MIME.std.js'; +import type * as MIME from '../types/MIME.std.ts'; type MIMETypeSupportMap = Record; diff --git a/ts/util/JobQueue.std.ts b/ts/util/JobQueue.std.ts index 72a7f45eb5..00c5a14506 100644 --- a/ts/util/JobQueue.std.ts +++ b/ts/util/JobQueue.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import PQueue from 'p-queue'; -import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.js'; +import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.ts'; function createJobQueue(label: string) { const jobQueue = new PQueue({ concurrency: 1 }); diff --git a/ts/util/LatestQueue.std.ts b/ts/util/LatestQueue.std.ts index 6509051ce2..db8e6a3d94 100644 --- a/ts/util/LatestQueue.std.ts +++ b/ts/util/LatestQueue.std.ts @@ -17,7 +17,7 @@ * previously queued task completely. */ -import { drop } from './drop.std.js'; +import { drop } from './drop.std.ts'; export class LatestQueue { #isRunning: boolean; diff --git a/ts/util/ServiceId.node.ts b/ts/util/ServiceId.node.ts index 3f9662da3a..141eb7db4e 100644 --- a/ts/util/ServiceId.node.ts +++ b/ts/util/ServiceId.node.ts @@ -6,7 +6,7 @@ import type { AciString, PniString, ServiceIdString, -} from '../types/ServiceId.std.js'; +} from '../types/ServiceId.std.ts'; import { normalizeServiceId, normalizePni, @@ -15,9 +15,9 @@ import { fromServiceIdObject, fromAciObject, fromPniObject, -} from '../types/ServiceId.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { normalizeAci } from './normalizeAci.std.js'; +} from '../types/ServiceId.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { normalizeAci } from './normalizeAci.std.ts'; export function toServiceIdObject(serviceId: ServiceIdString): ServiceId { return ServiceId.parseFromServiceIdString(serviceId); diff --git a/ts/util/Settings.preload.ts b/ts/util/Settings.preload.ts index 2098b003be..35f88625eb 100644 --- a/ts/util/Settings.preload.ts +++ b/ts/util/Settings.preload.ts @@ -1,6 +1,6 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export function getLinkPreviewSetting(): boolean { return itemStorage.get('linkPreviews', false); diff --git a/ts/util/Sound.std.ts b/ts/util/Sound.std.ts index c3ccafe91a..cc6beee639 100644 --- a/ts/util/Sound.std.ts +++ b/ts/util/Sound.std.ts @@ -1,8 +1,8 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; const log = createLogger('Sound'); diff --git a/ts/util/StartupQueue.std.ts b/ts/util/StartupQueue.std.ts index 935a0cd4d3..84147db262 100644 --- a/ts/util/StartupQueue.std.ts +++ b/ts/util/StartupQueue.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import PQueue from 'p-queue'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('StartupQueue'); diff --git a/ts/util/TaskDeduplicator.std.ts b/ts/util/TaskDeduplicator.std.ts index afb9e130c8..b404501496 100644 --- a/ts/util/TaskDeduplicator.std.ts +++ b/ts/util/TaskDeduplicator.std.ts @@ -1,8 +1,8 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { strictAssert } from './assert.std.js'; -import { explodePromise } from './explodePromise.std.js'; +import { strictAssert } from './assert.std.ts'; +import { explodePromise } from './explodePromise.std.ts'; // A wrapper class around a task that should not run concurrently. // `TaskDeduplicator` takes `abortSignal` for each `run` and thus lets you diff --git a/ts/util/Username.dom.ts b/ts/util/Username.dom.ts index 373d928690..a8be76bd34 100644 --- a/ts/util/Username.dom.ts +++ b/ts/util/Username.dom.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as RemoteConfig from '../RemoteConfig.dom.js'; -import { getDiscriminator, getNickname } from '../types/Username.std.js'; -import { parseIntWithFallback } from './parseIntWithFallback.std.js'; +import * as RemoteConfig from '../RemoteConfig.dom.ts'; +import { getDiscriminator, getNickname } from '../types/Username.std.ts'; +import { parseIntWithFallback } from './parseIntWithFallback.std.ts'; export function getMaxNickname(): number { return parseIntWithFallback( diff --git a/ts/util/appendMacStream.node.ts b/ts/util/appendMacStream.node.ts index d442b2bdc2..bca2f1dd63 100644 --- a/ts/util/appendMacStream.node.ts +++ b/ts/util/appendMacStream.node.ts @@ -5,7 +5,7 @@ import { createHmac } from 'node:crypto'; import { Transform } from 'node:stream'; import type { Duplex } from 'node:stream'; -import { HashType } from '../types/Crypto.std.js'; +import { HashType } from '../types/Crypto.std.ts'; export const MAC_KEY_SIZE = 32; diff --git a/ts/util/arePinnedConversationsEqual.node.ts b/ts/util/arePinnedConversationsEqual.node.ts index b100bb8418..a3d2619fe7 100644 --- a/ts/util/arePinnedConversationsEqual.node.ts +++ b/ts/util/arePinnedConversationsEqual.node.ts @@ -1,10 +1,10 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as Bytes from '../Bytes.std.js'; +import * as Bytes from '../Bytes.std.ts'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { fromServiceIdBinaryOrString } from './ServiceId.node.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { fromServiceIdBinaryOrString } from './ServiceId.node.ts'; import PinnedConversation = Proto.AccountRecord.PinnedConversation.Params; diff --git a/ts/util/areWeAdmin.preload.ts b/ts/util/areWeAdmin.preload.ts index 99c8609e24..e5ab46fa89 100644 --- a/ts/util/areWeAdmin.preload.ts +++ b/ts/util/areWeAdmin.preload.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { isGroupV2 } from './whatTypeOfConversation.dom.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { isGroupV2 } from './whatTypeOfConversation.dom.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export function areWeAdmin( attributes: Pick< diff --git a/ts/util/arrayBufferToObjectURL.std.ts b/ts/util/arrayBufferToObjectURL.std.ts index 5c51d29bc2..d634bc2e97 100644 --- a/ts/util/arrayBufferToObjectURL.std.ts +++ b/ts/util/arrayBufferToObjectURL.std.ts @@ -1,7 +1,7 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { MIMEType } from '../types/MIME.std.js'; +import type { MIMEType } from '../types/MIME.std.ts'; export const arrayBufferToObjectURL = ({ data, diff --git a/ts/util/assert.std.ts b/ts/util/assert.std.ts index 38e423f8d9..04f77e247f 100644 --- a/ts/util/assert.std.ts +++ b/ts/util/assert.std.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getEnvironment, Environment } from '../environment.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; +import { getEnvironment, Environment } from '../environment.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; const log = createLogger('assert'); diff --git a/ts/util/attachmentDownloadQueue.preload.ts b/ts/util/attachmentDownloadQueue.preload.ts index 273c253b8e..b947285a17 100644 --- a/ts/util/attachmentDownloadQueue.preload.ts +++ b/ts/util/attachmentDownloadQueue.preload.ts @@ -1,19 +1,19 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { MessageModel } from '../models/messages.preload.js'; +import type { MessageModel } from '../models/messages.preload.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { AttachmentType } from '../types/Attachment.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; -import { createLogger } from '../logging/log.std.js'; -import * as MIME from '../types/MIME.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as MIME from '../types/MIME.std.ts'; -import { DataWriter } from '../sql/Client.preload.js'; -import { isMoreRecentThan } from './timestamp.std.js'; -import { isNotNil } from './isNotNil.std.js'; -import { queueAttachmentDownloads } from './queueAttachmentDownloads.preload.js'; -import { postSaveUpdates } from './cleanup.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { isMoreRecentThan } from './timestamp.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { queueAttachmentDownloads } from './queueAttachmentDownloads.preload.ts'; +import { postSaveUpdates } from './cleanup.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('attachmentDownloadQueue'); diff --git a/ts/util/attachmentPath.node.ts b/ts/util/attachmentPath.node.ts index 0c86cdf151..8f6f57e50f 100644 --- a/ts/util/attachmentPath.node.ts +++ b/ts/util/attachmentPath.node.ts @@ -4,8 +4,8 @@ import { join } from 'node:path'; import lodash from 'lodash'; -import { getRandomBytes } from '../Crypto.node.js'; -import * as Bytes from '../Bytes.std.js'; +import { getRandomBytes } from '../Crypto.node.ts'; +import * as Bytes from '../Bytes.std.ts'; const { isString } = lodash; diff --git a/ts/util/attachments.preload.ts b/ts/util/attachments.preload.ts index 94f87525d8..8ccf569963 100644 --- a/ts/util/attachments.preload.ts +++ b/ts/util/attachments.preload.ts @@ -3,19 +3,19 @@ import { blobToArrayBuffer } from 'blob-util'; -import { createLogger } from '../logging/log.std.js'; -import { scaleImageToLevel } from './scaleImageToLevel.preload.js'; -import { dropNull } from './dropNull.std.js'; -import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { scaleImageToLevel } from './scaleImageToLevel.preload.ts'; +import { dropNull } from './dropNull.std.ts'; +import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.ts'; import type { AttachmentType, UploadedAttachmentType, -} from '../types/Attachment.std.js'; -import { canBeTranscoded } from './Attachment.std.js'; -import * as Errors from '../types/errors.std.js'; -import * as Bytes from '../Bytes.std.js'; +} from '../types/Attachment.std.ts'; +import { canBeTranscoded } from './Attachment.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import * as Bytes from '../Bytes.std.ts'; -import { toNumber } from './toNumber.std.js'; +import { toNumber } from './toNumber.std.ts'; const log = createLogger('attachments'); diff --git a/ts/util/attachments/deduplicateAttachment.preload.ts b/ts/util/attachments/deduplicateAttachment.preload.ts index 00c6a75956..eb77e4d130 100644 --- a/ts/util/attachments/deduplicateAttachment.preload.ts +++ b/ts/util/attachments/deduplicateAttachment.preload.ts @@ -1,15 +1,15 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../../logging/log.std.js'; -import { DataWriter } from '../../sql/Client.preload.js'; -import { doesAttachmentExist } from '../migrations.preload.js'; +import { createLogger } from '../../logging/log.std.ts'; +import { DataWriter } from '../../sql/Client.preload.ts'; +import { doesAttachmentExist } from '../migrations.preload.ts'; -import { type MIMEType, stringToMIMEType } from '../../types/MIME.std.js'; -import { strictAssert } from '../assert.std.js'; -import { type WithRequiredProperties } from '../../types/Util.std.js'; -import { type AttachmentType } from '../../types/Attachment.std.js'; -import { CURRENT_ATTACHMENT_VERSION } from '../../../app/attachments.node.js'; +import { type MIMEType, stringToMIMEType } from '../../types/MIME.std.ts'; +import { strictAssert } from '../assert.std.ts'; +import { type WithRequiredProperties } from '../../types/Util.std.ts'; +import { type AttachmentType } from '../../types/Attachment.std.ts'; +import { CURRENT_ATTACHMENT_VERSION } from '../../../app/attachments.node.ts'; const log = createLogger('deduplicateAttachment'); diff --git a/ts/util/attachments/markAttachmentAsPermanentlyErrored.std.ts b/ts/util/attachments/markAttachmentAsPermanentlyErrored.std.ts index fe3e7ce81b..05bb2ab8e5 100644 --- a/ts/util/attachments/markAttachmentAsPermanentlyErrored.std.ts +++ b/ts/util/attachments/markAttachmentAsPermanentlyErrored.std.ts @@ -3,7 +3,7 @@ import lodash from 'lodash'; -import type { AttachmentType } from '../../types/Attachment.std.js'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; const { omit } = lodash; diff --git a/ts/util/attachments/migrateDataToFilesystem.std.ts b/ts/util/attachments/migrateDataToFilesystem.std.ts index fdd12c1366..347329ed97 100644 --- a/ts/util/attachments/migrateDataToFilesystem.std.ts +++ b/ts/util/attachments/migrateDataToFilesystem.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import type { AttachmentType } from '../../types/Attachment.std.js'; -import type { ContextType } from '../../types/Message2.preload.js'; -import type { MessageAttributesType } from '../../model-types.js'; +import type { AttachmentType } from '../../types/Attachment.std.ts'; +import type { ContextType } from '../../types/Message2.preload.ts'; +import type { MessageAttributesType } from '../../model-types.d.ts'; const { isFunction, isTypedArray, isUndefined, omit } = lodash; diff --git a/ts/util/avatarDataToBytes.dom.ts b/ts/util/avatarDataToBytes.dom.ts index def673e199..3d54526658 100644 --- a/ts/util/avatarDataToBytes.dom.ts +++ b/ts/util/avatarDataToBytes.dom.ts @@ -1,15 +1,15 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AvatarColorType } from '../types/Colors.std.js'; -import { AvatarColorMap } from '../types/Colors.std.js'; -import type { AvatarDataType } from '../types/Avatar.std.js'; -import { canvasToBytes } from './canvasToBytes.std.js'; -import { getFittedFontSize } from './avatarTextSizeCalculator.std.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import { AvatarColorMap } from '../types/Colors.std.ts'; +import type { AvatarDataType } from '../types/Avatar.std.ts'; +import { canvasToBytes } from './canvasToBytes.std.ts'; +import { getFittedFontSize } from './avatarTextSizeCalculator.std.ts'; import { getLocalAttachmentUrl, AttachmentDisposition, -} from './getLocalAttachmentUrl.std.js'; +} from './getLocalAttachmentUrl.std.ts'; const CANVAS_SIZE = 1024; diff --git a/ts/util/avatarTextSizeCalculator.std.ts b/ts/util/avatarTextSizeCalculator.std.ts index 420b35d53d..6f412e4ba0 100644 --- a/ts/util/avatarTextSizeCalculator.std.ts +++ b/ts/util/avatarTextSizeCalculator.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { getEmojifyData } from '../components/fun/data/emojis.std.js'; +import { getEmojifyData } from '../components/fun/data/emojis.std.ts'; type FontSizes = { diameter: number; diff --git a/ts/util/avatarUtils.preload.ts b/ts/util/avatarUtils.preload.ts index a534676617..adc4bc36f3 100644 --- a/ts/util/avatarUtils.preload.ts +++ b/ts/util/avatarUtils.preload.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ContactAvatarType } from '../types/Avatar.std.js'; -import { isMe } from './whatTypeOfConversation.dom.js'; -import { isSignalConversation } from './isSignalConversation.dom.js'; -import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.js'; -import { getAbsoluteAttachmentPath } from './migrations.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { ContactAvatarType } from '../types/Avatar.std.ts'; +import { isMe } from './whatTypeOfConversation.dom.ts'; +import { isSignalConversation } from './isSignalConversation.dom.ts'; +import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.ts'; +import { getAbsoluteAttachmentPath } from './migrations.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export function hasAvatar( conversationAttrs: ConversationAttributesType diff --git a/ts/util/backupMediaDownload.preload.ts b/ts/util/backupMediaDownload.preload.ts index c93c8ae07c..65a5a2b52b 100644 --- a/ts/util/backupMediaDownload.preload.ts +++ b/ts/util/backupMediaDownload.preload.ts @@ -1,10 +1,10 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { AttachmentDownloadManager } from '../jobs/AttachmentDownloadManager.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { AttachmentDownloadManager } from '../jobs/AttachmentDownloadManager.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('backupMediaDownload'); diff --git a/ts/util/backupSubscriptionData.preload.ts b/ts/util/backupSubscriptionData.preload.ts index 4bce3e7135..fd3f95fc21 100644 --- a/ts/util/backupSubscriptionData.preload.ts +++ b/ts/util/backupSubscriptionData.preload.ts @@ -1,13 +1,13 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { Backups, SignalService } from '../protobuf/index.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { backupsService } from '../services/backups/index.preload.js'; -import { drop } from './drop.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { resetBackupMediaDownloadStats } from './backupMediaDownload.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { Backups, SignalService } from '../protobuf/index.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { backupsService } from '../services/backups/index.preload.ts'; +import { drop } from './drop.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { resetBackupMediaDownloadStats } from './backupMediaDownload.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('BackupSubscriptionData'); diff --git a/ts/util/basePaths.preload.ts b/ts/util/basePaths.preload.ts index 1bc0e657a6..76e258da1e 100644 --- a/ts/util/basePaths.preload.ts +++ b/ts/util/basePaths.preload.ts @@ -10,7 +10,7 @@ import { getAvatarsPath, getDownloadsPath, getMegaphonesPath, -} from '../windows/main/attachments.preload.js'; +} from '../../app/attachments.node.ts'; const userDataPath = window.SignalContext.getPath('userData'); diff --git a/ts/util/batcher.std.ts b/ts/util/batcher.std.ts index d8a021bfcf..62bae6cecd 100644 --- a/ts/util/batcher.std.ts +++ b/ts/util/batcher.std.ts @@ -3,12 +3,12 @@ import PQueue from 'p-queue'; -import { sleep } from './sleep.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.js'; -import { MINUTE } from './durations/index.std.js'; -import { drop } from './drop.std.js'; +import { sleep } from './sleep.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.ts'; +import { MINUTE } from './durations/index.std.ts'; +import { drop } from './drop.std.ts'; const log = createLogger('batcher'); diff --git a/ts/util/blockSendUntilConversationsAreVerified.dom.ts b/ts/util/blockSendUntilConversationsAreVerified.dom.ts index 97b33065cb..00cf0502e9 100644 --- a/ts/util/blockSendUntilConversationsAreVerified.dom.ts +++ b/ts/util/blockSendUntilConversationsAreVerified.dom.ts @@ -1,16 +1,16 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { SafetyNumberChangeSource } from '../types/SafetyNumberChangeSource.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { explodePromise } from './explodePromise.std.js'; +import type { SafetyNumberChangeSource } from '../types/SafetyNumberChangeSource.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { explodePromise } from './explodePromise.std.ts'; import type { RecipientsByConversation, RecipientEntry, -} from '../state/ducks/stories.preload.js'; -import { isNotNil } from './isNotNil.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { waitForAll } from './waitForAll.std.js'; +} from '../state/ducks/stories.preload.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { waitForAll } from './waitForAll.std.ts'; const log = createLogger('blockSendUntilConversationsAreVerified'); diff --git a/ts/util/buildExpiration.std.ts b/ts/util/buildExpiration.std.ts index 530443ec76..c2ac24c6d7 100644 --- a/ts/util/buildExpiration.std.ts +++ b/ts/util/buildExpiration.std.ts @@ -1,11 +1,11 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { Environment, getEnvironment } from '../environment.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { isNotUpdatable } from './version.std.js'; -import { isInPast } from './timestamp.std.js'; -import { DAY } from './durations/index.std.js'; +import { Environment, getEnvironment } from '../environment.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { isNotUpdatable } from './version.std.ts'; +import { isInPast } from './timestamp.std.ts'; +import { DAY } from './durations/index.std.ts'; const NINETY_ONE_DAYS = 91 * DAY; const THIRTY_ONE_DAYS = 31 * DAY; diff --git a/ts/util/callDisposition.preload.ts b/ts/util/callDisposition.preload.ts index b8a3bf30c3..b19ab5b188 100644 --- a/ts/util/callDisposition.preload.ts +++ b/ts/util/callDisposition.preload.ts @@ -12,13 +12,13 @@ import { } from '@signalapp/ringrtc'; import { ContentHint } from '@signalapp/libsignal-client'; import lodash from 'lodash'; -import { strictAssert } from './assert.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { bytesToUuid, uuidToBytes } from './uuidToBytes.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import { generateMessageId } from './generateMessageId.node.js'; -import { CallEndedReason, GroupCallJoinState } from '../types/Calling.std.js'; +import { strictAssert } from './assert.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { bytesToUuid, uuidToBytes } from './uuidToBytes.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import { generateMessageId } from './generateMessageId.node.ts'; +import { CallEndedReason, GroupCallJoinState } from '../types/Calling.std.ts'; import { CallMode, DirectCallStatus, @@ -36,20 +36,20 @@ import { callLogEventNormalizeSchema, CallLogEvent, ClearCallHistoryResult, -} from '../types/CallDisposition.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { isAciString } from './isAciString.std.js'; -import { isMe } from './whatTypeOfConversation.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { incrementMessageCounter } from './incrementMessageCounter.preload.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { SeenStatus, maxSeenStatus } from '../MessageSeenStatus.std.js'; -import { canConversationBeUnarchived } from './canConversationBeUnarchived.preload.js'; +} from '../types/CallDisposition.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { isAciString } from './isAciString.std.ts'; +import { isMe } from './whatTypeOfConversation.dom.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { incrementMessageCounter } from './incrementMessageCounter.preload.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { SeenStatus, maxSeenStatus } from '../MessageSeenStatus.std.ts'; +import { canConversationBeUnarchived } from './canConversationBeUnarchived.preload.ts'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import { MessageSender } from '../textsecure/SendMessage.preload.js'; -import * as Bytes from '../Bytes.std.js'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import { MessageSender } from '../textsecure/SendMessage.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; import type { CallDetails, CallEvent, @@ -59,18 +59,18 @@ import type { CallLogEventDetails, CallStatus, GroupCallMeta, -} from '../types/CallDisposition.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import { drop } from './drop.std.js'; -import { sendCallLinkUpdateSync } from './sendCallLinkUpdateSync.preload.js'; -import { storageServiceUploadJob } from '../services/storage.preload.js'; -import { CallLinkFinalizeDeleteManager } from '../jobs/CallLinkFinalizeDeleteManager.preload.js'; -import { parseLoose, parseStrict } from './schemas.std.js'; -import { calling } from '../services/calling.preload.js'; -import { cleanupMessages } from './cleanup.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../types/CallDisposition.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { drop } from './drop.std.ts'; +import { sendCallLinkUpdateSync } from './sendCallLinkUpdateSync.preload.ts'; +import { storageServiceUploadJob } from '../services/storage.preload.ts'; +import { CallLinkFinalizeDeleteManager } from '../jobs/CallLinkFinalizeDeleteManager.preload.ts'; +import { parseLoose, parseStrict } from './schemas.std.ts'; +import { calling } from '../services/calling.preload.ts'; +import { cleanupMessages } from './cleanup.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { isEqual } = lodash; diff --git a/ts/util/callLinks.std.ts b/ts/util/callLinks.std.ts index 567fccf5bc..c02d956497 100644 --- a/ts/util/callLinks.std.ts +++ b/ts/util/callLinks.std.ts @@ -1,21 +1,21 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { v4 as generateUuid } from 'uuid'; -import * as Bytes from '../Bytes.std.js'; +import * as Bytes from '../Bytes.std.ts'; import type { CallLinkConversationType, CallLinkType, -} from '../types/CallLink.std.js'; -import { CallLinkRestrictions } from '../types/CallLink.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { getColorForCallLink } from './getColorForCallLink.std.js'; +} from '../types/CallLink.std.ts'; +import { CallLinkRestrictions } from '../types/CallLink.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { getColorForCallLink } from './getColorForCallLink.std.ts'; import { AdhocCallStatus, CallDirection, CallType, type CallHistoryDetails, CallMode, -} from '../types/CallDisposition.std.js'; +} from '../types/CallDisposition.std.ts'; export const CALL_LINK_DEFAULT_STATE: Pick< CallLinkType, diff --git a/ts/util/callLinks/zkgroup.preload.ts b/ts/util/callLinks/zkgroup.preload.ts index 2e2b330eb4..a41a1da5f9 100644 --- a/ts/util/callLinks/zkgroup.preload.ts +++ b/ts/util/callLinks/zkgroup.preload.ts @@ -3,15 +3,15 @@ import type { CallLinkRootKey } from '@signalapp/ringrtc'; import { Aci } from '@signalapp/libsignal-client'; -import { getCheckedCallLinkAuthCredentialsForToday } from '../../services/groupCredentialFetcher.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import type { CallLinkAuthCredentialPresentation } from '../zkgroup.node.js'; -import * as durations from '../durations/index.std.js'; +import { getCheckedCallLinkAuthCredentialsForToday } from '../../services/groupCredentialFetcher.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import type { CallLinkAuthCredentialPresentation } from '../zkgroup.node.ts'; +import * as durations from '../durations/index.std.ts'; import { CallLinkAuthCredential, CallLinkSecretParams, GenericServerPublicParams, -} from '../zkgroup.node.js'; +} from '../zkgroup.node.ts'; export async function getCallLinkAuthCredentialPresentation( callLinkRootKey: CallLinkRootKey diff --git a/ts/util/callLinksRingrtc.node.ts b/ts/util/callLinksRingrtc.node.ts index 9a57145f36..3c0a73d966 100644 --- a/ts/util/callLinksRingrtc.node.ts +++ b/ts/util/callLinksRingrtc.node.ts @@ -12,7 +12,7 @@ import { callLinkRecordSchema, defunctCallLinkRecordSchema, toCallLinkRestrictions, -} from '../types/CallLink.std.js'; +} from '../types/CallLink.std.ts'; import type { CallLinkRecord, CallLinkRestrictions, @@ -20,15 +20,15 @@ import type { DefunctCallLinkRecord, DefunctCallLinkType, CallLinkStateType, -} from '../types/CallLink.std.js'; -import { unicodeSlice } from './unicodeSlice.std.js'; +} from '../types/CallLink.std.ts'; +import { unicodeSlice } from './unicodeSlice.std.ts'; import { fromAdminKeyBytes, getKeyFromCallLink, toAdminKeyBytes, -} from './callLinks.std.js'; -import { parseStrict } from './schemas.std.js'; -import * as Bytes from '../Bytes.std.js'; +} from './callLinks.std.ts'; +import { parseStrict } from './schemas.std.ts'; +import * as Bytes from '../Bytes.std.ts'; /** * RingRTC conversions diff --git a/ts/util/callQualitySurvey.dom.ts b/ts/util/callQualitySurvey.dom.ts index aead62c7ba..452856296e 100644 --- a/ts/util/callQualitySurvey.dom.ts +++ b/ts/util/callQualitySurvey.dom.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { CallSummary } from '@signalapp/ringrtc'; -import { DAY, SECOND } from './durations/index.std.js'; -import { isMockEnvironment } from '../environment.std.js'; +import { DAY, SECOND } from './durations/index.std.ts'; +import { isMockEnvironment } from '../environment.std.ts'; import { COUNTRY_CODE_FALLBACK, getCountryCodeValue, getValue, -} from '../RemoteConfig.dom.js'; -import { getCountryCode } from '../types/PhoneNumber.std.js'; -import { createLogger } from '../logging/log.std.js'; +} from '../RemoteConfig.dom.ts'; +import { getCountryCode } from '../types/PhoneNumber.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('callQualitySurvey'); diff --git a/ts/util/callingGetParticipantName.std.ts b/ts/util/callingGetParticipantName.std.ts index 5e9cd928f7..d9c2de9863 100644 --- a/ts/util/callingGetParticipantName.std.ts +++ b/ts/util/callingGetParticipantName.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; export function getParticipantName( participant: Readonly< diff --git a/ts/util/callingIsReconnecting.std.ts b/ts/util/callingIsReconnecting.std.ts index 439be04496..aa5437e3fd 100644 --- a/ts/util/callingIsReconnecting.std.ts +++ b/ts/util/callingIsReconnecting.std.ts @@ -1,10 +1,10 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { CallState, GroupCallConnectionState } from '../types/Calling.std.js'; -import { CallMode } from '../types/CallDisposition.std.js'; -import type { ActiveCallType } from '../types/Calling.std.js'; -import { isGroupOrAdhocActiveCall } from './isGroupOrAdhocCall.std.js'; +import { CallState, GroupCallConnectionState } from '../types/Calling.std.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; +import type { ActiveCallType } from '../types/Calling.std.ts'; +import { isGroupOrAdhocActiveCall } from './isGroupOrAdhocCall.std.ts'; export function isReconnecting(activeCall: ActiveCallType): boolean { return ( diff --git a/ts/util/callingMessageToProto.node.ts b/ts/util/callingMessageToProto.node.ts index 390779fcdf..123ca19f6f 100644 --- a/ts/util/callingMessageToProto.node.ts +++ b/ts/util/callingMessageToProto.node.ts @@ -3,10 +3,10 @@ import type { AnswerMessage, CallingMessage } from '@signalapp/ringrtc'; import { CallMessageUrgency } from '@signalapp/ringrtc'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; const log = createLogger('callingMessageToProto'); diff --git a/ts/util/callingNotification.std.ts b/ts/util/callingNotification.std.ts index 49a279e572..feb9329d2c 100644 --- a/ts/util/callingNotification.std.ts +++ b/ts/util/callingNotification.std.ts @@ -1,23 +1,23 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; import { CallMode, CallDirection, DirectCallStatus, CallType, GroupCallStatus, -} from '../types/CallDisposition.std.js'; +} from '../types/CallDisposition.std.ts'; import type { CallStatus, CallHistoryDetails, -} from '../types/CallDisposition.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { strictAssert } from './assert.std.js'; -import { isMoreRecentThan } from './timestamp.std.js'; -import { MINUTE } from './durations/index.std.js'; +} from '../types/CallDisposition.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { strictAssert } from './assert.std.ts'; +import { isMoreRecentThan } from './timestamp.std.ts'; +import { MINUTE } from './durations/index.std.ts'; export type CallingNotificationType = Readonly<{ // In some older calls, we don't have a call id, this hardens against that. diff --git a/ts/util/callingTones.preload.ts b/ts/util/callingTones.preload.ts index 042b60dfad..38a6852f25 100644 --- a/ts/util/callingTones.preload.ts +++ b/ts/util/callingTones.preload.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import PQueue from 'p-queue'; -import { MINUTE } from './durations/index.std.js'; -import { Sound, SoundType } from './Sound.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { MINUTE } from './durations/index.std.ts'; +import { Sound, SoundType } from './Sound.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const ringtoneEventQueue = new PQueue({ concurrency: 1, diff --git a/ts/util/canAddNewMembers.preload.ts b/ts/util/canAddNewMembers.preload.ts index b084c4ecf9..44dfb72843 100644 --- a/ts/util/canAddNewMembers.preload.ts +++ b/ts/util/canAddNewMembers.preload.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { isGroupV2 } from './whatTypeOfConversation.dom.js'; -import { areWeAdmin } from './areWeAdmin.preload.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { isGroupV2 } from './whatTypeOfConversation.dom.ts'; +import { areWeAdmin } from './areWeAdmin.preload.ts'; export function canAddNewMembers( conversationAttrs: ConversationAttributesType diff --git a/ts/util/canBeAnnouncementGroup.dom.ts b/ts/util/canBeAnnouncementGroup.dom.ts index 0cffb690be..0735665ff9 100644 --- a/ts/util/canBeAnnouncementGroup.dom.ts +++ b/ts/util/canBeAnnouncementGroup.dom.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import { isGroupV2 } from './whatTypeOfConversation.dom.js'; +import { isGroupV2 } from './whatTypeOfConversation.dom.ts'; export function canBeAnnouncementGroup( conversationAttrs: Pick< diff --git a/ts/util/canChangeTimer.preload.ts b/ts/util/canChangeTimer.preload.ts index c203d33272..9d4de526ed 100644 --- a/ts/util/canChangeTimer.preload.ts +++ b/ts/util/canChangeTimer.preload.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { areWeAdmin } from './areWeAdmin.preload.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { areWeAdmin } from './areWeAdmin.preload.ts'; import { isDirectConversation, isGroupV1, isGroupV2, -} from './whatTypeOfConversation.dom.js'; +} from './whatTypeOfConversation.dom.ts'; export function canChangeTimer( attributes: ConversationAttributesType diff --git a/ts/util/canConversationBeUnarchived.preload.ts b/ts/util/canConversationBeUnarchived.preload.ts index b74136561c..cf64fc96b0 100644 --- a/ts/util/canConversationBeUnarchived.preload.ts +++ b/ts/util/canConversationBeUnarchived.preload.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import { isConversationMuted } from './isConversationMuted.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { isConversationMuted } from './isConversationMuted.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export function canConversationBeUnarchived( attrs: ConversationAttributesType diff --git a/ts/util/canDeleteForEveryone.preload.ts b/ts/util/canDeleteForEveryone.preload.ts index 67a8cde74c..b6f6f21b9e 100644 --- a/ts/util/canDeleteForEveryone.preload.ts +++ b/ts/util/canDeleteForEveryone.preload.ts @@ -1,21 +1,21 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString, ServiceIdString } from '../types/ServiceId.std.js'; +import type { AciString, ServiceIdString } from '../types/ServiceId.std.ts'; import type { ConversationAttributesType, ReadonlyMessageAttributesType, -} from '../model-types.js'; -import { getMessageAge } from './getMessageAge.std.js'; +} from '../model-types.d.ts'; +import { getMessageAge } from './getMessageAge.std.ts'; import { getAdminDeleteMaxAgeMs, getNormalDeleteMaxAgeMs, -} from './getDeleteMaxAgeMs.dom.js'; -import { DAY } from './durations/index.std.js'; -import { isGroupV2, isMe } from './whatTypeOfConversation.dom.js'; -import { isSignalConversation } from './isSignalConversation.dom.js'; -import { getSourceServiceId } from '../messages/sources.preload.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +} from './getDeleteMaxAgeMs.dom.ts'; +import { DAY } from './durations/index.std.ts'; +import { isGroupV2, isMe } from './whatTypeOfConversation.dom.ts'; +import { isSignalConversation } from './isSignalConversation.dom.ts'; +import { getSourceServiceId } from '../messages/sources.preload.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; export type DeleteForEveryoneMessage = Pick< ReadonlyMessageAttributesType, diff --git a/ts/util/canEditGroupInfo.preload.ts b/ts/util/canEditGroupInfo.preload.ts index 89e7af7c0d..b7b0095850 100644 --- a/ts/util/canEditGroupInfo.preload.ts +++ b/ts/util/canEditGroupInfo.preload.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { isGroupV2 } from './whatTypeOfConversation.dom.js'; -import { areWeAdmin } from './areWeAdmin.preload.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { isGroupV2 } from './whatTypeOfConversation.dom.ts'; +import { areWeAdmin } from './areWeAdmin.preload.ts'; export function canEditGroupInfo( conversationAttrs: ConversationAttributesType diff --git a/ts/util/canEditMessage.dom.ts b/ts/util/canEditMessage.dom.ts index 6ed8a0f8db..a16a08d379 100644 --- a/ts/util/canEditMessage.dom.ts +++ b/ts/util/canEditMessage.dom.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { DAY } from './durations/index.std.js'; -import { isMoreRecentThan } from './timestamp.std.js'; -import { isOutgoing, isPoll } from '../messages/helpers.std.js'; -import { isMessageNoteToSelf } from './isMessageNoteToSelf.dom.js'; +import { DAY } from './durations/index.std.ts'; +import { isMoreRecentThan } from './timestamp.std.ts'; +import { isOutgoing, isPoll } from '../messages/helpers.std.ts'; +import { isMessageNoteToSelf } from './isMessageNoteToSelf.dom.ts'; export const MESSAGE_MAX_EDIT_COUNT = 10; diff --git a/ts/util/canvasToBlob.std.ts b/ts/util/canvasToBlob.std.ts index bc5e66c731..e0d4181c71 100644 --- a/ts/util/canvasToBlob.std.ts +++ b/ts/util/canvasToBlob.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { IMAGE_JPEG } from '../types/MIME.std.js'; +import { IMAGE_JPEG } from '../types/MIME.std.ts'; /** * Similar to [the built-in `toBlob` method][0], but returns a Promise. diff --git a/ts/util/canvasToBytes.std.ts b/ts/util/canvasToBytes.std.ts index fee263ded2..489c3e7352 100644 --- a/ts/util/canvasToBytes.std.ts +++ b/ts/util/canvasToBytes.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { canvasToBlob } from './canvasToBlob.std.js'; -import type { MIMEType } from '../types/MIME.std.js'; +import { canvasToBlob } from './canvasToBlob.std.ts'; +import type { MIMEType } from '../types/MIME.std.ts'; export async function canvasToBytes( canvas: HTMLCanvasElement, diff --git a/ts/util/captureAudioDuration.dom.ts b/ts/util/captureAudioDuration.dom.ts index 8d49376ebe..2c6e9411f8 100644 --- a/ts/util/captureAudioDuration.dom.ts +++ b/ts/util/captureAudioDuration.dom.ts @@ -1,10 +1,10 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.js'; -import { toLogFormat } from '../types/errors.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; export async function captureAudioDuration( attachment: AttachmentType, diff --git a/ts/util/captureDimensionsAndScreenshot.dom.ts b/ts/util/captureDimensionsAndScreenshot.dom.ts index 3e646ef83a..58f7ee44bc 100644 --- a/ts/util/captureDimensionsAndScreenshot.dom.ts +++ b/ts/util/captureDimensionsAndScreenshot.dom.ts @@ -6,17 +6,17 @@ import { blobToArrayBuffer } from 'blob-util'; import type { AttachmentType, LocalAttachmentV2Type, -} from '../types/Attachment.std.js'; -import { type MIMEType, IMAGE_PNG } from '../types/MIME.std.js'; -import type { MakeVideoScreenshotResultType } from '../types/VisualAttachment.dom.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.js'; -import { toLogFormat } from '../types/errors.std.js'; +} from '../types/Attachment.std.ts'; +import { type MIMEType, IMAGE_PNG } from '../types/MIME.std.ts'; +import type { MakeVideoScreenshotResultType } from '../types/VisualAttachment.dom.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; import { isImageTypeSupported, isVideoTypeSupported, -} from './GoogleChrome.std.js'; -import { strictAssert } from './assert.std.js'; +} from './GoogleChrome.std.ts'; +import { strictAssert } from './assert.std.ts'; const THUMBNAIL_SIZE = 150; const THUMBNAIL_CONTENT_TYPE = IMAGE_PNG; diff --git a/ts/util/checkFirstEnvelope.dom.ts b/ts/util/checkFirstEnvelope.dom.ts index 715817c661..7445c29e5f 100644 --- a/ts/util/checkFirstEnvelope.dom.ts +++ b/ts/util/checkFirstEnvelope.dom.ts @@ -3,16 +3,16 @@ import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { HOUR, SECOND } from './durations/index.std.js'; -import { isOlderThan } from './timestamp.std.js'; -import { isProduction } from './version.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { HOUR, SECOND } from './durations/index.std.ts'; +import { isOlderThan } from './timestamp.std.ts'; +import { isProduction } from './version.std.ts'; -import type { IncomingWebSocketRequest } from '../textsecure/WebsocketResources.preload.js'; +import type { IncomingWebSocketRequest } from '../textsecure/WebsocketResources.preload.ts'; -import { toNumber } from './toNumber.std.js'; +import { toNumber } from './toNumber.std.ts'; const { isNumber } = lodash; diff --git a/ts/util/checkOurPniIdentityKey.preload.ts b/ts/util/checkOurPniIdentityKey.preload.ts index 547e2f72b1..4b7dfef3f7 100644 --- a/ts/util/checkOurPniIdentityKey.preload.ts +++ b/ts/util/checkOurPniIdentityKey.preload.ts @@ -1,11 +1,11 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { constantTimeEqual } from '../Crypto.node.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { whoami, getKeysForServiceId } from '../textsecure/WebAPI.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { constantTimeEqual } from '../Crypto.node.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { whoami, getKeysForServiceId } from '../textsecure/WebAPI.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('checkOurPniIdentityKey'); diff --git a/ts/util/cleanup.preload.ts b/ts/util/cleanup.preload.ts index 0df58fd93f..340aebe4a9 100644 --- a/ts/util/cleanup.preload.ts +++ b/ts/util/cleanup.preload.ts @@ -6,40 +6,40 @@ import { batch } from 'react-redux'; import { pick } from 'lodash'; import type { MessageAttributesType } from '../model-types.d.ts'; -import { MessageModel } from '../models/messages.preload.js'; +import { MessageModel } from '../models/messages.preload.ts'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; -import { MessageSender } from '../textsecure/SendMessage.preload.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { deletePackReference } from '../types/Stickers.preload.js'; -import { isStory } from '../messages/helpers.std.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; -import { getCallHistorySelector } from '../state/selectors/callHistory.std.js'; +import { MessageSender } from '../textsecure/SendMessage.preload.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { deletePackReference } from '../types/Stickers.preload.ts'; +import { isStory } from '../messages/helpers.std.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; +import { getCallHistorySelector } from '../state/selectors/callHistory.std.ts'; import { DirectCallStatus, GroupCallStatus, AdhocCallStatus, -} from '../types/CallDisposition.std.js'; -import { getMessageIdForLogging } from './idForLogging.preload.js'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import { MINUTE } from './durations/index.std.js'; -import { drop } from './drop.std.js'; +} from '../types/CallDisposition.std.ts'; +import { getMessageIdForLogging } from './idForLogging.preload.ts'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import { MINUTE } from './durations/index.std.ts'; +import { drop } from './drop.std.ts'; import { getFilePathsReferencedByAttachment, getFilePathsReferencedByMessage, -} from './messageFilePaths.std.js'; +} from './messageFilePaths.std.ts'; import { deleteDownloadFile, maybeDeleteAttachmentFile, -} from './migrations.preload.js'; -import { hydrateStoryContext } from './hydrateStoryContext.preload.js'; -import { update as updateExpiringMessagesService } from '../services/expiringMessagesDeletion.preload.js'; -import { tapToViewMessagesDeletionService } from '../services/tapToViewMessagesDeletionService.preload.js'; -import { throttledUpdateBackupMediaDownloadProgress } from './updateBackupMediaDownloadProgress.preload.js'; -import { messageAttrsToPreserveAfterErase } from '../types/Message.std.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; +} from './migrations.preload.ts'; +import { hydrateStoryContext } from './hydrateStoryContext.preload.ts'; +import { update as updateExpiringMessagesService } from '../services/expiringMessagesDeletion.preload.ts'; +import { tapToViewMessagesDeletionService } from '../services/tapToViewMessagesDeletionService.preload.ts'; +import { throttledUpdateBackupMediaDownloadProgress } from './updateBackupMediaDownloadProgress.preload.ts'; +import { messageAttrsToPreserveAfterErase } from '../types/Message.std.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; const log = createLogger('cleanup'); diff --git a/ts/util/clearConversationDraftAttachments.preload.ts b/ts/util/clearConversationDraftAttachments.preload.ts index 7ee8158204..354358d48d 100644 --- a/ts/util/clearConversationDraftAttachments.preload.ts +++ b/ts/util/clearConversationDraftAttachments.preload.ts @@ -1,10 +1,10 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentDraftType } from '../types/Attachment.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { strictAssert } from './assert.std.js'; -import { deleteDraftAttachment } from './deleteDraftAttachment.preload.js'; +import type { AttachmentDraftType } from '../types/Attachment.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { strictAssert } from './assert.std.ts'; +import { deleteDraftAttachment } from './deleteDraftAttachment.preload.ts'; export async function clearConversationDraftAttachments( conversationId: string, diff --git a/ts/util/computeBlurHashUrl.std.ts b/ts/util/computeBlurHashUrl.std.ts index 64711c4512..299f9e4ae0 100644 --- a/ts/util/computeBlurHashUrl.std.ts +++ b/ts/util/computeBlurHashUrl.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { decode } from 'blurhash'; -import * as Bytes from '../Bytes.std.js'; +import * as Bytes from '../Bytes.std.ts'; const BITMAP_HEADER = new Uint8Array([ // Header diff --git a/ts/util/consoleLogger.std.ts b/ts/util/consoleLogger.std.ts index 1040749f56..ae2dc935c4 100644 --- a/ts/util/consoleLogger.std.ts +++ b/ts/util/consoleLogger.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LoggerType } from '../types/Logging.std.js'; +import type { LoggerType } from '../types/Logging.std.ts'; export const consoleLogger: LoggerType = { fatal(...args) { diff --git a/ts/util/copyLinksWithToast.dom.ts b/ts/util/copyLinksWithToast.dom.ts index 0dff88746a..6c37e8721a 100644 --- a/ts/util/copyLinksWithToast.dom.ts +++ b/ts/util/copyLinksWithToast.dom.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { ToastType } from '../types/Toast.dom.js'; +import { ToastType } from '../types/Toast.dom.tsx'; export async function copyGroupLink(groupLink: string): Promise { await window.navigator.clipboard.writeText(groupLink); diff --git a/ts/util/countMutedStats.std.ts b/ts/util/countMutedStats.std.ts index 2efbe05ec1..b11c59597f 100644 --- a/ts/util/countMutedStats.std.ts +++ b/ts/util/countMutedStats.std.ts @@ -1,13 +1,13 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; import { isConversationInChatFolder, type ChatFolderId, -} from '../types/ChatFolder.std.js'; -import { CurrentChatFolders } from '../types/CurrentChatFolders.std.js'; -import { isConversationMuted } from './isConversationMuted.std.js'; +} from '../types/ChatFolder.std.ts'; +import { CurrentChatFolders } from '../types/CurrentChatFolders.std.ts'; +import { isConversationMuted } from './isConversationMuted.std.ts'; type MutableMutedStats = { chatsMutedCount: number; diff --git a/ts/util/countUnreadStats.std.ts b/ts/util/countUnreadStats.std.ts index fc2bfe2f56..c84e88804c 100644 --- a/ts/util/countUnreadStats.std.ts +++ b/ts/util/countUnreadStats.std.ts @@ -1,13 +1,13 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isConversationInChatFolder } from '../types/ChatFolder.std.js'; -import { CurrentChatFolders } from '../types/CurrentChatFolders.std.js'; -import { isConversationMuted } from './isConversationMuted.std.js'; +import { isConversationInChatFolder } from '../types/ChatFolder.std.ts'; +import { CurrentChatFolders } from '../types/CurrentChatFolders.std.ts'; +import { isConversationMuted } from './isConversationMuted.std.ts'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { ChatFolderId } from '../types/ChatFolder.std.js'; -import type { NotificationProfileType } from '../types/NotificationProfile.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { ChatFolderId } from '../types/ChatFolder.std.ts'; +import type { NotificationProfileType } from '../types/NotificationProfile.std.ts'; type MutableUnreadStats = { /** diff --git a/ts/util/createAvatarData.std.ts b/ts/util/createAvatarData.std.ts index 12013eb2cb..bb8c021aa4 100644 --- a/ts/util/createAvatarData.std.ts +++ b/ts/util/createAvatarData.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { v4 as uuid } from 'uuid'; -import type { AvatarDataType } from '../types/Avatar.std.js'; +import type { AvatarDataType } from '../types/Avatar.std.ts'; export function createAvatarData( partialAvatarData: Readonly> diff --git a/ts/util/createHTTPSAgent.node.ts b/ts/util/createHTTPSAgent.node.ts index a7d8da23ef..b15fd2bf26 100644 --- a/ts/util/createHTTPSAgent.node.ts +++ b/ts/util/createHTTPSAgent.node.ts @@ -10,17 +10,17 @@ import type { ConnectionOptions } from 'node:tls'; import { callbackify, promisify } from 'node:util'; import pTimeout from 'p-timeout'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; import { electronLookup as electronLookupWithCb, interleaveAddresses, -} from './dns.node.js'; -import { strictAssert } from './assert.std.js'; -import { parseIntOrThrow } from './parseIntOrThrow.std.js'; -import { sleep } from './sleep.std.js'; -import { SECOND } from './durations/index.std.js'; -import { dropNull } from './dropNull.std.js'; -import { explodePromise } from './explodePromise.std.js'; +} from './dns.node.ts'; +import { strictAssert } from './assert.std.ts'; +import { parseIntOrThrow } from './parseIntOrThrow.std.ts'; +import { sleep } from './sleep.std.ts'; +import { SECOND } from './durations/index.std.ts'; +import { dropNull } from './dropNull.std.ts'; +import { explodePromise } from './explodePromise.std.ts'; const log = createLogger('createHTTPSAgent'); diff --git a/ts/util/createIPCEvents.preload.ts b/ts/util/createIPCEvents.preload.ts index 33a22fc95c..24894a0566 100644 --- a/ts/util/createIPCEvents.preload.ts +++ b/ts/util/createIPCEvents.preload.ts @@ -5,37 +5,37 @@ import { ipcRenderer } from 'electron'; import type { SystemPreferences } from 'electron'; import lodash from 'lodash'; -import type { ZoomFactorType } from '../types/StorageKeys.std.js'; -import * as Errors from '../types/errors.std.js'; -import * as Stickers from '../types/Stickers.preload.js'; -import * as Settings from '../types/Settings.std.js'; +import type { ZoomFactorType } from '../types/StorageKeys.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import * as Stickers from '../types/Stickers.preload.ts'; +import * as Settings from '../types/Settings.std.ts'; -import { resolveUsernameByLinkBase64 } from '../services/username.preload.js'; -import { isInCall } from '../state/selectors/calling.std.js'; +import { resolveUsernameByLinkBase64 } from '../services/username.preload.ts'; +import { isInCall } from '../state/selectors/calling.std.ts'; -import * as Registration from './registration.preload.js'; -import { lookupConversationWithoutServiceId } from './lookupConversationWithoutServiceId.preload.js'; -import { createLogger } from '../logging/log.std.js'; +import * as Registration from './registration.preload.ts'; +import { lookupConversationWithoutServiceId } from './lookupConversationWithoutServiceId.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; import { type NotificationClickData, notificationService, -} from '../services/notifications.preload.js'; -import { joinViaLink } from '../groups.preload.js'; +} from '../services/notifications.preload.ts'; +import { joinViaLink } from '../groups.preload.ts'; import { StoryViewModeType, StoryViewTargetType, -} from '../types/Stories.std.js'; -import { isValidE164 } from './isValidE164.std.js'; -import { fromWebSafeBase64 } from './webSafeBase64.std.js'; -import { showConfirmationDialog } from './showConfirmationDialog.dom.js'; +} from '../types/Stories.std.ts'; +import { isValidE164 } from './isValidE164.std.ts'; +import { fromWebSafeBase64 } from './webSafeBase64.std.ts'; +import { showConfirmationDialog } from './showConfirmationDialog.dom.tsx'; import type { EphemeralSettings, SettingsValuesType, ThemeType, -} from './preload.preload.js'; -import { SystemTraySetting } from '../types/SystemTraySetting.std.js'; -import { putStickers } from '../textsecure/WebAPI.preload.js'; -import OS from './os/osPreload.preload.js'; +} from './preload.preload.ts'; +import { SystemTraySetting } from '../types/SystemTraySetting.std.ts'; +import { putStickers } from '../textsecure/WebAPI.preload.ts'; +import OS from './os/osPreload.preload.ts'; const { noop } = lodash; diff --git a/ts/util/createIdenticon.preload.tsx b/ts/util/createIdenticon.preload.tsx index d926b7c24c..ec02b046b0 100644 --- a/ts/util/createIdenticon.preload.tsx +++ b/ts/util/createIdenticon.preload.tsx @@ -4,17 +4,17 @@ import React from 'react'; import loadImage from 'blueimp-load-image'; import { renderToString } from 'react-dom/server'; -import type { AvatarColorType } from '../types/Colors.std.js'; -import { AvatarColorMap } from '../types/Colors.std.js'; +import type { AvatarColorType } from '../types/Colors.std.ts'; +import { AvatarColorMap } from '../types/Colors.std.ts'; import { IdenticonSVGForCallLink, IdenticonSVGForContact, IdenticonSVGForGroup, // oxlint-disable-next-line signal-desktop/no-restricted-paths -} from '../components/IdenticonSVG.dom.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import { writeNewPlaintextTempData } from './migrations.preload.js'; -import { strictAssert } from './assert.std.js'; +} from '../components/IdenticonSVG.dom.tsx'; +import { missingCaseError } from './missingCaseError.std.ts'; +import { writeNewPlaintextTempData } from './migrations.preload.ts'; +import { strictAssert } from './assert.std.ts'; const TARGET_MIME = 'image/png'; diff --git a/ts/util/createProxyAgent.node.ts b/ts/util/createProxyAgent.node.ts index 7aabd78948..0d99617520 100644 --- a/ts/util/createProxyAgent.node.ts +++ b/ts/util/createProxyAgent.node.ts @@ -7,12 +7,12 @@ import { URL } from 'node:url'; import type { LookupOptions, LookupAddress } from 'node:dns'; import { lookup } from 'node:dns/promises'; -import { createLogger } from '../logging/log.std.js'; -import { happyEyeballs } from './createHTTPSAgent.node.js'; -import type { ConnectOptionsType } from './createHTTPSAgent.node.js'; -import { explodePromise } from './explodePromise.std.js'; -import { SECOND } from './durations/index.std.js'; -import { drop } from './drop.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { happyEyeballs } from './createHTTPSAgent.node.ts'; +import type { ConnectOptionsType } from './createHTTPSAgent.node.ts'; +import { explodePromise } from './explodePromise.std.ts'; +import { SECOND } from './durations/index.std.ts'; +import { drop } from './drop.std.ts'; const log = createLogger('createProxyAgent'); diff --git a/ts/util/currency.dom.ts b/ts/util/currency.dom.ts index 9cc1f98af5..a28000b659 100644 --- a/ts/util/currency.dom.ts +++ b/ts/util/currency.dom.ts @@ -6,13 +6,13 @@ import type { HumanDonationAmount, DonationReceipt, StripeDonationAmount, -} from '../types/Donations.std.js'; +} from '../types/Donations.std.ts'; import { humanDonationAmountSchema, stripeDonationAmountSchema, -} from '../types/Donations.std.js'; -import { parseStrict, safeParseStrict } from './schemas.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; +} from '../types/Donations.std.ts'; +import { parseStrict, safeParseStrict } from './schemas.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; // See: https://docs.stripe.com/currencies?presentment-currency=US export const ZERO_DECIMAL_CURRENCIES = new Set([ diff --git a/ts/util/decipherWithAesKey.node.ts b/ts/util/decipherWithAesKey.node.ts index ad4f06c524..1c7f6cd284 100644 --- a/ts/util/decipherWithAesKey.node.ts +++ b/ts/util/decipherWithAesKey.node.ts @@ -5,8 +5,8 @@ import { createDecipheriv, type Decipheriv } from 'node:crypto'; import { Buffer } from 'node:buffer'; import { Transform } from 'node:stream'; -import { CipherType, IV_LENGTH } from '../types/Crypto.std.js'; -import { strictAssert } from './assert.std.js'; +import { CipherType, IV_LENGTH } from '../types/Crypto.std.ts'; +import { strictAssert } from './assert.std.ts'; /** * Gets the IV from the start of the stream and creates a decipher. diff --git a/ts/util/deconstructLookup.std.ts b/ts/util/deconstructLookup.std.ts index a3b06b68c6..7254db29ca 100644 --- a/ts/util/deconstructLookup.std.ts +++ b/ts/util/deconstructLookup.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getOwn } from './getOwn.std.js'; -import { assertDev } from './assert.std.js'; +import { getOwn } from './getOwn.std.ts'; +import { assertDev } from './assert.std.ts'; export const deconstructLookup = ( lookup: Record, diff --git a/ts/util/deleteAllLogs.preload.ts b/ts/util/deleteAllLogs.preload.ts index 2633a9e355..4dafcc4d92 100644 --- a/ts/util/deleteAllLogs.preload.ts +++ b/ts/util/deleteAllLogs.preload.ts @@ -4,8 +4,8 @@ import { ipcRenderer } from 'electron'; import pTimeout from 'p-timeout'; -import { beforeRestart } from '../logging/set_up_renderer_logging.preload.js'; -import * as durations from './durations/index.std.js'; +import { beforeRestart } from '../logging/set_up_renderer_logging.preload.ts'; +import * as durations from './durations/index.std.ts'; export function deleteAllLogs(): Promise { // Restart logging again when the file stream close diff --git a/ts/util/deleteAllMyStories.preload.ts b/ts/util/deleteAllMyStories.preload.ts index bde0db56be..2bb47eaf9b 100644 --- a/ts/util/deleteAllMyStories.preload.ts +++ b/ts/util/deleteAllMyStories.preload.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { deleteStoryForEveryone } from './deleteStoryForEveryone.preload.js'; +import { deleteStoryForEveryone } from './deleteStoryForEveryone.preload.ts'; export async function deleteAllMyStories(): Promise { const { stories } = window.reduxStore.getState().stories; diff --git a/ts/util/deleteDraftAttachment.preload.ts b/ts/util/deleteDraftAttachment.preload.ts index e8e5f419e5..099da09bf7 100644 --- a/ts/util/deleteDraftAttachment.preload.ts +++ b/ts/util/deleteDraftAttachment.preload.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentType } from '../types/Attachment.std.js'; -import { deleteDraftFile } from './migrations.preload.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import { deleteDraftFile } from './migrations.preload.ts'; export async function deleteDraftAttachment( attachment: Pick diff --git a/ts/util/deleteForEveryone.preload.ts b/ts/util/deleteForEveryone.preload.ts index 73a8392411..2e6ba1d339 100644 --- a/ts/util/deleteForEveryone.preload.ts +++ b/ts/util/deleteForEveryone.preload.ts @@ -1,18 +1,18 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { DeleteAttributesType } from '../messageModifiers/Deletes.preload.js'; +import type { DeleteAttributesType } from '../messageModifiers/Deletes.preload.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { MessageModel } from '../models/messages.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { isMe } from './whatTypeOfConversation.dom.js'; -import { getSourceServiceId } from '../messages/sources.preload.js'; -import { isStory } from '../state/selectors/message.preload.js'; -import { canReceiveDeleteForEveryone } from './canDeleteForEveryone.preload.js'; -import { isAciString } from './isAciString.std.js'; -import { eraseMessageContents } from './cleanup.preload.js'; -import { notificationService } from '../services/notifications.preload.js'; -import { DataWriter } from '../sql/Client.preload.js'; +import type { MessageModel } from '../models/messages.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { isMe } from './whatTypeOfConversation.dom.ts'; +import { getSourceServiceId } from '../messages/sources.preload.ts'; +import { isStory } from '../state/selectors/message.preload.ts'; +import { canReceiveDeleteForEveryone } from './canDeleteForEveryone.preload.ts'; +import { isAciString } from './isAciString.std.ts'; +import { eraseMessageContents } from './cleanup.preload.ts'; +import { notificationService } from '../services/notifications.preload.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; const log = createLogger('deleteForEveryone'); diff --git a/ts/util/deleteForMe.preload.ts b/ts/util/deleteForMe.preload.ts index 34ce1bdfac..d9b18da110 100644 --- a/ts/util/deleteForMe.preload.ts +++ b/ts/util/deleteForMe.preload.ts @@ -3,24 +3,24 @@ import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import type { AddressableMessage } from '../textsecure/messageReceiverEvents.std.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import { MessageModel } from '../models/messages.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import type { AddressableMessage } from '../textsecure/messageReceiverEvents.std.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import { MessageModel } from '../models/messages.preload.ts'; import { cleanupMessages, cleanupAttachmentFiles, postSaveUpdates, -} from './cleanup.preload.js'; +} from './cleanup.preload.ts'; import { findMatchingMessage, getMessageQueryFromTarget, -} from './syncIdentifiers.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from './syncIdentifiers.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { last, sortBy } = lodash; diff --git a/ts/util/deleteGroupStoryReplyForEveryone.preload.ts b/ts/util/deleteGroupStoryReplyForEveryone.preload.ts index d97101eab6..15aa13598b 100644 --- a/ts/util/deleteGroupStoryReplyForEveryone.preload.ts +++ b/ts/util/deleteGroupStoryReplyForEveryone.preload.ts @@ -1,9 +1,9 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { sendDeleteForEveryoneMessage } from './sendDeleteForEveryoneMessage.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { createLogger } from '../logging/log.std.js'; +import { sendDeleteForEveryoneMessage } from './sendDeleteForEveryoneMessage.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('deleteGroupStoryReplyForEveryone'); diff --git a/ts/util/deleteStoryForEveryone.preload.ts b/ts/util/deleteStoryForEveryone.preload.ts index fc047a869f..a3999c26c7 100644 --- a/ts/util/deleteStoryForEveryone.preload.ts +++ b/ts/util/deleteStoryForEveryone.preload.ts @@ -3,25 +3,25 @@ import lodash from 'lodash'; -import type { ConversationQueueJobData } from '../jobs/conversationJobQueue.preload.js'; -import type { StoryDataType } from '../state/ducks/stories.preload.js'; -import * as Errors from '../types/errors.std.js'; -import type { StoryMessageRecipientsType } from '../types/Stories.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { DAY } from './durations/index.std.js'; -import { StoryRecipientUpdateEvent } from '../textsecure/messageReceiverEvents.std.js'; +import type { ConversationQueueJobData } from '../jobs/conversationJobQueue.preload.ts'; +import type { StoryDataType } from '../state/ducks/stories.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import type { StoryMessageRecipientsType } from '../types/Stories.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DAY } from './durations/index.std.ts'; +import { StoryRecipientUpdateEvent } from '../textsecure/messageReceiverEvents.std.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { onStoryRecipientUpdate } from './onStoryRecipientUpdate.preload.js'; -import { sendDeleteForEveryoneMessage } from './sendDeleteForEveryoneMessage.preload.js'; -import { isGroupV2 } from './whatTypeOfConversation.dom.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { repeat, zipObject } from './iterables.std.js'; -import { isOlderThan } from './timestamp.std.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { onStoryRecipientUpdate } from './onStoryRecipientUpdate.preload.ts'; +import { sendDeleteForEveryoneMessage } from './sendDeleteForEveryoneMessage.preload.ts'; +import { isGroupV2 } from './whatTypeOfConversation.dom.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { repeat, zipObject } from './iterables.std.ts'; +import { isOlderThan } from './timestamp.std.ts'; const { noop } = lodash; diff --git a/ts/util/deliveryReceipt.preload.ts b/ts/util/deliveryReceipt.preload.ts index 0a4ff18889..7f11d86834 100644 --- a/ts/util/deliveryReceipt.preload.ts +++ b/ts/util/deliveryReceipt.preload.ts @@ -7,11 +7,11 @@ import lodash from 'lodash'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { ReceiptType } from '../types/Receipt.std.js'; -import type { Receipt } from '../types/Receipt.std.js'; -import { MINUTE } from './durations/index.std.js'; -import { createBatcher } from './batcher.std.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { ReceiptType } from '../types/Receipt.std.ts'; +import type { Receipt } from '../types/Receipt.std.ts'; +import { MINUTE } from './durations/index.std.ts'; +import { createBatcher } from './batcher.std.ts'; const { groupBy } = lodash; diff --git a/ts/util/denyPendingApprovalRequest.preload.ts b/ts/util/denyPendingApprovalRequest.preload.ts index 3fba122372..1d9f560003 100644 --- a/ts/util/denyPendingApprovalRequest.preload.ts +++ b/ts/util/denyPendingApprovalRequest.preload.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { SignalService as Proto } from '../protobuf/index.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { buildDeletePendingAdminApprovalMemberChange } from '../groups.preload.js'; -import { getConversationIdForLogging } from './idForLogging.preload.js'; -import { isMemberRequestingToJoin } from './groupMembershipUtils.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { SignalService as Proto } from '../protobuf/index.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { buildDeletePendingAdminApprovalMemberChange } from '../groups.preload.ts'; +import { getConversationIdForLogging } from './idForLogging.preload.ts'; +import { isMemberRequestingToJoin } from './groupMembershipUtils.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('denyPendingApprovalRequest'); diff --git a/ts/util/deprecated.std.ts b/ts/util/deprecated.std.ts index ea28ede9d8..0f2c69208a 100644 --- a/ts/util/deprecated.std.ts +++ b/ts/util/deprecated.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getEnvironment, Environment } from '../environment.std.js'; -import { createLogger } from '../logging/log.std.js'; +import { getEnvironment, Environment } from '../environment.std.ts'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('deprecated'); diff --git a/ts/util/desktopCapturer.preload.ts b/ts/util/desktopCapturer.preload.ts index 7d31dd853d..bafef9565f 100644 --- a/ts/util/desktopCapturer.preload.ts +++ b/ts/util/desktopCapturer.preload.ts @@ -4,21 +4,21 @@ import { ipcRenderer, type DesktopCapturerSource } from 'electron'; import type { Stream, StreamOptions } from '@indutny/mac-screen-share'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import type { PresentableSource } from '../types/Calling.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import type { PresentableSource } from '../types/Calling.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; import { REQUESTED_SCREEN_SHARE_WIDTH, REQUESTED_SCREEN_SHARE_HEIGHT, REQUESTED_SCREEN_SHARE_FRAMERATE, -} from '../calling/constants.std.js'; -import { strictAssert } from './assert.std.js'; -import { explodePromise } from './explodePromise.std.js'; -import { isNotNil } from './isNotNil.std.js'; -import { drop } from './drop.std.js'; -import { SECOND } from './durations/index.std.js'; -import { isOlderThan } from './timestamp.std.js'; +} from '../calling/constants.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { explodePromise } from './explodePromise.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { drop } from './drop.std.ts'; +import { SECOND } from './durations/index.std.ts'; +import { isOlderThan } from './timestamp.std.ts'; const log = createLogger('desktopCapturer'); diff --git a/ts/util/distributionListToSendTarget.preload.ts b/ts/util/distributionListToSendTarget.preload.ts index ce49bbec15..0a91c163e9 100644 --- a/ts/util/distributionListToSendTarget.preload.ts +++ b/ts/util/distributionListToSendTarget.preload.ts @@ -1,12 +1,12 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ServiceIdString } from '../types/ServiceId.std.js'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; import type { SenderKeyInfoType } from '../model-types.d.ts'; -import { DataWriter } from '../sql/Client.preload.js'; -import type { StoryDistributionType } from '../sql/Interface.std.js'; -import type { SenderKeyTargetType } from './sendToGroup.preload.js'; -import { isNotNil } from './isNotNil.std.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import type { StoryDistributionType } from '../sql/Interface.std.ts'; +import type { SenderKeyTargetType } from './sendToGroup.preload.ts'; +import { isNotNil } from './isNotNil.std.ts'; export function distributionListToSendTarget( distributionList: StoryDistributionType, diff --git a/ts/util/dns.node.ts b/ts/util/dns.node.ts index a183919c61..7bd1cac4c3 100644 --- a/ts/util/dns.node.ts +++ b/ts/util/dns.node.ts @@ -12,10 +12,10 @@ import * as electron from 'electron'; import type { ResolvedHost, ResolvedEndpoint } from 'electron'; import pTimeout from 'p-timeout'; -import { strictAssert } from './assert.std.js'; -import { drop } from './drop.std.js'; -import type { DNSFallbackType } from '../types/DNSFallback.std.js'; -import { SECOND } from './durations/index.std.js'; +import { strictAssert } from './assert.std.ts'; +import { drop } from './drop.std.ts'; +import type { DNSFallbackType } from '../types/DNSFallback.std.ts'; +import { SECOND } from './durations/index.std.ts'; const LOOKUP_TIMEOUT_MS = 5 * SECOND; const fallbackAddrs = new Map>(); diff --git a/ts/util/donations.dom.ts b/ts/util/donations.dom.ts index bcc40d3fa8..4e4e2853a2 100644 --- a/ts/util/donations.dom.ts +++ b/ts/util/donations.dom.ts @@ -4,13 +4,13 @@ import type { DonationWorkflow, HumanDonationAmount, -} from '../types/Donations.std.js'; -import { donationStateSchema } from '../types/Donations.std.js'; +} from '../types/Donations.std.ts'; +import { donationStateSchema } from '../types/Donations.std.ts'; import { brandStripeDonationAmount, toHumanDonationAmount, -} from './currency.dom.js'; -import { missingCaseError } from './missingCaseError.std.js'; +} from './currency.dom.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; // Donation where we started backend processing, but did not redeem a badge yet. // Note we skip workflows in the INTENT state because it requires user confirmation diff --git a/ts/util/doubleCheckMissingQuoteReference.preload.ts b/ts/util/doubleCheckMissingQuoteReference.preload.ts index a13f585040..e759358ba1 100644 --- a/ts/util/doubleCheckMissingQuoteReference.preload.ts +++ b/ts/util/doubleCheckMissingQuoteReference.preload.ts @@ -1,17 +1,17 @@ // Copyright 2019 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getMessageById } from '../messages/getMessageById.preload.js'; -import type { MessageModel } from '../models/messages.preload.js'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import type { MessageModel } from '../models/messages.preload.ts'; -import { hydrateStoryContext } from './hydrateStoryContext.preload.js'; -import { getMessageIdForLogging } from './idForLogging.preload.js'; +import { hydrateStoryContext } from './hydrateStoryContext.preload.ts'; +import { getMessageIdForLogging } from './idForLogging.preload.ts'; -import { createLogger } from '../logging/log.std.js'; -import { isQuoteAMatch } from '../messages/quotes.preload.js'; -import { shouldTryToCopyFromQuotedMessage } from '../messages/helpers.std.js'; -import { copyQuoteContentFromOriginal } from '../messages/copyQuote.preload.js'; -import { maybeDeleteAttachmentFile } from './migrations.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { isQuoteAMatch } from '../messages/quotes.preload.ts'; +import { shouldTryToCopyFromQuotedMessage } from '../messages/helpers.std.ts'; +import { copyQuoteContentFromOriginal } from '../messages/copyQuote.preload.ts'; +import { maybeDeleteAttachmentFile } from './migrations.preload.ts'; const log = createLogger('doubleCheckMissingQuoteReference'); diff --git a/ts/util/downloadAttachment.preload.ts b/ts/util/downloadAttachment.preload.ts index 228f015420..77b34b94e1 100644 --- a/ts/util/downloadAttachment.preload.ts +++ b/ts/util/downloadAttachment.preload.ts @@ -5,27 +5,27 @@ import { hasRequiredInformationForRemoteBackup, hasRequiredInformationToDownloadFromTransitTier, wasImportedFromLocalBackup, -} from './Attachment.std.js'; +} from './Attachment.std.ts'; import { type AttachmentType, AttachmentVariant, AttachmentPermanentlyUndownloadableError, -} from '../types/Attachment.std.js'; -import { downloadAttachment as doDownloadAttachment } from '../textsecure/downloadAttachment.preload.js'; +} from '../types/Attachment.std.ts'; +import { downloadAttachment as doDownloadAttachment } from '../textsecure/downloadAttachment.preload.ts'; import { getAttachment, getAttachmentFromBackupTier, -} from '../textsecure/WebAPI.preload.js'; -import { downloadAttachmentFromLocalBackup as doDownloadAttachmentFromLocalBackup } from './downloadAttachmentFromLocalBackup.preload.js'; -import { MediaTier } from '../types/AttachmentDownload.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import type { ReencryptedAttachmentV2 } from '../AttachmentCrypto.node.js'; -import * as RemoteConfig from '../RemoteConfig.dom.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { isAbortError } from './isAbortError.std.js'; -import { expiresTooSoonForBackup } from '../services/backups/util/expiration.std.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { downloadAttachmentFromLocalBackup as doDownloadAttachmentFromLocalBackup } from './downloadAttachmentFromLocalBackup.preload.ts'; +import { MediaTier } from '../types/AttachmentDownload.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import type { ReencryptedAttachmentV2 } from '../AttachmentCrypto.node.ts'; +import * as RemoteConfig from '../RemoteConfig.dom.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { isAbortError } from './isAbortError.std.ts'; +import { expiresTooSoonForBackup } from '../services/backups/util/expiration.std.ts'; const log = createLogger('downloadAttachment'); diff --git a/ts/util/downloadAttachmentFromLocalBackup.preload.ts b/ts/util/downloadAttachmentFromLocalBackup.preload.ts index e51a099b41..2aabcdf509 100644 --- a/ts/util/downloadAttachmentFromLocalBackup.preload.ts +++ b/ts/util/downloadAttachmentFromLocalBackup.preload.ts @@ -3,13 +3,13 @@ import { existsSync } from 'node:fs'; import lodash from 'lodash'; -import type { BackupableAttachmentType } from '../types/Attachment.std.js'; +import type { BackupableAttachmentType } from '../types/Attachment.std.ts'; import { decryptAndReencryptLocally, type ReencryptedAttachmentV2, -} from '../AttachmentCrypto.node.js'; -import { strictAssert } from './assert.std.js'; -import { getAbsoluteAttachmentPath } from './migrations.preload.js'; +} from '../AttachmentCrypto.node.ts'; +import { strictAssert } from './assert.std.ts'; +import { getAbsoluteAttachmentPath } from './migrations.preload.ts'; const { isNumber } = lodash; diff --git a/ts/util/downloadOnboardingStory.preload.ts b/ts/util/downloadOnboardingStory.preload.ts index 2620d55dc2..171b4c4d6a 100644 --- a/ts/util/downloadOnboardingStory.preload.ts +++ b/ts/util/downloadOnboardingStory.preload.ts @@ -3,24 +3,24 @@ import { v4 as generateUuid } from 'uuid'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { IMAGE_JPEG } from '../types/MIME.std.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../MessageSeenStatus.std.js'; -import { findAndDeleteOnboardingStoryIfExists } from './findAndDeleteOnboardingStoryIfExists.preload.js'; -import { saveNewMessageBatcher } from './messageBatcher.preload.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { IMAGE_JPEG } from '../types/MIME.std.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../MessageSeenStatus.std.ts'; +import { findAndDeleteOnboardingStoryIfExists } from './findAndDeleteOnboardingStoryIfExists.preload.ts'; +import { saveNewMessageBatcher } from './messageBatcher.preload.ts'; import { writeNewAttachmentData, processNewAttachment, -} from './migrations.preload.js'; -import { incrementMessageCounter } from './incrementMessageCounter.preload.js'; +} from './migrations.preload.ts'; +import { incrementMessageCounter } from './incrementMessageCounter.preload.ts'; import { getOnboardingStoryManifest, downloadOnboardingStories, -} from '../textsecure/WebAPI.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('downloadOnboardingStory'); diff --git a/ts/util/durations/duration-in-seconds.std.ts b/ts/util/durations/duration-in-seconds.std.ts index 141a60f5a2..0e84545672 100644 --- a/ts/util/durations/duration-in-seconds.std.ts +++ b/ts/util/durations/duration-in-seconds.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as Constants from './constants.std.js'; +import * as Constants from './constants.std.ts'; export type DurationInSeconds = number & { __time_difference_in_seconds: never; diff --git a/ts/util/durations/index.std.ts b/ts/util/durations/index.std.ts index c3a9ee2b84..95298fba9f 100644 --- a/ts/util/durations/index.std.ts +++ b/ts/util/durations/index.std.ts @@ -1,5 +1,5 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -export * from './constants.std.js'; -export { DurationInSeconds } from './duration-in-seconds.std.js'; +export * from './constants.std.ts'; +export { DurationInSeconds } from './duration-in-seconds.std.ts'; diff --git a/ts/util/editHelpers.std.ts b/ts/util/editHelpers.std.ts index 286e5cc969..b35f4854e7 100644 --- a/ts/util/editHelpers.std.ts +++ b/ts/util/editHelpers.std.ts @@ -4,14 +4,14 @@ import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import { strictAssert } from './assert.std.js'; +import { strictAssert } from './assert.std.ts'; import type { EditHistoryType, MessageAttributesType, ReadonlyMessageAttributesType, } from '../model-types.d.ts'; -import type { LoggerType } from '../types/Logging.std.js'; +import type { LoggerType } from '../types/Logging.std.ts'; const { isNumber, sortBy } = lodash; diff --git a/ts/util/emoji.std.ts b/ts/util/emoji.std.ts index 768b276847..c2542deae8 100644 --- a/ts/util/emoji.std.ts +++ b/ts/util/emoji.std.ts @@ -3,8 +3,8 @@ import emojiRegex from 'emoji-regex'; -import { assertDev } from './assert.std.js'; -import { take } from './iterables.std.js'; +import { assertDev } from './assert.std.ts'; +import { take } from './iterables.std.ts'; const REGEXP = emojiRegex(); const MAX_EMOJI_TO_MATCH = 5000; diff --git a/ts/util/encryptConversationAttachments.preload.ts b/ts/util/encryptConversationAttachments.preload.ts index ca0d763b53..3ec31eb5d8 100644 --- a/ts/util/encryptConversationAttachments.preload.ts +++ b/ts/util/encryptConversationAttachments.preload.ts @@ -3,12 +3,12 @@ import pMap from 'p-map'; -import { createLogger } from '../logging/log.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import { encryptLegacyAttachment } from './encryptLegacyAttachment.preload.js'; -import { AttachmentDisposition } from './getLocalAttachmentUrl.std.js'; -import { isNotNil } from './isNotNil.std.js'; +import { encryptLegacyAttachment } from './encryptLegacyAttachment.preload.ts'; +import { AttachmentDisposition } from './getLocalAttachmentUrl.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; import { maybeDeleteAttachmentFile, deleteAvatar, @@ -19,10 +19,10 @@ import { writeNewAttachmentData, writeNewAvatarData, writeNewDraftData, -} from './migrations.preload.js'; -import { isSignalConversation } from './isSignalConversation.dom.js'; -import { getConversationIdForLogging } from './idForLogging.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from './migrations.preload.ts'; +import { isSignalConversation } from './isSignalConversation.dom.ts'; +import { getConversationIdForLogging } from './idForLogging.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('encryptConversationAttachments'); diff --git a/ts/util/encryptLegacyAttachment.preload.ts b/ts/util/encryptLegacyAttachment.preload.ts index fbf5fcb54f..1174a696f5 100644 --- a/ts/util/encryptLegacyAttachment.preload.ts +++ b/ts/util/encryptLegacyAttachment.preload.ts @@ -6,13 +6,13 @@ import { LRUCache } from 'lru-cache'; import type { AddressableAttachmentType, LocalAttachmentV2Type, -} from '../types/Attachment.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { AttachmentDisposition } from './getLocalAttachmentUrl.std.js'; -import { drop } from './drop.std.js'; -import { MINUTE } from './durations/index.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../types/Attachment.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { AttachmentDisposition } from './getLocalAttachmentUrl.std.ts'; +import { drop } from './drop.std.ts'; +import { MINUTE } from './durations/index.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('encryptLegacyAttachment'); diff --git a/ts/util/encryptProfileData.preload.ts b/ts/util/encryptProfileData.preload.ts index a19227c663..0109fdd773 100644 --- a/ts/util/encryptProfileData.preload.ts +++ b/ts/util/encryptProfileData.preload.ts @@ -1,22 +1,22 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { ProfileRequestDataType } from '../textsecure/WebAPI.preload.js'; -import { assertDev } from './assert.std.js'; -import * as Bytes from '../Bytes.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { ProfileRequestDataType } from '../textsecure/WebAPI.preload.ts'; +import { assertDev } from './assert.std.ts'; +import * as Bytes from '../Bytes.std.ts'; import { PaddedLengths, encryptProfile, encryptProfileItemWithPadding, -} from '../Crypto.node.js'; -import type { AvatarUpdateType } from '../types/Avatar.std.js'; +} from '../Crypto.node.ts'; +import type { AvatarUpdateType } from '../types/Avatar.std.ts'; import { deriveProfileKeyCommitment, deriveProfileKeyVersion, -} from './zkgroup.node.js'; -import { isSharingPhoneNumberWithEverybody } from './phoneNumberSharingMode.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from './zkgroup.node.ts'; +import { isSharingPhoneNumberWithEverybody } from './phoneNumberSharingMode.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export async function encryptProfileData( conversation: ConversationType, diff --git a/ts/util/enqueuePollCreateForSend.dom.ts b/ts/util/enqueuePollCreateForSend.dom.ts index ab448fd990..c024ef3bb2 100644 --- a/ts/util/enqueuePollCreateForSend.dom.ts +++ b/ts/util/enqueuePollCreateForSend.dom.ts @@ -1,12 +1,12 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationModel } from '../models/conversations.preload.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; import { isPollSend1to1Enabled, type PollCreateType, -} from '../types/Polls.dom.js'; +} from '../types/Polls.dom.ts'; export async function enqueuePollCreateForSend( conversation: ConversationModel, diff --git a/ts/util/expirationTimer.std.ts b/ts/util/expirationTimer.std.ts index 2767901f79..c28e589845 100644 --- a/ts/util/expirationTimer.std.ts +++ b/ts/util/expirationTimer.std.ts @@ -4,8 +4,8 @@ import humanizeDuration from 'humanize-duration'; import type { Unit } from 'humanize-duration'; import lodash from 'lodash'; -import type { LocalizerType } from '../types/Util.std.js'; -import { SECOND, DurationInSeconds } from './durations/index.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { SECOND, DurationInSeconds } from './durations/index.std.ts'; const { isNumber } = lodash; diff --git a/ts/util/exponentialBackoff.std.ts b/ts/util/exponentialBackoff.std.ts index 8cd191685d..0141151e48 100644 --- a/ts/util/exponentialBackoff.std.ts +++ b/ts/util/exponentialBackoff.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { strictAssert } from './assert.std.js'; -import * as durations from './durations/index.std.js'; +import { strictAssert } from './assert.std.ts'; +import * as durations from './durations/index.std.ts'; const BACKOFF_FACTOR = 1.9; const MAX_BACKOFF = 15 * durations.MINUTE; diff --git a/ts/util/filterAndSortConversations.std.ts b/ts/util/filterAndSortConversations.std.ts index 6bc5be9c7b..a26949d762 100644 --- a/ts/util/filterAndSortConversations.std.ts +++ b/ts/util/filterAndSortConversations.std.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import type Fuse from 'fuse.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { parseAndFormatPhoneNumber } from './libphonenumberInstance.std.js'; -import { WEEK } from './durations/index.std.js'; -import { fuseGetFnRemoveDiacritics, getCachedFuseIndex } from './fuse.std.js'; -import type { UnreadStatsIncludeMuted } from './countUnreadStats.std.js'; -import { isConversationUnread } from './countUnreadStats.std.js'; -import { getE164 } from './getE164.std.js'; -import { removeDiacritics } from './removeDiacritics.std.js'; -import { isAciString } from './isAciString.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { parseAndFormatPhoneNumber } from './libphonenumberInstance.std.ts'; +import { WEEK } from './durations/index.std.ts'; +import { fuseGetFnRemoveDiacritics, getCachedFuseIndex } from './fuse.std.ts'; +import type { UnreadStatsIncludeMuted } from './countUnreadStats.std.ts'; +import { isConversationUnread } from './countUnreadStats.std.ts'; +import { getE164 } from './getE164.std.ts'; +import { removeDiacritics } from './removeDiacritics.std.ts'; +import { isAciString } from './isAciString.std.ts'; // See: https://fusejs.io/api/options.html#includescore // 0 score is a perfect match, 1 - complete mismatch diff --git a/ts/util/filterCallLinks.dom.ts b/ts/util/filterCallLinks.dom.ts index 4a07e6f6b8..b96fab8c87 100644 --- a/ts/util/filterCallLinks.dom.ts +++ b/ts/util/filterCallLinks.dom.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import type Fuse from 'fuse.js'; -import { fuseGetFnRemoveDiacritics, getCachedFuseIndex } from './fuse.std.js'; -import { removeDiacritics } from './removeDiacritics.std.js'; -import type { CallLinkType } from '../types/CallLink.std.js'; +import { fuseGetFnRemoveDiacritics, getCachedFuseIndex } from './fuse.std.ts'; +import { removeDiacritics } from './removeDiacritics.std.ts'; +import type { CallLinkType } from '../types/CallLink.std.ts'; // Based on parameters in filterAndSortConversations const FUSE_OPTIONS: Fuse.IFuseOptions = { diff --git a/ts/util/findAndDeleteOnboardingStoryIfExists.preload.ts b/ts/util/findAndDeleteOnboardingStoryIfExists.preload.ts index 11f693510d..47eda51cab 100644 --- a/ts/util/findAndDeleteOnboardingStoryIfExists.preload.ts +++ b/ts/util/findAndDeleteOnboardingStoryIfExists.preload.ts @@ -1,13 +1,13 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { calculateExpirationTimestamp } from './expirationTimer.std.js'; -import { DAY } from './durations/index.std.js'; -import { cleanupMessages } from './cleanup.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { calculateExpirationTimestamp } from './expirationTimer.std.ts'; +import { DAY } from './durations/index.std.ts'; +import { cleanupMessages } from './cleanup.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('findAndDeleteOnboardingStoryIfExists'); diff --git a/ts/util/findAndFormatContact.preload.ts b/ts/util/findAndFormatContact.preload.ts index ca36852cd5..1191eaf61a 100644 --- a/ts/util/findAndFormatContact.preload.ts +++ b/ts/util/findAndFormatContact.preload.ts @@ -1,10 +1,10 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { PLACEHOLDER_CONTACT_ID } from '../state/selectors/conversations.dom.js'; -import { format, isValidNumber } from '../types/PhoneNumber.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { PLACEHOLDER_CONTACT_ID } from '../state/selectors/conversations.dom.ts'; +import { format, isValidNumber } from '../types/PhoneNumber.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const PLACEHOLDER_CONTACT: ConversationType = { acceptedMessageRequest: false, diff --git a/ts/util/findStoryMessage.preload.ts b/ts/util/findStoryMessage.preload.ts index d63d428315..93c8560c16 100644 --- a/ts/util/findStoryMessage.preload.ts +++ b/ts/util/findStoryMessage.preload.ts @@ -5,12 +5,12 @@ import type { ReadonlyMessageAttributesType, ConversationAttributesType, } from '../model-types.d.ts'; -import { type AciString } from '../types/ServiceId.std.js'; +import { type AciString } from '../types/ServiceId.std.ts'; import type { ProcessedStoryContext } from '../textsecure/Types.d.ts'; -import { createLogger } from '../logging/log.std.js'; -import { getAuthorId } from '../messages/sources.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; +import { createLogger } from '../logging/log.std.ts'; +import { getAuthorId } from '../messages/sources.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; const log = createLogger('findStoryMessage'); diff --git a/ts/util/formatTimestamp.dom.ts b/ts/util/formatTimestamp.dom.ts index f18f0a4c9a..2a8ca37bb6 100644 --- a/ts/util/formatTimestamp.dom.ts +++ b/ts/util/formatTimestamp.dom.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import moment from 'moment'; -import { HourCyclePreference } from '../types/I18N.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { assertDev } from './assert.std.js'; -import { isYesterday, isToday, type RawTimestamp } from './timestamp.std.js'; -import { HOUR, MINUTE, MONTH, WEEK } from './durations/index.std.js'; +import { HourCyclePreference } from '../types/I18N.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { assertDev } from './assert.std.ts'; +import { isYesterday, isToday, type RawTimestamp } from './timestamp.std.ts'; +import { HOUR, MINUTE, MONTH, WEEK } from './durations/index.std.ts'; function getOptionsWithPreferences( options: Intl.DateTimeFormatOptions diff --git a/ts/util/fuse.std.ts b/ts/util/fuse.std.ts index e7b8380591..079671b606 100644 --- a/ts/util/fuse.std.ts +++ b/ts/util/fuse.std.ts @@ -3,7 +3,7 @@ import Fuse from 'fuse.js'; -import { removeDiacritics } from './removeDiacritics.std.js'; +import { removeDiacritics } from './removeDiacritics.std.ts'; const cachedIndices: Map< Fuse.IFuseOptions, diff --git a/ts/util/generateDonationReceipt.dom.ts b/ts/util/generateDonationReceipt.dom.ts index 74d04da347..c2b163fa6d 100644 --- a/ts/util/generateDonationReceipt.dom.ts +++ b/ts/util/generateDonationReceipt.dom.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import { fabric } from 'fabric'; -import type { DonationReceipt } from '../types/Donations.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { strictAssert } from './assert.std.js'; -import { getDateTimeFormatter } from './formatTimestamp.dom.js'; -import { isStagingServer } from './isStagingServer.dom.js'; +import type { DonationReceipt } from '../types/Donations.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { getDateTimeFormatter } from './formatTimestamp.dom.ts'; +import { isStagingServer } from './isStagingServer.dom.ts'; import { getHumanDonationAmount, toHumanCurrencyString, -} from './currency.dom.js'; +} from './currency.dom.ts'; const SCALING_FACTOR = 4.17; diff --git a/ts/util/generateMessageId.node.ts b/ts/util/generateMessageId.node.ts index d3adbffd34..3d149e74e1 100644 --- a/ts/util/generateMessageId.node.ts +++ b/ts/util/generateMessageId.node.ts @@ -3,7 +3,7 @@ import { stringify } from 'uuid'; -import { getRandomBytes } from '../Crypto.node.js'; +import { getRandomBytes } from '../Crypto.node.ts'; export type GeneratedMessageIdType = Readonly<{ id: string; diff --git a/ts/util/getAccessControlOptions.std.ts b/ts/util/getAccessControlOptions.std.ts index 4299ab6797..8ac143ba05 100644 --- a/ts/util/getAccessControlOptions.std.ts +++ b/ts/util/getAccessControlOptions.std.ts @@ -1,8 +1,8 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LocalizerType } from '../types/Util.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; const AccessControlEnum = Proto.AccessControl.AccessRequired; diff --git a/ts/util/getAddedByForOurPendingInvitation.preload.ts b/ts/util/getAddedByForOurPendingInvitation.preload.ts index 7225c7ae40..568429ca8a 100644 --- a/ts/util/getAddedByForOurPendingInvitation.preload.ts +++ b/ts/util/getAddedByForOurPendingInvitation.preload.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export function getAddedByForOurPendingInvitation( conversation: ConversationType diff --git a/ts/util/getAvatarData.dom.ts b/ts/util/getAvatarData.dom.ts index 52133903d0..2f7eefc3f1 100644 --- a/ts/util/getAvatarData.dom.ts +++ b/ts/util/getAvatarData.dom.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AvatarDataType } from '../types/Avatar.std.js'; -import { getDefaultAvatars } from '../types/Avatar.std.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; +import type { AvatarDataType } from '../types/Avatar.std.ts'; +import { getDefaultAvatars } from '../types/Avatar.std.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; import type { ConversationAttributesType } from '../model-types.d.ts'; export function getAvatarData( diff --git a/ts/util/getBasicAuth.std.ts b/ts/util/getBasicAuth.std.ts index 86bbc1ecbb..e4c3de80b1 100644 --- a/ts/util/getBasicAuth.std.ts +++ b/ts/util/getBasicAuth.std.ts @@ -1,7 +1,7 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { fromString, toBase64 } from '../Bytes.std.js'; +import { fromString, toBase64 } from '../Bytes.std.ts'; export type GetBasicAuthOptionsType = Readonly<{ username: string; diff --git a/ts/util/getColorForCallLink.std.ts b/ts/util/getColorForCallLink.std.ts index d902cb1d86..ce5573ae2a 100644 --- a/ts/util/getColorForCallLink.std.ts +++ b/ts/util/getColorForCallLink.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { AxoTokens } from '../axo/AxoTokens.std.js'; +import { AxoTokens } from '../axo/AxoTokens.std.ts'; // See https://github.com/signalapp/ringrtc/blob/49b4b8a16f997c7fa9a429e96aa83f80b2065c63/src/rust/src/lite/call_links/base16.rs#L8 const BASE_16_CONSONANT_ALPHABET = 'bcdfghkmnpqrstxz'; diff --git a/ts/util/getConversation.preload.ts b/ts/util/getConversation.preload.ts index 02e6fb40c9..07e73fdb50 100644 --- a/ts/util/getConversation.preload.ts +++ b/ts/util/getConversation.preload.ts @@ -3,31 +3,31 @@ import memoizee from 'memoizee'; import lodash from 'lodash'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { GroupNameCollisionsWithIdsByTitle } from './groupMemberNameCollisions.std.js'; -import { StorySendMode } from '../types/Stories.std.js'; -import { areWeAdmin } from './areWeAdmin.preload.js'; -import { buildGroupLink } from '../groups.preload.js'; -import { canAddNewMembers } from './canAddNewMembers.preload.js'; -import { canBeAnnouncementGroup } from './canBeAnnouncementGroup.dom.js'; -import { canChangeTimer } from './canChangeTimer.preload.js'; -import { canEditGroupInfo } from './canEditGroupInfo.preload.js'; -import { dropNull } from './dropNull.std.js'; -import { getAboutText } from './getAboutText.dom.js'; +import type { GroupNameCollisionsWithIdsByTitle } from './groupMemberNameCollisions.std.ts'; +import { StorySendMode } from '../types/Stories.std.ts'; +import { areWeAdmin } from './areWeAdmin.preload.ts'; +import { buildGroupLink } from '../groups.preload.ts'; +import { canAddNewMembers } from './canAddNewMembers.preload.ts'; +import { canBeAnnouncementGroup } from './canBeAnnouncementGroup.dom.ts'; +import { canChangeTimer } from './canChangeTimer.preload.ts'; +import { canEditGroupInfo } from './canEditGroupInfo.preload.ts'; +import { dropNull } from './dropNull.std.ts'; +import { getAboutText } from './getAboutText.dom.ts'; import { getAvatarHash, getLocalAvatarUrl, getLocalProfileAvatarUrl, getRawAvatarPath, hasAvatar, -} from './avatarUtils.preload.js'; -import { getAvatarData } from './getAvatarData.dom.js'; -import { getConversationMembers } from './getConversationMembers.dom.js'; -import { getCustomColorData, migrateColor } from './migrateColor.node.js'; -import { getDraftPreview } from './getDraftPreview.preload.js'; -import { getLastMessage } from './getLastMessage.preload.js'; +} from './avatarUtils.preload.ts'; +import { getAvatarData } from './getAvatarData.dom.ts'; +import { getConversationMembers } from './getConversationMembers.dom.ts'; +import { getCustomColorData, migrateColor } from './migrateColor.node.ts'; +import { getDraftPreview } from './getDraftPreview.preload.ts'; +import { getLastMessage } from './getLastMessage.preload.ts'; import { getNumber, getProfileName, @@ -35,17 +35,17 @@ import { getTitleNoDefault, canHaveUsername, renderNumber, -} from './getTitle.preload.js'; -import { hasDraft } from './hasDraft.std.js'; -import { isAciString } from './isAciString.std.js'; -import { isBlocked } from './isBlocked.preload.js'; -import { isConversationAccepted } from './isConversationAccepted.preload.js'; +} from './getTitle.preload.ts'; +import { hasDraft } from './hasDraft.std.ts'; +import { isAciString } from './isAciString.std.ts'; +import { isBlocked } from './isBlocked.preload.ts'; +import { isConversationAccepted } from './isConversationAccepted.preload.ts'; import { isDirectConversation, isGroupV1, isGroupV2, isMe, -} from './whatTypeOfConversation.dom.js'; +} from './whatTypeOfConversation.dom.ts'; import { areWePending, getBannedMemberships, @@ -54,11 +54,11 @@ import { getPendingApprovalMemberships, getPendingMemberships, isMemberAwaitingApproval, -} from './groupMembershipUtils.preload.js'; -import { isNotNil } from './isNotNil.std.js'; -import { getIdentifierHash } from '../Crypto.node.js'; -import { getAvatarPlaceholderGradient } from '../utils/getAvatarPlaceholderGradient.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from './groupMembershipUtils.preload.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { getIdentifierHash } from '../Crypto.node.ts'; +import { getAvatarPlaceholderGradient } from '../utils/getAvatarPlaceholderGradient.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { sortBy } = lodash; diff --git a/ts/util/getConversationCallMode.std.ts b/ts/util/getConversationCallMode.std.ts index 0ba96fa819..9b15439375 100644 --- a/ts/util/getConversationCallMode.std.ts +++ b/ts/util/getConversationCallMode.std.ts @@ -1,8 +1,8 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { CallMode } from '../types/CallDisposition.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; export const getConversationCallMode = ( conversation: ConversationType diff --git a/ts/util/getConversationColorAttributes.std.ts b/ts/util/getConversationColorAttributes.std.ts index 346608355d..35531569df 100644 --- a/ts/util/getConversationColorAttributes.std.ts +++ b/ts/util/getConversationColorAttributes.std.ts @@ -5,8 +5,8 @@ import type { ConversationColorType, CustomColorType, DefaultConversationColorType, -} from '../types/Colors.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +} from '../types/Colors.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; export function getConversationColorAttributes( conversationColors: Pick< diff --git a/ts/util/getConversationMembers.dom.ts b/ts/util/getConversationMembers.dom.ts index 0c88c4f379..ef4dfb78fc 100644 --- a/ts/util/getConversationMembers.dom.ts +++ b/ts/util/getConversationMembers.dom.ts @@ -3,8 +3,8 @@ import lodash from 'lodash'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; const { compact } = lodash; diff --git a/ts/util/getConversationTitleForPanelType.std.ts b/ts/util/getConversationTitleForPanelType.std.ts index 51bf8c0894..f80c4367e3 100644 --- a/ts/util/getConversationTitleForPanelType.std.ts +++ b/ts/util/getConversationTitleForPanelType.std.ts @@ -1,9 +1,9 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LocalizerType } from '../types/Util.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { PanelType } from '../types/Panels.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { PanelType } from '../types/Panels.std.ts'; const log = createLogger('getConversationTitleForPanelType'); diff --git a/ts/util/getCountryData.dom.ts b/ts/util/getCountryData.dom.ts index 3159ed0a1b..eccf32f8d7 100644 --- a/ts/util/getCountryData.dom.ts +++ b/ts/util/getCountryData.dom.ts @@ -3,7 +3,7 @@ import memoizee from 'memoizee'; -import { instance } from './libphonenumberInstance.std.js'; +import { instance } from './libphonenumberInstance.std.ts'; export type CountryDataType = Readonly<{ region: string; diff --git a/ts/util/getCustomColorStyle.dom.ts b/ts/util/getCustomColorStyle.dom.ts index 016f18718c..a1cd423a83 100644 --- a/ts/util/getCustomColorStyle.dom.ts +++ b/ts/util/getCustomColorStyle.dom.ts @@ -1,10 +1,10 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { CustomColorType } from '../types/Colors.std.js'; -import { ThemeType } from '../types/Util.std.js'; -import { getHSL } from './getHSL.std.js'; -import { getUserTheme } from '../shims/getUserTheme.dom.js'; +import type { CustomColorType } from '../types/Colors.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; +import { getHSL } from './getHSL.std.ts'; +import { getUserTheme } from '../shims/getUserTheme.dom.ts'; type ExtraQuotePropsType = { borderInlineStartColor?: string; diff --git a/ts/util/getDeleteMaxAgeMs.dom.ts b/ts/util/getDeleteMaxAgeMs.dom.ts index 27ef39d8e9..2cb961ef9d 100644 --- a/ts/util/getDeleteMaxAgeMs.dom.ts +++ b/ts/util/getDeleteMaxAgeMs.dom.ts @@ -1,9 +1,9 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getValue } from '../RemoteConfig.dom.js'; -import { safeParseInteger } from './numbers.std.js'; -import { DAY, SECOND } from './durations/index.std.js'; +import { getValue } from '../RemoteConfig.dom.ts'; +import { safeParseInteger } from './numbers.std.ts'; +import { DAY, SECOND } from './durations/index.std.ts'; const DEFAULT_DELETE_MAX_AGE_MS = DAY; diff --git a/ts/util/getDraftPreview.preload.ts b/ts/util/getDraftPreview.preload.ts index 3ad79020dd..2e7df88927 100644 --- a/ts/util/getDraftPreview.preload.ts +++ b/ts/util/getDraftPreview.preload.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { DraftPreviewType } from '../state/ducks/conversations.preload.js'; -import { BodyRange } from '../types/BodyRange.std.js'; -import { findAndFormatContact } from './findAndFormatContact.preload.js'; -import { hydrateRanges } from './BodyRange.node.js'; -import { isVoiceMessage } from './Attachment.std.js'; -import { stripNewlinesForLeftPane } from './stripNewlinesForLeftPane.std.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; +import type { DraftPreviewType } from '../state/ducks/conversations.preload.ts'; +import { BodyRange } from '../types/BodyRange.std.ts'; +import { findAndFormatContact } from './findAndFormatContact.preload.ts'; +import { hydrateRanges } from './BodyRange.node.ts'; +import { isVoiceMessage } from './Attachment.std.ts'; +import { stripNewlinesForLeftPane } from './stripNewlinesForLeftPane.std.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; const { i18n } = window.SignalContext; diff --git a/ts/util/getE164.std.ts b/ts/util/getE164.std.ts index 0596cf6b7b..1af99e532a 100644 --- a/ts/util/getE164.std.ts +++ b/ts/util/getE164.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { isInSystemContacts } from './isInSystemContacts.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { isInSystemContacts } from './isInSystemContacts.std.ts'; export function getE164( attributes: Pick< diff --git a/ts/util/getFontNameByTextScript.std.ts b/ts/util/getFontNameByTextScript.std.ts index 19842c6c78..dd9a21f347 100644 --- a/ts/util/getFontNameByTextScript.std.ts +++ b/ts/util/getFontNameByTextScript.std.ts @@ -1,9 +1,9 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { TextAttachmentStyleType } from '../types/Attachment.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { strictAssert } from './assert.std.js'; +import { TextAttachmentStyleType } from '../types/Attachment.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { strictAssert } from './assert.std.ts'; const TextStyle = TextAttachmentStyleType; diff --git a/ts/util/getGroupMemberships.dom.ts b/ts/util/getGroupMemberships.dom.ts index 994b971c8e..26d629c29d 100644 --- a/ts/util/getGroupMemberships.dom.ts +++ b/ts/util/getGroupMemberships.dom.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only // oxlint-disable-next-line signal-desktop/no-restricted-paths -import type { GroupV2Membership } from '../components/conversation/conversation-details/ConversationDetailsMembershipList.dom.js'; +import type { GroupV2Membership } from '../components/conversation/conversation-details/ConversationDetailsMembershipList.dom.tsx'; import type { GroupV2PendingMembership, GroupV2RequestingMembership, // oxlint-disable-next-line signal-desktop/no-restricted-paths -} from '../components/conversation/conversation-details/PendingInvites.dom.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { isConversationUnregistered } from './isConversationUnregistered.dom.js'; +} from '../components/conversation/conversation-details/PendingInvites.dom.tsx'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { isConversationUnregistered } from './isConversationUnregistered.dom.ts'; export type GroupMemberships = { memberships: ReadonlyArray; diff --git a/ts/util/getICUMessageParams.std.ts b/ts/util/getICUMessageParams.std.ts index 8ac82ef097..c7bf5f69b9 100644 --- a/ts/util/getICUMessageParams.std.ts +++ b/ts/util/getICUMessageParams.std.ts @@ -6,7 +6,7 @@ import type { MessageFormatElement, PluralOrSelectOption, } from '@formatjs/icu-messageformat-parser'; -import { missingCaseError } from './missingCaseError.std.js'; +import { missingCaseError } from './missingCaseError.std.ts'; export type ICUMessageParamType = Readonly< | { diff --git a/ts/util/getLastMessage.preload.ts b/ts/util/getLastMessage.preload.ts index bde0a5313d..84643d45af 100644 --- a/ts/util/getLastMessage.preload.ts +++ b/ts/util/getLastMessage.preload.ts @@ -1,17 +1,17 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from '../types/ServiceId.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { LastMessageType } from '../state/ducks/conversations.preload.js'; -import { BodyRange } from '../types/BodyRange.std.js'; -import { dropNull } from './dropNull.std.js'; -import { findAndFormatContact } from './findAndFormatContact.preload.js'; -import { hydrateRanges } from './BodyRange.node.js'; -import { stripNewlinesForLeftPane } from './stripNewlinesForLeftPane.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { getTitle } from './getTitle.preload.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; +import type { LastMessageType } from '../state/ducks/conversations.preload.ts'; +import { BodyRange } from '../types/BodyRange.std.ts'; +import { dropNull } from './dropNull.std.ts'; +import { findAndFormatContact } from './findAndFormatContact.preload.ts'; +import { hydrateRanges } from './BodyRange.node.ts'; +import { stripNewlinesForLeftPane } from './stripNewlinesForLeftPane.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { getTitle } from './getTitle.preload.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; function getNameForAci( aci: AciString | null | undefined, diff --git a/ts/util/getLocalAttachmentUrl.std.ts b/ts/util/getLocalAttachmentUrl.std.ts index a853a12c5c..97868d55bf 100644 --- a/ts/util/getLocalAttachmentUrl.std.ts +++ b/ts/util/getLocalAttachmentUrl.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { strictAssert } from './assert.std.js'; +import { strictAssert } from './assert.std.ts'; -import type { AttachmentType } from '../types/Attachment.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; const { isNumber } = lodash; diff --git a/ts/util/getMacAndUpdateHmac.node.ts b/ts/util/getMacAndUpdateHmac.node.ts index 73ce77d2b7..417cac9430 100644 --- a/ts/util/getMacAndUpdateHmac.node.ts +++ b/ts/util/getMacAndUpdateHmac.node.ts @@ -5,7 +5,7 @@ import { Buffer } from 'node:buffer'; import { type Hmac } from 'node:crypto'; import { Transform } from 'node:stream'; -import { MAC_LENGTH } from '../types/Crypto.std.js'; +import { MAC_LENGTH } from '../types/Crypto.std.ts'; /** * Updates an hmac with the stream except for the last MAC_LENGTH diff --git a/ts/util/getMessageAuthorText.preload.ts b/ts/util/getMessageAuthorText.preload.ts index 96e4e6c6ca..e5929dcad8 100644 --- a/ts/util/getMessageAuthorText.preload.ts +++ b/ts/util/getMessageAuthorText.preload.ts @@ -5,11 +5,11 @@ import type { ConversationAttributesType, ReadonlyMessageAttributesType, } from '../model-types.d.ts'; -import type { AciString } from '../types/ServiceId.std.js'; -import { isIncoming, isOutgoing } from '../state/selectors/message.preload.js'; -import { isAciString } from './isAciString.std.js'; -import { getTitle } from './getTitle.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { isIncoming, isOutgoing } from '../state/selectors/message.preload.ts'; +import { isAciString } from './isAciString.std.ts'; +import { getTitle } from './getTitle.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; function getIncomingContact( messageAttributes: ReadonlyMessageAttributesType diff --git a/ts/util/getMessageConversation.dom.ts b/ts/util/getMessageConversation.dom.ts index 16da5ba52b..fa96eab5eb 100644 --- a/ts/util/getMessageConversation.dom.ts +++ b/ts/util/getMessageConversation.dom.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; export function getMessageConversation({ conversationId, diff --git a/ts/util/getMessageQueueTime.dom.ts b/ts/util/getMessageQueueTime.dom.ts index 61da772f19..8c6d0947f9 100644 --- a/ts/util/getMessageQueueTime.dom.ts +++ b/ts/util/getMessageQueueTime.dom.ts @@ -1,9 +1,9 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as RemoteConfig from '../RemoteConfig.dom.js'; -import { MONTH, SECOND } from './durations/index.std.js'; -import { parseIntWithFallback } from './parseIntWithFallback.std.js'; +import * as RemoteConfig from '../RemoteConfig.dom.ts'; +import { MONTH, SECOND } from './durations/index.std.ts'; +import { parseIntWithFallback } from './parseIntWithFallback.std.ts'; export function getMessageQueueTime( reduxConfig?: RemoteConfig.ConfigMapType diff --git a/ts/util/getMessageSentTimestamp.std.ts b/ts/util/getMessageSentTimestamp.std.ts index 2f1e4ca857..019104beb8 100644 --- a/ts/util/getMessageSentTimestamp.std.ts +++ b/ts/util/getMessageSentTimestamp.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import type { LoggerType } from '../types/Logging.std.js'; -import { assertDev } from './assert.std.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { assertDev } from './assert.std.ts'; export type GetMessageSentTimestampOptionsType = Readonly<{ includeEdits?: boolean; diff --git a/ts/util/getMuteOptions.std.ts b/ts/util/getMuteOptions.std.ts index 43c10c9117..0b2d56fbf4 100644 --- a/ts/util/getMuteOptions.std.ts +++ b/ts/util/getMuteOptions.std.ts @@ -1,10 +1,10 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as durations from './durations/index.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { getMutedUntilText } from './getMutedUntilText.std.js'; -import { isConversationMuted } from './isConversationMuted.std.js'; +import * as durations from './durations/index.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { getMutedUntilText } from './getMutedUntilText.std.ts'; +import { isConversationMuted } from './isConversationMuted.std.ts'; export type MuteOption = { name: string; diff --git a/ts/util/getMutedUntilText.std.ts b/ts/util/getMutedUntilText.std.ts index 2c5a639c00..e554c5a702 100644 --- a/ts/util/getMutedUntilText.std.ts +++ b/ts/util/getMutedUntilText.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import moment from 'moment'; -import type { LocalizerType } from '../types/Util.std.js'; -import { isToday } from './timestamp.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { isToday } from './timestamp.std.ts'; /** * Returns something like "Muted until 6:09 PM", localized. diff --git a/ts/util/getNotificationDataForMessage.preload.ts b/ts/util/getNotificationDataForMessage.preload.ts index d802889c60..0a38dfd5f4 100644 --- a/ts/util/getNotificationDataForMessage.preload.ts +++ b/ts/util/getNotificationDataForMessage.preload.ts @@ -3,35 +3,35 @@ import type { ReadonlyDeep } from 'type-fest'; -import type { RawBodyRange } from '../types/BodyRange.std.js'; +import type { RawBodyRange } from '../types/BodyRange.std.ts'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import type { ICUStringMessageParamsByKeyType } from '../types/Util.std.js'; -import * as Attachment from './Attachment.std.js'; -import * as EmbeddedContact from '../types/EmbeddedContact.std.js'; -import * as GroupChange from '../groupChange.std.js'; -import * as MIME from '../types/MIME.std.js'; -import * as Stickers from '../types/Stickers.preload.js'; -import * as expirationTimer from './expirationTimer.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { GiftBadgeStates } from '../types/GiftBadgeStates.std.js'; -import { dropNull } from './dropNull.std.js'; -import { getCallHistorySelector } from '../state/selectors/callHistory.std.js'; +import type { ICUStringMessageParamsByKeyType } from '../types/Util.std.ts'; +import * as Attachment from './Attachment.std.ts'; +import * as EmbeddedContact from '../types/EmbeddedContact.std.ts'; +import * as GroupChange from '../groupChange.std.ts'; +import * as MIME from '../types/MIME.std.ts'; +import * as Stickers from '../types/Stickers.preload.ts'; +import * as expirationTimer from './expirationTimer.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { GiftBadgeStates } from '../types/GiftBadgeStates.std.ts'; +import { dropNull } from './dropNull.std.ts'; +import { getCallHistorySelector } from '../state/selectors/callHistory.std.ts'; import { getCallSelector, getActiveCall, -} from '../state/selectors/calling.std.js'; -import { getCallingNotificationText } from './callingNotification.std.js'; +} from '../state/selectors/calling.std.ts'; +import { getCallingNotificationText } from './callingNotification.std.ts'; import { getConversationSelector, getSelectedMessageIds, getTargetedMessage, -} from '../state/selectors/conversations.dom.js'; -import { getStringForConversationMerge } from './getStringForConversationMerge.std.js'; -import { getStringForProfileChange } from './getStringForProfileChange.std.js'; -import { getTitleNoDefault, getNumber } from './getTitle.preload.js'; -import { findAndFormatContact } from './findAndFormatContact.preload.js'; -import { isGroup, isMe } from './whatTypeOfConversation.dom.js'; -import { strictAssert } from './assert.std.js'; +} from '../state/selectors/conversations.dom.ts'; +import { getStringForConversationMerge } from './getStringForConversationMerge.std.ts'; +import { getStringForProfileChange } from './getStringForProfileChange.std.ts'; +import { getTitleNoDefault, getNumber } from './getTitle.preload.ts'; +import { findAndFormatContact } from './findAndFormatContact.preload.ts'; +import { isGroup, isMe } from './whatTypeOfConversation.dom.ts'; +import { strictAssert } from './assert.std.ts'; import { getPropsForCallHistory, hasErrors, @@ -52,16 +52,16 @@ import { isConversationMerge, isMessageRequestResponse, isPinnedMessageNotification, -} from '../state/selectors/message.preload.js'; -import { getAuthor } from '../messages/sources.preload.js'; +} from '../state/selectors/message.preload.ts'; +import { getAuthor } from '../messages/sources.preload.ts'; import { messageHasPaymentEvent, getPaymentEventNotificationText, -} from '../messages/payments.std.js'; -import { MessageRequestResponseEvent } from '../types/MessageRequestResponseEvent.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import { getUserConversationId } from '../state/selectors/user.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../messages/payments.std.ts'; +import { MessageRequestResponseEvent } from '../types/MessageRequestResponseEvent.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import { getUserConversationId } from '../state/selectors/user.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('getNotificationDataForMessage'); const { i18n } = window.SignalContext; diff --git a/ts/util/getNotificationTextForMessage.preload.ts b/ts/util/getNotificationTextForMessage.preload.ts index 4c2df404ff..ad64db796d 100644 --- a/ts/util/getNotificationTextForMessage.preload.ts +++ b/ts/util/getNotificationTextForMessage.preload.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { applyRangesToText } from '../types/BodyRange.std.js'; -import { hydrateRanges } from './BodyRange.node.js'; -import { findAndFormatContact } from './findAndFormatContact.preload.js'; -import { getNotificationDataForMessage } from './getNotificationDataForMessage.preload.js'; -import { isConversationAccepted } from './isConversationAccepted.preload.js'; -import { strictAssert } from './assert.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { applyRangesToText } from '../types/BodyRange.std.ts'; +import { hydrateRanges } from './BodyRange.node.ts'; +import { findAndFormatContact } from './findAndFormatContact.preload.ts'; +import { getNotificationDataForMessage } from './getNotificationDataForMessage.preload.ts'; +import { isConversationAccepted } from './isConversationAccepted.preload.ts'; +import { strictAssert } from './assert.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { i18n } = window.SignalContext; diff --git a/ts/util/getPinMessageTarget.preload.ts b/ts/util/getPinMessageTarget.preload.ts index 8e8151ef7b..be6f698d91 100644 --- a/ts/util/getPinMessageTarget.preload.ts +++ b/ts/util/getPinMessageTarget.preload.ts @@ -1,15 +1,15 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { isIncoming } from '../messages/helpers.std.js'; -import type { ReadonlyMessageAttributesType } from '../model-types.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { strictAssert } from './assert.std.js'; -import { getMessageSentTimestamp } from './getMessageSentTimestamp.std.js'; -import { isAciString } from './isAciString.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { isIncoming } from '../messages/helpers.std.ts'; +import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { getMessageSentTimestamp } from './getMessageSentTimestamp.std.ts'; +import { isAciString } from './isAciString.std.ts'; const log = createLogger('getPinMessageTarget'); diff --git a/ts/util/getProfile.preload.ts b/ts/util/getProfile.preload.ts index 07815960aa..17c0e57fe2 100644 --- a/ts/util/getProfile.preload.ts +++ b/ts/util/getProfile.preload.ts @@ -1,9 +1,9 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { profileService } from '../services/profiles.preload.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { profileService } from '../services/profiles.preload.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; const log = createLogger('getProfile'); diff --git a/ts/util/getQuoteBodyText.std.ts b/ts/util/getQuoteBodyText.std.ts index 3f7be8ae99..eaedfed422 100644 --- a/ts/util/getQuoteBodyText.std.ts +++ b/ts/util/getQuoteBodyText.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import type { LocalizerType } from '../types/Util.std.js'; -import * as EmbeddedContact from '../types/EmbeddedContact.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; +import * as EmbeddedContact from '../types/EmbeddedContact.std.ts'; export function getQuoteBodyText({ messageAttributes, diff --git a/ts/util/getRecipientConversationIds.dom.ts b/ts/util/getRecipientConversationIds.dom.ts index 3730bd3fc5..38b1921e6f 100644 --- a/ts/util/getRecipientConversationIds.dom.ts +++ b/ts/util/getRecipientConversationIds.dom.ts @@ -3,8 +3,8 @@ import type { ConversationAttributesType } from '../model-types.d.ts'; -import { getRecipients } from './getRecipients.dom.js'; -import { strictAssert } from './assert.std.js'; +import { getRecipients } from './getRecipients.dom.ts'; +import { strictAssert } from './assert.std.ts'; // Recipients includes only the people we'll actually send to for this conversation export function getRecipientConversationIds( diff --git a/ts/util/getRecipients.dom.ts b/ts/util/getRecipients.dom.ts index b0d230b743..8e8d43e943 100644 --- a/ts/util/getRecipients.dom.ts +++ b/ts/util/getRecipients.dom.ts @@ -5,11 +5,11 @@ import lodash from 'lodash'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { getConversationMembers } from './getConversationMembers.dom.js'; -import { getSendTarget } from './getSendTarget.std.js'; -import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.js'; -import { isNotNil } from './isNotNil.std.js'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { getConversationMembers } from './getConversationMembers.dom.ts'; +import { getSendTarget } from './getSendTarget.std.ts'; +import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.ts'; +import { isNotNil } from './isNotNil.std.ts'; const { compact, uniq } = lodash; diff --git a/ts/util/getRecipientsByConversation.dom.ts b/ts/util/getRecipientsByConversation.dom.ts index 13de38fbfd..080f8e038b 100644 --- a/ts/util/getRecipientsByConversation.dom.ts +++ b/ts/util/getRecipientsByConversation.dom.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { RecipientsByConversation } from '../state/ducks/stories.preload.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; +import type { RecipientsByConversation } from '../state/ducks/stories.preload.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; -import { getConversationMembers } from './getConversationMembers.dom.js'; -import { isNotNil } from './isNotNil.std.js'; +import { getConversationMembers } from './getConversationMembers.dom.ts'; +import { isNotNil } from './isNotNil.std.ts'; export function getRecipientsByConversation( conversations: Array diff --git a/ts/util/getSendOptions.preload.ts b/ts/util/getSendOptions.preload.ts index 10d701f62c..a16119a40d 100644 --- a/ts/util/getSendOptions.preload.ts +++ b/ts/util/getSendOptions.preload.ts @@ -6,17 +6,17 @@ import type { SendIdentifierData, SendMetadataType, SendOptionsType, -} from '../textsecure/SendMessage.preload.js'; -import { getConversationMembers } from './getConversationMembers.dom.js'; -import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.js'; -import { senderCertificateService } from '../services/senderCertificate.preload.js'; -import { shouldSharePhoneNumberWith } from './phoneNumberSharingMode.preload.js'; -import type { SerializedCertificateType } from '../textsecure/OutgoingMessage.preload.js'; -import { SenderCertificateMode } from '../textsecure/OutgoingMessage.preload.js'; -import { ZERO_ACCESS_KEY, SEALED_SENDER } from '../types/SealedSender.std.js'; -import { isNotNil } from './isNotNil.std.js'; -import { maybeCreateGroupSendEndorsementState } from './groupSendEndorsements.preload.js'; -import { missingCaseError } from './missingCaseError.std.js'; +} from '../textsecure/SendMessage.preload.ts'; +import { getConversationMembers } from './getConversationMembers.dom.ts'; +import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.ts'; +import { senderCertificateService } from '../services/senderCertificate.preload.ts'; +import { shouldSharePhoneNumberWith } from './phoneNumberSharingMode.preload.ts'; +import type { SerializedCertificateType } from '../textsecure/OutgoingMessage.preload.ts'; +import { SenderCertificateMode } from '../textsecure/OutgoingMessage.preload.ts'; +import { ZERO_ACCESS_KEY, SEALED_SENDER } from '../types/SealedSender.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { maybeCreateGroupSendEndorsementState } from './groupSendEndorsements.preload.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; export async function getSendOptionsForRecipients( recipients: ReadonlyArray, diff --git a/ts/util/getSendTarget.std.ts b/ts/util/getSendTarget.std.ts index 35c75a2967..70815ac119 100644 --- a/ts/util/getSendTarget.std.ts +++ b/ts/util/getSendTarget.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; export function getSendTarget({ serviceId, diff --git a/ts/util/getServiceIdsForE164s.dom.ts b/ts/util/getServiceIdsForE164s.dom.ts index 75a91d5889..83cff69877 100644 --- a/ts/util/getServiceIdsForE164s.dom.ts +++ b/ts/util/getServiceIdsForE164s.dom.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { CDSResponseType } from '../textsecure/cds/Types.d.ts'; -import type { cdsLookup } from '../textsecure/WebAPI.preload.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.js'; -import { parseNumber } from './libphonenumberUtil.std.js'; +import type { cdsLookup } from '../textsecure/WebAPI.preload.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.ts'; +import { parseNumber } from './libphonenumberUtil.std.ts'; const log = createLogger('getServiceIdsForE164s'); diff --git a/ts/util/getSignalConnections.preload.ts b/ts/util/getSignalConnections.preload.ts index 646d248b0f..319cf3dc5f 100644 --- a/ts/util/getSignalConnections.preload.ts +++ b/ts/util/getSignalConnections.preload.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { isInSystemContacts } from './isInSystemContacts.std.js'; -import { isSignalConversation } from './isSignalConversation.dom.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; -import { isConversationEverUnregistered } from './isConversationUnregistered.dom.js'; -import { isBlocked } from './isBlocked.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { isInSystemContacts } from './isInSystemContacts.std.ts'; +import { isSignalConversation } from './isSignalConversation.dom.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; +import { isConversationEverUnregistered } from './isConversationUnregistered.dom.ts'; +import { isBlocked } from './isBlocked.preload.ts'; export function isSignalConnection( conversation: ConversationType | ConversationAttributesType diff --git a/ts/util/getStoryBackground.std.ts b/ts/util/getStoryBackground.std.ts index 17a3f95304..577139fd41 100644 --- a/ts/util/getStoryBackground.std.ts +++ b/ts/util/getStoryBackground.std.ts @@ -4,7 +4,7 @@ import type { AttachmentType, TextAttachmentType, -} from '../types/Attachment.std.js'; +} from '../types/Attachment.std.ts'; const COLOR_BLACK_ALPHA_90 = 'rgba(0, 0, 0, 0.9)'; export const COLOR_BLACK_INT = 4278190080; diff --git a/ts/util/getStoryDuration.dom.ts b/ts/util/getStoryDuration.dom.ts index 20a4b1f9ab..5b12a91133 100644 --- a/ts/util/getStoryDuration.dom.ts +++ b/ts/util/getStoryDuration.dom.ts @@ -1,18 +1,18 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentType } from '../types/Attachment.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; import { hasFailed, hasNotResolved, isDownloaded, isGIF, isVideo, -} from './Attachment.std.js'; -import { count } from './grapheme.std.js'; -import { SECOND } from './durations/index.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; +} from './Attachment.std.ts'; +import { count } from './grapheme.std.ts'; +import { SECOND } from './durations/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; const log = createLogger('getStoryDuration'); diff --git a/ts/util/getStoryReplyText.std.ts b/ts/util/getStoryReplyText.std.ts index c890f48bee..9b3c025e69 100644 --- a/ts/util/getStoryReplyText.std.ts +++ b/ts/util/getStoryReplyText.std.ts @@ -1,9 +1,9 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; -import { isGIF, isImage, isVideo } from './Attachment.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; +import { isGIF, isImage, isVideo } from './Attachment.std.ts'; export function getStoryReplyText( i18n: LocalizerType, diff --git a/ts/util/getStreamWithTimeout.node.ts b/ts/util/getStreamWithTimeout.node.ts index 6fc36b9181..9ff41942e3 100644 --- a/ts/util/getStreamWithTimeout.node.ts +++ b/ts/util/getStreamWithTimeout.node.ts @@ -4,9 +4,9 @@ import { Transform } from 'node:stream'; import type { Readable } from 'node:stream'; -import * as Bytes from '../Bytes.std.js'; -import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.js'; -import { explodePromise } from './explodePromise.std.js'; +import * as Bytes from '../Bytes.std.ts'; +import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.ts'; +import { explodePromise } from './explodePromise.std.ts'; export type OptionsType = Readonly<{ name: string; diff --git a/ts/util/getStringForConversationMerge.std.ts b/ts/util/getStringForConversationMerge.std.ts index 952e8f11e6..0b9fe4f597 100644 --- a/ts/util/getStringForConversationMerge.std.ts +++ b/ts/util/getStringForConversationMerge.std.ts @@ -1,7 +1,7 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; export function getStringForConversationMerge({ obsoleteConversationTitle, diff --git a/ts/util/getStringForPhoneNumberDiscovery.std.ts b/ts/util/getStringForPhoneNumberDiscovery.std.ts index 455d161c68..50487c3500 100644 --- a/ts/util/getStringForPhoneNumberDiscovery.std.ts +++ b/ts/util/getStringForPhoneNumberDiscovery.std.ts @@ -1,7 +1,7 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; export function getStringForPhoneNumberDiscovery({ phoneNumber, diff --git a/ts/util/getStringForProfileChange.std.ts b/ts/util/getStringForProfileChange.std.ts index c999183d3b..d319e6c3b8 100644 --- a/ts/util/getStringForProfileChange.std.ts +++ b/ts/util/getStringForProfileChange.std.ts @@ -1,7 +1,7 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocalizerType } from '../types/Util.std.ts'; export type ProfileNameChangeType = { type: 'name'; diff --git a/ts/util/getTestMegaphone.std.ts b/ts/util/getTestMegaphone.std.ts index 2332d41c4c..26a677999c 100644 --- a/ts/util/getTestMegaphone.std.ts +++ b/ts/util/getTestMegaphone.std.ts @@ -4,9 +4,9 @@ import type { RemoteMegaphoneId, VisibleRemoteMegaphoneType, -} from '../types/Megaphone.std.js'; -import { MegaphoneCtaId } from '../types/Megaphone.std.js'; -import { DAY } from './durations/index.std.js'; +} from '../types/Megaphone.std.ts'; +import { MegaphoneCtaId } from '../types/Megaphone.std.ts'; +import { DAY } from './durations/index.std.ts'; const INTERNAL_TEST_ID = 'INTERNAL_TEST' as RemoteMegaphoneId; export const TEST_MEGAPHONE_IMAGE = 'images/donate-heart.png'; diff --git a/ts/util/getThemeType.dom.ts b/ts/util/getThemeType.dom.ts index 1f26286fd9..0df2f75fa7 100644 --- a/ts/util/getThemeType.dom.ts +++ b/ts/util/getThemeType.dom.ts @@ -1,8 +1,8 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { SystemThemeType, ThemeType } from '../types/Util.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; +import { SystemThemeType, ThemeType } from '../types/Util.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; export async function getThemeType(): Promise { const themeSetting = await window.Events.getThemeSetting(); diff --git a/ts/util/getTitle.preload.ts b/ts/util/getTitle.preload.ts index ec31ef1f72..257cdf8af3 100644 --- a/ts/util/getTitle.preload.ts +++ b/ts/util/getTitle.preload.ts @@ -5,12 +5,12 @@ import type { ConversationAttributesType, ConversationRenderInfoType, } from '../model-types.d.ts'; -import { combineNames } from './combineNames.std.js'; -import { getRegionCodeForNumber } from './libphonenumberUtil.std.js'; -import { instance, PhoneNumberFormat } from './libphonenumberInstance.std.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; -import { getE164 } from './getE164.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { combineNames } from './combineNames.std.ts'; +import { getRegionCodeForNumber } from './libphonenumberUtil.std.ts'; +import { instance, PhoneNumberFormat } from './libphonenumberInstance.std.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; +import { getE164 } from './getE164.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; type TitleOptions = { isShort?: boolean; diff --git a/ts/util/getUserAgent.node.ts b/ts/util/getUserAgent.node.ts index f931dad594..f0baf48933 100644 --- a/ts/util/getUserAgent.node.ts +++ b/ts/util/getUserAgent.node.ts @@ -3,7 +3,7 @@ import os from 'node:os'; -import { getOwn } from './getOwn.std.js'; +import { getOwn } from './getOwn.std.ts'; const PLATFORM_STRINGS: { [platform: string]: string } = { win32: 'Windows', diff --git a/ts/util/gifCdnUrls.dom.ts b/ts/util/gifCdnUrls.dom.ts index 5e16273ff9..75b0d55841 100644 --- a/ts/util/gifCdnUrls.dom.ts +++ b/ts/util/gifCdnUrls.dom.ts @@ -1,6 +1,6 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as RemoteConfig from '../RemoteConfig.dom.js'; +import * as RemoteConfig from '../RemoteConfig.dom.ts'; const GIPHY_CDN_ORIGINS = new Set([ 'https://media0.giphy.com', diff --git a/ts/util/gracefulFs.node.ts b/ts/util/gracefulFs.node.ts index 8e9ad9eb12..58010163c4 100644 --- a/ts/util/gracefulFs.node.ts +++ b/ts/util/gracefulFs.node.ts @@ -3,10 +3,10 @@ import { rename, rm } from 'node:fs/promises'; -import type { LoggerType } from '../types/Logging.std.js'; -import { SECOND, MINUTE } from './durations/index.std.js'; -import { isOlderThan } from './timestamp.std.js'; -import { sleep } from './sleep.std.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { SECOND, MINUTE } from './durations/index.std.ts'; +import { isOlderThan } from './timestamp.std.ts'; +import { sleep } from './sleep.std.ts'; async function doGracefulFSOperation>({ name, diff --git a/ts/util/grapheme.std.ts b/ts/util/grapheme.std.ts index 7655fd54c1..7c3be357fe 100644 --- a/ts/util/grapheme.std.ts +++ b/ts/util/grapheme.std.ts @@ -3,7 +3,7 @@ import memoizee from 'memoizee'; -import { map, size, take, join } from './iterables.std.js'; +import { map, size, take, join } from './iterables.std.ts'; const getSegmenter = memoizee((): Intl.Segmenter => new Intl.Segmenter()); diff --git a/ts/util/groupAndOrderReactions.dom.ts b/ts/util/groupAndOrderReactions.dom.ts index 185837eac3..cf2b630782 100644 --- a/ts/util/groupAndOrderReactions.dom.ts +++ b/ts/util/groupAndOrderReactions.dom.ts @@ -5,7 +5,7 @@ import lodash from 'lodash'; import { useMemo } from 'react'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import type { Reaction } from '../components/conversation/ReactionViewer.dom.js'; +import type { Reaction } from '../components/conversation/ReactionViewer.dom.tsx'; import { isEmojiVariantValue, getEmojiVariantKeyByValue, @@ -14,10 +14,10 @@ import { type EmojiVariantKey, type EmojiParentKey, // oxlint-disable-next-line signal-desktop/no-restricted-paths -} from '../components/fun/data/emojis.std.js'; -import { isNotNil } from './isNotNil.std.js'; +} from '../components/fun/data/emojis.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { useFunEmojiLocalizer } from '../components/fun/useFunEmojiLocalizer.dom.js'; +import { useFunEmojiLocalizer } from '../components/fun/useFunEmojiLocalizer.dom.tsx'; const { groupBy, orderBy } = lodash; diff --git a/ts/util/groupMemberNameCollisions.std.ts b/ts/util/groupMemberNameCollisions.std.ts index 61683b2ed6..27a42c41f1 100644 --- a/ts/util/groupMemberNameCollisions.std.ts +++ b/ts/util/groupMemberNameCollisions.std.ts @@ -3,11 +3,11 @@ import lodash from 'lodash'; import type { ReadonlyDeep } from 'type-fest'; -import { groupBy, map, filter } from './iterables.std.js'; -import { getOwn } from './getOwn.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { isConversationNameKnown } from './isConversationNameKnown.std.js'; -import { isInSystemContacts } from './isInSystemContacts.std.js'; +import { groupBy, map, filter } from './iterables.std.ts'; +import { getOwn } from './getOwn.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { isConversationNameKnown } from './isConversationNameKnown.std.ts'; +import { isInSystemContacts } from './isInSystemContacts.std.ts'; const { mapValues, pickBy } = lodash; diff --git a/ts/util/groupMembershipUtils.preload.ts b/ts/util/groupMembershipUtils.preload.ts index b3c81804d1..9975bd69a5 100644 --- a/ts/util/groupMembershipUtils.preload.ts +++ b/ts/util/groupMembershipUtils.preload.ts @@ -3,18 +3,18 @@ import isNumber from 'lodash/isNumber.js'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ServiceIdString, AciString } from '../types/ServiceId.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +import type { ServiceIdString, AciString } from '../types/ServiceId.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; import { isDirectConversation, isGroupV2, -} from './whatTypeOfConversation.dom.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { truncateString } from './truncateString.std.js'; +} from './whatTypeOfConversation.dom.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { truncateString } from './truncateString.std.ts'; import { STRING_BYTE_LIMIT, STRING_GRAPHEME_LIMIT, -} from '../types/GroupMemberLabels.std.js'; +} from '../types/GroupMemberLabels.std.ts'; export function isMemberPending( conversationAttrs: Pick< diff --git a/ts/util/groupSendEndorsements.preload.ts b/ts/util/groupSendEndorsements.preload.ts index 2e2e706bfd..e2fa10947b 100644 --- a/ts/util/groupSendEndorsements.preload.ts +++ b/ts/util/groupSendEndorsements.preload.ts @@ -5,35 +5,35 @@ import lodash from 'lodash'; import { groupSendEndorsementsDataSchema, toGroupSendToken, -} from '../types/GroupSendEndorsements.std.js'; +} from '../types/GroupSendEndorsements.std.ts'; import type { GroupSendCombinedEndorsementRecord, GroupSendMemberEndorsementRecord, GroupSendToken, GroupSendEndorsementsData, -} from '../types/GroupSendEndorsements.std.js'; -import { devDebugger, strictAssert } from './assert.std.js'; +} from '../types/GroupSendEndorsements.std.ts'; +import { devDebugger, strictAssert } from './assert.std.ts'; import { GroupSecretParams, GroupSendEndorsement, GroupSendEndorsementsResponse, ServerPublicParams, -} from './zkgroup.node.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { fromAciObject } from '../types/ServiceId.std.js'; -import { createLogger } from '../logging/log.std.js'; +} from './zkgroup.node.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { fromAciObject } from '../types/ServiceId.std.ts'; +import { createLogger } from '../logging/log.std.ts'; import type { GroupV2MemberType } from '../model-types.d.ts'; -import { DurationInSeconds, MINUTE } from './durations/index.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import * as Errors from '../types/errors.std.js'; -import { isTestOrMockEnvironment } from '../environment.std.js'; -import { isNightly } from './version.std.js'; -import { parseStrict } from './schemas.std.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { maybeUpdateGroup } from '../groups.preload.js'; -import * as Bytes from '../Bytes.std.js'; -import { isGroupV2 } from './whatTypeOfConversation.dom.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { DurationInSeconds, MINUTE } from './durations/index.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import * as Errors from '../types/errors.std.ts'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; +import { isNightly } from './version.std.ts'; +import { parseStrict } from './schemas.std.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { maybeUpdateGroup } from '../groups.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { isGroupV2 } from './whatTypeOfConversation.dom.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { throttle } = lodash; diff --git a/ts/util/handleEditMessage.preload.ts b/ts/util/handleEditMessage.preload.ts index 4364ae3bf1..a6391045be 100644 --- a/ts/util/handleEditMessage.preload.ts +++ b/ts/util/handleEditMessage.preload.ts @@ -1,38 +1,38 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { EditAttributesType } from '../messageModifiers/Edits.preload.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { EditAttributesType } from '../messageModifiers/Edits.preload.ts'; import type { EditHistoryType, MessageAttributesType, } from '../model-types.d.ts'; -import * as Edits from '../messageModifiers/Edits.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { drop } from './drop.std.js'; -import { upgradeMessageSchema } from './migrations.preload.js'; +import * as Edits from '../messageModifiers/Edits.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { drop } from './drop.std.ts'; +import { upgradeMessageSchema } from './migrations.preload.ts'; import { deliveryReceiptQueue, deliveryReceiptBatcher, -} from './deliveryReceipt.preload.js'; +} from './deliveryReceipt.preload.ts'; import { cacheAttachmentBySignature, getCachedAttachmentBySignature, isVoiceMessage, -} from './Attachment.std.js'; -import { isAciString } from './isAciString.std.js'; -import { getMessageIdForLogging } from './idForLogging.preload.js'; -import { hasErrors } from '../state/selectors/message.preload.js'; -import { isIncoming, isOutgoing } from '../messages/helpers.std.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; -import { isTooOldToEditMessage } from './isTooOldToEditMessage.std.js'; -import { queueAttachmentDownloads } from './queueAttachmentDownloads.preload.js'; -import { modifyTargetMessage } from './modifyTargetMessage.preload.js'; -import { isMessageNoteToSelf } from './isMessageNoteToSelf.dom.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from './Attachment.std.ts'; +import { isAciString } from './isAciString.std.ts'; +import { getMessageIdForLogging } from './idForLogging.preload.ts'; +import { hasErrors } from '../state/selectors/message.preload.ts'; +import { isIncoming, isOutgoing } from '../messages/helpers.std.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; +import { isTooOldToEditMessage } from './isTooOldToEditMessage.std.ts'; +import { queueAttachmentDownloads } from './queueAttachmentDownloads.preload.ts'; +import { modifyTargetMessage } from './modifyTargetMessage.preload.ts'; +import { isMessageNoteToSelf } from './isMessageNoteToSelf.dom.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('handleEditMessage'); diff --git a/ts/util/handleImageAttachment.preload.ts b/ts/util/handleImageAttachment.preload.ts index 5c76f0d9e8..a67d7a8c50 100644 --- a/ts/util/handleImageAttachment.preload.ts +++ b/ts/util/handleImageAttachment.preload.ts @@ -4,13 +4,13 @@ import { ipcRenderer } from 'electron'; import { v4 as genUuid } from 'uuid'; -import { blobToArrayBuffer } from '../types/VisualAttachment.dom.js'; -import type { MIMEType } from '../types/MIME.std.js'; -import { IMAGE_JPEG, isHeic, stringToMIMEType } from '../types/MIME.std.js'; -import type { InMemoryAttachmentDraftType } from '../types/Attachment.std.js'; -import { canBeTranscoded } from './Attachment.std.js'; -import { imageToBlurHash } from './imageToBlurHash.dom.js'; -import { scaleImageToLevel } from './scaleImageToLevel.preload.js'; +import { blobToArrayBuffer } from '../types/VisualAttachment.dom.ts'; +import type { MIMEType } from '../types/MIME.std.ts'; +import { IMAGE_JPEG, isHeic, stringToMIMEType } from '../types/MIME.std.ts'; +import type { InMemoryAttachmentDraftType } from '../types/Attachment.std.ts'; +import { canBeTranscoded } from './Attachment.std.ts'; +import { imageToBlurHash } from './imageToBlurHash.dom.ts'; +import { scaleImageToLevel } from './scaleImageToLevel.preload.ts'; export async function handleImageAttachment( file: File diff --git a/ts/util/handleMessageSend.preload.ts b/ts/util/handleMessageSend.preload.ts index d77ab5696b..c7dd7493b1 100644 --- a/ts/util/handleMessageSend.preload.ts +++ b/ts/util/handleMessageSend.preload.ts @@ -4,17 +4,17 @@ import { z } from 'zod'; import lodash from 'lodash'; import type { CallbackResultType } from '../textsecure/Types.d.ts'; -import { DataWriter } from '../sql/Client.preload.js'; -import { createLogger } from '../logging/log.std.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; import { OutgoingMessageError, SendMessageNetworkError, SendMessageProtoError, UnregisteredUserError, -} from '../textsecure/Errors.std.js'; -import { SEALED_SENDER } from '../types/SealedSender.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { drop } from './drop.std.js'; +} from '../textsecure/Errors.std.ts'; +import { SEALED_SENDER } from '../types/SealedSender.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { drop } from './drop.std.ts'; const { isBoolean, isNumber } = lodash; diff --git a/ts/util/handleOutsideClick.dom.ts b/ts/util/handleOutsideClick.dom.ts index a2f0f5c4b7..a2c0d31646 100644 --- a/ts/util/handleOutsideClick.dom.ts +++ b/ts/util/handleOutsideClick.dom.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { RefObject } from 'react'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('handleOutsideClick'); diff --git a/ts/util/handleRetry.preload.ts b/ts/util/handleRetry.preload.ts index a695ea0cee..252cc4c50e 100644 --- a/ts/util/handleRetry.preload.ts +++ b/ts/util/handleRetry.preload.ts @@ -8,23 +8,23 @@ import { import lodash from 'lodash'; import type PQueue from 'p-queue'; -import * as Bytes from '../Bytes.std.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { isProduction } from './version.std.js'; -import { strictAssert } from './assert.std.js'; -import { lightSessionResetQueue } from './lightSessionResetQueue.std.js'; -import { isGroupV2 } from './whatTypeOfConversation.dom.js'; -import { isOlderThan } from './timestamp.std.js'; -import { parseIntOrThrow } from './parseIntOrThrow.std.js'; -import * as RemoteConfig from '../RemoteConfig.dom.js'; -import { Address } from '../types/Address.std.js'; -import { QualifiedAddress } from '../types/QualifiedAddress.std.js'; -import type { AciString, ServiceIdString } from '../types/ServiceId.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import * as Errors from '../types/errors.std.js'; +import * as Bytes from '../Bytes.std.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { isProduction } from './version.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { lightSessionResetQueue } from './lightSessionResetQueue.std.ts'; +import { isGroupV2 } from './whatTypeOfConversation.dom.ts'; +import { isOlderThan } from './timestamp.std.ts'; +import { parseIntOrThrow } from './parseIntOrThrow.std.ts'; +import * as RemoteConfig from '../RemoteConfig.dom.ts'; +import { Address } from '../types/Address.std.ts'; +import { QualifiedAddress } from '../types/QualifiedAddress.std.ts'; +import type { AciString, ServiceIdString } from '../types/ServiceId.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import * as Errors from '../types/errors.std.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; import type { DecryptionErrorEvent, DecryptionErrorEventData, @@ -32,21 +32,21 @@ import type { RetryRequestEvent, RetryRequestEventData, SuccessfulDecryptEvent, -} from '../textsecure/messageReceiverEvents.std.js'; +} from '../textsecure/messageReceiverEvents.std.ts'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { createLogger } from '../logging/log.std.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { createLogger } from '../logging/log.std.ts'; import { type MessageSender, messageSender, -} from '../textsecure/SendMessage.preload.js'; -import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists.preload.js'; -import { drop } from './drop.std.js'; -import { conversationJobQueue } from '../jobs/conversationJobQueue.preload.js'; -import { incrementMessageCounter } from './incrementMessageCounter.preload.js'; -import { SECOND } from './durations/index.std.js'; -import { sleep } from './sleep.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../textsecure/SendMessage.preload.ts'; +import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists.preload.ts'; +import { drop } from './drop.std.ts'; +import { conversationJobQueue } from '../jobs/conversationJobQueue.preload.ts'; +import { incrementMessageCounter } from './incrementMessageCounter.preload.ts'; +import { SECOND } from './durations/index.std.ts'; +import { sleep } from './sleep.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { isNumber, random } = lodash; diff --git a/ts/util/handleServerAlerts.preload.ts b/ts/util/handleServerAlerts.preload.ts index 581096f1b5..5dda7b4475 100644 --- a/ts/util/handleServerAlerts.preload.ts +++ b/ts/util/handleServerAlerts.preload.ts @@ -1,17 +1,17 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { isMoreRecentThan } from './timestamp.std.js'; -import { DAY, WEEK } from './durations/index.std.js'; -import { isNotNil } from './isNotNil.std.js'; -import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.js'; -import { safeSetTimeout } from './timeout.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { isMoreRecentThan } from './timestamp.std.ts'; +import { DAY, WEEK } from './durations/index.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.ts'; +import { safeSetTimeout } from './timeout.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; import { ServerAlert, type ServerAlertsType, -} from '../types/ServerAlert.std.js'; +} from '../types/ServerAlert.std.ts'; const log = createLogger('handleServerAlerts'); diff --git a/ts/util/handleVideoAttachment.preload.ts b/ts/util/handleVideoAttachment.preload.ts index bd7dfdd962..5499f2b931 100644 --- a/ts/util/handleVideoAttachment.preload.ts +++ b/ts/util/handleVideoAttachment.preload.ts @@ -5,13 +5,13 @@ import { blobToArrayBuffer } from 'blob-util'; import { sanitize } from '@signalapp/libsignal-client/dist/Mp4Sanitizer.js'; import { v4 as generateUuid } from 'uuid'; -import { makeVideoScreenshot } from '../types/VisualAttachment.dom.js'; -import { IMAGE_PNG, stringToMIMEType } from '../types/MIME.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import type { InMemoryAttachmentDraftType } from '../types/Attachment.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { MemoryStream } from './MemoryStream.node.js'; -import { fileToBytes } from './fileToBytes.std.js'; +import { makeVideoScreenshot } from '../types/VisualAttachment.dom.ts'; +import { IMAGE_PNG, stringToMIMEType } from '../types/MIME.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import type { InMemoryAttachmentDraftType } from '../types/Attachment.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { MemoryStream } from './MemoryStream.node.ts'; +import { fileToBytes } from './fileToBytes.std.ts'; const log = createLogger('handleVideoAttachment'); diff --git a/ts/util/hasAttachmentDownloads.std.ts b/ts/util/hasAttachmentDownloads.std.ts index 81488113bb..fb02fe427e 100644 --- a/ts/util/hasAttachmentDownloads.std.ts +++ b/ts/util/hasAttachmentDownloads.std.ts @@ -3,7 +3,7 @@ import lodash from 'lodash'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { isLongMessage } from '../types/MIME.std.js'; +import { isLongMessage } from '../types/MIME.std.ts'; const { partition } = lodash; diff --git a/ts/util/hasDraftAttachments.std.ts b/ts/util/hasDraftAttachments.std.ts index fcbca83ecc..68c76c3628 100644 --- a/ts/util/hasDraftAttachments.std.ts +++ b/ts/util/hasDraftAttachments.std.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentDraftType } from '../types/Attachment.std.js'; +import type { AttachmentDraftType } from '../types/Attachment.std.ts'; export function hasDraftAttachments( draftAttachments: ReadonlyArray | undefined, diff --git a/ts/util/hydrateStoryContext.preload.ts b/ts/util/hydrateStoryContext.preload.ts index b282b63686..8741d95fad 100644 --- a/ts/util/hydrateStoryContext.preload.ts +++ b/ts/util/hydrateStoryContext.preload.ts @@ -2,18 +2,18 @@ // SPDX-License-Identifier: AGPL-3.0-only import omit from 'lodash/omit.js'; -import { createLogger } from '../logging/log.std.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import { getAttachmentsForMessage } from '../state/selectors/message.preload.js'; -import { isAciString } from './isAciString.std.js'; -import { isDirectConversation } from './whatTypeOfConversation.dom.js'; -import { softAssert, strictAssert } from './assert.std.js'; -import { getMessageSentTimestamp } from './getMessageSentTimestamp.std.js'; -import { isOlderThan } from './timestamp.std.js'; -import { DAY } from './durations/index.std.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; +import { getAttachmentsForMessage } from '../state/selectors/message.preload.ts'; +import { isAciString } from './isAciString.std.ts'; +import { isDirectConversation } from './whatTypeOfConversation.dom.ts'; +import { softAssert, strictAssert } from './assert.std.ts'; +import { getMessageSentTimestamp } from './getMessageSentTimestamp.std.ts'; +import { isOlderThan } from './timestamp.std.ts'; +import { DAY } from './durations/index.std.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; const log = createLogger('hydrateStoryContext'); diff --git a/ts/util/idForLogging.preload.ts b/ts/util/idForLogging.preload.ts index f1bd29b5ec..30e44b9c6f 100644 --- a/ts/util/idForLogging.preload.ts +++ b/ts/util/idForLogging.preload.ts @@ -9,13 +9,13 @@ import { getSource, getSourceDevice, getSourceServiceId, -} from '../messages/sources.preload.js'; +} from '../messages/sources.preload.ts'; import { isDirectConversation, isGroupV2, -} from './whatTypeOfConversation.dom.js'; -import { getE164 } from './getE164.std.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +} from './whatTypeOfConversation.dom.ts'; +import { getE164 } from './getE164.std.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; export function getMessageIdForLogging( message: Pick< diff --git a/ts/util/imagePathToBytes.dom.ts b/ts/util/imagePathToBytes.dom.ts index 8ea456f11c..56baa2fc62 100644 --- a/ts/util/imagePathToBytes.dom.ts +++ b/ts/util/imagePathToBytes.dom.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { canvasToBytes } from './canvasToBytes.std.js'; +import { canvasToBytes } from './canvasToBytes.std.ts'; export async function imagePathToBytes( src: string diff --git a/ts/util/incrementMessageCounter.preload.ts b/ts/util/incrementMessageCounter.preload.ts index 471337b0d8..0039f04190 100644 --- a/ts/util/incrementMessageCounter.preload.ts +++ b/ts/util/incrementMessageCounter.preload.ts @@ -3,10 +3,10 @@ import lodash from 'lodash'; -import { strictAssert } from './assert.std.js'; -import { safeParseInteger } from './numbers.std.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { createLogger } from '../logging/log.std.js'; +import { strictAssert } from './assert.std.ts'; +import { safeParseInteger } from './numbers.std.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; const { debounce, isNumber } = lodash; diff --git a/ts/util/isAciString.std.ts b/ts/util/isAciString.std.ts index a3c401e283..17df404a15 100644 --- a/ts/util/isAciString.std.ts +++ b/ts/util/isAciString.std.ts @@ -1,8 +1,8 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from '../types/ServiceId.std.js'; -import { isValidUuid } from './isValidUuid.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { isValidUuid } from './isValidUuid.std.ts'; export function isAciString(value?: string | null): value is AciString { return isValidUuid(value); diff --git a/ts/util/isAdminDeleteEnabled.dom.ts b/ts/util/isAdminDeleteEnabled.dom.ts index 9908e612b3..5af33256e1 100644 --- a/ts/util/isAdminDeleteEnabled.dom.ts +++ b/ts/util/isAdminDeleteEnabled.dom.ts @@ -1,7 +1,7 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isFeaturedEnabledNoRedux } from './isFeatureEnabled.dom.js'; +import { isFeaturedEnabledNoRedux } from './isFeatureEnabled.dom.ts'; export function isAdminDeleteReceiveEnabled(): boolean { return isFeaturedEnabledNoRedux({ diff --git a/ts/util/isBackupEnabled.preload.ts b/ts/util/isBackupEnabled.preload.ts index 8da91e6bab..c73d2cd2f5 100644 --- a/ts/util/isBackupEnabled.preload.ts +++ b/ts/util/isBackupEnabled.preload.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isTestOrMockEnvironment } from '../environment.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export function areRemoteBackupsTurnedOn(): boolean { return itemStorage.get('backupTier') != null; diff --git a/ts/util/isBlocked.preload.ts b/ts/util/isBlocked.preload.ts index 39cb904a64..a416e3685c 100644 --- a/ts/util/isBlocked.preload.ts +++ b/ts/util/isBlocked.preload.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import { isAciString } from './isAciString.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { isAciString } from './isAciString.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export function isBlocked( attributes: Pick diff --git a/ts/util/isCallSafe.dom.ts b/ts/util/isCallSafe.dom.ts index 80cf6c4fb0..b322a27e4e 100644 --- a/ts/util/isCallSafe.dom.ts +++ b/ts/util/isCallSafe.dom.ts @@ -3,11 +3,11 @@ import type { ConversationAttributesType } from '../model-types.d.ts'; -import { createLogger } from '../logging/log.std.js'; -import { blockSendUntilConversationsAreVerified } from './blockSendUntilConversationsAreVerified.dom.js'; -import { getRecipientsByConversation } from './getRecipientsByConversation.dom.js'; +import { createLogger } from '../logging/log.std.ts'; +import { blockSendUntilConversationsAreVerified } from './blockSendUntilConversationsAreVerified.dom.ts'; +import { getRecipientsByConversation } from './getRecipientsByConversation.dom.ts'; -import type { SafetyNumberChangeSource } from '../types/SafetyNumberChangeSource.std.js'; +import type { SafetyNumberChangeSource } from '../types/SafetyNumberChangeSource.std.ts'; const log = createLogger('isCallSafe'); diff --git a/ts/util/isConversationAccepted.preload.ts b/ts/util/isConversationAccepted.preload.ts index d0d80b0e16..1b71330278 100644 --- a/ts/util/isConversationAccepted.preload.ts +++ b/ts/util/isConversationAccepted.preload.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.js'; -import { isInSystemContacts } from './isInSystemContacts.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.ts'; +import { isInSystemContacts } from './isInSystemContacts.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export type IsConversationAcceptedOptionsType = { ignoreEmptyConvo: boolean; diff --git a/ts/util/isConversationNameKnown.std.ts b/ts/util/isConversationNameKnown.std.ts index 7d4d4e017f..6fed1e4313 100644 --- a/ts/util/isConversationNameKnown.std.ts +++ b/ts/util/isConversationNameKnown.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { missingCaseError } from './missingCaseError.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; export function isConversationNameKnown( conversation: Readonly< diff --git a/ts/util/isConversationSMSOnly.std.ts b/ts/util/isConversationSMSOnly.std.ts index b52bce24c2..1d9082862a 100644 --- a/ts/util/isConversationSMSOnly.std.ts +++ b/ts/util/isConversationSMSOnly.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ServiceIdString } from '../types/ServiceId.std.js'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; export type MinimalConversationType = Readonly<{ discoveredUnregisteredAt?: number; diff --git a/ts/util/isConversationUnregistered.dom.ts b/ts/util/isConversationUnregistered.dom.ts index d10346c06f..9eb7b4a17d 100644 --- a/ts/util/isConversationUnregistered.dom.ts +++ b/ts/util/isConversationUnregistered.dom.ts @@ -1,10 +1,10 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { isMoreRecentThan, isOlderThan } from './timestamp.std.js'; -import { HOUR } from './durations/index.std.js'; -import { getMessageQueueTime } from './getMessageQueueTime.dom.js'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { isMoreRecentThan, isOlderThan } from './timestamp.std.ts'; +import { HOUR } from './durations/index.std.ts'; +import { getMessageQueueTime } from './getMessageQueueTime.dom.ts'; const SIX_HOURS = 6 * HOUR; diff --git a/ts/util/isFeatureEnabled.dom.ts b/ts/util/isFeatureEnabled.dom.ts index ccebde59ce..de1311948b 100644 --- a/ts/util/isFeatureEnabled.dom.ts +++ b/ts/util/isFeatureEnabled.dom.ts @@ -5,12 +5,12 @@ import semver from 'semver'; import type { ReadonlyObjectDeep } from 'type-fest/source/readonly-deep.js'; -import { createLogger } from '../logging/log.std.js'; -import { isTestOrMockEnvironment } from '../environment.std.js'; -import { getValue, isEnabled } from '../RemoteConfig.dom.js'; -import { isAlpha, isBeta, isProduction, isStaging } from './version.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; +import { getValue, isEnabled } from '../RemoteConfig.dom.ts'; +import { isAlpha, isBeta, isProduction, isStaging } from './version.std.ts'; -import type { SemverKeyType, ConfigMapType } from '../RemoteConfig.dom.js'; +import type { SemverKeyType, ConfigMapType } from '../RemoteConfig.dom.ts'; const log = createLogger('isFeatureEnabled'); diff --git a/ts/util/isGroupInStoryMode.std.ts b/ts/util/isGroupInStoryMode.std.ts index 4c7efb9b96..a88dae7db3 100644 --- a/ts/util/isGroupInStoryMode.std.ts +++ b/ts/util/isGroupInStoryMode.std.ts @@ -1,9 +1,9 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { StorySendMode } from '../types/Stories.std.js'; -import { assertDev } from './assert.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { StorySendMode } from '../types/Stories.std.ts'; +import { assertDev } from './assert.std.ts'; export function isGroupInStoryMode( { id, type, storySendMode }: ConversationType, diff --git a/ts/util/isGroupOrAdhocCall.std.ts b/ts/util/isGroupOrAdhocCall.std.ts index 9272807699..fe217dd284 100644 --- a/ts/util/isGroupOrAdhocCall.std.ts +++ b/ts/util/isGroupOrAdhocCall.std.ts @@ -1,15 +1,15 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { CallMode } from '../types/CallDisposition.std.js'; +import { CallMode } from '../types/CallDisposition.std.ts'; import type { ActiveCallType, ActiveGroupCallType, -} from '../types/Calling.std.js'; +} from '../types/Calling.std.ts'; import type { DirectCallStateType, GroupCallStateType, -} from '../state/ducks/calling.preload.js'; +} from '../state/ducks/calling.preload.ts'; export function isGroupOrAdhocActiveCall( activeCall: ActiveCallType | undefined diff --git a/ts/util/isInternalFeaturesEnabled.dom.ts b/ts/util/isInternalFeaturesEnabled.dom.ts index 07339d7a52..da7041a125 100644 --- a/ts/util/isInternalFeaturesEnabled.dom.ts +++ b/ts/util/isInternalFeaturesEnabled.dom.ts @@ -4,8 +4,8 @@ import { Environment, getEnvironment, isMockEnvironment, -} from '../environment.std.js'; -import * as RemoteConfig from '../RemoteConfig.dom.js'; +} from '../environment.std.ts'; +import * as RemoteConfig from '../RemoteConfig.dom.ts'; /** * This should be reserved for internal-only features that are focused on diff --git a/ts/util/isLinkAndSyncEnabled.preload.ts b/ts/util/isLinkAndSyncEnabled.preload.ts index 917aded6b6..9a2d2cdf06 100644 --- a/ts/util/isLinkAndSyncEnabled.preload.ts +++ b/ts/util/isLinkAndSyncEnabled.preload.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { backupsService } from '../services/backups/index.preload.js'; -import { everDone as wasRegistrationEverDone } from './registration.preload.js'; +import { backupsService } from '../services/backups/index.preload.ts'; +import { everDone as wasRegistrationEverDone } from './registration.preload.ts'; export function isLinkAndSyncEnabled(): boolean { // Cannot overwrite existing message history diff --git a/ts/util/isLocalBackupsEnabled.preload.ts b/ts/util/isLocalBackupsEnabled.preload.ts index dbe09081d4..c845f4b308 100644 --- a/ts/util/isLocalBackupsEnabled.preload.ts +++ b/ts/util/isLocalBackupsEnabled.preload.ts @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyObjectDeep } from 'type-fest/source/readonly-deep.js'; -import { isEnabled, type ConfigMapType } from '../RemoteConfig.dom.js'; +import { isEnabled, type ConfigMapType } from '../RemoteConfig.dom.ts'; import { isFeaturedEnabledNoRedux, isFeaturedEnabledSelector, -} from './isFeatureEnabled.dom.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { isNightly } from './version.std.js'; -import { isTestOrMockEnvironment } from '../environment.std.js'; +} from './isFeatureEnabled.dom.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { isNightly } from './version.std.ts'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; const IOS_USER_AGENT = 'OWI'; diff --git a/ts/util/isMessageEmpty.preload.ts b/ts/util/isMessageEmpty.preload.ts index e8f2061a13..83ff0a3d05 100644 --- a/ts/util/isMessageEmpty.preload.ts +++ b/ts/util/isMessageEmpty.preload.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { messageHasPaymentEvent } from '../messages/payments.std.js'; +import { messageHasPaymentEvent } from '../messages/payments.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; import { hasErrors, @@ -23,7 +23,7 @@ import { isUniversalTimerNotification, isUnsupportedMessage, isVerifiedChange, -} from '../state/selectors/message.preload.js'; +} from '../state/selectors/message.preload.ts'; export function isMessageEmpty(attributes: MessageAttributesType): boolean { // Core message types - we check for all four because they can each stand alone diff --git a/ts/util/isMessageUnread.std.ts b/ts/util/isMessageUnread.std.ts index 8efd833921..5467d74598 100644 --- a/ts/util/isMessageUnread.std.ts +++ b/ts/util/isMessageUnread.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; export const isMessageUnread = ( diff --git a/ts/util/isProtoBinaryEncodingEnabled.dom.ts b/ts/util/isProtoBinaryEncodingEnabled.dom.ts index 43c7a5347b..a41ecd876c 100644 --- a/ts/util/isProtoBinaryEncodingEnabled.dom.ts +++ b/ts/util/isProtoBinaryEncodingEnabled.dom.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isTestOrMockEnvironment } from '../environment.std.js'; -import { isStagingServer } from './isStagingServer.dom.js'; -import { isFeaturedEnabledNoRedux } from './isFeatureEnabled.dom.js'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; +import { isStagingServer } from './isStagingServer.dom.ts'; +import { isFeaturedEnabledNoRedux } from './isFeatureEnabled.dom.ts'; export function isProtoBinaryEncodingEnabled(): boolean { if (isTestOrMockEnvironment()) { diff --git a/ts/util/isSafetyNumberNotAvailable.std.ts b/ts/util/isSafetyNumberNotAvailable.std.ts index e5c494aa7e..82779e7892 100644 --- a/ts/util/isSafetyNumberNotAvailable.std.ts +++ b/ts/util/isSafetyNumberNotAvailable.std.ts @@ -1,8 +1,8 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { isAciString } from './isAciString.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { isAciString } from './isAciString.std.ts'; export const isSafetyNumberNotAvailable = ( contact?: ConversationType diff --git a/ts/util/isSameAvatarData.std.ts b/ts/util/isSameAvatarData.std.ts index 23bc9fe2f3..6ede833298 100644 --- a/ts/util/isSameAvatarData.std.ts +++ b/ts/util/isSameAvatarData.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AvatarDataType } from '../types/Avatar.std.js'; +import type { AvatarDataType } from '../types/Avatar.std.ts'; export function isSameAvatarData( a?: AvatarDataType, diff --git a/ts/util/isSettingsInternalEnabled.dom.ts b/ts/util/isSettingsInternalEnabled.dom.ts index 672aadd0c8..41e31706c9 100644 --- a/ts/util/isSettingsInternalEnabled.dom.ts +++ b/ts/util/isSettingsInternalEnabled.dom.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as RemoteConfig from '../RemoteConfig.dom.js'; -import { isNightly } from './version.std.js'; +import * as RemoteConfig from '../RemoteConfig.dom.ts'; +import { isNightly } from './version.std.ts'; export function isSettingsInternalEnabled(): boolean { if (RemoteConfig.isEnabled('desktop.internalUser')) { diff --git a/ts/util/isSignalConversation.dom.ts b/ts/util/isSignalConversation.dom.ts index a439a94e6a..4a48c16a00 100644 --- a/ts/util/isSignalConversation.dom.ts +++ b/ts/util/isSignalConversation.dom.ts @@ -1,8 +1,8 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { SIGNAL_ACI } from '../types/SignalConversation.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; +import { SIGNAL_ACI } from '../types/SignalConversation.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; export function isSignalConversation(conversation: { id: string; diff --git a/ts/util/isStagingServer.dom.ts b/ts/util/isStagingServer.dom.ts index 0a40fb7d52..fcbbf9a0e6 100644 --- a/ts/util/isStagingServer.dom.ts +++ b/ts/util/isStagingServer.dom.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { Environment, getEnvironment } from '../environment.std.js'; -import { isStaging } from './version.std.js'; +import { Environment, getEnvironment } from '../environment.std.ts'; +import { isStaging } from './version.std.ts'; export function isStagingServer( serverUrl = window.SignalContext.config.serverUrl diff --git a/ts/util/isTooOldToEditMessage.std.ts b/ts/util/isTooOldToEditMessage.std.ts index 92816dfa08..796f333930 100644 --- a/ts/util/isTooOldToEditMessage.std.ts +++ b/ts/util/isTooOldToEditMessage.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { getMessageAge } from './getMessageAge.std.js'; -import { DAY } from './durations/index.std.js'; +import { getMessageAge } from './getMessageAge.std.ts'; +import { DAY } from './durations/index.std.ts'; export function isTooOldToEditMessage( serverTimestamp: number, diff --git a/ts/util/isValidTapToView.std.ts b/ts/util/isValidTapToView.std.ts index 95b12754e5..c9f30d1c60 100644 --- a/ts/util/isValidTapToView.std.ts +++ b/ts/util/isValidTapToView.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { MessageAttributesType } from '../model-types.d.ts'; -import * as GoogleChrome from './GoogleChrome.std.js'; +import * as GoogleChrome from './GoogleChrome.std.ts'; export function isValidTapToView(message: MessageAttributesType): boolean { const { body } = message; diff --git a/ts/util/isVideoGoodForStories.std.ts b/ts/util/isVideoGoodForStories.std.ts index 7092b5c512..0322fce9aa 100644 --- a/ts/util/isVideoGoodForStories.std.ts +++ b/ts/util/isVideoGoodForStories.std.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import MP4Box from 'mp4box'; -import { VIDEO_MP4, isVideo } from '../types/MIME.std.js'; +import { VIDEO_MP4, isVideo } from '../types/MIME.std.ts'; import { KIBIBYTE, getRenderDetailsForLimit, -} from '../types/AttachmentSize.std.js'; -import { explodePromise } from './explodePromise.std.js'; +} from '../types/AttachmentSize.std.ts'; +import { explodePromise } from './explodePromise.std.ts'; const MAX_VIDEO_DURATION_IN_SEC = 30; diff --git a/ts/util/isVoiceMessagePlayed.std.ts b/ts/util/isVoiceMessagePlayed.std.ts index 9332fc62b4..535069aae5 100644 --- a/ts/util/isVoiceMessagePlayed.std.ts +++ b/ts/util/isVoiceMessagePlayed.std.ts @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { isIncoming, isOutgoing } from '../messages/helpers.std.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; +import { isIncoming, isOutgoing } from '../messages/helpers.std.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; import { isSent, isViewed, isMessageJustForMe, getHighestSuccessfulRecipientStatus, -} from '../messages/MessageSendState.std.js'; +} from '../messages/MessageSendState.std.ts'; export function isVoiceMessagePlayed( message: Pick< diff --git a/ts/util/iterables.std.ts b/ts/util/iterables.std.ts index 611231a05d..7074e6e4a0 100644 --- a/ts/util/iterables.std.ts +++ b/ts/util/iterables.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { getOwn } from './getOwn.std.js'; +import { getOwn } from './getOwn.std.ts'; export function isIterable(value: unknown): value is Iterable { return ( diff --git a/ts/util/keyboard.dom.ts b/ts/util/keyboard.dom.ts index 1e25f2123e..e72e8a3634 100644 --- a/ts/util/keyboard.dom.ts +++ b/ts/util/keyboard.dom.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { LocaleDirection } from '../../app/locale.node.js'; +import type { LocaleDirection } from '../../app/locale.node.ts'; export type LogicalDirection = 'start' | 'end'; export type HorizontalArrowKey = 'ArrowLeft' | 'ArrowRight'; diff --git a/ts/util/leftPaneWidth.std.ts b/ts/util/leftPaneWidth.std.ts index 0624047fa4..39730e0e31 100644 --- a/ts/util/leftPaneWidth.std.ts +++ b/ts/util/leftPaneWidth.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { isSorted } from './isSorted.std.js'; -import { strictAssert } from './assert.std.js'; +import { isSorted } from './isSorted.std.ts'; +import { strictAssert } from './assert.std.ts'; const { clamp } = lodash; diff --git a/ts/util/libphonenumberUtil.std.ts b/ts/util/libphonenumberUtil.std.ts index 1b9f7be506..2fdb59afff 100644 --- a/ts/util/libphonenumberUtil.std.ts +++ b/ts/util/libphonenumberUtil.std.ts @@ -4,7 +4,7 @@ import { instance as libphonenumber, PhoneNumberFormat, -} from './libphonenumberInstance.std.js'; +} from './libphonenumberInstance.std.ts'; const FALLBACK_REGION_CODE = 'ZZ'; diff --git a/ts/util/lint/analyze_exceptions.node.ts b/ts/util/lint/analyze_exceptions.node.ts index 3121129b2e..cad3c894a2 100644 --- a/ts/util/lint/analyze_exceptions.node.ts +++ b/ts/util/lint/analyze_exceptions.node.ts @@ -4,8 +4,8 @@ import lodash from 'lodash'; import { join } from 'node:path'; -import type { ExceptionType } from './types.std.js'; -import { loadJSON } from './util.node.js'; +import type { ExceptionType } from './types.std.ts'; +import { loadJSON } from './util.node.ts'; const { fromPairs, groupBy, map } = lodash; diff --git a/ts/util/lint/linter.node.ts b/ts/util/lint/linter.node.ts index 450818c167..d5ff342ae9 100644 --- a/ts/util/lint/linter.node.ts +++ b/ts/util/lint/linter.node.ts @@ -7,14 +7,14 @@ import normalizePath from 'normalize-path'; import pMap from 'p-map'; import FastGlob from 'fast-glob'; -import type { ExceptionType, RuleType } from './types.std.js'; -import { REASONS } from './types.std.js'; +import type { ExceptionType, RuleType } from './types.std.ts'; +import { REASONS } from './types.std.ts'; import { ENCODING, loadJSON, sortExceptions, writeExceptions, -} from './util.node.js'; +} from './util.node.ts'; const ALL_REASONS = REASONS.join('|'); @@ -81,7 +81,7 @@ const excludedFilesRegexp = RegExp( '^ts/sql/mainWorker.bundle.js', // Copied from dependency - '^js/Mp3LameEncoder.min.js', + '^js/WebAudioRecorderMp3.js', // Test files '^libtextsecure/test/.+', @@ -182,7 +182,6 @@ const excludedFilesRegexp = RegExp( '^node_modules/es-abstract/.+', '^node_modules/es5-shim/.+', // Currently only used in storybook '^node_modules/es6-shim/.+', // Currently only used in storybook - '^node_modules/esbuild/.+', '^node_modules/escodegen/.+', '^node_modules/eslint.+', '^node_modules/espree.+', diff --git a/ts/util/lint/sort_exceptions.node.ts b/ts/util/lint/sort_exceptions.node.ts index 973ba7d051..ffb65a82f1 100644 --- a/ts/util/lint/sort_exceptions.node.ts +++ b/ts/util/lint/sort_exceptions.node.ts @@ -3,8 +3,8 @@ import { join } from 'node:path'; -import type { ExceptionType } from './types.std.js'; -import { loadJSON, writeExceptions } from './util.node.js'; +import type { ExceptionType } from './types.std.ts'; +import { loadJSON, writeExceptions } from './util.node.ts'; const exceptionsPath = join(__dirname, 'exceptions.json'); const exceptions: Array = loadJSON(exceptionsPath); diff --git a/ts/util/lint/util.node.ts b/ts/util/lint/util.node.ts index e67f2fee68..1a168df138 100644 --- a/ts/util/lint/util.node.ts +++ b/ts/util/lint/util.node.ts @@ -5,7 +5,7 @@ import fsExtra from 'fs-extra'; import lodash from 'lodash'; -import type { ExceptionType } from './types.std.js'; +import type { ExceptionType } from './types.std.ts'; const { readJsonSync, writeJsonSync } = fsExtra; diff --git a/ts/util/loadImage.std.ts b/ts/util/loadImage.std.ts index 76be1e71ca..6a6af09fa5 100644 --- a/ts/util/loadImage.std.ts +++ b/ts/util/loadImage.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { explodePromise } from './explodePromise.std.js'; +import { explodePromise } from './explodePromise.std.ts'; export async function loadImage(src: string): Promise { const { promise, resolve, reject } = explodePromise(); diff --git a/ts/util/loadRecentEmojis.preload.ts b/ts/util/loadRecentEmojis.preload.ts index d6dd8edfed..282bad2727 100644 --- a/ts/util/loadRecentEmojis.preload.ts +++ b/ts/util/loadRecentEmojis.preload.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { DataReader } from '../sql/Client.preload.js'; +import { DataReader } from '../sql/Client.preload.ts'; const { take } = lodash; diff --git a/ts/util/logPadding.node.ts b/ts/util/logPadding.node.ts index 4968107831..f9b4baa6e7 100644 --- a/ts/util/logPadding.node.ts +++ b/ts/util/logPadding.node.ts @@ -4,7 +4,7 @@ import { Transform } from 'node:stream'; import type { Duplex, Readable } from 'node:stream'; -import { logPadSize } from './logPadSize.std.js'; +import { logPadSize } from './logPadSize.std.ts'; const PADDING_CHUNK_SIZE = 64 * 1024; diff --git a/ts/util/longAttachment.std.ts b/ts/util/longAttachment.std.ts index 164d016e46..c9b56a7943 100644 --- a/ts/util/longAttachment.std.ts +++ b/ts/util/longAttachment.std.ts @@ -1,7 +1,7 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { unicodeSlice } from './unicodeSlice.std.js'; +import { unicodeSlice } from './unicodeSlice.std.ts'; const KIBIBYTE = 1024; export const MAX_MESSAGE_BODY_BYTE_LENGTH = 2 * KIBIBYTE; diff --git a/ts/util/longRunningTaskWrapper.dom.tsx b/ts/util/longRunningTaskWrapper.dom.tsx index 67c77069ba..1dd7fa84e2 100644 --- a/ts/util/longRunningTaskWrapper.dom.tsx +++ b/ts/util/longRunningTaskWrapper.dom.tsx @@ -4,16 +4,16 @@ import React, { StrictMode } from 'react'; import { createRoot, type Root } from 'react-dom/client'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { ProgressModal } from '../components/ProgressModal.dom.js'; -import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.js'; -import { sleep } from './sleep.std.js'; +import { ProgressModal } from '../components/ProgressModal.dom.tsx'; +import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.ts'; +import { sleep } from './sleep.std.ts'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { FunDefaultEnglishEmojiLocalizationProvider } from '../components/fun/FunEmojiLocalizationProvider.dom.js'; +import { FunDefaultEnglishEmojiLocalizationProvider } from '../components/fun/FunEmojiLocalizationProvider.dom.tsx'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { AxoProvider } from '../axo/AxoProvider.dom.js'; +import { AxoProvider } from '../axo/AxoProvider.dom.tsx'; const log = createLogger('longRunningTaskWrapper'); diff --git a/ts/util/lookupConversationWithoutServiceId.preload.ts b/ts/util/lookupConversationWithoutServiceId.preload.ts index 8f084c50e4..7f76593d08 100644 --- a/ts/util/lookupConversationWithoutServiceId.preload.ts +++ b/ts/util/lookupConversationWithoutServiceId.preload.ts @@ -3,18 +3,18 @@ import { usernames } from '@signalapp/libsignal-client'; -import type { UserNotFoundModalStateType } from '../state/ducks/globalModals.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import * as Errors from '../types/errors.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import { strictAssert } from './assert.std.js'; -import type { UUIDFetchStateKeyType } from './uuidFetchState.std.js'; -import { getServiceIdsForE164s } from './getServiceIdsForE164s.dom.js'; +import type { UserNotFoundModalStateType } from '../state/ducks/globalModals.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { strictAssert } from './assert.std.ts'; +import type { UUIDFetchStateKeyType } from './uuidFetchState.std.ts'; +import { getServiceIdsForE164s } from './getServiceIdsForE164s.dom.ts'; import { getAccountForUsername, cdsLookup, -} from '../textsecure/WebAPI.preload.js'; +} from '../textsecure/WebAPI.preload.ts'; const log = createLogger('lookupConversationWithoutServiceId'); diff --git a/ts/util/makeQuote.preload.ts b/ts/util/makeQuote.preload.ts index b9bc3b45e2..f5075f0025 100644 --- a/ts/util/makeQuote.preload.ts +++ b/ts/util/makeQuote.preload.ts @@ -1,28 +1,28 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentType } from '../types/Attachment.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; import type { MessageAttributesType, QuotedAttachmentType, } from '../model-types.d.ts'; -import type { LinkPreviewType } from '../types/message/LinkPreviews.std.js'; -import type { StickerType } from '../types/Stickers.preload.js'; -import { IMAGE_JPEG, IMAGE_GIF } from '../types/MIME.std.js'; -import { getAuthor } from '../messages/sources.preload.js'; -import { getQuoteBodyText } from './getQuoteBodyText.std.js'; -import { isGIF } from './Attachment.std.js'; +import type { LinkPreviewType } from '../types/message/LinkPreviews.std.ts'; +import type { StickerType } from '../types/Stickers.preload.ts'; +import { IMAGE_JPEG, IMAGE_GIF } from '../types/MIME.std.ts'; +import { getAuthor } from '../messages/sources.preload.ts'; +import { getQuoteBodyText } from './getQuoteBodyText.std.ts'; +import { isGIF } from './Attachment.std.ts'; import { isGiftBadge, isTapToView, -} from '../state/selectors/message.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { map, take, collect } from './iterables.std.js'; -import { strictAssert } from './assert.std.js'; -import { loadAttachmentData } from './migrations.preload.js'; -import { getMessageSentTimestamp } from './getMessageSentTimestamp.std.js'; -import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.js'; -import type { QuotedMessageForComposerType } from '../state/ducks/composer.preload.js'; +} from '../state/selectors/message.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { map, take, collect } from './iterables.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { loadAttachmentData } from './migrations.preload.ts'; +import { getMessageSentTimestamp } from './getMessageSentTimestamp.std.ts'; +import { getLocalAttachmentUrl } from './getLocalAttachmentUrl.std.ts'; +import type { QuotedMessageForComposerType } from '../state/ducks/composer.preload.ts'; const log = createLogger('makeQuote'); const { i18n } = window.SignalContext; diff --git a/ts/util/mapUtil.std.ts b/ts/util/mapUtil.std.ts index 8fab11ec7d..68fea2e218 100644 --- a/ts/util/mapUtil.std.ts +++ b/ts/util/mapUtil.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { reduce } from './iterables.std.js'; +import { reduce } from './iterables.std.ts'; /** * Like Lodash's `groupBy`, but returns a `Map`. diff --git a/ts/util/markConversationRead.preload.ts b/ts/util/markConversationRead.preload.ts index 609236151e..6e488f8f02 100644 --- a/ts/util/markConversationRead.preload.ts +++ b/ts/util/markConversationRead.preload.ts @@ -4,30 +4,30 @@ import lodash from 'lodash'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import { DataWriter } from '../sql/Client.preload.js'; -import { hasErrors } from '../state/selectors/message.preload.js'; -import { readSyncJobQueue } from '../jobs/readSyncJobQueue.preload.js'; -import { notificationService } from '../services/notifications.preload.js'; -import { update as updateExpiringMessagesService } from '../services/expiringMessagesDeletion.preload.js'; -import { tapToViewMessagesDeletionService } from '../services/tapToViewMessagesDeletionService.preload.js'; -import { isGroup, isDirectConversation } from './whatTypeOfConversation.dom.js'; -import { createLogger } from '../logging/log.std.js'; -import { getConversationIdForLogging } from './idForLogging.preload.js'; -import { drop } from './drop.std.js'; -import { isNotNil } from './isNotNil.std.js'; -import { assertDev } from './assert.std.js'; -import { isConversationAccepted } from './isConversationAccepted.preload.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { hasErrors } from '../state/selectors/message.preload.ts'; +import { readSyncJobQueue } from '../jobs/readSyncJobQueue.preload.ts'; +import { notificationService } from '../services/notifications.preload.ts'; +import { update as updateExpiringMessagesService } from '../services/expiringMessagesDeletion.preload.ts'; +import { tapToViewMessagesDeletionService } from '../services/tapToViewMessagesDeletionService.preload.ts'; +import { isGroup, isDirectConversation } from './whatTypeOfConversation.dom.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { getConversationIdForLogging } from './idForLogging.preload.ts'; +import { drop } from './drop.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { assertDev } from './assert.std.ts'; +import { isConversationAccepted } from './isConversationAccepted.preload.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { ReceiptType } from '../types/Receipt.std.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { isAciString } from './isAciString.std.js'; -import type { MessageModel } from '../models/messages.preload.js'; -import { postSaveUpdates } from './cleanup.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { ReceiptType } from '../types/Receipt.std.ts'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { isAciString } from './isAciString.std.ts'; +import type { MessageModel } from '../models/messages.preload.ts'; +import { postSaveUpdates } from './cleanup.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { isNumber, pick } = lodash; diff --git a/ts/util/markOnboardingStoryAsRead.preload.ts b/ts/util/markOnboardingStoryAsRead.preload.ts index a8bf6b9ca1..1f38cffaf7 100644 --- a/ts/util/markOnboardingStoryAsRead.preload.ts +++ b/ts/util/markOnboardingStoryAsRead.preload.ts @@ -1,15 +1,15 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { isNotNil } from './isNotNil.std.js'; -import { DurationInSeconds } from './durations/index.std.js'; -import { markViewed } from '../services/MessageUpdater.preload.js'; -import { storageServiceUploadJob } from '../services/storage.preload.js'; -import { postSaveUpdates } from './cleanup.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { DurationInSeconds } from './durations/index.std.ts'; +import { markViewed } from '../services/MessageUpdater.preload.ts'; +import { storageServiceUploadJob } from '../services/storage.preload.ts'; +import { postSaveUpdates } from './cleanup.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('markOnboardingStoryAsRead'); diff --git a/ts/util/maybeForwardMessages.preload.ts b/ts/util/maybeForwardMessages.preload.ts index 6e3eb7cdf2..c941e0eea4 100644 --- a/ts/util/maybeForwardMessages.preload.ts +++ b/ts/util/maybeForwardMessages.preload.ts @@ -1,36 +1,36 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentType } from '../types/Attachment.std.js'; -import type { LinkPreviewWithHydratedData } from '../types/message/LinkPreviews.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import type { LinkPreviewWithHydratedData } from '../types/message/LinkPreviews.std.ts'; import type { QuotedMessageType } from '../model-types.d.ts'; -import { createLogger } from '../logging/log.std.js'; -import { SafetyNumberChangeSource } from '../types/SafetyNumberChangeSource.std.js'; -import { blockSendUntilConversationsAreVerified } from './blockSendUntilConversationsAreVerified.dom.js'; +import { createLogger } from '../logging/log.std.ts'; +import { SafetyNumberChangeSource } from '../types/SafetyNumberChangeSource.std.ts'; +import { blockSendUntilConversationsAreVerified } from './blockSendUntilConversationsAreVerified.dom.ts'; import { getMessageIdForLogging, getConversationIdForLogging, -} from './idForLogging.preload.js'; -import { isNotNil } from './isNotNil.std.js'; -import { resetLinkPreview } from '../services/LinkPreview.preload.js'; -import { getRecipientsByConversation } from './getRecipientsByConversation.dom.js'; -import type { EmbeddedContactWithHydratedAvatar } from '../types/EmbeddedContact.std.js'; -import type { DraftBodyRanges } from '../types/BodyRange.std.js'; -import type { StickerWithHydratedData } from '../types/Stickers.preload.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { drop } from './drop.std.js'; +} from './idForLogging.preload.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { resetLinkPreview } from '../services/LinkPreview.preload.ts'; +import { getRecipientsByConversation } from './getRecipientsByConversation.dom.ts'; +import type { EmbeddedContactWithHydratedAvatar } from '../types/EmbeddedContact.std.ts'; +import type { DraftBodyRanges } from '../types/BodyRange.std.ts'; +import type { StickerWithHydratedData } from '../types/Stickers.preload.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { drop } from './drop.std.ts'; import { loadAttachmentData, loadContactData, loadPreviewData, loadStickerData, -} from './migrations.preload.js'; -import { toLogFormat } from '../types/errors.std.js'; +} from './migrations.preload.ts'; +import { toLogFormat } from '../types/errors.std.ts'; import { sortByMessageOrder, type ForwardMessageData, -} from '../types/ForwardDraft.std.js'; -import { canForward } from '../state/selectors/message.preload.js'; +} from '../types/ForwardDraft.std.ts'; +import { canForward } from '../state/selectors/message.preload.ts'; const log = createLogger('maybeForwardMessages'); diff --git a/ts/util/messageBatcher.preload.ts b/ts/util/messageBatcher.preload.ts index 6653464874..64e750bd40 100644 --- a/ts/util/messageBatcher.preload.ts +++ b/ts/util/messageBatcher.preload.ts @@ -2,12 +2,12 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { createWaitBatcher } from './waitBatcher.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { postSaveUpdates } from './cleanup.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { createWaitBatcher } from './waitBatcher.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { postSaveUpdates } from './cleanup.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('messageBatcher'); diff --git a/ts/util/messageFilePaths.std.ts b/ts/util/messageFilePaths.std.ts index 606ea35493..1163be60f2 100644 --- a/ts/util/messageFilePaths.std.ts +++ b/ts/util/messageFilePaths.std.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { MessageAttributesType } from '../model-types.d.ts'; -import type { AttachmentType } from '../types/Attachment.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; export function getFilePathsReferencedByAttachment( attachment: AttachmentType diff --git a/ts/util/mightStillBeOnTransitTier.dom.ts b/ts/util/mightStillBeOnTransitTier.dom.ts index 1c963a0c22..9a663b2ad0 100644 --- a/ts/util/mightStillBeOnTransitTier.dom.ts +++ b/ts/util/mightStillBeOnTransitTier.dom.ts @@ -1,10 +1,10 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentType } from '../types/Attachment.std.js'; -import { isMoreRecentThan } from './timestamp.std.js'; -import { DAY } from './durations/index.std.js'; -import { getMessageQueueTime } from './getMessageQueueTime.dom.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import { isMoreRecentThan } from './timestamp.std.ts'; +import { DAY } from './durations/index.std.ts'; +import { getMessageQueueTime } from './getMessageQueueTime.dom.ts'; // Extend range in case the attachment is actually still there (this function is meant to // be optimistic) diff --git a/ts/util/migrateColor.node.ts b/ts/util/migrateColor.node.ts index 3c6e2eb797..1779666841 100644 --- a/ts/util/migrateColor.node.ts +++ b/ts/util/migrateColor.node.ts @@ -1,10 +1,10 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { AvatarColors } from '../types/Colors.std.js'; +import { AvatarColors } from '../types/Colors.std.ts'; import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { AvatarColorType, CustomColorType } from '../types/Colors.std.js'; -import { generateAvatarColor } from '../Crypto.node.js'; +import type { AvatarColorType, CustomColorType } from '../types/Colors.std.ts'; +import { generateAvatarColor } from '../Crypto.node.ts'; const NEW_COLOR_NAMES = new Set(AvatarColors); diff --git a/ts/util/migrations.preload.ts b/ts/util/migrations.preload.ts index faf2a32534..1090023df2 100644 --- a/ts/util/migrations.preload.ts +++ b/ts/util/migrations.preload.ts @@ -1,26 +1,28 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only +import { + readAndDecryptDataFromDisk, + writeNewAttachmentData as doWriteNewAttachmentData, + createDeleter, +} from '../../app/attachments.node.ts'; import { createAbsolutePathGetter, createPlaintextReader, createWriterForNew, createDoesExist, getUnusedFilename, - readAndDecryptDataFromDisk, saveAttachmentToDisk, - writeNewAttachmentData as doWriteNewAttachmentData, - createDeleter, copyIntoAttachmentsDirectory, -} from '../windows/main/attachments.preload.js'; +} from '../windows/main/attachments.preload.ts'; import { getImageDimensions, makeImageThumbnail, makeObjectUrl, makeVideoScreenshot, revokeObjectUrl, -} from '../types/VisualAttachment.dom.js'; -import { loadData } from './Attachment.std.js'; +} from '../types/VisualAttachment.dom.ts'; +import { loadData } from './Attachment.std.ts'; import { loadContactData as doLoadContactData, loadPreviewData as doLoadPreviewData, @@ -30,16 +32,16 @@ import { processNewSticker as doProcessNewSticker, createAttachmentLoader, upgradeSchema, -} from '../types/Message2.preload.js'; +} from '../types/Message2.preload.ts'; import type { AttachmentType, AddressableAttachmentType, LocalAttachmentV2Type, -} from '../types/Attachment.std.js'; -import type { MessageAttachmentType } from '../types/AttachmentDownload.std.js'; +} from '../types/Attachment.std.ts'; +import type { MessageAttachmentType } from '../types/AttachmentDownload.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; -import { createLogger } from '../logging/log.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; import { ATTACHMENTS_PATH, STICKERS_PATH, @@ -49,10 +51,10 @@ import { AVATARS_PATH, DOWNLOADS_PATH, MEGAPHONES_PATH, -} from './basePaths.preload.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { getExistingAttachmentDataForReuse } from './attachments/deduplicateAttachment.preload.js'; -import { getPlaintextHashForInMemoryAttachment } from '../AttachmentCrypto.node.js'; +} from './basePaths.preload.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { getExistingAttachmentDataForReuse } from './attachments/deduplicateAttachment.preload.ts'; +import { getPlaintextHashForInMemoryAttachment } from '../AttachmentCrypto.node.ts'; const logger = createLogger('migrations'); diff --git a/ts/util/missingCaseError.std.ts b/ts/util/missingCaseError.std.ts index 8edd8b30f6..aa5cdba6f8 100644 --- a/ts/util/missingCaseError.std.ts +++ b/ts/util/missingCaseError.std.ts @@ -1,7 +1,7 @@ // Copyright 2018 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { reallyJsonStringify } from './reallyJsonStringify.std.js'; +import { reallyJsonStringify } from './reallyJsonStringify.std.ts'; // `missingCaseError` is useful for compile-time checking that all `case`s in // a `switch` statement have been handled, e.g. diff --git a/ts/util/modifyTargetMessage.preload.ts b/ts/util/modifyTargetMessage.preload.ts index 1665c912bd..e861c2c4f6 100644 --- a/ts/util/modifyTargetMessage.preload.ts +++ b/ts/util/modifyTargetMessage.preload.ts @@ -3,50 +3,50 @@ import lodash from 'lodash'; import PQueue from 'p-queue'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import type { MessageModel } from '../models/messages.preload.js'; -import type { SendStateByConversationId } from '../messages/MessageSendState.std.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import type { MessageModel } from '../models/messages.preload.ts'; +import type { SendStateByConversationId } from '../messages/MessageSendState.std.ts'; -import * as Edits from '../messageModifiers/Edits.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Deletes from '../messageModifiers/Deletes.preload.js'; -import * as DeletesForMe from '../messageModifiers/DeletesForMe.preload.js'; -import * as MessageReceipts from '../messageModifiers/MessageReceipts.preload.js'; -import * as Reactions from '../messageModifiers/Reactions.preload.js'; -import * as ReadSyncs from '../messageModifiers/ReadSyncs.preload.js'; -import * as ViewOnceOpenSyncs from '../messageModifiers/ViewOnceOpenSyncs.preload.js'; -import * as ViewSyncs from '../messageModifiers/ViewSyncs.preload.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../MessageSeenStatus.std.js'; +import * as Edits from '../messageModifiers/Edits.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Deletes from '../messageModifiers/Deletes.preload.ts'; +import * as DeletesForMe from '../messageModifiers/DeletesForMe.preload.ts'; +import * as MessageReceipts from '../messageModifiers/MessageReceipts.preload.ts'; +import * as Reactions from '../messageModifiers/Reactions.preload.ts'; +import * as ReadSyncs from '../messageModifiers/ReadSyncs.preload.ts'; +import * as ViewOnceOpenSyncs from '../messageModifiers/ViewOnceOpenSyncs.preload.ts'; +import * as ViewSyncs from '../messageModifiers/ViewSyncs.preload.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../MessageSeenStatus.std.ts'; import { SendActionType, sendStateReducer, -} from '../messages/MessageSendState.std.js'; -import { canConversationBeUnarchived } from './canConversationBeUnarchived.preload.js'; -import { receiveDeleteForEveryone } from './deleteForEveryone.preload.js'; -import { drop } from './drop.std.js'; -import { handleEditMessage } from './handleEditMessage.preload.js'; -import { isGroup } from './whatTypeOfConversation.dom.js'; -import { isStory, isTapToView } from '../state/selectors/message.preload.js'; -import { getOwn } from './getOwn.std.js'; -import { getSourceServiceId } from '../messages/sources.preload.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import { reduce } from './iterables.std.js'; -import { strictAssert } from './assert.std.js'; +} from '../messages/MessageSendState.std.ts'; +import { canConversationBeUnarchived } from './canConversationBeUnarchived.preload.ts'; +import { receiveDeleteForEveryone } from './deleteForEveryone.preload.ts'; +import { drop } from './drop.std.ts'; +import { handleEditMessage } from './handleEditMessage.preload.ts'; +import { isGroup } from './whatTypeOfConversation.dom.ts'; +import { isStory, isTapToView } from '../state/selectors/message.preload.ts'; +import { getOwn } from './getOwn.std.ts'; +import { getSourceServiceId } from '../messages/sources.preload.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import { reduce } from './iterables.std.ts'; +import { strictAssert } from './assert.std.ts'; import { applyDeleteAttachmentFromMessage, applyDeleteMessage, -} from './deleteForMe.preload.js'; -import { getMessageIdForLogging } from './idForLogging.preload.js'; -import { markViewOnceMessageViewed } from '../services/MessageUpdater.preload.js'; -import { handleReaction } from '../messageModifiers/Reactions.preload.js'; +} from './deleteForMe.preload.ts'; +import { getMessageIdForLogging } from './idForLogging.preload.ts'; +import { markViewOnceMessageViewed } from '../services/MessageUpdater.preload.ts'; +import { handleReaction } from '../messageModifiers/Reactions.preload.ts'; import { drainCachedTerminatesForMessage as drainCachedPollTerminatesForMessage, drainCachedVotesForMessage as drainCachedPollVotesForMessage, handlePollTerminate, handlePollVote, -} from '../messageModifiers/Polls.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../messageModifiers/Polls.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { isEqual } = lodash; diff --git a/ts/util/nicknames.dom.ts b/ts/util/nicknames.dom.ts index 39cdfef052..aa1f6e8860 100644 --- a/ts/util/nicknames.dom.ts +++ b/ts/util/nicknames.dom.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { isSignalConversation } from './isSignalConversation.dom.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { isSignalConversation } from './isSignalConversation.dom.ts'; export function canHaveNicknameAndNote( conversation: ConversationType diff --git a/ts/util/normalizeAci.std.ts b/ts/util/normalizeAci.std.ts index 1ec2052a51..2085a0c41c 100644 --- a/ts/util/normalizeAci.std.ts +++ b/ts/util/normalizeAci.std.ts @@ -1,11 +1,11 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AciString } from '../types/ServiceId.std.js'; -import type { LoggerType } from '../types/Logging.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { isAciString } from './isAciString.std.js'; -import { strictAssert } from './assert.std.js'; +import type { AciString } from '../types/ServiceId.std.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { isAciString } from './isAciString.std.ts'; +import { strictAssert } from './assert.std.ts'; const log = createLogger('normalizeAci'); diff --git a/ts/util/numbers.std.ts b/ts/util/numbers.std.ts index 879aa53073..52a0ec5585 100644 --- a/ts/util/numbers.std.ts +++ b/ts/util/numbers.std.ts @@ -1,6 +1,6 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { strictAssert } from './assert.std.js'; +import { strictAssert } from './assert.std.ts'; export function safeParseNumber(value: number | string): number | null { if (typeof value === 'number') { diff --git a/ts/util/onCallEventSync.preload.ts b/ts/util/onCallEventSync.preload.ts index 2cc1b2741d..8968517b56 100644 --- a/ts/util/onCallEventSync.preload.ts +++ b/ts/util/onCallEventSync.preload.ts @@ -1,13 +1,13 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { CallEventSyncEvent } from '../textsecure/messageReceiverEvents.std.js'; -import { createLogger } from '../logging/log.std.js'; +import type { CallEventSyncEvent } from '../textsecure/messageReceiverEvents.std.ts'; +import { createLogger } from '../logging/log.std.ts'; import { peerIdToLog, updateCallHistoryFromRemoteEvent, -} from './callDisposition.preload.js'; -import { CallMode } from '../types/CallDisposition.std.js'; +} from './callDisposition.preload.ts'; +import { CallMode } from '../types/CallDisposition.std.ts'; const log = createLogger('onCallEventSync'); diff --git a/ts/util/onCallLinkUpdateSync.preload.ts b/ts/util/onCallLinkUpdateSync.preload.ts index c355aa5519..717cbbd2db 100644 --- a/ts/util/onCallLinkUpdateSync.preload.ts +++ b/ts/util/onCallLinkUpdateSync.preload.ts @@ -2,14 +2,14 @@ // SPDX-License-Identifier: AGPL-3.0-only import { CallLinkRootKey } from '@signalapp/ringrtc'; -import type { CallLinkUpdateSyncEvent } from '../textsecure/messageReceiverEvents.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { fromAdminKeyBytes } from './callLinks.std.js'; -import { getRoomIdFromRootKey } from './callLinksRingrtc.node.js'; -import { strictAssert } from './assert.std.js'; -import { CallLinkUpdateSyncType } from '../types/CallLink.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; +import type { CallLinkUpdateSyncEvent } from '../textsecure/messageReceiverEvents.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { fromAdminKeyBytes } from './callLinks.std.ts'; +import { getRoomIdFromRootKey } from './callLinksRingrtc.node.ts'; +import { strictAssert } from './assert.std.ts'; +import { CallLinkUpdateSyncType } from '../types/CallLink.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; const log = createLogger('onCallLinkUpdateSync'); diff --git a/ts/util/onCallLogEventSync.preload.ts b/ts/util/onCallLogEventSync.preload.ts index fb7db316c8..a5a14ba724 100644 --- a/ts/util/onCallLogEventSync.preload.ts +++ b/ts/util/onCallLogEventSync.preload.ts @@ -1,14 +1,14 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { CallLogEventSyncEvent } from '../textsecure/messageReceiverEvents.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import type { CallLogEventTarget } from '../types/CallDisposition.std.js'; -import { CallLogEvent } from '../types/CallDisposition.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import { strictAssert } from './assert.std.js'; -import { updateDeletedMessages } from './callDisposition.preload.js'; +import type { CallLogEventSyncEvent } from '../textsecure/messageReceiverEvents.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import type { CallLogEventTarget } from '../types/CallDisposition.std.ts'; +import { CallLogEvent } from '../types/CallDisposition.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { updateDeletedMessages } from './callDisposition.preload.ts'; const log = createLogger('onCallLogEventSync'); diff --git a/ts/util/onDeviceNameChangeSync.preload.ts b/ts/util/onDeviceNameChangeSync.preload.ts index 300ce60edd..7bddc54ae0 100644 --- a/ts/util/onDeviceNameChangeSync.preload.ts +++ b/ts/util/onDeviceNameChangeSync.preload.ts @@ -2,16 +2,16 @@ // SPDX-License-Identifier: AGPL-3.0-only import PQueue from 'p-queue'; -import type { DeviceNameChangeSyncEvent } from '../textsecure/messageReceiverEvents.std.js'; -import { getDevices } from '../textsecure/WebAPI.preload.js'; -import { MINUTE } from './durations/index.std.js'; -import { strictAssert } from './assert.std.js'; -import { parseIntOrThrow } from './parseIntOrThrow.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import { drop } from './drop.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { accountManager } from '../textsecure/AccountManager.preload.js'; +import type { DeviceNameChangeSyncEvent } from '../textsecure/messageReceiverEvents.std.ts'; +import { getDevices } from '../textsecure/WebAPI.preload.ts'; +import { MINUTE } from './durations/index.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { parseIntOrThrow } from './parseIntOrThrow.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import { drop } from './drop.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { accountManager } from '../textsecure/AccountManager.preload.ts'; const log = createLogger('onDeviceNameChangeSync'); diff --git a/ts/util/onStoryRecipientUpdate.preload.ts b/ts/util/onStoryRecipientUpdate.preload.ts index d8bce6e02d..0ff5969814 100644 --- a/ts/util/onStoryRecipientUpdate.preload.ts +++ b/ts/util/onStoryRecipientUpdate.preload.ts @@ -2,19 +2,19 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { DataReader } from '../sql/Client.preload.js'; -import type { StoryRecipientUpdateEvent } from '../textsecure/messageReceiverEvents.std.js'; -import { normalizeStoryDistributionId } from '../types/StoryDistributionId.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { getConversationIdForLogging } from './idForLogging.preload.js'; -import { isStory } from '../state/selectors/message.preload.js'; -import { queueUpdateMessage } from './messageBatcher.preload.js'; -import { isMe } from './whatTypeOfConversation.dom.js'; -import { drop } from './drop.std.js'; -import { applyDeleteForEveryone } from './deleteForEveryone.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { MessageModel } from '../models/messages.preload.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import type { StoryRecipientUpdateEvent } from '../textsecure/messageReceiverEvents.std.ts'; +import { normalizeStoryDistributionId } from '../types/StoryDistributionId.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { getConversationIdForLogging } from './idForLogging.preload.ts'; +import { isStory } from '../state/selectors/message.preload.ts'; +import { queueUpdateMessage } from './messageBatcher.preload.ts'; +import { isMe } from './whatTypeOfConversation.dom.ts'; +import { drop } from './drop.std.ts'; +import { applyDeleteForEveryone } from './deleteForEveryone.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { MessageModel } from '../models/messages.preload.ts'; const { isEqual } = lodash; diff --git a/ts/util/openLinkInWebBrowser.dom.ts b/ts/util/openLinkInWebBrowser.dom.ts index 230399db49..f36fbb9138 100644 --- a/ts/util/openLinkInWebBrowser.dom.ts +++ b/ts/util/openLinkInWebBrowser.dom.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isValidLink } from '../types/LinkPreview.std.js'; +import { isValidLink } from '../types/LinkPreview.std.ts'; export function openLinkInWebBrowser(url: string): void { if (!isValidLink(url)) { diff --git a/ts/util/os/osMain.node.ts b/ts/util/os/osMain.node.ts index 7b6988530c..5113847894 100644 --- a/ts/util/os/osMain.node.ts +++ b/ts/util/os/osMain.node.ts @@ -3,7 +3,7 @@ import os from 'node:os'; import fsExtra from 'fs-extra'; -import { getOSFunctions } from './shared.std.js'; +import { getOSFunctions } from './shared.std.ts'; const { readFileSync } = fsExtra; diff --git a/ts/util/os/osPreload.preload.ts b/ts/util/os/osPreload.preload.ts index 3bc45da99c..3c78c80b04 100644 --- a/ts/util/os/osPreload.preload.ts +++ b/ts/util/os/osPreload.preload.ts @@ -1,8 +1,8 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { config } from '../../context/config.preload.js'; -import { getOSFunctions } from './shared.std.js'; +import { config } from '../../context/config.preload.ts'; +import { getOSFunctions } from './shared.std.ts'; const OS = getOSFunctions(config.osRelease); diff --git a/ts/util/os/promptOSAuthMain.main.ts b/ts/util/os/promptOSAuthMain.main.ts index 286eccd75d..7ebd4c82f5 100644 --- a/ts/util/os/promptOSAuthMain.main.ts +++ b/ts/util/os/promptOSAuthMain.main.ts @@ -8,10 +8,10 @@ import { requestVerification as requestVerificationWindowsUcv, } from '@signalapp/windows-ucv'; -import { createLogger } from '../../logging/log.std.js'; -import OS from './osMain.node.js'; -import { missingCaseError } from '../missingCaseError.std.js'; -import { toLogFormat } from '../../types/errors.std.js'; +import { createLogger } from '../../logging/log.std.ts'; +import OS from './osMain.node.ts'; +import { missingCaseError } from '../missingCaseError.std.ts'; +import { toLogFormat } from '../../types/errors.std.ts'; const log = createLogger('promptOSAuthMain'); diff --git a/ts/util/packageJson.main.ts b/ts/util/packageJson.main.ts index 722d400623..d283355f4b 100644 --- a/ts/util/packageJson.main.ts +++ b/ts/util/packageJson.main.ts @@ -4,7 +4,7 @@ import { readFileSync } from 'node:fs'; import { join } from 'node:path'; import type { PackageJsonType } from '../types/packageJson.d.ts'; -import { getAppRootDir } from './appRootDir.main.js'; +import { getAppRootDir } from './appRootDir.main.ts'; const PACKAGE_JSON_PATH = join(getAppRootDir(), 'package.json'); diff --git a/ts/util/parseIntWithFallback.std.ts b/ts/util/parseIntWithFallback.std.ts index 98a89ab6c1..06be330ebe 100644 --- a/ts/util/parseIntWithFallback.std.ts +++ b/ts/util/parseIntWithFallback.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { parseIntOrThrow } from './parseIntOrThrow.std.js'; +import { parseIntOrThrow } from './parseIntOrThrow.std.ts'; export function parseIntWithFallback(value: unknown, fallback: number): number { try { diff --git a/ts/util/parseRetryAfter.std.ts b/ts/util/parseRetryAfter.std.ts index c15cdb8b6f..965a688045 100644 --- a/ts/util/parseRetryAfter.std.ts +++ b/ts/util/parseRetryAfter.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { SECOND, MINUTE } from './durations/index.std.js'; -import { isNormalNumber } from './isNormalNumber.std.js'; +import { SECOND, MINUTE } from './durations/index.std.ts'; +import { isNormalNumber } from './isNormalNumber.std.ts'; const DEFAULT_RETRY_AFTER = MINUTE; const MINIMAL_RETRY_AFTER = SECOND; diff --git a/ts/util/pemToDer.std.ts b/ts/util/pemToDer.std.ts index cd5348f894..26277e06e5 100644 --- a/ts/util/pemToDer.std.ts +++ b/ts/util/pemToDer.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as Bytes from '../Bytes.std.js'; +import * as Bytes from '../Bytes.std.ts'; export function pemToDer(pem: string): Uint8Array { const pemContent = pem diff --git a/ts/util/phoneNumberDiscoverability.std.ts b/ts/util/phoneNumberDiscoverability.std.ts index 85bf0a037b..bbef7034d1 100644 --- a/ts/util/phoneNumberDiscoverability.std.ts +++ b/ts/util/phoneNumberDiscoverability.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { makeEnumParser } from './enum.std.js'; +import { makeEnumParser } from './enum.std.ts'; // These strings are saved to disk, so be careful when changing them. export enum PhoneNumberDiscoverability { diff --git a/ts/util/phoneNumberSharingMode.preload.ts b/ts/util/phoneNumberSharingMode.preload.ts index d8a01b1816..ef404ca671 100644 --- a/ts/util/phoneNumberSharingMode.preload.ts +++ b/ts/util/phoneNumberSharingMode.preload.ts @@ -6,10 +6,10 @@ import type { ConversationAttributesType } from '../model-types.d.ts'; import { PhoneNumberSharingMode, parsePhoneNumberSharingMode, -} from '../types/PhoneNumberSharingMode.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../types/PhoneNumberSharingMode.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import { isDirectConversation, isMe } from './whatTypeOfConversation.dom.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export const isSharingPhoneNumberWithEverybody = (): boolean => { const phoneNumberSharingMode = parsePhoneNumberSharingMode( diff --git a/ts/util/pinnedMessages.dom.ts b/ts/util/pinnedMessages.dom.ts index b4315c18c0..fa194399f9 100644 --- a/ts/util/pinnedMessages.dom.ts +++ b/ts/util/pinnedMessages.dom.ts @@ -1,8 +1,8 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import * as RemoteConfig from '../RemoteConfig.dom.js'; -import { parseIntWithFallback } from './parseIntWithFallback.std.js'; +import * as RemoteConfig from '../RemoteConfig.dom.ts'; +import { parseIntWithFallback } from './parseIntWithFallback.std.ts'; export function getPinnedMessagesLimit(): number { const remoteValue = RemoteConfig.getValue('global.pinned_message_limit'); diff --git a/ts/util/pinnedMessages.std.ts b/ts/util/pinnedMessages.std.ts index 82fb4a88e0..3390f7e004 100644 --- a/ts/util/pinnedMessages.std.ts +++ b/ts/util/pinnedMessages.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DurationInSeconds } from './durations/duration-in-seconds.std.js'; +import { DurationInSeconds } from './durations/duration-in-seconds.std.ts'; export function getPinnedMessageExpiresAt( receivedAtTimestamp: number, diff --git a/ts/util/preload.preload.ts b/ts/util/preload.preload.ts index ed096d2124..9cbe4ef69f 100644 --- a/ts/util/preload.preload.ts +++ b/ts/util/preload.preload.ts @@ -3,14 +3,14 @@ import { ipcRenderer } from 'electron'; -import { strictAssert } from './assert.std.js'; -import * as Errors from '../types/errors.std.js'; -import type { UnwrapPromise } from '../types/Util.std.js'; +import { strictAssert } from './assert.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import type { UnwrapPromise } from '../types/Util.std.ts'; import type { IPCEventsCallbacksType, IPCEventsValuesType, -} from './createIPCEvents.preload.js'; -import type { SystemTraySetting } from '../types/SystemTraySetting.std.js'; +} from './createIPCEvents.preload.ts'; +import type { SystemTraySetting } from '../types/SystemTraySetting.std.ts'; type SettingOptionsType = { getter?: boolean; diff --git a/ts/util/privacy.node.ts b/ts/util/privacy.node.ts index d141c7af01..25091e025a 100644 --- a/ts/util/privacy.node.ts +++ b/ts/util/privacy.node.ts @@ -7,7 +7,7 @@ import lodashFp from 'lodash/fp.js'; import lodash from 'lodash'; import type { ExtendedStorageID } from '../types/StorageService.d.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; const { escapeRegExp, isString, isRegExp } = lodash; diff --git a/ts/util/processAttachment.preload.ts b/ts/util/processAttachment.preload.ts index 00d7cbb138..871de2874a 100644 --- a/ts/util/processAttachment.preload.ts +++ b/ts/util/processAttachment.preload.ts @@ -3,29 +3,29 @@ import { v4 as generateUuid } from 'uuid'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; import type { AttachmentType, InMemoryAttachmentDraftType, -} from '../types/Attachment.std.js'; +} from '../types/Attachment.std.ts'; import { getMaximumOutgoingAttachmentSizeInKb, getRenderDetailsForLimit, KIBIBYTE, -} from '../types/AttachmentSize.std.js'; -import * as Errors from '../types/errors.std.js'; -import { getValue as getRemoteConfigValue } from '../RemoteConfig.dom.js'; -import { fileToBytes } from './fileToBytes.std.js'; -import { handleImageAttachment } from './handleImageAttachment.preload.js'; -import { handleVideoAttachment } from './handleVideoAttachment.preload.js'; -import { isHeic, stringToMIMEType } from '../types/MIME.std.js'; -import { ToastType } from '../types/Toast.dom.js'; +} from '../types/AttachmentSize.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { getValue as getRemoteConfigValue } from '../RemoteConfig.dom.ts'; +import { fileToBytes } from './fileToBytes.std.ts'; +import { handleImageAttachment } from './handleImageAttachment.preload.ts'; +import { handleVideoAttachment } from './handleVideoAttachment.preload.ts'; +import { isHeic, stringToMIMEType } from '../types/MIME.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; import { isImageTypeSupported, isVideoTypeSupported, -} from './GoogleChrome.std.js'; -import { getAttachmentCiphertextSize } from './AttachmentCrypto.std.js'; -import { MediaTier } from '../types/AttachmentDownload.std.js'; +} from './GoogleChrome.std.ts'; +import { getAttachmentCiphertextSize } from './AttachmentCrypto.std.ts'; +import { MediaTier } from '../types/AttachmentDownload.std.ts'; const log = createLogger('processAttachment'); diff --git a/ts/util/processImageFile.dom.ts b/ts/util/processImageFile.dom.ts index 4e90608c8c..ccdfffb517 100644 --- a/ts/util/processImageFile.dom.ts +++ b/ts/util/processImageFile.dom.ts @@ -3,7 +3,7 @@ import type { LoadImageOptions } from 'blueimp-load-image'; import loadImage from 'blueimp-load-image'; -import { canvasToBytes } from './canvasToBytes.std.js'; +import { canvasToBytes } from './canvasToBytes.std.ts'; export async function processImageFile( file: File diff --git a/ts/util/promptOSAuth.preload.ts b/ts/util/promptOSAuth.preload.ts index 5b1be6c2c7..a588e9a593 100644 --- a/ts/util/promptOSAuth.preload.ts +++ b/ts/util/promptOSAuth.preload.ts @@ -5,8 +5,8 @@ import { ipcRenderer } from 'electron'; import type { PromptOSAuthReasonType, PromptOSAuthResultType, -} from './os/promptOSAuthMain.main.js'; -import { missingCaseError } from './missingCaseError.std.js'; +} from './os/promptOSAuthMain.main.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; export async function promptOSAuth( reason: PromptOSAuthReasonType diff --git a/ts/util/queueAttachmentDownloads.preload.ts b/ts/util/queueAttachmentDownloads.preload.ts index ad9e59e64f..596d36a9e2 100644 --- a/ts/util/queueAttachmentDownloads.preload.ts +++ b/ts/util/queueAttachmentDownloads.preload.ts @@ -1,24 +1,24 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { isAudio, isImage, isLongMessage, isVideo } from '../types/MIME.std.js'; -import { getMessageIdForLogging } from './idForLogging.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { isAudio, isImage, isLongMessage, isVideo } from '../types/MIME.std.ts'; +import { getMessageIdForLogging } from './idForLogging.preload.ts'; import { copyStickerToAttachments, savePackMetadata, getStickerPackStatus, -} from '../types/Stickers.preload.js'; -import { DataWriter } from '../sql/Client.preload.js'; +} from '../types/Stickers.preload.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; -import type { AttachmentType, ThumbnailType } from '../types/Attachment.std.js'; -import type { EmbeddedContactType } from '../types/EmbeddedContact.std.js'; +import type { AttachmentType, ThumbnailType } from '../types/Attachment.std.ts'; +import type { EmbeddedContactType } from '../types/EmbeddedContact.std.ts'; import type { EditHistoryType, MessageAttributesType, QuotedMessageType, } from '../model-types.d.ts'; -import * as Errors from '../types/errors.std.js'; +import * as Errors from '../types/errors.std.ts'; import { isDownloading, isDownloaded, @@ -27,29 +27,29 @@ import { getCachedAttachmentBySignature, cacheAttachmentBySignature, getUndownloadedAttachmentSignature, -} from './Attachment.std.js'; -import { AttachmentDownloadUrgency } from '../types/AttachmentDownload.std.js'; -import type { StickerType } from '../types/Stickers.preload.js'; -import type { LinkPreviewType } from '../types/message/LinkPreviews.std.js'; -import { strictAssert } from './assert.std.js'; -import { isNotNil } from './isNotNil.std.js'; -import { AttachmentDownloadManager } from '../jobs/AttachmentDownloadManager.preload.js'; -import { AttachmentDownloadSource } from '../sql/Interface.std.js'; -import type { MessageModel } from '../models/messages.preload.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import { isOutgoing, isStory } from '../messages/helpers.std.js'; -import { shouldDownloadStory } from './shouldDownloadStory.preload.js'; -import { hasAttachmentDownloads } from './hasAttachmentDownloads.std.js'; +} from './Attachment.std.ts'; +import { AttachmentDownloadUrgency } from '../types/AttachmentDownload.std.ts'; +import type { StickerType } from '../types/Stickers.preload.ts'; +import type { LinkPreviewType } from '../types/message/LinkPreviews.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { AttachmentDownloadManager } from '../jobs/AttachmentDownloadManager.preload.ts'; +import { AttachmentDownloadSource } from '../sql/Interface.std.ts'; +import type { MessageModel } from '../models/messages.preload.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { isOutgoing, isStory } from '../messages/helpers.std.ts'; +import { shouldDownloadStory } from './shouldDownloadStory.preload.ts'; +import { hasAttachmentDownloads } from './hasAttachmentDownloads.std.ts'; import { addToAttachmentDownloadQueue, shouldUseAttachmentDownloadQueue, -} from './attachmentDownloadQueue.preload.js'; -import { queueUpdateMessage } from './messageBatcher.preload.js'; -import type { LoggerType } from '../types/Logging.std.js'; +} from './attachmentDownloadQueue.preload.ts'; +import { queueUpdateMessage } from './messageBatcher.preload.ts'; +import type { LoggerType } from '../types/Logging.std.ts'; import { itemStorage, DEFAULT_AUTO_DOWNLOAD_ATTACHMENT, -} from '../textsecure/Storage.preload.js'; +} from '../textsecure/Storage.preload.ts'; const defaultLogger = createLogger('queueAttachmentDownloads'); diff --git a/ts/util/randomBlurHash.std.ts b/ts/util/randomBlurHash.std.ts index c8e1375d4b..b6d0a3ddb6 100644 --- a/ts/util/randomBlurHash.std.ts +++ b/ts/util/randomBlurHash.std.ts @@ -3,7 +3,7 @@ import { encode } from 'blurhash'; -import { hslToRGB } from './hslToRGB.std.js'; +import { hslToRGB } from './hslToRGB.std.ts'; export function randomBlurHash(): string { const data = new Uint8ClampedArray(2 * 2 * 4); diff --git a/ts/util/registration.preload.ts b/ts/util/registration.preload.ts index 542df555c2..86ff81481b 100644 --- a/ts/util/registration.preload.ts +++ b/ts/util/registration.preload.ts @@ -1,6 +1,6 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export async function markEverDone(): Promise { await itemStorage.put('chromiumRegistrationDoneEver', ''); diff --git a/ts/util/relaunch.main.ts b/ts/util/relaunch.main.ts index a422162c2e..29e8e3b3ca 100644 --- a/ts/util/relaunch.main.ts +++ b/ts/util/relaunch.main.ts @@ -4,7 +4,7 @@ import { app } from 'electron'; import type { RelaunchOptions } from 'electron'; -import OS from './os/osMain.node.js'; +import OS from './os/osMain.node.ts'; // app.relaunch() doesn't work in AppImage, so this is a workaround export function appRelaunch(): void { diff --git a/ts/util/removePendingMember.preload.ts b/ts/util/removePendingMember.preload.ts index 2b56ca1cf4..395b3b402c 100644 --- a/ts/util/removePendingMember.preload.ts +++ b/ts/util/removePendingMember.preload.ts @@ -2,13 +2,13 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { SignalService as Proto } from '../protobuf/index.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { buildDeletePendingMemberChange } from '../groups.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import { getConversationIdForLogging } from './idForLogging.preload.js'; -import { isMemberPending } from './groupMembershipUtils.preload.js'; -import { isNotNil } from './isNotNil.std.js'; +import type { SignalService as Proto } from '../protobuf/index.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { buildDeletePendingMemberChange } from '../groups.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { getConversationIdForLogging } from './idForLogging.preload.ts'; +import { isMemberPending } from './groupMembershipUtils.preload.ts'; +import { isNotNil } from './isNotNil.std.ts'; const log = createLogger('removePendingMember'); diff --git a/ts/util/resolveAttachmentDraftData.preload.ts b/ts/util/resolveAttachmentDraftData.preload.ts index 7a9191da4e..3a03956d6f 100644 --- a/ts/util/resolveAttachmentDraftData.preload.ts +++ b/ts/util/resolveAttachmentDraftData.preload.ts @@ -1,9 +1,9 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import type { AttachmentType } from '../types/Attachment.std.js'; -import { readDraftData } from './migrations.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import type { AttachmentType } from '../types/Attachment.std.ts'; +import { readDraftData } from './migrations.preload.ts'; const log = createLogger('resolveAttachmentDraftData'); diff --git a/ts/util/resolveDraftAttachmentOnDisk.preload.ts b/ts/util/resolveDraftAttachmentOnDisk.preload.ts index 159cd59835..d8d4b9ae79 100644 --- a/ts/util/resolveDraftAttachmentOnDisk.preload.ts +++ b/ts/util/resolveDraftAttachmentOnDisk.preload.ts @@ -1,14 +1,14 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import type { AttachmentDraftType } from '../types/Attachment.std.js'; -import { isVideoAttachment } from './Attachment.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import type { AttachmentDraftType } from '../types/Attachment.std.ts'; +import { isVideoAttachment } from './Attachment.std.ts'; import { getLocalAttachmentUrl, AttachmentDisposition, -} from './getLocalAttachmentUrl.std.js'; -import { getAbsoluteDraftPath } from './migrations.preload.js'; +} from './getLocalAttachmentUrl.std.ts'; +import { getAbsoluteDraftPath } from './migrations.preload.ts'; const log = createLogger('resolveDraftAttachmentOnDisk'); diff --git a/ts/util/resolveStorySendStatus.std.ts b/ts/util/resolveStorySendStatus.std.ts index 3de7105c48..5e64da2445 100644 --- a/ts/util/resolveStorySendStatus.std.ts +++ b/ts/util/resolveStorySendStatus.std.ts @@ -1,14 +1,14 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { StorySendStateType } from '../types/Stories.std.js'; -import { ResolvedSendStatus } from '../types/Stories.std.js'; +import type { StorySendStateType } from '../types/Stories.std.ts'; +import { ResolvedSendStatus } from '../types/Stories.std.ts'; import { isFailed, isPending, isSent, -} from '../messages/MessageSendState.std.js'; -import { softAssert } from './assert.std.js'; +} from '../messages/MessageSendState.std.ts'; +import { softAssert } from './assert.std.ts'; export function resolveStorySendStatus( sendStates: Array diff --git a/ts/util/ringrtc/nonRenderedRemoteParticipant.std.ts b/ts/util/ringrtc/nonRenderedRemoteParticipant.std.ts index 3f3230bf43..3b85e47257 100644 --- a/ts/util/ringrtc/nonRenderedRemoteParticipant.std.ts +++ b/ts/util/ringrtc/nonRenderedRemoteParticipant.std.ts @@ -1,7 +1,7 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { GroupCallVideoRequest } from '../../types/Calling.std.js'; +import type { GroupCallVideoRequest } from '../../types/Calling.std.ts'; export const nonRenderedRemoteParticipant = ({ demuxId, diff --git a/ts/util/rotatingPinoDest.node.ts b/ts/util/rotatingPinoDest.node.ts index 62292a33e8..cd9b6e6738 100644 --- a/ts/util/rotatingPinoDest.node.ts +++ b/ts/util/rotatingPinoDest.node.ts @@ -4,8 +4,8 @@ import fs from 'node:fs'; import pino from 'pino'; -import { DAY, SECOND } from './durations/index.std.js'; -import { isMoreRecentThan } from './timestamp.std.js'; +import { DAY, SECOND } from './durations/index.std.ts'; +import { isMoreRecentThan } from './timestamp.std.ts'; export const DEFAULT_MAX_ROTATIONS = 3; diff --git a/ts/util/safetyNumber.preload.ts b/ts/util/safetyNumber.preload.ts index f4c0dc35cd..2c563b27f3 100644 --- a/ts/util/safetyNumber.preload.ts +++ b/ts/util/safetyNumber.preload.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: AGPL-3.0-only import { PublicKey, Fingerprint } from '@signalapp/libsignal-client'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; -import { assertDev } from './assert.std.js'; -import { uuidToBytes } from './uuidToBytes.std.js'; -import { createLogger } from '../logging/log.std.js'; -import type { SafetyNumberType } from '../types/safetyNumber.std.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { isAciString } from './isAciString.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { assertDev } from './assert.std.ts'; +import { uuidToBytes } from './uuidToBytes.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { SafetyNumberType } from '../types/safetyNumber.std.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { isAciString } from './isAciString.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('safetyNumber'); diff --git a/ts/util/scaleImageToLevel.preload.ts b/ts/util/scaleImageToLevel.preload.ts index 65a8d84c26..205ec8c18a 100644 --- a/ts/util/scaleImageToLevel.preload.ts +++ b/ts/util/scaleImageToLevel.preload.ts @@ -4,12 +4,12 @@ import type { LoadImageResult } from 'blueimp-load-image'; import loadImage from 'blueimp-load-image'; -import type { MIMEType } from '../types/MIME.std.js'; -import { IMAGE_JPEG } from '../types/MIME.std.js'; -import { canvasToBlob } from './canvasToBlob.std.js'; -import { getValue } from '../RemoteConfig.dom.js'; -import { parseNumber } from './libphonenumberUtil.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { MIMEType } from '../types/MIME.std.ts'; +import { IMAGE_JPEG } from '../types/MIME.std.ts'; +import { canvasToBlob } from './canvasToBlob.std.ts'; +import { getValue } from '../RemoteConfig.dom.ts'; +import { parseNumber } from './libphonenumberUtil.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; enum MediaQualityLevels { One = 1, diff --git a/ts/util/searchConversationTitles.std.ts b/ts/util/searchConversationTitles.std.ts index 03c91b2886..ac020d718c 100644 --- a/ts/util/searchConversationTitles.std.ts +++ b/ts/util/searchConversationTitles.std.ts @@ -3,8 +3,8 @@ import type Fuse from 'fuse.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import { fuseGetFnRemoveDiacritics, getCachedFuseIndex } from './fuse.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import { fuseGetFnRemoveDiacritics, getCachedFuseIndex } from './fuse.std.ts'; const CONVERSATION_TITLE = 'title'; const MIN_SEARCH_TERM_LENGTH = 2; diff --git a/ts/util/sendCallLinkUpdateSync.preload.ts b/ts/util/sendCallLinkUpdateSync.preload.ts index 214c4676d7..e1671ae262 100644 --- a/ts/util/sendCallLinkUpdateSync.preload.ts +++ b/ts/util/sendCallLinkUpdateSync.preload.ts @@ -3,16 +3,16 @@ import { ContentHint } from '@signalapp/libsignal-client'; -import * as Bytes from '../Bytes.std.js'; -import { CallLinkUpdateSyncType } from '../types/CallLink.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; -import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.js'; -import { MessageSender } from '../textsecure/SendMessage.preload.js'; -import { toAdminKeyBytes } from './callLinks.std.js'; -import { toRootKeyBytes } from './callLinksRingrtc.node.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import * as Bytes from '../Bytes.std.ts'; +import { CallLinkUpdateSyncType } from '../types/CallLink.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; +import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue.preload.ts'; +import { MessageSender } from '../textsecure/SendMessage.preload.ts'; +import { toAdminKeyBytes } from './callLinks.std.ts'; +import { toRootKeyBytes } from './callLinksRingrtc.node.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('sendCallLinkUpdateSync'); diff --git a/ts/util/sendDeleteForEveryoneMessage.preload.ts b/ts/util/sendDeleteForEveryoneMessage.preload.ts index 8965f21644..1f42cff009 100644 --- a/ts/util/sendDeleteForEveryoneMessage.preload.ts +++ b/ts/util/sendDeleteForEveryoneMessage.preload.ts @@ -2,28 +2,28 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ConversationQueueJobData } from '../jobs/conversationJobQueue.preload.js'; -import * as Errors from '../types/errors.std.js'; -import { createLogger } from '../logging/log.std.js'; +import type { ConversationQueueJobData } from '../jobs/conversationJobQueue.preload.ts'; +import * as Errors from '../types/errors.std.ts'; +import { createLogger } from '../logging/log.std.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { applyDeleteForEveryone } from './deleteForEveryone.preload.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { applyDeleteForEveryone } from './deleteForEveryone.preload.ts'; import { getConversationIdForLogging, getMessageIdForLogging, -} from './idForLogging.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { getRecipientConversationIds } from './getRecipientConversationIds.dom.js'; -import { getRecipients } from './getRecipients.dom.js'; -import { repeat, zipObject } from './iterables.std.js'; -import { isOutgoing } from '../state/selectors/message.preload.js'; -import { canSendDeleteForEveryone } from './canDeleteForEveryone.preload.js'; -import { areWeAdmin } from './areWeAdmin.preload.js'; -import { isAciString } from './isAciString.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { strictAssert } from './assert.std.js'; +} from './idForLogging.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { getRecipientConversationIds } from './getRecipientConversationIds.dom.ts'; +import { getRecipients } from './getRecipients.dom.ts'; +import { repeat, zipObject } from './iterables.std.ts'; +import { isOutgoing } from '../state/selectors/message.preload.ts'; +import { canSendDeleteForEveryone } from './canDeleteForEveryone.preload.ts'; +import { areWeAdmin } from './areWeAdmin.preload.ts'; +import { isAciString } from './isAciString.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { strictAssert } from './assert.std.ts'; const log = createLogger('sendDeleteForEveryoneMessage'); diff --git a/ts/util/sendEditedMessage.preload.ts b/ts/util/sendEditedMessage.preload.ts index 9d77371ca2..9efe7a5423 100644 --- a/ts/util/sendEditedMessage.preload.ts +++ b/ts/util/sendEditedMessage.preload.ts @@ -3,23 +3,23 @@ import { v4 as generateUuid } from 'uuid'; -import type { DraftBodyRanges } from '../types/BodyRange.std.js'; -import type { LinkPreviewType } from '../types/message/LinkPreviews.std.js'; +import type { DraftBodyRanges } from '../types/BodyRange.std.ts'; +import type { LinkPreviewType } from '../types/message/LinkPreviews.std.ts'; import type { MessageAttributesType, QuotedMessageType, } from '../model-types.d.ts'; -import { createLogger } from '../logging/log.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { ErrorWithToast } from '../types/ErrorWithToast.std.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; -import { ToastType } from '../types/Toast.dom.js'; -import type { AciString } from '../types/ServiceId.std.js'; -import { canEditMessage, isWithinMaxEdits } from './canEditMessage.dom.js'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { ErrorWithToast } from '../types/ErrorWithToast.std.ts'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; +import { ToastType } from '../types/Toast.dom.tsx'; +import type { AciString } from '../types/ServiceId.std.ts'; +import { canEditMessage, isWithinMaxEdits } from './canEditMessage.dom.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; +} from '../jobs/conversationJobQueue.preload.ts'; import { concat, filter, @@ -27,20 +27,20 @@ import { repeat, zipObject, find, -} from './iterables.std.js'; -import { getConversationIdForLogging } from './idForLogging.preload.js'; -import { isQuoteAMatch } from '../messages/quotes.preload.js'; -import { getMessageById } from '../messages/getMessageById.preload.js'; -import { handleEditMessage } from './handleEditMessage.preload.js'; -import { incrementMessageCounter } from './incrementMessageCounter.preload.js'; -import { isGroupV1 } from './whatTypeOfConversation.dom.js'; -import { isNotNil } from './isNotNil.std.js'; -import { isSignalConversation } from './isSignalConversation.dom.js'; -import { strictAssert } from './assert.std.js'; -import { timeAndLogIfTooLong } from './timeAndLogIfTooLong.std.js'; -import { makeQuote } from './makeQuote.preload.js'; -import { getMessageSentTimestamp } from './getMessageSentTimestamp.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from './iterables.std.ts'; +import { getConversationIdForLogging } from './idForLogging.preload.ts'; +import { isQuoteAMatch } from '../messages/quotes.preload.ts'; +import { getMessageById } from '../messages/getMessageById.preload.ts'; +import { handleEditMessage } from './handleEditMessage.preload.ts'; +import { incrementMessageCounter } from './incrementMessageCounter.preload.ts'; +import { isGroupV1 } from './whatTypeOfConversation.dom.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { isSignalConversation } from './isSignalConversation.dom.ts'; +import { strictAssert } from './assert.std.ts'; +import { timeAndLogIfTooLong } from './timeAndLogIfTooLong.std.ts'; +import { makeQuote } from './makeQuote.preload.ts'; +import { getMessageSentTimestamp } from './getMessageSentTimestamp.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('sendEditedMessage'); diff --git a/ts/util/sendReceipts.preload.ts b/ts/util/sendReceipts.preload.ts index 4b37933358..eefff4dbe7 100644 --- a/ts/util/sendReceipts.preload.ts +++ b/ts/util/sendReceipts.preload.ts @@ -2,18 +2,18 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import type { LoggerType } from '../types/Logging.std.js'; -import type { Receipt } from '../types/Receipt.std.js'; -import { ReceiptType } from '../types/Receipt.std.js'; -import { getSendOptions } from './getSendOptions.preload.js'; -import { handleMessageSend } from './handleMessageSend.preload.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import { mapEmplace } from './mapEmplace.std.js'; -import { isSignalConversation } from './isSignalConversation.dom.js'; -import { messageSender } from '../textsecure/SendMessage.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { shouldSendToDirectConversation } from '../jobs/helpers/shouldSendToConversation.preload.js'; +import type { LoggerType } from '../types/Logging.std.ts'; +import type { Receipt } from '../types/Receipt.std.ts'; +import { ReceiptType } from '../types/Receipt.std.ts'; +import { getSendOptions } from './getSendOptions.preload.ts'; +import { handleMessageSend } from './handleMessageSend.preload.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { mapEmplace } from './mapEmplace.std.ts'; +import { isSignalConversation } from './isSignalConversation.dom.ts'; +import { messageSender } from '../textsecure/SendMessage.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { shouldSendToDirectConversation } from '../jobs/helpers/shouldSendToConversation.preload.ts'; const { chunk, map } = lodash; diff --git a/ts/util/sendStoryMessage.preload.ts b/ts/util/sendStoryMessage.preload.ts index 3e6730859d..1d56f0559b 100644 --- a/ts/util/sendStoryMessage.preload.ts +++ b/ts/util/sendStoryMessage.preload.ts @@ -3,37 +3,37 @@ import { v4 as generateUuid } from 'uuid'; -import type { AttachmentType } from '../types/Attachment.std.js'; +import type { AttachmentType } from '../types/Attachment.std.ts'; import type { MessageAttributesType } from '../model-types.d.ts'; import type { SendState, SendStateByConversationId, -} from '../messages/MessageSendState.std.js'; -import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { DataReader, DataWriter } from '../sql/Client.preload.js'; -import { MY_STORY_ID, StorySendMode } from '../types/Stories.std.js'; -import { getStoriesBlocked } from './stories.preload.js'; -import { ReadStatus } from '../messages/MessageReadStatus.std.js'; -import { SeenStatus } from '../MessageSeenStatus.std.js'; -import { SendStatus } from '../messages/MessageSendState.std.js'; +} from '../messages/MessageSendState.std.ts'; +import type { StoryDistributionIdString } from '../types/StoryDistributionId.std.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader, DataWriter } from '../sql/Client.preload.ts'; +import { MY_STORY_ID, StorySendMode } from '../types/Stories.std.ts'; +import { getStoriesBlocked } from './stories.preload.ts'; +import { ReadStatus } from '../messages/MessageReadStatus.std.ts'; +import { SeenStatus } from '../MessageSeenStatus.std.ts'; +import { SendStatus } from '../messages/MessageSendState.std.ts'; import { conversationJobQueue, conversationQueueJobEnum, -} from '../jobs/conversationJobQueue.preload.js'; -import { getRecipients } from './getRecipients.dom.js'; -import { getSignalConnections } from './getSignalConnections.preload.js'; -import { incrementMessageCounter } from './incrementMessageCounter.preload.js'; -import { isGroupV2 } from './whatTypeOfConversation.dom.js'; -import { isNotNil } from './isNotNil.std.js'; -import { collect } from './iterables.std.js'; -import { loadPreviewData, upgradeMessageSchema } from './migrations.preload.js'; -import { DurationInSeconds } from './durations/index.std.js'; -import { sanitizeLinkPreview } from '../services/LinkPreview.preload.js'; -import type { DraftBodyRanges } from '../types/BodyRange.std.js'; -import { MessageModel } from '../models/messages.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from '../jobs/conversationJobQueue.preload.ts'; +import { getRecipients } from './getRecipients.dom.ts'; +import { getSignalConnections } from './getSignalConnections.preload.ts'; +import { incrementMessageCounter } from './incrementMessageCounter.preload.ts'; +import { isGroupV2 } from './whatTypeOfConversation.dom.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { collect } from './iterables.std.ts'; +import { loadPreviewData, upgradeMessageSchema } from './migrations.preload.ts'; +import { DurationInSeconds } from './durations/index.std.ts'; +import { sanitizeLinkPreview } from '../services/LinkPreview.preload.ts'; +import type { DraftBodyRanges } from '../types/BodyRange.std.ts'; +import { MessageModel } from '../models/messages.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('sendStoryMessage'); diff --git a/ts/util/sendToGroup.preload.ts b/ts/util/sendToGroup.preload.ts index bef4b6c313..a636244818 100644 --- a/ts/util/sendToGroup.preload.ts +++ b/ts/util/sendToGroup.preload.ts @@ -21,30 +21,30 @@ import type { import { signalProtocolStore, GLOBAL_ZONE, -} from '../SignalProtocolStore.preload.js'; -import { senderCertificateService } from '../services/senderCertificate.preload.js'; -import type { SendLogCallbackType } from '../textsecure/OutgoingMessage.preload.js'; +} from '../SignalProtocolStore.preload.ts'; +import { senderCertificateService } from '../services/senderCertificate.preload.ts'; +import type { SendLogCallbackType } from '../textsecure/OutgoingMessage.preload.ts'; import { padMessage, SenderCertificateMode, -} from '../textsecure/OutgoingMessage.preload.js'; -import { accountManager } from '../textsecure/AccountManager.preload.js'; -import { Address } from '../types/Address.std.js'; -import { QualifiedAddress } from '../types/QualifiedAddress.std.js'; -import * as Errors from '../types/errors.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; -import { getValue } from '../RemoteConfig.dom.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { fromServiceIdObject, ServiceIdKind } from '../types/ServiceId.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { isRecord } from './isRecord.std.js'; +} from '../textsecure/OutgoingMessage.preload.ts'; +import { accountManager } from '../textsecure/AccountManager.preload.ts'; +import { Address } from '../types/Address.std.ts'; +import { QualifiedAddress } from '../types/QualifiedAddress.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; +import { getValue } from '../RemoteConfig.dom.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { fromServiceIdObject, ServiceIdKind } from '../types/ServiceId.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { isRecord } from './isRecord.std.ts'; -import { isOlderThan } from './timestamp.std.js'; +import { isOlderThan } from './timestamp.std.ts'; import type { GroupMessageOptionsType, SendOptionsType, -} from '../textsecure/SendMessage.preload.js'; -import { messageSender } from '../textsecure/SendMessage.preload.js'; +} from '../textsecure/SendMessage.preload.ts'; +import { messageSender } from '../textsecure/SendMessage.preload.ts'; import { ConnectTimeoutError, IncorrectSenderKeyAuthError, @@ -52,23 +52,23 @@ import { SendMessageProtoError, UnknownRecipientError, UnregisteredUserError, -} from '../textsecure/Errors.std.js'; -import { IdentityKeys, SenderKeys, Sessions } from '../LibSignalStores.node.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; +} from '../textsecure/Errors.std.ts'; +import { IdentityKeys, SenderKeys, Sessions } from '../LibSignalStores.node.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; import type { DeviceType, CallbackResultType } from '../textsecure/Types.d.ts'; -import { getKeysForServiceId } from '../textsecure/getKeysForServiceId.preload.js'; +import { getKeysForServiceId } from '../textsecure/getKeysForServiceId.preload.ts'; import type { ConversationAttributesType, SenderKeyInfoType, } from '../model-types.d.ts'; -import type { SendTypesType } from './handleMessageSend.preload.js'; +import type { SendTypesType } from './handleMessageSend.preload.ts'; import { handleMessageSend, shouldSaveProto, -} from './handleMessageSend.preload.js'; -import { SEALED_SENDER, ZERO_ACCESS_KEY } from '../types/SealedSender.std.js'; -import { HTTPError } from '../types/HTTPError.std.js'; -import { parseIntOrThrow } from './parseIntOrThrow.std.js'; +} from './handleMessageSend.preload.ts'; +import { SEALED_SENDER, ZERO_ACCESS_KEY } from '../types/SealedSender.std.ts'; +import { HTTPError } from '../types/HTTPError.std.ts'; +import { parseIntOrThrow } from './parseIntOrThrow.std.ts'; import { getKeysForServiceId as doGetKeysForServiceId, getKeysForServiceIdUnauth as doGetKeysForServiceIdUnauth, @@ -77,22 +77,22 @@ import { multiRecipient410ResponseSchema, sendMulti, sendMultiLegacy, -} from '../textsecure/WebAPI.preload.js'; -import { SignalService as Proto } from '../protobuf/index.std.js'; +} from '../textsecure/WebAPI.preload.ts'; +import { SignalService as Proto } from '../protobuf/index.std.ts'; -import { strictAssert } from './assert.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { waitForAll } from './waitForAll.std.js'; -import type { GroupSendEndorsementState } from './groupSendEndorsements.preload.js'; +import { strictAssert } from './assert.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { waitForAll } from './waitForAll.std.ts'; +import type { GroupSendEndorsementState } from './groupSendEndorsements.preload.ts'; import { maybeCreateGroupSendEndorsementState, onFailedToSendWithEndorsements, -} from './groupSendEndorsements.preload.js'; -import type { GroupSendToken } from '../types/GroupSendEndorsements.std.js'; -import { isAciString } from './isAciString.std.js'; -import { safeParseStrict, safeParseUnknown } from './schemas.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { isFeaturedEnabledNoRedux } from './isFeatureEnabled.dom.js'; +} from './groupSendEndorsements.preload.ts'; +import type { GroupSendToken } from '../types/GroupSendEndorsements.std.ts'; +import { isAciString } from './isAciString.std.ts'; +import { safeParseStrict, safeParseUnknown } from './schemas.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { isFeaturedEnabledNoRedux } from './isFeatureEnabled.dom.ts'; const { differenceWith, omit } = lodash; diff --git a/ts/util/sessionTranslation.node.ts b/ts/util/sessionTranslation.node.ts index a2e9752c15..7fa894d33f 100644 --- a/ts/util/sessionTranslation.node.ts +++ b/ts/util/sessionTranslation.node.ts @@ -4,8 +4,8 @@ import lodash from 'lodash'; import { signal } from '../protobuf/compiled.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { deriveSecrets } from '../Crypto.node.js'; +import * as Bytes from '../Bytes.std.ts'; +import { deriveSecrets } from '../Crypto.node.ts'; const { get, isFinite, isInteger, isString } = lodash; diff --git a/ts/util/setUtil.std.ts b/ts/util/setUtil.std.ts index ea38607f35..057446519d 100644 --- a/ts/util/setUtil.std.ts +++ b/ts/util/setUtil.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { every } from './iterables.std.js'; +import { every } from './iterables.std.ts'; const add = (set: Readonly>, item: T): Set => new Set(set).add(item); diff --git a/ts/util/setupI18n.dom.tsx b/ts/util/setupI18n.dom.tsx index bf2adb1f49..4173cda5e6 100644 --- a/ts/util/setupI18n.dom.tsx +++ b/ts/util/setupI18n.dom.tsx @@ -3,18 +3,18 @@ import type { IntlShape } from 'react-intl'; import React from 'react'; -import type { LocaleMessagesType } from '../types/I18N.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { LocaleMessagesType } from '../types/I18N.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { Emojify } from '../components/conversation/Emojify.dom.js'; +import { Emojify } from '../components/conversation/Emojify.dom.tsx'; import { createCachedIntl as createCachedIntlMain, setupI18n as setupI18nMain, -} from './setupI18nMain.std.js'; -import type { SetupI18nOptionsType } from './setupI18nMain.std.js'; -import { strictAssert } from './assert.std.js'; +} from './setupI18nMain.std.ts'; +import type { SetupI18nOptionsType } from './setupI18nMain.std.ts'; +import { strictAssert } from './assert.std.ts'; -export { isLocaleMessageType } from './setupI18nMain.std.js'; +export { isLocaleMessageType } from './setupI18nMain.std.ts'; export function renderEmojify( parts: ReadonlyArray diff --git a/ts/util/setupI18nMain.std.ts b/ts/util/setupI18nMain.std.ts index 846f040864..0d5ab74f8b 100644 --- a/ts/util/setupI18nMain.std.ts +++ b/ts/util/setupI18nMain.std.ts @@ -7,17 +7,17 @@ import type { ReactNode } from 'react'; import type { LocaleMessageType, LocaleMessagesType, -} from '../types/I18N.std.js'; +} from '../types/I18N.std.ts'; import type { LocalizerType, ICUStringMessageParamsByKeyType, LocalizerOptions, -} from '../types/Util.std.js'; -import { strictAssert } from './assert.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { Environment, getEnvironment } from '../environment.std.js'; -import { bidiIsolate, bidiStrip } from './unicodeBidi.std.js'; +} from '../types/Util.std.ts'; +import { strictAssert } from './assert.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { Environment, getEnvironment } from '../environment.std.ts'; +import { bidiIsolate, bidiStrip } from './unicodeBidi.std.ts'; const log = createLogger('setupI18nMain'); diff --git a/ts/util/sharedGroupNames.dom.ts b/ts/util/sharedGroupNames.dom.ts index d93b2be7ba..3be910e2d4 100644 --- a/ts/util/sharedGroupNames.dom.ts +++ b/ts/util/sharedGroupNames.dom.ts @@ -3,12 +3,12 @@ import { useState } from 'react'; import { useStore } from 'react-redux'; -import type { StateType } from '../state/reducer.preload.js'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; +import type { StateType } from '../state/reducer.preload.ts'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; import { getConversationLookup, getAllComposableConversations, -} from '../state/selectors/conversations.dom.js'; +} from '../state/selectors/conversations.dom.ts'; const EMPTY_ARRAY: ReadonlyArray = []; diff --git a/ts/util/shouldDownloadStory.preload.ts b/ts/util/shouldDownloadStory.preload.ts index 0a602f6948..b8372ae4b8 100644 --- a/ts/util/shouldDownloadStory.preload.ts +++ b/ts/util/shouldDownloadStory.preload.ts @@ -3,8 +3,8 @@ import type { ConversationAttributesType } from '../model-types.d.ts'; -import { DataReader } from '../sql/Client.preload.js'; -import { isMe } from './whatTypeOfConversation.dom.js'; +import { DataReader } from '../sql/Client.preload.ts'; +import { isMe } from './whatTypeOfConversation.dom.ts'; const MAX_NUM_STORIES_TO_PREFETCH = 5; diff --git a/ts/util/shouldNeverBeCalled.std.ts b/ts/util/shouldNeverBeCalled.std.ts index 4e5d80fef7..a20e917464 100644 --- a/ts/util/shouldNeverBeCalled.std.ts +++ b/ts/util/shouldNeverBeCalled.std.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { assertDev } from './assert.std.js'; +import { assertDev } from './assert.std.ts'; export function shouldNeverBeCalled(..._args: ReadonlyArray): never { assertDev(false, 'This should never be called. Doing nothing'); diff --git a/ts/util/shouldRespondWithProfileKey.dom.ts b/ts/util/shouldRespondWithProfileKey.dom.ts index 0bd7c950c0..f0eb6dfba8 100644 --- a/ts/util/shouldRespondWithProfileKey.dom.ts +++ b/ts/util/shouldRespondWithProfileKey.dom.ts @@ -1,10 +1,10 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationModel } from '../models/conversations.preload.js'; -import { isInSystemContacts } from './isInSystemContacts.std.js'; -import { getSharedGroupNames } from './sharedGroupNames.dom.js'; -import { isMe } from './whatTypeOfConversation.dom.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { isInSystemContacts } from './isInSystemContacts.std.ts'; +import { getSharedGroupNames } from './sharedGroupNames.dom.ts'; +import { isMe } from './whatTypeOfConversation.dom.ts'; export function shouldRespondWithProfileKey( sender: ConversationModel diff --git a/ts/util/shouldShowInvalidMessageToast.preload.ts b/ts/util/shouldShowInvalidMessageToast.preload.ts index f7773ea648..81ab6e627a 100644 --- a/ts/util/shouldShowInvalidMessageToast.preload.ts +++ b/ts/util/shouldShowInvalidMessageToast.preload.ts @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import { hasExpired } from '../state/selectors/expiration.dom.js'; -import { isOSUnsupported } from '../state/selectors/updates.std.js'; +import { hasExpired } from '../state/selectors/expiration.dom.ts'; +import { isOSUnsupported } from '../state/selectors/updates.std.ts'; -import type { AnyToast } from '../types/Toast.dom.js'; -import { ToastType } from '../types/Toast.dom.js'; +import type { AnyToast } from '../types/Toast.dom.tsx'; +import { ToastType } from '../types/Toast.dom.tsx'; import { isDirectConversation, isGroupV1, isGroupV2, -} from './whatTypeOfConversation.dom.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +} from './whatTypeOfConversation.dom.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const MAX_MESSAGE_BODY_LENGTH = 64 * 1024; diff --git a/ts/util/shouldStoryReplyNotifyUser.preload.ts b/ts/util/shouldStoryReplyNotifyUser.preload.ts index b3bdc22fd2..42f79bf168 100644 --- a/ts/util/shouldStoryReplyNotifyUser.preload.ts +++ b/ts/util/shouldStoryReplyNotifyUser.preload.ts @@ -1,13 +1,13 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ConversationModel } from '../models/conversations.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; import type { ReadonlyMessageAttributesType } from '../model-types.d.ts'; -import { createLogger } from '../logging/log.std.js'; -import { DataReader } from '../sql/Client.preload.js'; -import { isGroup } from './whatTypeOfConversation.dom.js'; -import { isMessageUnread } from './isMessageUnread.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { createLogger } from '../logging/log.std.ts'; +import { DataReader } from '../sql/Client.preload.ts'; +import { isGroup } from './whatTypeOfConversation.dom.ts'; +import { isMessageUnread } from './isMessageUnread.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const log = createLogger('shouldStoryReplyNotifyUser'); diff --git a/ts/util/showConfirmationDialog.dom.tsx b/ts/util/showConfirmationDialog.dom.tsx index e81ae0b57d..5f8187d75a 100644 --- a/ts/util/showConfirmationDialog.dom.tsx +++ b/ts/util/showConfirmationDialog.dom.tsx @@ -4,11 +4,11 @@ import React, { StrictMode } from 'react'; import { createRoot, type Root } from 'react-dom/client'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { ConfirmationDialog } from '../components/ConfirmationDialog.dom.js'; +import { ConfirmationDialog } from '../components/ConfirmationDialog.dom.tsx'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { FunDefaultEnglishEmojiLocalizationProvider } from '../components/fun/FunEmojiLocalizationProvider.dom.js'; +import { FunDefaultEnglishEmojiLocalizationProvider } from '../components/fun/FunEmojiLocalizationProvider.dom.tsx'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { AxoProvider } from '../axo/AxoProvider.dom.js'; +import { AxoProvider } from '../axo/AxoProvider.dom.tsx'; type ConfirmationDialogViewProps = { onTopOfEverything?: boolean; diff --git a/ts/util/showDownloadFailedToast.dom.ts b/ts/util/showDownloadFailedToast.dom.ts index f4dd6866b1..9a26b8ef5c 100644 --- a/ts/util/showDownloadFailedToast.dom.ts +++ b/ts/util/showDownloadFailedToast.dom.ts @@ -1,9 +1,9 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { ToastType } from '../types/Toast.dom.js'; -import { SECOND } from './durations/index.std.js'; -import { isOlderThan } from './timestamp.std.js'; +import { ToastType } from '../types/Toast.dom.tsx'; +import { SECOND } from './durations/index.std.ts'; +import { isOlderThan } from './timestamp.std.ts'; const DOWNLOAD_FAILED_TIMESTAMP_REST = 10 * SECOND; diff --git a/ts/util/signalRoutes.std.ts b/ts/util/signalRoutes.std.ts index 7f3172db6c..17c8ce9e86 100644 --- a/ts/util/signalRoutes.std.ts +++ b/ts/util/signalRoutes.std.ts @@ -8,10 +8,10 @@ import 'urlpattern-polyfill'; // oxlint-disable-next-line unicorn/prefer-node-protocol import { URL as NodeURL } from 'url'; import { z } from 'zod'; -import { strictAssert } from './assert.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { parsePartial, parseUnknown, safeParseUnknown } from './schemas.std.js'; +import { strictAssert } from './assert.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { parsePartial, parseUnknown, safeParseUnknown } from './schemas.std.ts'; const log = createLogger('signalRoutes'); diff --git a/ts/util/sleeper.std.ts b/ts/util/sleeper.std.ts index 42e7c212d7..af0407c3a4 100644 --- a/ts/util/sleeper.std.ts +++ b/ts/util/sleeper.std.ts @@ -1,8 +1,8 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; const log = createLogger('sleeper'); diff --git a/ts/util/smartling.node.ts b/ts/util/smartling.node.ts index df08a5e3a3..f6fabb4db1 100644 --- a/ts/util/smartling.node.ts +++ b/ts/util/smartling.node.ts @@ -1,8 +1,8 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { packageJson } from './packageJson.node.js'; -import { getUserAgent } from './getUserAgent.node.js'; +import { packageJson } from './packageJson.node.ts'; +import { getUserAgent } from './getUserAgent.node.ts'; type AuthenticateOptionsType = Readonly<{ userIdentifier: string; diff --git a/ts/util/sniffImageMimeType.std.ts b/ts/util/sniffImageMimeType.std.ts index a8c88d3896..b79176faee 100644 --- a/ts/util/sniffImageMimeType.std.ts +++ b/ts/util/sniffImageMimeType.std.ts @@ -1,7 +1,7 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { MIMEType } from '../types/MIME.std.js'; +import type { MIMEType } from '../types/MIME.std.ts'; import { IMAGE_BMP, IMAGE_GIF, @@ -9,7 +9,7 @@ import { IMAGE_JPEG, IMAGE_PNG, IMAGE_WEBP, -} from '../types/MIME.std.js'; +} from '../types/MIME.std.ts'; /** * This follows the [MIME Sniffing Standard for images][0]. diff --git a/ts/util/startConversation.dom.ts b/ts/util/startConversation.dom.ts index a07a123474..ae3f6d1a8a 100644 --- a/ts/util/startConversation.dom.ts +++ b/ts/util/startConversation.dom.ts @@ -1,8 +1,8 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { strictAssert } from './assert.std.js'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { strictAssert } from './assert.std.ts'; export function startConversation( e164: string, diff --git a/ts/util/stories.preload.ts b/ts/util/stories.preload.ts index e698145f78..4adc351c6b 100644 --- a/ts/util/stories.preload.ts +++ b/ts/util/stories.preload.ts @@ -1,7 +1,7 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { itemStorage } from '../textsecure/Storage.preload.js'; -import { onHasStoriesDisabledChange } from '../textsecure/WebAPI.preload.js'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; +import { onHasStoriesDisabledChange } from '../textsecure/WebAPI.preload.ts'; export const getStoriesDisabled = (): boolean => itemStorage.get('hasStoriesDisabled', false); diff --git a/ts/util/subscriptionConfiguration.preload.ts b/ts/util/subscriptionConfiguration.preload.ts index b027d31783..d5eae837b2 100644 --- a/ts/util/subscriptionConfiguration.preload.ts +++ b/ts/util/subscriptionConfiguration.preload.ts @@ -2,16 +2,16 @@ // SPDX-License-Identifier: AGPL-3.0-only import { pickBy } from 'lodash'; -import type { SubscriptionConfigurationResultType } from '../textsecure/WebAPI.preload.js'; -import { getSubscriptionConfiguration } from '../textsecure/WebAPI.preload.js'; +import type { SubscriptionConfigurationResultType } from '../textsecure/WebAPI.preload.ts'; +import { getSubscriptionConfiguration } from '../textsecure/WebAPI.preload.ts'; import { PaymentMethod, type OneTimeDonationHumanAmounts, -} from '../types/Donations.std.js'; -import { HOUR } from './durations/index.std.js'; -import { isInPast } from './timestamp.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { TaskDeduplicator } from './TaskDeduplicator.std.js'; +} from '../types/Donations.std.ts'; +import { HOUR } from './durations/index.std.ts'; +import { isInPast } from './timestamp.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { TaskDeduplicator } from './TaskDeduplicator.std.ts'; const log = createLogger('subscriptionConfiguration'); diff --git a/ts/util/syncIdentifiers.preload.ts b/ts/util/syncIdentifiers.preload.ts index e1ba12ec87..cc0828e5de 100644 --- a/ts/util/syncIdentifiers.preload.ts +++ b/ts/util/syncIdentifiers.preload.ts @@ -4,26 +4,26 @@ import type { ConversationIdentifier, AddressableMessage, -} from '../textsecure/messageReceiverEvents.std.js'; +} from '../textsecure/messageReceiverEvents.std.ts'; import type { ConversationAttributesType, ReadonlyMessageAttributesType, MessageAttributesType, } from '../model-types.d.ts'; -import type { AciString, PniString } from '../types/ServiceId.std.js'; -import { isPniString } from '../types/ServiceId.std.js'; -import { getAuthor } from '../messages/sources.preload.js'; -import { createLogger } from '../logging/log.std.js'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import { DataReader } from '../sql/Client.preload.js'; +import type { AciString, PniString } from '../types/ServiceId.std.ts'; +import { isPniString } from '../types/ServiceId.std.ts'; +import { getAuthor } from '../messages/sources.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import { DataReader } from '../sql/Client.preload.ts'; import { getConversationIdForLogging, getMessageIdForLogging, -} from './idForLogging.preload.js'; -import { isGroup, isGroupV2 } from './whatTypeOfConversation.dom.js'; -import { getMessageSentTimestampSet } from './getMessageSentTimestampSet.std.js'; -import { isAciString } from './isAciString.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; +} from './idForLogging.preload.ts'; +import { isGroup, isGroupV2 } from './whatTypeOfConversation.dom.ts'; +import { getMessageSentTimestampSet } from './getMessageSentTimestampSet.std.ts'; +import { isAciString } from './isAciString.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; const log = createLogger('syncIdentifiers'); diff --git a/ts/util/syncTasks.preload.ts b/ts/util/syncTasks.preload.ts index 5df2c1abfe..4abbfdfe8b 100644 --- a/ts/util/syncTasks.preload.ts +++ b/ts/util/syncTasks.preload.ts @@ -4,34 +4,34 @@ import { z } from 'zod'; import type { ZodSchema } from 'zod'; -import { drop } from './drop.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as DeletesForMe from '../messageModifiers/DeletesForMe.preload.js'; +import { drop } from './drop.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as DeletesForMe from '../messageModifiers/DeletesForMe.preload.ts'; import { deleteMessageSchema, deleteConversationSchema, deleteLocalConversationSchema, deleteAttachmentSchema, -} from '../textsecure/messageReceiverEvents.std.js'; +} from '../textsecure/messageReceiverEvents.std.ts'; import { receiptSyncTaskSchema, onReceipt, -} from '../messageModifiers/MessageReceipts.preload.js'; +} from '../messageModifiers/MessageReceipts.preload.ts'; import { deleteConversation, deleteLocalOnlyConversation, -} from './deleteForMe.preload.js'; -import { getConversationFromTarget } from './syncIdentifiers.preload.js'; +} from './deleteForMe.preload.ts'; +import { getConversationFromTarget } from './syncIdentifiers.preload.ts'; import { onSync as onReadSync, readSyncTaskSchema, -} from '../messageModifiers/ReadSyncs.preload.js'; +} from '../messageModifiers/ReadSyncs.preload.ts'; import { onSync as onViewSync, viewSyncTaskSchema, -} from '../messageModifiers/ViewSyncs.preload.js'; -import { safeParseUnknown } from './schemas.std.js'; -import { DataWriter } from '../sql/Client.preload.js'; +} from '../messageModifiers/ViewSyncs.preload.ts'; +import { safeParseUnknown } from './schemas.std.ts'; +import { DataWriter } from '../sql/Client.preload.ts'; const log = createLogger('syncTasks'); diff --git a/ts/util/theme.std.ts b/ts/util/theme.std.ts index 87b1db79cd..003c6e5d77 100644 --- a/ts/util/theme.std.ts +++ b/ts/util/theme.std.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import { z } from 'zod'; -import { missingCaseError } from './missingCaseError.std.js'; -import { ThemeType } from '../types/Util.std.js'; +import { missingCaseError } from './missingCaseError.std.ts'; +import { ThemeType } from '../types/Util.std.ts'; export enum Theme { Light, diff --git a/ts/util/timeAndLogIfTooLong.std.ts b/ts/util/timeAndLogIfTooLong.std.ts index 66424dcf2f..57765b01d0 100644 --- a/ts/util/timeAndLogIfTooLong.std.ts +++ b/ts/util/timeAndLogIfTooLong.std.ts @@ -1,7 +1,7 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; const log = createLogger('timeAndLogIfTooLong'); diff --git a/ts/util/timelineUtil.std.ts b/ts/util/timelineUtil.std.ts index a842318064..a210b47c82 100644 --- a/ts/util/timelineUtil.std.ts +++ b/ts/util/timelineUtil.std.ts @@ -2,17 +2,17 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import type { PropsType as TimelinePropsType } from '../components/conversation/Timeline.dom.js'; +import type { PropsType as TimelinePropsType } from '../components/conversation/Timeline.dom.tsx'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import type { TimelineItemType } from '../components/conversation/TimelineItem.dom.js'; +import type { TimelineItemType } from '../components/conversation/TimelineItem.dom.tsx'; // oxlint-disable-next-line signal-desktop/no-restricted-paths -import { WidthBreakpoint } from '../components/_util.std.js'; -import { toLogFormat } from '../types/errors.std.js'; -import { MINUTE } from './durations/index.std.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import { isSameDay } from './timestamp.std.js'; +import { WidthBreakpoint } from '../components/_util.std.ts'; +import { toLogFormat } from '../types/errors.std.ts'; +import { MINUTE } from './durations/index.std.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import { isSameDay } from './timestamp.std.ts'; import type { LastMessageStatus } from '../model-types.d.ts'; const { isNumber } = lodash; diff --git a/ts/util/timeout.std.ts b/ts/util/timeout.std.ts index 6a9131b2f7..4a66c3ef5c 100644 --- a/ts/util/timeout.std.ts +++ b/ts/util/timeout.std.ts @@ -1,6 +1,6 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; const logging = createLogger('timeout'); diff --git a/ts/util/timestamp.std.ts b/ts/util/timestamp.std.ts index f624d73b1e..96e3837091 100644 --- a/ts/util/timestamp.std.ts +++ b/ts/util/timestamp.std.ts @@ -3,7 +3,7 @@ import type { Moment } from 'moment'; import moment from 'moment'; -import { DAY } from './durations/index.std.js'; +import { DAY } from './durations/index.std.ts'; export type RawTimestamp = Readonly; diff --git a/ts/util/timestampLongUtils.std.ts b/ts/util/timestampLongUtils.std.ts index c877e13fec..328c265881 100644 --- a/ts/util/timestampLongUtils.std.ts +++ b/ts/util/timestampLongUtils.std.ts @@ -1,8 +1,8 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { MAX_SAFE_DATE } from './timestamp.std.js'; -import { toNumber } from './toNumber.std.js'; +import { MAX_SAFE_DATE } from './timestamp.std.ts'; +import { toNumber } from './toNumber.std.ts'; export function getSafeLongFromTimestamp( timestamp = 0, diff --git a/ts/util/trimPadding.node.ts b/ts/util/trimPadding.node.ts index 9fe911b3bd..502ccda7de 100644 --- a/ts/util/trimPadding.node.ts +++ b/ts/util/trimPadding.node.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { Transform } from 'node:stream'; -import { strictAssert } from './assert.std.js'; +import { strictAssert } from './assert.std.ts'; /** * Truncates the stream to the target size and analyzes padding type. diff --git a/ts/util/truncateString.std.ts b/ts/util/truncateString.std.ts index 9db81209d9..14e04237f6 100644 --- a/ts/util/truncateString.std.ts +++ b/ts/util/truncateString.std.ts @@ -1,8 +1,8 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { count, truncateAndSize } from './grapheme.std.js'; -import { isBodyTooLong, trimBody } from './longAttachment.std.js'; +import { count, truncateAndSize } from './grapheme.std.ts'; +import { isBodyTooLong, trimBody } from './longAttachment.std.ts'; export function truncateString( target: string, diff --git a/ts/util/unicodeBidi.std.ts b/ts/util/unicodeBidi.std.ts index a3ae9e1220..c86182f6ec 100644 --- a/ts/util/unicodeBidi.std.ts +++ b/ts/util/unicodeBidi.std.ts @@ -1,7 +1,7 @@ // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { isTestOrMockEnvironment } from '../environment.std.js'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; /** * Left-to-Right Isolate diff --git a/ts/util/universalExpireTimer.preload.ts b/ts/util/universalExpireTimer.preload.ts index 7087b09f1b..4256f22f4d 100644 --- a/ts/util/universalExpireTimer.preload.ts +++ b/ts/util/universalExpireTimer.preload.ts @@ -1,9 +1,9 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { DurationInSeconds } from './durations/index.std.js'; -import type { ItemsStateType } from '../state/ducks/items.preload.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import { DurationInSeconds } from './durations/index.std.ts'; +import type { ItemsStateType } from '../state/ducks/items.preload.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; export const ITEM_NAME = 'universalExpireTimer'; diff --git a/ts/util/updateBackupMediaDownloadProgress.preload.ts b/ts/util/updateBackupMediaDownloadProgress.preload.ts index 827cf84b02..05a2596fae 100644 --- a/ts/util/updateBackupMediaDownloadProgress.preload.ts +++ b/ts/util/updateBackupMediaDownloadProgress.preload.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import type { BackupAttachmentDownloadProgress } from '../sql/Interface.std.js'; -import { itemStorage } from '../textsecure/Storage.preload.js'; +import type { BackupAttachmentDownloadProgress } from '../sql/Interface.std.ts'; +import { itemStorage } from '../textsecure/Storage.preload.ts'; const { throttle } = lodash; diff --git a/ts/util/uploadAttachment.preload.ts b/ts/util/uploadAttachment.preload.ts index 06f8417362..240ba3b373 100644 --- a/ts/util/uploadAttachment.preload.ts +++ b/ts/util/uploadAttachment.preload.ts @@ -5,40 +5,40 @@ import type { AttachmentType, AttachmentWithHydratedData, UploadedAttachmentType, -} from '../types/Attachment.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { MIMETypeToString, supportsIncrementalMac } from '../types/MIME.std.js'; -import { getRandomBytes } from '../Crypto.node.js'; -import { backupsService } from '../services/backups/index.preload.js'; -import { tusUpload } from './uploads/tusProtocol.node.js'; -import { defaultFileReader } from './uploads/uploads.node.js'; +} from '../types/Attachment.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { MIMETypeToString, supportsIncrementalMac } from '../types/MIME.std.ts'; +import { getRandomBytes } from '../Crypto.node.ts'; +import { backupsService } from '../services/backups/index.preload.ts'; +import { tusUpload } from './uploads/tusProtocol.node.ts'; +import { defaultFileReader } from './uploads/uploads.node.ts'; import { type AttachmentUploadFormResponseType, getAttachmentUploadForm, createFetchForAttachmentUpload, putEncryptedAttachment, -} from '../textsecure/WebAPI.preload.js'; +} from '../textsecure/WebAPI.preload.ts'; import { type EncryptedAttachmentV2, encryptAttachmentV2ToDisk, safeUnlink, type PlaintextSourceType, -} from '../AttachmentCrypto.node.js'; -import { missingCaseError } from './missingCaseError.std.js'; -import { uuidToBytes } from './uuidToBytes.std.js'; -import { DAY, HOUR } from './durations/index.std.js'; -import { isImageAttachment, isVideoAttachment } from './Attachment.std.js'; -import { getAbsoluteAttachmentPath } from './migrations.preload.js'; -import { isMoreRecentThan } from './timestamp.std.js'; -import { DataReader } from '../sql/Client.preload.js'; +} from '../AttachmentCrypto.node.ts'; +import { missingCaseError } from './missingCaseError.std.ts'; +import { uuidToBytes } from './uuidToBytes.std.ts'; +import { DAY, HOUR } from './durations/index.std.ts'; +import { isImageAttachment, isVideoAttachment } from './Attachment.std.ts'; +import { getAbsoluteAttachmentPath } from './migrations.preload.ts'; +import { isMoreRecentThan } from './timestamp.std.ts'; +import { DataReader } from '../sql/Client.preload.ts'; import { isValidAttachmentKey, isValidDigest, isValidPlaintextHash, -} from '../types/Crypto.std.js'; -import type { ExistingAttachmentUploadData } from '../sql/Interface.std.js'; -import { assertDev } from './assert.std.js'; +} from '../types/Crypto.std.ts'; +import type { ExistingAttachmentUploadData } from '../sql/Interface.std.ts'; +import { assertDev } from './assert.std.ts'; const CDNS_SUPPORTING_TUS = new Set([3]); const MAX_DURATION_TO_REUSE_ATTACHMENT_CDN_POINTER = 3 * DAY; diff --git a/ts/util/uploads/tusProtocol.node.ts b/ts/util/uploads/tusProtocol.node.ts index 2e3556bd3e..54395eb73b 100644 --- a/ts/util/uploads/tusProtocol.node.ts +++ b/ts/util/uploads/tusProtocol.node.ts @@ -3,12 +3,12 @@ import { type Readable } from 'node:stream'; import fetch, { type RequestInit, type Response } from 'node-fetch'; -import { HTTPError } from '../../types/HTTPError.std.js'; -import { createLogger } from '../../logging/log.std.js'; -import * as Errors from '../../types/errors.std.js'; -import { sleep } from '../sleep.std.js'; -import { FIBONACCI_TIMEOUTS, BackOff } from '../BackOff.std.js'; -import { MINUTE } from '../durations/constants.std.js'; +import { HTTPError } from '../../types/HTTPError.std.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import * as Errors from '../../types/errors.std.ts'; +import { sleep } from '../sleep.std.ts'; +import { FIBONACCI_TIMEOUTS, BackOff } from '../BackOff.std.ts'; +import { MINUTE } from '../durations/constants.std.ts'; const log = createLogger('tusProtocol'); diff --git a/ts/util/uploads/uploads.node.ts b/ts/util/uploads/uploads.node.ts index 5c171cddf4..f978006417 100644 --- a/ts/util/uploads/uploads.node.ts +++ b/ts/util/uploads/uploads.node.ts @@ -3,9 +3,9 @@ import fetch from 'node-fetch'; import { createReadStream, createWriteStream } from 'node:fs'; import { pipeline } from 'node:stream/promises'; -import type { TusFileReader, FetchFunctionType } from './tusProtocol.node.js'; -import { tusResumeUpload, tusUpload } from './tusProtocol.node.js'; -import { HTTPError } from '../../types/HTTPError.std.js'; +import type { TusFileReader, FetchFunctionType } from './tusProtocol.node.ts'; +import { tusResumeUpload, tusUpload } from './tusProtocol.node.ts'; +import { HTTPError } from '../../types/HTTPError.std.ts'; export const defaultFileReader: TusFileReader = (filePath, offset) => { return createReadStream(filePath, { start: offset }); diff --git a/ts/util/uuidToBytes.std.ts b/ts/util/uuidToBytes.std.ts index 527164eb35..37bbcc707a 100644 --- a/ts/util/uuidToBytes.std.ts +++ b/ts/util/uuidToBytes.std.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import lodash from 'lodash'; -import { UUID_BYTE_SIZE } from '../types/Crypto.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Bytes from '../Bytes.std.js'; +import { UUID_BYTE_SIZE } from '../types/Crypto.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Bytes from '../Bytes.std.ts'; const { chunk } = lodash; diff --git a/ts/util/validateConversation.dom.ts b/ts/util/validateConversation.dom.ts index 2140b6007c..f2ae1df20c 100644 --- a/ts/util/validateConversation.dom.ts +++ b/ts/util/validateConversation.dom.ts @@ -6,8 +6,8 @@ import { isDirectConversation, isGroupV1, isGroupV2, -} from './whatTypeOfConversation.dom.js'; -import { isServiceIdString } from '../types/ServiceId.std.js'; +} from './whatTypeOfConversation.dom.ts'; +import { isServiceIdString } from '../types/ServiceId.std.ts'; export function validateConversation( attributes: ValidateConversationType diff --git a/ts/util/verifyStoryListMembers.preload.ts b/ts/util/verifyStoryListMembers.preload.ts index c94b0b7270..dbd422e24a 100644 --- a/ts/util/verifyStoryListMembers.preload.ts +++ b/ts/util/verifyStoryListMembers.preload.ts @@ -1,13 +1,13 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; -import { isNotNil } from './isNotNil.std.js'; -import { updateIdentityKey } from '../services/profiles.preload.js'; -import type { ServiceIdString } from '../types/ServiceId.std.js'; -import { signalProtocolStore } from '../SignalProtocolStore.preload.js'; -import { postBatchIdentityCheck } from '../textsecure/WebAPI.preload.js'; -import * as Bytes from '../Bytes.std.js'; +import { createLogger } from '../logging/log.std.ts'; +import { isNotNil } from './isNotNil.std.ts'; +import { updateIdentityKey } from '../services/profiles.preload.ts'; +import type { ServiceIdString } from '../types/ServiceId.std.ts'; +import { signalProtocolStore } from '../SignalProtocolStore.preload.ts'; +import { postBatchIdentityCheck } from '../textsecure/WebAPI.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; const log = createLogger('verifyStoryListMembers'); diff --git a/ts/util/viewOnceEligibility.std.ts b/ts/util/viewOnceEligibility.std.ts index 891c5d646e..699e01135a 100644 --- a/ts/util/viewOnceEligibility.std.ts +++ b/ts/util/viewOnceEligibility.std.ts @@ -1,8 +1,8 @@ // Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import type { AttachmentDraftType } from '../types/Attachment.std.js'; -import { isImageAttachment, isVideoAttachment } from './Attachment.std.js'; +import type { AttachmentDraftType } from '../types/Attachment.std.ts'; +import { isImageAttachment, isVideoAttachment } from './Attachment.std.ts'; export function isViewOnceEligible( attachments: ReadonlyArray, diff --git a/ts/util/waitBatcher.std.ts b/ts/util/waitBatcher.std.ts index efc23c3183..700e579943 100644 --- a/ts/util/waitBatcher.std.ts +++ b/ts/util/waitBatcher.std.ts @@ -3,13 +3,13 @@ import PQueue from 'p-queue'; -import { sleep } from './sleep.std.js'; -import { createLogger } from '../logging/log.std.js'; -import * as Errors from '../types/errors.std.js'; -import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.js'; -import { MINUTE } from './durations/index.std.js'; -import { drop } from './drop.std.js'; -import { explodePromise } from './explodePromise.std.js'; +import { sleep } from './sleep.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import * as Errors from '../types/errors.std.ts'; +import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.ts'; +import { MINUTE } from './durations/index.std.ts'; +import { drop } from './drop.std.ts'; +import { explodePromise } from './explodePromise.std.ts'; const log = createLogger('waitBatcher'); diff --git a/ts/util/waitForAll.std.ts b/ts/util/waitForAll.std.ts index 7e965d9ef1..ca2c5ae64b 100644 --- a/ts/util/waitForAll.std.ts +++ b/ts/util/waitForAll.std.ts @@ -3,7 +3,7 @@ import PQueue from 'p-queue'; -import { MINUTE } from './durations/index.std.js'; +import { MINUTE } from './durations/index.std.ts'; const MAX_CONCURRENCY = 5; diff --git a/ts/util/waitForOnline.dom.ts b/ts/util/waitForOnline.dom.ts index 47b4de0cda..99dfaa867f 100644 --- a/ts/util/waitForOnline.dom.ts +++ b/ts/util/waitForOnline.dom.ts @@ -1,7 +1,7 @@ // Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.js'; +import { clearTimeoutIfNecessary } from './clearTimeoutIfNecessary.std.ts'; export type WaitForOnlineOptionsType = Readonly<{ server: Readonly<{ isOnline: () => boolean | undefined }>; diff --git a/ts/util/whatTypeOfConversation.dom.ts b/ts/util/whatTypeOfConversation.dom.ts index 80dec1f985..db72509700 100644 --- a/ts/util/whatTypeOfConversation.dom.ts +++ b/ts/util/whatTypeOfConversation.dom.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ConversationAttributesType } from '../model-types.d.ts'; -import type { ConversationType } from '../state/ducks/conversations.preload.js'; -import * as Bytes from '../Bytes.std.js'; -import { createLogger } from '../logging/log.std.js'; -import { ID_V1_LENGTH, ID_LENGTH } from '../types/groups.std.js'; +import type { ConversationType } from '../state/ducks/conversations.preload.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { createLogger } from '../logging/log.std.ts'; +import { ID_V1_LENGTH, ID_LENGTH } from '../types/groups.std.ts'; const log = createLogger('whatTypeOfConversation'); diff --git a/ts/util/windowsZoneIdentifier.node.ts b/ts/util/windowsZoneIdentifier.node.ts index b6bb4c4479..19ba7db8d7 100644 --- a/ts/util/windowsZoneIdentifier.node.ts +++ b/ts/util/windowsZoneIdentifier.node.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import * as fs from 'node:fs'; -import OS from './os/osMain.node.js'; +import OS from './os/osMain.node.ts'; const ZONE_IDENTIFIER_CONTENTS = Buffer.from('[ZoneTransfer]\r\nZoneId=3'); diff --git a/ts/util/wrapWithSyncMessageSend.preload.ts b/ts/util/wrapWithSyncMessageSend.preload.ts index d19ac6cdb0..bad9a11d5a 100644 --- a/ts/util/wrapWithSyncMessageSend.preload.ts +++ b/ts/util/wrapWithSyncMessageSend.preload.ts @@ -1,20 +1,20 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../logging/log.std.js'; +import { createLogger } from '../logging/log.std.ts'; -import { SendMessageProtoError } from '../textsecure/Errors.std.js'; -import { getSendOptions } from './getSendOptions.preload.js'; -import { handleMessageSend } from './handleMessageSend.preload.js'; +import { SendMessageProtoError } from '../textsecure/Errors.std.ts'; +import { getSendOptions } from './getSendOptions.preload.ts'; +import { handleMessageSend } from './handleMessageSend.preload.ts'; import type { CallbackResultType } from '../textsecure/Types.d.ts'; -import type { ConversationModel } from '../models/conversations.preload.js'; -import type { SendTypesType } from './handleMessageSend.preload.js'; +import type { ConversationModel } from '../models/conversations.preload.ts'; +import type { SendTypesType } from './handleMessageSend.preload.ts'; import { type MessageSender, messageSender, -} from '../textsecure/SendMessage.preload.js'; -import { areAllErrorsUnregistered } from '../jobs/helpers/areAllErrorsUnregistered.dom.js'; +} from '../textsecure/SendMessage.preload.ts'; +import { areAllErrorsUnregistered } from '../jobs/helpers/areAllErrorsUnregistered.dom.ts'; const log = createLogger('wrapWithSyncMessageSend'); diff --git a/ts/util/writeDraftAttachment.preload.ts b/ts/util/writeDraftAttachment.preload.ts index d7b5e330c7..58a0a33dad 100644 --- a/ts/util/writeDraftAttachment.preload.ts +++ b/ts/util/writeDraftAttachment.preload.ts @@ -5,17 +5,17 @@ import lodash from 'lodash'; import type { InMemoryAttachmentDraftType, AttachmentDraftType, -} from '../types/Attachment.std.js'; -import { isImageAttachment } from './Attachment.std.js'; -import { getImageDimensions } from '../types/VisualAttachment.dom.js'; -import { IMAGE_PNG } from '../types/MIME.std.js'; -import * as Errors from '../types/errors.std.js'; +} from '../types/Attachment.std.ts'; +import { isImageAttachment } from './Attachment.std.ts'; +import { getImageDimensions } from '../types/VisualAttachment.dom.ts'; +import { IMAGE_PNG } from '../types/MIME.std.ts'; +import * as Errors from '../types/errors.std.ts'; import { getLocalAttachmentUrl, AttachmentDisposition, -} from './getLocalAttachmentUrl.std.js'; -import { writeNewDraftData } from './migrations.preload.js'; -import { createLogger } from '../logging/log.std.js'; +} from './getLocalAttachmentUrl.std.ts'; +import { writeNewDraftData } from './migrations.preload.ts'; +import { createLogger } from '../logging/log.std.ts'; const { omit } = lodash; diff --git a/ts/util/zkgroup.node.ts b/ts/util/zkgroup.node.ts index 15e26ad762..ed4ca2f2e0 100644 --- a/ts/util/zkgroup.node.ts +++ b/ts/util/zkgroup.node.ts @@ -23,15 +23,15 @@ import type { ServiceIdString, AciString, PniString, -} from '../types/ServiceId.std.js'; +} from '../types/ServiceId.std.ts'; import { fromServiceIdObject, fromAciObject, fromPniObject, -} from '../types/ServiceId.std.js'; -import * as Bytes from '../Bytes.std.js'; -import { toServiceIdObject } from './ServiceId.node.js'; -import { strictAssert } from './assert.std.js'; +} from '../types/ServiceId.std.ts'; +import * as Bytes from '../Bytes.std.ts'; +import { toServiceIdObject } from './ServiceId.node.ts'; +import { strictAssert } from './assert.std.ts'; // oxlint-disable-next-line no-barrel-file export * from '@signalapp/libsignal-client/zkgroup.js'; diff --git a/ts/utils/getAvatarPlaceholderGradient.std.ts b/ts/utils/getAvatarPlaceholderGradient.std.ts index 2a15b50683..cbe98bb26d 100644 --- a/ts/utils/getAvatarPlaceholderGradient.std.ts +++ b/ts/utils/getAvatarPlaceholderGradient.std.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { AxoTokens } from '../axo/AxoTokens.std.js'; +import { AxoTokens } from '../axo/AxoTokens.std.ts'; export function getAvatarPlaceholderGradient( identifierHash: number diff --git a/ts/window.d.ts b/ts/window.d.ts index 413dc3f35e..07295666da 100644 --- a/ts/window.d.ts +++ b/ts/window.d.ts @@ -9,21 +9,21 @@ import type { SystemPreferences } from 'electron'; import type { assert } from 'chai'; import type { MochaOptions } from 'mocha'; -import type { IPCRequest as IPCChallengeRequest } from './challenge.dom.js'; -import type { OSType } from './util/os/shared.std.js'; -import type { SystemThemeType, ThemeType } from './types/Util.std.js'; -import type { ConversationController } from './ConversationController.preload.js'; -import type { ReduxActions } from './state/types.std.js'; -import type { ScreenShareStatus } from './types/Calling.std.js'; -import type { MessageCache } from './services/MessageCache.preload.js'; -import type { StateType } from './state/reducer.preload.js'; -import type { CIType } from './CI.preload.js'; -import type { IPCEventsType } from './util/createIPCEvents.preload.js'; -import type { SignalContextType } from './windows/context.preload.js'; -import type { PropsPreloadType as PreferencesPropsType } from './components/Preferences.dom.js'; -import type { WindowsNotificationData } from './services/notifications.preload.js'; -import type { QueryStatsOptions } from './sql/main.main.js'; -import type { SocketStatuses } from './textsecure/SocketManager.preload.js'; +import type { IPCRequest as IPCChallengeRequest } from './challenge.dom.ts'; +import type { OSType } from './util/os/shared.std.ts'; +import type { SystemThemeType, ThemeType } from './types/Util.std.ts'; +import type { ConversationController } from './ConversationController.preload.ts'; +import type { ReduxActions } from './state/types.std.ts'; +import type { ScreenShareStatus } from './types/Calling.std.ts'; +import type { MessageCache } from './services/MessageCache.preload.ts'; +import type { StateType } from './state/reducer.preload.ts'; +import type { CIType } from './CI.preload.ts'; +import type { IPCEventsType } from './util/createIPCEvents.preload.ts'; +import type { SignalContextType } from './windows/context.preload.ts'; +import type { PropsPreloadType as PreferencesPropsType } from './components/Preferences.dom.tsx'; +import type { WindowsNotificationData } from './services/notifications.preload.ts'; +import type { QueryStatsOptions } from './sql/main.main.ts'; +import type { SocketStatuses } from './textsecure/SocketManager.preload.ts'; export type IPCType = { addSetupMenuItems: () => void; diff --git a/ts/windows/about/app.dom.tsx b/ts/windows/about/app.dom.tsx index b89ba92738..dfedda0f08 100644 --- a/ts/windows/about/app.dom.tsx +++ b/ts/windows/about/app.dom.tsx @@ -4,11 +4,11 @@ import React, { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; -import '../sandboxedInit.dom.js'; -import { About } from '../../components/About.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.js'; -import { AxoProvider } from '../../axo/AxoProvider.dom.js'; +import '../sandboxedInit.dom.ts'; +import { About } from '../../components/About.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.tsx'; +import { AxoProvider } from '../../axo/AxoProvider.dom.tsx'; const { AboutWindowProps } = window.Signal; const { i18n } = window.SignalContext; diff --git a/ts/windows/about/preload.preload.ts b/ts/windows/about/preload.preload.ts index 830de81589..07fd82631c 100644 --- a/ts/windows/about/preload.preload.ts +++ b/ts/windows/about/preload.preload.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { contextBridge } from 'electron'; -import { MinimalSignalContext } from '../minimalContext.preload.js'; -import { config } from '../../context/config.preload.js'; -import { environment } from '../../context/environment.preload.js'; +import { MinimalSignalContext } from '../minimalContext.preload.ts'; +import { config } from '../../context/config.preload.ts'; +import { environment } from '../../context/environment.preload.ts'; const environments: Array = [environment]; diff --git a/ts/windows/calldiagnostic/app.dom.tsx b/ts/windows/calldiagnostic/app.dom.tsx index d564b13dd2..ed9bec3e26 100644 --- a/ts/windows/calldiagnostic/app.dom.tsx +++ b/ts/windows/calldiagnostic/app.dom.tsx @@ -3,11 +3,11 @@ import React, { StrictMode, useSyncExternalStore } from 'react'; import { createRoot } from 'react-dom/client'; -import '../sandboxedInit.dom.js'; -import { CallDiagnosticWindow } from '../../components/CallDiagnosticWindow.dom.js'; -import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { AxoProvider } from '../../axo/AxoProvider.dom.js'; +import '../sandboxedInit.dom.ts'; +import { CallDiagnosticWindow } from '../../components/CallDiagnosticWindow.dom.tsx'; +import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import { AxoProvider } from '../../axo/AxoProvider.dom.tsx'; const { CallDiagnosticWindowProps } = window.Signal; strictAssert(CallDiagnosticWindowProps, 'window values not provided'); diff --git a/ts/windows/calldiagnostic/preload.preload.ts b/ts/windows/calldiagnostic/preload.preload.ts index d7c9bd8783..b39a46a700 100644 --- a/ts/windows/calldiagnostic/preload.preload.ts +++ b/ts/windows/calldiagnostic/preload.preload.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { contextBridge, ipcRenderer } from 'electron'; -import { MinimalSignalContext } from '../minimalContext.preload.js'; +import { MinimalSignalContext } from '../minimalContext.preload.ts'; // External store for useSyncExternalStore let currentData: string | null = null; diff --git a/ts/windows/context.preload.ts b/ts/windows/context.preload.ts index cd00ce9220..3fe900e06d 100644 --- a/ts/windows/context.preload.ts +++ b/ts/windows/context.preload.ts @@ -4,25 +4,25 @@ import type { MenuItemConstructorOptions } from 'electron'; import { ipcRenderer } from 'electron'; -import type { NativeThemeType } from '../context/createNativeThemeListener.std.js'; -import type { MenuOptionsType } from '../types/menu.std.js'; -import type { RendererConfigType } from '../types/RendererConfig.std.js'; -import type { LocalizerType } from '../types/Util.std.js'; +import type { NativeThemeType } from '../context/createNativeThemeListener.std.ts'; +import type { MenuOptionsType } from '../types/menu.std.ts'; +import type { RendererConfigType } from '../types/RendererConfig.std.ts'; +import type { LocalizerType } from '../types/Util.std.ts'; import type { SettingType, SettingsValuesType, -} from '../util/preload.preload.js'; +} from '../util/preload.preload.ts'; -import { Bytes } from '../context/Bytes.std.js'; -import { Crypto } from '../context/Crypto.node.js'; -import { Timers } from '../context/Timers.node.js'; +import { Bytes } from '../context/Bytes.std.ts'; +import { Crypto } from '../context/Crypto.node.ts'; +import { Timers } from '../context/Timers.node.ts'; -import type { LocaleDirection } from '../../app/locale.node.js'; -import { i18n } from '../context/i18n.preload.js'; -import type { ActiveWindowServiceType } from '../services/ActiveWindowService.std.js'; -import type { LocaleEmojiListType } from '../types/emoji.std.js'; -import type { HourCyclePreference } from '../types/I18N.std.js'; -import { MinimalSignalContext } from './minimalContext.preload.js'; +import type { LocaleDirection } from '../../app/locale.node.ts'; +import { i18n } from '../context/i18n.preload.ts'; +import type { ActiveWindowServiceType } from '../services/ActiveWindowService.std.ts'; +import type { LocaleEmojiListType } from '../types/emoji.std.ts'; +import type { HourCyclePreference } from '../types/I18N.std.ts'; +import { MinimalSignalContext } from './minimalContext.preload.ts'; export type MainWindowStatsType = Readonly<{ isMaximized: boolean; diff --git a/ts/windows/debuglog/app.dom.tsx b/ts/windows/debuglog/app.dom.tsx index 384e2f8a66..c30c2a8dfa 100644 --- a/ts/windows/debuglog/app.dom.tsx +++ b/ts/windows/debuglog/app.dom.tsx @@ -3,11 +3,11 @@ import React, { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; -import '../sandboxedInit.dom.js'; -import { DebugLogWindow } from '../../components/DebugLogWindow.dom.js'; -import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { AxoProvider } from '../../axo/AxoProvider.dom.js'; +import '../sandboxedInit.dom.ts'; +import { DebugLogWindow } from '../../components/DebugLogWindow.dom.tsx'; +import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import { AxoProvider } from '../../axo/AxoProvider.dom.tsx'; const { DebugLogWindowProps } = window.Signal; const { i18n } = window.SignalContext; diff --git a/ts/windows/debuglog/preload.preload.ts b/ts/windows/debuglog/preload.preload.ts index e43560f94a..17c1534f63 100644 --- a/ts/windows/debuglog/preload.preload.ts +++ b/ts/windows/debuglog/preload.preload.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import { contextBridge, ipcRenderer } from 'electron'; -import { MinimalSignalContext } from '../minimalContext.preload.js'; +import { MinimalSignalContext } from '../minimalContext.preload.ts'; function downloadLog(logText: string) { ipcRenderer.send('show-debug-log-save-dialog', logText); diff --git a/ts/windows/loading/preload.preload.ts b/ts/windows/loading/preload.preload.ts index 162fdb15c1..893b135523 100644 --- a/ts/windows/loading/preload.preload.ts +++ b/ts/windows/loading/preload.preload.ts @@ -2,6 +2,6 @@ // SPDX-License-Identifier: AGPL-3.0-only import { contextBridge } from 'electron'; -import { MinimalSignalContext } from '../minimalContext.preload.js'; +import { MinimalSignalContext } from '../minimalContext.preload.ts'; contextBridge.exposeInMainWorld('SignalContext', MinimalSignalContext); diff --git a/ts/windows/loading/start.dom.ts b/ts/windows/loading/start.dom.ts index ced8c177fa..39363bad39 100644 --- a/ts/windows/loading/start.dom.ts +++ b/ts/windows/loading/start.dom.ts @@ -1,6 +1,6 @@ // Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import '../sandboxedInit.dom.js'; +import '../sandboxedInit.dom.ts'; const message = document.getElementById('message'); if (message) { diff --git a/ts/windows/main/attachments.preload.ts b/ts/windows/main/attachments.preload.ts index 0866b3651e..4573846179 100644 --- a/ts/windows/main/attachments.preload.ts +++ b/ts/windows/main/attachments.preload.ts @@ -8,20 +8,18 @@ import { existsSync } from 'node:fs'; import fse from 'fs-extra'; import { v4 as getGuid } from 'uuid'; -import { isPathInside } from '../../util/isPathInside.node.js'; -import { writeWindowsZoneIdentifier } from '../../util/windowsZoneIdentifier.node.js'; -import OS from '../../util/os/osMain.node.js'; -import { getRelativePath, createName } from '../../util/attachmentPath.node.js'; -import { toHex } from '../../Bytes.std.js'; -import { getRandomBytes } from '../../Crypto.node.js'; -import { createLogger } from '../../logging/log.std.js'; +import { isPathInside } from '../../util/isPathInside.node.ts'; +import { writeWindowsZoneIdentifier } from '../../util/windowsZoneIdentifier.node.ts'; +import OS from '../../util/os/osMain.node.ts'; +import { getRelativePath, createName } from '../../util/attachmentPath.node.ts'; +import { toHex } from '../../Bytes.std.ts'; +import { getRandomBytes } from '../../Crypto.node.ts'; +import { createLogger } from '../../logging/log.std.ts'; const { isString, isTypedArray } = lodash; const log = createLogger('attachments'); -export * from '../../../app/attachments.node.js'; - type FSAttrType = { set: (path: string, attribute: string, value: string) => Promise; }; diff --git a/ts/windows/main/phase0-devtools.node.ts b/ts/windows/main/phase0-devtools.node.ts index bf7c84df72..a66be6fb66 100644 --- a/ts/windows/main/phase0-devtools.node.ts +++ b/ts/windows/main/phase0-devtools.node.ts @@ -1,7 +1,7 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { Environment, getEnvironment } from '../../environment.std.js'; +import { Environment, getEnvironment } from '../../environment.std.ts'; if ( process.env.NODE_ENV !== 'production' && diff --git a/ts/windows/main/phase1-ipc.preload.ts b/ts/windows/main/phase1-ipc.preload.ts index 70caf37089..bfb153a3ff 100644 --- a/ts/windows/main/phase1-ipc.preload.ts +++ b/ts/windows/main/phase1-ipc.preload.ts @@ -7,32 +7,32 @@ import * as semver from 'semver'; import lodash, { throttle } from 'lodash'; import type { IPCType } from '../../window.d.ts'; -import { parseIntWithFallback } from '../../util/parseIntWithFallback.std.js'; -import { getSignalConnections } from '../../util/getSignalConnections.preload.js'; -import { ThemeType } from '../../types/Util.std.js'; -import { Environment } from '../../environment.std.js'; -import { SignalContext } from '../context.preload.js'; -import { createLogger } from '../../logging/log.std.js'; -import { formatCountForLogging } from '../../logging/formatCountForLogging.std.js'; -import * as Errors from '../../types/errors.std.js'; +import { parseIntWithFallback } from '../../util/parseIntWithFallback.std.ts'; +import { getSignalConnections } from '../../util/getSignalConnections.preload.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import { Environment } from '../../environment.std.ts'; +import { SignalContext } from '../context.preload.ts'; +import { createLogger } from '../../logging/log.std.ts'; +import { formatCountForLogging } from '../../logging/formatCountForLogging.std.ts'; +import * as Errors from '../../types/errors.std.ts'; -import { strictAssert } from '../../util/assert.std.js'; -import { drop } from '../../util/drop.std.js'; -import { explodePromise } from '../../util/explodePromise.std.js'; -import { DataReader } from '../../sql/Client.preload.js'; -import type { WindowsNotificationData } from '../../types/notifications.std.js'; +import { strictAssert } from '../../util/assert.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { explodePromise } from '../../util/explodePromise.std.ts'; +import { DataReader } from '../../sql/Client.preload.ts'; +import type { WindowsNotificationData } from '../../services/notifications.preload.ts'; import { approvePaypalPayment, cancelPaypalPayment, finish3dsValidation, -} from '../../services/donations.preload.js'; -import { AggregatedStats } from '../../textsecure/WebsocketResources.preload.js'; -import { UNAUTHENTICATED_CHANNEL_NAME } from '../../textsecure/SocketManager.preload.js'; -import { isProduction } from '../../util/version.std.js'; -import { ToastType } from '../../types/Toast.dom.js'; -import { ConversationController } from '../../ConversationController.preload.js'; -import { isEnabled } from '../../RemoteConfig.dom.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; +} from '../../services/donations.preload.ts'; +import { AggregatedStats } from '../../textsecure/WebsocketResources.preload.ts'; +import { UNAUTHENTICATED_CHANNEL_NAME } from '../../textsecure/SocketManager.preload.ts'; +import { isProduction } from '../../util/version.std.ts'; +import { ToastType } from '../../types/Toast.dom.tsx'; +import { ConversationController } from '../../ConversationController.preload.ts'; +import { isEnabled } from '../../RemoteConfig.dom.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; const { mapValues } = lodash; diff --git a/ts/windows/main/phase2-dependencies.preload.ts b/ts/windows/main/phase2-dependencies.preload.ts index 4c62677793..a9a590e6fc 100644 --- a/ts/windows/main/phase2-dependencies.preload.ts +++ b/ts/windows/main/phase2-dependencies.preload.ts @@ -4,17 +4,17 @@ import * as moment from 'moment'; import 'moment/min/locales.min.js'; -import { initialize as initializeLogging } from '../../logging/set_up_renderer_logging.preload.js'; -import { setup } from '../../signal.preload.js'; -import { addSensitivePath } from '../../util/privacy.node.js'; -import * as dns from '../../util/dns.node.js'; +import { initialize as initializeLogging } from '../../logging/set_up_renderer_logging.preload.ts'; +import { setup } from '../../signal.preload.ts'; +import { addSensitivePath } from '../../util/privacy.node.ts'; +import * as dns from '../../util/dns.node.ts'; import { ATTACHMENTS_PATH, STICKERS_PATH, DRAFT_PATH, -} from '../../util/basePaths.preload.js'; -import { SignalContext } from '../context.preload.js'; -import '../clipboard.dom.js'; +} from '../../util/basePaths.preload.ts'; +import { SignalContext } from '../context.preload.ts'; +import '../clipboard.dom.ts'; initializeLogging(); diff --git a/ts/windows/main/phase3-post-signal.preload.ts b/ts/windows/main/phase3-post-signal.preload.ts index f90ffa4b82..048c46a312 100644 --- a/ts/windows/main/phase3-post-signal.preload.ts +++ b/ts/windows/main/phase3-post-signal.preload.ts @@ -3,8 +3,8 @@ // These all need access to window.Signal: -import '../../models/messages.preload.js'; -import '../../models/conversations.preload.js'; +import '../../models/messages.preload.ts'; +import '../../models/conversations.preload.ts'; -import '../../SignalProtocolStore.preload.js'; -import '../../background.preload.js'; +import '../../SignalProtocolStore.preload.ts'; +import '../../background.preload.ts'; diff --git a/ts/windows/main/phase4-test.preload.ts b/ts/windows/main/phase4-test.preload.ts index 204109c278..de65e6c338 100644 --- a/ts/windows/main/phase4-test.preload.ts +++ b/ts/windows/main/phase4-test.preload.ts @@ -9,7 +9,7 @@ if (config.environment === 'test') { // oxlint-disable-next-line no-console console.log('Importing test infrastructure...'); // oxlint-disable-next-line node/global-require - require('./preload_test.preload.js'); + require('./preload_test.preload.ts'); } if (config.ciMode) { diff --git a/ts/windows/main/preload.preload.ts b/ts/windows/main/preload.preload.ts index b302180a40..dba4d4cf40 100644 --- a/ts/windows/main/preload.preload.ts +++ b/ts/windows/main/preload.preload.ts @@ -1,7 +1,7 @@ // Copyright 2017 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { createLogger } from '../../logging/log.std.js'; +import { createLogger } from '../../logging/log.std.ts'; const log = createLogger('preload'); @@ -9,7 +9,7 @@ window.preloadStartTime = Date.now(); try { // oxlint-disable-next-line node/global-require - require('./start.preload.js'); + require('./start.preload.ts'); } catch (error) { // oxlint-disable-next-line no-console console.log('preload error!', error.stack); diff --git a/ts/windows/main/preload_test.preload.ts b/ts/windows/main/preload_test.preload.ts index 00324908fc..f6f49cad32 100644 --- a/ts/windows/main/preload_test.preload.ts +++ b/ts/windows/main/preload_test.preload.ts @@ -9,13 +9,13 @@ import chai, { assert, config as chaiConfig } from 'chai'; import chaiAsPromised from 'chai-as-promised'; import { reporters, type MochaOptions } from 'mocha'; -import { initializeMessageCounter } from '../../util/incrementMessageCounter.preload.js'; -import { initializeRedux } from '../../state/initializeRedux.preload.js'; -import * as Stickers from '../../types/Stickers.preload.js'; -import { ThemeType } from '../../types/Util.std.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { MessageCache } from '../../services/MessageCache.preload.js'; -import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.js'; +import { initializeMessageCounter } from '../../util/incrementMessageCounter.preload.ts'; +import { initializeRedux } from '../../state/initializeRedux.preload.ts'; +import * as Stickers from '../../types/Stickers.preload.ts'; +import { ThemeType } from '../../types/Util.std.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { MessageCache } from '../../services/MessageCache.preload.ts'; +import { updateRemoteConfig } from '../../test-helpers/RemoteConfigStub.dom.ts'; chai.use(chaiAsPromised); @@ -151,7 +151,7 @@ window.testUtilities = { prepareTests() { // oxlint-disable-next-line no-console console.log('Preparing tests...'); - const files = sync('../../test-{both,electron}/**/*_test.*.js', { + const files = sync('../../test-{both,electron}/**/*_test.*.ts', { absolute: true, cwd: __dirname, }); diff --git a/ts/windows/main/start.preload.ts b/ts/windows/main/start.preload.ts index 39bcab2342..e5bbd271f6 100644 --- a/ts/windows/main/start.preload.ts +++ b/ts/windows/main/start.preload.ts @@ -5,34 +5,34 @@ import { fabric } from 'fabric'; import lodash from 'lodash'; import { contextBridge } from 'electron'; -import { createLogger } from '../../logging/log.std.js'; +import { createLogger } from '../../logging/log.std.ts'; -import '../context.preload.js'; +import '../context.preload.ts'; // Connect websocket early -import '../../textsecure/preconnect.preload.js'; +import '../../textsecure/preconnect.preload.ts'; -import './phase0-devtools.node.js'; -import './phase1-ipc.preload.js'; -import '../preload.preload.js'; -import './phase2-dependencies.preload.js'; -import './phase3-post-signal.preload.js'; -import './phase4-test.preload.js'; +import './phase0-devtools.node.ts'; +import './phase1-ipc.preload.ts'; +import '../preload.preload.ts'; +import './phase2-dependencies.preload.ts'; +import './phase3-post-signal.preload.ts'; +import './phase4-test.preload.ts'; import type { CdsLookupOptionsType, GetIceServersResultType, -} from '../../textsecure/WebAPI.preload.js'; -import { cdsLookup, getSocketStatus } from '../../textsecure/WebAPI.preload.js'; +} from '../../textsecure/WebAPI.preload.ts'; +import { cdsLookup, getSocketStatus } from '../../textsecure/WebAPI.preload.ts'; import type { FeatureFlagType } from '../../window.d.ts'; import type { StorageAccessType } from '../../types/Storage.d.ts'; -import { calling } from '../../services/calling.preload.js'; -import { Environment, getEnvironment } from '../../environment.std.js'; -import { isProduction } from '../../util/version.std.js'; -import { benchmarkConversationOpen } from '../../CI/benchmarkConversationOpen.preload.js'; -import { itemStorage } from '../../textsecure/Storage.preload.js'; -import { IMAGE_PNG } from '../../types/MIME.std.js'; -import { getSelectedConversationId } from '../../state/selectors/nav.std.js'; +import { calling } from '../../services/calling.preload.ts'; +import { Environment, getEnvironment } from '../../environment.std.ts'; +import { isProduction } from '../../util/version.std.ts'; +import { benchmarkConversationOpen } from '../../CI/benchmarkConversationOpen.preload.ts'; +import { itemStorage } from '../../textsecure/Storage.preload.ts'; +import { IMAGE_PNG } from '../../types/MIME.std.ts'; +import { getSelectedConversationId } from '../../state/selectors/nav.std.ts'; const { has } = lodash; @@ -159,17 +159,16 @@ if ( : {}), }; - contextBridge.exposeInMainWorld('SignalDebug', SignalDebug); -} - -if (getEnvironment() === Environment.Test) { - contextBridge.exposeInMainWorld('RETRY_DELAY', window.RETRY_DELAY); - contextBridge.exposeInMainWorld('assert', window.assert); - contextBridge.exposeInMainWorld('testUtilities', window.testUtilities); + if (getEnvironment() !== Environment.Test) { + contextBridge.exposeInMainWorld('SignalDebug', SignalDebug); + } } // See ts/logging/log.ts -if (getEnvironment() !== Environment.PackagedApp) { +if ( + getEnvironment() !== Environment.PackagedApp && + getEnvironment() !== Environment.Test +) { const debug = (...args: Array) => { localStorage.setItem('debug', args.join(',')); }; @@ -180,5 +179,7 @@ if (window.SignalContext.config.ciMode === 'full') { contextBridge.exposeInMainWorld('SignalCI', window.SignalCI); } -contextBridge.exposeInMainWorld('showDebugLog', window.IPC.showDebugLog); -contextBridge.exposeInMainWorld('startApp', window.startApp); +if (getEnvironment() !== Environment.Test) { + contextBridge.exposeInMainWorld('showDebugLog', window.IPC.showDebugLog); + contextBridge.exposeInMainWorld('startApp', window.startApp); +} diff --git a/ts/windows/main/tsx.preload.js b/ts/windows/main/tsx.preload.js new file mode 100644 index 0000000000..5ad02d737d --- /dev/null +++ b/ts/windows/main/tsx.preload.js @@ -0,0 +1,8 @@ +// Copyright 2026 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +const tsx = require('tsx/cjs/api'); + +tsx.register(); + +require('./preload.preload.ts'); diff --git a/ts/windows/minimalContext.preload.ts b/ts/windows/minimalContext.preload.ts index 7a9c336498..8468ff54ee 100644 --- a/ts/windows/minimalContext.preload.ts +++ b/ts/windows/minimalContext.preload.ts @@ -4,27 +4,27 @@ import type { MenuItemConstructorOptions } from 'electron'; import { ipcRenderer } from 'electron'; -import type { MenuOptionsType } from '../types/menu.std.js'; -import type { LocaleEmojiListType } from '../types/emoji.std.js'; -import { LocaleEmojiListSchema } from '../types/emoji.std.js'; +import type { MenuOptionsType } from '../types/menu.std.ts'; +import type { LocaleEmojiListType } from '../types/emoji.std.ts'; +import { LocaleEmojiListSchema } from '../types/emoji.std.ts'; import type { MainWindowStatsType, MinimalSignalContextType, -} from './context.preload.js'; -import { activeWindowService } from '../context/activeWindowService.preload.js'; -import { config } from '../context/config.preload.js'; -import { createNativeThemeListener } from '../context/createNativeThemeListener.std.js'; -import { createSetting } from '../util/preload.preload.js'; -import { setupI18n } from '../util/setupI18n.dom.js'; -import { environment } from '../context/environment.preload.js'; +} from './context.preload.ts'; +import { activeWindowService } from '../context/activeWindowService.preload.ts'; +import { config } from '../context/config.preload.ts'; +import { createNativeThemeListener } from '../context/createNativeThemeListener.std.ts'; +import { createSetting } from '../util/preload.preload.ts'; +import { setupI18n } from '../util/setupI18n.dom.tsx'; +import { environment } from '../context/environment.preload.ts'; import { localeDisplayNames, countryDisplayNames, localeMessages, -} from '../context/localeMessages.preload.js'; -import { waitForSettingsChange } from '../context/waitForSettingsChange.preload.js'; -import { isTestOrMockEnvironment } from '../environment.std.js'; -import { parseUnknown } from '../util/schemas.std.js'; +} from '../context/localeMessages.preload.ts'; +import { waitForSettingsChange } from '../context/waitForSettingsChange.preload.ts'; +import { isTestOrMockEnvironment } from '../environment.std.ts'; +import { parseUnknown } from '../util/schemas.std.ts'; const emojiListCache = new Map(); diff --git a/ts/windows/permissions/app.dom.tsx b/ts/windows/permissions/app.dom.tsx index e79b47de37..1cc3aed84b 100644 --- a/ts/windows/permissions/app.dom.tsx +++ b/ts/windows/permissions/app.dom.tsx @@ -4,11 +4,11 @@ import React, { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; -import '../sandboxedInit.dom.js'; -import { PermissionsPopup } from '../../components/PermissionsPopup.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.js'; -import { AxoProvider } from '../../axo/AxoProvider.dom.js'; +import '../sandboxedInit.dom.ts'; +import { PermissionsPopup } from '../../components/PermissionsPopup.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.tsx'; +import { AxoProvider } from '../../axo/AxoProvider.dom.tsx'; const { PermissionsWindowProps } = window.Signal; const { i18n } = window.SignalContext; diff --git a/ts/windows/permissions/preload.preload.ts b/ts/windows/permissions/preload.preload.ts index 0dbaabf395..f5e5d0a525 100644 --- a/ts/windows/permissions/preload.preload.ts +++ b/ts/windows/permissions/preload.preload.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: AGPL-3.0-only import { contextBridge } from 'electron'; -import { MinimalSignalContext } from '../minimalContext.preload.js'; -import { createSetting } from '../../util/preload.preload.js'; -import { drop } from '../../util/drop.std.js'; +import { MinimalSignalContext } from '../minimalContext.preload.ts'; +import { createSetting } from '../../util/preload.preload.ts'; +import { drop } from '../../util/drop.std.ts'; const mediaCameraPermissions = createSetting('mediaCameraPermissions', { getter: false, diff --git a/ts/windows/preload.preload.ts b/ts/windows/preload.preload.ts index 6b669bb7ab..3ac3a8a33b 100644 --- a/ts/windows/preload.preload.ts +++ b/ts/windows/preload.preload.ts @@ -1,7 +1,7 @@ // Copyright 2017 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { installEphemeralSetting } from '../util/preload.preload.js'; +import { installEphemeralSetting } from '../util/preload.preload.ts'; installEphemeralSetting('contentProtection'); installEphemeralSetting('localeOverride'); diff --git a/ts/windows/sandboxedInit.dom.ts b/ts/windows/sandboxedInit.dom.ts index 1ba0ae55c1..4c168369ef 100644 --- a/ts/windows/sandboxedInit.dom.ts +++ b/ts/windows/sandboxedInit.dom.ts @@ -1,6 +1,6 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import './applyTheme.dom.js'; +import './applyTheme.dom.ts'; document.body.classList.add(window.SignalContext.OS.getClassName()); diff --git a/ts/windows/screenShare/app.dom.tsx b/ts/windows/screenShare/app.dom.tsx index 6d2b46cae1..c6b9ecc9ee 100644 --- a/ts/windows/screenShare/app.dom.tsx +++ b/ts/windows/screenShare/app.dom.tsx @@ -4,13 +4,13 @@ import React, { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; -import '../sandboxedInit.dom.js'; -import { CallingScreenSharingController } from '../../components/CallingScreenSharingController.dom.js'; -import { strictAssert } from '../../util/assert.std.js'; -import { drop } from '../../util/drop.std.js'; -import { parseEnvironment, setEnvironment } from '../../environment.std.js'; -import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.js'; -import { AxoProvider } from '../../axo/AxoProvider.dom.js'; +import '../sandboxedInit.dom.ts'; +import { CallingScreenSharingController } from '../../components/CallingScreenSharingController.dom.tsx'; +import { strictAssert } from '../../util/assert.std.ts'; +import { drop } from '../../util/drop.std.ts'; +import { parseEnvironment, setEnvironment } from '../../environment.std.ts'; +import { FunDefaultEnglishEmojiLocalizationProvider } from '../../components/fun/FunEmojiLocalizationProvider.dom.tsx'; +import { AxoProvider } from '../../axo/AxoProvider.dom.tsx'; const { ScreenShareWindowProps } = window.Signal; const { i18n } = window.SignalContext; diff --git a/ts/windows/screenShare/preload.preload.ts b/ts/windows/screenShare/preload.preload.ts index 748f38378d..9aac3a1e37 100644 --- a/ts/windows/screenShare/preload.preload.ts +++ b/ts/windows/screenShare/preload.preload.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: AGPL-3.0-only import { contextBridge, ipcRenderer } from 'electron'; -import { ScreenShareStatus } from '../../types/Calling.std.js'; -import { MinimalSignalContext } from '../minimalContext.preload.js'; +import { ScreenShareStatus } from '../../types/Calling.std.ts'; +import { MinimalSignalContext } from '../minimalContext.preload.ts'; const params = new URLSearchParams(document.location.search); diff --git a/ts/workers/heicConverterMain.main.ts b/ts/workers/heicConverterMain.main.ts index be177ac72e..44dcf5e309 100644 --- a/ts/workers/heicConverterMain.main.ts +++ b/ts/workers/heicConverterMain.main.ts @@ -3,7 +3,7 @@ import { join } from 'node:path'; import { Worker } from 'node:worker_threads'; -import { getAppRootDir } from '../util/appRootDir.main.js'; +import { getAppRootDir } from '../util/appRootDir.main.ts'; export type WrappedWorkerRequest = { readonly uuid: string; @@ -20,12 +20,7 @@ export function getHeicConverter(): ( uuid: string, data: Uint8Array ) => Promise { - const scriptDir = join( - getAppRootDir(), - 'ts', - 'workers', - 'heicConverterWorker.node.js' - ); + const scriptDir = join(getAppRootDir(), 'bundles', 'workers', 'heic.js'); const worker = new Worker(scriptDir); const ResponseMap = new Map< diff --git a/ts/workers/heicConverterWorker.node.ts b/ts/workers/heicConverterWorker.node.ts index db431283be..b4d2ce2a8b 100644 --- a/ts/workers/heicConverterWorker.node.ts +++ b/ts/workers/heicConverterWorker.node.ts @@ -7,7 +7,7 @@ import { parentPort } from 'node:worker_threads'; import type { WrappedWorkerRequest, WrappedWorkerResponse, -} from './heicConverterMain.main.js'; +} from './heicConverterMain.main.ts'; if (!parentPort) { throw new Error('Must run as a worker thread'); diff --git a/tsconfig.json b/tsconfig.json index e999c83962..b491a4b872 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -86,7 +86,7 @@ /* List of file name suffixes to search when resolving a module. */ // "moduleSuffixes": [], /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "allowImportingTsExtensions": true, + "allowImportingTsExtensions": true, /* Use the package.json 'exports' field when resolving package imports. */ // "resolvePackageJsonExports": true, /* Use the package.json 'imports' field when resolving imports. */