diff --git a/docs/index.en.html b/docs/index.en.html index 75c12239..6bed6c05 100644 --- a/docs/index.en.html +++ b/docs/index.en.html @@ -115,8 +115,8 @@

License

Desktop App

@@ -158,7 +158,6 @@

Milestones

See below for the development plan. The schedule and contents are tentative.
diff --git a/docs/index.html b/docs/index.html index 3f76e744..477b06b4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -114,8 +114,8 @@

ライセンス

PCアプリ

@@ -156,7 +156,6 @@

開発予定

今後の開発予定は以下を参照してください。時期や内容は仮のものです。
diff --git a/docs/third-party-licenses.html b/docs/third-party-licenses.html index a79a6853..47610d5f 100644 --- a/docs/third-party-licenses.html +++ b/docs/third-party-licenses.html @@ -1 +1 @@ -
LibraryLicensePublisherRepository
@babel/parserMITThe Babel Teamhttps://github.com/babel/babel
@github/hotkeyMIThttps://github.com/github/hotkey
@jimp/bmpMIThttps://github.com/jimp-dev/jimp
@jimp/coreMITOliver Moranhttps://github.com/jimp-dev/jimp
@jimp/customMIThttps://github.com/jimp-dev/jimp
@jimp/gifMIThttps://github.com/jimp-dev/jimp
@jimp/jpegMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-blitMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-blurMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-circleMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-colorMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-containMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-coverMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-cropMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-displaceMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-ditherMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-fisheyeMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-flipMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-gaussianMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-invertMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-maskMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-normalizeMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-printMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-resizeMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-rotateMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-scaleMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-shadowMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-thresholdMIThttps://github.com/jimp-dev/jimp
@jimp/pluginsMIThttps://github.com/jimp-dev/jimp
@jimp/pngMIThttps://github.com/jimp-dev/jimp
@jimp/tiffMIThttps://github.com/jimp-dev/jimp
@jimp/typesMIThttps://github.com/jimp-dev/jimp
@jimp/utilsMIThttps://github.com/jimp-dev/jimp
@kurkle/colorMITJukka Kurkelahttps://github.com/kurkle/color
@tokenizer/tokenMITBorewithttps://github.com/Borewit/tokenizer-token
@types/nodeMIThttps://github.com/DefinitelyTyped/DefinitelyTyped
@vue/compiler-coreMITEvan Youhttps://github.com/vuejs/core
@vue/compiler-domMITEvan Youhttps://github.com/vuejs/core
@vue/compiler-sfcMITEvan Youhttps://github.com/vuejs/core
@vue/compiler-ssrMITEvan Youhttps://github.com/vuejs/core
@vue/reactivity-transformMITEvan Youhttps://github.com/vuejs/core
@vue/reactivityMITEvan Youhttps://github.com/vuejs/core
@vue/runtime-coreMITEvan Youhttps://github.com/vuejs/core
@vue/runtime-domMITEvan Youhttps://github.com/vuejs/core
@vue/server-rendererMITEvan Youhttps://github.com/vuejs/core
@vue/sharedMITEvan Youhttps://github.com/vuejs/core
any-baseMITKamil Harasimowiczhttps://github.com/HarasimowiczKamil/any-base
base64-jsMITT. Jameson Littlehttps://github.com/beatgammit/base64-js
bmp-jsMITshaozileehttps://github.com/shaozilee/bmp-js
buffer-equalMITJames Hallidayhttps://github.com/substack/node-buffer-equal
bufferMITFeross Aboukhadijehhttps://github.com/feross/buffer
chart.jsMIThttps://github.com/chartjs/Chart.js
csstypeMITFredrik Nicolhttps://github.com/frenic/csstype
date-formatMITGareth Joneshttps://github.com/nomiddlename/date-format
debugMITJosh Junonhttps://github.com/debug-js/debug
dom-walkMITRaynoshttps://github.com/Raynos/dom-walk
encoding-japaneseMITpolygonplanethttps://github.com/polygonplanet/encoding.js
estree-walkerMITRich Harrishttps://github.com/Rich-Harris/estree-walker
exif-parserMIT*Bruno Windelshttps://github.com/bwindels/exif-parser
file-typeMITSindre Sorhushttps://github.com/sindresorhus/file-type
flattedISCAndrea Giammarchihttps://github.com/WebReflection/flatted
fs-extraMITJP Richardsonhttps://github.com/jprichardson/node-fs-extra
gifwrapMITJoseph T. Lapphttps://github.com/jtlapp/gifwrap
globalMITRaynoshttps://github.com/Raynos/global
graceful-fsISChttps://github.com/isaacs/node-graceful-fs
ieee754BSD-3-ClauseFeross Aboukhadijehhttps://github.com/feross/ieee754
image-qMIThttps://github.com/ibezkrovnyi/image-quantization
inheritsISChttps://github.com/isaacs/inherits
is-functionMITStephen Sugdenhttps://github.com/grncdr/js-is-function
isomorphic-fetchMITMatt Andrewshttps://github.com/matthew-andrews/isomorphic-fetch
jimpMITOliver Moranhttps://github.com/jimp-dev/jimp
jpeg-jsBSD-3-ClauseEugene Warehttps://github.com/eugeneware/jpeg-js
jsonfileMITJP Richardsonhttps://github.com/jprichardson/node-jsonfile
load-bmfontMITMatt DesLauriershttps://github.com/Jam3/load-bmfont
log4jsApache-2.0https://github.com/log4js-node/log4js-node
magic-stringMITRich Harrishttps://github.com/rich-harris/magic-string
mimeMITRobert Kiefferhttps://github.com/broofa/node-mime
min-documentMITRaynoshttps://github.com/Raynos/min-document
mkdirpMIThttps://github.com/isaacs/node-mkdirp
msMIThttps://github.com/zeit/ms
nanoidMITAndrey Sitnikhttps://github.com/ai/nanoid
node-fetchMITDavid Frankhttps://github.com/bitinn/node-fetch
omggifMITDean McNameehttps://github.com/deanm/omggif
pako(MIT AND Zlib)https://github.com/nodeca/pako
parse-bmfont-asciiMITMatt DesLauriershttps://github.com/mattdesl/parse-bmfont-ascii
parse-bmfont-binaryMITMatt DesLauriershttps://github.com/Jam3/parse-bmfont-binary
parse-bmfont-xmlMITMatt DesLauriershttps://github.com/mattdesl/parse-bmfont-xml
parse-headersMITDavid Björklundhttps://github.com/kesla/parse-headers
peek-readableMITBorewithttps://github.com/Borewit/peek-readable
phinMITEthan Davishttps://github.com/ethanent/phin
picocolorsISCAlexey Raspopovhttps://github.com/alexeyraspopov/picocolors
pixelmatchISCVladimir Agafonkinhttps://github.com/mapbox/pixelmatch
pngjsMIThttps://github.com/lukeapage/pngjs2
pngjsMIThttps://github.com/lukeapage/pngjs
postcssMITAndrey Sitnikhttps://github.com/postcss/postcss
processMITRoman Shtylmanhttps://github.com/shtylman/node-process
readable-streamMIThttps://github.com/nodejs/readable-stream
readable-web-to-node-streamMITBorewithttps://github.com/Borewit/readable-web-to-node-stream
regenerator-runtimeMITBen Newmanhttps://github.com/facebook/regenerator/tree/main/packages/runtime
rfdcMITDavid Mark Clementshttps://github.com/davidmarkclements/rfdc
safe-bufferMITFeross Aboukhadijehhttps://github.com/feross/safe-buffer
saxISCIsaac Z. Schlueterhttps://github.com/isaacs/sax-js
source-map-jsBSD-3-ClauseValentin 7rulnik Semirulnikhttps://github.com/7rulnik/source-map-js
source-mapBSD-3-ClauseNick Fitzgeraldhttps://github.com/mozilla/source-map
sourcemap-codecMITRich Harrishttps://github.com/Rich-Harris/sourcemap-codec
splitpanesMITAntoni Andrehttps://github.com/antoniandre/splitpanes
streamrollerMITGareth Joneshttps://github.com/log4js-node/streamroller
string_decoderMIThttps://github.com/nodejs/string_decoder
strtok3MITBorewithttps://github.com/Borewit/strtok3
timmMITGuillermo Grau Paneahttps://github.com/guigrpa/timm
tinycolor2MITBrian Grinsteadhttps://github.com/bgrins/TinyColor
token-typesMITBorewithttps://github.com/Borewit/token-types
tr46MITSebastian Mayrhttps://github.com/Sebmaster/tr46.js
ts-md5MIThttps://github.com/cotag/ts-md5
universalifyMITRyan Zimmermanhttps://github.com/RyanZim/universalify
utif2MITphotopeahttps://github.com/photopea/UTIF.js
util-deprecateMITNathan Rajlichhttps://github.com/TooTallNate/util-deprecate
vueMITEvan Youhttps://github.com/vuejs/core
webidl-conversionsBSD-2-ClauseDomenic Denicolahttps://github.com/jsdom/webidl-conversions
whatwg-fetchMIThttps://github.com/github/fetch
whatwg-urlMITSebastian Mayrhttps://github.com/jsdom/whatwg-url
xhrMITRaynoshttps://github.com/naugtur/xhr
xml-parse-from-stringMITMatt DesLauriershttps://github.com/Jam3/xml-parse-from-string
xml2jsMITMarek Kubicahttps://github.com/Leonidas-from-XIV/node-xml2js
xmlbuilderMITOzgur Ozcitakhttps://github.com/oozcitak/xmlbuilder-js
xtendMITRaynoshttps://github.com/Raynos/xtend
\ No newline at end of file +
LibraryLicensePublisherRepository
@babel/parserMITThe Babel Teamhttps://github.com/babel/babel
@github/hotkeyMIThttps://github.com/github/hotkey
@jimp/bmpMIThttps://github.com/jimp-dev/jimp
@jimp/coreMITOliver Moranhttps://github.com/jimp-dev/jimp
@jimp/customMIThttps://github.com/jimp-dev/jimp
@jimp/gifMIThttps://github.com/jimp-dev/jimp
@jimp/jpegMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-blitMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-blurMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-circleMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-colorMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-containMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-coverMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-cropMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-displaceMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-ditherMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-fisheyeMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-flipMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-gaussianMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-invertMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-maskMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-normalizeMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-printMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-resizeMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-rotateMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-scaleMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-shadowMIThttps://github.com/jimp-dev/jimp
@jimp/plugin-thresholdMIThttps://github.com/jimp-dev/jimp
@jimp/pluginsMIThttps://github.com/jimp-dev/jimp
@jimp/pngMIThttps://github.com/jimp-dev/jimp
@jimp/tiffMIThttps://github.com/jimp-dev/jimp
@jimp/typesMIThttps://github.com/jimp-dev/jimp
@jimp/utilsMIThttps://github.com/jimp-dev/jimp
@jridgewell/sourcemap-codecMITRich Harrishttps://github.com/jridgewell/sourcemap-codec
@kurkle/colorMITJukka Kurkelahttps://github.com/kurkle/color
@tokenizer/tokenMITBorewithttps://github.com/Borewit/tokenizer-token
@types/nodeMIThttps://github.com/DefinitelyTyped/DefinitelyTyped
@vue/compiler-coreMITEvan Youhttps://github.com/vuejs/core
@vue/compiler-domMITEvan Youhttps://github.com/vuejs/core
@vue/compiler-sfcMITEvan Youhttps://github.com/vuejs/core
@vue/compiler-ssrMITEvan Youhttps://github.com/vuejs/core
@vue/reactivity-transformMITEvan Youhttps://github.com/vuejs/core
@vue/reactivityMITEvan Youhttps://github.com/vuejs/core
@vue/runtime-coreMITEvan Youhttps://github.com/vuejs/core
@vue/runtime-domMITEvan Youhttps://github.com/vuejs/core
@vue/server-rendererMITEvan Youhttps://github.com/vuejs/core
@vue/sharedMITEvan Youhttps://github.com/vuejs/core
any-baseMITKamil Harasimowiczhttps://github.com/HarasimowiczKamil/any-base
base64-jsMITT. Jameson Littlehttps://github.com/beatgammit/base64-js
bmp-jsMITshaozileehttps://github.com/shaozilee/bmp-js
buffer-equalMITJames Hallidayhttps://github.com/substack/node-buffer-equal
bufferMITFeross Aboukhadijehhttps://github.com/feross/buffer
chart.jsMIThttps://github.com/chartjs/Chart.js
csstypeMITFredrik Nicolhttps://github.com/frenic/csstype
date-formatMITGareth Joneshttps://github.com/nomiddlename/date-format
debugMITJosh Junonhttps://github.com/debug-js/debug
dom-walkMITRaynoshttps://github.com/Raynos/dom-walk
encoding-japaneseMITpolygonplanethttps://github.com/polygonplanet/encoding.js
encodingMITAndris Reinmanhttps://github.com/andris9/encoding
estree-walkerMITRich Harrishttps://github.com/Rich-Harris/estree-walker
exif-parserMIT*Bruno Windelshttps://github.com/bwindels/exif-parser
file-typeMITSindre Sorhushttps://github.com/sindresorhus/file-type
flattedISCAndrea Giammarchihttps://github.com/WebReflection/flatted
fs-extraMITJP Richardsonhttps://github.com/jprichardson/node-fs-extra
gifwrapMITJoseph T. Lapphttps://github.com/jtlapp/gifwrap
globalMITRaynoshttps://github.com/Raynos/global
graceful-fsISChttps://github.com/isaacs/node-graceful-fs
iconv-liteMITAlexander Shtuchkinhttps://github.com/ashtuchkin/iconv-lite
ieee754BSD-3-ClauseFeross Aboukhadijehhttps://github.com/feross/ieee754
image-qMIThttps://github.com/ibezkrovnyi/image-quantization
inheritsISChttps://github.com/isaacs/inherits
is-functionMITStephen Sugdenhttps://github.com/grncdr/js-is-function
isomorphic-fetchMITMatt Andrewshttps://github.com/matthew-andrews/isomorphic-fetch
jimpMITOliver Moranhttps://github.com/jimp-dev/jimp
jpeg-jsBSD-3-ClauseEugene Warehttps://github.com/eugeneware/jpeg-js
jsonfileMITJP Richardsonhttps://github.com/jprichardson/node-jsonfile
load-bmfontMITMatt DesLauriershttps://github.com/Jam3/load-bmfont
log4jsApache-2.0https://github.com/log4js-node/log4js-node
magic-stringMITRich Harrishttps://github.com/rich-harris/magic-string
mimeMITRobert Kiefferhttps://github.com/broofa/node-mime
min-documentMITRaynoshttps://github.com/Raynos/min-document
mkdirpMIThttps://github.com/isaacs/node-mkdirp
msMIThttps://github.com/zeit/ms
nanoidMITAndrey Sitnikhttps://github.com/ai/nanoid
node-fetchMITDavid Frankhttps://github.com/bitinn/node-fetch
omggifMITDean McNameehttps://github.com/deanm/omggif
pako(MIT AND Zlib)https://github.com/nodeca/pako
parse-bmfont-asciiMITMatt DesLauriershttps://github.com/mattdesl/parse-bmfont-ascii
parse-bmfont-binaryMITMatt DesLauriershttps://github.com/Jam3/parse-bmfont-binary
parse-bmfont-xmlMITMatt DesLauriershttps://github.com/mattdesl/parse-bmfont-xml
parse-headersMITDavid Björklundhttps://github.com/kesla/parse-headers
peek-readableMITBorewithttps://github.com/Borewit/peek-readable
phinMITEthan Davishttps://github.com/ethanent/phin
picocolorsISCAlexey Raspopovhttps://github.com/alexeyraspopov/picocolors
pixelmatchISCVladimir Agafonkinhttps://github.com/mapbox/pixelmatch
pngjsMIThttps://github.com/lukeapage/pngjs2
pngjsMIThttps://github.com/lukeapage/pngjs
postcssMITAndrey Sitnikhttps://github.com/postcss/postcss
processMITRoman Shtylmanhttps://github.com/shtylman/node-process
readable-streamMIThttps://github.com/nodejs/readable-stream
readable-web-to-node-streamMITBorewithttps://github.com/Borewit/readable-web-to-node-stream
regenerator-runtimeMITBen Newmanhttps://github.com/facebook/regenerator/tree/main/packages/runtime
rfdcMITDavid Mark Clementshttps://github.com/davidmarkclements/rfdc
safe-bufferMITFeross Aboukhadijehhttps://github.com/feross/safe-buffer
safer-bufferMITNikita Skovorodahttps://github.com/ChALkeR/safer-buffer
saxISCIsaac Z. Schlueterhttps://github.com/isaacs/sax-js
source-map-jsBSD-3-ClauseValentin 7rulnik Semirulnikhttps://github.com/7rulnik/source-map-js
splitpanesMITAntoni Andrehttps://github.com/antoniandre/splitpanes
streamrollerMITGareth Joneshttps://github.com/log4js-node/streamroller
string_decoderMIThttps://github.com/nodejs/string_decoder
strtok3MITBorewithttps://github.com/Borewit/strtok3
timmMITGuillermo Grau Paneahttps://github.com/guigrpa/timm
tinycolor2MITBrian Grinsteadhttps://github.com/bgrins/TinyColor
token-typesMITBorewithttps://github.com/Borewit/token-types
tr46MITSebastian Mayrhttps://github.com/Sebmaster/tr46.js
ts-md5MIThttps://github.com/cotag/ts-md5
universalifyMITRyan Zimmermanhttps://github.com/RyanZim/universalify
utif2MITphotopeahttps://github.com/photopea/UTIF.js
util-deprecateMITNathan Rajlichhttps://github.com/TooTallNate/util-deprecate
vueMITEvan Youhttps://github.com/vuejs/core
webidl-conversionsBSD-2-ClauseDomenic Denicolahttps://github.com/jsdom/webidl-conversions
whatwg-fetchMIThttps://github.com/github/fetch
whatwg-urlMITSebastian Mayrhttps://github.com/jsdom/whatwg-url
xhrMITRaynoshttps://github.com/naugtur/xhr
xml-parse-from-stringMITMatt DesLauriershttps://github.com/Jam3/xml-parse-from-string
xml2jsMITMarek Kubicahttps://github.com/Leonidas-from-XIV/node-xml2js
xmlbuilderMITOzgur Ozcitakhttps://github.com/oozcitak/xmlbuilder-js
xtendMITRaynoshttps://github.com/Raynos/xtend
\ No newline at end of file diff --git a/docs/third-party-licenses/100.txt b/docs/third-party-licenses/100.txt index 0c068cee..4a717d86 100644 --- a/docs/third-party-licenses/100.txt +++ b/docs/third-party-licenses/100.txt @@ -1,21 +1,71 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -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. +![Karma CI](https://github.com/Borewit/readable-web-to-node-stream/workflows/Karma%20CI/badge.svg) +[![NPM version](https://badge.fury.io/js/readable-web-to-node-stream.svg)](https://npmjs.org/package/readable-web-to-node-stream) +[![npm downloads](http://img.shields.io/npm/dm/readable-web-to-node-stream.svg)](https://npmcharts.com/compare/readable-web-to-node-stream) +[![dependencies Status](https://david-dm.org/Borewit/readable-web-to-node-stream/status.svg)](https://david-dm.org/Borewit/readable-web-to-node-stream) +[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/readable-web-to-node-stream/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/readable-web-to-node-stream?targetFile=package.json) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d4b511481b3a4634b6ca5c0724407eb9)](https://www.codacy.com/gh/Borewit/peek-readable/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Borewit/peek-readable&utm_campaign=Badge_Grade) +[![Coverage Status](https://coveralls.io/repos/github/Borewit/readable-web-to-node-stream/badge.svg?branch=master)](https://coveralls.io/github/Borewit/readable-web-to-node-stream?branch=master) +[![Minified size](https://badgen.net/bundlephobia/min/readable-web-to-node-stream)](https://bundlephobia.com/result?p=readable-web-to-node-stream) + +# readable-web-to-node-stream + +Converts a [Web-API readable stream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader) into a [Node.js readable stream](https://nodejs.org/api/stream.html#stream_readable_streams). + +## Installation +Install via [npm](http://npmjs.org/): + +```bash +npm install readable-web-to-node-stream +``` +or or [yarn](https://yarnpkg.com/): +```bash +yarn add readable-web-to-node-stream +``` + +## Compatibility + +Source is written in TypeScript and compiled to ECMAScript 2017 (ES8). + +Unit tests are performed on the following browsers: + +* Google Chrome 74.0 +* Firefox 68.0 +* Safari 12.0 +* Opera 60.0 + +## Example + +Import readable-web-stream-to-node in JavaScript: +```js +const {ReadableWebToNodeStream} = require('readable-web-to-node-stream'); + +async function download(url) { + const response = await fetch(url); + const readableWebStream = response.body; + const nodeStream = new ReadableWebToNodeStream(readableWebStream); +} +``` + +## API + +**constructor(stream: ReadableStream): Promise** + +`stream: ReadableStream`: the [Web-API readable stream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader). + +**close(): Promise** +Will cancel close the Readable-node stream, and will release Web-API-readable-stream. + +**waitForReadToComplete(): Promise** +If there is no unresolved read call to Web-API Readable​Stream immediately returns, otherwise it will wait until the read is resolved. + +## Licence + +(The MIT License) + +Copyright (c) 2019 Borewit + +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. diff --git a/docs/third-party-licenses/101.txt b/docs/third-party-licenses/101.txt index ccffa082..cde61b6c 100644 --- a/docs/third-party-licenses/101.txt +++ b/docs/third-party-licenses/101.txt @@ -1,41 +1,21 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -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. - -==== - -`String.fromCodePoint` by Mathias Bynens used according to terms of MIT -License, as follows: - - Copyright Mathias Bynens - - 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. +MIT License + +Copyright (c) 2014-present, Facebook, 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. diff --git a/docs/third-party-licenses/102.txt b/docs/third-party-licenses/102.txt index ed1b7cf2..d600e514 100644 --- a/docs/third-party-licenses/102.txt +++ b/docs/third-party-licenses/102.txt @@ -1,28 +1,15 @@ +Copyright 2019 "David Mark Clements " -Copyright (c) 2009-2011, Mozilla Foundation and contributors -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: -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +The above copyright notice and this permission notice shall be included in all copies or substantial portions +of the Software. -* 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 names of the Mozilla Foundation nor the names of project - 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. +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. diff --git a/docs/third-party-licenses/103.txt b/docs/third-party-licenses/103.txt index ed1b7cf2..0c068cee 100644 --- a/docs/third-party-licenses/103.txt +++ b/docs/third-party-licenses/103.txt @@ -1,28 +1,21 @@ +The MIT License (MIT) -Copyright (c) 2009-2011, Mozilla Foundation and contributors -All rights reserved. +Copyright (c) Feross Aboukhadijeh -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +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: -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -* 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 names of the Mozilla Foundation nor the names of project - 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. +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. diff --git a/docs/third-party-licenses/104.txt b/docs/third-party-licenses/104.txt index a331065a..4fe9e6f1 100644 --- a/docs/third-party-licenses/104.txt +++ b/docs/third-party-licenses/104.txt @@ -1,6 +1,6 @@ -The MIT License +MIT License -Copyright (c) 2015 Rich Harris +Copyright (c) 2018 Nikita Skovoroda Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/docs/third-party-licenses/105.txt b/docs/third-party-licenses/105.txt index e69ce89a..ccffa082 100644 --- a/docs/third-party-licenses/105.txt +++ b/docs/third-party-licenses/105.txt @@ -1,21 +1,41 @@ -MIT License - -Copyright (c) 2018 Antoni Andre - -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. \ No newline at end of file +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +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. + +==== + +`String.fromCodePoint` by Mathias Bynens used according to terms of MIT +License, as follows: + + Copyright Mathias Bynens + + 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. diff --git a/docs/third-party-licenses/106.txt b/docs/third-party-licenses/106.txt index f03266b7..ed1b7cf2 100644 --- a/docs/third-party-licenses/106.txt +++ b/docs/third-party-licenses/106.txt @@ -1,20 +1,28 @@ -The MIT License (MIT) -Copyright (c) 2013 Gareth Jones +Copyright (c) 2009-2011, Mozilla Foundation and contributors +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: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -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. +* 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 names of the Mozilla Foundation nor the names of project + 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. diff --git a/docs/third-party-licenses/107.txt b/docs/third-party-licenses/107.txt index 778edb20..e69ce89a 100644 --- a/docs/third-party-licenses/107.txt +++ b/docs/third-party-licenses/107.txt @@ -1,48 +1,21 @@ -Node.js is licensed for use as follows: +MIT License -""" -Copyright Node.js contributors. All rights reserved. +Copyright (c) 2018 Antoni Andre 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 +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 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. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. 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. -""" - +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. \ No newline at end of file diff --git a/docs/third-party-licenses/108.txt b/docs/third-party-licenses/108.txt index c85ef2c1..f03266b7 100644 --- a/docs/third-party-licenses/108.txt +++ b/docs/third-party-licenses/108.txt @@ -1,15 +1,20 @@ -Copyright (c) 2017, Borewit -All rights reserved. +The MIT License (MIT) -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: +Copyright (c) 2013 Gareth Jones -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. +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 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. \ No newline at end of file +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. diff --git a/docs/third-party-licenses/109.txt b/docs/third-party-licenses/109.txt index 7afa65c8..778edb20 100644 --- a/docs/third-party-licenses/109.txt +++ b/docs/third-party-licenses/109.txt @@ -1,21 +1,48 @@ -The MIT License (MIT) +Node.js is licensed for use as follows: -Copyright (c) 2016-present Guillermo Grau Panea +""" +Copyright Node.js contributors. 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 +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 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. +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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. 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. +""" + diff --git a/docs/third-party-licenses/110.txt b/docs/third-party-licenses/110.txt index b6424d83..c85ef2c1 100644 --- a/docs/third-party-licenses/110.txt +++ b/docs/third-party-licenses/110.txt @@ -1,20 +1,15 @@ -Copyright (c), Brian Grinstead, http://briangrinstead.com +Copyright (c) 2017, Borewit +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: +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 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. \ No newline at end of file +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. \ No newline at end of file diff --git a/docs/third-party-licenses/111.txt b/docs/third-party-licenses/111.txt index ffcebb7b..7afa65c8 100644 --- a/docs/third-party-licenses/111.txt +++ b/docs/third-party-licenses/111.txt @@ -1,7 +1,21 @@ -Copyright 2017 Borewit +The MIT License (MIT) -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: +Copyright (c) 2016-present Guillermo Grau Panea -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +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 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. \ No newline at end of file +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. diff --git a/docs/third-party-licenses/112.txt b/docs/third-party-licenses/112.txt new file mode 100644 index 00000000..b6424d83 --- /dev/null +++ b/docs/third-party-licenses/112.txt @@ -0,0 +1,20 @@ +Copyright (c), Brian Grinstead, http://briangrinstead.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. \ No newline at end of file diff --git a/docs/third-party-licenses/113.txt b/docs/third-party-licenses/113.txt index b74d4021..ffcebb7b 100644 --- a/docs/third-party-licenses/113.txt +++ b/docs/third-party-licenses/113.txt @@ -1,21 +1,7 @@ -MIT License +Copyright 2017 Borewit -Copyright (c) 2020 Place Technology +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: -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 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. +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. \ No newline at end of file diff --git a/docs/third-party-licenses/114.txt b/docs/third-party-licenses/114.txt deleted file mode 100644 index 514e84e6..00000000 --- a/docs/third-party-licenses/114.txt +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2017, Ryan Zimmerman - -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. diff --git a/docs/third-party-licenses/115.txt b/docs/third-party-licenses/115.txt index 491e2390..b74d4021 100644 --- a/docs/third-party-licenses/115.txt +++ b/docs/third-party-licenses/115.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Photopea +Copyright (c) 2020 Place Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docs/third-party-licenses/116.txt b/docs/third-party-licenses/116.txt index 6a60e8c2..514e84e6 100644 --- a/docs/third-party-licenses/116.txt +++ b/docs/third-party-licenses/116.txt @@ -1,24 +1,20 @@ (The MIT License) -Copyright (c) 2014 Nathan Rajlich +Copyright (c) 2017, Ryan Zimmerman -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: +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 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. +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. diff --git a/docs/third-party-licenses/117.txt b/docs/third-party-licenses/117.txt index 15f1f7e7..491e2390 100644 --- a/docs/third-party-licenses/117.txt +++ b/docs/third-party-licenses/117.txt @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2018-present, Yuxi (Evan) You +Copyright (c) 2017 Photopea Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/docs/third-party-licenses/118.txt b/docs/third-party-licenses/118.txt index d4a994f5..6a60e8c2 100644 --- a/docs/third-party-licenses/118.txt +++ b/docs/third-party-licenses/118.txt @@ -1,12 +1,24 @@ -# The BSD 2-Clause License +(The MIT License) -Copyright (c) 2014, Domenic Denicola -All rights reserved. +Copyright (c) 2014 Nathan Rajlich -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +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: -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -2. 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 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. +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. diff --git a/docs/third-party-licenses/119.txt b/docs/third-party-licenses/119.txt index 0e319d55..15f1f7e7 100644 --- a/docs/third-party-licenses/119.txt +++ b/docs/third-party-licenses/119.txt @@ -1,20 +1,21 @@ -Copyright (c) 2014-2016 GitHub, Inc. +The MIT License (MIT) -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: +Copyright (c) 2018-present, Yuxi (Evan) You -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +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 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. +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. diff --git a/docs/third-party-licenses/120.txt b/docs/third-party-licenses/120.txt index 54dfac39..d4a994f5 100644 --- a/docs/third-party-licenses/120.txt +++ b/docs/third-party-licenses/120.txt @@ -1,21 +1,12 @@ -The MIT License (MIT) +# The BSD 2-Clause License -Copyright (c) 2015–2016 Sebastian Mayr +Copyright (c) 2014, Domenic Denicola +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: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -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. +2. 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 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. diff --git a/docs/third-party-licenses/121.txt b/docs/third-party-licenses/121.txt index a23e08a8..0e319d55 100644 --- a/docs/third-party-licenses/121.txt +++ b/docs/third-party-licenses/121.txt @@ -1,19 +1,20 @@ -Copyright (c) 2012 Raynos. +Copyright (c) 2014-2016 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: +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 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. \ No newline at end of file +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. diff --git a/docs/third-party-licenses/122.txt b/docs/third-party-licenses/122.txt index 9b10ce2a..54dfac39 100644 --- a/docs/third-party-licenses/122.txt +++ b/docs/third-party-licenses/122.txt @@ -1,5 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Jam3 + +Copyright (c) 2015–2016 Sebastian Mayr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -8,14 +9,13 @@ 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. +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. diff --git a/docs/third-party-licenses/123.txt b/docs/third-party-licenses/123.txt index e3b4222a..a23e08a8 100644 --- a/docs/third-party-licenses/123.txt +++ b/docs/third-party-licenses/123.txt @@ -1,10 +1,10 @@ -Copyright 2010, 2011, 2012, 2013. All rights reserved. +Copyright (c) 2012 Raynos. 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 +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 @@ -14,6 +14,6 @@ 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. +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. \ No newline at end of file diff --git a/docs/third-party-licenses/124.txt b/docs/third-party-licenses/124.txt index e7cbac9a..9b10ce2a 100644 --- a/docs/third-party-licenses/124.txt +++ b/docs/third-party-licenses/124.txt @@ -1,6 +1,5 @@ The MIT License (MIT) - -Copyright (c) 2013 Ozgur Ozcitak +Copyright (c) 2015 Jam3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +8,14 @@ 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 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. -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. diff --git a/docs/third-party-licenses/125.txt b/docs/third-party-licenses/125.txt index 0099f4f6..e3b4222a 100644 --- a/docs/third-party-licenses/125.txt +++ b/docs/third-party-licenses/125.txt @@ -1,11 +1,10 @@ -The MIT License (MIT) -Copyright (c) 2012-2014 Raynos. +Copyright 2010, 2011, 2012, 2013. 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 +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 @@ -15,6 +14,6 @@ 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. +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. diff --git a/docs/third-party-licenses/126.txt b/docs/third-party-licenses/126.txt new file mode 100644 index 00000000..e7cbac9a --- /dev/null +++ b/docs/third-party-licenses/126.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +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. diff --git a/docs/third-party-licenses/127.txt b/docs/third-party-licenses/127.txt new file mode 100644 index 00000000..0099f4f6 --- /dev/null +++ b/docs/third-party-licenses/127.txt @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright (c) 2012-2014 Raynos. + +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. diff --git a/docs/third-party-licenses/33.txt b/docs/third-party-licenses/33.txt index ae411212..a331065a 100644 --- a/docs/third-party-licenses/33.txt +++ b/docs/third-party-licenses/33.txt @@ -1,9 +1,21 @@ -The MIT License (MIT) +The MIT License -Copyright (c) 2018-2021 Jukka Kurkela +Copyright (c) 2015 Rich Harris -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: +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 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. +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. diff --git a/docs/third-party-licenses/34.txt b/docs/third-party-licenses/34.txt index 1c1ba324..ae411212 100644 --- a/docs/third-party-licenses/34.txt +++ b/docs/third-party-licenses/34.txt @@ -1,19 +1,9 @@ -[![npm version](https://badge.fury.io/js/%40tokenizer%2Ftoken.svg)](https://www.npmjs.com/package/@tokenizer/token) -[![npm downloads](http://img.shields.io/npm/dm/@tokenizer/token.svg)](https://npmcharts.com/compare/@tokenizer/token?interval=30) +The MIT License (MIT) -# @tokenizer/token +Copyright (c) 2018-2021 Jukka Kurkela -TypeScript definition of an [strtok3](https://github.com/Borewit/strtok3) token. - -## Licence - -(The MIT License) - -Copyright (c) 2020 Borewit - -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: +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. - +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. diff --git a/docs/third-party-licenses/35.txt b/docs/third-party-licenses/35.txt index 9e841e7a..1c1ba324 100644 --- a/docs/third-party-licenses/35.txt +++ b/docs/third-party-licenses/35.txt @@ -1,21 +1,19 @@ - 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 +[![npm version](https://badge.fury.io/js/%40tokenizer%2Ftoken.svg)](https://www.npmjs.com/package/@tokenizer/token) +[![npm downloads](http://img.shields.io/npm/dm/@tokenizer/token.svg)](https://npmcharts.com/compare/@tokenizer/token?interval=30) + +# @tokenizer/token + +TypeScript definition of an [strtok3](https://github.com/Borewit/strtok3) token. + +## Licence + +(The MIT License) + +Copyright (c) 2020 Borewit + +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. + diff --git a/docs/third-party-licenses/36.txt b/docs/third-party-licenses/36.txt index 15f1f7e7..9e841e7a 100644 --- a/docs/third-party-licenses/36.txt +++ b/docs/third-party-licenses/36.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) + MIT License -Copyright (c) 2018-present, Yuxi (Evan) You + 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: + 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 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. + 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 diff --git a/docs/third-party-licenses/46.txt b/docs/third-party-licenses/46.txt index a70ce0ce..15f1f7e7 100644 --- a/docs/third-party-licenses/46.txt +++ b/docs/third-party-licenses/46.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Kamil Harasimowicz and contributors +Copyright (c) 2018-present, Yuxi (Evan) You Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ 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 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. \ No newline at end of file +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/docs/third-party-licenses/47.txt b/docs/third-party-licenses/47.txt index 6d52b8ac..a70ce0ce 100644 --- a/docs/third-party-licenses/47.txt +++ b/docs/third-party-licenses/47.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Jameson Little +Copyright (c) 2015 Kamil Harasimowicz 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 @@ -9,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/docs/third-party-licenses/48.txt b/docs/third-party-licenses/48.txt index 4b20aeff..6d52b8ac 100644 --- a/docs/third-party-licenses/48.txt +++ b/docs/third-party-licenses/48.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 @丝刀口 +Copyright (c) 2014 Jameson Little Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/docs/third-party-licenses/49.txt b/docs/third-party-licenses/49.txt index 8c062fd0..4b20aeff 100644 --- a/docs/third-party-licenses/49.txt +++ b/docs/third-party-licenses/49.txt @@ -1,62 +1,21 @@ -buffer-equal -============ - -Return whether two buffers are equal. - -[![build status](https://secure.travis-ci.org/substack/node-buffer-equal.png)](http://travis-ci.org/substack/node-buffer-equal) - -example -======= - -``` js -var bufferEqual = require('buffer-equal'); - -console.dir(bufferEqual( - new Buffer([253,254,255]), - new Buffer([253,254,255]) -)); -console.dir(bufferEqual( - new Buffer('abc'), - new Buffer('abcd') -)); -console.dir(bufferEqual( - new Buffer('abc'), - 'abc' -)); -``` - -output: - -``` -true -false -undefined -``` - -methods -======= - -``` js -var bufferEqual = require('buffer-equal') -``` - -bufferEqual(a, b) ------------------ - -Return whether the two buffers `a` and `b` are equal. - -If `a` or `b` is not a buffer, return `undefined`. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install buffer-equal -``` - -license -======= - -MIT +The MIT License (MIT) + +Copyright (c) 2014 @丝刀口 + +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. diff --git a/docs/third-party-licenses/50.txt b/docs/third-party-licenses/50.txt index d6bf75dc..8c062fd0 100644 --- a/docs/third-party-licenses/50.txt +++ b/docs/third-party-licenses/50.txt @@ -1,21 +1,62 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, 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. +buffer-equal +============ + +Return whether two buffers are equal. + +[![build status](https://secure.travis-ci.org/substack/node-buffer-equal.png)](http://travis-ci.org/substack/node-buffer-equal) + +example +======= + +``` js +var bufferEqual = require('buffer-equal'); + +console.dir(bufferEqual( + new Buffer([253,254,255]), + new Buffer([253,254,255]) +)); +console.dir(bufferEqual( + new Buffer('abc'), + new Buffer('abcd') +)); +console.dir(bufferEqual( + new Buffer('abc'), + 'abc' +)); +``` + +output: + +``` +true +false +undefined +``` + +methods +======= + +``` js +var bufferEqual = require('buffer-equal') +``` + +bufferEqual(a, b) +----------------- + +Return whether the two buffers `a` and `b` are equal. + +If `a` or `b` is not a buffer, return `undefined`. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install buffer-equal +``` + +license +======= + +MIT diff --git a/docs/third-party-licenses/51.txt b/docs/third-party-licenses/51.txt index 9182b8e8..d6bf75dc 100644 --- a/docs/third-party-licenses/51.txt +++ b/docs/third-party-licenses/51.txt @@ -1,9 +1,21 @@ The MIT License (MIT) -Copyright (c) 2014-2022 Chart.js Contributors +Copyright (c) Feross Aboukhadijeh, 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: +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 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. +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. diff --git a/docs/third-party-licenses/52.txt b/docs/third-party-licenses/52.txt index ac06f622..9182b8e8 100644 --- a/docs/third-party-licenses/52.txt +++ b/docs/third-party-licenses/52.txt @@ -1,19 +1,9 @@ -Copyright (c) 2017-2018 Fredrik Nicol +The MIT License (MIT) -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: +Copyright (c) 2014-2022 Chart.js Contributors -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +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 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. +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. diff --git a/docs/third-party-licenses/53.txt b/docs/third-party-licenses/53.txt index f03266b7..ac06f622 100644 --- a/docs/third-party-licenses/53.txt +++ b/docs/third-party-licenses/53.txt @@ -1,20 +1,19 @@ -The MIT License (MIT) +Copyright (c) 2017-2018 Fredrik Nicol -Copyright (c) 2013 Gareth Jones - -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: +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. +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. diff --git a/docs/third-party-licenses/54.txt b/docs/third-party-licenses/54.txt index 1a9820e2..f03266b7 100644 --- a/docs/third-party-licenses/54.txt +++ b/docs/third-party-licenses/54.txt @@ -1,20 +1,20 @@ -(The MIT License) +The MIT License (MIT) -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon +Copyright (c) 2013 Gareth Jones -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, +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. +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. diff --git a/docs/third-party-licenses/55.txt b/docs/third-party-licenses/55.txt index a23e08a8..1a9820e2 100644 --- a/docs/third-party-licenses/55.txt +++ b/docs/third-party-licenses/55.txt @@ -1,19 +1,20 @@ -Copyright (c) 2012 Raynos. +(The 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: +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +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. -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. \ No newline at end of file diff --git a/docs/third-party-licenses/56.txt b/docs/third-party-licenses/56.txt index 3244f30e..a23e08a8 100644 --- a/docs/third-party-licenses/56.txt +++ b/docs/third-party-licenses/56.txt @@ -1,6 +1,4 @@ -MIT License - -Copyright (c) 2012 polygonplanet +Copyright (c) 2012 Raynos. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +7,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/docs/third-party-licenses/57.txt b/docs/third-party-licenses/57.txt index 63b62098..3244f30e 100644 --- a/docs/third-party-licenses/57.txt +++ b/docs/third-party-licenses/57.txt @@ -1,7 +1,21 @@ -Copyright (c) 2015-20 [these people](https://github.com/Rich-Harris/estree-walker/graphs/contributors) +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: +Copyright (c) 2012 polygonplanet -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +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 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. \ No newline at end of file +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. diff --git a/docs/third-party-licenses/58.txt b/docs/third-party-licenses/58.txt index e8f2aab9..33f5a9a3 100644 --- a/docs/third-party-licenses/58.txt +++ b/docs/third-party-licenses/58.txt @@ -1,23 +1,16 @@ -The MIT License -=============== +Copyright (c) 2012-2014 Andris Reinman -Copyright (c) 2010 Bruno Windels , Daniel Leinich . +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: -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. \ No newline at end of file +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. diff --git a/docs/third-party-licenses/59.txt b/docs/third-party-licenses/59.txt index fa7ceba3..63b62098 100644 --- a/docs/third-party-licenses/59.txt +++ b/docs/third-party-licenses/59.txt @@ -1,9 +1,7 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) +Copyright (c) 2015-20 [these people](https://github.com/Rich-Harris/estree-walker/graphs/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. +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. \ No newline at end of file diff --git a/docs/third-party-licenses/60.txt b/docs/third-party-licenses/60.txt index 506dc479..e8f2aab9 100644 --- a/docs/third-party-licenses/60.txt +++ b/docs/third-party-licenses/60.txt @@ -1,15 +1,23 @@ -ISC License +The MIT License +=============== -Copyright (c) 2018-2020, Andrea Giammarchi, @WebReflection +Copyright (c) 2010 Bruno Windels , Daniel Leinich . -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. +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 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. +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. \ No newline at end of file diff --git a/docs/third-party-licenses/61.txt b/docs/third-party-licenses/61.txt index 93546dfb..fa7ceba3 100644 --- a/docs/third-party-licenses/61.txt +++ b/docs/third-party-licenses/61.txt @@ -1,15 +1,9 @@ -(The MIT License) +MIT License -Copyright (c) 2011-2017 JP Richardson +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: +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. +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. diff --git a/docs/third-party-licenses/62.txt b/docs/third-party-licenses/62.txt index a5d1aad7..506dc479 100644 --- a/docs/third-party-licenses/62.txt +++ b/docs/third-party-licenses/62.txt @@ -1,21 +1,15 @@ -MIT License +ISC License -Copyright © 2017 Joseph T. Lapp +Copyright (c) 2018-2020, Andrea Giammarchi, @WebReflection -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: +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 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. +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. diff --git a/docs/third-party-licenses/63.txt b/docs/third-party-licenses/63.txt index 822d880b..93546dfb 100644 --- a/docs/third-party-licenses/63.txt +++ b/docs/third-party-licenses/63.txt @@ -1,19 +1,15 @@ -Copyright (c) 2012 Colingo. +(The 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: +Copyright (c) 2011-2017 JP Richardson -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +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 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. +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. diff --git a/docs/third-party-licenses/64.txt b/docs/third-party-licenses/64.txt index e906a25a..a5d1aad7 100644 --- a/docs/third-party-licenses/64.txt +++ b/docs/third-party-licenses/64.txt @@ -1,15 +1,21 @@ -The ISC License +MIT License -Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors +Copyright © 2017 Joseph T. Lapp -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. +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 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. +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. diff --git a/docs/third-party-licenses/65.txt b/docs/third-party-licenses/65.txt index 5aac82c7..822d880b 100644 --- a/docs/third-party-licenses/65.txt +++ b/docs/third-party-licenses/65.txt @@ -1,11 +1,19 @@ -Copyright 2008 Fair Oaks Labs, Inc. +Copyright (c) 2012 Colingo. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +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: -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -2. 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. - -3. Neither the name of the copyright holder 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. +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. diff --git a/docs/third-party-licenses/66.txt b/docs/third-party-licenses/66.txt index 40065881..e906a25a 100644 --- a/docs/third-party-licenses/66.txt +++ b/docs/third-party-licenses/66.txt @@ -1,49 +1,15 @@ -# image-quantization (https://github.com/igor-bezkrovny/image-quantization) +The ISC License -The MIT License (MIT) +Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors -Copyright (c) 2015 Igor Bezkrovny +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. -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://members.ozemail.com.au/~dekker/NEUQUANT.HTML - -NeuQuant Neural-Net Quantization Algorithm ------------------------------------------- - -Copyright (c) 1994 Anthony Dekker - -NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994. See -"Kohonen neural networks for optimal colour quantization" in "Network: -Computation in Neural Systems" Vol. 5 (1994) pp 351-367. for a discussion of -the algorithm. - -Any party obtaining a copy of these files from the author, directly or -indirectly, is granted, free of charge, a full and unrestricted irrevocable, -world-wide, paid up, royalty-free, nonexclusive right and license to deal in -this software and documentation files (the "Software"), including without -limitation the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to permit persons who -receive copies from any such party to do so, with the only requirement being -that this copyright notice remain intact. - -# https://github.com/leeoniya/RgbQuant.js - -Copyright (c) 2015, Leon Sorokin -All rights reserved. (MIT Licensed) +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. diff --git a/docs/third-party-licenses/67.txt b/docs/third-party-licenses/67.txt index dea3013d..d518d837 100644 --- a/docs/third-party-licenses/67.txt +++ b/docs/third-party-licenses/67.txt @@ -1,16 +1,21 @@ -The ISC License +Copyright (c) 2011 Alexander Shtuchkin -Copyright (c) Isaac Z. Schlueter +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: -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 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 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. +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. diff --git a/docs/third-party-licenses/68.txt b/docs/third-party-licenses/68.txt index 0b4aed18..5aac82c7 100644 --- a/docs/third-party-licenses/68.txt +++ b/docs/third-party-licenses/68.txt @@ -1,19 +1,11 @@ -Copyright (c) 2013 Stephen Sugden +Copyright 2008 Fair Oaks 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: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -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. +2. 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. + +3. Neither the name of the copyright holder 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. diff --git a/docs/third-party-licenses/69.txt b/docs/third-party-licenses/69.txt index 2385aa96..40065881 100644 --- a/docs/third-party-licenses/69.txt +++ b/docs/third-party-licenses/69.txt @@ -1,6 +1,8 @@ +# image-quantization (https://github.com/igor-bezkrovny/image-quantization) + The MIT License (MIT) -Copyright (c) 2015 Matt Andrews +Copyright (c) 2015 Igor Bezkrovny Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +11,39 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +# http://members.ozemail.com.au/~dekker/NEUQUANT.HTML + +NeuQuant Neural-Net Quantization Algorithm +------------------------------------------ + +Copyright (c) 1994 Anthony Dekker + +NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994. See +"Kohonen neural networks for optimal colour quantization" in "Network: +Computation in Neural Systems" Vol. 5 (1994) pp 351-367. for a discussion of +the algorithm. + +Any party obtaining a copy of these files from the author, directly or +indirectly, is granted, free of charge, a full and unrestricted irrevocable, +world-wide, paid up, royalty-free, nonexclusive right and license to deal in +this software and documentation files (the "Software"), including without +limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons who +receive copies from any such party to do so, with the only requirement being +that this copyright notice remain intact. + +# https://github.com/leeoniya/RgbQuant.js + +Copyright (c) 2015, Leon Sorokin +All rights reserved. (MIT Licensed) diff --git a/docs/third-party-licenses/70.txt b/docs/third-party-licenses/70.txt index baa5d485..dea3013d 100644 --- a/docs/third-party-licenses/70.txt +++ b/docs/third-party-licenses/70.txt @@ -1,21 +1,16 @@ -MIT License +The ISC License -Copyright (c) 2018 Oliver Moran +Copyright (c) Isaac Z. Schlueter -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: +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 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 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. -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. diff --git a/docs/third-party-licenses/71.txt b/docs/third-party-licenses/71.txt index 5f122668..0b4aed18 100644 --- a/docs/third-party-licenses/71.txt +++ b/docs/third-party-licenses/71.txt @@ -1,25 +1,19 @@ -Copyright (c) 2014, Eugene Ware -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Copyright (c) 2013 Stephen Sugden -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. 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. -3. Neither the name of Eugene Ware 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 EUGENE WARE ''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 EUGENE WARE 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. +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. diff --git a/docs/third-party-licenses/72.txt b/docs/third-party-licenses/72.txt index cb7e807b..2385aa96 100644 --- a/docs/third-party-licenses/72.txt +++ b/docs/third-party-licenses/72.txt @@ -1,15 +1,21 @@ -(The MIT License) +The MIT License (MIT) -Copyright (c) 2012-2015, JP Richardson +Copyright (c) 2015 Matt Andrews -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: +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 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. +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. diff --git a/docs/third-party-licenses/73.txt b/docs/third-party-licenses/73.txt index 9b10ce2a..baa5d485 100644 --- a/docs/third-party-licenses/73.txt +++ b/docs/third-party-licenses/73.txt @@ -1,5 +1,6 @@ -The MIT License (MIT) -Copyright (c) 2015 Jam3 +MIT License + +Copyright (c) 2018 Oliver Moran Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -11,11 +12,10 @@ 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. - +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. diff --git a/docs/third-party-licenses/74.txt b/docs/third-party-licenses/74.txt index e1f47dcf..5f122668 100644 --- a/docs/third-party-licenses/74.txt +++ b/docs/third-party-licenses/74.txt @@ -1,13 +1,25 @@ -Copyright 2015 Gareth Jones (with contributions from many other people) +Copyright (c) 2014, Eugene Ware +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: - 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. +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. 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. +3. Neither the name of Eugene Ware 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 EUGENE WARE ''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 EUGENE WARE 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. diff --git a/docs/third-party-licenses/75.txt b/docs/third-party-licenses/75.txt index 667e8b45..cb7e807b 100644 --- a/docs/third-party-licenses/75.txt +++ b/docs/third-party-licenses/75.txt @@ -1,7 +1,15 @@ -Copyright 2018 Rich Harris +(The 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: +Copyright (c) 2012-2015, 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. +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. diff --git a/docs/third-party-licenses/76.txt b/docs/third-party-licenses/76.txt index d3f46f7e..9b10ce2a 100644 --- a/docs/third-party-licenses/76.txt +++ b/docs/third-party-licenses/76.txt @@ -1,6 +1,5 @@ The MIT License (MIT) - -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer +Copyright (c) 2015 Jam3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +8,14 @@ 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 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. -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. diff --git a/docs/third-party-licenses/77.txt b/docs/third-party-licenses/77.txt index 72d356c1..e1f47dcf 100644 --- a/docs/third-party-licenses/77.txt +++ b/docs/third-party-licenses/77.txt @@ -1,19 +1,13 @@ -Copyright (c) 2013 Colingo. +Copyright 2015 Gareth Jones (with contributions from many other people) -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: + 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 -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + http://www.apache.org/licenses/LICENSE-2.0 -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. + 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. diff --git a/docs/third-party-licenses/78.txt b/docs/third-party-licenses/78.txt index 0a034db7..667e8b45 100644 --- a/docs/third-party-licenses/78.txt +++ b/docs/third-party-licenses/78.txt @@ -1,21 +1,7 @@ -Copyright (c) 2011-2023 James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me) +Copyright 2018 Rich Harris -This project is free software released under the 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: -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 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. +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. diff --git a/docs/third-party-licenses/79.txt b/docs/third-party-licenses/79.txt index 69b61253..d3f46f7e 100644 --- a/docs/third-party-licenses/79.txt +++ b/docs/third-party-licenses/79.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Zeit, Inc. +Copyright (c) 2010 Benjamin Thomas, Robert Kieffer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/docs/third-party-licenses/80.txt b/docs/third-party-licenses/80.txt index 37f56aa4..72d356c1 100644 --- a/docs/third-party-licenses/80.txt +++ b/docs/third-party-licenses/80.txt @@ -1,20 +1,19 @@ -The MIT License (MIT) +Copyright (c) 2013 Colingo. -Copyright 2017 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: -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 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. +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. diff --git a/docs/third-party-licenses/81.txt b/docs/third-party-licenses/81.txt index 660ffecb..0a034db7 100644 --- a/docs/third-party-licenses/81.txt +++ b/docs/third-party-licenses/81.txt @@ -1,6 +1,6 @@ -The MIT License (MIT) +Copyright (c) 2011-2023 James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me) -Copyright (c) 2016 David Frank +This project is free software released under the 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 @@ -9,14 +9,13 @@ 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 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. - +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/docs/third-party-licenses/82.txt b/docs/third-party-licenses/82.txt index a526f263..69b61253 100644 --- a/docs/third-party-licenses/82.txt +++ b/docs/third-party-licenses/82.txt @@ -1,24 +1,21 @@ -omggif is a JavaScript implementation of a GIF 89a encoder and decoder. +The MIT License (MIT) -https://github.com/deanm/omggif - - -(c) Dean McNamee , 2013. +Copyright (c) 2016 Zeit, 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 +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 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. +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. diff --git a/docs/third-party-licenses/83.txt b/docs/third-party-licenses/83.txt index a934ef8d..37f56aa4 100644 --- a/docs/third-party-licenses/83.txt +++ b/docs/third-party-licenses/83.txt @@ -1,21 +1,20 @@ -(The MIT License) +The MIT License (MIT) -Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn +Copyright 2017 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: +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 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. +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. diff --git a/docs/third-party-licenses/84.txt b/docs/third-party-licenses/84.txt index 00df52c2..660ffecb 100644 --- a/docs/third-party-licenses/84.txt +++ b/docs/third-party-licenses/84.txt @@ -1,56 +1,22 @@ -# parse-bmfont-ascii +The MIT License (MIT) -[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges) +Copyright (c) 2016 David Frank -Parses ASCII (text) [BMFont files](http://www.angelcode.com/products/bmfont/). +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: -Takes a string or Buffer: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -```js -var fs = require('fs') -var parse = require('parse-bmfont-xml') +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. -fs.readFileSync(__dirname+'/Arial.fnt', function(err, data) { - var result = parse(data) - console.log(result.info.face) // "Arial" - console.log(result.pages) // [ 'sheet0.png' ] - console.log(result.chars) // [ ... char data ... ] - console.log(result.kernings) // [ ... kernings data ... ] -}) -``` - -The spec for the returned JSON object is [here](https://github.com/mattdesl/bmfont2json/wiki/JsonSpec). The input data should match the spec, see [test/Nexa Light-32.fnt](test/Nexa Light-32.fnt) for an example. - -## See Also - -See [text-modules](https://github.com/mattdesl/text-modules) for related modules. - -## Usage - -[![NPM](https://nodei.co/npm/parse-bmfont-ascii.png)](https://www.npmjs.com/package/parse-bmfont-ascii) - -#### `result = parse(data)` - -Parses `data`, a string or Buffer that represents ASCII (text) data of an AngelCode BMFont file. The returned `result` object looks like this: - -```js -{ - pages: [ - "sheet_0.png", - "sheet_1.png" - ], - chars: [ - { chnl, height, id, page, width, x, y, xoffset, yoffset, xadvance }, - ... - ], - info: { ... }, - common: { ... }, - kernings: [ - { first, second, amount } - ] -} -``` - -## License - -MIT, see [LICENSE.md](http://github.com/mattdesl/parse-bmfont-ascii/blob/master/LICENSE.md) for details. diff --git a/docs/third-party-licenses/85.txt b/docs/third-party-licenses/85.txt index 9b10ce2a..a526f263 100644 --- a/docs/third-party-licenses/85.txt +++ b/docs/third-party-licenses/85.txt @@ -1,21 +1,24 @@ -The MIT License (MIT) -Copyright (c) 2015 Jam3 +omggif is a JavaScript implementation of a GIF 89a encoder and decoder. + +https://github.com/deanm/omggif + + +(c) Dean McNamee , 2013. 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 +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. +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. diff --git a/docs/third-party-licenses/86.txt b/docs/third-party-licenses/86.txt index 89a78cf2..a934ef8d 100644 --- a/docs/third-party-licenses/86.txt +++ b/docs/third-party-licenses/86.txt @@ -1,5 +1,6 @@ -The MIT License (MIT) -Copyright (c) 2015 Matt DesLauriers +(The MIT License) + +Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -8,14 +9,13 @@ 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. +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. diff --git a/docs/third-party-licenses/87.txt b/docs/third-party-licenses/87.txt index 6ca87bb1..00df52c2 100644 --- a/docs/third-party-licenses/87.txt +++ b/docs/third-party-licenses/87.txt @@ -1,21 +1,56 @@ -Copyright (c) 2014 David Björklund - -This software is released under the 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. +# parse-bmfont-ascii + +[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges) + +Parses ASCII (text) [BMFont files](http://www.angelcode.com/products/bmfont/). + +Takes a string or Buffer: + +```js +var fs = require('fs') +var parse = require('parse-bmfont-xml') + +fs.readFileSync(__dirname+'/Arial.fnt', function(err, data) { + var result = parse(data) + console.log(result.info.face) // "Arial" + console.log(result.pages) // [ 'sheet0.png' ] + console.log(result.chars) // [ ... char data ... ] + console.log(result.kernings) // [ ... kernings data ... ] +}) +``` + +The spec for the returned JSON object is [here](https://github.com/mattdesl/bmfont2json/wiki/JsonSpec). The input data should match the spec, see [test/Nexa Light-32.fnt](test/Nexa Light-32.fnt) for an example. + +## See Also + +See [text-modules](https://github.com/mattdesl/text-modules) for related modules. + +## Usage + +[![NPM](https://nodei.co/npm/parse-bmfont-ascii.png)](https://www.npmjs.com/package/parse-bmfont-ascii) + +#### `result = parse(data)` + +Parses `data`, a string or Buffer that represents ASCII (text) data of an AngelCode BMFont file. The returned `result` object looks like this: + +```js +{ + pages: [ + "sheet_0.png", + "sheet_1.png" + ], + chars: [ + { chnl, height, id, page, width, x, y, xoffset, yoffset, xadvance }, + ... + ], + info: { ... }, + common: { ... }, + kernings: [ + { first, second, amount } + ] +} +``` + +## License + +MIT, see [LICENSE.md](http://github.com/mattdesl/parse-bmfont-ascii/blob/master/LICENSE.md) for details. diff --git a/docs/third-party-licenses/88.txt b/docs/third-party-licenses/88.txt index 9ba5f032..9b10ce2a 100644 --- a/docs/third-party-licenses/88.txt +++ b/docs/third-party-licenses/88.txt @@ -1,6 +1,5 @@ -The MIT License - -Copyright (c) 2010-2017 Borewit +The MIT License (MIT) +Copyright (c) 2015 Jam3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +8,14 @@ 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 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. -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. diff --git a/docs/third-party-licenses/89.txt b/docs/third-party-licenses/89.txt index a8aee327..89a78cf2 100644 --- a/docs/third-party-licenses/89.txt +++ b/docs/third-party-licenses/89.txt @@ -1,6 +1,5 @@ -MIT License - -Copyright (c) 2018 Ethan Davis +The MIT License (MIT) +Copyright (c) 2015 Matt DesLauriers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -12,10 +11,11 @@ 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. \ No newline at end of file +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. + diff --git a/docs/third-party-licenses/90.txt b/docs/third-party-licenses/90.txt index 496098c6..6ca87bb1 100644 --- a/docs/third-party-licenses/90.txt +++ b/docs/third-party-licenses/90.txt @@ -1,15 +1,21 @@ -ISC License +Copyright (c) 2014 David Björklund -Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov +This software is released under the MIT license: -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. +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 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. +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. diff --git a/docs/third-party-licenses/91.txt b/docs/third-party-licenses/91.txt index 8bafb577..9ba5f032 100644 --- a/docs/third-party-licenses/91.txt +++ b/docs/third-party-licenses/91.txt @@ -1,15 +1,21 @@ -ISC License +The MIT License -Copyright (c) 2015, Mapbox +Copyright (c) 2010-2017 Borewit -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. +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 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. +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. diff --git a/docs/third-party-licenses/92.txt b/docs/third-party-licenses/92.txt index 6942e254..a8aee327 100644 --- a/docs/third-party-licenses/92.txt +++ b/docs/third-party-licenses/92.txt @@ -1,5 +1,6 @@ -pngjs2 original work Copyright (c) 2015 Luke Page & Original Contributors -pngjs derived work Copyright (c) 2012 Kuba Niegowski +MIT License + +Copyright (c) 2018 Ethan Davis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -8,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/docs/third-party-licenses/93.txt b/docs/third-party-licenses/93.txt index 6942e254..496098c6 100644 --- a/docs/third-party-licenses/93.txt +++ b/docs/third-party-licenses/93.txt @@ -1,20 +1,15 @@ -pngjs2 original work Copyright (c) 2015 Luke Page & Original Contributors -pngjs derived work Copyright (c) 2012 Kuba Niegowski +ISC 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: +Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +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", 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. +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. diff --git a/docs/third-party-licenses/94.txt b/docs/third-party-licenses/94.txt index da057b45..8bafb577 100644 --- a/docs/third-party-licenses/94.txt +++ b/docs/third-party-licenses/94.txt @@ -1,20 +1,15 @@ -The MIT License (MIT) +ISC License -Copyright 2013 Andrey Sitnik +Copyright (c) 2015, Mapbox -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: +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 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. +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. diff --git a/docs/third-party-licenses/95.txt b/docs/third-party-licenses/95.txt index b8c1246c..6942e254 100644 --- a/docs/third-party-licenses/95.txt +++ b/docs/third-party-licenses/95.txt @@ -1,22 +1,20 @@ -(The MIT License) +pngjs2 original work Copyright (c) 2015 Luke Page & Original Contributors +pngjs derived work Copyright (c) 2012 Kuba Niegowski -Copyright (c) 2013 Roman Shtylman +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: -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 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. +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. diff --git a/docs/third-party-licenses/96.txt b/docs/third-party-licenses/96.txt index 2873b3b2..6942e254 100644 --- a/docs/third-party-licenses/96.txt +++ b/docs/third-party-licenses/96.txt @@ -1,37 +1,11 @@ -Node.js is licensed for use as follows: +pngjs2 original work Copyright (c) 2015 Luke Page & Original Contributors +pngjs derived work Copyright (c) 2012 Kuba Niegowski -""" -Copyright Node.js contributors. 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. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. 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 +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 @@ -41,7 +15,6 @@ 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. -""" +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. diff --git a/docs/third-party-licenses/97.txt b/docs/third-party-licenses/97.txt index 4a717d86..da057b45 100644 --- a/docs/third-party-licenses/97.txt +++ b/docs/third-party-licenses/97.txt @@ -1,71 +1,20 @@ -![Karma CI](https://github.com/Borewit/readable-web-to-node-stream/workflows/Karma%20CI/badge.svg) -[![NPM version](https://badge.fury.io/js/readable-web-to-node-stream.svg)](https://npmjs.org/package/readable-web-to-node-stream) -[![npm downloads](http://img.shields.io/npm/dm/readable-web-to-node-stream.svg)](https://npmcharts.com/compare/readable-web-to-node-stream) -[![dependencies Status](https://david-dm.org/Borewit/readable-web-to-node-stream/status.svg)](https://david-dm.org/Borewit/readable-web-to-node-stream) -[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/readable-web-to-node-stream/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/readable-web-to-node-stream?targetFile=package.json) -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d4b511481b3a4634b6ca5c0724407eb9)](https://www.codacy.com/gh/Borewit/peek-readable/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Borewit/peek-readable&utm_campaign=Badge_Grade) -[![Coverage Status](https://coveralls.io/repos/github/Borewit/readable-web-to-node-stream/badge.svg?branch=master)](https://coveralls.io/github/Borewit/readable-web-to-node-stream?branch=master) -[![Minified size](https://badgen.net/bundlephobia/min/readable-web-to-node-stream)](https://bundlephobia.com/result?p=readable-web-to-node-stream) - -# readable-web-to-node-stream - -Converts a [Web-API readable stream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader) into a [Node.js readable stream](https://nodejs.org/api/stream.html#stream_readable_streams). - -## Installation -Install via [npm](http://npmjs.org/): - -```bash -npm install readable-web-to-node-stream -``` -or or [yarn](https://yarnpkg.com/): -```bash -yarn add readable-web-to-node-stream -``` - -## Compatibility - -Source is written in TypeScript and compiled to ECMAScript 2017 (ES8). - -Unit tests are performed on the following browsers: - -* Google Chrome 74.0 -* Firefox 68.0 -* Safari 12.0 -* Opera 60.0 - -## Example - -Import readable-web-stream-to-node in JavaScript: -```js -const {ReadableWebToNodeStream} = require('readable-web-to-node-stream'); - -async function download(url) { - const response = await fetch(url); - const readableWebStream = response.body; - const nodeStream = new ReadableWebToNodeStream(readableWebStream); -} -``` - -## API - -**constructor(stream: ReadableStream): Promise** - -`stream: ReadableStream`: the [Web-API readable stream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader). - -**close(): Promise** -Will cancel close the Readable-node stream, and will release Web-API-readable-stream. - -**waitForReadToComplete(): Promise** -If there is no unresolved read call to Web-API Readable​Stream immediately returns, otherwise it will wait until the read is resolved. - -## Licence - -(The MIT License) - -Copyright (c) 2019 Borewit - -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. +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. diff --git a/docs/third-party-licenses/98.txt b/docs/third-party-licenses/98.txt index cde61b6c..b8c1246c 100644 --- a/docs/third-party-licenses/98.txt +++ b/docs/third-party-licenses/98.txt @@ -1,21 +1,22 @@ -MIT License +(The MIT License) -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) 2013 Roman Shtylman -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: +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 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. +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. diff --git a/docs/third-party-licenses/99.txt b/docs/third-party-licenses/99.txt index d600e514..2873b3b2 100644 --- a/docs/third-party-licenses/99.txt +++ b/docs/third-party-licenses/99.txt @@ -1,15 +1,47 @@ -Copyright 2019 "David Mark Clements " +Node.js is licensed for use as follows: -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: +""" +Copyright Node.js contributors. All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions -of the Software. +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 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 +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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. 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. +""" diff --git a/docs/webapp/assets/index-151d7243.css b/docs/webapp/assets/index-151d7243.css new file mode 100644 index 00000000..3cc27e42 --- /dev/null +++ b/docs/webapp/assets/index-151d7243.css @@ -0,0 +1 @@ +html{font-family:ヒラギノ角ゴ ProN W3,Hiragino Kaku Gothic ProN,Avenir,Helvetica,Arial,メイリオ,Meiryo,verdana,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px}:root{--main-color: white;--main-bg-color: #5f8f5f;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #4b704b;--tab-highlight-color: white;--tab-content-bg-color: lightgray;--text-color-danger: white;--text-color: black;--text-bg-color: white;--text-bg-color-disabled: lightgray;--text-bg-color-selected: #a6eaff;--text-bg-color-warning: #ffff88;--text-bg-color-danger: red;--text-separator-color: gray;--text-dashed-separator-color: dimgray;--input-border-color: gray;--chart-bg-color: white;--promote-bg-color: white;--not-promote-bg-color: gray;--turn-label-color: lightyellow;--turn-label-bg-color: #2424e6;--turn-label-border-color: midnightblue;--control-button-color: white;--control-button-bg-color: #4b704b;--control-button-border-color: #000000;--disabled-control-button-bg-color: dimgray;--hovered-control-button-bg-color: #527a52;--close-button-bg-color: #ba151d;--hovered-close-button-bg-color: #d81922;--dialog-color: black;--dialog-bg-color: #d0d6d0;--dialog-border-color: dimgray;--info-dialog-color: white;--info-dialog-bg-color: #5f8f5f;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: #2c2c2c;--selector-color: black;--selector-bg-color: #e0ebe0;--pushed-selector-color: white;--pushed-selector-bg-color: #4b704b;--toggle-knob-color: white;--toggle-active-color: #5bd75b;--toggle-inactive-color: darkgray}.cherry-blossom{--main-color: black;--main-bg-color: #efc4c4;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #d06868;--tab-highlight-color: white;--tab-content-bg-color: lightgray;--text-color-danger: white;--text-color: black;--text-bg-color: #fdeeed;--text-bg-color-disabled: #f8c3bf;--text-bg-color-selected: #a6eaff;--text-bg-color-warning: #ffff88;--text-bg-color-danger: red;--text-separator-color: gray;--text-dashed-separator-color: dimgray;--input-border-color: gray;--chart-bg-color: #fdeeed;--promote-bg-color: #e8a9a9;--not-promote-bg-color: gray;--turn-label-color: lightyellow;--turn-label-bg-color: #2424e6;--turn-label-border-color: midnightblue;--control-button-color: white;--control-button-bg-color: #d06868;--control-button-border-color: #000000;--disabled-control-button-bg-color: dimgray;--hovered-control-button-bg-color: #e18f8f;--close-button-bg-color: #c91720;--hovered-close-button-bg-color: #e51d27;--dialog-color: black;--dialog-bg-color: #efc4c4;--dialog-border-color: #cd6666;--info-dialog-color: white;--info-dialog-bg-color: #c84e4e;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: #2c2c2c;--selector-color: black;--selector-bg-color: #f4dddd;--pushed-selector-color: white;--pushed-selector-bg-color: #d06868;--toggle-knob-color: white;--toggle-active-color: #5bd75b;--toggle-inactive-color: darkgray}.autumn{--main-color: black;--main-bg-color: #dbb579;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #720f13;--tab-highlight-color: white;--tab-content-bg-color: #d8ad6b;--text-color-danger: white;--text-color: black;--text-bg-color: #ead2ae;--text-bg-color-disabled: #d4a65e;--text-bg-color-selected: #bc8e7e;--text-bg-color-warning: #ffff88;--text-bg-color-danger: red;--text-separator-color: gray;--text-dashed-separator-color: dimgray;--input-border-color: gray;--chart-bg-color: #f1e1c9;--promote-bg-color: #ead2ae;--not-promote-bg-color: gray;--turn-label-color: lightyellow;--turn-label-bg-color: #2424e6;--turn-label-border-color: midnightblue;--control-button-color: white;--control-button-bg-color: #566132;--control-button-border-color: #000000;--disabled-control-button-bg-color: #8c8c8c;--hovered-control-button-bg-color: #748244;--close-button-bg-color: #c91720;--hovered-close-button-bg-color: #e51d27;--dialog-color: black;--dialog-bg-color: #dbb579;--dialog-border-color: #bc6c25;--info-dialog-color: white;--info-dialog-bg-color: #bc6c25;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: #2c2c2c;--selector-color: black;--selector-bg-color: #e9d3af;--pushed-selector-color: white;--pushed-selector-bg-color: #566132;--toggle-knob-color: white;--toggle-active-color: #e1e469;--toggle-inactive-color: darkgray}.snow{--main-color: black;--main-bg-color: #e9e8ef;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #567ac5;--tab-highlight-color: white;--tab-content-bg-color: lightgray;--text-color-danger: white;--text-color: black;--text-bg-color: #fcfcfd;--text-bg-color-disabled: #dddde9;--text-bg-color-selected: #a6eaff;--text-bg-color-warning: #ffff88;--text-bg-color-danger: red;--text-separator-color: gray;--text-dashed-separator-color: dimgray;--input-border-color: gray;--chart-bg-color: #e9e8ef;--promote-bg-color: #e9e8ef;--not-promote-bg-color: gray;--turn-label-color: lightyellow;--turn-label-bg-color: #2424e6;--turn-label-border-color: midnightblue;--control-button-color: white;--control-button-bg-color: #567ac5;--control-button-border-color: #000000;--disabled-control-button-bg-color: dimgray;--hovered-control-button-bg-color: #99afe4;--close-button-bg-color: #c91720;--hovered-close-button-bg-color: #e51d27;--dialog-color: black;--dialog-bg-color: #e9e8ef;--dialog-border-color: #a6abd0;--info-dialog-color: white;--info-dialog-bg-color: #2859a6;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: #2c2c2c;--selector-color: black;--selector-bg-color: #c8d4ec;--pushed-selector-color: white;--pushed-selector-bg-color: #6384c9;--toggle-knob-color: white;--toggle-active-color: #4a70c0;--toggle-inactive-color: darkgray}.dark{--main-color: white;--main-bg-color: black;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #3c3c3c;--tab-highlight-color: white;--tab-content-bg-color: black;--text-color-danger: white;--text-color: white;--text-bg-color: #202020;--text-bg-color-disabled: gray;--text-bg-color-selected: #4444b3;--text-bg-color-warning: #b08000;--text-bg-color-danger: red;--text-separator-color: gainsboro;--text-dashed-separator-color: lightgray;--input-border-color: gray;--chart-bg-color: #202020;--promote-bg-color: dimgray;--not-promote-bg-color: black;--turn-label-color: lightyellow;--turn-label-bg-color: black;--turn-label-border-color: lightyellow;--control-button-color: white;--control-button-bg-color: #4d6868;--control-button-border-color: #3f5454;--disabled-control-button-bg-color: #5c5c5c;--hovered-control-button-bg-color: #6c8d8d;--close-button-bg-color: #aa141b;--hovered-close-button-bg-color: #c91720;--dialog-color: white;--dialog-bg-color: black;--dialog-border-color: dimgray;--info-dialog-color: white;--info-dialog-bg-color: black;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: black;--selector-color: white;--selector-bg-color: #3c3c3c;--pushed-selector-color: white;--pushed-selector-bg-color: #547272;--toggle-knob-color: #ddd;--toggle-active-color: #259625;--toggle-inactive-color: #5c5c5c}body{margin:0}body::-webkit-scrollbar{display:none}#app{text-align:center;height:100vh;width:100vw}.full{width:100%;height:100%}.column{display:flex;flex-direction:column}.row{display:flex;flex-direction:row}.column.reverse{flex-direction:column-reverse}.row.reverse{flex-direction:row-reverse}.column.wrap,.row.wrap{flex-wrap:wrap}.column>.auto{flex:auto}.row>.auto{flex:auto}.column>.grow{flex:1}.row>.grow{flex:1}.regular-interval{justify-content:space-between}.hidden{display:none!important}.icon{height:100%;vertical-align:top}.icon+span{margin-left:5px;line-height:100%}.warning{background-color:var(--text-bg-color-warning)}.scroll{overflow:auto}button{color:var(--control-button-color);background:linear-gradient(to top,var(--control-button-bg-color) 80%,white 140%);border-color:var(--control-button-border-color);border-style:solid;border-width:0px 1px 1px 0px;font-size:.8rem}button:active{border-width:1px 0px 0px 1px}button:disabled{background:linear-gradient(to top,var(--disabled-control-button-bg-color) 80%,white 140%)}button:hover:enabled{background:linear-gradient(to top,var(--hovered-control-button-bg-color) 80%,white 140%)}button.close:enabled{background:linear-gradient(to top,var(--close-button-bg-color) 80%,white 140%)}button.close:hover:enabled{background:linear-gradient(to top,var(--hovered-close-button-bg-color) 80%,white 140%)}button.thin{margin:0;padding:2px 25px}button.wide{width:100%;margin:5px 0;padding:5px 0}input{color:var(--text-color);background-color:var(--text-bg-color);border-color:var(--input-border-color);border-style:solid;border-width:.8px;height:20px;padding:1px 2px;font-size:.9rem}input:disabled{background:var(--text-bg-color-disabled)}input:read-only{background:var(--text-bg-color-disabled)}select{color:var(--text-color);background-color:var(--text-bg-color);border-width:.8px;height:23.6px;padding:1px 2px;font-size:.9rem}textarea{color:var(--text-color);background-color:var(--text-bg-color);border-width:.8px;font-size:.9rem}textarea:disabled{background:var(--text-bg-color-disabled)}textarea:read-only{background:var(--text-bg-color-disabled)}dialog{display:flex;flex-direction:column;color:var(--dialog-color);background-color:var(--dialog-bg-color);border:1px solid var(--dialog-border-color);border-radius:10px;padding:15px;font-size:1rem}dialog::backdrop{background:rgba(0,0,0,.5)}dialog button{margin:0 5px;padding:5px 15px}dialog hr{width:100%;border:none;border-top:1px dashed var(--dialog-border-color)}dialog select{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:auto}dialog .title{text-align:center;margin-bottom:5px;font-weight:700;font-size:1.2em}dialog .form-group{border:1px dashed var(--dialog-border-color);border-radius:10px;padding:10px;margin:10px 0}dialog .row>.form-group{margin-top:0}dialog .row>.form-group+*{margin-left:10px}dialog .form-item{text-align:left;margin:10px 0}dialog .form-item>*{vertical-align:top}dialog .form-item.center{text-align:center}dialog .form-item.center>*:nth-child(n+2){display:inline-block;margin-left:5px}dialog .form-item-label{display:inline-block;font-size:.95em;text-align:left;margin-right:5px;width:90px}dialog .form-item-label-wide{display:inline-block;font-size:.95em;text-align:left;margin-right:5px;width:160px}dialog .center .form-item-label{display:inline-block;text-align:center;margin-right:5px;width:auto}dialog .form-item-unit{display:inline-block;text-align:left;font-size:.8em;margin:0 5px;padding-top:.2em}dialog .note{text-align:left;font-size:.8em}dialog .note:nth-child(n+2){margin-top:5px}dialog .main-buttons{display:flex;flex-direction:row;margin-top:5px;margin-left:auto;margin-right:auto}dialog .main-buttons button{padding:5px 25px}dialog .icon{width:36px}dialog button .icon{width:1.4em}dialog button .icon+span{margin-left:5px;line-height:1.4em}dialog .message-box{display:flex;flex-direction:row;align-items:center}dialog .message-box .icon{margin-right:15px}dialog.menu{border-style:none;background-color:transparent}dialog.menu .groups{width:80vw;margin:auto;display:flex;flex-direction:column}dialog.menu .group{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;margin:20px 0}dialog.menu button{width:150px;margin:10px;display:flex;flex-direction:column;align-items:center}dialog.menu button:enabled{box-shadow:2px 2px 5px 3px #d3d3d3}dialog.menu button:disabled{box-shadow:2px 2px 5px 3px gray}dialog.menu .icon{height:36px;width:36px;display:block}dialog.menu .label{display:block;font-size:.9rem;margin-top:.5rem}.frame[data-v-e5bb7653]{color:var(--text-color);user-select:none;position:relative}.frame>*[data-v-e5bb7653]{position:absolute}.hand>*[data-v-e5bb7653]{position:absolute}.player-name[data-v-e5bb7653]{background-color:var(--text-bg-color);display:flex;justify-content:left;align-items:center;border:1px solid black;box-sizing:border-box}.player-name-text[data-v-e5bb7653]{margin-left:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clock[data-v-e5bb7653]{background-color:var(--text-bg-color);display:flex;justify-content:center;align-items:center;border:1px solid black;box-sizing:border-box}.clock.warning[data-v-e5bb7653]{background-color:var(--text-bg-color-warning)}.clock.danger[data-v-e5bb7653]{color:var(--text-color-danger);background-color:var(--text-bg-color-danger)}.clock-text[data-v-e5bb7653]{vertical-align:middle}.promotion-selector[data-v-e5bb7653]{overflow:hidden}.select-button[data-v-e5bb7653]{float:left;width:50%;height:100%}.promote[data-v-e5bb7653]{background-color:var(--promote-bg-color)}.not-promote[data-v-e5bb7653]{background-color:var(--not-promote-bg-color)}.turn[data-v-e5bb7653]{color:var(--turn-label-color);background-color:var(--turn-label-bg-color);border-color:var(--turn-label-border-color);overflow:hidden;display:flex;justify-content:center;align-items:center}.control-item[data-v-6176a2f4]{width:100%;height:19%;font-size:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:clip;line-height:200%;padding:0 5%}.top-control .control-item[data-v-6176a2f4]:not(:last-child){margin-bottom:1%}.bottom-control .control-item[data-v-6176a2f4]:not(:last-child){margin-top:1%}.control-item .icon[data-v-6176a2f4]{height:68%}div.container[data-v-32abf837]{display:flex;flex-direction:row;align-items:center}div.toggle[data-v-32abf837]{position:relative}input[data-v-32abf837]{position:absolute;left:0;top:0;width:100%;height:100%;margin:0;cursor:pointer;opacity:0}input~.slider[data-v-32abf837]{pointer-events:none;position:absolute;left:0;top:0;width:100%;height:100%;box-sizing:border-box;background-color:var(--toggle-inactive-color);box-shadow:1px 1px 3px 0 var(--control-shadow-color)}input~.knob[data-v-32abf837]{pointer-events:none;content:"";position:absolute;border-radius:100%;left:0;top:0;background:var(--toggle-knob-color);box-shadow:0 0 5px #0006;transition:.2s}input:checked~.slider[data-v-32abf837]{background-color:var(--toggle-active-color)}input:checked~.knob[data-v-32abf837]{left:50%}input:focus~.slider[data-v-32abf837]{border:1px solid white}label[data-v-32abf837]{margin-left:5px;cursor:pointer;white-space:nowrap}.record-view[data-v-84a49c2b]{max-width:600px;user-select:none}.control[data-v-84a49c2b]{width:100%;height:40px}.control button[data-v-84a49c2b]{height:100%;width:25%;padding:0}.move-list[data-v-84a49c2b]{margin-top:1px;width:100%;height:calc(70% - 50px);overflow-x:hidden;overflow-y:auto;color:var(--text-color);background-color:var(--text-bg-color)}.branch-list-area[data-v-84a49c2b]{margin-top:2px;width:100%}.branch-list[data-v-84a49c2b]{width:auto;height:100%;overflow-x:hidden;overflow-y:auto;color:var(--text-color);background-color:var(--text-bg-color)}.branch-list-control[data-v-84a49c2b]{width:40px;height:100%}.branch-list-control button[data-v-84a49c2b]{height:50%;width:100%;padding:0}.branch-list-control button .icon[data-v-84a49c2b]{height:40px}.move-element[data-v-84a49c2b]{height:1.4em;width:100%;line-height:1.4em;font-size:.85em}.move-element.has-branch[data-v-84a49c2b]:not(.selected){background-color:var(--text-bg-color-warning)}.move-element.selected[data-v-84a49c2b]{background-color:var(--text-bg-color-selected)}.move-number[data-v-84a49c2b]{min-width:38px;height:100%;padding-right:5px;text-align:right;vertical-align:baseline;white-space:nowrap;overflow:hidden;text-overflow:clip}.move-text[data-v-84a49c2b]{min-width:100px;height:100%;padding-right:5px;text-align:left;vertical-align:baseline;white-space:nowrap;overflow:hidden;text-overflow:clip}.move-time[data-v-84a49c2b]{min-width:90px;height:100%;padding-right:5px;text-align:left;vertical-align:baseline;white-space:nowrap;overflow:hidden;text-overflow:clip}.move-comment[data-v-84a49c2b]{height:100%;text-align:left;vertical-align:baseline;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bookmark[data-v-84a49c2b]{display:inline-block;height:100%;color:var(--main-color);background-color:var(--main-bg-color);padding-left:5px;padding-right:5px;box-sizing:border-box;border:1px solid var(--text-separator-color);border-radius:5px}.options[data-v-84a49c2b]{width:100%;margin:0;padding:2px 0 0;color:var(--main-color);background-color:var(--main-bg-color)}.option[data-v-84a49c2b]{padding:0 6px;margin-right:4px}.record-pane[data-v-1648cb4c]{box-sizing:border-box}.record[data-v-1648cb4c]{width:100%;min-height:0}.bookmark[data-v-daf4d00a]{text-align:left;margin:10px 0}.bookmark>button[data-v-daf4d00a]{width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.root[data-v-82cfd0f8]{background-color:var(--main-bg-color)}.text[data-v-82cfd0f8]{width:100%;resize:none;box-sizing:border-box}.play-buttons[data-v-82cfd0f8]{height:28px}button[data-v-82cfd0f8]{height:27px;line-height:25px;font-size:16px;padding-left:5px;padding-right:5px}.bookmark-area[data-v-82cfd0f8]{padding:1px 0;height:28px;text-align:left;white-space:nowrap}.bookmark-area>*[data-v-82cfd0f8]{vertical-align:middle}.bookmark[data-v-82cfd0f8]{max-width:250px;margin-right:5px}.root[data-v-50ccf2a4]{padding-bottom:2px;background-color:var(--active-tab-bg-color)}.headers[data-v-50ccf2a4]{width:100%;height:18px;text-align:left}.header[data-v-50ccf2a4]{margin:0 4px 0 0;padding:0 5px;background-color:var(--text-bg-color)}.label[data-v-50ccf2a4],.value[data-v-50ccf2a4]{font-size:13px;white-space:nowrap}.list-header[data-v-50ccf2a4]{height:16px;width:100%;font-size:12px;background-color:var(--text-bg-color)}.list[data-v-50ccf2a4]{width:100%;overflow-y:scroll;background-color:var(--text-bg-color)}.list-item[data-v-50ccf2a4]{height:24px;font-size:12px}.list-item.highlight[data-v-50ccf2a4]{background:var(--text-bg-color-warning);border-bottom:dashed var(--text-separator-color) 1px}.list-column[data-v-50ccf2a4]{height:100%;white-space:nowrap;overflow:hidden;line-height:22px}.list-column.multipv-index[data-v-50ccf2a4]{width:30px;text-align:right}.list-column.depth[data-v-50ccf2a4]{width:44px;text-align:right}.list-column.nodes[data-v-50ccf2a4]{width:78px;text-align:right}.list-column.time[data-v-50ccf2a4],.list-column.score[data-v-50ccf2a4]{width:52px;text-align:right}.list-column.score-flag[data-v-50ccf2a4]{width:20px;text-align:left}.list-column.text[data-v-50ccf2a4]{text-align:left;text-overflow:ellipsis}.list-column button[data-v-50ccf2a4]{margin:0 0 1px;padding:1px 5px 1px 2px;height:22px;vertical-align:middle}.list-column .icon[data-v-50ccf2a4]{height:18px}.list-column button span[data-v-50ccf2a4]{line-height:19px}.root[data-v-27a6373b]{background-color:var(--chart-bg-color)}.root[data-v-14c1fefe]{background-color:var(--text-bg-color)}.main[data-v-14c1fefe]{overflow:auto}.element[data-v-14c1fefe]{margin:3px;text-align:left}.key[data-v-14c1fefe]{width:150px}.value[data-v-14c1fefe]{white-space:pre-wrap;word-break:break-all;width:calc(100% - 150px)}input.value[data-v-14c1fefe]{width:min(500px,calc(100% - 200px))}.options[data-v-14c1fefe]{padding:2px 5px;height:24px;text-align:left;color:var(--main-color);background-color:var(--main-bg-color)}.tabs[data-v-57d32810]{width:100%;user-select:none;background:linear-gradient(to top,var(--tab-bg-color) 80%,white 140%);padding-bottom:2px}.tab[data-v-57d32810]{height:23px;color:var(--tab-color);border-bottom:solid 3px transparent;padding:0 20px 0 10px;line-height:28px;font-size:1em;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tab.selected[data-v-57d32810]{border-bottom:solid 3px var(--tab-highlight-color)}.tab.end[data-v-57d32810]{margin-left:auto}.tab-contents .tab-content[data-v-57d32810]{color:var(--text-color);background-color:var(--tab-content-bg-color)}.splitpanes{display:flex;width:100%;height:100%}.splitpanes--vertical{flex-direction:row}.splitpanes--horizontal{flex-direction:column}.splitpanes--dragging *{user-select:none}.splitpanes__pane{width:100%;height:100%;overflow:hidden}.splitpanes--vertical .splitpanes__pane{transition:width .2s ease-out}.splitpanes--horizontal .splitpanes__pane{transition:height .2s ease-out}.splitpanes--dragging .splitpanes__pane{transition:none}.splitpanes__splitter{touch-action:none}.splitpanes--vertical>.splitpanes__splitter{min-width:1px;cursor:col-resize}.splitpanes--horizontal>.splitpanes__splitter{min-height:1px;cursor:row-resize}.splitpanes.default-theme .splitpanes__pane{background-color:#f2f2f2}.splitpanes.default-theme .splitpanes__splitter{background-color:#fff;box-sizing:border-box;position:relative;flex-shrink:0}.splitpanes.default-theme .splitpanes__splitter:before,.splitpanes.default-theme .splitpanes__splitter:after{content:"";position:absolute;top:50%;left:50%;background-color:#00000026;transition:background-color .3s}.splitpanes.default-theme .splitpanes__splitter:hover:before,.splitpanes.default-theme .splitpanes__splitter:hover:after{background-color:#00000040}.splitpanes.default-theme .splitpanes__splitter:first-child{cursor:auto}.default-theme.splitpanes .splitpanes .splitpanes__splitter{z-index:1}.default-theme.splitpanes--vertical>.splitpanes__splitter,.default-theme .splitpanes--vertical>.splitpanes__splitter{width:7px;border-left:1px solid #eee;margin-left:-1px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{transform:translateY(-50%);width:1px;height:30px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{margin-left:-2px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{margin-left:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter,.default-theme .splitpanes--horizontal>.splitpanes__splitter{height:7px;border-top:1px solid #eee;margin-top:-1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{transform:translate(-50%);width:30px;height:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{margin-top:-2px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{margin-top:1px}.main-frame.splitpanes--horizontal>.splitpanes__splitter{height:8px;cursor:ns-resize}.bottom-frame.splitpanes--vertical>.splitpanes__splitter{width:8px;cursor:ew-resize}.main-frame .splitpanes__splitter{background-color:transparent}.main-frame .splitpanes__splitter:hover{background-color:#1e90ff}.bottom-frame.splitpanes--vertical>.splitpanes__pane{box-shadow:6px 0 6px -3px var(--shadow-color)}.unhide-tabview-button[data-v-e8732df8]{width:100%;height:30px;font-size:100%;text-align:center;line-height:180%;padding:0 5%}div.container[data-v-3118c214]{align-items:center}div.item[data-v-3118c214]{position:relative;margin-top:1px;margin-bottom:1px}div.item[data-v-3118c214]:not(:last-child){margin-right:2px}input[data-v-3118c214]{position:absolute;left:0;top:0;width:100%;height:100%;margin:0;opacity:0}.button[data-v-3118c214]{pointer-events:none;left:0;top:0;display:flex;align-items:center;box-sizing:border-box;border:2px solid var(--selector-bg-color);color:var(--selector-color);background-color:var(--selector-bg-color);box-shadow:1px 1px 3px 0 var(--control-shadow-color)}input:checked~.button[data-v-3118c214]{color:var(--pushed-selector-color);border:2px solid var(--pushed-selector-bg-color);background-color:var(--pushed-selector-bg-color)}input:focus~.button[data-v-3118c214]{border:2px solid white}.label[data-v-3118c214]{pointer-events:none;text-align:center;width:100%}.option-list[data-v-1c17ad8b]{width:740px;height:calc(100vh - 220px);overflow:auto}.option[data-v-1c17ad8b]{margin:5px 5px 0;padding:5px;border-bottom:1px solid var(--text-separator-color)}.option-filter[data-v-1c17ad8b]{margin:0 5px 5px}.filter[data-v-1c17ad8b]{width:100%}.option-name[data-v-1c17ad8b]{width:290px;text-align:left;border-right:1px solid var(--text-separator-color);margin-right:10px}.option-name .option-name-original[data-v-1c17ad8b]{font-size:.7em}.option-unchangeable[data-v-1c17ad8b]{width:415px;text-align:left;white-space:pre-wrap;word-break:break-all}.option-value[data-v-1c17ad8b]{width:415px;text-align:left}.option-value-control[data-v-1c17ad8b]{margin-right:10px}.option-value-text[data-v-1c17ad8b]{width:380px;text-align:left}.option-value-filename[data-v-1c17ad8b]{width:250px;text-align:left}.option-value-number[data-v-1c17ad8b]{width:100px;text-align:right}.option-value-combo[data-v-1c17ad8b]{text-align:left}.option button[data-v-1c17ad8b]{vertical-align:top}.option-default-value[data-v-1c17ad8b]{font-size:.7em;white-space:nowrap;font-weight:600;opacity:.7}.root[data-v-28321643]{width:100%}.player-select[data-v-28321643]{width:100%;margin-bottom:5px}.player-info[data-v-28321643]{line-height:1.3em;font-size:.8em}.player-info-key[data-v-28321643]{width:110px;height:100%;text-align:left;vertical-align:baseline}.player-info-value[data-v-28321643]{height:100%;text-align:left;vertical-align:baseline}.player-setting[data-v-28321643]{margin:5px auto 0}.top-label[data-v-6c39a128]{text-align:center}.full-column[data-v-6c39a128]{width:580px}.half-column[data-v-6c39a128]{width:280px}.players-control[data-v-6c39a128]{width:100%}.players-control>*[data-v-6c39a128]{margin-top:5px}input.time[data-v-6c39a128]{text-align:right;width:40px}input.number[data-v-6c39a128]{text-align:right;width:80px}.root[data-v-b929b527]{width:560px}input.number[data-v-b929b527]{width:100px}.long-text[data-v-b929b527]{width:250px}.root[data-v-c47f4227]{width:450px}.remove-button[data-v-c47f4227]{margin-top:5px}input.number[data-v-c47f4227]{text-align:right;width:80px}.engine-list[data-v-1a55690d]{width:720px;height:400px;overflow:auto}.engine-filter[data-v-1a55690d]{margin:0 5px 5px}.filter[data-v-1a55690d]{width:100%}.engine[data-v-1a55690d]{margin:0 5px;padding:5px;border-bottom:1px solid gray}.engine-name[data-v-1a55690d]{text-align:left;width:450px;margin-top:5px;margin-right:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.frame[data-v-ca9c5577]{color:#000;background-color:#fff;user-select:none;position:relative;overflow:hidden}.frame>*[data-v-ca9c5577]{position:absolute}.header[data-v-ca9c5577]{white-space:nowrap}.footer[data-v-ca9c5577]{white-space:pre-wrap;text-align:left}.board[data-v-c237f6a3]{padding:5px;margin:auto}.board.game[data-v-c237f6a3]{background-color:var(--main-bg-color)}.board.book[data-v-c237f6a3]{background-color:#fff}.form-item>*[data-v-c237f6a3]{vertical-align:middle}input.size[data-v-c237f6a3]{width:50px;text-align:right}input.header[data-v-c237f6a3]{width:200px}container[data-v-b16a3cda]{display:flex;flex-direction:column;align-items:center}button.select[data-v-b16a3cda]{display:inline-block;margin:0;width:100%}.preview[data-v-b16a3cda]{display:inline-block;max-width:100%;height:auto}.settings[data-v-08083f84]{width:590px;height:540px}.section[data-v-08083f84]{margin:20px 0}.section-title[data-v-08083f84]{font-size:1.1em}input.toggle[data-v-08083f84]{height:1em;width:1em;margin-right:10px}input.file-path[data-v-08083f84]{width:250px}.image-selector[data-v-08083f84]{display:inline-block;width:200px}.selector[data-v-08083f84]{max-width:400px}.message[data-v-2908a87e]{width:460px;text-align:left;font-size:.8em}textarea[data-v-2908a87e]{width:460px;height:60vh;min-height:100px;resize:none}dialog.bussy[data-v-76d58604]{color:var(--bussy-dialog-color);background-color:var(--bussy-dialog-bg-color);border:3px solid var(--bussy-dialog-border-color)}dialog.confirm[data-v-9f781aaf]{color:var(--info-dialog-color);background-color:var(--info-dialog-bg-color);border:3px solid var(--info-dialog-border-color)}dialog.info[data-v-370c03d8]{color:var(--info-dialog-color);background-color:var(--info-dialog-bg-color);border:3px solid var(--info-dialog-border-color)}.attachment[data-v-370c03d8]{text-align:left}.item[data-v-34c3016d]{margin:10px 0}.index[data-v-34c3016d]{font-weight:700;font-size:.8em;margin:0}.message[data-v-34c3016d]{font-size:.8em;margin:0}dialog.error[data-v-34c3016d]{color:var(--error-dialog-color);background-color:var(--error-dialog-bg-color);border:3px solid var(--error-dialog-border-color)}dialog.error button[data-v-34c3016d]{color:var(--error-dialog-button-color);background:linear-gradient(to top,var(--error-dialog-button-bg-color) 80%,white 140%)}dialog.error button[data-v-34c3016d]:hover{background:linear-gradient(to top,var(--hovered-error-dialog-button-bg-color) 80%,white 140%)}.root[data-v-93e774e5]{width:420px}input.toggle[data-v-93e774e5]{height:1em;width:1em;margin-right:10px}input.small[data-v-93e774e5]{width:50px}.selector[data-v-93e774e5]{max-width:210px}dialog.bussy[data-v-1fb6a0d5]{color:var(--info-dialog-color);background-color:var(--info-dialog-bg-color);border:3px solid var(--info-dialog-border-color)}.root[data-v-e8e6e178]{width:420px}.board[data-v-20ead1fe]{margin-left:auto;margin-right:auto}.control-row[data-v-20ead1fe]{width:100%;height:25%;margin:0}.control-item[data-v-20ead1fe]{width:50%;height:100%;margin:0;font-size:100%;padding:0 5%}.control-row[data-v-20ead1fe]:not(:last-child){margin-bottom:2%}.control-item[data-v-20ead1fe]:not(:last-child){margin-right:2%}.control-item .icon[data-v-20ead1fe]{height:80%;width:auto}.control-item-wide[data-v-20ead1fe]{width:100%;height:19%;margin:0;font-size:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:clip;line-height:200%;padding:0 5%}.control-item-wide[data-v-20ead1fe]:not(:last-child){margin-top:1%}.control-item-wide .icon[data-v-20ead1fe]{height:68%}.informations[data-v-20ead1fe]{height:120px;width:80vw;overflow-y:scroll;margin-left:auto;margin-right:auto;margin-top:5px;color:var(--text-color);background-color:var(--text-bg-color)}.information[data-v-20ead1fe]{font-size:14px;margin:2px;text-align:left}.move-element.selected[data-v-20ead1fe]{background-color:var(--text-bg-color-selected)}.root[data-v-b724763d]{color:var(--main-color);background-color:var(--main-bg-color)} diff --git a/docs/webapp/assets/index-2d3be054.js b/docs/webapp/assets/index-2d3be054.js new file mode 100644 index 00000000..8426703f --- /dev/null +++ b/docs/webapp/assets/index-2d3be054.js @@ -0,0 +1,46 @@ +var xu=Object.defineProperty;var nu=(t,e,x)=>e in t?xu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:x}):t[e]=x;var b=(t,e,x)=>(nu(t,typeof e!="symbol"?e+"":e,x),x);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function x(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=x(i);fetch(i.href,s)}})();function Lr(t,e){const x=Object.create(null),n=t.split(",");for(let i=0;i!!x[i.toLowerCase()]:i=>!!x[i]}const at={},Xx=[],f0=()=>{},iu=()=>!1,su=/^on[^a-z]/,Ks=t=>su.test(t),Hr=t=>t.startsWith("onUpdate:"),Dt=Object.assign,Ur=(t,e)=>{const x=t.indexOf(e);x>-1&&t.splice(x,1)},ou=Object.prototype.hasOwnProperty,Le=(t,e)=>ou.call(t,e),be=Array.isArray,Zx=t=>js(t)==="[object Map]",gc=t=>js(t)==="[object Set]",Ie=t=>typeof t=="function",Ct=t=>typeof t=="string",$r=t=>typeof t=="symbol",Et=t=>t!==null&&typeof t=="object",mc=t=>Et(t)&&Ie(t.then)&&Ie(t.catch),Cc=Object.prototype.toString,js=t=>Cc.call(t),ru=t=>js(t).slice(8,-1),Fc=t=>js(t)==="[object Object]",Gr=t=>Ct(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Xi=Lr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),qs=t=>{const e=Object.create(null);return x=>e[x]||(e[x]=t(x))},au=/-(\w)/g,sn=qs(t=>t.replace(au,(e,x)=>x?x.toUpperCase():"")),Eu=/\B([A-Z])/g,un=qs(t=>t.replace(Eu,"-$1").toLowerCase()),Dc=qs(t=>t.charAt(0).toUpperCase()+t.slice(1)),Fo=qs(t=>t?`on${Dc(t)}`:""),Yn=(t,e)=>!Object.is(t,e),Do=(t,e)=>{for(let x=0;x{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:x})},lu=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Oa;const Jo=()=>Oa||(Oa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function de(t){if(be(t)){const e={};for(let x=0;x{if(x){const n=x.split(uu);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Ke(t){let e="";if(Ct(t))e=t;else if(be(t))for(let x=0;xCt(t)?t:t==null?"":be(t)||Et(t)&&(t.toString===Cc||!Ie(t.toString))?JSON.stringify(t,vc,2):String(t),vc=(t,e)=>e&&e.__v_isRef?vc(t,e.value):Zx(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((x,[n,i])=>(x[`${n} =>`]=i,x),{})}:gc(e)?{[`Set(${e.size})`]:[...e.values()]}:Et(e)&&!be(e)&&!Fc(e)?String(e):e;let c0;class fu{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=c0,!e&&c0&&(this.index=(c0.scopes||(c0.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const x=c0;try{return c0=this,e()}finally{c0=x}}}on(){c0=this}off(){c0=this.parent}stop(e){if(this._active){let x,n;for(x=0,n=this.effects.length;x{const e=new Set(t);return e.w=0,e.n=0,e},bc=t=>(t.w&sx)>0,yc=t=>(t.n&sx)>0,mu=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let x=0;for(let n=0;n{(l==="length"||l>=a)&&r.push(E)})}else switch(x!==void 0&&r.push(o.get(x)),e){case"add":be(t)?Gr(x)&&r.push(o.get("length")):(r.push(o.get(Tx)),Zx(t)&&r.push(o.get(Qo)));break;case"delete":be(t)||(r.push(o.get(Tx)),Zx(t)&&r.push(o.get(Qo)));break;case"set":Zx(t)&&r.push(o.get(Tx));break}if(r.length===1)r[0]&&er(r[0]);else{const a=[];for(const E of r)E&&a.push(...E);er(Wr(a))}}function er(t,e){const x=be(t)?t:[...t];for(const n of x)n.computed&&Ha(n);for(const n of x)n.computed||Ha(n)}function Ha(t,e){(t!==h0||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const Fu=Lr("__proto__,__v_isRef,__isVue"),Tc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter($r)),Du=Vr(),_u=Vr(!1,!0),vu=Vr(!0),Ua=bu();function bu(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...x){const n=We(this);for(let s=0,o=this.length;s{t[e]=function(...x){An();const n=We(this)[e].apply(this,x);return hn(),n}}),t}function yu(t){const e=We(this);return Yt(e,"has",t),e.hasOwnProperty(t)}function Vr(t=!1,e=!1){return function(n,i,s){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&s===(t?e?Wu:Nc:e?Mc:kc).get(n))return n;const o=be(n);if(!t){if(o&&Le(Ua,i))return Reflect.get(Ua,i,s);if(i==="hasOwnProperty")return yu}const r=Reflect.get(n,i,s);return($r(i)?Tc.has(i):Fu(i))||(t||Yt(n,"get",i),e)?r:Mt(r)?o&&Gr(i)?r:r.value:Et(r)?t?Rc(r):m0(r):r}}const Su=Ic(),wu=Ic(!0);function Ic(t=!1){return function(x,n,i,s){let o=x[n];if(on(o)&&Mt(o)&&!Mt(i))return!1;if(!t&&(!fs(i)&&!on(i)&&(o=We(o),i=We(i)),!be(x)&&Mt(o)&&!Mt(i)))return o.value=i,!0;const r=be(x)&&Gr(n)?Number(n)t,Ys=t=>Reflect.getPrototypeOf(t);function yi(t,e,x=!1,n=!1){t=t.__v_raw;const i=We(t),s=We(e);x||(e!==s&&Yt(i,"get",e),Yt(i,"get",s));const{has:o}=Ys(i),r=n?Kr:x?Yr:Jn;if(o.call(i,e))return r(t.get(e));if(o.call(i,s))return r(t.get(s));t!==i&&t.get(e)}function Si(t,e=!1){const x=this.__v_raw,n=We(x),i=We(t);return e||(t!==i&&Yt(n,"has",t),Yt(n,"has",i)),t===i?x.has(t):x.has(t)||x.has(i)}function wi(t,e=!1){return t=t.__v_raw,!e&&Yt(We(t),"iterate",Tx),Reflect.get(t,"size",t)}function $a(t){t=We(t);const e=We(this);return Ys(e).has.call(e,t)||(e.add(t),z0(e,"add",t,t)),this}function Ga(t,e){e=We(e);const x=We(this),{has:n,get:i}=Ys(x);let s=n.call(x,t);s||(t=We(t),s=n.call(x,t));const o=i.call(x,t);return x.set(t,e),s?Yn(e,o)&&z0(x,"set",t,e):z0(x,"add",t,e),this}function Wa(t){const e=We(this),{has:x,get:n}=Ys(e);let i=x.call(e,t);i||(t=We(t),i=x.call(e,t)),n&&n.call(e,t);const s=e.delete(t);return i&&z0(e,"delete",t,void 0),s}function za(){const t=We(this),e=t.size!==0,x=t.clear();return e&&z0(t,"clear",void 0,void 0),x}function Ti(t,e){return function(n,i){const s=this,o=s.__v_raw,r=We(o),a=e?Kr:t?Yr:Jn;return!t&&Yt(r,"iterate",Tx),o.forEach((E,l)=>n.call(i,a(E),a(l),s))}}function Ii(t,e,x){return function(...n){const i=this.__v_raw,s=We(i),o=Zx(s),r=t==="entries"||t===Symbol.iterator&&o,a=t==="keys"&&o,E=i[t](...n),l=x?Kr:e?Yr:Jn;return!e&&Yt(s,"iterate",a?Qo:Tx),{next(){const{value:u,done:h}=E.next();return h?{value:u,done:h}:{value:r?[l(u[0]),l(u[1])]:l(u),done:h}},[Symbol.iterator](){return this}}}}function q0(t){return function(...e){return t==="delete"?!1:this}}function Nu(){const t={get(s){return yi(this,s)},get size(){return wi(this)},has:Si,add:$a,set:Ga,delete:Wa,clear:za,forEach:Ti(!1,!1)},e={get(s){return yi(this,s,!1,!0)},get size(){return wi(this)},has:Si,add:$a,set:Ga,delete:Wa,clear:za,forEach:Ti(!1,!0)},x={get(s){return yi(this,s,!0)},get size(){return wi(this,!0)},has(s){return Si.call(this,s,!0)},add:q0("add"),set:q0("set"),delete:q0("delete"),clear:q0("clear"),forEach:Ti(!0,!1)},n={get(s){return yi(this,s,!0,!0)},get size(){return wi(this,!0)},has(s){return Si.call(this,s,!0)},add:q0("add"),set:q0("set"),delete:q0("delete"),clear:q0("clear"),forEach:Ti(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=Ii(s,!1,!1),x[s]=Ii(s,!0,!1),e[s]=Ii(s,!1,!0),n[s]=Ii(s,!0,!0)}),[t,x,e,n]}const[Ru,Ou,Lu,Hu]=Nu();function jr(t,e){const x=e?t?Hu:Lu:t?Ou:Ru;return(n,i,s)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(Le(x,i)&&i in n?x:n,i,s)}const Uu={get:jr(!1,!1)},$u={get:jr(!1,!0)},Gu={get:jr(!0,!1)},kc=new WeakMap,Mc=new WeakMap,Nc=new WeakMap,Wu=new WeakMap;function zu(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Vu(t){return t.__v_skip||!Object.isExtensible(t)?0:zu(ru(t))}function m0(t){return on(t)?t:qr(t,!1,Pc,Uu,kc)}function Ku(t){return qr(t,!1,Mu,$u,Mc)}function Rc(t){return qr(t,!0,ku,Gu,Nc)}function qr(t,e,x,n,i){if(!Et(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=i.get(t);if(s)return s;const o=Vu(t);if(o===0)return t;const r=new Proxy(t,o===2?n:x);return i.set(t,r),r}function Qx(t){return on(t)?Qx(t.__v_raw):!!(t&&t.__v_isReactive)}function on(t){return!!(t&&t.__v_isReadonly)}function fs(t){return!!(t&&t.__v_isShallow)}function Oc(t){return Qx(t)||on(t)}function We(t){const e=t&&t.__v_raw;return e?We(e):t}function Lc(t){return ds(t,"__v_skip",!0),t}const Jn=t=>Et(t)?m0(t):t,Yr=t=>Et(t)?Rc(t):t;function Hc(t){tx&&h0&&(t=We(t),wc(t.dep||(t.dep=Wr())))}function Uc(t,e){t=We(t);const x=t.dep;x&&er(x)}function Mt(t){return!!(t&&t.__v_isRef===!0)}function O(t){return ju(t,!1)}function ju(t,e){return Mt(t)?t:new qu(t,e)}class qu{constructor(e,x){this.__v_isShallow=x,this.dep=void 0,this.__v_isRef=!0,this._rawValue=x?e:We(e),this._value=x?e:Jn(e)}get value(){return Hc(this),this._value}set value(e){const x=this.__v_isShallow||fs(e)||on(e);e=x?e:We(e),Yn(e,this._rawValue)&&(this._rawValue=e,this._value=x?e:Jn(e),Uc(this))}}function A(t){return Mt(t)?t.value:t}const Yu={get:(t,e,x)=>A(Reflect.get(t,e,x)),set:(t,e,x,n)=>{const i=t[e];return Mt(i)&&!Mt(x)?(i.value=x,!0):Reflect.set(t,e,x,n)}};function $c(t){return Qx(t)?t:new Proxy(t,Yu)}class Ju{constructor(e,x,n,i){this._setter=x,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new zr(e,()=>{this._dirty||(this._dirty=!0,Uc(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=We(this);return Hc(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function Xu(t,e,x=!1){let n,i;const s=Ie(t);return s?(n=t,i=f0):(n=t.get,i=t.set),new Ju(n,i,s||!i,x)}function xx(t,e,x,n){let i;try{i=n?t(...n):t()}catch(s){Js(s,e,x)}return i}function p0(t,e,x,n){if(Ie(t)){const s=xx(t,e,x,n);return s&&mc(s)&&s.catch(o=>{Js(o,e,x)}),s}const i=[];for(let s=0;s>>1;Zn(It[n])y0&&It.splice(e,1)}function xA(t){be(t)?en.push(...t):(!O0||!O0.includes(t,t.allowRecurse?_x+1:_x))&&en.push(t),Wc()}function Va(t,e=Xn?y0+1:0){for(;eZn(x)-Zn(n)),_x=0;_xt.id==null?1/0:t.id,nA=(t,e)=>{const x=Zn(t)-Zn(e);if(x===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return x};function Vc(t){tr=!1,Xn=!0,It.sort(nA);const e=f0;try{for(y0=0;y0Ct(B)?B.trim():B)),u&&(i=x.map(lu))}let r,a=n[r=Fo(e)]||n[r=Fo(sn(e))];!a&&s&&(a=n[r=Fo(un(e))]),a&&p0(a,t,6,i);const E=n[r+"Once"];if(E){if(!t.emitted)t.emitted={};else if(t.emitted[r])return;t.emitted[r]=!0,p0(E,t,6,i)}}function Kc(t,e,x=!1){const n=e.emitsCache,i=n.get(t);if(i!==void 0)return i;const s=t.emits;let o={},r=!1;if(!Ie(t)){const a=E=>{const l=Kc(E,e,!0);l&&(r=!0,Dt(o,l))};!x&&e.mixins.length&&e.mixins.forEach(a),t.extends&&a(t.extends),t.mixins&&t.mixins.forEach(a)}return!s&&!r?(Et(t)&&n.set(t,null),null):(be(s)?s.forEach(a=>o[a]=null):Dt(o,s),Et(t)&&n.set(t,o),o)}function Xs(t,e){return!t||!Ks(e)?!1:(e=e.slice(2).replace(/Once$/,""),Le(t,e[0].toLowerCase()+e.slice(1))||Le(t,un(e))||Le(t,e))}let qt=null,Zs=null;function ps(t){const e=qt;return qt=t,Zs=t&&t.type.__scopeId||null,e}function Qs(t){Zs=t}function eo(){Zs=null}function u0(t,e=qt,x){if(!e||t._n)return t;const n=(...i)=>{n._d&&tE(-1);const s=ps(e);let o;try{o=t(...i)}finally{ps(s),n._d&&tE(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function _o(t){const{type:e,vnode:x,proxy:n,withProxy:i,props:s,propsOptions:[o],slots:r,attrs:a,emit:E,render:l,renderCache:u,data:h,setupState:B,ctx:p,inheritAttrs:f}=t;let g,C;const w=ps(t);try{if(x.shapeFlag&4){const _=i||n;g=v0(l.call(_,_,u,s,B,h,p)),C=a}else{const _=e;g=v0(_.length>1?_(s,{attrs:a,slots:r,emit:E}):_(s,null)),C=e.props?a:sA(a)}}catch(_){Ln.length=0,Js(_,t,1),g=R(ox)}let M=g;if(C&&f!==!1){const _=Object.keys(C),{shapeFlag:I}=M;_.length&&I&7&&(o&&_.some(Hr)&&(C=oA(C,o)),M=rn(M,C))}return x.dirs&&(M=rn(M),M.dirs=M.dirs?M.dirs.concat(x.dirs):x.dirs),x.transition&&(M.transition=x.transition),g=M,ps(w),g}const sA=t=>{let e;for(const x in t)(x==="class"||x==="style"||Ks(x))&&((e||(e={}))[x]=t[x]);return e},oA=(t,e)=>{const x={};for(const n in t)(!Hr(n)||!(n.slice(9)in e))&&(x[n]=t[n]);return x};function rA(t,e,x){const{props:n,children:i,component:s}=t,{props:o,children:r,patchFlag:a}=e,E=s.emitsOptions;if(e.dirs||e.transition)return!0;if(x&&a>=0){if(a&1024)return!0;if(a&16)return n?Ka(n,o,E):!!o;if(a&8){const l=e.dynamicProps;for(let u=0;ut.__isSuspense;function lA(t,e){e&&e.pendingBranch?be(t)?e.effects.push(...t):e.effects.push(t):xA(t)}const Pi={};function nx(t,e,x){return jc(t,e,x)}function jc(t,e,{immediate:x,deep:n,flush:i,onTrack:s,onTrigger:o}=at){var r;const a=gu()===((r=Pt)==null?void 0:r.scope)?Pt:null;let E,l=!1,u=!1;if(Mt(t)?(E=()=>t.value,l=fs(t)):Qx(t)?(E=()=>t,n=!0):be(t)?(u=!0,l=t.some(_=>Qx(_)||fs(_)),E=()=>t.map(_=>{if(Mt(_))return _.value;if(Qx(_))return qx(_);if(Ie(_))return xx(_,a,2)})):Ie(t)?e?E=()=>xx(t,a,2):E=()=>{if(!(a&&a.isUnmounted))return h&&h(),p0(t,a,3,[B])}:E=f0,e&&n){const _=E;E=()=>qx(_())}let h,B=_=>{h=w.onStop=()=>{xx(_,a,4)}},p;if(ei)if(B=f0,e?x&&p0(e,a,3,[E(),u?[]:void 0,B]):E(),i==="sync"){const _=QA();p=_.__watcherHandles||(_.__watcherHandles=[])}else return f0;let f=u?new Array(t.length).fill(Pi):Pi;const g=()=>{if(w.active)if(e){const _=w.run();(n||l||(u?_.some((I,D)=>Yn(I,f[D])):Yn(_,f)))&&(h&&h(),p0(e,a,3,[_,f===Pi?void 0:u&&f[0]===Pi?[]:f,B]),f=_)}else w.run()};g.allowRecurse=!!e;let C;i==="sync"?C=g:i==="post"?C=()=>Vt(g,a&&a.suspense):(g.pre=!0,a&&(g.id=a.uid),C=()=>Xr(g));const w=new zr(E,C);e?x?g():f=w.run():i==="post"?Vt(w.run.bind(w),a&&a.suspense):w.run();const M=()=>{w.stop(),a&&a.scope&&Ur(a.scope.effects,w)};return p&&p.push(M),M}function cA(t,e,x){const n=this.proxy,i=Ct(t)?t.includes(".")?qc(n,t):()=>n[t]:t.bind(n,n);let s;Ie(e)?s=e:(s=e.handler,x=e);const o=Pt;an(this);const r=jc(i,s.bind(n),x);return o?an(o):Ix(),r}function qc(t,e){const x=e.split(".");return()=>{let n=t;for(let i=0;i{qx(x,e)});else if(Fc(t))for(const x in t)qx(t[x],e);return t}function hx(t,e,x,n){const i=t.dirs,s=e&&e.dirs;for(let o=0;oDt({name:t.name},e,{setup:t}))():t}const Rn=t=>!!t.type.__asyncLoader,Yc=t=>t.type.__isKeepAlive;function uA(t,e){Jc(t,"a",e)}function AA(t,e){Jc(t,"da",e)}function Jc(t,e,x=Pt){const n=t.__wdc||(t.__wdc=()=>{let i=x;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(to(e,n,x),x){let i=x.parent;for(;i&&i.parent;)Yc(i.parent.vnode)&&hA(n,e,x,i),i=i.parent}}function hA(t,e,x,n){const i=to(e,t,n,!0);hi(()=>{Ur(n[e],i)},x)}function to(t,e,x=Pt,n=!1){if(x){const i=x[t]||(x[t]=[]),s=e.__weh||(e.__weh=(...o)=>{if(x.isUnmounted)return;An(),an(x);const r=p0(e,x,t,o);return Ix(),hn(),r});return n?i.unshift(s):i.push(s),s}}const K0=t=>(e,x=Pt)=>(!ei||t==="sp")&&to(t,(...n)=>e(...n),x),BA=K0("bm"),qe=K0("m"),Xc=K0("bu"),Bn=K0("u"),_t=K0("bum"),hi=K0("um"),dA=K0("sp"),fA=K0("rtg"),pA=K0("rtc");function gA(t,e=Pt){to("ec",t,e)}const mA=Symbol.for("v-ndc");function Ne(t,e,x,n){let i;const s=x&&x[n];if(be(t)||Ct(t)){i=new Array(t.length);for(let o=0,r=t.length;oe(o,r,void 0,s&&s[r]));else{const o=Object.keys(t);i=new Array(o.length);for(let r=0,a=o.length;rCs(e)?!(e.type===ox||e.type===De&&!Zc(e.children)):!0)?t:null}const nr=t=>t?E8(t)?xa(t)||t.proxy:nr(t.parent):null,On=Dt(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>nr(t.parent),$root:t=>nr(t.root),$emit:t=>t.emit,$options:t=>Zr(t),$forceUpdate:t=>t.f||(t.f=()=>Xr(t.update)),$nextTick:t=>t.n||(t.n=Qu.bind(t.proxy)),$watch:t=>cA.bind(t)}),vo=(t,e)=>t!==at&&!t.__isScriptSetup&&Le(t,e),CA={get({_:t},e){const{ctx:x,setupState:n,data:i,props:s,accessCache:o,type:r,appContext:a}=t;let E;if(e[0]!=="$"){const B=o[e];if(B!==void 0)switch(B){case 1:return n[e];case 2:return i[e];case 4:return x[e];case 3:return s[e]}else{if(vo(n,e))return o[e]=1,n[e];if(i!==at&&Le(i,e))return o[e]=2,i[e];if((E=t.propsOptions[0])&&Le(E,e))return o[e]=3,s[e];if(x!==at&&Le(x,e))return o[e]=4,x[e];ir&&(o[e]=0)}}const l=On[e];let u,h;if(l)return e==="$attrs"&&Yt(t,"get",e),l(t);if((u=r.__cssModules)&&(u=u[e]))return u;if(x!==at&&Le(x,e))return o[e]=4,x[e];if(h=a.config.globalProperties,Le(h,e))return h[e]},set({_:t},e,x){const{data:n,setupState:i,ctx:s}=t;return vo(i,e)?(i[e]=x,!0):n!==at&&Le(n,e)?(n[e]=x,!0):Le(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=x,!0)},has({_:{data:t,setupState:e,accessCache:x,ctx:n,appContext:i,propsOptions:s}},o){let r;return!!x[o]||t!==at&&Le(t,o)||vo(e,o)||(r=s[0])&&Le(r,o)||Le(n,o)||Le(On,o)||Le(i.config.globalProperties,o)},defineProperty(t,e,x){return x.get!=null?t._.accessCache[e]=0:Le(x,"value")&&this.set(t,e,x.value,null),Reflect.defineProperty(t,e,x)}};function ja(t){return be(t)?t.reduce((e,x)=>(e[x]=null,e),{}):t}let ir=!0;function FA(t){const e=Zr(t),x=t.proxy,n=t.ctx;ir=!1,e.beforeCreate&&qa(e.beforeCreate,t,"bc");const{data:i,computed:s,methods:o,watch:r,provide:a,inject:E,created:l,beforeMount:u,mounted:h,beforeUpdate:B,updated:p,activated:f,deactivated:g,beforeDestroy:C,beforeUnmount:w,destroyed:M,unmounted:_,render:I,renderTracked:D,renderTriggered:P,errorCaptured:y,serverPrefetch:T,expose:N,inheritAttrs:G,components:W,directives:Ae,filters:Q}=e;if(E&&DA(E,n,null),o)for(const Z in o){const K=o[Z];Ie(K)&&(n[Z]=K.bind(x))}if(i){const Z=i.call(x,x);Et(Z)&&(t.data=m0(Z))}if(ir=!0,s)for(const Z in s){const K=s[Z],J=Ie(K)?K.bind(x,x):Ie(K.get)?K.get.bind(x,x):f0,ue=!Ie(K)&&Ie(K.set)?K.set.bind(x):f0,we=me({get:J,set:ue});Object.defineProperty(n,Z,{enumerable:!0,configurable:!0,get:()=>we.value,set:Fe=>we.value=Fe})}if(r)for(const Z in r)Qc(r[Z],n,x,Z);if(a){const Z=Ie(a)?a.call(x):a;Reflect.ownKeys(Z).forEach(K=>{wA(K,Z[K])})}l&&qa(l,t,"c");function te(Z,K){be(K)?K.forEach(J=>Z(J.bind(x))):K&&Z(K.bind(x))}if(te(BA,u),te(qe,h),te(Xc,B),te(Bn,p),te(uA,f),te(AA,g),te(gA,y),te(pA,D),te(fA,P),te(_t,w),te(hi,_),te(dA,T),be(N))if(N.length){const Z=t.exposed||(t.exposed={});N.forEach(K=>{Object.defineProperty(Z,K,{get:()=>x[K],set:J=>x[K]=J})})}else t.exposed||(t.exposed={});I&&t.render===f0&&(t.render=I),G!=null&&(t.inheritAttrs=G),W&&(t.components=W),Ae&&(t.directives=Ae)}function DA(t,e,x=f0){be(t)&&(t=sr(t));for(const n in t){const i=t[n];let s;Et(i)?"default"in i?s=Zi(i.from||n,i.default,!0):s=Zi(i.from||n):s=Zi(i),Mt(s)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[n]=s}}function qa(t,e,x){p0(be(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,x)}function Qc(t,e,x,n){const i=n.includes(".")?qc(x,n):()=>x[n];if(Ct(t)){const s=e[t];Ie(s)&&nx(i,s)}else if(Ie(t))nx(i,t.bind(x));else if(Et(t))if(be(t))t.forEach(s=>Qc(s,e,x,n));else{const s=Ie(t.handler)?t.handler.bind(x):e[t.handler];Ie(s)&&nx(i,s,t)}}function Zr(t){const e=t.type,{mixins:x,extends:n}=e,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,r=s.get(e);let a;return r?a=r:!i.length&&!x&&!n?a=e:(a={},i.length&&i.forEach(E=>gs(a,E,o,!0)),gs(a,e,o)),Et(e)&&s.set(e,a),a}function gs(t,e,x,n=!1){const{mixins:i,extends:s}=e;s&&gs(t,s,x,!0),i&&i.forEach(o=>gs(t,o,x,!0));for(const o in e)if(!(n&&o==="expose")){const r=_A[o]||x&&x[o];t[o]=r?r(t[o],e[o]):e[o]}return t}const _A={data:Ya,props:Ja,emits:Ja,methods:vn,computed:vn,beforeCreate:Ut,created:Ut,beforeMount:Ut,mounted:Ut,beforeUpdate:Ut,updated:Ut,beforeDestroy:Ut,beforeUnmount:Ut,destroyed:Ut,unmounted:Ut,activated:Ut,deactivated:Ut,errorCaptured:Ut,serverPrefetch:Ut,components:vn,directives:vn,watch:bA,provide:Ya,inject:vA};function Ya(t,e){return e?t?function(){return Dt(Ie(t)?t.call(this,this):t,Ie(e)?e.call(this,this):e)}:e:t}function vA(t,e){return vn(sr(t),sr(e))}function sr(t){if(be(t)){const e={};for(let x=0;x1)return x&&Ie(e)?e.call(n&&n.proxy):e}}function TA(t,e,x,n=!1){const i={},s={};ds(s,no,1),t.propsDefaults=Object.create(null),t8(t,e,i,s);for(const o in t.propsOptions[0])o in i||(i[o]=void 0);x?t.props=n?i:Ku(i):t.type.props?t.props=i:t.props=s,t.attrs=s}function IA(t,e,x,n){const{props:i,attrs:s,vnode:{patchFlag:o}}=t,r=We(i),[a]=t.propsOptions;let E=!1;if((n||o>0)&&!(o&16)){if(o&8){const l=t.vnode.dynamicProps;for(let u=0;u{a=!0;const[h,B]=x8(u,e,!0);Dt(o,h),B&&r.push(...B)};!x&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}if(!s&&!a)return Et(t)&&n.set(t,Xx),Xx;if(be(s))for(let l=0;l-1,B[1]=f<0||p-1||Le(B,"default"))&&r.push(u)}}}const E=[o,r];return Et(t)&&n.set(t,E),E}function Xa(t){return t[0]!=="$"}function Za(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function Qa(t,e){return Za(t)===Za(e)}function eE(t,e){return be(e)?e.findIndex(x=>Qa(x,t)):Ie(e)&&Qa(e,t)?0:-1}const n8=t=>t[0]==="_"||t==="$stable",Qr=t=>be(t)?t.map(v0):[v0(t)],PA=(t,e,x)=>{if(e._n)return e;const n=u0((...i)=>Qr(e(...i)),x);return n._c=!1,n},i8=(t,e,x)=>{const n=t._ctx;for(const i in t){if(n8(i))continue;const s=t[i];if(Ie(s))e[i]=PA(i,s,n);else if(s!=null){const o=Qr(s);e[i]=()=>o}}},s8=(t,e)=>{const x=Qr(e);t.slots.default=()=>x},kA=(t,e)=>{if(t.vnode.shapeFlag&32){const x=e._;x?(t.slots=We(e),ds(e,"_",x)):i8(e,t.slots={})}else t.slots={},e&&s8(t,e);ds(t.slots,no,1)},MA=(t,e,x)=>{const{vnode:n,slots:i}=t;let s=!0,o=at;if(n.shapeFlag&32){const r=e._;r?x&&r===1?s=!1:(Dt(i,e),!x&&r===1&&delete i._):(s=!e.$stable,i8(e,i)),o=e}else e&&(s8(t,e),o={default:1});if(s)for(const r in i)!n8(r)&&!(r in o)&&delete i[r]};function rr(t,e,x,n,i=!1){if(be(t)){t.forEach((h,B)=>rr(h,e&&(be(e)?e[B]:e),x,n,i));return}if(Rn(n)&&!i)return;const s=n.shapeFlag&4?xa(n.component)||n.component.proxy:n.el,o=i?null:s,{i:r,r:a}=t,E=e&&e.r,l=r.refs===at?r.refs={}:r.refs,u=r.setupState;if(E!=null&&E!==a&&(Ct(E)?(l[E]=null,Le(u,E)&&(u[E]=null)):Mt(E)&&(E.value=null)),Ie(a))xx(a,r,12,[o,l]);else{const h=Ct(a),B=Mt(a);if(h||B){const p=()=>{if(t.f){const f=h?Le(u,a)?u[a]:l[a]:a.value;i?be(f)&&Ur(f,s):be(f)?f.includes(s)||f.push(s):h?(l[a]=[s],Le(u,a)&&(u[a]=l[a])):(a.value=[s],t.k&&(l[t.k]=a.value))}else h?(l[a]=o,Le(u,a)&&(u[a]=o)):B&&(a.value=o,t.k&&(l[t.k]=o))};o?(p.id=-1,Vt(p,x)):p()}}}const Vt=lA;function NA(t){return RA(t)}function RA(t,e){const x=Jo();x.__VUE__=!0;const{insert:n,remove:i,patchProp:s,createElement:o,createText:r,createComment:a,setText:E,setElementText:l,parentNode:u,nextSibling:h,setScopeId:B=f0,insertStaticContent:p}=t,f=(F,v,z,j=null,q=null,ie=null,Ee=!1,xe=null,oe=!!v.dynamicChildren)=>{if(F===v)return;F&&!pn(F,v)&&(j=Bt(F),Fe(F,q,ie,!0),F=null),v.patchFlag===-2&&(oe=!1,v.dynamicChildren=null);const{type:X,ref:fe,shapeFlag:Be}=v;switch(X){case xo:g(F,v,z,j);break;case ox:C(F,v,z,j);break;case bo:F==null&&w(v,z,j,Ee);break;case De:W(F,v,z,j,q,ie,Ee,xe,oe);break;default:Be&1?I(F,v,z,j,q,ie,Ee,xe,oe):Be&6?Ae(F,v,z,j,q,ie,Ee,xe,oe):(Be&64||Be&128)&&X.process(F,v,z,j,q,ie,Ee,xe,oe,yt)}fe!=null&&q&&rr(fe,F&&F.ref,ie,v||F,!v)},g=(F,v,z,j)=>{if(F==null)n(v.el=r(v.children),z,j);else{const q=v.el=F.el;v.children!==F.children&&E(q,v.children)}},C=(F,v,z,j)=>{F==null?n(v.el=a(v.children||""),z,j):v.el=F.el},w=(F,v,z,j)=>{[F.el,F.anchor]=p(F.children,v,z,j,F.el,F.anchor)},M=({el:F,anchor:v},z,j)=>{let q;for(;F&&F!==v;)q=h(F),n(F,z,j),F=q;n(v,z,j)},_=({el:F,anchor:v})=>{let z;for(;F&&F!==v;)z=h(F),i(F),F=z;i(v)},I=(F,v,z,j,q,ie,Ee,xe,oe)=>{Ee=Ee||v.type==="svg",F==null?D(v,z,j,q,ie,Ee,xe,oe):T(F,v,q,ie,Ee,xe,oe)},D=(F,v,z,j,q,ie,Ee,xe)=>{let oe,X;const{type:fe,props:Be,shapeFlag:Ce,transition:_e,dirs:Pe}=F;if(oe=F.el=o(F.type,ie,Be&&Be.is,Be),Ce&8?l(oe,F.children):Ce&16&&y(F.children,oe,null,j,q,ie&&fe!=="foreignObject",Ee,xe),Pe&&hx(F,null,j,"created"),P(oe,F,F.scopeId,Ee,j),Be){for(const je in Be)je!=="value"&&!Xi(je)&&s(oe,je,null,Be[je],ie,F.children,j,q,ze);"value"in Be&&s(oe,"value",null,Be.value),(X=Be.onVnodeBeforeMount)&&F0(X,j,F)}Pe&&hx(F,null,j,"beforeMount");const Xe=(!q||q&&!q.pendingBranch)&&_e&&!_e.persisted;Xe&&_e.beforeEnter(oe),n(oe,v,z),((X=Be&&Be.onVnodeMounted)||Xe||Pe)&&Vt(()=>{X&&F0(X,j,F),Xe&&_e.enter(oe),Pe&&hx(F,null,j,"mounted")},q)},P=(F,v,z,j,q)=>{if(z&&B(F,z),j)for(let ie=0;ie{for(let X=oe;X{const xe=v.el=F.el;let{patchFlag:oe,dynamicChildren:X,dirs:fe}=v;oe|=F.patchFlag&16;const Be=F.props||at,Ce=v.props||at;let _e;z&&Bx(z,!1),(_e=Ce.onVnodeBeforeUpdate)&&F0(_e,z,v,F),fe&&hx(v,F,z,"beforeUpdate"),z&&Bx(z,!0);const Pe=q&&v.type!=="foreignObject";if(X?N(F.dynamicChildren,X,xe,z,j,Pe,ie):Ee||K(F,v,xe,null,z,j,Pe,ie,!1),oe>0){if(oe&16)G(xe,v,Be,Ce,z,j,q);else if(oe&2&&Be.class!==Ce.class&&s(xe,"class",null,Ce.class,q),oe&4&&s(xe,"style",Be.style,Ce.style,q),oe&8){const Xe=v.dynamicProps;for(let je=0;je{_e&&F0(_e,z,v,F),fe&&hx(v,F,z,"updated")},j)},N=(F,v,z,j,q,ie,Ee)=>{for(let xe=0;xe{if(z!==j){if(z!==at)for(const xe in z)!Xi(xe)&&!(xe in j)&&s(F,xe,z[xe],null,Ee,v.children,q,ie,ze);for(const xe in j){if(Xi(xe))continue;const oe=j[xe],X=z[xe];oe!==X&&xe!=="value"&&s(F,xe,X,oe,Ee,v.children,q,ie,ze)}"value"in j&&s(F,"value",z.value,j.value)}},W=(F,v,z,j,q,ie,Ee,xe,oe)=>{const X=v.el=F?F.el:r(""),fe=v.anchor=F?F.anchor:r("");let{patchFlag:Be,dynamicChildren:Ce,slotScopeIds:_e}=v;_e&&(xe=xe?xe.concat(_e):_e),F==null?(n(X,z,j),n(fe,z,j),y(v.children,z,fe,q,ie,Ee,xe,oe)):Be>0&&Be&64&&Ce&&F.dynamicChildren?(N(F.dynamicChildren,Ce,z,q,ie,Ee,xe),(v.key!=null||q&&v===q.subTree)&&o8(F,v,!0)):K(F,v,z,fe,q,ie,Ee,xe,oe)},Ae=(F,v,z,j,q,ie,Ee,xe,oe)=>{v.slotScopeIds=xe,F==null?v.shapeFlag&512?q.ctx.activate(v,z,j,Ee,oe):Q(v,z,j,q,ie,Ee,oe):ne(F,v,oe)},Q=(F,v,z,j,q,ie,Ee)=>{const xe=F.component=VA(F,j,q);if(Yc(F)&&(xe.ctx.renderer=yt),KA(xe),xe.asyncDep){if(q&&q.registerDep(xe,te),!F.el){const oe=xe.subTree=R(ox);C(null,oe,v,z)}return}te(xe,F,v,z,q,ie,Ee)},ne=(F,v,z)=>{const j=v.component=F.component;if(rA(F,v,z))if(j.asyncDep&&!j.asyncResolved){Z(j,v,z);return}else j.next=v,tA(j.update),j.update();else v.el=F.el,j.vnode=v},te=(F,v,z,j,q,ie,Ee)=>{const xe=()=>{if(F.isMounted){let{next:fe,bu:Be,u:Ce,parent:_e,vnode:Pe}=F,Xe=fe,je;Bx(F,!1),fe?(fe.el=Pe.el,Z(F,fe,Ee)):fe=Pe,Be&&Do(Be),(je=fe.props&&fe.props.onVnodeBeforeUpdate)&&F0(je,_e,fe,Pe),Bx(F,!0);const dt=_o(F),l0=F.subTree;F.subTree=dt,f(l0,dt,u(l0.el),Bt(l0),F,q,ie),fe.el=dt.el,Xe===null&&aA(F,dt.el),Ce&&Vt(Ce,q),(je=fe.props&&fe.props.onVnodeUpdated)&&Vt(()=>F0(je,_e,fe,Pe),q)}else{let fe;const{el:Be,props:Ce}=v,{bm:_e,m:Pe,parent:Xe}=F,je=Rn(v);if(Bx(F,!1),_e&&Do(_e),!je&&(fe=Ce&&Ce.onVnodeBeforeMount)&&F0(fe,Xe,v),Bx(F,!0),Be&&Ye){const dt=()=>{F.subTree=_o(F),Ye(Be,F.subTree,F,q,null)};je?v.type.__asyncLoader().then(()=>!F.isUnmounted&&dt()):dt()}else{const dt=F.subTree=_o(F);f(null,dt,z,j,F,q,ie),v.el=dt.el}if(Pe&&Vt(Pe,q),!je&&(fe=Ce&&Ce.onVnodeMounted)){const dt=v;Vt(()=>F0(fe,Xe,dt),q)}(v.shapeFlag&256||Xe&&Rn(Xe.vnode)&&Xe.vnode.shapeFlag&256)&&F.a&&Vt(F.a,q),F.isMounted=!0,v=z=j=null}},oe=F.effect=new zr(xe,()=>Xr(X),F.scope),X=F.update=()=>oe.run();X.id=F.uid,Bx(F,!0),X()},Z=(F,v,z)=>{v.component=F;const j=F.vnode.props;F.vnode=v,F.next=null,IA(F,v.props,j,z),MA(F,v.children,z),An(),Va(),hn()},K=(F,v,z,j,q,ie,Ee,xe,oe=!1)=>{const X=F&&F.children,fe=F?F.shapeFlag:0,Be=v.children,{patchFlag:Ce,shapeFlag:_e}=v;if(Ce>0){if(Ce&128){ue(X,Be,z,j,q,ie,Ee,xe,oe);return}else if(Ce&256){J(X,Be,z,j,q,ie,Ee,xe,oe);return}}_e&8?(fe&16&&ze(X,q,ie),Be!==X&&l(z,Be)):fe&16?_e&16?ue(X,Be,z,j,q,ie,Ee,xe,oe):ze(X,q,ie,!0):(fe&8&&l(z,""),_e&16&&y(Be,z,j,q,ie,Ee,xe,oe))},J=(F,v,z,j,q,ie,Ee,xe,oe)=>{F=F||Xx,v=v||Xx;const X=F.length,fe=v.length,Be=Math.min(X,fe);let Ce;for(Ce=0;Cefe?ze(F,q,ie,!0,!1,Be):y(v,z,j,q,ie,Ee,xe,oe,Be)},ue=(F,v,z,j,q,ie,Ee,xe,oe)=>{let X=0;const fe=v.length;let Be=F.length-1,Ce=fe-1;for(;X<=Be&&X<=Ce;){const _e=F[X],Pe=v[X]=oe?J0(v[X]):v0(v[X]);if(pn(_e,Pe))f(_e,Pe,z,null,q,ie,Ee,xe,oe);else break;X++}for(;X<=Be&&X<=Ce;){const _e=F[Be],Pe=v[Ce]=oe?J0(v[Ce]):v0(v[Ce]);if(pn(_e,Pe))f(_e,Pe,z,null,q,ie,Ee,xe,oe);else break;Be--,Ce--}if(X>Be){if(X<=Ce){const _e=Ce+1,Pe=_eCe)for(;X<=Be;)Fe(F[X],q,ie,!0),X++;else{const _e=X,Pe=X,Xe=new Map;for(X=Pe;X<=Ce;X++){const Jt=v[X]=oe?J0(v[X]):v0(v[X]);Jt.key!=null&&Xe.set(Jt.key,X)}let je,dt=0;const l0=Ce-Pe+1;let $x=!1,Ma=0;const fn=new Array(l0);for(X=0;X=l0){Fe(Jt,q,ie,!0);continue}let C0;if(Jt.key!=null)C0=Xe.get(Jt.key);else for(je=Pe;je<=Ce;je++)if(fn[je-Pe]===0&&pn(Jt,v[je])){C0=je;break}C0===void 0?Fe(Jt,q,ie,!0):(fn[C0-Pe]=X+1,C0>=Ma?Ma=C0:$x=!0,f(Jt,v[C0],z,null,q,ie,Ee,xe,oe),dt++)}const Na=$x?OA(fn):Xx;for(je=Na.length-1,X=l0-1;X>=0;X--){const Jt=Pe+X,C0=v[Jt],Ra=Jt+1{const{el:ie,type:Ee,transition:xe,children:oe,shapeFlag:X}=F;if(X&6){we(F.component.subTree,v,z,j);return}if(X&128){F.suspense.move(v,z,j);return}if(X&64){Ee.move(F,v,z,yt);return}if(Ee===De){n(ie,v,z);for(let Be=0;Bexe.enter(ie),q);else{const{leave:Be,delayLeave:Ce,afterLeave:_e}=xe,Pe=()=>n(ie,v,z),Xe=()=>{Be(ie,()=>{Pe(),_e&&_e()})};Ce?Ce(ie,Pe,Xe):Xe()}else n(ie,v,z)},Fe=(F,v,z,j=!1,q=!1)=>{const{type:ie,props:Ee,ref:xe,children:oe,dynamicChildren:X,shapeFlag:fe,patchFlag:Be,dirs:Ce}=F;if(xe!=null&&rr(xe,null,z,F,!0),fe&256){v.ctx.deactivate(F);return}const _e=fe&1&&Ce,Pe=!Rn(F);let Xe;if(Pe&&(Xe=Ee&&Ee.onVnodeBeforeUnmount)&&F0(Xe,v,F),fe&6)tt(F.component,z,j);else{if(fe&128){F.suspense.unmount(z,j);return}_e&&hx(F,null,v,"beforeUnmount"),fe&64?F.type.remove(F,v,z,q,yt,j):X&&(ie!==De||Be>0&&Be&64)?ze(X,v,z,!1,!0):(ie===De&&Be&384||!q&&fe&16)&&ze(oe,v,z),j&&Je(F)}(Pe&&(Xe=Ee&&Ee.onVnodeUnmounted)||_e)&&Vt(()=>{Xe&&F0(Xe,v,F),_e&&hx(F,null,v,"unmounted")},z)},Je=F=>{const{type:v,el:z,anchor:j,transition:q}=F;if(v===De){ot(z,j);return}if(v===bo){_(F);return}const ie=()=>{i(z),q&&!q.persisted&&q.afterLeave&&q.afterLeave()};if(F.shapeFlag&1&&q&&!q.persisted){const{leave:Ee,delayLeave:xe}=q,oe=()=>Ee(z,ie);xe?xe(F.el,ie,oe):oe()}else ie()},ot=(F,v)=>{let z;for(;F!==v;)z=h(F),i(F),F=z;i(v)},tt=(F,v,z)=>{const{bum:j,scope:q,update:ie,subTree:Ee,um:xe}=F;j&&Do(j),q.stop(),ie&&(ie.active=!1,Fe(Ee,F,v,z)),xe&&Vt(xe,v),Vt(()=>{F.isUnmounted=!0},v),v&&v.pendingBranch&&!v.isUnmounted&&F.asyncDep&&!F.asyncResolved&&F.suspenseId===v.pendingId&&(v.deps--,v.deps===0&&v.resolve())},ze=(F,v,z,j=!1,q=!1,ie=0)=>{for(let Ee=ie;EeF.shapeFlag&6?Bt(F.component.subTree):F.shapeFlag&128?F.suspense.next():h(F.anchor||F.el),rt=(F,v,z)=>{F==null?v._vnode&&Fe(v._vnode,null,null,!0):f(v._vnode||null,F,v,null,null,null,z),Va(),zc(),v._vnode=F},yt={p:f,um:Fe,m:we,r:Je,mt:Q,mc:y,pc:K,pbc:N,n:Bt,o:t};let E0,Ye;return e&&([E0,Ye]=e(yt)),{render:rt,hydrate:E0,createApp:SA(rt,E0)}}function Bx({effect:t,update:e},x){t.allowRecurse=e.allowRecurse=x}function o8(t,e,x=!1){const n=t.children,i=e.children;if(be(n)&&be(i))for(let s=0;s>1,t[x[r]]0&&(e[n]=x[s-1]),x[s]=n)}}for(s=x.length,o=x[s-1];s-- >0;)x[s]=o,o=e[o];return x}const LA=t=>t.__isTeleport,De=Symbol.for("v-fgt"),xo=Symbol.for("v-txt"),ox=Symbol.for("v-cmt"),bo=Symbol.for("v-stc"),Ln=[];let B0=null;function S(t=!1){Ln.push(B0=t?null:[])}function HA(){Ln.pop(),B0=Ln[Ln.length-1]||null}let Qn=1;function tE(t){Qn+=t}function r8(t){return t.dynamicChildren=Qn>0?B0||Xx:null,HA(),Qn>0&&B0&&B0.push(t),t}function k(t,e,x,n,i,s){return r8(c(t,e,x,n,i,s,!0))}function Me(t,e,x,n,i){return r8(R(t,e,x,n,i,!0))}function Cs(t){return t?t.__v_isVNode===!0:!1}function pn(t,e){return t.type===e.type&&t.key===e.key}const no="__vInternal",a8=({key:t})=>t??null,Qi=({ref:t,ref_key:e,ref_for:x})=>(typeof t=="number"&&(t=""+t),t!=null?Ct(t)||Mt(t)||Ie(t)?{i:qt,r:t,k:e,f:!!x}:t:null);function c(t,e=null,x=null,n=0,i=null,s=t===De?0:1,o=!1,r=!1){const a={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&a8(e),ref:e&&Qi(e),scopeId:Zs,slotScopeIds:null,children:x,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:qt};return r?(ea(a,x),s&128&&t.normalize(a)):x&&(a.shapeFlag|=Ct(x)?8:16),Qn>0&&!o&&B0&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&B0.push(a),a}const R=UA;function UA(t,e=null,x=null,n=0,i=null,s=!1){if((!t||t===mA)&&(t=ox),Cs(t)){const r=rn(t,e,!0);return x&&ea(r,x),Qn>0&&!s&&B0&&(r.shapeFlag&6?B0[B0.indexOf(t)]=r:B0.push(r)),r.patchFlag|=-2,r}if(JA(t)&&(t=t.__vccOpts),e){e=$A(e);let{class:r,style:a}=e;r&&!Ct(r)&&(e.class=Ke(r)),Et(a)&&(Oc(a)&&!be(a)&&(a=Dt({},a)),e.style=de(a))}const o=Ct(t)?1:EA(t)?128:LA(t)?64:Et(t)?4:Ie(t)?2:0;return c(t,e,x,n,i,o,s,!0)}function $A(t){return t?Oc(t)||no in t?Dt({},t):t:null}function rn(t,e,x=!1){const{props:n,ref:i,patchFlag:s,children:o}=t,r=e?GA(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:r,key:r&&a8(r),ref:e&&e.ref?x&&i?be(i)?i.concat(Qi(e)):[i,Qi(e)]:Qi(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==De?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&rn(t.ssContent),ssFallback:t.ssFallback&&rn(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function rx(t=" ",e=0){return R(xo,null,t,e)}function ee(t="",e=!1){return e?(S(),Me(ox,null,t)):R(ox,null,t)}function v0(t){return t==null||typeof t=="boolean"?R(ox):be(t)?R(De,null,t.slice()):typeof t=="object"?J0(t):R(xo,null,String(t))}function J0(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:rn(t)}function ea(t,e){let x=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(be(e))x=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),ea(t,i()),i._c&&(i._d=!0));return}else{x=32;const i=e._;!i&&!(no in e)?e._ctx=qt:i===3&&qt&&(qt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ie(e)?(e={default:e,_ctx:qt},x=32):(e=String(e),n&64?(x=16,e=[rx(e)]):x=8);t.children=e,t.shapeFlag|=x}function GA(...t){const e={};for(let x=0;xPt=t),ta=t=>{Gx.length>1?Gx.forEach(e=>e(t)):Gx[0](t)};const an=t=>{ta(t),t.scope.on()},Ix=()=>{Pt&&Pt.scope.off(),ta(null)};function E8(t){return t.vnode.shapeFlag&4}let ei=!1;function KA(t,e=!1){ei=e;const{props:x,children:n}=t.vnode,i=E8(t);TA(t,x,i,e),kA(t,n);const s=i?jA(t,e):void 0;return ei=!1,s}function jA(t,e){const x=t.type;t.accessCache=Object.create(null),t.proxy=Lc(new Proxy(t.ctx,CA));const{setup:n}=x;if(n){const i=t.setupContext=n.length>1?YA(t):null;an(t),An();const s=xx(n,t,0,[t.props,i]);if(hn(),Ix(),mc(s)){if(s.then(Ix,Ix),e)return s.then(o=>{nE(t,o,e)}).catch(o=>{Js(o,t,0)});t.asyncDep=s}else nE(t,s,e)}else l8(t,e)}function nE(t,e,x){Ie(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Et(e)&&(t.setupState=$c(e)),l8(t,x)}let iE;function l8(t,e,x){const n=t.type;if(!t.render){if(!e&&iE&&!n.render){const i=n.template||Zr(t).template;if(i){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:r,compilerOptions:a}=n,E=Dt(Dt({isCustomElement:s,delimiters:r},o),a);n.render=iE(i,E)}}t.render=n.render||f0}an(t),An(),FA(t),hn(),Ix()}function qA(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,x){return Yt(t,"get","$attrs"),e[x]}}))}function YA(t){const e=x=>{t.exposed=x||{}};return{get attrs(){return qA(t)},slots:t.slots,emit:t.emit,expose:e}}function xa(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy($c(Lc(t.exposed)),{get(e,x){if(x in e)return e[x];if(x in On)return On[x](t)},has(e,x){return x in e||x in On}}))}function JA(t){return Ie(t)&&"__vccOpts"in t}const me=(t,e)=>Xu(t,e,ei);function XA(t,e,x){const n=arguments.length;return n===2?Et(e)&&!be(e)?Cs(e)?R(t,null,[e]):R(t,e):R(t,null,e):(n>3?x=Array.prototype.slice.call(arguments,2):n===3&&Cs(x)&&(x=[x]),R(t,e,x))}const ZA=Symbol.for("v-scx"),QA=()=>Zi(ZA),e5="3.3.4",t5="http://www.w3.org/2000/svg",vx=typeof document<"u"?document:null,sE=vx&&vx.createElement("template"),x5={insert:(t,e,x)=>{e.insertBefore(t,x||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,x,n)=>{const i=e?vx.createElementNS(t5,t):vx.createElement(t,x?{is:x}:void 0);return t==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:t=>vx.createTextNode(t),createComment:t=>vx.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>vx.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,x,n,i,s){const o=x?x.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),x),!(i===s||!(i=i.nextSibling)););else{sE.innerHTML=n?`${t}`:t;const r=sE.content;if(n){const a=r.firstChild;for(;a.firstChild;)r.appendChild(a.firstChild);r.removeChild(a)}e.insertBefore(r,x)}return[o?o.nextSibling:e.firstChild,x?x.previousSibling:e.lastChild]}};function n5(t,e,x){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):x?t.setAttribute("class",e):t.className=e}function i5(t,e,x){const n=t.style,i=Ct(x);if(x&&!i){if(e&&!Ct(e))for(const s in e)x[s]==null&&ar(n,s,"");for(const s in x)ar(n,s,x[s])}else{const s=n.display;i?e!==x&&(n.cssText=x):e&&t.removeAttribute("style"),"_vod"in t&&(n.display=s)}}const oE=/\s*!important$/;function ar(t,e,x){if(be(x))x.forEach(n=>ar(t,e,n));else if(x==null&&(x=""),e.startsWith("--"))t.setProperty(e,x);else{const n=s5(t,e);oE.test(x)?t.setProperty(un(n),x.replace(oE,""),"important"):t[n]=x}}const rE=["Webkit","Moz","ms"],yo={};function s5(t,e){const x=yo[e];if(x)return x;let n=sn(e);if(n!=="filter"&&n in t)return yo[e]=n;n=Dc(n);for(let i=0;iSo||(u5.then(()=>So=0),So=Date.now());function h5(t,e){const x=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=x.attached)return;p0(B5(n,x.value),e,5,[n])};return x.value=t,x.attached=A5(),x}function B5(t,e){if(be(e)){const x=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{x.call(t),t._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const lE=/^on[a-z]/,d5=(t,e,x,n,i=!1,s,o,r,a)=>{e==="class"?n5(t,n,i):e==="style"?i5(t,x,n):Ks(e)?Hr(e)||l5(t,e,x,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):f5(t,e,n,i))?r5(t,e,n,s,o,r,a):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),o5(t,e,n,i))};function f5(t,e,x,n){return n?!!(e==="innerHTML"||e==="textContent"||e in t&&lE.test(e)&&Ie(x)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||lE.test(e)&&Ct(x)?!1:e in t}const p5=Dt({patchProp:d5},x5);let cE;function g5(){return cE||(cE=NA(p5))}const m5=(...t)=>{const e=g5().createApp(...t),{mount:x}=e;return e.mount=n=>{const i=C5(n);if(!i)return;const s=e._component;!Ie(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const o=x(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e};function C5(t){return Ct(t)?document.querySelector(t):t}var S0=(t=>(t.JA="ja",t.EN="en",t.ZH_TW="zh_tw",t))(S0||{});function Fs(t,e){return(t?uE(t):"")+uE(e)}function uE(t){return t+(t.endsWith(` +`)?"":` +`)}function c8(t){return t instanceof Error?t.message:t instanceof Object?JSON.stringify(t):String(t)}function AE(t,e,x){return e===0?"0%":(t/e*100).toFixed(x)+"%"}function F5(t){switch(t%100){case 11:case 12:case 13:return t+"th"}switch(t%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd";default:return t+"th"}}function Ds(t,e){const x=t.toLowerCase();return e.every(n=>x.includes(n.toLowerCase()))}const D5={electronShogi:"Electron Shogi",clear:"Clear",open:"Open",saveOverwrite:"Overwrite",newRecord:"New Record",newRecordWithBrackets:"(New Record)",openRecord:"Open Record",saveRecord:"Save Record",saveRecordAs:"Save Record As",openAutoSavingDirectory:"Open Auto-Saving Directory",exportPositionImage:"Export Position Image",positionImage:"Position Image",close:"Close",quit:"Quit",editing:"Edit",copyAsKIF:"Copy (KIF)",copyAsCSA:"Copy (CSA)",copyAsUSI:"Copy (USI)",copyAsSFEN:"Copy (SFEN)",paste:"Paste",copyRecord:"Copy Record",asKIF:"as KIF",asCSA:"as CSA",asUSIUntilCurrentMove:"as USI (until current move)",asUSIAll:"as USI (all)",copyPositionAsSFEN:"Copy Position (as SFEN)",pasteRecordOrPosition:"Paste Record/Position",appendSpecialMove:"Append Special Move",deleteMoves:"Delete Current Move and Following Moves",view:"View",toggleFullScreen:"Toggle Full Screen",defaultFontSize:"Default Font Size",largerFontSize:"Larger Font Size",smallerFontSize:"Smaller Font Size",settings:"Settings",config:"Config",debug:"Debug",toggleDevTools:"Toggle Developer Tools",openAppDirectory:"Open App Directory",openSettingDirectory:"Open Setting Directory",openLogDirectory:"Open Log Directory",help:"Help",openWebSite:"Open Web Site",howToUse:"How to Use",checkForUpdates:"Check for Updates",game:"Game",player:"Player",selectFromHistory:"Select from History",noHistory:"Empty",saveHistory:"Save History",version:"Version",gameProgress:"Game Progress",allGamesCompleted:"All Games Completed",gameEnded:"Game Ended",offlineGame:"Offline Game",csaOnlineGame:"CSA Online Game",csaProtocolOnlineGame:"Online Game (CSA Protocol)",csaProtocolV121:"CSA Protocol 1.2.1 Standard",csaProtocolV121WithPVComment:"CSA Protocol 1.2.1 with PV Comment",hostToConnect:"Hostname",portNumber:"Port",password:"Password",showPassword:"Show Password",logout:"Logout",displayGameResults:"Display Results",interrupt:"Stop",stopGame:"Stop",resign:"Resign",draw:"Draw",impass:"Impass",repetitionDraw:"Repetition Draw",mate:"Mate",noMate:"No Mate",mateSearch:"Mate Search",startMateSearch:"Start Mate Search",stopMateSearch:"Stop Mate Search",noMateFound:"No mate.",timeout:"Timeout",foulWin:"Foul Win",foulLose:"Foul Lose",enteringOfKing:"Entering of King",winByDefault:"Win by Default",loseByDefault:"Lose by Default",winByDeclaration:"Win by Declaration",declareWinning:"Declare Winning",research:"Research",startResearch:"Start Research",endResearch:"End Research",recordAnalysis:"Record Analysis",analysis:"Analyze",analyze:"Analyze",stopAnalysis:"Stop Analysis",setupPosition:"Setup Position",startPositionSetup:"Start Position Setup",completePositionSetup:"Complete Setup",changeTurn:"Change Turn",initializePosition:"Initialize Position",appSettings:"Preferences",language:"Languages",theme:"Theme",standard:"Standard",green:"Green",cherryBlossom:"Cherry Blossom",customImage:"Custom Image",autumn:"Autumn",snow:"Snow",dark:"Dark",piece:"Piece",singleKanjiPiece:"Single Kanji",singleKanjiGothicPiece:"Single Kanji (Gothic)",singleKanjiDarkPiece:"Single Kanji (Dark)",singleKanjiGothicDarkPiece:"Single Kanji (Gothic, Dark)",backgroundImage:"Background Image",board:"Board Image",pieceStand:"Piece Stand",lightWoodyTexture:"Woody Texture (Light)",warmWoodTexture:"Woody Texture (Warm)",regin:"Regin",displayFileAndRank:"Display File & Rank",displayLeftControls:"Display Left Controls",displayRightControls:"Display Right Controls",tabViewStyle:"Tab View Style",oneColumn:"1 Column",twoColumns:"2 Columns",sounds:"Sounds",pieceLoudness:"Piece Loudness",clockLoudness:"Clock Loudness",clockPitch:"Clock Pitch",clockSoundTarget:"Clock Sound Target",anyTurn:"Any",onlyHumanTurn:"Human",defaultRecordFileFormat:"Default Record Format",textEncoding:"Text Encoding",strict:"Strict",autoDetect:"Auto Detect",newlineCharacter:"Newline Character",old90sMac:"90's Mac",autoSavingDirectory:"Auto-Saving Directory",select:"Select",usiProtocol:"USI Protocol",translateOptionName:"Translate Option Name",functionalOnJapaneseOnly:"Functional on Japanese Only",maxStartupTime:"Max Startup Time",forDevelopers:"For Developers",enableAppLog:"Enable App Log",enableUSILog:"Enable USI Log",enableCSALog:"Enable CSA Log",logLevel:"Log Level",engineSettings:"Engine Settings",flipBoard:"Flip Board",file:"File",recordFile:"Record File",executableFile:"Executable",imageFile:"Image",remove:"Remove",deleteMove:"Delete Move",recordProperties:"Record Properties",comments:"Comments",commentsAndBookmarks:"Comments & Bookmarks",bookmark:"Bookmark",bookmarkList:"Bookmarks",useBookmarkAsHeader:"Use Bookmark as Header",moveComments:"Move Comments",searchLog:"Search Log",pv:"PV",mateShort:"M",displayPVShort:"Play",evaluation:"Evaluation",eval:"Eval",estimatedWinRate:"Estimated Win Rate",evaluationAndEstimatedWinRate:"Evaluation & Estimated Win Rate",swapEachTurnChange:"Swap Each Turn Change",alwaysSenteIsPositive:"Always Sente is Positive",signOfEvaluation:"Sign of Evaluation",winRateCoefficient:"Win Rate Coefficient",hideTabView:"Hide",expandTabView:"Expand Tab View",sente:"Sente",senteOrShitate:"Sente (Shitate)",shitate:"Shitate",gote:"Gote",goteOrUwate:"Gote (Uwate)",uwate:"Uwate",swapSenteGote:"Swap Sente/Gote",currentPosition:"Current Position",enableEngineTimeout:"Enable Engine Timeout",setDifferentTimeForGote:"Set different time for Gote",nextTurn:"Next Move",elapsedTime:"Elapsed Time",elapsed:"Elapsed",rank:"Rank",depth:"Depth",searchEngine:"Search Engine",ponder:"Ponder",numberOfThreads:"Threads",multiPV:"Multi PV",startPosition:"Position",maxMoves:"Max Moves",gameRepetition:"Repeat",autoRelogin:"Auto Re-Login",swapTurnWhenGameRepetition:"Swap Turns When Repeat",outputComments:"Output Comments",saveRecordAutomatically:"Save Record Automatically",adjustBoardToHumanPlayer:"Adjust Board to Human Player",adjustBoardAutomatically:"Adjust Board Automatically",startGame:"Start Game",cancelGame:"Cancel Game",allottedTime:"Allotted Time",byoyomi:"Byoyomi",increments:"Increments",startEndCriteria:"Start/End Criteria",endCriteria1Move:"End Criteria for 1 Move",outputSettings:"Output Settings",noOutputs:"No Outputs",insertCommentToTop:"Insert to Top",appendCommentToBottom:"Append to Bottom",insertToComment:"Ins. to Comment",insertToRecord:"Ins. to Record",overwrite:"Overwrite",fromPrefix:"from",fromSuffix:"",toPrefix:"to",toSuffix:"",plyPrefix:"",plySuffix:"th move",hoursSuffix:"h",minutesSuffix:"min",secondsSuffix:"sec",engineManagement:"Engine Management",engineName:"Engine Name",author:"Author",enginePath:"Engine Path",openDirectory:"Open Directory",displayName:"Display Name",invoke:"Invoke",resetToEngineDefaultValues:"Reset to default values",defaultValue:"Default Value",noEngineRegistered:"No engine",duplicate:"Copy",add:"Add",recommended:"Recommended",import:"Import",saveAndClose:"Save & Close",save:"Save",saveAs:"Save As",cancel:"Cancel",back:"Back",name:"Name",prediction:"Prediction",best:"Best",nodes:"Nodes",hashUsage:"Hash Usage",nonHandicap:"Non-Handicap",lanceHandicap:"Lance Handicap",rightLanceHandicap:"Right Lance Handicap",bishopHandicap:"Bishop Handicap",rookHandicap:"Rook Handicap",rookLanceHandicap:"Rook-Lance Handicap",twoPiecesHandicap:"2 Pieces Handicap",fourPiecesHandicap:"4 Pieces Handicap",sixPiecesHandicap:"6 Pieces Handicap",eightPiecesHandicap:"8 Pieces Handicap",tenPiecesHandicap:"10 Pieces Handicap",tsumeShogi:"Tsume Shogi",doubleKingTsumeShogi:"2-Kings Tsume Shogi",startDateTime:"Start",endDateTime:"End",gameDate:"Date",tournament:"Tournament",strategy:"Strategy",gameTitle:"Title",timeLimit:"Time Limit",place:"Place",postedOn:"Posted On",note:"Note",senteShortName:"Sente(short)",goteShortName:"Gote(short)",opusNo:"Opus No.",opusName:"Opus Name",publishedBy:"Published By",publishedOn:"Published On",source:"Source",numberOfMoves:"Number of Moves",integrity:"Integrity",recordCategory:"Category",award:"Award",filterByOptionName:"Filter by Option Name",filterByEngineName:"Filter by Engine Name",bookStyle:"Book Style",gameStyle:"Game Style",none:"None",bgCover:"Cover",bgContain:"Contain",bgTile:"Tile",inaccuracy:"Inaccuracy",dubious:"Dubious",mistake:"Mistake",blunder:"Blunder",inaccuracyThreshold:"Inaccuracy Threshold",dubiousThreshold:"Dubious Threshold",mistakeThreshold:"Mistake Threshold",blunderThreshold:"Blunder Threshold",typeCustomTitleHere:"Type custom title here",displayEmptyElements:"Display Empty Elements",waitingForNewGame:"Waiting for new game.",insertedComment:"Inserted comment.",tryingToConnectAndLoginToCSAServer:"Trying to connect and login to CSA server.",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"*In web browser version, it will output logs to console and ignore this setting.",shouldRestartToApplyLogSettings:"*You should restart this app to apply log settings.",canOpenLogDirectoryFromMenu:'*You can open log directory from "Debug" - "Open Log Directory" menu.',hasNoOldLogCleanUpFeature:"*This app has no clean-up feature. Please remove old logs manually.",processingPleaseWait:"Processing, please wait.",importingFollowingRecordOrPosition:"Importing the following record(or position).",supportsKIFCSAUSI:"*Supports KIF, CSA, USI.",plesePasteRecordIntoTextArea:"*Please paste record data into the text area.",desktopVersionPastesAutomatically:"*In desktop version, it will paste automatically from clipboard.",someLogsDisabled:"Some log settings are disabled.",logsRecommendedForCSAProtocol:"Log settings are recommended for CSA protocol.",pleaseEnableLogsAndRestart:"Please enable log settings and restart this app.",notSendPVOnStandardCSAProtocol:"Client do not send PV on standard CSA protocol.",csaProtocolSendPlaintextPassword:"On CSA protocol, client send plaintext password.",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"Password will saved as plaintext because OS side encryption is not available.",pleaseUncheckSaveHistoryIfNotWantSave:"Please uncheck Save History, if you don't want to save.",csaProtocolSendPlaintextPasswordRegardlessOfHistory:"On CSA protocol, client send plaintext password regardless of history.",areYouSureWantToQuitGames:"Are you sure you want to quit games?",areYouSureWantToRequestQuit:"You have possibility to be loser. Are you sure you want to request quit?",areYouSureWantToClearRecord:"Are you sure you want to clear record?",areYouSureWantToDiscardPosition:"Are you sure you want to discard the position?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"Are you sure you want to open the file instead of current record?",youCanNotCloseAppWhileCSAOnlineGame:"You can not close app while CSA online game.",fileExtensionNotSupported:"File extension is not supported.",errorOccuredWhileDisconnectingFromCSAServer:"An error occured while disconnecting from CSA server.",failedToConnectToCSAServer:"Failed to connect to CSA server.",errorOccuredWhileLogoutFromCSAServer:"An error occured while logout from CSA server.",disconnectedFromCSAServer:"Disconnected from CSA server.",csaServerLoginDenied:"CSA server login denied.",thisFeatureNotAvailableOnWebApp:"This feature is not available on web app.",failedToStartNewGame:"Failed to start new game.",errorOccuredWhileEndingGame:"An error occured while ending game.",failedToSendGoCommand:"Failed to send go-command.",failedToSendPonderCommand:"Failed to send ponder-command.",failedToSendStopCommand:"Failed to send stop-command.",failedToShutdownEngines:"Failed to shutdown engines.",failedToSaveRecord:"Failed to save record.",failedToParseSFEN:"Failed to parse SFEN.",failedToDetectRecordFormat:"Failed to detect record format.",unknownFileExtension:"Unknown file extension.",emptyRecordInput:"Empty record input.",invalidPieceName:"Invalid piece name",invalidTurn:"Invalid turn",invalidMove:"Invalid move",invalidMoveNumber:"Invalid move number",invalidDestination:"Invalid destination",pieceNotExists:"Piece not exists",invalidLine:"Invalid line",invalidHandicap:"Invalid handicap",invalidBoard:"Invalid board",invalidHandPiece:"Invalid hand piece",invalidUSI:"Invalid USI",backgroundImageFileNotSelected:"Background image file is not selected.",pieceImageFileNotSelected:"Piece image File is not selected.",boardImageFileNotSelected:"Board image file is not selected.",pieceStandImageFileNotSelected:"Piece stand image file is not selected.",pieceVolumeMustBe0To100Percent:"Piece volume must be 0% to 100%.",clockVolumeMustBe0To100Percent:"Clock volume must be 0% to 100%.",clockPitchMustBe220To880Hz:"Clock pitch must be 220Hz to 880Hz.",engineTimeoutMustBe1To300Seconds:"Engine timeout must be 1 to 300 seconds.",coefficientInSigmoidMustBeGreaterThan0:"Coefficient in sigmoid must be greater than 0.",inaccuracyThresholdMustBe1To100Percent:"Inaccuracy must be 1% to 100%.",dubiousThresholdMustBe1To100Percent:"Dubious threshold must be 1% to 100%.",mistakeThresholdMustBe1To100Percent:"Mistake threshold must be 1% to 100%.",blunderThresholdMustBe1To100Percent:"Blunder threshold must be 1% to 100%.",recordSavedWithGarbledCharacters:"The record has saved with some garbled characters.",pleaseConsiderToUseKIFU:"Please consider to use KIFU(UTF-8).",youCanChangeDefaultRecordFileFormatFromAppSettings:"You can change default record file format from App Settings.",inaccuracyThresholdMustBeLessThanDubiousThreshold:"Inaccuracy threshold must be less than dubious threshold.",dubiousThresholdMustBeLessThanMistakeThreshold:"Dubious threshold must be less than mistake threshold.",mistakeThresholdMustBeLessThanBlunderThreshold:"Mistake threshold must be less than blunder threshold.",thisEngineNotSupportsMateSearch:"This engine does not support mate search.",pleaseEndActiveFeaturesBeforeOpenRecord:"Please end active features before open record.",bothTimeLimitAndByoyomiAreNotSet:"Both time limit and byoyomi are not set.",canNotUseByoyomiWithFischer:"You can not use Byoyomi with Fischer.",protocolVersionNotSelected:"Protocol version is not selected.",hostNameIsEmpty:"Host name is empty.",invalidPortNumber:"Invalid port number.",idIsEmpty:"ID is empty.",engineNotSelected:"Engine is not selected.",tryToReloginToCSAServerNSecondsLater:t=>`Try to relogin to CSA server ${t} seconds later.`,mateInNPlyDoYouWantToDisplay:t=>`Mate in ${t} ply. Do you want to display?`,insertedNMovesToRecord:t=>`Inserted ${t} moves to the record.`,errorsOccurred:t=>t>=2?`${t} errors have occurred.`:`${t} error has occurred.`,between:(t,e)=>`between ${t} and ${e}`,addNthEngine:t=>`Add ${F5(t)} engine`,copyOf:t=>`${t} (copy)`,keepLatest:t=>`keep latest ${t}`,areYouSureWantToDeleteFollowingMove:t=>`Are you sure you want to delete ${t}th move and the following move?`,failedToOpenDirectory:t=>`Failed to open directory of the file: ${t}`,unexpectedEventSenderPleaseReport(t){return`Unexpected event sender. Please report this error message to developer. [${t}]`},unexpectedHTTPMethodPleaseReport(t){return`Unexpected HTTP method. Please report this error message to developer. [${t}]`},unexpectedRequestURLPleaseReport(t){return`Unexpected request URL. Please report this error message to developer. [${t}]`},noResponseFromEnginePleaseExtendTimeout(t){return`No response from engine while ${t} seconds. Please extend timeout at app settings, if your engine is slow.`}},Er={electronShogi:"Electron将棋",clear:"初期化",open:"開く",saveOverwrite:"上書き保存",newRecord:"新規棋譜",newRecordWithBrackets:"(新規棋譜)",openRecord:"棋譜を開く",saveRecord:"棋譜を上書き保存",saveRecordAs:"棋譜を名前を付けて保存",openAutoSavingDirectory:"自動保存先を開く",exportPositionImage:"局面図を出力",positionImage:"局面図",close:"閉じる",quit:"終了",editing:"編集",copyAsKIF:"コピー・KIF",copyAsCSA:"コピー・CSA",copyAsUSI:"コピー・USI",copyAsSFEN:"コピー・SFEN",paste:"貼り付け",copyRecord:"棋譜コピー",asKIF:"KIF形式",asCSA:"CSA形式",asUSIUntilCurrentMove:"USI形式(現在の指し手まで)",asUSIAll:"USI形式(全て)",copyPositionAsSFEN:"局面コピー(SFEN形式)",pasteRecordOrPosition:"棋譜・局面貼り付け",appendSpecialMove:"特殊な指し手",deleteMoves:"現在の位置から棋譜を削除",view:"表示",toggleFullScreen:"全画面表示切り替え",defaultFontSize:"標準の文字サイズ",largerFontSize:"文字を拡大",smallerFontSize:"文字を縮小",settings:"設定",config:"設定",debug:"デバッグ",toggleDevTools:"開発者ツール表示切り替え",openAppDirectory:"アプリのフォルダを開く",openSettingDirectory:"設定ファイルのフォルダを開く",openLogDirectory:"ログファイルのフォルダを開く",help:"ヘルプ",openWebSite:"Webサイトを開く",howToUse:"使い方を開く",checkForUpdates:"最新バージョンを確認",game:"対局",player:"プレイヤー",selectFromHistory:"履歴から選ぶ",noHistory:"履歴がありません",saveHistory:"履歴に保存する",version:"バージョン",gameProgress:"対局の経過",allGamesCompleted:"連続対局終了",gameEnded:"対局終了",offlineGame:"ローカル対局",csaOnlineGame:"通信対局(CSA)",csaProtocolOnlineGame:"通信対局(CSAプロトコル)",csaProtocolV121:"CSAプロトコル1.2.1 標準",csaProtocolV121WithPVComment:"CSAプロトコル1.2.1 読み筋コメント付き",hostToConnect:"接続先ホスト",portNumber:"ポート番号",password:"パスワード",showPassword:"パスワードを表示する",logout:"ログアウト",displayGameResults:"戦績確認",interrupt:"中断",stopGame:"対局中断",resign:"投了",draw:"引き分け",impass:"持将棋",repetitionDraw:"千日手",mate:"詰み",noMate:"不詰",mateSearch:"詰み探索",startMateSearch:"詰み探索開始",stopMateSearch:"詰み探索終了",noMateFound:"詰みが見つかりませんでした。",timeout:"時間切れ",foulWin:"反則勝ち",foulLose:"反則負け",enteringOfKing:"入玉勝ち",winByDefault:"不戦勝",loseByDefault:"不戦敗",winByDeclaration:"宣言勝ち",declareWinning:"勝ち宣言",research:"検討",startResearch:"検討開始",endResearch:"検討終了",recordAnalysis:"棋譜解析",analysis:"解析",analyze:"解析開始",stopAnalysis:"解析中断",setupPosition:"局面編集",startPositionSetup:"局面編集開始",completePositionSetup:"局面編集終了",changeTurn:"手番変更",initializePosition:"局面の初期化",appSettings:"アプリ設定",language:"言語",theme:"テーマ",standard:"標準",green:"緑",cherryBlossom:"桜",customImage:"カスタム画像",autumn:"紅葉",snow:"雪",dark:"ダーク",piece:"駒",singleKanjiPiece:"一文字駒",singleKanjiGothicPiece:"一文字駒(ゴシック体)",singleKanjiDarkPiece:"一文字駒(ダーク)",singleKanjiGothicDarkPiece:"一文字駒(ゴシック体・ダーク)",backgroundImage:"背景画像",board:"盤",pieceStand:"駒台",lightWoodyTexture:"木目(明るい)",warmWoodTexture:"木目(暖かい)",regin:"レジン",displayFileAndRank:"段・筋を表示",displayLeftControls:"左側操作ボタンを表示",displayRightControls:"右側操作ボタンを表示",tabViewStyle:"タブビューの形式",oneColumn:"1列",twoColumns:"2列",sounds:"音",pieceLoudness:"駒音の大きさ",clockLoudness:"時計音の大きさ",clockPitch:"時計音の高さ",clockSoundTarget:"時計音の対象",anyTurn:"全ての手番",onlyHumanTurn:"人間の手番のみ",defaultRecordFileFormat:"デフォルトの保存形式",textEncoding:"文字コード",strict:"厳格",autoDetect:"自動判定",newlineCharacter:"改行文字",old90sMac:"90年代Mac",autoSavingDirectory:"棋譜の自動保存先",select:"選択",usiProtocol:"USIプロトコル",translateOptionName:"オプション名を翻訳",functionalOnJapaneseOnly:"日本語選択時のみ有効",maxStartupTime:"最大起動待ち時間",forDevelopers:"開発者向け",enableAppLog:"アプリログを出力",enableUSILog:"USI通信ログを出力",enableCSALog:"CSA通信ログを出力",logLevel:"ログレベル",engineSettings:"エンジン設定",flipBoard:"盤面反転",file:"ファイル",recordFile:"棋譜ファイル",executableFile:"実行可能ファイル",imageFile:"画像ファイル",remove:"削除",deleteMove:"指し手削除",recordProperties:"棋譜情報",comments:"コメント",commentsAndBookmarks:"コメント・しおり",bookmark:"しおり",bookmarkList:"しおり一覧",useBookmarkAsHeader:"しおりを見出しに使う",moveComments:"指し手コメント",searchLog:"思考",pv:"読み筋",mateShort:"詰",displayPVShort:"再現",evaluation:"評価値",eval:"評価値",estimatedWinRate:"期待勝率",evaluationAndEstimatedWinRate:"評価値・期待勝率",swapEachTurnChange:"手番側有利がプラスの値",alwaysSenteIsPositive:"先手有利がプラスの値",signOfEvaluation:"評価値の符号",winRateCoefficient:"勝率換算係数",hideTabView:"最小化",expandTabView:"タブビューを再表示",sente:"先手",senteOrShitate:"先手(下手)",shitate:"下手",gote:"後手",goteOrUwate:"後手(上手)",uwate:"上手",swapSenteGote:"先後入れ替え",currentPosition:"現在の局面",enableEngineTimeout:"エンジンの時間切れあり",setDifferentTimeForGote:"後手に異なる時間を設定",nextTurn:"次の手番",elapsedTime:"消費時間",elapsed:"経過時間",rank:"順位",depth:"深さ",searchEngine:"エンジン",ponder:"先読み(Ponder)",numberOfThreads:"スレッド数",multiPV:"マルチPV",startPosition:"開始局面",maxMoves:"最大手数",gameRepetition:"連続対局",autoRelogin:"自動で再ログインする",swapTurnWhenGameRepetition:"1局ごとに手番を入れ替える",outputComments:"コメントを出力する",saveRecordAutomatically:"棋譜を自動で保存する",adjustBoardToHumanPlayer:"人を手前に表示する",adjustBoardAutomatically:"盤面の向きを自動調整",startGame:"対局開始",cancelGame:"対局をキャンセル",allottedTime:"持ち時間",byoyomi:"秒読み",increments:"増加",startEndCriteria:"開始・終了条件",endCriteria1Move:"局面ごとの終了条件",outputSettings:"出力設定",noOutputs:"出力しない",insertCommentToTop:"前方に加筆する",appendCommentToBottom:"末尾に加筆する",insertToComment:"コメントに挿入",insertToRecord:"棋譜に挿入",overwrite:"上書きする",fromPrefix:"",fromSuffix:"から",toPrefix:"",toSuffix:"まで",plyPrefix:"",plySuffix:"手目",hoursSuffix:"時間",minutesSuffix:"分",secondsSuffix:"秒",engineManagement:"エンジン管理",engineName:"エンジン名",author:"作者",enginePath:"場所",openDirectory:"フォルダを開く",displayName:"表示名",invoke:"実行",resetToEngineDefaultValues:"エンジンの既定値に戻す",defaultValue:"既定値",noEngineRegistered:"エンジンが登録されていません。",duplicate:"複製",add:"追加",recommended:"推奨",import:"取り込む",saveAndClose:"保存して閉じる",save:"保存",saveAs:"保存",cancel:"キャンセル",back:"戻る",name:"名前",prediction:"予想",best:"最善",nodes:"Node数",hashUsage:"Hash使用率",nonHandicap:"平手",lanceHandicap:"香落ち",rightLanceHandicap:"右香落ち",bishopHandicap:"角落ち",rookHandicap:"飛車落ち",rookLanceHandicap:"飛車香落ち",twoPiecesHandicap:"二枚落ち",fourPiecesHandicap:"四枚落ち",sixPiecesHandicap:"六枚落ち",eightPiecesHandicap:"八枚落ち",tenPiecesHandicap:"十枚落ち",tsumeShogi:"詰将棋",doubleKingTsumeShogi:"双玉詰将棋",startDateTime:"開始日時",endDateTime:"終了日時",gameDate:"対局日",tournament:"棋戦",strategy:"戦型",gameTitle:"表題",timeLimit:"持ち時間",place:"場所",postedOn:"掲載",note:"備考",senteShortName:"先手省略名",goteShortName:"後手省略名",opusNo:"作品番号",opusName:"作品名",publishedBy:"発表誌",publishedOn:"発表年月",source:"出典",numberOfMoves:"手数",integrity:"完全性",recordCategory:"分類",award:"受賞",filterByOptionName:"オプション名で検索",filterByEngineName:"エンジン名で検索",bookStyle:"書籍風",gameStyle:"対局画面風",none:"なし",bgCover:"1枚で表示",bgContain:"拡大して表示",bgTile:"タイル状に表示",inaccuracy:"緩手",dubious:"疑問手",mistake:"悪手",blunder:"大悪手",inaccuracyThreshold:"緩手の閾値",dubiousThreshold:"疑問手の閾値",mistakeThreshold:"悪手の閾値",blunderThreshold:"大悪手の閾値",typeCustomTitleHere:"ここに見出しを入力",displayEmptyElements:"未入力の項目を表示",waitingForNewGame:"対局開始を待っています。",insertedComment:"コメントを挿入しました。",tryingToConnectAndLoginToCSAServer:"CSAサーバーへの接続とログインを試みています。",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"※ブラウザ版ではログがコンソールに出力され、ここでの設定は無視されます。",shouldRestartToApplyLogSettings:"※ログ設定の変更を反映するにはアプリの再起動が必要です。",canOpenLogDirectoryFromMenu:"※ログの出力先は「デバッグ」-「ログファイルの場所を開く」で開きます。",hasNoOldLogCleanUpFeature:"※現在、古いログファイルの自動削除機能はありません。",processingPleaseWait:"処理中です。お待ちください。",importingFollowingRecordOrPosition:"以下の棋譜(または局面)を取り込みます。",supportsKIFCSAUSI:"※KIF形式/CSA形式/SFENに対応しています。",plesePasteRecordIntoTextArea:"※テキストエリアに棋譜を貼り付けてください。",desktopVersionPastesAutomatically:"※インストールアプリ版では自動的に貼り付けられます。",someLogsDisabled:"一部のログが無効になっています。",logsRecommendedForCSAProtocol:"CSAプロトコルを使用した対局では各種ログの出力を推奨します。",pleaseEnableLogsAndRestart:"アプリ設定からログを有効にしてアプリを再起動してください。",notSendPVOnStandardCSAProtocol:"標準のCSAプロトコルでは評価値や読み筋が送信されません。",csaProtocolSendPlaintextPassword:"CSAプロトコルの規格上パスワードは平文で送信されます。",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"OSの暗号化機能が利用できないため、入力したパスワードは平文で保存されます。",pleaseUncheckSaveHistoryIfNotWantSave:"保存したくない場合は「履歴に保存する」のチェックを外してください。",csaProtocolSendPlaintextPasswordRegardlessOfHistory:"なお、履歴の保存に関係なくCSAプロトコルの規格上パスワードは平文で送信されます。",areYouSureWantToQuitGames:"連続対局を中断しますか?",areYouSureWantToRequestQuit:"中断を要求すると負けになる可能性があります。よろしいですか?",areYouSureWantToClearRecord:"現在の棋譜は削除されます。よろしいですか?",areYouSureWantToDiscardPosition:"現在の局面は破棄されます。よろしいですか?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"現在の棋譜を閉じて別のファイルを開きます。よろしいですか?",youCanNotCloseAppWhileCSAOnlineGame:"CSAプロトコル使用中はアプリを終了できません。",fileExtensionNotSupported:"取り扱いできないファイル拡張子です。",errorOccuredWhileDisconnectingFromCSAServer:"CSAサーバーからの切断中にエラーが発生しました。",failedToConnectToCSAServer:"CSAサーバーに接続できませんでした。",errorOccuredWhileLogoutFromCSAServer:"CSAサーバーからのログアウト中にエラーが発生しました。",disconnectedFromCSAServer:"CSAサーバーへの接続が切れました。",csaServerLoginDenied:"CSAサーバーへのログインが拒否されました。",thisFeatureNotAvailableOnWebApp:"Web版では利用できない機能です。",failedToStartNewGame:"対局の開始に失敗しました。",errorOccuredWhileEndingGame:"対局の終了中にエラーが発生しました。",failedToSendGoCommand:"goコマンドを送信できませんでした。",failedToSendPonderCommand:"ponderコマンドを送信できませんでした。",failedToSendStopCommand:"stopコマンドを送信できませんでした。",failedToShutdownEngines:"エンジンを正常に終了できませんでした。",failedToSaveRecord:"棋譜の保存に失敗しました。",failedToParseSFEN:"SFENの読み込みに失敗しました。",failedToDetectRecordFormat:"棋譜形式を判別できませんでした。",unknownFileExtension:"不明なファイル形式です。",emptyRecordInput:"棋譜が入力されていません。",invalidPieceName:"不正な駒",invalidTurn:"不正な手番",invalidMove:"不正な指し手",invalidMoveNumber:"不正な手数",invalidDestination:"不正な移動先",pieceNotExists:"存在しない駒",invalidLine:"不正な行",invalidHandicap:"不正な手合",invalidBoard:"不正な盤面",invalidHandPiece:"不正な持ち駒",invalidUSI:"不正なUSI",backgroundImageFileNotSelected:"背景画像のファイルが選択されていません。",pieceImageFileNotSelected:"駒画像のファイルが選択されていません。",boardImageFileNotSelected:"盤面画像のファイルが選択されていません。",pieceStandImageFileNotSelected:"駒台画像のファイルが選択されていません。",pieceVolumeMustBe0To100Percent:"駒音の大きさには0%~100%の値を指定してください。",clockVolumeMustBe0To100Percent:"時計音の大きさには0%~100%の値を指定してください。",clockPitchMustBe220To880Hz:"時計音の高さには220Hz~880Hzの値を指定してください。",engineTimeoutMustBe1To300Seconds:"エンジンのタイムアウト時間には1秒~300秒の値を指定してください。",coefficientInSigmoidMustBeGreaterThan0:"勝率換算係数には0より大きい値を指定してください。",inaccuracyThresholdMustBe1To100Percent:"緩手には1%~100%の値を指定してください。",dubiousThresholdMustBe1To100Percent:"疑問手には1%~100%の値を指定してください。",mistakeThresholdMustBe1To100Percent:"悪手には1%~100%の閾値を指定してください。",blunderThresholdMustBe1To100Percent:"大悪手には1%~100%の値を指定してください。",recordSavedWithGarbledCharacters:"保存した棋譜の一部が文字化けしている可能性があります。",pleaseConsiderToUseKIFU:"KIFU形式(UTF-8)で保存することをお勧めします。",youCanChangeDefaultRecordFileFormatFromAppSettings:"デフォルトの棋譜形式はアプリ設定で変更可能です。",inaccuracyThresholdMustBeLessThanDubiousThreshold:"緩手には疑問手より小さい値を指定してください。",dubiousThresholdMustBeLessThanMistakeThreshold:"疑問手には悪手より小さい値を指定してください。",mistakeThresholdMustBeLessThanBlunderThreshold:"悪手には大悪手より小さい値を指定してください。",thisEngineNotSupportsMateSearch:"このエンジンは詰将棋探索をサポートしていません。",pleaseEndActiveFeaturesBeforeOpenRecord:"棋譜を開くには現在利用している機能を終了してください。",bothTimeLimitAndByoyomiAreNotSet:"持ち時間と秒読みが両方とも0です。",canNotUseByoyomiWithFischer:"秒読みとフィッシャールールは併用できません。",protocolVersionNotSelected:"プロトコルのバージョンを選択してください。",hostNameIsEmpty:"ホスト名が空です。",invalidPortNumber:"無効なポート番号です。",idIsEmpty:"IDが空です。",engineNotSelected:"エンジンが選択されていません。",tryToReloginToCSAServerNSecondsLater:t=>`CSAサーバーへのログインを${t}秒後に再試行します。`,mateInNPlyDoYouWantToDisplay:t=>`${t}手で詰みました。再生画面を表示しますか?`,insertedNMovesToRecord:t=>`${t}手を棋譜に挿入しました。`,errorsOccurred:t=>`${t} 種類のエラーが発生しました。`,between:(t,e)=>`${t} から ${e} まで`,addNthEngine:t=>`${t} 個目のエンジンを追加`,copyOf:t=>`${t} のコピー`,keepLatest:t=>`最新${t}件まで`,areYouSureWantToDeleteFollowingMove:t=>`${t}手目以降を削除します。よろしいですか?`,failedToOpenDirectory:t=>`ファイルの場所を開けませんでした: ${t}`,unexpectedEventSenderPleaseReport(t){return`予期せぬイベントの送信元です。このエラーメッセージを開発者に報告してください。 [${t}]`},unexpectedHTTPMethodPleaseReport(t){return`予期せぬHTTPメソッドです。このエラーメッセージを開発者に報告してください。 [${t}]`},unexpectedRequestURLPleaseReport(t){return`予期せぬURLへのリクエストです。このエラーメッセージを開発者に報告してください。 [${t}]`},noResponseFromEnginePleaseExtendTimeout(t){return`${t}秒以内にエンジンから応答がありませんでした。エンジンの起動が重い場合はアプリ設定で待ち時間を延長してください。`}},_5={electronShogi:"Electron將棋",clear:"清除",open:"開啟",saveOverwrite:"覆蓋檔案",newRecord:"新棋譜",newRecordWithBrackets:"(新棋譜)",openRecord:"打開棋譜",saveRecord:"保存棋譜",saveRecordAs:"另存棋譜",openAutoSavingDirectory:"打開自動保存目錄",exportPositionImage:"輸出局面圖",positionImage:"局面圖",close:"關閉",quit:"離開",editing:"編輯",copyAsKIF:"複製KIF棋譜",copyAsCSA:"複製CSA棋譜",copyAsUSI:"複製USI棋譜",copyAsSFEN:"複製SFEN局面",paste:"貼上",copyRecord:"複製棋譜",asKIF:"KIF形式",asCSA:"CSA形式",asUSIUntilCurrentMove:"USI形式(到目前手數為止)",asUSIAll:"USI形式(全部)",copyPositionAsSFEN:"複製局面(SFEN形式)",pasteRecordOrPosition:"貼上棋譜、局面",appendSpecialMove:"特殊手",deleteMoves:"刪除現在位置後的棋譜",view:"表示",toggleFullScreen:"切換全螢幕",defaultFontSize:"預設字體尺寸",largerFontSize:"增加字體尺寸",smallerFontSize:"縮小字體尺寸",settings:"設定",config:"設定",debug:"偵錯",toggleDevTools:"打開/關閉開發者工具顯示",openAppDirectory:"顯示本程式所在資料夾",openSettingDirectory:"開啟設定檔案所在資料夾",openLogDirectory:"開啟紀錄檔(log)所在資料夾",help:"協助",openWebSite:"官方網站",howToUse:"使用教學",checkForUpdates:"檢查最新版本",game:"對局",player:"玩家",selectFromHistory:"從紀錄選取",noHistory:"目前沒有紀錄",saveHistory:"保存紀錄",version:"版本",gameProgress:"對局過程",allGamesCompleted:"連續對局結束",gameEnded:"對局結束",offlineGame:"本地(單機)對局",csaOnlineGame:"通訊對局(CSA)",csaProtocolOnlineGame:"通訊對局(CSA協定)",csaProtocolV121:"CSA協定 1.2.1 標準",csaProtocolV121WithPVComment:"CSA協定 1.2.1 +思考註解",hostToConnect:"連接之伺服器",portNumber:"連接埠號碼",password:"密碼",showPassword:"顯示密碼",logout:"登出",displayGameResults:"確認戰績",interrupt:"中斷",stopGame:"對局中斷",resign:"投了",draw:"平手",impass:"持将棋",repetitionDraw:"千日手",mate:"詰死",noMate:"無詰",mateSearch:"詰搜尋",startMateSearch:"開始詰搜尋",stopMateSearch:"結束詰搜尋",noMateFound:"在目前的盤面中找不到詰。",timeout:"時間耗盡",foulWin:"反則勝利",foulLose:"反則敗北",enteringOfKing:"入玉勝利",winByDefault:"不戰勝",loseByDefault:"不戰敗",winByDeclaration:"宣言勝利",declareWinning:"勝利宣言",research:"檢討",startResearch:"檢討開始",endResearch:"結束檢討",recordAnalysis:"棋譜解析",analysis:"解析",analyze:"解析開始",stopAnalysis:"中斷解析",setupPosition:"編輯局面",startPositionSetup:"開始編輯局面",completePositionSetup:"結束編輯局面",changeTurn:"變更手番",initializePosition:"初始化局面",appSettings:"程式設定",language:"語言",theme:"主題",standard:"標準",green:"綠色",cherryBlossom:"櫻花",customImage:"自定義圖片",autumn:"紅葉",snow:"雪",dark:"深色主題",piece:"棋駒",singleKanjiPiece:"一文字駒",singleKanjiGothicPiece:"一文字駒(黑體)",singleKanjiDarkPiece:"一文字駒(深色)",singleKanjiGothicDarkPiece:"一文字駒(黑體・深色)",backgroundImage:"背景圖片",board:"棋盤",pieceStand:"駒台",lightWoodyTexture:"木目(亮色)",warmWoodTexture:"木目(暖色)",regin:"樹脂",displayFileAndRank:"顯示段・筋",displayLeftControls:"顯示左側操作按鈕",displayRightControls:"顯示右側操作按鈕",tabViewStyle:"分頁顯示形式",oneColumn:"1列",twoColumns:"2列",sounds:"音效",pieceLoudness:"棋駒音效",clockLoudness:"棋鐘音效大小",clockPitch:"棋鐘音效頻率",clockSoundTarget:"棋鐘音效對象",anyTurn:"所有手番",onlyHumanTurn:"只有玩家手番",defaultRecordFileFormat:"預設保存格式",textEncoding:"文字編碼",strict:"檔案原始編碼",autoDetect:"自動判定",newlineCharacter:"換行符號",old90sMac:"90年代Mac",autoSavingDirectory:"棋譜自動保存地點",select:"選擇",usiProtocol:"USI協定",translateOptionName:"選項名稱翻譯",functionalOnJapaneseOnly:"只有在日文選擇時有效",maxStartupTime:"最大起動等待時間",forDevelopers:"開發者用",enableAppLog:"輸出程式 log",enableUSILog:"輸出USI通信 log",enableCSALog:"輸出CSA通信 log",logLevel:"log 等級",engineSettings:"引擎設定",flipBoard:"盤面反轉",file:"檔案",recordFile:"棋譜檔案",executableFile:"可執行檔案",imageFile:"圖片檔案",remove:"刪除",deleteMove:"刪除該手",recordProperties:"棋譜情報",comments:"備註",commentsAndBookmarks:"備註・書籤",bookmark:"書籤",bookmarkList:"書籤一覽",useBookmarkAsHeader:"將書籤名稱作為標題",moveComments:"棋步備註",searchLog:"思考",pv:"預測手順",mateShort:"詰",displayPVShort:"再現",evaluation:"評價值",eval:"評價値",estimatedWinRate:"期待勝率",evaluationAndEstimatedWinRate:"評價値・期待勝率",swapEachTurnChange:"手番側有利時為正值",alwaysSenteIsPositive:"先手有利時為正值",signOfEvaluation:"評價值符號",winRateCoefficient:"勝率換算係數",hideTabView:"最小化",expandTabView:"展開分頁",sente:"先手",senteOrShitate:"先手(下手)",shitate:"下手",gote:"後手",goteOrUwate:"後手(上手)",uwate:"上手",swapSenteGote:"先後交換",currentPosition:"現在局面",enableEngineTimeout:"開啟引擎時間限制",setDifferentTimeForGote:"後手に異なる時間を設定",nextTurn:"手番",elapsedTime:"消費時間",elapsed:"經過時間",rank:"順位",depth:"深度",searchEngine:"引擎",ponder:"對方手番時運算(Ponder)",numberOfThreads:"執行緒數",multiPV:"多重PV",startPosition:"開始局面",maxMoves:"最大手數",gameRepetition:"連續對局",autoRelogin:"自動重新登入",swapTurnWhenGameRepetition:"每局交換手番",outputComments:"輸出備註",saveRecordAutomatically:"自動保存棋譜",adjustBoardToHumanPlayer:"調整到玩家所在方向",adjustBoardAutomatically:"自動調整盤面方向",startGame:"對局開始",cancelGame:"取消對局",allottedTime:"持時間",byoyomi:"讀秒",increments:"增秒",startEndCriteria:"開始・結束條件",endCriteria1Move:"局面結束條件",outputSettings:"輸出設定",noOutputs:"不輸出",insertCommentToTop:"加入到前方",appendCommentToBottom:"在後方新增",insertToComment:"加入到備註欄",insertToRecord:"加入到棋譜",overwrite:"覆寫原檔案",fromPrefix:"從",fromSuffix:"",toPrefix:"到",toSuffix:"",plyPrefix:"第",plySuffix:"手",hoursSuffix:"時間",minutesSuffix:"分",secondsSuffix:"秒",engineManagement:"引擎管理",engineName:"引擎名稱",author:"作者",enginePath:"場所",openDirectory:"開啟資料夾",displayName:"表示名稱",invoke:"執行",resetToEngineDefaultValues:"回復至引擎預設設定",defaultValue:"預設値",noEngineRegistered:"尚未登錄引擎。",duplicate:"複製",add:"追加",recommended:"推薦",import:"匯入",saveAndClose:"保存並關閉",save:"保存",saveAs:"另存為",cancel:"取消",back:"返回",name:"名稱",prediction:"預測",best:"最善",nodes:"Node數",hashUsage:"Hash使用率",nonHandicap:"平手",lanceHandicap:"香落",rightLanceHandicap:"右香落",bishopHandicap:"角落",rookHandicap:"飛車落",rookLanceHandicap:"飛車香落",twoPiecesHandicap:"二枚落",fourPiecesHandicap:"四枚落",sixPiecesHandicap:"六枚落",eightPiecesHandicap:"八枚落",tenPiecesHandicap:"十枚落",tsumeShogi:"詰將棋",doubleKingTsumeShogi:"雙玉詰將棋",startDateTime:"開始日時",endDateTime:"結束日時",gameDate:"對局日",tournament:"棋戰",strategy:"戰型",gameTitle:"標題",timeLimit:"持時間",place:"場所",postedOn:"登錄於",note:"備註",senteShortName:"先手省略名",goteShortName:"後手省略名",opusNo:"作品編號",opusName:"作品名",publishedBy:"發表於",publishedOn:"發表年月",source:"來源",numberOfMoves:"手數",integrity:"完全性",recordCategory:"分類",award:"受賞",filterByOptionName:"搜尋設定名稱",filterByEngineName:"搜尋引擎名稱",bookStyle:"書籍風",gameStyle:"對局畫面風",none:"無",bgCover:"圖片置中",bgContain:"擴大表示",bgTile:"磁磚狀表示",inaccuracy:"緩手",dubious:"疑問手",mistake:"惡手",blunder:"大惡手",inaccuracyThreshold:"緩手閾値",dubiousThreshold:"疑問手閾値",mistakeThreshold:"惡手閾値",blunderThreshold:"大惡手閾値",typeCustomTitleHere:"輸入自定義標題",displayEmptyElements:"顯示未定義資料",waitingForNewGame:"正在等待下一場對局開始。",insertedComment:"已加入備註。",tryingToConnectAndLoginToCSAServer:"正在連接並登入CSA伺服器。",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"※在瀏覽器版本中 log 會於 console 中顯示,並無視此處的設定。",shouldRestartToApplyLogSettings:"※您需要重新啟動本程式以使用變更後的 log 設定。",canOpenLogDirectoryFromMenu:"※log 的輸出檔案可以在「偵錯」-「開啟紀錄檔案資料夾」開啟。",hasNoOldLogCleanUpFeature:"※現在並沒有舊 log 的自動刪除機制。",processingPleaseWait:"現在處理中。請稍待一會。",importingFollowingRecordOrPosition:"將匯入以下棋譜(局面)。",supportsKIFCSAUSI:"※支援KIF/CSA/SFEN形式。",plesePasteRecordIntoTextArea:"※請在文字輸入區域貼上您的棋譜。",desktopVersionPastesAutomatically:"※安裝程式版將會自動貼上棋譜。",someLogsDisabled:"部份 log 已被無效化。",logsRecommendedForCSAProtocol:"若使用CSA協定對局,建議輸出各項 log 。",pleaseEnableLogsAndRestart:"請在程式設定中開啟 log 並重新啟動本程式。",notSendPVOnStandardCSAProtocol:"在標準的CSA協定中不會送出評價值以及思考棋步。",csaProtocolSendPlaintextPassword:"在CSA協定中,密碼為明文傳輸。",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"由於無法使用系統的加密機能,輸入的密碼將會以明文保存。",pleaseUncheckSaveHistoryIfNotWantSave:"若不想保存密碼,請不要將「保存紀錄」勾選。",csaProtocolSendPlaintextPasswordRegardlessOfHistory:"不過,CSA協定仍會以明文傳輸您的密碼。",areYouSureWantToQuitGames:"要中斷連續對局嗎?",areYouSureWantToRequestQuit:"若提出中斷要求,可能會被判負。請問您要繼續嗎?",areYouSureWantToClearRecord:"將會刪除現在的棋譜。請問您要繼續嗎?",areYouSureWantToDiscardPosition:"將不會保存現在的局面。請問您要繼續嗎?",areYouSureWantToOpenFileInsteadOfCurrentRecord:"會將現在的棋譜關閉並開啟別的檔案,請問您要繼續嗎?",youCanNotCloseAppWhileCSAOnlineGame:"由於CSA協定正在使用中,本程式無法被關閉。",fileExtensionNotSupported:"無法支援的副檔名。",errorOccuredWhileDisconnectingFromCSAServer:"在與CSA伺服器中斷連線時發生錯誤。",failedToConnectToCSAServer:"無法連接CSA伺服器。",errorOccuredWhileLogoutFromCSAServer:"在登出 CSA 伺服器時發生錯誤。",disconnectedFromCSAServer:"與CSA伺服器的連接結束。",csaServerLoginDenied:"您對CSA伺服器的登入被拒絕。",thisFeatureNotAvailableOnWebApp:"Web版無法使用本機能",failedToStartNewGame:"對局開始失敗。",errorOccuredWhileEndingGame:"在對局結束時發生錯誤。",failedToSendGoCommand:"無法送出go指令。",failedToSendPonderCommand:"無法送出ponder指令。",failedToSendStopCommand:"無法送出stop指令。",failedToShutdownEngines:"引擎無法正常結束。",failedToSaveRecord:"棋譜保存失敗。",failedToParseSFEN:"SFEN讀取失敗。",failedToDetectRecordFormat:"無法判別棋譜形式。",unknownFileExtension:"未知的檔案形式。",emptyRecordInput:"您尚未輸入棋譜。",invalidPieceName:"不合法的棋駒",invalidTurn:"不合法的手番",invalidMove:"不合法的棋步",invalidMoveNumber:"不合法的手數",invalidDestination:"不合法的移動目的地",pieceNotExists:"不存在的棋駒",invalidLine:"不存在的行",invalidHandicap:"不合法的手合配置",invalidBoard:"不合法的盤面",invalidHandPiece:"不合法的持駒",invalidUSI:"不合法的USI",backgroundImageFileNotSelected:"尚未選取背景圖片。",pieceImageFileNotSelected:"尚未選取棋駒圖片。",boardImageFileNotSelected:"尚未選取盤面圖片。",pieceStandImageFileNotSelected:"尚未選取駒台圖片。",pieceVolumeMustBe0To100Percent:"請在0%~100%之間指定棋駒音效大小。",clockVolumeMustBe0To100Percent:"請在0%~100%之間指定棋鐘音效大小。",clockPitchMustBe220To880Hz:"請在220Hz~880Hz之間指定棋鐘音效頻率。",engineTimeoutMustBe1To300Seconds:"請在1秒~300秒之間指定引擎執行最長時間。",coefficientInSigmoidMustBeGreaterThan0:"請將勝率換算係數填為大於0之值。",inaccuracyThresholdMustBe1To100Percent:"請在0%~100%之間指定緩手門檻。",dubiousThresholdMustBe1To100Percent:"請在0%~100%之間指定疑問手門檻。",mistakeThresholdMustBe1To100Percent:"請在0%~100%之間指定惡手門檻。",blunderThresholdMustBe1To100Percent:"請在0%~100%之間指定大惡手門檻。",recordSavedWithGarbledCharacters:"保存した棋譜の一部が文字化けしている可能性があります。",pleaseConsiderToUseKIFU:"KIFU形式(UTF-8)で保存することをお勧めします。",youCanChangeDefaultRecordFileFormatFromAppSettings:"デフォルトの棋譜形式はアプリ設定で変更可能です。",inaccuracyThresholdMustBeLessThanDubiousThreshold:"緩手門檻應小於疑問手門檻。",dubiousThresholdMustBeLessThanMistakeThreshold:"疑問手門檻應小於惡手門檻。",mistakeThresholdMustBeLessThanBlunderThreshold:"惡手門檻應小於大惡手門檻。",thisEngineNotSupportsMateSearch:"這個引擎不支援詰將棋搜索。",pleaseEndActiveFeaturesBeforeOpenRecord:"請關閉現正運行的功能再開啟棋譜。",bothTimeLimitAndByoyomiAreNotSet:"持時間與讀秒尚未設置。",canNotUseByoyomiWithFischer:"讀秒與 Fischer 選項無法同時併用。",protocolVersionNotSelected:"請選擇協定版本。",hostNameIsEmpty:"主機名稱為空。",invalidPortNumber:"不可用的連接埠號碼。",idIsEmpty:"ID 為空。",engineNotSelected:"尚未選擇引擎。",tryToReloginToCSAServerNSecondsLater:t=>`請在${t}秒後再次嘗試登入 CSA 伺服器。`,mateInNPlyDoYouWantToDisplay:t=>`尋找到${t}手詰。要顯示結果嗎?`,insertedNMovesToRecord:t=>`已加入${t}手到棋譜。`,errorsOccurred:t=>`發生 ${t} 種類的錯誤。`,between:(t,e)=>`自 ${t} 到 ${e} `,addNthEngine:t=>`追加第 ${t} 個引擎`,copyOf:t=>`${t} 的拷貝`,keepLatest:t=>`到最新${t}件`,areYouSureWantToDeleteFollowingMove:t=>`將會刪除${t}手目以後的棋譜。請問您要繼續嗎?`,failedToOpenDirectory:t=>`無法開啟檔案目錄:${t}`,unexpectedEventSenderPleaseReport(t){return`無法預期的事件發送方已發生。請將該錯誤訊息告知開發者,謝謝。 [${t}]`},unexpectedHTTPMethodPleaseReport(t){return`無法預期的 HTTP 方法。請將該錯誤訊息告知開發者,謝謝。 [${t}]`},unexpectedRequestURLPleaseReport(t){return`無法從 URL 獲取資訊。請將該錯誤訊息告知開發者,謝謝。 [${t}]`},noResponseFromEnginePleaseExtendTimeout(t){return`引擎在${t}秒内沒有回應。若引擎的啟動時間稍長,請在設定中調整引擎最長等待時間。`}},d=Er;function v5(t){switch(t){case S0.JA:return Er;case S0.EN:return D5;case S0.ZH_TW:return _5;default:return Er}}function b5(t){Object.entries(v5(t)).forEach(([e,x])=>{d[e]=x})}const y5={USI_Ponder:"相手番思考",Ponder:"相手番思考",USI_Hash:"ハッシュ",Hash:"ハッシュ",Clear_Hash:"ハッシュクリア",Threads:"スレッド",NumberOfThreads:"スレッド数",thread_num_per_gpu:"GPUあたりのスレッド数",ThreadIdOffset:"スレッドIDオフセット",MultiPV:"マルチPV",BookFile:"定跡ファイル",Book_File:"定跡ファイル",Book_Enable:"定跡あり",BookEvalDiff:"定跡の評価値差",book_file_name:"定跡ファイル名",use_book:"定跡を使用",BookPvMoves:"定跡PV手数",TinyBook:"小さい定跡",BookMoves:"定跡利用手数",BookMaxPly:"定跡最大手数",BookIgnoreRate:"定跡不使用率",RandomBookSelect:"ランダム定跡選択",IgnoreBookPly:"定跡の手数を無視",DepthLimit:"最大深さ",NarrowBook:"定跡手を限定",WriteDebugLog:"デバッグログ出力",Write_Debug_Log:"デバッグログ出力",ResignValue:"投了基準値",ResignScore:"投了基準値",PvInterval:"PV出力間隔",NodesLimit:"最大ノード数",USI_OwnBook:"定跡を使用",OwnBook:"定跡を使用",EvalDir:"評価関数のフォルダ",Eval_Dir:"評価関数のフォルダ",EvalFile:"評価関数ファイル",EvalHash:"評価値ハッシュ",Eval_Hash:"評価値ハッシュ",EvalSaveDir:"評価関数保存フォルダ",EvalShare:"評価値共有",BookDir:"定跡ファイルのフォルダ",Stochastic_Ponder:"相手番思考(確率的)",MinimumThinkingTime:"最小思考時間",Minimum_Thinking_Time:"最小思考時間",MinThinkingTime:"最小思考時間",MaxMovesToDraw:"強制引き分け手数",SlowMover:"長考",Slow_Mover:"長考",OutputFailLHPV:"Fail Low/Highを出力",NetworkDelay:"通信遅延",NetworkDelay2:"通信遅延2",FV_SCALE:"評価値スケール",UseBook:"定跡を使用",MaxDepth:"最大深さ",MarginMs:"マージン(ミリ秒)",Time_Margin:"時間マージン",ByoyomiMargin:"秒読みマージン",Byoyomi_Margin:"秒読みマージン",byoyomi_margin:"秒読みマージン",Move_Overhead:"着手オーバーヘッド",FischerMargin:"フィッシャーマージン",SuddenDeathMargin:"切れ負けマージン",Snappy:"素早く指す",EnteringKingRule:"入玉ルール",Do_YoTsume_Search:"余詰めを探索",gpu_num:"GPU数",ConsiderationMode:"検討モード",ConsiderBookMoveCount:"定跡出現率を使用",GenerateAllLegalMoves:"全合法手を生成",DrawScore:"引き分けのスコア",DrawValue:"引き分けの値",DrawValueBlack:"引き分けの値(先手)",DrawValueWhite:"引き分けの値(後手)",LargePageEnable:"LargePageを使用",SkillLevel:"スキルレベル",Skill_Level:"スキルレベル"},es={};function S5(t){switch(t){case S0.JA:return y5;case S0.EN:return{};default:return{}}}function w5(t){Object.keys(es).forEach(e=>{delete es[e]}),Object.entries(S5(t)).forEach(([e,x])=>{es[e]=x})}class io extends Error{constructor(e){super(`Invalid piece name: ${e}`),this.data=e,this.name="InvalidPieceNameError"}}class u8 extends Error{constructor(e){super(`Invalid turn: ${e}`),this.data=e,this.name="InvalidTurnError"}}class Bi extends Error{constructor(e){super(`Invalid move: ${e}`),this.data=e,this.name="InvalidMoveError"}}class A8 extends Error{constructor(e){super(`Invalid move number: ${e}`),this.data=e,this.name="InvalidMoveNumberError"}}class h8 extends Error{constructor(e){super(`Invalid destination: ${e}`),this.data=e,this.name="InvalidDestinationError"}}class lr extends Error{constructor(e){super(`Piece not exists: ${e}`),this.data=e,this.name="PieceNotExistsError"}}class na extends Error{constructor(e){super(`Invalid line: ${e}`),this.data=e,this.name="InvalidLineError"}}class B8 extends Error{constructor(e){super(`Invalid handicap: ${e}`),this.data=e,this.name="InvalidHandicapError"}}class cr extends Error{constructor(e){super(`Invalid board: ${e}`),this.data=e,this.name="InvalidBoardError"}}class d8 extends Error{constructor(e){super(`Invalid hand piece: ${e}`),this.data=e,this.name="InvalidHandPieceError"}}class bn extends Error{constructor(e){super(`Invalid USI: ${e}`),this.data=e,this.name="InvalidUSIError"}}var L=(t=>(t.BLACK="black",t.WHITE="white",t))(L||{});function Tt(t){return t==="black"?"white":"black"}function T5(t){return t==="black"?"b":"w"}function I5(t){return t==="b"||t==="w"}function P5(t){return t==="b"?"black":"white"}var H=(t=>(t.PAWN="pawn",t.LANCE="lance",t.KNIGHT="knight",t.SILVER="silver",t.GOLD="gold",t.BISHOP="bishop",t.ROOK="rook",t.KING="king",t.PROM_PAWN="promPawn",t.PROM_LANCE="promLance",t.PROM_KNIGHT="promKnight",t.PROM_SILVER="promSilver",t.HORSE="horse",t.DRAGON="dragon",t))(H||{});const k5=["pawn","lance","knight","silver","gold","bishop","rook"],M5={pawn:!0,lance:!0,knight:!0,silver:!0,gold:!1,bishop:!0,rook:!0,king:!1,promPawn:!1,promLance:!1,promKnight:!1,promSilver:!1,horse:!1,dragon:!1},f8={pawn:"promPawn",lance:"promLance",knight:"promKnight",silver:"promSilver",bishop:"horse",rook:"dragon"};function N5(t){return f8[t]||t}const R5={promPawn:"pawn",promLance:"lance",promKnight:"knight",promSilver:"silver",horse:"bishop",dragon:"rook"},p8={pawn:"P",lance:"L",knight:"N",silver:"S",gold:"G",bishop:"B",rook:"R",king:"K",promPawn:"+P",promLance:"+L",promKnight:"+N",promSilver:"+S",horse:"+B",dragon:"+R"};function O5(t){return p8[t]}const L5={pawn:"p",lance:"l",knight:"n",silver:"s",gold:"g",bishop:"b",rook:"r",king:"k",promPawn:"+p",promLance:"+l",promKnight:"+n",promSilver:"+s",horse:"+b",dragon:"+r"},hE={P:"pawn",L:"lance",N:"knight",S:"silver",G:"gold",B:"bishop",R:"rook",K:"king","+P":"promPawn","+L":"promLance","+N":"promKnight","+S":"promSilver","+B":"horse","+R":"dragon",p:"pawn",l:"lance",n:"knight",s:"silver",g:"gold",b:"bishop",r:"rook",k:"king","+p":"promPawn","+l":"promLance","+n":"promKnight","+s":"promSilver","+b":"horse","+r":"dragon"},H5={P:L.BLACK,L:L.BLACK,N:L.BLACK,S:L.BLACK,G:L.BLACK,B:L.BLACK,R:L.BLACK,K:L.BLACK,"+P":L.BLACK,"+L":L.BLACK,"+N":L.BLACK,"+S":L.BLACK,"+B":L.BLACK,"+R":L.BLACK,p:L.WHITE,l:L.WHITE,n:L.WHITE,s:L.WHITE,g:L.WHITE,b:L.WHITE,r:L.WHITE,k:L.WHITE,"+p":L.WHITE,"+l":L.WHITE,"+n":L.WHITE,"+s":L.WHITE,"+b":L.WHITE,"+r":L.WHITE},Wt=new Map;Wt.set("pawn",{type:"promPawn",reverseColor:!1});Wt.set("lance",{type:"promLance",reverseColor:!1});Wt.set("knight",{type:"promKnight",reverseColor:!1});Wt.set("silver",{type:"promSilver",reverseColor:!1});Wt.set("gold",{type:"gold",reverseColor:!0});Wt.set("bishop",{type:"horse",reverseColor:!1});Wt.set("rook",{type:"dragon",reverseColor:!1});Wt.set("king",{type:"king",reverseColor:!0});Wt.set("promPawn",{type:"pawn",reverseColor:!0});Wt.set("promLance",{type:"lance",reverseColor:!0});Wt.set("promKnight",{type:"knight",reverseColor:!0});Wt.set("promSilver",{type:"silver",reverseColor:!0});Wt.set("horse",{type:"bishop",reverseColor:!0});Wt.set("dragon",{type:"rook",reverseColor:!0});class le{constructor(e,x){this.color=e,this.type=x}black(){return this.withColor(L.BLACK)}white(){return this.withColor(L.WHITE)}withColor(e){return new le(e,this.type)}equals(e){return this.type===e.type&&this.color===e.color}promoted(){const e=f8[this.type];return new le(this.color,e||this.type)}unpromoted(){const e=R5[this.type];return new le(this.color,e||this.type)}isPromotable(){return!!M5[this.type]}rotate(){const e=Wt.get(this.type),x=new le(this.color,e?e.type:this.type);return e&&e.reverseColor&&(x.color=Tt(this.color)),x}get id(){return this.color+"_"+this.type}get sfen(){switch(this.color){default:case L.BLACK:return p8[this.type];case L.WHITE:return L5[this.type]}}static isValidSFEN(e){return!!hE[e]}static newBySFEN(e){const x=hE[e];if(!x)return null;const n=H5[e];return n?new le(n,x):null}}var $t=(t=>(t.UP="up",t.DOWN="down",t.LEFT="left",t.RIGHT="right",t.LEFT_UP="left_up",t.RIGHT_UP="right_up",t.LEFT_DOWN="left_down",t.RIGHT_DOWN="right_down",t.LEFT_UP_KNIGHT="left_up_knight",t.RIGHT_UP_KNIGHT="right_up_knight",t.LEFT_DOWN_KNIGHT="left_down_knight",t.RIGHT_DOWN_KNIGHT="right_down_knight",t))($t||{});const U5={up:"down",down:"up",left:"right",right:"left",left_up:"right_down",right_up:"left_down",left_down:"right_up",right_down:"left_up",left_up_knight:"right_down_knight",right_up_knight:"left_down_knight",left_down_knight:"right_up_knight",right_down_knight:"left_up_knight"};function _s(t){return U5[t]}const $5=["up","down","left","right","left_up","right_up","left_down","right_down","left_up_knight","right_up_knight","left_down_knight","right_down_knight"];var ti=(t=>(t.SHORT="short",t.LONG="long",t))(ti||{});const g8={black:{pawn:{up:"short"},lance:{up:"long"},knight:{left_up_knight:"short",right_up_knight:"short"},silver:{left_up:"short",up:"short",right_up:"short",left_down:"short",right_down:"short"},gold:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},bishop:{left_up:"long",right_up:"long",left_down:"long",right_down:"long"},rook:{up:"long",left:"long",right:"long",down:"long"},king:{left_down:"short",right_down:"short",left_up:"short",right_up:"short",down:"short",left:"short",right:"short",up:"short"},promPawn:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},promLance:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},promKnight:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},promSilver:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},horse:{left_up:"long",right_up:"long",left_down:"long",right_down:"long",up:"short",left:"short",right:"short",down:"short"},dragon:{up:"long",left:"long",right:"long",down:"long",left_up:"short",right_up:"short",left_down:"short",right_down:"short"}},white:{pawn:{down:"short"},lance:{down:"long"},knight:{left_down_knight:"short",right_down_knight:"short"},silver:{left_down:"short",down:"short",right_down:"short",left_up:"short",right_up:"short"},gold:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},bishop:{left_down:"long",right_down:"long",left_up:"long",right_up:"long"},rook:{down:"long",left:"long",right:"long",up:"long"},king:{left_down:"short",right_down:"short",left_up:"short",right_up:"short",down:"short",left:"short",right:"short",up:"short"},promPawn:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},promLance:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},promKnight:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},promSilver:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},horse:{left_down:"long",right_down:"long",left_up:"long",right_up:"long",down:"short",left:"short",right:"short",up:"short"},dragon:{down:"long",left:"long",right:"long",up:"long",left_down:"short",right_down:"short",left_up:"short",right_up:"short"}}};function G5(t){return Object.keys(g8[t.color][t.type])}function m8(t,e){return g8[t.color][t.type][e]}const W5={up:{x:0,y:-1},down:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},left_up:{x:-1,y:-1},right_up:{x:1,y:-1},left_down:{x:-1,y:1},right_down:{x:1,y:1},left_up_knight:{x:-1,y:-2},right_up_knight:{x:1,y:-2},left_down_knight:{x:-1,y:2},right_down_knight:{x:1,y:2}};function C8(t,e){if(t===1&&e===-2)return{direction:"right_up_knight",distance:1,ok:!0};if(t===-1&&e===-2)return{direction:"left_up_knight",distance:1,ok:!0};if(t===1&&e===2)return{direction:"right_down_knight",distance:1,ok:!0};if(t===-1&&e===2)return{direction:"left_down_knight",distance:1,ok:!0};if(t!==0&&e!==0&&Math.abs(t)!==Math.abs(e))return{direction:"",distance:0,ok:!1};let x=t,n=e,i=0;return x!==0&&(i=Math.abs(x),x/=i),n!==0&&(i=Math.abs(n),n/=i),x===-1&&n===-1?{direction:"left_up",distance:i,ok:!0}:x===0&&n===-1?{direction:"up",distance:i,ok:!0}:x===1&&n===-1?{direction:"right_up",distance:i,ok:!0}:x===-1&&n===0?{direction:"left",distance:i,ok:!0}:x===1&&n===0?{direction:"right",distance:i,ok:!0}:x===-1&&n===1?{direction:"left_down",distance:i,ok:!0}:x===0&&n===1?{direction:"down",distance:i,ok:!0}:x===1&&n===1?{direction:"right_down",distance:i,ok:!0}:{direction:"",distance:0,ok:!1}}var Px=(t=>(t.UP="up",t.NONE="none",t.DOWN="down",t))(Px||{});function ts(t){switch(t){case"up":case"left_up":case"right_up":case"left_up_knight":case"right_up_knight":return"up";case"down":case"left_down":case"right_down":case"left_down_knight":case"right_down_knight":return"down";default:return"none"}}var Zt=(t=>(t.LEFT="left",t.NONE="none",t.RIGHT="right",t))(Zt||{});function xs(t){switch(t){case"left":case"left_up":case"left_down":case"left_up_knight":case"left_down_knight":return"left";case"right":case"right_up":case"right_down":case"right_up_knight":case"right_down_knight":return"right";default:return"none"}}function z5(t){switch(t){case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;default:return null}}function V5(t){switch(t){case"a":return 1;case"b":return 2;case"c":return 3;case"d":return 4;case"e":return 5;case"f":return 6;case"g":return 7;case"h":return 8;case"i":return 9;default:return null}}const K5=["a","b","c","d","e","f","g","h","i"],gt=class{constructor(e,x){this.file=e,this.rank=x}get x(){return 9-this.file}get y(){return this.rank-1}get index(){return this.y*9+this.x}get opposite(){return new gt(10-this.file,10-this.rank)}neighbor(e,x){switch(e){case $t.UP:return new gt(this.file,this.rank-1);case $t.DOWN:return new gt(this.file,this.rank+1);case $t.LEFT:return new gt(this.file+1,this.rank);case $t.RIGHT:return new gt(this.file-1,this.rank);case $t.LEFT_UP:return new gt(this.file+1,this.rank-1);case $t.RIGHT_UP:return new gt(this.file-1,this.rank-1);case $t.LEFT_DOWN:return new gt(this.file+1,this.rank+1);case $t.RIGHT_DOWN:return new gt(this.file-1,this.rank+1);case $t.LEFT_UP_KNIGHT:return new gt(this.file+1,this.rank-2);case $t.RIGHT_UP_KNIGHT:return new gt(this.file-1,this.rank-2);case $t.LEFT_DOWN_KNIGHT:return new gt(this.file+1,this.rank+2);case $t.RIGHT_DOWN_KNIGHT:return new gt(this.file-1,this.rank+2)}const n=e,i=x;return new gt(this.file-n,this.rank+i)}directionTo(e){return C8(e.x-this.x,e.y-this.y).direction}get valid(){return this.file>=1&&this.file<=9&&this.rank>=1&&this.rank<=9}equals(e){return!!e&&this.file===e.file&&this.rank===e.rank}static newByXY(e,x){return new gt(9-e,x+1)}static newByIndex(e){return new gt(9-e%9,Math.trunc(e/9)+1)}get sfen(){return this.file+K5[this.rank-1]}static parseSFENSquare(e){const x=z5(e[0]),n=V5(e[1]);return!x||!n?null:new gt(x,n)}};let U=gt;b(U,"all",[]);for(let t=0;t<81;t+=1)U.all.push(U.newByIndex(t));class Ze{constructor(e,x,n,i,s,o){this.from=e,this.to=x,this.promote=n,this.color=i,this.pieceType=s,this.capturedPieceType=o}equals(e){return e?(this.from instanceof U&&e.from instanceof U&&this.from.equals(e.from)||!(this.from instanceof U)&&!(e.from instanceof U)&&this.from===e.from)&&this.to.equals(e.to)&&this.promote===e.promote&&this.color===e.color&&this.pieceType===e.pieceType&&this.capturedPieceType===e.capturedPieceType:!1}withPromote(){return new Ze(this.from,this.to,!0,this.color,this.pieceType,this.capturedPieceType)}get usi(){let e="";return this.from instanceof U?e+=this.from.sfen:e+=O5(this.from)+"*",e+=this.to.sfen,this.promote&&(e+="+"),e}}function F8(t){let e;if(t[1]==="*"){const i=le.newBySFEN(t[0]);if(!i)return null;e=i.type}else{const i=U.parseSFENSquare(t);if(!i)return null;e=i}const x=U.parseSFENSquare(t.substring(2));if(!x)return null;const n=t.length>=5&&t[4]==="+";return{from:e,to:x,promote:n}}var Y=(t=>(t.START="start",t.INTERRUPT="interrupt",t.RESIGN="resign",t.IMPASS="impass",t.DRAW="draw",t.REPETITION_DRAW="repetitionDraw",t.MATE="mate",t.NO_MATE="noMate",t.TIMEOUT="timeout",t.FOUL_WIN="foulWin",t.FOUL_LOSE="foulLose",t.ENTERING_OF_KING="enteringOfKing",t.WIN_BY_DEFAULT="winByDefault",t.LOSE_BY_DEFAULT="loseByDefault",t))(Y||{});function ia(t){return{type:t}}function j5(t){return{type:"any",name:t}}function D8(t){return!(t instanceof Ze)&&t.type!=="any"}var he=(t=>(t.STANDARD="standard",t.EMPTY="empty",t.HANDICAP_LANCE="handicapLance",t.HANDICAP_RIGHT_LANCE="handicapRightLance",t.HANDICAP_BISHOP="handicapBishop",t.HANDICAP_ROOK="handicapRook",t.HANDICAP_ROOK_LANCE="handicapRookLance",t.HANDICAP_2PIECES="handicap2Pieces",t.HANDICAP_4PIECES="handicap4Pieces",t.HANDICAP_6PIECES="handicap6Pieces",t.HANDICAP_8PIECES="handicap8Pieces",t.HANDICAP_10PIECES="handicap10Pieces",t.TSUME_SHOGI="tsumeShogi",t.TSUME_SHOGI_2KINGS="tsumeShogi2Kings",t))(he||{});function BE(t){switch(t){case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;default:return null}}class vs{constructor(){b(this,"squares");this.squares=new Array;for(let e=0;e<81;e+=1)this.squares.push(null);this.reset("standard")}at(e){return this.squares[e.index]}set(e,x){this.squares[e.index]=x}swap(e,x){const n=this.squares[e.index];this.squares[e.index]=this.squares[x.index],this.squares[x.index]=n}remove(e){const x=this.squares[e.index];return this.squares[e.index]=null,x}listNonEmptySquares(){return U.all.filter(e=>this.squares[e.index])}listSquaresByColor(e){return U.all.filter(x=>{const n=this.squares[x.index];return n&&n.color===e})}listSquaresByPiece(e){return U.all.filter(x=>{const n=this.squares[x.index];return n&&e.equals(n)})}clear(){U.all.forEach(e=>{this.squares[e.index]=null})}reset(e){if(this.clear(),e!=="empty"&&(this.squares[new U(5,1).index]=new le(L.WHITE,H.KING),e!=="tsumeShogi"&&(this.squares[new U(5,9).index]=new le(L.BLACK,H.KING),e!=="tsumeShogi2Kings")))switch(this.squares[new U(2,8).index]=new le(L.BLACK,H.ROOK),this.squares[new U(8,2).index]=new le(L.WHITE,H.ROOK),this.squares[new U(8,8).index]=new le(L.BLACK,H.BISHOP),this.squares[new U(2,2).index]=new le(L.WHITE,H.BISHOP),this.squares[new U(4,9).index]=new le(L.BLACK,H.GOLD),this.squares[new U(6,9).index]=new le(L.BLACK,H.GOLD),this.squares[new U(6,1).index]=new le(L.WHITE,H.GOLD),this.squares[new U(4,1).index]=new le(L.WHITE,H.GOLD),this.squares[new U(3,9).index]=new le(L.BLACK,H.SILVER),this.squares[new U(7,9).index]=new le(L.BLACK,H.SILVER),this.squares[new U(7,1).index]=new le(L.WHITE,H.SILVER),this.squares[new U(3,1).index]=new le(L.WHITE,H.SILVER),this.squares[new U(2,9).index]=new le(L.BLACK,H.KNIGHT),this.squares[new U(8,9).index]=new le(L.BLACK,H.KNIGHT),this.squares[new U(8,1).index]=new le(L.WHITE,H.KNIGHT),this.squares[new U(2,1).index]=new le(L.WHITE,H.KNIGHT),this.squares[new U(1,9).index]=new le(L.BLACK,H.LANCE),this.squares[new U(9,9).index]=new le(L.BLACK,H.LANCE),this.squares[new U(9,1).index]=new le(L.WHITE,H.LANCE),this.squares[new U(1,1).index]=new le(L.WHITE,H.LANCE),this.squares[new U(1,7).index]=new le(L.BLACK,H.PAWN),this.squares[new U(2,7).index]=new le(L.BLACK,H.PAWN),this.squares[new U(3,7).index]=new le(L.BLACK,H.PAWN),this.squares[new U(4,7).index]=new le(L.BLACK,H.PAWN),this.squares[new U(5,7).index]=new le(L.BLACK,H.PAWN),this.squares[new U(6,7).index]=new le(L.BLACK,H.PAWN),this.squares[new U(7,7).index]=new le(L.BLACK,H.PAWN),this.squares[new U(8,7).index]=new le(L.BLACK,H.PAWN),this.squares[new U(9,7).index]=new le(L.BLACK,H.PAWN),this.squares[new U(1,3).index]=new le(L.WHITE,H.PAWN),this.squares[new U(2,3).index]=new le(L.WHITE,H.PAWN),this.squares[new U(3,3).index]=new le(L.WHITE,H.PAWN),this.squares[new U(4,3).index]=new le(L.WHITE,H.PAWN),this.squares[new U(5,3).index]=new le(L.WHITE,H.PAWN),this.squares[new U(6,3).index]=new le(L.WHITE,H.PAWN),this.squares[new U(7,3).index]=new le(L.WHITE,H.PAWN),this.squares[new U(8,3).index]=new le(L.WHITE,H.PAWN),this.squares[new U(9,3).index]=new le(L.WHITE,H.PAWN),e){default:case"standard":return;case"handicapLance":this.squares[new U(1,1).index]=null;return;case"handicapRightLance":this.squares[new U(9,1).index]=null;return;case"handicapBishop":this.squares[new U(2,2).index]=null;return;case"handicapRook":this.squares[new U(8,2).index]=null;return;case"handicapRookLance":this.squares[new U(8,2).index]=null,this.squares[new U(1,1).index]=null;return;case"handicap2Pieces":this.squares[new U(8,2).index]=null,this.squares[new U(2,2).index]=null;return;case"handicap4Pieces":this.squares[new U(8,2).index]=null,this.squares[new U(2,2).index]=null,this.squares[new U(1,1).index]=null,this.squares[new U(9,1).index]=null;return;case"handicap6Pieces":this.squares[new U(8,2).index]=null,this.squares[new U(2,2).index]=null,this.squares[new U(1,1).index]=null,this.squares[new U(2,1).index]=null,this.squares[new U(8,1).index]=null,this.squares[new U(9,1).index]=null;return;case"handicap8Pieces":this.squares[new U(8,2).index]=null,this.squares[new U(2,2).index]=null,this.squares[new U(1,1).index]=null,this.squares[new U(2,1).index]=null,this.squares[new U(3,1).index]=null,this.squares[new U(7,1).index]=null,this.squares[new U(8,1).index]=null,this.squares[new U(9,1).index]=null;return;case"handicap10Pieces":this.squares[new U(8,2).index]=null,this.squares[new U(2,2).index]=null,this.squares[new U(1,1).index]=null,this.squares[new U(2,1).index]=null,this.squares[new U(3,1).index]=null,this.squares[new U(4,1).index]=null,this.squares[new U(6,1).index]=null,this.squares[new U(7,1).index]=null,this.squares[new U(8,1).index]=null,this.squares[new U(9,1).index]=null;return}}get sfen(){let e="",x=0;for(let n=0;n<9;n+=1){for(let i=0;i<9;i+=1){const s=this.at(U.newByXY(i,n));s?(x&&(e+=x,x=0),e+=s.sfen):x+=1}x&&(e+=x,x=0),n!==8&&(e+="/")}return e}resetBySFEN(e){if(!vs.isValidSFEN(e))return!1;this.clear();const x=e.split("/");for(let n=0;n<9;n+=1){let i=0;for(let s=0;s{const i=this.at(n);if(i&&x.equals(i))return!0})}hasPower(e,x,n){return!!$5.find(i=>{let s=0;for(let o=e.neighbor(i);o.valid&&(s+=1,!(n&&n.filled&&o.equals(n.filled)));o=o.neighbor(i)){if(n&&n.ignore&&o.equals(n.ignore))continue;const r=this.at(o);if(r){if(r.color!==x)return!1;const a=_s(i),E=m8(r,a);return E===ti.LONG||E===ti.SHORT&&s===1}}return!1})}isChecked(e,x){const n=this.findKing(e);return n?this.hasPower(n,Tt(e),{filled:x&&x.filled,ignore:x&&x.ignore}):!1}static isValidSFEN(e){const x=e.split("/");if(x.length!==9)return!1;for(let n=0;n<9;n+=1){let i=0;for(let s=0;s{this.squares[x.index]=e.at(x)})}}function dx(t,e){return t===0?"":(t!==1?t:"")+e.sfen}class o0{constructor(){b(this,"pieces");this.pieces=new Map,this.pieces.set(H.PAWN,0),this.pieces.set(H.LANCE,0),this.pieces.set(H.KNIGHT,0),this.pieces.set(H.SILVER,0),this.pieces.set(H.GOLD,0),this.pieces.set(H.BISHOP,0),this.pieces.set(H.ROOK,0)}get counts(){return[{type:H.ROOK,count:this.count(H.ROOK)},{type:H.BISHOP,count:this.count(H.BISHOP)},{type:H.GOLD,count:this.count(H.GOLD)},{type:H.SILVER,count:this.count(H.SILVER)},{type:H.KNIGHT,count:this.count(H.KNIGHT)},{type:H.LANCE,count:this.count(H.LANCE)},{type:H.PAWN,count:this.count(H.PAWN)}]}count(e){return this.pieces.get(e)}set(e,x){this.pieces.set(e,x)}add(e,x){let n=this.pieces.get(e);return n+=x,this.pieces.set(e,n),n}reduce(e,x){let n=this.pieces.get(e);return n-=x,this.pieces.set(e,n),n}forEach(e){e(H.PAWN,this.pieces.get(H.PAWN)),e(H.LANCE,this.pieces.get(H.LANCE)),e(H.KNIGHT,this.pieces.get(H.KNIGHT)),e(H.SILVER,this.pieces.get(H.SILVER)),e(H.GOLD,this.pieces.get(H.GOLD)),e(H.BISHOP,this.pieces.get(H.BISHOP)),e(H.ROOK,this.pieces.get(H.ROOK))}get sfenBlack(){return this.formatSFEN(L.BLACK)}get sfenWhite(){return this.formatSFEN(L.WHITE)}formatSFEN(e){let x="";return x+=dx(this.count(H.ROOK),new le(e,H.ROOK)),x+=dx(this.count(H.BISHOP),new le(e,H.BISHOP)),x+=dx(this.count(H.GOLD),new le(e,H.GOLD)),x+=dx(this.count(H.SILVER),new le(e,H.SILVER)),x+=dx(this.count(H.KNIGHT),new le(e,H.KNIGHT)),x+=dx(this.count(H.LANCE),new le(e,H.LANCE)),x+=dx(this.count(H.PAWN),new le(e,H.PAWN)),x===""?"-":x}static formatSFEN(e,x){const n=e.sfenBlack,i=x.sfenWhite;return n==="-"&&i==="-"?"-":i==="-"?n:n==="-"?i:n+i}static isValidSFEN(e){return e==="-"?!0:!!e.match(/^(?:[0-9]*[PLNSGBRplnsgbr])*$/)}static parseSFEN(e){if(e==="-")return{black:new o0,white:new o0};if(!e.match(/^(?:[0-9]*[PLNSGBRplnsgbr])*$/))return null;const x=e.match(/([0-9]*[PLNSGBRplnsgbr])/g),n=new o0,i=new o0;for(let s=0;s=2&&(r=Number(o.substring(0,o.length-1)));const a=le.newBySFEN(o[o.length-1]);a.color===L.BLACK?n.add(a.type,r):i.add(a.type,r)}return{black:n,white:i}}copyFrom(e){e.pieces.forEach((x,n)=>{this.pieces.set(n,x)})}}const q5={black:{pawn:{1:!0},lance:{1:!0},knight:{1:!0,2:!0}},white:{pawn:{9:!0},lance:{9:!0},knight:{9:!0,8:!0}}};function dE(t,e,x){const n=q5[t][e];return n?n[x]:!1}function bs(t,e){return t===L.BLACK?e<=3:e>=7}function Y5(t,e,x){for(let n=1;n<=9;n+=1){const i=e.at(new U(x,n));if(i&&i.type===H.PAWN&&i.color===t)return!0}return!1}class kt{constructor(){b(this,"_board",new vs);b(this,"_color",L.BLACK);b(this,"_blackHand",new o0);b(this,"_whiteHand",new o0)}get board(){return this._board}get color(){return this._color}get blackHand(){return this._blackHand}get whiteHand(){return this._whiteHand}reset(e){switch(this._board.reset(e),this._blackHand=new o0,this._whiteHand=new o0,e){case he.STANDARD:case he.EMPTY:case he.TSUME_SHOGI:case he.TSUME_SHOGI_2KINGS:this._color=L.BLACK;break;case he.HANDICAP_LANCE:case he.HANDICAP_RIGHT_LANCE:case he.HANDICAP_BISHOP:case he.HANDICAP_ROOK:case he.HANDICAP_ROOK_LANCE:case he.HANDICAP_2PIECES:case he.HANDICAP_4PIECES:case he.HANDICAP_6PIECES:case he.HANDICAP_8PIECES:case he.HANDICAP_10PIECES:this._color=L.WHITE;break}(e===he.TSUME_SHOGI||e===he.TSUME_SHOGI_2KINGS)&&(this._whiteHand.set(H.PAWN,18),this._whiteHand.set(H.LANCE,4),this._whiteHand.set(H.KNIGHT,4),this._whiteHand.set(H.SILVER,4),this._whiteHand.set(H.GOLD,4),this._whiteHand.set(H.BISHOP,2),this._whiteHand.set(H.ROOK,2))}hand(e){return this._hand(e)}_hand(e){return e===L.BLACK?this._blackHand:this._whiteHand}get checked(){return this._board.isChecked(this.color)}createMove(e,x){let n;if(e instanceof U){const s=this._board.at(e);if(!s)return null;n=s.type}else n=e;const i=this._board.at(x);return new Ze(e,x,!1,this.color,n,i?i.type:null)}createMoveByUSI(e){const x=F8(e);if(!x)return null;let n=this.createMove(x.from,x.to);return n?(x.promote&&(n=n.withPromote()),n):null}isPawnDropMate(e){if(e.from instanceof U||e.pieceType!==H.PAWN)return!1;const x=e.to.neighbor(e.color===L.BLACK?$t.UP:$t.DOWN),n=this.board.at(x);return!n||n.type!==H.KING||n.color===e.color||G5(n).find(s=>{const o=x.neighbor(s);if(!o.valid)return!1;const r=this.board.at(o);return r&&r.color==n.color?!1:!this.board.hasPower(o,e.color,{filled:e.to})})?!1:!this.board.listSquaresByColor(n.color).find(s=>!s.equals(x)&&this.isMovable(s,e.to)&&!this.board.isChecked(n.color,{filled:e.to,ignore:s}))}listAttackersByPiece(e,x){return this.board.listSquaresByPiece(x).filter(n=>this.isMovable(n,e))}isValidMove(e){if(e.from instanceof U){const x=this._board.at(e.from);if(!x||x.color!==this.color||!this.isMovable(e.from,e.to))return!1;const n=this._board.at(e.to);if(n&&n.color===this.color)return!1;if(e.promote){if(!x.isPromotable()||!bs(this.color,e.from.rank)&&!bs(this.color,e.to.rank))return!1}else if(dE(this.color,x.type,e.to.rank))return!1;if(e.pieceType!==H.KING?this._board.isChecked(this.color,{filled:e.to,ignore:e.from}):this._board.hasPower(e.to,Tt(this.color),{ignore:e.from}))return!1}else if(e.promote||e.color!==this.color||this.hand(this.color).count(e.from)===0||this._board.at(e.to)||dE(this.color,e.from,e.to.rank)||e.from===H.PAWN&&Y5(this.color,this._board,e.to.file)||this._board.isChecked(this.color,{filled:e.to})||this.isPawnDropMate(e))return!1;return!0}doMove(e,x){if(!(x&&x.ignoreValidation)&&!this.isValidMove(e))return!1;if(e.from instanceof U){const n=this._board.at(e.from),i=this._board.at(e.to);this._board.remove(e.from),this._board.set(e.to,e.promote?n.promoted():n),i&&i.type!==H.KING&&this._hand(this.color).add(i.unpromoted().type,1)}else this._hand(this.color).reduce(e.from,1),this._board.set(e.to,new le(this.color,e.from));return this._color=Tt(this.color),!0}undoMove(e){if(this._color=Tt(this.color),e.from instanceof U)if(this._board.set(e.from,new le(this.color,e.pieceType)),e.capturedPieceType){const x=new le(Tt(this.color),e.capturedPieceType);this._board.set(e.to,x),x.type!==H.KING&&this._hand(this.color).reduce(x.unpromoted().type,1)}else this._board.remove(e.to);else this._hand(this.color).add(e.from,1),this._board.remove(e.to)}isValidEditing(e,x){if(e instanceof U){const n=this._board.at(e);if(!n)return!1;if(x instanceof U){if(e.equals(x))return!1}else if(n.type===H.KING)return!1}else{if(!e.color||this.hand(e.color).count(e.type)===0)return!1;if(x instanceof U){if(this._board.at(x))return!1}else if(e.color===x)return!1}return!0}edit(e){if(e.move){if(!this.isValidEditing(e.move.from,e.move.to))return!1;if(!(e.move.from instanceof U))this._hand(e.move.from.color).reduce(e.move.from.type,1),e.move.to instanceof U?this._board.set(e.move.to,e.move.from):this._hand(e.move.to).add(e.move.from.type,1);else if(e.move.to instanceof U)this._board.swap(e.move.from,e.move.to);else{const x=this._board.remove(e.move.from);this._hand(e.move.to).add(x.unpromoted().type,1)}}if(e.rotate){const x=this._board.at(e.rotate);x&&this._board.set(e.rotate,x.rotate())}return!0}get sfen(){return this.getSFEN(1)}getSFEN(e){let x=`${this._board.sfen} ${T5(this.color)} `;return x+=o0.formatSFEN(this._blackHand,this._whiteHand),x+=" "+e,x}resetBySFEN(e){if(!kt.isValidSFEN(e))return!1;const x=e.split(" ");x[0]==="sfen"&&x.shift(),this._board.resetBySFEN(x[0]),this._color=P5(x[1]);const n=o0.parseSFEN(x[2]);return this._blackHand=n.black,this._whiteHand=n.white,!0}setColor(e){this._color=e}static isValidSFEN(e){const x=e.split(" ");return x.length===5&&x[0]==="sfen"&&x.shift(),!(x.length!==4||!vs.isValidSFEN(x[0])||!I5(x[1])||!o0.isValidSFEN(x[2])||!x[3].match(/[0-9]+/))}static newBySFEN(e){const x=new kt;return x.resetBySFEN(e)?x:null}isMovable(e,x){const n=x.x-e.x,i=x.y-e.y,{direction:s,distance:o,ok:r}=C8(n,i);if(!r)return!1;const a=this._board.at(e);if(!a)return!1;switch(m8(a,s)){default:return!1;case ti.SHORT:return o===1;case ti.LONG:{const E=W5[s];for(let l=e.neighbor(E.x,E.y);l.valid;l=l.neighbor(E.x,E.y)){if(l.equals(x))return!0;if(this._board.at(l))return!1}return!1}}}copyFrom(e){this._board.copyFrom(e._board),this._color=e.color,this._blackHand.copyFrom(e._blackHand),this._whiteHand.copyFrom(e._whiteHand)}clone(){const e=new kt;return e.copyFrom(this),e}}function J5(t){const e={pawn:0,lance:0,knight:0,silver:0,gold:0,bishop:0,rook:0,king:0,promPawn:0,promLance:0,promKnight:0,promSilver:0,horse:0,dragon:0};return U.all.forEach(x=>{const n=t.board.at(x);n&&(e[n.type]+=1)}),t.blackHand.forEach((x,n)=>{e[x]+=n}),t.whiteHand.forEach((x,n)=>{e[x]+=n}),e}function X5(t){const e=J5(t);return{pawn:18-e.pawn-e.promPawn,lance:4-e.lance-e.promLance,knight:4-e.knight-e.promKnight,silver:4-e.silver-e.promSilver,gold:4-e.gold,bishop:2-e.bishop-e.horse,rook:2-e.rook-e.dragon,king:2-e.king,promPawn:0,promLance:0,promKnight:0,promSilver:0,horse:0,dragon:0}}const Z5={"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9},Q5={一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9,十:10,十一:11,十二:12,十三:13,十四:14,十五:15,十六:16,十七:17,十八:18},eh={1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9},th={王:H.KING,玉:H.KING,飛:H.ROOK,龍:H.DRAGON,竜:H.DRAGON,角:H.BISHOP,馬:H.HORSE,金:H.GOLD,銀:H.SILVER,成銀:H.PROM_SILVER,全:H.PROM_SILVER,桂:H.KNIGHT,成桂:H.PROM_KNIGHT,圭:H.PROM_KNIGHT,香:H.LANCE,成香:H.PROM_LANCE,杏:H.PROM_LANCE,歩:H.PAWN,と:H.PROM_PAWN};function _8(t){return Z5[t]}function so(t){return Q5[t]}function ys(t){return eh[t]}function oo(t){return th[t]}const v8=["一","二","三","四","五","六","七","八","九","十","十一","十二","十三","十四","十五","十六","十七","十八"],xh=["1","2","3","4","5","6","7","8","9"];function nh(t){return v8[t-1]}function b8(t){return xh[t-1]}function sa(t){return v8[t-1]}const ih={king:"玉",rook:"飛",dragon:"龍",bishop:"角",horse:"馬",gold:"金",silver:"銀",promSilver:"成銀",knight:"桂",promKnight:"成桂",lance:"香",promLance:"成香",pawn:"歩",promPawn:"と"};function y8(t){return ih[t]}const sh={king:"玉",rook:"飛",dragon:"龍",bishop:"角",horse:"馬",gold:"金",silver:"銀",promSilver:"全",knight:"桂",promKnight:"圭",lance:"香",promLance:"杏",pawn:"歩",promPawn:"と"};function ur(t){return sh[t]}const fE={[Y.START]:"開始局面",[Y.RESIGN]:"投了",[Y.INTERRUPT]:"中断",[Y.IMPASS]:"持将棋",[Y.DRAW]:"引き分け",[Y.REPETITION_DRAW]:"千日手",[Y.MATE]:"詰み",[Y.NO_MATE]:"不詰",[Y.TIMEOUT]:"切れ負け",[Y.FOUL_WIN]:"反則勝ち",[Y.FOUL_LOSE]:"反則負け",[Y.ENTERING_OF_KING]:"入玉",[Y.WIN_BY_DEFAULT]:"不戦勝",[Y.LOSE_BY_DEFAULT]:"不戦敗"};function S8(t){return typeof t=="string"?fE[t]:D8(t)?fE[t.type]:t.name}function Nx(t,e,x){let n="";switch(e.color){case L.BLACK:n+=x!=null&&x.compatible?"▲":"☗";break;case L.WHITE:n+=x!=null&&x.compatible?"△":"☖";break}x!=null&&x.prev&&x.prev.to.equals(e.to)?n+="同 ":(n+=b8(e.to.file),n+=sa(e.to.rank)),n+=y8(e.pieceType);const i=new le(e.color,e.pieceType),s=t.listAttackersByPiece(e.to,i).filter(o=>!(e.from instanceof U)||!o.equals(e.from));if(e.from instanceof U){let o=e.from.directionTo(e.to);o=e.color===L.BLACK?o:_s(o);const r=ts(o),a=xs(o),E=s.map(B=>{const p=B.directionTo(e.to);return e.color===L.BLACK?p:_s(p)}),l=E.filter(B=>xs(B)==a).map(B=>ts(B)),u=E.filter(B=>ts(B)==r).map(B=>xs(B));let h=!1;if(u.length)if(e.pieceType===H.HORSE||e.pieceType===H.DRAGON)a===Zt.LEFT||a===Zt.NONE&&u[0]===Zt.RIGHT?n+="右":(a===Zt.RIGHT||a===Zt.NONE&&u[0]===Zt.LEFT)&&(n+="左");else switch(a){case Zt.LEFT:n+="右";break;case Zt.NONE:n+="直",h=!0;break;case Zt.RIGHT:n+="左";break}if(!h&&(l.length||!u.length&&s.length))switch(r){case Px.DOWN:n+="引";break;case Px.NONE:n+="寄";break;case Px.UP:n+="上";break}e.promote?n+="成":e.from instanceof U&&i.isPromotable()&&(bs(e.color,e.from.rank)||bs(e.color,e.to.rank))&&(n+="不成")}else s.length&&(n+="打");return n}function oh(t,e){let x="",n;const i=t.clone();for(const s of e)x+=`${Nx(i,s,{prev:n,compatible:!0})}`,i.doMove(s,{ignoreValidation:!0}),n=s;return x}const rh=/^[▲△☗☖]?([123456789][一二三四五六七八九]|同)(王|玉|飛|龍|竜|角|馬|金|銀|成銀|全|桂|成桂|圭|香|成香|杏|歩|と)(左|直|右|)(引|寄|上|)(成|不成|打|)(\([1-9][1-9]\)|)/;function ah(t,e){const x=e.replaceAll(/[\s\u3000]/g,""),n=[];let i=0;for(let r=1;r<=x.length;r++){const a=x[r];(!a||a==="▲"||a==="△"||a==="☗"||a==="☖")&&(n.push(x.substring(i,r)),i=r)}const s=t.clone(),o=[];for(const r of n){const a=rh.exec(r);if(!a)break;const E=a[1],l=oo(a[2]),u=a[3],h=a[4],B=a[5],p=a[6];let f;if(E.startsWith("同"))f=o[o.length-1].to;else{const w=_8(E[0]),M=so(E[1]);f=new U(w,M)}let g;if(B==="打")g=l;else if(p){const w=ys(p[1]),M=ys(p[2]);g=new U(w,M)}else{const w=s.listAttackersByPiece(f,new le(s.color,l)).filter(M=>{let _=M.directionTo(f);_=s.color===L.BLACK?_:_s(_);const I=ts(_),D=xs(_);return!(h.indexOf("引")>=0&&I!==Px.DOWN||h.indexOf("寄")>=0&&I!==Px.NONE||h.indexOf("上")>=0&&I!==Px.UP||u.indexOf("左")>=0&&D!==Zt.RIGHT||u.indexOf("直")>=0&&D!==Zt.NONE||u.indexOf("右")>=0&&D!==Zt.LEFT)});if(w.length===1)g=w[0];else if(w.length===0&&s.hand(s.color).count(l)!==0)g=l;else break}let C=s.createMove(g,f);if(!C||(B==="成"&&(C=C.withPromote()),!s.doMove(C,{ignoreValidation:!0})))break;o.push(C)}return o}function w8(t){return I8(Math.floor(t/1e3))}function T8(t){return P8(Math.floor(t/1e3))}function I8(t){const e=Math.floor(t/3600),x=Math.floor((t-e*3600)/60),n=t%60;return e+":"+String(x).padStart(2,"0")+":"+String(n).padStart(2,"0")}function P8(t){const e=Math.floor(t/60),x=t%60;return String(e).padStart(2," ")+":"+String(x).padStart(2,"0")}var V=(t=>(t.TITLE="title",t.BLACK_NAME="blackName",t.WHITE_NAME="whiteName",t.SHITATE_NAME="shitateName",t.UWATE_NAME="uwateName",t.START_DATETIME="startDatetime",t.END_DATETIME="endDatetime",t.DATE="date",t.TOURNAMENT="tournament",t.STRATEGY="strategy",t.TIME_LIMIT="timeLimit",t.BYOYOMI="byoyomi",t.TIME_SPENT="timeSpent",t.PLACE="place",t.POSTED_ON="postedOn",t.NOTE="note",t.BLACK_SHORT_NAME="blackShortName",t.WHITE_SHORT_NAME="whiteShortName",t.OPUS_NO="opusNo",t.OPUS_NAME="opusName",t.AUTHOR="author",t.PUBLISHED_BY="publishedBy",t.PUBLISHED_AT="publishedAt",t.SOURCE="source",t.LENGTH="length",t.INTEGRITY="integrity",t.CATEGORY="category",t.AWARD="award",t))(V||{});class Ss{constructor(){b(this,"standard",new Map);b(this,"custom",new Map)}get standardMetadataKeys(){return this.standard.keys()}getStandardMetadata(e){return this.standard.get(e)}setStandardMetadata(e,x){x?this.standard.set(e,x):this.standard.delete(e)}get customMetadataKeys(){return this.custom.keys()}getCustomMetadata(e){return this.custom.get(e)}setCustomMetadata(e,x){x?this.custom.set(e,x):this.custom.delete(e)}}class Yx{constructor(e,x,n,i,s,o,r,a){b(this,"next",null);b(this,"branch",null);b(this,"comment","");b(this,"customData");b(this,"elapsedMs",0);b(this,"totalElapsedMs",0);b(this,"bookmark","");this.ply=e,this.prev=x,this.branchIndex=n,this.activeBranch=i,this.nextColor=s,this.move=o,this.isCheck=r,this.displayText=a}get timeText(){const e=T8(this.elapsedMs),x=w8(this.totalElapsedMs);return`${e} / ${x}`}get hasBranch(){return!!this.prev&&!!this.prev.next&&!!this.prev.next.branch}get isFirstBranch(){return!this.prev||this.prev.next===this}get isLastMove(){if(!this.next)return!0;for(let e=this.next;e;e=e.branch)if(e.move instanceof Ze)return!1;return!0}updateTotalElapsedMs(){this.totalElapsedMs=this.elapsedMs,this.prev&&this.prev.prev&&(this.totalElapsedMs+=this.prev.prev.totalElapsedMs)}setElapsedMs(e){this.elapsedMs=e,this.updateTotalElapsedMs();let x=this.next;const n=[];for(;x;)x.updateTotalElapsedMs(),x.branch&&n.push(x.branch),x.next?x=x.next:x=n.pop()||null}static newRootEntry(e){return new Yx(0,null,0,!0,e,ia(Y.START),!1,"開始局面")}}class bt{constructor(e){b(this,"metadata");b(this,"_initialPosition");b(this,"_position");b(this,"_first");b(this,"_current");b(this,"repetitionCounts",{});b(this,"repetitionStart",{});b(this,"onChangePosition",()=>{});this.metadata=new Ss,this._initialPosition=e?e.clone():new kt,this._position=this.initialPosition.clone(),this._first=Yx.newRootEntry(this._initialPosition.color),this._current=this._first,this.incrementRepetition()}get initialPosition(){return this._initialPosition}get position(){return this._position}get first(){return this._first}get current(){return this._current}get moves(){const e=this.movesBefore;for(let x=this._current.next;x;x=x.next){for(;!x.activeBranch;)x=x.branch;e.push(x)}return e}get movesBefore(){return this._movesBefore}get _movesBefore(){const e=new Array;e.unshift(this._current);for(let x=this._current.prev;x;x=x.prev)e.unshift(x);return e}get length(){let e=this._current.ply;for(let x=this._current.next;x;x=x.next){for(;!x.activeBranch;)x=x.branch;e=x.ply}return e}get branchBegin(){return this._current.prev?this._current.prev.next:this._current}clear(e){this.metadata=new Ss,e&&(this._initialPosition=e.clone()),this._position=this.initialPosition.clone(),this._first=Yx.newRootEntry(this._initialPosition.color),this._current=this._first,this.repetitionCounts={},this.repetitionStart={},this.incrementRepetition(),this.onChangePosition()}goBack(){return this._goBack()?(this.onChangePosition(),!0):!1}_goBack(){return this._current.prev?(this._current.move instanceof Ze&&(this.decrementRepetition(),this._position.undoMove(this._current.move)),this._current=this._current.prev,!0):!1}goForward(){return this._goForward()?(this.onChangePosition(),!0):!1}_goForward(){if(this._current.next){for(this._current=this._current.next;!this._current.activeBranch;)this._current=this._current.branch;return this._current.move instanceof Ze&&(this._position.doMove(this._current.move,{ignoreValidation:!0}),this.incrementRepetition()),!0}return!1}goto(e){for(;ethis._current.ply&&this._goForward(););this.onChangePosition()}resetAllBranchSelection(){this._forEach(e=>{e.activeBranch=e.isFirstBranch})}switchBranchByIndex(e){if(this.current.branchIndex===e)return!0;if(!this._current.prev)return!1;let x=!1;for(let n=this._current.prev.next;n;n=n.branch)n.branchIndex===e?(n.activeBranch=!0,this._current.move instanceof Ze&&(this.decrementRepetition(),this._position.undoMove(this._current.move)),this._current=n,this._current.move instanceof Ze&&(this._position.doMove(this._current.move,{ignoreValidation:!0}),this.incrementRepetition()),x=!0):n.activeBranch=!1;return x&&this.onChangePosition(),x}append(e,x){typeof e=="string"&&(e=ia(e));const n=this.current.move instanceof Ze?this.current.move:void 0,i=e instanceof Ze?Nx(this.position,e,{prev:n}):S8(e);let s=!1;if(e instanceof Ze){if(!this._position.doMove(e,x))return!1;this.incrementRepetition(),s=this.position.checked}if(this._current!==this.first&&!(this._current.move instanceof Ze)&&this.goBack(),!this._current.next)return this._current.next=new Yx(this._current.ply+1,this._current,0,!0,this.position.color,e,s,i),this._current=this._current.next,this._current.setElapsedMs(0),this.onChangePosition(),!0;let o;for(o=this._current.next;o;o=o.branch)o.activeBranch=!1;let r=this._current.next;for(o=this._current.next;o;o=o.branch){if(o.move instanceof Ze&&e instanceof Ze&&e.equals(o.move)||e===o.move)return this._current=o,this._current.activeBranch=!0,this.onChangePosition(),!0;r=o}return this._current=new Yx(this._current.ply+1,this._current,r.branchIndex+1,!0,this.position.color,e,s,i),this._current.setElapsedMs(0),r.branch=this._current,this.onChangePosition(),!0}swapWithNextBranch(){return this._current.branch?bt.swapWithPreviousBranch(this._current.branch):!1}swapWithPreviousBranch(){return bt.swapWithPreviousBranch(this._current)}static swapWithPreviousBranch(e){const x=e.prev;if(!x||!x.next||x.next==e)return!1;if(x.next.branch===e){const n=x.next;return n.branch=e.branch,e.branch=n,x.next=e,[e.branchIndex,n.branchIndex]=[n.branchIndex,e.branchIndex],!0}for(let n=x.next;n.branch;n=n.branch)if(n.branch.branch===e){const i=n.branch;return i.branch=e.branch,e.branch=i,n.branch=e,[e.branchIndex,i.branchIndex]=[i.branchIndex,e.branchIndex],!0}return!1}removeCurrentMove(){const e=this._current;if(!this.goBack()){this._current.next=null;return}if(this._current.next===e)this._current.next=e.branch;else for(let n=this._current.next;n;n=n.branch)if(n.branch===e){n.branch=e.branch;break}let x=0;for(let n=this._current.next;n;n=n.branch)n.branchIndex=x,x+=1;this._current.next&&(this._current.next.activeBranch=!0),this.onChangePosition()}removeNextMove(){this._current.next=null}jumpToBookmark(e){const x=this.find(i=>i.bookmark===e);if(!x)return!1;const n=[];for(let i=x;i;i=i.prev)n[i.ply]=i;for(;this._current!==n[this._current.ply];)this.goBack();for(;n.length>this._current.ply+1;)this.append(n[this._current.ply+1].move);return this.onChangePosition(),!0}incrementRepetition(){const e=this.position.sfen;this.repetitionCounts[e]?this.repetitionCounts[e]+=1:(this.repetitionCounts[e]=1,this.repetitionStart[e]=this.current.ply)}decrementRepetition(){const e=this.position.sfen;this.repetitionCounts[e]-=1,this.repetitionCounts[e]===0&&(delete this.repetitionCounts[e],delete this.repetitionStart[e])}get repetition(){return this.repetitionCounts[this.position.sfen]>=4}get perpetualCheck(){if(!this.repetition)return null;const e=this.position.sfen,x=this.repetitionStart[e];let n=!0,i=!0,s=this.position.color;for(let o=this.current;o.ply>=x;o=o.prev)s=Tt(s),!o.isCheck&&(s===L.BLACK?n=!1:i=!1);return n?L.BLACK:i?L.WHITE:null}get usi(){let e="position sfen "+this.initialPosition.sfen+" moves";return this.movesBefore.forEach(x=>{x.move instanceof Ze&&(e+=" "+x.move.usi)}),e}get usiAll(){let e=this.usi;for(let x=this._current.next;x;x=x.next){for(;!x.activeBranch;)x=x.branch;x.move instanceof Ze&&(e+=" "+x.move.usi)}return e}get sfen(){return this.position.getSFEN(this._current.ply+1)}get bookmarks(){const e=[],x={};return this.forEach(n=>{n.bookmark&&!x[n.bookmark]&&(e.push(n.bookmark),x[n.bookmark]=!0)}),e}forEach(e){this._forEach(e)}_forEach(e){this.find(x=>(e(x),!1))}find(e){let x=this._first;const n=[];for(;x;){if(e(x))return x;x.branch&&n.push(x.branch),x.next?x=x.next:x=n.pop()||null}return null}on(e,x){switch(e){case"changePosition":this.onChangePosition=x;break}}static newByUSI(e){const x="position startpos ",n="position sfen ",i="startpos ",s="sfen ",o="moves ";return e.startsWith(x)?bt.newByUSIFromMoves(new kt,e.slice(x.length)):e.startsWith(n)?bt.newByUSIFromSFEN(e.slice(n.length)):e.startsWith(i)?bt.newByUSIFromMoves(new kt,e.slice(i.length)):e.startsWith(s)?bt.newByUSIFromSFEN(e.slice(s.length)):e.startsWith(o)?bt.newByUSIFromMoves(new kt,e):new bn(e)}static newByUSIFromSFEN(e){const x=e.split(" ");if(x.length<4)return new bn(e);const n=kt.newBySFEN(x.slice(0,4).join(" "));return n?bt.newByUSIFromMoves(n,x.slice(4).join(" ")):new bn(e)}static newByUSIFromMoves(e,x){const n=new bt(e);if(x.length===0)return n;const i=x.split(" ");if(i[0]!=="moves")return new bn(x);for(let s=1;s{n>=1&&(e+=ur(x),n>=2&&(e+=nh(n)),e+=" ")}),e}function M8(t,e){let x="";const n=e.returnCode?e.returnCode:` +`;return x+="# KIF形式棋譜ファイル Generated by Electron Shogi"+n,x+=Fh(t.metadata,e),x+=Dh(t.initialPosition,e),x+="手数----指手---------消費時間--"+n,t.forEach(i=>{if(i.ply!==0){i.isFirstBranch||(x+=n,x+="変化:"+i.ply+"手"+n),x+=i.ply+" ",i.move instanceof Ze?x+=_h(i.move):D8(i.move)?x+=Ch[i.move.type]:x+=i.move.name;const s=T8(i.elapsedMs),o=w8(i.totalElapsedMs);x+=` (${s}/${o})`,i.isFirstBranch&&i.hasBranch&&(x+="+"),x+=n}if(i.comment.length!==0){const s=i.comment.endsWith(` +`)?i.comment.slice(0,-1):i.comment;x+="*"+s.replaceAll(` +`,n+"*")+n}i.bookmark.length!==0&&(x+="&"+i.bookmark+n)}),x}function ro(t){return t.getStandardMetadata(V.BLACK_NAME)||t.getStandardMetadata(V.BLACK_SHORT_NAME)||t.getStandardMetadata(V.SHITATE_NAME)}function ao(t){return t.getStandardMetadata(V.WHITE_NAME)||t.getStandardMetadata(V.WHITE_SHORT_NAME)||t.getStandardMetadata(V.UWATE_NAME)}const ki=[{pattern:/^V/,type:0,sectionType:0},{pattern:/^'\*(.+)$/,type:1,sectionType:2},{pattern:/^'(.+)$/,type:2,sectionType:2},{pattern:/^N\+(.+)$/,type:3,sectionType:0},{pattern:/^N-(.+)$/,type:4,sectionType:0},{pattern:/^\$([^:]+):(.+)$/,type:5,sectionType:0},{pattern:/^PI([1-9]{2}[A-Z]{2})*$/,type:6,sectionType:0},{pattern:/^P[1-9]( \* |[-+][A-Z][A-Z]){9}$/,type:7,sectionType:0},{pattern:/^P[-+]([0-9]{2}[A-Z]{2})*/,type:8,sectionType:0},{pattern:/^[-+]$/,type:9,sectionType:0},{pattern:/^[-+][0-9]{4}[A-Z]{2}/,type:10,sectionType:1},{pattern:/^%[-+A-Z_]+/,type:11,sectionType:1},{pattern:/^T([0-9]+)/,type:12,sectionType:1}];function vh(t){const e=[],x=t.match(/^['N$]/)?[t]:t.split(",");for(const n of x)for(let i=0;i{e.blackHand.add(E,a[E])}):e.whiteHand.forEach(E=>{e.whiteHand.add(E,a[E])});return}const s=Number(i[0]),o=Number(i[1]),r=oa[i.slice(2)];if(!r)return new io(i);s!==0&&o!==0?e.board.set(new U(s,o),new le(x,r)):x===L.BLACK?e.blackHand.add(r,1):e.whiteHand.add(r,1)}}function N8(t,e){if((t[0]==="+"?L.BLACK:L.WHITE)!=e.color)return new u8(t);const n=Number(t[1]),i=Number(t[2]),s=Number(t[3]),o=Number(t[4]),r=oa[t.slice(5,7)];if(!r)return new io(t);const a=n===0&&i===0?r:new U(n,i),E=new U(s,o);let l=e.createMove(a,E);if(!l)return new Bi(t);if(a instanceof U){const u=e.board.at(a);if(!u)return new lr(t);if(u.type!==r)if(u.promoted().type===r)l=l.withPromote();else return new lr(t)}return l}function Th(t){switch(t){case"%CHUDAN":return Y.INTERRUPT;case"%TORYO":return Y.RESIGN;case"%JISHOGI":return Y.IMPASS;case"%HIKIWAKE":return Y.DRAW;case"%SENNICHITE":return Y.REPETITION_DRAW;case"%TSUMI":return Y.MATE;case"%TIME_UP":return Y.TIMEOUT;case"%ILLEGAL_MOVE":return Y.FOUL_LOSE;case"%KACHI":return Y.ENTERING_OF_KING}}function Ih(t,e){return N8(e,t)}function FE(t){const e=new Ss,x=new bt,n=new kt;n.reset(he.EMPTY);let i="",s=!1;const o=t.replace(/\r?\n\/(\r?\n[\s\S]*)?$/,"").split(/\r?\n/);for(const r of o)for(const a of vh(r)){if(a.sectionType===0&&s||a.sectionType===1&&!s)return new na(a.line);switch(a.type){case 0:break;case 1:s?x.current.comment=Fs(x.current.comment,a.args[0]):i=Fs(i,a.args[0]);break;case 2:break;case 3:e.setStandardMetadata(V.BLACK_NAME,a.args[0]);break;case 4:e.setStandardMetadata(V.WHITE_NAME,a.args[0]);break;case 5:{const E=bh[a.args[0]];E?e.setStandardMetadata(E,a.args[1]):e.setCustomMetadata(a.args[0],a.args[1]);break}case 6:yh(a.line,n);break;case 7:{const E=Sh(a.line,n);if(E)return E;break}case 8:{const E=wh(a.line,n);if(E)return E;break}case 9:a.line[0]==="+"?n.setColor(L.BLACK):n.setColor(L.WHITE),x.clear(n),x.first.comment=i,s=!0;break;case 10:{const E=N8(a.line,x.position);if(E instanceof Error)return E;x.append(E,{ignoreValidation:!0});break}case 11:{const E=Th(a.line);E&&x.append(E,{ignoreValidation:!0});break}case 12:x.current.setElapsedMs(Number(a.args[0])*1e3);break}}return s||(x.clear(n),x.first.comment=i),x.goto(0),x.resetAllBranchSelection(),x.metadata=e,x}function Ph(t,e){let x="";const n=e.returnCode?e.returnCode:` +`,i=ro(t);i&&(x+="N+"+i+n);const s=ao(t);s&&(x+="N-"+s+n);const o=t.getStandardMetadata(V.TOURNAMENT)||t.getStandardMetadata(V.TITLE)||t.getStandardMetadata(V.OPUS_NAME)||t.getStandardMetadata(V.PUBLISHED_BY);o&&(x+="$EVENT:"+o+n);const r=t.getStandardMetadata(V.PLACE);r&&(x+="$SITE:"+r+n);const a=t.getStandardMetadata(V.START_DATETIME)||t.getStandardMetadata(V.DATE);a&&(x+="$START_TIME:"+a.slice(10)+n);const E=t.getStandardMetadata(V.DATE);E&&(x+="$END_TIME:"+E.slice(10)+n);const l=t.getStandardMetadata(V.STRATEGY);return l&&(x+="$OPENING:"+l+n),x}const ws={king:"OU",rook:"HI",dragon:"RY",bishop:"KA",horse:"UM",gold:"KI",silver:"GI",promSilver:"NG",knight:"KE",promKnight:"NK",lance:"KY",promLance:"NY",pawn:"FU",promPawn:"TO"};function DE(t){let e="";return t.forEach((x,n)=>{for(let i=0;i=1;s-=1){const o=t.board.at(new U(s,i));o?o.color===L.BLACK?x+="+"+ws[o.type]:x+="-"+ws[o.type]:x+=" * "}x+=n}return x+="P+"+DE(t.blackHand)+n,x+="P-"+DE(t.whiteHand)+n,x+=(t.color===L.BLACK?"+":"-")+n,x}function _E(t){return t instanceof U?`${t.file}${t.rank}`:"00"}function R8(t){return(t.color===L.BLACK?"+":"-")+_E(t.from)+_E(t.to)+ws[t.promote?N5(t.pieceType):t.pieceType]}function Mh(t){switch(t.type){case Y.INTERRUPT:return"%CHUDAN";case Y.RESIGN:return"%TORYO";case Y.IMPASS:return"%JISHOGI";case Y.DRAW:return"%HIKIWAKE";case Y.REPETITION_DRAW:return"%SENNICHITE";case Y.MATE:return"%TSUMI";case Y.TIMEOUT:return"%TIME_UP";case Y.FOUL_LOSE:return"%ILLEGAL_MOVE";case Y.ENTERING_OF_KING:return"%KACHI"}}function vE(t){return R8(t)}function O8(t,e){let x="";const n=e.returnCode?e.returnCode:` +`;return x+="' CSA形式棋譜ファイル Generated by Electron Shogi"+n,x+="V2.2"+n,x+=Ph(t.metadata,e),x+=kh(t.initialPosition,e),t.moves.forEach(i=>{if(i.ply===0)return;let s;i.move instanceof Ze?s=R8(i.move):s=Mh(i.move),s&&(x+=s+n,x+="T"+Math.floor(i.elapsedMs/1e3)+n),i.comment&&(i.comment.endsWith(` +`)?i.comment.slice(0,-1):i.comment).split(` +`).forEach(r=>{x+="'*"+r+n})}),x}var Jx=(t=>(t[t.USI=0]="USI",t[t.SFEN=1]="SFEN",t[t.KIF=2]="KIF",t[t.CSA=3]="CSA",t))(Jx||{});function Nh(t){if(t.startsWith("position sfen ")||t.startsWith("position startpos ")||t.startsWith("sfen ")||t.startsWith("startpos ")||t.startsWith("moves "))return 0;if(kt.isValidSFEN(t))return 1;const e=/(^|\n)[#0-9開終棋手戦表持秒記消場掲備先後作発出完分受]/g,x=/(^|,|\n)[-+$%'VNPT]/g,n=t.match(e),i=t.match(x),s=n?n.length:0,o=i?i.length:0;return s>=o?2:3}function bE(t){return t instanceof io?new Error(`${d.invalidPieceName}: ${t.data}`):t instanceof u8?new Error(`${d.invalidTurn}: ${t.data}`):t instanceof Bi?new Error(`${d.invalidMove}: ${t.data}`):t instanceof A8?new Error(`${d.invalidMoveNumber}: ${t.data}`):t instanceof h8?new Error(`${d.invalidDestination}: ${t.data}`):t instanceof lr?new Error(`${d.pieceNotExists}: ${t.data}`):t instanceof na?new Error(`${d.invalidLine}: ${t.data}`):t instanceof B8?new Error(`${d.invalidHandicap}: ${t.data}`):t instanceof cr?new Error(`${d.invalidBoard}: ${t.data}`):t instanceof d8?new Error(`${d.invalidHandPiece}: ${t.data}`):t instanceof bn?new Error(`${d.invalidUSI}: ${t.data}`):t}function Rh(t){switch(t){case V.BLACK_NAME:return d.sente;case V.WHITE_NAME:return d.gote;case V.SHITATE_NAME:return d.shitate;case V.UWATE_NAME:return d.uwate;case V.START_DATETIME:return d.startDateTime;case V.END_DATETIME:return d.endDateTime;case V.DATE:return d.gameDate;case V.TOURNAMENT:return d.tournament;case V.STRATEGY:return d.strategy;case V.TITLE:return d.gameTitle;case V.TIME_LIMIT:return d.timeLimit;case V.BYOYOMI:return d.byoyomi;case V.TIME_SPENT:return d.elapsedTime;case V.PLACE:return d.place;case V.POSTED_ON:return d.postedOn;case V.NOTE:return d.note;case V.BLACK_SHORT_NAME:return d.senteShortName;case V.WHITE_SHORT_NAME:return d.goteShortName;case V.OPUS_NO:return d.opusNo;case V.OPUS_NAME:return d.opusName;case V.AUTHOR:return d.author;case V.PUBLISHED_BY:return d.publishedBy;case V.PUBLISHED_AT:return d.publishedOn;case V.SOURCE:return d.source;case V.LENGTH:return d.numberOfMoves;case V.INTEGRITY:return d.integrity;case V.CATEGORY:return d.recordCategory;case V.AWARD:return d.award}}function Oh(t){b5(t),w5(t)}class ft{constructor(e,x){this.width=e,this.height=x}add(e){return new ft(this.width+e.width,this.height+e.height)}reduce(e){return new ft(this.width-e.width,this.height-e.height)}}class Lh{constructor(e,x,n,i){b(this,"x");b(this,"y");b(this,"width");b(this,"height");if(x&&n&&i)this.x=e,this.y=x,this.width=n,this.height=i;else{const s=JSON.parse(e);this.x=s.x,this.y=s.y,this.width=s.width,this.height=s.height}}get json(){return JSON.stringify({x:this.x,y:this.y,width:this.width,height:this.height})}}var ct=(t=>(t.DEBUG="debug",t.INFO="info",t.WARN="warn",t.ERROR="error",t))(ct||{}),bx=(t=>(t.STANDARD="standard",t.CHERRY_BLOSSOM="cherry-blossom",t.AUTUMN="autumn",t.SNOW="snow",t.DARK="dark",t))(bx||{}),A0=(t=>(t.NONE="none",t.COVER="cover",t.CONTAIN="contain",t.TILE="tile",t))(A0||{}),Y0=(t=>(t.HITOMOJI="hitomoji",t.HITOMOJI_DARK="hitomojiDark",t.HITOMOJI_GOTHIC="hitomojiGothic",t.HITOMOJI_GOTHIC_DARK="hitomojiGothicDark",t.CUSTOM_IMAGE="custom-image",t))(Y0||{}),xt=(t=>(t.LIGHT="light",t.WARM="warm",t.RESIN="resin",t.RESIN2="resin2",t.RESIN3="resin3",t.DARK="dark",t.GREEN="green",t.CHERRY_BLOSSOM="cherry-blossom",t.CUSTOM_IMAGE="custom-image",t))(xt||{}),Kt=(t=>(t.STANDARD="standard",t.DARK="dark",t.GREEN="green",t.CHERRY_BLOSSOM="cherry-blossom",t.CUSTOM_IMAGE="custom-image",t))(Kt||{}),Hn=(t=>(t.NONE="none",t.STANDARD="standard",t))(Hn||{}),Un=(t=>(t.NONE="none",t.STANDARD="standard",t))(Un||{}),$n=(t=>(t.NONE="none",t.STANDARD="standard",t))($n||{}),xi=(t=>(t.SINGLE="single",t.DOUBLE="double",t))(xi||{}),Oe=(t=>(t.RECORD_INFO="recordInfo",t.COMMENT="comment",t.SEARCH="search",t.PV="pv",t.CHART="chart",t.PERCENTAGE_CHART="percentageChart",t.INVISIBLE="invisible",t))(Oe||{}),ns=(t=>(t.KIF=".kif",t.KIFU=".kifu",t.CSA=".csa",t))(ns||{}),Ts=(t=>(t.STRICT="strict",t.AUTO_DETECT="autoDetect",t))(Ts||{}),ni=(t=>(t.BLACK="black",t.EACH="each",t))(ni||{}),ii=(t=>(t.ALL="all",t.ONLY_USER="onlyUser",t))(ii||{}),yn=(t=>(t.BOOK="book",t.GAME="game",t))(yn||{});function Hh(t,e){const x={...t,...e};switch(x.tabPaneType){case"double":switch(x.tab){case"comment":x.tab="recordInfo";break;case"chart":case"percentageChart":x.tab="pv";break}break}return t.topPaneHeightPercentage!==0&&t.topPaneHeightPercentage!==100&&(x.topPanePreviousHeightPercentage=t.topPaneHeightPercentage),Uh(x)||x}function Ar(t){return{language:S0.JA,thema:"standard",backgroundImageType:"none",pieceImage:"hitomoji",boardImage:"resin2",pieceStandImage:"standard",boardLabelType:"standard",leftSideControlType:"standard",rightSideControlType:"standard",pieceVolume:30,clockVolume:30,clockPitch:500,clockSoundTarget:"onlyUser",boardFlipping:!1,tabPaneType:"double",tab:"recordInfo",tab2:"comment",topPaneHeightPercentage:60,topPanePreviousHeightPercentage:60,bottomLeftPaneWidthPercentage:60,defaultRecordFileFormat:".kif",textDecodingRule:"autoDetect",returnCode:(t==null?void 0:t.returnCode)||`\r +`,autoSaveDirectory:(t==null?void 0:t.autoSaveDirectory)||"",translateEngineOptionName:!0,engineTimeoutSeconds:10,evaluationViewFrom:"each",coefficientInSigmoid:600,badMoveLevelThreshold1:5,badMoveLevelThreshold2:10,badMoveLevelThreshold3:20,badMoveLevelThreshold4:50,showElapsedTimeInRecordView:!0,showCommentInRecordView:!0,enableAppLog:!1,enableUSILog:!1,enableCSALog:!1,logLevel:ct.INFO,positionImageStyle:"book",positionImageSize:500,useBookmarkAsPositionImageHeader:!1,positionImageHeader:"",lastRecordFilePath:"",lastUSIEngineFilePath:"",lastImageExportFilePath:"",lastOtherFilePath:"",emptyRecordInfoVisibility:!0}}function Uh(t){if(t.backgroundImageType!=="none"&&!t.backgroundImageFileURL)return new Error(d.backgroundImageFileNotSelected);if(t.pieceImage==="custom-image"&&(!t.pieceImageFileURL||!t.croppedPieceImageBaseURL))return new Error(d.pieceImageFileNotSelected);if(t.boardImage==="custom-image"&&!t.boardImageFileURL)return new Error(d.boardImageFileNotSelected);if(t.pieceStandImage==="custom-image"&&!t.pieceStandImageFileURL)return new Error(d.pieceStandImageFileNotSelected);if(t.pieceVolume<0||t.pieceVolume>100)return new Error(d.pieceVolumeMustBe0To100Percent);if(t.clockVolume<0||t.clockVolume>100)return new Error(d.clockVolumeMustBe0To100Percent);if(t.clockPitch<220||t.clockPitch>880)return new Error(d.clockPitchMustBe220To880Hz);if(t.engineTimeoutSeconds<1||t.engineTimeoutSeconds>300)return new Error(d.engineTimeoutMustBe1To300Seconds);if(t.coefficientInSigmoid<=0)return new Error(d.coefficientInSigmoidMustBeGreaterThan0);if(t.badMoveLevelThreshold1<1||t.badMoveLevelThreshold1>100)return new Error(d.inaccuracyThresholdMustBe1To100Percent);if(t.badMoveLevelThreshold2<1||t.badMoveLevelThreshold2>100)return new Error(d.dubiousThresholdMustBe1To100Percent);if(t.badMoveLevelThreshold3<1||t.badMoveLevelThreshold3>100)return new Error(d.mistakeThresholdMustBe1To100Percent);if(t.badMoveLevelThreshold4<1||t.badMoveLevelThreshold4>100)return new Error(d.blunderThresholdMustBe1To100Percent);if(t.badMoveLevelThreshold1>=t.badMoveLevelThreshold2)return new Error(d.inaccuracyThresholdMustBeLessThanDubiousThreshold);if(t.badMoveLevelThreshold2>=t.badMoveLevelThreshold3)return new Error(d.dubiousThresholdMustBeLessThanMistakeThreshold);if(t.badMoveLevelThreshold3>=t.badMoveLevelThreshold4)return new Error(d.mistakeThresholdMustBeLessThanBlunderThreshold)}function ra(t){switch(t.pieceImage){case"hitomojiDark":return"./piece/hitomoji_dark";case"hitomojiGothic":return"./piece/hitomoji_gothic";case"hitomojiGothicDark":return"./piece/hitomoji_gothic_dark";case"custom-image":if(t.croppedPieceImageBaseURL)return t.croppedPieceImageBaseURL}return"./piece/hitomoji"}const yE={};function jx(t){if(yE[t])return;const e=document.createElement("img");e.src=t,yE[t]=e}function L8(t){return(t||new Date).toLocaleDateString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit"})}function SE(t){return(t||new Date).toLocaleTimeString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function wE(t){return t.endsWith("/")||t.endsWith("\\")?t.substring(0,t.length-1):t}function $h(t){return t.indexOf("/")>=0?"/":"\\"}function Ge(t,...e){const x=$h(t);let n=wE(t);for(const i of e)n+=i.startsWith("/")||i.startsWith("\\")?i:x+i,n=wE(n);return n}function Gh(t){return t.replaceAll(/[<>:"/\\|?*]/g,"_")}function Wh(t){const e=t.getStandardMetadata(V.START_DATETIME)||t.getStandardMetadata(V.DATE);return e?e.trim().replaceAll(" ","_").replaceAll("/","").replaceAll(":",""):L8().replaceAll("/","")}function TE(t,e){let x=Wh(t);const n=t.getStandardMetadata(V.TITLE)||t.getStandardMetadata(V.TOURNAMENT)||t.getStandardMetadata(V.OPUS_NAME)||t.getStandardMetadata(V.OPUS_NO)||t.getStandardMetadata(V.PLACE)||t.getStandardMetadata(V.POSTED_ON)||t.getStandardMetadata(V.AUTHOR);n&&(x+="_"+n);const i=ro(t);i&&(x+="_"+i);const s=ao(t);return s&&(x+="_"+s),Gh(x.trim())+(e?e.startsWith(".")?e:"."+e:".kif")}const ae={frame:{width:1471,height:959},board:{x:296.5,y:0,width:878,height:960,squreWidth:94.85,squreHeight:104,leftSquarePadding:12.6,topSquarePadding:12.8,leftPiecePadding:16,topPiecePadding:18.5,highlight:{selected:{"background-color":"#0088ff",opacity:"0.8"},lastMoveTo:{"background-color":"#44cc44",opacity:"0.8"},lastMoveFrom:{"background-color":"#44cc44",opacity:"0.4"}}},label:{fontSize:24},piece:{width:88,height:93},hand:{black:{x:1184,y:600},white:{x:0,y:0},width:288,height:360,highlight:{selected:{"background-color":"#ff4800",opacity:"0.7"}}},turn:{black:{x:1184,y:425},white:{x:0,y:492},width:288,height:45,fontSize:32},playerName:{black:{x:1184,y:480},white:{x:0,y:370},width:288,height:45,fontSize:25},clock:{black:{x:1184,y:535},white:{x:0,y:425},width:288,height:55,fontSize:40},control:{left:{x:0,y:547,width:288,height:412,fontSize:26},right:{x:1184,y:0,width:288,height:412,fontSize:26}}};function zh(t){return{black:{pawn:Ge(t,"black_pawn.png"),lance:Ge(t,"black_lance.png"),knight:Ge(t,"black_knight.png"),silver:Ge(t,"black_silver.png"),gold:Ge(t,"black_gold.png"),bishop:Ge(t,"black_bishop.png"),rook:Ge(t,"black_rook.png"),king:Ge(t,"black_king.png"),king2:Ge(t,"black_king2.png"),promPawn:Ge(t,"black_prom_pawn.png"),promLance:Ge(t,"black_prom_lance.png"),promKnight:Ge(t,"black_prom_knight.png"),promSilver:Ge(t,"black_prom_silver.png"),horse:Ge(t,"black_horse.png"),dragon:Ge(t,"black_dragon.png")},white:{pawn:Ge(t,"white_pawn.png"),lance:Ge(t,"white_lance.png"),knight:Ge(t,"white_knight.png"),silver:Ge(t,"white_silver.png"),gold:Ge(t,"white_gold.png"),bishop:Ge(t,"white_bishop.png"),rook:Ge(t,"white_rook.png"),king:Ge(t,"white_king.png"),king2:Ge(t,"white_king2.png"),promPawn:Ge(t,"white_prom_pawn.png"),promLance:Ge(t,"white_prom_lance.png"),promKnight:Ge(t,"white_prom_knight.png"),promSilver:Ge(t,"white_prom_silver.png"),horse:Ge(t,"white_horse.png"),dragon:Ge(t,"white_dragon.png")}}}function Vh(t){switch(t){default:return"./board/grid.svg";case xt.DARK:return"./board/grid_white.svg"}}function Kh(t,e){switch(t){case xt.LIGHT:return"./board/wood_light.png";case xt.WARM:return"./board/wood_warm.png";case xt.CUSTOM_IMAGE:return e||null}return null}const jh={[xt.LIGHT]:"rgba(0, 0, 0, 0)",[xt.WARM]:"rgba(0, 0, 0, 0)",[xt.RESIN]:"#d69b00",[xt.RESIN2]:"#efbf63",[xt.RESIN3]:"#ad7624",[xt.DARK]:"#333333",[xt.GREEN]:"#598459",[xt.CHERRY_BLOSSOM]:"#ecb6b6",[xt.CUSTOM_IMAGE]:"rgba(0, 0, 0, 0)"};function qh(t,e){switch(t){case Kt.CUSTOM_IMAGE:return e||null}return null}const Yh={[Kt.STANDARD]:"#8b4513",[Kt.DARK]:"#333333",[Kt.GREEN]:"#527a52",[Kt.CHERRY_BLOSSOM]:"#e8a9a9",[Kt.CUSTOM_IMAGE]:"rgba(0, 0, 0, 0)"},Jh={black:{pawn:{row:3,column:0,width:2},lance:{row:2,column:0,width:1},knight:{row:2,column:1,width:1},silver:{row:1,column:0,width:1},gold:{row:1,column:1,width:1},bishop:{row:0,column:0,width:1},rook:{row:0,column:1,width:1},king:{row:0,column:0,width:0},promPawn:{row:0,column:0,width:0},promLance:{row:0,column:0,width:0},promKnight:{row:0,column:0,width:0},promSilver:{row:0,column:0,width:0},horse:{row:0,column:0,width:0},dragon:{row:0,column:0,width:0}},white:{pawn:{row:0,column:0,width:2},lance:{row:1,column:1,width:1},knight:{row:1,column:0,width:1},silver:{row:2,column:1,width:1},gold:{row:2,column:0,width:1},bishop:{row:3,column:1,width:1},rook:{row:3,column:0,width:1},king:{row:0,column:0,width:0},promPawn:{row:0,column:0,width:0},promLance:{row:0,column:0,width:0},promKnight:{row:0,column:0,width:0},promSilver:{row:0,column:0,width:0},horse:{row:0,column:0,width:0},dragon:{row:0,column:0,width:0}}},Xh={1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七",8:"八",9:"九"};class Zh{constructor(e,x,n,i,s,o){b(this,"pieceImages");b(this,"boardGridImage");b(this,"boardTextureImage");b(this,"pieceStandImage");this.boardImageType=e,this.pieceStandImageType=x,this.boardLabelType=n,this.pieceImages=zh(i),this.boardGridImage=Vh(e),this.boardTextureImage=Kh(e,s),this.pieceStandImage=qh(x,o)}preload(){jx(this.boardGridImage),this.boardTextureImage&&jx(this.boardTextureImage),this.pieceStandImage&&jx(this.pieceStandImage),Object.values(this.pieceImages.black).forEach(jx),Object.values(this.pieceImages.white).forEach(jx)}build(e,x,n,i,s,o){let r=e.width/ae.frame.width;ae.frame.height*r>e.height&&(r=e.height/ae.frame.height);const a=()=>{const Z=ae.frame.height*r,K=ae.frame.width*r;return{style:{height:Z+"px",width:K+"px"},size:new ft(K,Z)}},E=()=>{const Z=ae.board.x*r,K=ae.board.y*r,J=ae.board.width*r,ue=ae.board.height*r,Fe={"background-color":jh[this.boardImageType],left:Z+"px",top:K+"px",height:ue+"px",width:J+"px"};return{gridImagePath:this.boardGridImage,textureImagePath:this.boardTextureImage,x:Z,y:K,style:Fe}},l=Z=>{const K=[];if(this.boardLabelType==Hn.NONE)return K;const J=ae.label.fontSize*r,ue=J*.1,we={color:"black","font-size":J+"px","font-weight":"bold","text-shadow":`${ue}px ${ue}px ${ue}px white`};for(let Fe=1;Fe<=9;Fe++){const Je=Z.x-J*.5+(o?0:ae.board.width)*r+ae.board.leftPiecePadding*.5*r*(o?1:-1),ot=Z.y-J*.5+(ae.board.topSquarePadding+((o?10-Fe:Fe)-.5)*ae.board.squreHeight)*r;K.push({id:"rank"+Fe,character:Xh[Fe],style:{left:Je+"px",top:ot+"px",...we}})}for(let Fe=1;Fe<=9;Fe++){const Je=Z.x-J*.5+(ae.board.leftPiecePadding+(9.5-(o?10-Fe:Fe))*ae.board.squreWidth)*r,ot=Z.y-J*.6+(o?ae.board.height:0)*r+ae.board.topSquarePadding*.7*r*(o?-1:1);K.push({id:"file"+Fe,character:String(Fe),style:{left:Je+"px",top:ot+"px",...we}})}return K},u=Z=>{const K=[];return x.board.listNonEmptySquares().forEach(J=>{const ue=x.board.at(J),we=ue.id+J.index,Fe=o?Tt(ue.color):ue.color,Je=ue.type==H.KING&&ue.color==L.BLACK?"king2":ue.type,ot=this.pieceImages[Fe][Je],tt=Z.x+(ae.board.leftPiecePadding+ae.board.squreWidth*(o?J.opposite:J).x)*r,ze=Z.y+(ae.board.topPiecePadding+ae.board.squreHeight*(o?J.opposite:J).y)*r,Bt=ae.piece.width*r,rt=ae.piece.height*r;K.push({id:we,imagePath:ot,style:{left:tt+"px",top:ze+"px",width:Bt+"px",height:rt+"px"}})}),K},h=Z=>{const K=[];return U.all.forEach(J=>{const ue=J.index,{file:we}=J,{rank:Fe}=J,Je=Z.x+(ae.board.leftSquarePadding+ae.board.squreWidth*(o?J.opposite:J).x)*r,ot=Z.y+(ae.board.topSquarePadding+ae.board.squreHeight*(o?J.opposite:J).y)*r,tt=ae.board.squreWidth*r,ze=ae.board.squreHeight*r,Bt={left:Je+"px",top:ot+"px",width:tt+"px",height:ze+"px"};let rt=Bt;n&&J.equals(n.to)&&(rt={...rt,...ae.board.highlight.lastMoveTo}),n&&n.from instanceof U&&J.equals(n.from)&&(rt={...rt,...ae.board.highlight.lastMoveFrom}),i instanceof U&&i.equals(J)&&(rt={...rt,...ae.board.highlight.selected}),K.push({id:ue,file:we,rank:Fe,style:Bt,backgroundStyle:rt})}),K},B=(Z,K)=>{const J=o?Tt(Z):Z,ue=Yh[this.pieceStandImageType],we=ae.hand[J].x*r,Fe=ae.hand[J].y*r,Je=ae.hand.width*r,ot=ae.hand.height*r,tt={"background-color":ue,left:we+"px",top:Fe+"px",width:Je+"px",height:ot+"px"},ze=[],Bt=[];return k5.forEach(rt=>{const yt=K.count(rt),E0=Jh[J][rt],Ye=ae.hand.width/2*E0.width*r,F=ae.hand.height/4*r,v=Ye*E0.column,z=F*E0.row,j=ae.piece.width*r,q=ae.piece.height*r,ie=Math.max(Ye-j*yt,0)/(yt*2),Ee=(Ye-j-ie*2)/Math.max(yt-1,1);for(let fe=yt-1;fe>=0;fe-=1){const Be=rt+fe,Ce=this.pieceImages[J][rt],_e=v+ie+Ee*fe,Pe=z;ze.push({id:Be,imagePath:Ce,style:{left:_e+"px",top:Pe+"px",width:j+"px",height:q+"px"}})}const xe=rt,oe={left:v+"px",top:z+"px",width:Ye+"px",height:F+"px"};let X=oe;i&&i instanceof le&&i.color===Z&&i.type===rt&&(X={...X,...ae.hand.highlight.selected}),Bt.push({id:xe,type:rt,style:oe,backgroundStyle:X})}),{textureImagePath:this.pieceStandImage,style:tt,pieces:ze,pointers:Bt}},p=(Z,K)=>{if(!K)return null;const J=o?Tt(K.color):K.color,ue=o?K.to.opposite:K.to,we=new le(J,K.pieceType),Fe=we.promoted(),Je=we.unpromoted(),ot=this.pieceImages[J][Fe.type],tt=this.pieceImages[J][Je.type],ze=Z.x+(ae.board.leftSquarePadding+ae.board.squreWidth*(ue.x===0?0:ue.x===8?7:ue.x-.5))*r,Bt=Z.y+(ae.board.topSquarePadding+ae.board.squreHeight*ue.y)*r,rt=ae.board.squreWidth*2*r,yt=ae.board.squreHeight*r,E0={left:ze+"px",top:Bt+"px",width:rt+"px",height:yt+"px","font-size":yt/4+"px"};return{promoteImagePath:ot,notPromoteImagePath:tt,style:E0}},f=()=>{const Z=x.color,K=o?Tt(Z):Z,J=2;return{style:{left:ae.turn[K].x*r-J+"px",top:ae.turn[K].y*r-J+"px",width:ae.turn.width*r-J+"px",height:ae.turn.height*r-J+"px","font-size":ae.turn.fontSize*r+"px","border-radius":ae.turn.height*r*.4+"px","border-width":J+"px","border-style":"solid"}}},g=Z=>{const K=o?Tt(Z):Z;return{style:{left:ae.playerName[K].x*r+"px",top:ae.playerName[K].y*r+"px",width:ae.playerName.width*r+"px",height:ae.playerName.height*r+"px","font-size":ae.playerName.fontSize*r+"px"}}},C=Z=>{const K=o?Tt(Z):Z;return{style:{left:ae.clock[K].x*r+"px",top:ae.clock[K].y*r+"px",width:ae.clock.width*r+"px",height:ae.clock.height*r+"px","font-size":ae.clock.fontSize*r+"px"}}},w=()=>({left:{style:{left:ae.control.left.x*r+"px",top:ae.control.left.y*r+"px",width:ae.control.left.width*r+"px",height:ae.control.left.height*r+"px","font-size":ae.control.left.fontSize*r+"px"}},right:{style:{left:ae.control.right.x*r+"px",top:ae.control.right.y*r+"px",width:ae.control.right.width*r+"px",height:ae.control.right.height*r+"px","font-size":ae.control.right.fontSize*r+"px"}}}),M=a(),_=E(),I=l(_),D=u(_),P=h(_),y=B(L.BLACK,x.hand(L.BLACK)),T=B(L.WHITE,x.hand(L.WHITE)),N=p(_,s),G=f(),W=g(L.BLACK),Ae=g(L.WHITE),Q=C(L.BLACK),ne=C(L.WHITE),te=w();return{frame:M,board:_,labels:I,piece:D,square:P,blackHand:y,whiteHand:T,promotion:N,turn:G,blackPlayerName:W,whitePlayerName:Ae,blackClock:Q,whiteClock:ne,control:te}}}const Qh=["src"],e6=["src"],t6={class:"player-name-text"},x6={class:"clock-text"},n6={class:"player-name-text"},i6={class:"clock-text"},s6=["src"],o6=["onClick","onContextmenu"],r6=["src"],a6=["src"],E6=["onClick"],l6=["src"],c6=["src"],u6=["onClick"],A6=["src"],h6=["src"],B6=ke({__name:"BoardView",props:{boardImageType:{type:String,required:!0},pieceImageBaseUrl:{type:String,required:!0},customBoardImageUrl:{type:String,required:!1,default:void 0},pieceStandImageType:{type:String,required:!0},customPieceStandImageUrl:{type:String,required:!1,default:void 0},boardLabelType:{type:String,required:!0},maxSize:{type:ft,required:!0},position:{type:Object,required:!0},lastMove:{type:Object,required:!1,default:null},flip:{type:Boolean,required:!1},allowEdit:{type:Boolean,required:!1},allowMove:{type:Boolean,required:!1},blackPlayerName:{type:String,required:!1,default:"先手"},whitePlayerName:{type:String,required:!1,default:"後手"},blackPlayerTime:{type:Number,required:!1,default:void 0},blackPlayerByoyomi:{type:Number,required:!1,default:void 0},whitePlayerTime:{type:Number,required:!1,default:void 0},whitePlayerByoyomi:{type:Number,required:!1,default:void 0},nextMoveLabel:{type:String,required:!1,default:"手番"}},emits:["resize","move","edit"],setup(t,{emit:e}){const x=t,n=m0({pointer:null,reservedMove:null}),i=()=>{n.pointer=null,n.reservedMove=null};nx([()=>x.position,()=>x.allowEdit,()=>x.allowMove],()=>{i()});const s=()=>{i()},o=(_,I,D)=>{const P=n.pointer;if(i(),!(_ instanceof U&&P instanceof U&&_.equals(P))&&!(_ instanceof le&&P instanceof le&&_.equals(P))){if(P){const y=P,T=_ instanceof U?_:_.color;if(x.allowEdit&&x.position.isValidEditing(y,T)){e("edit",{move:{from:P,to:T}});return}if(x.allowMove&&_ instanceof U){const N=P instanceof U?P:P.type,G=_,W=x.position.createMove(N,G);if(!W)return;const Ae=x.position.isValidMove(W),Q=x.position.isValidMove(W.withPromote());if(Ae&&Q){n.reservedMove=W;return}if(Ae){e("move",W);return}if(Q){e("move",W.withPromote());return}}}!x.allowMove&&!x.allowEdit||I||!x.allowEdit&&D!==x.position.color||(n.pointer=_)}},r=(_,I,D)=>{_.stopPropagation(),_.preventDefault();const P=new U(I,D),y=x.position.board.at(P);o(P,!y,y==null?void 0:y.color)},a=(_,I,D)=>{_.stopPropagation(),_.preventDefault();const P=x.position.hand(I).count(D)===0;o(new le(I,D),P,I)},E=(_,I,D)=>{_.stopPropagation(),_.preventDefault(),i();const P=new U(I,D);x.allowEdit&&x.position.board.at(P)&&e("edit",{rotate:P})},l=_=>{_.stopPropagation(),_.preventDefault();const I=n.reservedMove;i(),I&&x.position.isValidMove(I.withPromote())&&e("move",I.withPromote())},u=_=>{_.stopPropagation(),_.preventDefault();const I=n.reservedMove;i(),I&&x.position.isValidMove(I)&&e("move",I)},h=me(()=>{const _=new Zh(x.boardImageType,x.pieceStandImageType,x.boardLabelType,x.pieceImageBaseUrl,x.customBoardImageUrl,x.customPieceStandImageUrl);return _.preload(),_}),B=me(()=>{const _=h.value.build(x.maxSize,x.position,x.lastMove,n.pointer,n.reservedMove,x.flip);return e("resize",_.frame.size),_}),p=(_,I)=>_?I8(_):I!==void 0?""+I:"0:00:00",f=(_,I)=>{if(!_&&!I)return"normal";const D=(_||0)+(I||0);return D<=5?"danger":D<=10?"warning":"normal"},g=me(()=>p(x.blackPlayerTime,x.blackPlayerByoyomi)),C=me(()=>f(x.blackPlayerTime,x.blackPlayerByoyomi)),w=me(()=>p(x.whitePlayerTime,x.whitePlayerByoyomi)),M=me(()=>f(x.whitePlayerTime,x.whitePlayerByoyomi));return(_,I)=>(S(),k("div",null,[c("div",{class:"frame",style:de(B.value.frame.style),onClick:I[2]||(I[2]=D=>s())},[B.value.board.textureImagePath?(S(),k("div",{key:0,style:de(B.value.board.style)},[c("img",{class:"full",src:B.value.board.textureImagePath},null,8,Qh)],4)):ee("",!0),c("div",{style:de(B.value.board.style)},[c("img",{class:"full",src:B.value.board.gridImagePath},null,8,e6)],4),c("div",{class:Ke(["player-name",{active:t.position.color=="black"}]),style:de(B.value.blackPlayerName.style)},[c("span",t6,"☗"+m(t.blackPlayerName),1)],6),c("div",{class:Ke(["clock",C.value]),style:de(B.value.blackClock.style)},[c("span",x6,m(g.value),1)],6),c("div",{class:Ke(["player-name",{active:t.position.color=="white"}]),style:de(B.value.whitePlayerName.style)},[c("span",n6,"☖"+m(t.whitePlayerName),1)],6),c("div",{class:Ke(["clock",M.value]),style:de(B.value.whiteClock.style)},[c("span",i6,m(w.value),1)],6),(S(!0),k(De,null,Ne(B.value.square,D=>(S(),k("div",{key:D.id,style:de(D.backgroundStyle)},null,4))),128)),(S(!0),k(De,null,Ne(B.value.piece,D=>(S(),k("div",{key:D.id,style:de(D.style)},[c("img",{class:"full",src:D.imagePath},null,8,s6)],4))),128)),(S(!0),k(De,null,Ne(B.value.labels,D=>(S(),k("div",{key:D.id,style:de(D.style)},m(D.character),5))),128)),(S(!0),k(De,null,Ne(B.value.square,D=>(S(),k("div",{key:D.id,style:de(D.style),onClick:P=>r(P,D.file,D.rank),onContextmenu:P=>E(P,D.file,D.rank)},null,44,o6))),128)),B.value.blackHand.textureImagePath?(S(),k("div",{key:1,style:de(B.value.blackHand.style)},[c("img",{class:"full",src:B.value.blackHand.textureImagePath},null,8,r6)],4)):ee("",!0),c("div",{class:"hand",style:de(B.value.blackHand.style)},[(S(!0),k(De,null,Ne(B.value.blackHand.pointers,D=>(S(),k("div",{key:D.id,style:de(D.backgroundStyle)},null,4))),128)),(S(!0),k(De,null,Ne(B.value.blackHand.pieces,D=>(S(),k("div",{key:D.id,style:de(D.style)},[c("img",{class:"full",src:D.imagePath},null,8,a6)],4))),128)),(S(!0),k(De,null,Ne(B.value.blackHand.pointers,D=>(S(),k("div",{key:D.id,style:de(D.style),onClick:P=>a(P,A(L).BLACK,D.type)},null,12,E6))),128))],4),B.value.whiteHand.textureImagePath?(S(),k("div",{key:2,style:de(B.value.whiteHand.style)},[c("img",{class:"full",src:B.value.whiteHand.textureImagePath},null,8,l6)],4)):ee("",!0),c("div",{class:"hand",style:de(B.value.whiteHand.style)},[(S(!0),k(De,null,Ne(B.value.whiteHand.pointers,D=>(S(),k("div",{key:D.id,style:de(D.backgroundStyle)},null,4))),128)),(S(!0),k(De,null,Ne(B.value.whiteHand.pieces,D=>(S(),k("div",{key:D.id,style:de(D.style)},[c("img",{class:"full",src:D.imagePath},null,8,c6)],4))),128)),(S(!0),k(De,null,Ne(B.value.whiteHand.pointers,D=>(S(),k("div",{key:D.id,style:de(D.style),onClick:P=>a(P,A(L).WHITE,D.type)},null,12,u6))),128))],4),B.value.promotion?(S(),k("div",{key:3,class:"promotion-selector",style:de(B.value.promotion.style)},[c("div",{class:"select-button promote",onClick:I[0]||(I[0]=D=>l(D))},[c("img",{class:"full",src:B.value.promotion.promoteImagePath},null,8,A6)]),c("div",{class:"select-button not-promote",onClick:I[1]||(I[1]=D=>u(D))},[c("img",{class:"full",src:B.value.promotion.notPromoteImagePath},null,8,h6)])],4)):ee("",!0),c("div",{class:"turn",style:de(B.value.turn.style)},m(t.nextMoveLabel),5),c("div",{style:de(B.value.control.left.style)},[xr(_.$slots,"left-control",{},void 0,!0)],4),c("div",{style:de(B.value.control.right.style)},[xr(_.$slots,"right-control",{},void 0,!0)],4)],4)]))}});const Ue=(t,e)=>{const x=t.__vccOpts||t;for(const[n,i]of e)x[n]=i;return x},aa=Ue(B6,[["__scopeId","data-v-e5bb7653"]]),V0="es://human",H8="es://usi-engine/";function U0(t){return t.startsWith(H8)}function d6(){const t=Date.now(),e=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16);return H8+`${t}/${e}`}const U8="USI_Ponder",f6="USI_MultiPV",p6="Threads",g6="NumberOfThreads",m6="MultiPV";function yx(t){if(t){if(t.value!==void 0)return t.value;if(t.default!==void 0)return(t.type==="string"||t.type==="filename")&&t.default===""?"":t.default}}function $8(){return{uri:"",name:"",defaultName:"",author:"",path:"",options:{}}}function C6(t){const e=JSON.parse(JSON.stringify(t));return e.uri=d6(),e.name=d.copyOf(e.name),e}function F6(t,e){t.uri=e.uri,t.name=e.name,Object.keys(e.options).forEach(x=>{t.options[x]&&(t.options[x].value=e.options[x].value)})}class I0{constructor(e){b(this,"engines",{});if(e){const x=JSON.parse(e);for(const n in x.engines)U0(n)&&(this.engines[n]={...$8(),...x.engines[n],uri:n})}}hasEngine(e){return!!this.engines[e]}addEngine(e){this.engines[e.uri]=e}updateEngine(e){return this.engines[e.uri]?(this.engines[e.uri]=e,!0):!1}removeEngine(e){return this.engines[e]?(delete this.engines[e],!0):!1}getEngine(e){return this.engines[e]}get engineList(){return Object.values(this.engines).sort((e,x)=>e.name!==x.name?e.name>x.name?1:-1:e.defaultName!==x.defaultName?e.defaultName>x.defaultName?1:-1:e.uri>x.uri?1:-1)}get json(){return JSON.stringify(this)}get jsonWithIndent(){return JSON.stringify(this,void 0,2)}getClone(){return new I0(this.json)}}function D6(){return{enableNumber:!1,number:20}}function _6(){return{enableNumber:!1,number:100}}function v6(){return{maxSeconds:5}}var t0=(t=>(t.NONE="none",t.INSERT="insert",t.APPEND="append",t.OVERWRITE="overwrite",t))(t0||{});function hr(){return{startCriteria:D6(),endCriteria:_6(),perMoveCriteria:v6(),commentBehavior:"insert"}}function IE(){return{name:"人",uri:V0}}function b6(){return{timeSeconds:0,byoyomi:30,increment:0}}function Is(){return{black:IE(),white:IE(),timeLimit:b6(),enableEngineTimeout:!1,humanIsFront:!0,enableComment:!0,enableAutoSave:!0,repeat:1,swapPlayers:!1,maxMoves:1e3}}function G8(t){if(t.timeLimit.timeSeconds===0&&t.timeLimit.byoyomi===0)return new Error(d.bothTimeLimitAndByoyomiAreNotSet);if(t.timeLimit.byoyomi!==0&&t.timeLimit.increment!==0)return new Error(d.canNotUseByoyomiWithFischer);if(t.whiteTimeLimit&&t.whiteTimeLimit.timeSeconds===0&&t.whiteTimeLimit.byoyomi===0)return new Error(d.bothTimeLimitAndByoyomiAreNotSet);if(t.whiteTimeLimit&&t.whiteTimeLimit.byoyomi!==0&&t.whiteTimeLimit.increment!==0)return new Error(d.canNotUseByoyomiWithFischer)}function y6(t){const e=G8(t);if(e)return e;if(t.enableAutoSave)return new Error("自動保存はWeb版で利用できません。")}function Ps(){return{enableMaxSeconds:!1,maxSeconds:10}}function S6(t){if(!t.usi)return new Error(d.engineNotSelected);for(const e of t.secondaries||[])if(!e.usi)return new Error(d.engineNotSelected)}var Sx=(t=>(t.V121="v121",t.V121_FLOODGATE="v121_floodgate",t))(Sx||{});function W8(){return{protocolVersion:"v121",host:"localhost",port:4081,id:"",password:""}}function w6(){return{player:{name:"人",uri:V0},server:W8(),autoFlip:!0,enableComment:!0,enableAutoSave:!0,repeat:1,autoRelogin:!0}}function T6(t){if(t.server.protocolVersion!=="v121"&&t.server.protocolVersion!=="v121_floodgate")return new Error(d.protocolVersionNotSelected);if(t.server.host==="")return new Error(d.hostNameIsEmpty);if(t.server.port<0||t.server.port>65535)return new Error(d.invalidPortNumber);if(t.server.id==="")return new Error(d.idIsEmpty)}function Br(){return{player:{name:"人",uri:V0},serverHistory:[],autoFlip:!0,enableComment:!0,enableAutoSave:!0,repeat:1,autoRelogin:!0}}function I6(t,e){var x;return{player:t.player,server:((x=t.serverHistory)==null?void 0:x.length)>e?t.serverHistory[e]:W8(),autoFlip:t.autoFlip,enableComment:t.enableComment,enableAutoSave:t.enableAutoSave,repeat:t.repeat,autoRelogin:t.autoRelogin}}const P6=10;function k6(t,e){const x=[e.server];for(const n of t.serverHistory)if((n.protocolVersion!==e.server.protocolVersion||n.host!==e.server.host||n.port!==e.server.port||n.id!==e.server.id||n.password!==e.server.password)&&x.push(n),x.length===P6)break;return{player:e.player,serverHistory:x,autoFlip:e.autoFlip,enableComment:e.enableComment,enableAutoSave:e.enableAutoSave,repeat:e.repeat,autoRelogin:e.autoRelogin}}function PE(){return{}}const M6={async getRecordPathFromProcArg(){return""},updateAppState(){},openExplorer(){},async showOpenRecordDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async openRecord(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async showSaveRecordDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async saveRecord(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async showSelectFileDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async showSelectDirectoryDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async showSelectImageDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async getPieceImageBaseURL(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async cropPieceImage(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async exportCaptureAsPNG(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async exportCaptureAsJPEG(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async loadAppSetting(){const t=localStorage.getItem("appSetting");return JSON.stringify(t?{...Ar(),...JSON.parse(t)}:Ar())},async saveAppSetting(t){localStorage.setItem("appSetting",t)},async loadResearchSetting(){const t=localStorage.getItem("researchSetting");return JSON.stringify(t?{...Ps(),...JSON.parse(t)}:Ps())},async saveResearchSetting(t){localStorage.setItem("researchSetting",t)},async loadAnalysisSetting(){const t=localStorage.getItem("analysisSetting");return JSON.stringify(t?{...hr(),...JSON.parse(t)}:hr())},async saveAnalysisSetting(t){localStorage.setItem("analysisSetting",t)},async loadGameSetting(){const t=localStorage.getItem("gameSetting");return JSON.stringify(t?{...Is(),...JSON.parse(t)}:Is())},async saveGameSetting(t){localStorage.setItem("gameSetting",t)},async loadCSAGameSettingHistory(){const t=localStorage.getItem("csaGameSettingHistory");return JSON.stringify(t?{...Br(),...JSON.parse(t)}:Br())},async saveCSAGameSettingHistory(t){localStorage.setItem("csaGameSettingHistory",t)},async loadMateSearchSetting(){const t=localStorage.getItem("mateSearchSetting");return JSON.stringify(t?{...PE(),...JSON.parse(t)}:PE())},async saveMateSearchSetting(t){localStorage.setItem("mateSearchSetting",t)},async loadUSIEngineSetting(){return new I0().json},async saveUSIEngineSetting(){},async showSelectUSIEngineDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async getUSIEngineInfo(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async sendUSISetOption(){},async usiLaunch(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async usiReady(){},async usiGo(){},async usiGoPonder(){},async usiPonderHit(){},async usiGoInfinite(){},async usiGoMate(){},async usiStop(){},async usiGameover(){},async usiQuit(){},async csaLogin(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async csaLogout(){},async csaAgree(){},async csaMove(){},async csaResign(){},async csaWin(){},async csaStop(){},async isEncryptionAvailable(){return!1},log(t,e){switch(t){case ct.DEBUG:console.debug(e);break;case ct.INFO:console.log(e);break;case ct.WARN:console.warn(e);break;case ct.ERROR:console.error(e);break}},onSendError(){},onMenuEvent(){},onUpdateAppSetting(){},onOpenRecord(){},onUSIBestMove(){},onUSICheckmate(){},onUSICheckmateNotImplemented(){},onUSICheckmateTimeout(){},onUSINoMate(){},onUSIInfo(){},onUSIPonderInfo(){},onCSAGameSummary(){},onCSAReject(){},onCSAStart(){},onCSAMove(){},onCSAGameResult(){},onCSAClose(){}};function Ea(){return window}const z8=Ea().electronShogi||{},ye=Ea().electronShogiAPI||M6,ce={...ye,getPieceImageBaseURL(t){return ye.getPieceImageBaseURL(t)},cropPieceImage(t){return ye.cropPieceImage(t)},exportCaptureAsPNG(t){return ye.exportCaptureAsPNG(t.json)},exportCaptureAsJPEG(t){return ye.exportCaptureAsJPEG(t.json)},async loadAppSetting(){return JSON.parse(await ye.loadAppSetting())},saveAppSetting(t){return ye.saveAppSetting(JSON.stringify(t))},async loadResearchSetting(){return JSON.parse(await ye.loadResearchSetting())},saveResearchSetting(t){return ye.saveResearchSetting(JSON.stringify(t))},async loadAnalysisSetting(){return JSON.parse(await ye.loadAnalysisSetting())},saveAnalysisSetting(t){return ye.saveAnalysisSetting(JSON.stringify(t))},async loadGameSetting(){return JSON.parse(await ye.loadGameSetting())},saveGameSetting(t){return ye.saveGameSetting(JSON.stringify(t))},async loadCSAGameSettingHistory(){return JSON.parse(await ye.loadCSAGameSettingHistory())},saveCSAGameSettingHistory(t){return ye.saveCSAGameSettingHistory(JSON.stringify(t))},async loadMateSearchSetting(){return JSON.parse(await ye.loadMateSearchSetting())},saveMateSearchSetting(t){return ye.saveMateSearchSetting(JSON.stringify(t))},async loadUSIEngineSetting(){return new I0(await ye.loadUSIEngineSetting())},saveUSIEngineSetting(t){return ye.saveUSIEngineSetting(t.json)},async getUSIEngineInfo(t,e){return JSON.parse(await ye.getUSIEngineInfo(t,e))},usiLaunch(t,e){return ye.usiLaunch(JSON.stringify(t),e)},usiReady(t){return ye.usiReady(t)},usiGo(t,e,x,n,i){return ye.usiGo(t,e,JSON.stringify(x),n,i)},usiGoPonder(t,e,x,n,i){return ye.usiGoPonder(t,e,JSON.stringify(x),n,i)},csaLogin(t){return ye.csaLogin(JSON.stringify(t))}};function b0(){return!!Ea().electronShogiAPI}let Gn;function V8(t){if(Gn)return;const e=(t==null?void 0:t.type)||"sine",x=(t==null?void 0:t.frequency)||440,n=(t==null?void 0:t.volume)||2,i=new AudioContext,s=i.createOscillator(),o=i.createGain();s.connect(o),o.connect(i.destination),s.type=e,s.frequency.value=x,o.gain.value=n*.005,s.onended=()=>{o.disconnect(i.destination),s.disconnect(o)},s.start(i.currentTime),t!=null&&t.time&&s.stop(i.currentTime+t.time),t!=null&&t.time||(Gn=s)}function N6(t){V8({type:"sine",frequency:t.frequency,time:.1,volume:t.volume})}function R6(t){V8({type:"sine",frequency:t.frequency,volume:t.volume})}function kE(){Gn&&(Gn.stop(),Gn=void 0)}let wo;function To(t){const e=Date.now();if(wo&&e=1500?"先手勝勢":t>=600?"先手優勢":t>=400?"先手有利":t>=200?"先手有望":t>=-200?"互角":t>=-400?"後手有望":t>=-600?"後手有利":t>=-1500?"後手優勢":"後手勝勢"}function dr(t,e){return 100/(1+Math.exp(-t/e))}var i0={},vt={},ME;function la(){if(ME)return vt;ME=1;var t=ca(),e=String.fromCharCode,x=Array.prototype.slice,n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,s=Array.isArray,o=Object.keys;function r(T){var N=typeof T;return N==="function"||N==="object"&&!!T}vt.isObject=r;function a(T){return s?s(T):n.call(T)==="[object Array]"}vt.isArray=a;function E(T){return typeof T=="string"||n.call(T)==="[object String]"}vt.isString=E;function l(T){if(o)return o(T);var N=[];for(var G in T)i.call(T,G)&&(N[N.length]=G);return N}vt.objectKeys=l;function u(T,N){if(t.HAS_TYPED)switch(T){case 8:return new Uint8Array(N);case 16:return new Uint16Array(N)}return new Array(N)}vt.createBuffer=u;function h(T){for(var N=T.length,G=u(16,N),W=0;Wt.APPLY_BUFFER_SIZE&&(t.APPLY_BUFFER_SIZE_OK=!0),G}catch{t.APPLY_BUFFER_SIZE_OK=!1}}return p(T)}vt.codeToString_fast=B;function p(T){for(var N="",G=T&&T.length,W=0,Ae;Wt.APPLY_BUFFER_SIZE&&(t.APPLY_BUFFER_SIZE_OK=!0);continue}catch{t.APPLY_BUFFER_SIZE_OK=!1}return f(T)}return N}vt.codeToString_chunked=p;function f(T){for(var N="",G=T&&T.length,W=0;W>2],N[N.length]=_[(Ae&3)<<4],N[N.length]=D,N[N.length]=D;break}if(Q=T[G++],G==W){N[N.length]=_[Ae>>2],N[N.length]=_[(Ae&3)<<4|(Q&240)>>4],N[N.length]=_[(Q&15)<<2],N[N.length]=D;break}ne=T[G++],N[N.length]=_[Ae>>2],N[N.length]=_[(Ae&3)<<4|(Q&240)>>4],N[N.length]=_[(Q&15)<<2|(ne&192)>>6],N[N.length]=_[ne&63]}return B(N)}vt.base64encode=P;function y(T){var N,G,W,Ae,Q,ne,te;for(ne=T&&T.length,Q=0,te=[];Q>4;do{if(W=T.charCodeAt(Q++)&255,W==61)return te;W=I[W]}while(Q>2;do{if(Ae=T.charCodeAt(Q++)&255,Ae==61)return te;Ae=I[Ae]}while(Q95&&(e.JIS_TO_UTF8_TABLE[h]=u|0);for(e.JISX0212_TO_UTF8_TABLE={},a=t.objectKeys(e.UTF8_TO_JISX0212_TABLE),l=a.length,E=0;E255)return!1;if(n>=0&&n<=7||n===255)return!0}return!1}n0.isBINARY=z6;function V6(t){for(var e=0,x=t&&t.length,n;e255||n>=128&&n<=255||n===27)return!1;return!0}n0.isASCII=V6;function K6(t){for(var e=0,x=t&&t.length,n,i,s;e255||n>=128&&n<=255)return!1;if(n===27){if(e+2>=x)return!1;if(i=t[e+1],s=t[e+2],i===36){if(s===40||s===64||s===66)return!0}else{if(i===38&&s===64)return!0;if(i===40&&(s===66||s===73||s===74))return!0}}}return!1}n0.isJIS=K6;function j6(t){for(var e=0,x=t&&t.length,n;e255||n<142)return!1;if(n===142){if(e+1>=x||(n=t[++e],n<161||223=x||(n=t[++e],n<162||237=x||(n=t[++e],n<161||254128;)if(t[e++]>255)return!1;for(;e239||e+1>=x||(n=t[++e],n<64||n===127||n>252)))return!1;return!0}n0.isSJIS=q6;function Y6(t){for(var e=0,x=t&&t.length,n;e255)return!1;if(!(n===9||n===10||n===13||n>=32&&n<=126))if(n>=194&&n<=223){if(e+1>=x||t[e+1]<128||t[e+1]>191)return!1;e++}else if(n===224){if(e+2>=x||t[e+1]<160||t[e+1]>191||t[e+2]<128||t[e+2]>191)return!1;e+=2}else if(n>=225&&n<=236||n===238||n===239){if(e+2>=x||t[e+1]<128||t[e+1]>191||t[e+2]<128||t[e+2]>191)return!1;e+=2}else if(n===237){if(e+2>=x||t[e+1]<128||t[e+1]>159||t[e+2]<128||t[e+2]>191)return!1;e+=2}else if(n===240){if(e+3>=x||t[e+1]<144||t[e+1]>191||t[e+2]<128||t[e+2]>191||t[e+3]<128||t[e+3]>191)return!1;e+=3}else if(n>=241&&n<=243){if(e+3>=x||t[e+1]<128||t[e+1]>191||t[e+2]<128||t[e+2]>191||t[e+3]<128||t[e+3]>191)return!1;e+=3}else if(n===244){if(e+3>=x||t[e+1]<128||t[e+1]>143||t[e+2]<128||t[e+2]>191||t[e+3]<128||t[e+3]>191)return!1;e+=3}else return!1}return!0}n0.isUTF8=Y6;function J6(t){var e=0,x=t&&t.length,n=null,i,s,o,r;if(x<2){if(t[0]>255)return!1}else{if(i=t[0],s=t[1],i===255&&s===254||i===254&&s===255)return!0;for(;e255)return!1;if(n===null)return!1;if(o=t[n+1],o!==void 0&&o>0&&o<128||(r=t[n-1],r!==void 0&&r>0&&r<128))return!0}return!1}n0.isUTF16=J6;function X6(t){var e=0,x=t&&t.length,n=null,i,s;if(x<2){if(t[0]>255)return!1}else{if(i=t[0],s=t[1],i===254&&s===255)return!0;for(;e255)return!1;if(n===null)return!1;if(n%2===0)return!0}return!1}n0.isUTF16BE=X6;function Z6(t){var e=0,x=t&&t.length,n=null,i,s;if(x<2){if(t[0]>255)return!1}else{if(i=t[0],s=t[1],i===255&&s===254)return!0;for(;e255)return!1;if(n===null)return!1;if(n%2!==0)return!0}return!1}n0.isUTF16LE=Z6;function Q6(t){var e=0,x=t&&t.length,n=null,i,s,o,r,a,E;if(x<4){for(;e255)return!1}else{if(i=t[0],s=t[1],o=t[2],r=t[3],i===0&&s===0&&o===254&&r===255||i===255&&s===254&&o===0&&r===0)return!0;for(;e255)return!1;if(n===null)return!1;if(a=t[n+3],a!==void 0&&a>0&&a<=127)return t[n+2]===0&&t[n+1]===0;if(E=t[n-1],E!==void 0&&E>0&&E<=127)return t[n+1]===0&&t[n+2]===0}return!1}n0.isUTF32=Q6;function eB(t){for(var e=0,x=t&&t.length,n;e1114111)return!1;return!0}n0.isUNICODE=eB;var ge={},x0=ca(),ua=la(),Aa=n0,T0=dn;function tB(t){for(var e=[],x=0,n=0,i=t&&t.length,s,o;n>=1,s<47?s+=113:s-=79,o>95?o+=32:o+=31):(s>>=1,s<=47?s+=112:s-=80,o+=126),e[e.length]=s&255,e[e.length]=o&255):x===2?e[e.length]=t[n]+128&255:x===3?e[e.length]=x0.FALLBACK_CHARACTER:e[e.length]=t[n]&255}return e}ge.JISToSJIS=tB;function xB(t){for(var e=[],x=0,n=t&&t.length,i=0;i=161&&s<=223?(x!==2&&(x=2,e[e.length]=r[6],e[e.length]=r[7],e[e.length]=r[8]),e[e.length]=s-128&255):s>=128?(x!==1&&(x=1,e[e.length]=r[3],e[e.length]=r[4],e[e.length]=r[5]),s<<=1,o=t[++i],o<159?(s<319?s-=225:s-=97,o>126?o-=32:o-=31):(s<319?s-=224:s-=96,o-=126),e[e.length]=s&255,e[e.length]=o&255):(x!==0&&(x=0,e[e.length]=r[0],e[e.length]=r[1],e[e.length]=r[2]),e[e.length]=s&255);return x!==0&&(e[e.length]=r[0],e[e.length]=r[1],e[e.length]=r[2]),e}ge.SJISToJIS=nB;function iB(t){for(var e=[],x=t&&t.length,n=0,i,s;n=161&&i<=223?(e[e.length]=142,e[e.length]=i):i>=129?(s=t[++n],i<<=1,s<159?(i<319?i-=97:i-=225,s>126?s+=96:s+=97):(i<319?i-=96:i-=224,s+=2),e[e.length]=i&255,e[e.length]=s&255):e[e.length]=i&255;return e}ge.SJISToEUCJP=iB;function sB(t){for(var e=[],x=0,n=t&&t.length,i=0,s,o=[27,40,66,27,36,66,27,40,73,27,36,40,68];i142?(x!==1&&(x=1,e[e.length]=o[3],e[e.length]=o[4],e[e.length]=o[5]),e[e.length]=s-128&255,e[e.length]=t[++i]-128&255):(x!==0&&(x=0,e[e.length]=o[0],e[e.length]=o[1],e[e.length]=o[2]),e[e.length]=s&255);return x!==0&&(e[e.length]=o[0],e[e.length]=o[1],e[e.length]=o[2]),e}ge.EUCJPToJIS=sB;function oB(t){for(var e=[],x=t&&t.length,n=0,i,s;n142?(s=t[++n],i&1?(i>>=1,i<111?i+=49:i+=113,s>223?s-=96:s-=97):(i>>=1,i<=111?i+=48:i+=112,s-=2),e[e.length]=i&255,e[e.length]=s&255):i===142?e[e.length]=t[++n]&255:e[e.length]=i&255;return e}ge.EUCJPToSJIS=oB;function di(t){x0.init_JIS_TO_UTF8_TABLE();for(var e=[],x=0,n=t&&t.length,i,s,o,r,a,E,l;x=161&&i<=223?(o=i-64,r=188|o>>6&3,a=128|o&63,e[e.length]=239,e[e.length]=r&255,e[e.length]=a&255):i>=128?(s=i<<1,o=t[++x],o<159?(s<319?s-=225:s-=97,o>126?o-=32:o-=31):(s<319?s-=224:s-=96,o-=126),s&=255,E=(s<<8)+o,l=T0.JIS_TO_UTF8_TABLE[E],l===void 0?e[e.length]=x0.FALLBACK_CHARACTER:l<65535?(e[e.length]=l>>8&255,e[e.length]=l&255):(e[e.length]=l>>16&255,e[e.length]=l>>8&255,e[e.length]=l&255)):e[e.length]=t[x]&255;return e}ge.SJISToUTF8=di;function fi(t){x0.init_JIS_TO_UTF8_TABLE();for(var e=[],x=0,n=t&&t.length,i,s,o,r,a,E,l,u;x>6&3,r=128|s&63,e[e.length]=239,e[e.length]=o&255,e[e.length]=r&255):i===143?(a=t[++x]-128,E=t[++x]-128,l=(a<<8)+E,u=T0.JISX0212_TO_UTF8_TABLE[l],u===void 0?e[e.length]=x0.FALLBACK_CHARACTER:u<65535?(e[e.length]=u>>8&255,e[e.length]=u&255):(e[e.length]=u>>16&255,e[e.length]=u>>8&255,e[e.length]=u&255)):i>=128?(l=(i-128<<8)+(t[++x]-128),u=T0.JIS_TO_UTF8_TABLE[l],u===void 0?e[e.length]=x0.FALLBACK_CHARACTER:u<65535?(e[e.length]=u>>8&255,e[e.length]=u&255):(e[e.length]=u>>16&255,e[e.length]=u>>8&255,e[e.length]=u&255)):e[e.length]=t[x]&255;return e}ge.EUCJPToUTF8=fi;function pi(t){x0.init_JIS_TO_UTF8_TABLE();for(var e=[],x=0,n=0,i=t&&t.length,s,o,r,a,E;n>8&255,e[e.length]=E&255):(e[e.length]=E>>16&255,e[e.length]=E>>8&255,e[e.length]=E&255)):x===2?(s=t[n]+64,o=188|s>>6&3,r=128|s&63,e[e.length]=239,e[e.length]=o&255,e[e.length]=r&255):x===3?(a=(t[n]<<8)+t[++n],E=T0.JISX0212_TO_UTF8_TABLE[a],E===void 0?e[e.length]=x0.FALLBACK_CHARACTER:E<65535?(e[e.length]=E>>8&255,e[e.length]=E&255):(e[e.length]=E>>16&255,e[e.length]=E>>8&255,e[e.length]=E&255)):e[e.length]=t[n]&255}return e}ge.JISToUTF8=pi;function gi(t,e){for(var x=[],n=0,i=t&&t.length,s,o,r,a,E,l,u=e&&e.fallback;n=128?(s<=223?(a=[s,t[n+1]],E=(s<<8)+t[++n]):s<=239?(a=[s,t[n+1],t[n+2]],E=(s<<16)+(t[++n]<<8)+(t[++n]&255)):(a=[s,t[n+1],t[n+2],t[n+3]],E=(s<<24)+(t[++n]<<16)+(t[++n]<<8)+(t[++n]&255)),l=T0.UTF8_TO_JIS_TABLE[E],l==null?u?Ba(x,a,u):x[x.length]=x0.FALLBACK_CHARACTER:l<255?x[x.length]=l+128:(l>65536&&(l-=65536),o=l>>8,r=l&255,o&1?(o>>=1,o<47?o+=113:o-=79,r>95?r+=32:r+=31):(o>>=1,o<=47?o+=112:o-=80,r+=126),x[x.length]=o&255,x[x.length]=r&255)):x[x.length]=t[n]&255;return x}ge.UTF8ToSJIS=gi;function mi(t,e){for(var x=[],n=0,i=t&&t.length,s,o,r,a,E=e&&e.fallback;n=128?(s<=223?(o=[s,t[n+1]],r=(s<<8)+t[++n]):s<=239?(o=[s,t[n+1],t[n+2]],r=(s<<16)+(t[++n]<<8)+(t[++n]&255)):(o=[s,t[n+1],t[n+2],t[n+3]],r=(s<<24)+(t[++n]<<16)+(t[++n]<<8)+(t[++n]&255)),a=T0.UTF8_TO_JIS_TABLE[r],a==null?(a=T0.UTF8_TO_JISX0212_TABLE[r],a==null?E?Ba(x,o,E):x[x.length]=x0.FALLBACK_CHARACTER:(x[x.length]=143,x[x.length]=(a>>8)-128&255,x[x.length]=(a&255)-128&255)):(a>65536&&(a-=65536),a<255?(x[x.length]=142,x[x.length]=a-128&255):(x[x.length]=(a>>8)-128&255,x[x.length]=(a&255)-128&255))):x[x.length]=t[n]&255;return x}ge.UTF8ToEUCJP=mi;function Ci(t,e){for(var x=[],n=0,i=t&&t.length,s=0,o,r,a,E,l=e&&e.fallback,u=[27,40,66,27,36,66,27,40,73,27,36,40,68];s>8&255,x[x.length]=E&255)):(E>65536&&(E-=65536),E<255?(n!==2&&(n=2,x[x.length]=u[6],x[x.length]=u[7],x[x.length]=u[8]),x[x.length]=E&255):(n!==1&&(n=1,x[x.length]=u[3],x[x.length]=u[4],x[x.length]=u[5]),x[x.length]=E>>8&255,x[x.length]=E&255)));return n!==0&&(x[x.length]=u[0],x[x.length]=u[1],x[x.length]=u[2]),x}ge.UTF8ToJIS=Ci;function Hx(t){for(var e=[],x=0,n=t&&t.length,i,s;x=55296&&i<=56319&&x+1=56320&&s<=57343&&(i=(i-55296)*1024+s-56320+65536,x++)),i<128?e[e.length]=i:i<2048?(e[e.length]=192|i>>6&31,e[e.length]=128|i&63):i<65536?(e[e.length]=224|i>>12&15,e[e.length]=128|i>>6&63,e[e.length]=128|i&63):i<2097152&&(e[e.length]=240|i>>18&15,e[e.length]=128|i>>12&63,e[e.length]=128|i>>6&63,e[e.length]=128|i&63);return e}ge.UNICODEToUTF8=Hx;function cx(t,e){for(var x=[],n=0,i=t&&t.length,s,o,r,a,E,l,u=e&&e.ignoreSurrogatePair;n>4,s>=0&&s<=7?l=o:s===12||s===13?(r=t[n++],l=(o&31)<<6|r&63):s===14?(r=t[n++],a=t[n++],l=(o&15)<<12|(r&63)<<6|a&63):s===15&&(r=t[n++],a=t[n++],E=t[n++],l=(o&7)<<18|(r&63)<<12|(a&63)<<6|E&63),l<=65535||u?x[x.length]=l:(l-=65536,x[x.length]=(l>>10)+55296,x[x.length]=l%1024+56320);return x}ge.UTF8ToUNICODE=cx;function K8(t,e){var x;if(e&&e.bom){var n=e.bom;ua.isString(n)||(n="BE");var i,s;n.charAt(0).toUpperCase()==="B"?(i=[254,255],s=ks(t)):(i=[255,254],s=ha(t)),x=[],x[0]=i[0],x[1]=i[1];for(var o=0,r=s.length;o>8&255,e[e.length]=i&255);return e}ge.UNICODEToUTF16BE=ks;function ha(t){for(var e=[],x=0,n=t&&t.length,i;x>8&255);return e}ge.UNICODEToUTF16LE=ha;function j8(t){var e=[],x=0,n=t&&t.length,i,s;for(n>=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(x=2);x=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(x=2);x=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(r=2),n&&(s[0]=n[0],s[1]=n[1]);for(var a,E;r=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(r=2),n&&(s[0]=n[0],s[1]=n[1]);for(var a,E;r=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(x=2);x=8.10.0"},WB={type:"git",url:"https://github.com/polygonplanet/encoding.js.git"},zB="polygonplanet ",VB="MIT",KB={url:"https://github.com/polygonplanet/encoding.js/issues"},jB="https://github.com/polygonplanet/encoding.js",qB=["base64","charset","convert","detect","encoding","euc-jp","eucjp","iconv","iso-2022-jp","japanese","jis","shift_jis","sjis","unicode","urldecode","urlencode","utf-16","utf-32","utf-8"],YB={},JB={bannerify:"^1.0.1",browserify:"^17.0.0",eslint:"^8.12.0",mocha:"^9.2.2","package-json-versionify":"^1.0.4","power-assert":"^1.6.1","uglify-js":"^3.15.3",uglifyify:"^5.0.2",watchify:"^4.0.0"},XB={transform:["package-json-versionify"]},ZB={name:RB,version:OB,description:LB,main:HB,files:UB,scripts:$B,engines:GB,repository:WB,author:zB,license:VB,bugs:KB,homepage:jB,keywords:qB,dependencies:YB,devDependencies:JB,browserify:XB};var QB=ca(),ve=la(),RE=n0,OE=ge,Wx=Fi,ed=ZB.version,LE=Object.prototype.hasOwnProperty,is={version:ed,orders:QB.EncodingOrders,detect:function(t,e){if(t==null||t.length===0)return!1;ve.isObject(e)&&!ve.isArray(e)&&(e=e.encoding),ve.isString(t)&&(t=ve.stringToBuffer(t)),e==null?e=is.orders:ve.isString(e)&&(e=e.toUpperCase(),e==="AUTO"?e=is.orders:~e.indexOf(",")?e=e.split(/\s*,\s*/):e=[e]);for(var x=e.length,n,i,s,o=0;o255)return encodeURIComponent(ve.codeToString_fast(t));s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===33||s>=39&&s<=42||s===45||s===46||s===95||s===126?x[x.length]=s:(x[x.length]=37,s<16?(x[x.length]=48,x[x.length]=e[s]):(x[x.length]=e[s>>4&15],x[x.length]=e[s&15]))}return ve.codeToString_fast(x)},urlDecode:function(t){for(var e=[],x=0,n=t&&t.length,i;x=65281&&s<=65374&&(s-=65248),x[x.length]=s;return e?ve.codeToString_fast(x):x},toZenkakuCase:function(t){var e=!1;ve.isString(t)&&(e=!0,t=ve.stringToBuffer(t));for(var x=[],n=t&&t.length,i=0,s;i=33&&s<=126&&(s+=65248),x[x.length]=s;return e?ve.codeToString_fast(x):x},toHiraganaCase:function(t){var e=!1;ve.isString(t)&&(e=!0,t=ve.stringToBuffer(t));for(var x=[],n=t&&t.length,i=0,s;i=12449&&s<=12534?s-=96:s===12535?(x[x.length]=12431,s=12443):s===12538&&(x[x.length]=12434,s=12443),x[x.length]=s;return e?ve.codeToString_fast(x):x},toKatakanaCase:function(t){var e=!1;ve.isString(t)&&(e=!0,t=ve.stringToBuffer(t));for(var x=[],n=t&&t.length,i=0,s;i=12353&&s<=12438&&((s===12431||s===12434)&&i=12289&&s<=12540&&(r=Wx.HANKANA_TABLE[s],r!==void 0)){x[x.length]=r;continue}s===12532||s===12535||s===12538?(x[x.length]=Wx.HANKANA_SONANTS[s],x[x.length]=65438):s>=12459&&s<=12489?(x[x.length]=Wx.HANKANA_TABLE[s-1],x[x.length]=65438):s>=12495&&s<=12509?(o=s%3,x[x.length]=Wx.HANKANA_TABLE[s-o],x[x.length]=Wx.HANKANA_MARKS[o-1]):x[x.length]=s}return e?ve.codeToString_fast(x):x},toZenkanaCase:function(t){var e=!1;ve.isString(t)&&(e=!0,t=ve.stringToBuffer(t));var x=[],n=t&&t.length,i=0,s,o,r;for(i=0;i65376&&s<65440&&(o=Wx.ZENKANA_TABLE[s-65377],i+165397&&s<65413||s>65417&&s<65423)?(o++,i++):r===65439&&s>65417&&s<65423&&(o+=2,i++)),s=o),x[x.length]=s;return e?ve.codeToString_fast(x):x},toHankakuSpace:function(t){if(ve.isString(t))return t.replace(/\u3000/g," ");for(var e=[],x=t&&t.length,n=0,i;n(t[t.PLAYER=0]="PLAYER",t[t.OPPONENT=1]="OPPONENT",t[t.RESEARCHER=2]="RESEARCHER",t[t.RESEARCHER_2=3]="RESEARCHER_2",t[t.RESEARCHER_3=4]="RESEARCHER_3",t[t.RESEARCHER_4=5]="RESEARCHER_4",t))(Gt||{});function xd(t){const e=/^\*評価値=([+-]?[.0-9]+)/.exec(t);return e?Number(e[1]):void 0}function nd(t){const e=/^#評価値=([+-]?[.0-9]+)/.exec(t);return e?Number(e[1]):void 0}function id(t){const e=/^\* *([+-]?[.0-9]+)/.exec(t);return e?Number(e[1]):void 0}function UE(t){t.forEach(e=>{const x=e.customData||{},n=e.comment.split(` +`);for(const i of n){const s=xd(i)||id(i);s!==void 0&&(x.playerSearchInfo={score:s});const o=nd(i);o!==void 0&&(x.researchInfo={score:o})}e.customData=x})}function sd(t){switch(t){case 0:return"*";default:return"#"}}function od(t,e,x,n){const i=sd(e);let s="";return x.mate&&(s+=`${Math.abs(x.mate)}手詰 +`),x.score!==void 0&&(s+=O6(x.score)+` +`,s+=`${i}評価値=${x.score} +`),x.pv&&x.pv.length!==0&&(s+=`${i}読み筋=${oh(t,x.pv)} +`),x.depth&&(s+=`${i}深さ=${x.depth} +`),s&&(n!=null&&n.engineName)&&(s+=`${i}エンジン=${n.engineName} +`),s}function rd(t,e){return e.split(` +`).filter(x=>x.match(/^[#*]読み筋=/)).map(x=>ah(t,x.split("=",2)[1]))}function ad(t){return P8(t.timeSeconds)+"+"+String(t.byoyomi).padStart(2,"0")}class Ed{constructor(){b(this,"_record",new bt);b(this,"_recordFilePath");b(this,"onChangeFilePath",()=>{});b(this,"onChangePosition",()=>{})}get record(){return this._record}get recordFilePath(){return this._recordFilePath}updateRecordFilePath(e){this._recordFilePath=e,this.onChangeFilePath(e)}clearRecordFilePath(){this._recordFilePath=void 0,this.onChangeFilePath()}reset(e){if(e){const x=new kt;x.reset(e),this._record.clear(x)}else this._record.clear();this.clearRecordFilePath()}resetByCurrentPosition(){this._record.clear(this._record.position),this.clearRecordFilePath()}importRecord(e,x){let n;switch(x||(x=Nh(e)),x){case Jx.SFEN:{const i=kt.newBySFEN(e);n=i?new bt(i):new Error(d.failedToParseSFEN);break}case Jx.USI:n=bt.newByUSI(e);break;case Jx.KIF:n=mE(e);break;case Jx.CSA:n=FE(e);break;default:n=new Error(d.failedToDetectRecordFormat);break}if(n instanceof Error)return bE(n);this._record=n,this.bindRecordHandlers(),this.clearRecordFilePath(),UE(this._record)}importRecordFromBuffer(e,x,n){let i;if(x.match(/\.kif$/)||x.match(/\.kifu$/)){const s=x.match(/\.kif$/)?"SJIS":"UTF8";i=mE(Io(e,{encoding:s,autoDetect:n==null?void 0:n.autoDetect}))}else x.match(/\.csa$/)?i=FE(Io(e,{encoding:"UTF8",autoDetect:n==null?void 0:n.autoDetect})):i=new Error(`${d.unknownFileExtension}: ${x}`);if(i instanceof Error)return bE(i);this._record=i,this.bindRecordHandlers(),this.updateRecordFilePath(x),UE(this._record)}exportRecordAsBuffer(e,x){let n,i=!1;if(e.match(/\.kif$/)||e.match(/\.kifu$/)){const s=M8(this.record,x),o=e.match(/\.kif$/)?"SJIS":"UTF8";n=HE(s,o),o==="SJIS"&&x.detectGarbled&&Io(n,{encoding:"SJIS"})!==s&&(i=!0)}else if(e.match(/\.csa$/))n=HE(O8(this.record,x),"UTF8");else return new Error(`${d.unknownFileExtension}: ${e}`);return this.updateRecordFilePath(e),{data:n,garbled:i}}swapNextTurn(){const e=this.record.position.clone();e.setColor(Tt(e.color)),this._record.clear(e),this.clearRecordFilePath()}changePosition(e){const x=this.record.position.clone();x.edit(e),this._record.clear(x),this.clearRecordFilePath()}changePly(e){this._record.goto(e)}changeBranch(e){return this._record.switchBranchByIndex(e)}swapWithNextBranch(){return this._record.swapWithNextBranch()}swapWithPreviousBranch(){return this._record.swapWithPreviousBranch()}removeCurrentMove(){this._record.removeCurrentMove()}removeNextMove(){this._record.removeNextMove()}jumpToBookmark(e){return this._record.jumpToBookmark(e)}updateComment(e){this._record.current.comment=e}updateBookmark(e){this._record.current.bookmark=e}appendComment(e,x){if(!e)return;const n=this._record.current.comment,i=this.record.current.comment?` +`:"";switch(x){case t0.NONE:break;case t0.INSERT:this._record.current.comment=e+i+n;break;case t0.APPEND:this._record.current.comment=n+i+e;break;case t0.OVERWRITE:this._record.current.comment=e;break}}appendSearchComment(e,x,n,i){let s=od(this.record.position,e,x,i);i!=null&&i.header&&(s=i.header+` +`+s),this.appendComment(s,n)}get inCommentPVs(){return rd(this.record.position,this.record.current.comment)}setGameStartMetadata(e){e.gameTitle&&this._record.metadata.setStandardMetadata(V.TITLE,e.gameTitle),e.blackName&&this._record.metadata.setStandardMetadata(V.BLACK_NAME,e.blackName),e.whiteName&&this._record.metadata.setStandardMetadata(V.WHITE_NAME,e.whiteName),this._record.metadata.setStandardMetadata(V.DATE,L8()),this._record.metadata.setStandardMetadata(V.START_DATETIME,SE()),e.timeLimit&&this._record.metadata.setStandardMetadata(V.TIME_LIMIT,ad(e.timeLimit))}setGameEndMetadata(){this._record.metadata.setStandardMetadata(V.END_DATETIME,SE())}updateSearchInfo(e,x){var i,s,o,r;const n=this.record.current.customData||{};switch(e){case 0:n.playerSearchInfo=x;break;case 1:n.opponentSearchInfo=x;break;case 2:(x.depth||0)>=(((i=n.researchInfo)==null?void 0:i.depth)||0)&&(n.researchInfo=x);break;case 3:(x.depth||0)>=(((s=n.researchInfo2)==null?void 0:s.depth)||0)&&(n.researchInfo2=x);break;case 4:(x.depth||0)>=(((o=n.researchInfo3)==null?void 0:o.depth)||0)&&(n.researchInfo3=x);break;case 5:(x.depth||0)>=(((r=n.researchInfo4)==null?void 0:r.depth)||0)&&(n.researchInfo4=x);break}this._record.current.customData=n}appendMove(e){return this._record.append(e.move,e.moveOption)?(e.elapsedMs!==void 0&&this._record.current.setElapsedMs(e.elapsedMs),!0):!1}appendMovesSilently(e,x){this.unbindRecordHandlers();try{let n=0;const i=this._record.current.ply;for(const s of e){if(!this._record.append(s,x))break;n++}return this._record.goto(i),n}finally{this.bindRecordHandlers()}}updateStandardMetadata(e){this._record.metadata.setStandardMetadata(e.key,e.value)}on(e,x){switch(e){case"changeFilePath":this.onChangeFilePath=x;break;case"changePosition":this.onChangePosition=x,this.bindRecordHandlers();break}}bindRecordHandlers(){this._record.on("changePosition",this.onChangePosition)}unbindRecordHandlers(){this._record.on("changePosition",()=>{})}}class ld{constructor(){b(this,"searchHandler")}isEngine(){return!1}async readyNewGame(){}async startSearch(e,x,n,i,s){this.searchHandler=s}async startPonder(){}async startMateSearch(){}async stop(){}async gameover(){}async close(){this.searchHandler=void 0}doMove(e){const x=this.searchHandler;this.searchHandler=void 0,x&&x.onMove(e)}resign(){const e=this.searchHandler;this.searchHandler=void 0,e&&e.onResign()}win(){const e=this.searchHandler;this.searchHandler=void 0,e&&e.onWin()}}const tn=new ld;function cd(t,e){const x=[],n=t.clone();for(const i of e){const s=n.createMoveByUSI(i);if(!s||!n.doMove(s))break;x.push(s)}return x}class Bo{constructor(e,x,n){b(this,"sessionID",0);b(this,"usi");b(this,"position");b(this,"searchHandler");b(this,"mateHandler");b(this,"ponder");b(this,"inPonder",!1);b(this,"info");b(this,"usiInfoTimeout");this.setting=e,this.timeoutSeconds=x,this.onSearchInfo=n}get name(){return this.setting.name}async launch(){this.sessionID=await ce.usiLaunch(this.setting,this.timeoutSeconds),ax[this.sessionID]=this}isEngine(){return!0}async readyNewGame(){await ce.usiReady(this.sessionID)}async startSearch(e,x,n,i,s){this.clearHandlers(),this.searchHandler=s,this.usi=e.usi,this.position=e.position.clone(),this.inPonder&&this.ponder===this.usi?ce.usiPonderHit(this.sessionID):(this.info=void 0,await ce.usiGo(this.sessionID,this.usi,x,n,i)),this.inPonder=!1,this.ponder=void 0}async startPonder(e,x,n,i){const s=e.usi;if(!this.ponder||!this.ponder.startsWith(s)||yx(this.setting.options[U8])!=="true")return;this.clearHandlers(),this.usi=this.ponder,this.position=e.position.clone();const r=this.position.createMoveByUSI(this.ponder.slice(s.length+1));r&&(this.position.doMove(r),this.info=void 0,this.inPonder=!0,await ce.usiGoPonder(this.sessionID,this.ponder,x,n,i))}async startMateSearch(e,x){this.clearHandlers(),this.usi=e.usi,this.info=void 0,this.position=e.position.clone(),this.mateHandler=x,await ce.usiGoMate(this.sessionID,this.usi)}async startResearch(e){this.clearHandlers(),this.usi=e.usi,this.info=void 0,this.position=e.position.clone(),await ce.usiGoInfinite(this.sessionID,e.usi)}async stop(){await ce.usiStop(this.sessionID)}async gameover(e){await ce.usiGameover(this.sessionID,e)}async close(){this.clearHandlers(),await ce.usiQuit(this.sessionID),delete ax[this.sessionID]}clearHandlers(){this.searchHandler=void 0,this.mateHandler=void 0}onBestMove(e,x,n){const i=this.searchHandler;if(this.clearHandlers(),!i||!this.position||e!==this.usi)return;if(x==="resign"){i.onResign();return}if(x==="win"){i.onWin();return}const s=this.position.createMoveByUSI(x);if(!s){i.onError("エンジンから不明な指し手を受信しました:"+x),i.onResign();return}if(this.ponder=n&&`${e} ${x} ${n}`,this.flushUSIInfo(),this.info&&this.info.pv&&this.info.pv.length>=1&&this.info.pv[0].equals(s)){const o={...this.info,pv:this.info.pv.slice(1)};i.onMove(s,o)}else i.onMove(s)}onCheckmate(e,x){if(e!==this.usi||!this.position)return;const n=this.mateHandler;if(this.clearHandlers(),!n)return;const i=this.position,s=[];for(const o of x){const r=i.createMoveByUSI(o);if(!r){n.onError("エンジンから不明な指し手を受信しました:"+o);return}if(s.push(r),!i.doMove(r)){n.onError("エンジンから無効な指し手を受信しました:"+o);return}}n.onCheckmate(s)}onCheckmateNotImplemented(){const e=this.mateHandler;this.clearHandlers(),e&&e.onNotImplemented()}onCheckmateTimeout(e){if(e!==this.usi||!this.position)return;const x=this.mateHandler;this.clearHandlers(),x&&x.onTimeout()}onNoMate(e){if(e!==this.usi||!this.position)return;const x=this.mateHandler;this.clearHandlers(),x&&x.onNoMate()}onUSIInfo(e,x){if(e!==this.usi||!this.position||x.multipv&&x.multipv!==1)return;const n=this.position.color===L.BLACK?1:-1,i=x.pv&&x.pv.length>=1?x.pv:x.currmove?[x.currmove]:void 0,s={usi:e,depth:x.depth,score:x.scoreCP&&x.scoreCP*n,mate:x.scoreMate&&x.scoreMate*n,pv:i&&cd(this.position,i)};this.updateUSIInfo(s)}updateUSIInfo(e){this.info=e,!this.usiInfoTimeout&&(this.usiInfoTimeout=window.setTimeout(()=>{this.flushUSIInfo()},500))}flushUSIInfo(){this.usiInfoTimeout&&(clearTimeout(this.usiInfoTimeout),this.usiInfoTimeout=void 0),this.onSearchInfo&&this.info&&this.onSearchInfo(this.info)}}const ax={};function ud(t,e,x,n){const i=ax[t];i&&i.onBestMove(e,x,n)}function Ad(t,e,x){const n=ax[t];n&&($e().updateUSIInfo(t,e,n.name,{pv:x}),n.onCheckmate(e,x))}function hd(t){const e=ax[t];e&&e.onCheckmateNotImplemented()}function Bd(t,e){const x=ax[t];x&&x.onCheckmateTimeout(e)}function dd(t,e){const x=ax[t];x&&x.onNoMate(e)}function $E(t,e,x){const n=ax[t];n&&($e().updateUSIInfo(t,e,n.name,x),n.onUSIInfo(e,x))}function Ms(t){return{async build(e,x){if(e.uri===V0)return tn;if(U0(e.uri)&&e.usi){const n=new Bo(e.usi,t??10,x);return await n.launch(),n}throw new Error("defaultPlayerBuilder#build: 予期せぬプレイヤーURIです: "+e.uri)}}}var a0=(t=>(t.WIN="win",t.LOSE="lose",t.DRAW="draw",t))(a0||{});function GE(t,e){return{player1:{name:t,win:0},player2:{name:e,win:0},draw:0,invalid:0,total:0}}class fd{constructor(e,x,n){b(this,"state");b(this,"_setting");b(this,"startPly",0);b(this,"repeat",0);b(this,"blackPlayer");b(this,"whitePlayer");b(this,"playerBuilder",Ms());b(this,"_results",GE("",""));b(this,"lastEventID");b(this,"onSaveRecord",()=>{});b(this,"onGameNext",()=>{});b(this,"onGameEnd",()=>{});b(this,"onFlipBoard",()=>{});b(this,"onPieceBeat",()=>{});b(this,"onBeepShort",()=>{});b(this,"onBeepUnlimited",()=>{});b(this,"onStopBeep",()=>{});b(this,"onError",()=>{});this.recordManager=e,this.blackClock=x,this.whiteClock=n,this.state="idle",this._setting=Is(),this.lastEventID=0}on(e,x){switch(e){case"saveRecord":this.onSaveRecord=x;break;case"gameNext":this.onGameNext=x;break;case"gameEnd":this.onGameEnd=x;break;case"flipBoard":this.onFlipBoard=x;break;case"pieceBeat":this.onPieceBeat=x;break;case"beepShort":this.onBeepShort=x;break;case"beepUnlimited":this.onBeepUnlimited=x;break;case"stopBeep":this.onStopBeep=x;break;case"error":this.onError=x;break}return this}get setting(){return this._setting}get results(){return this._results}async startGame(e,x){if(this.state!=="idle")throw Error("GameManager#startGame: 前回の対局が正常に終了できていません。アプリを再起動してください。");this.state="STARTING",this._setting=e,this.playerBuilder=x,this.repeat=0,e.startPosition||(this.startPly=this.recordManager.record.current.ply),this._results=GE(e.black.name,e.white.name);try{this.blackPlayer=await this.playerBuilder.build(this.setting.black,n=>this.recordManager.updateSearchInfo(Gt.OPPONENT,n)),this.whitePlayer=await this.playerBuilder.build(this.setting.white,n=>this.recordManager.updateSearchInfo(Gt.OPPONENT,n)),await this.nextGame()}catch(n){try{await this.closePlayers()}catch(i){this.onError(i)}finally{this.state="idle"}throw new Error(`GameManager#startGame: ${d.failedToStartNewGame}: ${n}`)}}async nextGame(){if(this.blackPlayer===void 0||this.whitePlayer===void 0)throw new Error("GameManager#nextGame: プレイヤーが初期化されていません。");this.repeat++,this.setting.startPosition?this.recordManager.reset(this.setting.startPosition):this.recordManager.record.current.ply!==this.startPly&&(this.recordManager.changePly(this.startPly),this.recordManager.removeNextMove()),this.recordManager.setGameStartMetadata({gameTitle:this.setting.repeat>=2?`連続対局 ${this.repeat}/${this.setting.repeat}`:void 0,blackName:this.setting.black.name,whiteName:this.setting.white.name,timeLimit:this.setting.timeLimit}),this.blackClock.setup(this.getBlackClockSetting()),this.whiteClock.setup(this.getWhiteClockSetting()),await Promise.all([this.blackPlayer.readyNewGame(),this.whitePlayer.readyNewGame()]),this.state="active",this.onGameNext(),this.adjustBoardOrientation(),setTimeout(()=>this.nextMove())}getCommonClockSetting(){return{timeMs:this.setting.timeLimit.timeSeconds*1e3,byoyomi:this.setting.timeLimit.byoyomi,increment:this.setting.timeLimit.increment,onBeepShort:()=>this.onBeepShort(),onBeepUnlimited:()=>this.onBeepUnlimited(),onStopBeep:()=>this.onStopBeep()}}getBlackClockSetting(){return{...this.getCommonClockSetting(),onTimeout:()=>{this.timeout(L.BLACK)}}}getWhiteClockSetting(){const e={...this.getCommonClockSetting(),onTimeout:()=>{this.timeout(L.WHITE)}};return this.setting.whiteTimeLimit?{...e,timeMs:this.setting.whiteTimeLimit.timeSeconds*1e3,byoyomi:this.setting.whiteTimeLimit.byoyomi,increment:this.setting.whiteTimeLimit.increment}:e}adjustBoardOrientation(){var e,x,n,i;this.setting.humanIsFront&&(!((e=this.blackPlayer)!=null&&e.isEngine())&&((x=this.whitePlayer)!=null&&x.isEngine())?this.onFlipBoard(!1):(n=this.blackPlayer)!=null&&n.isEngine()&&!((i=this.whitePlayer)!=null&&i.isEngine())&&this.onFlipBoard(!0))}nextMove(){if(this.state!=="active")return;if(this._setting.maxMoves&&this.recordManager.record.current.ply>=this._setting.maxMoves){this.endGame(Y.IMPASS);return}this.getActiveClock().start();const e=this.recordManager.record.position.color,x=this.getPlayer(e),n=this.getPlayer(Tt(e));if(!x||!n){this.onError(new Error("GameManager#nextMove: プレイヤーが初期化されていません。"));return}const i=this.issueEventID();x.startSearch(this.recordManager.record,this.setting.timeLimit,this.blackClock.timeMs,this.whiteClock.timeMs,{onMove:(s,o)=>this.onMove(i,s,o),onResign:()=>this.onResign(i),onWin:()=>this.onWin(i),onError:s=>this.onError(s)}).catch(s=>{this.onError(new Error(`GameManager#nextMove: ${d.failedToSendGoCommand}: ${s}`))}),n.startPonder(this.recordManager.record,this.setting.timeLimit,this.blackClock.timeMs,this.whiteClock.timeMs).catch(s=>{this.onError(new Error(`GameManager#nextMove: ${d.failedToSendPonderCommand}: ${s}`))})}onMove(e,x,n){if(e!==this.lastEventID){ce.log(ct.ERROR,"GameManager#onMove: event ID already disabled");return}if(this.state!=="active"){ce.log(ct.ERROR,"GameManager#onMove: invalid state: "+this.state);return}if(!this.recordManager.record.position.isValidMove(x)){this.onError("反則手: "+Nx(this.recordManager.record.position,x)),this.endGame(Y.FOUL_LOSE);return}this.getActiveClock().stop(),this.recordManager.appendMove({move:x,moveOption:{ignoreValidation:!0},elapsedMs:this.getActiveClock().elapsedMs}),n&&this.recordManager.updateSearchInfo(Gt.PLAYER,n),n&&this.setting.enableComment&&this.recordManager.appendSearchComment(Gt.PLAYER,n,t0.APPEND),this.onPieceBeat();const i=this.recordManager.record.perpetualCheck;if(i)if(i===this.recordManager.record.position.color){this.endGame(Y.FOUL_LOSE);return}else{this.endGame(Y.FOUL_WIN);return}else if(this.recordManager.record.repetition){this.endGame(Y.REPETITION_DRAW);return}this.nextMove()}onResign(e){if(e!==this.lastEventID){ce.log(ct.ERROR,"GameManager#onResign: event ID already disabled");return}if(this.state!=="active"){ce.log(ct.ERROR,"GameManager#onResign: invalid state: "+this.state);return}this.endGame(Y.RESIGN)}onWin(e){if(e!==this.lastEventID){ce.log(ct.ERROR,"GameManager#onWin: event ID already disabled");return}if(this.state!=="active"){ce.log(ct.ERROR,"GameManager#onWin: invalid state: "+this.state);return}this.endGame(Y.ENTERING_OF_KING)}timeout(e){this.onStopBeep();const x=this.getPlayer(e);if(x&&x.isEngine()&&!this.setting.enableEngineTimeout){x.stop().catch(n=>{this.onError(new Error(`GameManager#timeout: ${d.failedToSendStopCommand}: ${n}`))});return}this.endGame(Y.TIMEOUT)}endGame(e){if(this.state!=="active"&&this.state!=="pending")return;this.state="bussy";const x=this.recordManager.record.position.color;Promise.resolve().then(()=>this.sendGameResults(x,e)).then(()=>{if(this.getActiveClock().pause(),this.recordManager.appendMove({move:e,elapsedMs:this.getActiveClock().elapsedMs}),this.recordManager.setGameEndMetadata(),this.addGameResults(x,e),this._setting.enableAutoSave&&this.onSaveRecord(),e===Y.INTERRUPT||this.repeat>=this.setting.repeat){this.closePlayers().catch(i=>{this.onError(i)}).finally(()=>{this.state="idle",this.onGameEnd(this.results,e)});return}this.setting.swapPlayers&&this.swapPlayers(),this.state="STARTING",this.nextGame().catch(i=>{this.onError(new Error(`GameManager#endGame: ${d.failedToStartNewGame}: ${i}`))})}).catch(n=>{this.onError(new Error(`GameManager#endGame: ${d.errorOccuredWhileEndingGame}: ${n}`)),this.state="pending"})}addGameResults(e,x){switch(Po(e,L.BLACK,x)){case a0.WIN:this._results.player1.win++;break;case a0.LOSE:this._results.player2.win++;break;case a0.DRAW:this._results.draw++;break;default:this._results.invalid++;break}this._results.total++}swapPlayers(){this._setting={...this.setting,black:this.setting.white,white:this.setting.black},this._setting.whiteTimeLimit&&(this._setting={...this.setting,timeLimit:this._setting.whiteTimeLimit,whiteTimeLimit:this._setting.timeLimit}),[this.blackPlayer,this.whitePlayer]=[this.whitePlayer,this.blackPlayer],this._results={...this.results,player1:this.results.player2,player2:this.results.player1}}async sendGameResults(e,x){if(this.blackPlayer){const n=Po(e,L.BLACK,x);n&&await this.blackPlayer.gameover(n)}if(this.whitePlayer){const n=Po(e,L.WHITE,x);n&&await this.whitePlayer.gameover(n)}}async closePlayers(){const e=[];this.blackPlayer&&(e.push(this.blackPlayer.close()),this.blackPlayer=void 0),this.whitePlayer&&(e.push(this.whitePlayer.close()),this.whitePlayer=void 0);try{await Promise.all(e)}catch(x){throw new Error(`GameManager#closePlayers: ${d.failedToShutdownEngines}: ${x}`)}}getPlayer(e){switch(e){case L.BLACK:return this.blackPlayer;case L.WHITE:return this.whitePlayer}}getActiveClock(){switch(this.recordManager.record.position.color){case L.BLACK:return this.blackClock;case L.WHITE:return this.whiteClock}}issueEventID(){return this.lastEventID+=1,this.lastEventID}}function Po(t,e,x){switch(x){case Y.FOUL_WIN:case Y.ENTERING_OF_KING:return t==e?a0.WIN:a0.LOSE;case Y.RESIGN:case Y.MATE:case Y.TIMEOUT:case Y.FOUL_LOSE:return t==e?a0.LOSE:a0.WIN;case Y.IMPASS:case Y.REPETITION_DRAW:return a0.DRAW}return null}class pd{constructor(){b(this,"count",0)}get isBussy(){return this.count!==0}retain(){this.count+=1}release(){this.count-=1}}function gd(t,e){const x=t.clone();let n,i="";for(const s of e){const o=x.createMoveByUSI(s);if(!o)break;i+=Nx(x,o,{prev:n}),x.doMove(o,{ignoreValidation:!0}),n=o}return i}class X8{constructor(e,x){b(this,"sfen","");b(this,"nodes");b(this,"nps");b(this,"iterates",[]);b(this,"hashfull");b(this,"currentMove");b(this,"currentMoveText");b(this,"ponderMove");this.sessionID=e,this.name=x}get latestIteration(){const e=[],x=new Set,n=new Set;for(const i of this.iterates){const s=i.pv?i.pv[0]:void 0;!x.has(i.multiPV)&&!n.has(s)&&(e.push(i),x.add(i.multiPV),n.add(s))}return e.sort((i,s)=>(i.multiPV||1)-(s.multiPV||1))}update(e,x,n){this.sfen!==e&&(this.sfen=e,this.nodes=void 0,this.nps=void 0,this.iterates=[],this.hashfull=void 0,this.currentMove=void 0,this.currentMoveText=void 0,this.ponderMove=void 0);const i=kt.newBySFEN(e);if(!i)return;const s={position:e,color:i.color};if(x.depth!==void 0&&(s.depth=x.depth),x.seldepth!==void 0&&(s.selectiveDepth=x.seldepth),x.timeMs!==void 0&&(s.timeMs=x.timeMs),x.nodes!==void 0&&(this.nodes=x.nodes),x.pv&&(s.pv=x.pv,s.text=gd(i,x.pv)),x.multipv!==void 0&&(s.multiPV=x.multipv),x.scoreCP!==void 0&&(s.score=x.scoreCP),x.scoreMate!==void 0&&(s.scoreMate=x.scoreMate),x.lowerbound!==void 0&&(s.lowerBound=x.lowerbound),x.upperbound!==void 0&&(s.upperBound=x.upperbound),x.currmove!==void 0){this.currentMove=x.currmove;const o=i.createMoveByUSI(x.currmove);o&&(this.currentMoveText=Nx(i,o))}x.hashfullPerMill!==void 0&&(this.hashfull=x.hashfullPerMill/1e3),x.nps!==void 0&&(this.nps=x.nps),x.string&&(s.text=x.string),Object.keys(s).length!==0&&(x.nodes!==void 0&&(s.nodes=x.nodes),this.iterates.unshift(s)),this.ponderMove=n&&Nx(i,n)}}class md{constructor(){b(this,"_sessions",[]);b(this,"updateQueue",[]);b(this,"timeoutHandle")}get sessions(){return this._sessions}clear(){this._sessions=[],this.updateQueue=[],this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0)}update(e,x,n,i,s){this.updateQueue.push({sessionID:e,sfen:x.sfen,name:n,info:i,ponderMove:s}),this.timeoutHandle||(this.timeoutHandle=window.setTimeout(()=>{this.dequeue()},500))}dequeue(){for(const e of this.updateQueue)this._update(e);this.updateQueue=[],this.timeoutHandle=void 0}_update(e){let x=this._sessions.find(n=>n.sessionID===e.sessionID);x||(x=this.addSession(e.sessionID,e.name)),x.update(e.sfen,e.info,e.ponderMove)}addSession(e,x){const n=new X8(e,x);return this.sessions.push(n),this.sessions.sort((i,s)=>i.sessionID-s.sessionID),n}}var $=(t=>(t.NORMAL="normal",t.PASTE_DIALOG="pasteDialog",t.POSITION_EDITING="positionEditing",t.EXPORT_POSITION_IMAGE_DIALOG="exportBoardImageDialog",t.GAME_DIALOG="gameDialog",t.GAME="game",t.CSA_GAME_DIALOG="csaGameDialog",t.CSA_GAME="csaGame",t.RESEARCH="research",t.RESEARCH_DIALOG="researchDialog",t.ANALYSIS="analysis",t.ANALYSIS_DIALOG="analysisDialog",t.MATE_SEARCH="mateSearch",t.MATE_SEARCH_DIALOG="mateSearchDialog",t.USI_ENGINE_SETTING_DIALOG="usiEngineSettingDialog",t))($||{});class Cd{constructor(){b(this,"_queue",[])}get message(){return this._queue[0]}get hasMessage(){return this._queue.length!==0}enqueue(e){this._queue.push(e)}dequeue(){this._queue.shift()}}class Fd{constructor(){b(this,"errorCounts",{})}get errors(){return Object.entries(this.errorCounts).sort(([e],[x])=>ex?1:0).map(([e,x])=>({message:e,count:x}))}get hasError(){return!!Object.keys(this.errorCounts).length}add(e){const x=e instanceof Error?e.message:""+e,n=this.errorCounts[x]||0;this.errorCounts[x]=n+1}clear(){this.errorCounts={}}}class Dd{constructor(){b(this,"setting",Ar())}get raw(){return this.setting}get language(){return this.setting.language}get thema(){return this.setting.thema}get pieceImage(){return this.setting.pieceImage}get backgroundImageType(){return this.setting.backgroundImageType}get backgroundImageFileURL(){return this.setting.backgroundImageFileURL}get boardImage(){return this.setting.boardImage}get croppedPieceImageBaseURL(){return this.setting.croppedPieceImageBaseURL}get pieceImageFileURL(){return this.setting.pieceImageFileURL}get boardImageFileURL(){return this.setting.boardImageFileURL}get pieceStandImage(){return this.setting.pieceStandImage}get pieceStandImageFileURL(){return this.setting.pieceStandImageFileURL}get boardLabelType(){return this.setting.boardLabelType}get leftSideControlType(){return this.setting.leftSideControlType}get rightSideControlType(){return this.setting.rightSideControlType}get pieceVolume(){return this.setting.pieceVolume}get clockVolume(){return this.setting.clockVolume}get clockPitch(){return this.setting.clockPitch}get clockSoundTarget(){return this.setting.clockSoundTarget}get boardFlipping(){return this.setting.boardFlipping}get tabPaneType(){return this.setting.tabPaneType}get tab(){return this.setting.tab}get tab2(){return this.setting.tab2}get topPaneHeightPercentage(){return this.setting.topPaneHeightPercentage}get topPanePreviousHeightPercentage(){return this.setting.topPanePreviousHeightPercentage}get bottomLeftPaneWidthPercentage(){return this.setting.bottomLeftPaneWidthPercentage}get defaultRecordFileFormat(){return this.setting.defaultRecordFileFormat}get textDecodingRule(){return this.setting.textDecodingRule}get returnCode(){return this.setting.returnCode}get autoSaveDirectory(){return this.setting.autoSaveDirectory}get translateEngineOptionName(){return this.setting.translateEngineOptionName}get engineTimeoutSeconds(){return this.setting.engineTimeoutSeconds}get evaluationViewFrom(){return this.setting.evaluationViewFrom}get coefficientInSigmoid(){return this.setting.coefficientInSigmoid}get badMoveLevelThreshold1(){return this.setting.badMoveLevelThreshold1}get badMoveLevelThreshold2(){return this.setting.badMoveLevelThreshold2}get badMoveLevelThreshold3(){return this.setting.badMoveLevelThreshold3}get badMoveLevelThreshold4(){return this.setting.badMoveLevelThreshold4}get showElapsedTimeInRecordView(){return this.setting.showElapsedTimeInRecordView}get showCommentInRecordView(){return this.setting.showCommentInRecordView}get enableAppLog(){return this.setting.enableAppLog}get enableUSILog(){return this.setting.enableUSILog}get enableCSALog(){return this.setting.enableCSALog}get logLevel(){return this.setting.logLevel}get positionImageStyle(){return this.setting.positionImageStyle}get positionImageSize(){return this.setting.positionImageSize}get useBookmarkAsPositionImageHeader(){return this.setting.useBookmarkAsPositionImageHeader}get positionImageHeader(){return this.setting.positionImageHeader}get lastRecordFilePath(){return this.setting.lastRecordFilePath}get lastUSIEngineFilePath(){return this.setting.lastUSIEngineFilePath}get lastImageExportFilePath(){return this.setting.lastImageExportFilePath}get lastOtherFilePath(){return this.setting.lastOtherFilePath}get emptyRecordInfoVisibility(){return this.setting.emptyRecordInfoVisibility}async loadAppSetting(){this.setting=await ce.loadAppSetting()}async updateAppSetting(e){const x=Hh(this.setting,e);if(x instanceof Error)throw x;await ce.saveAppSetting(x),this.setting=x}flipBoard(){this.setting.boardFlipping=!this.setting.boardFlipping,ce.saveAppSetting(this.setting)}}function _d(){return m0(new Dd)}let ko;function Te(){return ko||(ko=_d()),ko}class vd{constructor(e){b(this,"researcher");b(this,"setting",hr());b(this,"ply");b(this,"actualMove");b(this,"lastSearchInfo");b(this,"searchInfo");b(this,"timerHandle");b(this,"onFinish",()=>{});b(this,"onError",()=>{});this.recordManager=e}on(e,x){switch(e){case"finish":this.onFinish=x;break;case"error":this.onError=x;break}return this}async start(e){if(!e.usi)throw new Error("エンジンが設定されていません。");await this.setupEngine(e.usi),this.setting=e,this.ply=void 0,this.actualMove=void 0,this.lastSearchInfo=void 0,this.searchInfo=void 0,setTimeout(()=>this.next())}close(){this.clearTimer(),this.closeEngine().catch(e=>{this.onError(e)})}async setupEngine(e){if(this.researcher)throw new Error("AnalysisManager#setupEngine: 前回のエンジンが終了していません。数秒待ってからもう一度試してください。");const x=Te(),n=new Bo(e,x.engineTimeoutSeconds,this.updateSearchInfo.bind(this));await n.launch(),await n.readyNewGame(),this.researcher=n}async closeEngine(){this.researcher&&(await this.researcher.close(),this.researcher=void 0)}next(){if(this.clearTimer(),!this.researcher){this.onError(new Error("エンジンが初期化されていません。")),this.finish();return}if(this.lastSearchInfo=this.searchInfo,this.searchInfo=void 0,this.ply!==void 0?this.ply=this.ply+1:this.setting.startCriteria.enableNumber?this.ply=this.setting.startCriteria.number-1:this.ply=0,this.setting.endCriteria.enableNumber&&this.ply>=this.setting.endCriteria.number){this.finish();return}this.recordManager.changePly(this.ply);const e=this.recordManager.record;if(e.current.ply!==this.ply){this.finish();return}if(!e.current.next&&!(e.current.move instanceof Ze)){this.finish();return}this.actualMove=e.current.move instanceof Ze?e.current.move:void 0,this.setTimer(),this.researcher.startResearch(e).catch(x=>{this.onError(x)})}finish(){this.onFinish(),this.close()}setTimer(){this.timerHandle=window.setTimeout(()=>{this.onResult(),this.next()},this.setting.perMoveCriteria.maxSeconds*1e3)}clearTimer(){this.timerHandle&&(clearTimeout(this.timerHandle),this.timerHandle=void 0)}onResult(){var E;if(!this.searchInfo||!this.lastSearchInfo)return;const e=this.recordManager.record,n=Tt(e.position.color)===L.BLACK?1:-1,i=this.searchInfo.score!==void 0?this.searchInfo.score*n:void 0,s=this.searchInfo.score!==void 0&&this.lastSearchInfo.score!==void 0?(this.searchInfo.score-this.lastSearchInfo.score)*n:void 0,o=this.actualMove&&this.lastSearchInfo.pv?this.actualMove.equals(this.lastSearchInfo.pv[0]):void 0,r=Te();let a="";if(s!==void 0&&i!==void 0&&!o){const l=bd(i-s,i,r);l&&(a=`【${l}】`)}this.recordManager.appendSearchComment(Gt.RESEARCHER,this.searchInfo,this.setting.commentBehavior,{header:a,engineName:(E=this.setting.usi)==null?void 0:E.name})}updateSearchInfo(e){this.recordManager.updateSearchInfo(Gt.RESEARCHER,e),this.searchInfo=e}}function bd(t,e,x){const n=dr(t,x.coefficientInSigmoid)-dr(e,x.coefficientInSigmoid);return n>=x.badMoveLevelThreshold4?d.blunder:n>=x.badMoveLevelThreshold3?d.mistake:n>=x.badMoveLevelThreshold2?d.dubious:n>=x.badMoveLevelThreshold1?d.inaccuracy:null}function yd(){return{id:"",myColor:L.BLACK,toMove:L.BLACK,position:"",timeUnitMs:1e3,totalTime:0,byoyomi:0,delay:0,increment:0}}var k0=(t=>(t.UNKNOWN="unknown",t.RESIGN="resign",t.SENNICHITE="sennichite",t.OUTE_SENNICHITE="oute_sennichite",t.ILLEGAL_MOVE="illegal_move",t.ILLEGAL_ACTION="illegal_action",t.TIME_UP="time_up",t.JISHOGI="jishogi",t.MAX_MOVES="max_moves",t))(k0||{}),M0=(t=>(t.WIN="win",t.LOSE="lose",t.DRAW="draw",t.CENSORED="censored",t.CHUDAN="chudan",t))(M0||{});const Z8=10;var r0=(t=>(t[t.OFFLINE=0]="OFFLINE",t[t.PLAYER_SETUP=1]="PLAYER_SETUP",t[t.WAITING_LOGIN=2]="WAITING_LOGIN",t[t.LOGIN_FAILED=3]="LOGIN_FAILED",t[t.LOGIN_RETRY_INTERVAL=4]="LOGIN_RETRY_INTERVAL",t[t.READY=5]="READY",t[t.GAME=6]="GAME",t))(r0||{});class Sd{constructor(e,x,n){b(this,"_state",0);b(this,"_setting",w6());b(this,"sessionID",0);b(this,"stopRequested",!1);b(this,"repeat",0);b(this,"player");b(this,"gameSummary",yd());b(this,"searchInfo");b(this,"playerBuilder",Ms());b(this,"retryTimer");b(this,"onSaveRecord",()=>{});b(this,"onGameNext",()=>{});b(this,"onGameEnd",()=>{});b(this,"onFlipBoard",()=>{});b(this,"onPieceBeat",()=>{});b(this,"onBeepShort",()=>{});b(this,"onBeepUnlimited",()=>{});b(this,"onStopBeep",()=>{});b(this,"onError",()=>{});this.recordManager=e,this.blackClock=x,this.whiteClock=n}on(e,x){switch(e){case"saveRecord":this.onSaveRecord=x;break;case"gameNext":this.onGameNext=x;break;case"gameEnd":this.onGameEnd=x;break;case"flipBoard":this.onFlipBoard=x;break;case"pieceBeat":this.onPieceBeat=x;break;case"beepShort":this.onBeepShort=x;break;case"beepUnlimited":this.onBeepUnlimited=x;break;case"stopBeep":this.onStopBeep=x;break;case"error":this.onError=x;break}return this}get state(){return this._state}get setting(){return this._setting}get isMyTurn(){return this.recordManager.record.position.color===this.gameSummary.myColor}async login(e,x){if(this.sessionID)throw new Error("CSAGameManager#start: session already exists");if(this._state!==0)throw new Error("CSAGameManager#start: unexpected state");this._state=1,this._setting=e,this.playerBuilder=x,this.repeat=0,this.player=await this.playerBuilder.build(this._setting.player,n=>this.recordManager.updateSearchInfo(Gt.OPPONENT,n)),await this.relogin()}async relogin(){if(!this.player)throw new Error("CSAGameManager#relogin: player is not initialized");this._state=2;try{await this.player.readyNewGame();const e=await ce.csaLogin(this._setting.server);this.sessionID=e,this._state=5,wd(this.sessionID,this),this.onGameNext()}catch(e){throw this._state=3,this.close(1),new Error(`CSAGameManager#relogin: ${d.failedToStartNewGame}: ${e}`)}}stop(){this.sessionID&&(this.stopRequested=!0,ce.csaStop(this.sessionID))}logout(){this.close(0)}close(e){if(!(this._state===0||this._state===2)){if(this.stopRequested&&(e=0,this.stopRequested=!1),this.sessionID&&(Td(this.sessionID),ce.csaLogout(this.sessionID).catch(x=>{this.onError(new Error(`CSAGameManager#close: ${d.errorOccuredWhileLogoutFromCSAServer}: ${x}`))}),this.sessionID=0),this.blackClock.stop(),this.whiteClock.stop(),this._state=0,this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=void 0),e===0||this.repeat>=this.setting.repeat){this.player&&(this.player.close().catch(x=>{this.onError(new Error(`CSAGameManager#close: ${d.failedToShutdownEngines}: ${x}`))}),this.player=void 0),this.onGameEnd();return}e===2?this.relogin().catch(this.onError):(this._state=4,this.retryTimer=setTimeout(()=>this.relogin().catch(this.onError),Z8*1e3))}}onGameSummary(e){this.gameSummary=e;const x=this.recordManager.importRecord(this.gameSummary.position,Jx.CSA);if(x){this.onError(`CSAGameManager#onGameSummary: ${x}`),this.close(0);return}ce.csaAgree(this.sessionID,this.gameSummary.id)}onReject(){this.close(1)}onStart(e){this.repeat++,this.recordManager.setGameStartMetadata({gameTitle:this.gameSummary.id,blackName:this.gameSummary.blackPlayerName,whiteName:this.gameSummary.whitePlayerName,timeLimit:{timeSeconds:this.gameSummary.totalTime*this.gameSummary.timeUnitMs/1e3,byoyomi:this.gameSummary.byoyomi*this.gameSummary.timeUnitMs/1e3,increment:this.gameSummary.increment*this.gameSummary.timeUnitMs/1e3}}),this.setting.autoFlip&&this.onFlipBoard&&this.onFlipBoard(this.gameSummary.myColor===L.WHITE),this._state=6,this.next(e)}onMove(e,x){const n=this.isMyTurn,i=Ih(this.recordManager.record.position,e);if(i instanceof Error){this.onError(`CSAGameManager#onMove: 解釈できない指し手 [${e}]: ${i.message}`);return}this.recordManager.appendMove({move:i,moveOption:{ignoreValidation:!0},elapsedMs:this.parseElapsedMs(e)}),n&&this.searchInfo&&this.recordManager.updateSearchInfo(Gt.PLAYER,this.searchInfo),n&&this.searchInfo&&this.setting.enableComment&&this.recordManager.appendSearchComment(Gt.PLAYER,this.searchInfo,t0.APPEND),this.onPieceBeat(),this.next(x)}parseElapsedMs(e){const x=/^.*,T([0-9]+)$/.exec(e);return x?Number(parseInt(x[1]))*this.gameSummary.timeUnitMs:0}onGameResult(e,x){if(this.recordManager.appendMove({move:this.gameResultToSpecialMove(e,x)}),this.player){let n;switch(x){case M0.WIN:n=a0.WIN;break;case M0.LOSE:n=a0.LOSE;break;case M0.DRAW:case M0.CENSORED:case M0.CHUDAN:n=a0.DRAW;break}this.player.gameover(n)}this.setting.enableAutoSave&&this.onSaveRecord(),this.close(2)}gameResultToSpecialMove(e,x){const n=this.recordManager.record.position.color;switch(e){case k0.RESIGN:return Y.RESIGN;case k0.SENNICHITE:return Y.REPETITION_DRAW;case k0.OUTE_SENNICHITE:case k0.ILLEGAL_MOVE:case k0.ILLEGAL_ACTION:switch(x){case M0.WIN:return n===this.gameSummary.myColor?Y.FOUL_WIN:Y.FOUL_LOSE;case M0.LOSE:return n===this.gameSummary.myColor?Y.FOUL_LOSE:Y.FOUL_WIN}break;case k0.TIME_UP:return Y.TIMEOUT;case k0.JISHOGI:return Y.ENTERING_OF_KING;case k0.MAX_MOVES:return Y.IMPASS}return x===M0.DRAW?Y.DRAW:Y.INTERRUPT}onClose(){this.close(this.setting.autoRelogin?1:0)}next(e){this.blackClock.stop(),this.whiteClock.stop(),this.syncClock(e),this.startClock(),this.recordManager.record.position.color===this.gameSummary.myColor?this.startSearch(e):this.startPonder()}syncClock(e){const x={byoyomi:this.gameSummary.byoyomi*this.gameSummary.timeUnitMs/1e3,onBeepShort:()=>this.onBeepShort(),onBeepUnlimited:()=>this.onBeepUnlimited(),onStopBeep:()=>this.onStopBeep()};this.blackClock.setup({...x,timeMs:e.black.time*this.gameSummary.timeUnitMs}),this.whiteClock.setup({...x,timeMs:e.white.time*this.gameSummary.timeUnitMs})}startClock(){this.recordManager.record.position.color===L.BLACK?this.blackClock.start():this.whiteClock.start()}startSearch(e){if(!this.player){this.onError("CSAGameManager#startSearch: player is not initialized");return}this.player.startSearch(this.recordManager.record,this.buildTimeLimitSetting(),e.black.time*this.gameSummary.timeUnitMs,e.white.time*this.gameSummary.timeUnitMs,{onMove:this.onPlayerMove.bind(this),onResign:this.onPlayerResign.bind(this),onWin:this.onPlayerWin.bind(this),onError:this.onPlayerError.bind(this)}).catch(x=>{this.onError(new Error(`CSAGameManager#next: ${d.failedToSendGoCommand}: ${x}`))})}startPonder(){if(!this.player){this.onError("CSAGameManager#startPonder: player is not initialized");return}this.player.startPonder(this.recordManager.record,this.buildTimeLimitSetting(),this.blackClock.timeMs,this.whiteClock.timeMs).catch(e=>{this.onError(new Error(`CSAGameManager#next: ${d.failedToSendPonderCommand}: ${e}`))})}buildTimeLimitSetting(){const e=this.gameSummary.totalTime*this.gameSummary.timeUnitMs/1e3,x=this.gameSummary.byoyomi*this.gameSummary.timeUnitMs/1e3,n=this.gameSummary.increment*this.gameSummary.timeUnitMs/1e3;return{timeSeconds:e,byoyomi:x,increment:n}}onPlayerMove(e,x){this.searchInfo=x;let n,i;switch(this._setting.server.protocolVersion){case Sx.V121:break;case Sx.V121_FLOODGATE:if(n=x==null?void 0:x.score,x!=null&&x.pv)for(const s of x.pv)i=i?i+" ":"",i+=vE(s);break}ce.csaMove(this.sessionID,vE(e),n,i)}onPlayerResign(){ce.csaResign(this.sessionID)}onPlayerWin(){ce.csaWin(this.sessionID)}onPlayerError(e){this.onError(e)}}const ux={};function wd(t,e){ux[t]=e}function Td(t){delete ux[t]}function Id(t,e){const x=ux[t];x&&x.onGameSummary(e)}function Pd(t){const e=ux[t];e&&e.onReject()}function kd(t,e){const x=ux[t];x&&x.onStart(e)}function Md(t,e,x){const n=ux[t];n&&n.onMove(e,x)}function Nd(t,e,x){const n=ux[t];n&&n.onGameResult(e,x)}function Rd(t){const e=ux[t];e&&e.onClose()}class WE{constructor(){b(this,"setting",{timeMs:0,byoyomi:0,increment:0});b(this,"_timeMs",0);b(this,"_byoyomi",0);b(this,"_elapsedMs",0);b(this,"timerHandle",0);b(this,"timerStart",0);b(this,"lastTimeMs",0)}setup(e){this.setting=e,this._timeMs=e.timeMs||0,this._byoyomi=e.byoyomi||0,this._elapsedMs=0}get time(){return Math.ceil(this._timeMs/1e3)}get timeMs(){return this._timeMs}get byoyomi(){return this._byoyomi}get elapsedMs(){return this._elapsedMs}start(){this.clearTimer(),this.timerStart=Date.now(),this.lastTimeMs=this._timeMs,this._byoyomi=this.setting.byoyomi||0,this._elapsedMs=0,this.timerHandle=window.setInterval(()=>{const e=this.timeMs,x=this.byoyomi;this._elapsedMs=Date.now()-this.timerStart;const n=this.lastTimeMs-this._elapsedMs;if(n>=0?this._timeMs=n:(this._timeMs=0,this._byoyomi=Math.max(Math.ceil((this.setting.byoyomi||0)+n/1e3),0)),this.timeMs===0&&this.byoyomi===0){this.timeout();return}this.fireBeep(e,x)},100)}fireBeep(e,x){let n=Math.ceil(this.timeMs/1e3),i=Math.ceil(e/1e3);if(!(n!==0&&this.byoyomi!==0)){if(n===0&&i!==0){this.setting.onBeepShort&&this.setting.onBeepShort();return}this.byoyomi!==0&&(n=this.byoyomi,i=x),n!==i&&(n<=5?this.setting.onBeepUnlimited&&this.setting.onBeepUnlimited():(n<=10||n===20||n===30||n===60)&&this.setting.onBeepShort&&this.setting.onBeepShort())}}pause(){this.clearTimer()}stop(){this.clearTimer(),this.incrementTime()}timeout(){this.clearTimer(),this.setting.onTimeout&&this.setting.onTimeout()}clearTimer(){this.timerHandle&&(window.clearInterval(this.timerHandle),this.timerHandle=0),this.setting.onStopBeep&&this.setting.onStopBeep()}incrementTime(){this._timeMs+=(this.setting.increment||0)*1e3}}class Wn{constructor(){b(this,"func");b(this,"timeout")}after(e,x){this.func=e,!this.timeout&&(this.timeout=setTimeout(this.invoke.bind(this),x))}invoke(){this.func&&this.func(),this.clear()}clear(){this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0),this.func=void 0}}function Od(t){switch(t){case 0:return Gt.RESEARCHER;case 1:return Gt.RESEARCHER_2;case 2:return Gt.RESEARCHER_3;case 3:return Gt.RESEARCHER_4;default:return}}class Ld{constructor(){b(this,"setting",Ps());b(this,"engines",[]);b(this,"onUpdateSearchInfo",()=>{});b(this,"onError",()=>{});b(this,"lazyPositionUpdate",new Wn);b(this,"maxSecondsTimer")}on(e,x){switch(e){case"updateSearchInfo":this.onUpdateSearchInfo=x;break;case"error":this.onError=x;break}return this}async launch(e){var i;if(this.setting=e,e.usi===void 0)throw new Error("ResearchManager#launch: USIエンジンの設定は必須です。");for(const s of e.secondaries||[])if(s.usi===void 0)throw new Error("ResearchManager#launch: USIエンジンの設定は必須です。");if(this.engines.length>0)throw new Error("ResearchManager#launch: 前回のエンジンが終了していません。数秒待ってからもう一度試してください。");const x=Te(),n=[e.usi,...((i=e.secondaries)==null?void 0:i.map(s=>s.usi))||[]].filter(s=>!!s);this.engines=n.map((s,o)=>{const r=Od(o);return new Bo(s,x.engineTimeoutSeconds,a=>{r!==void 0&&this.onUpdateSearchInfo(r,a)})});try{await Promise.all(this.engines.map(s=>s.launch())),await Promise.all(this.engines.map(s=>s.readyNewGame()))}catch(s){throw this.close(),s}}updatePosition(e){this.lazyPositionUpdate.after(()=>{clearTimeout(this.maxSecondsTimer),this.engines.forEach(x=>x.startResearch(e)),this.setting.enableMaxSeconds&&this.setting.maxSeconds>0&&(this.maxSecondsTimer=setTimeout(()=>{this.stopAll()},this.setting.maxSeconds*1e3))},200)}stopAll(){clearTimeout(this.maxSecondsTimer),Promise.all(this.engines.map(e=>e.stop())).catch(e=>{this.onError(e)})}close(){this.lazyPositionUpdate.clear(),clearTimeout(this.maxSecondsTimer),Promise.allSettled(this.engines.map(e=>e.close())).then(()=>{this.engines=[]}).catch(e=>{this.onError(e)})}}class Hd{constructor(){b(this,"engine",null);b(this,"onNotImplemented",()=>{});b(this,"onCheckmate",()=>{});b(this,"onTimeout",()=>{});b(this,"onNoMate",()=>{});b(this,"onError",()=>{})}on(e,x){switch(e){case"checkmate":this.onCheckmate=x;break;case"notImplemented":this.onNotImplemented=x;break;case"timeout":this.onTimeout=x;break;case"noMate":this.onNoMate=x;break;case"error":this.onError=x;break}return this}async start(e,x){if(e.usi===void 0)throw new Error("MateSearchManager#start: USIエンジンの設定は必須です。");const n=Te();this.engine=new Bo(e.usi,n.engineTimeoutSeconds);try{await this.engine.launch(),await this.engine.readyNewGame(),await this.engine.startMateSearch(x,{onCheckmate:i=>{this.close(),this.onCheckmate(i)},onNotImplemented:()=>{this.close(),this.onNotImplemented()},onTimeout:()=>{this.close(),this.onTimeout()},onNoMate:()=>{this.close(),this.onNoMate()},onError:i=>{this.close(),this.onError(i)}})}catch(i){throw this.close(),i}}close(){this.engine&&this.engine.close().then(()=>{this.engine=null}).catch(e=>{this.onError(e)})}}function zE(t){const e=t.total-t.invalid;return[{type:"list",items:[{text:t.player1.name,children:[`勝ち数: ${t.player1.win}`,`勝率: ${AE(t.player1.win,e,1)}`]},{text:t.player2.name,children:[`勝ち数: ${t.player2.win}`,`勝率: ${AE(t.player2.win,e,1)}`]},{text:`引き分け: ${t.draw}`},{text:`有効対局数: ${e}`},{text:`無効対局数: ${t.invalid}`}]}]}class Ud{constructor(){b(this,"onChangeFilePath",[]);b(this,"_bussy",new pd);b(this,"_message",new Cd);b(this,"_error",new Fd);b(this,"recordManager",new Ed);b(this,"_appState",$.NORMAL);b(this,"_isAppSettingDialogVisible",!1);b(this,"_confirmation");b(this,"_pvPreview");b(this,"usiMonitor",new md);b(this,"blackClock",new WE);b(this,"whiteClock",new WE);b(this,"gameManager",new fd(this.recordManager,this.blackClock,this.whiteClock));b(this,"csaGameManager",new Sd(this.recordManager,this.blackClock,this.whiteClock));b(this,"researchManager",new Ld);b(this,"analysisManager",new vd(this.recordManager));b(this,"mateSearchManager",new Hd);b(this,"_reactive");b(this,"garbledNotified",!1);this.recordManager.on("changeFilePath",n=>{for(const i of this.onChangeFilePath)i(n)}),this.recordManager.on("changePosition",()=>{this.onUpdatePosition()});const e=m0(this),x=Te();this.gameManager.on("saveRecord",e.onSaveRecord.bind(e)).on("gameNext",e.onGameNext.bind(e)).on("gameEnd",e.onGameEnd.bind(e)).on("flipBoard",e.onFlipBoard.bind(e)).on("pieceBeat",()=>To(x.pieceVolume)).on("beepShort",this.onBeepShort.bind(this)).on("beepUnlimited",this.onBeepUnlimited.bind(this)).on("stopBeep",kE).on("error",e.pushError.bind(e)),this.csaGameManager.on("saveRecord",e.onSaveRecord.bind(e)).on("gameNext",e.onGameNext.bind(e)).on("gameEnd",e.onCSAGameEnd.bind(e)).on("flipBoard",e.onFlipBoard.bind(e)).on("pieceBeat",()=>To(x.pieceVolume)).on("beepShort",this.onBeepShort.bind(this)).on("beepUnlimited",this.onBeepUnlimited.bind(this)).on("stopBeep",kE).on("error",e.pushError.bind(e)),this.researchManager.on("updateSearchInfo",this.onUpdateSearchInfo.bind(e)).on("error",this.pushError.bind(e)),this.analysisManager.on("finish",this.onFinish.bind(e)).on("error",this.pushError.bind(e)),this.mateSearchManager.on("checkmate",this.onCheckmate.bind(e)).on("notImplemented",this.onNotImplemented.bind(e)).on("noMate",this.onNoMate.bind(e)).on("error",this.onCheckmateError.bind(e)),this._reactive=e}addListener(e,x){switch(e){case"changeFilePath":this.onChangeFilePath.push(x);break}return this}get reactive(){return this._reactive}get isBussy(){return this._bussy.isBussy}retainBussyState(){return this._bussy.retain()}releaseBussyState(){return this._bussy.release()}get message(){return this._message.message}get hasMessage(){return this._message.hasMessage}enqueueMessage(e){this._message.enqueue(e)}dequeueMessage(){this._message.dequeue()}get errors(){return this._error.errors}get hasError(){return this._error.hasError}pushError(e){ce.log(ct.ERROR,c8(e)),this._error.add(e)}clearErrors(){this._error.clear()}get record(){return this.recordManager.record}get recordFilePath(){return this.recordManager.recordFilePath}get inCommentPVs(){return this.recordManager.inCommentPVs}updateStandardRecordMetadata(e){this.recordManager.updateStandardMetadata(e)}appendSearchComment(e,x,n,i){this.recordManager.appendSearchComment(e,x,n,i)}appendMovesSilently(e,x){return this.recordManager.appendMovesSilently(e,x)}get appState(){return this._appState}get confirmation(){var e;return(e=this._confirmation)==null?void 0:e.message}showConfirmation(e){this._confirmation&&ce.log(ct.WARN,`Store#showConfirmation: 確認ダイアログを多重に表示しようとしました。 appState=${this.appState} currentMessage=${this._confirmation.message} newMessage=${e.message}`),this._confirmation={...e,appState:this.appState}}confirmationOk(){if(!this._confirmation)return;const e=this._confirmation;if(this._confirmation=void 0,this.appState!==e.appState){this.pushError("確認ダイアログ表示中に他の操作が行われたため処理が中止されました。");return}e.onOk&&e.onOk()}confirmationCancel(){this._confirmation=void 0}get pvPreview(){return this._pvPreview}showPVPreviewDialog(e){this._pvPreview=e}closePVPreviewDialog(){this._pvPreview=void 0}showPasteDialog(){this.appState===$.NORMAL&&(this._appState=$.PASTE_DIALOG)}showGameDialog(){this.appState===$.NORMAL&&(this._appState=$.GAME_DIALOG)}showCSAGameDialog(){this.appState===$.NORMAL&&(this._appState=$.CSA_GAME_DIALOG)}showResearchDialog(){this.appState===$.NORMAL&&(this._appState=$.RESEARCH_DIALOG)}showAnalysisDialog(){this.appState===$.NORMAL&&(this._appState=$.ANALYSIS_DIALOG)}showMateSearchDialog(){this.appState===$.NORMAL&&(this._appState=$.MATE_SEARCH_DIALOG)}showUsiEngineManagementDialog(){this.appState===$.NORMAL&&(this._appState=$.USI_ENGINE_SETTING_DIALOG)}showExportBoardImageDialog(){this.appState===$.NORMAL&&(this._appState=$.EXPORT_POSITION_IMAGE_DIALOG)}destroyModalDialog(){(this.appState===$.PASTE_DIALOG||this.appState===$.GAME_DIALOG||this.appState===$.CSA_GAME_DIALOG||this.appState===$.RESEARCH_DIALOG||this.appState===$.ANALYSIS_DIALOG||this.appState===$.MATE_SEARCH_DIALOG||this.appState===$.USI_ENGINE_SETTING_DIALOG||this.appState===$.EXPORT_POSITION_IMAGE_DIALOG)&&(this._appState=$.NORMAL)}closeModalDialog(){this.isBussy||this.destroyModalDialog()}get isAppSettingDialogVisible(){return this._isAppSettingDialogVisible}showAppSettingDialog(){this._isAppSettingDialogVisible=!0}closeAppSettingDialog(){this._isAppSettingDialogVisible=!1}get usiMonitors(){return this.usiMonitor.sessions}updateUSIInfo(e,x,n,i){this.recordManager.record.usi===x&&this.usiMonitor.update(e,this.recordManager.record.position,n,i)}updateUSIPonderInfo(e,x,n,i){const s=bt.newByUSI(x);if(s instanceof Error){ce.log(ct.ERROR,`invalid USI: ${x} (updateUSIPonderInfo)`);return}const o=s.current.move;o instanceof Ze&&this.usiMonitor.update(e,s.position,n,i,o)}get blackTime(){return this.blackClock.time}get blackByoyomi(){return this.blackClock.byoyomi}get whiteTime(){return this.whiteClock.time}get whiteByoyomi(){return this.whiteClock.byoyomi}startGame(e){this.appState!==$.GAME_DIALOG||this.isBussy||(this.retainBussyState(),ce.saveGameSetting(e).then(()=>{const x=Te(),n=Ms(x.engineTimeoutSeconds);return this.gameManager.startGame(e,n)}).then(()=>this._appState=$.GAME).catch(x=>{this.pushError("対局の初期化中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()}))}get gameSetting(){return this.gameManager.setting}get gameResults(){return this.gameManager.results}get csaGameState(){return this.csaGameManager.state}loginCSAGame(e,x){this.appState!==$.CSA_GAME_DIALOG||this.isBussy||(this.retainBussyState(),Promise.resolve().then(async()=>{if(x.saveHistory){const n=await ce.loadCSAGameSettingHistory(),i=k6(n,e);await ce.saveCSAGameSettingHistory(i)}}).then(()=>{const n=Te(),i=Ms(n.engineTimeoutSeconds);return this.csaGameManager.login(e,i)}).then(()=>this._appState=$.CSA_GAME).catch(n=>{this.pushError("対局の初期化中にエラーが出ました: "+n)}).finally(()=>{this.releaseBussyState()}))}cancelCSAGame(){if(this.appState===$.CSA_GAME){if(this.csaGameManager.state===r0.GAME){this.pushError("対局が始まっているため通信対局をキャンセルできませんでした。");return}this.csaGameManager.logout(),this._appState=$.NORMAL}}stopGame(){switch(this.appState){case $.GAME:this.gameManager.setting.repeat>=2?this.showConfirmation({message:d.areYouSureWantToQuitGames,onOk:()=>this.gameManager.endGame(Y.INTERRUPT)}):this.gameManager.endGame(Y.INTERRUPT);break;case $.CSA_GAME:this.showConfirmation({message:d.areYouSureWantToRequestQuit,onOk:()=>this.csaGameManager.stop()});break}}showGameResults(){if(this.appState!==$.GAME)return;const e=this.gameManager.results;this.enqueueMessage({text:d.gameProgress,attachments:zE(e)})}onGameNext(){this.usiMonitor.clear()}onGameEnd(e,x){this.appState===$.GAME&&(e&&e.total>=2?this.enqueueMessage({text:d.allGamesCompleted,attachments:zE(e)}):x&&this.enqueueMessage({text:`${d.gameEnded}(${S8(x)})`}),this._appState=$.NORMAL)}onCSAGameEnd(){this.appState===$.CSA_GAME&&(this._appState=$.NORMAL)}onFlipBoard(e){Te().boardFlipping!==e&&Te().flipBoard()}onSaveRecord(){const e=Te(),x=TE(this.recordManager.record.metadata,e.defaultRecordFileFormat),n=Ge(e.autoSaveDirectory,x);this.saveRecordByPath(n).catch(i=>{this.pushError(i)})}onBeepShort(){const e=Te();e.clockSoundTarget===ii.ONLY_USER&&!this.isMovableByUser||N6({frequency:e.clockPitch,volume:e.clockVolume})}onBeepUnlimited(){const e=Te();e.clockSoundTarget===ii.ONLY_USER&&!this.isMovableByUser||R6({frequency:e.clockPitch,volume:e.clockVolume})}doMove(e){if(this.appState!==$.NORMAL&&this.appState!==$.RESEARCH||!this.recordManager.appendMove({move:e}))return;const x=Te();To(x.pieceVolume)}onFinish(){this.appState===$.ANALYSIS&&(this._message.enqueue({text:"棋譜解析が終了しました。"}),this._appState=$.NORMAL)}startResearch(e){if(!(this.appState!==$.RESEARCH_DIALOG||this.isBussy)){if(this.retainBussyState(),!e.usi){this.pushError(new Error("エンジンが設定されていません。"));return}ce.saveResearchSetting(e).then(()=>this.researchManager.launch(e)).then(()=>{this._appState=$.RESEARCH,this.usiMonitor.clear(),this.onUpdatePosition();const x=Te();x.tab!==Oe.SEARCH&&x.tab!==Oe.PV&&x.tab!==Oe.CHART&&x.tab!==Oe.PERCENTAGE_CHART&&Te().updateAppSetting({tab:Oe.PV})}).catch(x=>{this.pushError("検討の初期化中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()})}}stopResearch(){this.appState===$.RESEARCH&&(this.researchManager.close(),this._appState=$.NORMAL)}onUpdateSearchInfo(e,x){this.recordManager.updateSearchInfo(e,x)}startAnalysis(e){this.appState!==$.ANALYSIS_DIALOG||this.isBussy||(this.retainBussyState(),ce.saveAnalysisSetting(e).then(()=>this.analysisManager.start(e)).then(()=>{this._appState=$.ANALYSIS,this.usiMonitor.clear()}).catch(x=>{this.pushError("検討の初期化中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()}))}stopAnalysis(){this.appState===$.ANALYSIS&&(this.analysisManager.close(),this._appState=$.NORMAL)}startMateSearch(e){if(!(this.appState!==$.MATE_SEARCH_DIALOG||this.isBussy)){if(this.retainBussyState(),!e.usi){this.pushError(new Error("エンジンが設定されていません。"));return}ce.saveMateSearchSetting(e).then(()=>this.mateSearchManager.start(e,this.recordManager.record)).then(()=>{this._appState=$.MATE_SEARCH,this.usiMonitor.clear();const x=Te();x.tab!==Oe.SEARCH&&x.tab!==Oe.PV&&Te().updateAppSetting({tab:Oe.SEARCH})}).catch(x=>{this.pushError("詰将棋探索の初期化中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()})}}stopMateSearch(){this.appState===$.MATE_SEARCH&&(this.mateSearchManager.close(),this._appState=$.NORMAL)}onCheckmate(e){if(this.appState!==$.MATE_SEARCH)return;this._appState=$.NORMAL;const x=this.recordManager.record.position;this.showConfirmation({message:d.mateInNPlyDoYouWantToDisplay(e.length),onOk:()=>{this.showPVPreviewDialog({position:x,mate:e.length,pv:e})}})}onNotImplemented(){this.appState===$.MATE_SEARCH&&(this.pushError(new Error(d.thisEngineNotSupportsMateSearch)),this._appState=$.NORMAL)}onNoMate(){this.appState===$.MATE_SEARCH&&(this.enqueueMessage({text:d.noMateFound}),this._appState=$.NORMAL)}onCheckmateError(e){this.appState===$.MATE_SEARCH&&(this.pushError(e),this._appState=$.NORMAL)}onUpdatePosition(){this.researchManager&&this.researchManager.updatePosition(this.recordManager.record)}resetRecord(){this.appState==$.NORMAL&&this.showConfirmation({message:d.areYouSureWantToClearRecord,onOk:()=>{this.recordManager.reset()}})}updateRecordComment(e){this.recordManager.updateComment(e)}updateRecordBookmark(e){this.recordManager.updateBookmark(e)}insertSpecialMove(e){this.appState!==$.NORMAL&&this.appState!==$.RESEARCH||this.recordManager.appendMove({move:e})}startPositionEditing(){this.appState===$.NORMAL&&this.showConfirmation({message:d.areYouSureWantToClearRecord,onOk:()=>{this._appState=$.POSITION_EDITING,this.recordManager.resetByCurrentPosition()}})}endPositionEditing(){this.appState===$.POSITION_EDITING&&(this._appState=$.NORMAL)}initializePosition(e){this.appState==$.POSITION_EDITING&&this.showConfirmation({message:d.areYouSureWantToDiscardPosition,onOk:()=>{this.recordManager.reset(e)}})}changeTurn(){this.appState==$.POSITION_EDITING&&this.recordManager.swapNextTurn()}editPosition(e){this.appState===$.POSITION_EDITING&&this.recordManager.changePosition(e)}changePly(e){(this.appState===$.NORMAL||this.appState===$.RESEARCH)&&this.recordManager.changePly(e)}changeBranch(e){(this.appState===$.NORMAL||this.appState===$.RESEARCH)&&this.recordManager.changeBranch(e)}swapWithNextBranch(){return this.recordManager.swapWithNextBranch()}swapWithPreviousBranch(){return this.recordManager.swapWithPreviousBranch()}removeCurrentMove(){if(!(this.appState!==$.NORMAL&&this.appState!==$.RESEARCH)){if(this.recordManager.record.current.isLastMove){this.recordManager.removeCurrentMove();return}this.showConfirmation({message:d.areYouSureWantToDeleteFollowingMove(this.recordManager.record.current.ply),onOk:()=>{this.recordManager.removeCurrentMove()}})}}jumpToBookmark(e){return this.appState===$.NORMAL||this.appState===$.RESEARCH?this.recordManager.jumpToBookmark(e):!1}copyRecordKIF(){const e=Te(),x=M8(this.recordManager.record,{returnCode:e.returnCode});navigator.clipboard.writeText(x)}copyRecordCSA(){const e=Te(),x=O8(this.recordManager.record,{returnCode:e.returnCode});navigator.clipboard.writeText(x)}copyRecordUSIBefore(){const e=this.recordManager.record.usi;navigator.clipboard.writeText(e)}copyRecordUSIAll(){const e=this.recordManager.record.usiAll;navigator.clipboard.writeText(e)}copyBoardSFEN(){const e=this.recordManager.record.sfen;navigator.clipboard.writeText(e)}pasteRecord(e){if(this.appState!==$.NORMAL)return;const x=this.recordManager.importRecord(e);if(x){this.pushError(x);return}}openRecord(e){if(this.appState!==$.NORMAL||this.isBussy){this.pushError(d.pleaseEndActiveFeaturesBeforeOpenRecord);return}this.retainBussyState(),Promise.resolve().then(()=>e||ce.showOpenRecordDialog()).then(x=>{if(!x)return;const i=Te().textDecodingRule==Ts.AUTO_DETECT;return ce.openRecord(x).then(s=>{const o=this.recordManager.importRecordFromBuffer(s,x,{autoDetect:i});return o&&Promise.reject(o)})}).catch(x=>{this.pushError("棋譜の読み込み中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()})}saveRecord(e){this.appState!==$.NORMAL||this.isBussy||(this.retainBussyState(),Promise.resolve().then(()=>{const x=this.recordManager.recordFilePath;if(e!=null&&e.overwrite&&x)return x;const n=Te(),i=x||TE(this.recordManager.record.metadata,n.defaultRecordFileFormat);return ce.showSaveRecordDialog(i)}).then(x=>{if(x)return this.saveRecordByPath(x,{detectGarbled:!0})}).catch(x=>{this.pushError(x)}).finally(()=>{this.releaseBussyState()}))}async saveRecordByPath(e,x){const n=Te(),i=this.recordManager.exportRecordAsBuffer(e,{returnCode:n.returnCode,detectGarbled:x==null?void 0:x.detectGarbled});if(i instanceof Error)throw i;try{await ce.saveRecord(e,i.data),i.garbled&&!this.garbledNotified&&(this.enqueueMessage({text:`${d.recordSavedWithGarbledCharacters} +${d.pleaseConsiderToUseKIFU} +${d.youCanChangeDefaultRecordFileFormatFromAppSettings}`}),this.garbledNotified=!0)}catch(s){throw new Error(`${d.failedToSaveRecord}: ${s}`)}}get isMovableByUser(){switch(this.appState){case $.NORMAL:case $.RESEARCH:return!0;case $.GAME:return(this.recordManager.record.position.color===L.BLACK?this.gameManager.setting.black.uri:this.gameManager.setting.white.uri)===V0;case $.CSA_GAME:return this.csaGameManager.isMyTurn&&this.csaGameManager.setting.player.uri===V0}return!1}}function $d(){return new Ud().reactive}let Mo;function $e(){return Mo||(Mo=$d()),Mo}var se=(t=>(t.BUSSY="bussy",t.ERROR="error",t.INFO="info",t.GAME="game",t.INTERNET="internet",t.STOP="stop",t.RESIGN="resign",t.RESEARCH="research",t.END="end",t.QUIZ="quiz",t.EDIT="edit",t.CHECK="check",t.SWAP="swap",t.SWAP_H="swap_h",t.SETTINGS="settings",t.ENGINE_SETTINGS="engineSettings",t.FLIP="flip",t.FILE="file",t.OPEN="open",t.SAVE="save",t.SAVE_AS="saveAs",t.PASTE="paste",t.COPY="copy",t.DELETE="delete",t.COMMENT="comment",t.BRAIN="brain",t.PV="pv",t.CHART="chart",t.PERCENT="percent",t.ARROW_DROP="arrowDrop",t.ARROW_UP="arrowUp",t.FIRST="first",t.BACK="back",t.NEXT="next",t.LAST="last",t.QUESTION="question",t.ANALYSIS="analysis",t.DESCRIPTION="description",t.PLAY="play",t.CLOSE="close",t.CALL="call",t.SCORE="score",t.GRID="grid",t.MATE_SEARCH="mateSearch",t.ADD="add",t.TREE="tree",t.NOTE="note",t))(se||{});const Q8={bussy:"icon/hourglass_empty_white_24dp.svg",error:"icon/error_outline_white_24dp.svg",info:"icon/info_white_24dp.svg",game:"icon/sports_esports_white_24dp.svg",internet:"icon/language_FILL0_wght400_GRAD0_opsz48.svg",stop:"icon/block_white_24dp.svg",resign:"icon/flag_white_24dp.svg",research:"icon/science_white_24dp.svg",end:"icon/do_disturb_on_white_24dp.svg",quiz:"icon/quiz_FILL0_wght400_GRAD0_opsz48.svg",edit:"icon/app_registration_white_24dp.svg",check:"icon/check_circle_white_24dp.svg",swap:"icon/swap_vert_white_24dp.svg",swap_h:"icon/swap_horiz_white_24dp.svg",settings:"icon/settings_white_24dp.svg",engineSettings:"icon/settings_input_component_white_24dp.svg",flip:"icon/flip_camera_android_white_24dp.svg",file:"icon/draft_FILL0_wght400_GRAD0_opsz48.svg",open:"icon/file_open_FILL0_wght400_GRAD0_opsz48.svg",save:"icon/save_FILL0_wght400_GRAD0_opsz48.svg",saveAs:"icon/save_as_FILL0_wght400_GRAD0_opsz48.svg",paste:"icon/content_paste_white_24dp.svg",copy:"icon/content_copy_white_24dp.svg",delete:"icon/backspace_white_24dp.svg",comment:"icon/edit_note_white_24dp.svg",brain:"icon/psychology_white_24dp.svg",pv:"icon/manage_search_FILL0_wght400_GRAD0_opsz48.svg",chart:"icon/show_chart_white_24dp.svg",percent:"icon/percent_white_24dp.svg",arrowDrop:"icon/arrow_drop_down_white_24dp.svg",arrowUp:"icon/arrow_drop_up_FILL0_wght400_GRAD0_opsz48.svg",first:"icon/first_page_white_24dp.svg",back:"icon/chevron_left_white_24dp.svg",next:"icon/chevron_right_white_24dp.svg",last:"icon/last_page_white_24dp.svg",question:"icon/help_white_24dp.svg",analysis:"icon/query_stats_white_24dp.svg",description:"icon/description_white_24dp.svg",play:"icon/play_arrow_FILL1_wght400_GRAD0_opsz48.svg",close:"icon/close_FILL0_wght400_GRAD0_opsz48.svg",call:"icon/record_voice_over_FILL0_wght400_GRAD0_opsz48.svg",score:"icon/scoreboard_FILL0_wght400_GRAD0_opsz48.svg",grid:"icon/grid_on_FILL0_wght400_GRAD0_opsz48.svg",mateSearch:"icon/psychology_alt_FILL0_wght400_GRAD0_opsz48.svg",add:"icon/add_circle_FILL0_wght400_GRAD0_opsz48.svg",tree:"icon/account_tree_FILL0_wght400_GRAD0_opsz48.svg",note:"icon/note_alt_FILL0_wght400_GRAD0_opsz48.svg"};Object.values(Q8).forEach(t=>{jx(t)});const Gd=["src"],re=ke({__name:"Icon",props:{icon:{type:String,required:!0}},setup(t){return(e,x)=>(S(),k("img",{class:"icon",src:A(Q8)[t.icon],draggable:"false"},null,8,Gd))}});function pt(t,e){t.addEventListener("cancel",x=>{x.preventDefault(),x.stopPropagation(),e&&e()}),t.addEventListener("copy",x=>{x.stopPropagation()}),t.addEventListener("paste",x=>{x.stopPropagation()}),t.showModal()}const Wd={class:"groups"},zd={class:"group"},Vd={class:"label"},Kd={class:"group"},jd={class:"label"},qd={class:"label"},Yd=ke({__name:"GameMenu",emits:["close"],setup(t,{emit:e}){const x=$e(),n=O(),i=()=>{e("close")};qe(()=>{pt(n.value,i)});const s=()=>{x.showGameDialog(),e("close")},o=()=>{x.showCSAGameDialog(),e("close")};return(r,a)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:n,class:"menu"},[c("div",Wd,[c("div",zd,[c("button",{class:"close",onClick:i},[R(re,{icon:A(se).CLOSE},null,8,["icon"]),c("div",Vd,m(A(d).back),1)])]),c("div",Kd,[c("button",{onClick:s},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",jd,m(A(d).offlineGame),1)]),c("button",{onClick:o},[R(re,{icon:A(se).INTERNET},null,8,["icon"]),c("div",qd,m(A(d).csaOnlineGame),1)])])])],512)]))}}),Jd={class:"groups"},Xd={class:"group"},Zd={class:"label"},Qd={class:"group"},e3=["disabled"],t3={class:"label"},x3=["disabled"],n3={class:"label"},i3=["disabled"],s3={class:"label"},o3=["disabled"],r3={class:"label"},a3=["disabled"],E3={class:"label"},l3={class:"group"},c3={class:"label"},u3={class:"label"},A3={class:"label"},h3={class:"label"},B3=["disabled"],d3={class:"label"},f3=ke({__name:"FileMenu",emits:["close"],setup(t,{emit:e}){const x=$e(),n=O(),i=()=>{e("close")};qe(()=>{pt(n.value,i)});const s=()=>{x.resetRecord(),e("close")},o=()=>{x.openRecord(),e("close")},r=()=>{x.saveRecord({overwrite:!0}),e("close")},a=()=>{x.saveRecord(),e("close")},E=()=>{x.showExportBoardImageDialog(),e("close")},l=()=>{x.copyRecordKIF(),e("close")},u=()=>{x.copyRecordCSA(),e("close")},h=()=>{x.copyRecordUSIAll(),e("close")},B=()=>{x.copyBoardSFEN(),e("close")},p=()=>{x.showPasteDialog(),e("close")},f=me(()=>({newFile:x.appState===$.NORMAL,open:x.appState===$.NORMAL,save:x.appState===$.NORMAL,saveAs:x.appState===$.NORMAL,exportImage:x.appState===$.NORMAL,paste:x.appState===$.NORMAL}));return(g,C)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:n,class:"menu"},[c("div",Jd,[c("div",Xd,[c("button",{class:"close",onClick:i},[R(re,{icon:A(se).CLOSE},null,8,["icon"]),c("div",Zd,m(A(d).back),1)])]),c("div",Qd,[c("button",{disabled:!f.value.newFile,onClick:s},[R(re,{icon:A(se).FILE},null,8,["icon"]),c("div",t3,m(A(d).clear),1)],8,e3),c("button",{disabled:!f.value.open,onClick:o},[R(re,{icon:A(se).OPEN},null,8,["icon"]),c("div",n3,m(A(d).open),1)],8,x3),c("button",{disabled:!f.value.save,onClick:r},[R(re,{icon:A(se).SAVE},null,8,["icon"]),c("div",s3,m(A(d).saveOverwrite),1)],8,i3),c("button",{disabled:!f.value.saveAs,onClick:a},[R(re,{icon:A(se).SAVE_AS},null,8,["icon"]),c("div",r3,m(A(d).saveAs),1)],8,o3),c("button",{disabled:!f.value.exportImage,onClick:E},[R(re,{icon:A(se).GRID},null,8,["icon"]),c("div",E3,m(A(d).positionImage),1)],8,a3)]),c("div",l3,[c("button",{onClick:l},[R(re,{icon:A(se).COPY},null,8,["icon"]),c("div",c3,m(A(d).copyAsKIF),1)]),c("button",{onClick:u},[R(re,{icon:A(se).COPY},null,8,["icon"]),c("div",u3,m(A(d).copyAsCSA),1)]),c("button",{onClick:h},[R(re,{icon:A(se).COPY},null,8,["icon"]),c("div",A3,m(A(d).copyAsUSI),1)]),c("button",{onClick:B},[R(re,{icon:A(se).COPY},null,8,["icon"]),c("div",h3,m(A(d).copyAsSFEN),1)]),c("button",{disabled:!f.value.paste,onClick:p},[R(re,{icon:A(se).PASTE},null,8,["icon"]),c("div",d3,m(A(d).paste),1)],8,B3)])])],512)]))}}),p3={class:"groups"},g3={class:"group"},m3={class:"label"},C3={class:"group"},F3={class:"label"},D3={class:"label"},_3={class:"label"},v3={class:"label"},b3={class:"label"},y3={class:"label"},S3={class:"label"},w3={class:"label"},T3={class:"label"},I3={class:"label"},P3={class:"label"},k3={class:"label"},M3={class:"label"},N3=ke({__name:"InitialPositionMenu",emits:["close"],setup(t,{emit:e}){const x=$e(),n=O(),i=()=>{e("close")};qe(()=>{pt(n.value,i)});const s=()=>{x.initializePosition(he.STANDARD),e("close")},o=()=>{x.initializePosition(he.HANDICAP_LANCE),e("close")},r=()=>{x.initializePosition(he.HANDICAP_RIGHT_LANCE),e("close")},a=()=>{x.initializePosition(he.HANDICAP_BISHOP),e("close")},E=()=>{x.initializePosition(he.HANDICAP_ROOK),e("close")},l=()=>{x.initializePosition(he.HANDICAP_ROOK_LANCE),e("close")},u=()=>{x.initializePosition(he.HANDICAP_2PIECES),e("close")},h=()=>{x.initializePosition(he.HANDICAP_4PIECES),e("close")},B=()=>{x.initializePosition(he.HANDICAP_6PIECES),e("close")},p=()=>{x.initializePosition(he.HANDICAP_8PIECES),e("close")},f=()=>{x.initializePosition(he.HANDICAP_10PIECES),e("close")},g=()=>{x.initializePosition(he.TSUME_SHOGI),e("close")},C=()=>{x.initializePosition(he.TSUME_SHOGI_2KINGS),e("close")};return(w,M)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:n,class:"menu"},[c("div",p3,[c("div",g3,[c("button",{class:"close",onClick:i},[R(re,{icon:A(se).CLOSE},null,8,["icon"]),c("div",m3,m(A(d).back),1)])]),c("div",C3,[c("button",{onClick:s},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",F3,m(A(d).nonHandicap),1)]),c("button",{onClick:o},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",D3,m(A(d).lanceHandicap),1)]),c("button",{onClick:r},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",_3,m(A(d).rightLanceHandicap),1)]),c("button",{onClick:a},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",v3,m(A(d).bishopHandicap),1)]),c("button",{onClick:E},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",b3,m(A(d).rookHandicap),1)]),c("button",{onClick:l},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",y3,m(A(d).rookLanceHandicap),1)]),c("button",{onClick:u},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",S3,m(A(d).twoPiecesHandicap),1)]),c("button",{onClick:h},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",w3,m(A(d).fourPiecesHandicap),1)]),c("button",{onClick:B},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",T3,m(A(d).sixPiecesHandicap),1)]),c("button",{onClick:p},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",I3,m(A(d).eightPiecesHandicap),1)]),c("button",{onClick:f},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("div",P3,m(A(d).tenPiecesHandicap),1)]),c("button",{onClick:g},[R(re,{icon:A(se).QUIZ},null,8,["icon"]),c("div",k3,m(A(d).tsumeShogi),1)]),c("button",{onClick:C},[R(re,{icon:A(se).QUIZ},null,8,["icon"]),c("div",M3,m(A(d).doubleKingTsumeShogi),1)])])])],512)]))}});class fr{constructor(e){this.children=[],this.parent=e}delete(e){const x=this.children.indexOf(e);return x===-1?!1:(this.children=this.children.slice(0,x).concat(this.children.slice(x+1)),this.children.length===0&&this.parent.delete(this),!0)}add(e){return this.children.push(e),this}}class Ns{constructor(e){this.parent=null,this.children={},this.parent=e||null}get(e){return this.children[e]}insert(e){let x=this;for(let n=0;ni.filter(s=>s!=="")).filter(i=>i.length>0)}function VE(t){const{ctrlKey:e,altKey:x,metaKey:n,key:i}=t,s=[],o=[e,x,n,L3(t)];for(const[r,a]of o.entries())a&&s.push(KE[r]);return KE.includes(i)||s.push(i),s.join("+")}const KE=["Control","Alt","Meta","Shift"];function L3(t){const{shiftKey:e,code:x,key:n}=t;return e&&!(x.startsWith("Key")&&n.toUpperCase()===n)}const si=new Ns,e9=new WeakMap;let gr=si,ss=null,mr=[];function No(){mr=[],ss=null,gr=si}function t9(t){if(t.defaultPrevented||!(t.target instanceof Node))return;if(pr(t.target)){const x=t.target;if(!x.id||!x.ownerDocument.querySelector(`[data-hotkey-scope="${x.id}"]`))return}ss!=null&&window.clearTimeout(ss),ss=window.setTimeout(No,1500);const e=gr.get(VE(t));if(!e){No();return}if(mr.push(VE(t)),gr=e,e instanceof fr){const x=t.target;let n=!1,i;const s=pr(x);for(let o=e.children.length-1;o>=0;o-=1){i=e.children[o];const r=i.getAttribute("data-hotkey-scope");if(!s&&!r||s&&x.id===r){n=!0;break}}i&&n&&(R3(i,mr),t.preventDefault()),No()}}function H3(t,e){Object.keys(si.children).length===0&&document.addEventListener("keydown",t9);const n=O3(e||t.getAttribute("data-hotkey")||"").map(i=>si.insert(i).add(t));e9.set(t,n)}function U3(t){const e=e9.get(t);if(e&&e.length)for(const x of e)x&&x.delete(t);Object.keys(si.children).length===0&&document.removeEventListener("keydown",t9)}function Rs(t){for(const e of t.querySelectorAll("[data-hotkey]"))H3(e)}function Os(t){for(const e of t.querySelectorAll("[data-hotkey]"))U3(e)}const xn=[],Qt=[];function Sn(t){Qt.length===0&&Rs(t),xn.push(t)}function wn(t){Qt.length===0&&Os(t);for(let e=0;e{Sn(i.value),Sn(s.value)}),Bn(()=>{Sn(i.value),Sn(s.value)}),Xc(()=>{wn(i.value),wn(s.value)}),_t(()=>{wn(i.value),wn(s.value)});const E=we=>{e("resize",we)},l=we=>{x.appState===$.GAME||x.appState===$.CSA_GAME?tn.doMove(we):x.doMove(we)},u=we=>{x.editPosition(we)},h=()=>{o.value=!0},B=()=>{x.showGameResults()},p=()=>{x.stopGame()},f=()=>{tn.win()},g=()=>{tn.resign()},C=()=>{x.showResearchDialog()},w=()=>{x.stopResearch()},M=()=>{x.showAnalysisDialog()},_=()=>{x.stopAnalysis()},I=()=>{x.showMateSearchDialog()},D=()=>{x.stopMateSearch()},P=()=>{x.startPositionEditing()},y=()=>{x.endPositionEditing()},T=()=>{a.value=!0},N=()=>{x.changeTurn()},G=()=>{x.showAppSettingDialog()},W=()=>{x.showUsiEngineManagementDialog()},Ae=()=>{n.flipBoard()},Q=()=>{r.value=!0},ne=()=>{x.removeCurrentMove()},te=me(()=>{const we=x.record.current.move;return we instanceof Ze?we:void 0}),Z=me(()=>ro(x.record.metadata)||d.sente),K=me(()=>ao(x.record.metadata)||d.gote),J=me(()=>{if(x.appState===$.GAME||x.csaGameState===r0.GAME)return{black:{time:x.blackTime,byoyomi:x.blackByoyomi},white:{time:x.whiteTime,byoyomi:x.whiteByoyomi}}}),ue=me(()=>({game:x.appState===$.NORMAL,showGameResults:x.appState===$.GAME&&x.gameSetting.repeat>=2,stop:x.appState===$.GAME||x.appState===$.CSA_GAME,win:x.appState===$.CSA_GAME&&x.isMovableByUser,resign:(x.appState===$.GAME||x.appState===$.CSA_GAME)&&x.isMovableByUser,research:x.appState===$.NORMAL,endResearch:x.appState===$.RESEARCH,analysis:x.appState===$.NORMAL,endAnalysis:x.appState===$.ANALYSIS,mateSearch:x.appState===$.NORMAL,stopMateSearch:x.appState===$.MATE_SEARCH,startEditPosition:x.appState===$.NORMAL,endEditPosition:x.appState===$.POSITION_EDITING,initPosition:x.appState===$.POSITION_EDITING,removeCurrentMove:x.appState===$.NORMAL||x.appState===$.RESEARCH,engineSettings:x.appState===$.NORMAL}));return(we,Fe)=>{var Je,ot,tt,ze;return S(),k("div",null,[R(aa,{"board-image-type":A(n).boardImage,"piece-stand-image-type":A(n).pieceStandImage,"board-label-type":A(n).boardLabelType,"piece-image-base-url":A(ra)(A(n)),"custom-board-image-url":A(n).boardImageFileURL,"custom-piece-stand-image-url":A(n).pieceStandImageFileURL,"max-size":t.maxSize,position:A(x).record.position,"last-move":te.value,flip:A(n).boardFlipping,"allow-move":A(x).isMovableByUser,"allow-edit":A(x).appState===A($).POSITION_EDITING,"black-player-name":Z.value,"white-player-name":K.value,"black-player-time":(Je=J.value)==null?void 0:Je.black.time,"black-player-byoyomi":(ot=J.value)==null?void 0:ot.black.byoyomi,"white-player-time":(tt=J.value)==null?void 0:tt.white.time,"white-player-byoyomi":(ze=J.value)==null?void 0:ze.white.byoyomi,"next-move-label":A(d).nextTurn,onResize:E,onMove:l,onEdit:u},{"right-control":u0(()=>[c("div",{ref_key:"rightControl",ref:i,class:Ke(["full column top-control",{hidden:A(n).rightSideControlType===A($n).NONE}])},[ue.value.game?(S(),k("button",{key:0,class:"control-item",onClick:h},[R(re,{icon:A(se).GAME},null,8,["icon"]),c("span",null,m(A(d).game),1)])):ee("",!0),ue.value.showGameResults?(S(),k("button",{key:1,class:"control-item",onClick:B},[R(re,{icon:A(se).SCORE},null,8,["icon"]),c("span",null,m(A(d).displayGameResults),1)])):ee("",!0),ue.value.stop?(S(),k("button",{key:2,class:"control-item","data-hotkey":"Escape",onClick:p},[R(re,{icon:A(se).STOP},null,8,["icon"]),c("span",null,m(A(d).stopGame),1)])):ee("",!0),ue.value.win?(S(),k("button",{key:3,class:"control-item",onClick:f},[R(re,{icon:A(se).CALL},null,8,["icon"]),c("span",null,m(A(d).declareWinning),1)])):ee("",!0),ue.value.resign?(S(),k("button",{key:4,class:"control-item",onClick:g},[R(re,{icon:A(se).RESIGN},null,8,["icon"]),c("span",null,m(A(d).resign),1)])):ee("",!0),ue.value.research?(S(),k("button",{key:5,class:"control-item","data-hotkey":"Control+r",onClick:C},[R(re,{icon:A(se).RESEARCH},null,8,["icon"]),c("span",null,m(A(d).research),1)])):ee("",!0),ue.value.endResearch?(S(),k("button",{key:6,class:"control-item","data-hotkey":"Escape",onClick:w},[R(re,{icon:A(se).END},null,8,["icon"]),c("span",null,m(A(d).endResearch),1)])):ee("",!0),ue.value.analysis?(S(),k("button",{key:7,class:"control-item","data-hotkey":"Control+a",onClick:M},[R(re,{icon:A(se).ANALYSIS},null,8,["icon"]),c("span",null,m(A(d).analysis),1)])):ee("",!0),ue.value.endAnalysis?(S(),k("button",{key:8,class:"control-item","data-hotkey":"Escape",onClick:_},[R(re,{icon:A(se).STOP},null,8,["icon"]),c("span",null,m(A(d).stopAnalysis),1)])):ee("",!0),ue.value.mateSearch?(S(),k("button",{key:9,class:"control-item","data-hotkey":"Control+m",onClick:I},[R(re,{icon:A(se).MATE_SEARCH},null,8,["icon"]),c("span",null,m(A(d).mateSearch),1)])):ee("",!0),ue.value.stopMateSearch?(S(),k("button",{key:10,class:"control-item","data-hotkey":"Escape",onClick:D},[R(re,{icon:A(se).END},null,8,["icon"]),c("span",null,m(A(d).stopMateSearch),1)])):ee("",!0),ue.value.startEditPosition?(S(),k("button",{key:11,class:"control-item",onClick:P},[R(re,{icon:A(se).EDIT},null,8,["icon"]),c("span",null,m(A(d).setupPosition),1)])):ee("",!0),ue.value.endEditPosition?(S(),k("button",{key:12,class:"control-item",onClick:y},[R(re,{icon:A(se).CHECK},null,8,["icon"]),c("span",null,m(A(d).completePositionSetup),1)])):ee("",!0),ue.value.initPosition?(S(),k("button",{key:13,class:"control-item",onClick:N},[R(re,{icon:A(se).SWAP},null,8,["icon"]),c("span",null,m(A(d).changeTurn),1)])):ee("",!0),ue.value.initPosition?(S(),k("button",{key:14,class:"control-item",onClick:T},[c("span",null,m(A(d).initializePosition),1)])):ee("",!0)],2)]),"left-control":u0(()=>[c("div",{ref_key:"leftControl",ref:s,class:Ke(["full column reverse bottom-control",{hidden:A(n).leftSideControlType===A(Un).NONE}])},[c("button",{class:"control-item","data-hotkey":"Control+,",onClick:G},[R(re,{icon:A(se).SETTINGS},null,8,["icon"]),c("span",null,m(A(d).appSettings),1)]),c("button",{class:"control-item","data-hotkey":"Control+.",disabled:!ue.value.engineSettings,onClick:W},[R(re,{icon:A(se).ENGINE_SETTINGS},null,8,["icon"]),c("span",null,m(A(d).engineSettings),1)],8,$3),c("button",{class:"control-item","data-hotkey":"Control+t",onClick:Ae},[R(re,{icon:A(se).FLIP},null,8,["icon"]),c("span",null,m(A(d).flipBoard),1)]),c("button",{class:"control-item",onClick:Q},[R(re,{icon:A(se).FILE},null,8,["icon"]),c("span",null,m(A(d).file),1)]),c("button",{class:"control-item","data-hotkey":"Control+d",disabled:!ue.value.removeCurrentMove,onClick:ne},[R(re,{icon:A(se).DELETE},null,8,["icon"]),c("span",null,m(A(d).deleteMove),1)],8,G3)],2)]),_:1},8,["board-image-type","piece-stand-image-type","board-label-type","piece-image-base-url","custom-board-image-url","custom-piece-stand-image-url","max-size","position","last-move","flip","allow-move","allow-edit","black-player-name","white-player-name","black-player-time","black-player-byoyomi","white-player-time","white-player-byoyomi","next-move-label"]),o.value?(S(),Me(Yd,{key:0,onClose:Fe[0]||(Fe[0]=Bt=>o.value=!1)})):ee("",!0),r.value?(S(),Me(f3,{key:1,onClose:Fe[1]||(Fe[1]=Bt=>r.value=!1)})):ee("",!0),a.value?(S(),Me(N3,{key:2,onClose:Fe[2]||(Fe[2]=Bt=>a.value=!1)})):ee("",!0)])}}});const z3=Ue(W3,[["__scopeId","data-v-6176a2f4"]]);let jE=0;function x9(){return jE++,`es:incremental:${jE}`}const V3={style:{display:"inline-block"}},K3={class:"container"},j3=["id","checked"],q3=["for"],Y3=ke({__name:"ToggleButton",props:{value:{type:Boolean,required:!0},label:{type:String,default:""},height:{type:Number,default:20}},emits:["change"],setup(t,{emit:e}){const x=t,n=x9(),i=me(()=>({height:`${x.height}px`,width:`${x.height*2}px`})),s=me(()=>({borderRadius:`${x.height*.5}px`})),o=me(()=>({height:`${x.height}px`,width:`${x.height}px`})),r=me(()=>({fontSize:`${x.height*.7}px`,lineHeight:`${x.height}px`})),a=E=>{const l=E.target;e("change",l.checked)};return(E,l)=>(S(),k("div",V3,[c("div",K3,[c("div",{class:"toggle",style:de(i.value)},[c("input",{id:A(n),type:"checkbox",checked:t.value,onChange:a},null,40,j3),c("div",{class:"slider",style:de(s.value)},null,4),c("div",{class:"knob",style:de(o.value)},null,4)],4),c("div",null,[c("label",{for:A(n),style:de(r.value)},m(t.label),13,q3)])])]))}});const et=Ue(Y3,[["__scopeId","data-v-32abf837"]]),J3={class:"full column record-view"},X3={class:"row control"},Z3=["disabled"],Q3=["disabled"],e4=["disabled"],t4=["disabled"],x4=["value","onClick"],n4={class:"move-number"},i4={class:"move-text"},s4={key:0,class:"move-time"},o4={key:1,class:"move-comment"},r4={key:0,class:"bookmark"},a4={class:"auto row branch-list-area"},E4=["value","onClick"],l4={class:"move-text"},c4={key:0,class:"move-comment"},u4={key:0,class:"bookmark"},A4={class:"column branch-list-control"},h4=["disabled"],B4=["disabled"],d4={class:"row wrap options"},f4={class:"option"},p4={class:"option"},g4=ke({__name:"RecordView",props:{record:{type:Object,required:!0},operational:{type:Boolean,required:!1},showElapsedTime:{type:Boolean,required:!1},showComment:{type:Boolean,required:!1},elapsedTimeToggleLabel:{type:String,required:!0},commentToggleLabel:{type:String,required:!0}},emits:["goBegin","goBack","goForward","goEnd","selectMove","selectBranch","swapWithPreviousBranch","swapWithNextBranch","toggleShowElapsedTime","toggleShowComment"],setup(t,{emit:e}){const x=t,n=O(null),i=O(),s=()=>{x.operational&&e("goBegin")},o=()=>{x.operational&&e("goBack")},r=()=>{x.operational&&e("goForward")},a=()=>{x.operational&&e("goEnd")},E=f=>{x.operational&&e("selectMove",Number(f))},l=f=>{x.operational&&e("selectBranch",Number(f))},u=()=>{x.operational&&e("swapWithPreviousBranch")},h=()=>{x.operational&&e("swapWithNextBranch")},B=me(()=>{const f=[];return x.record.moves.forEach(g=>{f.push({number:g.ply,text:g.displayText,time:g.ply!=0?g.timeText:"",hasBranch:g.hasBranch,bookmark:g.bookmark,comment:g.comment,selected:g===x.record.current})}),f}),p=me(()=>{if(!x.record.branchBegin.branch)return null;const f=[];let g;for(g=x.record.branchBegin;g&&g.move;g=g.branch)f.push({index:f.length,text:g.displayText,bookmark:g.bookmark,comment:g.comment,selected:g.activeBranch});return f});return Bn(()=>{n.value.childNodes.forEach(C=>{C instanceof HTMLElement&&C.classList.contains("selected")&&C.scrollIntoView({behavior:"auto",block:"nearest"})}),i.value.childNodes.forEach(C=>{C instanceof HTMLElement&&C.classList.contains("selected")&&C.scrollIntoView({behavior:"auto",block:"nearest"})})}),(f,g)=>(S(),k("div",J3,[c("div",X3,[c("button",{disabled:!t.operational,"data-hotkey":"ArrowLeft",onClick:s},[R(re,{icon:A(se).FIRST},null,8,["icon"])],8,Z3),c("button",{disabled:!t.operational,"data-hotkey":"ArrowUp",onClick:g[0]||(g[0]=C=>o())},[R(re,{icon:A(se).BACK},null,8,["icon"])],8,Q3),c("button",{disabled:!t.operational,"data-hotkey":"ArrowDown",onClick:r},[R(re,{icon:A(se).NEXT},null,8,["icon"])],8,e4),c("button",{disabled:!t.operational,"data-hotkey":"ArrowRight",onClick:a},[R(re,{icon:A(se).LAST},null,8,["icon"])],8,t4)]),c("div",{ref_key:"moveList",ref:n,class:"move-list"},[(S(!0),k(De,null,Ne(B.value,C=>(S(),k("div",{key:C.number,class:Ke(["row move-element",{"has-branch":C.hasBranch,selected:C.selected}]),value:C.number,onClick:w=>E(C.number)},[c("div",n4,m(C.number!==0?C.number:""),1),c("div",i4,m(C.text),1),t.showElapsedTime?(S(),k("div",s4,m(C.time),1)):ee("",!0),t.showComment?(S(),k("div",o4,[C.bookmark?(S(),k("span",r4,m(C.bookmark),1)):ee("",!0),rx(" "+m(C.comment),1)])):ee("",!0)],10,x4))),128))],512),c("div",a4,[c("div",{ref_key:"branchList",ref:i,class:"auto branch-list"},[(S(!0),k(De,null,Ne(p.value,C=>(S(),k("div",{key:C.index,class:Ke(["row move-element",{selected:C.selected}]),value:C.index,onClick:w=>l(C.index)},[c("div",l4,m(C.text),1),t.showComment?(S(),k("div",c4,[C.bookmark?(S(),k("span",u4,m(C.bookmark),1)):ee("",!0),rx(" "+m(C.comment),1)])):ee("",!0)],10,E4))),128))],512),c("div",A4,[c("button",{disabled:!t.operational,onClick:g[1]||(g[1]=C=>u())},[R(re,{icon:A(se).ARROW_UP},null,8,["icon"])],8,h4),c("button",{disabled:!t.operational,onClick:g[2]||(g[2]=C=>h())},[R(re,{icon:A(se).ARROW_DROP},null,8,["icon"])],8,B4)])]),c("div",d4,[c("div",f4,[R(et,{label:t.elapsedTimeToggleLabel,value:t.showElapsedTime,onChange:g[3]||(g[3]=C=>e("toggleShowElapsedTime",C))},null,8,["label","value"])]),c("div",p4,[R(et,{label:t.commentToggleLabel,value:t.showComment,onChange:g[4]||(g[4]=C=>e("toggleShowComment",C))},null,8,["label","value"])])])]))}});const m4=Ue(g4,[["__scopeId","data-v-84a49c2b"]]),C4={class:"auto record"},F4=200,D4=ke({__name:"RecordPane",setup(t){const e=$e(),x=Te(),n=O();qe(()=>{Sn(n.value)}),hi(()=>{wn(n.value)});const i=g=>{e.changePly(g)},s=()=>{i(0)},o=()=>{i(e.record.current.ply-1)},r=()=>{i(e.record.current.ply+1)},a=()=>{i(Number.MAX_SAFE_INTEGER)},E=g=>{i(g)},l=g=>{e.changeBranch(g)},u=()=>{e.swapWithPreviousBranch()},h=()=>{e.swapWithNextBranch()},B=g=>{x.updateAppSetting({showElapsedTimeInRecordView:g})},p=g=>{x.updateAppSetting({showCommentInRecordView:g})},f=me(()=>e.appState===$.NORMAL||e.appState===$.RESEARCH);return(g,C)=>(S(),k("div",{ref_key:"root",ref:n,class:"full column record-pane"},[c("div",C4,[R(m4,{record:A(e).record,operational:f.value,"show-comment":A(x).showCommentInRecordView,"show-elapsed-time":A(x).showElapsedTimeInRecordView,"elapsed-time-toggle-label":A(d).elapsedTime,"comment-toggle-label":A(d).commentsAndBookmarks,onGoBegin:s,onGoBack:o,onGoForward:r,onGoEnd:a,onSelectMove:E,onSelectBranch:l,onSwapWithPreviousBranch:u,onSwapWithNextBranch:h,onToggleShowElapsedTime:B,onToggleShowComment:p},null,8,["record","operational","show-comment","show-elapsed-time","elapsed-time-toggle-label","comment-toggle-label"])])],512))}});const _4=Ue(D4,[["__scopeId","data-v-1648cb4c"]]),v4={class:"title"},b4=["disabled","onClick"],y4={class:"main-buttons"},S4=ke({__name:"BookmarkListDialog",emits:["close"],setup(t,{emit:e}){const x=$e(),n=O(),i=x.record.bookmarks,s=me(()=>x.appState!==$.NORMAL&&x.appState!==$.RESEARCH);qe(()=>{pt(n.value),Ot(n.value)}),_t(()=>{Lt(n.value)});const o=()=>{e("close")},r=a=>{o(),x.jumpToBookmark(a)};return(a,E)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:n},[c("div",v4,m(A(d).bookmarkList),1),c("div",null,[(S(!0),k(De,null,Ne(A(i),l=>(S(),k("div",{key:l,class:"bookmark"},[c("button",{disabled:s.value,onClick:u=>r(l)},m(l),9,b4)]))),128))]),c("div",y4,[c("button",{autofocus:"","data-hotkey":"Escape",onClick:E[0]||(E[0]=l=>o())},m(A(d).close),1)])],512)]))}});const w4=Ue(S4,[["__scopeId","data-v-daf4d00a"]]),T4={class:"full column root"},I4=["value","readonly"],P4={key:0,class:"row play-buttons"},k4=["onClick"],M4={class:"bookmark-area"},N4=["value","readonly","placeholder"],R4=ke({__name:"RecordComment",setup(t){const e=$e(),x=me(()=>e.appState!=$.NORMAL&&e.appState!=$.RESEARCH),n=O(),i=me(()=>e.record.current.comment),s=me(()=>e.inCommentPVs),o=me(()=>e.record.current.bookmark),r=O(!1),a=h=>{const B=h.target.value;e.updateRecordComment(B)},E=h=>{const B=h.target.value;e.updateRecordBookmark(B)},l=()=>{r.value=!0},u=h=>{e.showPVPreviewDialog({position:e.record.position,pv:h})};return qe(()=>{n.value.addEventListener("copy",h=>{h.stopPropagation()}),n.value.addEventListener("paste",h=>{h.stopPropagation()})}),(h,B)=>(S(),k("div",null,[c("div",T4,[c("textarea",{ref_key:"textarea",ref:n,class:"auto text",value:i.value,readonly:x.value,onInput:a},null,40,I4),s.value.length!==0?(S(),k("div",P4,[(S(!0),k(De,null,Ne(s.value,(p,f)=>(S(),k("button",{key:f,class:"play",onClick:g=>u(p)},[R(re,{icon:A(se).PLAY},null,8,["icon"]),c("span",null,m(A(d).pv)+m(s.value.length>=2?" "+(f+1):""),1)],8,k4))),128))])):ee("",!0),c("div",M4,[c("input",{type:"text",class:"bookmark",value:o.value,readonly:x.value,placeholder:A(d).bookmark,onInput:E},null,40,N4),c("button",{class:"list",onClick:l},[c("span",null,m(A(d).bookmarkList),1)])])]),r.value?(S(),Me(w4,{key:0,onClose:B[0]||(B[0]=p=>r.value=!1)})):ee("",!0)]))}});const O4=Ue(R4,[["__scopeId","data-v-82cfd0f8"]]),L4=t=>(Qs("data-v-50ccf2a4"),t=t(),eo(),t),H4={class:"full column root"},U4={class:"row headers"},$4={class:"header"},G4={class:"label"},W4={class:"value"},z4={class:"header"},V4={class:"label"},K4={class:"value"},j4={class:"header"},q4={class:"label"},Y4={class:"value"},J4={class:"header"},X4=L4(()=>c("span",{class:"label"},"NPS: ",-1)),Z4={class:"value"},Q4={class:"header"},ef={class:"label"},tf={class:"value"},xf={class:"header"},nf={class:"label"},sf={class:"value"},of={class:"row list-header"},rf={class:"list-column time"},af={class:"list-column multipv-index"},Ef={class:"list-column depth"},lf={class:"list-column nodes"},cf={class:"list-column score"},uf={class:"list-column time"},Af={class:"list-column multipv-index"},hf={class:"list-column depth"},Bf={class:"list-column nodes"},df={class:"list-column score"},ff={class:"list-column score-flag"},pf={class:"grow list-column text"},gf=["onClick"],mf=ke({__name:"EngineAnalyticsElement",props:{historyMode:{type:Boolean,required:!0},name:{type:String,required:!0},info:{type:X8,required:!0},height:{type:Number,required:!0}},setup(t){const e=t,x=me(()=>{if(!e.historyMode)return!1;for(const o of e.info.iterates)if(o.multiPV&&o.multiPV!==1)return!0;return!1}),n=me(()=>Te().evaluationViewFrom),i=(o,r,a)=>a===ni.EACH||r==L.BLACK?o:-o,s=o=>{const r=kt.newBySFEN(o.position);if(!r)return;const a=r.clone(),E=[];for(const l of o.pv||[]){const u=a.createMoveByUSI(l);if(!u||!a.doMove(u))break;E.push(u)}$e().showPVPreviewDialog({position:r,multiPV:o.multiPV,depth:o.depth,selectiveDepth:o.selectiveDepth,score:o.score,mate:o.scoreMate,lowerBound:o.lowerBound,upperBound:o.upperBound,pv:E})};return(o,r)=>(S(),k("div",null,[c("div",H4,[c("div",U4,[c("div",$4,[c("span",G4,m(A(d).name)+": ",1),c("span",W4,m(t.name),1)]),c("div",z4,[c("span",V4,m(A(d).prediction)+": ",1),c("span",K4,m(t.info.ponderMove?t.info.ponderMove:"---"),1)]),c("div",j4,[c("span",q4,m(A(d).best)+": ",1),c("span",Y4,m(t.info.currentMoveText||"---"),1)]),c("div",J4,[X4,c("span",Z4,m(t.info.nps||"---"),1)]),c("div",Q4,[c("span",ef,m(A(d).nodes)+": ",1),c("span",tf,m(t.info.nodes||"---"),1)]),c("div",xf,[c("span",nf,m(A(d).hashUsage)+": ",1),c("span",sf,m(t.info.hashfull?(t.info.hashfull*100).toFixed(1):"---")+" % ",1)])]),c("div",of,[c("div",rf,m(A(d).elapsed),1),c("div",af,m(A(d).rank),1),c("div",Ef,m(A(d).depth),1),c("div",lf,m(A(d).nodes),1),c("div",cf,m(A(d).eval),1)]),c("div",{class:"list",style:de({height:`${t.height-37}px`})},[(S(!0),k(De,null,Ne(t.historyMode?t.info.iterates:t.info.latestIteration,(a,E)=>(S(),k("div",{key:E,class:Ke(["row list-item",{highlight:x.value&&a.multiPV===1}])},[c("div",uf,m(a.timeMs?(a.timeMs/1e3).toFixed(1)+"s":""),1),c("div",Af,m(a.multiPV||""),1),c("div",hf,m(a.depth)+m(a.selectiveDepth&&a.depth?"/":"")+m(a.selectiveDepth),1),c("div",Bf,m(a.nodes),1),c("div",df,m(a.scoreMate?i(a.scoreMate,a.color,n.value):a.score?i(a.score,a.color,n.value):""),1),c("div",ff,m(a.lowerBound?"++":"")+" "+m(a.upperBound?"--":"")+" "+m(a.scoreMate?A(d).mateShort:""),1),c("div",pf,[a.pv&&a.pv.length!==0&&a.text?(S(),k("button",{key:0,onClick:l=>s(a)},[R(re,{icon:A(se).PLAY},null,8,["icon"]),c("span",null,m(A(d).displayPVShort),1)],8,gf)):ee("",!0),rx(" "+m(a.text),1)])],2))),128))],4)])]))}});const Cf=Ue(mf,[["__scopeId","data-v-50ccf2a4"]]),Ff={class:"full column"},qE=ke({__name:"EngineAnalytics",props:{size:{type:ft,required:!0},historyMode:{type:Boolean,required:!0}},setup(t){const e=t,x=$e(),n=me(()=>{const i=x.usiMonitors.length;return i!==0?e.size.height/i:0});return(i,s)=>(S(),k("div",null,[c("div",Ff,[(S(!0),k(De,null,Ne(A(x).usiMonitors,o=>(S(),Me(Cf,{key:o.sessionID,"history-mode":t.historyMode,name:o.name,info:o,height:n.value},null,8,["history-mode","name","info","height"]))),128))])]))}});/*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + */function Di(t){return t+.5|0}const X0=(t,e,x)=>Math.max(Math.min(t,x),e);function Tn(t){return X0(Di(t*2.55),0,255)}function ix(t){return X0(Di(t*255),0,255)}function L0(t){return X0(Di(t/2.55)/100,0,1)}function YE(t){return X0(Di(t*100),0,100)}const s0={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Cr=[..."0123456789ABCDEF"],Df=t=>Cr[t&15],_f=t=>Cr[(t&240)>>4]+Cr[t&15],Mi=t=>(t&240)>>4===(t&15),vf=t=>Mi(t.r)&&Mi(t.g)&&Mi(t.b)&&Mi(t.a);function bf(t){var e=t.length,x;return t[0]==="#"&&(e===4||e===5?x={r:255&s0[t[1]]*17,g:255&s0[t[2]]*17,b:255&s0[t[3]]*17,a:e===5?s0[t[4]]*17:255}:(e===7||e===9)&&(x={r:s0[t[1]]<<4|s0[t[2]],g:s0[t[3]]<<4|s0[t[4]],b:s0[t[5]]<<4|s0[t[6]],a:e===9?s0[t[7]]<<4|s0[t[8]]:255})),x}const yf=(t,e)=>t<255?e(t):"";function Sf(t){var e=vf(t)?Df:_f;return t?"#"+e(t.r)+e(t.g)+e(t.b)+yf(t.a,e):void 0}const wf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function n9(t,e,x){const n=e*Math.min(x,1-x),i=(s,o=(s+t/30)%12)=>x-n*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function Tf(t,e,x){const n=(i,s=(i+t/60)%6)=>x-x*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function If(t,e,x){const n=n9(t,1,.5);let i;for(e+x>1&&(i=1/(e+x),e*=i,x*=i),i=0;i<3;i++)n[i]*=1-e-x,n[i]+=e;return n}function Pf(t,e,x,n,i){return t===i?(e-x)/n+(e.5?l/(2-s-o):l/(s+o),a=Pf(x,n,i,l,s),a=a*60+.5),[a|0,E||0,r]}function pa(t,e,x,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,x,n)).map(ix)}function ga(t,e,x){return pa(n9,t,e,x)}function kf(t,e,x){return pa(If,t,e,x)}function Mf(t,e,x){return pa(Tf,t,e,x)}function i9(t){return(t%360+360)%360}function Nf(t){const e=wf.exec(t);let x=255,n;if(!e)return;e[5]!==n&&(x=e[6]?Tn(+e[5]):ix(+e[5]));const i=i9(+e[2]),s=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?n=kf(i,s,o):e[1]==="hsv"?n=Mf(i,s,o):n=ga(i,s,o),{r:n[0],g:n[1],b:n[2],a:x}}function Rf(t,e){var x=fa(t);x[0]=i9(x[0]+e),x=ga(x),t.r=x[0],t.g=x[1],t.b=x[2]}function Of(t){if(!t)return;const e=fa(t),x=e[0],n=YE(e[1]),i=YE(e[2]);return t.a<255?`hsla(${x}, ${n}%, ${i}%, ${L0(t.a)})`:`hsl(${x}, ${n}%, ${i}%)`}const JE={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},XE={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Lf(){const t={},e=Object.keys(XE),x=Object.keys(JE);let n,i,s,o,r;for(n=0;n>16&255,s>>8&255,s&255]}return t}let Ni;function Hf(t){Ni||(Ni=Lf(),Ni.transparent=[0,0,0,0]);const e=Ni[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const Uf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function $f(t){const e=Uf.exec(t);let x=255,n,i,s;if(e){if(e[7]!==n){const o=+e[7];x=e[8]?Tn(o):X0(o*255,0,255)}return n=+e[1],i=+e[3],s=+e[5],n=255&(e[2]?Tn(n):X0(n,0,255)),i=255&(e[4]?Tn(i):X0(i,0,255)),s=255&(e[6]?Tn(s):X0(s,0,255)),{r:n,g:i,b:s,a:x}}}function Gf(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${L0(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Ro=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,zx=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Wf(t,e,x){const n=zx(L0(t.r)),i=zx(L0(t.g)),s=zx(L0(t.b));return{r:ix(Ro(n+x*(zx(L0(e.r))-n))),g:ix(Ro(i+x*(zx(L0(e.g))-i))),b:ix(Ro(s+x*(zx(L0(e.b))-s))),a:t.a+x*(e.a-t.a)}}function Ri(t,e,x){if(t){let n=fa(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*x,e===0?360:1)),n=ga(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function s9(t,e){return t&&Object.assign(e||{},t)}function ZE(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ix(t[3]))):(e=s9(t,{r:0,g:0,b:0,a:1}),e.a=ix(e.a)),e}function zf(t){return t.charAt(0)==="r"?$f(t):Nf(t)}class oi{constructor(e){if(e instanceof oi)return e;const x=typeof e;let n;x==="object"?n=ZE(e):x==="string"&&(n=bf(e)||Hf(e)||zf(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=s9(this._rgb);return e&&(e.a=L0(e.a)),e}set rgb(e){this._rgb=ZE(e)}rgbString(){return this._valid?Gf(this._rgb):void 0}hexString(){return this._valid?Sf(this._rgb):void 0}hslString(){return this._valid?Of(this._rgb):void 0}mix(e,x){if(e){const n=this.rgb,i=e.rgb;let s;const o=x===s?.5:x,r=2*o-1,a=n.a-i.a,E=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;s=1-E,n.r=255&E*n.r+s*i.r+.5,n.g=255&E*n.g+s*i.g+.5,n.b=255&E*n.b+s*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(e,x){return e&&(this._rgb=Wf(this._rgb,e._rgb,x)),this}clone(){return new oi(this.rgb)}alpha(e){return this._rgb.a=ix(e),this}clearer(e){const x=this._rgb;return x.a*=1-e,this}greyscale(){const e=this._rgb,x=Di(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=x,this}opaquer(e){const x=this._rgb;return x.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ri(this._rgb,2,e),this}darken(e){return Ri(this._rgb,2,-e),this}saturate(e){return Ri(this._rgb,1,e),this}desaturate(e){return Ri(this._rgb,1,-e),this}rotate(e){return Rf(this._rgb,e),this}}/*! + * Chart.js v4.3.0 + * https://www.chartjs.org + * (c) 2023 Chart.js Contributors + * Released under the MIT License + */function P0(){}const Vf=(()=>{let t=0;return()=>t++})();function He(t){return t===null||typeof t>"u"}function it(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Re(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function ut(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Xt(t,e){return ut(t)?t:e}function Se(t,e){return typeof t>"u"?e:t}const Kf=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,o9=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Qe(t,e,x){if(t&&typeof t.call=="function")return t.apply(x,e)}function Ve(t,e,x,n){let i,s,o;if(it(t))if(s=t.length,n)for(i=s-1;i>=0;i--)e.call(x,t[i],i);else for(i=0;it,x:t=>t.x,y:t=>t.y};function Yf(t){const e=t.split("."),x=[];let n="";for(const i of e)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(x.push(n),n="");return x}function Jf(t){const e=Yf(t);return x=>{for(const n of e){if(n==="")break;x=x&&x[n]}return x}}function Ex(t,e){return(QE[e]||(QE[e]=Jf(e)))(t)}function ma(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ai=t=>typeof t<"u",lx=t=>typeof t=="function",el=(t,e)=>{if(t.size!==e.size)return!1;for(const x of t)if(!e.has(x))return!1;return!0};function Xf(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const lt=Math.PI,st=2*lt,Zf=st+lt,Us=Number.POSITIVE_INFINITY,Qf=lt/180,At=lt/2,fx=lt/4,tl=lt*2/3,Z0=Math.log10,w0=Math.sign;function Vn(t,e,x){return Math.abs(t-e)i-s).pop(),e}function En(t){return!isNaN(parseFloat(t))&&isFinite(t)}function t7(t,e){const x=Math.round(t);return x-e<=t&&x+e>=t}function a9(t,e,x){let n,i,s;for(n=0,i=t.length;na&&E=Math.min(e,x)-n&&t<=Math.max(e,x)+n}function Fa(t,e,x){x=x||(o=>t[o]1;)s=i+n>>1,x(s)?i=s:n=s;return{lo:i,hi:n}}const G0=(t,e,x,n)=>Fa(t,x,n?i=>{const s=t[i][e];return st[i][e]Fa(t,x,n=>t[n][e]>=x);function s7(t,e,x){let n=0,i=t.length;for(;nn&&t[i-1]>x;)i--;return n>0||i{const n="_onData"+ma(x),i=t[x];Object.defineProperty(t,x,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return t._chartjs.listeners.forEach(r=>{typeof r[n]=="function"&&r[n](...s)}),o}})})}function il(t,e){const x=t._chartjs;if(!x)return;const n=x.listeners,i=n.indexOf(e);i!==-1&&n.splice(i,1),!(n.length>0)&&(l9.forEach(s=>{delete t[s]}),delete t._chartjs)}function c9(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const u9=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function A9(t,e){let x=[],n=!1;return function(...i){x=i,n||(n=!0,u9.call(window,()=>{n=!1,t.apply(e,x)}))}}function r7(t,e){let x;return function(...n){return e?(clearTimeout(x),x=setTimeout(t,e,n)):t.apply(this,n),e}}const Da=t=>t==="start"?"left":t==="end"?"right":"center",wt=(t,e,x)=>t==="start"?e:t==="end"?x:(e+x)/2,a7=(t,e,x,n)=>t===(n?"left":"right")?x:t==="center"?(e+x)/2:e;function h9(t,e,x){const n=e.length;let i=0,s=n;if(t._sorted){const{iScale:o,_parsed:r}=t,a=o.axis,{min:E,max:l,minDefined:u,maxDefined:h}=o.getUserBounds();u&&(i=Ft(Math.min(G0(r,o.axis,E).lo,x?n:G0(e,a,o.getPixelForValue(E)).lo),0,n-1)),h?s=Ft(Math.max(G0(r,o.axis,l,!0).hi+1,x?0:G0(e,a,o.getPixelForValue(l),!0).hi+1),i,n)-i:s=n-i}return{start:i,count:s}}function B9(t){const{xScale:e,yScale:x,_scaleRanges:n}=t,i={xmin:e.min,xmax:e.max,ymin:x.min,ymax:x.max};if(!n)return t._scaleRanges=i,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==x.min||n.ymax!==x.max;return Object.assign(n,i),s}const Oi=t=>t===0||t===1,sl=(t,e,x)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*st/x)),ol=(t,e,x)=>Math.pow(2,-10*t)*Math.sin((t-e)*st/x)+1,Kn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*At)+1,easeOutSine:t=>Math.sin(t*At),easeInOutSine:t=>-.5*(Math.cos(lt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Oi(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Oi(t)?t:sl(t,.075,.3),easeOutElastic:t=>Oi(t)?t:ol(t,.075,.3),easeInOutElastic(t){return Oi(t)?t:t<.5?.5*sl(t*2,.1125,.45):.5+.5*ol(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Kn.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Kn.easeInBounce(t*2)*.5:Kn.easeOutBounce(t*2-1)*.5+.5};function _a(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function rl(t){return _a(t)?t:new oi(t)}function Oo(t){return _a(t)?t:new oi(t).saturate(.5).darken(.1).hexString()}const E7=["x","y","borderWidth","radius","tension"],l7=["color","borderColor","backgroundColor"];function c7(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:l7},numbers:{type:"number",properties:E7}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function u7(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const al=new Map;function A7(t,e){e=e||{};const x=t+JSON.stringify(e);let n=al.get(x);return n||(n=new Intl.NumberFormat(t,e),al.set(x,n)),n}function _i(t,e,x){return A7(e,x).format(t)}const d9={values(t){return it(t)?t:""+t},numeric(t,e,x){if(t===0)return"0";const n=this.chart.options.locale;let i,s=t;if(x.length>1){const E=Math.max(Math.abs(x[0].value),Math.abs(x[x.length-1].value));(E<1e-4||E>1e15)&&(i="scientific"),s=h7(t,x)}const o=Z0(Math.abs(s)),r=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:i,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),_i(t,n,a)},logarithmic(t,e,x){if(t===0)return"0";const n=x[e].significand||t/Math.pow(10,Math.floor(Z0(t)));return[1,2,3,5,10,15].includes(n)||e>.8*x.length?d9.numeric.call(this,t,e,x):""}};function h7(t,e){let x=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(x)>=1&&t!==Math.floor(t)&&(x=t-Math.floor(t)),x}var fo={formatters:d9};function B7(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,x)=>x.lineWidth,tickColor:(e,x)=>x.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:fo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Rx=Object.create(null),Dr=Object.create(null);function jn(t,e){if(!e)return t;const x=e.split(".");for(let n=0,i=x.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,i)=>Oo(i.backgroundColor),this.hoverBorderColor=(n,i)=>Oo(i.borderColor),this.hoverColor=(n,i)=>Oo(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(x)}set(e,x){return Lo(this,e,x)}get(e){return jn(this,e)}describe(e,x){return Lo(Dr,e,x)}override(e,x){return Lo(Rx,e,x)}route(e,x,n,i){const s=jn(this,e),o=jn(this,n),r="_"+x;Object.defineProperties(s,{[r]:{value:s[x],writable:!0},[x]:{enumerable:!0,get(){const a=this[r],E=o[i];return Re(a)?Object.assign({},E,a):Se(a,E)},set(a){this[r]=a}}})}apply(e){e.forEach(x=>x(this))}}var ht=new d7({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[c7,u7,B7]);function f7(t){return!t||He(t.size)||He(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function $s(t,e,x,n,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,x.push(i)),s>n&&(n=s),n}function p7(t,e,x,n){n=n||{};let i=n.data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(i=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let o=0;const r=x.length;let a,E,l,u,h;for(a=0;ax.length){for(a=0;a0&&t.stroke()}}function W0(t,e,x){return x=x||.5,!e||t&&t.x>e.left-x&&t.xe.top-x&&t.y0&&s.strokeColor!=="";let a,E;for(t.save(),t.font=i.string,C7(t,s),a=0;a+t||0;function va(t,e){const x={},n=Re(e),i=n?Object.keys(e):e,s=Re(t)?n?o=>Se(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)x[o]=y7(s(o));return x}function p9(t){return va(t,{top:"y",right:"x",bottom:"y",left:"x"})}function kx(t){return va(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Rt(t){const e=p9(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function mt(t,e){t=t||{},e=e||ht.font;let x=Se(t.size,e.size);typeof x=="string"&&(x=parseInt(x,10));let n=Se(t.style,e.style);n&&!(""+n).match(v7)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const i={family:Se(t.family,e.family),lineHeight:b7(Se(t.lineHeight,e.lineHeight),x),size:x,style:n,weight:Se(t.weight,e.weight),string:""};return i.string=f7(i),i}function In(t,e,x,n){let i=!0,s,o,r;for(s=0,o=t.length;sx&&r===0?0:r+a;return{min:o(n,-Math.abs(s)),max:o(i,s)}}function Ax(t,e){return Object.assign(Object.create(t),e)}function ba(t,e=[""],x,n,i=()=>t[0]){const s=x||t;typeof n>"u"&&(n=F9("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:n,_getTarget:i,override:r=>ba([r,...t],e,s,n)};return new Proxy(o,{deleteProperty(r,a){return delete r[a],delete r._keys,delete t[0][a],!0},get(r,a){return m9(r,a,()=>R7(a,e,t,r))},getOwnPropertyDescriptor(r,a){return Reflect.getOwnPropertyDescriptor(r._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(r,a){return cl(r).includes(a)},ownKeys(r){return cl(r)},set(r,a,E){const l=r._storage||(r._storage=i());return r[a]=l[a]=E,delete r._keys,!0}})}function ln(t,e,x,n){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:x,_stack:new Set,_descriptors:g9(t,n),setContext:s=>ln(t,s,x,n),override:s=>ln(t.override(s),e,x,n)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete t[o],!0},get(s,o,r){return m9(s,o,()=>T7(s,o,r))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(s,o,r){return t[o]=r,delete s[o],!0}})}function g9(t,e={scriptable:!0,indexable:!0}){const{_scriptable:x=e.scriptable,_indexable:n=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:x,indexable:n,isScriptable:lx(x)?x:()=>x,isIndexable:lx(n)?n:()=>n}}const w7=(t,e)=>t?t+ma(e):e,ya=(t,e)=>Re(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function m9(t,e,x){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=x();return t[e]=n,n}function T7(t,e,x){const{_proxy:n,_context:i,_subProxy:s,_descriptors:o}=t;let r=n[e];return lx(r)&&o.isScriptable(e)&&(r=I7(e,r,t,x)),it(r)&&r.length&&(r=P7(e,r,t,o.isIndexable)),ya(e,r)&&(r=ln(r,i,s&&s[e],o)),r}function I7(t,e,x,n){const{_proxy:i,_context:s,_subProxy:o,_stack:r}=x;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let a=e(s,o||n);return r.delete(t),ya(t,a)&&(a=Sa(i._scopes,i,t,a)),a}function P7(t,e,x,n){const{_proxy:i,_context:s,_subProxy:o,_descriptors:r}=x;if(typeof s.index<"u"&&n(t))return e[s.index%e.length];if(Re(e[0])){const a=e,E=i._scopes.filter(l=>l!==a);e=[];for(const l of a){const u=Sa(E,i,t,l);e.push(ln(u,s,o&&o[t],r))}}return e}function C9(t,e,x){return lx(t)?t(e,x):t}const k7=(t,e)=>t===!0?e:typeof t=="string"?Ex(e,t):void 0;function M7(t,e,x,n,i){for(const s of e){const o=k7(x,s);if(o){t.add(o);const r=C9(o._fallback,x,i);if(typeof r<"u"&&r!==x&&r!==n)return r}else if(o===!1&&typeof n<"u"&&x!==n)return null}return!1}function Sa(t,e,x,n){const i=e._rootScopes,s=C9(e._fallback,x,n),o=[...t,...i],r=new Set;r.add(n);let a=ll(r,o,x,s||x,n);return a===null||typeof s<"u"&&s!==x&&(a=ll(r,o,s,a,n),a===null)?!1:ba(Array.from(r),[""],i,s,()=>N7(e,x,n))}function ll(t,e,x,n,i){for(;x;)x=M7(t,e,x,n,i);return x}function N7(t,e,x){const n=t._getTarget();e in n||(n[e]={});const i=n[e];return it(i)&&Re(x)?x:i||{}}function R7(t,e,x,n){let i;for(const s of e)if(i=F9(w7(s,t),x),typeof i<"u")return ya(t,i)?Sa(x,n,t,i):i}function F9(t,e){for(const x of e){if(!x)continue;const n=x[t];if(typeof n<"u")return n}}function cl(t){let e=t._keys;return e||(e=t._keys=O7(t._scopes)),e}function O7(t){const e=new Set;for(const x of t)for(const n of Object.keys(x).filter(i=>!i.startsWith("_")))e.add(n);return Array.from(e)}function D9(t,e,x,n){const{iScale:i}=t,{key:s="r"}=this._parsing,o=new Array(n);let r,a,E,l;for(r=0,a=n;ret==="x"?"y":"x";function H7(t,e,x,n){const i=t.skip?e:t,s=e,o=x.skip?e:x,r=Fr(s,i),a=Fr(o,s);let E=r/(r+a),l=a/(r+a);E=isNaN(E)?0:E,l=isNaN(l)?0:l;const u=n*E,h=n*l;return{previous:{x:s.x-u*(o.x-i.x),y:s.y-u*(o.y-i.y)},next:{x:s.x+h*(o.x-i.x),y:s.y+h*(o.y-i.y)}}}function U7(t,e,x){const n=t.length;let i,s,o,r,a,E=cn(t,0);for(let l=0;l!E.skip)),e.cubicInterpolationMode==="monotone")G7(t,i);else{let E=n?t[t.length-1]:t[0];for(s=0,o=t.length;st.ownerDocument.defaultView.getComputedStyle(t,null);function V7(t,e){return mo(t).getPropertyValue(e)}const K7=["top","right","bottom","left"];function Mx(t,e,x){const n={};x=x?"-"+x:"";for(let i=0;i<4;i++){const s=K7[i];n[s]=parseFloat(t[e+"-"+s+x])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const j7=(t,e,x)=>(t>0||e>0)&&(!x||!x.shadowRoot);function q7(t,e){const x=t.touches,n=x&&x.length?x[0]:t,{offsetX:i,offsetY:s}=n;let o=!1,r,a;if(j7(i,s,t.target))r=i,a=s;else{const E=e.getBoundingClientRect();r=n.clientX-E.left,a=n.clientY-E.top,o=!0}return{x:r,y:a,box:o}}function Fx(t,e){if("native"in t)return t;const{canvas:x,currentDevicePixelRatio:n}=e,i=mo(x),s=i.boxSizing==="border-box",o=Mx(i,"padding"),r=Mx(i,"border","width"),{x:a,y:E,box:l}=q7(t,x),u=o.left+(l&&r.left),h=o.top+(l&&r.top);let{width:B,height:p}=e;return s&&(B-=o.width+r.width,p-=o.height+r.height),{x:Math.round((a-u)/B*x.width/n),y:Math.round((E-h)/p*x.height/n)}}function Y7(t,e,x){let n,i;if(e===void 0||x===void 0){const s=wa(t);if(!s)e=t.clientWidth,x=t.clientHeight;else{const o=s.getBoundingClientRect(),r=mo(s),a=Mx(r,"border","width"),E=Mx(r,"padding");e=o.width-E.width-a.width,x=o.height-E.height-a.height,n=Gs(r.maxWidth,s,"clientWidth"),i=Gs(r.maxHeight,s,"clientHeight")}}return{width:e,height:x,maxWidth:n||Us,maxHeight:i||Us}}const Hi=t=>Math.round(t*10)/10;function J7(t,e,x,n){const i=mo(t),s=Mx(i,"margin"),o=Gs(i.maxWidth,t,"clientWidth")||Us,r=Gs(i.maxHeight,t,"clientHeight")||Us,a=Y7(t,e,x);let{width:E,height:l}=a;if(i.boxSizing==="content-box"){const h=Mx(i,"border","width"),B=Mx(i,"padding");E-=B.width+h.width,l-=B.height+h.height}return E=Math.max(0,E-s.width),l=Math.max(0,n?E/n:l-s.height),E=Hi(Math.min(E,o,a.maxWidth)),l=Hi(Math.min(l,r,a.maxHeight)),E&&!l&&(l=Hi(E/2)),(e!==void 0||x!==void 0)&&n&&a.height&&l>a.height&&(l=a.height,E=Hi(Math.floor(l*n))),{width:E,height:l}}function ul(t,e,x){const n=e||1,i=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(x||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||o.height!==i||o.width!==s?(t.currentDevicePixelRatio=n,o.height=i,o.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}const X7=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return t}();function Al(t,e){const x=V7(t,e),n=x&&x.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Dx(t,e,x,n){return{x:t.x+x*(e.x-t.x),y:t.y+x*(e.y-t.y)}}function Z7(t,e,x,n){return{x:t.x+x*(e.x-t.x),y:n==="middle"?x<.5?t.y:e.y:n==="after"?x<1?t.y:e.y:x>0?e.y:t.y}}function Q7(t,e,x,n){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=Dx(t,i,x),r=Dx(i,s,x),a=Dx(s,e,x),E=Dx(o,r,x),l=Dx(r,a,x);return Dx(E,l,x)}const e2=function(t,e){return{x(x){return t+t+e-x},setWidth(x){e=x},textAlign(x){return x==="center"?x:x==="right"?"left":"right"},xPlus(x,n){return x-n},leftForLtr(x,n){return x-n}}},t2=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function nn(t,e,x){return t?e2(e,x):t2()}function b9(t,e){let x,n;(e==="ltr"||e==="rtl")&&(x=t.canvas.style,n=[x.getPropertyValue("direction"),x.getPropertyPriority("direction")],x.setProperty("direction",e,"important"),t.prevTextDirection=n)}function y9(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function S9(t){return t==="angle"?{between:Ei,compare:x7,normalize:e0}:{between:$0,compare:(e,x)=>e-x,normalize:e=>e}}function hl({start:t,end:e,count:x,loop:n,style:i}){return{start:t%x,end:e%x,loop:n&&(e-t+1)%x===0,style:i}}function x2(t,e,x){const{property:n,start:i,end:s}=x,{between:o,normalize:r}=S9(n),a=e.length;let{start:E,end:l,loop:u}=t,h,B;if(u){for(E+=a,l+=a,h=0,B=a;ha(i,M,C)&&r(i,M)!==0,I=()=>r(s,C)===0||a(s,M,C),D=()=>f||_(),P=()=>!f||I();for(let y=l,T=l;y<=u;++y)w=e[y%o],!w.skip&&(C=E(w[n]),C!==M&&(f=a(C,i,s),g===null&&D()&&(g=r(C,i)===0?y:T),g!==null&&P()&&(p.push(hl({start:g,end:y,loop:h,count:o,style:B})),g=null),T=y,M=C));return g!==null&&p.push(hl({start:g,end:u,loop:h,count:o,style:B})),p}function T9(t,e){const x=[],n=t.segments;for(let i=0;ii&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function i2(t,e,x,n){const i=t.length,s=[];let o=e,r=t[e],a;for(a=e+1;a<=x;++a){const E=t[a%i];E.skip||E.stop?r.skip||(n=!1,s.push({start:e%i,end:(a-1)%i,loop:n}),e=o=E.stop?a:null):(o=a,r.skip&&(e=a)),r=E}return o!==null&&s.push({start:e%i,end:o%i,loop:n}),s}function s2(t,e){const x=t.points,n=t.options.spanGaps,i=x.length;if(!i)return[];const s=!!t._loop,{start:o,end:r}=n2(x,i,s,n);if(n===!0)return Bl(t,[{start:o,end:r,loop:s}],x,e);const a=rr({chart:e,initial:x.initial,numSteps:o,currentStep:Math.min(n-x.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=u9.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let x=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const s=n.items;let o=s.length-1,r=!1,a;for(;o>=0;--o)a=s[o],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(e),r=!0):(s[o]=s[s.length-1],s.pop());r&&(i.draw(),this._notify(i,n,e,"progress")),s.length||(n.running=!1,this._notify(i,n,e,"complete"),n.initial=!1),x+=s.length}),this._lastDate=e,x===0&&(this._running=!1)}_getAnims(e){const x=this._charts;let n=x.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},x.set(e,n)),n}listen(e,x,n){this._getAnims(e).listeners[x].push(n)}add(e,x){!x||!x.length||this._getAnims(e).items.push(...x)}has(e){return this._getAnims(e).items.length>0}start(e){const x=this._charts.get(e);x&&(x.running=!0,x.start=Date.now(),x.duration=x.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const x=this._charts.get(e);return!(!x||!x.running||!x.items.length)}stop(e){const x=this._charts.get(e);if(!x||!x.items.length)return;const n=x.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();x.items=[],this._notify(e,x,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var N0=new a2;const fl="transparent",E2={boolean(t,e,x){return x>.5?e:t},color(t,e,x){const n=rl(t||fl),i=n.valid&&rl(e||fl);return i&&i.valid?i.mix(n,x).hexString():e},number(t,e,x){return t+(e-t)*x}};class l2{constructor(e,x,n,i){const s=x[n];i=In([e.to,i,s,e.from]);const o=In([e.from,s,i]);this._active=!0,this._fn=e.fn||E2[e.type||typeof o],this._easing=Kn[e.easing]||Kn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=x,this._prop=n,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,x,n){if(this._active){this._notify(!1);const i=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=In([e.to,x,i,e.from]),this._from=In([e.from,i,x])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const x=e-this._start,n=this._duration,i=this._prop,s=this._from,o=this._loop,r=this._to;let a;if(this._active=s!==r&&(o||x1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(s,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((x,n)=>{e.push({res:x,rej:n})})}_notify(e){const x=e?"res":"rej",n=this._promises||[];for(let i=0;i{const s=e[i];if(!Re(s))return;const o={};for(const r of x)o[r]=s[r];(it(s.properties)&&s.properties||[i]).forEach(r=>{(r===i||!n.has(r))&&n.set(r,o)})})}_animateOptions(e,x){const n=x.options,i=u2(e,n);if(!i)return[];const s=this._createAnimations(i,n);return n.$shared&&c2(e.options.$animations,n).then(()=>{e.options=n},()=>{}),s}_createAnimations(e,x){const n=this._properties,i=[],s=e.$animations||(e.$animations={}),o=Object.keys(x),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const E=o[a];if(E.charAt(0)==="$")continue;if(E==="options"){i.push(...this._animateOptions(e,x));continue}const l=x[E];let u=s[E];const h=n.get(E);if(u)if(h&&u.active()){u.update(h,l,r);continue}else u.cancel();if(!h||!h.duration){e[E]=l;continue}s[E]=u=new l2(h,e,E,l),i.push(u)}return i}update(e,x){if(this._properties.size===0){Object.assign(e,x);return}const n=this._createAnimations(e,x);if(n.length)return N0.add(this._chart,n),!0}}function c2(t,e){const x=[],n=Object.keys(e);for(let i=0;i0||!x&&s<0)return i.index}return null}function Fl(t,e){const{chart:x,_cachedMeta:n}=t,i=x._stacks||(x._stacks={}),{iScale:s,vScale:o,index:r}=n,a=s.axis,E=o.axis,l=d2(s,o,n),u=e.length;let h;for(let B=0;Bx[n].axis===e).shift()}function g2(t,e){return Ax(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function m2(t,e,x){return Ax(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:x,index:e,mode:"default",type:"data"})}function gn(t,e){const x=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[n]===void 0||s[n][x]===void 0)return;delete s[n][x],s[n]._visualValues!==void 0&&s[n]._visualValues[x]!==void 0&&delete s[n]._visualValues[x]}}}const Uo=t=>t==="reset"||t==="none",Dl=(t,e)=>e?t:Object.assign({},t),C2=(t,e,x)=>t&&!e.hidden&&e._stacked&&{keys:P9(x,!0),values:null};class g0{constructor(e,x){this.chart=e,this._ctx=e.ctx,this.index=x,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=ml(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&gn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,x=this._cachedMeta,n=this.getDataset(),i=(u,h,B,p)=>u==="x"?h:u==="r"?p:B,s=x.xAxisID=Se(n.xAxisID,Ho(e,"x")),o=x.yAxisID=Se(n.yAxisID,Ho(e,"y")),r=x.rAxisID=Se(n.rAxisID,Ho(e,"r")),a=x.indexAxis,E=x.iAxisID=i(a,s,o,r),l=x.vAxisID=i(a,o,s,r);x.xScale=this.getScaleForId(s),x.yScale=this.getScaleForId(o),x.rScale=this.getScaleForId(r),x.iScale=this.getScaleForId(E),x.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const x=this._cachedMeta;return e===x.iScale?x.vScale:x.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&il(this._data,this),e._stacked&&gn(e)}_dataCheck(){const e=this.getDataset(),x=e.data||(e.data=[]),n=this._data;if(Re(x))this._data=B2(x);else if(n!==x){if(n){il(n,this);const i=this._cachedMeta;gn(i),i._parsed=[]}x&&Object.isExtensible(x)&&o7(x,this),this._syncList=[],this._data=x}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const x=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const s=x._stacked;x._stacked=ml(x.vScale,x),x.stack!==n.stack&&(i=!0,gn(x),x.stack=n.stack),this._resyncElements(e),(i||s!==x._stacked)&&Fl(this,x._parsed)}configure(){const e=this.chart.config,x=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),x,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,x){const{_cachedMeta:n,_data:i}=this,{iScale:s,_stacked:o}=n,r=s.axis;let a=e===0&&x===i.length?!0:n._sorted,E=e>0&&n._parsed[e-1],l,u,h;if(this._parsing===!1)n._parsed=i,n._sorted=!0,h=i;else{it(i[e])?h=this.parseArrayData(n,i,e,x):Re(i[e])?h=this.parseObjectData(n,i,e,x):h=this.parsePrimitiveData(n,i,e,x);const B=()=>u[r]===null||E&&u[r]f||u=0;--h)if(!p()){this.updateRangeFromParsed(E,e,B,a);break}}return E}getAllParsedValues(e){const x=this._cachedMeta._parsed,n=[];let i,s,o;for(i=0,s=x.length;i=0&&ethis.getContext(n,i,x),f=E.resolveNamedOptions(h,B,p,u);return f.$shared&&(f.$shared=a,s[o]=Object.freeze(Dl(f,a))),f}_resolveAnimations(e,x,n){const i=this.chart,s=this._cachedDataOpts,o=`animation-${x}`,r=s[o];if(r)return r;let a;if(i.options.animation!==!1){const l=this.chart.config,u=l.datasetAnimationScopeKeys(this._type,x),h=l.getOptionScopes(this.getDataset(),u);a=l.createResolver(h,this.getContext(e,n,x))}const E=new I9(i,a&&a.animations);return a&&a._cacheable&&(s[o]=Object.freeze(E)),E}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,x){return!x||Uo(e)||this.chart._animationsDisabled}_getSharedOptions(e,x){const n=this.resolveDataElementOptions(e,x),i=this._sharedOptions,s=this.getSharedOptions(n),o=this.includeOptions(x,s)||s!==i;return this.updateSharedOptions(s,x,n),{sharedOptions:s,includeOptions:o}}updateElement(e,x,n,i){Uo(i)?Object.assign(e,n):this._resolveAnimations(x,i).update(e,n)}updateSharedOptions(e,x,n){e&&!Uo(x)&&this._resolveAnimations(void 0,x).update(e,n)}_setStyle(e,x,n,i){e.active=i;const s=this.getStyle(x,i);this._resolveAnimations(x,n,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,x,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,x,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const x=this._data,n=this._cachedMeta.data;for(const[r,a,E]of this._syncList)this[r](a,E);this._syncList=[];const i=n.length,s=x.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,e):s{for(E.length+=x,r=E.length-1;r>=o;r--)E[r]=E[r-x]};for(a(s),r=e;ri-s))}return t._cache.$bar}function D2(t){const e=t.iScale,x=F2(e,t.type);let n=e._length,i,s,o,r;const a=()=>{o===32767||o===-32768||(ai(r)&&(n=Math.min(n,Math.abs(o-r)||n)),r=o)};for(i=0,s=x.length;i0?i[t-1]:null,r=tMath.abs(r)&&(a=r,E=o),e[x.axis]=E,e._custom={barStart:a,barEnd:E,start:i,end:s,min:o,max:r}}function k9(t,e,x,n){return it(t)?b2(t,e,x,n):e[x.axis]=x.parse(t,n),e}function _l(t,e,x,n){const i=t.iScale,s=t.vScale,o=i.getLabels(),r=i===s,a=[];let E,l,u,h;for(E=x,l=x+n;E=x?1:-1)}function S2(t){let e,x,n,i,s;return t.horizontal?(e=t.base>t.x,x="left",n="right"):(e=t.basea.controller.options.grouped),s=n.options.stacked,o=[],r=a=>{const E=a.controller.getParsed(x),l=E&&E[a.vScale.axis];if(He(l)||isNaN(l))return!0};for(const a of i)if(!(x!==void 0&&r(a))&&((s===!1||o.indexOf(a.stack)===-1||s===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,x,n){const i=this._getStacks(e,n),s=x!==void 0?i.indexOf(x):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,x=this._cachedMeta,n=x.iScale,i=[];let s,o;for(s=0,o=x.data.length;s=0;--n)x=Math.max(x,e[n].size(this.resolveDataElementOptions(n))/2);return x>0&&x}getLabelAndValue(e){const x=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:s}=x,o=this.getParsed(e),r=i.getLabelForValue(o.x),a=s.getLabelForValue(o.y),E=o._custom;return{label:n[e]||"",value:"("+r+", "+a+(E?", "+E:"")+")"}}update(e){const x=this._cachedMeta.data;this.updateElements(x,0,x.length,e)}updateElements(e,x,n,i){const s=i==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:E}=this._getSharedOptions(x,i),l=o.axis,u=r.axis;for(let h=x;hEi(M,r,a,!0)?1:Math.max(_,_*x,I,I*x),p=(M,_,I)=>Ei(M,r,a,!0)?-1:Math.min(_,_*x,I,I*x),f=B(0,E,u),g=B(At,l,h),C=p(lt,E,u),w=p(lt+At,l,h);n=(f-C)/2,i=(g-w)/2,s=-(f+C)/2,o=-(g+w)/2}return{ratioX:n,ratioY:i,offsetX:s,offsetY:o}}class wx extends g0{constructor(e,x){super(e,x),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,x){const n=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=n;else{let s=a=>+n[a];if(Re(n[e])){const{key:a="value"}=this._parsing;s=E=>+Ex(n[E],a)}let o,r;for(o=e,r=e+x;o0&&!isNaN(e)?st*(Math.abs(e)/x):0}getLabelAndValue(e){const x=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=_i(x._parsed[e],n.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let x=0;const n=this.chart;let i,s,o,r,a;if(!e){for(i=0,s=n.data.datasets.length;ie!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),b(wx,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const x=e.data;if(x.labels.length&&x.datasets.length){const{labels:{pointStyle:n,color:i}}=e.legend.options;return x.labels.map((s,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,x,n){n.chart.toggleDataVisibility(x.index),n.chart.update()}}}});class as extends g0{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const x=this._cachedMeta,{dataset:n,data:i=[],_dataset:s}=x,o=this.chart._animationsDisabled;let{start:r,count:a}=h9(x,i,o);this._drawStart=r,this._drawCount=a,B9(x)&&(r=0,a=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!s._decimated,n.points=i;const E=this.resolveDatasetElementOptions(e);this.options.showLine||(E.borderWidth=0),E.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:E},e),this.updateElements(i,r,a,e)}updateElements(e,x,n,i){const s=i==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:E}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(x,i),h=o.axis,B=r.axis,{spanGaps:p,segment:f}=this.options,g=En(p)?p:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||s||i==="none",w=x+n,M=e.length;let _=x>0&&this.getParsed(x-1);for(let I=0;I=w){P.skip=!0;continue}const y=this.getParsed(I),T=He(y[B]),N=P[h]=o.getPixelForValue(y[h],I),G=P[B]=s||T?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,y,a):y[B],I);P.skip=isNaN(N)||isNaN(G)||T,P.stop=I>0&&Math.abs(y[h]-_[h])>g,f&&(P.parsed=y,P.raw=E.data[I]),u&&(P.options=l||this.resolveDataElementOptions(I,D.active?"active":i)),C||this.updateElement(D,I,P,i),_=y}}getMaxOverflow(){const e=this._cachedMeta,x=e.dataset,n=x.options&&x.options.borderWidth||0,i=e.data||[];if(!i.length)return n;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,s,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}b(as,"id","line"),b(as,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),b(as,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class qn extends g0{constructor(e,x){super(e,x),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const x=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=_i(x._parsed[e].r,n.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,x,n,i){return D9.bind(this)(e,x,n,i)}update(e){const x=this._cachedMeta.data;this._updateRadius(),this.updateElements(x,0,x.length,e)}getMinMax(){const e=this._cachedMeta,x={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((n,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(sx.max&&(x.max=s))}),x}_updateRadius(){const e=this.chart,x=e.chartArea,n=e.options,i=Math.min(x.right-x.left,x.bottom-x.top),s=Math.max(i/2,0),o=Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0),r=(s-o)/e.getVisibleDatasetCount();this.outerRadius=s-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,x,n,i){const s=i==="reset",o=this.chart,a=o.options.animation,E=this._cachedMeta.rScale,l=E.xCenter,u=E.yCenter,h=E.getIndexAngle(0)-.5*lt;let B=h,p;const f=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&x++}),x}_computeAngle(e,x,n){return this.chart.getDataVisibility(e)?d0(this.resolveDataElementOptions(e,x).angle||n):0}}b(qn,"id","polarArea"),b(qn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),b(qn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const x=e.data;if(x.labels.length&&x.datasets.length){const{labels:{pointStyle:n,color:i}}=e.legend.options;return x.labels.map((s,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,x,n){n.chart.toggleDataVisibility(x.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class vr extends wx{}b(vr,"id","pie"),b(vr,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Es extends g0{getLabelAndValue(e){const x=this._cachedMeta.vScale,n=this.getParsed(e);return{label:x.getLabels()[e],value:""+x.getLabelForValue(n[x.axis])}}parseObjectData(e,x,n,i){return D9.bind(this)(e,x,n,i)}update(e){const x=this._cachedMeta,n=x.dataset,i=x.data||[],s=x.iScale.getLabels();if(n.points=i,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(n,void 0,r,e)}this.updateElements(i,0,i.length,e)}updateElements(e,x,n,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let r=x;r0&&this.getParsed(x-1);for(let _=x;_0&&Math.abs(D[B]-M[B])>C,g&&(P.parsed=D,P.raw=E.data[_]),h&&(P.options=u||this.resolveDataElementOptions(_,I.active?"active":i)),w||this.updateElement(I,_,P,i),M=D}this.updateSharedOptions(u,i,l)}getMaxOverflow(){const e=this._cachedMeta,x=e.data||[];if(!this.options.showLine){let r=0;for(let a=x.length-1;a>=0;--a)r=Math.max(r,x[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const n=e.dataset,i=n.options&&n.options.borderWidth||0;if(!x.length)return i;const s=x[0].size(this.resolveDataElementOptions(0)),o=x[x.length-1].size(this.resolveDataElementOptions(x.length-1));return Math.max(i,s,o)/2}}b(ls,"id","scatter"),b(ls,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),b(ls,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var k2=Object.freeze({__proto__:null,BarController:os,BubbleController:rs,DoughnutController:wx,LineController:as,PieController:vr,PolarAreaController:qn,RadarController:Es,ScatterController:ls});function gx(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ta{constructor(e){b(this,"options");this.options=e||{}}static override(e){Object.assign(Ta.prototype,e)}init(){}formats(){return gx()}parse(){return gx()}format(){return gx()}add(){return gx()}diff(){return gx()}startOf(){return gx()}endOf(){return gx()}}var M2={_date:Ta};function N2(t,e,x,n){const{controller:i,data:s,_sorted:o}=t,r=i._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&s.length){const a=r._reversePixels?i7:G0;if(n){if(i._sharedOptions){const E=s[0],l=typeof E.getRange=="function"&&E.getRange(e);if(l){const u=a(s,e,x-l),h=a(s,e,x+l);return{lo:u.lo,hi:h.hi}}}}else return a(s,e,x)}return{lo:0,hi:s.length-1}}function vi(t,e,x,n,i){const s=t.getSortedVisibleDatasetMetas(),o=x[e];for(let r=0,a=s.length;r{a[o](e[x],i)&&(s.push({element:a,datasetIndex:E,index:l}),r=r||a.inRange(e.x,e.y,i))}),n&&!r?[]:s}var H2={evaluateInteractionItems:vi,modes:{index(t,e,x,n){const i=Fx(e,t),s=x.axis||"x",o=x.includeInvisible||!1,r=x.intersect?Go(t,i,s,n,o):Wo(t,i,s,!1,n,o),a=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(E=>{const l=r[0].index,u=E.data[l];u&&!u.skip&&a.push({element:u,datasetIndex:E.index,index:l})}),a):[]},dataset(t,e,x,n){const i=Fx(e,t),s=x.axis||"xy",o=x.includeInvisible||!1;let r=x.intersect?Go(t,i,s,n,o):Wo(t,i,s,!1,n,o);if(r.length>0){const a=r[0].datasetIndex,E=t.getDatasetMeta(a).data;r=[];for(let l=0;lx.pos===e)}function Sl(t,e){return t.filter(x=>M9.indexOf(x.pos)===-1&&x.box.axis===e)}function Cn(t,e){return t.sort((x,n)=>{const i=e?n:x,s=e?x:n;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function U2(t){const e=[];let x,n,i,s,o,r;for(x=0,n=(t||[]).length;xE.box.fullSize),!0),n=Cn(mn(e,"left"),!0),i=Cn(mn(e,"right")),s=Cn(mn(e,"top"),!0),o=Cn(mn(e,"bottom")),r=Sl(e,"x"),a=Sl(e,"y");return{fullSize:x,leftAndTop:n.concat(s),rightAndBottom:i.concat(a).concat(o).concat(r),chartArea:mn(e,"chartArea"),vertical:n.concat(i).concat(a),horizontal:s.concat(o).concat(r)}}function wl(t,e,x,n){return Math.max(t[x],e[x])+Math.max(t[n],e[n])}function N9(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function z2(t,e,x,n){const{pos:i,box:s}=x,o=t.maxPadding;if(!Re(i)){x.size&&(t[i]-=x.size);const u=n[x.stack]||{size:0,count:1};u.size=Math.max(u.size,x.horizontal?s.height:s.width),x.size=u.size/u.count,t[i]+=x.size}s.getPadding&&N9(o,s.getPadding());const r=Math.max(0,e.outerWidth-wl(o,t,"left","right")),a=Math.max(0,e.outerHeight-wl(o,t,"top","bottom")),E=r!==t.w,l=a!==t.h;return t.w=r,t.h=a,x.horizontal?{same:E,other:l}:{same:l,other:E}}function V2(t){const e=t.maxPadding;function x(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=x("top"),t.x+=x("left"),x("right"),x("bottom")}function K2(t,e){const x=e.maxPadding;function n(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(e[o],x[o])}),s}return n(t?["left","right"]:["top","bottom"])}function Pn(t,e,x,n){const i=[];let s,o,r,a,E,l;for(s=0,o=t.length,E=0;s{typeof f.beforeLayout=="function"&&f.beforeLayout()});const l=a.reduce((f,g)=>g.box.options&&g.box.options.display===!1?f:f+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:x,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/l,hBoxMaxHeight:o/2}),h=Object.assign({},i);N9(h,Rt(n));const B=Object.assign({maxPadding:h,w:s,h:o,x:i.left,y:i.top},i),p=G2(a.concat(E),u);Pn(r.fullSize,B,u,p),Pn(a,B,u,p),Pn(E,B,u,p)&&Pn(a,B,u,p),V2(B),Tl(r.leftAndTop,B,u,p),B.x+=B.w,B.y+=B.h,Tl(r.rightAndBottom,B,u,p),t.chartArea={left:B.left,top:B.top,right:B.left+B.w,bottom:B.top+B.h,height:B.h,width:B.w},Ve(r.chartArea,f=>{const g=f.box;Object.assign(g,t.chartArea),g.update(B.w,B.h,{left:0,top:0,right:0,bottom:0})})}};class R9{acquireContext(e,x){}releaseContext(e){return!1}addEventListener(e,x,n){}removeEventListener(e,x,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,x,n,i){return x=Math.max(0,x||e.width),n=n||e.height,{width:x,height:Math.max(0,i?Math.floor(x/i):n)}}isAttached(e){return!0}updateConfig(e){}}class j2 extends R9{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const cs="$chartjs",q2={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Il=t=>t===null||t==="";function Y2(t,e){const x=t.style,n=t.getAttribute("height"),i=t.getAttribute("width");if(t[cs]={initial:{height:n,width:i,style:{display:x.display,height:x.height,width:x.width}}},x.display=x.display||"block",x.boxSizing=x.boxSizing||"border-box",Il(i)){const s=Al(t,"width");s!==void 0&&(t.width=s)}if(Il(n))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Al(t,"height");s!==void 0&&(t.height=s)}return t}const O9=X7?{passive:!0}:!1;function J2(t,e,x){t.addEventListener(e,x,O9)}function X2(t,e,x){t.canvas.removeEventListener(e,x,O9)}function Z2(t,e){const x=q2[t.type]||t.type,{x:n,y:i}=Fx(t,e);return{type:x,chart:e,native:t,x:n!==void 0?n:null,y:i!==void 0?i:null}}function Ws(t,e){for(const x of t)if(x===e||x.contains(e))return!0}function Q2(t,e,x){const n=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const r of s)o=o||Ws(r.addedNodes,n),o=o&&!Ws(r.removedNodes,n);o&&x()});return i.observe(document,{childList:!0,subtree:!0}),i}function ep(t,e,x){const n=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const r of s)o=o||Ws(r.removedNodes,n),o=o&&!Ws(r.addedNodes,n);o&&x()});return i.observe(document,{childList:!0,subtree:!0}),i}const ci=new Map;let Pl=0;function L9(){const t=window.devicePixelRatio;t!==Pl&&(Pl=t,ci.forEach((e,x)=>{x.currentDevicePixelRatio!==t&&e()}))}function tp(t,e){ci.size||window.addEventListener("resize",L9),ci.set(t,e)}function xp(t){ci.delete(t),ci.size||window.removeEventListener("resize",L9)}function np(t,e,x){const n=t.canvas,i=n&&wa(n);if(!i)return;const s=A9((r,a)=>{const E=i.clientWidth;x(r,a),E{const a=r[0],E=a.contentRect.width,l=a.contentRect.height;E===0&&l===0||s(E,l)});return o.observe(i),tp(t,s),o}function zo(t,e,x){x&&x.disconnect(),e==="resize"&&xp(t)}function ip(t,e,x){const n=t.canvas,i=A9(s=>{t.ctx!==null&&x(Z2(s,t))},t);return J2(n,e,i),i}class sp extends R9{acquireContext(e,x){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(Y2(e,x),n):null}releaseContext(e){const x=e.canvas;if(!x[cs])return!1;const n=x[cs].initial;["height","width"].forEach(s=>{const o=n[s];He(o)?x.removeAttribute(s):x.setAttribute(s,o)});const i=n.style||{};return Object.keys(i).forEach(s=>{x.style[s]=i[s]}),x.width=x.width,delete x[cs],!0}addEventListener(e,x,n){this.removeEventListener(e,x);const i=e.$proxies||(e.$proxies={}),o={attach:Q2,detach:ep,resize:np}[x]||ip;i[x]=o(e,x,n)}removeEventListener(e,x){const n=e.$proxies||(e.$proxies={}),i=n[x];if(!i)return;({attach:zo,detach:zo,resize:zo}[x]||X2)(e,x,i),n[x]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,x,n,i){return J7(e,x,n,i)}isAttached(e){const x=wa(e);return!!(x&&x.isConnected)}}function op(t){return!v9()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?j2:sp}var Ji;let j0=(Ji=class{constructor(){b(this,"x");b(this,"y");b(this,"active",!1);b(this,"options");b(this,"$animations")}tooltipPosition(e){const{x,y:n}=this.getProps(["x","y"],e);return{x,y:n}}hasValue(){return En(this.x)&&En(this.y)}getProps(e,x){const n=this.$animations;if(!x||!n)return this;const i={};return e.forEach(s=>{i[s]=n[s]&&n[s].active()?n[s]._to:this[s]}),i}},b(Ji,"defaults",{}),b(Ji,"defaultRoutes"),Ji);function rp(t,e){const x=t.options.ticks,n=ap(t),i=Math.min(x.maxTicksLimit||n,n),s=x.major.enabled?lp(e):[],o=s.length,r=s[0],a=s[o-1],E=[];if(o>i)return cp(e,E,s,o/i),E;const l=Ep(s,e,i);if(o>0){let u,h;const B=o>1?Math.round((a-r)/(o-1)):null;for($i(e,E,l,He(B)?0:r-B,r),u=0,h=o-1;ui)return a}return Math.max(i,1)}function lp(t){const e=[];let x,n;for(x=0,n=t.length;xt==="left"?"right":t==="right"?"left":t,kl=(t,e,x)=>e==="top"||e==="left"?t[e]+x:t[e]-x,Ml=(t,e)=>Math.min(e||t,t);function Nl(t,e){const x=[],n=t.length/e,i=t.length;let s=0;for(;so+r)))return a}function Bp(t,e){Ve(t,x=>{const n=x.gc,i=n.length/2;let s;if(i>e){for(s=0;sn?n:x,n=i&&x>n?x:n,{min:Xt(x,Xt(n,x)),max:Xt(n,Xt(x,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Qe(this.options.beforeUpdate,[this])}update(e,x,n){const{beginAtZero:i,grace:s,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=x,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=S7(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=s||n<=1||!this.isHorizontal()){this.labelRotation=i;return}const l=this._getLabelSizes(),u=l.widest.width,h=l.highest.height,B=Ft(this.chart.width-u,0,this.maxWidth);r=e.offset?this.maxWidth/n:B/(n-1),u+6>r&&(r=B/(n-(e.offset?.5:1)),a=this.maxHeight-Fn(e.grid)-x.padding-Rl(e.title,this.chart.options.font),E=Math.sqrt(u*u+h*h),o=Ca(Math.min(Math.asin(Ft((l.highest.height+6)/r,-1,1)),Math.asin(Ft(a/E,-1,1))-Math.asin(Ft(h/E,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:x,options:{ticks:n,title:i,grid:s}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Rl(i,x.options.font);if(r?(e.width=this.maxWidth,e.height=Fn(s)+a):(e.height=this.maxHeight,e.width=Fn(s)+a),n.display&&this.ticks.length){const{first:E,last:l,widest:u,highest:h}=this._getLabelSizes(),B=n.padding*2,p=d0(this.labelRotation),f=Math.cos(p),g=Math.sin(p);if(r){const C=n.mirror?0:g*u.width+f*h.height;e.height=Math.min(this.maxHeight,e.height+C+B)}else{const C=n.mirror?0:f*u.width+g*h.height;e.width=Math.min(this.maxWidth,e.width+C+B)}this._calculatePadding(E,l,g,f)}}this._handleMargins(),r?(this.width=this._length=x.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=x.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,x,n,i){const{ticks:{align:s,padding:o},position:r}=this.options,a=this.labelRotation!==0,E=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const l=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,B=0;a?E?(h=i*e.width,B=n*x.height):(h=n*e.height,B=i*x.width):s==="start"?B=x.width:s==="end"?h=e.width:s!=="inner"&&(h=e.width/2,B=x.width/2),this.paddingLeft=Math.max((h-l+o)*this.width/(this.width-l),0),this.paddingRight=Math.max((B-u+o)*this.width/(this.width-u),0)}else{let l=x.height/2,u=e.height/2;s==="start"?(l=0,u=e.height):s==="end"&&(l=x.height,u=0),this.paddingTop=l+o,this.paddingBottom=u+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Qe(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:x}=this.options;return x==="top"||x==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let x,n;for(x=0,n=e.length;x({width:o[T]||0,height:r[T]||0});return{first:y(0),last:y(x-1),widest:y(D),highest:y(P),widths:o,heights:r}}getLabelForValue(e){return e}getPixelForValue(e,x){return NaN}getValueForPixel(e){}getPixelForTick(e){const x=this.ticks;return e<0||e>x.length-1?null:this.getPixelForValue(x[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const x=this._startPixel+e*this._length;return n7(this._alignToPixels?px(this.chart,x,0):x)}getDecimalForPixel(e){const x=(e-this._startPixel)/this._length;return this._reversePixels?1-x:x}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:x}=this;return e<0&&x<0?x:e>0&&x>0?e:0}getContext(e){const x=this.ticks||[];if(e>=0&&er*i?r/n:a/i:a*i0}_computeGridLineItems(e){const x=this.axis,n=this.chart,i=this.options,{grid:s,position:o,border:r}=i,a=s.offset,E=this.isHorizontal(),u=this.ticks.length+(a?1:0),h=Fn(s),B=[],p=r.setContext(this.getContext()),f=p.display?p.width:0,g=f/2,C=function(te){return px(n,te,f)};let w,M,_,I,D,P,y,T,N,G,W,Ae;if(o==="top")w=C(this.bottom),P=this.bottom-h,T=w-g,G=C(e.top)+g,Ae=e.bottom;else if(o==="bottom")w=C(this.top),G=e.top,Ae=C(e.bottom)-g,P=w+g,T=this.top+h;else if(o==="left")w=C(this.right),D=this.right-h,y=w-g,N=C(e.left)+g,W=e.right;else if(o==="right")w=C(this.left),N=e.left,W=C(e.right)-g,D=w+g,y=this.left+h;else if(x==="x"){if(o==="center")w=C((e.top+e.bottom)/2+.5);else if(Re(o)){const te=Object.keys(o)[0],Z=o[te];w=C(this.chart.scales[te].getPixelForValue(Z))}G=e.top,Ae=e.bottom,P=w+g,T=P+h}else if(x==="y"){if(o==="center")w=C((e.left+e.right)/2);else if(Re(o)){const te=Object.keys(o)[0],Z=o[te];w=C(this.chart.scales[te].getPixelForValue(Z))}D=w-g,y=D-h,N=e.left,W=e.right}const Q=Se(i.ticks.maxTicksLimit,u),ne=Math.max(1,Math.ceil(u/Q));for(M=0;Ms.value===e);return i>=0?x.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const x=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,o;const r=(a,E,l)=>{!l.width||!l.color||(n.save(),n.lineWidth=l.width,n.strokeStyle=l.color,n.setLineDash(l.borderDash||[]),n.lineDashOffset=l.borderDashOffset,n.beginPath(),n.moveTo(a.x,a.y),n.lineTo(E.x,E.y),n.stroke(),n.restore())};if(x.display)for(s=0,o=i.length;s{this.draw(s)}}]:[{z:n,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:x,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const x=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let s,o;for(s=0,o=x.length;s{const n=x.split("."),i=n.pop(),s=[t].concat(n).join("."),o=e[x].split("."),r=o.pop(),a=o.join(".");ht.route(s,i,a,r)})}function Fp(t){return"id"in t&&"defaults"in t}class Dp{constructor(){this.controllers=new Gi(g0,"datasets",!0),this.elements=new Gi(j0,"elements"),this.plugins=new Gi(Object,"plugins"),this.scales=new Gi(Ux,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,x,n){[...x].forEach(i=>{const s=n||this._getRegistryForType(i);n||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):Ve(i,o=>{const r=n||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,x,n){const i=ma(e);Qe(n["before"+i],[],n),x[e](n),Qe(n["after"+i],[],n)}_getRegistryForType(e){for(let x=0;xs.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(i(x,n),e,"stop"),this._notify(i(n,x),e,"start")}}function vp(t){const e={},x=[],n=Object.keys(_0.plugins.items);for(let s=0;s1&&Ol(t[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Ll(t,e,x){if(x[e+"AxisID"]===t)return{axis:e}}function Pp(t,e){if(e.data&&e.data.datasets){const x=e.data.datasets.filter(n=>n.xAxisID===t||n.yAxisID===t);if(x.length)return Ll(t,"x",x[0])||Ll(t,"y",x[0])}return{}}function kp(t,e){const x=Rx[t.type]||{scales:{}},n=e.scales||{},i=br(t.type,e),s=Object.create(null);return Object.keys(n).forEach(o=>{const r=n[o];if(!Re(r))return console.error(`Invalid scale configuration for scale: ${o}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const a=yr(o,r,Pp(o,t),ht.scales[r.type]),E=Tp(a,i),l=x.scales||{};s[o]=zn(Object.create(null),[{axis:a},r,l[a],l[E]])}),t.data.datasets.forEach(o=>{const r=o.type||t.type,a=o.indexAxis||br(r,e),l=(Rx[r]||{}).scales||{};Object.keys(l).forEach(u=>{const h=wp(u,a),B=o[h+"AxisID"]||h;s[B]=s[B]||Object.create(null),zn(s[B],[{axis:h},n[B],l[u]])})}),Object.keys(s).forEach(o=>{const r=s[o];zn(r,[ht.scales[r.type],ht.scale])}),s}function H9(t){const e=t.options||(t.options={});e.plugins=Se(e.plugins,{}),e.scales=kp(t,e)}function U9(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Mp(t){return t=t||{},t.data=U9(t.data),H9(t),t}const Hl=new Map,$9=new Set;function Wi(t,e){let x=Hl.get(t);return x||(x=e(),Hl.set(t,x),$9.add(x)),x}const Dn=(t,e,x)=>{const n=Ex(e,x);n!==void 0&&t.add(n)};class Np{constructor(e){this._config=Mp(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=U9(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),H9(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Wi(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,x){return Wi(`${e}.transition.${x}`,()=>[[`datasets.${e}.transitions.${x}`,`transitions.${x}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,x){return Wi(`${e}-${x}`,()=>[[`datasets.${e}.elements.${x}`,`datasets.${e}`,`elements.${x}`,""]])}pluginScopeKeys(e){const x=e.id,n=this.type;return Wi(`${n}-plugin-${x}`,()=>[[`plugins.${x}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,x){const n=this._scopeCache;let i=n.get(e);return(!i||x)&&(i=new Map,n.set(e,i)),i}getOptionScopes(e,x,n){const{options:i,type:s}=this,o=this._cachedScopes(e,n),r=o.get(x);if(r)return r;const a=new Set;x.forEach(l=>{e&&(a.add(e),l.forEach(u=>Dn(a,e,u))),l.forEach(u=>Dn(a,i,u)),l.forEach(u=>Dn(a,Rx[s]||{},u)),l.forEach(u=>Dn(a,ht,u)),l.forEach(u=>Dn(a,Dr,u))});const E=Array.from(a);return E.length===0&&E.push(Object.create(null)),$9.has(x)&&o.set(x,E),E}chartOptionScopes(){const{options:e,type:x}=this;return[e,Rx[x]||{},ht.datasets[x]||{},{type:x},ht,Dr]}resolveNamedOptions(e,x,n,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:r}=Ul(this._resolverCache,e,i);let a=o;if(Op(o,x)){s.$shared=!1,n=lx(n)?n():n;const E=this.createResolver(e,n,r);a=ln(o,n,E)}for(const E of x)s[E]=a[E];return s}createResolver(e,x,n=[""],i){const{resolver:s}=Ul(this._resolverCache,e,n);return Re(x)?ln(s,x,void 0,i):s}}function Ul(t,e,x){let n=t.get(e);n||(n=new Map,t.set(e,n));const i=x.join();let s=n.get(i);return s||(s={resolver:ba(e,x),subPrefixes:x.filter(r=>!r.toLowerCase().includes("hover"))},n.set(i,s)),s}const Rp=t=>Re(t)&&Object.getOwnPropertyNames(t).reduce((e,x)=>e||lx(t[x]),!1);function Op(t,e){const{isScriptable:x,isIndexable:n}=g9(t);for(const i of e){const s=x(i),o=n(i),r=(o||s)&&t[i];if(s&&(lx(r)||Rp(r))||o&&it(r))return!0}return!1}var Lp="4.3.0";const Hp=["top","bottom","left","right","chartArea"];function $l(t,e){return t==="top"||t==="bottom"||Hp.indexOf(t)===-1&&e==="x"}function Gl(t,e){return function(x,n){return x[t]===n[t]?x[e]-n[e]:x[t]-n[t]}}function Wl(t){const e=t.chart,x=e.options.animation;e.notifyPlugins("afterRender"),Qe(x&&x.onComplete,[t],e)}function Up(t){const e=t.chart,x=e.options.animation;Qe(x&&x.onProgress,[t],e)}function G9(t){return v9()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const us={},zl=t=>{const e=G9(t);return Object.values(us).filter(x=>x.canvas===e).pop()};function $p(t,e,x){const n=Object.keys(t);for(const i of n){const s=+i;if(s>=e){const o=t[i];delete t[i],(x>0||s>e)&&(t[s+x]=o)}}}function Gp(t,e,x,n){return!x||t.type==="mouseout"?null:n?e:t}function Wp(t){const{xScale:e,yScale:x}=t;if(e&&x)return{left:e.left,right:e.right,top:x.top,bottom:x.bottom}}class H0{static register(...e){_0.add(...e),Vl()}static unregister(...e){_0.remove(...e),Vl()}constructor(e,x){const n=this.config=new Np(x),i=G9(e),s=zl(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||op(i)),this.platform.updateConfig(n);const r=this.platform.acquireContext(i,o.aspectRatio),a=r&&r.canvas,E=a&&a.height,l=a&&a.width;if(this.id=Vf(),this.ctx=r,this.canvas=a,this.width=l,this.height=E,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _p,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=r7(u=>this.update(u),o.resizeDelay||0),this._dataChanges=[],us[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}N0.listen(this,"complete",Wl),N0.listen(this,"progress",Up),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:x},width:n,height:i,_aspectRatio:s}=this;return He(e)?x&&s?s:i?n/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return _0}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ul(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return El(this.canvas,this.ctx),this}stop(){return N0.stop(this),this}resize(e,x){N0.running(this)?this._resizeBeforeDraw={width:e,height:x}:this._resize(e,x)}_resize(e,x){const n=this.options,i=this.canvas,s=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,x,s),r=n.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ul(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),Qe(n.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const x=this.options.scales||{};Ve(x,(n,i)=>{n.id=i})}buildOrUpdateScales(){const e=this.options,x=e.scales,n=this.scales,i=Object.keys(n).reduce((o,r)=>(o[r]=!1,o),{});let s=[];x&&(s=s.concat(Object.keys(x).map(o=>{const r=x[o],a=yr(o,r),E=a==="r",l=a==="x";return{options:r,dposition:E?"chartArea":l?"bottom":"left",dtype:E?"radialLinear":l?"category":"linear"}}))),Ve(s,o=>{const r=o.options,a=r.id,E=yr(a,r),l=Se(r.type,o.dtype);(r.position===void 0||$l(r.position,E)!==$l(o.dposition))&&(r.position=o.dposition),i[a]=!0;let u=null;if(a in n&&n[a].type===l)u=n[a];else{const h=_0.getScale(l);u=new h({id:a,type:l,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(r,e)}),Ve(i,(o,r)=>{o||delete n[r]}),Ve(n,o=>{Nt.configure(this,o,o.options),Nt.addBox(this,o)})}_updateMetasets(){const e=this._metasets,x=this.data.datasets.length,n=e.length;if(e.sort((i,s)=>i.index-s.index),n>x){for(let i=x;ix.length&&delete this._stacks,e.forEach((n,i)=>{x.filter(s=>s===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],x=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=x.length;n{this.getDatasetMeta(x).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const x=this.config;x.update();const n=this._options=x.createResolver(x.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let E=0,l=this.data.datasets.length;E{E.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Gl("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){Ve(this.scales,e=>{Nt.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,x=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!el(x,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,x=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:s}of x){const o=n==="_removeElements"?-s:s;$p(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const x=this.data.datasets.length,n=s=>new Set(e.filter(o=>o[0]===s).map((o,r)=>r+","+o.splice(1).join(","))),i=n(0);for(let s=1;ss.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Nt.update(this,this.width,this.height,e);const x=this.chartArea,n=x.width<=0||x.height<=0;this._layers=[],Ve(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let x=0,n=this.data.datasets.length;x=0;--x)this._drawDataset(e[x]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const x=this.ctx,n=e._clip,i=!n.disabled,s=Wp(e)||this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&po(x,{left:n.left===!1?0:s.left-n.left,right:n.right===!1?this.width:s.right+n.right,top:n.top===!1?0:s.top-n.top,bottom:n.bottom===!1?this.height:s.bottom+n.bottom}),e.controller.draw(),i&&go(x),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return W0(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,x,n,i){const s=H2.modes[x];return typeof s=="function"?s(this,e,n,i):[]}getDatasetMeta(e){const x=this.data.datasets[e],n=this._metasets;let i=n.filter(s=>s&&s._dataset===x).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:x&&x.order||0,index:e,_dataset:x,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=Ax(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const x=this.data.datasets[e];if(!x)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!x.hidden}setDatasetVisibility(e,x){const n=this.getDatasetMeta(e);n.hidden=!x}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,x,n){const i=n?"show":"hide",s=this.getDatasetMeta(e),o=s.controller._resolveAnimations(void 0,i);ai(x)?(s.data[x].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(s,{visible:n}),this.update(r=>r.datasetIndex===e?i:void 0))}hide(e,x){this._updateVisibility(e,x,!1)}show(e,x){this._updateVisibility(e,x,!0)}_destroyDatasetMeta(e){const x=this._metasets[e];x&&x.controller&&x.controller._destroy(),delete this._metasets[e]}_stop(){let e,x;for(this.stop(),N0.remove(this),e=0,x=this.data.datasets.length;e{x.addEventListener(this,s,o),e[s]=o},i=(s,o,r)=>{s.offsetX=o,s.offsetY=r,this._eventHandler(s)};Ve(this.options.events,s=>n(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,x=this.platform,n=(a,E)=>{x.addEventListener(this,a,E),e[a]=E},i=(a,E)=>{e[a]&&(x.removeEventListener(this,a,E),delete e[a])},s=(a,E)=>{this.canvas&&this.resize(a,E)};let o;const r=()=>{i("attach",r),this.attached=!0,this.resize(),n("resize",s),n("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),n("attach",r)},x.isAttached(this.canvas)?r():o()}unbindEvents(){Ve(this._listeners,(e,x)=>{this.platform.removeEventListener(this,x,e)}),this._listeners={},Ve(this._responsiveListeners,(e,x)=>{this.platform.removeEventListener(this,x,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,x,n){const i=n?"set":"remove";let s,o,r,a;for(x==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(s);if(!r)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:r.data[o],index:o}});!Ls(n,x)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,x))}notifyPlugins(e,x,n){return this._plugins.notify(this,e,x,n)}isPluginEnabled(e){return this._plugins._cache.filter(x=>x.plugin.id===e).length===1}_updateHoverStyles(e,x,n){const i=this.options.hover,s=(a,E)=>a.filter(l=>!E.some(u=>l.datasetIndex===u.datasetIndex&&l.index===u.index)),o=s(x,e),r=n?e:s(e,x);o.length&&this.updateHoverStyle(o,i.mode,!1),r.length&&i.mode&&this.updateHoverStyle(r,i.mode,!0)}_eventHandler(e,x){const n={event:e,replay:x,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;const s=this._handleEvent(e,x,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(s||n.changed)&&this.render(),this}_handleEvent(e,x,n){const{_active:i=[],options:s}=this,o=x,r=this._getActiveElements(e,i,n,o),a=Xf(e),E=Gp(e,this._lastEvent,n,a);n&&(this._lastEvent=null,Qe(s.onHover,[e,r,this],this),a&&Qe(s.onClick,[e,r,this],this));const l=!Ls(r,i);return(l||x)&&(this._active=r,this._updateHoverStyles(r,i,x)),this._lastEvent=E,l}_getActiveElements(e,x,n,i){if(e.type==="mouseout")return[];if(!n)return x;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}}b(H0,"defaults",ht),b(H0,"instances",us),b(H0,"overrides",Rx),b(H0,"registry",_0),b(H0,"version",Lp),b(H0,"getChart",zl);function Vl(){return Ve(H0.instances,t=>t._plugins.invalidate())}function zp(t,e,x){const{startAngle:n,pixelMargin:i,x:s,y:o,outerRadius:r,innerRadius:a}=e;let E=i/r;t.beginPath(),t.arc(s,o,r,n-E,x+E),a>i?(E=i/a,t.arc(s,o,a,x+E,n-E,!0)):t.arc(s,o,i,x+At,n-At),t.closePath(),t.clip()}function Vp(t){return va(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Kp(t,e,x,n){const i=Vp(t.options.borderRadius),s=(x-e)/2,o=Math.min(s,n*e/2),r=a=>{const E=(x-Math.min(s,a))*n/2;return Ft(a,0,Math.min(s,E))};return{outerStart:r(i.outerStart),outerEnd:r(i.outerEnd),innerStart:Ft(i.innerStart,0,o),innerEnd:Ft(i.innerEnd,0,o)}}function Vx(t,e,x,n){return{x:x+t*Math.cos(e),y:n+t*Math.sin(e)}}function zs(t,e,x,n,i,s){const{x:o,y:r,startAngle:a,pixelMargin:E,innerRadius:l}=e,u=Math.max(e.outerRadius+n+x-E,0),h=l>0?l+n+x+E:0;let B=0;const p=i-a;if(n){const ne=l>0?l-n:0,te=u>0?u-n:0,Z=(ne+te)/2,K=Z!==0?p*Z/(Z+n):p;B=(p-K)/2}const f=Math.max(.001,p*u-x/lt)/u,g=(p-f)/2,C=a+g+B,w=i-g-B,{outerStart:M,outerEnd:_,innerStart:I,innerEnd:D}=Kp(e,h,u,w-C),P=u-M,y=u-_,T=C+M/P,N=w-_/y,G=h+I,W=h+D,Ae=C+I/G,Q=w-D/W;if(t.beginPath(),s){const ne=(T+N)/2;if(t.arc(o,r,u,T,ne),t.arc(o,r,u,ne,N),_>0){const J=Vx(y,N,o,r);t.arc(J.x,J.y,_,N,w+At)}const te=Vx(W,w,o,r);if(t.lineTo(te.x,te.y),D>0){const J=Vx(W,Q,o,r);t.arc(J.x,J.y,D,w+At,Q+Math.PI)}const Z=(w-D/h+(C+I/h))/2;if(t.arc(o,r,h,w-D/h,Z,!0),t.arc(o,r,h,Z,C+I/h,!0),I>0){const J=Vx(G,Ae,o,r);t.arc(J.x,J.y,I,Ae+Math.PI,C-At)}const K=Vx(P,C,o,r);if(t.lineTo(K.x,K.y),M>0){const J=Vx(P,T,o,r);t.arc(J.x,J.y,M,C-At,T)}}else{t.moveTo(o,r);const ne=Math.cos(T)*u+o,te=Math.sin(T)*u+r;t.lineTo(ne,te);const Z=Math.cos(N)*u+o,K=Math.sin(N)*u+r;t.lineTo(Z,K)}t.closePath()}function jp(t,e,x,n,i){const{fullCircles:s,startAngle:o,circumference:r}=e;let a=e.endAngle;if(s){zs(t,e,x,n,a,i);for(let E=0;E=st||Ei(o,a,E),g=$0(r,l+B,u+B);return f&&g}getCenterPoint(x){const{x:n,y:i,startAngle:s,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],x),{offset:E,spacing:l}=this.options,u=(s+o)/2,h=(r+a+l+E)/2;return{x:n+Math.cos(u)*h,y:i+Math.sin(u)*h}}tooltipPosition(x){return this.getCenterPoint(x)}draw(x){const{options:n,circumference:i}=this,s=(n.offset||0)/4,o=(n.spacing||0)/2,r=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=i>st?Math.floor(i/st):0,i===0||this.innerRadius<0||this.outerRadius<0)return;x.save();const a=(this.startAngle+this.endAngle)/2;x.translate(Math.cos(a)*s,Math.sin(a)*s);const E=1-Math.sin(Math.min(lt,i||0)),l=s*E;x.fillStyle=n.backgroundColor,x.strokeStyle=n.borderColor,jp(x,this,l,o,r),qp(x,this,l,o,r),x.restore()}}b(kn,"id","arc"),b(kn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),b(kn,"defaultRoutes",{backgroundColor:"backgroundColor"}),b(kn,"descriptors",{_scriptable:!0,_indexable:x=>x!=="borderDash"});function W9(t,e,x=e){t.lineCap=Se(x.borderCapStyle,e.borderCapStyle),t.setLineDash(Se(x.borderDash,e.borderDash)),t.lineDashOffset=Se(x.borderDashOffset,e.borderDashOffset),t.lineJoin=Se(x.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Se(x.borderWidth,e.borderWidth),t.strokeStyle=Se(x.borderColor,e.borderColor)}function Yp(t,e,x){t.lineTo(x.x,x.y)}function Jp(t){return t.stepped?g7:t.tension||t.cubicInterpolationMode==="monotone"?m7:Yp}function z9(t,e,x={}){const n=t.length,{start:i=0,end:s=n-1}=x,{start:o,end:r}=e,a=Math.max(i,o),E=Math.min(s,r),l=ir&&s>r;return{count:n,start:a,loop:e.loop,ilen:E(o+(E?r-_:_))%s,M=()=>{f!==g&&(t.lineTo(l,g),t.lineTo(l,f),t.lineTo(l,C))};for(a&&(B=i[w(0)],t.moveTo(B.x,B.y)),h=0;h<=r;++h){if(B=i[w(h)],B.skip)continue;const _=B.x,I=B.y,D=_|0;D===p?(Ig&&(g=I),l=(u*l+_)/++u):(M(),t.lineTo(_,I),p=D,u=0,f=g=I),C=I}M()}function Sr(t){const e=t.options,x=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!x?Zp:Xp}function Qp(t){return t.stepped?Z7:t.tension||t.cubicInterpolationMode==="monotone"?Q7:Dx}function eg(t,e,x,n){let i=e._path;i||(i=e._path=new Path2D,e.path(i,x,n)&&i.closePath()),W9(t,e.options),t.stroke(i)}function tg(t,e,x,n){const{segments:i,options:s}=e,o=Sr(e);for(const r of i)W9(t,s,r.style),t.beginPath(),o(t,e,r,{start:x,end:x+n-1})&&t.closePath(),t.stroke()}const xg=typeof Path2D=="function";function ng(t,e,x,n){xg&&!e.options.segment?eg(t,e,x,n):tg(t,e,x,n)}class Q0 extends j0{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,x){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;z7(this._points,n,e,i,x),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=s2(this,this.options.segment))}first(){const e=this.segments,x=this.points;return e.length&&x[e[0].start]}last(){const e=this.segments,x=this.points,n=e.length;return n&&x[e[n-1].end]}interpolate(e,x){const n=this.options,i=e[x],s=this.points,o=T9(this,{property:x,start:i,end:i});if(!o.length)return;const r=[],a=Qp(n);let E,l;for(E=0,l=o.length;Ee!=="borderDash"&&e!=="fill"});function Kl(t,e,x,n){const i=t.options,{[x]:s}=t.getProps([x],n);return Math.abs(e-s)t.replace("rgb(","rgba(").replace(")",", 0.5)"));function K9(t){return wr[t%wr.length]}function j9(t){return jl[t%jl.length]}function lg(t,e){return t.borderColor=K9(e),t.backgroundColor=j9(e),++e}function cg(t,e){return t.backgroundColor=t.data.map(()=>K9(e++)),e}function ug(t,e){return t.backgroundColor=t.data.map(()=>j9(e++)),e}function Ag(t){let e=0;return(x,n)=>{const i=t.getDatasetMeta(n).controller;i instanceof wx?e=cg(x,e):i instanceof qn?e=ug(x,e):i&&(e=lg(x,e))}}function ql(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function hg(t){return t&&(t.borderColor||t.backgroundColor)}var Bg={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,x){if(!x.enabled)return;const{data:{datasets:n},options:i}=t.config,{elements:s}=i;if(!x.forceOverride&&(ql(n)||hg(i)||s&&ql(s)))return;const o=Ag(t);n.forEach(o)}};function dg(t,e,x,n,i){const s=i.samples||n;if(s>=x)return t.slice(e,e+x);const o=[],r=(x-2)/(s-2);let a=0;const E=e+x-1;let l=e,u,h,B,p,f;for(o[a++]=t[l],u=0;uB&&(B=p,h=t[w],f=w);o[a++]=h,l=f}return o[a++]=t[E],o}function fg(t,e,x,n){let i=0,s=0,o,r,a,E,l,u,h,B,p,f;const g=[],C=e+x-1,w=t[e].x,_=t[C].x-w;for(o=e;of&&(f=E,h=o),i=(s*i+r.x)/++s;else{const D=o-1;if(!He(u)&&!He(h)){const P=Math.min(u,h),y=Math.max(u,h);P!==B&&P!==D&&g.push({...t[P],x:i}),y!==B&&y!==D&&g.push({...t[y],x:i})}o>0&&D!==B&&g.push(t[D]),g.push(r),l=I,s=0,p=f=E,u=h=B=o}}return g}function q9(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Yl(t){t.data.datasets.forEach(e=>{q9(e)})}function pg(t,e){const x=e.length;let n=0,i;const{iScale:s}=t,{min:o,max:r,minDefined:a,maxDefined:E}=s.getUserBounds();return a&&(n=Ft(G0(e,s.axis,o).lo,0,x-1)),E?i=Ft(G0(e,s.axis,r).hi+1,n,x)-n:i=x-n,{start:n,count:i}}var gg={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,x)=>{if(!x.enabled){Yl(t);return}const n=t.width;t.data.datasets.forEach((i,s)=>{const{_data:o,indexAxis:r}=i,a=t.getDatasetMeta(s),E=o||i.data;if(In([r,t.options.indexAxis])==="y"||!a.controller.supportsDecimation)return;const l=t.scales[a.xAxisID];if(l.type!=="linear"&&l.type!=="time"||t.options.parsing)return;let{start:u,count:h}=pg(a,E);const B=x.threshold||4*n;if(h<=B){q9(i);return}He(o)&&(i._data=E,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(f){this._data=f}}));let p;switch(x.algorithm){case"lttb":p=dg(E,u,h,n,x);break;case"min-max":p=fg(E,u,h,n);break;default:throw new Error(`Unsupported decimation algorithm '${x.algorithm}'`)}i._decimated=p})},destroy(t){Yl(t)}};function mg(t,e,x){const n=t.segments,i=t.points,s=e.points,o=[];for(const r of n){let{start:a,end:E}=r;E=Ia(a,E,i);const l=Tr(x,i[a],i[E],r.loop);if(!e.segments){o.push({source:r,target:l,start:i[a],end:i[E]});continue}const u=T9(e,l);for(const h of u){const B=Tr(x,s[h.start],s[h.end],h.loop),p=w9(r,i,B);for(const f of p)o.push({source:f,target:h,start:{[x]:Jl(l,B,"start",Math.max)},end:{[x]:Jl(l,B,"end",Math.min)}})}}return o}function Tr(t,e,x,n){if(n)return;let i=e[t],s=x[t];return t==="angle"&&(i=e0(i),s=e0(s)),{property:t,start:i,end:s}}function Cg(t,e){const{x=null,y:n=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:o,end:r})=>{r=Ia(o,r,i);const a=i[o],E=i[r];n!==null?(s.push({x:a.x,y:n}),s.push({x:E.x,y:n})):x!==null&&(s.push({x,y:a.y}),s.push({x,y:E.y}))}),s}function Ia(t,e,x){for(;e>t;e--){const n=x[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function Jl(t,e,x,n){return t&&e?n(t[x],e[x]):t?t[x]:e?e[x]:0}function Y9(t,e){let x=[],n=!1;return it(t)?(n=!0,x=t):x=Cg(t,e),x.length?new Q0({points:x,options:{tension:0},_loop:n,_fullLoop:n}):null}function Xl(t){return t&&t.fill!==!1}function Fg(t,e,x){let i=t[e].fill;const s=[e];let o;if(!x)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!ut(i))return i;if(o=t[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function Dg(t,e,x){const n=yg(t);if(Re(n))return isNaN(n.value)?!1:n;let i=parseFloat(n);return ut(i)&&Math.floor(i)===i?_g(n[0],e,i,x):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function _g(t,e,x,n){return(t==="-"||t==="+")&&(x=e+x),x===e||x<0||x>=n?!1:x}function vg(t,e){let x=null;return t==="start"?x=e.bottom:t==="end"?x=e.top:Re(t)?x=e.getPixelForValue(t.value):e.getBasePixel&&(x=e.getBasePixel()),x}function bg(t,e,x){let n;return t==="start"?n=x:t==="end"?n=e.options.reverse?e.min:e.max:Re(t)?n=t.value:n=e.getBaseValue(),n}function yg(t){const e=t.options,x=e.fill;let n=Se(x&&x.target,x);return n===void 0&&(n=!!e.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Sg(t){const{scale:e,index:x,line:n}=t,i=[],s=n.segments,o=n.points,r=wg(e,x);r.push(Y9({x:null,y:e.bottom},n));for(let a=0;a=0;--o){const r=i[o].$filler;r&&(r.line.updateControlPoints(s,r.axis),n&&r.fill&&jo(t.ctx,r,s))}},beforeDatasetsDraw(t,e,x){if(x.drawTime!=="beforeDatasetsDraw")return;const n=t.getSortedVisibleDatasetMetas();for(let i=n.length-1;i>=0;--i){const s=n[i].$filler;Xl(s)&&jo(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,x){const n=e.meta.$filler;!Xl(n)||x.drawTime!=="beforeDatasetDraw"||jo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const tc=(t,e)=>{let{boxHeight:x=e,boxWidth:n=e}=t;return t.usePointStyle&&(x=Math.min(x,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:x,itemHeight:Math.max(e,x)}},Ug=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class xc extends j0{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,x,n){this.maxWidth=e,this.maxHeight=x,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let x=Qe(e.generateLabels,[this.chart],this)||[];e.filter&&(x=x.filter(n=>e.filter(n,this.chart.data))),e.sort&&(x=x.sort((n,i)=>e.sort(n,i,this.chart.data))),this.options.reverse&&x.reverse(),this.legendItems=x}fit(){const{options:e,ctx:x}=this;if(!e.display){this.width=this.height=0;return}const n=e.labels,i=mt(n.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:r,itemHeight:a}=tc(n,s);let E,l;x.font=i.string,this.isHorizontal()?(E=this.maxWidth,l=this._fitRows(o,s,r,a)+10):(l=this.maxHeight,E=this._fitCols(o,i,r,a)+10),this.width=Math.min(E,e.maxWidth||this.maxWidth),this.height=Math.min(l,e.maxHeight||this.maxHeight)}_fitRows(e,x,n,i){const{ctx:s,maxWidth:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],E=this.lineWidths=[0],l=i+r;let u=e;s.textAlign="left",s.textBaseline="middle";let h=-1,B=-l;return this.legendItems.forEach((p,f)=>{const g=n+x/2+s.measureText(p.text).width;(f===0||E[E.length-1]+g+2*r>o)&&(u+=l,E[E.length-(f>0?0:1)]=0,B+=l,h++),a[f]={left:0,top:B,row:h,width:g,height:i},E[E.length-1]+=g+r}),u}_fitCols(e,x,n,i){const{ctx:s,maxHeight:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],E=this.columnSizes=[],l=o-e;let u=r,h=0,B=0,p=0,f=0;return this.legendItems.forEach((g,C)=>{const{itemWidth:w,itemHeight:M}=$g(n,x,s,g,i);C>0&&B+M+2*r>l&&(u+=h+r,E.push({width:h,height:B}),p+=h+r,f++,h=B=0),a[C]={left:p,top:B,col:f,width:w,height:M},h=Math.max(h,w),B+=M+r}),u+=h,E.push({width:h,height:B}),u}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:x,options:{align:n,labels:{padding:i},rtl:s}}=this,o=nn(s,this.left,this.width);if(this.isHorizontal()){let r=0,a=wt(n,this.left+i,this.right-this.lineWidths[r]);for(const E of x)r!==E.row&&(r=E.row,a=wt(n,this.left+i,this.right-this.lineWidths[r])),E.top+=this.top+e+i,E.left=o.leftForLtr(o.x(a),E.width),a+=E.width+i}else{let r=0,a=wt(n,this.top+e+i,this.bottom-this.columnSizes[r].height);for(const E of x)E.col!==r&&(r=E.col,a=wt(n,this.top+e+i,this.bottom-this.columnSizes[r].height)),E.top=a,E.left+=this.left+i,E.left=o.leftForLtr(o.x(E.left),E.width),a+=E.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;po(e,this),this._draw(),go(e)}}_draw(){const{options:e,columnSizes:x,lineWidths:n,ctx:i}=this,{align:s,labels:o}=e,r=ht.color,a=nn(e.rtl,this.left,this.width),E=mt(o.font),{padding:l}=o,u=E.size,h=u/2;let B;this.drawTitle(),i.textAlign=a.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=E.string;const{boxWidth:p,boxHeight:f,itemHeight:g}=tc(o,u),C=function(D,P,y){if(isNaN(p)||p<=0||isNaN(f)||f<0)return;i.save();const T=Se(y.lineWidth,1);if(i.fillStyle=Se(y.fillStyle,r),i.lineCap=Se(y.lineCap,"butt"),i.lineDashOffset=Se(y.lineDashOffset,0),i.lineJoin=Se(y.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Se(y.strokeStyle,r),i.setLineDash(Se(y.lineDash,[])),o.usePointStyle){const N={radius:f*Math.SQRT2/2,pointStyle:y.pointStyle,rotation:y.rotation,borderWidth:T},G=a.xPlus(D,p/2),W=P+h;f9(i,N,G,W,o.pointStyleWidth&&p)}else{const N=P+Math.max((u-f)/2,0),G=a.leftForLtr(D,p),W=kx(y.borderRadius);i.beginPath(),Object.values(W).some(Ae=>Ae!==0)?li(i,{x:G,y:N,w:p,h:f,radius:W}):i.rect(G,N,p,f),i.fill(),T!==0&&i.stroke()}i.restore()},w=function(D,P,y){Ox(i,y.text,D,P+g/2,E,{strikethrough:y.hidden,textAlign:a.textAlign(y.textAlign)})},M=this.isHorizontal(),_=this._computeTitleHeight();M?B={x:wt(s,this.left+l,this.right-n[0]),y:this.top+l+_,line:0}:B={x:this.left+l,y:wt(s,this.top+_+l,this.bottom-x[0].height),line:0},b9(this.ctx,e.textDirection);const I=g+l;this.legendItems.forEach((D,P)=>{i.strokeStyle=D.fontColor,i.fillStyle=D.fontColor;const y=i.measureText(D.text).width,T=a.textAlign(D.textAlign||(D.textAlign=o.textAlign)),N=p+h+y;let G=B.x,W=B.y;a.setWidth(this.width),M?P>0&&G+N+l>this.right&&(W=B.y+=I,B.line++,G=B.x=wt(s,this.left+l,this.right-n[B.line])):P>0&&W+I>this.bottom&&(G=B.x=G+x[B.line].width+l,B.line++,W=B.y=wt(s,this.top+_+l,this.bottom-x[B.line].height));const Ae=a.x(G);if(C(Ae,W,D),G=a7(T,G+p+h,M?G+N:this.right,e.rtl),w(a.x(G),W,D),M)B.x+=N+l;else if(typeof D.text!="string"){const Q=E.lineHeight;B.y+=X9(D,Q)}else B.y+=I}),y9(this.ctx,e.textDirection)}drawTitle(){const e=this.options,x=e.title,n=mt(x.font),i=Rt(x.padding);if(!x.display)return;const s=nn(e.rtl,this.left,this.width),o=this.ctx,r=x.position,a=n.size/2,E=i.top+a;let l,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),l=this.top+E,u=wt(e.align,u,this.right-h);else{const p=this.columnSizes.reduce((f,g)=>Math.max(f,g.height),0);l=E+wt(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const B=wt(r,u,u+h);o.textAlign=s.textAlign(Da(r)),o.textBaseline="middle",o.strokeStyle=x.color,o.fillStyle=x.color,o.font=n.string,Ox(o,x.text,B,l,n)}_computeTitleHeight(){const e=this.options.title,x=mt(e.font),n=Rt(e.padding);return e.display?x.lineHeight+n.height:0}_getLegendItemAt(e,x){let n,i,s;if($0(e,this.left,this.right)&&$0(x,this.top,this.bottom)){for(s=this.legendHitBoxes,n=0;ns.length>o.length?s:o)),e+x.size/2+n.measureText(i).width}function Wg(t,e,x){let n=t;return typeof e.text!="string"&&(n=X9(e,x)),n}function X9(t,e){const x=t.text?t.text.length+.5:0;return e*x}function zg(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var Vg={id:"legend",_element:xc,start(t,e,x){const n=t.legend=new xc({ctx:t.ctx,options:x,chart:t});Nt.configure(t,n,x),Nt.addBox(t,n)},stop(t){Nt.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,x){const n=t.legend;Nt.configure(t,n,x),n.options=x},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,x){const n=e.datasetIndex,i=x.chart;i.isDatasetVisible(n)?(i.hide(n),e.hidden=!0):(i.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:x,pointStyle:n,textAlign:i,color:s,useBorderRadius:o,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map(a=>{const E=a.controller.getStyle(x?0:void 0),l=Rt(E.borderWidth);return{text:e[a.index].label,fillStyle:E.backgroundColor,fontColor:s,hidden:!a.visible,lineCap:E.borderCapStyle,lineDash:E.borderDash,lineDashOffset:E.borderDashOffset,lineJoin:E.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:E.borderColor,pointStyle:n||E.pointStyle,rotation:E.rotation,textAlign:i||E.textAlign,borderRadius:o&&(r||E.borderRadius),datasetIndex:a.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Pa extends j0{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,x){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=x;const i=it(n.text)?n.text.length:1;this._padding=Rt(n.padding);const s=i*mt(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:x,left:n,bottom:i,right:s,options:o}=this,r=o.align;let a=0,E,l,u;return this.isHorizontal()?(l=wt(r,n,s),u=x+e,E=s-n):(o.position==="left"?(l=n+e,u=wt(r,i,x),a=lt*-.5):(l=s-e,u=wt(r,x,i),a=lt*.5),E=i-x),{titleX:l,titleY:u,maxWidth:E,rotation:a}}draw(){const e=this.ctx,x=this.options;if(!x.display)return;const n=mt(x.font),s=n.lineHeight/2+this._padding.top,{titleX:o,titleY:r,maxWidth:a,rotation:E}=this._drawArgs(s);Ox(e,x.text,0,0,n,{color:x.color,maxWidth:a,rotation:E,textAlign:Da(x.align),textBaseline:"middle",translation:[o,r]})}}function Kg(t,e){const x=new Pa({ctx:t.ctx,options:e,chart:t});Nt.configure(t,x,e),Nt.addBox(t,x),t.titleBlock=x}var jg={id:"title",_element:Pa,start(t,e,x){Kg(t,x)},stop(t){const e=t.titleBlock;Nt.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,x){const n=t.titleBlock;Nt.configure(t,n,x),n.options=x},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const zi=new WeakMap;var qg={id:"subtitle",start(t,e,x){const n=new Pa({ctx:t.ctx,options:x,chart:t});Nt.configure(t,n,x),Nt.addBox(t,n),zi.set(t,n)},stop(t){Nt.removeBox(t,zi.get(t)),zi.delete(t)},beforeUpdate(t,e,x){const n=zi.get(t);Nt.configure(t,n,x),n.options=x},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Mn={average(t){if(!t.length)return!1;let e,x,n=0,i=0,s=0;for(e=0,x=t.length;e-1?t.split(` +`):t}function Yg(t,e){const{element:x,datasetIndex:n,index:i}=e,s=t.getDatasetMeta(n).controller,{label:o,value:r}=s.getLabelAndValue(i);return{chart:t,label:o,parsed:s.getParsed(i),raw:t.data.datasets[n].data[i],formattedValue:r,dataset:s.getDataset(),dataIndex:i,datasetIndex:n,element:x}}function nc(t,e){const x=t.chart.ctx,{body:n,footer:i,title:s}=t,{boxWidth:o,boxHeight:r}=e,a=mt(e.bodyFont),E=mt(e.titleFont),l=mt(e.footerFont),u=s.length,h=i.length,B=n.length,p=Rt(e.padding);let f=p.height,g=0,C=n.reduce((_,I)=>_+I.before.length+I.lines.length+I.after.length,0);if(C+=t.beforeBody.length+t.afterBody.length,u&&(f+=u*E.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),C){const _=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;f+=B*_+(C-B)*a.lineHeight+(C-1)*e.bodySpacing}h&&(f+=e.footerMarginTop+h*l.lineHeight+(h-1)*e.footerSpacing);let w=0;const M=function(_){g=Math.max(g,x.measureText(_).width+w)};return x.save(),x.font=E.string,Ve(t.title,M),x.font=a.string,Ve(t.beforeBody.concat(t.afterBody),M),w=e.displayColors?o+2+e.boxPadding:0,Ve(n,_=>{Ve(_.before,M),Ve(_.lines,M),Ve(_.after,M)}),w=0,x.font=l.string,Ve(t.footer,M),x.restore(),g+=p.width,{width:g,height:f}}function Jg(t,e){const{y:x,height:n}=e;return xt.height-n/2?"bottom":"center"}function Xg(t,e,x,n){const{x:i,width:s}=n,o=x.caretSize+x.caretPadding;if(t==="left"&&i+s+o>e.width||t==="right"&&i-s-o<0)return!0}function Zg(t,e,x,n){const{x:i,width:s}=x,{width:o,chartArea:{left:r,right:a}}=t;let E="center";return n==="center"?E=i<=(r+a)/2?"left":"right":i<=s/2?E="left":i>=o-s/2&&(E="right"),Xg(E,t,e,x)&&(E="center"),E}function ic(t,e,x){const n=x.yAlign||e.yAlign||Jg(t,x);return{xAlign:x.xAlign||e.xAlign||Zg(t,e,x,n),yAlign:n}}function Qg(t,e){let{x,width:n}=t;return e==="right"?x-=n:e==="center"&&(x-=n/2),x}function em(t,e,x){let{y:n,height:i}=t;return e==="top"?n+=x:e==="bottom"?n-=i+x:n-=i/2,n}function sc(t,e,x,n){const{caretSize:i,caretPadding:s,cornerRadius:o}=t,{xAlign:r,yAlign:a}=x,E=i+s,{topLeft:l,topRight:u,bottomLeft:h,bottomRight:B}=kx(o);let p=Qg(e,r);const f=em(e,a,E);return a==="center"?r==="left"?p+=E:r==="right"&&(p-=E):r==="left"?p-=Math.max(l,h)+i:r==="right"&&(p+=Math.max(u,B)+i),{x:Ft(p,0,n.width-e.width),y:Ft(f,0,n.height-e.height)}}function Vi(t,e,x){const n=Rt(x.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-n.right:t.x+n.left}function oc(t){return D0([],R0(t))}function tm(t,e,x){return Ax(t,{tooltip:e,tooltipItems:x,type:"tooltip"})}function rc(t,e){const x=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return x?t.override(x):t}const Z9={beforeTitle:P0,title(t){if(t.length>0){const e=t[0],x=e.chart.data.labels,n=x?x.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"u"?Z9[e].call(x,n):i}class Ir extends j0{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const x=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&x.options.animation&&n.animations,s=new I9(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=tm(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,x){const{callbacks:n}=x,i=zt(n,"beforeTitle",this,e),s=zt(n,"title",this,e),o=zt(n,"afterTitle",this,e);let r=[];return r=D0(r,R0(i)),r=D0(r,R0(s)),r=D0(r,R0(o)),r}getBeforeBody(e,x){return oc(zt(x.callbacks,"beforeBody",this,e))}getBody(e,x){const{callbacks:n}=x,i=[];return Ve(e,s=>{const o={before:[],lines:[],after:[]},r=rc(n,s);D0(o.before,R0(zt(r,"beforeLabel",this,s))),D0(o.lines,zt(r,"label",this,s)),D0(o.after,R0(zt(r,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(e,x){return oc(zt(x.callbacks,"afterBody",this,e))}getFooter(e,x){const{callbacks:n}=x,i=zt(n,"beforeFooter",this,e),s=zt(n,"footer",this,e),o=zt(n,"afterFooter",this,e);let r=[];return r=D0(r,R0(i)),r=D0(r,R0(s)),r=D0(r,R0(o)),r}_createItems(e){const x=this._active,n=this.chart.data,i=[],s=[],o=[];let r=[],a,E;for(a=0,E=x.length;ae.filter(l,u,h,n))),e.itemSort&&(r=r.sort((l,u)=>e.itemSort(l,u,n))),Ve(r,l=>{const u=rc(e.callbacks,l);i.push(zt(u,"labelColor",this,l)),s.push(zt(u,"labelPointStyle",this,l)),o.push(zt(u,"labelTextColor",this,l))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=r,r}update(e,x){const n=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const r=Mn[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const a=this._size=nc(this,n),E=Object.assign({},r,a),l=ic(this.chart,n,E),u=sc(n,E,l,this.chart);this.xAlign=l.xAlign,this.yAlign=l.yAlign,s={opacity:1,x:u.x,y:u.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:x})}drawCaret(e,x,n,i){const s=this.getCaretPosition(e,n,i);x.lineTo(s.x1,s.y1),x.lineTo(s.x2,s.y2),x.lineTo(s.x3,s.y3)}getCaretPosition(e,x,n){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:r}=n,{topLeft:a,topRight:E,bottomLeft:l,bottomRight:u}=kx(r),{x:h,y:B}=e,{width:p,height:f}=x;let g,C,w,M,_,I;return s==="center"?(_=B+f/2,i==="left"?(g=h,C=g-o,M=_+o,I=_-o):(g=h+p,C=g+o,M=_-o,I=_+o),w=g):(i==="left"?C=h+Math.max(a,l)+o:i==="right"?C=h+p-Math.max(E,u)-o:C=this.caretX,s==="top"?(M=B,_=M-o,g=C-o,w=C+o):(M=B+f,_=M+o,g=C+o,w=C-o),I=M),{x1:g,x2:C,x3:w,y1:M,y2:_,y3:I}}drawTitle(e,x,n){const i=this.title,s=i.length;let o,r,a;if(s){const E=nn(n.rtl,this.x,this.width);for(e.x=Vi(this,n.titleAlign,n),x.textAlign=E.textAlign(n.titleAlign),x.textBaseline="middle",o=mt(n.titleFont),r=n.titleSpacing,x.fillStyle=n.titleColor,x.font=o.string,a=0;aw!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,li(e,{x:f,y:p,w:E,h:a,radius:C}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),li(e,{x:g,y:p+1,w:E-2,h:a-2,radius:C}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(f,p,E,a),e.strokeRect(f,p,E,a),e.fillStyle=o.backgroundColor,e.fillRect(g,p+1,E-2,a-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,x,n){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:E,boxPadding:l}=n,u=mt(n.bodyFont);let h=u.lineHeight,B=0;const p=nn(n.rtl,this.x,this.width),f=function(y){x.fillText(y,p.x(e.x+B),e.y+h/2),e.y+=h+s},g=p.textAlign(o);let C,w,M,_,I,D,P;for(x.textAlign=o,x.textBaseline="middle",x.font=u.string,e.x=Vi(this,g,n),x.fillStyle=n.bodyColor,Ve(this.beforeBody,f),B=r&&g!=="right"?o==="center"?E/2+l:E+2+l:0,_=0,D=i.length;_0&&x.stroke()}_updateAnimationTarget(e){const x=this.chart,n=this.$animations,i=n&&n.x,s=n&&n.y;if(i||s){const o=Mn[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=nc(this,e),a=Object.assign({},o,this._size),E=ic(x,e,a),l=sc(e,a,E,x);(i._to!==l.x||s._to!==l.y)&&(this.xAlign=E.xAlign,this.yAlign=E.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const x=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(x);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=Rt(x.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;x.enabled&&r&&(e.save(),e.globalAlpha=n,this.drawBackground(s,e,i,x),b9(e,x.textDirection),s.y+=o.top,this.drawTitle(s,e,x),this.drawBody(s,e,x),this.drawFooter(s,e,x),y9(e,x.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,x){const n=this._active,i=e.map(({datasetIndex:r,index:a})=>{const E=this.chart.getDatasetMeta(r);if(!E)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:E.data[a],index:a}}),s=!Ls(n,i),o=this._positionChanged(i,x);(s||o)&&(this._active=i,this._eventPosition=x,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,x,n=!0){if(x&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(e,s,x,n),r=this._positionChanged(o,e),a=x||!Ls(o,s)||r;return a&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,x))),a}_getActiveElements(e,x,n,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return x;const o=this.chart.getElementsAtEventForMode(e,s.mode,s,n);return s.reverse&&o.reverse(),o}_positionChanged(e,x){const{caretX:n,caretY:i,options:s}=this,o=Mn[s.position].call(this,e,x);return o!==!1&&(n!==o.x||i!==o.y)}}b(Ir,"positioners",Mn);var xm={id:"tooltip",_element:Ir,positioners:Mn,afterInit(t,e,x){x&&(t.tooltip=new Ir({chart:t,options:x}))},beforeUpdate(t,e,x){t.tooltip&&t.tooltip.initialize(x)},reset(t,e,x){t.tooltip&&t.tooltip.initialize(x)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const x={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...x,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",x)}},afterEvent(t,e){if(t.tooltip){const x=e.replay;t.tooltip.handleEvent(e.event,x,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Z9},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},nm=Object.freeze({__proto__:null,Colors:Bg,Decimation:gg,Filler:Hg,Legend:Vg,SubTitle:qg,Title:jg,Tooltip:xm});const im=(t,e,x,n)=>(typeof e=="string"?(x=t.push(e)-1,n.unshift({index:x,label:e})):isNaN(e)&&(x=null),x);function sm(t,e,x,n){const i=t.indexOf(e);if(i===-1)return im(t,e,x,n);const s=t.lastIndexOf(e);return i!==s?x:i}const om=(t,e)=>t===null?null:Ft(Math.round(t),0,e);function ac(t){const e=this.getLabels();return t>=0&&tx.length-1?null:this.getPixelForValue(x[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}b(Pr,"id","category"),b(Pr,"defaults",{ticks:{callback:ac}});function rm(t,e){const x=[],{bounds:i,step:s,min:o,max:r,precision:a,count:E,maxTicks:l,maxDigits:u,includeBounds:h}=t,B=s||1,p=l-1,{min:f,max:g}=e,C=!He(o),w=!He(r),M=!He(E),_=(g-f)/(u+1);let I=xl((g-f)/p/B)*B,D,P,y,T;if(I<1e-14&&!C&&!w)return[{value:f},{value:g}];T=Math.ceil(g/I)-Math.floor(f/I),T>p&&(I=xl(T*I/p/B)*B),He(a)||(D=Math.pow(10,a),I=Math.ceil(I*D)/D),i==="ticks"?(P=Math.floor(f/I)*I,y=Math.ceil(g/I)*I):(P=f,y=g),C&&w&&s&&t7((r-o)/s,I/1e3)?(T=Math.round(Math.min((r-o)/I,l)),I=(r-o)/T,P=o,y=r):M?(P=C?o:P,y=w?r:y,T=E-1,I=(y-P)/T):(T=(y-P)/I,Vn(T,Math.round(T),I/1e3)?T=Math.round(T):T=Math.ceil(T));const N=Math.max(nl(I),nl(P));D=Math.pow(10,He(a)?N:a),P=Math.round(P*D)/D,y=Math.round(y*D)/D;let G=0;for(C&&(h&&P!==o?(x.push({value:o}),Pr)break;x.push({value:W})}return w&&h&&y!==r?x.length&&Vn(x[x.length-1].value,r,Ec(r,_,t))?x[x.length-1].value=r:x.push({value:r}):(!w||y===r)&&x.push({value:y}),x}function Ec(t,e,{horizontal:x,minRotation:n}){const i=d0(n),s=(x?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/s,o)}class Vs extends Ux{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,x){return He(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:x,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this;const o=a=>i=x?i:a,r=a=>s=n?s:a;if(e){const a=w0(i),E=w0(s);a<0&&E<0?r(0):a>0&&E>0&&o(0)}if(i===s){let a=s===0?1:Math.abs(s*.05);r(s+a),e||o(i-a)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:x,stepSize:n}=e,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),x=x||11),x&&(i=Math.min(x,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,x=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:x.precision,step:x.stepSize,count:x.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:x.minRotation||0,includeBounds:x.includeBounds!==!1},s=this._range||this,o=rm(i,s);return e.bounds==="ticks"&&a9(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let x=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const i=(n-x)/Math.max(e.length-1,1)/2;x-=i,n+=i}this._startValue=x,this._endValue=n,this._valueRange=n-x}getLabelForValue(e){return _i(e,this.chart.options.locale,this.options.ticks.format)}}class kr extends Vs{determineDataLimits(){const{min:e,max:x}=this.getMinMax(!0);this.min=ut(e)?e:0,this.max=ut(x)?x:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),x=e?this.width:this.height,n=d0(this.options.ticks.minRotation),i=(e?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(x/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}b(kr,"id","linear"),b(kr,"defaults",{ticks:{callback:fo.formatters.numeric}});const ui=t=>Math.floor(Z0(t)),mx=(t,e)=>Math.pow(10,ui(t)+e);function lc(t){return t/Math.pow(10,ui(t))===1}function cc(t,e,x){const n=Math.pow(10,x),i=Math.floor(t/n);return Math.ceil(e/n)-i}function am(t,e){const x=e-t;let n=ui(x);for(;cc(t,e,n)>10;)n++;for(;cc(t,e,n)<10;)n--;return Math.min(n,ui(t))}function Em(t,{min:e,max:x}){e=Xt(t.min,e);const n=[],i=ui(e);let s=am(e,x),o=s<0?Math.pow(10,Math.abs(s)):1;const r=Math.pow(10,s),a=i>s?Math.pow(10,i):0,E=Math.round((e-a)*o)/o,l=Math.floor((e-a)/r/10)*r*10;let u=Math.floor((E-l)/Math.pow(10,s)),h=Xt(t.min,Math.round((a+l+u*Math.pow(10,s))*o)/o);for(;h=10?u=u<15?15:20:u++,u>=20&&(s++,u=2,o=s>=0?1:o),h=Math.round((a+l+u*Math.pow(10,s))*o)/o;const B=Xt(t.max,h);return n.push({value:B,major:lc(B),significand:u}),n}class Mr extends Ux{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,x){const n=Vs.prototype.parse.apply(this,[e,x]);if(n===0){this._zero=!0;return}return ut(n)&&n>0?n:null}determineDataLimits(){const{min:e,max:x}=this.getMinMax(!0);this.min=ut(e)?Math.max(0,e):null,this.max=ut(x)?Math.max(0,x):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ut(this._userMin)&&(this.min=e===mx(this.min,0)?mx(this.min,-1):mx(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:x}=this.getUserBounds();let n=this.min,i=this.max;const s=r=>n=e?n:r,o=r=>i=x?i:r;n===i&&(n<=0?(s(1),o(10)):(s(mx(n,-1)),o(mx(i,1)))),n<=0&&s(mx(i,-1)),i<=0&&o(mx(n,1)),this.min=n,this.max=i}buildTicks(){const e=this.options,x={min:this._userMin,max:this._userMax},n=Em(x,this);return e.bounds==="ticks"&&a9(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":_i(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Z0(e),this._valueRange=Z0(this.max)-Z0(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Z0(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const x=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+x*this._valueRange)}}b(Mr,"id","logarithmic"),b(Mr,"defaults",{ticks:{callback:fo.formatters.logarithmic,major:{enabled:!0}}});function Nr(t){const e=t.ticks;if(e.display&&t.display){const x=Rt(e.backdropPadding);return Se(e.font&&e.font.size,ht.font.size)+x.height}return 0}function lm(t,e,x){return x=it(x)?x:[x],{w:p7(t,e.string,x),h:x.length*e.lineHeight}}function uc(t,e,x,n,i){return t===n||t===i?{start:e-x/2,end:e+x/2}:ti?{start:e-x,end:e}:{start:e,end:e+x}}function cm(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},x=Object.assign({},e),n=[],i=[],s=t._pointLabels.length,o=t.options.pointLabels,r=o.centerPointLabels?lt/s:0;for(let a=0;ae.r&&(r=(n.end-e.r)/s,t.r=Math.max(t.r,e.r+r)),i.starte.b&&(a=(i.end-e.b)/o,t.b=Math.max(t.b,e.b+a))}function Am(t,e,x){const n=t.drawingArea,{extra:i,additionalAngle:s,padding:o,size:r}=x,a=t.getPointPosition(e,n+i+o,s),E=Math.round(Ca(e0(a.angle+At))),l=pm(a.y,r.h,E),u=dm(E),h=fm(a.x,r.w,u);return{visible:!0,x:a.x,y:l,textAlign:u,left:h,top:l,right:h+r.w,bottom:l+r.h}}function hm(t,e){if(!e)return!0;const{left:x,top:n,right:i,bottom:s}=t;return!(W0({x,y:n},e)||W0({x,y:s},e)||W0({x:i,y:n},e)||W0({x:i,y:s},e))}function Bm(t,e,x){const n=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:o,display:r}=s.pointLabels,a={extra:Nr(s)/2,additionalAngle:o?lt/i:0};let E;for(let l=0;l270||x<90)&&(t-=e),t}function gm(t,e,x){const{left:n,top:i,right:s,bottom:o}=x,{backdropColor:r}=e;if(!He(r)){const a=kx(e.borderRadius),E=Rt(e.backdropPadding);t.fillStyle=r;const l=n-E.left,u=i-E.top,h=s-n+E.width,B=o-i+E.height;Object.values(a).some(p=>p!==0)?(t.beginPath(),li(t,{x:l,y:u,w:h,h:B,radius:a}),t.fill()):t.fillRect(l,u,h,B)}}function mm(t,e){const{ctx:x,options:{pointLabels:n}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const o=n.setContext(t.getPointLabelContext(i));gm(x,o,s);const r=mt(o.font),{x:a,y:E,textAlign:l}=s;Ox(x,t._pointLabels[i],a,E+r.lineHeight/2,r,{color:o.color,textAlign:l,textBaseline:"middle"})}}function Q9(t,e,x,n){const{ctx:i}=t;if(x)i.arc(t.xCenter,t.yCenter,e,0,st);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let o=1;o{const i=Qe(this.options.pointLabels.callback,[x,n],this);return i||i===0?i:""}).filter((x,n)=>this.chart.getDataVisibility(n))}fit(){const e=this.options;e.display&&e.pointLabels.display?cm(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,x,n,i){this.xCenter+=Math.floor((e-x)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,x,n,i))}getIndexAngle(e){const x=st/(this._pointLabels.length||1),n=this.options.startAngle||0;return e0(e*x+d0(n))}getDistanceFromCenterForValue(e){if(He(e))return NaN;const x=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*x:(e-this.min)*x}getValueForDistanceFromCenter(e){if(He(e))return NaN;const x=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-x:this.min+x}getPointLabelContext(e){const x=this._pointLabels||[];if(e>=0&&e{if(u!==0){a=this.getDistanceFromCenterForValue(l.value);const h=this.getContext(u),B=i.setContext(h),p=s.setContext(h);Cm(this,B,a,o,p)}}),n.display){for(e.save(),r=o-1;r>=0;r--){const l=n.setContext(this.getPointLabelContext(r)),{color:u,lineWidth:h}=l;!h||!u||(e.lineWidth=h,e.strokeStyle=u,e.setLineDash(l.borderDash),e.lineDashOffset=l.borderDashOffset,a=this.getDistanceFromCenterForValue(x.ticks.reverse?this.min:this.max),E=this.getPointPosition(r,a),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(E.x,E.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,x=this.options,n=x.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let s,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!x.reverse)return;const E=n.setContext(this.getContext(a)),l=mt(E.font);if(s=this.getDistanceFromCenterForValue(this.ticks[a].value),E.showLabelBackdrop){e.font=l.string,o=e.measureText(r.label).width,e.fillStyle=E.backdropColor;const u=Rt(E.backdropPadding);e.fillRect(-o/2-u.left,-s-l.size/2-u.top,o+u.width,l.size+u.height)}Ox(e,r.label,0,-s,l,{color:E.color})}),e.restore()}drawTitle(){}}b(Nn,"id","radialLinear"),b(Nn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:fo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),b(Nn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),b(Nn,"descriptors",{angleLines:{_fallback:"grid"}});const Co={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},jt=Object.keys(Co);function Dm(t,e){return t-e}function Ac(t,e){if(He(e))return null;const x=t._adapter,{parser:n,round:i,isoWeekday:s}=t._parseOpts;let o=e;return typeof n=="function"&&(o=n(o)),ut(o)||(o=typeof n=="string"?x.parse(o,n):x.parse(o)),o===null?null:(i&&(o=i==="week"&&(En(s)||s===!0)?x.startOf(o,"isoWeek",s):x.startOf(o,i)),+o)}function hc(t,e,x,n){const i=jt.length;for(let s=jt.indexOf(t);s=jt.indexOf(x);s--){const o=jt[s];if(Co[o].common&&t._adapter.diff(i,n,o)>=e-1)return o}return jt[x?jt.indexOf(x):0]}function vm(t){for(let e=jt.indexOf(t)+1,x=jt.length;e=e?x[n]:x[i];t[s]=!0}}function bm(t,e,x,n){const i=t._adapter,s=+i.startOf(e[0].value,n),o=e[e.length-1].value;let r,a;for(r=s;r<=o;r=+i.add(r,1,n))a=x[r],a>=0&&(e[a].major=!0);return e}function dc(t,e,x){const n=[],i={},s=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e=[]){let x=0,n=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?x=1-i:x=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?n=s:n=(s-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;x=Ft(x,0,o),n=Ft(n,0,o),this._offsets={start:x,end:n,factor:1/(x+1+n)}}_generate(){const e=this._adapter,x=this.min,n=this.max,i=this.options,s=i.time,o=s.unit||hc(s.minUnit,x,n,this._getLabelCapacity(x)),r=Se(i.ticks.stepSize,1),a=o==="week"?s.isoWeekday:!1,E=En(a)||a===!0,l={};let u=x,h,B;if(E&&(u=+e.startOf(u,"isoWeek",a)),u=+e.startOf(u,E?"day":o),e.diff(n,x,o)>1e5*r)throw new Error(x+" and "+n+" are too far apart with stepSize of "+r+" "+o);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(h=u,B=0;hf-g).map(f=>+f)}getLabelForValue(e){const x=this._adapter,n=this.options.time;return n.tooltipFormat?x.format(e,n.tooltipFormat):x.format(e,n.displayFormats.datetime)}format(e,x){const i=this.options.time.displayFormats,s=this._unit,o=x||i[s];return this._adapter.format(e,o)}_tickFormatFunction(e,x,n,i){const s=this.options,o=s.ticks.callback;if(o)return Qe(o,[e,x,n],this);const r=s.time.displayFormats,a=this._unit,E=this._majorUnit,l=a&&r[a],u=E&&r[E],h=n[x],B=E&&u&&h&&h.major;return this._adapter.format(e,i||(B?u:l))}generateTickLabels(e){let x,n,i;for(x=0,n=e.length;x0?r:1}getDataTimestamps(){let e=this._cache.data||[],x,n;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(x=0,n=i.length;x=t[n].pos&&e<=t[i].pos&&({lo:n,hi:i}=G0(t,"pos",e)),{pos:s,time:r}=t[n],{pos:o,time:a}=t[i]):(e>=t[n].time&&e<=t[i].time&&({lo:n,hi:i}=G0(t,"time",e)),{time:s,pos:r}=t[n],{time:o,pos:a}=t[i]);const E=o-s;return E?r+(a-r)*(e-s)/E:r}class Rr extends Ai{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),x=this._table=this.buildLookupTable(e);this._minPos=Ki(x,this.min),this._tableRange=Ki(x,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:x,max:n}=this,i=[],s=[];let o,r,a,E,l;for(o=0,r=e.length;o=x&&E<=n&&i.push(E);if(i.length<2)return[{time:x,pos:0},{time:n,pos:1}];for(o=0,r=i.length;o(t.RAW="raw",t.WIN_RATE="winRate",t))(Or||{});const wm=ke({__name:"EvaluationChart",props:{size:{type:ft,required:!0},type:{type:String,required:!0}},setup(t){const e=t,x=1e6,n=2e3,i=-n;let s;(D=>{D[D.BLACK_PLAYER=0]="BLACK_PLAYER",D[D.WHITE_PLAYER=1]="WHITE_PLAYER",D[D.RESEARCHER=2]="RESEARCHER",D[D.RESEARCHER_2=3]="RESEARCHER_2",D[D.RESEARCHER_3=4]="RESEARCHER_3",D[D.RESEARCHER_4=5]="RESEARCHER_4"})(s||(s={}));function o(D){switch(D){case 0:return d.sente;case 1:return d.gote;case 2:return d.research;case 3:return d.research+"2";case 4:return d.research+"3";case 5:return d.research+"4"}}function r(D,P){const y=D.customData;if(y)switch(P){case 0:return D.nextColor===L.BLACK?void 0:y.playerSearchInfo;case 1:return D.nextColor===L.WHITE?void 0:y.playerSearchInfo;case 2:return y.researchInfo;case 3:return y.researchInfo2;case 4:return y.researchInfo3;case 5:return y.researchInfo4}}function a(D,P,y){const T=D.score!==void 0?D.score:D.mate!==void 0?D.mate>0?x:-x:void 0;if(T!==void 0)switch(P){case"raw":return Math.min(Math.max(T,i),n);case"winRate":return dr(T,y)}}function E(D){switch(D){default:return{main:"black",ticks:"dimgray",grid:"lightgray",head:"red",blackPlayer:"#1480C9",whitePlayer:"#FB7D00",researcher:"#349393",researcher2:"#FF1F4E",researcher3:"#6C22FF",researcher4:"#FFB912"};case bx.DARK:return{main:"white",ticks:"darkgray",grid:"dimgray",head:"red",blackPlayer:"#36A2EB",whitePlayer:"#FF9F40",researcher:"#4BC0C0",researcher2:"#FF6384",researcher3:"#9966FF",researcher4:"#FFCD56"}}}const l=O(),u=$e();let h,B=n,p=i;e.type==="winRate"&&(B=100,p=0);const f=(D,P,y,T)=>{const N=[],G=y.moves;for(const Ae of G){const Q=r(Ae,P);if(!Q)continue;const ne=a(Q,e.type,T.coefficientInSigmoid);ne!==void 0&&N.push({x:Ae.ply,y:ne})}const W=G[G.length-1];if(P===0&&W.nextColor===L.BLACK||P===1&&W.nextColor===L.WHITE){const Ae=W.customData;if(Ae&&Ae.opponentSearchInfo){const Q=a(Ae.opponentSearchInfo,e.type,T.coefficientInSigmoid);Q!==void 0&&N.push({x:W.ply+1,y:Q})}}return{label:o(P),borderColor:D,data:N,showLine:!0}},g=(D,P)=>({label:d.currentPosition,borderColor:P.head,data:[{x:D.current.ply,y:B},{x:D.current.ply,y:p}],showLine:!0,pointBorderWidth:0,pointRadius:0}),C=(D,P,y)=>{const T=[{borderColor:y.blackPlayer,type:0},{borderColor:y.whitePlayer,type:1},{borderColor:y.researcher,type:2},{borderColor:y.researcher2,type:3},{borderColor:y.researcher3,type:4},{borderColor:y.researcher4,type:5}],N=[g(D,y)];for(const G of T){const W=f(G.borderColor,G.type,D,P);W.data.length>0&&N.push(W)}return N},w=(D,P)=>({x:{min:0,max:D.length+10,ticks:{color:P.ticks},grid:{color:P.grid}},y:{min:p,max:B,ticks:{color:P.ticks},grid:{color:P.grid}}}),M=(D,P)=>{const y=E(P.thema);h.data.datasets=C(D,P,y),h.options.color=y.main,h.options.scales=w(D,y),h.update()},_=(D,P,y)=>{if(D.x===null)return;const T=y.scales.x.max-y.scales.x.min,N=y.scales.x.right-y.scales.x.left,G=(D.x-y.scales.x.left)/N*T+y.scales.x.min,W=Math.round(G);u.changePly(W)};qe(()=>{const D=Te(),y=l.value.getContext("2d");h=new H0(y,{type:"scatter",data:{datasets:[]},options:{animation:{duration:0},responsive:!0,maintainAspectRatio:!1,events:["click"],onClick:_}}),h.draw(),M(u.record,D),nx(()=>[u.record,D],([T,N])=>M(T,N),{deep:!0})}),hi(()=>{h.destroy()});const I=me(()=>({height:`${e.size.height}px`,width:`${e.size.width}px`}));return(D,P)=>(S(),k("div",null,[c("div",{class:"full root",style:de(I.value)},[c("canvas",{ref_key:"canvas",ref:l,class:"full"},null,512)],4)]))}});const fc=Ue(wm,[["__scopeId","data-v-27a6373b"]]),Tm={class:"full column root"},Im={class:"row element"},Pm={class:"key"},km={class:"value"},Mm={class:"key"},Nm=["value","onInput"],Rm={class:"options"},Om=ke({__name:"RecordInfo",props:{size:{type:ft,required:!0}},setup(t){const e=O(),x=$e(),n=Te(),i=me(()=>Object.values(V).map(r=>{const a=x.record.metadata;return{key:r,displayName:Rh(r),value:a.getStandardMetadata(r)||""}}));qe(()=>{e.value.addEventListener("copy",r=>{r.stopPropagation()}),e.value.addEventListener("paste",r=>{r.stopPropagation()})});const s=(r,a)=>{const E=r.target;x.updateStandardRecordMetadata({key:a,value:E.value})},o=r=>{n.updateAppSetting({emptyRecordInfoVisibility:r})};return(r,a)=>(S(),k("div",null,[c("div",Tm,[c("div",{ref_key:"root",ref:e,class:"full column main",style:de({height:`${t.size.height-25}px`})},[c("div",Im,[c("div",Pm,m(A(d).file),1),c("div",km,m(A(x).recordFilePath||A(d).newRecordWithBrackets),1)]),(S(!0),k(De,null,Ne(i.value,E=>(S(),k("div",{key:E.key,class:Ke(["row element",{hidden:!A(n).emptyRecordInfoVisibility&&!E.value}])},[c("div",Mm,m(E.displayName),1),c("input",{class:"value",value:E.value,onInput:l=>s(l,E.key)},null,40,Nm)],2))),128))],4),c("div",Rm,[R(et,{value:A(n).emptyRecordInfoVisibility,label:A(d).displayEmptyElements,onChange:o},null,8,["value","label"])])])]))}});const Lm=Ue(Om,[["__scopeId","data-v-14c1fefe"]]),Hm={class:"row tabs"},Um=["onClick"],$m={class:"auto tab-contents"},Bs=30,Gm=ke({__name:"TabPane",props:{size:{type:ft,required:!0},visibleTabs:{type:Array,required:!0},activeTab:{type:String,required:!0},displayMinimizeToggle:{type:Boolean,required:!1}},emits:["onChangeTab","onMinimize"],setup(t,{emit:e}){const x=t,n=r=>e("onChangeTab",r),i=()=>e("onMinimize"),s=me(()=>x.size.reduce(new ft(0,Bs))),o={[Oe.RECORD_INFO]:{title:d.recordProperties,icon:se.DESCRIPTION},[Oe.COMMENT]:{title:d.comments,icon:se.COMMENT},[Oe.SEARCH]:{title:d.searchLog,icon:se.BRAIN},[Oe.PV]:{title:d.pv,icon:se.PV},[Oe.CHART]:{title:d.evaluation,icon:se.CHART},[Oe.PERCENTAGE_CHART]:{title:d.estimatedWinRate,icon:se.PERCENT},[Oe.INVISIBLE]:{title:d.hideTabView,icon:se.ARROW_DROP}};return(r,a)=>(S(),k("div",null,[c("div",{class:"full column",style:de({width:`${t.size.width}px`})},[c("div",Hm,[(S(!0),k(De,null,Ne(t.visibleTabs,E=>(S(),k("div",{key:E,class:Ke(["tab",{selected:t.activeTab===E}]),onClick:l=>n(E)},[R(re,{icon:o[E].icon},null,8,["icon"]),c("span",null,m(o[E].title),1)],10,Um))),128)),t.displayMinimizeToggle?(S(),k("div",{key:0,class:"tab end",onClick:i},[R(re,{icon:A(se).ARROW_DROP},null,8,["icon"]),c("span",null,m(A(d).hideTabView),1)])):ee("",!0)]),c("div",$m,[t.activeTab===A(Oe).RECORD_INFO?(S(),Me(Lm,{key:0,class:"full tab-content",size:s.value},null,8,["size"])):ee("",!0),t.activeTab===A(Oe).COMMENT?(S(),Me(O4,{key:1,class:"full tab-content"})):ee("",!0),t.activeTab===A(Oe).SEARCH?(S(),Me(qE,{key:2,class:"full tab-content",size:s.value,"history-mode":!0},null,8,["size"])):ee("",!0),t.activeTab===A(Oe).PV?(S(),Me(qE,{key:3,class:"full tab-content",size:s.value,"history-mode":!1},null,8,["size"])):ee("",!0),t.activeTab===A(Oe).CHART?(S(),Me(fc,{key:4,class:"full tab-content",size:s.value,type:A(Or).RAW},null,8,["size","type"])):ee("",!0),t.activeTab===A(Oe).PERCENTAGE_CHART?(S(),Me(fc,{key:5,class:"full tab-content",size:s.value,type:A(Or).WIN_RATE},null,8,["size","type"])):ee("",!0)])],4)]))}});const qo=Ue(Gm,[["__scopeId","data-v-57d32810"]]),pc={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((t,e)=>(t[e.id]=e)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(t,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let x=0;this.panes=this.panes.map((n,i)=>(n.size=i===e?n.max:n.min,i!==e&&(x+=n.min),n)),this.panes[e].size-=x,this.$emit("pane-maximize",this.panes[e]),this.$emit("resized",this.panes.map(n=>({min:n.min,max:n.max,size:n.size})))},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:x,clientY:n}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:x-e.left,y:n-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),t*100/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let x={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const n=0+(this.pushOtherPanes?0:x.prevPanesSize),i=100-(this.pushOtherPanes?0:x.nextPanesSize),s=Math.max(Math.min(this.getCurrentDragPercentage(t),i),n);let o=[e,e+1],r=this.panes[o[0]]||null,a=this.panes[o[1]]||null;const E=r.max<100&&s>=r.max+x.prevPanesSize,l=a.max<100&&s<=100-(a.max+this.sumNextPanesSize(e+1));if(E||l){E?(r.size=r.max,a.size=Math.max(100-r.max-x.prevPanesSize-x.nextPanesSize,0)):(r.size=Math.max(100-a.max-x.prevPanesSize-this.sumNextPanesSize(e+1),0),a.size=a.max);return}if(this.pushOtherPanes){const u=this.doPushOtherPanes(x,s);if(!u)return;({sums:x,panesToResize:o}=u),r=this.panes[o[0]]||null,a=this.panes[o[1]]||null}r!==null&&(r.size=Math.min(Math.max(s-x.prevPanesSize-x.prevReachedMinPanes,r.min),r.max)),a!==null&&(a.size=Math.min(Math.max(100-s-x.nextPanesSize-x.nextReachedMinPanes,a.min),a.max))},doPushOtherPanes(t,e){const x=this.touch.activeSplitter,n=[x,x+1];return e{s>n[0]&&s<=x&&(i.size=i.min,t.prevReachedMinPanes+=i.min)}),t.prevPanesSize=this.sumPrevPanesSize(n[0]),n[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((i,s)=>{s>0&&s<=x&&(i.size=i.min,t.prevReachedMinPanes+=i.min)}),this.panes[n[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[n[1]].min&&(n[1]=this.findNextExpandedPane(x).index,t.nextReachedMinPanes=0,n[1]>x+1&&this.panes.forEach((i,s)=>{s>x&&s{s=x+1&&(i.size=i.min,t.nextReachedMinPanes+=i.min)}),this.panes[n[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:n}},sumPrevPanesSize(t){return this.panes.reduce((e,x,n)=>e+(ne+(n>t+1?x.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.indexe.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),x=t.classList.contains("splitpanes__splitter");!e&&!x&&(t.parentNode.removeChild(t),console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed."))})},addSplitter(t,e,x=!1){const n=t-1,i=document.createElement("div");i.classList.add("splitpanes__splitter"),x||(i.onmousedown=s=>this.onMouseDown(s,n),typeof window<"u"&&"ontouchstart"in window&&(i.ontouchstart=s=>this.onMouseDown(s,n)),i.onclick=s=>this.onSplitterClick(s,n+1)),this.dblClickSplitter&&(i.ondblclick=s=>this.onSplitterDblClick(s,n+1)),e.parentNode.insertBefore(i,e)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(x=>{x.className.includes("splitpanes__splitter")&&this.removeSplitter(x)});let e=0;t.forEach(x=>{x.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,x,!0):e&&this.addSplitter(e,x),e++)})},requestUpdate({target:t,...e}){const x=this.indexedPanes[t._.uid];Object.entries(e).forEach(([n,i])=>x[n]=i)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(i=>(i.className.includes("splitpanes__pane")&&e++,i===t.$el));const x=parseFloat(t.minSize),n=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(x)?0:x,max:isNaN(n)?100:n,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((i,s)=>i.index=s),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(n=>n.id===t._.uid),x=this.panes.splice(e,1)[0];this.panes.forEach((n,i)=>n.index=i),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...x,index:e}}),this.$emit("pane-remove",{removed:x,panes:this.panes.map(n=>({min:n.min,max:n.max,size:n.size}))})})},resetPaneSizes(t={}){!t.addedPane&&!t.removedPane?this.initialPanesSizing():this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const x=[],n=[];this.panes.forEach(i=>{i.size=Math.max(Math.min(t,i.max),i.min),e-=i.size,i.size>=i.max&&x.push(i.id),i.size<=i.min&&n.push(i.id)}),e>.1&&this.readjustSizes(e,x,n)},initialPanesSizing(){let t=100;const e=[],x=[];let n=0;this.panes.forEach(s=>{t-=s.size,s.size!==null&&n++,s.size>=s.max&&e.push(s.id),s.size<=s.min&&x.push(s.id)});let i=100;t>.1&&(this.panes.forEach(s=>{s.size===null&&(s.size=Math.max(Math.min(t/(this.panesCount-n),s.max),s.min)),i-=s.size}),i>.1&&this.readjustSizes(t,e,x))},equalizeAfterAddOrRemove({addedPane:t,removedPane:e}={}){let x=100/this.panesCount,n=0;const i=[],s=[];t&&t.givenSize!==null&&(x=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(o=>{n-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&s.push(o.id)}),!(Math.abs(n)<.1)&&(this.panes.forEach(o=>{t&&t.givenSize!==null&&t.id===o.id||(o.size=Math.max(Math.min(x,o.max),o.min)),n-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&s.push(o.id)}),n>.1&&this.readjustSizes(n,i,s))},readjustSizes(t,e,x){let n;t>0?n=t/(this.panesCount-e.length):n=t/(this.panesCount-x.length),this.panes.forEach((i,s)=>{if(t>0&&!e.includes(i.id)){const o=Math.max(Math.min(i.size+n,i.max),i.min),r=o-i.size;t-=r,i.size=o}else if(!x.includes(i.id)){const o=Math.max(Math.min(i.size+n,i.max),i.min),r=o-i.size;t-=r,i.size=o}i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.id].size}%`})}),Math.abs(t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,x)=>{e.ondblclick=t?n=>this.onSplitterDblClick(n,x):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return XA("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},Wm=(t,e)=>{const x=t.__vccOpts||t;for(const[n,i]of e)x[n]=i;return x},zm={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};function Vm(t,e,x,n,i,s){return S(),k("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=o=>s.onPaneClick(o,t._.uid)),style:de(t.style)},[xr(t.$slots,"default")],4)}const ji=Wm(zm,[["render",Vm]]);const Km={class:"full column"},jm={class:"row"},Kx=8,Cx=10,Yo=100,qm=ke({__name:"StandardLayout",setup(t){const e=Te(),x=m0(new ft(window.innerWidth,window.innerHeight)),n=O(e.topPaneHeightPercentage),i=O(e.bottomLeftPaneWidthPercentage),s=m0(new ft(0,0)),o=new Wn,r=()=>{o.after(()=>{x.width=window.innerWidth,x.height=window.innerHeight},Yo)};qe(()=>{window.addEventListener("resize",r)}),hi(()=>{window.removeEventListener("resize",r)});const a=G=>{s.width=G.width,s.height=G.height},E=G=>{e.updateAppSetting(G).catch(W=>{ce.log(ct.WARN,"StandardLayout: failed to update app setting: "+c8(W))})},l=G=>{E({tab:G})},u=G=>{E({tab2:G})},h=()=>{n.value=100,E({topPaneHeightPercentage:100})},B=()=>{const G=Math.min(e.topPanePreviousHeightPercentage,(x.height-Bs*2-Kx)/x.height*100);n.value=G,E({topPaneHeightPercentage:G})},p=new Wn,f=G=>{const W=G[0].size;p.after(()=>{n.value=W},Yo)},g=G=>{p.clear();const W=G[0].size;n.value=W,E({topPaneHeightPercentage:W})},C=new Wn,w=G=>{const W=G[0].size;C.after(()=>{i.value=W},Yo)},M=G=>{C.clear();const W=G[0].size;i.value=W,E({bottomLeftPaneWidthPercentage:W})},_=me(()=>x.height*y.value/100>=Bs),I=me(()=>new ft(Math.max(x.width-F4-Cx*2,0),Math.max((x.height-Kx)*(n.value/100)-Cx*2-(_.value?0:Bs),0))),D=me(()=>({margin:`${Cx}px`})),P=me(()=>{const G=x.width-s.width-Cx*3,W=s.height;return{margin:`${Cx}px ${Cx}px ${Cx}px 0`,width:`${G}px`,height:`${W}px`}}),y=me(()=>100-n.value),T=me(()=>new ft(e.tabPaneType===xi.SINGLE?x.width:(x.width-Kx)*(i.value/100),(x.height-Kx)*(y.value/100))),N=me(()=>new ft((x.width-Kx)*(1-i.value/100),(x.height-Kx)*(y.value/100)));return(G,W)=>(S(),k("div",null,[R(A(pc),{class:"main-frame",horizontal:"","dbl-click-splitter":!1,onResize:f,onResized:g},{default:u0(()=>[R(A(ji),{size:n.value},{default:u0(()=>[c("div",Km,[c("div",jm,[R(z3,{style:de(D.value),"max-size":I.value,onResize:a},null,8,["style","max-size"]),R(_4,{style:de(P.value)},null,8,["style"])]),_.value?ee("",!0):(S(),k("button",{key:0,class:"unhide-tabview-button",onClick:B},[R(re,{icon:A(se).ARROW_UP},null,8,["icon"]),c("span",null,m(A(d).expandTabView),1)]))])]),_:1},8,["size"]),R(A(ji),{size:y.value},{default:u0(()=>[A(e).tabPaneType===A(xi).SINGLE?(S(),Me(qo,{key:0,class:"full",size:T.value,"visible-tabs":[A(Oe).RECORD_INFO,A(Oe).COMMENT,A(Oe).SEARCH,A(Oe).PV,A(Oe).CHART,A(Oe).PERCENTAGE_CHART],"active-tab":A(e).tab,"display-minimize-toggle":!0,onOnChangeTab:l,onOnMinimize:h},null,8,["size","visible-tabs","active-tab"])):(S(),Me(A(pc),{key:1,class:"bottom-frame",vertical:"","dbl-click-splitter":!1,onResize:w,onResized:M},{default:u0(()=>[R(A(ji),{size:i.value},{default:u0(()=>[R(qo,{class:"full",size:T.value,"visible-tabs":[A(Oe).RECORD_INFO,A(Oe).SEARCH,A(Oe).PV],"active-tab":A(e).tab,onOnChangeTab:l},null,8,["size","visible-tabs","active-tab"])]),_:1},8,["size"]),R(A(ji),null,{default:u0(()=>[R(qo,{class:"full",size:N.value,"visible-tabs":[A(Oe).COMMENT,A(Oe).CHART,A(Oe).PERCENTAGE_CHART],"active-tab":A(e).tab2,"display-minimize-toggle":!0,onOnChangeTab:u,onOnMinimize:h},null,8,["size","visible-tabs","active-tab"])]),_:1})]),_:1}))]),_:1},8,["size"])]),_:1})]))}});const Ym=Ue(qm,[["__scopeId","data-v-e8732df8"]]);function nt(t){let e=Number(t.value);return t.max&&(e=Math.min(e,Number(t.max))),t.min&&(e=Math.max(e,Number(t.min))),e}const Jm={style:{display:"inline-block"}},Xm=["name","checked","value","onChange"],Zm={class:"label"},Qm=ke({__name:"HorizontalSelector",props:{value:{type:String,required:!0},items:{type:Array,required:!0},height:{type:Number,default:28}},emits:["change"],setup(t,{expose:e,emit:x}){const n=t,i=O(),s=x9(),o=me(()=>({height:`${n.height}px`,minWidth:`${n.height*2.5}px`,fontSize:`${n.height*.5}px`,borderRadius:`${n.height*.25}px`,paddingLeft:`${n.height*.25}px`,paddingRight:`${n.height*.25}px`}));return e({setValue:E=>{i.value.querySelectorAll("input").forEach(l=>{l.value===E&&(l.checked=!0,x("change",E))})},getValue:()=>{const E=Array.from(i.value.querySelectorAll("input")).filter(l=>{if(l.checked)return l.value});return E.length>0?E[0].value:n.value}}),(E,l)=>(S(),k("div",Jm,[c("div",{ref_key:"container",ref:i,class:"row wrap container"},[(S(!0),k(De,null,Ne(t.items,u=>(S(),k("div",{key:u.value,class:"item"},[c("input",{type:"radio",name:A(s),checked:u.value===t.value,value:u.value,onChange:h=>x("change",u.value)},null,40,Xm),c("div",{class:"button",style:de(o.value)},[c("div",Zm,m(u.label),1)],4)]))),128))],512)]))}});const St=Ue(Qm,[["__scopeId","data-v-3118c214"]]),e1={class:"title"},t1={class:"form-group"},x1={class:"option-filter"},n1=["placeholder"],i1={class:"column option-list"},s1={class:"row option"},o1={class:"option-name"},r1={class:"option-unchangeable"},a1={class:"option-name"},E1={class:"option-unchangeable"},l1={class:"option-name"},c1={class:"option-unchangeable"},u1={class:"option-name"},A1={class:"option-value"},h1={class:"option-name"},B1={key:0,class:"option-name-original"},d1={class:"option-value"},f1={class:"option-value-control"},p1=["min","max","name"],g1=["name"],m1=["name"],C1=["onClick"],F1={value:""},D1=["value"],_1=["onClick"],v1={key:0,class:"option-default-value"},b1={class:"main-buttons"},y1=ke({__name:"USIEngineOptionDialog",props:{latestEngineSetting:{type:Object,required:!0},okButtonText:{type:String,required:!1,default:"OK"}},emits:["ok","cancel"],setup(t,{emit:e}){const x=t,n=$e(),i=Te(),s=O(),o=O(),r=O(),a=O([]),E=O({}),l=O({}),u=O($8());let h=!1,B=!1;n.retainBussyState(),qe(async()=>{pt(s.value),Ot(s.value);try{const D=i.engineTimeoutSeconds;u.value=await ce.getUSIEngineInfo(x.latestEngineSetting.path,D),F6(u.value,x.latestEngineSetting),o.value.value=u.value.name,h=!0}catch(D){n.pushError(D),e("cancel")}finally{n.releaseBussyState()}});const p=me(()=>Object.values(u.value.options).sort((D,P)=>D.order{const P=a.value.length>0,y={...D,value:yx(D),visible:!P};return i.translateEngineOptionName&&(y.displayName=es[D.name]),P&&(y.visible=y.displayName&&Ds(y.displayName,a.value)||Ds(y.name,a.value)),y}));Bn(()=>{if(!(!h||B)){for(const D of p.value)D.value!==void 0&&(D.type==="check"?l.value[D.name].setValue(D.value||""):E.value[D.name]&&(E.value[D.name].value=D.value+""));B=!0}}),_t(()=>{Lt(s.value)});const f=()=>{a.value=String(r.value.value).trim().split(/ +/).filter(D=>D)},g=()=>{ce.openExplorer(u.value.path)},C=async D=>{n.retainBussyState();try{const P=await ce.showSelectFileDialog(),y=E.value[D];P&&y&&(y.value=P)}catch(P){n.pushError(P)}finally{n.releaseBussyState()}},w=async D=>{n.retainBussyState();try{const P=i.engineTimeoutSeconds;await ce.sendUSISetOption(u.value.path,D,P)}catch(P){n.pushError(P)}finally{n.releaseBussyState()}},M=()=>{o.value.value=u.value.defaultName;for(const D of p.value){const P=u.value.options[D.name].default!==void 0?u.value.options[D.name].default+"":"";D.type==="check"?l.value[D.name].setValue(P):E.value[D.name]&&(E.value[D.name].value=P)}},_=()=>{u.value.name=o.value.value;for(const D of p.value)if(D.type==="check")u.value.options[D.name].value=l.value[D.name].getValue()||void 0;else if(E.value[D.name]){const P=E.value[D.name];u.value.options[D.name].value=P.value?D.type==="spin"?nt(P):P.value:void 0}e("ok",u.value)},I=()=>{e("cancel")};return(D,P)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:s},[c("div",e1,m(A(d).engineSettings),1),c("div",t1,[c("div",x1,[c("input",{ref_key:"filter",ref:r,class:"filter",placeholder:A(d).filterByOptionName,onInput:f},null,40,n1)]),c("div",i1,[c("div",s1,[c("div",o1,m(A(d).engineName),1),c("div",r1,m(u.value.defaultName),1)]),c("div",{class:Ke(["row option",{hidden:a.value.length}])},[c("div",a1,m(A(d).author),1),c("div",E1,m(u.value.author),1)],2),c("div",{class:Ke(["row option",{hidden:a.value.length}])},[c("div",l1,m(A(d).enginePath),1),c("div",c1,[c("div",null,m(u.value.path),1),c("button",{class:"thin",onClick:g},m(A(d).openDirectory),1)])],2),c("div",{class:Ke(["row option",{hidden:a.value.length}])},[c("div",u1,m(A(d).displayName),1),c("div",A1,[c("input",{ref_key:"engineNameInput",ref:o,class:"option-value-text",type:"text",name:"ElectronShogiEngineName"},null,512)])],2),(S(!0),k(De,null,Ne(p.value,y=>(S(),k("div",{key:y.name,class:Ke(["row option",{hidden:!y.visible}])},[c("div",h1,[rx(m(y.displayName||y.name)+" ",1),y.displayName?(S(),k("span",B1,m(y.name),1)):ee("",!0)]),c("div",d1,[c("span",f1,[y.type==="spin"?(S(),k("input",{key:0,ref_for:!0,ref:T=>{E.value[y.name]=T},class:"option-value-number",type:"number",min:y.min,max:y.max,step:"1",name:y.name},null,8,p1)):ee("",!0),y.type==="string"?(S(),k("input",{key:1,ref_for:!0,ref:T=>{E.value[y.name]=T},class:"option-value-text",type:"text",name:y.name},null,8,g1)):ee("",!0),y.type==="filename"?(S(),k("input",{key:2,ref_for:!0,ref:T=>{E.value[y.name]=T},class:"option-value-filename",type:"text",name:y.name},null,8,m1)):ee("",!0),y.type==="filename"?(S(),k("button",{key:3,class:"thin",onClick:T=>C(y.name)},m(A(d).select),9,C1)):ee("",!0),y.type==="check"?(S(),Me(St,{key:4,ref_for:!0,ref:T=>{l.value[y.name]=T},value:"",items:y.default?[{value:"true",label:"ON"},{value:"false",label:"OFF"}]:[{value:"",label:A(d).defaultValue},{value:"true",label:"ON"},{value:"false",label:"OFF"}]},null,8,["items"])):ee("",!0),y.type==="combo"?(S(),k("select",{key:5,ref_for:!0,ref:T=>{E.value[y.name]=T},class:"option-value-combo"},[c("option",F1,m(A(d).defaultValue),1),(S(!0),k(De,null,Ne(y.vars,T=>(S(),k("option",{key:T,value:T},m(T),9,D1))),128))],512)):ee("",!0),y.type==="button"?(S(),k("button",{key:6,class:"thin",onClick:T=>w(y.name)},m(A(d).invoke),9,_1)):ee("",!0)]),y.default!==void 0&&y.default!==""?(S(),k("span",v1,m(A(d).defaultValue)+": "+m(y.type==="check"?y.default==="true"?"ON":"OFF":y.default),1)):ee("",!0)])],2))),128))])]),c("button",{class:"wide",onClick:P[0]||(P[0]=y=>M())},m(A(d).resetToEngineDefaultValues),1),c("div",b1,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:P[1]||(P[1]=y=>_())},m(t.okButtonText),1),c("button",{"data-hotkey":"Escape",onClick:P[2]||(P[2]=y=>I())},m(A(d).cancel),1)])],512)]))}});const eu=Ue(y1,[["__scopeId","data-v-1c17ad8b"]]),S1={class:"root"},w1=["value"],T1=["value"],I1=["value"],P1={key:0,class:"row player-info"},k1={class:"player-info-key"},M1={class:"player-info-value"},N1={key:1,class:"row player-info"},R1={class:"player-info-key"},O1={class:"player-info-value"},L1={key:2,class:"row player-info"},H1={class:"player-info-key"},U1={class:"player-info-value"},$1=["disabled"],G1=ke({__name:"PlayerSelector",props:{playerUri:{type:String,required:!0},containsHuman:{type:Boolean,default:!1},engineSettings:{type:Object,required:!0},displayPonderState:{type:Boolean,default:!1},displayThreadState:{type:Boolean,default:!1},displayMultiPvState:{type:Boolean,default:!1}},emits:["select-player","update-engine-setting"],setup(t,{emit:e}){const x=t,n=$e(),i=O(),s=O(null),o=me(()=>{if(!U0(x.playerUri))return null;const p=x.engineSettings.getEngine(x.playerUri);return p&&yx(p.options[U8])==="true"?"ON":"OFF"}),r=me(()=>{if(!U0(x.playerUri))return null;const p=x.engineSettings.getEngine(x.playerUri);return p?yx(p.options[p6])||yx(p.options[g6]):null}),a=me(()=>{if(!U0(x.playerUri))return null;const p=x.engineSettings.getEngine(x.playerUri);return p?yx(p.options[f6])||yx(p.options[m6]):null}),E=me(()=>U0(x.playerUri)),l=()=>{if(U0(x.playerUri)){const p=x.engineSettings.getEngine(x.playerUri);if(!p){n.pushError("利用可能なエンジンが選択されていません。");return}s.value=p}},u=async p=>{s.value=null;const f=x.engineSettings.getClone();f.updateEngine(p),n.retainBussyState();try{await ce.saveUSIEngineSetting(f),e("update-engine-setting",f)}catch(g){n.pushError(g)}finally{n.releaseBussyState()}},h=()=>{s.value=null},B=()=>{e("select-player",i.value.value)};return(p,f)=>(S(),k(De,null,[c("div",null,[c("div",S1,[c("select",{ref_key:"playerSelect",ref:i,class:"player-select",size:"1",value:t.playerUri,onChange:B},[t.containsHuman?(S(),k("option",{key:0,value:V0},"人",8,T1)):ee("",!0),(S(!0),k(De,null,Ne(t.engineSettings.engineList,g=>(S(),k("option",{key:g.uri,value:g.uri},m(g.name),9,I1))),128))],40,w1),t.displayPonderState?(S(),k("div",P1,[c("span",k1,m(A(d).ponder)+":",1),c("span",M1,m(o.value||"---"),1)])):ee("",!0),t.displayThreadState?(S(),k("div",N1,[c("span",R1,m(A(d).numberOfThreads)+":",1),c("span",O1,m(r.value||"---"),1)])):ee("",!0),t.displayMultiPvState?(S(),k("div",L1,[c("span",H1,m(A(d).multiPV)+":",1),c("span",U1,m(a.value||"---"),1)])):ee("",!0),c("button",{class:"player-setting",disabled:!E.value,onClick:l},[R(re,{icon:A(se).SETTINGS},null,8,["icon"]),c("span",null,m(A(d).settings),1)],8,$1)])]),s.value?(S(),Me(eu,{key:0,"latest-engine-setting":s.value,"ok-button-text":A(d).save,onOk:u,onCancel:h},null,8,["latest-engine-setting","ok-button-text"])):ee("",!0)],64))}});const Lx=Ue(G1,[["__scopeId","data-v-28321643"]]),W1={class:"title"},z1={class:"form-group full-column"},V1={class:"row regular-interval"},K1={class:"half-column"},j1={class:"top-label"},q1={class:"half-column"},Y1={class:"top-label"},J1={class:"row regular-interval"},X1={class:"half-column"},Z1={class:"form-item"},Q1={class:"form-item-label"},eC={class:"form-item-unit"},tC={class:"form-item-unit"},xC={class:"form-item"},nC={class:"form-item-label"},iC={class:"form-item-unit"},sC={class:"form-item"},oC={class:"form-item-label"},rC={class:"form-item-unit"},aC={class:"form-item"},EC={class:"half-column"},lC={class:"form-item"},cC={class:"form-item-label"},uC={class:"form-item-unit"},AC={class:"form-item-unit"},hC={class:"form-item"},BC={class:"form-item-label"},dC={class:"form-item-unit"},fC={class:"form-item"},pC={class:"form-item-label"},gC={class:"form-item-unit"},mC={class:"form-item"},CC={class:"players-control"},FC={class:"form-group full-column"},DC={class:"row regular-interval"},_C={class:"half-column"},vC={class:"form-item"},bC={class:"form-item-label"},yC={value:"current"},SC=["value"],wC=["value"],TC=["value"],IC=["value"],PC=["value"],kC=["value"],MC=["value"],NC=["value"],RC=["value"],OC=["value"],LC=["value"],HC={class:"form-item"},UC={class:"form-item-label"},$C={class:"form-item"},GC={class:"form-item-label"},WC={class:"half-column"},zC={class:"form-item"},VC={class:"form-item"},KC={class:"form-item"},jC={class:"form-item"},qC={class:"main-buttons"},YC=ke({__name:"GameDialog",setup(t){const e=$e(),x=O(),n=O(),i=O(),s=O(),o=O(),r=O(!1),a=O(),E=O(),l=O(),u=O(),h=O(!1),B=O(),p=O(),f=O(),g=O(!1),C=O(!1),w=O(!1),M=O(!1),_=O(Is()),I=O(new I0),D=O(""),P=O("");let y=!1,T=!1;e.retainBussyState(),qe(async()=>{try{_.value=await ce.loadGameSetting(),I.value=await ce.loadUSIEngineSetting(),D.value=_.value.black.uri,P.value=_.value.white.uri,pt(x.value),Ot(x.value),y=!0}catch(K){e.pushError(K),e.destroyModalDialog()}finally{e.releaseBussyState()}}),_t(()=>{Lt(x.value)});const N=()=>{a.value.disabled=!h.value,E.value.disabled=!h.value,l.value.disabled=!h.value,u.value.disabled=!h.value};Bn(()=>{if(!y||T)return;n.value.value=Math.floor(_.value.timeLimit.timeSeconds/3600),i.value.value=Math.floor(_.value.timeLimit.timeSeconds/60)%60,s.value.value=_.value.timeLimit.byoyomi,o.value.value=_.value.timeLimit.increment,r.value=_.value.enableEngineTimeout;const K=_.value.whiteTimeLimit||_.value.timeLimit;a.value.value=Math.floor(K.timeSeconds/3600),E.value.value=Math.floor(K.timeSeconds/60)%60,l.value.value=K.byoyomi,u.value.value=K.increment,h.value=!!_.value.whiteTimeLimit,B.value.value=_.value.startPosition!==void 0?_.value.startPosition:"current",p.value.value=_.value.maxMoves,f.value.value=_.value.repeat,g.value=_.value.swapPlayers,C.value=_.value.enableComment,w.value=_.value.enableAutoSave,M.value=_.value.humanIsFront,T=!0,N()});const G=K=>{if(U0(K)&&I.value.hasEngine(K)){const J=I.value.getEngine(K);return{name:J.name,uri:K,usi:J}}return{name:"人",uri:V0}},W=()=>{const K={black:G(D.value),white:G(P.value),timeLimit:{timeSeconds:(nt(n.value)*60+nt(i.value))*60,byoyomi:nt(s.value),increment:nt(o.value)},enableEngineTimeout:r.value,startPosition:B.value.value!=="current"?B.value.value:void 0,maxMoves:nt(p.value),repeat:nt(f.value),swapPlayers:g.value,enableComment:C.value,enableAutoSave:w.value,humanIsFront:M.value};h.value&&(K.whiteTimeLimit={timeSeconds:(nt(a.value)*60+nt(E.value))*60,byoyomi:nt(l.value),increment:nt(u.value)});const J=b0()?G8(K):y6(K);J?e.pushError(J):e.startGame(K)},Ae=()=>{e.closeModalDialog()},Q=K=>{I.value=K},ne=K=>{D.value=K},te=K=>{P.value=K},Z=()=>{[D.value,P.value]=[P.value,D.value],h.value&&([n.value.value,a.value.value]=[a.value.value,n.value.value],[i.value.value,E.value.value]=[E.value.value,i.value.value],[s.value.value,l.value.value]=[l.value.value,s.value.value],[o.value.value,u.value.value]=[u.value.value,o.value.value])};return(K,J)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x},[c("div",W1,m(A(d).game),1),c("div",z1,[c("div",V1,[c("div",K1,[c("div",j1,m(A(d).senteOrShitate),1),R(Lx,{"player-uri":D.value,"contains-human":!0,"engine-settings":I.value,"display-ponder-state":!0,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:Q,onSelectPlayer:ne},null,8,["player-uri","engine-settings"])]),c("div",q1,[c("div",Y1,m(A(d).goteOrUwate),1),P.value?(S(),Me(Lx,{key:0,"player-uri":P.value,"contains-human":!0,"engine-settings":I.value,"display-ponder-state":!0,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:Q,onSelectPlayer:te},null,8,["player-uri","engine-settings"])):ee("",!0)])]),c("div",J1,[c("div",X1,[c("div",Z1,[c("div",Q1,m(A(d).allottedTime),1),c("input",{ref_key:"hours",ref:n,class:"time",type:"number",min:"0",max:"99",step:"1"},null,512),c("div",eC,m(A(d).hoursSuffix),1),c("input",{ref_key:"minutes",ref:i,class:"time",type:"number",min:"0",max:"59",step:"1"},null,512),c("div",tC,m(A(d).minutesSuffix),1)]),c("div",xC,[c("div",nC,m(A(d).byoyomi),1),c("input",{ref_key:"byoyomi",ref:s,class:"time",type:"number",min:"0",max:"60",step:"1"},null,512),c("div",iC,m(A(d).secondsSuffix),1)]),c("div",sC,[c("div",oC,m(A(d).increments),1),c("input",{ref_key:"increment",ref:o,class:"time",type:"number",min:"0",max:"99",step:"1"},null,512),c("div",rC,m(A(d).secondsSuffix),1)]),c("div",aC,[R(et,{label:A(d).enableEngineTimeout,value:r.value,onChange:J[0]||(J[0]=ue=>{r.value=ue})},null,8,["label","value"])])]),c("div",EC,[c("div",lC,[c("div",cC,m(A(d).allottedTime),1),c("input",{ref_key:"whiteHours",ref:a,class:"time",type:"number",min:"0",max:"99",step:"1"},null,512),c("div",uC,m(A(d).hoursSuffix),1),c("input",{ref_key:"whiteMinutes",ref:E,class:"time",type:"number",min:"0",max:"59",step:"1"},null,512),c("div",AC,m(A(d).minutesSuffix),1)]),c("div",hC,[c("div",BC,m(A(d).byoyomi),1),c("input",{ref_key:"whiteByoyomi",ref:l,class:"time",type:"number",min:"0",max:"60",step:"1"},null,512),c("div",dC,m(A(d).secondsSuffix),1)]),c("div",fC,[c("div",pC,m(A(d).increments),1),c("input",{ref_key:"whiteIncrement",ref:u,class:"time",type:"number",min:"0",max:"99",step:"1"},null,512),c("div",gC,m(A(d).secondsSuffix),1)]),c("div",mC,[R(et,{label:A(d).setDifferentTimeForGote,value:h.value,onChange:J[1]||(J[1]=ue=>{h.value=ue,N()})},null,8,["label","value"])])])]),c("div",CC,[c("button",{onClick:Z},[R(re,{icon:A(se).SWAP_H},null,8,["icon"]),c("span",null,m(A(d).swapSenteGote),1)])])]),c("div",FC,[c("div",DC,[c("div",_C,[c("div",vC,[c("div",bC,m(A(d).startPosition),1),c("select",{ref_key:"startPosition",ref:B},[c("option",yC,m(A(d).currentPosition),1),c("option",{value:A(he).STANDARD},m(A(d).nonHandicap),9,SC),c("option",{value:A(he).HANDICAP_LANCE},m(A(d).lanceHandicap),9,wC),c("option",{value:A(he).HANDICAP_RIGHT_LANCE},m(A(d).rightLanceHandicap),9,TC),c("option",{value:A(he).HANDICAP_BISHOP},m(A(d).bishopHandicap),9,IC),c("option",{value:A(he).HANDICAP_ROOK},m(A(d).rookHandicap),9,PC),c("option",{value:A(he).HANDICAP_ROOK_LANCE},m(A(d).rookLanceHandicap),9,kC),c("option",{value:A(he).HANDICAP_2PIECES},m(A(d).twoPiecesHandicap),9,MC),c("option",{value:A(he).HANDICAP_4PIECES},m(A(d).fourPiecesHandicap),9,NC),c("option",{value:A(he).HANDICAP_6PIECES},m(A(d).sixPiecesHandicap),9,RC),c("option",{value:A(he).HANDICAP_8PIECES},m(A(d).eightPiecesHandicap),9,OC),c("option",{value:A(he).HANDICAP_10PIECES},m(A(d).tenPiecesHandicap),9,LC)],512)]),c("div",HC,[c("div",UC,m(A(d).maxMoves),1),c("input",{ref_key:"maxMoves",ref:p,class:"number",type:"number",min:"1"},null,512)]),c("div",$C,[c("div",GC,m(A(d).gameRepetition),1),c("input",{ref_key:"repeat",ref:f,class:"number",type:"number",min:"1"},null,512)])]),c("div",WC,[c("div",zC,[R(et,{label:A(d).swapTurnWhenGameRepetition,value:g.value,onChange:J[2]||(J[2]=ue=>{g.value=ue})},null,8,["label","value"])]),c("div",VC,[R(et,{label:A(d).outputComments,value:C.value,onChange:J[3]||(J[3]=ue=>{C.value=ue})},null,8,["label","value"])]),c("div",KC,[R(et,{label:A(d).saveRecordAutomatically,value:w.value,onChange:J[4]||(J[4]=ue=>{w.value=ue})},null,8,["label","value"])]),c("div",jC,[R(et,{label:A(d).adjustBoardToHumanPlayer,value:M.value,onChange:J[5]||(J[5]=ue=>{M.value=ue})},null,8,["label","value"])])])])]),c("div",qC,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:J[6]||(J[6]=ue=>W())},m(A(d).startGame),1),c("button",{"data-hotkey":"Escape",onClick:J[7]||(J[7]=ue=>Ae())},m(A(d).cancel),1)])],512)]))}});const JC=Ue(YC,[["__scopeId","data-v-6c39a128"]]),bi=t=>(Qs("data-v-b929b527"),t=t(),eo(),t),XC={class:"title"},ZC={class:"form-group scroll"},QC={key:0,class:"form-group warning"},eF={class:"note"},tF={class:"form-group"},xF={class:"form-group"},nF={class:"form-item"},iF={class:"form-item-label-wide"},sF={key:0,value:"0"},oF=["value"],rF=bi(()=>c("hr",null,null,-1)),aF={class:"form-item"},EF={class:"form-item-label-wide"},lF=["value"],cF=["value"],uF={key:0,class:"form-group warning"},AF={class:"note"},hF={class:"form-item"},BF={class:"form-item-label-wide"},dF=bi(()=>c("datalist",{id:"csa-server-host"},[c("option",{value:"gserver.computer-shogi.org"}),c("option",{value:"wdoor.c.u-tokyo.ac.jp"}),c("option",{value:"localhost"})],-1)),fF={class:"form-item"},pF={class:"form-item-label-wide"},gF=bi(()=>c("datalist",{id:"csa-server-port-number"},[c("option",{value:"4081"})],-1)),mF={class:"form-item"},CF=bi(()=>c("div",{class:"form-item-label-wide"},"ID",-1)),FF={class:"form-item"},DF={class:"form-item-label-wide"},_F={class:"form-item"},vF=bi(()=>c("div",{class:"form-item-label-wide"},null,-1)),bF={class:"form-group warning"},yF={key:0,class:"note"},SF={key:1,class:"note"},wF={class:"form-item"},TF={class:"form-item-label-wide"},IF={class:"form-group"},PF={class:"form-item"},kF={class:"form-item-label-wide number"},MF={class:"form-item"},NF={class:"form-item-label-wide"},RF={class:"form-item"},OF={class:"form-item-label-wide"},LF={class:"form-item"},HF={class:"form-item-label-wide"},UF={class:"form-item"},$F={class:"form-item-label-wide"},GF={class:"main-buttons"},WF=ke({__name:"CSAGameDialog",setup(t){const e=$e(),x=O(),n=O(),i=O(Sx.V121),s=O(),o=O(),r=O(),a=O(),E=O(!0),l=O(),u=O(!1),h=O(!1),B=O(!1),p=O(!1),f=O(!1),g=O(Br()),C=O(new I0),w=O("");let M=!1,_=!1;e.retainBussyState(),qe(async()=>{try{f.value=await ce.isEncryptionAvailable(),g.value=await ce.loadCSAGameSettingHistory(),C.value=await ce.loadUSIEngineSetting(),pt(x.value),Ot(x.value),M=!0}catch(Q){e.pushError(Q),e.destroyModalDialog()}finally{e.releaseBussyState()}}),_t(()=>{Lt(x.value)}),Bn(()=>{if(!M||_)return;const Q=I6(g.value,0);n.value.value=i.value=Q.server.protocolVersion,s.value.value=Q.server.host,o.value.value=Q.server.port,r.value.value=Q.server.id,a.value.value=Q.server.password,l.value.value=Q.repeat,u.value=Q.autoRelogin,h.value=Q.enableComment,B.value=Q.enableAutoSave,p.value=Q.autoFlip,w.value=Q.player.uri,_=!0});const I=Q=>{if(U0(Q)&&C.value.hasEngine(Q)){const ne=C.value.getEngine(Q);return{name:ne.name,uri:Q,usi:ne}}return{name:"人",uri:V0}},D=()=>{const Q={player:I(w.value),server:{protocolVersion:n.value.value,host:String(s.value.value||"").trim(),port:Number(o.value.value),id:String(r.value.value||""),password:String(a.value.value||"")},repeat:nt(l.value),autoRelogin:u.value,enableComment:h.value,enableAutoSave:B.value,autoFlip:p.value},ne=T6(Q);ne?e.pushError(ne):e.loginCSAGame(Q,{saveHistory:E.value})},P=()=>{e.closeModalDialog()},y=async Q=>{C.value=Q},T=Q=>{w.value=Q},N=Q=>{a.value.type=Q?"text":"password"},G=Q=>{const ne=Q.target,te=g.value.serverHistory[Number(ne.value)];te&&(n.value.value=i.value=te.protocolVersion,s.value.value=te.host,o.value.value=te.port,r.value.value=te.id,a.value.value=te.password)},W=()=>{i.value=n.value.value},Ae=me(()=>{const Q=Te();return Q.enableCSALog&&Q.enableAppLog&&Q.enableUSILog});return(Q,ne)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x,class:"root"},[c("div",XC,m(A(d).csaProtocolOnlineGame),1),c("div",ZC,[Ae.value?ee("",!0):(S(),k("div",QC,[c("div",eF,m(A(d).someLogsDisabled)+" "+m(A(d).logsRecommendedForCSAProtocol)+" "+m(A(d).pleaseEnableLogsAndRestart),1)])),c("div",tF,[c("div",null,m(A(d).player),1),R(Lx,{"player-uri":w.value,"contains-human":!0,"engine-settings":C.value,"display-ponder-state":!0,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:y,onSelectPlayer:T},null,8,["player-uri","engine-settings"])]),c("div",xF,[c("div",nF,[c("div",iF,m(A(d).selectFromHistory),1),c("select",{class:"long-text",value:"0",onChange:G},[g.value.serverHistory.length===0?(S(),k("option",sF,m(A(d).noHistory),1)):ee("",!0),(S(!0),k(De,null,Ne(g.value.serverHistory,(te,Z)=>(S(),k("option",{key:Z,value:Z},m(te.host)+":"+m(te.port)+" "+m(te.id),9,oF))),128))],32)]),rF,c("div",aF,[c("div",EF,m(A(d).version),1),c("select",{ref_key:"protocolVersion",ref:n,class:"long-text",value:"CSA_v121",onChange:W},[c("option",{value:A(Sx).V121},m(A(d).csaProtocolV121),9,lF),c("option",{value:A(Sx).V121_FLOODGATE},m(A(d).csaProtocolV121WithPVComment),9,cF)],544)]),i.value===A(Sx).V121?(S(),k("div",uF,[c("div",AF,m(A(d).notSendPVOnStandardCSAProtocol),1)])):ee("",!0),c("div",hF,[c("div",BF,m(A(d).hostToConnect),1),c("input",{ref_key:"host",ref:s,class:"long-text",list:"csa-server-host",type:"text"},null,512),dF]),c("div",fF,[c("div",pF,m(A(d).portNumber),1),c("input",{ref_key:"port",ref:o,class:"number",list:"csa-server-port-number",type:"number"},null,512),gF]),c("div",mF,[CF,c("input",{ref_key:"id",ref:r,class:"long-text",type:"text"},null,512)]),c("div",FF,[c("div",DF,m(A(d).password),1),c("input",{ref_key:"password",ref:a,class:"long-text",type:"password"},null,512)]),c("div",_F,[vF,R(et,{label:A(d).showPassword,value:!1,onChange:N},null,8,["label"])]),c("div",bF,[f.value?(S(),k("div",yF,m(A(d).csaProtocolSendPlaintextPassword),1)):(S(),k("div",SF,m(A(d).passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable)+" "+m(A(d).pleaseUncheckSaveHistoryIfNotWantSave)+" "+m(A(d).csaProtocolSendPlaintextPasswordRegardlessOfHistory),1))]),c("div",wF,[c("div",TF,m(A(d).saveHistory),1),R(et,{value:E.value,onChange:ne[0]||(ne[0]=te=>{E.value=te})},null,8,["value"])])]),c("div",IF,[c("div",PF,[c("div",kF,m(A(d).gameRepetition),1),c("input",{ref_key:"repeat",ref:l,class:"number",type:"number",min:"1"},null,512)]),c("div",MF,[c("div",NF,m(A(d).autoRelogin),1),R(et,{value:u.value,onChange:ne[1]||(ne[1]=te=>{u.value=te})},null,8,["value"])]),c("div",RF,[c("div",OF,m(A(d).outputComments),1),R(et,{value:h.value,onChange:ne[2]||(ne[2]=te=>{h.value=te})},null,8,["value"])]),c("div",LF,[c("div",HF,m(A(d).saveRecordAutomatically),1),R(et,{value:B.value,onChange:ne[3]||(ne[3]=te=>{B.value=te})},null,8,["value"])]),c("div",UF,[c("div",$F,m(A(d).adjustBoardAutomatically),1),R(et,{value:p.value,onChange:ne[4]||(ne[4]=te=>{p.value=te})},null,8,["value"])])])]),c("div",GF,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:ne[5]||(ne[5]=te=>D())},m(A(d).startGame),1),c("button",{"data-hotkey":"Escape",onClick:ne[6]||(ne[6]=te=>P())},m(A(d).cancel),1)])],512)]))}});const zF=Ue(WF,[["__scopeId","data-v-b929b527"]]),VF={class:"title"},KF={class:"form-group"},jF=["onClick"],qF={class:"form-group"},YF={class:"form-item"},JF={class:"form-item-unit"},XF=["value","disabled"],ZF={class:"form-item-unit"},QF={class:"main-buttons"},eD=ke({__name:"ResearchDialog",setup(t){const e=$e(),x=O(),n=O(Ps()),i=O(new I0),s=O(""),o=O([]),r=O(!1),a=O();e.retainBussyState(),qe(async()=>{var h,B;pt(x.value),Ot(x.value);try{n.value=await ce.loadResearchSetting(),i.value=await ce.loadUSIEngineSetting(),s.value=((h=n.value.usi)==null?void 0:h.uri)||"",o.value=((B=n.value.secondaries)==null?void 0:B.map(p=>{var f;return((f=p.usi)==null?void 0:f.uri)||""}))||[],r.value=n.value.enableMaxSeconds}catch(p){e.pushError(p),e.destroyModalDialog()}finally{e.releaseBussyState()}}),_t(()=>{Lt(x.value)});const E=()=>{const h=i.value.getEngine(s.value),B=[];for(const g of o.value){const C=i.value.getEngine(g);B.push({usi:C})}const p={usi:h,secondaries:B,enableMaxSeconds:r.value,maxSeconds:nt(a.value)},f=S6(p);if(f){e.pushError(f);return}e.startResearch(p)},l=()=>{e.closeModalDialog()},u=async h=>{i.value=h};return(h,B)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x,class:"root"},[c("div",VF,m(A(d).research),1),c("div",KF,[R(Lx,{"player-uri":s.value,"engine-settings":i.value,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:u,onSelectPlayer:B[0]||(B[0]=p=>{s.value=p})},null,8,["player-uri","engine-settings"])]),(S(!0),k(De,null,Ne(o.value,(p,f)=>(S(),k("div",{key:f,class:"form-group"},[R(Lx,{"player-uri":p,"engine-settings":i.value,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:u,onSelectPlayer:g=>{o.value[f]=g}},null,8,["player-uri","engine-settings","onSelectPlayer"]),c("button",{class:"remove-button",onClick:g=>o.value.splice(f,1)},m(A(d).remove),9,jF)]))),128)),c("button",{class:"center thin",onClick:B[1]||(B[1]=p=>o.value.push(""))},[R(re,{icon:A(se).ADD},null,8,["icon"]),rx(" "+m(A(d).addNthEngine(o.value.length+2)),1)]),c("div",qF,[c("div",YF,[R(et,{value:r.value,onChange:B[2]||(B[2]=p=>{r.value=p})},null,8,["value"]),c("div",JF,m(A(d).toPrefix),1),c("input",{ref_key:"maxSeconds",ref:a,value:n.value.maxSeconds,class:"number",type:"number",min:"1",disabled:!r.value},null,8,XF),c("div",ZF,m(A(d).secondsSuffix)+m(A(d).toSuffix),1)])]),c("div",QF,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:B[3]||(B[3]=p=>E())},m(A(d).startResearch),1),c("button",{"data-hotkey":"Escape",onClick:B[4]||(B[4]=p=>l())},m(A(d).cancel),1)])],512)]))}});const tD=Ue(eD,[["__scopeId","data-v-c47f4227"]]),xD={class:"title"},nD={class:"form-group"},iD={class:"engine-filter"},sD=["placeholder"],oD={class:"column engine-list"},rD={key:0,class:"engine"},aD=["value"],ED={class:"engine-name"},lD=["onClick"],cD=["onClick"],uD=["onClick"],AD={class:"main-buttons"},hD=ke({__name:"USIEngineManagementDialog",setup(t){const e=$e(),x=O(),n=O(null),i=O(new I0),s=O(),o=O([]);e.retainBussyState(),qe(async()=>{pt(x.value),Ot(x.value);try{i.value=await ce.loadUSIEngineSetting()}catch(C){e.pushError(C),e.destroyModalDialog()}finally{e.releaseBussyState()}}),_t(()=>{Lt(x.value)});const r=me(()=>i.value.engineList.map(C=>({uri:C.uri,name:C.name,visible:o.value.length==0||Ds(C.name,o.value)||Ds(C.defaultName,o.value)}))),a=()=>{o.value=String(s.value.value).trim().split(/ +/).filter(C=>C)},E=async()=>{try{e.retainBussyState();const C=await ce.showSelectUSIEngineDialog();if(!C)return;const M=Te().engineTimeoutSeconds;i.value.addEngine(await ce.getUSIEngineInfo(C,M))}catch(C){e.pushError(C)}finally{e.releaseBussyState()}},l=C=>{i.value.removeEngine(C)},u=C=>{n.value=i.value.getEngine(C)},h=C=>{const w=i.value.getEngine(C),M=C6(w);i.value.addEngine(M)},B=async()=>{try{e.retainBussyState(),await ce.saveUSIEngineSetting(i.value),e.destroyModalDialog()}catch(C){e.pushError(C)}finally{e.releaseBussyState()}},p=()=>{e.closeModalDialog()},f=C=>{i.value.updateEngine(C),n.value=null},g=()=>{n.value=null};return(C,w)=>(S(),k(De,null,[c("div",null,[c("dialog",{ref_key:"dialog",ref:x},[c("div",xD,m(A(d).engineManagement),1),c("div",nD,[c("div",iD,[c("input",{ref_key:"filter",ref:s,class:"filter",placeholder:A(d).filterByEngineName,onInput:a},null,40,sD)]),c("div",oD,[i.value.engineList.length===0?(S(),k("div",rD,m(A(d).noEngineRegistered),1)):ee("",!0),(S(!0),k(De,null,Ne(r.value,M=>(S(),k("div",{key:M.uri,class:Ke(["row engine",{hidden:!M.visible}]),value:M.uri},[c("div",ED,m(M.name),1),c("button",{onClick:_=>u(M.uri)},m(A(d).config),9,lD),c("button",{onClick:_=>h(M.uri)},m(A(d).duplicate),9,cD),c("button",{onClick:_=>l(M.uri)},m(A(d).remove),9,uD)],10,aD))),128))])]),c("button",{class:"wide",onClick:w[0]||(w[0]=M=>E())},m(A(d).add),1),c("div",AD,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:w[1]||(w[1]=M=>B())},m(A(d).saveAndClose),1),c("button",{"data-hotkey":"Escape",onClick:w[2]||(w[2]=M=>p())},m(A(d).cancel),1)])],512)]),n.value?(S(),Me(eu,{key:0,"latest-engine-setting":n.value,onOk:f,onCancel:g},null,8,["latest-engine-setting"])):ee("",!0)],64))}});const BD=Ue(hD,[["__scopeId","data-v-1a55690d"]]),dD=""+new URL("../board/grid_square.svg",import.meta.url).href,fD=["src"],pD=["src"],gD=["src"],mD=["src"],CD=["src"],FD=["src"],DD=["src"],_D=ke({__name:"SimpleBoardView",props:{maxSize:{type:ft,required:!0},position:{type:Object,required:!0},header:{type:String,required:!1,default:null},footer:{type:String,required:!1,default:null},lastMove:{type:Object,required:!1,default:null}},setup(t){const e=t,x={pawn:"./piece/gothic/pawn.png",lance:"./piece/gothic/lance.png",knight:"./piece/gothic/knight.png",silver:"./piece/gothic/silver.png",gold:"./piece/gothic/gold.png",bishop:"./piece/gothic/bishop.png",rook:"./piece/gothic/rook.png",king:"./piece/gothic/king2.png",promPawn:"./piece/gothic/prom_pawn.png",promLance:"./piece/gothic/prom_lance.png",promKnight:"./piece/gothic/prom_knight.png",promSilver:"./piece/gothic/prom_silver.png",horse:"./piece/gothic/horse.png",dragon:"./piece/gothic/dragon.png"};function n(s){return{size:s,headerX:s*.5,headerY:s*.01,footerX:s*.01,footerY:s*.83,boardLeft:s*.15,boardTop:s*.12,boardSize:s*.7,boardBorderSize:s*.004,fileLeft:s*.168,fileTop:s*.078,rankLeft:s*.85,rankTop:s*.138,labelSize:s*.04,pieceSize:s*.7/9,fontSize:s*.038,handSize:s*.053,blackHandLeft:s*.9,blackHandTop:s*.12,whiteHandLeft:s*(.1-.053),whiteHandTop:s*.82}}const i=me(()=>{const s=n(Math.min(e.maxSize.width,e.maxSize.height));return{frameStyle:{width:`${s.size}px`,height:`${s.size}px`},headerStyle:{transform:"translate(-50%, 0%)",left:`${s.headerX}px`,top:`${s.headerY}px`,"font-size":`${s.fontSize}px`},footerStyle:{left:`${s.footerX}px`,top:`${s.footerY}px`,"font-size":`${s.fontSize}px`},boardStyle:{left:`${s.boardLeft-s.boardBorderSize}px`,top:`${s.boardTop-s.boardBorderSize}px`},boardImageStyle:{width:`${s.boardSize+s.boardBorderSize*2}px`,height:`${s.boardSize+s.boardBorderSize*2}px`},files:[1,2,3,4,5,6,7,8,9].map(o=>({style:{left:`${s.fileLeft+s.pieceSize*(9-o)}px`,top:`${s.fileTop}px`},image:`./character/arabic_numerals/${o}.png`})),fileImageStyle:{width:`${s.labelSize}px`,height:`${s.labelSize}px`},ranks:[1,2,3,4,5,6,7,8,9].map(o=>({style:{left:`${s.rankLeft}px`,top:`${s.rankTop+s.pieceSize*(o-1)}px`},image:`./character/numerals/${o}.png`})),rankImageStyle:{width:`${s.labelSize}px`,height:`${s.labelSize}px`},lastMoveStyle:function(){if(!e.lastMove)return null;const o=e.lastMove.to;return{"background-color":"gold",left:`${s.boardLeft+s.boardSize*o.x/9}px`,top:`${s.boardTop+s.boardSize*o.y/9}px`,width:`${s.pieceSize}px`,height:`${s.pieceSize}px`}}(),boardPieces:e.position.board.listNonEmptySquares().map(o=>{const r=e.position.board.at(o);return{id:`${o.x},${o.y}`,style:{left:`${s.boardLeft+s.boardSize*o.x/9}px`,top:`${s.boardTop+s.boardSize*o.y/9}px`},imageStyle:{width:`${s.pieceSize}px`,height:`${s.pieceSize}px`,transform:r.color==="white"?"rotate(180deg)":void 0},image:x[r.type]}}),blackHandImageStyle:{width:`${s.handSize}px`,height:"auto"},blackHandSymbol:{style:{left:`${s.blackHandLeft}px`,top:`${s.blackHandTop}px`},image:"./character/turns/black.png"},blackHandPieces:function(){const o=[];for(const{type:r,count:a}of e.position.blackHand.counts)a!==0&&(o.push({id:r,style:{left:`${s.blackHandLeft}px`,top:`${s.blackHandTop+s.handSize*(o.length+1)}px`},image:`./piece/gothic/${r}.png`}),a!==1&&o.push({id:`${r}-number`,style:{left:`${s.blackHandLeft}px`,top:`${s.blackHandTop+s.handSize*(o.length+1)}px`},image:`./character/numerals/${a}.png`}));return o.length===0?[{id:"empty",style:{left:`${s.blackHandLeft}px`,top:`${s.blackHandTop+s.handSize}px`},image:"./character/hand/nashi.png"}]:o}(),whiteHandImageStyle:{width:`${s.handSize}px`,height:"auto",transform:"rotate(180deg)"},whiteHandSymbol:{style:{left:`${s.whiteHandLeft}px`,top:`${s.whiteHandTop}px`,transform:"translate(0%, -100%)"},image:"./character/turns/white.png"},whiteHandPieces:function(){const o=[];for(const{type:r,count:a}of e.position.whiteHand.counts)a!==0&&(o.push({id:r,style:{left:`${s.whiteHandLeft}px`,top:`${s.whiteHandTop-s.handSize*(o.length+1)}px`,transform:"translate(0%, -100%)"},image:`./piece/gothic/${r}.png`}),a!==1&&o.push({id:`${r}-number`,style:{left:`${s.whiteHandLeft}px`,top:`${s.whiteHandTop-s.handSize*(o.length+1)}px`,transform:"translate(0%, -100%)"},image:`./character/numerals/${a}.png`}));return o.length===0?[{id:"empty",style:{left:`${s.whiteHandLeft}px`,top:`${s.whiteHandTop-s.handSize}px`,transform:"translate(0%, -100%)"},image:"./character/hand/nashi.png"}]:o}()}});return(s,o)=>(S(),k("div",null,[c("div",{class:"frame",style:de(i.value.frameStyle)},[t.header?(S(),k("div",{key:0,class:"header",style:de(i.value.headerStyle)},m(t.header),5)):ee("",!0),t.footer?(S(),k("div",{key:1,class:"footer",style:de(i.value.footerStyle)},m(t.footer),5)):ee("",!0),i.value.lastMoveStyle?(S(),k("div",{key:2,style:de(i.value.lastMoveStyle)},null,4)):ee("",!0),c("div",{class:"board-grid",style:de(i.value.boardStyle)},[c("img",{src:dD,style:de(i.value.boardImageStyle)},null,4)],4),(S(!0),k(De,null,Ne(i.value.files,r=>(S(),k("div",{key:r.image,style:de(r.style)},[c("img",{src:r.image,style:de(i.value.fileImageStyle)},null,12,fD)],4))),128)),(S(!0),k(De,null,Ne(i.value.ranks,r=>(S(),k("div",{key:r.image,style:de(r.style)},[c("img",{src:r.image,style:de(i.value.rankImageStyle)},null,12,pD)],4))),128)),(S(!0),k(De,null,Ne(i.value.boardPieces,r=>(S(),k("div",{key:r.id,style:de(r.style)},[c("img",{src:r.image,style:de(r.imageStyle)},null,12,gD)],4))),128)),c("div",{style:de(i.value.blackHandSymbol.style)},[c("img",{src:i.value.blackHandSymbol.image,style:de(i.value.blackHandImageStyle)},null,12,mD)],4),(S(!0),k(De,null,Ne(i.value.blackHandPieces,r=>(S(),k("div",{key:r.id,style:de(r.style)},[c("img",{src:r.image,style:de(i.value.blackHandImageStyle)},null,12,CD)],4))),128)),c("div",{style:de(i.value.whiteHandSymbol.style)},[c("img",{src:i.value.whiteHandSymbol.image,style:de(i.value.whiteHandImageStyle)},null,12,FD)],4),(S(!0),k(De,null,Ne(i.value.whiteHandPieces,r=>(S(),k("div",{key:r.id,style:de(r.style)},[c("img",{src:r.image,style:de(i.value.whiteHandImageStyle)},null,12,DD)],4))),128))],4)]))}});const vD=Ue(_D,[["__scopeId","data-v-ca9c5577"]]),ka=t=>(Qs("data-v-c237f6a3"),t=t(),eo(),t),bD={class:"form-item center"},yD=ka(()=>c("span",{class:"form-item-unit"},"px",-1)),SD=["placeholder"],wD={class:"main-buttons"},TD=ka(()=>c("span",null,"PNG",-1)),ID=ka(()=>c("span",null,"JPEG",-1)),PD=100,kD=150,MD=200,ND=16/9,RD=ke({__name:"ExportPositionImageDialog",setup(t){const e=$e(),x=Te(),n=me(()=>ro(e.record.metadata)||d.sente),i=me(()=>ao(e.record.metadata)||d.gote),s=e.record,o=s.current.move instanceof Ze?s.current.move:null,r=O(),a=O(),E=O(),l=O(),u=m0(new ft(window.innerWidth,window.innerHeight)),h=O(window.devicePixelRatio),B=new Wn,p=()=>{B.after(()=>{u.width=window.innerWidth,u.height=window.innerHeight},PD),h.value=window.devicePixelRatio};qe(()=>{pt(r.value),Ot(r.value),window.addEventListener("resize",p),E.value.value=x.positionImageSize,l.value.value=x.positionImageHeader}),_t(()=>{Lt(r.value),window.removeEventListener("resize",p)});const f=me(()=>{const T=x.positionImageSize/h.value,N=T*ND;return new ft(Math.min(N,u.width-kD),Math.min(T,u.height-MD))}),g=me(()=>x.useBookmarkAsPositionImageHeader&&s.current.bookmark||x.positionImageHeader||(o?`${s.current.ply}手目 ${Nx(s.position,o)}まで`:s.current.nextColor===L.BLACK?"先手番":"後手番")),C=T=>{const N=T.target;x.updateAppSetting({positionImageSize:parseInt(N.value)||400})},w=T=>{const N=T.target;x.updateAppSetting({positionImageHeader:N.value})},M=T=>{x.updateAppSetting({useBookmarkAsPositionImageHeader:T})},_=T=>{x.updateAppSetting({positionImageStyle:T})},I=()=>{const N=a.value.getBoundingClientRect();return new Lh(N.x,N.y,N.width,N.height)},D=()=>{ce.exportCaptureAsPNG(I()).catch(T=>{e.pushError(T)})},P=()=>{ce.exportCaptureAsJPEG(I()).catch(T=>{e.pushError(T)})},y=()=>{e.closeModalDialog()};return(T,N)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:r},[c("div",{ref_key:"board",ref:a,class:Ke(["board",A(x).positionImageStyle])},[A(x).positionImageStyle===A(yn).BOOK?(S(),Me(vD,{key:0,"max-size":f.value,position:A(s).position,header:g.value,footer:A(s).current.comment,"last-move":A(o)},null,8,["max-size","position","header","footer","last-move"])):(S(),Me(aa,{key:1,"board-image-type":A(x).boardImage,"piece-stand-image-type":A(x).pieceStandImage,"board-label-type":A(x).boardLabelType,"piece-image-base-url":A(ra)(A(x)),"custom-board-image-url":A(x).boardImageFileURL,"custom-piece-stand-image-url":A(x).pieceStandImageFileURL,"max-size":f.value,position:A(s).position,"last-move":A(o),flip:A(x).boardFlipping,"black-player-name":n.value,"white-player-name":i.value},null,8,["board-image-type","piece-stand-image-type","board-label-type","piece-image-base-url","custom-board-image-url","custom-piece-stand-image-url","max-size","position","last-move","flip","black-player-name","white-player-name"]))],2),c("div",null,[c("div",bD,[R(St,{value:A(x).positionImageStyle,items:[{value:A(yn).BOOK,label:A(d).bookStyle},{value:A(yn).GAME,label:A(d).gameStyle}],onChange:_},null,8,["value","items"]),c("input",{ref_key:"imageSize",ref:E,class:"size",type:"number",min:"400",max:"2000",onInput:C},null,544),yD]),c("div",{class:Ke(["form-item center",{hidden:A(x).positionImageStyle===A(yn).GAME}])},[c("input",{ref_key:"headerText",ref:l,class:"header",placeholder:A(d).typeCustomTitleHere,onInput:w},null,40,SD),R(et,{value:A(x).useBookmarkAsPositionImageHeader,label:A(d).useBookmarkAsHeader,onChange:M},null,8,["value","label"])],2)]),c("div",wD,[c("button",{autofocus:"","data-hotkey":"Enter",onClick:D},[R(re,{icon:A(se).SAVE},null,8,["icon"]),TD]),c("button",{autofocus:"","data-hotkey":"Enter",onClick:P},[R(re,{icon:A(se).SAVE},null,8,["icon"]),ID]),c("button",{autofocus:"","data-hotkey":"Escape",onClick:y},[R(re,{icon:A(se).CLOSE},null,8,["icon"]),c("span",null,m(A(d).close),1)])])],512)]))}});const OD=Ue(RD,[["__scopeId","data-v-c237f6a3"]]),LD={class:"container"},HD=["src"],UD=ke({__name:"ImageSelector",props:{defaultUrl:{type:String,default:""}},emits:["select"],setup(t,{emit:e}){const x=t,n=$e(),i=O(x.defaultUrl),s=async()=>{n.retainBussyState();try{const o=await ce.showSelectImageDialog(i.value);o&&(i.value=o,e("select",o))}catch(o){n.pushError(o)}finally{n.releaseBussyState()}};return(o,r)=>(S(),k("div",null,[c("div",LD,[c("button",{class:"thin select",onClick:s},m(A(d).select),1),i.value?(S(),k("img",{key:0,ref:"preview",class:"preview",src:i.value},null,8,HD)):ee("",!0)])]))}});const qi=Ue(UD,[["__scopeId","data-v-b16a3cda"]]),Ht=t=>(Qs("data-v-08083f84"),t=t(),eo(),t),$D={class:"title"},GD={class:"form-group scroll settings"},WD={class:"section"},zD={class:"section-title"},VD={class:"form-item"},KD={class:"form-item-label-wide"},jD=Ht(()=>c("div",{class:"form-group warning"},[c("div",{class:"note"}," 翻訳の改善にご協力ください。 We'd like your help to translate. "),c("div",{class:"note"}," 言語の変更には再起動が必要です。 You should restart this app to change the language. ")],-1)),qD={class:"form-item"},YD={class:"form-item-label-wide"},JD={class:"form-item"},XD={class:"form-item-label-wide"},ZD=Ht(()=>c("div",{class:"form-item-label-wide"},null,-1)),QD={class:"form-item"},e_={class:"form-item-label-wide"},t_=Ht(()=>c("div",{class:"form-item-label-wide"},null,-1)),x_={class:"form-item"},n_={class:"form-item-label-wide"},i_=Ht(()=>c("div",{class:"form-item-label-wide"},null,-1)),s_={class:"form-item"},o_={class:"form-item-label-wide"},r_=Ht(()=>c("div",{class:"form-item-label-wide"},null,-1)),a_={class:"form-item"},E_={class:"form-item-label-wide"},l_={class:"form-item-label-wide"},c_={class:"form-item-label-wide"},u_={class:"form-item"},A_={class:"form-item-label-wide"},h_=Ht(()=>c("hr",null,null,-1)),B_={class:"section"},d_={class:"section-title"},f_={class:"form-item"},p_={class:"form-item-label-wide"},g_=["value"],m_=Ht(()=>c("div",{class:"form-item-unit"},"%",-1)),C_={class:"form-item"},F_={class:"form-item-label-wide"},D_=["value"],__=Ht(()=>c("div",{class:"form-item-unit"},"%",-1)),v_={class:"form-item"},b_={class:"form-item-label-wide"},y_=["value"],S_={class:"form-item-unit"},w_={class:"form-item"},T_={class:"form-item-label-wide"},I_=Ht(()=>c("hr",null,null,-1)),P_={class:"section"},k_={class:"section-title"},M_={class:"form-item"},N_={class:"form-item-label-wide"},R_={class:"form-item"},O_={class:"form-item-label-wide"},L_={class:"form-item"},H_={class:"form-item-label-wide"},U_={class:"form-item"},$_={class:"form-item-label-wide"},G_=["value"],W_=Ht(()=>c("hr",null,null,-1)),z_={class:"section"},V_={class:"section-title"},K_={class:"form-item"},j_={class:"form-item-label-wide"},q_={class:"form-item-unit"},Y_={class:"form-item"},J_={class:"form-item-label-wide"},X_=["value"],Z_={class:"form-item-unit"},Q_=Ht(()=>c("hr",null,null,-1)),ev={class:"section"},tv={class:"section-title"},xv={class:"form-item"},nv={class:"form-item-label-wide"},iv={class:"form-item"},sv={class:"form-item-label-wide"},ov=["value"],rv={class:"form-item-unit"},av={class:"form-item"},Ev={class:"form-item-label-wide"},lv=["value"],cv=Ht(()=>c("div",{class:"form-item-unit"},"%",-1)),uv={class:"form-item"},Av={class:"form-item-label-wide"},hv=["value"],Bv=Ht(()=>c("div",{class:"form-item-unit"},"%",-1)),dv={class:"form-item"},fv={class:"form-item-label-wide"},pv=["value"],gv=Ht(()=>c("div",{class:"form-item-unit"},"%",-1)),mv={class:"form-item"},Cv={class:"form-item-label-wide"},Fv=["value"],Dv=Ht(()=>c("div",{class:"form-item-unit"},"%",-1)),_v=Ht(()=>c("hr",null,null,-1)),vv={class:"section"},bv={class:"section-title"},yv={class:"form-group warning"},Sv={key:0,class:"note"},wv={key:1,class:"note"},Tv={key:2,class:"note"},Iv={key:3,class:"note"},Pv={class:"form-item"},kv={class:"form-item-label-wide"},Mv={class:"form-item"},Nv={class:"form-item-label-wide"},Rv={class:"form-item"},Ov={class:"form-item-label-wide"},Lv={class:"form-item"},Hv={class:"form-item-label-wide"},Uv={class:"main-buttons"},$v=ke({__name:"AppSettingDialog",setup(t){const e={"\r\n":"crlf","\n":"lf","\r":"cr"},x={crlf:`\r +`,lf:` +`,cr:"\r"},n=$e(),i=Te(),s=O(),o=O(i.language),r=O(i.thema),a=O(i.backgroundImageType),E=O(),l=O(i.pieceImage),u=O(i.boardImage),h=O(),B=O(i.pieceStandImage),p=O(),f=O(i.boardLabelType!=Hn.NONE),g=O(i.leftSideControlType!=Un.NONE),C=O(i.rightSideControlType!=$n.NONE),w=O(i.tabPaneType),M=O(),_=O(),I=O(),D=O(i.clockSoundTarget),P=O(i.defaultRecordFileFormat),y=O(i.textDecodingRule),T=O(e[i.returnCode]),N=O(),G=O(i.translateEngineOptionName),W=O(),Ae=O(i.evaluationViewFrom),Q=O(),ne=O(),te=O(),Z=O(),K=O(),J=O(i.enableAppLog),ue=O(i.enableUSILog),we=O(i.enableCSALog),Fe=O(i.logLevel),Je=O(i.backgroundImageFileURL),ot=O(i.croppedPieceImageBaseURL),tt=O(i.pieceImageFileURL),ze=O(i.boardImageFileURL),Bt=O(i.pieceStandImageFileURL);qe(()=>{pt(s.value),Ot(s.value)}),_t(()=>{Lt(s.value)});const rt=async()=>{n.retainBussyState();try{const Ye={language:o.value,thema:r.value,backgroundImageType:a.value,pieceImage:l.value,boardImage:u.value,pieceImageFileURL:tt.value,croppedPieceImageBaseURL:ot.value,pieceStandImage:B.value,boardLabelType:f.value?Hn.STANDARD:Hn.NONE,leftSideControlType:g.value?Un.STANDARD:Un.NONE,rightSideControlType:C.value?$n.STANDARD:$n.NONE,tabPaneType:w.value,pieceVolume:nt(M.value),clockVolume:nt(_.value),clockPitch:nt(I.value),clockSoundTarget:D.value,defaultRecordFileFormat:P.value,textDecodingRule:y.value,returnCode:x[T.value],autoSaveDirectory:N.value.value,translateEngineOptionName:G.value,engineTimeoutSeconds:nt(W.value),evaluationViewFrom:Ae.value,coefficientInSigmoid:nt(Q.value),badMoveLevelThreshold1:nt(ne.value),badMoveLevelThreshold2:nt(te.value),badMoveLevelThreshold3:nt(Z.value),badMoveLevelThreshold4:nt(K.value),enableAppLog:J.value,enableUSILog:ue.value,enableCSALog:we.value,logLevel:Fe.value};Ye.backgroundImageType!==A0.NONE&&(Ye.backgroundImageFileURL=Je.value),Ye.pieceImage===Y0.CUSTOM_IMAGE&&tt.value&&(await ce.cropPieceImage(tt.value),Ye.pieceImageFileURL=tt.value,Ye.croppedPieceImageBaseURL=await ce.getPieceImageBaseURL(tt.value)),Ye.boardImage===xt.CUSTOM_IMAGE&&(Ye.boardImageFileURL=ze.value),Ye.pieceStandImage===Kt.CUSTOM_IMAGE&&(Ye.pieceStandImageFileURL=Bt.value),await Te().updateAppSetting(Ye),n.closeAppSettingDialog()}catch(Ye){n.pushError(Ye)}finally{n.releaseBussyState()}},yt=async()=>{n.retainBussyState();try{const Ye=await ce.showSelectDirectoryDialog(N.value.value);Ye&&(N.value.value=Ye)}catch(Ye){n.pushError(Ye)}finally{n.releaseBussyState()}},E0=()=>{n.closeAppSettingDialog()};return(Ye,F)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:s},[c("div",$D,m(A(d).appSettings),1),c("div",GD,[c("div",WD,[c("div",zD,m(A(d).view),1),c("div",VD,[c("div",KD,m(A(d).language),1),R(St,{class:"selector",value:o.value,items:[{label:"日本語",value:A(S0).JA},{label:"English",value:A(S0).EN},{label:"繁體中文",value:A(S0).ZH_TW}],onChange:F[0]||(F[0]=v=>{o.value=v})},null,8,["value","items"])]),jD,c("div",qD,[c("div",YD,m(A(d).theme),1),R(St,{class:"selector",value:r.value,items:[{label:A(d).green,value:A(bx).STANDARD},{label:A(d).cherryBlossom,value:A(bx).CHERRY_BLOSSOM},{label:A(d).autumn,value:A(bx).AUTUMN},{label:A(d).snow,value:A(bx).SNOW},{label:A(d).dark,value:A(bx).DARK}],onChange:F[1]||(F[1]=v=>{r.value=v})},null,8,["value","items"])]),c("div",JD,[c("div",XD,m(A(d).backgroundImage),1),R(St,{class:"selector",value:a.value,items:[{label:A(d).none,value:A(A0).NONE},{label:A(d).bgCover,value:A(A0).COVER},{label:A(d).bgContain,value:A(A0).CONTAIN},{label:A(d).bgTile,value:A(A0).TILE}],onChange:F[2]||(F[2]=v=>{a.value=v})},null,8,["value","items"])]),c("div",{ref_key:"backgroundImageSelector",ref:E,class:Ke(["form-item",{hidden:a.value===A(A0).NONE}])},[ZD,R(qi,{class:"image-selector","default-url":A(i).backgroundImageFileURL,onSelect:F[3]||(F[3]=v=>Je.value=v)},null,8,["default-url"])],2),c("div",QD,[c("div",e_,m(A(d).piece),1),R(St,{class:"selector",value:l.value,items:[{label:A(d).singleKanjiPiece,value:A(Y0).HITOMOJI},{label:A(d).singleKanjiGothicPiece,value:A(Y0).HITOMOJI_GOTHIC},{label:A(d).singleKanjiDarkPiece,value:A(Y0).HITOMOJI_DARK},{label:A(d).singleKanjiGothicDarkPiece,value:A(Y0).HITOMOJI_GOTHIC_DARK},{label:A(d).customImage,value:A(Y0).CUSTOM_IMAGE}],onChange:F[4]||(F[4]=v=>{l.value=v})},null,8,["value","items"]),c("div",{ref:"pieceImageSelector",class:Ke(["form-item",{hidden:l.value!==A(Y0).CUSTOM_IMAGE}])},[t_,R(qi,{class:"image-selector","default-url":A(i).pieceImageFileURL,onSelect:F[5]||(F[5]=v=>tt.value=v)},null,8,["default-url"])],2)]),c("div",x_,[c("div",n_,m(A(d).board),1),R(St,{class:"selector",value:u.value,items:[{label:A(d).lightWoodyTexture,value:A(xt).LIGHT},{label:A(d).warmWoodTexture,value:A(xt).WARM},{label:A(d).regin,value:A(xt).RESIN},{label:A(d).regin+"2",value:A(xt).RESIN2},{label:A(d).regin+"3",value:A(xt).RESIN3},{label:A(d).dark,value:A(xt).DARK},{label:A(d).green,value:A(xt).GREEN},{label:A(d).cherryBlossom,value:A(xt).CHERRY_BLOSSOM},{label:A(d).customImage,value:A(xt).CUSTOM_IMAGE}],onChange:F[6]||(F[6]=v=>{u.value=v})},null,8,["value","items"])]),c("div",{ref_key:"boardImageSelector",ref:h,class:Ke(["form-item",{hidden:u.value!==A(xt).CUSTOM_IMAGE}])},[i_,R(qi,{class:"image-selector","default-url":A(i).boardImageFileURL,onSelect:F[7]||(F[7]=v=>ze.value=v)},null,8,["default-url"])],2),c("div",s_,[c("div",o_,m(A(d).pieceStand),1),R(St,{class:"selector",value:B.value,items:[{label:A(d).standard,value:A(Kt).STANDARD},{label:A(d).dark,value:A(Kt).DARK},{label:A(d).green,value:A(Kt).GREEN},{label:A(d).cherryBlossom,value:A(Kt).CHERRY_BLOSSOM},{label:A(d).customImage,value:A(Kt).CUSTOM_IMAGE}],onChange:F[8]||(F[8]=v=>{B.value=v})},null,8,["value","items"])]),c("div",{ref_key:"pieceStandImageSelector",ref:p,class:Ke(["form-item",{hidden:B.value!==A(Kt).CUSTOM_IMAGE}])},[r_,R(qi,{class:"image-selector","default-url":A(i).pieceStandImageFileURL,onSelect:F[9]||(F[9]=v=>Bt.value=v)},null,8,["default-url"])],2),c("div",a_,[c("div",E_,m(A(d).displayFileAndRank),1),R(et,{value:f.value,onChange:F[10]||(F[10]=v=>f.value=v)},null,8,["value"])]),c("div",{class:Ke([{hidden:!A(b0)()},"form-item"])},[c("div",l_,m(A(d).displayLeftControls),1),R(et,{value:g.value,onChange:F[11]||(F[11]=v=>g.value=v)},null,8,["value"])],2),c("div",{class:Ke([{hidden:!A(b0)()},"form-item"])},[c("div",c_,m(A(d).displayRightControls),1),R(et,{value:C.value,onChange:F[12]||(F[12]=v=>C.value=v)},null,8,["value"])],2),c("div",u_,[c("div",A_,m(A(d).tabViewStyle),1),R(St,{class:"selector",value:w.value,items:[{label:A(d).oneColumn,value:A(xi).SINGLE},{label:A(d).twoColumns,value:A(xi).DOUBLE}],onChange:F[13]||(F[13]=v=>{w.value=v})},null,8,["value","items"])])]),h_,c("div",B_,[c("div",d_,m(A(d).sounds),1),c("div",f_,[c("div",p_,m(A(d).pieceLoudness),1),c("input",{ref_key:"pieceVolume",ref:M,value:A(i).pieceVolume,type:"number",max:"100",min:"0"},null,8,g_),m_]),c("div",C_,[c("div",F_,m(A(d).clockLoudness),1),c("input",{ref_key:"clockVolume",ref:_,value:A(i).clockVolume,type:"number",max:"100",min:"0"},null,8,D_),__]),c("div",v_,[c("div",b_,m(A(d).clockPitch),1),c("input",{ref_key:"clockPitch",ref:I,value:A(i).clockPitch,type:"number",max:"880",min:"220"},null,8,y_),c("div",S_,"Hz ("+m(A(d).between(220,880))+")",1)]),c("div",w_,[c("div",T_,m(A(d).clockSoundTarget),1),R(St,{class:"selector",value:D.value,items:[{label:A(d).anyTurn,value:A(ii).ALL},{label:A(d).onlyHumanTurn,value:A(ii).ONLY_USER}],onChange:F[14]||(F[14]=v=>{D.value=v})},null,8,["value","items"])])]),I_,c("div",P_,[c("div",k_,m(A(d).file),1),c("div",M_,[c("div",N_,m(A(d).defaultRecordFileFormat),1),R(St,{class:"selector",value:P.value,items:[{label:".kif (Shift_JIS)",value:A(ns).KIF},{label:".kifu (UTF-8)",value:A(ns).KIFU},{label:".csa",value:A(ns).CSA}],onChange:F[15]||(F[15]=v=>{P.value=v})},null,8,["value","items"])]),c("div",R_,[c("div",O_,m(A(d).textEncoding),1),R(St,{class:"selector",value:y.value,items:[{label:A(d).strict,value:A(Ts).STRICT},{label:A(d).autoDetect,value:A(Ts).AUTO_DETECT}],onChange:F[16]||(F[16]=v=>{y.value=v})},null,8,["value","items"])]),c("div",L_,[c("div",H_,m(A(d).newlineCharacter),1),R(St,{class:"selector",value:T.value,items:[{label:"CRLF (Windows)",value:"crlf"},{label:"LF (UNIX/Mac)",value:"lf"},{label:`CR (${A(d).old90sMac})`,value:"cr"}],onChange:F[17]||(F[17]=v=>{T.value=v})},null,8,["value","items"])]),c("div",U_,[c("div",$_,m(A(d).autoSavingDirectory),1),c("input",{ref_key:"autoSaveDirectory",ref:N,class:"file-path",value:A(i).autoSaveDirectory,type:"text"},null,8,G_),c("button",{class:"thin",onClick:yt},m(A(d).select),1)])]),W_,c("div",z_,[c("div",V_,m(A(d).usiProtocol),1),c("div",K_,[c("div",j_,m(A(d).translateOptionName),1),R(et,{value:G.value,onChange:F[18]||(F[18]=v=>G.value=v)},null,8,["value"]),c("div",q_,"("+m(A(d).functionalOnJapaneseOnly)+")",1)]),c("div",Y_,[c("div",J_,m(A(d).maxStartupTime),1),c("input",{ref_key:"engineTimeoutSeconds",ref:W,value:A(i).engineTimeoutSeconds,type:"number",max:"300",min:"1"},null,8,X_),c("div",Z_,m(A(d).secondsSuffix)+" ("+m(A(d).between(1,300))+") ",1)])]),Q_,c("div",ev,[c("div",tv,m(A(d).evaluationAndEstimatedWinRate),1),c("div",xv,[c("div",nv,m(A(d).signOfEvaluation),1),R(St,{class:"selector",value:Ae.value,items:[{label:A(d).swapEachTurnChange,value:A(ni).EACH},{label:A(d).alwaysSenteIsPositive,value:A(ni).BLACK}],onChange:F[19]||(F[19]=v=>{Ae.value=v})},null,8,["value","items"])]),c("div",iv,[c("div",sv,m(A(d).winRateCoefficient),1),c("input",{ref_key:"coefficientInSigmoid",ref:Q,value:A(i).coefficientInSigmoid,type:"number",max:"10000",min:"1"},null,8,ov),c("div",rv," ("+m(A(d).recommended)+": "+m(A(d).between(600,1500))+") ",1)]),c("div",av,[c("div",Ev,m(A(d).inaccuracyThreshold),1),c("input",{ref_key:"badMoveLevelThreshold1",ref:ne,value:A(i).badMoveLevelThreshold1,type:"number",max:"100",min:"0"},null,8,lv),cv]),c("div",uv,[c("div",Av,m(A(d).dubiousThreshold),1),c("input",{ref_key:"badMoveLevelThreshold2",ref:te,value:A(i).badMoveLevelThreshold2,type:"number",max:"100",min:"0"},null,8,hv),Bv]),c("div",dv,[c("div",fv,m(A(d).mistakeThreshold),1),c("input",{ref_key:"badMoveLevelThreshold3",ref:Z,value:A(i).badMoveLevelThreshold3,type:"number",max:"100",min:"0"},null,8,pv),gv]),c("div",mv,[c("div",Cv,m(A(d).blunderThreshold),1),c("input",{ref_key:"badMoveLevelThreshold4",ref:K,value:A(i).badMoveLevelThreshold4,type:"number",max:"100",min:"0"},null,8,Fv),Dv])]),_v,c("div",vv,[c("div",bv,m(A(d).forDevelopers),1),c("div",yv,[A(b0)()?ee("",!0):(S(),k("div",Sv,m(A(d).inBrowserLogsOutputToConsoleAndIgnoreThisSetting),1)),A(b0)()?(S(),k("div",wv,m(A(d).shouldRestartToApplyLogSettings),1)):ee("",!0),A(b0)()?(S(),k("div",Tv,m(A(d).canOpenLogDirectoryFromMenu),1)):ee("",!0),A(b0)()?(S(),k("div",Iv,m(A(d).hasNoOldLogCleanUpFeature),1)):ee("",!0)]),c("div",Pv,[c("div",kv,m(A(d).enableAppLog),1),R(et,{value:J.value,onChange:F[20]||(F[20]=v=>J.value=v)},null,8,["value"])]),c("div",Mv,[c("div",Nv,m(A(d).enableUSILog),1),R(et,{value:ue.value,onChange:F[21]||(F[21]=v=>ue.value=v)},null,8,["value"])]),c("div",Rv,[c("div",Ov,m(A(d).enableCSALog),1),R(et,{value:we.value,onChange:F[22]||(F[22]=v=>we.value=v)},null,8,["value"])]),c("div",Lv,[c("div",Hv,m(A(d).logLevel),1),R(St,{class:"selector",value:Fe.value,items:[{label:"DEBUG",value:A(ct).DEBUG},{label:"INFO",value:A(ct).INFO},{label:"WARN",value:A(ct).WARN},{label:"ERROR",value:A(ct).ERROR}],onChange:F[23]||(F[23]=v=>{Fe.value=v})},null,8,["value","items"])])])]),c("div",Uv,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:F[24]||(F[24]=v=>rt())},m(A(d).saveAndClose),1),c("button",{"data-hotkey":"Escape",onClick:F[25]||(F[25]=v=>E0())},m(A(d).cancel),1)])],512)]))}});const Gv=Ue($v,[["__scopeId","data-v-08083f84"]]),Wv={ref:"content"},zv={class:"form-group"},Vv={class:"message"},Kv={class:"message"},jv={key:0,class:"message"},qv={key:1,class:"message"},Yv={class:"main-buttons"},Jv=ke({__name:"PasteDialog",setup(t){const e=$e(),x=O(),n=O();e.retainBussyState(),qe(async()=>{try{pt(x.value),Ot(x.value),b0()&&(n.value.value=await navigator.clipboard.readText())}finally{e.releaseBussyState()}}),_t(()=>{Lt(x.value)});const i=()=>{const o=n.value.value;if(!o){e.pushError(new Error(d.emptyRecordInput));return}e.closeModalDialog(),e.pasteRecord(o)},s=()=>{e.closeModalDialog()};return(o,r)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x},[c("div",Wv,[c("div",zv,[c("div",Vv,m(A(d).importingFollowingRecordOrPosition),1),c("div",Kv,m(A(d).supportsKIFCSAUSI),1),A(b0)()?ee("",!0):(S(),k("div",jv,m(A(d).plesePasteRecordIntoTextArea),1)),A(b0)()?ee("",!0):(S(),k("div",qv,m(A(d).desktopVersionPastesAutomatically),1)),c("textarea",{ref_key:"textarea",ref:n},null,512)])],512),c("div",Yv,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:i},m(A(d).import),1),c("button",{"data-hotkey":"Escape",onClick:s},m(A(d).cancel),1)])],512)]))}});const Xv=Ue(Jv,[["__scopeId","data-v-2908a87e"]]),Zv={class:"message-box"},Qv={class:"message"},eb=ke({__name:"BussyMessage",setup(t){const e=O();return qe(()=>{pt(e.value)}),(x,n)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:e,class:"bussy"},[c("div",Zv,[R(re,{icon:A(se).BUSSY},null,8,["icon"]),c("div",Qv,m(A(d).processingPleaseWait),1)])],512)]))}});const tb=Ue(eb,[["__scopeId","data-v-76d58604"]]),xb={class:"message-box"},nb={class:"message"},ib={class:"main-buttons"},sb=ke({__name:"ConfirmDialog",setup(t){const e=$e(),x=O(),n=()=>{e.confirmationOk()},i=()=>{e.confirmationCancel()};return qe(()=>{pt(x.value,i),Ot(x.value)}),_t(()=>{Lt(x.value)}),(s,o)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x,class:"confirm"},[c("div",xb,[R(re,{icon:A(se).QUESTION},null,8,["icon"]),c("div",nb,m(A(e).confirmation),1)]),c("div",ib,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:o[0]||(o[0]=r=>n())},"OK"),c("button",{"data-hotkey":"Escape",onClick:o[1]||(o[1]=r=>i())},m(A(d).cancel),1)])],512)]))}});const ob=Ue(sb,[["__scopeId","data-v-9f781aaf"]]),rb={class:"message-box"},ab={class:"message"},Eb={key:0,class:"list"},lb={class:"main-buttons"},cb=ke({__name:"InfoMessage",setup(t){const e=$e(),x=O();qe(()=>{pt(x.value),Ot(x.value)}),_t(()=>{Lt(x.value)});const n=()=>{e.dequeueMessage()};return(i,s)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x,class:"info"},[c("div",rb,[R(re,{icon:A(se).INFO},null,8,["icon"]),c("div",ab,[(S(!0),k(De,null,Ne(A(e).message.text.split(` +`),(o,r)=>(S(),k("div",{key:r},m(o),1))),128))])]),(S(!0),k(De,null,Ne(A(e).message.attachments,(o,r)=>(S(),k("div",{key:r,class:"attachment"},[o.type==="list"?(S(),k("ul",Eb,[(S(!0),k(De,null,Ne(o.items,(a,E)=>(S(),k("li",{key:E,class:"list-item"},[rx(m(a.text)+" ",1),c("ul",null,[(S(!0),k(De,null,Ne(a.children,(l,u)=>(S(),k("li",{key:u,class:"list-child-item"},m(l),1))),128))])]))),128))])):ee("",!0)]))),128)),c("div",lb,[c("button",{autofocus:"","data-hotkey":"Escape",onClick:s[0]||(s[0]=o=>n())},m(A(d).close),1)])],512)]))}});const ub=Ue(cb,[["__scopeId","data-v-370c03d8"]]),Ab={class:"message-box"},hb={class:"column"},Bb={class:"notice"},db={class:"index"},fb={key:0},pb={class:"message"},gb={class:"main-buttons"},mb=ke({__name:"ErrorMessage",setup(t){const e=$e(),x=O();qe(()=>{pt(x.value),Ot(x.value)}),_t(()=>{Lt(x.value)});const n=()=>{e.clearErrors()};return(i,s)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x,class:"error"},[c("div",Ab,[R(re,{icon:A(se).ERROR},null,8,["icon"]),c("div",hb,[c("div",Bb,m(A(d).errorsOccurred(A(e).errors.length)),1),(S(!0),k(De,null,Ne(A(e).errors,(o,r)=>(S(),k("div",{key:r,class:"item"},[c("p",db,[rx(m(r+1)+" ",1),o.count>=2?(S(),k("span",fb,"("+m(o.count)+" 回)",1)):ee("",!0)]),c("p",pb,m(o.message),1)]))),128))])]),c("div",gb,[c("button",{autofocus:"","data-hotkey":"Escape",onClick:s[0]||(s[0]=o=>n())},m(A(d).close),1)])],512)]))}});const Cb=Ue(mb,[["__scopeId","data-v-34c3016d"]]),Fb={class:"title"},Db={class:"form-group"},_b={class:"form-group"},vb={class:"form-item"},bb={class:"form-item-unit"},yb=["disabled"],Sb={class:"form-item-unit"},wb={class:"form-item"},Tb={class:"form-item-unit"},Ib=["disabled"],Pb={class:"form-item-unit"},kb={class:"form-group"},Mb={class:"form-item"},Nb={class:"form-item-unit"},Rb={class:"form-item-unit"},Ob={class:"form-group"},Lb={class:"form-item"},Hb={class:"form-item-label-wide"},Ub={class:"main-buttons"},$b=ke({__name:"AnalysisDialog",setup(t){const e=$e(),x=O(),n=O(!1),i=O(),s=O(!1),o=O(),r=O(),a=O(t0.NONE),E=O(new I0),l=O("");e.retainBussyState(),qe(async()=>{var f;pt(x.value),Ot(x.value);try{const g=await ce.loadAnalysisSetting();E.value=await ce.loadUSIEngineSetting(),l.value=((f=g.usi)==null?void 0:f.uri)||"",n.value=g.startCriteria.enableNumber,i.value.value=g.startCriteria.number,s.value=g.endCriteria.enableNumber,o.value.value=g.endCriteria.number,r.value.value=g.perMoveCriteria.maxSeconds,a.value=g.commentBehavior}catch(g){e.pushError(g),e.destroyModalDialog()}finally{e.releaseBussyState()}}),_t(()=>{Lt(x.value)});const u=()=>{if(!l.value||!E.value.hasEngine(l.value)){e.pushError("エンジンを選択してください。");return}const g={usi:E.value.getEngine(l.value),startCriteria:{enableNumber:n.value,number:nt(i.value)},endCriteria:{enableNumber:s.value,number:nt(o.value)},perMoveCriteria:{maxSeconds:nt(r.value)},commentBehavior:a.value};e.startAnalysis(g)},h=()=>{e.closeModalDialog()},B=async f=>{E.value=f},p=f=>{l.value=f};return(f,g)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x,class:"root"},[c("div",Fb,m(A(d).recordAnalysis),1),c("div",Db,[c("div",null,m(A(d).searchEngine),1),R(Lx,{"player-uri":l.value,"engine-settings":E.value,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:B,onSelectPlayer:p},null,8,["player-uri","engine-settings"])]),c("div",_b,[c("div",null,m(A(d).startEndCriteria),1),c("div",vb,[R(et,{value:n.value,onChange:g[0]||(g[0]=C=>{n.value=C})},null,8,["value"]),c("div",bb,m(A(d).fromPrefix)+m(A(d).plyPrefix),1),c("input",{ref_key:"startNumber",ref:i,class:"small",type:"number",min:"1",step:"1",disabled:!n.value},null,8,yb),c("div",Sb,m(A(d).plySuffix)+m(A(d).fromSuffix),1)]),c("div",wb,[R(et,{value:s.value,onChange:g[1]||(g[1]=C=>{s.value=C})},null,8,["value"]),c("div",Tb,m(A(d).toPrefix)+m(A(d).plyPrefix),1),c("input",{ref_key:"endNumber",ref:o,class:"small",type:"number",min:"1",step:"1",disabled:!s.value},null,8,Ib),c("div",Pb,m(A(d).plySuffix)+m(A(d).toSuffix),1)])]),c("div",kb,[c("div",null,m(A(d).endCriteria1Move),1),c("div",Mb,[c("div",Nb,m(A(d).toPrefix),1),c("input",{ref_key:"maxSecondsPerMove",ref:r,class:"small",type:"number",min:"0",step:"1"},null,512),c("div",Rb,m(A(d).secondsSuffix)+m(A(d).toSuffix),1)])]),c("div",Ob,[c("div",null,m(A(d).outputSettings),1),c("div",Lb,[c("div",Hb,m(A(d).moveComments),1),R(St,{class:"selector",items:[{value:A(t0).NONE,label:A(d).noOutputs},{value:A(t0).INSERT,label:A(d).insertCommentToTop},{value:A(t0).APPEND,label:A(d).appendCommentToBottom},{value:A(t0).OVERWRITE,label:A(d).overwrite}],value:a.value,onChange:g[2]||(g[2]=C=>{a.value=C})},null,8,["items","value"])])]),c("div",Ub,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:g[3]||(g[3]=C=>u())}," 解析実行 "),c("button",{"data-hotkey":"Escape",onClick:g[4]||(g[4]=C=>h())},"キャンセル")])],512)]))}});const Gb=Ue($b,[["__scopeId","data-v-93e774e5"]]),Wb={class:"message-box"},zb={class:"message"},Vb={key:0},Kb={key:1},jb={key:2},qb={key:0,class:"main-buttons"},Yb=ke({__name:"CSAGameReadyDialog",setup(t){const e=$e(),x=O(),n=O(0);let i=0;qe(()=>{pt(x.value),Ot(x.value)}),_t(()=>{Lt(x.value),window.clearInterval(i)}),nx(()=>e.csaGameState,o=>{window.clearInterval(i),o===r0.LOGIN_RETRY_INTERVAL&&(n.value=Z8,i=window.setInterval(()=>{n.value--},1e3))});const s=()=>{e.cancelCSAGame()};return(o,r)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x,class:"bussy"},[c("div",Wb,[R(re,{icon:A(se).BUSSY},null,8,["icon"]),c("div",zb,[A(e).csaGameState===A(r0).READY?(S(),k("span",Vb,m(A(d).waitingForNewGame),1)):ee("",!0),A(e).csaGameState===A(r0).LOGIN_RETRY_INTERVAL?(S(),k("span",Kb,m(A(d).tryToReloginToCSAServerNSecondsLater(n.value)),1)):ee("",!0),A(e).csaGameState===A(r0).WAITING_LOGIN?(S(),k("span",jb,m(A(d).tryingToConnectAndLoginToCSAServer),1)):ee("",!0)])]),A(e).csaGameState===A(r0).READY||A(e).csaGameState===A(r0).LOGIN_RETRY_INTERVAL?(S(),k("div",qb,[c("button",{autofocus:"","data-hotkey":"Escape",onClick:r[0]||(r[0]=a=>s())},m(A(d).cancelGame),1)])):ee("",!0)],512)]))}});const Jb=Ue(Yb,[["__scopeId","data-v-1fb6a0d5"]]),Xb={class:"title"},Zb={class:"form-group scroll"},Qb={class:"main-buttons"},ey=ke({__name:"MateSearchDialog",setup(t){const e=$e(),x=O(),n=O(new I0),i=O("");e.retainBussyState(),qe(async()=>{var r;pt(x.value),Ot(x.value);try{const a=await ce.loadMateSearchSetting();n.value=await ce.loadUSIEngineSetting(),i.value=((r=a.usi)==null?void 0:r.uri)||""}catch(a){e.pushError(a),e.destroyModalDialog()}finally{e.releaseBussyState()}}),_t(()=>{Lt(x.value)});const s=()=>{if(!i.value||!n.value.hasEngine(i.value)){e.pushError("エンジンを選択してください。");return}const a={usi:n.value.getEngine(i.value)};e.startMateSearch(a)},o=()=>{e.closeModalDialog()};return(r,a)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:x,class:"root"},[c("div",Xb,m(A(d).mateSearch),1),c("div",Zb,[R(Lx,{"player-uri":i.value,"engine-settings":n.value,"display-thread-state":!0,"display-multi-pv-state":!1,onUpdateEngineSetting:a[0]||(a[0]=E=>{n.value=E}),onSelectPlayer:a[1]||(a[1]=E=>{i.value=E})},null,8,["player-uri","engine-settings"])]),c("div",Qb,[c("button",{"data-hotkey":"Enter",autofocus:"",onClick:a[2]||(a[2]=E=>s())},m(A(d).startMateSearch),1),c("button",{"data-hotkey":"Escape",onClick:a[3]||(a[3]=E=>o())},m(A(d).cancel),1)])],512)]))}});const ty=Ue(ey,[["__scopeId","data-v-e8e6e178"]]),xy={class:"full column"},ny={class:"row control-row"},iy={class:"row control-row"},sy={class:"row control-row"},oy={class:"full column reverse"},ry=["disabled"],ay=["disabled"],Ey={class:"informations"},ly={class:"information"},cy={class:"information"},uy=ke({__name:"PVPreviewDialog",props:{position:{type:Object,required:!0},multiPv:{type:Number,required:!1,default:void 0},depth:{type:Number,required:!1,default:void 0},selectiveDepth:{type:Number,required:!1,default:void 0},score:{type:Number,required:!1,default:void 0},mate:{type:Number,required:!1,default:void 0},lowerBound:{type:Boolean,required:!1,default:!1},upperBound:{type:Boolean,required:!1,default:!1},pv:{type:Array,required:!0}},emits:["close"],setup(t,{emit:e}){const x=t,n=$e(),i=Te(),s=O(),o=m0(new ft(0,0)),r=m0(new bt),a=O(i.boardFlipping),E=()=>{o.width=window.innerWidth*.8,o.height=window.innerHeight*.8-80},l=()=>{r.clear(x.position);for(const y of x.pv)r.append(y,{ignoreValidation:!0});r.goto(1)};qe(async()=>{E(),l(),window.addEventListener("resize",E),pt(s.value),Ot(s.value)}),_t(()=>{window.removeEventListener("resize",E),Lt(s.value)}),nx([()=>x.position,()=>x.pv],()=>{l()});const u=()=>{e("close")},h=()=>{r.goto(0)},B=()=>{r.goto(Number.MAX_SAFE_INTEGER)},p=()=>{r.goBack()},f=()=>{r.goForward()},g=()=>{a.value=!a.value},C=(y,T,N)=>N===ni.EACH||T==L.BLACK?y:-y,w=me(()=>{const y=[];return x.depth!==void 0&&y.push(`深さ=${x.depth}`),x.selectiveDepth!==void 0&&y.push(`選択的深さ=${x.selectiveDepth}`),x.score!==void 0&&(y.push(`評価値=${C(x.score,x.position.color,i.evaluationViewFrom)}`),x.lowerBound&&y.push("(下界値)"),x.upperBound&&y.push("(上界値)")),x.mate!==void 0&&y.push(`詰み手数=${C(x.mate,x.position.color,i.evaluationViewFrom)}`),x.multiPv&&y.push(`順位=${x.multiPv}`),y.join(" / ")}),M=me(()=>r.current.move instanceof Ze?r.current.move:null),_=me(()=>r.moves.slice(1).map(y=>({text:y.displayText,selected:y.ply===r.current.ply}))),I=me(()=>(n.appState===$.NORMAL||n.appState===$.RESEARCH)&&n.record.position.sfen===x.position.sfen),D=()=>{const y=n.appendMovesSilently(x.pv,{ignoreValidation:!0});n.enqueueMessage({text:d.insertedNMovesToRecord(y)})},P=()=>{n.appendSearchComment(Gt.RESEARCHER,{depth:x.depth,score:x.score,mate:x.mate,pv:x.pv},t0.APPEND),n.enqueueMessage({text:d.insertedComment})};return(y,T)=>(S(),k("div",null,[c("dialog",{ref_key:"dialog",ref:s},[R(aa,{class:"board","board-image-type":A(i).boardImage,"piece-stand-image-type":A(i).pieceStandImage,"piece-image-base-url":A(ra)(A(i)),"board-label-type":A(i).boardLabelType,"custom-board-image-url":A(i).boardImageFileURL,"custom-piece-stand-image-url":A(i).pieceStandImageFileURL,"max-size":o,position:r.position,"last-move":M.value,flip:a.value,"black-player-name":A(d).sente,"white-player-name":A(d).gote},{"right-control":u0(()=>[c("div",xy,[c("div",ny,[c("button",{class:"control-item","data-hotkey":"Control+t",onClick:g},[R(re,{icon:A(se).FLIP},null,8,["icon"])]),c("button",{class:"control-item",autofocus:"","data-hotkey":"Escape",onClick:u},[R(re,{icon:A(se).CLOSE},null,8,["icon"])])]),c("div",iy,[c("button",{class:"control-item","data-hotkey":"ArrowLeft",onClick:h},[R(re,{icon:A(se).FIRST},null,8,["icon"])]),c("button",{class:"control-item","data-hotkey":"ArrowRight",onClick:B},[R(re,{icon:A(se).LAST},null,8,["icon"])])]),c("div",sy,[c("button",{class:"control-item","data-hotkey":"ArrowUp",onClick:p},[R(re,{icon:A(se).BACK},null,8,["icon"])]),c("button",{class:"control-item","data-hotkey":"ArrowDown",onClick:f},[R(re,{icon:A(se).NEXT},null,8,["icon"])])])])]),"left-control":u0(()=>[c("div",oy,[c("button",{class:"control-item-wide",disabled:!I.value,onClick:D},[R(re,{icon:A(se).TREE},null,8,["icon"]),c("span",null,m(A(d).insertToRecord),1)],8,ry),c("button",{class:"control-item-wide",disabled:!I.value,onClick:P},[R(re,{icon:A(se).NOTE},null,8,["icon"]),c("span",null,m(A(d).insertToComment),1)],8,ay)])]),_:1},8,["board-image-type","piece-stand-image-type","piece-image-base-url","board-label-type","custom-board-image-url","custom-piece-stand-image-url","max-size","position","last-move","flip","black-player-name","white-player-name"]),c("div",Ey,[c("div",ly,m(w.value),1),c("div",cy,[(S(!0),k(De,null,Ne(_.value,(N,G)=>(S(),k("span",{key:G},[c("span",{class:Ke(["move-element",{selected:N.selected}])}," "+m(N.text)+" ",3)]))),128))])])],512)]))}});const Ay=Ue(uy,[["__scopeId","data-v-20ead1fe"]]),hy=ke({__name:"App",setup(t){const e=Te(),x=$e();qe(()=>{const i=document.getElementsByTagName("body")[0];i.addEventListener("copy",s=>{x.copyRecordKIF(),s.preventDefault()}),i.addEventListener("paste",s=>{x.showPasteDialog(),s.preventDefault()}),i.addEventListener("dragover",s=>{s.preventDefault()}),i.addEventListener("drop",s=>{if(s.dataTransfer&&s.dataTransfer.files[0]){const o=s.dataTransfer.files[0].path;x.openRecord(o)}s.preventDefault()})});const n=me(()=>{if(e.backgroundImageType==A0.NONE||!e.backgroundImageFileURL)return{};let i="";switch(e.backgroundImageType){case A0.COVER:i="cover";break;case A0.CONTAIN:i="contain";break;case A0.TILE:i="auto";break}return{"background-image":`url("${e.backgroundImageFileURL}")`,"background-size":i}});return(i,s)=>(S(),k("div",{class:Ke(["root full",A(e).thema]),style:de(n.value)},[R(Ym,{class:"full"}),A(x).appState===A($).GAME_DIALOG?(S(),Me(JC,{key:0})):ee("",!0),A(x).appState===A($).CSA_GAME_DIALOG?(S(),Me(zF,{key:1})):ee("",!0),A(x).appState===A($).RESEARCH_DIALOG?(S(),Me(tD,{key:2})):ee("",!0),A(x).appState===A($).ANALYSIS_DIALOG?(S(),Me(Gb,{key:3})):ee("",!0),A(x).appState===A($).MATE_SEARCH_DIALOG?(S(),Me(ty,{key:4})):ee("",!0),A(x).appState===A($).USI_ENGINE_SETTING_DIALOG?(S(),Me(BD,{key:5})):ee("",!0),A(x).appState===A($).EXPORT_POSITION_IMAGE_DIALOG?(S(),Me(OD,{key:6})):ee("",!0),A(x).isAppSettingDialogVisible?(S(),Me(Gv,{key:7})):ee("",!0),A(x).appState===A($).PASTE_DIALOG?(S(),Me(Xv,{key:8})):ee("",!0),A(x).isBussy?(S(),Me(tb,{key:9})):ee("",!0),A(x).confirmation?(S(),Me(ob,{key:10})):ee("",!0),A(x).csaGameState===A(r0).WAITING_LOGIN||A(x).csaGameState===A(r0).READY||A(x).csaGameState===A(r0).LOGIN_RETRY_INTERVAL?(S(),Me(Jb,{key:11})):ee("",!0),A(x).pvPreview?(S(),Me(Ay,{key:12,position:A(x).pvPreview.position,"multi-pv":A(x).pvPreview.multiPV,depth:A(x).pvPreview.depth,"selective-depth":A(x).pvPreview.selectiveDepth,score:A(x).pvPreview.score,mate:A(x).pvPreview.mate,"lower-bound":A(x).pvPreview.lowerBound,"upper-bound":A(x).pvPreview.upperBound,pv:A(x).pvPreview.pv,onClose:s[0]||(s[0]=o=>A(x).closePVPreviewDialog())},null,8,["position","multi-pv","depth","selective-depth","score","mate","lower-bound","upper-bound","pv"])):ee("",!0),A(x).hasMessage?(S(),Me(ub,{key:13})):ee("",!0),A(x).hasError?(S(),Me(Cb,{key:14})):ee("",!0)],6))}});const By=Ue(hy,[["__scopeId","data-v-b724763d"]]);var pe=(t=>(t.NEW_RECORD="newRecord",t.OPEN_RECORD="openRecord",t.SAVE_RECORD="saveRecord",t.SAVE_RECORD_AS="saveRecordAs",t.EXPORT_POSITION_IMAGE="exportPositionImage",t.COPY_RECORD="copyRecord",t.COPY_RECORD_CSA="copyRecordCsa",t.COPY_RECORD_USI_BEFORE="copyRecordUsiBefore",t.COPY_RECORD_USI_ALL="copyRecordUsiAll",t.COPY_BOARD_SFEN="copyRecordSfen",t.PASTE_RECORD="pasteRecord",t.INSERT_INTERRUPT="insertInterrupt",t.INSERT_RESIGN="insertResign",t.INSERT_DRAW="insertDraw",t.INSERT_IMPASS="insertImpass",t.INSERT_REPETITION_DRAW="insertRepetitionDraw",t.INSERT_MATE="insertMate",t.INSERT_NO_MATE="insertNoMate",t.INSERT_TIMEOUT="insertTimeout",t.INSERT_FOUL_WIN="insertFoulWin",t.INSERT_FOUL_LOSE="insertFoulLose",t.INSERT_ENTERING_OF_KING="insertEnteringOfKing",t.INSERT_WIN_BY_DEFAULT="insertWinByDefault",t.INSERT_LOSE_BY_DEFAULT="insertLossByDefault",t.REMOVE_CURRENT_MOVE="remvoeCurrentMove",t.START_POSITION_EDITING="startPositionEditing",t.END_POSITION_EDITING="endPositionEditing",t.CHANGE_TURN="changeTurn",t.INIT_POSITION_STANDARD="initPositionStandard",t.INIT_POSITION_HANDICAP_LANCE="initPositionHandicapLance",t.INIT_POSITION_HANDICAP_RIGHT_LANCE="initPositionHandicapRightLance",t.INIT_POSITION_HANDICAP_BISHOP="initPositionHandicapBishop",t.INIT_POSITION_HANDICAP_ROOK="initPositionHandicapRook",t.INIT_POSITION_HANDICAP_ROOK_LANCE="initPositionHandicapRookLance",t.INIT_POSITION_HANDICAP_2PIECES="initPositionHandicap2Pieces",t.INIT_POSITION_HANDICAP_4PIECES="initPositionHandicap4Pieces",t.INIT_POSITION_HANDICAP_6PIECES="initPositionHandicap6Pieces",t.INIT_POSITION_HANDICAP_8PIECES="initPositionHandicap8Pieces",t.INIT_POSITION_HANDICAP_10PIECES="initPositionHandicap10Pieces",t.INIT_POSITION_TSUME_SHOGI="initPositionTsumeShogi",t.INIT_POSITION_TSUME_SHOGI_2KINGS="initPositionTsumeShogi2Kings",t.START_RESEARCH="startResearch",t.STOP_RESEARCH="stopResearch",t.START_ANALYSIS="startAnalysis",t.STOP_ANALYSIS="stopAnalysis",t.START_MATE_SEARCH="startMateSearch",t.STOP_MATE_SEARCH="stopMateSearch",t.START_GAME="startGame",t.START_CSA_GAME="startCSAGame",t.STOP_GAME="stopGame",t.RESIGN="resign",t.WIN="win",t.LOGOUT="logout",t.FLIP_BOARD="flipBoard",t.APP_SETTING_DIALOG="appSetting",t.USI_ENGINE_SETTING_DIALOG="usiEngineSetting",t))(pe||{});function dy(){const t=$e(),e=Te();ye.onSendError(x=>{t.pushError(x)}),ye.onMenuEvent(x=>{if(!t.isBussy)switch(x){case pe.NEW_RECORD:t.resetRecord();break;case pe.OPEN_RECORD:t.openRecord();break;case pe.SAVE_RECORD:t.saveRecord({overwrite:!0});break;case pe.SAVE_RECORD_AS:t.saveRecord();break;case pe.EXPORT_POSITION_IMAGE:t.showExportBoardImageDialog();break;case pe.COPY_RECORD:t.copyRecordKIF();break;case pe.COPY_RECORD_CSA:t.copyRecordCSA();break;case pe.COPY_RECORD_USI_BEFORE:t.copyRecordUSIBefore();break;case pe.COPY_RECORD_USI_ALL:t.copyRecordUSIAll();break;case pe.COPY_BOARD_SFEN:t.copyBoardSFEN();break;case pe.PASTE_RECORD:t.showPasteDialog();break;case pe.INSERT_INTERRUPT:t.insertSpecialMove(Y.INTERRUPT);break;case pe.INSERT_RESIGN:t.insertSpecialMove(Y.RESIGN);break;case pe.INSERT_DRAW:t.insertSpecialMove(Y.DRAW);break;case pe.INSERT_IMPASS:t.insertSpecialMove(Y.IMPASS);break;case pe.INSERT_REPETITION_DRAW:t.insertSpecialMove(Y.REPETITION_DRAW);break;case pe.INSERT_MATE:t.insertSpecialMove(Y.MATE);break;case pe.INSERT_NO_MATE:t.insertSpecialMove(Y.NO_MATE);break;case pe.INSERT_TIMEOUT:t.insertSpecialMove(Y.TIMEOUT);break;case pe.INSERT_FOUL_WIN:t.insertSpecialMove(Y.FOUL_WIN);break;case pe.INSERT_FOUL_LOSE:t.insertSpecialMove(Y.FOUL_LOSE);break;case pe.INSERT_ENTERING_OF_KING:t.insertSpecialMove(Y.ENTERING_OF_KING);break;case pe.INSERT_WIN_BY_DEFAULT:t.insertSpecialMove(Y.WIN_BY_DEFAULT);break;case pe.INSERT_LOSE_BY_DEFAULT:t.insertSpecialMove(Y.LOSE_BY_DEFAULT);break;case pe.REMOVE_CURRENT_MOVE:t.removeCurrentMove();break;case pe.START_POSITION_EDITING:t.startPositionEditing();break;case pe.END_POSITION_EDITING:t.endPositionEditing();break;case pe.CHANGE_TURN:t.changeTurn();break;case pe.INIT_POSITION_STANDARD:t.initializePosition(he.STANDARD);break;case pe.INIT_POSITION_HANDICAP_LANCE:t.initializePosition(he.HANDICAP_LANCE);break;case pe.INIT_POSITION_HANDICAP_RIGHT_LANCE:t.initializePosition(he.HANDICAP_RIGHT_LANCE);break;case pe.INIT_POSITION_HANDICAP_BISHOP:t.initializePosition(he.HANDICAP_BISHOP);break;case pe.INIT_POSITION_HANDICAP_ROOK:t.initializePosition(he.HANDICAP_ROOK);break;case pe.INIT_POSITION_HANDICAP_ROOK_LANCE:t.initializePosition(he.HANDICAP_ROOK_LANCE);break;case pe.INIT_POSITION_HANDICAP_2PIECES:t.initializePosition(he.HANDICAP_2PIECES);break;case pe.INIT_POSITION_HANDICAP_4PIECES:t.initializePosition(he.HANDICAP_4PIECES);break;case pe.INIT_POSITION_HANDICAP_6PIECES:t.initializePosition(he.HANDICAP_6PIECES);break;case pe.INIT_POSITION_HANDICAP_8PIECES:t.initializePosition(he.HANDICAP_8PIECES);break;case pe.INIT_POSITION_HANDICAP_10PIECES:t.initializePosition(he.HANDICAP_10PIECES);break;case pe.INIT_POSITION_TSUME_SHOGI:t.initializePosition(he.TSUME_SHOGI);break;case pe.INIT_POSITION_TSUME_SHOGI_2KINGS:t.initializePosition(he.TSUME_SHOGI_2KINGS);break;case pe.START_MATE_SEARCH:t.showMateSearchDialog();break;case pe.STOP_MATE_SEARCH:t.stopMateSearch();break;case pe.START_GAME:t.showGameDialog();break;case pe.START_CSA_GAME:t.showCSAGameDialog();break;case pe.STOP_GAME:t.stopGame();break;case pe.RESIGN:tn.resign();break;case pe.WIN:tn.win();break;case pe.LOGOUT:t.cancelCSAGame();break;case pe.START_RESEARCH:t.showResearchDialog();break;case pe.STOP_RESEARCH:t.stopResearch();break;case pe.START_ANALYSIS:t.showAnalysisDialog();break;case pe.STOP_ANALYSIS:t.stopAnalysis();break;case pe.FLIP_BOARD:Te().flipBoard();break;case pe.APP_SETTING_DIALOG:t.showAppSettingDialog();break;case pe.USI_ENGINE_SETTING_DIALOG:t.showUsiEngineManagementDialog();break}}),ye.onUpdateAppSetting(x=>{e.updateAppSetting(JSON.parse(x))}),ye.onOpenRecord(x=>{t.showConfirmation({message:d.areYouSureWantToOpenFileInsteadOfCurrentRecord,onOk:()=>{t.openRecord(x)}})}),ye.onUSIBestMove(ud),ye.onUSICheckmate(Ad),ye.onUSICheckmateNotImplemented(hd),ye.onUSICheckmateTimeout(Bd),ye.onUSINoMate(dd),ye.onUSIInfo((x,n,i)=>{const s=JSON.parse(i);$E(x,n,s)}),ye.onUSIPonderInfo((x,n,i)=>{const s=JSON.parse(i);$E(x,n,s)}),ye.onCSAGameSummary((x,n)=>{Id(x,JSON.parse(n))}),ye.onCSAReject(Pd),ye.onCSAStart((x,n)=>{kd(x,JSON.parse(n))}),ye.onCSAMove((x,n,i)=>{Md(x,n,JSON.parse(i))}),ye.onCSAGameResult(Nd),ye.onCSAClose(Rd),nx(()=>[t.appState,t.isBussy],([x,n])=>ye.updateAppState(x,n)),ye.updateAppState(t.appState,t.isBussy)}ce.log(ct.INFO,`start renderer process: APP_VERSION=${z8.appVersion}`);H0.register(...Sm);dy();function tu(t){if(!document)return;const e=d.electronShogi,x=z8.appVersion;t?document.title=`${e} Version ${x} - ${t}`:document.title=`${e} Version ${x}`}const Yi=$e().addListener("changeFilePath",tu);Promise.allSettled([Te().loadAppSetting().catch(t=>{Yi.pushError(new Error("アプリ設定の読み込み中にエラーが発生しました: "+t))}),ce.getRecordPathFromProcArg().then(t=>{t&&Yi.openRecord(t)}).catch(t=>{Yi.pushError(new Error("起動パラメーターの取得に失敗しました: "+t))})]).finally(()=>{const t=Te().language;ce.log(ct.INFO,`set language: ${t}`),Oh(t),tu(Yi.recordFilePath),ce.log(ct.INFO,"mount app"),m5(By).mount("#app")}); diff --git a/docs/webapp/assets/index-763f506b.js b/docs/webapp/assets/index-763f506b.js deleted file mode 100644 index 95f1c05d..00000000 --- a/docs/webapp/assets/index-763f506b.js +++ /dev/null @@ -1,43 +0,0 @@ -var J9=Object.defineProperty;var X9=(t,e,x)=>e in t?J9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:x}):t[e]=x;var _=(t,e,x)=>(X9(t,typeof e!="symbol"?e+"":e,x),x);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function x(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=x(i);fetch(i.href,s)}})();function kr(t,e){const x=Object.create(null),n=t.split(",");for(let i=0;i!!x[i.toLowerCase()]:i=>!!x[i]}function he(t){if(ye(t)){const e={};for(let x=0;x{if(x){const n=x.split(Q9);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function qe(t){let e="";if(Ft(t))e=t;else if(ye(t))for(let x=0;xFt(t)?t:t==null?"":ye(t)||at(t)&&(t.toString===Bc||!Ie(t.toString))?JSON.stringify(t,Ac,2):String(t),Ac=(t,e)=>e&&e.__v_isRef?Ac(t,e.value):Xx(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((x,[n,i])=>(x[`${n} =>`]=i,x),{})}:uc(e)?{[`Set(${e.size})`]:[...e.values()]}:at(e)&&!ye(e)&&!dc(e)?String(e):e,ot={},Jx=[],m0=()=>{},iA=()=>!1,sA=/^on[^a-z]/,zs=t=>sA.test(t),Mr=t=>t.startsWith("onUpdate:"),Ot=Object.assign,Or=(t,e)=>{const x=t.indexOf(e);x>-1&&t.splice(x,1)},oA=Object.prototype.hasOwnProperty,He=(t,e)=>oA.call(t,e),ye=Array.isArray,Xx=t=>Gs(t)==="[object Map]",uc=t=>Gs(t)==="[object Set]",Ie=t=>typeof t=="function",Ft=t=>typeof t=="string",Rr=t=>typeof t=="symbol",at=t=>t!==null&&typeof t=="object",hc=t=>at(t)&&Ie(t.then)&&Ie(t.catch),Bc=Object.prototype.toString,Gs=t=>Bc.call(t),rA=t=>Gs(t).slice(8,-1),dc=t=>Gs(t)==="[object Object]",Nr=t=>Ft(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,qi=kr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ws=t=>{const e=Object.create(null);return x=>e[x]||(e[x]=t(x))},aA=/-(\w)/g,nn=Ws(t=>t.replace(aA,(e,x)=>x?x.toUpperCase():"")),EA=/\B([A-Z])/g,ln=Ws(t=>t.replace(EA,"-$1").toLowerCase()),fc=Ws(t=>t.charAt(0).toUpperCase()+t.slice(1)),fo=Ws(t=>t?`on${fc(t)}`:""),Kn=(t,e)=>!Object.is(t,e),po=(t,e)=>{for(let x=0;x{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:x})},lA=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Ta;const cA=()=>Ta||(Ta=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let h0;class AA{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=h0,!e&&h0&&(this.index=(h0.scopes||(h0.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const x=h0;try{return h0=this,e()}finally{h0=x}}}on(){h0=this}off(){h0=this.parent}stop(e){if(this._active){let x,n;for(x=0,n=this.effects.length;x{const e=new Set(t);return e.w=0,e.n=0,e},pc=t=>(t.w&ox)>0,gc=t=>(t.n&ox)>0,BA=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let x=0;for(let n=0;n{(l==="length"||l>=a)&&r.push(E)})}else switch(x!==void 0&&r.push(o.get(x)),e){case"add":ye(t)?Nr(x)&&r.push(o.get("length")):(r.push(o.get(Px)),Xx(t)&&r.push(o.get(Ko)));break;case"delete":ye(t)||(r.push(o.get(Px)),Xx(t)&&r.push(o.get(Ko)));break;case"set":Xx(t)&&r.push(o.get(Px));break}if(r.length===1)r[0]&&jo(r[0]);else{const a=[];for(const E of r)E&&a.push(...E);jo(Lr(a))}}function jo(t,e){const x=ye(t)?t:[...t];for(const n of x)n.computed&&Ia(n);for(const n of x)n.computed||Ia(n)}function Ia(t,e){(t!==f0||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const fA=kr("__proto__,__v_isRef,__isVue"),Fc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Rr)),pA=Ur(),gA=Ur(!1,!0),mA=Ur(!0),ka=CA();function CA(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...x){const n=$e(this);for(let s=0,o=this.length;s{t[e]=function(...x){cn();const n=$e(this)[e].apply(this,x);return An(),n}}),t}function FA(t){const e=$e(this);return Jt(e,"has",t),e.hasOwnProperty(t)}function Ur(t=!1,e=!1){return function(n,i,s){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&s===(t?e?LA:yc:e?bc:vc).get(n))return n;const o=ye(n);if(!t){if(o&&He(ka,i))return Reflect.get(ka,i,s);if(i==="hasOwnProperty")return FA}const r=Reflect.get(n,i,s);return(Rr(i)?Fc.has(i):fA(i))||(t||Jt(n,"get",i),e)?r:kt(r)?o&&Nr(i)?r:r.value:at(r)?t?Sc(r):F0(r):r}}const DA=Dc(),_A=Dc(!0);function Dc(t=!1){return function(x,n,i,s){let o=x[n];if(sn(o)&&kt(o)&&!kt(i))return!1;if(!t&&(!hs(i)&&!sn(i)&&(o=$e(o),i=$e(i)),!ye(x)&&kt(o)&&!kt(i)))return o.value=i,!0;const r=ye(x)&&Nr(n)?Number(n)t,Vs=t=>Reflect.getPrototypeOf(t);function _i(t,e,x=!1,n=!1){t=t.__v_raw;const i=$e(t),s=$e(e);x||(e!==s&&Jt(i,"get",e),Jt(i,"get",s));const{has:o}=Vs(i),r=n?$r:x?Wr:jn;if(o.call(i,e))return r(t.get(e));if(o.call(i,s))return r(t.get(s));t!==i&&t.get(e)}function vi(t,e=!1){const x=this.__v_raw,n=$e(x),i=$e(t);return e||(t!==i&&Jt(n,"has",t),Jt(n,"has",i)),t===i?x.has(t):x.has(t)||x.has(i)}function bi(t,e=!1){return t=t.__v_raw,!e&&Jt($e(t),"iterate",Px),Reflect.get(t,"size",t)}function Ma(t){t=$e(t);const e=$e(this);return Vs(e).has.call(e,t)||(e.add(t),K0(e,"add",t,t)),this}function Oa(t,e){e=$e(e);const x=$e(this),{has:n,get:i}=Vs(x);let s=n.call(x,t);s||(t=$e(t),s=n.call(x,t));const o=i.call(x,t);return x.set(t,e),s?Kn(e,o)&&K0(x,"set",t,e):K0(x,"add",t,e),this}function Ra(t){const e=$e(this),{has:x,get:n}=Vs(e);let i=x.call(e,t);i||(t=$e(t),i=x.call(e,t)),n&&n.call(e,t);const s=e.delete(t);return i&&K0(e,"delete",t,void 0),s}function Na(){const t=$e(this),e=t.size!==0,x=t.clear();return e&&K0(t,"clear",void 0,void 0),x}function yi(t,e){return function(n,i){const s=this,o=s.__v_raw,r=$e(o),a=e?$r:t?Wr:jn;return!t&&Jt(r,"iterate",Px),o.forEach((E,l)=>n.call(i,a(E),a(l),s))}}function Si(t,e,x){return function(...n){const i=this.__v_raw,s=$e(i),o=Xx(s),r=t==="entries"||t===Symbol.iterator&&o,a=t==="keys"&&o,E=i[t](...n),l=x?$r:e?Wr:jn;return!e&&Jt(s,"iterate",a?Ko:Px),{next(){const{value:A,done:h}=E.next();return h?{value:A,done:h}:{value:r?[l(A[0]),l(A[1])]:l(A),done:h}},[Symbol.iterator](){return this}}}}function Y0(t){return function(...e){return t==="delete"?!1:this}}function TA(){const t={get(s){return _i(this,s)},get size(){return bi(this)},has:vi,add:Ma,set:Oa,delete:Ra,clear:Na,forEach:yi(!1,!1)},e={get(s){return _i(this,s,!1,!0)},get size(){return bi(this)},has:vi,add:Ma,set:Oa,delete:Ra,clear:Na,forEach:yi(!1,!0)},x={get(s){return _i(this,s,!0)},get size(){return bi(this,!0)},has(s){return vi.call(this,s,!0)},add:Y0("add"),set:Y0("set"),delete:Y0("delete"),clear:Y0("clear"),forEach:yi(!0,!1)},n={get(s){return _i(this,s,!0,!0)},get size(){return bi(this,!0)},has(s){return vi.call(this,s,!0)},add:Y0("add"),set:Y0("set"),delete:Y0("delete"),clear:Y0("clear"),forEach:yi(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=Si(s,!1,!1),x[s]=Si(s,!0,!1),e[s]=Si(s,!1,!0),n[s]=Si(s,!0,!0)}),[t,x,e,n]}const[PA,IA,kA,MA]=TA();function zr(t,e){const x=e?t?MA:kA:t?IA:PA;return(n,i,s)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(He(x,i)&&i in n?x:n,i,s)}const OA={get:zr(!1,!1)},RA={get:zr(!1,!0)},NA={get:zr(!0,!1)},vc=new WeakMap,bc=new WeakMap,yc=new WeakMap,LA=new WeakMap;function HA(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function UA(t){return t.__v_skip||!Object.isExtensible(t)?0:HA(rA(t))}function F0(t){return sn(t)?t:Gr(t,!1,_c,OA,vc)}function $A(t){return Gr(t,!1,wA,RA,bc)}function Sc(t){return Gr(t,!0,SA,NA,yc)}function Gr(t,e,x,n,i){if(!at(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=i.get(t);if(s)return s;const o=UA(t);if(o===0)return t;const r=new Proxy(t,o===2?n:x);return i.set(t,r),r}function Zx(t){return sn(t)?Zx(t.__v_raw):!!(t&&t.__v_isReactive)}function sn(t){return!!(t&&t.__v_isReadonly)}function hs(t){return!!(t&&t.__v_isShallow)}function wc(t){return Zx(t)||sn(t)}function $e(t){const e=t&&t.__v_raw;return e?$e(e):t}function Tc(t){return us(t,"__v_skip",!0),t}const jn=t=>at(t)?F0(t):t,Wr=t=>at(t)?Sc(t):t;function Pc(t){xx&&f0&&(t=$e(t),Cc(t.dep||(t.dep=Lr())))}function Ic(t,e){t=$e(t);const x=t.dep;x&&jo(x)}function kt(t){return!!(t&&t.__v_isRef===!0)}function U(t){return zA(t,!1)}function zA(t,e){return kt(t)?t:new GA(t,e)}class GA{constructor(e,x){this.__v_isShallow=x,this.dep=void 0,this.__v_isRef=!0,this._rawValue=x?e:$e(e),this._value=x?e:jn(e)}get value(){return Pc(this),this._value}set value(e){const x=this.__v_isShallow||hs(e)||sn(e);e=x?e:$e(e),Kn(e,this._rawValue)&&(this._rawValue=e,this._value=x?e:jn(e),Ic(this))}}function c(t){return kt(t)?t.value:t}const WA={get:(t,e,x)=>c(Reflect.get(t,e,x)),set:(t,e,x,n)=>{const i=t[e];return kt(i)&&!kt(x)?(i.value=x,!0):Reflect.set(t,e,x,n)}};function kc(t){return Zx(t)?t:new Proxy(t,WA)}var Mc;class VA{constructor(e,x,n,i){this._setter=x,this.dep=void 0,this.__v_isRef=!0,this[Mc]=!1,this._dirty=!0,this.effect=new Hr(e,()=>{this._dirty||(this._dirty=!0,Ic(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=$e(this);return Pc(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}Mc="__v_isReadonly";function KA(t,e,x=!1){let n,i;const s=Ie(t);return s?(n=t,i=m0):(n=t.get,i=t.set),new VA(n,i,s||!i,x)}function nx(t,e,x,n){let i;try{i=n?t(...n):t()}catch(s){Ks(s,e,x)}return i}function c0(t,e,x,n){if(Ie(t)){const s=nx(t,e,x,n);return s&&hc(s)&&s.catch(o=>{Ks(o,e,x)}),s}const i=[];for(let s=0;s>>1;Yn(Pt[n])w0&&Pt.splice(e,1)}function XA(t){ye(t)?Qx.push(...t):(!L0||!L0.includes(t,t.allowRecurse?_x+1:_x))&&Qx.push(t),Rc()}function La(t,e=qn?w0+1:0){for(;eYn(x)-Yn(n)),_x=0;_xt.id==null?1/0:t.id,ZA=(t,e)=>{const x=Yn(t)-Yn(e);if(x===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return x};function Lc(t){qo=!1,qn=!0,Pt.sort(ZA);const e=m0;try{for(w0=0;w0Ft(B)?B.trim():B)),A&&(i=x.map(lA))}let r,a=n[r=fo(e)]||n[r=fo(nn(e))];!a&&s&&(a=n[r=fo(ln(e))]),a&&c0(a,t,6,i);const E=n[r+"Once"];if(E){if(!t.emitted)t.emitted={};else if(t.emitted[r])return;t.emitted[r]=!0,c0(E,t,6,i)}}function Hc(t,e,x=!1){const n=e.emitsCache,i=n.get(t);if(i!==void 0)return i;const s=t.emits;let o={},r=!1;if(!Ie(t)){const a=E=>{const l=Hc(E,e,!0);l&&(r=!0,Ot(o,l))};!x&&e.mixins.length&&e.mixins.forEach(a),t.extends&&a(t.extends),t.mixins&&t.mixins.forEach(a)}return!s&&!r?(at(t)&&n.set(t,null),null):(ye(s)?s.forEach(a=>o[a]=null):Ot(o,s),at(t)&&n.set(t,o),o)}function js(t,e){return!t||!zs(e)?!1:(e=e.slice(2).replace(/Once$/,""),He(t,e[0].toLowerCase()+e.slice(1))||He(t,ln(e))||He(t,e))}let Ut=null,qs=null;function Bs(t){const e=Ut;return Ut=t,qs=t&&t.type.__scopeId||null,e}function Ys(t){qs=t}function Js(){qs=null}function B0(t,e=Ut,x){if(!e||t._n)return t;const n=(...i)=>{n._d&&ja(-1);const s=Bs(e);let o;try{o=t(...i)}finally{Bs(s),n._d&&ja(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function go(t){const{type:e,vnode:x,proxy:n,withProxy:i,props:s,propsOptions:[o],slots:r,attrs:a,emit:E,render:l,renderCache:A,data:h,setupState:B,ctx:p,inheritAttrs:f}=t;let g,C;const S=Bs(t);try{if(x.shapeFlag&4){const y=i||n;g=y0(l.call(y,y,A,s,B,h,p)),C=a}else{const y=e;g=y0(y.length>1?y(s,{attrs:a,slots:r,emit:E}):y(s,null)),C=e.props?a:eu(a)}}catch(y){On.length=0,Ks(y,t,1),g=R(A0)}let I=g;if(C&&f!==!1){const y=Object.keys(C),{shapeFlag:v}=I;y.length&&v&7&&(o&&y.some(Mr)&&(C=tu(C,o)),I=rx(I,C))}return x.dirs&&(I=rx(I),I.dirs=I.dirs?I.dirs.concat(x.dirs):x.dirs),x.transition&&(I.transition=x.transition),g=I,Bs(S),g}const eu=t=>{let e;for(const x in t)(x==="class"||x==="style"||zs(x))&&((e||(e={}))[x]=t[x]);return e},tu=(t,e)=>{const x={};for(const n in t)(!Mr(n)||!(n.slice(9)in e))&&(x[n]=t[n]);return x};function xu(t,e,x){const{props:n,children:i,component:s}=t,{props:o,children:r,patchFlag:a}=e,E=s.emitsOptions;if(e.dirs||e.transition)return!0;if(x&&a>=0){if(a&1024)return!0;if(a&16)return n?Ha(n,o,E):!!o;if(a&8){const l=e.dynamicProps;for(let A=0;At.__isSuspense;function su(t,e){e&&e.pendingBranch?ye(t)?e.effects.push(...t):e.effects.push(t):XA(t)}function ou(t,e){if(ft){let x=ft.provides;const n=ft.parent&&ft.parent.provides;n===x&&(x=ft.provides=Object.create(n)),x[t]=e}}function Yi(t,e,x=!1){const n=ft||Ut;if(n){const i=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(i&&t in i)return i[t];if(arguments.length>1)return x&&Ie(e)?e.call(n.proxy):e}}const wi={};function ix(t,e,x){return Uc(t,e,x)}function Uc(t,e,{immediate:x,deep:n,flush:i,onTrack:s,onTrigger:o}=ot){const r=hA()===(ft==null?void 0:ft.scope)?ft:null;let a,E=!1,l=!1;if(kt(t)?(a=()=>t.value,E=hs(t)):Zx(t)?(a=()=>t,n=!0):ye(t)?(l=!0,E=t.some(I=>Zx(I)||hs(I)),a=()=>t.map(I=>{if(kt(I))return I.value;if(Zx(I))return jx(I);if(Ie(I))return nx(I,r,2)})):Ie(t)?e?a=()=>nx(t,r,2):a=()=>{if(!(r&&r.isUnmounted))return A&&A(),c0(t,r,3,[h])}:a=m0,e&&n){const I=a;a=()=>jx(I())}let A,h=I=>{A=C.onStop=()=>{nx(I,r,4)}},B;if(Xn)if(h=m0,e?x&&c0(e,r,3,[a(),l?[]:void 0,h]):a(),i==="sync"){const I=Zu();B=I.__watcherHandles||(I.__watcherHandles=[])}else return m0;let p=l?new Array(t.length).fill(wi):wi;const f=()=>{if(C.active)if(e){const I=C.run();(n||E||(l?I.some((y,v)=>Kn(y,p[v])):Kn(I,p)))&&(A&&A(),c0(e,r,3,[I,p===wi?void 0:l&&p[0]===wi?[]:p,h]),p=I)}else C.run()};f.allowRecurse=!!e;let g;i==="sync"?g=f:i==="post"?g=()=>jt(f,r&&r.suspense):(f.pre=!0,r&&(f.id=r.uid),g=()=>Kr(f));const C=new Hr(a,g);e?x?f():p=C.run():i==="post"?jt(C.run.bind(C),r&&r.suspense):C.run();const S=()=>{C.stop(),r&&r.scope&&Or(r.scope.effects,C)};return B&&B.push(S),S}function ru(t,e,x){const n=this.proxy,i=Ft(t)?t.includes(".")?$c(n,t):()=>n[t]:t.bind(n,n);let s;Ie(e)?s=e:(s=e.handler,x=e);const o=ft;on(this);const r=Uc(i,s.bind(n),x);return o?on(o):Ix(),r}function $c(t,e){const x=e.split(".");return()=>{let n=t;for(let i=0;i{jx(x,e)});else if(dc(t))for(const x in t)jx(t[x],e);return t}function au(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Xe(()=>{t.isMounted=!0}),vt(()=>{t.isUnmounting=!0}),t}const o0=[Function,Array],Eu={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:o0,onEnter:o0,onAfterEnter:o0,onEnterCancelled:o0,onBeforeLeave:o0,onLeave:o0,onAfterLeave:o0,onLeaveCancelled:o0,onBeforeAppear:o0,onAppear:o0,onAfterAppear:o0,onAppearCancelled:o0},setup(t,{slots:e}){const x=Wu(),n=au();let i;return()=>{const s=e.default&&Gc(e.default(),!0);if(!s||!s.length)return;let o=s[0];if(s.length>1){for(const f of s)if(f.type!==A0){o=f;break}}const r=$e(t),{mode:a}=r;if(n.isLeaving)return mo(o);const E=Ua(o);if(!E)return mo(o);const l=Yo(E,r,n,x);Jo(E,l);const A=x.subTree,h=A&&Ua(A);let B=!1;const{getTransitionKey:p}=E.type;if(p){const f=p();i===void 0?i=f:f!==i&&(i=f,B=!0)}if(h&&h.type!==A0&&(!vx(E,h)||B)){const f=Yo(h,r,n,x);if(Jo(h,f),a==="out-in")return n.isLeaving=!0,f.afterLeave=()=>{n.isLeaving=!1,x.update.active!==!1&&x.update()},mo(o);a==="in-out"&&E.type!==A0&&(f.delayLeave=(g,C,S)=>{const I=zc(n,h);I[String(h.key)]=h,g._leaveCb=()=>{C(),g._leaveCb=void 0,delete l.delayedLeave},l.delayedLeave=S})}return o}}},lu=Eu;function zc(t,e){const{leavingVNodes:x}=t;let n=x.get(e.type);return n||(n=Object.create(null),x.set(e.type,n)),n}function Yo(t,e,x,n){const{appear:i,mode:s,persisted:o=!1,onBeforeEnter:r,onEnter:a,onAfterEnter:E,onEnterCancelled:l,onBeforeLeave:A,onLeave:h,onAfterLeave:B,onLeaveCancelled:p,onBeforeAppear:f,onAppear:g,onAfterAppear:C,onAppearCancelled:S}=e,I=String(t.key),y=zc(x,t),v=(b,P)=>{b&&c0(b,n,9,P)},D=(b,P)=>{const O=P[1];v(b,P),ye(b)?b.every(V=>V.length<=1)&&O():b.length<=1&&O()},T={mode:s,persisted:o,beforeEnter(b){let P=r;if(!x.isMounted)if(i)P=f||r;else return;b._leaveCb&&b._leaveCb(!0);const O=y[I];O&&vx(t,O)&&O.el._leaveCb&&O.el._leaveCb(),v(P,[b])},enter(b){let P=a,O=E,V=l;if(!x.isMounted)if(i)P=g||a,O=C||E,V=S||l;else return;let N=!1;const K=b._enterCb=W=>{N||(N=!0,W?v(V,[b]):v(O,[b]),T.delayedLeave&&T.delayedLeave(),b._enterCb=void 0)};P?D(P,[b,K]):K()},leave(b,P){const O=String(t.key);if(b._enterCb&&b._enterCb(!0),x.isUnmounting)return P();v(A,[b]);let V=!1;const N=b._leaveCb=K=>{V||(V=!0,P(),K?v(p,[b]):v(B,[b]),b._leaveCb=void 0,y[O]===t&&delete y[O])};y[O]=t,h?D(h,[b,N]):N()},clone(b){return Yo(b,e,x,n)}};return T}function mo(t){if(Xs(t))return t=rx(t),t.children=null,t}function Ua(t){return Xs(t)?t.children?t.children[0]:void 0:t}function Jo(t,e){t.shapeFlag&6&&t.component?Jo(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Gc(t,e=!1,x){let n=[],i=0;for(let s=0;s1)for(let s=0;s!!t.type.__asyncLoader,Xs=t=>t.type.__isKeepAlive;function cu(t,e){Wc(t,"a",e)}function Au(t,e){Wc(t,"da",e)}function Wc(t,e,x=ft){const n=t.__wdc||(t.__wdc=()=>{let i=x;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(Zs(e,n,x),x){let i=x.parent;for(;i&&i.parent;)Xs(i.parent.vnode)&&uu(n,e,x,i),i=i.parent}}function uu(t,e,x,n){const i=Zs(e,t,n,!0);Ai(()=>{Or(n[e],i)},x)}function Zs(t,e,x=ft,n=!1){if(x){const i=x[t]||(x[t]=[]),s=e.__weh||(e.__weh=(...o)=>{if(x.isUnmounted)return;cn(),on(x);const r=c0(e,x,t,o);return Ix(),An(),r});return n?i.unshift(s):i.push(s),s}}const j0=t=>(e,x=ft)=>(!Xn||t==="sp")&&Zs(t,(...n)=>e(...n),x),hu=j0("bm"),Xe=j0("m"),Vc=j0("bu"),un=j0("u"),vt=j0("bum"),Ai=j0("um"),Bu=j0("sp"),du=j0("rtg"),fu=j0("rtc");function pu(t,e=ft){Zs("ec",t,e)}function hx(t,e,x,n){const i=t.dirs,s=e&&e.dirs;for(let o=0;oe(o,r,void 0,s&&s[r]));else{const o=Object.keys(t);i=new Array(o.length);for(let r=0,a=o.length;rfs(e)?!(e.type===A0||e.type===_e&&!Kc(e.children)):!0)?t:null}const Zo=t=>t?n8(t)?Jr(t)||t.proxy:Zo(t.parent):null,Mn=Ot(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Zo(t.parent),$root:t=>Zo(t.root),$emit:t=>t.emit,$options:t=>jr(t),$forceUpdate:t=>t.f||(t.f=()=>Kr(t.update)),$nextTick:t=>t.n||(t.n=qA.bind(t.proxy)),$watch:t=>ru.bind(t)}),Co=(t,e)=>t!==ot&&!t.__isScriptSetup&&He(t,e),mu={get({_:t},e){const{ctx:x,setupState:n,data:i,props:s,accessCache:o,type:r,appContext:a}=t;let E;if(e[0]!=="$"){const B=o[e];if(B!==void 0)switch(B){case 1:return n[e];case 2:return i[e];case 4:return x[e];case 3:return s[e]}else{if(Co(n,e))return o[e]=1,n[e];if(i!==ot&&He(i,e))return o[e]=2,i[e];if((E=t.propsOptions[0])&&He(E,e))return o[e]=3,s[e];if(x!==ot&&He(x,e))return o[e]=4,x[e];Qo&&(o[e]=0)}}const l=Mn[e];let A,h;if(l)return e==="$attrs"&&Jt(t,"get",e),l(t);if((A=r.__cssModules)&&(A=A[e]))return A;if(x!==ot&&He(x,e))return o[e]=4,x[e];if(h=a.config.globalProperties,He(h,e))return h[e]},set({_:t},e,x){const{data:n,setupState:i,ctx:s}=t;return Co(i,e)?(i[e]=x,!0):n!==ot&&He(n,e)?(n[e]=x,!0):He(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=x,!0)},has({_:{data:t,setupState:e,accessCache:x,ctx:n,appContext:i,propsOptions:s}},o){let r;return!!x[o]||t!==ot&&He(t,o)||Co(e,o)||(r=s[0])&&He(r,o)||He(n,o)||He(Mn,o)||He(i.config.globalProperties,o)},defineProperty(t,e,x){return x.get!=null?t._.accessCache[e]=0:He(x,"value")&&this.set(t,e,x.value,null),Reflect.defineProperty(t,e,x)}};let Qo=!0;function Cu(t){const e=jr(t),x=t.proxy,n=t.ctx;Qo=!1,e.beforeCreate&&$a(e.beforeCreate,t,"bc");const{data:i,computed:s,methods:o,watch:r,provide:a,inject:E,created:l,beforeMount:A,mounted:h,beforeUpdate:B,updated:p,activated:f,deactivated:g,beforeDestroy:C,beforeUnmount:S,destroyed:I,unmounted:y,render:v,renderTracked:D,renderTriggered:T,errorCaptured:b,serverPrefetch:P,expose:O,inheritAttrs:V,components:N,directives:K,filters:W}=e;if(E&&Fu(E,n,null,t.appContext.config.unwrapInjectedRef),o)for(const Z in o){const ne=o[Z];Ie(ne)&&(n[Z]=ne.bind(x))}if(i){const Z=i.call(x,x);at(Z)&&(t.data=F0(Z))}if(Qo=!0,s)for(const Z in s){const ne=s[Z],re=Ie(ne)?ne.bind(x,x):Ie(ne.get)?ne.get.bind(x,x):m0,pe=!Ie(ne)&&Ie(ne.set)?ne.set.bind(x):m0,Te=Fe({get:re,set:pe});Object.defineProperty(n,Z,{enumerable:!0,configurable:!0,get:()=>Te.value,set:De=>Te.value=De})}if(r)for(const Z in r)jc(r[Z],n,x,Z);if(a){const Z=Ie(a)?a.call(x):a;Reflect.ownKeys(Z).forEach(ne=>{ou(ne,Z[ne])})}l&&$a(l,t,"c");function xe(Z,ne){ye(ne)?ne.forEach(re=>Z(re.bind(x))):ne&&Z(ne.bind(x))}if(xe(hu,A),xe(Xe,h),xe(Vc,B),xe(un,p),xe(cu,f),xe(Au,g),xe(pu,b),xe(fu,D),xe(du,T),xe(vt,S),xe(Ai,y),xe(Bu,P),ye(O))if(O.length){const Z=t.exposed||(t.exposed={});O.forEach(ne=>{Object.defineProperty(Z,ne,{get:()=>x[ne],set:re=>x[ne]=re})})}else t.exposed||(t.exposed={});v&&t.render===m0&&(t.render=v),V!=null&&(t.inheritAttrs=V),N&&(t.components=N),K&&(t.directives=K)}function Fu(t,e,x=m0,n=!1){ye(t)&&(t=er(t));for(const i in t){const s=t[i];let o;at(s)?"default"in s?o=Yi(s.from||i,s.default,!0):o=Yi(s.from||i):o=Yi(s),kt(o)&&n?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[i]=o}}function $a(t,e,x){c0(ye(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,x)}function jc(t,e,x,n){const i=n.includes(".")?$c(x,n):()=>x[n];if(Ft(t)){const s=e[t];Ie(s)&&ix(i,s)}else if(Ie(t))ix(i,t.bind(x));else if(at(t))if(ye(t))t.forEach(s=>jc(s,e,x,n));else{const s=Ie(t.handler)?t.handler.bind(x):e[t.handler];Ie(s)&&ix(i,s,t)}}function jr(t){const e=t.type,{mixins:x,extends:n}=e,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,r=s.get(e);let a;return r?a=r:!i.length&&!x&&!n?a=e:(a={},i.length&&i.forEach(E=>ds(a,E,o,!0)),ds(a,e,o)),at(e)&&s.set(e,a),a}function ds(t,e,x,n=!1){const{mixins:i,extends:s}=e;s&&ds(t,s,x,!0),i&&i.forEach(o=>ds(t,o,x,!0));for(const o in e)if(!(n&&o==="expose")){const r=Du[o]||x&&x[o];t[o]=r?r(t[o],e[o]):e[o]}return t}const Du={data:za,props:Cx,emits:Cx,methods:Cx,computed:Cx,beforeCreate:Lt,created:Lt,beforeMount:Lt,mounted:Lt,beforeUpdate:Lt,updated:Lt,beforeDestroy:Lt,beforeUnmount:Lt,destroyed:Lt,unmounted:Lt,activated:Lt,deactivated:Lt,errorCaptured:Lt,serverPrefetch:Lt,components:Cx,directives:Cx,watch:vu,provide:za,inject:_u};function za(t,e){return e?t?function(){return Ot(Ie(t)?t.call(this,this):t,Ie(e)?e.call(this,this):e)}:e:t}function _u(t,e){return Cx(er(t),er(e))}function er(t){if(ye(t)){const e={};for(let x=0;x0)&&!(o&16)){if(o&8){const l=t.vnode.dynamicProps;for(let A=0;A{a=!0;const[h,B]=Yc(A,e,!0);Ot(o,h),B&&r.push(...B)};!x&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}if(!s&&!a)return at(t)&&n.set(t,Jx),Jx;if(ye(s))for(let l=0;l-1,B[1]=f<0||p-1||He(B,"default"))&&r.push(A)}}}const E=[o,r];return at(t)&&n.set(t,E),E}function Ga(t){return t[0]!=="$"}function Wa(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function Va(t,e){return Wa(t)===Wa(e)}function Ka(t,e){return ye(e)?e.findIndex(x=>Va(x,t)):Ie(e)&&Va(e,t)?0:-1}const Jc=t=>t[0]==="_"||t==="$stable",qr=t=>ye(t)?t.map(y0):[y0(t)],Su=(t,e,x)=>{if(e._n)return e;const n=B0((...i)=>qr(e(...i)),x);return n._c=!1,n},Xc=(t,e,x)=>{const n=t._ctx;for(const i in t){if(Jc(i))continue;const s=t[i];if(Ie(s))e[i]=Su(i,s,n);else if(s!=null){const o=qr(s);e[i]=()=>o}}},Zc=(t,e)=>{const x=qr(e);t.slots.default=()=>x},wu=(t,e)=>{if(t.vnode.shapeFlag&32){const x=e._;x?(t.slots=$e(e),us(e,"_",x)):Xc(e,t.slots={})}else t.slots={},e&&Zc(t,e);us(t.slots,eo,1)},Tu=(t,e,x)=>{const{vnode:n,slots:i}=t;let s=!0,o=ot;if(n.shapeFlag&32){const r=e._;r?x&&r===1?s=!1:(Ot(i,e),!x&&r===1&&delete i._):(s=!e.$stable,Xc(e,i)),o=e}else e&&(Zc(t,e),o={default:1});if(s)for(const r in i)!Jc(r)&&!(r in o)&&delete i[r]};function Qc(){return{app:null,config:{isNativeTag:iA,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Pu=0;function Iu(t,e){return function(n,i=null){Ie(n)||(n=Object.assign({},n)),i!=null&&!at(i)&&(i=null);const s=Qc(),o=new Set;let r=!1;const a=s.app={_uid:Pu++,_component:n,_props:i,_container:null,_context:s,_instance:null,version:Qu,get config(){return s.config},set config(E){},use(E,...l){return o.has(E)||(E&&Ie(E.install)?(o.add(E),E.install(a,...l)):Ie(E)&&(o.add(E),E(a,...l))),a},mixin(E){return s.mixins.includes(E)||s.mixins.push(E),a},component(E,l){return l?(s.components[E]=l,a):s.components[E]},directive(E,l){return l?(s.directives[E]=l,a):s.directives[E]},mount(E,l,A){if(!r){const h=R(n,i);return h.appContext=s,l&&e?e(h,E):t(h,E,A),r=!0,a._container=E,E.__vue_app__=a,Jr(h.component)||h.component.proxy}},unmount(){r&&(t(null,a._container),delete a._container.__vue_app__)},provide(E,l){return s.provides[E]=l,a}};return a}}function xr(t,e,x,n,i=!1){if(ye(t)){t.forEach((h,B)=>xr(h,e&&(ye(e)?e[B]:e),x,n,i));return}if(kn(n)&&!i)return;const s=n.shapeFlag&4?Jr(n.component)||n.component.proxy:n.el,o=i?null:s,{i:r,r:a}=t,E=e&&e.r,l=r.refs===ot?r.refs={}:r.refs,A=r.setupState;if(E!=null&&E!==a&&(Ft(E)?(l[E]=null,He(A,E)&&(A[E]=null)):kt(E)&&(E.value=null)),Ie(a))nx(a,r,12,[o,l]);else{const h=Ft(a),B=kt(a);if(h||B){const p=()=>{if(t.f){const f=h?He(A,a)?A[a]:l[a]:a.value;i?ye(f)&&Or(f,s):ye(f)?f.includes(s)||f.push(s):h?(l[a]=[s],He(A,a)&&(A[a]=l[a])):(a.value=[s],t.k&&(l[t.k]=a.value))}else h?(l[a]=o,He(A,a)&&(A[a]=o)):B&&(a.value=o,t.k&&(l[t.k]=o))};o?(p.id=-1,jt(p,x)):p()}}}const jt=su;function ku(t){return Mu(t)}function Mu(t,e){const x=cA();x.__VUE__=!0;const{insert:n,remove:i,patchProp:s,createElement:o,createText:r,createComment:a,setText:E,setElementText:l,parentNode:A,nextSibling:h,setScopeId:B=m0,insertStaticContent:p}=t,f=(F,k,G,j=null,q=null,te=null,le=!1,Q=null,se=!!k.dynamicChildren)=>{if(F===k)return;F&&!vx(F,k)&&(j=gt(F),De(F,q,te,!0),F=null),k.patchFlag===-2&&(se=!1,k.dynamicChildren=null);const{type:Y,ref:de,shapeFlag:ue}=k;switch(Y){case Qs:g(F,k,G,j);break;case A0:C(F,k,G,j);break;case Fo:F==null&&S(k,G,j,le);break;case _e:N(F,k,G,j,q,te,le,Q,se);break;default:ue&1?v(F,k,G,j,q,te,le,Q,se):ue&6?K(F,k,G,j,q,te,le,Q,se):(ue&64||ue&128)&&Y.process(F,k,G,j,q,te,le,Q,se,St)}de!=null&&q&&xr(de,F&&F.ref,te,k||F,!k)},g=(F,k,G,j)=>{if(F==null)n(k.el=r(k.children),G,j);else{const q=k.el=F.el;k.children!==F.children&&E(q,k.children)}},C=(F,k,G,j)=>{F==null?n(k.el=a(k.children||""),G,j):k.el=F.el},S=(F,k,G,j)=>{[F.el,F.anchor]=p(F.children,k,G,j,F.el,F.anchor)},I=({el:F,anchor:k},G,j)=>{let q;for(;F&&F!==k;)q=h(F),n(F,G,j),F=q;n(k,G,j)},y=({el:F,anchor:k})=>{let G;for(;F&&F!==k;)G=h(F),i(F),F=G;i(k)},v=(F,k,G,j,q,te,le,Q,se)=>{le=le||k.type==="svg",F==null?D(k,G,j,q,te,le,Q,se):P(F,k,q,te,le,Q,se)},D=(F,k,G,j,q,te,le,Q)=>{let se,Y;const{type:de,props:ue,shapeFlag:ge,transition:ve,dirs:ke}=F;if(se=F.el=o(F.type,te,ue&&ue.is,ue),ge&8?l(se,F.children):ge&16&&b(F.children,se,null,j,q,te&&de!=="foreignObject",le,Q),ke&&hx(F,null,j,"created"),T(se,F,F.scopeId,le,j),ue){for(const Je in ue)Je!=="value"&&!qi(Je)&&s(se,Je,null,ue[Je],te,F.children,j,q,Ve);"value"in ue&&s(se,"value",null,ue.value),(Y=ue.onVnodeBeforeMount)&&_0(Y,j,F)}ke&&hx(F,null,j,"beforeMount");const Ze=(!q||q&&!q.pendingBranch)&&ve&&!ve.persisted;Ze&&ve.beforeEnter(se),n(se,k,G),((Y=ue&&ue.onVnodeMounted)||Ze||ke)&&jt(()=>{Y&&_0(Y,j,F),Ze&&ve.enter(se),ke&&hx(F,null,j,"mounted")},q)},T=(F,k,G,j,q)=>{if(G&&B(F,G),j)for(let te=0;te{for(let Y=se;Y{const Q=k.el=F.el;let{patchFlag:se,dynamicChildren:Y,dirs:de}=k;se|=F.patchFlag&16;const ue=F.props||ot,ge=k.props||ot;let ve;G&&Bx(G,!1),(ve=ge.onVnodeBeforeUpdate)&&_0(ve,G,k,F),de&&hx(k,F,G,"beforeUpdate"),G&&Bx(G,!0);const ke=q&&k.type!=="foreignObject";if(Y?O(F.dynamicChildren,Y,Q,G,j,ke,te):le||ne(F,k,Q,null,G,j,ke,te,!1),se>0){if(se&16)V(Q,k,ue,ge,G,j,q);else if(se&2&&ue.class!==ge.class&&s(Q,"class",null,ge.class,q),se&4&&s(Q,"style",ue.style,ge.style,q),se&8){const Ze=k.dynamicProps;for(let Je=0;Je{ve&&_0(ve,G,k,F),de&&hx(k,F,G,"updated")},j)},O=(F,k,G,j,q,te,le)=>{for(let Q=0;Q{if(G!==j){if(G!==ot)for(const Q in G)!qi(Q)&&!(Q in j)&&s(F,Q,G[Q],null,le,k.children,q,te,Ve);for(const Q in j){if(qi(Q))continue;const se=j[Q],Y=G[Q];se!==Y&&Q!=="value"&&s(F,Q,Y,se,le,k.children,q,te,Ve)}"value"in j&&s(F,"value",G.value,j.value)}},N=(F,k,G,j,q,te,le,Q,se)=>{const Y=k.el=F?F.el:r(""),de=k.anchor=F?F.anchor:r("");let{patchFlag:ue,dynamicChildren:ge,slotScopeIds:ve}=k;ve&&(Q=Q?Q.concat(ve):ve),F==null?(n(Y,G,j),n(de,G,j),b(k.children,G,de,q,te,le,Q,se)):ue>0&&ue&64&&ge&&F.dynamicChildren?(O(F.dynamicChildren,ge,G,q,te,le,Q),(k.key!=null||q&&k===q.subTree)&&e8(F,k,!0)):ne(F,k,G,de,q,te,le,Q,se)},K=(F,k,G,j,q,te,le,Q,se)=>{k.slotScopeIds=Q,F==null?k.shapeFlag&512?q.ctx.activate(k,G,j,le,se):W(k,G,j,q,te,le,se):X(F,k,se)},W=(F,k,G,j,q,te,le)=>{const Q=F.component=Gu(F,j,q);if(Xs(F)&&(Q.ctx.renderer=St),Vu(Q),Q.asyncDep){if(q&&q.registerDep(Q,xe),!F.el){const se=Q.subTree=R(A0);C(null,se,k,G)}return}xe(Q,F,k,G,q,te,le)},X=(F,k,G)=>{const j=k.component=F.component;if(xu(F,k,G))if(j.asyncDep&&!j.asyncResolved){Z(j,k,G);return}else j.next=k,JA(j.update),j.update();else k.el=F.el,j.vnode=k},xe=(F,k,G,j,q,te,le)=>{const Q=()=>{if(F.isMounted){let{next:de,bu:ue,u:ge,parent:ve,vnode:ke}=F,Ze=de,Je;Bx(F,!1),de?(de.el=ke.el,Z(F,de,le)):de=ke,ue&&po(ue),(Je=de.props&&de.props.onVnodeBeforeUpdate)&&_0(Je,ve,de,ke),Bx(F,!0);const dt=go(F),u0=F.subTree;F.subTree=dt,f(u0,dt,A(u0.el),gt(u0),F,q,te),de.el=dt.el,Ze===null&&nu(F,dt.el),ge&&jt(ge,q),(Je=de.props&&de.props.onVnodeUpdated)&&jt(()=>_0(Je,ve,de,ke),q)}else{let de;const{el:ue,props:ge}=k,{bm:ve,m:ke,parent:Ze}=F,Je=kn(k);if(Bx(F,!1),ve&&po(ve),!Je&&(de=ge&&ge.onVnodeBeforeMount)&&_0(de,Ze,k),Bx(F,!0),ue&&Be){const dt=()=>{F.subTree=go(F),Be(ue,F.subTree,F,q,null)};Je?k.type.__asyncLoader().then(()=>!F.isUnmounted&&dt()):dt()}else{const dt=F.subTree=go(F);f(null,dt,G,j,F,q,te),k.el=dt.el}if(ke&&jt(ke,q),!Je&&(de=ge&&ge.onVnodeMounted)){const dt=k;jt(()=>_0(de,Ze,dt),q)}(k.shapeFlag&256||Ze&&kn(Ze.vnode)&&Ze.vnode.shapeFlag&256)&&F.a&&jt(F.a,q),F.isMounted=!0,k=G=j=null}},se=F.effect=new Hr(Q,()=>Kr(Y),F.scope),Y=F.update=()=>se.run();Y.id=F.uid,Bx(F,!0),Y()},Z=(F,k,G)=>{k.component=F;const j=F.vnode.props;F.vnode=k,F.next=null,yu(F,k.props,j,G),Tu(F,k.children,G),cn(),La(),An()},ne=(F,k,G,j,q,te,le,Q,se=!1)=>{const Y=F&&F.children,de=F?F.shapeFlag:0,ue=k.children,{patchFlag:ge,shapeFlag:ve}=k;if(ge>0){if(ge&128){pe(Y,ue,G,j,q,te,le,Q,se);return}else if(ge&256){re(Y,ue,G,j,q,te,le,Q,se);return}}ve&8?(de&16&&Ve(Y,q,te),ue!==Y&&l(G,ue)):de&16?ve&16?pe(Y,ue,G,j,q,te,le,Q,se):Ve(Y,q,te,!0):(de&8&&l(G,""),ve&16&&b(ue,G,j,q,te,le,Q,se))},re=(F,k,G,j,q,te,le,Q,se)=>{F=F||Jx,k=k||Jx;const Y=F.length,de=k.length,ue=Math.min(Y,de);let ge;for(ge=0;gede?Ve(F,q,te,!0,!1,ue):b(k,G,j,q,te,le,Q,se,ue)},pe=(F,k,G,j,q,te,le,Q,se)=>{let Y=0;const de=k.length;let ue=F.length-1,ge=de-1;for(;Y<=ue&&Y<=ge;){const ve=F[Y],ke=k[Y]=se?X0(k[Y]):y0(k[Y]);if(vx(ve,ke))f(ve,ke,G,null,q,te,le,Q,se);else break;Y++}for(;Y<=ue&&Y<=ge;){const ve=F[ue],ke=k[ge]=se?X0(k[ge]):y0(k[ge]);if(vx(ve,ke))f(ve,ke,G,null,q,te,le,Q,se);else break;ue--,ge--}if(Y>ue){if(Y<=ge){const ve=ge+1,ke=vege)for(;Y<=ue;)De(F[Y],q,te,!0),Y++;else{const ve=Y,ke=Y,Ze=new Map;for(Y=ke;Y<=ge;Y++){const Xt=k[Y]=se?X0(k[Y]):y0(k[Y]);Xt.key!=null&&Ze.set(Xt.key,Y)}let Je,dt=0;const u0=ge-ke+1;let zx=!1,ya=0;const dn=new Array(u0);for(Y=0;Y=u0){De(Xt,q,te,!0);continue}let D0;if(Xt.key!=null)D0=Ze.get(Xt.key);else for(Je=ke;Je<=ge;Je++)if(dn[Je-ke]===0&&vx(Xt,k[Je])){D0=Je;break}D0===void 0?De(Xt,q,te,!0):(dn[D0-ke]=Y+1,D0>=ya?ya=D0:zx=!0,f(Xt,k[D0],G,null,q,te,le,Q,se),dt++)}const Sa=zx?Ou(dn):Jx;for(Je=Sa.length-1,Y=u0-1;Y>=0;Y--){const Xt=ke+Y,D0=k[Xt],wa=Xt+1{const{el:te,type:le,transition:Q,children:se,shapeFlag:Y}=F;if(Y&6){Te(F.component.subTree,k,G,j);return}if(Y&128){F.suspense.move(k,G,j);return}if(Y&64){le.move(F,k,G,St);return}if(le===_e){n(te,k,G);for(let ue=0;ueQ.enter(te),q);else{const{leave:ue,delayLeave:ge,afterLeave:ve}=Q,ke=()=>n(te,k,G),Ze=()=>{ue(te,()=>{ke(),ve&&ve()})};ge?ge(te,ke,Ze):Ze()}else n(te,k,G)},De=(F,k,G,j=!1,q=!1)=>{const{type:te,props:le,ref:Q,children:se,dynamicChildren:Y,shapeFlag:de,patchFlag:ue,dirs:ge}=F;if(Q!=null&&xr(Q,null,G,F,!0),de&256){k.ctx.deactivate(F);return}const ve=de&1&&ge,ke=!kn(F);let Ze;if(ke&&(Ze=le&&le.onVnodeBeforeUnmount)&&_0(Ze,k,F),de&6)ht(F.component,G,j);else{if(de&128){F.suspense.unmount(G,j);return}ve&&hx(F,null,k,"beforeUnmount"),de&64?F.type.remove(F,k,G,q,St,j):Y&&(te!==_e||ue>0&&ue&64)?Ve(Y,k,G,!1,!0):(te===_e&&ue&384||!q&&de&16)&&Ve(se,k,G),j&&et(F)}(ke&&(Ze=le&&le.onVnodeUnmounted)||ve)&&jt(()=>{Ze&&_0(Ze,k,F),ve&&hx(F,null,k,"unmounted")},G)},et=F=>{const{type:k,el:G,anchor:j,transition:q}=F;if(k===_e){Ke(G,j);return}if(k===Fo){y(F);return}const te=()=>{i(G),q&&!q.persisted&&q.afterLeave&&q.afterLeave()};if(F.shapeFlag&1&&q&&!q.persisted){const{leave:le,delayLeave:Q}=q,se=()=>le(G,te);Q?Q(F.el,te,se):se()}else te()},Ke=(F,k)=>{let G;for(;F!==k;)G=h(F),i(F),F=G;i(k)},ht=(F,k,G)=>{const{bum:j,scope:q,update:te,subTree:le,um:Q}=F;j&&po(j),q.stop(),te&&(te.active=!1,De(le,F,k,G)),Q&&jt(Q,k),jt(()=>{F.isUnmounted=!0},k),k&&k.pendingBranch&&!k.isUnmounted&&F.asyncDep&&!F.asyncResolved&&F.suspenseId===k.pendingId&&(k.deps--,k.deps===0&&k.resolve())},Ve=(F,k,G,j=!1,q=!1,te=0)=>{for(let le=te;leF.shapeFlag&6?gt(F.component.subTree):F.shapeFlag&128?F.suspense.next():h(F.anchor||F.el),st=(F,k,G)=>{F==null?k._vnode&&De(k._vnode,null,null,!0):f(k._vnode||null,F,k,null,null,null,G),La(),Nc(),k._vnode=F},St={p:f,um:De,m:Te,r:et,mt:W,mc:b,pc:ne,pbc:O,n:gt,o:t};let Ye,Be;return e&&([Ye,Be]=e(St)),{render:st,hydrate:Ye,createApp:Iu(st,Ye)}}function Bx({effect:t,update:e},x){t.allowRecurse=e.allowRecurse=x}function e8(t,e,x=!1){const n=t.children,i=e.children;if(ye(n)&&ye(i))for(let s=0;s>1,t[x[r]]0&&(e[n]=x[s-1]),x[s]=n)}}for(s=x.length,o=x[s-1];s-- >0;)x[s]=o,o=e[o];return x}const Ru=t=>t.__isTeleport,_e=Symbol(void 0),Qs=Symbol(void 0),A0=Symbol(void 0),Fo=Symbol(void 0),On=[];let p0=null;function w(t=!1){On.push(p0=t?null:[])}function Nu(){On.pop(),p0=On[On.length-1]||null}let Jn=1;function ja(t){Jn+=t}function t8(t){return t.dynamicChildren=Jn>0?p0||Jx:null,Nu(),Jn>0&&p0&&p0.push(t),t}function M(t,e,x,n,i,s){return t8(u(t,e,x,n,i,s,!0))}function Re(t,e,x,n,i){return t8(R(t,e,x,n,i,!0))}function fs(t){return t?t.__v_isVNode===!0:!1}function vx(t,e){return t.type===e.type&&t.key===e.key}const eo="__vInternal",x8=({key:t})=>t??null,Ji=({ref:t,ref_key:e,ref_for:x})=>t!=null?Ft(t)||kt(t)||Ie(t)?{i:Ut,r:t,k:e,f:!!x}:t:null;function u(t,e=null,x=null,n=0,i=null,s=t===_e?0:1,o=!1,r=!1){const a={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&x8(e),ref:e&&Ji(e),scopeId:qs,slotScopeIds:null,children:x,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ut};return r?(Yr(a,x),s&128&&t.normalize(a)):x&&(a.shapeFlag|=Ft(x)?8:16),Jn>0&&!o&&p0&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&p0.push(a),a}const R=Lu;function Lu(t,e=null,x=null,n=0,i=null,s=!1){if((!t||t===gu)&&(t=A0),fs(t)){const r=rx(t,e,!0);return x&&Yr(r,x),Jn>0&&!s&&p0&&(r.shapeFlag&6?p0[p0.indexOf(t)]=r:p0.push(r)),r.patchFlag|=-2,r}if(Yu(t)&&(t=t.__vccOpts),e){e=Hu(e);let{class:r,style:a}=e;r&&!Ft(r)&&(e.class=qe(r)),at(a)&&(wc(a)&&!ye(a)&&(a=Ot({},a)),e.style=he(a))}const o=Ft(t)?1:iu(t)?128:Ru(t)?64:at(t)?4:Ie(t)?2:0;return u(t,e,x,n,i,o,s,!0)}function Hu(t){return t?wc(t)||eo in t?Ot({},t):t:null}function rx(t,e,x=!1){const{props:n,ref:i,patchFlag:s,children:o}=t,r=e?Uu(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:r,key:r&&x8(r),ref:e&&e.ref?x&&i?ye(i)?i.concat(Ji(e)):[i,Ji(e)]:Ji(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==_e?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&rx(t.ssContent),ssFallback:t.ssFallback&&rx(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function hn(t=" ",e=0){return R(Qs,null,t,e)}function ee(t="",e=!1){return e?(w(),Re(A0,null,t)):R(A0,null,t)}function y0(t){return t==null||typeof t=="boolean"?R(A0):ye(t)?R(_e,null,t.slice()):typeof t=="object"?X0(t):R(Qs,null,String(t))}function X0(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:rx(t)}function Yr(t,e){let x=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(ye(e))x=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),Yr(t,i()),i._c&&(i._d=!0));return}else{x=32;const i=e._;!i&&!(eo in e)?e._ctx=Ut:i===3&&Ut&&(Ut.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ie(e)?(e={default:e,_ctx:Ut},x=32):(e=String(e),n&64?(x=16,e=[hn(e)]):x=8);t.children=e,t.shapeFlag|=x}function Uu(...t){const e={};for(let x=0;xft||Ut,on=t=>{ft=t,t.scope.on()},Ix=()=>{ft&&ft.scope.off(),ft=null};function n8(t){return t.vnode.shapeFlag&4}let Xn=!1;function Vu(t,e=!1){Xn=e;const{props:x,children:n}=t.vnode,i=n8(t);bu(t,x,i,e),wu(t,n);const s=i?Ku(t,e):void 0;return Xn=!1,s}function Ku(t,e){const x=t.type;t.accessCache=Object.create(null),t.proxy=Tc(new Proxy(t.ctx,mu));const{setup:n}=x;if(n){const i=t.setupContext=n.length>1?qu(t):null;on(t),cn();const s=nx(n,t,0,[t.props,i]);if(An(),Ix(),hc(s)){if(s.then(Ix,Ix),e)return s.then(o=>{qa(t,o,e)}).catch(o=>{Ks(o,t,0)});t.asyncDep=s}else qa(t,s,e)}else i8(t,e)}function qa(t,e,x){Ie(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:at(e)&&(t.setupState=kc(e)),i8(t,x)}let Ya;function i8(t,e,x){const n=t.type;if(!t.render){if(!e&&Ya&&!n.render){const i=n.template||jr(t).template;if(i){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:r,compilerOptions:a}=n,E=Ot(Ot({isCustomElement:s,delimiters:r},o),a);n.render=Ya(i,E)}}t.render=n.render||m0}on(t),cn(),Cu(t),An(),Ix()}function ju(t){return new Proxy(t.attrs,{get(e,x){return Jt(t,"get","$attrs"),e[x]}})}function qu(t){const e=n=>{t.exposed=n||{}};let x;return{get attrs(){return x||(x=ju(t))},slots:t.slots,emit:t.emit,expose:e}}function Jr(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(kc(Tc(t.exposed)),{get(e,x){if(x in e)return e[x];if(x in Mn)return Mn[x](t)},has(e,x){return x in e||x in Mn}}))}function Yu(t){return Ie(t)&&"__vccOpts"in t}const Fe=(t,e)=>KA(t,e,Xn);function Ju(t,e,x){const n=arguments.length;return n===2?at(e)&&!ye(e)?fs(e)?R(t,null,[e]):R(t,e):R(t,null,e):(n>3?x=Array.prototype.slice.call(arguments,2):n===3&&fs(x)&&(x=[x]),R(t,e,x))}const Xu=Symbol(""),Zu=()=>Yi(Xu),Qu="3.2.47",e5="http://www.w3.org/2000/svg",bx=typeof document<"u"?document:null,Ja=bx&&bx.createElement("template"),t5={insert:(t,e,x)=>{e.insertBefore(t,x||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,x,n)=>{const i=e?bx.createElementNS(e5,t):bx.createElement(t,x?{is:x}:void 0);return t==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:t=>bx.createTextNode(t),createComment:t=>bx.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>bx.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,x,n,i,s){const o=x?x.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),x),!(i===s||!(i=i.nextSibling)););else{Ja.innerHTML=n?`${t}`:t;const r=Ja.content;if(n){const a=r.firstChild;for(;a.firstChild;)r.appendChild(a.firstChild);r.removeChild(a)}e.insertBefore(r,x)}return[o?o.nextSibling:e.firstChild,x?x.previousSibling:e.lastChild]}};function x5(t,e,x){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):x?t.setAttribute("class",e):t.className=e}function n5(t,e,x){const n=t.style,i=Ft(x);if(x&&!i){if(e&&!Ft(e))for(const s in e)x[s]==null&&nr(n,s,"");for(const s in x)nr(n,s,x[s])}else{const s=n.display;i?e!==x&&(n.cssText=x):e&&t.removeAttribute("style"),"_vod"in t&&(n.display=s)}}const Xa=/\s*!important$/;function nr(t,e,x){if(ye(x))x.forEach(n=>nr(t,e,n));else if(x==null&&(x=""),e.startsWith("--"))t.setProperty(e,x);else{const n=i5(t,e);Xa.test(x)?t.setProperty(ln(n),x.replace(Xa,""),"important"):t[n]=x}}const Za=["Webkit","Moz","ms"],Do={};function i5(t,e){const x=Do[e];if(x)return x;let n=nn(e);if(n!=="filter"&&n in t)return Do[e]=n;n=fc(n);for(let i=0;i_o||(c5.then(()=>_o=0),_o=Date.now());function u5(t,e){const x=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=x.attached)return;c0(h5(n,x.value),e,5,[n])};return x.value=t,x.attached=A5(),x}function h5(t,e){if(ye(e)){const x=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{x.call(t),t._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const tE=/^on[a-z]/,B5=(t,e,x,n,i=!1,s,o,r,a)=>{e==="class"?x5(t,n,i):e==="style"?n5(t,x,n):zs(e)?Mr(e)||E5(t,e,x,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):d5(t,e,n,i))?o5(t,e,n,s,o,r,a):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),s5(t,e,n,i))};function d5(t,e,x,n){return n?!!(e==="innerHTML"||e==="textContent"||e in t&&tE.test(e)&&Ie(x)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||tE.test(e)&&Ft(x)?!1:e in t}const f5={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};lu.props;const p5=Ot({patchProp:B5},t5);let xE;function g5(){return xE||(xE=ku(p5))}const m5=(...t)=>{const e=g5().createApp(...t),{mount:x}=e;return e.mount=n=>{const i=C5(n);if(!i)return;const s=e._component;!Ie(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const o=x(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e};function C5(t){return Ft(t)?document.querySelector(t):t}var T0=(t=>(t.JA="ja",t.EN="en",t.ZH_TW="zh_tw",t))(T0||{});function ps(t,e){return(t?nE(t):"")+nE(e)}function nE(t){return t+(t.endsWith(` -`)?"":` -`)}function s8(t){return t instanceof Error?t.message:t instanceof Object?JSON.stringify(t):String(t)}function iE(t,e,x){return e===0?"0%":(t/e*100).toFixed(x)+"%"}function F5(t){switch(t%100){case 11:case 12:case 13:return t+"th"}switch(t%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd";default:return t+"th"}}function gs(t,e){const x=t.toLowerCase();return e.every(n=>x.includes(n.toLowerCase()))}const D5={electronShogi:"Electron Shogi",clear:"Clear",open:"Open",saveOverwrite:"Overwrite",newRecord:"New Record",newRecordWithBrackets:"(New Record)",openRecord:"Open Record",saveRecord:"Save Record",saveRecordAs:"Save Record As",openAutoSavingDirectory:"Open Auto-Saving Directory",exportPositionImage:"Export Position Image",positionImage:"Position Image",close:"Close",quit:"Quit",editing:"Edit",copyAsKIF:"Copy (KIF)",copyAsCSA:"Copy (CSA)",copyAsUSI:"Copy (USI)",copyAsSFEN:"Copy (SFEN)",paste:"Paste",copyRecord:"Copy Record",asKIF:"as KIF",asCSA:"as CSA",asUSIUntilCurrentMove:"as USI (until current move)",asUSIAll:"as USI (all)",copyPositionAsSFEN:"Copy Position (as SFEN)",pasteRecordOrPosition:"Paste Record/Position",appendSpecialMove:"Append Special Move",deleteMoves:"Delete Current Move and Following Moves",view:"View",toggleFullScreen:"Toggle Full Screen",defaultFontSize:"Default Font Size",largerFontSize:"Larger Font Size",smallerFontSize:"Smaller Font Size",settings:"Settings",config:"Config",debug:"Debug",toggleDevTools:"Toggle Developer Tools",openAppDirectory:"Open App Directory",openSettingDirectory:"Open Setting Directory",openLogDirectory:"Open Log Directory",help:"Help",openWebSite:"Open Web Site",howToUse:"How to Use",checkForUpdates:"Check for Updates",game:"Game",player:"Player",selectFromHistory:"Select from History",noHistory:"Empty",saveHistory:"Save History",version:"Version",gameProgress:"Game Progress",allGamesCompleted:"All Games Completed",gameEnded:"Game Ended",offlineGame:"Offline Game",csaOnlineGame:"CSA Online Game",csaProtocolOnlineGame:"Online Game (CSA Protocol)",csaProtocolV121:"CSA Protocol 1.2.1 Standard",csaProtocolV121WithPVComment:"CSA Protocol 1.2.1 with PV Comment",hostToConnect:"Hostname",portNumber:"Port",password:"Password",showPassword:"Show Password",logout:"Logout",displayGameResults:"Display Results",interrupt:"Stop",stopGame:"Stop",resign:"Resign",draw:"Draw",impass:"Impass",repetitionDraw:"Repetition Draw",mate:"Mate",mateSearch:"Mate Search",startMateSearch:"Start Mate Search",stopMateSearch:"Stop Mate Search",noMateFound:"No mate.",timeout:"Timeout",foulWin:"Foul Win",foulLose:"Foul Lose",enteringOfKing:"Entering of King",winByDefault:"Win by Default",loseByDefault:"Lose by Default",winByDeclaration:"Win by Declaration",declareWinning:"Declare Winning",research:"Research",startResearch:"Start Research",endResearch:"End Research",recordAnalysis:"Record Analysis",analysis:"Analyze",analyze:"Analyze",stopAnalysis:"Stop Analysis",setupPosition:"Setup Position",startPositionSetup:"Start Position Setup",completePositionSetup:"Complete Setup",changeTurn:"Change Turn",initializePosition:"Initialize Position",appSettings:"Preferences",language:"Languages",theme:"Theme",standard:"Standard",green:"Green",cherryBlossom:"Cherry Blossom",customImage:"Custom Image",autumn:"Autumn",snow:"Snow",dark:"Dark",piece:"Piece",singleKanjiPiece:"Single Kanji",singleKanjiGothicPiece:"Single Kanji (Gothic)",singleKanjiDarkPiece:"Single Kanji (Dark)",singleKanjiGothicDarkPiece:"Single Kanji (Gothic, Dark)",backgroundImage:"Background Image",board:"Board Image",pieceStand:"Piece Stand",lightWoodyTexture:"Woody Texture (Light)",warmWoodTexture:"Woody Texture (Warm)",regin:"Regin",displayFileAndRank:"Display File & Rank",displayLeftControls:"Display Left Controls",displayRightControls:"Display Right Controls",tabViewStyle:"Tab View Style",oneColumn:"1 Column",twoColumns:"2 Columns",sounds:"Sounds",pieceLoudness:"Piece Loudness",clockLoudness:"Clock Loudness",clockPitch:"Clock Pitch",clockSoundTarget:"Clock Sound Target",anyTurn:"Any",onlyHumanTurn:"Human",textEncoding:"Text Encoding",strict:"Strict",autoDetect:"Auto Detect",newlineCharacter:"Newline Character",old90sMac:"90's Mac",autoSavingDirectory:"Auto-Saving Directory",select:"Select",usiProtocol:"USI Protocol",translateOptionName:"Translate Option Name",functionalOnJapaneseOnly:"Functional on Japanese Only",maxStartupTime:"Max Startup Time",forDevelopers:"For Developers",enableAppLog:"Enable App Log",enableUSILog:"Enable USI Log",enableCSALog:"Enable CSA Log",logLevel:"Log Level",engineSettings:"Engine Settings",flipBoard:"Flip Board",file:"File",recordFile:"Record File",executableFile:"Executable",imageFile:"Image",remove:"Remove",deleteMove:"Delete Move",recordProperties:"Record Properties",comments:"Comments",moveComments:"Move Comments",searchLog:"Search Log",pv:"PV",mateShort:"M",displayPVShort:"Play",evaluation:"Evaluation",eval:"Eval",estimatedWinRate:"Estimated Win Rate",evaluationAndEstimatedWinRate:"Evaluation & Estimated Win Rate",swapEachTurnChange:"Swap Each Turn Change",alwaysSenteIsPositive:"Always Sente is Positive",signOfEvaluation:"Sign of Evaluation",winRateCoefficient:"Win Rate Coefficient",hideTabView:"Hide",expandTabView:"Expand Tab View",sente:"Sente",senteOrShitate:"Sente (Shitate)",gote:"Gote",goteOrUwate:"Gote (Uwate)",swapSenteGote:"Swap Sente/Gote",currentPosition:"Current Position",time:"Time",enableEngineTimeout:"Enable Engine Timeout",others:"Others",nextTurn:"Next Move",elapsedTime:"Elapsed Time",elapsed:"Elapsed",rank:"Rank",depth:"Depth",searchEngine:"Search Engine",ponder:"Ponder",numberOfThreads:"Threads",multiPV:"Multi PV",startPosition:"Position",maxMoves:"Max Moves",gameRepetition:"Repeat",autoRelogin:"Auto Re-Login",swapTurnWhenGameRepetition:"Swap Turns When Repeat",outputComments:"Output Comments",saveRecordAutomatically:"Save Record Automatically",adjustBoardToHumanPlayer:"Adjust Board to Human Player",adjustBoardAutomatically:"Adjust Board Automatically",startGame:"Start Game",cancelGame:"Cancel Game",allottedTime:"Allotted Time",byoyomi:"Byoyomi",increments:"Increments",startEndCriteria:"Start/End Criteria",endCriteria1Move:"End Criteria for 1 Move",outputSettings:"Output Settings",noOutputs:"No Outputs",insertCommentToTop:"Insert to Top",appendCommentToBottom:"Append to Bottom",insertToComment:"Ins. to Comment",insertToRecord:"Ins. to Record",overwrite:"Overwrite",fromPrefix:"from",fromSuffix:"",toPrefix:"to",toSuffix:"",plyPrefix:"",plySuffix:"th move",hoursSuffix:"h",minutesSuffix:"min",secondsSuffix:"sec",engineManagement:"Engine Management",engineName:"Engine Name",author:"Author",enginePath:"Engine Path",openDirectory:"Open Directory",displayName:"Display Name",invoke:"Invoke",resetToEngineDefaultValues:"Reset to default values",defaultValue:"Default Value",noEngineRegistered:"No engine",duplicate:"Copy",add:"Add",recommended:"Recommended",import:"Import",saveAndClose:"Save & Close",save:"Save",saveAs:"Save As",cancel:"Cancel",back:"Back",name:"Name",prediction:"Prediction",best:"Best",nodes:"Nodes",hashUsage:"Hash Usage",nonHandicap:"Non-Handicap",lanceHandicap:"Lance Handicap",rightLanceHandicap:"Right Lance Handicap",bishopHandicap:"Bishop Handicap",rookHandicap:"Rook Handicap",rookLanceHandicap:"Rook-Lance Handicap",twoPiecesHandicap:"2 Pieces Handicap",fourPiecesHandicap:"4 Pieces Handicap",sixPiecesHandicap:"6 Pieces Handicap",eightPiecesHandicap:"8 Pieces Handicap",tsumeShogi:"Tsume Shogi",doubleKingTsumeShogi:"2-Kings Tsume Shogi",startDateTime:"Start",endDateTime:"End",gameDate:"Date",tournament:"Tournament",strategy:"Strategy",gameTitle:"Title",timeLimit:"Time Limit",place:"Place",postedOn:"Posted On",note:"Note",senteShortName:"Sente(short)",goteShortName:"Gote(short)",opusNo:"Opus No.",opusName:"Opus Name",publishedBy:"Published By",publishedOn:"Published On",source:"Source",numberOfMoves:"Number of Moves",integrity:"Integrity",recordCategory:"Category",award:"Award",filterByOptionName:"Filter by Option Name",filterByEngineName:"Filter by Engine Name",bookStyle:"Book Style",gameStyle:"Game Style",none:"None",bgCover:"Cover",bgContain:"Contain",bgTile:"Tile",inaccuracy:"Inaccuracy",dubious:"Dubious",mistake:"Mistake",blunder:"Blunder",inaccuracyThreshold:"Inaccuracy Threshold",dubiousThreshold:"Dubious Threshold",mistakeThreshold:"Mistake Threshold",blunderThreshold:"Blunder Threshold",typeCustomTitleHere:"Type custom title here",displayEmptyElements:"Display Empty Elements",waitingForNewGame:"Waiting for new game.",insertedComment:"Inserted comment.",tryingToConnectAndLoginToCSAServer:"Trying to connect and login to CSA server.",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"*In web browser version, it will output logs to console and ignore this setting.",shouldRestartToApplyLogSettings:"*You should restart this app to apply log settings.",canOpenLogDirectoryFromMenu:'*You can open log directory from "Debug" - "Open Log Directory" menu.',hasNoOldLogCleanUpFeature:"*This app has no clean-up feature. Please remove old logs manually.",processingPleaseWait:"Processing, please wait.",importingFollowingRecordOrPosition:"Importing the following record(or position).",supportsKIFCSAUSI:"*Supports KIF, CSA, USI.",plesePasteRecordIntoTextArea:"*Please paste record data into the text area.",desktopVersionPastesAutomatically:"*In desktop version, it will paste automatically from clipboard.",someLogsDisabled:"Some log settings are disabled.",logsRecommendedForCSAProtocol:"Log settings are recommended for CSA protocol.",pleaseEnableLogsAndRestart:"Please enable log settings and restart this app.",notSendPVOnStandardCSAProtocol:"Client do not send PV on standard CSA protocol.",csaProtocolSendPlaintextPassword:"On CSA protocol, client send plaintext password.",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"Password will saved as plaintext because OS side encryption is not available.",pleaseUncheckSaveHistoryIfNotWantSave:"Please uncheck Save History, if you don't want to save.",csaProtocolSendPlaintextPasswordRegardlessOfHistory:"On CSA protocol, client send plaintext password regardless of history.",areYouSureWantToQuitGames:"Are you sure you want to quit games?",areYouSureWantToRequestQuit:"You have possibility to be loser. Are you sure you want to request quit?",areYouSureWantToClearRecord:"Are you sure you want to clear record?",areYouSureWantToDiscardPosition:"Are you sure you want to discard the position?",youCanNotCloseAppWhileCSAOnlineGame:"You can not close app while CSA online game.",fileExtensionNotSupported:"File extension is not supported.",errorOccuredWhileDisconnectingFromCSAServer:"An error occured while disconnecting from CSA server.",failedToConnectToCSAServer:"Failed to connect to CSA server.",disconnectedFromCSAServer:"Disconnected from CSA server.",csaServerLoginDenied:"CSA server login denied.",thisFeatureNotAvailableOnWebApp:"This feature is not available on web app.",failedToSendGoCommand:"Failed to send go-command.",failedToSendPonderCommand:"Failed to send ponder-command.",failedToSendStopCommand:"Failed to send stop-command.",failedToSaveRecord:"Failed to save record.",failedToParseSFEN:"Failed to parse SFEN.",failedToDetectRecordFormat:"Failed to detect record format.",unknownFileExtension:"Unknown file extension.",emptyRecordInput:"Empty record input.",invalidPieceName:"Invalid piece name",invalidTurn:"Invalid turn",invalidMove:"Invalid move",invalidMoveNumber:"Invalid move number",invalidDestination:"Invalid destination",pieceNotExists:"Piece not exists",invalidLine:"Invalid line",invalidHandicap:"Invalid handicap",invalidBoard:"Invalid board",invalidHandPiece:"Invalid hand piece",invalidUSI:"Invalid USI",backgroundImageFileNotSelected:"Background image file is not selected.",pieceImageFileNotSelected:"Piece image File is not selected.",boardImageFileNotSelected:"Board image file is not selected.",pieceStandImageFileNotSelected:"Piece stand image file is not selected.",pieceVolumeMustBe0To100Percent:"Piece volume must be 0% to 100%.",clockVolumeMustBe0To100Percent:"Clock volume must be 0% to 100%.",clockPitchMustBe220To880Hz:"Clock pitch must be 220Hz to 880Hz.",engineTimeoutMustBe1To300Seconds:"Engine timeout must be 1 to 300 seconds.",coefficientInSigmoidMustBeGreaterThan0:"Coefficient in sigmoid must be greater than 0.",inaccuracyThresholdMustBe1To100Percent:"Inaccuracy must be 1% to 100%.",dubiousThresholdMustBe1To100Percent:"Dubious threshold must be 1% to 100%.",mistakeThresholdMustBe1To100Percent:"Mistake threshold must be 1% to 100%.",blunderThresholdMustBe1To100Percent:"Blunder threshold must be 1% to 100%.",inaccuracyThresholdMustBeLessThanDubiousThreshold:"Inaccuracy threshold must be less than dubious threshold.",dubiousThresholdMustBeLessThanMistakeThreshold:"Dubious threshold must be less than mistake threshold.",mistakeThresholdMustBeLessThanBlunderThreshold:"Mistake threshold must be less than blunder threshold.",thisEngineNotSupportsMateSearch:"This engine does not support mate search.",tryToReloginToCSAServerNSecondsLater:t=>`Try to relogin to CSA server ${t} seconds later.`,mateInNPlyDoYouWantToDisplay:t=>`Mate in ${t} ply. Do you want to display?`,insertedNMovesToRecord:t=>`Inserted ${t} moves to the record.`,errorsOccurred:t=>t>=2?`${t} errors have occurred.`:`${t} error has occurred.`,between:(t,e)=>`between ${t} and ${e}`,addNthEngine:t=>`Add ${F5(t)} engine`,copyOf:t=>`${t} (copy)`,keepLatest:t=>`keep latest ${t}`,areYouSureWantToDeleteFollowingMove:t=>`Are you sure you want to delete ${t}th move and the following move?`,failedToOpenDirectory:t=>`Failed to open directory of the file: ${t}`,unexpectedEventSenderPleaseReport(t){return`Unexpected event sender. Please report this error message to developer. [${t}]`},unexpectedHTTPMethodPleaseReport(t){return`Unexpected HTTP method. Please report this error message to developer. [${t}]`},unexpectedRequestURLPleaseReport(t){return`Unexpected request URL. Please report this error message to developer. [${t}]`},noResponseFromEnginePleaseExtendTimeout(t){return`No response from engine while ${t} seconds. Please extend timeout at app settings, if your engine is slow.`}},ir={electronShogi:"Electron将棋",clear:"初期化",open:"開く",saveOverwrite:"上書き保存",newRecord:"新規棋譜",newRecordWithBrackets:"(新規棋譜)",openRecord:"棋譜を開く",saveRecord:"棋譜を上書き保存",saveRecordAs:"棋譜を名前を付けて保存",openAutoSavingDirectory:"自動保存先を開く",exportPositionImage:"局面図を出力",positionImage:"局面図",close:"閉じる",quit:"終了",editing:"編集",copyAsKIF:"コピー・KIF",copyAsCSA:"コピー・CSA",copyAsUSI:"コピー・USI",copyAsSFEN:"コピー・SFEN",paste:"貼り付け",copyRecord:"棋譜コピー",asKIF:"KIF形式",asCSA:"CSA形式",asUSIUntilCurrentMove:"USI形式(現在の指し手まで)",asUSIAll:"USI形式(全て)",copyPositionAsSFEN:"局面コピー(SFEN形式)",pasteRecordOrPosition:"棋譜・局面貼り付け",appendSpecialMove:"特殊な指し手",deleteMoves:"現在の位置から棋譜を削除",view:"表示",toggleFullScreen:"全画面表示切り替え",defaultFontSize:"標準の文字サイズ",largerFontSize:"文字を拡大",smallerFontSize:"文字を縮小",settings:"設定",config:"設定",debug:"デバッグ",toggleDevTools:"開発者ツール表示切り替え",openAppDirectory:"アプリのフォルダを開く",openSettingDirectory:"設定ファイルのフォルダを開く",openLogDirectory:"ログファイルのフォルダを開く",help:"ヘルプ",openWebSite:"Webサイトを開く",howToUse:"使い方を開く",checkForUpdates:"最新バージョンを確認",game:"対局",player:"プレイヤー",selectFromHistory:"履歴から選ぶ",noHistory:"履歴がありません",saveHistory:"履歴に保存する",version:"バージョン",gameProgress:"対局の経過",allGamesCompleted:"連続対局終了",gameEnded:"対局終了",offlineGame:"ローカル対局",csaOnlineGame:"通信対局(CSA)",csaProtocolOnlineGame:"通信対局(CSAプロトコル)",csaProtocolV121:"CSAプロトコル1.2.1 標準",csaProtocolV121WithPVComment:"CSAプロトコル1.2.1 読み筋コメント付き",hostToConnect:"接続先ホスト",portNumber:"ポート番号",password:"パスワード",showPassword:"パスワードを表示する",logout:"ログアウト",displayGameResults:"戦績確認",interrupt:"中断",stopGame:"対局中断",resign:"投了",draw:"引き分け",impass:"持将棋",repetitionDraw:"千日手",mate:"詰み",mateSearch:"詰み探索",startMateSearch:"詰み探索開始",stopMateSearch:"詰み探索終了",noMateFound:"詰みが見つかりませんでした。",timeout:"時間切れ",foulWin:"反則勝ち",foulLose:"反則負け",enteringOfKing:"入玉勝ち",winByDefault:"不戦勝",loseByDefault:"不戦敗",winByDeclaration:"宣言勝ち",declareWinning:"勝ち宣言",research:"検討",startResearch:"検討開始",endResearch:"検討終了",recordAnalysis:"棋譜解析",analysis:"解析",analyze:"解析開始",stopAnalysis:"解析中断",setupPosition:"局面編集",startPositionSetup:"局面編集開始",completePositionSetup:"局面編集終了",changeTurn:"手番変更",initializePosition:"局面の初期化",appSettings:"アプリ設定",language:"言語",theme:"テーマ",standard:"標準",green:"緑",cherryBlossom:"桜",customImage:"カスタム画像",autumn:"紅葉",snow:"雪",dark:"ダーク",piece:"駒",singleKanjiPiece:"一文字駒",singleKanjiGothicPiece:"一文字駒(ゴシック体)",singleKanjiDarkPiece:"一文字駒(ダーク)",singleKanjiGothicDarkPiece:"一文字駒(ゴシック体・ダーク)",backgroundImage:"背景画像",board:"盤",pieceStand:"駒台",lightWoodyTexture:"木目(明るい)",warmWoodTexture:"木目(暖かい)",regin:"レジン",displayFileAndRank:"段・筋を表示",displayLeftControls:"左側操作ボタンを表示",displayRightControls:"右側操作ボタンを表示",tabViewStyle:"タブビューの形式",oneColumn:"1列",twoColumns:"2列",sounds:"音",pieceLoudness:"駒音の大きさ",clockLoudness:"時計音の大きさ",clockPitch:"時計音の高さ",clockSoundTarget:"時計音の対象",anyTurn:"全ての手番",onlyHumanTurn:"人間の手番のみ",textEncoding:"文字コード",strict:"厳格",autoDetect:"自動判定",newlineCharacter:"改行文字",old90sMac:"90年代Mac",autoSavingDirectory:"棋譜の自動保存先",select:"選択",usiProtocol:"USIプロトコル",translateOptionName:"オプション名を翻訳",functionalOnJapaneseOnly:"日本語選択時のみ有効",maxStartupTime:"最大起動待ち時間",forDevelopers:"開発者向け",enableAppLog:"アプリログを出力",enableUSILog:"USI通信ログを出力",enableCSALog:"CSA通信ログを出力",logLevel:"ログレベル",engineSettings:"エンジン設定",flipBoard:"盤面反転",file:"ファイル",recordFile:"棋譜ファイル",executableFile:"実行可能ファイル",imageFile:"画像ファイル",remove:"削除",deleteMove:"指し手削除",recordProperties:"棋譜情報",comments:"コメント",moveComments:"指し手コメント",searchLog:"思考",pv:"読み筋",mateShort:"詰",displayPVShort:"再現",evaluation:"評価値",eval:"評価値",estimatedWinRate:"期待勝率",evaluationAndEstimatedWinRate:"評価値・期待勝率",swapEachTurnChange:"手番側有利がプラスの値",alwaysSenteIsPositive:"先手有利がプラスの値",signOfEvaluation:"評価値の符号",winRateCoefficient:"勝率換算係数",hideTabView:"最小化",expandTabView:"タブビューを再表示",sente:"先手",senteOrShitate:"先手(下手)",gote:"後手",goteOrUwate:"後手(上手)",swapSenteGote:"先後入れ替え",currentPosition:"現在の局面",time:"時間",enableEngineTimeout:"エンジンの時間切れあり",others:"その他",nextTurn:"次の手番",elapsedTime:"消費時間",elapsed:"経過時間",rank:"順位",depth:"深さ",searchEngine:"エンジン",ponder:"先読み(Ponder)",numberOfThreads:"スレッド数",multiPV:"マルチPV",startPosition:"開始局面",maxMoves:"最大手数",gameRepetition:"連続対局",autoRelogin:"自動で再ログインする",swapTurnWhenGameRepetition:"1局ごとに手番を入れ替える",outputComments:"コメントを出力する",saveRecordAutomatically:"棋譜を自動で保存する",adjustBoardToHumanPlayer:"人を手前に表示する",adjustBoardAutomatically:"盤面の向きを自動調整",startGame:"対局開始",cancelGame:"対局をキャンセル",allottedTime:"持ち時間",byoyomi:"秒読み",increments:"増加",startEndCriteria:"開始・終了条件",endCriteria1Move:"局面ごとの終了条件",outputSettings:"出力設定",noOutputs:"出力しない",insertCommentToTop:"前方に加筆する",appendCommentToBottom:"末尾に加筆する",insertToComment:"コメントに挿入",insertToRecord:"棋譜に挿入",overwrite:"上書きする",fromPrefix:"",fromSuffix:"から",toPrefix:"",toSuffix:"まで",plyPrefix:"",plySuffix:"手目",hoursSuffix:"時間",minutesSuffix:"分",secondsSuffix:"秒",engineManagement:"エンジン管理",engineName:"エンジン名",author:"作者",enginePath:"場所",openDirectory:"フォルダを開く",displayName:"表示名",invoke:"実行",resetToEngineDefaultValues:"エンジンの既定値に戻す",defaultValue:"既定値",noEngineRegistered:"エンジンが登録されていません。",duplicate:"複製",add:"追加",recommended:"推奨",import:"取り込む",saveAndClose:"保存して閉じる",save:"保存",saveAs:"保存",cancel:"キャンセル",back:"戻る",name:"名前",prediction:"予想",best:"最善",nodes:"Node数",hashUsage:"Hash使用率",nonHandicap:"平手",lanceHandicap:"香落ち",rightLanceHandicap:"右香落ち",bishopHandicap:"角落ち",rookHandicap:"飛車落ち",rookLanceHandicap:"飛車香落ち",twoPiecesHandicap:"二枚落ち",fourPiecesHandicap:"四枚落ち",sixPiecesHandicap:"六枚落ち",eightPiecesHandicap:"八枚落ち",tsumeShogi:"詰将棋",doubleKingTsumeShogi:"双玉詰将棋",startDateTime:"開始日時",endDateTime:"終了日時",gameDate:"対局日",tournament:"棋戦",strategy:"戦型",gameTitle:"表題",timeLimit:"持ち時間",place:"場所",postedOn:"掲載",note:"備考",senteShortName:"先手省略名",goteShortName:"後手省略名",opusNo:"作品番号",opusName:"作品名",publishedBy:"発表誌",publishedOn:"発表年月",source:"出典",numberOfMoves:"手数",integrity:"完全性",recordCategory:"分類",award:"受賞",filterByOptionName:"オプション名で検索",filterByEngineName:"エンジン名で検索",bookStyle:"書籍風",gameStyle:"対局画面風",none:"なし",bgCover:"1枚で表示",bgContain:"拡大して表示",bgTile:"タイル状に表示",inaccuracy:"緩手",dubious:"疑問手",mistake:"悪手",blunder:"大悪手",inaccuracyThreshold:"緩手の閾値",dubiousThreshold:"疑問手の閾値",mistakeThreshold:"悪手の閾値",blunderThreshold:"大悪手の閾値",typeCustomTitleHere:"ここに見出しを入力",displayEmptyElements:"未入力の項目を表示",waitingForNewGame:"対局開始を待っています。",insertedComment:"コメントを挿入しました。",tryingToConnectAndLoginToCSAServer:"CSAサーバーへの接続とログインを試みています。",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"※ブラウザ版ではログがコンソールに出力され、ここでの設定は無視されます。",shouldRestartToApplyLogSettings:"※ログ設定の変更を反映するにはアプリの再起動が必要です。",canOpenLogDirectoryFromMenu:"※ログの出力先は「デバッグ」-「ログファイルの場所を開く」で開きます。",hasNoOldLogCleanUpFeature:"※現在、古いログファイルの自動削除機能はありません。",processingPleaseWait:"処理中です。お待ちください。",importingFollowingRecordOrPosition:"以下の棋譜(または局面)を取り込みます。",supportsKIFCSAUSI:"※KIF形式/CSA形式/SFENに対応しています。",plesePasteRecordIntoTextArea:"※テキストエリアに棋譜を貼り付けてください。",desktopVersionPastesAutomatically:"※インストールアプリ版では自動的に貼り付けられます。",someLogsDisabled:"一部のログが無効になっています。",logsRecommendedForCSAProtocol:"CSAプロトコルを使用した対局では各種ログの出力を推奨します。",pleaseEnableLogsAndRestart:"アプリ設定からログを有効にしてアプリを再起動してください。",notSendPVOnStandardCSAProtocol:"標準のCSAプロトコルでは評価値や読み筋が送信されません。",csaProtocolSendPlaintextPassword:"CSAプロトコルの規格上パスワードは平文で送信されます。",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"OSの暗号化機能が利用できないため、入力したパスワードは平文で保存されます。",pleaseUncheckSaveHistoryIfNotWantSave:"保存したくない場合は「履歴に保存する」のチェックを外してください。",csaProtocolSendPlaintextPasswordRegardlessOfHistory:"なお、履歴の保存に関係なくCSAプロトコルの規格上パスワードは平文で送信されます。",areYouSureWantToQuitGames:"連続対局を中断しますか?",areYouSureWantToRequestQuit:"中断を要求すると負けになる可能性があります。よろしいですか?",areYouSureWantToClearRecord:"現在の棋譜は削除されます。よろしいですか?",areYouSureWantToDiscardPosition:"現在の局面は破棄されます。よろしいですか?",youCanNotCloseAppWhileCSAOnlineGame:"CSAプロトコル使用中はアプリを終了できません。",fileExtensionNotSupported:"取り扱いできないファイル拡張子です。",errorOccuredWhileDisconnectingFromCSAServer:"CSAサーバーからの切断中にエラーが発生しました。",failedToConnectToCSAServer:"CSAサーバーに接続できませんでした。",disconnectedFromCSAServer:"CSAサーバーへの接続が切れました。",csaServerLoginDenied:"CSAサーバーへのログインが拒否されました。",thisFeatureNotAvailableOnWebApp:"Web版では利用できない機能です。",failedToSendGoCommand:"goコマンドを送信できませんでした。",failedToSendPonderCommand:"ponderコマンドを送信できませんでした。",failedToSendStopCommand:"stopコマンドを送信できませんでした。",failedToSaveRecord:"棋譜の保存に失敗しました。",failedToParseSFEN:"SFENの読み込みに失敗しました。",failedToDetectRecordFormat:"棋譜形式を判別できませんでした。",unknownFileExtension:"不明なファイル形式です。",emptyRecordInput:"棋譜が入力されていません。",invalidPieceName:"不正な駒",invalidTurn:"不正な手番",invalidMove:"不正な指し手",invalidMoveNumber:"不正な手数",invalidDestination:"不正な移動先",pieceNotExists:"存在しない駒",invalidLine:"不正な行",invalidHandicap:"不正な手合",invalidBoard:"不正な盤面",invalidHandPiece:"不正な持ち駒",invalidUSI:"不正なUSI",backgroundImageFileNotSelected:"背景画像のファイルが選択されていません。",pieceImageFileNotSelected:"駒画像のファイルが選択されていません。",boardImageFileNotSelected:"盤面画像のファイルが選択されていません。",pieceStandImageFileNotSelected:"駒台画像のファイルが選択されていません。",pieceVolumeMustBe0To100Percent:"駒音の大きさには0%~100%の値を指定してください。",clockVolumeMustBe0To100Percent:"時計音の大きさには0%~100%の値を指定してください。",clockPitchMustBe220To880Hz:"時計音の高さには220Hz~880Hzの値を指定してください。",engineTimeoutMustBe1To300Seconds:"エンジンのタイムアウト時間には1秒~300秒の値を指定してください。",coefficientInSigmoidMustBeGreaterThan0:"勝率換算係数には0より大きい値を指定してください。",inaccuracyThresholdMustBe1To100Percent:"緩手には1%~100%の値を指定してください。",dubiousThresholdMustBe1To100Percent:"疑問手には1%~100%の値を指定してください。",mistakeThresholdMustBe1To100Percent:"悪手には1%~100%の閾値を指定してください。",blunderThresholdMustBe1To100Percent:"大悪手には1%~100%の値を指定してください。",inaccuracyThresholdMustBeLessThanDubiousThreshold:"緩手には疑問手より小さい値を指定してください。",dubiousThresholdMustBeLessThanMistakeThreshold:"疑問手には悪手より小さい値を指定してください。",mistakeThresholdMustBeLessThanBlunderThreshold:"悪手には大悪手より小さい値を指定してください。",thisEngineNotSupportsMateSearch:"このエンジンは詰将棋探索をサポートしていません。",tryToReloginToCSAServerNSecondsLater:t=>`CSAサーバーへのログインを${t}秒後に再試行します。`,mateInNPlyDoYouWantToDisplay:t=>`${t}手で詰みました。再生画面を表示しますか?`,insertedNMovesToRecord:t=>`${t}手を棋譜に挿入しました。`,errorsOccurred:t=>`${t} 種類のエラーが発生しました。`,between:(t,e)=>`${t} から ${e} まで`,addNthEngine:t=>`${t} 個目のエンジンを追加`,copyOf:t=>`${t} のコピー`,keepLatest:t=>`最新${t}件まで`,areYouSureWantToDeleteFollowingMove:t=>`${t}手目以降を削除します。よろしいですか?`,failedToOpenDirectory:t=>`ファイルの場所を開けませんでした: ${t}`,unexpectedEventSenderPleaseReport(t){return`予期せぬイベントの送信元です。このエラーメッセージを開発者に報告してください。 [${t}]`},unexpectedHTTPMethodPleaseReport(t){return`予期せぬHTTPメソッドです。このエラーメッセージを開発者に報告してください。 [${t}]`},unexpectedRequestURLPleaseReport(t){return`予期せぬURLへのリクエストです。このエラーメッセージを開発者に報告してください。 [${t}]`},noResponseFromEnginePleaseExtendTimeout(t){return`${t}秒以内にエンジンから応答がありませんでした。エンジンの起動が重い場合はアプリ設定で待ち時間を延長してください。`}},_5={electronShogi:"Electron將棋",clear:"清除",open:"開啟",saveOverwrite:"覆蓋檔案",newRecord:"新棋譜",newRecordWithBrackets:"(新棋譜)",openRecord:"打開棋譜",saveRecord:"保存棋譜",saveRecordAs:"另存棋譜",openAutoSavingDirectory:"打開自動保存目錄",exportPositionImage:"輸出局面圖",positionImage:"局面圖",close:"關閉",quit:"離開",editing:"編輯",copyAsKIF:"複製KIF棋譜",copyAsCSA:"複製CSA棋譜",copyAsUSI:"複製USI棋譜",copyAsSFEN:"複製SFEN局面",paste:"貼上",copyRecord:"複製棋譜",asKIF:"KIF形式",asCSA:"CSA形式",asUSIUntilCurrentMove:"USI形式(到目前手數為止)",asUSIAll:"USI形式(全部)",copyPositionAsSFEN:"複製局面(SFEN形式)",pasteRecordOrPosition:"貼上棋譜、局面",appendSpecialMove:"特殊手",deleteMoves:"刪除現在位置後的棋譜",view:"表示",toggleFullScreen:"切換全螢幕",defaultFontSize:"預設字體尺寸",largerFontSize:"增加字體尺寸",smallerFontSize:"縮小字體尺寸",settings:"設定",config:"設定",debug:"偵錯",toggleDevTools:"打開/關閉開發者工具顯示",openAppDirectory:"顯示本程式所在資料夾",openSettingDirectory:"開啟設定檔案所在資料夾",openLogDirectory:"開啟紀錄檔(log)所在資料夾",help:"協助",openWebSite:"官方網站",howToUse:"使用教學",checkForUpdates:"檢查最新版本",game:"對局",player:"玩家",selectFromHistory:"從紀錄選取",noHistory:"目前沒有紀錄",saveHistory:"保存紀錄",version:"版本",gameProgress:"對局過程",allGamesCompleted:"連續對局結束",gameEnded:"對局結束",offlineGame:"本地(單機)對局",csaOnlineGame:"通訊對局(CSA)",csaProtocolOnlineGame:"通訊對局(CSA協定)",csaProtocolV121:"CSA協定 1.2.1 標準",csaProtocolV121WithPVComment:"CSA協定 1.2.1 +思考註解",hostToConnect:"連接之伺服器",portNumber:"連接埠號碼",password:"密碼",showPassword:"顯示密碼",logout:"登出",displayGameResults:"確認戰績",interrupt:"中斷",stopGame:"對局中斷",resign:"投了",draw:"平手",impass:"持将棋",repetitionDraw:"千日手",mate:"詰死",mateSearch:"詰搜尋",startMateSearch:"開始詰搜尋",stopMateSearch:"結束詰搜尋",noMateFound:"在目前的盤面中找不到詰。",timeout:"時間耗盡",foulWin:"反則勝利",foulLose:"反則敗北",enteringOfKing:"入玉勝利",winByDefault:"不戰勝",loseByDefault:"不戰敗",winByDeclaration:"宣言勝利",declareWinning:"勝利宣言",research:"檢討",startResearch:"檢討開始",endResearch:"結束檢討",recordAnalysis:"棋譜解析",analysis:"解析",analyze:"解析開始",stopAnalysis:"中斷解析",setupPosition:"編輯局面",startPositionSetup:"開始編輯局面",completePositionSetup:"結束編輯局面",changeTurn:"變更手番",initializePosition:"初始化局面",appSettings:"程式設定",language:"語言",theme:"主題",standard:"標準",green:"綠色",cherryBlossom:"櫻花",customImage:"自定義圖片",autumn:"紅葉",snow:"雪",dark:"深色主題",piece:"棋駒",singleKanjiPiece:"一文字駒",singleKanjiGothicPiece:"一文字駒(黑體)",singleKanjiDarkPiece:"一文字駒(深色)",singleKanjiGothicDarkPiece:"一文字駒(黑體・深色)",backgroundImage:"背景圖片",board:"棋盤",pieceStand:"駒台",lightWoodyTexture:"木目(亮色)",warmWoodTexture:"木目(暖色)",regin:"樹脂",displayFileAndRank:"顯示段・筋",displayLeftControls:"顯示左側操作按鈕",displayRightControls:"顯示右側操作按鈕",tabViewStyle:"分頁顯示形式",oneColumn:"1列",twoColumns:"2列",sounds:"音效",pieceLoudness:"棋駒音效",clockLoudness:"棋鐘音效大小",clockPitch:"棋鐘音效頻率",clockSoundTarget:"棋鐘音效對象",anyTurn:"所有手番",onlyHumanTurn:"只有玩家手番",textEncoding:"文字編碼",strict:"檔案原始編碼",autoDetect:"自動判定",newlineCharacter:"換行符號",old90sMac:"90年代Mac",autoSavingDirectory:"棋譜自動保存地點",select:"選擇",usiProtocol:"USI協定",translateOptionName:"選項名稱翻譯",functionalOnJapaneseOnly:"只有在日文選擇時有效",maxStartupTime:"最大起動等待時間",forDevelopers:"開發者用",enableAppLog:"輸出程式 log",enableUSILog:"輸出USI通信 log",enableCSALog:"輸出CSA通信 log",logLevel:"log 等級",engineSettings:"引擎設定",flipBoard:"盤面反轉",file:"檔案",recordFile:"棋譜檔案",executableFile:"可執行檔案",imageFile:"圖片檔案",remove:"刪除",deleteMove:"刪除該手",recordProperties:"棋譜情報",comments:"備註",moveComments:"棋步備註",searchLog:"思考",pv:"読み筋",mateShort:"詰",displayPVShort:"再現",evaluation:"評價值",eval:"評價値",estimatedWinRate:"期待勝率",evaluationAndEstimatedWinRate:"評價値・期待勝率",swapEachTurnChange:"手番側有利時為正值",alwaysSenteIsPositive:"先手有利時為正值",signOfEvaluation:"評價值符號",winRateCoefficient:"勝率換算係數",hideTabView:"最小化",expandTabView:"展開分頁",sente:"先手",senteOrShitate:"先手(下手)",gote:"後手",goteOrUwate:"後手(上手)",swapSenteGote:"先後交換",currentPosition:"現在局面",time:"時間",enableEngineTimeout:"開啟引擎時間限制",others:"其他",nextTurn:"手番",elapsedTime:"消費時間",elapsed:"經過時間",rank:"順位",depth:"深度",searchEngine:"引擎",ponder:"對方手番時運算(Ponder)",numberOfThreads:"執行緒數",multiPV:"多重PV",startPosition:"開始局面",maxMoves:"最大手數",gameRepetition:"連續對局",autoRelogin:"自動重新登入",swapTurnWhenGameRepetition:"每局交換手番",outputComments:"輸出備註",saveRecordAutomatically:"自動保存棋譜",adjustBoardToHumanPlayer:"調整到玩家所在方向",adjustBoardAutomatically:"自動調整盤面方向",startGame:"對局開始",cancelGame:"取消對局",allottedTime:"持時間",byoyomi:"讀秒",increments:"增秒",startEndCriteria:"開始・結束條件",endCriteria1Move:"局面結束條件",outputSettings:"輸出設定",noOutputs:"不輸出",insertCommentToTop:"加入到前方",appendCommentToBottom:"在後方新增",insertToComment:"コメントに挿入",insertToRecord:"棋譜に挿入",overwrite:"覆寫原檔案",fromPrefix:"從",fromSuffix:"",toPrefix:"到",toSuffix:"",plyPrefix:"第",plySuffix:"手",hoursSuffix:"時間",minutesSuffix:"分",secondsSuffix:"秒",engineManagement:"引擎管理",engineName:"引擎名稱",author:"作者",enginePath:"場所",openDirectory:"開啟資料夾",displayName:"表示名稱",invoke:"執行",resetToEngineDefaultValues:"回復至引擎預設設定",defaultValue:"預設値",noEngineRegistered:"尚未登錄引擎。",duplicate:"複製",add:"追加",recommended:"推薦",import:"匯入",saveAndClose:"保存並關閉",save:"保存",saveAs:"另存為",cancel:"取消",back:"返回",name:"名稱",prediction:"預測",best:"最善",nodes:"Node數",hashUsage:"Hash使用率",nonHandicap:"平手",lanceHandicap:"香落",rightLanceHandicap:"右香落",bishopHandicap:"角落",rookHandicap:"飛車落",rookLanceHandicap:"飛車香落",twoPiecesHandicap:"二枚落",fourPiecesHandicap:"四枚落",sixPiecesHandicap:"六枚落",eightPiecesHandicap:"八枚落",tsumeShogi:"詰將棋",doubleKingTsumeShogi:"雙玉詰將棋",startDateTime:"開始日時",endDateTime:"結束日時",gameDate:"對局日",tournament:"棋戰",strategy:"戰型",gameTitle:"標題",timeLimit:"持時間",place:"場所",postedOn:"登錄於",note:"備註",senteShortName:"先手省略名",goteShortName:"後手省略名",opusNo:"作品編號",opusName:"作品名",publishedBy:"發表於",publishedOn:"發表年月",source:"來源",numberOfMoves:"手數",integrity:"完全性",recordCategory:"分類",award:"受賞",filterByOptionName:"搜尋設定名稱",filterByEngineName:"搜尋引擎名稱",bookStyle:"書籍風",gameStyle:"對局畫面風",none:"無",bgCover:"圖片置中",bgContain:"擴大表示",bgTile:"磁磚狀表示",inaccuracy:"緩手",dubious:"疑問手",mistake:"惡手",blunder:"大惡手",inaccuracyThreshold:"緩手閾値",dubiousThreshold:"疑問手閾値",mistakeThreshold:"惡手閾値",blunderThreshold:"大惡手閾値",typeCustomTitleHere:"輸入自定義標題",displayEmptyElements:"顯示未定義資料",waitingForNewGame:"正在等待下一場對局開始。",insertedComment:"コメントを挿入しました。",tryingToConnectAndLoginToCSAServer:"正在連接並登入CSA伺服器。",inBrowserLogsOutputToConsoleAndIgnoreThisSetting:"※在瀏覽器版本中 log 會於 console 中顯示,並無視此處的設定。",shouldRestartToApplyLogSettings:"※您需要重新啟動本程式以使用變更後的 log 設定。",canOpenLogDirectoryFromMenu:"※log 的輸出檔案可以在「偵錯」-「開啟紀錄檔案資料夾」開啟。",hasNoOldLogCleanUpFeature:"※現在並沒有舊 log 的自動刪除機制。",processingPleaseWait:"現在處理中。請稍待一會。",importingFollowingRecordOrPosition:"將匯入以下棋譜(局面)。",supportsKIFCSAUSI:"※支援KIF/CSA/SFEN形式。",plesePasteRecordIntoTextArea:"※請在文字輸入區域貼上您的棋譜。",desktopVersionPastesAutomatically:"※安裝程式版將會自動貼上棋譜。",someLogsDisabled:"部份 log 已被無效化。",logsRecommendedForCSAProtocol:"若使用CSA協定對局,建議輸出各項 log 。",pleaseEnableLogsAndRestart:"請在程式設定中開啟 log 並重新啟動本程式。",notSendPVOnStandardCSAProtocol:"在標準的CSA協定中不會送出評價值以及思考棋步。",csaProtocolSendPlaintextPassword:"在CSA協定中,密碼為明文傳輸。",passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable:"由於無法使用系統的加密機能,輸入的密碼將會以明文保存。",pleaseUncheckSaveHistoryIfNotWantSave:"若不想保存密碼,請不要將「保存紀錄」勾選。",csaProtocolSendPlaintextPasswordRegardlessOfHistory:"不過,CSA協定仍會以明文傳輸您的密碼。",areYouSureWantToQuitGames:"要中斷連續對局嗎?",areYouSureWantToRequestQuit:"若提出中斷要求,可能會被判負。請問您要繼續嗎?",areYouSureWantToClearRecord:"將會刪除現在的棋譜。請問您要繼續嗎?",areYouSureWantToDiscardPosition:"將不會保存現在的局面。請問您要繼續嗎?",youCanNotCloseAppWhileCSAOnlineGame:"由於CSA協定正在使用中,本程式無法被關閉。",fileExtensionNotSupported:"無法支援的副檔名。",errorOccuredWhileDisconnectingFromCSAServer:"在與CSA伺服器中斷連線時發生錯誤。",failedToConnectToCSAServer:"無法連接CSA伺服器。",disconnectedFromCSAServer:"與CSA伺服器的連接結束。",csaServerLoginDenied:"您對CSA伺服器的登入被拒絕。",thisFeatureNotAvailableOnWebApp:"Web版無法使用本機能",failedToSendGoCommand:"無法送出go指令。",failedToSendPonderCommand:"無法送出ponder指令。",failedToSendStopCommand:"無法送出stop指令。",failedToSaveRecord:"棋譜保存失敗。",failedToParseSFEN:"SFEN讀取失敗。",failedToDetectRecordFormat:"無法判別棋譜形式。",unknownFileExtension:"未知的檔案形式。",emptyRecordInput:"您尚未輸入棋譜。",invalidPieceName:"不合法的棋駒",invalidTurn:"不合法的手番",invalidMove:"不合法的棋步",invalidMoveNumber:"不合法的手數",invalidDestination:"不合法的移動目的地",pieceNotExists:"不存在的棋駒",invalidLine:"不存在的行",invalidHandicap:"不合法的手合配置",invalidBoard:"不合法的盤面",invalidHandPiece:"不合法的持駒",invalidUSI:"不合法的USI",backgroundImageFileNotSelected:"尚未選取背景圖片。",pieceImageFileNotSelected:"尚未選取棋駒圖片。",boardImageFileNotSelected:"尚未選取盤面圖片。",pieceStandImageFileNotSelected:"尚未選取駒台圖片。",pieceVolumeMustBe0To100Percent:"請在0%~100%之間指定棋駒音效大小。",clockVolumeMustBe0To100Percent:"請在0%~100%之間指定棋鐘音效大小。",clockPitchMustBe220To880Hz:"請在220Hz~880Hz之間指定棋鐘音效頻率。",engineTimeoutMustBe1To300Seconds:"請在1秒~300秒之間指定引擎執行最長時間。",coefficientInSigmoidMustBeGreaterThan0:"請將勝率換算係數填為大於0之值。",inaccuracyThresholdMustBe1To100Percent:"請在0%~100%之間指定緩手門檻。",dubiousThresholdMustBe1To100Percent:"請在0%~100%之間指定疑問手門檻。",mistakeThresholdMustBe1To100Percent:"請在0%~100%之間指定惡手門檻。",blunderThresholdMustBe1To100Percent:"請在0%~100%之間指定大惡手門檻。",inaccuracyThresholdMustBeLessThanDubiousThreshold:"緩手門檻應小於疑問手門檻。",dubiousThresholdMustBeLessThanMistakeThreshold:"疑問手門檻應小於惡手門檻。",mistakeThresholdMustBeLessThanBlunderThreshold:"惡手門檻應小於大惡手門檻。",thisEngineNotSupportsMateSearch:"這個引擎不支援詰將棋搜索。",tryToReloginToCSAServerNSecondsLater:t=>`請在${t}秒後再次嘗試登入 CSA 伺服器。`,mateInNPlyDoYouWantToDisplay:t=>`尋找到${t}手詰。要顯示結果嗎?`,insertedNMovesToRecord:t=>`${t}手を棋譜に挿入しました。`,errorsOccurred:t=>`發生 ${t} 種類的錯誤。`,between:(t,e)=>`自 ${t} 到 ${e} `,addNthEngine:t=>`追加第 ${t} 個引擎`,copyOf:t=>`${t} 的拷貝`,keepLatest:t=>`到最新${t}件`,areYouSureWantToDeleteFollowingMove:t=>`將會刪除${t}手目以後的棋譜。請問您要繼續嗎?`,failedToOpenDirectory:t=>`無法開啟檔案目錄:${t}`,unexpectedEventSenderPleaseReport(t){return`無法預期的事件發送方已發生。請將該錯誤訊息告知開發者,謝謝。 [${t}]`},unexpectedHTTPMethodPleaseReport(t){return`無法預期的 HTTP 方法。請將該錯誤訊息告知開發者,謝謝。 [${t}]`},unexpectedRequestURLPleaseReport(t){return`無法從 URL 獲取資訊。請將該錯誤訊息告知開發者,謝謝。 [${t}]`},noResponseFromEnginePleaseExtendTimeout(t){return`引擎在${t}秒内沒有回應。若引擎的啟動時間稍長,請在設定中調整引擎最長等待時間。`}},d=ir;function v5(t){switch(t){case T0.JA:return ir;case T0.EN:return D5;case T0.ZH_TW:return _5;default:return ir}}function b5(t){Object.entries(v5(t)).forEach(([e,x])=>{d[e]=x})}const y5={USI_Ponder:"相手番思考",Ponder:"相手番思考",USI_Hash:"ハッシュ",Hash:"ハッシュ",Clear_Hash:"ハッシュクリア",Threads:"スレッド",NumberOfThreads:"スレッド数",thread_num_per_gpu:"GPUあたりのスレッド数",ThreadIdOffset:"スレッドIDオフセット",MultiPV:"マルチPV",BookFile:"定跡ファイル",Book_File:"定跡ファイル",Book_Enable:"定跡あり",BookEvalDiff:"定跡の評価値差",book_file_name:"定跡ファイル名",use_book:"定跡を使用",BookPvMoves:"定跡PV手数",TinyBook:"小さい定跡",BookMoves:"定跡利用手数",BookMaxPly:"定跡最大手数",BookIgnoreRate:"定跡不使用率",RandomBookSelect:"ランダム定跡選択",IgnoreBookPly:"定跡の手数を無視",DepthLimit:"最大深さ",NarrowBook:"定跡手を限定",WriteDebugLog:"デバッグログ出力",Write_Debug_Log:"デバッグログ出力",ResignValue:"投了基準値",ResignScore:"投了基準値",PvInterval:"PV出力間隔",NodesLimit:"最大ノード数",USI_OwnBook:"定跡を使用",OwnBook:"定跡を使用",EvalDir:"評価関数のフォルダ",Eval_Dir:"評価関数のフォルダ",EvalFile:"評価関数ファイル",EvalHash:"評価値ハッシュ",Eval_Hash:"評価値ハッシュ",EvalSaveDir:"評価関数保存フォルダ",EvalShare:"評価値共有",BookDir:"定跡ファイルのフォルダ",Stochastic_Ponder:"相手番思考(確率的)",MinimumThinkingTime:"最小思考時間",Minimum_Thinking_Time:"最小思考時間",MinThinkingTime:"最小思考時間",MaxMovesToDraw:"強制引き分け手数",SlowMover:"長考",Slow_Mover:"長考",OutputFailLHPV:"Fail Low/Highを出力",NetworkDelay:"通信遅延",NetworkDelay2:"通信遅延2",FV_SCALE:"評価値スケール",UseBook:"定跡を使用",MaxDepth:"最大深さ",MarginMs:"マージン(ミリ秒)",Time_Margin:"時間マージン",ByoyomiMargin:"秒読みマージン",Byoyomi_Margin:"秒読みマージン",byoyomi_margin:"秒読みマージン",Move_Overhead:"着手オーバーヘッド",FischerMargin:"フィッシャーマージン",SuddenDeathMargin:"切れ負けマージン",Snappy:"素早く指す",EnteringKingRule:"入玉ルール",Do_YoTsume_Search:"余詰めを探索",gpu_num:"GPU数",ConsiderationMode:"検討モード",ConsiderBookMoveCount:"定跡出現率を使用",GenerateAllLegalMoves:"全合法手を生成",DrawScore:"引き分けのスコア",DrawValue:"引き分けの値",DrawValueBlack:"引き分けの値(先手)",DrawValueWhite:"引き分けの値(後手)",LargePageEnable:"LargePageを使用",SkillLevel:"スキルレベル",Skill_Level:"スキルレベル"},Xi={};function S5(t){switch(t){case T0.JA:return y5;case T0.EN:return{};default:return{}}}function w5(t){Object.keys(Xi).forEach(e=>{delete Xi[e]}),Object.entries(S5(t)).forEach(([e,x])=>{Xi[e]=x})}class to extends Error{constructor(e){super(`Invalid piece name: ${e}`),this.data=e,this.name="InvalidPieceNameError"}}class o8 extends Error{constructor(e){super(`Invalid turn: ${e}`),this.data=e,this.name="InvalidTurnError"}}class Zn extends Error{constructor(e){super(`Invalid move: ${e}`),this.data=e,this.name="InvalidMoveError"}}class r8 extends Error{constructor(e){super(`Invalid move number: ${e}`),this.data=e,this.name="InvalidMoveNumberError"}}class a8 extends Error{constructor(e){super(`Invalid destination: ${e}`),this.data=e,this.name="InvalidDestinationError"}}class sr extends Error{constructor(e){super(`Piece not exists: ${e}`),this.data=e,this.name="PieceNotExistsError"}}class Xr extends Error{constructor(e){super(`Invalid line: ${e}`),this.data=e,this.name="InvalidLineError"}}class E8 extends Error{constructor(e){super(`Invalid handicap: ${e}`),this.data=e,this.name="InvalidHandicapError"}}class or extends Error{constructor(e){super(`Invalid board: ${e}`),this.data=e,this.name="InvalidBoardError"}}class l8 extends Error{constructor(e){super(`Invalid hand piece: ${e}`),this.data=e,this.name="InvalidHandPieceError"}}class Dn extends Error{constructor(e){super(`Invalid USI: ${e}`),this.data=e,this.name="InvalidUSIError"}}var L=(t=>(t.BLACK="black",t.WHITE="white",t))(L||{});function Tt(t){return t==="black"?"white":"black"}function T5(t){return t==="black"?"b":"w"}function P5(t){return t==="b"||t==="w"}function I5(t){return t==="b"?"black":"white"}var H=(t=>(t.PAWN="pawn",t.LANCE="lance",t.KNIGHT="knight",t.SILVER="silver",t.GOLD="gold",t.BISHOP="bishop",t.ROOK="rook",t.KING="king",t.PROM_PAWN="promPawn",t.PROM_LANCE="promLance",t.PROM_KNIGHT="promKnight",t.PROM_SILVER="promSilver",t.HORSE="horse",t.DRAGON="dragon",t))(H||{});const k5=["pawn","lance","knight","silver","gold","bishop","rook"],M5={pawn:!0,lance:!0,knight:!0,silver:!0,gold:!1,bishop:!0,rook:!0,king:!1,promPawn:!1,promLance:!1,promKnight:!1,promSilver:!1,horse:!1,dragon:!1},c8={pawn:"promPawn",lance:"promLance",knight:"promKnight",silver:"promSilver",bishop:"horse",rook:"dragon"};function O5(t){return c8[t]||t}const R5={promPawn:"pawn",promLance:"lance",promKnight:"knight",promSilver:"silver",horse:"bishop",dragon:"rook"},A8={pawn:"P",lance:"L",knight:"N",silver:"S",gold:"G",bishop:"B",rook:"R",king:"K",promPawn:"+P",promLance:"+L",promKnight:"+N",promSilver:"+S",horse:"+B",dragon:"+R"};function N5(t){return A8[t]}const L5={pawn:"p",lance:"l",knight:"n",silver:"s",gold:"g",bishop:"b",rook:"r",king:"k",promPawn:"+p",promLance:"+l",promKnight:"+n",promSilver:"+s",horse:"+b",dragon:"+r"},sE={P:"pawn",L:"lance",N:"knight",S:"silver",G:"gold",B:"bishop",R:"rook",K:"king","+P":"promPawn","+L":"promLance","+N":"promKnight","+S":"promSilver","+B":"horse","+R":"dragon",p:"pawn",l:"lance",n:"knight",s:"silver",g:"gold",b:"bishop",r:"rook",k:"king","+p":"promPawn","+l":"promLance","+n":"promKnight","+s":"promSilver","+b":"horse","+r":"dragon"},H5={P:L.BLACK,L:L.BLACK,N:L.BLACK,S:L.BLACK,G:L.BLACK,B:L.BLACK,R:L.BLACK,K:L.BLACK,"+P":L.BLACK,"+L":L.BLACK,"+N":L.BLACK,"+S":L.BLACK,"+B":L.BLACK,"+R":L.BLACK,p:L.WHITE,l:L.WHITE,n:L.WHITE,s:L.WHITE,g:L.WHITE,b:L.WHITE,r:L.WHITE,k:L.WHITE,"+p":L.WHITE,"+l":L.WHITE,"+n":L.WHITE,"+s":L.WHITE,"+b":L.WHITE,"+r":L.WHITE},zt=new Map;zt.set("pawn",{type:"promPawn",reverseColor:!1});zt.set("lance",{type:"promLance",reverseColor:!1});zt.set("knight",{type:"promKnight",reverseColor:!1});zt.set("silver",{type:"promSilver",reverseColor:!1});zt.set("gold",{type:"gold",reverseColor:!0});zt.set("bishop",{type:"horse",reverseColor:!1});zt.set("rook",{type:"dragon",reverseColor:!1});zt.set("king",{type:"king",reverseColor:!0});zt.set("promPawn",{type:"pawn",reverseColor:!0});zt.set("promLance",{type:"lance",reverseColor:!0});zt.set("promKnight",{type:"knight",reverseColor:!0});zt.set("promSilver",{type:"silver",reverseColor:!0});zt.set("horse",{type:"bishop",reverseColor:!0});zt.set("dragon",{type:"rook",reverseColor:!0});class ce{constructor(e,x){this.color=e,this.type=x}black(){return this.withColor(L.BLACK)}white(){return this.withColor(L.WHITE)}withColor(e){return new ce(e,this.type)}equals(e){return this.type===e.type&&this.color===e.color}promoted(){const e=c8[this.type];return new ce(this.color,e||this.type)}unpromoted(){const e=R5[this.type];return new ce(this.color,e||this.type)}isPromotable(){return!!M5[this.type]}rotate(){const e=zt.get(this.type),x=new ce(this.color,e?e.type:this.type);return e&&e.reverseColor&&(x.color=Tt(this.color)),x}get id(){return this.color+"_"+this.type}get sfen(){switch(this.color){default:case L.BLACK:return A8[this.type];case L.WHITE:return L5[this.type]}}static isValidSFEN(e){return!!sE[e]}static newBySFEN(e){const x=sE[e];if(!x)return null;const n=H5[e];return n?new ce(n,x):null}}var Ht=(t=>(t.UP="up",t.DOWN="down",t.LEFT="left",t.RIGHT="right",t.LEFT_UP="left_up",t.RIGHT_UP="right_up",t.LEFT_DOWN="left_down",t.RIGHT_DOWN="right_down",t.LEFT_UP_KNIGHT="left_up_knight",t.RIGHT_UP_KNIGHT="right_up_knight",t.LEFT_DOWN_KNIGHT="left_down_knight",t.RIGHT_DOWN_KNIGHT="right_down_knight",t))(Ht||{});const U5={up:"down",down:"up",left:"right",right:"left",left_up:"right_down",right_up:"left_down",left_down:"right_up",right_down:"left_up",left_up_knight:"right_down_knight",right_up_knight:"left_down_knight",left_down_knight:"right_up_knight",right_down_knight:"left_up_knight"};function ms(t){return U5[t]}const $5=["up","down","left","right","left_up","right_up","left_down","right_down","left_up_knight","right_up_knight","left_down_knight","right_down_knight"];var Qn=(t=>(t.SHORT="short",t.LONG="long",t))(Qn||{});const u8={black:{pawn:{up:"short"},lance:{up:"long"},knight:{left_up_knight:"short",right_up_knight:"short"},silver:{left_up:"short",up:"short",right_up:"short",left_down:"short",right_down:"short"},gold:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},bishop:{left_up:"long",right_up:"long",left_down:"long",right_down:"long"},rook:{up:"long",left:"long",right:"long",down:"long"},king:{left_down:"short",right_down:"short",left_up:"short",right_up:"short",down:"short",left:"short",right:"short",up:"short"},promPawn:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},promLance:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},promKnight:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},promSilver:{left_up:"short",up:"short",right_up:"short",left:"short",right:"short",down:"short"},horse:{left_up:"long",right_up:"long",left_down:"long",right_down:"long",up:"short",left:"short",right:"short",down:"short"},dragon:{up:"long",left:"long",right:"long",down:"long",left_up:"short",right_up:"short",left_down:"short",right_down:"short"}},white:{pawn:{down:"short"},lance:{down:"long"},knight:{left_down_knight:"short",right_down_knight:"short"},silver:{left_down:"short",down:"short",right_down:"short",left_up:"short",right_up:"short"},gold:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},bishop:{left_down:"long",right_down:"long",left_up:"long",right_up:"long"},rook:{down:"long",left:"long",right:"long",up:"long"},king:{left_down:"short",right_down:"short",left_up:"short",right_up:"short",down:"short",left:"short",right:"short",up:"short"},promPawn:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},promLance:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},promKnight:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},promSilver:{left_down:"short",down:"short",right_down:"short",left:"short",right:"short",up:"short"},horse:{left_down:"long",right_down:"long",left_up:"long",right_up:"long",down:"short",left:"short",right:"short",up:"short"},dragon:{down:"long",left:"long",right:"long",up:"long",left_down:"short",right_down:"short",left_up:"short",right_up:"short"}}};function z5(t){return Object.keys(u8[t.color][t.type])}function h8(t,e){return u8[t.color][t.type][e]}const G5={up:{x:0,y:-1},down:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0},left_up:{x:-1,y:-1},right_up:{x:1,y:-1},left_down:{x:-1,y:1},right_down:{x:1,y:1},left_up_knight:{x:-1,y:-2},right_up_knight:{x:1,y:-2},left_down_knight:{x:-1,y:2},right_down_knight:{x:1,y:2}};function B8(t,e){if(t===1&&e===-2)return{direction:"right_up_knight",distance:1,ok:!0};if(t===-1&&e===-2)return{direction:"left_up_knight",distance:1,ok:!0};if(t===1&&e===2)return{direction:"right_down_knight",distance:1,ok:!0};if(t===-1&&e===2)return{direction:"left_down_knight",distance:1,ok:!0};if(t!==0&&e!==0&&Math.abs(t)!==Math.abs(e))return{direction:"",distance:0,ok:!1};let x=t,n=e,i=0;return x!==0&&(i=Math.abs(x),x/=i),n!==0&&(i=Math.abs(n),n/=i),x===-1&&n===-1?{direction:"left_up",distance:i,ok:!0}:x===0&&n===-1?{direction:"up",distance:i,ok:!0}:x===1&&n===-1?{direction:"right_up",distance:i,ok:!0}:x===-1&&n===0?{direction:"left",distance:i,ok:!0}:x===1&&n===0?{direction:"right",distance:i,ok:!0}:x===-1&&n===1?{direction:"left_down",distance:i,ok:!0}:x===0&&n===1?{direction:"down",distance:i,ok:!0}:x===1&&n===1?{direction:"right_down",distance:i,ok:!0}:{direction:"",distance:0,ok:!1}}var kx=(t=>(t.UP="up",t.NONE="none",t.DOWN="down",t))(kx||{});function Zi(t){switch(t){case"up":case"left_up":case"right_up":case"left_up_knight":case"right_up_knight":return"up";case"down":case"left_down":case"right_down":case"left_down_knight":case"right_down_knight":return"down";default:return"none"}}var Qt=(t=>(t.LEFT="left",t.NONE="none",t.RIGHT="right",t))(Qt||{});function Qi(t){switch(t){case"left":case"left_up":case"left_down":case"left_up_knight":case"left_down_knight":return"left";case"right":case"right_up":case"right_down":case"right_up_knight":case"right_down_knight":return"right";default:return"none"}}function W5(t){switch(t){case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;default:return null}}function V5(t){switch(t){case"a":return 1;case"b":return 2;case"c":return 3;case"d":return 4;case"e":return 5;case"f":return 6;case"g":return 7;case"h":return 8;case"i":return 9;default:return null}}const K5=["a","b","c","d","e","f","g","h","i"],mt=class{constructor(e,x){this.file=e,this.rank=x}get x(){return 9-this.file}get y(){return this.rank-1}get index(){return this.y*9+this.x}get opposite(){return new mt(10-this.file,10-this.rank)}neighbor(e,x){switch(e){case Ht.UP:return new mt(this.file,this.rank-1);case Ht.DOWN:return new mt(this.file,this.rank+1);case Ht.LEFT:return new mt(this.file+1,this.rank);case Ht.RIGHT:return new mt(this.file-1,this.rank);case Ht.LEFT_UP:return new mt(this.file+1,this.rank-1);case Ht.RIGHT_UP:return new mt(this.file-1,this.rank-1);case Ht.LEFT_DOWN:return new mt(this.file+1,this.rank+1);case Ht.RIGHT_DOWN:return new mt(this.file-1,this.rank+1);case Ht.LEFT_UP_KNIGHT:return new mt(this.file+1,this.rank-2);case Ht.RIGHT_UP_KNIGHT:return new mt(this.file-1,this.rank-2);case Ht.LEFT_DOWN_KNIGHT:return new mt(this.file+1,this.rank+2);case Ht.RIGHT_DOWN_KNIGHT:return new mt(this.file-1,this.rank+2)}const n=e,i=x;return new mt(this.file-n,this.rank+i)}directionTo(e){return B8(e.x-this.x,e.y-this.y).direction}get valid(){return this.file>=1&&this.file<=9&&this.rank>=1&&this.rank<=9}equals(e){return!!e&&this.file===e.file&&this.rank===e.rank}static newByXY(e,x){return new mt(9-e,x+1)}static newByIndex(e){return new mt(9-e%9,Math.trunc(e/9)+1)}get sfen(){return this.file+K5[this.rank-1]}static parseSFENSquare(e){const x=W5(e[0]),n=V5(e[1]);return!x||!n?null:new mt(x,n)}};let z=mt;_(z,"all",[]);for(let t=0;t<81;t+=1)z.all.push(z.newByIndex(t));class tt{constructor(e,x,n,i,s,o){this.from=e,this.to=x,this.promote=n,this.color=i,this.pieceType=s,this.capturedPieceType=o}equals(e){return e?(this.from instanceof z&&e.from instanceof z&&this.from.equals(e.from)||!(this.from instanceof z)&&!(e.from instanceof z)&&this.from===e.from)&&this.to.equals(e.to)&&this.promote===e.promote&&this.color===e.color&&this.pieceType===e.pieceType&&this.capturedPieceType===e.capturedPieceType:!1}withPromote(){return new tt(this.from,this.to,!0,this.color,this.pieceType,this.capturedPieceType)}get usi(){let e="";return this.from instanceof z?e+=this.from.sfen:e+=N5(this.from)+"*",e+=this.to.sfen,this.promote&&(e+="+"),e}}function d8(t){let e;if(t[1]==="*"){const i=ce.newBySFEN(t[0]);if(!i)return null;e=i.type}else{const i=z.parseSFENSquare(t);if(!i)return null;e=i}const x=z.parseSFENSquare(t.substring(2));if(!x)return null;const n=t.length>=5&&t[4]==="+";return{from:e,to:x,promote:n}}var Ce=(t=>(t.STANDARD="standard",t.EMPTY="empty",t.HANDICAP_LANCE="handicapLance",t.HANDICAP_RIGHT_LANCE="handicapRightLance",t.HANDICAP_BISHOP="handicapBishop",t.HANDICAP_ROOK="handicapRook",t.HANDICAP_ROOK_LANCE="handicapRookLance",t.HANDICAP_2PIECES="handicap2Pieces",t.HANDICAP_4PIECES="handicap4Pieces",t.HANDICAP_6PIECES="handicap6Pieces",t.HANDICAP_8PIECES="handicap8Pieces",t.TSUME_SHOGI="tsumeShogi",t.TSUME_SHOGI_2KINGS="tsumeShogi2Kings",t))(Ce||{});function oE(t){switch(t){case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;default:return null}}class Cs{constructor(){_(this,"squares");this.squares=new Array;for(let e=0;e<81;e+=1)this.squares.push(null);this.reset("standard")}at(e){return this.squares[e.index]}set(e,x){this.squares[e.index]=x}swap(e,x){const n=this.squares[e.index];this.squares[e.index]=this.squares[x.index],this.squares[x.index]=n}remove(e){const x=this.squares[e.index];return this.squares[e.index]=null,x}listNonEmptySquares(){return z.all.filter(e=>this.squares[e.index])}listSquaresByColor(e){return z.all.filter(x=>{const n=this.squares[x.index];return n&&n.color===e})}listSquaresByPiece(e){return z.all.filter(x=>{const n=this.squares[x.index];return n&&e.equals(n)})}clear(){z.all.forEach(e=>{this.squares[e.index]=null})}reset(e){if(this.clear(),e!=="empty"&&(this.squares[new z(5,1).index]=new ce(L.WHITE,H.KING),e!=="tsumeShogi"&&(this.squares[new z(5,9).index]=new ce(L.BLACK,H.KING),e!=="tsumeShogi2Kings")))switch(this.squares[new z(2,8).index]=new ce(L.BLACK,H.ROOK),this.squares[new z(8,2).index]=new ce(L.WHITE,H.ROOK),this.squares[new z(8,8).index]=new ce(L.BLACK,H.BISHOP),this.squares[new z(2,2).index]=new ce(L.WHITE,H.BISHOP),this.squares[new z(4,9).index]=new ce(L.BLACK,H.GOLD),this.squares[new z(6,9).index]=new ce(L.BLACK,H.GOLD),this.squares[new z(6,1).index]=new ce(L.WHITE,H.GOLD),this.squares[new z(4,1).index]=new ce(L.WHITE,H.GOLD),this.squares[new z(3,9).index]=new ce(L.BLACK,H.SILVER),this.squares[new z(7,9).index]=new ce(L.BLACK,H.SILVER),this.squares[new z(7,1).index]=new ce(L.WHITE,H.SILVER),this.squares[new z(3,1).index]=new ce(L.WHITE,H.SILVER),this.squares[new z(2,9).index]=new ce(L.BLACK,H.KNIGHT),this.squares[new z(8,9).index]=new ce(L.BLACK,H.KNIGHT),this.squares[new z(8,1).index]=new ce(L.WHITE,H.KNIGHT),this.squares[new z(2,1).index]=new ce(L.WHITE,H.KNIGHT),this.squares[new z(1,9).index]=new ce(L.BLACK,H.LANCE),this.squares[new z(9,9).index]=new ce(L.BLACK,H.LANCE),this.squares[new z(9,1).index]=new ce(L.WHITE,H.LANCE),this.squares[new z(1,1).index]=new ce(L.WHITE,H.LANCE),this.squares[new z(1,7).index]=new ce(L.BLACK,H.PAWN),this.squares[new z(2,7).index]=new ce(L.BLACK,H.PAWN),this.squares[new z(3,7).index]=new ce(L.BLACK,H.PAWN),this.squares[new z(4,7).index]=new ce(L.BLACK,H.PAWN),this.squares[new z(5,7).index]=new ce(L.BLACK,H.PAWN),this.squares[new z(6,7).index]=new ce(L.BLACK,H.PAWN),this.squares[new z(7,7).index]=new ce(L.BLACK,H.PAWN),this.squares[new z(8,7).index]=new ce(L.BLACK,H.PAWN),this.squares[new z(9,7).index]=new ce(L.BLACK,H.PAWN),this.squares[new z(1,3).index]=new ce(L.WHITE,H.PAWN),this.squares[new z(2,3).index]=new ce(L.WHITE,H.PAWN),this.squares[new z(3,3).index]=new ce(L.WHITE,H.PAWN),this.squares[new z(4,3).index]=new ce(L.WHITE,H.PAWN),this.squares[new z(5,3).index]=new ce(L.WHITE,H.PAWN),this.squares[new z(6,3).index]=new ce(L.WHITE,H.PAWN),this.squares[new z(7,3).index]=new ce(L.WHITE,H.PAWN),this.squares[new z(8,3).index]=new ce(L.WHITE,H.PAWN),this.squares[new z(9,3).index]=new ce(L.WHITE,H.PAWN),e){default:case"standard":return;case"handicapLance":this.squares[new z(1,1).index]=null;return;case"handicapRightLance":this.squares[new z(9,1).index]=null;return;case"handicapBishop":this.squares[new z(2,2).index]=null;return;case"handicapRook":this.squares[new z(8,2).index]=null;return;case"handicapRookLance":this.squares[new z(8,2).index]=null,this.squares[new z(1,1).index]=null;return;case"handicap2Pieces":this.squares[new z(8,2).index]=null,this.squares[new z(2,2).index]=null;return;case"handicap4Pieces":this.squares[new z(8,2).index]=null,this.squares[new z(2,2).index]=null,this.squares[new z(1,1).index]=null,this.squares[new z(9,1).index]=null;return;case"handicap6Pieces":this.squares[new z(8,2).index]=null,this.squares[new z(2,2).index]=null,this.squares[new z(1,1).index]=null,this.squares[new z(2,1).index]=null,this.squares[new z(8,1).index]=null,this.squares[new z(9,1).index]=null;return;case"handicap8Pieces":this.squares[new z(8,2).index]=null,this.squares[new z(2,2).index]=null,this.squares[new z(1,1).index]=null,this.squares[new z(2,1).index]=null,this.squares[new z(3,1).index]=null,this.squares[new z(7,1).index]=null,this.squares[new z(8,1).index]=null,this.squares[new z(9,1).index]=null;return}}get sfen(){let e="",x=0;for(let n=0;n<9;n+=1){for(let i=0;i<9;i+=1){const s=this.at(z.newByXY(i,n));s?(x&&(e+=x,x=0),e+=s.sfen):x+=1}x&&(e+=x,x=0),n!==8&&(e+="/")}return e}resetBySFEN(e){if(!Cs.isValidSFEN(e))return!1;this.clear();const x=e.split("/");for(let n=0;n<9;n+=1){let i=0;for(let s=0;s{const i=this.at(n);if(i&&x.equals(i))return!0})}hasPower(e,x,n){return!!$5.find(i=>{let s=0;for(let o=e.neighbor(i);o.valid&&(s+=1,!(n&&n.filled&&o.equals(n.filled)));o=o.neighbor(i)){if(n&&n.ignore&&o.equals(n.ignore))continue;const r=this.at(o);if(r){if(r.color!==x)return!1;const a=ms(i),E=h8(r,a);return E===Qn.LONG||E===Qn.SHORT&&s===1}}return!1})}isChecked(e,x){const n=this.findKing(e);return n?this.hasPower(n,Tt(e),{filled:x&&x.filled,ignore:x&&x.ignore}):!1}static isValidSFEN(e){const x=e.split("/");if(x.length!==9)return!1;for(let n=0;n<9;n+=1){let i=0;for(let s=0;s{this.squares[x.index]=e.at(x)})}}function dx(t,e){return t===0?"":(t!==1?t:"")+e.sfen}class E0{constructor(){_(this,"pieces");this.pieces=new Map,this.pieces.set(H.PAWN,0),this.pieces.set(H.LANCE,0),this.pieces.set(H.KNIGHT,0),this.pieces.set(H.SILVER,0),this.pieces.set(H.GOLD,0),this.pieces.set(H.BISHOP,0),this.pieces.set(H.ROOK,0)}get counts(){return[{type:H.ROOK,count:this.count(H.ROOK)},{type:H.BISHOP,count:this.count(H.BISHOP)},{type:H.GOLD,count:this.count(H.GOLD)},{type:H.SILVER,count:this.count(H.SILVER)},{type:H.KNIGHT,count:this.count(H.KNIGHT)},{type:H.LANCE,count:this.count(H.LANCE)},{type:H.PAWN,count:this.count(H.PAWN)}]}count(e){return this.pieces.get(e)}set(e,x){this.pieces.set(e,x)}add(e,x){let n=this.pieces.get(e);return n+=x,this.pieces.set(e,n),n}reduce(e,x){let n=this.pieces.get(e);return n-=x,this.pieces.set(e,n),n}forEach(e){e(H.PAWN,this.pieces.get(H.PAWN)),e(H.LANCE,this.pieces.get(H.LANCE)),e(H.KNIGHT,this.pieces.get(H.KNIGHT)),e(H.SILVER,this.pieces.get(H.SILVER)),e(H.GOLD,this.pieces.get(H.GOLD)),e(H.BISHOP,this.pieces.get(H.BISHOP)),e(H.ROOK,this.pieces.get(H.ROOK))}get sfenBlack(){return this.formatSFEN(L.BLACK)}get sfenWhite(){return this.formatSFEN(L.WHITE)}formatSFEN(e){let x="";return x+=dx(this.count(H.ROOK),new ce(e,H.ROOK)),x+=dx(this.count(H.BISHOP),new ce(e,H.BISHOP)),x+=dx(this.count(H.GOLD),new ce(e,H.GOLD)),x+=dx(this.count(H.SILVER),new ce(e,H.SILVER)),x+=dx(this.count(H.KNIGHT),new ce(e,H.KNIGHT)),x+=dx(this.count(H.LANCE),new ce(e,H.LANCE)),x+=dx(this.count(H.PAWN),new ce(e,H.PAWN)),x===""?"-":x}static formatSFEN(e,x){const n=e.sfenBlack,i=x.sfenWhite;return n==="-"&&i==="-"?"-":i==="-"?n:n==="-"?i:n+i}static isValidSFEN(e){return e==="-"?!0:!!e.match(/^(?:[0-9]*[PLNSGBRplnsgbr])*$/)}static parseSFEN(e){if(e==="-")return{black:new E0,white:new E0};if(!e.match(/^(?:[0-9]*[PLNSGBRplnsgbr])*$/))return null;const x=e.match(/([0-9]*[PLNSGBRplnsgbr])/g),n=new E0,i=new E0;for(let s=0;s=2&&(r=Number(o.substring(0,o.length-1)));const a=ce.newBySFEN(o[o.length-1]);a.color===L.BLACK?n.add(a.type,r):i.add(a.type,r)}return{black:n,white:i}}copyFrom(e){e.pieces.forEach((x,n)=>{this.pieces.set(n,x)})}}const j5={black:{pawn:{1:!0},lance:{1:!0},knight:{1:!0,2:!0}},white:{pawn:{9:!0},lance:{9:!0},knight:{9:!0,8:!0}}};function rE(t,e,x){const n=j5[t][e];return n?n[x]:!1}function Fs(t,e){return t===L.BLACK?e<=3:e>=7}function q5(t,e,x){for(let n=1;n<=9;n+=1){const i=e.at(new z(x,n));if(i&&i.type===H.PAWN&&i.color===t)return!0}return!1}class It{constructor(){_(this,"_board",new Cs);_(this,"_color",L.BLACK);_(this,"_blackHand",new E0);_(this,"_whiteHand",new E0)}get board(){return this._board}get color(){return this._color}get blackHand(){return this._blackHand}get whiteHand(){return this._whiteHand}reset(e){switch(this._board.reset(e),this._blackHand=new E0,this._whiteHand=new E0,e){case Ce.STANDARD:case Ce.EMPTY:case Ce.TSUME_SHOGI:case Ce.TSUME_SHOGI_2KINGS:this._color=L.BLACK;break;case Ce.HANDICAP_LANCE:case Ce.HANDICAP_RIGHT_LANCE:case Ce.HANDICAP_BISHOP:case Ce.HANDICAP_ROOK:case Ce.HANDICAP_ROOK_LANCE:case Ce.HANDICAP_2PIECES:case Ce.HANDICAP_4PIECES:case Ce.HANDICAP_6PIECES:case Ce.HANDICAP_8PIECES:this._color=L.WHITE;break}(e===Ce.TSUME_SHOGI||e===Ce.TSUME_SHOGI_2KINGS)&&(this._whiteHand.set(H.PAWN,18),this._whiteHand.set(H.LANCE,4),this._whiteHand.set(H.KNIGHT,4),this._whiteHand.set(H.SILVER,4),this._whiteHand.set(H.GOLD,4),this._whiteHand.set(H.BISHOP,2),this._whiteHand.set(H.ROOK,2))}hand(e){return this._hand(e)}_hand(e){return e===L.BLACK?this._blackHand:this._whiteHand}get checked(){return this._board.isChecked(this.color)}createMove(e,x){let n;if(e instanceof z){const s=this._board.at(e);if(!s)return null;n=s.type}else n=e;const i=this._board.at(x);return new tt(e,x,!1,this.color,n,i?i.type:null)}createMoveByUSI(e){const x=d8(e);if(!x)return null;let n=this.createMove(x.from,x.to);return n?(x.promote&&(n=n.withPromote()),n):null}isPawnDropMate(e){if(e.from instanceof z||e.pieceType!==H.PAWN)return!1;const x=e.to.neighbor(e.color===L.BLACK?Ht.UP:Ht.DOWN),n=this.board.at(x);return!n||n.type!==H.KING||n.color===e.color||z5(n).find(s=>{const o=x.neighbor(s);if(!o.valid)return!1;const r=this.board.at(o);return r&&r.color==n.color?!1:!this.board.hasPower(o,e.color,{filled:e.to})})?!1:!this.board.listSquaresByColor(n.color).find(s=>!s.equals(x)&&this.isMovable(s,e.to)&&!this.board.isChecked(n.color,{filled:e.to,ignore:s}))}listAttackersByPiece(e,x){return this.board.listSquaresByPiece(x).filter(n=>this.isMovable(n,e))}isValidMove(e){if(e.from instanceof z){const x=this._board.at(e.from);if(!x||x.color!==this.color||!this.isMovable(e.from,e.to))return!1;const n=this._board.at(e.to);if(n&&n.color===this.color)return!1;if(e.promote){if(!x.isPromotable()||!Fs(this.color,e.from.rank)&&!Fs(this.color,e.to.rank))return!1}else if(rE(this.color,x.type,e.to.rank))return!1;if(e.pieceType!==H.KING?this._board.isChecked(this.color,{filled:e.to,ignore:e.from}):this._board.hasPower(e.to,Tt(this.color),{ignore:e.from}))return!1}else if(e.promote||e.color!==this.color||this.hand(this.color).count(e.from)===0||this._board.at(e.to)||rE(this.color,e.from,e.to.rank)||e.from===H.PAWN&&q5(this.color,this._board,e.to.file)||this._board.isChecked(this.color,{filled:e.to})||this.isPawnDropMate(e))return!1;return!0}doMove(e,x){if(!(x&&x.ignoreValidation)&&!this.isValidMove(e))return!1;if(e.from instanceof z){const n=this._board.at(e.from),i=this._board.at(e.to);this._board.remove(e.from),this._board.set(e.to,e.promote?n.promoted():n),i&&i.type!==H.KING&&this._hand(this.color).add(i.unpromoted().type,1)}else this._hand(this.color).reduce(e.from,1),this._board.set(e.to,new ce(this.color,e.from));return this._color=Tt(this.color),!0}undoMove(e){if(this._color=Tt(this.color),e.from instanceof z)if(this._board.set(e.from,new ce(this.color,e.pieceType)),e.capturedPieceType){const x=new ce(Tt(this.color),e.capturedPieceType);this._board.set(e.to,x),x.type!==H.KING&&this._hand(this.color).reduce(x.unpromoted().type,1)}else this._board.remove(e.to);else this._hand(this.color).add(e.from,1),this._board.remove(e.to)}isValidEditing(e,x){if(e instanceof z){const n=this._board.at(e);if(!n)return!1;if(x instanceof z){if(e.equals(x))return!1}else if(n.type===H.KING)return!1}else{if(!e.color||this.hand(e.color).count(e.type)===0)return!1;if(x instanceof z){if(this._board.at(x))return!1}else if(e.color===x)return!1}return!0}edit(e){if(e.move){if(!this.isValidEditing(e.move.from,e.move.to))return!1;if(!(e.move.from instanceof z))this._hand(e.move.from.color).reduce(e.move.from.type,1),e.move.to instanceof z?this._board.set(e.move.to,e.move.from):this._hand(e.move.to).add(e.move.from.type,1);else if(e.move.to instanceof z)this._board.swap(e.move.from,e.move.to);else{const x=this._board.remove(e.move.from);this._hand(e.move.to).add(x.unpromoted().type,1)}}if(e.rotate){const x=this._board.at(e.rotate);x&&this._board.set(e.rotate,x.rotate())}return!0}get sfen(){return this.getSFEN(1)}getSFEN(e){let x=`${this._board.sfen} ${T5(this.color)} `;return x+=E0.formatSFEN(this._blackHand,this._whiteHand),x+=" "+e,x}resetBySFEN(e){if(!It.isValidSFEN(e))return!1;const x=e.split(" ");x[0]==="sfen"&&x.shift(),this._board.resetBySFEN(x[0]),this._color=I5(x[1]);const n=E0.parseSFEN(x[2]);return this._blackHand=n.black,this._whiteHand=n.white,!0}setColor(e){this._color=e}static isValidSFEN(e){const x=e.split(" ");return x.length===5&&x[0]==="sfen"&&x.shift(),!(x.length!==4||!Cs.isValidSFEN(x[0])||!P5(x[1])||!E0.isValidSFEN(x[2])||!x[3].match(/[0-9]+/))}static newBySFEN(e){const x=new It;return x.resetBySFEN(e)?x:null}isMovable(e,x){const n=x.x-e.x,i=x.y-e.y,{direction:s,distance:o,ok:r}=B8(n,i);if(!r)return!1;const a=this._board.at(e);if(!a)return!1;switch(h8(a,s)){default:return!1;case Qn.SHORT:return o===1;case Qn.LONG:{const E=G5[s];for(let l=e.neighbor(E.x,E.y);l.valid;l=l.neighbor(E.x,E.y)){if(l.equals(x))return!0;if(this._board.at(l))return!1}return!1}}}copyFrom(e){this._board.copyFrom(e._board),this._color=e.color,this._blackHand.copyFrom(e._blackHand),this._whiteHand.copyFrom(e._whiteHand)}clone(){const e=new It;return e.copyFrom(this),e}}function Y5(t){const e={pawn:0,lance:0,knight:0,silver:0,gold:0,bishop:0,rook:0,king:0,promPawn:0,promLance:0,promKnight:0,promSilver:0,horse:0,dragon:0};return z.all.forEach(x=>{const n=t.board.at(x);n&&(e[n.type]+=1)}),t.blackHand.forEach((x,n)=>{e[x]+=n}),t.whiteHand.forEach((x,n)=>{e[x]+=n}),e}function J5(t){const e=Y5(t);return{pawn:18-e.pawn-e.promPawn,lance:4-e.lance-e.promLance,knight:4-e.knight-e.promKnight,silver:4-e.silver-e.promSilver,gold:4-e.gold,bishop:2-e.bishop-e.horse,rook:2-e.rook-e.dragon,king:2-e.king,promPawn:0,promLance:0,promKnight:0,promSilver:0,horse:0,dragon:0}}const X5={"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9},Z5={一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9,十:10,十一:11,十二:12,十三:13,十四:14,十五:15,十六:16,十七:17,十八:18},Q5={1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9},eh={王:H.KING,玉:H.KING,飛:H.ROOK,龍:H.DRAGON,竜:H.DRAGON,角:H.BISHOP,馬:H.HORSE,金:H.GOLD,銀:H.SILVER,成銀:H.PROM_SILVER,全:H.PROM_SILVER,桂:H.KNIGHT,成桂:H.PROM_KNIGHT,圭:H.PROM_KNIGHT,香:H.LANCE,成香:H.PROM_LANCE,杏:H.PROM_LANCE,歩:H.PAWN,と:H.PROM_PAWN};function f8(t){return X5[t]}function xo(t){return Z5[t]}function Ds(t){return Q5[t]}function no(t){return eh[t]}const p8=["一","二","三","四","五","六","七","八","九","十","十一","十二","十三","十四","十五","十六","十七","十八"],th=["1","2","3","4","5","6","7","8","9"];function xh(t){return p8[t-1]}function g8(t){return th[t-1]}function Zr(t){return p8[t-1]}const nh={king:"玉",rook:"飛",dragon:"龍",bishop:"角",horse:"馬",gold:"金",silver:"銀",promSilver:"成銀",knight:"桂",promKnight:"成桂",lance:"香",promLance:"成香",pawn:"歩",promPawn:"と"};function m8(t){return nh[t]}const ih={king:"玉",rook:"飛",dragon:"龍",bishop:"角",horse:"馬",gold:"金",silver:"銀",promSilver:"全",knight:"桂",promKnight:"圭",lance:"香",promLance:"杏",pawn:"歩",promPawn:"と"};function rr(t){return ih[t]}const sh={start:"開始局面",resign:"投了",interrupt:"中断",impass:"持将棋",draw:"引き分け",repetitionDraw:"千日手",mate:"詰み",timeout:"切れ負け",foulWin:"反則勝ち",foulLose:"反則負け",enteringOfKing:"入玉",winByDefault:"不戦勝",loseByDefault:"不戦敗",sealedMove:"封じ手"};function C8(t){return sh[t]}function Rx(t,e,x){let n="";switch(e.color){case L.BLACK:n+=x!=null&&x.compatible?"▲":"☗";break;case L.WHITE:n+=x!=null&&x.compatible?"△":"☖";break}x!=null&&x.prev&&x.prev.to.equals(e.to)?n+="同 ":(n+=g8(e.to.file),n+=Zr(e.to.rank)),n+=m8(e.pieceType);const i=new ce(e.color,e.pieceType),s=t.listAttackersByPiece(e.to,i).filter(o=>!(e.from instanceof z)||!o.equals(e.from));if(e.from instanceof z){let o=e.from.directionTo(e.to);o=e.color===L.BLACK?o:ms(o);const r=Zi(o),a=Qi(o),E=s.map(B=>{const p=B.directionTo(e.to);return e.color===L.BLACK?p:ms(p)}),l=E.filter(B=>Qi(B)==a).map(B=>Zi(B)),A=E.filter(B=>Zi(B)==r).map(B=>Qi(B));let h=!1;if(A.length)if(e.pieceType===H.HORSE||e.pieceType===H.DRAGON)a===Qt.LEFT||a===Qt.NONE&&A[0]===Qt.RIGHT?n+="右":(a===Qt.RIGHT||a===Qt.NONE&&A[0]===Qt.LEFT)&&(n+="左");else switch(a){case Qt.LEFT:n+="右";break;case Qt.NONE:n+="直",h=!0;break;case Qt.RIGHT:n+="左";break}if(!h&&(l.length||!A.length&&s.length))switch(r){case kx.DOWN:n+="引";break;case kx.NONE:n+="寄";break;case kx.UP:n+="上";break}e.promote?n+="成":e.from instanceof z&&i.isPromotable()&&(Fs(e.color,e.from.rank)||Fs(e.color,e.to.rank))&&(n+="不成")}else s.length&&(n+="打");return n}function oh(t,e){let x="",n;const i=t.clone();for(const s of e)x+=`${Rx(i,s,{prev:n,compatible:!0})}`,i.doMove(s,{ignoreValidation:!0}),n=s;return x}const rh=/^[▲△☗☖]?([123456789][一二三四五六七八九]|同)(王|玉|飛|龍|竜|角|馬|金|銀|成銀|全|桂|成桂|圭|香|成香|杏|歩|と)(左|直|右|)(引|寄|上|)(成|不成|打|)(\([1-9][1-9]\)|)/;function ah(t,e){const x=e.replaceAll(/[\s\u3000]/g,""),n=[];let i=0;for(let r=1;r<=x.length;r++){const a=x[r];(!a||a==="▲"||a==="△"||a==="☗"||a==="☖")&&(n.push(x.substring(i,r)),i=r)}const s=t.clone(),o=[];for(const r of n){const a=rh.exec(r);if(!a)break;const E=a[1],l=no(a[2]),A=a[3],h=a[4],B=a[5],p=a[6];let f;if(E.startsWith("同"))f=o[o.length-1].to;else{const S=f8(E[0]),I=xo(E[1]);f=new z(S,I)}let g;if(B==="打")g=l;else if(p){const S=Ds(p[1]),I=Ds(p[2]);g=new z(S,I)}else{const S=s.listAttackersByPiece(f,new ce(s.color,l)).filter(I=>{let y=I.directionTo(f);y=s.color===L.BLACK?y:ms(y);const v=Zi(y),D=Qi(y);return!(h.indexOf("引")>=0&&v!==kx.DOWN||h.indexOf("寄")>=0&&v!==kx.NONE||h.indexOf("上")>=0&&v!==kx.UP||A.indexOf("左")>=0&&D!==Qt.RIGHT||A.indexOf("直")>=0&&D!==Qt.NONE||A.indexOf("右")>=0&&D!==Qt.LEFT)});if(S.length===1)g=S[0];else if(S.length===0&&s.hand(s.color).count(l)!==0)g=l;else break}let C=s.createMove(g,f);if(!C||(B==="成"&&(C=C.withPromote()),!s.doMove(C,{ignoreValidation:!0})))break;o.push(C)}return o}function F8(t){return _8(Math.floor(t/1e3))}function D8(t){return v8(Math.floor(t/1e3))}function _8(t){const e=Math.floor(t/3600),x=Math.floor((t-e*3600)/60),n=t%60;return e+":"+String(x).padStart(2,"0")+":"+String(n).padStart(2,"0")}function v8(t){const e=Math.floor(t/60),x=t%60;return String(e).padStart(2," ")+":"+String(x).padStart(2,"0")}var J=(t=>(t.TITLE="title",t.BLACK_NAME="blackName",t.WHITE_NAME="whiteName",t.START_DATETIME="startDatetime",t.END_DATETIME="endDatetime",t.DATE="date",t.TOURNAMENT="tournament",t.STRATEGY="strategy",t.TIME_LIMIT="timeLimit",t.TIME_SPENT="timeSpent",t.PLACE="place",t.POSTED_ON="postedOn",t.NOTE="note",t.BLACK_SHORT_NAME="blackShortName",t.WHITE_SHORT_NAME="whiteShortName",t.OPUS_NO="opusNo",t.OPUS_NAME="opusName",t.AUTHOR="author",t.PUBLISHED_BY="publishedBy",t.PUBLISHED_AT="publishedAt",t.SOURCE="source",t.LENGTH="length",t.INTEGRITY="integrity",t.CATEGORY="category",t.AWARD="award",t))(J||{});class _s{constructor(){_(this,"standard",new Map);_(this,"custom",new Map)}get standardMetadataKeys(){return this.standard.keys()}getStandardMetadata(e){return this.standard.get(e)}setStandardMetadata(e,x){x?this.standard.set(e,x):this.standard.delete(e)}get customMetadataKeys(){return this.custom.keys()}getCustomMetadata(e){return this.custom.get(e)}setCustomMetadata(e,x){x?this.custom.set(e,x):this.custom.delete(e)}}var Ee=(t=>(t.START="start",t.INTERRUPT="interrupt",t.RESIGN="resign",t.IMPASS="impass",t.DRAW="draw",t.REPETITION_DRAW="repetitionDraw",t.MATE="mate",t.TIMEOUT="timeout",t.FOUL_WIN="foulWin",t.FOUL_LOSE="foulLose",t.ENTERING_OF_KING="enteringOfKing",t.WIN_BY_DEFAULT="winByDefault",t.LOSE_BY_DEFAULT="loseByDefault",t.SEALED_MOVE="sealedMove",t))(Ee||{});class qx{constructor(e,x,n,i,s,o,r,a){_(this,"next",null);_(this,"branch",null);_(this,"comment","");_(this,"customData");_(this,"elapsedMs",0);_(this,"totalElapsedMs",0);this.ply=e,this.prev=x,this.branchIndex=n,this.activeBranch=i,this.nextColor=s,this.move=o,this.isCheck=r,this.displayText=a}get timeText(){const e=D8(this.elapsedMs),x=F8(this.totalElapsedMs);return`${e} / ${x}`}get hasBranch(){return!!this.prev&&!!this.prev.next&&!!this.prev.next.branch}get isFirstBranch(){return!this.prev||this.prev.next===this}get isLastMove(){if(!this.next)return!0;for(let e=this.next;e;e=e.branch)if(e.move instanceof tt)return!1;return!0}updateTotalElapsedMs(){this.totalElapsedMs=this.elapsedMs,this.prev&&this.prev.prev&&(this.totalElapsedMs+=this.prev.prev.totalElapsedMs)}setElapsedMs(e){this.elapsedMs=e,this.updateTotalElapsedMs();let x=this.next;const n=[];for(;x;)x.updateTotalElapsedMs(),x.branch&&n.push(x.branch),x.next?x=x.next:x=n.pop()||null}static newRootEntry(e){return new qx(0,null,0,!0,e,"start",!1,"開始局面")}}class yt{constructor(e){_(this,"metadata");_(this,"_initialPosition");_(this,"_position");_(this,"_first");_(this,"_current");_(this,"repetitionCounts",{});_(this,"repetitionStart",{});_(this,"onChangePosition",()=>{});this.metadata=new _s,this._initialPosition=e?e.clone():new It,this._position=this.initialPosition.clone(),this._first=qx.newRootEntry(this._initialPosition.color),this._current=this._first,this.incrementRepetition()}get initialPosition(){return this._initialPosition}get position(){return this._position}get first(){return this._first}get current(){return this._current}get moves(){const e=this.movesBefore;for(let x=this._current.next;x;x=x.next){for(;!x.activeBranch;)x=x.branch;e.push(x)}return e}get movesBefore(){return this._movesBefore}get _movesBefore(){const e=new Array;e.unshift(this._current);for(let x=this._current.prev;x;x=x.prev)e.unshift(x);return e}get length(){let e=this._current.ply;for(let x=this._current.next;x;x=x.next){for(;!x.activeBranch;)x=x.branch;e=x.ply}return e}get branchBegin(){return this._current.prev?this._current.prev.next:this._current}clear(e){this.metadata=new _s,e&&(this._initialPosition=e.clone()),this._position=this.initialPosition.clone(),this._first=qx.newRootEntry(this._initialPosition.color),this._current=this._first,this.repetitionCounts={},this.repetitionStart={},this.incrementRepetition(),this.onChangePosition()}goBack(){return this._goBack()?(this.onChangePosition(),!0):!1}_goBack(){return this._current.prev?(this._current.move instanceof tt&&(this.decrementRepetition(),this._position.undoMove(this._current.move)),this._current=this._current.prev,!0):!1}goForward(){return this._goForward()?(this.onChangePosition(),!0):!1}_goForward(){if(this._current.next){for(this._current=this._current.next;!this._current.activeBranch;)this._current=this._current.branch;return this._current.move instanceof tt&&(this._position.doMove(this._current.move,{ignoreValidation:!0}),this.incrementRepetition()),!0}return!1}goto(e){for(;ethis._current.ply&&this._goForward(););this.onChangePosition()}resetAllBranchSelection(){this._forEach(e=>{e.activeBranch=e.isFirstBranch})}switchBranchByIndex(e){if(this.current.branchIndex===e)return!0;if(!this._current.prev)return!1;let x=!1;for(let n=this._current.prev.next;n;n=n.branch)n.branchIndex===e?(n.activeBranch=!0,this._current.move instanceof tt&&(this.decrementRepetition(),this._position.undoMove(this._current.move)),this._current=n,this._current.move instanceof tt&&(this._position.doMove(this._current.move,{ignoreValidation:!0}),this.incrementRepetition()),x=!0):n.activeBranch=!1;return x&&this.onChangePosition(),x}append(e,x){const n=this.current.move instanceof tt?this.current.move:void 0,i=e instanceof tt?Rx(this.position,e,{prev:n}):C8(e);let s=!1;if(e instanceof tt){if(!this._position.doMove(e,x))return!1;this.incrementRepetition(),s=this.position.checked}if(this._current!==this.first&&!(this._current.move instanceof tt)&&this.goBack(),!this._current.next)return this._current.next=new qx(this._current.ply+1,this._current,0,!0,this.position.color,e,s,i),this._current=this._current.next,this._current.setElapsedMs(0),this.onChangePosition(),!0;let o;for(o=this._current.next;o;o=o.branch)o.activeBranch=!1;let r=this._current.next;for(o=this._current.next;o;o=o.branch){if(o.move instanceof tt&&e instanceof tt&&e.equals(o.move)||e===o.move)return this._current=o,this._current.activeBranch=!0,this.onChangePosition(),!0;r=o}return this._current=new qx(this._current.ply+1,this._current,r.branchIndex+1,!0,this.position.color,e,s,i),this._current.setElapsedMs(0),r.branch=this._current,this.onChangePosition(),!0}swapWithNextBranch(){return this._current.branch?yt.swapWithPreviousBranch(this._current.branch):!1}swapWithPreviousBranch(){return yt.swapWithPreviousBranch(this._current)}static swapWithPreviousBranch(e){const x=e.prev;if(!x||!x.next||x.next==e)return!1;if(x.next.branch===e){const n=x.next;return n.branch=e.branch,e.branch=n,x.next=e,[e.branchIndex,n.branchIndex]=[n.branchIndex,e.branchIndex],!0}for(let n=x.next;n.branch;n=n.branch)if(n.branch.branch===e){const i=n.branch;return i.branch=e.branch,e.branch=i,n.branch=e,[e.branchIndex,i.branchIndex]=[i.branchIndex,e.branchIndex],!0}return!1}removeCurrentMove(){const e=this._current;if(!this.goBack()){this._current.next=null;return}if(this._current.next===e)this._current.next=e.branch;else for(let n=this._current.next;n;n=n.branch)if(n.branch===e){n.branch=e.branch;break}let x=0;for(let n=this._current.next;n;n=n.branch)n.branchIndex=x,x+=1;this._current.next&&(this._current.next.activeBranch=!0),this.onChangePosition()}removeNextMove(){this._current.next=null}incrementRepetition(){const e=this.position.sfen;this.repetitionCounts[e]?this.repetitionCounts[e]+=1:(this.repetitionCounts[e]=1,this.repetitionStart[e]=this.current.ply)}decrementRepetition(){const e=this.position.sfen;this.repetitionCounts[e]-=1,this.repetitionCounts[e]===0&&(delete this.repetitionCounts[e],delete this.repetitionStart[e])}get repetition(){return this.repetitionCounts[this.position.sfen]>=4}get perpetualCheck(){if(!this.repetition)return null;const e=this.position.sfen,x=this.repetitionStart[e];let n=!0,i=!0,s=this.position.color;for(let o=this.current;o.ply>=x;o=o.prev)s=Tt(s),!o.isCheck&&(s===L.BLACK?n=!1:i=!1);return n?L.BLACK:i?L.WHITE:null}get usi(){let e="position sfen "+this.initialPosition.sfen+" moves";return this.movesBefore.forEach(x=>{x.move instanceof tt&&(e+=" "+x.move.usi)}),e}get usiAll(){let e=this.usi;for(let x=this._current.next;x;x=x.next){for(;!x.activeBranch;)x=x.branch;x.move instanceof tt&&(e+=" "+x.move.usi)}return e}get sfen(){return this.position.getSFEN(this._current.ply+1)}forEach(e){this._forEach(e)}_forEach(e){let x=this._first;const n=[];for(;x;)e(x),x.branch&&n.push(x.branch),x.next?x=x.next:x=n.pop()||null}on(e,x){switch(e){case"changePosition":this.onChangePosition=x;break}}static newByUSI(e){const x="position startpos ",n="position sfen ",i="startpos ",s="sfen ",o="moves ";return e.startsWith(x)?yt.newByUSIFromMoves(new It,e.slice(x.length)):e.startsWith(n)?yt.newByUSIFromSFEN(e.slice(n.length)):e.startsWith(i)?yt.newByUSIFromMoves(new It,e.slice(i.length)):e.startsWith(s)?yt.newByUSIFromSFEN(e.slice(s.length)):e.startsWith(o)?yt.newByUSIFromMoves(new It,e):new Dn(e)}static newByUSIFromSFEN(e){const x=e.split(" ");if(x.length<4)return new Dn(e);const n=It.newBySFEN(x.slice(0,4).join(" "));return n?yt.newByUSIFromMoves(n,x.slice(4).join(" ")):new Dn(e)}static newByUSIFromMoves(e,x){const n=new yt(e);if(x.length===0)return n;const i=x.split(" ");if(i[0]!=="moves")return new Dn(x);for(let s=1;s{n>=1&&(e+=rr(x),n>=2&&(e+=xh(n)),e+=" ")}),e}function b8(t,e){let x="";const n=e.returnCode?e.returnCode:` -`;return x+="# KIF形式棋譜ファイル Generated by Electron Shogi"+n,x+=mh(t.metadata,e),x+=Ch(t.initialPosition,e),x+="手数----指手---------消費時間--"+n,t.forEach(i=>{if(i.ply!==0){i.isFirstBranch||(x+=n,x+="変化:"+i.ply+"手"+n),x+=i.ply+" ",i.move instanceof tt?x+=Fh(i.move):x+=gh[i.move];const s=D8(i.elapsedMs),o=F8(i.totalElapsedMs);x+=` (${s}/${o})`,i.isFirstBranch&&i.hasBranch&&(x+="+"),x+=n}if(i.comment.length!==0){const s=i.comment.endsWith(` -`)?i.comment.slice(0,-1):i.comment;x+="*"+s.replaceAll(` -`,n+"*")+n}}),x}const Ti=[{pattern:/^V/,type:0,sectionType:0},{pattern:/^'\*(.+)$/,type:1,sectionType:2},{pattern:/^'(.+)$/,type:2,sectionType:2},{pattern:/^N\+(.+)$/,type:3,sectionType:0},{pattern:/^N-(.+)$/,type:4,sectionType:0},{pattern:/^\$([^:]+):(.+)$/,type:5,sectionType:0},{pattern:/^PI([1-9]{2}[A-Z]{2})*$/,type:6,sectionType:0},{pattern:/^P[1-9]( \* |[-+][A-Z][A-Z]){9}$/,type:7,sectionType:0},{pattern:/^P[-+]([0-9]{2}[A-Z]{2})*/,type:8,sectionType:0},{pattern:/^[-+]$/,type:9,sectionType:0},{pattern:/^[-+][0-9]{4}[A-Z]{2}/,type:10,sectionType:1},{pattern:/^%[-+A-Z_]+/,type:11,sectionType:1},{pattern:/^T([0-9]+)/,type:12,sectionType:1}];function Dh(t){const e=[],x=t.match(/^['N$]/)?[t]:t.split(",");for(const n of x)for(let i=0;i{e.blackHand.add(E,a[E])}):e.whiteHand.forEach(E=>{e.whiteHand.add(E,a[E])});return}const s=Number(i[0]),o=Number(i[1]),r=Qr[i.slice(2)];if(!r)return new to(i);s!==0&&o!==0?e.board.set(new z(s,o),new ce(x,r)):x===L.BLACK?e.blackHand.add(r,1):e.whiteHand.add(r,1)}}function y8(t,e){if((t[0]==="+"?L.BLACK:L.WHITE)!=e.color)return new o8(t);const n=Number(t[1]),i=Number(t[2]),s=Number(t[3]),o=Number(t[4]),r=Qr[t.slice(5,7)];if(!r)return new to(t);const a=n===0&&i===0?r:new z(n,i),E=new z(s,o);let l=e.createMove(a,E);if(!l)return new Zn(t);if(a instanceof z){const A=e.board.at(a);if(!A)return new sr(t);if(A.type!==r)if(A.promoted().type===r)l=l.withPromote();else return new sr(t)}return l}function Sh(t){switch(t){case"%CHUDAN":return Ee.INTERRUPT;case"%TORYO":return Ee.RESIGN;case"%JISHOGI":return Ee.IMPASS;case"%HIKIWAKE":return Ee.DRAW;case"%SENNICHITE":return Ee.REPETITION_DRAW;case"%TSUMI":return Ee.MATE;case"%TIME_UP":return Ee.TIMEOUT;case"%ILLEGAL_MOVE":return Ee.FOUL_LOSE;case"%KACHI":return Ee.ENTERING_OF_KING}}function wh(t,e){return y8(e,t)}function uE(t){const e=new _s,x=new yt,n=new It;n.reset(Ce.EMPTY);let i="",s=!1;const o=t.replace(/\r?\n\/(\r?\n[\s\S]*)?$/,"").split(/\r?\n/);for(const r of o)for(const a of Dh(r)){if(a.sectionType===0&&s||a.sectionType===1&&!s)return new Xr(a.line);switch(a.type){case 0:break;case 1:s?x.current.comment=ps(x.current.comment,a.args[0]):i=ps(i,a.args[0]);break;case 2:break;case 3:e.setStandardMetadata(J.BLACK_NAME,a.args[0]);break;case 4:e.setStandardMetadata(J.WHITE_NAME,a.args[0]);break;case 5:{const E=_h[a.args[0]];E?e.setStandardMetadata(E,a.args[1]):e.setCustomMetadata(a.args[0],a.args[1]);break}case 6:vh(a.line,n);break;case 7:{const E=bh(a.line,n);if(E)return E;break}case 8:{const E=yh(a.line,n);if(E)return E;break}case 9:a.line[0]==="+"?n.setColor(L.BLACK):n.setColor(L.WHITE),x.clear(n),x.first.comment=i,s=!0;break;case 10:{const E=y8(a.line,x.position);if(E instanceof Error)return E;x.append(E,{ignoreValidation:!0});break}case 11:{const E=Sh(a.line);E&&x.append(E,{ignoreValidation:!0});break}case 12:x.current.setElapsedMs(Number(a.args[0])*1e3);break}}return s||(x.clear(n),x.first.comment=i),x.goto(0),x.resetAllBranchSelection(),x.metadata=e,x}function Th(t,e){let x="";const n=e.returnCode?e.returnCode:` -`,i=t.getStandardMetadata(J.BLACK_NAME)||t.getStandardMetadata(J.BLACK_SHORT_NAME);i&&(x+="N+"+i+n);const s=t.getStandardMetadata(J.WHITE_NAME)||t.getStandardMetadata(J.WHITE_SHORT_NAME);s&&(x+="N-"+s+n);const o=t.getStandardMetadata(J.TOURNAMENT)||t.getStandardMetadata(J.TITLE)||t.getStandardMetadata(J.OPUS_NAME)||t.getStandardMetadata(J.PUBLISHED_BY);o&&(x+="$EVENT:"+o+n);const r=t.getStandardMetadata(J.PLACE);r&&(x+="$SITE:"+r+n);const a=t.getStandardMetadata(J.START_DATETIME)||t.getStandardMetadata(J.DATE);a&&(x+="$START_TIME:"+a.slice(10)+n);const E=t.getStandardMetadata(J.DATE);E&&(x+="$END_TIME:"+E.slice(10)+n);const l=t.getStandardMetadata(J.STRATEGY);return l&&(x+="$OPENING:"+l+n),x}const vs={king:"OU",rook:"HI",dragon:"RY",bishop:"KA",horse:"UM",gold:"KI",silver:"GI",promSilver:"NG",knight:"KE",promKnight:"NK",lance:"KY",promLance:"NY",pawn:"FU",promPawn:"TO"};function hE(t){let e="";return t.forEach((x,n)=>{for(let i=0;i=1;s-=1){const o=t.board.at(new z(s,i));o?o.color===L.BLACK?x+="+"+vs[o.type]:x+="-"+vs[o.type]:x+=" * "}x+=n}return x+="P+"+hE(t.blackHand)+n,x+="P-"+hE(t.whiteHand)+n,x+=(t.color===L.BLACK?"+":"-")+n,x}function BE(t){return t instanceof z?`${t.file}${t.rank}`:"00"}function S8(t){return(t.color===L.BLACK?"+":"-")+BE(t.from)+BE(t.to)+vs[t.promote?O5(t.pieceType):t.pieceType]}function Ih(t){switch(t){case Ee.INTERRUPT:return"%CHUDAN";case Ee.RESIGN:return"%TORYO";case Ee.IMPASS:return"%JISHOGI";case Ee.DRAW:return"%HIKIWAKE";case Ee.REPETITION_DRAW:return"%SENNICHITE";case Ee.MATE:return"%TSUMI";case Ee.TIMEOUT:return"%TIME_UP";case Ee.FOUL_LOSE:return"%ILLEGAL_MOVE";case Ee.ENTERING_OF_KING:return"%KACHI"}}function dE(t){return S8(t)}function w8(t,e){let x="";const n=e.returnCode?e.returnCode:` -`;return x+="' CSA形式棋譜ファイル Generated by Electron Shogi"+n,x+="V2.2"+n,x+=Th(t.metadata,e),x+=Ph(t.initialPosition,e),t.moves.forEach(i=>{if(i.ply===0)return;let s;i.move instanceof tt?s=S8(i.move):s=Ih(i.move),s&&(x+=s+n,x+="T"+Math.floor(i.elapsedMs/1e3)+n),i.comment&&(i.comment.endsWith(` -`)?i.comment.slice(0,-1):i.comment).split(` -`).forEach(r=>{x+="'*"+r+n})}),x}var Yx=(t=>(t[t.USI=0]="USI",t[t.SFEN=1]="SFEN",t[t.KIF=2]="KIF",t[t.CSA=3]="CSA",t))(Yx||{});function kh(t){if(t.startsWith("position sfen ")||t.startsWith("position startpos ")||t.startsWith("sfen ")||t.startsWith("startpos ")||t.startsWith("moves "))return 0;if(It.isValidSFEN(t))return 1;const e=/(^|\n)[#0-9開終棋手戦表持秒記消場掲備先後作発出完分受]/g,x=/(^|,|\n)[-+$%'VNPT]/g,n=t.match(e),i=t.match(x),s=n?n.length:0,o=i?i.length:0;return s>=o?2:3}function fE(t){return t instanceof to?new Error(`${d.invalidPieceName}: ${t.data}`):t instanceof o8?new Error(`${d.invalidTurn}: ${t.data}`):t instanceof Zn?new Error(`${d.invalidMove}: ${t.data}`):t instanceof r8?new Error(`${d.invalidMoveNumber}: ${t.data}`):t instanceof a8?new Error(`${d.invalidDestination}: ${t.data}`):t instanceof sr?new Error(`${d.pieceNotExists}: ${t.data}`):t instanceof Xr?new Error(`${d.invalidLine}: ${t.data}`):t instanceof E8?new Error(`${d.invalidHandicap}: ${t.data}`):t instanceof or?new Error(`${d.invalidBoard}: ${t.data}`):t instanceof l8?new Error(`${d.invalidHandPiece}: ${t.data}`):t instanceof Dn?new Error(`${d.invalidUSI}: ${t.data}`):t}function Mh(t){switch(t){case J.BLACK_NAME:return d.sente;case J.WHITE_NAME:return d.gote;case J.START_DATETIME:return d.startDateTime;case J.END_DATETIME:return d.endDateTime;case J.DATE:return d.gameDate;case J.TOURNAMENT:return d.tournament;case J.STRATEGY:return d.strategy;case J.TITLE:return d.gameTitle;case J.TIME_LIMIT:return d.timeLimit;case J.TIME_SPENT:return d.elapsedTime;case J.PLACE:return d.place;case J.POSTED_ON:return d.postedOn;case J.NOTE:return d.note;case J.BLACK_SHORT_NAME:return d.senteShortName;case J.WHITE_SHORT_NAME:return d.goteShortName;case J.OPUS_NO:return d.opusNo;case J.OPUS_NAME:return d.opusName;case J.AUTHOR:return d.author;case J.PUBLISHED_BY:return d.publishedBy;case J.PUBLISHED_AT:return d.publishedOn;case J.SOURCE:return d.source;case J.LENGTH:return d.numberOfMoves;case J.INTEGRITY:return d.integrity;case J.CATEGORY:return d.recordCategory;case J.AWARD:return d.award}}function Oh(t){b5(t),w5(t)}class pt{constructor(e,x){this.width=e,this.height=x}add(e){return new pt(this.width+e.width,this.height+e.height)}reduce(e){return new pt(this.width-e.width,this.height-e.height)}}class Rh{constructor(e,x,n,i){_(this,"x");_(this,"y");_(this,"width");_(this,"height");if(x&&n&&i)this.x=e,this.y=x,this.width=n,this.height=i;else{const s=JSON.parse(e);this.x=s.x,this.y=s.y,this.width=s.width,this.height=s.height}}get json(){return JSON.stringify({x:this.x,y:this.y,width:this.width,height:this.height})}}var lt=(t=>(t.DEBUG="debug",t.INFO="info",t.WARN="warn",t.ERROR="error",t))(lt||{}),yx=(t=>(t.STANDARD="standard",t.CHERRY_BLOSSOM="cherry-blossom",t.AUTUMN="autumn",t.SNOW="snow",t.DARK="dark",t))(yx||{}),d0=(t=>(t.NONE="none",t.COVER="cover",t.CONTAIN="contain",t.TILE="tile",t))(d0||{}),J0=(t=>(t.HITOMOJI="hitomoji",t.HITOMOJI_DARK="hitomojiDark",t.HITOMOJI_GOTHIC="hitomojiGothic",t.HITOMOJI_GOTHIC_DARK="hitomojiGothicDark",t.CUSTOM_IMAGE="custom-image",t))(J0||{}),xt=(t=>(t.LIGHT="light",t.WARM="warm",t.RESIN="resin",t.RESIN2="resin2",t.RESIN3="resin3",t.DARK="dark",t.GREEN="green",t.CHERRY_BLOSSOM="cherry-blossom",t.CUSTOM_IMAGE="custom-image",t))(xt||{}),qt=(t=>(t.STANDARD="standard",t.DARK="dark",t.GREEN="green",t.CHERRY_BLOSSOM="cherry-blossom",t.CUSTOM_IMAGE="custom-image",t))(qt||{}),Rn=(t=>(t.NONE="none",t.STANDARD="standard",t))(Rn||{}),Nn=(t=>(t.NONE="none",t.STANDARD="standard",t))(Nn||{}),Ln=(t=>(t.NONE="none",t.STANDARD="standard",t))(Ln||{}),ei=(t=>(t.SINGLE="single",t.DOUBLE="double",t))(ei||{}),Ne=(t=>(t.RECORD_INFO="recordInfo",t.COMMENT="comment",t.SEARCH="search",t.PV="pv",t.CHART="chart",t.PERCENTAGE_CHART="percentageChart",t.INVISIBLE="invisible",t))(Ne||{}),bs=(t=>(t.STRICT="strict",t.AUTO_DETECT="autoDetect",t))(bs||{}),ti=(t=>(t.BLACK="black",t.EACH="each",t))(ti||{}),xi=(t=>(t.ALL="all",t.ONLY_USER="onlyUser",t))(xi||{}),_n=(t=>(t.BOOK="book",t.GAME="game",t))(_n||{});function Nh(t,e){const x={...t,...e};switch(x.tabPaneType){case"double":switch(x.tab){case"comment":x.tab="recordInfo";break;case"chart":case"percentageChart":x.tab="pv";break}break}return t.topPaneHeightPercentage!==0&&t.topPaneHeightPercentage!==100&&(x.topPanePreviousHeightPercentage=t.topPaneHeightPercentage),Lh(x)||x}function ar(t){return{language:T0.JA,thema:"standard",backgroundImageType:"none",pieceImage:"hitomoji",boardImage:"resin2",pieceStandImage:"standard",boardLabelType:"standard",leftSideControlType:"standard",rightSideControlType:"standard",pieceVolume:30,clockVolume:30,clockPitch:500,clockSoundTarget:"onlyUser",boardFlipping:!1,tabPaneType:"double",tab:"recordInfo",tab2:"comment",topPaneHeightPercentage:60,topPanePreviousHeightPercentage:60,bottomLeftPaneWidthPercentage:60,textDecodingRule:"autoDetect",returnCode:(t==null?void 0:t.returnCode)||`\r -`,autoSaveDirectory:(t==null?void 0:t.autoSaveDirectory)||"",translateEngineOptionName:!0,engineTimeoutSeconds:10,evaluationViewFrom:"each",coefficientInSigmoid:600,badMoveLevelThreshold1:5,badMoveLevelThreshold2:10,badMoveLevelThreshold3:20,badMoveLevelThreshold4:50,showElapsedTimeInRecordView:!0,showCommentInRecordView:!0,enableAppLog:!1,enableUSILog:!1,enableCSALog:!1,logLevel:lt.INFO,positionImageStyle:"book",positionImageSize:500,positionImageHeader:"",lastRecordFilePath:"",lastUSIEngineFilePath:"",lastImageExportFilePath:"",lastOtherFilePath:"",emptyRecordInfoVisibility:!0}}function Lh(t){if(t.backgroundImageType!=="none"&&!t.backgroundImageFileURL)return new Error(d.backgroundImageFileNotSelected);if(t.pieceImage==="custom-image"&&(!t.pieceImageFileURL||!t.croppedPieceImageBaseURL))return new Error(d.pieceImageFileNotSelected);if(t.boardImage==="custom-image"&&!t.boardImageFileURL)return new Error(d.boardImageFileNotSelected);if(t.pieceStandImage==="custom-image"&&!t.pieceStandImageFileURL)return new Error(d.pieceStandImageFileNotSelected);if(t.pieceVolume<0||t.pieceVolume>100)return new Error(d.pieceVolumeMustBe0To100Percent);if(t.clockVolume<0||t.clockVolume>100)return new Error(d.clockVolumeMustBe0To100Percent);if(t.clockPitch<220||t.clockPitch>880)return new Error(d.clockPitchMustBe220To880Hz);if(t.engineTimeoutSeconds<1||t.engineTimeoutSeconds>300)return new Error(d.engineTimeoutMustBe1To300Seconds);if(t.coefficientInSigmoid<=0)return new Error(d.coefficientInSigmoidMustBeGreaterThan0);if(t.badMoveLevelThreshold1<1||t.badMoveLevelThreshold1>100)return new Error(d.inaccuracyThresholdMustBe1To100Percent);if(t.badMoveLevelThreshold2<1||t.badMoveLevelThreshold2>100)return new Error(d.dubiousThresholdMustBe1To100Percent);if(t.badMoveLevelThreshold3<1||t.badMoveLevelThreshold3>100)return new Error(d.mistakeThresholdMustBe1To100Percent);if(t.badMoveLevelThreshold4<1||t.badMoveLevelThreshold4>100)return new Error(d.blunderThresholdMustBe1To100Percent);if(t.badMoveLevelThreshold1>=t.badMoveLevelThreshold2)return new Error(d.inaccuracyThresholdMustBeLessThanDubiousThreshold);if(t.badMoveLevelThreshold2>=t.badMoveLevelThreshold3)return new Error(d.dubiousThresholdMustBeLessThanMistakeThreshold);if(t.badMoveLevelThreshold3>=t.badMoveLevelThreshold4)return new Error(d.mistakeThresholdMustBeLessThanBlunderThreshold)}function ea(t){switch(t.pieceImage){case"hitomojiDark":return"./piece/hitomoji_dark";case"hitomojiGothic":return"./piece/hitomoji_gothic";case"hitomojiGothicDark":return"./piece/hitomoji_gothic_dark";case"custom-image":if(t.croppedPieceImageBaseURL)return t.croppedPieceImageBaseURL}return"./piece/hitomoji"}const pE={};function Kx(t){if(pE[t])return;const e=document.createElement("img");e.src=t,pE[t]=e}function T8(t){return(t||new Date).toLocaleDateString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit"})}function gE(t){return(t||new Date).toLocaleTimeString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function mE(t){return t.endsWith("/")||t.endsWith("\\")?t.substring(0,t.length-1):t}function Hh(t){return t.indexOf("/")>=0?"/":"\\"}function We(t,...e){const x=Hh(t);let n=mE(t);for(const i of e)n+=i.startsWith("/")||i.startsWith("\\")?i:x+i,n=mE(n);return n}function Uh(t){return t.replaceAll(/[<>:"/\\|?*]/g,"_")}function $h(t){const e=t.getStandardMetadata(J.START_DATETIME)||t.getStandardMetadata(J.DATE);return e?e.trim().replaceAll(" ","_").replaceAll("/","").replaceAll(":",""):T8().replaceAll("/","")}function CE(t){let e=$h(t);const x=t.getStandardMetadata(J.TITLE)||t.getStandardMetadata(J.TOURNAMENT)||t.getStandardMetadata(J.OPUS_NAME)||t.getStandardMetadata(J.OPUS_NO)||t.getStandardMetadata(J.PLACE)||t.getStandardMetadata(J.POSTED_ON)||t.getStandardMetadata(J.AUTHOR);x&&(e+="_"+x);const n=t.getStandardMetadata(J.BLACK_NAME)||t.getStandardMetadata(J.BLACK_SHORT_NAME);n&&(e+="_"+n);const i=t.getStandardMetadata(J.WHITE_NAME)||t.getStandardMetadata(J.WHITE_SHORT_NAME);return i&&(e+="_"+i),Uh(e.trim())+".kif"}const ae={frame:{width:1471,height:959},board:{x:296.5,y:0,width:878,height:960,squreWidth:94.8,squreHeight:104,leftSquarePadding:12,topSquarePadding:12.2,leftPiecePadding:17.5,topPiecePadding:18.5,highlight:{selected:{"background-color":"#0088ff",opacity:"0.8"},lastMoveTo:{"background-color":"#44cc44",opacity:"0.8"},lastMoveFrom:{"background-color":"#44cc44",opacity:"0.4"}}},label:{fontSize:24},piece:{width:88,height:93},hand:{black:{x:1184,y:600},white:{x:0,y:0},width:288,height:360,highlight:{selected:{"background-color":"#ff4800",opacity:"0.7"}}},turn:{black:{x:1184,y:425},white:{x:0,y:492},width:288,height:45,fontSize:32},playerName:{black:{x:1184,y:480},white:{x:0,y:370},width:288,height:45,fontSize:25},clock:{black:{x:1184,y:535},white:{x:0,y:425},width:288,height:55,fontSize:40},control:{left:{x:0,y:547,width:288,height:412,fontSize:26},right:{x:1184,y:0,width:288,height:412,fontSize:26}}};function zh(t){return{black:{pawn:We(t,"black_pawn.png"),lance:We(t,"black_lance.png"),knight:We(t,"black_knight.png"),silver:We(t,"black_silver.png"),gold:We(t,"black_gold.png"),bishop:We(t,"black_bishop.png"),rook:We(t,"black_rook.png"),king:We(t,"black_king.png"),king2:We(t,"black_king2.png"),promPawn:We(t,"black_prom_pawn.png"),promLance:We(t,"black_prom_lance.png"),promKnight:We(t,"black_prom_knight.png"),promSilver:We(t,"black_prom_silver.png"),horse:We(t,"black_horse.png"),dragon:We(t,"black_dragon.png")},white:{pawn:We(t,"white_pawn.png"),lance:We(t,"white_lance.png"),knight:We(t,"white_knight.png"),silver:We(t,"white_silver.png"),gold:We(t,"white_gold.png"),bishop:We(t,"white_bishop.png"),rook:We(t,"white_rook.png"),king:We(t,"white_king.png"),king2:We(t,"white_king2.png"),promPawn:We(t,"white_prom_pawn.png"),promLance:We(t,"white_prom_lance.png"),promKnight:We(t,"white_prom_knight.png"),promSilver:We(t,"white_prom_silver.png"),horse:We(t,"white_horse.png"),dragon:We(t,"white_dragon.png")}}}function Gh(t){switch(t){default:return"./board/grid.svg";case xt.DARK:return"./board/grid_white.svg"}}function Wh(t,e){switch(t){case xt.LIGHT:return"./board/wood_light.png";case xt.WARM:return"./board/wood_warm.png";case xt.CUSTOM_IMAGE:return e||null}return null}const Vh={[xt.LIGHT]:"rgba(0, 0, 0, 0)",[xt.WARM]:"rgba(0, 0, 0, 0)",[xt.RESIN]:"#d69b00",[xt.RESIN2]:"#efbf63",[xt.RESIN3]:"#ad7624",[xt.DARK]:"#333333",[xt.GREEN]:"#598459",[xt.CHERRY_BLOSSOM]:"#ecb6b6",[xt.CUSTOM_IMAGE]:"rgba(0, 0, 0, 0)"};function Kh(t,e){switch(t){case qt.CUSTOM_IMAGE:return e||null}return null}const jh={[qt.STANDARD]:"#8b4513",[qt.DARK]:"#333333",[qt.GREEN]:"#527a52",[qt.CHERRY_BLOSSOM]:"#e8a9a9",[qt.CUSTOM_IMAGE]:"rgba(0, 0, 0, 0)"},qh={black:{pawn:{row:3,column:0,width:2},lance:{row:2,column:0,width:1},knight:{row:2,column:1,width:1},silver:{row:1,column:0,width:1},gold:{row:1,column:1,width:1},bishop:{row:0,column:0,width:1},rook:{row:0,column:1,width:1},king:{row:0,column:0,width:0},promPawn:{row:0,column:0,width:0},promLance:{row:0,column:0,width:0},promKnight:{row:0,column:0,width:0},promSilver:{row:0,column:0,width:0},horse:{row:0,column:0,width:0},dragon:{row:0,column:0,width:0}},white:{pawn:{row:0,column:0,width:2},lance:{row:1,column:1,width:1},knight:{row:1,column:0,width:1},silver:{row:2,column:1,width:1},gold:{row:2,column:0,width:1},bishop:{row:3,column:1,width:1},rook:{row:3,column:0,width:1},king:{row:0,column:0,width:0},promPawn:{row:0,column:0,width:0},promLance:{row:0,column:0,width:0},promKnight:{row:0,column:0,width:0},promSilver:{row:0,column:0,width:0},horse:{row:0,column:0,width:0},dragon:{row:0,column:0,width:0}}},Yh={1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七",8:"八",9:"九"};class Jh{constructor(e,x,n,i,s,o){_(this,"pieceImages");_(this,"boardGridImage");_(this,"boardTextureImage");_(this,"pieceStandImage");this.boardImageType=e,this.pieceStandImageType=x,this.boardLabelType=n,this.pieceImages=zh(i),this.boardGridImage=Gh(e),this.boardTextureImage=Wh(e,s),this.pieceStandImage=Kh(x,o)}preload(){Kx(this.boardGridImage),this.boardTextureImage&&Kx(this.boardTextureImage),this.pieceStandImage&&Kx(this.pieceStandImage),Object.values(this.pieceImages.black).forEach(Kx),Object.values(this.pieceImages.white).forEach(Kx)}build(e,x,n,i,s,o){let r=e.width/ae.frame.width;ae.frame.height*r>e.height&&(r=e.height/ae.frame.height);const a=()=>{const Z=ae.frame.height*r,ne=ae.frame.width*r;return{style:{height:Z+"px",width:ne+"px"},size:new pt(ne,Z)}},E=()=>{const Z=ae.board.x*r,ne=ae.board.y*r,re=ae.board.width*r,pe=ae.board.height*r,De={"background-color":Vh[this.boardImageType],left:Z+"px",top:ne+"px",height:pe+"px",width:re+"px"};return{gridImagePath:this.boardGridImage,textureImagePath:this.boardTextureImage,x:Z,y:ne,style:De}},l=Z=>{const ne=[];if(this.boardLabelType==Rn.NONE)return ne;const re=ae.label.fontSize*r,pe=re*.1,Te={color:"black","font-size":re+"px","font-weight":"bold","text-shadow":`${pe}px ${pe}px ${pe}px white`};for(let De=1;De<=9;De++){const et=Z.x-re*.5+(o?0:ae.board.width)*r+ae.board.leftPiecePadding*.5*r*(o?1:-1),Ke=Z.y-re*.5+(ae.board.topSquarePadding+((o?10-De:De)-.5)*ae.board.squreHeight)*r;ne.push({id:"rank"+De,character:Yh[De],style:{left:et+"px",top:Ke+"px",...Te}})}for(let De=1;De<=9;De++){const et=Z.x-re*.5+(ae.board.leftPiecePadding+(9.5-(o?10-De:De))*ae.board.squreWidth)*r,Ke=Z.y-re*.6+(o?ae.board.height:0)*r+ae.board.topSquarePadding*.7*r*(o?-1:1);ne.push({id:"file"+De,character:String(De),style:{left:et+"px",top:Ke+"px",...Te}})}return ne},A=Z=>{const ne=[];return x.board.listNonEmptySquares().forEach(re=>{const pe=x.board.at(re),Te=pe.id+re.index,De=o?Tt(pe.color):pe.color,et=pe.type==H.KING&&pe.color==L.BLACK?"king2":pe.type,Ke=this.pieceImages[De][et],ht=Z.x+(ae.board.leftPiecePadding+ae.board.squreWidth*(o?re.opposite:re).x)*r,Ve=Z.y+(ae.board.topPiecePadding+ae.board.squreHeight*(o?re.opposite:re).y)*r,gt=ae.piece.width*r,st=ae.piece.height*r;ne.push({id:Te,imagePath:Ke,style:{left:ht+"px",top:Ve+"px",width:gt+"px",height:st+"px"}})}),ne},h=Z=>{const ne=[];return z.all.forEach(re=>{const pe=re.index,{file:Te}=re,{rank:De}=re,et=Z.x+(ae.board.leftSquarePadding+ae.board.squreWidth*(o?re.opposite:re).x)*r,Ke=Z.y+(ae.board.topSquarePadding+ae.board.squreHeight*(o?re.opposite:re).y)*r,ht=ae.board.squreWidth*r,Ve=ae.board.squreHeight*r,gt={left:et+"px",top:Ke+"px",width:ht+"px",height:Ve+"px"};let st=gt;n&&re.equals(n.to)&&(st={...st,...ae.board.highlight.lastMoveTo}),n&&n.from instanceof z&&re.equals(n.from)&&(st={...st,...ae.board.highlight.lastMoveFrom}),i instanceof z&&i.equals(re)&&(st={...st,...ae.board.highlight.selected}),ne.push({id:pe,file:Te,rank:De,style:gt,backgroundStyle:st})}),ne},B=(Z,ne)=>{const re=o?Tt(Z):Z,pe=jh[this.pieceStandImageType],Te=ae.hand[re].x*r,De=ae.hand[re].y*r,et=ae.hand.width*r,Ke=ae.hand.height*r,ht={"background-color":pe,left:Te+"px",top:De+"px",width:et+"px",height:Ke+"px"},Ve=[],gt=[];return k5.forEach(st=>{const St=ne.count(st),Ye=qh[re][st],Be=ae.hand.width/2*Ye.width*r,F=ae.hand.height/4*r,k=Be*Ye.column,G=F*Ye.row,j=ae.piece.width*r,q=ae.piece.height*r,te=Math.max(Be-j*St,0)/(St*2),le=(Be-j-te*2)/Math.max(St-1,1);for(let de=St-1;de>=0;de-=1){const ue=st+de,ge=this.pieceImages[re][st],ve=k+te+le*de,ke=G;Ve.push({id:ue,imagePath:ge,style:{left:ve+"px",top:ke+"px",width:j+"px",height:q+"px"}})}const Q=st,se={left:k+"px",top:G+"px",width:Be+"px",height:F+"px"};let Y=se;i&&i instanceof ce&&i.color===Z&&i.type===st&&(Y={...Y,...ae.hand.highlight.selected}),gt.push({id:Q,type:st,style:se,backgroundStyle:Y})}),{textureImagePath:this.pieceStandImage,style:ht,pieces:Ve,pointers:gt}},p=(Z,ne)=>{if(!ne)return null;const re=o?Tt(ne.color):ne.color,pe=o?ne.to.opposite:ne.to,Te=new ce(re,ne.pieceType),De=Te.promoted(),et=Te.unpromoted(),Ke=this.pieceImages[re][De.type],ht=this.pieceImages[re][et.type],Ve=Z.x+(ae.board.leftSquarePadding+ae.board.squreWidth*(pe.x===0?0:pe.x===8?7:pe.x-.5))*r,gt=Z.y+(ae.board.topSquarePadding+ae.board.squreHeight*pe.y)*r,st=ae.board.squreWidth*2*r,St=ae.board.squreHeight*r,Ye={left:Ve+"px",top:gt+"px",width:st+"px",height:St+"px","font-size":St/4+"px"};return{promoteImagePath:Ke,notPromoteImagePath:ht,style:Ye}},f=()=>{const Z=x.color,ne=o?Tt(Z):Z,re=2;return{style:{left:ae.turn[ne].x*r-re+"px",top:ae.turn[ne].y*r-re+"px",width:ae.turn.width*r-re+"px",height:ae.turn.height*r-re+"px","font-size":ae.turn.fontSize*r+"px","border-radius":ae.turn.height*r*.4+"px","border-width":re+"px","border-style":"solid"}}},g=Z=>{const ne=o?Tt(Z):Z;return{style:{left:ae.playerName[ne].x*r+"px",top:ae.playerName[ne].y*r+"px",width:ae.playerName.width*r+"px",height:ae.playerName.height*r+"px","font-size":ae.playerName.fontSize*r+"px"}}},C=Z=>{const ne=o?Tt(Z):Z;return{style:{left:ae.clock[ne].x*r+"px",top:ae.clock[ne].y*r+"px",width:ae.clock.width*r+"px",height:ae.clock.height*r+"px","font-size":ae.clock.fontSize*r+"px"}}},S=()=>({left:{style:{left:ae.control.left.x*r+"px",top:ae.control.left.y*r+"px",width:ae.control.left.width*r+"px",height:ae.control.left.height*r+"px","font-size":ae.control.left.fontSize*r+"px"}},right:{style:{left:ae.control.right.x*r+"px",top:ae.control.right.y*r+"px",width:ae.control.right.width*r+"px",height:ae.control.right.height*r+"px","font-size":ae.control.right.fontSize*r+"px"}}}),I=a(),y=E(),v=l(y),D=A(y),T=h(y),b=B(L.BLACK,x.hand(L.BLACK)),P=B(L.WHITE,x.hand(L.WHITE)),O=p(y,s),V=f(),N=g(L.BLACK),K=g(L.WHITE),W=C(L.BLACK),X=C(L.WHITE),xe=S();return{frame:I,board:y,labels:v,piece:D,square:T,blackHand:b,whiteHand:P,promotion:O,turn:V,blackPlayerName:N,whitePlayerName:K,blackClock:W,whiteClock:X,control:xe}}}const Xh=["src"],Zh=["src"],Qh={class:"player-name-text"},e6={class:"clock-text"},t6={class:"player-name-text"},x6={class:"clock-text"},n6=["src"],i6=["onClick","onContextmenu"],s6=["src"],o6=["src"],r6=["onClick"],a6=["src"],E6=["src"],l6=["onClick"],c6=["src"],A6=["src"],u6=Me({__name:"BoardView",props:{boardImageType:{type:String,required:!0},pieceImageBaseUrl:{type:String,required:!0},customBoardImageUrl:{type:String,required:!1,default:void 0},pieceStandImageType:{type:String,required:!0},customPieceStandImageUrl:{type:String,required:!1,default:void 0},boardLabelType:{type:String,required:!0},maxSize:{type:pt,required:!0},position:{type:Object,required:!0},lastMove:{type:Object,required:!1,default:null},flip:{type:Boolean,required:!1},allowEdit:{type:Boolean,required:!1},allowMove:{type:Boolean,required:!1},blackPlayerName:{type:String,required:!1,default:"先手"},whitePlayerName:{type:String,required:!1,default:"後手"},blackPlayerTime:{type:Number,required:!1,default:void 0},blackPlayerByoyomi:{type:Number,required:!1,default:void 0},whitePlayerTime:{type:Number,required:!1,default:void 0},whitePlayerByoyomi:{type:Number,required:!1,default:void 0},nextMoveLabel:{type:String,required:!1,default:"手番"}},emits:["resize","move","edit"],setup(t,{emit:e}){const x=t,n=F0({pointer:null,reservedMove:null}),i=()=>{n.pointer=null,n.reservedMove=null};ix([()=>x.position,()=>x.allowEdit,()=>x.allowMove],()=>{i()});const s=()=>{i()},o=(y,v,D)=>{const T=n.pointer;if(i(),!(y instanceof z&&T instanceof z&&y.equals(T))&&!(y instanceof ce&&T instanceof ce&&y.equals(T))){if(T){const b=T,P=y instanceof z?y:y.color;if(x.allowEdit&&x.position.isValidEditing(b,P)){e("edit",{move:{from:T,to:P}});return}if(x.allowMove&&y instanceof z){const O=T instanceof z?T:T.type,V=y,N=x.position.createMove(O,V);if(!N)return;const K=x.position.isValidMove(N),W=x.position.isValidMove(N.withPromote());if(K&&W){n.reservedMove=N;return}if(K){e("move",N);return}if(W){e("move",N.withPromote());return}}}!x.allowMove&&!x.allowEdit||v||!x.allowEdit&&D!==x.position.color||(n.pointer=y)}},r=(y,v,D)=>{y.stopPropagation(),y.preventDefault();const T=new z(v,D),b=x.position.board.at(T);o(T,!b,b==null?void 0:b.color)},a=(y,v,D)=>{y.stopPropagation(),y.preventDefault();const T=x.position.hand(v).count(D)===0;o(new ce(v,D),T,v)},E=(y,v,D)=>{y.stopPropagation(),y.preventDefault(),i();const T=new z(v,D);x.allowEdit&&x.position.board.at(T)&&e("edit",{rotate:T})},l=y=>{y.stopPropagation(),y.preventDefault();const v=n.reservedMove;i(),v&&x.position.isValidMove(v.withPromote())&&e("move",v.withPromote())},A=y=>{y.stopPropagation(),y.preventDefault();const v=n.reservedMove;i(),v&&x.position.isValidMove(v)&&e("move",v)},h=Fe(()=>{const y=new Jh(x.boardImageType,x.pieceStandImageType,x.boardLabelType,x.pieceImageBaseUrl,x.customBoardImageUrl,x.customPieceStandImageUrl);return y.preload(),y}),B=Fe(()=>{const y=h.value.build(x.maxSize,x.position,x.lastMove,n.pointer,n.reservedMove,x.flip);return e("resize",y.frame.size),y}),p=(y,v)=>y?_8(y):v!==void 0?""+v:"0:00:00",f=(y,v)=>{if(!y&&!v)return"normal";const D=(y||0)+(v||0);return D<=5?"danger":D<=10?"warning":"normal"},g=Fe(()=>p(x.blackPlayerTime,x.blackPlayerByoyomi)),C=Fe(()=>f(x.blackPlayerTime,x.blackPlayerByoyomi)),S=Fe(()=>p(x.whitePlayerTime,x.whitePlayerByoyomi)),I=Fe(()=>f(x.whitePlayerTime,x.whitePlayerByoyomi));return(y,v)=>(w(),M("div",null,[u("div",{class:"frame",style:he(c(B).frame.style),onClick:v[2]||(v[2]=D=>s())},[c(B).board.textureImagePath?(w(),M("div",{key:0,style:he(c(B).board.style)},[u("img",{class:"full",src:c(B).board.textureImagePath},null,8,Xh)],4)):ee("",!0),u("div",{style:he(c(B).board.style)},[u("img",{class:"full",src:c(B).board.gridImagePath},null,8,Zh)],4),u("div",{class:qe(["player-name",{active:t.position.color=="black"}]),style:he(c(B).blackPlayerName.style)},[u("span",Qh,"☗"+m(t.blackPlayerName),1)],6),u("div",{class:qe(["clock",c(C)]),style:he(c(B).blackClock.style)},[u("span",e6,m(c(g)),1)],6),u("div",{class:qe(["player-name",{active:t.position.color=="white"}]),style:he(c(B).whitePlayerName.style)},[u("span",t6,"☖"+m(t.whitePlayerName),1)],6),u("div",{class:qe(["clock",c(I)]),style:he(c(B).whiteClock.style)},[u("span",x6,m(c(S)),1)],6),(w(!0),M(_e,null,Le(c(B).square,D=>(w(),M("div",{key:D.id,style:he(D.backgroundStyle)},null,4))),128)),(w(!0),M(_e,null,Le(c(B).piece,D=>(w(),M("div",{key:D.id,style:he(D.style)},[u("img",{class:"full",src:D.imagePath},null,8,n6)],4))),128)),(w(!0),M(_e,null,Le(c(B).labels,D=>(w(),M("div",{key:D.id,style:he(D.style)},m(D.character),5))),128)),(w(!0),M(_e,null,Le(c(B).square,D=>(w(),M("div",{key:D.id,style:he(D.style),onClick:T=>r(T,D.file,D.rank),onContextmenu:T=>E(T,D.file,D.rank)},null,44,i6))),128)),c(B).blackHand.textureImagePath?(w(),M("div",{key:1,style:he(c(B).blackHand.style)},[u("img",{class:"full",src:c(B).blackHand.textureImagePath},null,8,s6)],4)):ee("",!0),u("div",{class:"hand",style:he(c(B).blackHand.style)},[(w(!0),M(_e,null,Le(c(B).blackHand.pointers,D=>(w(),M("div",{key:D.id,style:he(D.backgroundStyle)},null,4))),128)),(w(!0),M(_e,null,Le(c(B).blackHand.pieces,D=>(w(),M("div",{key:D.id,style:he(D.style)},[u("img",{class:"full",src:D.imagePath},null,8,o6)],4))),128)),(w(!0),M(_e,null,Le(c(B).blackHand.pointers,D=>(w(),M("div",{key:D.id,style:he(D.style),onClick:T=>a(T,c(L).BLACK,D.type)},null,12,r6))),128))],4),c(B).whiteHand.textureImagePath?(w(),M("div",{key:2,style:he(c(B).whiteHand.style)},[u("img",{class:"full",src:c(B).whiteHand.textureImagePath},null,8,a6)],4)):ee("",!0),u("div",{class:"hand",style:he(c(B).whiteHand.style)},[(w(!0),M(_e,null,Le(c(B).whiteHand.pointers,D=>(w(),M("div",{key:D.id,style:he(D.backgroundStyle)},null,4))),128)),(w(!0),M(_e,null,Le(c(B).whiteHand.pieces,D=>(w(),M("div",{key:D.id,style:he(D.style)},[u("img",{class:"full",src:D.imagePath},null,8,E6)],4))),128)),(w(!0),M(_e,null,Le(c(B).whiteHand.pointers,D=>(w(),M("div",{key:D.id,style:he(D.style),onClick:T=>a(T,c(L).WHITE,D.type)},null,12,l6))),128))],4),c(B).promotion?(w(),M("div",{key:3,class:"promotion-selector",style:he(c(B).promotion.style)},[u("div",{class:"select-button promote",onClick:v[0]||(v[0]=D=>l(D))},[u("img",{class:"full",src:c(B).promotion.promoteImagePath},null,8,c6)]),u("div",{class:"select-button not-promote",onClick:v[1]||(v[1]=D=>A(D))},[u("img",{class:"full",src:c(B).promotion.notPromoteImagePath},null,8,A6)])],4)):ee("",!0),u("div",{class:"turn",style:he(c(B).turn.style)},m(t.nextMoveLabel),5),u("div",{style:he(c(B).control.left.style)},[Xo(y.$slots,"left-control",{},void 0,!0)],4),u("div",{style:he(c(B).control.right.style)},[Xo(y.$slots,"right-control",{},void 0,!0)],4)],4)]))}});const ze=(t,e)=>{const x=t.__vccOpts||t;for(const[n,i]of e)x[n]=i;return x},ta=ze(u6,[["__scopeId","data-v-e5bb7653"]]),x0="es://human",P8="es://usi-engine/";function $0(t){return t.startsWith(P8)}function h6(){const t=Date.now(),e=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16);return P8+`${t}/${e}`}const I8="USI_Ponder",B6="USI_MultiPV",d6="Threads",f6="NumberOfThreads",p6="MultiPV";function Sx(t){if(t){if(t.value!==void 0)return t.value;if(t.default!==void 0)return(t.type==="string"||t.type==="filename")&&t.default===""?"":t.default}}function k8(){return{uri:"",name:"",defaultName:"",author:"",path:"",options:{}}}function g6(t){const e=JSON.parse(JSON.stringify(t));return e.uri=h6(),e.name=d.copyOf(e.name),e}function m6(t,e){t.uri=e.uri,t.name=e.name,Object.keys(e.options).forEach(x=>{t.options[x]&&(t.options[x].value=e.options[x].value)})}class k0{constructor(e){_(this,"engines",{});if(e){const x=JSON.parse(e);for(const n in x.engines)$0(n)&&(this.engines[n]={...k8(),...x.engines[n],uri:n})}}hasEngine(e){return!!this.engines[e]}addEngine(e){this.engines[e.uri]=e}updateEngine(e){return this.engines[e.uri]?(this.engines[e.uri]=e,!0):!1}removeEngine(e){return this.engines[e]?(delete this.engines[e],!0):!1}getEngine(e){return this.engines[e]}get engineList(){return Object.values(this.engines).sort((e,x)=>e.name!==x.name?e.name>x.name?1:-1:e.defaultName!==x.defaultName?e.defaultName>x.defaultName?1:-1:e.uri>x.uri?1:-1)}get json(){return JSON.stringify(this)}get jsonWithIndent(){return JSON.stringify(this,void 0,2)}getClone(){return new k0(this.json)}}function C6(){return{enableNumber:!1,number:20}}function F6(){return{enableNumber:!1,number:100}}function D6(){return{maxSeconds:5}}var n0=(t=>(t.NONE="none",t.INSERT="insert",t.APPEND="append",t.OVERWRITE="overwrite",t))(n0||{});function Er(){return{startCriteria:C6(),endCriteria:F6(),perMoveCriteria:D6(),commentBehavior:"insert"}}function FE(){return{name:"人",uri:x0}}function ys(){return{black:FE(),white:FE(),timeLimit:{timeSeconds:0,byoyomi:30,increment:0},enableEngineTimeout:!1,humanIsFront:!0,enableComment:!0,enableAutoSave:!0,repeat:1,swapPlayers:!1,maxMoves:1e3}}function M8(t){if(t.timeLimit.timeSeconds===0&&t.timeLimit.byoyomi===0)return new Error("持ち時間と秒読みが両方とも0です。");if(t.timeLimit.byoyomi!==0&&t.timeLimit.increment!==0)return new Error("秒読みとフィッシャールールは併用できません。")}function _6(t){const e=M8(t);if(e)return e;if(t.enableAutoSave)return new Error("自動保存はWeb版で利用できません。")}function Ss(){return{enableMaxSeconds:!1,maxSeconds:10}}function v6(t){if(!t.usi)return new Error("エンジンが選択されていません。");for(const e of t.secondaries||[])if(!e.usi)return new Error("エンジンが選択されていません。")}var wx=(t=>(t.V121="v121",t.V121_FLOODGATE="v121_floodgate",t))(wx||{});function O8(){return{protocolVersion:"v121",host:"localhost",port:4081,id:"",password:""}}function b6(){return{player:{name:"人",uri:x0},server:O8(),autoFlip:!0,enableComment:!0,enableAutoSave:!0,repeat:1,autoRelogin:!0}}function y6(t){if(t.server.protocolVersion!=="v121"&&t.server.protocolVersion!=="v121_floodgate")return new Error("プロトコルのバージョンを選択してください。");if(t.server.host==="")return new Error("ホスト名が空です。");if(t.server.port<0||t.server.port>65535)return new Error("無効なポート番号です。");if(t.server.id==="")return new Error("IDが空です。")}function lr(){return{player:{name:"人",uri:x0},serverHistory:[],autoFlip:!0,enableComment:!0,enableAutoSave:!0,repeat:1,autoRelogin:!0}}function S6(t,e){var x;return{player:t.player,server:((x=t.serverHistory)==null?void 0:x.length)>e?t.serverHistory[e]:O8(),autoFlip:t.autoFlip,enableComment:t.enableComment,enableAutoSave:t.enableAutoSave,repeat:t.repeat,autoRelogin:t.autoRelogin}}const w6=10;function T6(t,e){const x=[e.server];for(const n of t.serverHistory)if((n.protocolVersion!==e.server.protocolVersion||n.host!==e.server.host||n.port!==e.server.port||n.id!==e.server.id||n.password!==e.server.password)&&x.push(n),x.length===w6)break;return{player:e.player,serverHistory:x,autoFlip:e.autoFlip,enableComment:e.enableComment,enableAutoSave:e.enableAutoSave,repeat:e.repeat,autoRelogin:e.autoRelogin}}function DE(){return{}}const P6={async getRecordPathFromProcArg(){return""},updateAppState(){},openExplorer(){},async showOpenRecordDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async openRecord(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async showSaveRecordDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async saveRecord(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async showSelectFileDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async showSelectDirectoryDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async showSelectImageDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async getPieceImageBaseURL(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async cropPieceImage(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async exportCaptureAsPNG(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async exportCaptureAsJPEG(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async loadAppSetting(){const t=localStorage.getItem("appSetting");return JSON.stringify(t?{...ar(),...JSON.parse(t)}:ar())},async saveAppSetting(t){localStorage.setItem("appSetting",t)},async loadResearchSetting(){const t=localStorage.getItem("researchSetting");return JSON.stringify(t?{...Ss(),...JSON.parse(t)}:Ss())},async saveResearchSetting(t){localStorage.setItem("researchSetting",t)},async loadAnalysisSetting(){const t=localStorage.getItem("analysisSetting");return JSON.stringify(t?{...Er(),...JSON.parse(t)}:Er())},async saveAnalysisSetting(t){localStorage.setItem("analysisSetting",t)},async loadGameSetting(){const t=localStorage.getItem("gameSetting");return JSON.stringify(t?{...ys(),...JSON.parse(t)}:ys())},async saveGameSetting(t){localStorage.setItem("gameSetting",t)},async loadCSAGameSettingHistory(){const t=localStorage.getItem("csaGameSettingHistory");return JSON.stringify(t?{...lr(),...JSON.parse(t)}:lr())},async saveCSAGameSettingHistory(t){localStorage.setItem("csaGameSettingHistory",t)},async loadMateSearchSetting(){const t=localStorage.getItem("mateSearchSetting");return JSON.stringify(t?{...DE(),...JSON.parse(t)}:DE())},async saveMateSearchSetting(t){localStorage.setItem("mateSearchSetting",t)},async loadUSIEngineSetting(){return new k0().json},async saveUSIEngineSetting(){},async showSelectUSIEngineDialog(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async getUSIEngineInfo(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async sendUSISetOption(){},async usiLaunch(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async usiGo(){},async usiGoPonder(){},async usiPonderHit(){},async usiGoInfinite(){},async usiGoMate(){},async usiStop(){},async usiGameover(){},async usiQuit(){},async csaLogin(){throw new Error(d.thisFeatureNotAvailableOnWebApp)},async csaLogout(){},async csaAgree(){},async csaMove(){},async csaResign(){},async csaWin(){},async csaStop(){},async isEncryptionAvailable(){return!1},log(t,e){switch(t){case lt.DEBUG:console.debug(e);break;case lt.INFO:console.log(e);break;case lt.WARN:console.warn(e);break;case lt.ERROR:console.error(e);break}},onSendError(){},onMenuEvent(){},onUpdateAppSetting(){},onUSIBestMove(){},onUSICheckmate(){},onUSICheckmateNotImplemented(){},onUSICheckmateTimeout(){},onUSINoMate(){},onUSIInfo(){},onUSIPonderInfo(){},onCSAGameSummary(){},onCSAReject(){},onCSAStart(){},onCSAMove(){},onCSAGameResult(){},onCSAClose(){}};function xa(){return window}const R8=xa().electronShogi||{},Se=xa().electronShogiAPI||P6,Ae={...Se,getPieceImageBaseURL(t){return Se.getPieceImageBaseURL(t)},cropPieceImage(t){return Se.cropPieceImage(t)},exportCaptureAsPNG(t){return Se.exportCaptureAsPNG(t.json)},exportCaptureAsJPEG(t){return Se.exportCaptureAsJPEG(t.json)},async loadAppSetting(){return JSON.parse(await Se.loadAppSetting())},saveAppSetting(t){return Se.saveAppSetting(JSON.stringify(t))},async loadResearchSetting(){return JSON.parse(await Se.loadResearchSetting())},saveResearchSetting(t){return Se.saveResearchSetting(JSON.stringify(t))},async loadAnalysisSetting(){return JSON.parse(await Se.loadAnalysisSetting())},saveAnalysisSetting(t){return Se.saveAnalysisSetting(JSON.stringify(t))},async loadGameSetting(){return JSON.parse(await Se.loadGameSetting())},saveGameSetting(t){return Se.saveGameSetting(JSON.stringify(t))},async loadCSAGameSettingHistory(){return JSON.parse(await Se.loadCSAGameSettingHistory())},saveCSAGameSettingHistory(t){return Se.saveCSAGameSettingHistory(JSON.stringify(t))},async loadMateSearchSetting(){return JSON.parse(await Se.loadMateSearchSetting())},saveMateSearchSetting(t){return Se.saveMateSearchSetting(JSON.stringify(t))},async loadUSIEngineSetting(){return new k0(await Se.loadUSIEngineSetting())},saveUSIEngineSetting(t){return Se.saveUSIEngineSetting(t.json)},async getUSIEngineInfo(t,e){return JSON.parse(await Se.getUSIEngineInfo(t,e))},usiLaunch(t,e){return Se.usiLaunch(JSON.stringify(t),e)},usiGo(t,e,x,n,i){return Se.usiGo(t,e,JSON.stringify(x),n,i)},usiGoPonder(t,e,x,n,i){return Se.usiGoPonder(t,e,JSON.stringify(x),n,i)},csaLogin(t){return Se.csaLogin(JSON.stringify(t))}};function S0(){return!!xa().electronShogiAPI}let Hn;function N8(t){if(Hn)return;const e=(t==null?void 0:t.type)||"sine",x=(t==null?void 0:t.frequency)||440,n=(t==null?void 0:t.volume)||2,i=new AudioContext,s=i.createOscillator(),o=i.createGain();s.connect(o),o.connect(i.destination),s.type=e,s.frequency.value=x,o.gain.value=n*.005,s.onended=()=>{o.disconnect(i.destination),s.disconnect(o)},s.start(i.currentTime),t!=null&&t.time&&s.stop(i.currentTime+t.time),t!=null&&t.time||(Hn=s)}function I6(t){N8({type:"sine",frequency:t.frequency,time:.1,volume:t.volume})}function k6(t){N8({type:"sine",frequency:t.frequency,volume:t.volume})}function _E(){Hn&&(Hn.stop(),Hn=void 0)}let vo;function bo(t){const e=Date.now();if(vo&&e=1500?"先手勝勢":t>=600?"先手優勢":t>=400?"先手有利":t>=200?"先手有望":t>=-200?"互角":t>=-400?"後手有望":t>=-600?"後手有利":t>=-1500?"後手優勢":"後手勝勢"}function cr(t,e){return 100/(1+Math.exp(-t/e))}var r0={},bt={},vE;function na(){if(vE)return bt;vE=1;var t=ia(),e=String.fromCharCode,x=Array.prototype.slice,n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,s=Array.isArray,o=Object.keys;function r(P){var O=typeof P;return O==="function"||O==="object"&&!!P}bt.isObject=r;function a(P){return s?s(P):n.call(P)==="[object Array]"}bt.isArray=a;function E(P){return typeof P=="string"||n.call(P)==="[object String]"}bt.isString=E;function l(P){if(o)return o(P);var O=[];for(var V in P)i.call(P,V)&&(O[O.length]=V);return O}bt.objectKeys=l;function A(P,O){if(t.HAS_TYPED)switch(P){case 8:return new Uint8Array(O);case 16:return new Uint16Array(O)}return new Array(O)}bt.createBuffer=A;function h(P){for(var O=P.length,V=A(16,O),N=0;Nt.APPLY_BUFFER_SIZE&&(t.APPLY_BUFFER_SIZE_OK=!0),V}catch{t.APPLY_BUFFER_SIZE_OK=!1}}return p(P)}bt.codeToString_fast=B;function p(P){for(var O="",V=P&&P.length,N=0,K;Nt.APPLY_BUFFER_SIZE&&(t.APPLY_BUFFER_SIZE_OK=!0);continue}catch{t.APPLY_BUFFER_SIZE_OK=!1}return f(P)}return O}bt.codeToString_chunked=p;function f(P){for(var O="",V=P&&P.length,N=0;N>2],O[O.length]=y[(K&3)<<4],O[O.length]=D,O[O.length]=D;break}if(W=P[V++],V==N){O[O.length]=y[K>>2],O[O.length]=y[(K&3)<<4|(W&240)>>4],O[O.length]=y[(W&15)<<2],O[O.length]=D;break}X=P[V++],O[O.length]=y[K>>2],O[O.length]=y[(K&3)<<4|(W&240)>>4],O[O.length]=y[(W&15)<<2|(X&192)>>6],O[O.length]=y[X&63]}return B(O)}bt.base64encode=T;function b(P){var O,V,N,K,W,X,xe;for(X=P&&P.length,W=0,xe=[];W>4;do{if(N=P.charCodeAt(W++)&255,N==61)return xe;N=v[N]}while(W>2;do{if(K=P.charCodeAt(W++)&255,K==61)return xe;K=v[K]}while(W95&&(e.JIS_TO_UTF8_TABLE[h]=A|0);for(e.JISX0212_TO_UTF8_TABLE={},a=t.objectKeys(e.UTF8_TO_JISX0212_TABLE),l=a.length,E=0;E255)return!1;if(n>=0&&n<=7||n===255)return!0}return!1}s0.isBINARY=$6;function z6(t){for(var e=0,x=t&&t.length,n;e255||n>=128&&n<=255||n===27)return!1;return!0}s0.isASCII=z6;function G6(t){for(var e=0,x=t&&t.length,n,i,s;e255||n>=128&&n<=255)return!1;if(n===27){if(e+2>=x)return!1;if(i=t[e+1],s=t[e+2],i===36){if(s===40||s===64||s===66)return!0}else{if(i===38&&s===64)return!0;if(i===40&&(s===66||s===73||s===74))return!0}}}return!1}s0.isJIS=G6;function W6(t){for(var e=0,x=t&&t.length,n;e255||n<142)return!1;if(n===142){if(e+1>=x||(n=t[++e],n<161||223=x||(n=t[++e],n<162||237=x||(n=t[++e],n<161||254128;)if(t[e++]>255)return!1;for(;e239||e+1>=x||(n=t[++e],n<64||n===127||n>252)))return!1;return!0}s0.isSJIS=V6;function K6(t){for(var e=0,x=t&&t.length,n;e255)return!1;if(!(n===9||n===10||n===13||n>=32&&n<=126))if(n>=194&&n<=223){if(e+1>=x||t[e+1]<128||t[e+1]>191)return!1;e++}else if(n===224){if(e+2>=x||t[e+1]<160||t[e+1]>191||t[e+2]<128||t[e+2]>191)return!1;e+=2}else if(n>=225&&n<=236||n===238||n===239){if(e+2>=x||t[e+1]<128||t[e+1]>191||t[e+2]<128||t[e+2]>191)return!1;e+=2}else if(n===237){if(e+2>=x||t[e+1]<128||t[e+1]>159||t[e+2]<128||t[e+2]>191)return!1;e+=2}else if(n===240){if(e+3>=x||t[e+1]<144||t[e+1]>191||t[e+2]<128||t[e+2]>191||t[e+3]<128||t[e+3]>191)return!1;e+=3}else if(n>=241&&n<=243){if(e+3>=x||t[e+1]<128||t[e+1]>191||t[e+2]<128||t[e+2]>191||t[e+3]<128||t[e+3]>191)return!1;e+=3}else if(n===244){if(e+3>=x||t[e+1]<128||t[e+1]>143||t[e+2]<128||t[e+2]>191||t[e+3]<128||t[e+3]>191)return!1;e+=3}else return!1}return!0}s0.isUTF8=K6;function j6(t){var e=0,x=t&&t.length,n=null,i,s,o,r;if(x<2){if(t[0]>255)return!1}else{if(i=t[0],s=t[1],i===255&&s===254||i===254&&s===255)return!0;for(;e255)return!1;if(n===null)return!1;if(o=t[n+1],o!==void 0&&o>0&&o<128||(r=t[n-1],r!==void 0&&r>0&&r<128))return!0}return!1}s0.isUTF16=j6;function q6(t){var e=0,x=t&&t.length,n=null,i,s;if(x<2){if(t[0]>255)return!1}else{if(i=t[0],s=t[1],i===254&&s===255)return!0;for(;e255)return!1;if(n===null)return!1;if(n%2===0)return!0}return!1}s0.isUTF16BE=q6;function Y6(t){var e=0,x=t&&t.length,n=null,i,s;if(x<2){if(t[0]>255)return!1}else{if(i=t[0],s=t[1],i===255&&s===254)return!0;for(;e255)return!1;if(n===null)return!1;if(n%2!==0)return!0}return!1}s0.isUTF16LE=Y6;function J6(t){var e=0,x=t&&t.length,n=null,i,s,o,r,a,E;if(x<4){for(;e255)return!1}else{if(i=t[0],s=t[1],o=t[2],r=t[3],i===0&&s===0&&o===254&&r===255||i===255&&s===254&&o===0&&r===0)return!0;for(;e255)return!1;if(n===null)return!1;if(a=t[n+3],a!==void 0&&a>0&&a<=127)return t[n+2]===0&&t[n+1]===0;if(E=t[n-1],E!==void 0&&E>0&&E<=127)return t[n+1]===0&&t[n+2]===0}return!1}s0.isUTF32=J6;function X6(t){for(var e=0,x=t&&t.length,n;e1114111)return!1;return!0}s0.isUNICODE=X6;var fe={},i0=ia(),sa=na(),oa=s0,I0=Bn;function Z6(t){for(var e=[],x=0,n=0,i=t&&t.length,s,o;n>=1,s<47?s+=113:s-=79,o>95?o+=32:o+=31):(s>>=1,s<=47?s+=112:s-=80,o+=126),e[e.length]=s&255,e[e.length]=o&255):x===2?e[e.length]=t[n]+128&255:x===3?e[e.length]=i0.FALLBACK_CHARACTER:e[e.length]=t[n]&255}return e}fe.JISToSJIS=Z6;function Q6(t){for(var e=[],x=0,n=t&&t.length,i=0;i=161&&s<=223?(x!==2&&(x=2,e[e.length]=r[6],e[e.length]=r[7],e[e.length]=r[8]),e[e.length]=s-128&255):s>=128?(x!==1&&(x=1,e[e.length]=r[3],e[e.length]=r[4],e[e.length]=r[5]),s<<=1,o=t[++i],o<159?(s<319?s-=225:s-=97,o>126?o-=32:o-=31):(s<319?s-=224:s-=96,o-=126),e[e.length]=s&255,e[e.length]=o&255):(x!==0&&(x=0,e[e.length]=r[0],e[e.length]=r[1],e[e.length]=r[2]),e[e.length]=s&255);return x!==0&&(e[e.length]=r[0],e[e.length]=r[1],e[e.length]=r[2]),e}fe.SJISToJIS=eB;function tB(t){for(var e=[],x=t&&t.length,n=0,i,s;n=161&&i<=223?(e[e.length]=142,e[e.length]=i):i>=129?(s=t[++n],i<<=1,s<159?(i<319?i-=97:i-=225,s>126?s+=96:s+=97):(i<319?i-=96:i-=224,s+=2),e[e.length]=i&255,e[e.length]=s&255):e[e.length]=i&255;return e}fe.SJISToEUCJP=tB;function xB(t){for(var e=[],x=0,n=t&&t.length,i=0,s,o=[27,40,66,27,36,66,27,40,73,27,36,40,68];i142?(x!==1&&(x=1,e[e.length]=o[3],e[e.length]=o[4],e[e.length]=o[5]),e[e.length]=s-128&255,e[e.length]=t[++i]-128&255):(x!==0&&(x=0,e[e.length]=o[0],e[e.length]=o[1],e[e.length]=o[2]),e[e.length]=s&255);return x!==0&&(e[e.length]=o[0],e[e.length]=o[1],e[e.length]=o[2]),e}fe.EUCJPToJIS=xB;function nB(t){for(var e=[],x=t&&t.length,n=0,i,s;n142?(s=t[++n],i&1?(i>>=1,i<111?i+=49:i+=113,s>223?s-=96:s-=97):(i>>=1,i<=111?i+=48:i+=112,s-=2),e[e.length]=i&255,e[e.length]=s&255):i===142?e[e.length]=t[++n]&255:e[e.length]=i&255;return e}fe.EUCJPToSJIS=nB;function ui(t){i0.init_JIS_TO_UTF8_TABLE();for(var e=[],x=0,n=t&&t.length,i,s,o,r,a,E,l;x=161&&i<=223?(o=i-64,r=188|o>>6&3,a=128|o&63,e[e.length]=239,e[e.length]=r&255,e[e.length]=a&255):i>=128?(s=i<<1,o=t[++x],o<159?(s<319?s-=225:s-=97,o>126?o-=32:o-=31):(s<319?s-=224:s-=96,o-=126),s&=255,E=(s<<8)+o,l=I0.JIS_TO_UTF8_TABLE[E],l===void 0?e[e.length]=i0.FALLBACK_CHARACTER:l<65535?(e[e.length]=l>>8&255,e[e.length]=l&255):(e[e.length]=l>>16&255,e[e.length]=l>>8&255,e[e.length]=l&255)):e[e.length]=t[x]&255;return e}fe.SJISToUTF8=ui;function hi(t){i0.init_JIS_TO_UTF8_TABLE();for(var e=[],x=0,n=t&&t.length,i,s,o,r,a,E,l,A;x>6&3,r=128|s&63,e[e.length]=239,e[e.length]=o&255,e[e.length]=r&255):i===143?(a=t[++x]-128,E=t[++x]-128,l=(a<<8)+E,A=I0.JISX0212_TO_UTF8_TABLE[l],A===void 0?e[e.length]=i0.FALLBACK_CHARACTER:A<65535?(e[e.length]=A>>8&255,e[e.length]=A&255):(e[e.length]=A>>16&255,e[e.length]=A>>8&255,e[e.length]=A&255)):i>=128?(l=(i-128<<8)+(t[++x]-128),A=I0.JIS_TO_UTF8_TABLE[l],A===void 0?e[e.length]=i0.FALLBACK_CHARACTER:A<65535?(e[e.length]=A>>8&255,e[e.length]=A&255):(e[e.length]=A>>16&255,e[e.length]=A>>8&255,e[e.length]=A&255)):e[e.length]=t[x]&255;return e}fe.EUCJPToUTF8=hi;function Bi(t){i0.init_JIS_TO_UTF8_TABLE();for(var e=[],x=0,n=0,i=t&&t.length,s,o,r,a,E;n>8&255,e[e.length]=E&255):(e[e.length]=E>>16&255,e[e.length]=E>>8&255,e[e.length]=E&255)):x===2?(s=t[n]+64,o=188|s>>6&3,r=128|s&63,e[e.length]=239,e[e.length]=o&255,e[e.length]=r&255):x===3?(a=(t[n]<<8)+t[++n],E=I0.JISX0212_TO_UTF8_TABLE[a],E===void 0?e[e.length]=i0.FALLBACK_CHARACTER:E<65535?(e[e.length]=E>>8&255,e[e.length]=E&255):(e[e.length]=E>>16&255,e[e.length]=E>>8&255,e[e.length]=E&255)):e[e.length]=t[n]&255}return e}fe.JISToUTF8=Bi;function di(t,e){for(var x=[],n=0,i=t&&t.length,s,o,r,a,E,l,A=e&&e.fallback;n=128?(s<=223?(a=[s,t[n+1]],E=(s<<8)+t[++n]):s<=239?(a=[s,t[n+1],t[n+2]],E=(s<<16)+(t[++n]<<8)+(t[++n]&255)):(a=[s,t[n+1],t[n+2],t[n+3]],E=(s<<24)+(t[++n]<<16)+(t[++n]<<8)+(t[++n]&255)),l=I0.UTF8_TO_JIS_TABLE[E],l==null?A?aa(x,a,A):x[x.length]=i0.FALLBACK_CHARACTER:l<255?x[x.length]=l+128:(l>65536&&(l-=65536),o=l>>8,r=l&255,o&1?(o>>=1,o<47?o+=113:o-=79,r>95?r+=32:r+=31):(o>>=1,o<=47?o+=112:o-=80,r+=126),x[x.length]=o&255,x[x.length]=r&255)):x[x.length]=t[n]&255;return x}fe.UTF8ToSJIS=di;function fi(t,e){for(var x=[],n=0,i=t&&t.length,s,o,r,a,E=e&&e.fallback;n=128?(s<=223?(o=[s,t[n+1]],r=(s<<8)+t[++n]):s<=239?(o=[s,t[n+1],t[n+2]],r=(s<<16)+(t[++n]<<8)+(t[++n]&255)):(o=[s,t[n+1],t[n+2],t[n+3]],r=(s<<24)+(t[++n]<<16)+(t[++n]<<8)+(t[++n]&255)),a=I0.UTF8_TO_JIS_TABLE[r],a==null?(a=I0.UTF8_TO_JISX0212_TABLE[r],a==null?E?aa(x,o,E):x[x.length]=i0.FALLBACK_CHARACTER:(x[x.length]=143,x[x.length]=(a>>8)-128&255,x[x.length]=(a&255)-128&255)):(a>65536&&(a-=65536),a<255?(x[x.length]=142,x[x.length]=a-128&255):(x[x.length]=(a>>8)-128&255,x[x.length]=(a&255)-128&255))):x[x.length]=t[n]&255;return x}fe.UTF8ToEUCJP=fi;function pi(t,e){for(var x=[],n=0,i=t&&t.length,s=0,o,r,a,E,l=e&&e.fallback,A=[27,40,66,27,36,66,27,40,73,27,36,40,68];s>8&255,x[x.length]=E&255)):(E>65536&&(E-=65536),E<255?(n!==2&&(n=2,x[x.length]=A[6],x[x.length]=A[7],x[x.length]=A[8]),x[x.length]=E&255):(n!==1&&(n=1,x[x.length]=A[3],x[x.length]=A[4],x[x.length]=A[5]),x[x.length]=E>>8&255,x[x.length]=E&255)));return n!==0&&(x[x.length]=A[0],x[x.length]=A[1],x[x.length]=A[2]),x}fe.UTF8ToJIS=pi;function Ux(t){for(var e=[],x=0,n=t&&t.length,i,s;x=55296&&i<=56319&&x+1=56320&&s<=57343&&(i=(i-55296)*1024+s-56320+65536,x++)),i<128?e[e.length]=i:i<2048?(e[e.length]=192|i>>6&31,e[e.length]=128|i&63):i<65536?(e[e.length]=224|i>>12&15,e[e.length]=128|i>>6&63,e[e.length]=128|i&63):i<2097152&&(e[e.length]=240|i>>18&15,e[e.length]=128|i>>12&63,e[e.length]=128|i>>6&63,e[e.length]=128|i&63);return e}fe.UNICODEToUTF8=Ux;function cx(t,e){for(var x=[],n=0,i=t&&t.length,s,o,r,a,E,l,A=e&&e.ignoreSurrogatePair;n>4,s>=0&&s<=7?l=o:s===12||s===13?(r=t[n++],l=(o&31)<<6|r&63):s===14?(r=t[n++],a=t[n++],l=(o&15)<<12|(r&63)<<6|a&63):s===15&&(r=t[n++],a=t[n++],E=t[n++],l=(o&7)<<18|(r&63)<<12|(a&63)<<6|E&63),l<=65535||A?x[x.length]=l:(l-=65536,x[x.length]=(l>>10)+55296,x[x.length]=l%1024+56320);return x}fe.UTF8ToUNICODE=cx;function L8(t,e){var x;if(e&&e.bom){var n=e.bom;sa.isString(n)||(n="BE");var i,s;n.charAt(0).toUpperCase()==="B"?(i=[254,255],s=ws(t)):(i=[255,254],s=ra(t)),x=[],x[0]=i[0],x[1]=i[1];for(var o=0,r=s.length;o>8&255,e[e.length]=i&255);return e}fe.UNICODEToUTF16BE=ws;function ra(t){for(var e=[],x=0,n=t&&t.length,i;x>8&255);return e}fe.UNICODEToUTF16LE=ra;function H8(t){var e=[],x=0,n=t&&t.length,i,s;for(n>=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(x=2);x=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(x=2);x=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(r=2),n&&(s[0]=n[0],s[1]=n[1]);for(var a,E;r=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(r=2),n&&(s[0]=n[0],s[1]=n[1]);for(var a,E;r=2&&(t[0]===254&&t[1]===255||t[0]===255&&t[1]===254)&&(x=2);x=8.10.0"},UB={type:"git",url:"https://github.com/polygonplanet/encoding.js.git"},$B="polygonplanet ",zB="MIT",GB={url:"https://github.com/polygonplanet/encoding.js/issues"},WB="https://github.com/polygonplanet/encoding.js",VB=["base64","charset","convert","detect","encoding","euc-jp","eucjp","iconv","iso-2022-jp","japanese","jis","shift_jis","sjis","unicode","urldecode","urlencode","utf-16","utf-32","utf-8"],KB={},jB={bannerify:"^1.0.1",browserify:"^17.0.0",eslint:"^8.12.0",mocha:"^9.2.2","package-json-versionify":"^1.0.4","power-assert":"^1.6.1","uglify-js":"^3.15.3",uglifyify:"^5.0.2",watchify:"^4.0.0"},qB={transform:["package-json-versionify"]},YB={name:kB,version:MB,description:OB,main:RB,files:NB,scripts:LB,engines:HB,repository:UB,author:$B,license:zB,bugs:GB,homepage:WB,keywords:VB,dependencies:KB,devDependencies:jB,browserify:qB};var JB=ia(),be=na(),yE=s0,SE=fe,Gx=gi,XB=YB.version,wE=Object.prototype.hasOwnProperty,es={version:XB,orders:JB.EncodingOrders,detect:function(t,e){if(t==null||t.length===0)return!1;be.isObject(e)&&!be.isArray(e)&&(e=e.encoding),be.isString(t)&&(t=be.stringToBuffer(t)),e==null?e=es.orders:be.isString(e)&&(e=e.toUpperCase(),e==="AUTO"?e=es.orders:~e.indexOf(",")?e=e.split(/\s*,\s*/):e=[e]);for(var x=e.length,n,i,s,o=0;o255)return encodeURIComponent(be.codeToString_fast(t));s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===33||s>=39&&s<=42||s===45||s===46||s===95||s===126?x[x.length]=s:(x[x.length]=37,s<16?(x[x.length]=48,x[x.length]=e[s]):(x[x.length]=e[s>>4&15],x[x.length]=e[s&15]))}return be.codeToString_fast(x)},urlDecode:function(t){for(var e=[],x=0,n=t&&t.length,i;x=65281&&s<=65374&&(s-=65248),x[x.length]=s;return e?be.codeToString_fast(x):x},toZenkakuCase:function(t){var e=!1;be.isString(t)&&(e=!0,t=be.stringToBuffer(t));for(var x=[],n=t&&t.length,i=0,s;i=33&&s<=126&&(s+=65248),x[x.length]=s;return e?be.codeToString_fast(x):x},toHiraganaCase:function(t){var e=!1;be.isString(t)&&(e=!0,t=be.stringToBuffer(t));for(var x=[],n=t&&t.length,i=0,s;i=12449&&s<=12534?s-=96:s===12535?(x[x.length]=12431,s=12443):s===12538&&(x[x.length]=12434,s=12443),x[x.length]=s;return e?be.codeToString_fast(x):x},toKatakanaCase:function(t){var e=!1;be.isString(t)&&(e=!0,t=be.stringToBuffer(t));for(var x=[],n=t&&t.length,i=0,s;i=12353&&s<=12438&&((s===12431||s===12434)&&i=12289&&s<=12540&&(r=Gx.HANKANA_TABLE[s],r!==void 0)){x[x.length]=r;continue}s===12532||s===12535||s===12538?(x[x.length]=Gx.HANKANA_SONANTS[s],x[x.length]=65438):s>=12459&&s<=12489?(x[x.length]=Gx.HANKANA_TABLE[s-1],x[x.length]=65438):s>=12495&&s<=12509?(o=s%3,x[x.length]=Gx.HANKANA_TABLE[s-o],x[x.length]=Gx.HANKANA_MARKS[o-1]):x[x.length]=s}return e?be.codeToString_fast(x):x},toZenkanaCase:function(t){var e=!1;be.isString(t)&&(e=!0,t=be.stringToBuffer(t));var x=[],n=t&&t.length,i=0,s,o,r;for(i=0;i65376&&s<65440&&(o=Gx.ZENKANA_TABLE[s-65377],i+165397&&s<65413||s>65417&&s<65423)?(o++,i++):r===65439&&s>65417&&s<65423&&(o+=2,i++)),s=o),x[x.length]=s;return e?be.codeToString_fast(x):x},toHankakuSpace:function(t){if(be.isString(t))return t.replace(/\u3000/g," ");for(var e=[],x=t&&t.length,n=0,i;n(t[t.PLAYER=0]="PLAYER",t[t.OPPONENT=1]="OPPONENT",t[t.RESEARCHER=2]="RESEARCHER",t[t.RESEARCHER_2=3]="RESEARCHER_2",t[t.RESEARCHER_3=4]="RESEARCHER_3",t[t.RESEARCHER_4=5]="RESEARCHER_4",t))($t||{});function QB(t){const e=/^\*評価値=([+-]?[.0-9]+)/.exec(t);return e?Number(e[1]):void 0}function ed(t){const e=/^#評価値=([+-]?[.0-9]+)/.exec(t);return e?Number(e[1]):void 0}function td(t){const e=/^\* *([+-]?[.0-9]+)/.exec(t);return e?Number(e[1]):void 0}function IE(t){t.forEach(e=>{const x=e.customData||{},n=e.comment.split(` -`);for(const i of n){const s=QB(i)||td(i);s!==void 0&&(x.playerSearchInfo={score:s});const o=ed(i);o!==void 0&&(x.researchInfo={score:o})}e.customData=x})}function xd(t){switch(t){case 0:return"*";default:return"#"}}function nd(t,e,x,n){const i=xd(e);let s="";return x.mate&&(s+=`${Math.abs(x.mate)}手詰 -`),x.score!==void 0&&(s+=M6(x.score)+` -`,s+=`${i}評価値=${x.score} -`),x.pv&&x.pv.length!==0&&(s+=`${i}読み筋=${oh(t,x.pv)} -`),x.depth&&(s+=`${i}深さ=${x.depth} -`),s&&(n!=null&&n.engineName)&&(s+=`${i}エンジン=${n.engineName} -`),s}function id(t,e){return e.split(` -`).filter(x=>x.match(/^[#*]読み筋=/)).map(x=>ah(t,x.split("=",2)[1]))}function sd(t){return v8(t.timeSeconds)+"+"+String(t.byoyomi).padStart(2,"0")}class od{constructor(){_(this,"_record",new yt);_(this,"_recordFilePath");_(this,"onChangeFilePath",()=>{});_(this,"onChangePosition",()=>{});this.bindRecordHandlers()}get record(){return this._record}get recordFilePath(){return this._recordFilePath}updateRecordFilePath(e){this._recordFilePath=e,this.onChangeFilePath(e)}clearRecordFilePath(){this._recordFilePath=void 0,this.onChangeFilePath()}reset(e){if(e){const x=new It;x.reset(e),this._record.clear(x)}else this._record.clear();this.clearRecordFilePath()}resetByCurrentPosition(){this._record.clear(this._record.position),this.clearRecordFilePath()}importRecord(e,x){let n;switch(x||(x=kh(e)),x){case Yx.SFEN:{const i=It.newBySFEN(e);n=i?new yt(i):new Error(d.failedToParseSFEN);break}case Yx.USI:n=yt.newByUSI(e);break;case Yx.KIF:n=cE(e);break;case Yx.CSA:n=uE(e);break;default:n=new Error(d.failedToDetectRecordFormat);break}if(n instanceof Error)return fE(n);this._record=n,this.bindRecordHandlers(),this.clearRecordFilePath(),IE(this._record)}importRecordFromBuffer(e,x,n){let i;if(x.match(/\.kif$/)||x.match(/\.kifu$/)){const s=x.match(/\.kif$/)?"SJIS":"UTF8";i=cE(PE(e,{encoding:s,autoDetect:n==null?void 0:n.autoDetect}))}else x.match(/\.csa$/)?i=uE(PE(e,{encoding:"UTF8",autoDetect:n==null?void 0:n.autoDetect})):i=new Error(`${d.unknownFileExtension}: ${x}`);if(i instanceof Error)return fE(i);this._record=i,this.bindRecordHandlers(),this.updateRecordFilePath(x),IE(this._record)}exportRecordAsBuffer(e,x){let n;if(e.match(/\.kif$/)||e.match(/\.kifu$/)){const i=b8(this.record,x),s=e.match(/\.kif$/)?"SJIS":"UTF8";n=TE(i,s)}else if(e.match(/\.csa$/))n=TE(w8(this.record,x),"UTF8");else return new Error(`${d.unknownFileExtension}: ${e}`);return this.updateRecordFilePath(e),n}swapNextTurn(){const e=this.record.position.clone();e.setColor(Tt(e.color)),this._record.clear(e),this.clearRecordFilePath()}changePosition(e){const x=this.record.position.clone();x.edit(e),this._record.clear(x),this.clearRecordFilePath()}changePly(e){this._record.goto(e)}changeBranch(e){return this._record.switchBranchByIndex(e)}swapWithNextBranch(){return this._record.swapWithNextBranch()}swapWithPreviousBranch(){return this._record.swapWithPreviousBranch()}removeCurrentMove(){this._record.removeCurrentMove()}removeNextMove(){this._record.removeNextMove()}updateComment(e){this._record.current.comment=e}appendComment(e,x){if(!e)return;const n=this._record.current.comment,i=this.record.current.comment?` -`:"";switch(x){case n0.NONE:break;case n0.INSERT:this._record.current.comment=e+i+n;break;case n0.APPEND:this._record.current.comment=n+i+e;break;case n0.OVERWRITE:this._record.current.comment=e;break}}appendSearchComment(e,x,n,i){let s=nd(this.record.position,e,x,i);i!=null&&i.header&&(s=i.header+` -`+s),this.appendComment(s,n)}get inCommentPVs(){return id(this.record.position,this.record.current.comment)}setGameStartMetadata(e){e.gameTitle&&this._record.metadata.setStandardMetadata(J.TITLE,e.gameTitle),e.blackName&&this._record.metadata.setStandardMetadata(J.BLACK_NAME,e.blackName),e.whiteName&&this._record.metadata.setStandardMetadata(J.WHITE_NAME,e.whiteName),this._record.metadata.setStandardMetadata(J.DATE,T8()),this._record.metadata.setStandardMetadata(J.START_DATETIME,gE()),e.timeLimit&&this._record.metadata.setStandardMetadata(J.TIME_LIMIT,sd(e.timeLimit))}setGameEndMetadata(){this._record.metadata.setStandardMetadata(J.END_DATETIME,gE())}updateSearchInfo(e,x){var i,s,o,r;const n=this.record.current.customData||{};switch(e){case 0:n.playerSearchInfo=x;break;case 1:n.opponentSearchInfo=x;break;case 2:(x.depth||0)>=(((i=n.researchInfo)==null?void 0:i.depth)||0)&&(n.researchInfo=x);break;case 3:(x.depth||0)>=(((s=n.researchInfo2)==null?void 0:s.depth)||0)&&(n.researchInfo2=x);break;case 4:(x.depth||0)>=(((o=n.researchInfo3)==null?void 0:o.depth)||0)&&(n.researchInfo3=x);break;case 5:(x.depth||0)>=(((r=n.researchInfo4)==null?void 0:r.depth)||0)&&(n.researchInfo4=x);break}this._record.current.customData=n}appendMove(e){return this._record.append(e.move,e.moveOption)?(e.elapsedMs!==void 0&&this._record.current.setElapsedMs(e.elapsedMs),!0):!1}appendMovesSilently(e,x){this.unbindRecordHandlers();try{let n=0;const i=this._record.current.ply;for(const s of e){if(!this._record.append(s,x))break;n++}return this._record.goto(i),n}finally{this.bindRecordHandlers()}}updateStandardMetadata(e){this._record.metadata.setStandardMetadata(e.key,e.value)}on(e,x){switch(e){case"changeFilePath":this.onChangeFilePath=x;break;case"changePosition":this.onChangePosition=x,this.bindRecordHandlers();break}}bindRecordHandlers(){this._record.on("changePosition",this.onChangePosition)}unbindRecordHandlers(){this._record.on("changePosition",()=>{})}}class rd{constructor(){_(this,"searchHandler")}isEngine(){return!1}async startSearch(e,x,n,i,s){this.searchHandler=s}async startPonder(){}async startMateSearch(){}async stop(){}async gameover(){}async close(){this.searchHandler=void 0}doMove(e){const x=this.searchHandler;this.searchHandler=void 0,x&&x.onMove(e)}resign(){const e=this.searchHandler;this.searchHandler=void 0,e&&e.onResign()}win(){const e=this.searchHandler;this.searchHandler=void 0,e&&e.onWin()}}const en=new rd;function ad(t,e){const x=[],n=t.clone();for(const i of e){const s=n.createMoveByUSI(i);if(!s||!n.doMove(s))break;x.push(s)}return x}class lo{constructor(e,x,n){_(this,"sessionID",0);_(this,"usi");_(this,"position");_(this,"searchHandler");_(this,"mateHandler");_(this,"ponder");_(this,"inPonder",!1);_(this,"info");_(this,"usiInfoTimeout");this.setting=e,this.timeoutSeconds=x,this.onSearchInfo=n}get name(){return this.setting.name}async launch(){this.sessionID=await Ae.usiLaunch(this.setting,this.timeoutSeconds),ax[this.sessionID]=this}isEngine(){return!0}async startSearch(e,x,n,i,s){this.clearHandlers(),this.searchHandler=s,this.usi=e.usi,this.position=e.position.clone(),this.inPonder&&this.ponder===this.usi?Ae.usiPonderHit(this.sessionID):(this.info=void 0,await Ae.usiGo(this.sessionID,this.usi,x,n,i)),this.inPonder=!1,this.ponder=void 0}async startPonder(e,x,n,i){const s=e.usi;if(!this.ponder||!this.ponder.startsWith(s)||Sx(this.setting.options[I8])!=="true")return;this.clearHandlers(),this.usi=this.ponder,this.position=e.position.clone();const r=this.position.createMoveByUSI(this.ponder.slice(s.length+1));r&&(this.position.doMove(r),this.info=void 0,this.inPonder=!0,await Ae.usiGoPonder(this.sessionID,this.ponder,x,n,i))}async startMateSearch(e,x){this.clearHandlers(),this.usi=e.usi,this.info=void 0,this.position=e.position.clone(),this.mateHandler=x,await Ae.usiGoMate(this.sessionID,this.usi)}async startResearch(e){this.clearHandlers(),this.usi=e.usi,this.info=void 0,this.position=e.position.clone(),await Ae.usiGoInfinite(this.sessionID,e.usi)}async stop(){await Ae.usiStop(this.sessionID)}async gameover(e){await Ae.usiGameover(this.sessionID,e)}async close(){this.clearHandlers(),await Ae.usiQuit(this.sessionID),delete ax[this.sessionID]}clearHandlers(){this.searchHandler=void 0,this.mateHandler=void 0}onBestMove(e,x,n){const i=this.searchHandler;if(this.clearHandlers(),!i||!this.position||e!==this.usi)return;if(x==="resign"){i.onResign();return}if(x==="win"){i.onWin();return}const s=this.position.createMoveByUSI(x);if(!s){i.onError("エンジンから不明な指し手を受信しました:"+x),i.onResign();return}if(this.ponder=n&&`${e} ${x} ${n}`,this.flushUSIInfo(),this.info&&this.info.pv&&this.info.pv.length>=1&&this.info.pv[0].equals(s)){const o={...this.info,pv:this.info.pv.slice(1)};i.onMove(s,o)}else i.onMove(s)}onCheckmate(e,x){if(e!==this.usi||!this.position)return;const n=this.mateHandler;if(this.clearHandlers(),!n)return;const i=this.position,s=[];for(const o of x){const r=i.createMoveByUSI(o);if(!r){n.onError("エンジンから不明な指し手を受信しました:"+o);return}if(s.push(r),!i.doMove(r)){n.onError("エンジンから無効な指し手を受信しました:"+o);return}}n.onCheckmate(s)}onCheckmateNotImplemented(){const e=this.mateHandler;this.clearHandlers(),e&&e.onNotImplemented()}onCheckmateTimeout(e){if(e!==this.usi||!this.position)return;const x=this.mateHandler;this.clearHandlers(),x&&x.onTimeout()}onNoMate(e){if(e!==this.usi||!this.position)return;const x=this.mateHandler;this.clearHandlers(),x&&x.onNoMate()}onUSIInfo(e,x){if(e!==this.usi||!this.position||x.multipv&&x.multipv!==1)return;const n=this.position.color===L.BLACK?1:-1,i=x.pv&&x.pv.length>=1?x.pv:x.currmove?[x.currmove]:void 0,s={usi:e,depth:x.depth,score:x.scoreCP&&x.scoreCP*n,mate:x.scoreMate&&x.scoreMate*n,pv:i&&ad(this.position,i)};this.updateUSIInfo(s)}updateUSIInfo(e){this.info=e,!this.usiInfoTimeout&&(this.usiInfoTimeout=window.setTimeout(()=>{this.flushUSIInfo()},500))}flushUSIInfo(){this.usiInfoTimeout&&(clearTimeout(this.usiInfoTimeout),this.usiInfoTimeout=void 0),this.onSearchInfo&&this.info&&this.onSearchInfo(this.info)}}const ax={};function Ed(t,e,x,n){const i=ax[t];i&&i.onBestMove(e,x,n)}function ld(t,e,x){const n=ax[t];n&&(Ge().updateUSIInfo(t,e,n.name,{pv:x}),n.onCheckmate(e,x))}function cd(t){const e=ax[t];e&&e.onCheckmateNotImplemented()}function Ad(t,e){const x=ax[t];x&&x.onCheckmateTimeout(e)}function ud(t,e){const x=ax[t];x&&x.onNoMate(e)}function kE(t,e,x){const n=ax[t];n&&(Ge().updateUSIInfo(t,e,n.name,x),n.onUSIInfo(e,x))}function Ts(t){return{async build(e,x){if(e.uri===x0)return en;if($0(e.uri)&&e.usi){const n=new lo(e.usi,t??10,x);return await n.launch(),n}throw new Error("defaultPlayerBuilder#build: 予期せぬプレイヤーURIです: "+e.uri)}}}var z0=(t=>(t.WIN="win",t.LOSE="lose",t.DRAW="draw",t))(z0||{});function ME(t,e){return{player1:{name:t,win:0},player2:{name:e,win:0},draw:0,invalid:0,total:0}}class hd{constructor(e,x,n){_(this,"state");_(this,"_setting");_(this,"startPly",0);_(this,"repeat",0);_(this,"blackPlayer");_(this,"whitePlayer");_(this,"playerBuilder",Ts());_(this,"_results",ME("",""));_(this,"lastEventID");_(this,"onSaveRecord",()=>{});_(this,"onGameNext",()=>{});_(this,"onGameEnd",()=>{});_(this,"onPieceBeat",()=>{});_(this,"onBeepShort",()=>{});_(this,"onBeepUnlimited",()=>{});_(this,"onStopBeep",()=>{});_(this,"onError",()=>{});this.recordManager=e,this.blackClock=x,this.whiteClock=n,this.state="idle",this._setting=ys(),this.lastEventID=0}on(e,x){switch(e){case"saveRecord":this.onSaveRecord=x;break;case"gameNext":this.onGameNext=x;break;case"gameEnd":this.onGameEnd=x;break;case"pieceBeat":this.onPieceBeat=x;break;case"beepShort":this.onBeepShort=x;break;case"beepUnlimited":this.onBeepUnlimited=x;break;case"stopBeep":this.onStopBeep=x;break;case"error":this.onError=x;break}return this}get setting(){return this._setting}get results(){return this._results}async startGame(e,x){if(this.state!=="idle")throw Error("GameManager#startGame: 前回の対局が正常に終了できていません。アプリを再起動してください。");this._setting=e,this.playerBuilder=x,this.repeat=0,e.startPosition||(this.startPly=this.recordManager.record.current.ply),this._results=ME(e.black.name,e.white.name),await this.nextGame()}async nextGame(){this.repeat++,this.setting.startPosition?this.recordManager.reset(this.setting.startPosition):this.recordManager.record.current.ply!==this.startPly&&(this.recordManager.changePly(this.startPly),this.recordManager.removeNextMove()),this.recordManager.setGameStartMetadata({gameTitle:this.setting.repeat>=2?`連続対局 ${this.repeat}/${this.setting.repeat}`:void 0,blackName:this.setting.black.name,whiteName:this.setting.white.name,timeLimit:this.setting.timeLimit});const e={timeMs:this.setting.timeLimit.timeSeconds*1e3,byoyomi:this.setting.timeLimit.byoyomi,increment:this.setting.timeLimit.increment,onBeepShort:()=>this.onBeepShort(),onBeepUnlimited:()=>this.onBeepUnlimited(),onStopBeep:()=>this.onStopBeep()};this.blackClock.setup({...e,onTimeout:()=>{this.timeout(L.BLACK)}}),this.whiteClock.setup({...e,onTimeout:()=>{this.timeout(L.WHITE)}});try{this.blackPlayer=await this.playerBuilder.build(this.setting.black,x=>this.recordManager.updateSearchInfo($t.OPPONENT,x)),this.whitePlayer=await this.playerBuilder.build(this.setting.white,x=>this.recordManager.updateSearchInfo($t.OPPONENT,x))}catch(x){try{await this.closePlayers()}catch(n){this.onError(n)}throw x}this.state="active",this.onGameNext(),setTimeout(()=>this.nextMove())}nextMove(){if(this.state!=="active")return;if(this._setting.maxMoves&&this.recordManager.record.current.ply>=this._setting.maxMoves){this.endGame(Ee.IMPASS);return}this.getActiveClock().start();const e=this.recordManager.record.position.color,x=this.getPlayer(e),n=this.getPlayer(Tt(e));if(!x||!n){this.onError(new Error("GameManager#nextMove: プレイヤーが初期化されていません。"));return}const i=this.issueEventID();x.startSearch(this.recordManager.record,this.setting.timeLimit,this.blackClock.timeMs,this.whiteClock.timeMs,{onMove:(s,o)=>this.onMove(i,s,o),onResign:()=>this.onResign(i),onWin:()=>this.onWin(i),onError:s=>this.onError(s)}).catch(s=>{this.onError(new Error(`GameManager#nextMove: ${d.failedToSendGoCommand}: ${s}`))}),n.startPonder(this.recordManager.record,this.setting.timeLimit,this.blackClock.timeMs,this.whiteClock.timeMs).catch(s=>{this.onError(new Error(`GameManager#nextMove: ${d.failedToSendPonderCommand}: ${s}`))})}onMove(e,x,n){if(e!==this.lastEventID){Ae.log(lt.ERROR,"GameManager#onMove: event ID already disabled");return}if(this.state!=="active"){Ae.log(lt.ERROR,"GameManager#onMove: invalid state: "+this.state);return}if(!this.recordManager.record.position.isValidMove(x)){this.onError("反則手: "+Rx(this.recordManager.record.position,x)),this.endGame(Ee.FOUL_LOSE);return}this.getActiveClock().stop(),this.recordManager.appendMove({move:x,moveOption:{ignoreValidation:!0},elapsedMs:this.getActiveClock().elapsedMs}),n&&this.recordManager.updateSearchInfo($t.PLAYER,n),n&&this.setting.enableComment&&this.recordManager.appendSearchComment($t.PLAYER,n,n0.APPEND),this.onPieceBeat();const i=this.recordManager.record.perpetualCheck;if(i)if(i===this.recordManager.record.position.color){this.endGame(Ee.FOUL_LOSE);return}else{this.endGame(Ee.FOUL_WIN);return}else if(this.recordManager.record.repetition){this.endGame(Ee.REPETITION_DRAW);return}this.nextMove()}onResign(e){if(e!==this.lastEventID){Ae.log(lt.ERROR,"GameManager#onResign: event ID already disabled");return}if(this.state!=="active"){Ae.log(lt.ERROR,"GameManager#onResign: invalid state: "+this.state);return}this.endGame(Ee.RESIGN)}onWin(e){if(e!==this.lastEventID){Ae.log(lt.ERROR,"GameManager#onWin: event ID already disabled");return}if(this.state!=="active"){Ae.log(lt.ERROR,"GameManager#onWin: invalid state: "+this.state);return}this.endGame(Ee.ENTERING_OF_KING)}timeout(e){this.onStopBeep();const x=this.getPlayer(e);if(x&&x.isEngine()&&!this.setting.enableEngineTimeout){x.stop().catch(n=>{this.onError(new Error(`GameManager#timeout: ${d.failedToSendStopCommand}: ${n}`))});return}this.endGame(Ee.TIMEOUT)}endGame(e){if(this.state!=="active"&&this.state!=="pending")return;this.state="bussy";const x=this.recordManager.record.position.color;Promise.resolve().then(()=>this.sendGameResults(x,e)).then(()=>this.closePlayers()).then(()=>{if(this.getActiveClock().pause(),this.recordManager.appendMove({move:e,elapsedMs:this.getActiveClock().elapsedMs}),this.recordManager.setGameEndMetadata(),this.addGameResults(x,e),this.state="idle",this._setting.enableAutoSave&&this.onSaveRecord(),e===Ee.INTERRUPT||this.repeat>=this.setting.repeat){this.onGameEnd(this.results,e);return}this.setting.swapPlayers&&this.swapPlayers(),this.nextGame().catch(i=>{this.onError(i)})}).catch(n=>{this.onError(n),this.state="pending"})}addGameResults(e,x){switch(yo(e,L.BLACK,x)){case z0.WIN:this._results.player1.win++;break;case z0.LOSE:this._results.player2.win++;break;case z0.DRAW:this._results.draw++;break;default:this._results.invalid++;break}this._results.total++}swapPlayers(){this._setting={...this.setting,black:this.setting.white,white:this.setting.black},this._results={...this.results,player1:this.results.player2,player2:this.results.player1}}async sendGameResults(e,x){if(this.blackPlayer){const n=yo(e,L.BLACK,x);n&&await this.blackPlayer.gameover(n)}if(this.whitePlayer){const n=yo(e,L.WHITE,x);n&&await this.whitePlayer.gameover(n)}}async closePlayers(){this.blackPlayer&&(await this.blackPlayer.close(),this.blackPlayer=void 0),this.whitePlayer&&(await this.whitePlayer.close(),this.whitePlayer=void 0)}getPlayer(e){switch(e){case L.BLACK:return this.blackPlayer;case L.WHITE:return this.whitePlayer}}getActiveClock(){switch(this.recordManager.record.position.color){case L.BLACK:return this.blackClock;case L.WHITE:return this.whiteClock}}issueEventID(){return this.lastEventID+=1,this.lastEventID}}function yo(t,e,x){switch(x){case Ee.FOUL_WIN:case Ee.ENTERING_OF_KING:return t==e?z0.WIN:z0.LOSE;case Ee.RESIGN:case Ee.MATE:case Ee.TIMEOUT:case Ee.FOUL_LOSE:return t==e?z0.LOSE:z0.WIN;case Ee.IMPASS:case Ee.REPETITION_DRAW:return z0.DRAW}return null}class Bd{constructor(){_(this,"count",0)}get isBussy(){return this.count!==0}retain(){this.count+=1}release(){this.count-=1}}function dd(t,e){const x=t.clone();let n,i="";for(const s of e){const o=x.createMoveByUSI(s);if(!o)break;i+=Rx(x,o,{prev:n}),x.doMove(o,{ignoreValidation:!0}),n=o}return i}class G8{constructor(e,x){_(this,"sfen","");_(this,"nodes");_(this,"nps");_(this,"iterates",[]);_(this,"hashfull");_(this,"currentMove");_(this,"currentMoveText");_(this,"ponderMove");this.sessionID=e,this.name=x}get latestIteration(){const e=[],x=new Set,n=new Set;for(const i of this.iterates){const s=i.pv?i.pv[0]:void 0;!x.has(i.multiPV)&&!n.has(s)&&(e.push(i),x.add(i.multiPV),n.add(s))}return e.sort((i,s)=>(i.multiPV||1)-(s.multiPV||1))}update(e,x,n){this.sfen!==e&&(this.sfen=e,this.nodes=void 0,this.nps=void 0,this.iterates=[],this.hashfull=void 0,this.currentMove=void 0,this.currentMoveText=void 0,this.ponderMove=void 0);const i=It.newBySFEN(e);if(!i)return;const s={position:e,color:i.color};if(x.depth!==void 0&&(s.depth=x.depth),x.seldepth!==void 0&&(s.selectiveDepth=x.seldepth),x.timeMs!==void 0&&(s.timeMs=x.timeMs),x.nodes!==void 0&&(this.nodes=x.nodes),x.pv&&(s.pv=x.pv,s.text=dd(i,x.pv)),x.multipv!==void 0&&(s.multiPV=x.multipv),x.scoreCP!==void 0&&(s.score=x.scoreCP),x.scoreMate!==void 0&&(s.scoreMate=x.scoreMate),x.lowerbound!==void 0&&(s.lowerBound=x.lowerbound),x.upperbound!==void 0&&(s.upperBound=x.upperbound),x.currmove!==void 0){this.currentMove=x.currmove;const o=i.createMoveByUSI(x.currmove);o&&(this.currentMoveText=Rx(i,o))}x.hashfullPerMill!==void 0&&(this.hashfull=x.hashfullPerMill/1e3),x.nps!==void 0&&(this.nps=x.nps),x.string&&(s.text=x.string),Object.keys(s).length!==0&&(x.nodes!==void 0&&(s.nodes=x.nodes),this.iterates.unshift(s)),this.ponderMove=n&&Rx(i,n)}}class fd{constructor(){_(this,"_sessions",[]);_(this,"updateQueue",[]);_(this,"timeoutHandle")}get sessions(){return this._sessions}clear(){this._sessions=[],this.updateQueue=[],this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0)}update(e,x,n,i,s){this.updateQueue.push({sessionID:e,sfen:x.sfen,name:n,info:i,ponderMove:s}),this.timeoutHandle||(this.timeoutHandle=window.setTimeout(()=>{this.dequeue()},500))}dequeue(){for(const e of this.updateQueue)this._update(e);this.updateQueue=[],this.timeoutHandle=void 0}_update(e){let x=this._sessions.find(n=>n.sessionID===e.sessionID);x||(x=this.addSession(e.sessionID,e.name)),x.update(e.sfen,e.info,e.ponderMove)}addSession(e,x){const n=new G8(e,x);return this.sessions.push(n),this.sessions.sort((i,s)=>i.sessionID-s.sessionID),n}}var $=(t=>(t.NORMAL="normal",t.PASTE_DIALOG="pasteDialog",t.POSITION_EDITING="positionEditing",t.EXPORT_POSITION_IMAGE_DIALOG="exportBoardImageDialog",t.GAME_DIALOG="gameDialog",t.GAME="game",t.CSA_GAME_DIALOG="csaGameDialog",t.CSA_GAME="csaGame",t.RESEARCH="research",t.RESEARCH_DIALOG="researchDialog",t.ANALYSIS="analysis",t.ANALYSIS_DIALOG="analysisDialog",t.MATE_SEARCH="mateSearch",t.MATE_SEARCH_DIALOG="mateSearchDialog",t.USI_ENGINE_SETTING_DIALOG="usiEngineSettingDialog",t))($||{});class pd{constructor(){_(this,"_queue",[])}get message(){return this._queue[0]}get hasMessage(){return this._queue.length!==0}enqueue(e){this._queue.push(e)}dequeue(){this._queue.shift()}}class gd{constructor(){_(this,"errorCounts",{})}get errors(){return Object.entries(this.errorCounts).sort(([e],[x])=>ex?1:0).map(([e,x])=>({message:e,count:x}))}get hasError(){return!!Object.keys(this.errorCounts).length}add(e){const x=e instanceof Error?e.message:""+e,n=this.errorCounts[x]||0;this.errorCounts[x]=n+1}clear(){this.errorCounts={}}}class md{constructor(){_(this,"setting",ar())}get raw(){return this.setting}get language(){return this.setting.language}get thema(){return this.setting.thema}get pieceImage(){return this.setting.pieceImage}get backgroundImageType(){return this.setting.backgroundImageType}get backgroundImageFileURL(){return this.setting.backgroundImageFileURL}get boardImage(){return this.setting.boardImage}get croppedPieceImageBaseURL(){return this.setting.croppedPieceImageBaseURL}get pieceImageFileURL(){return this.setting.pieceImageFileURL}get boardImageFileURL(){return this.setting.boardImageFileURL}get pieceStandImage(){return this.setting.pieceStandImage}get pieceStandImageFileURL(){return this.setting.pieceStandImageFileURL}get boardLabelType(){return this.setting.boardLabelType}get leftSideControlType(){return this.setting.leftSideControlType}get rightSideControlType(){return this.setting.rightSideControlType}get pieceVolume(){return this.setting.pieceVolume}get clockVolume(){return this.setting.clockVolume}get clockPitch(){return this.setting.clockPitch}get clockSoundTarget(){return this.setting.clockSoundTarget}get boardFlipping(){return this.setting.boardFlipping}get tabPaneType(){return this.setting.tabPaneType}get tab(){return this.setting.tab}get tab2(){return this.setting.tab2}get topPaneHeightPercentage(){return this.setting.topPaneHeightPercentage}get topPanePreviousHeightPercentage(){return this.setting.topPanePreviousHeightPercentage}get bottomLeftPaneWidthPercentage(){return this.setting.bottomLeftPaneWidthPercentage}get textDecodingRule(){return this.setting.textDecodingRule}get returnCode(){return this.setting.returnCode}get autoSaveDirectory(){return this.setting.autoSaveDirectory}get translateEngineOptionName(){return this.setting.translateEngineOptionName}get engineTimeoutSeconds(){return this.setting.engineTimeoutSeconds}get evaluationViewFrom(){return this.setting.evaluationViewFrom}get coefficientInSigmoid(){return this.setting.coefficientInSigmoid}get badMoveLevelThreshold1(){return this.setting.badMoveLevelThreshold1}get badMoveLevelThreshold2(){return this.setting.badMoveLevelThreshold2}get badMoveLevelThreshold3(){return this.setting.badMoveLevelThreshold3}get badMoveLevelThreshold4(){return this.setting.badMoveLevelThreshold4}get showElapsedTimeInRecordView(){return this.setting.showElapsedTimeInRecordView}get showCommentInRecordView(){return this.setting.showCommentInRecordView}get enableAppLog(){return this.setting.enableAppLog}get enableUSILog(){return this.setting.enableUSILog}get enableCSALog(){return this.setting.enableCSALog}get logLevel(){return this.setting.logLevel}get positionImageStyle(){return this.setting.positionImageStyle}get positionImageSize(){return this.setting.positionImageSize}get positionImageHeader(){return this.setting.positionImageHeader}get lastRecordFilePath(){return this.setting.lastRecordFilePath}get lastUSIEngineFilePath(){return this.setting.lastUSIEngineFilePath}get lastImageExportFilePath(){return this.setting.lastImageExportFilePath}get lastOtherFilePath(){return this.setting.lastOtherFilePath}get emptyRecordInfoVisibility(){return this.setting.emptyRecordInfoVisibility}async loadAppSetting(){this.setting=await Ae.loadAppSetting()}async updateAppSetting(e){const x=Nh(this.setting,e);if(x instanceof Error)throw x;await Ae.saveAppSetting(x),this.setting=x}flipBoard(){this.setting.boardFlipping=!this.setting.boardFlipping,Ae.saveAppSetting(this.setting)}}function Cd(){return F0(new md)}let So;function Pe(){return So||(So=Cd()),So}class Fd{constructor(e){_(this,"researcher");_(this,"setting",Er());_(this,"ply");_(this,"actualMove");_(this,"lastSearchInfo");_(this,"searchInfo");_(this,"timerHandle");_(this,"onFinish",()=>{});_(this,"onError",()=>{});this.recordManager=e}on(e,x){switch(e){case"finish":this.onFinish=x;break;case"error":this.onError=x;break}return this}async start(e){if(!e.usi)throw new Error("エンジンが設定されていません。");await this.setupEngine(e.usi),this.setting=e,this.ply=void 0,this.actualMove=void 0,this.lastSearchInfo=void 0,this.searchInfo=void 0,setTimeout(()=>this.next())}close(){this.clearTimer(),this.closeEngine().catch(e=>{this.onError(e)})}async setupEngine(e){if(this.researcher)throw new Error("AnalysisManager#setupEngine: 前回のエンジンが終了していません。数秒待ってからもう一度試してください。");const x=Pe(),n=new lo(e,x.engineTimeoutSeconds,this.updateSearchInfo.bind(this));await n.launch(),this.researcher=n}async closeEngine(){this.researcher&&(await this.researcher.close(),this.researcher=void 0)}next(){if(this.clearTimer(),!this.researcher){this.onError(new Error("エンジンが初期化されていません。")),this.finish();return}if(this.lastSearchInfo=this.searchInfo,this.searchInfo=void 0,this.ply!==void 0?this.ply=this.ply+1:this.setting.startCriteria.enableNumber?this.ply=this.setting.startCriteria.number-1:this.ply=0,this.setting.endCriteria.enableNumber&&this.ply>=this.setting.endCriteria.number){this.finish();return}this.recordManager.changePly(this.ply);const e=this.recordManager.record;if(e.current.ply!==this.ply){this.finish();return}if(!e.current.next&&!(e.current.move instanceof tt)){this.finish();return}this.actualMove=e.current.move instanceof tt?e.current.move:void 0,this.setTimer(),this.researcher.startResearch(e).catch(x=>{this.onError(x)})}finish(){this.onFinish(),this.close()}setTimer(){this.timerHandle=window.setTimeout(()=>{this.onResult(),this.next()},this.setting.perMoveCriteria.maxSeconds*1e3)}clearTimer(){this.timerHandle&&(clearTimeout(this.timerHandle),this.timerHandle=void 0)}onResult(){var E;if(!this.searchInfo||!this.lastSearchInfo)return;const e=this.recordManager.record,n=Tt(e.position.color)===L.BLACK?1:-1,i=this.searchInfo.score!==void 0?this.searchInfo.score*n:void 0,s=this.searchInfo.score!==void 0&&this.lastSearchInfo.score!==void 0?(this.searchInfo.score-this.lastSearchInfo.score)*n:void 0,o=this.actualMove&&this.lastSearchInfo.pv?this.actualMove.equals(this.lastSearchInfo.pv[0]):void 0,r=Pe();let a="";if(s!==void 0&&i!==void 0&&!o){const l=Dd(i-s,i,r);l&&(a=`【${l}】`)}this.recordManager.appendSearchComment($t.RESEARCHER,this.searchInfo,this.setting.commentBehavior,{header:a,engineName:(E=this.setting.usi)==null?void 0:E.name})}updateSearchInfo(e){this.recordManager.updateSearchInfo($t.RESEARCHER,e),this.searchInfo=e}}function Dd(t,e,x){const n=cr(t,x.coefficientInSigmoid)-cr(e,x.coefficientInSigmoid);return n>=x.badMoveLevelThreshold4?d.blunder:n>=x.badMoveLevelThreshold3?d.mistake:n>=x.badMoveLevelThreshold2?d.dubious:n>=x.badMoveLevelThreshold1?d.inaccuracy:null}function _d(){return{id:"",myColor:L.BLACK,toMove:L.BLACK,position:"",timeUnitMs:1e3,totalTime:0,byoyomi:0,delay:0,increment:0}}var O0=(t=>(t.UNKNOWN="unknown",t.RESIGN="resign",t.SENNICHITE="sennichite",t.OUTE_SENNICHITE="oute_sennichite",t.ILLEGAL_MOVE="illegal_move",t.ILLEGAL_ACTION="illegal_action",t.TIME_UP="time_up",t.JISHOGI="jishogi",t.MAX_MOVES="max_moves",t))(O0||{}),ts=(t=>(t.WIN="win",t.LOSE="lose",t.DRAW="draw",t.CENSORED="censored",t.CHUDAN="chudan",t))(ts||{});const W8=10;var l0=(t=>(t[t.OFFLINE=0]="OFFLINE",t[t.WAITING_LOGIN=1]="WAITING_LOGIN",t[t.LOGIN_FAILED=2]="LOGIN_FAILED",t[t.LOGIN_RETRY_INTERVAL=3]="LOGIN_RETRY_INTERVAL",t[t.READY=4]="READY",t[t.GAME=5]="GAME",t))(l0||{});class vd{constructor(e,x,n){_(this,"_state",0);_(this,"_setting",b6());_(this,"sessionID",0);_(this,"stopRequested",!1);_(this,"repeat",0);_(this,"player");_(this,"gameSummary",_d());_(this,"searchInfo");_(this,"playerBuilder",Ts());_(this,"retryTimer");_(this,"onSaveRecord",()=>{});_(this,"onGameNext",()=>{});_(this,"onGameEnd",()=>{});_(this,"onFlipBoard",()=>{});_(this,"onPieceBeat",()=>{});_(this,"onBeepShort",()=>{});_(this,"onBeepUnlimited",()=>{});_(this,"onStopBeep",()=>{});_(this,"onError",()=>{});this.recordManager=e,this.blackClock=x,this.whiteClock=n}on(e,x){switch(e){case"saveRecord":this.onSaveRecord=x;break;case"gameNext":this.onGameNext=x;break;case"gameEnd":this.onGameEnd=x;break;case"flipBoard":this.onFlipBoard=x;break;case"pieceBeat":this.onPieceBeat=x;break;case"beepShort":this.onBeepShort=x;break;case"beepUnlimited":this.onBeepUnlimited=x;break;case"stopBeep":this.onStopBeep=x;break;case"error":this.onError=x;break}return this}get state(){return this._state}get setting(){return this._setting}get isMyTurn(){return this.recordManager.record.position.color===this.gameSummary.myColor}login(e,x){return this.sessionID?Promise.reject(new Error("CSAGameManager#start: session already exists")):this._state!==0?Promise.reject(new Error("CSAGameManager#start: unexpected state")):(this._setting=e,this.playerBuilder=x,this.repeat=0,this.relogin())}async relogin(){this._state=1;try{this.player=await this.playerBuilder.build(this._setting.player,x=>this.recordManager.updateSearchInfo($t.OPPONENT,x));const e=await Ae.csaLogin(this._setting.server);this.sessionID=e,this._state=4,bd(this.sessionID,this),this.onGameNext()}catch(e){throw this._state=2,this.close(1),e}}stop(){this.sessionID&&(this.stopRequested=!0,Ae.csaStop(this.sessionID))}logout(){this.close(0)}close(e){if(!(this._state===0||this._state===1)){if(this.stopRequested&&(e=0,this.stopRequested=!1),this.sessionID&&(yd(this.sessionID),Ae.csaLogout(this.sessionID).catch(this.onError),this.sessionID=0),this.player&&(this.player.close().catch(this.onError),this.player=void 0),this.blackClock.stop(),this.whiteClock.stop(),this._state=0,this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=void 0),e===0||this.repeat>=this.setting.repeat){this.onGameEnd();return}e===2?this.relogin().catch(this.onError):(this._state=3,this.retryTimer=setTimeout(()=>this.relogin().catch(this.onError),W8*1e3))}}onGameSummary(e){this.gameSummary=e;const x=this.recordManager.importRecord(this.gameSummary.position,Yx.CSA);if(x){this.onError(`CSAGameManager#onGameSummary: ${x}`),this.close(0);return}Ae.csaAgree(this.sessionID,this.gameSummary.id)}onReject(){this.close(1)}onStart(e){this.repeat++,this.recordManager.setGameStartMetadata({gameTitle:this.gameSummary.id,blackName:this.gameSummary.blackPlayerName,whiteName:this.gameSummary.whitePlayerName,timeLimit:{timeSeconds:this.gameSummary.totalTime*this.gameSummary.timeUnitMs/1e3,byoyomi:this.gameSummary.byoyomi*this.gameSummary.timeUnitMs/1e3,increment:this.gameSummary.increment*this.gameSummary.timeUnitMs/1e3}}),this.setting.autoFlip&&this.onFlipBoard&&this.onFlipBoard(this.gameSummary.myColor===L.WHITE),this._state=5,this.next(e)}onMove(e,x){const n=this.isMyTurn,i=wh(this.recordManager.record.position,e);if(i instanceof Error){this.onError(`CSAGameManager#onMove: 解釈できない指し手 [${e}]: ${i.message}`);return}this.recordManager.appendMove({move:i,moveOption:{ignoreValidation:!0},elapsedMs:this.parseElapsedMs(e)}),n&&this.searchInfo&&this.recordManager.updateSearchInfo($t.PLAYER,this.searchInfo),n&&this.searchInfo&&this.setting.enableComment&&this.recordManager.appendSearchComment($t.PLAYER,this.searchInfo,n0.APPEND),this.onPieceBeat(),this.next(x)}parseElapsedMs(e){const x=/^.*,T([0-9]+)$/.exec(e);return x?Number(parseInt(x[1]))*this.gameSummary.timeUnitMs:0}onGameResult(e,x){this.recordManager.appendMove({move:this.gameResultToSpecialMove(e,x)}),this.setting.enableAutoSave&&this.onSaveRecord(),this.close(2)}gameResultToSpecialMove(e,x){const n=this.recordManager.record.position.color;switch(e){case O0.RESIGN:return Ee.RESIGN;case O0.SENNICHITE:return Ee.REPETITION_DRAW;case O0.OUTE_SENNICHITE:case O0.ILLEGAL_MOVE:case O0.ILLEGAL_ACTION:switch(x){case ts.WIN:return n===this.gameSummary.myColor?Ee.FOUL_WIN:Ee.FOUL_LOSE;case ts.LOSE:return n===this.gameSummary.myColor?Ee.FOUL_LOSE:Ee.FOUL_WIN}break;case O0.TIME_UP:return Ee.TIMEOUT;case O0.JISHOGI:return Ee.ENTERING_OF_KING;case O0.MAX_MOVES:return Ee.IMPASS}return x===ts.DRAW?Ee.DRAW:Ee.INTERRUPT}onClose(){this.close(this.setting.autoRelogin?1:0)}next(e){this.blackClock.stop(),this.whiteClock.stop(),this.syncClock(e),this.startClock(),this.recordManager.record.position.color===this.gameSummary.myColor?this.startSearch(e):this.startPonder()}syncClock(e){const x={byoyomi:this.gameSummary.byoyomi*this.gameSummary.timeUnitMs/1e3,onBeepShort:()=>this.onBeepShort(),onBeepUnlimited:()=>this.onBeepUnlimited(),onStopBeep:()=>this.onStopBeep()};this.blackClock.setup({...x,timeMs:e.black.time*this.gameSummary.timeUnitMs}),this.whiteClock.setup({...x,timeMs:e.white.time*this.gameSummary.timeUnitMs})}startClock(){this.recordManager.record.position.color===L.BLACK?this.blackClock.start():this.whiteClock.start()}startSearch(e){if(!this.player){this.onError("CSAGameManager#startSearch: player is not initialized");return}this.player.startSearch(this.recordManager.record,this.buildTimeLimitSetting(),e.black.time*this.gameSummary.timeUnitMs,e.white.time*this.gameSummary.timeUnitMs,{onMove:this.onPlayerMove.bind(this),onResign:this.onPlayerResign.bind(this),onWin:this.onPlayerWin.bind(this),onError:this.onPlayerError.bind(this)}).catch(x=>{this.onError(new Error(`CSAGameManager#next: ${d.failedToSendGoCommand}: ${x}`))})}startPonder(){if(!this.player){this.onError("CSAGameManager#startPonder: player is not initialized");return}this.player.startPonder(this.recordManager.record,this.buildTimeLimitSetting(),this.blackClock.timeMs,this.whiteClock.timeMs).catch(e=>{this.onError(new Error(`CSAGameManager#next: ${d.failedToSendPonderCommand}: ${e}`))})}buildTimeLimitSetting(){const e=this.gameSummary.totalTime*this.gameSummary.timeUnitMs/1e3,x=this.gameSummary.byoyomi*this.gameSummary.timeUnitMs/1e3,n=this.gameSummary.increment*this.gameSummary.timeUnitMs/1e3;return{timeSeconds:e,byoyomi:x,increment:n}}onPlayerMove(e,x){this.searchInfo=x;let n,i;switch(this._setting.server.protocolVersion){case wx.V121:break;case wx.V121_FLOODGATE:if(n=x==null?void 0:x.score,x!=null&&x.pv)for(const s of x.pv)i=i?i+" ":"",i+=dE(s);break}Ae.csaMove(this.sessionID,dE(e),n,i)}onPlayerResign(){Ae.csaResign(this.sessionID)}onPlayerWin(){Ae.csaWin(this.sessionID)}onPlayerError(e){this.onError(e)}}const Ax={};function bd(t,e){Ax[t]=e}function yd(t){delete Ax[t]}function Sd(t,e){const x=Ax[t];x&&x.onGameSummary(e)}function wd(t){const e=Ax[t];e&&e.onReject()}function Td(t,e){const x=Ax[t];x&&x.onStart(e)}function Pd(t,e,x){const n=Ax[t];n&&n.onMove(e,x)}function Id(t,e,x){const n=Ax[t];n&&n.onGameResult(e,x)}function kd(t){const e=Ax[t];e&&e.onClose()}class OE{constructor(){_(this,"setting",{timeMs:0,byoyomi:0,increment:0});_(this,"_timeMs",0);_(this,"_byoyomi",0);_(this,"_elapsedMs",0);_(this,"timerHandle",0);_(this,"timerStart",0);_(this,"lastTimeMs",0)}setup(e){this.setting=e,this._timeMs=e.timeMs||0,this._byoyomi=e.byoyomi||0,this._elapsedMs=0}get time(){return Math.ceil(this._timeMs/1e3)}get timeMs(){return this._timeMs}get byoyomi(){return this._byoyomi}get elapsedMs(){return this._elapsedMs}start(){this.clearTimer(),this.timerStart=Date.now(),this.lastTimeMs=this._timeMs,this._byoyomi=this.setting.byoyomi||0,this._elapsedMs=0,this.timerHandle=window.setInterval(()=>{const e=this.timeMs,x=this.byoyomi;this._elapsedMs=Date.now()-this.timerStart;const n=this.lastTimeMs-this._elapsedMs;if(n>=0?this._timeMs=n:(this._timeMs=0,this._byoyomi=Math.max(Math.ceil((this.setting.byoyomi||0)+n/1e3),0)),this.timeMs===0&&this.byoyomi===0){this.timeout();return}this.fireBeep(e,x)},100)}fireBeep(e,x){let n=Math.ceil(this.timeMs/1e3),i=Math.ceil(e/1e3);if(!(n!==0&&this.byoyomi!==0)){if(n===0&&i!==0){this.setting.onBeepShort&&this.setting.onBeepShort();return}this.byoyomi!==0&&(n=this.byoyomi,i=x),n!==i&&(n<=5?this.setting.onBeepUnlimited&&this.setting.onBeepUnlimited():(n<=10||n===20||n===30||n===60)&&this.setting.onBeepShort&&this.setting.onBeepShort())}}pause(){this.clearTimer()}stop(){this.clearTimer(),this.incrementTime()}timeout(){this.clearTimer(),this.setting.onTimeout&&this.setting.onTimeout()}clearTimer(){this.timerHandle&&(window.clearInterval(this.timerHandle),this.timerHandle=0),this.setting.onStopBeep&&this.setting.onStopBeep()}incrementTime(){this._timeMs+=(this.setting.increment||0)*1e3}}class Un{constructor(){_(this,"func");_(this,"timeout")}after(e,x){this.func=e,!this.timeout&&(this.timeout=setTimeout(this.invoke.bind(this),x))}invoke(){this.func&&this.func(),this.clear()}clear(){this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0),this.func=void 0}}function Md(t){switch(t){case 0:return $t.RESEARCHER;case 1:return $t.RESEARCHER_2;case 2:return $t.RESEARCHER_3;case 3:return $t.RESEARCHER_4;default:return}}class Od{constructor(){_(this,"setting",Ss());_(this,"engines",[]);_(this,"onUpdateSearchInfo",()=>{});_(this,"onError",()=>{});_(this,"lazyPositionUpdate",new Un);_(this,"maxSecondsTimer")}on(e,x){switch(e){case"updateSearchInfo":this.onUpdateSearchInfo=x;break;case"error":this.onError=x;break}return this}async launch(e){var i;if(this.setting=e,e.usi===void 0)throw new Error("ResearchManager#launch: USIエンジンの設定は必須です。");for(const s of e.secondaries||[])if(s.usi===void 0)throw new Error("ResearchManager#launch: USIエンジンの設定は必須です。");if(this.engines.length>0)throw new Error("ResearchManager#launch: 前回のエンジンが終了していません。数秒待ってからもう一度試してください。");const x=Pe(),n=[e.usi,...((i=e.secondaries)==null?void 0:i.map(s=>s.usi))||[]].filter(s=>!!s);this.engines=n.map((s,o)=>{const r=Md(o);return new lo(s,x.engineTimeoutSeconds,a=>{r!==void 0&&this.onUpdateSearchInfo(r,a)})});try{await Promise.all(this.engines.map(s=>s.launch()))}catch(s){throw this.close(),s}}updatePosition(e){this.lazyPositionUpdate.after(()=>{clearTimeout(this.maxSecondsTimer),this.engines.forEach(x=>x.startResearch(e)),this.setting.enableMaxSeconds&&this.setting.maxSeconds>0&&(this.maxSecondsTimer=setTimeout(()=>{this.stopAll()},this.setting.maxSeconds*1e3))},200)}stopAll(){clearTimeout(this.maxSecondsTimer),Promise.all(this.engines.map(e=>e.stop())).catch(e=>{this.onError(e)})}close(){this.lazyPositionUpdate.clear(),clearTimeout(this.maxSecondsTimer),Promise.allSettled(this.engines.map(e=>e.close())).then(()=>{this.engines=[]}).catch(e=>{this.onError(e)})}}class Rd{constructor(){_(this,"engine",null);_(this,"onNotImplemented",()=>{});_(this,"onCheckmate",()=>{});_(this,"onTimeout",()=>{});_(this,"onNoMate",()=>{});_(this,"onError",()=>{})}on(e,x){switch(e){case"checkmate":this.onCheckmate=x;break;case"notImplemented":this.onNotImplemented=x;break;case"timeout":this.onTimeout=x;break;case"noMate":this.onNoMate=x;break;case"error":this.onError=x;break}return this}async start(e,x){if(e.usi===void 0)throw new Error("MateSearchManager#start: USIエンジンの設定は必須です。");const n=Pe();this.engine=new lo(e.usi,n.engineTimeoutSeconds);try{await this.engine.launch()}catch(i){throw this.close(),i}this.engine.startMateSearch(x,{onCheckmate:i=>{this.close(),this.onCheckmate(i)},onNotImplemented:()=>{this.close(),this.onNotImplemented()},onTimeout:()=>{this.close(),this.onTimeout()},onNoMate:()=>{this.close(),this.onNoMate()},onError:i=>{this.close(),this.onError(i)}})}close(){this.engine&&this.engine.close().then(()=>{this.engine=null}).catch(e=>{this.onError(e)})}}function RE(t){const e=t.total-t.invalid;return[{type:"list",items:[{text:t.player1.name,children:[`勝ち数: ${t.player1.win}`,`勝率: ${iE(t.player1.win,e,1)}`]},{text:t.player2.name,children:[`勝ち数: ${t.player2.win}`,`勝率: ${iE(t.player2.win,e,1)}`]},{text:`引き分け: ${t.draw}`},{text:`有効対局数: ${e}`},{text:`無効対局数: ${t.invalid}`}]}]}class Nd{constructor(){_(this,"onChangeFilePath",[]);_(this,"_bussy",new Bd);_(this,"_message",new pd);_(this,"_error",new gd);_(this,"recordManager",new od);_(this,"_appState",$.NORMAL);_(this,"_isAppSettingDialogVisible",!1);_(this,"_confirmation");_(this,"_pvPreview");_(this,"usiMonitor",new fd);_(this,"blackClock",new OE);_(this,"whiteClock",new OE);_(this,"gameManager",new hd(this.recordManager,this.blackClock,this.whiteClock));_(this,"csaGameManager",new vd(this.recordManager,this.blackClock,this.whiteClock));_(this,"researchManager",new Od);_(this,"analysisManager",new Fd(this.recordManager));_(this,"mateSearchManager",new Rd);_(this,"_reactive");this.recordManager.on("changeFilePath",n=>{for(const i of this.onChangeFilePath)i(n)}),this.recordManager.on("changePosition",()=>{this.onUpdatePosition()});const e=F0(this),x=Pe();this.gameManager.on("saveRecord",e.onSaveRecord.bind(e)).on("gameNext",e.onGameNext.bind(e)).on("gameEnd",e.onGameEnd.bind(e)).on("pieceBeat",()=>bo(x.pieceVolume)).on("beepShort",this.onBeepShort.bind(this)).on("beepUnlimited",this.onBeepUnlimited.bind(this)).on("stopBeep",_E).on("error",e.pushError.bind(e)),this.csaGameManager.on("saveRecord",e.onSaveRecord.bind(e)).on("gameNext",e.onGameNext.bind(e)).on("gameEnd",e.onCSAGameEnd.bind(e)).on("flipBoard",e.onFlipBoard.bind(e)).on("pieceBeat",()=>bo(x.pieceVolume)).on("beepShort",this.onBeepShort.bind(this)).on("beepUnlimited",this.onBeepUnlimited.bind(this)).on("stopBeep",_E).on("error",e.pushError.bind(e)),this.researchManager.on("updateSearchInfo",this.onUpdateSearchInfo.bind(e)).on("error",this.pushError.bind(e)),this.analysisManager.on("finish",this.onFinish.bind(e)).on("error",this.pushError.bind(e)),this.mateSearchManager.on("checkmate",this.onCheckmate.bind(e)).on("notImplemented",this.onNotImplemented.bind(e)).on("noMate",this.onNoMate.bind(e)).on("error",this.onCheckmateError.bind(e)),this._reactive=e}addListener(e,x){switch(e){case"changeFilePath":this.onChangeFilePath.push(x);break}return this}get reactive(){return this._reactive}get isBussy(){return this._bussy.isBussy}retainBussyState(){return this._bussy.retain()}releaseBussyState(){return this._bussy.release()}get message(){return this._message.message}get hasMessage(){return this._message.hasMessage}enqueueMessage(e){this._message.enqueue(e)}dequeueMessage(){this._message.dequeue()}get errors(){return this._error.errors}get hasError(){return this._error.hasError}pushError(e){Ae.log(lt.ERROR,s8(e)),this._error.add(e)}clearErrors(){this._error.clear()}get record(){return this.recordManager.record}get recordFilePath(){return this.recordManager.recordFilePath}get inCommentPVs(){return this.recordManager.inCommentPVs}updateStandardRecordMetadata(e){this.recordManager.updateStandardMetadata(e)}appendSearchComment(e,x,n,i){this.recordManager.appendSearchComment(e,x,n,i)}appendMovesSilently(e,x){return this.recordManager.appendMovesSilently(e,x)}get appState(){return this._appState}get confirmation(){var e;return(e=this._confirmation)==null?void 0:e.message}showConfirmation(e){this._confirmation&&Ae.log(lt.WARN,`Store#showConfirmation: 確認ダイアログを多重に表示しようとしました。 appState=${this.appState} currentMessage=${this._confirmation.message} newMessage=${e.message}`),this._confirmation={...e,appState:this.appState}}confirmationOk(){if(!this._confirmation)return;const e=this._confirmation;if(this._confirmation=void 0,this.appState!==e.appState){this.pushError("確認ダイアログ表示中に他の操作が行われたため処理が中止されました。");return}e.onOk&&e.onOk()}confirmationCancel(){this._confirmation=void 0}get pvPreview(){return this._pvPreview}showPVPreviewDialog(e){this._pvPreview=e}closePVPreviewDialog(){this._pvPreview=void 0}showPasteDialog(){this.appState===$.NORMAL&&(this._appState=$.PASTE_DIALOG)}showGameDialog(){this.appState===$.NORMAL&&(this._appState=$.GAME_DIALOG)}showCSAGameDialog(){this.appState===$.NORMAL&&(this._appState=$.CSA_GAME_DIALOG)}showResearchDialog(){this.appState===$.NORMAL&&(this._appState=$.RESEARCH_DIALOG)}showAnalysisDialog(){this.appState===$.NORMAL&&(this._appState=$.ANALYSIS_DIALOG)}showMateSearchDialog(){this.appState===$.NORMAL&&(this._appState=$.MATE_SEARCH_DIALOG)}showUsiEngineManagementDialog(){this.appState===$.NORMAL&&(this._appState=$.USI_ENGINE_SETTING_DIALOG)}showExportBoardImageDialog(){this.appState===$.NORMAL&&(this._appState=$.EXPORT_POSITION_IMAGE_DIALOG)}destroyModalDialog(){(this.appState===$.PASTE_DIALOG||this.appState===$.GAME_DIALOG||this.appState===$.CSA_GAME_DIALOG||this.appState===$.RESEARCH_DIALOG||this.appState===$.ANALYSIS_DIALOG||this.appState===$.MATE_SEARCH_DIALOG||this.appState===$.USI_ENGINE_SETTING_DIALOG||this.appState===$.EXPORT_POSITION_IMAGE_DIALOG)&&(this._appState=$.NORMAL)}closeModalDialog(){this.isBussy||this.destroyModalDialog()}get isAppSettingDialogVisible(){return this._isAppSettingDialogVisible}showAppSettingDialog(){this._isAppSettingDialogVisible=!0}closeAppSettingDialog(){this._isAppSettingDialogVisible=!1}get usiMonitors(){return this.usiMonitor.sessions}updateUSIInfo(e,x,n,i){this.recordManager.record.usi===x&&this.usiMonitor.update(e,this.recordManager.record.position,n,i)}updateUSIPonderInfo(e,x,n,i){const s=yt.newByUSI(x);if(s instanceof Error){Ae.log(lt.ERROR,`invalid USI: ${x} (updateUSIPonderInfo)`);return}const o=s.current.move;o instanceof tt&&this.usiMonitor.update(e,s.position,n,i,o)}get blackTime(){return this.blackClock.time}get blackByoyomi(){return this.blackClock.byoyomi}get whiteTime(){return this.whiteClock.time}get whiteByoyomi(){return this.whiteClock.byoyomi}startGame(e){this.appState!==$.GAME_DIALOG||this.isBussy||(this.retainBussyState(),Ae.saveGameSetting(e).then(()=>{this.initializeDisplaySettingForGame(e);const x=Pe(),n=Ts(x.engineTimeoutSeconds);return this.gameManager.startGame(e,n)}).then(()=>this._appState=$.GAME).catch(x=>{this.pushError("対局の初期化中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()}))}get gameSetting(){return this.gameManager.setting}get gameResults(){return this.gameManager.results}get csaGameState(){return this.csaGameManager.state}loginCSAGame(e,x){this.appState!==$.CSA_GAME_DIALOG||this.isBussy||(this.retainBussyState(),Promise.resolve().then(async()=>{if(x.saveHistory){const n=await Ae.loadCSAGameSettingHistory(),i=T6(n,e);await Ae.saveCSAGameSettingHistory(i)}}).then(()=>{const n=Pe(),i=Ts(n.engineTimeoutSeconds);return this.csaGameManager.login(e,i)}).then(()=>this._appState=$.CSA_GAME).catch(n=>{this.pushError("対局の初期化中にエラーが出ました: "+n)}).finally(()=>{this.releaseBussyState()}))}cancelCSAGame(){if(this.appState===$.CSA_GAME){if(this.csaGameManager.state===l0.GAME){this.pushError("対局が始まっているため通信対局をキャンセルできませんでした。");return}this.csaGameManager.logout(),this._appState=$.NORMAL}}initializeDisplaySettingForGame(e){if(e.humanIsFront){const x=Pe();let n=x.boardFlipping;e.black.uri===x0&&e.white.uri!==x0?n=!1:e.black.uri!==x0&&e.white.uri===x0&&(n=!0),n!==x.boardFlipping&&x.flipBoard()}}stopGame(){switch(this.appState){case $.GAME:this.gameManager.setting.repeat>=2?this.showConfirmation({message:d.areYouSureWantToQuitGames,onOk:()=>this.gameManager.endGame(Ee.INTERRUPT)}):this.gameManager.endGame(Ee.INTERRUPT);break;case $.CSA_GAME:this.showConfirmation({message:d.areYouSureWantToRequestQuit,onOk:()=>this.csaGameManager.stop()});break}}showGameResults(){if(this.appState!==$.GAME)return;const e=this.gameManager.results;this.enqueueMessage({text:d.gameProgress,attachments:RE(e)})}onGameNext(){this.usiMonitor.clear()}onGameEnd(e,x){this.appState===$.GAME&&(e&&e.total>=2?this.enqueueMessage({text:d.allGamesCompleted,attachments:RE(e)}):x&&this.enqueueMessage({text:`${d.gameEnded}(${C8(x)})`}),this._appState=$.NORMAL)}onCSAGameEnd(){this.appState===$.CSA_GAME&&(this._appState=$.NORMAL)}onFlipBoard(e){Pe().boardFlipping!==e&&Pe().flipBoard()}onSaveRecord(){const e=CE(this.recordManager.record.metadata),x=Pe(),n=We(x.autoSaveDirectory,e);this.saveRecordByPath(n).catch(i=>{this.pushError(`棋譜の保存に失敗しました: ${i}`)})}onBeepShort(){const e=Pe();e.clockSoundTarget===xi.ONLY_USER&&!this.isMovableByUser||I6({frequency:e.clockPitch,volume:e.clockVolume})}onBeepUnlimited(){const e=Pe();e.clockSoundTarget===xi.ONLY_USER&&!this.isMovableByUser||k6({frequency:e.clockPitch,volume:e.clockVolume})}doMove(e){if(this.appState!==$.NORMAL&&this.appState!==$.RESEARCH||!this.recordManager.appendMove({move:e}))return;const x=Pe();bo(x.pieceVolume)}onFinish(){this.appState===$.ANALYSIS&&(this._message.enqueue({text:"棋譜解析が終了しました。"}),this._appState=$.NORMAL)}startResearch(e){if(!(this.appState!==$.RESEARCH_DIALOG||this.isBussy)){if(this.retainBussyState(),!e.usi){this.pushError(new Error("エンジンが設定されていません。"));return}Ae.saveResearchSetting(e).then(()=>this.researchManager.launch(e)).then(()=>{this._appState=$.RESEARCH,this.usiMonitor.clear(),this.onUpdatePosition();const x=Pe();x.tab!==Ne.SEARCH&&x.tab!==Ne.PV&&x.tab!==Ne.CHART&&x.tab!==Ne.PERCENTAGE_CHART&&Pe().updateAppSetting({tab:Ne.PV})}).catch(x=>{this.pushError("検討の初期化中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()})}}stopResearch(){this.appState===$.RESEARCH&&(this.researchManager.close(),this._appState=$.NORMAL)}onUpdateSearchInfo(e,x){this.recordManager.updateSearchInfo(e,x)}startAnalysis(e){this.appState!==$.ANALYSIS_DIALOG||this.isBussy||(this.retainBussyState(),Ae.saveAnalysisSetting(e).then(()=>this.analysisManager.start(e)).then(()=>{this._appState=$.ANALYSIS,this.usiMonitor.clear()}).catch(x=>{this.pushError("検討の初期化中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()}))}stopAnalysis(){this.appState===$.ANALYSIS&&(this.analysisManager.close(),this._appState=$.NORMAL)}startMateSearch(e){if(!(this.appState!==$.MATE_SEARCH_DIALOG||this.isBussy)){if(this.retainBussyState(),!e.usi){this.pushError(new Error("エンジンが設定されていません。"));return}Ae.saveMateSearchSetting(e).then(()=>this.mateSearchManager.start(e,this.recordManager.record)).then(()=>{this._appState=$.MATE_SEARCH,this.usiMonitor.clear();const x=Pe();x.tab!==Ne.SEARCH&&x.tab!==Ne.PV&&Pe().updateAppSetting({tab:Ne.SEARCH})}).catch(x=>{this.pushError("詰将棋探索の初期化中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()})}}stopMateSearch(){this.appState===$.MATE_SEARCH&&(this.mateSearchManager.close(),this._appState=$.NORMAL)}onCheckmate(e){if(this.appState!==$.MATE_SEARCH)return;this._appState=$.NORMAL;const x=this.recordManager.record.position;this.showConfirmation({message:d.mateInNPlyDoYouWantToDisplay(e.length),onOk:()=>{this.showPVPreviewDialog({position:x,mate:e.length,pv:e})}})}onNotImplemented(){this.appState===$.MATE_SEARCH&&(this.pushError(new Error(d.thisEngineNotSupportsMateSearch)),this._appState=$.NORMAL)}onNoMate(){this.appState===$.MATE_SEARCH&&(this.enqueueMessage({text:d.noMateFound}),this._appState=$.NORMAL)}onCheckmateError(e){this.appState===$.MATE_SEARCH&&(this.pushError(e),this._appState=$.NORMAL)}onUpdatePosition(){this.researchManager&&this.researchManager.updatePosition(this.recordManager.record)}resetRecord(){this.appState==$.NORMAL&&this.showConfirmation({message:d.areYouSureWantToClearRecord,onOk:()=>{this.recordManager.reset()}})}updateRecordComment(e){this.recordManager.updateComment(e)}insertSpecialMove(e){this.appState!==$.NORMAL&&this.appState!==$.RESEARCH||this.recordManager.appendMove({move:e})}startPositionEditing(){this.appState===$.NORMAL&&this.showConfirmation({message:d.areYouSureWantToClearRecord,onOk:()=>{this._appState=$.POSITION_EDITING,this.recordManager.resetByCurrentPosition()}})}endPositionEditing(){this.appState===$.POSITION_EDITING&&(this._appState=$.NORMAL)}initializePosition(e){this.appState==$.POSITION_EDITING&&this.showConfirmation({message:d.areYouSureWantToDiscardPosition,onOk:()=>{this.recordManager.reset(e)}})}changeTurn(){this.appState==$.POSITION_EDITING&&this.recordManager.swapNextTurn()}editPosition(e){this.appState===$.POSITION_EDITING&&this.recordManager.changePosition(e)}changePly(e){(this.appState===$.NORMAL||this.appState===$.RESEARCH)&&this.recordManager.changePly(e)}changeBranch(e){(this.appState===$.NORMAL||this.appState===$.RESEARCH)&&this.recordManager.changeBranch(e)}swapWithNextBranch(){return this.recordManager.swapWithNextBranch()}swapWithPreviousBranch(){return this.recordManager.swapWithPreviousBranch()}removeCurrentMove(){if(!(this.appState!==$.NORMAL&&this.appState!==$.RESEARCH)){if(this.recordManager.record.current.isLastMove){this.recordManager.removeCurrentMove();return}this.showConfirmation({message:d.areYouSureWantToDeleteFollowingMove(this.recordManager.record.current.ply),onOk:()=>{this.recordManager.removeCurrentMove()}})}}copyRecordKIF(){const e=Pe(),x=b8(this.recordManager.record,{returnCode:e.returnCode});navigator.clipboard.writeText(x)}copyRecordCSA(){const e=Pe(),x=w8(this.recordManager.record,{returnCode:e.returnCode});navigator.clipboard.writeText(x)}copyRecordUSIBefore(){const e=this.recordManager.record.usi;navigator.clipboard.writeText(e)}copyRecordUSIAll(){const e=this.recordManager.record.usiAll;navigator.clipboard.writeText(e)}copyBoardSFEN(){const e=this.recordManager.record.sfen;navigator.clipboard.writeText(e)}pasteRecord(e){if(this.appState!==$.NORMAL)return;const x=this.recordManager.importRecord(e);if(x){this.pushError(x);return}}openRecord(e){this.appState!==$.NORMAL||this.isBussy||(this.retainBussyState(),Promise.resolve().then(()=>e||Ae.showOpenRecordDialog()).then(x=>{if(!x)return;const i=Pe().textDecodingRule==bs.AUTO_DETECT;return Ae.openRecord(x).then(s=>{const o=this.recordManager.importRecordFromBuffer(s,x,{autoDetect:i});return o&&Promise.reject(o)})}).catch(x=>{this.pushError("棋譜の読み込み中にエラーが出ました: "+x)}).finally(()=>{this.releaseBussyState()}))}saveRecord(e){this.appState!==$.NORMAL||this.isBussy||(this.retainBussyState(),Promise.resolve().then(()=>{const x=this.recordManager.recordFilePath;if(e!=null&&e.overwrite&&x)return x;const n=x||CE(this.recordManager.record.metadata);return Ae.showSaveRecordDialog(n)}).then(x=>{if(x)return this.saveRecordByPath(x)}).catch(x=>{this.pushError(x)}).finally(()=>{this.releaseBussyState()}))}async saveRecordByPath(e){const x=Pe(),n=this.recordManager.exportRecordAsBuffer(e,{returnCode:x.returnCode});if(n instanceof Error)throw n;this.retainBussyState();try{await Ae.saveRecord(e,n)}catch(i){throw new Error(`${d.failedToSaveRecord}: ${i}`)}finally{this.releaseBussyState()}}get isMovableByUser(){switch(this.appState){case $.NORMAL:case $.RESEARCH:return!0;case $.GAME:return(this.recordManager.record.position.color===L.BLACK?this.gameManager.setting.black.uri:this.gameManager.setting.white.uri)===x0;case $.CSA_GAME:return this.csaGameManager.isMyTurn&&this.csaGameManager.setting.player.uri===x0}return!1}}function Ld(){return new Nd().reactive}let wo;function Ge(){return wo||(wo=Ld()),wo}var ie=(t=>(t.BUSSY="bussy",t.ERROR="error",t.INFO="info",t.GAME="game",t.INTERNET="internet",t.STOP="stop",t.RESIGN="resign",t.RESEARCH="research",t.END="end",t.QUIZ="quiz",t.EDIT="edit",t.CHECK="check",t.SWAP="swap",t.SWAP_H="swap_h",t.SETTINGS="settings",t.ENGINE_SETTINGS="engineSettings",t.FLIP="flip",t.FILE="file",t.OPEN="open",t.SAVE="save",t.SAVE_AS="saveAs",t.PASTE="paste",t.COPY="copy",t.DELETE="delete",t.COMMENT="comment",t.BRAIN="brain",t.PV="pv",t.CHART="chart",t.PERCENT="percent",t.ARROW_DROP="arrowDrop",t.ARROW_UP="arrowUp",t.FIRST="first",t.BACK="back",t.NEXT="next",t.LAST="last",t.QUESTION="question",t.ANALYSIS="analysis",t.DESCRIPTION="description",t.PLAY="play",t.CLOSE="close",t.CALL="call",t.SCORE="score",t.GRID="grid",t.MATE_SEARCH="mateSearch",t.ADD="add",t.TREE="tree",t.NOTE="note",t))(ie||{});const V8={bussy:"icon/hourglass_empty_white_24dp.svg",error:"icon/error_outline_white_24dp.svg",info:"icon/info_white_24dp.svg",game:"icon/sports_esports_white_24dp.svg",internet:"icon/language_FILL0_wght400_GRAD0_opsz48.svg",stop:"icon/block_white_24dp.svg",resign:"icon/flag_white_24dp.svg",research:"icon/science_white_24dp.svg",end:"icon/do_disturb_on_white_24dp.svg",quiz:"icon/quiz_FILL0_wght400_GRAD0_opsz48.svg",edit:"icon/app_registration_white_24dp.svg",check:"icon/check_circle_white_24dp.svg",swap:"icon/swap_vert_white_24dp.svg",swap_h:"icon/swap_horiz_white_24dp.svg",settings:"icon/settings_white_24dp.svg",engineSettings:"icon/settings_input_component_white_24dp.svg",flip:"icon/flip_camera_android_white_24dp.svg",file:"icon/draft_FILL0_wght400_GRAD0_opsz48.svg",open:"icon/file_open_FILL0_wght400_GRAD0_opsz48.svg",save:"icon/save_FILL0_wght400_GRAD0_opsz48.svg",saveAs:"icon/save_as_FILL0_wght400_GRAD0_opsz48.svg",paste:"icon/content_paste_white_24dp.svg",copy:"icon/content_copy_white_24dp.svg",delete:"icon/backspace_white_24dp.svg",comment:"icon/edit_note_white_24dp.svg",brain:"icon/psychology_white_24dp.svg",pv:"icon/manage_search_FILL0_wght400_GRAD0_opsz48.svg",chart:"icon/show_chart_white_24dp.svg",percent:"icon/percent_white_24dp.svg",arrowDrop:"icon/arrow_drop_down_white_24dp.svg",arrowUp:"icon/arrow_drop_up_FILL0_wght400_GRAD0_opsz48.svg",first:"icon/first_page_white_24dp.svg",back:"icon/chevron_left_white_24dp.svg",next:"icon/chevron_right_white_24dp.svg",last:"icon/last_page_white_24dp.svg",question:"icon/help_white_24dp.svg",analysis:"icon/query_stats_white_24dp.svg",description:"icon/description_white_24dp.svg",play:"icon/play_arrow_FILL1_wght400_GRAD0_opsz48.svg",close:"icon/close_FILL0_wght400_GRAD0_opsz48.svg",call:"icon/record_voice_over_FILL0_wght400_GRAD0_opsz48.svg",score:"icon/scoreboard_FILL0_wght400_GRAD0_opsz48.svg",grid:"icon/grid_on_FILL0_wght400_GRAD0_opsz48.svg",mateSearch:"icon/psychology_alt_FILL0_wght400_GRAD0_opsz48.svg",add:"icon/add_circle_FILL0_wght400_GRAD0_opsz48.svg",tree:"icon/account_tree_FILL0_wght400_GRAD0_opsz48.svg",note:"icon/note_alt_FILL0_wght400_GRAD0_opsz48.svg"};Object.values(V8).forEach(t=>{Kx(t)});const Hd=["src"],oe=Me({__name:"Icon",props:{icon:{type:String,required:!0}},setup(t){return(e,x)=>(w(),M("img",{class:"icon",src:c(V8)[t.icon],draggable:"false"},null,8,Hd))}});function Dt(t,e){t.addEventListener("cancel",x=>{x.preventDefault(),x.stopPropagation(),e&&e()}),t.addEventListener("copy",x=>{x.stopPropagation()}),t.addEventListener("paste",x=>{x.stopPropagation()}),t.showModal()}const Ud={class:"groups"},$d={class:"group"},zd={class:"label"},Gd={class:"group"},Wd={class:"label"},Vd={class:"label"},Kd=Me({__name:"GameMenu",emits:["close"],setup(t,{emit:e}){const x=Ge(),n=U(),i=()=>{e("close")};Xe(()=>{Dt(n.value,i)});const s=()=>{x.showGameDialog(),e("close")},o=()=>{x.showCSAGameDialog(),e("close")};return(r,a)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:n,class:"menu"},[u("div",Ud,[u("div",$d,[u("button",{class:"close",onClick:i},[R(oe,{icon:c(ie).CLOSE},null,8,["icon"]),u("div",zd,m(c(d).back),1)])]),u("div",Gd,[u("button",{onClick:s},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",Wd,m(c(d).offlineGame),1)]),u("button",{onClick:o},[R(oe,{icon:c(ie).INTERNET},null,8,["icon"]),u("div",Vd,m(c(d).csaOnlineGame),1)])])])],512)]))}}),jd={class:"groups"},qd={class:"group"},Yd={class:"label"},Jd={class:"group"},Xd=["disabled"],Zd={class:"label"},Qd=["disabled"],e3={class:"label"},t3=["disabled"],x3={class:"label"},n3=["disabled"],i3={class:"label"},s3=["disabled"],o3={class:"label"},r3={class:"group"},a3={class:"label"},E3={class:"label"},l3={class:"label"},c3={class:"label"},A3=["disabled"],u3={class:"label"},h3=Me({__name:"FileMenu",emits:["close"],setup(t,{emit:e}){const x=Ge(),n=U(),i=()=>{e("close")};Xe(()=>{Dt(n.value,i)});const s=()=>{x.resetRecord(),e("close")},o=()=>{x.openRecord(),e("close")},r=()=>{x.saveRecord({overwrite:!0}),e("close")},a=()=>{x.saveRecord(),e("close")},E=()=>{x.showExportBoardImageDialog(),e("close")},l=()=>{x.copyRecordKIF(),e("close")},A=()=>{x.copyRecordCSA(),e("close")},h=()=>{x.copyRecordUSIAll(),e("close")},B=()=>{x.copyBoardSFEN(),e("close")},p=()=>{x.showPasteDialog(),e("close")},f=Fe(()=>({newFile:x.appState===$.NORMAL,open:x.appState===$.NORMAL,save:x.appState===$.NORMAL,saveAs:x.appState===$.NORMAL,exportImage:x.appState===$.NORMAL,paste:x.appState===$.NORMAL}));return(g,C)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:n,class:"menu"},[u("div",jd,[u("div",qd,[u("button",{class:"close",onClick:i},[R(oe,{icon:c(ie).CLOSE},null,8,["icon"]),u("div",Yd,m(c(d).back),1)])]),u("div",Jd,[u("button",{disabled:!c(f).newFile,onClick:s},[R(oe,{icon:c(ie).FILE},null,8,["icon"]),u("div",Zd,m(c(d).clear),1)],8,Xd),u("button",{disabled:!c(f).open,onClick:o},[R(oe,{icon:c(ie).OPEN},null,8,["icon"]),u("div",e3,m(c(d).open),1)],8,Qd),u("button",{disabled:!c(f).save,onClick:r},[R(oe,{icon:c(ie).SAVE},null,8,["icon"]),u("div",x3,m(c(d).saveOverwrite),1)],8,t3),u("button",{disabled:!c(f).saveAs,onClick:a},[R(oe,{icon:c(ie).SAVE_AS},null,8,["icon"]),u("div",i3,m(c(d).saveAs),1)],8,n3),u("button",{disabled:!c(f).exportImage,onClick:E},[R(oe,{icon:c(ie).GRID},null,8,["icon"]),u("div",o3,m(c(d).positionImage),1)],8,s3)]),u("div",r3,[u("button",{onClick:l},[R(oe,{icon:c(ie).COPY},null,8,["icon"]),u("div",a3,m(c(d).copyAsKIF),1)]),u("button",{onClick:A},[R(oe,{icon:c(ie).COPY},null,8,["icon"]),u("div",E3,m(c(d).copyAsCSA),1)]),u("button",{onClick:h},[R(oe,{icon:c(ie).COPY},null,8,["icon"]),u("div",l3,m(c(d).copyAsUSI),1)]),u("button",{onClick:B},[R(oe,{icon:c(ie).COPY},null,8,["icon"]),u("div",c3,m(c(d).copyAsSFEN),1)]),u("button",{disabled:!c(f).paste,onClick:p},[R(oe,{icon:c(ie).PASTE},null,8,["icon"]),u("div",u3,m(c(d).paste),1)],8,A3)])])],512)]))}}),B3={class:"groups"},d3={class:"group"},f3={class:"label"},p3={class:"group"},g3={class:"label"},m3={class:"label"},C3={class:"label"},F3={class:"label"},D3={class:"label"},_3={class:"label"},v3={class:"label"},b3={class:"label"},y3={class:"label"},S3={class:"label"},w3={class:"label"},T3={class:"label"},P3=Me({__name:"InitialPositionMenu",emits:["close"],setup(t,{emit:e}){const x=Ge(),n=U(),i=()=>{e("close")};Xe(()=>{Dt(n.value,i)});const s=()=>{x.initializePosition(Ce.STANDARD),e("close")},o=()=>{x.initializePosition(Ce.HANDICAP_LANCE),e("close")},r=()=>{x.initializePosition(Ce.HANDICAP_RIGHT_LANCE),e("close")},a=()=>{x.initializePosition(Ce.HANDICAP_BISHOP),e("close")},E=()=>{x.initializePosition(Ce.HANDICAP_ROOK),e("close")},l=()=>{x.initializePosition(Ce.HANDICAP_ROOK_LANCE),e("close")},A=()=>{x.initializePosition(Ce.HANDICAP_2PIECES),e("close")},h=()=>{x.initializePosition(Ce.HANDICAP_4PIECES),e("close")},B=()=>{x.initializePosition(Ce.HANDICAP_6PIECES),e("close")},p=()=>{x.initializePosition(Ce.HANDICAP_8PIECES),e("close")},f=()=>{x.initializePosition(Ce.TSUME_SHOGI),e("close")},g=()=>{x.initializePosition(Ce.TSUME_SHOGI_2KINGS),e("close")};return(C,S)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:n,class:"menu"},[u("div",B3,[u("div",d3,[u("button",{class:"close",onClick:i},[R(oe,{icon:c(ie).CLOSE},null,8,["icon"]),u("div",f3,m(c(d).back),1)])]),u("div",p3,[u("button",{onClick:s},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",g3,m(c(d).nonHandicap),1)]),u("button",{onClick:o},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",m3,m(c(d).lanceHandicap),1)]),u("button",{onClick:r},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",C3,m(c(d).rightLanceHandicap),1)]),u("button",{onClick:a},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",F3,m(c(d).bishopHandicap),1)]),u("button",{onClick:E},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",D3,m(c(d).rookHandicap),1)]),u("button",{onClick:l},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",_3,m(c(d).rookLanceHandicap),1)]),u("button",{onClick:A},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",v3,m(c(d).twoPiecesHandicap),1)]),u("button",{onClick:h},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",b3,m(c(d).fourPiecesHandicap),1)]),u("button",{onClick:B},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",y3,m(c(d).sixPiecesHandicap),1)]),u("button",{onClick:p},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("div",S3,m(c(d).eightPiecesHandicap),1)]),u("button",{onClick:f},[R(oe,{icon:c(ie).QUIZ},null,8,["icon"]),u("div",w3,m(c(d).tsumeShogi),1)]),u("button",{onClick:g},[R(oe,{icon:c(ie).QUIZ},null,8,["icon"]),u("div",T3,m(c(d).doubleKingTsumeShogi),1)])])])],512)]))}});class Ar{constructor(e){this.children=[],this.parent=e}delete(e){const x=this.children.indexOf(e);return x===-1?!1:(this.children=this.children.slice(0,x).concat(this.children.slice(x+1)),this.children.length===0&&this.parent.delete(this),!0)}add(e){return this.children.push(e),this}}class Ps{constructor(e){this.parent=null,this.children={},this.parent=e||null}get(e){return this.children[e]}insert(e){let x=this;for(let n=0;ni.filter(s=>s!=="")).filter(i=>i.length>0)}function NE(t){const{ctrlKey:e,altKey:x,metaKey:n,key:i}=t,s=[],o=[e,x,n,M3(t)];for(const[r,a]of o.entries())a&&s.push(LE[r]);return LE.includes(i)||s.push(i),s.join("+")}const LE=["Control","Alt","Meta","Shift"];function M3(t){const{shiftKey:e,code:x,key:n}=t;return e&&!(x.startsWith("Key")&&n.toUpperCase()===n)}const ni=new Ps,K8=new WeakMap;let hr=ni,xs=null,Br=[];function To(){Br=[],xs=null,hr=ni}function j8(t){if(t.defaultPrevented||!(t.target instanceof Node))return;if(ur(t.target)){const x=t.target;if(!x.id||!x.ownerDocument.querySelector(`[data-hotkey-scope="${x.id}"]`))return}xs!=null&&window.clearTimeout(xs),xs=window.setTimeout(To,1500);const e=hr.get(NE(t));if(!e){To();return}if(Br.push(NE(t)),hr=e,e instanceof Ar){const x=t.target;let n=!1,i;const s=ur(x);for(let o=e.children.length-1;o>=0;o-=1){i=e.children[o];const r=i.getAttribute("data-hotkey-scope");if(!s&&!r||s&&x.id===r){n=!0;break}}i&&n&&(I3(i,Br),t.preventDefault()),To()}}function O3(t,e){Object.keys(ni.children).length===0&&document.addEventListener("keydown",j8);const n=k3(e||t.getAttribute("data-hotkey")||"").map(i=>ni.insert(i).add(t));K8.set(t,n)}function R3(t){const e=K8.get(t);if(e&&e.length)for(const x of e)x&&x.delete(t);Object.keys(ni.children).length===0&&document.removeEventListener("keydown",j8)}function Is(t){for(const e of t.querySelectorAll("[data-hotkey]"))O3(e)}function ks(t){for(const e of t.querySelectorAll("[data-hotkey]"))R3(e)}const tn=[],e0=[];function vn(t){e0.length===0&&Is(t),tn.push(t)}function bn(t){e0.length===0&&ks(t);for(let e=0;e{vn(i.value),vn(s.value)}),un(()=>{vn(i.value),vn(s.value)}),Vc(()=>{bn(i.value),bn(s.value)}),vt(()=>{bn(i.value),bn(s.value)});const E=Te=>{e("resize",Te)},l=Te=>{x.appState===$.GAME||x.appState===$.CSA_GAME?en.doMove(Te):x.doMove(Te)},A=Te=>{x.editPosition(Te)},h=()=>{o.value=!0},B=()=>{x.showGameResults()},p=()=>{x.stopGame()},f=()=>{en.win()},g=()=>{en.resign()},C=()=>{x.showResearchDialog()},S=()=>{x.stopResearch()},I=()=>{x.showAnalysisDialog()},y=()=>{x.stopAnalysis()},v=()=>{x.showMateSearchDialog()},D=()=>{x.stopMateSearch()},T=()=>{x.startPositionEditing()},b=()=>{x.endPositionEditing()},P=()=>{a.value=!0},O=()=>{x.changeTurn()},V=()=>{x.showAppSettingDialog()},N=()=>{x.showUsiEngineManagementDialog()},K=()=>{n.flipBoard()},W=()=>{r.value=!0},X=()=>{x.removeCurrentMove()},xe=Fe(()=>{const Te=x.record.current.move;return Te instanceof tt?Te:void 0}),Z=Fe(()=>q8(x.record.metadata)||d.sente),ne=Fe(()=>Y8(x.record.metadata)||d.gote),re=Fe(()=>{if(x.appState===$.GAME||x.csaGameState===l0.GAME)return{black:{time:x.blackTime,byoyomi:x.blackByoyomi},white:{time:x.whiteTime,byoyomi:x.whiteByoyomi}}}),pe=Fe(()=>({game:x.appState===$.NORMAL,showGameResults:x.appState===$.GAME&&x.gameSetting.repeat>=2,stop:x.appState===$.GAME||x.appState===$.CSA_GAME,win:x.appState===$.CSA_GAME&&x.isMovableByUser,resign:(x.appState===$.GAME||x.appState===$.CSA_GAME)&&x.isMovableByUser,research:x.appState===$.NORMAL,endResearch:x.appState===$.RESEARCH,analysis:x.appState===$.NORMAL,endAnalysis:x.appState===$.ANALYSIS,mateSearch:x.appState===$.NORMAL,stopMateSearch:x.appState===$.MATE_SEARCH,startEditPosition:x.appState===$.NORMAL,endEditPosition:x.appState===$.POSITION_EDITING,initPosition:x.appState===$.POSITION_EDITING,removeCurrentMove:x.appState===$.NORMAL||x.appState===$.RESEARCH,engineSettings:x.appState===$.NORMAL}));return(Te,De)=>{var et,Ke,ht,Ve;return w(),M("div",null,[R(ta,{"board-image-type":c(n).boardImage,"piece-stand-image-type":c(n).pieceStandImage,"board-label-type":c(n).boardLabelType,"piece-image-base-url":c(ea)(c(n)),"custom-board-image-url":c(n).boardImageFileURL,"custom-piece-stand-image-url":c(n).pieceStandImageFileURL,"max-size":t.maxSize,position:c(x).record.position,"last-move":c(xe),flip:c(n).boardFlipping,"allow-move":c(x).isMovableByUser,"allow-edit":c(x).appState===c($).POSITION_EDITING,"black-player-name":c(Z),"white-player-name":c(ne),"black-player-time":(et=c(re))==null?void 0:et.black.time,"black-player-byoyomi":(Ke=c(re))==null?void 0:Ke.black.byoyomi,"white-player-time":(ht=c(re))==null?void 0:ht.white.time,"white-player-byoyomi":(Ve=c(re))==null?void 0:Ve.white.byoyomi,"next-move-label":c(d).nextTurn,onResize:E,onMove:l,onEdit:A},{"right-control":B0(()=>[u("div",{ref_key:"rightControl",ref:i,class:qe(["full column top-control",{hidden:c(n).rightSideControlType===c(Ln).NONE}])},[c(pe).game?(w(),M("button",{key:0,class:"control-item",onClick:h},[R(oe,{icon:c(ie).GAME},null,8,["icon"]),u("span",null,m(c(d).game),1)])):ee("",!0),c(pe).showGameResults?(w(),M("button",{key:1,class:"control-item",onClick:B},[R(oe,{icon:c(ie).SCORE},null,8,["icon"]),u("span",null,m(c(d).displayGameResults),1)])):ee("",!0),c(pe).stop?(w(),M("button",{key:2,class:"control-item","data-hotkey":"Escape",onClick:p},[R(oe,{icon:c(ie).STOP},null,8,["icon"]),u("span",null,m(c(d).stopGame),1)])):ee("",!0),c(pe).win?(w(),M("button",{key:3,class:"control-item",onClick:f},[R(oe,{icon:c(ie).CALL},null,8,["icon"]),u("span",null,m(c(d).declareWinning),1)])):ee("",!0),c(pe).resign?(w(),M("button",{key:4,class:"control-item",onClick:g},[R(oe,{icon:c(ie).RESIGN},null,8,["icon"]),u("span",null,m(c(d).resign),1)])):ee("",!0),c(pe).research?(w(),M("button",{key:5,class:"control-item","data-hotkey":"Control+r",onClick:C},[R(oe,{icon:c(ie).RESEARCH},null,8,["icon"]),u("span",null,m(c(d).research),1)])):ee("",!0),c(pe).endResearch?(w(),M("button",{key:6,class:"control-item","data-hotkey":"Escape",onClick:S},[R(oe,{icon:c(ie).END},null,8,["icon"]),u("span",null,m(c(d).endResearch),1)])):ee("",!0),c(pe).analysis?(w(),M("button",{key:7,class:"control-item","data-hotkey":"Control+a",onClick:I},[R(oe,{icon:c(ie).ANALYSIS},null,8,["icon"]),u("span",null,m(c(d).analysis),1)])):ee("",!0),c(pe).endAnalysis?(w(),M("button",{key:8,class:"control-item","data-hotkey":"Escape",onClick:y},[R(oe,{icon:c(ie).STOP},null,8,["icon"]),u("span",null,m(c(d).stopAnalysis),1)])):ee("",!0),c(pe).mateSearch?(w(),M("button",{key:9,class:"control-item","data-hotkey":"Control+m",onClick:v},[R(oe,{icon:c(ie).MATE_SEARCH},null,8,["icon"]),u("span",null,m(c(d).mateSearch),1)])):ee("",!0),c(pe).stopMateSearch?(w(),M("button",{key:10,class:"control-item","data-hotkey":"Escape",onClick:D},[R(oe,{icon:c(ie).END},null,8,["icon"]),u("span",null,m(c(d).stopMateSearch),1)])):ee("",!0),c(pe).startEditPosition?(w(),M("button",{key:11,class:"control-item",onClick:T},[R(oe,{icon:c(ie).EDIT},null,8,["icon"]),u("span",null,m(c(d).setupPosition),1)])):ee("",!0),c(pe).endEditPosition?(w(),M("button",{key:12,class:"control-item",onClick:b},[R(oe,{icon:c(ie).CHECK},null,8,["icon"]),u("span",null,m(c(d).completePositionSetup),1)])):ee("",!0),c(pe).initPosition?(w(),M("button",{key:13,class:"control-item",onClick:O},[R(oe,{icon:c(ie).SWAP},null,8,["icon"]),u("span",null,m(c(d).changeTurn),1)])):ee("",!0),c(pe).initPosition?(w(),M("button",{key:14,class:"control-item",onClick:P},[u("span",null,m(c(d).initializePosition),1)])):ee("",!0)],2)]),"left-control":B0(()=>[u("div",{ref_key:"leftControl",ref:s,class:qe(["full column reverse bottom-control",{hidden:c(n).leftSideControlType===c(Nn).NONE}])},[u("button",{class:"control-item","data-hotkey":"Control+,",onClick:V},[R(oe,{icon:c(ie).SETTINGS},null,8,["icon"]),u("span",null,m(c(d).appSettings),1)]),u("button",{class:"control-item","data-hotkey":"Control+.",disabled:!c(pe).engineSettings,onClick:N},[R(oe,{icon:c(ie).ENGINE_SETTINGS},null,8,["icon"]),u("span",null,m(c(d).engineSettings),1)],8,N3),u("button",{class:"control-item","data-hotkey":"Control+t",onClick:K},[R(oe,{icon:c(ie).FLIP},null,8,["icon"]),u("span",null,m(c(d).flipBoard),1)]),u("button",{class:"control-item",onClick:W},[R(oe,{icon:c(ie).FILE},null,8,["icon"]),u("span",null,m(c(d).file),1)]),u("button",{class:"control-item","data-hotkey":"Control+d",disabled:!c(pe).removeCurrentMove,onClick:X},[R(oe,{icon:c(ie).DELETE},null,8,["icon"]),u("span",null,m(c(d).deleteMove),1)],8,L3)],2)]),_:1},8,["board-image-type","piece-stand-image-type","board-label-type","piece-image-base-url","custom-board-image-url","custom-piece-stand-image-url","max-size","position","last-move","flip","allow-move","allow-edit","black-player-name","white-player-name","black-player-time","black-player-byoyomi","white-player-time","white-player-byoyomi","next-move-label"]),o.value?(w(),Re(Kd,{key:0,onClose:De[0]||(De[0]=gt=>o.value=!1)})):ee("",!0),r.value?(w(),Re(h3,{key:1,onClose:De[1]||(De[1]=gt=>r.value=!1)})):ee("",!0),a.value?(w(),Re(P3,{key:2,onClose:De[2]||(De[2]=gt=>a.value=!1)})):ee("",!0)])}}});const U3=ze(H3,[["__scopeId","data-v-6176a2f4"]]);let HE=0;function J8(){return HE++,`es:incremental:${HE}`}const $3={style:{display:"inline-block"}},z3={class:"container"},G3=["id","checked"],W3=["for"],V3=Me({__name:"ToggleButton",props:{value:{type:Boolean,required:!0},label:{type:String,default:""},height:{type:Number,default:20},onChange:{type:Function,default:()=>{}}},emits:["change"],setup(t,{emit:e}){const x=t,n=J8(),i=Fe(()=>({height:`${x.height}px`,width:`${x.height*2}px`})),s=Fe(()=>({borderRadius:`${x.height*.5}px`})),o=Fe(()=>({height:`${x.height}px`,width:`${x.height}px`})),r=Fe(()=>({fontSize:`${x.height*.7}px`,lineHeight:`${x.height}px`})),a=E=>{const l=E.target;e("change",l.checked)};return(E,l)=>(w(),M("div",$3,[u("div",z3,[u("div",{class:"toggle",style:he(c(i))},[u("input",{id:c(n),type:"checkbox",checked:t.value,onChange:a},null,40,G3),u("div",{class:"slider",style:he(c(s))},null,4),u("div",{class:"knob",style:he(c(o))},null,4)],4),u("div",null,[u("label",{for:c(n),style:he(c(r))},m(t.label),13,W3)])])]))}});const rt=ze(V3,[["__scopeId","data-v-61ac46a8"]]),K3={class:"full column record-view"},j3={class:"row control"},q3=["disabled"],Y3=["disabled"],J3=["disabled"],X3=["disabled"],Z3=["value","onClick"],Q3={class:"move-number"},e4={class:"move-text"},t4={key:0,class:"move-time"},x4={key:1,class:"move-comment"},n4={class:"auto row branch-list-area"},i4=["value","onClick"],s4={class:"move-text"},o4={key:0,class:"move-comment"},r4={class:"column branch-list-control"},a4=["disabled"],E4=["disabled"],l4={class:"row wrap options"},c4={class:"option"},A4={class:"option"},u4=Me({__name:"RecordView",props:{record:{type:Object,required:!0},operational:{type:Boolean,required:!1},showElapsedTime:{type:Boolean,required:!1},showComment:{type:Boolean,required:!1},elapsedTimeToggleLabel:{type:String,required:!0},commentToggleLabel:{type:String,required:!0}},emits:["goBegin","goBack","goForward","goEnd","selectMove","selectBranch","swapWithPreviousBranch","swapWithNextBranch","toggleShowElapsedTime","toggleShowComment"],setup(t,{emit:e}){const x=t,n=U(null),i=U(),s=()=>{x.operational&&e("goBegin")},o=()=>{x.operational&&e("goBack")},r=()=>{x.operational&&e("goForward")},a=()=>{x.operational&&e("goEnd")},E=f=>{x.operational&&e("selectMove",Number(f))},l=f=>{x.operational&&e("selectBranch",Number(f))},A=()=>{x.operational&&e("swapWithPreviousBranch")},h=()=>{x.operational&&e("swapWithNextBranch")},B=Fe(()=>{const f=[];return x.record.moves.forEach(g=>{f.push({number:g.ply,text:g.displayText,time:g.ply!=0?g.timeText:"",hasBranch:g.hasBranch,comment:g.comment,selected:g===x.record.current})}),f}),p=Fe(()=>{if(!x.record.branchBegin.branch)return null;const f=[];let g;for(g=x.record.branchBegin;g&&g.move;g=g.branch)f.push({index:f.length,text:g.displayText,comment:g.comment,selected:g.activeBranch});return f});return un(()=>{n.value.childNodes.forEach(C=>{C instanceof HTMLElement&&C.classList.contains("selected")&&C.scrollIntoView({behavior:"auto",block:"nearest"})}),i.value.childNodes.forEach(C=>{C instanceof HTMLElement&&C.classList.contains("selected")&&C.scrollIntoView({behavior:"auto",block:"nearest"})})}),(f,g)=>(w(),M("div",K3,[u("div",j3,[u("button",{disabled:!t.operational,"data-hotkey":"ArrowLeft",onClick:s},[R(oe,{icon:c(ie).FIRST},null,8,["icon"])],8,q3),u("button",{disabled:!t.operational,"data-hotkey":"ArrowUp",onClick:g[0]||(g[0]=C=>o())},[R(oe,{icon:c(ie).BACK},null,8,["icon"])],8,Y3),u("button",{disabled:!t.operational,"data-hotkey":"ArrowDown",onClick:r},[R(oe,{icon:c(ie).NEXT},null,8,["icon"])],8,J3),u("button",{disabled:!t.operational,"data-hotkey":"ArrowRight",onClick:a},[R(oe,{icon:c(ie).LAST},null,8,["icon"])],8,X3)]),u("div",{ref_key:"moveList",ref:n,class:"move-list"},[(w(!0),M(_e,null,Le(c(B),C=>(w(),M("div",{key:C.number,class:qe(["row move-element",{"has-branch":C.hasBranch,selected:C.selected}]),value:C.number,onClick:S=>E(C.number)},[u("div",Q3,m(C.number!==0?C.number:""),1),u("div",e4,m(C.text),1),t.showElapsedTime?(w(),M("div",t4,m(C.time),1)):ee("",!0),t.showComment?(w(),M("div",x4,m(C.comment),1)):ee("",!0)],10,Z3))),128))],512),u("div",n4,[u("div",{ref_key:"branchList",ref:i,class:"auto branch-list"},[(w(!0),M(_e,null,Le(c(p),C=>(w(),M("div",{key:C.index,class:qe(["row move-element",{selected:C.selected}]),value:C.index,onClick:S=>l(C.index)},[u("div",s4,m(C.text),1),t.showComment?(w(),M("div",o4,m(C.comment),1)):ee("",!0)],10,i4))),128))],512),u("div",r4,[u("button",{disabled:!t.operational,onClick:g[1]||(g[1]=C=>A())},[R(oe,{icon:c(ie).ARROW_UP},null,8,["icon"])],8,a4),u("button",{disabled:!t.operational,onClick:g[2]||(g[2]=C=>h())},[R(oe,{icon:c(ie).ARROW_DROP},null,8,["icon"])],8,E4)])]),u("div",l4,[u("div",c4,[R(rt,{label:t.elapsedTimeToggleLabel,value:t.showElapsedTime,onChange:g[3]||(g[3]=C=>e("toggleShowElapsedTime",C))},null,8,["label","value"])]),u("div",A4,[R(rt,{label:t.commentToggleLabel,value:t.showComment,onChange:g[4]||(g[4]=C=>e("toggleShowComment",C))},null,8,["label","value"])])])]))}});const h4=ze(u4,[["__scopeId","data-v-839e26de"]]),B4={class:"auto record"},d4=200,f4=Me({__name:"RecordPane",setup(t){const e=Ge(),x=Pe(),n=U();Xe(()=>{vn(n.value)}),Ai(()=>{bn(n.value)});const i=g=>{e.changePly(g)},s=()=>{i(0)},o=()=>{i(e.record.current.ply-1)},r=()=>{i(e.record.current.ply+1)},a=()=>{i(Number.MAX_SAFE_INTEGER)},E=g=>{i(g)},l=g=>{e.changeBranch(g)},A=()=>{e.swapWithPreviousBranch()},h=()=>{e.swapWithNextBranch()},B=g=>{x.updateAppSetting({showElapsedTimeInRecordView:g})},p=g=>{x.updateAppSetting({showCommentInRecordView:g})},f=Fe(()=>e.appState===$.NORMAL||e.appState===$.RESEARCH);return(g,C)=>(w(),M("div",{ref_key:"root",ref:n,class:"full column record-pane"},[u("div",B4,[R(h4,{record:c(e).record,operational:c(f),"show-comment":c(x).showCommentInRecordView,"show-elapsed-time":c(x).showElapsedTimeInRecordView,"elapsed-time-toggle-label":c(d).elapsedTime,"comment-toggle-label":c(d).comments,onGoBegin:s,onGoBack:o,onGoForward:r,onGoEnd:a,onSelectMove:E,onSelectBranch:l,onSwapWithPreviousBranch:A,onSwapWithNextBranch:h,onToggleShowElapsedTime:B,onToggleShowComment:p},null,8,["record","operational","show-comment","show-elapsed-time","elapsed-time-toggle-label","comment-toggle-label"])])],512))}});const p4=ze(f4,[["__scopeId","data-v-33781217"]]),g4={class:"full column"},m4=["value","readonly"],C4={key:0,class:"row play-buttons"},F4=["onClick"],D4=Me({__name:"RecordComment",setup(t){const e=Ge(),x=Fe(()=>e.appState!=$.NORMAL&&e.appState!=$.RESEARCH),n=U(),i=Fe(()=>e.record.current.comment),s=Fe(()=>e.inCommentPVs),o=a=>{const E=a.target.value;e.updateRecordComment(E)},r=a=>{e.showPVPreviewDialog({position:e.record.position,pv:a})};return Xe(()=>{n.value.addEventListener("copy",a=>{a.stopPropagation()}),n.value.addEventListener("paste",a=>{a.stopPropagation()})}),(a,E)=>(w(),M("div",null,[u("div",g4,[u("textarea",{ref_key:"textarea",ref:n,class:"auto text",value:c(i),readonly:c(x),onInput:o},null,40,m4),c(s).length!==0?(w(),M("div",C4,[(w(!0),M(_e,null,Le(c(s),(l,A)=>(w(),M("button",{key:A,class:"play",onClick:h=>r(l)},[R(oe,{icon:c(ie).PLAY},null,8,["icon"]),u("span",null,m(c(d).pv)+m(c(s).length>=2?" "+(A+1):""),1)],8,F4))),128))])):ee("",!0)])]))}});const _4=ze(D4,[["__scopeId","data-v-263d415b"]]),v4=t=>(Ys("data-v-50ccf2a4"),t=t(),Js(),t),b4={class:"full column root"},y4={class:"row headers"},S4={class:"header"},w4={class:"label"},T4={class:"value"},P4={class:"header"},I4={class:"label"},k4={class:"value"},M4={class:"header"},O4={class:"label"},R4={class:"value"},N4={class:"header"},L4=v4(()=>u("span",{class:"label"},"NPS: ",-1)),H4={class:"value"},U4={class:"header"},$4={class:"label"},z4={class:"value"},G4={class:"header"},W4={class:"label"},V4={class:"value"},K4={class:"row list-header"},j4={class:"list-column time"},q4={class:"list-column multipv-index"},Y4={class:"list-column depth"},J4={class:"list-column nodes"},X4={class:"list-column score"},Z4={class:"list-column time"},Q4={class:"list-column multipv-index"},ef={class:"list-column depth"},tf={class:"list-column nodes"},xf={class:"list-column score"},nf={class:"list-column score-flag"},sf={class:"grow list-column text"},of=["onClick"],rf=Me({__name:"EngineAnalyticsElement",props:{historyMode:{type:Boolean,required:!0},name:{type:String,required:!0},info:{type:G8,required:!0},height:{type:Number,required:!0}},setup(t){const e=t,x=Fe(()=>{if(!e.historyMode)return!1;for(const o of e.info.iterates)if(o.multiPV&&o.multiPV!==1)return!0;return!1}),n=Fe(()=>Pe().evaluationViewFrom),i=(o,r,a)=>a===ti.EACH||r==L.BLACK?o:-o,s=o=>{const r=It.newBySFEN(o.position);if(!r)return;const a=r.clone(),E=[];for(const l of o.pv||[]){const A=a.createMoveByUSI(l);if(!A||!a.doMove(A))break;E.push(A)}Ge().showPVPreviewDialog({position:r,multiPV:o.multiPV,depth:o.depth,selectiveDepth:o.selectiveDepth,score:o.score,mate:o.scoreMate,lowerBound:o.lowerBound,upperBound:o.upperBound,pv:E})};return(o,r)=>(w(),M("div",null,[u("div",b4,[u("div",y4,[u("div",S4,[u("span",w4,m(c(d).name)+": ",1),u("span",T4,m(t.name),1)]),u("div",P4,[u("span",I4,m(c(d).prediction)+": ",1),u("span",k4,m(t.info.ponderMove?t.info.ponderMove:"---"),1)]),u("div",M4,[u("span",O4,m(c(d).best)+": ",1),u("span",R4,m(t.info.currentMoveText||"---"),1)]),u("div",N4,[L4,u("span",H4,m(t.info.nps||"---"),1)]),u("div",U4,[u("span",$4,m(c(d).nodes)+": ",1),u("span",z4,m(t.info.nodes||"---"),1)]),u("div",G4,[u("span",W4,m(c(d).hashUsage)+": ",1),u("span",V4,m(t.info.hashfull?(t.info.hashfull*100).toFixed(1):"---")+" % ",1)])]),u("div",K4,[u("div",j4,m(c(d).elapsed),1),u("div",q4,m(c(d).rank),1),u("div",Y4,m(c(d).depth),1),u("div",J4,m(c(d).nodes),1),u("div",X4,m(c(d).eval),1)]),u("div",{class:"list",style:he({height:`${t.height-37}px`})},[(w(!0),M(_e,null,Le(t.historyMode?t.info.iterates:t.info.latestIteration,(a,E)=>(w(),M("div",{key:E,class:qe(["row list-item",{highlight:c(x)&&a.multiPV===1}])},[u("div",Z4,m(a.timeMs?(a.timeMs/1e3).toFixed(1)+"s":""),1),u("div",Q4,m(a.multiPV||""),1),u("div",ef,m(a.depth)+m(a.selectiveDepth&&a.depth?"/":"")+m(a.selectiveDepth),1),u("div",tf,m(a.nodes),1),u("div",xf,m(a.scoreMate?i(a.scoreMate,a.color,c(n)):a.score?i(a.score,a.color,c(n)):""),1),u("div",nf,m(a.lowerBound?"++":"")+" "+m(a.upperBound?"--":"")+" "+m(a.scoreMate?c(d).mateShort:""),1),u("div",sf,[a.pv&&a.pv.length!==0&&a.text?(w(),M("button",{key:0,onClick:l=>s(a)},[R(oe,{icon:c(ie).PLAY},null,8,["icon"]),u("span",null,m(c(d).displayPVShort),1)],8,of)):ee("",!0),hn(" "+m(a.text),1)])],2))),128))],4)])]))}});const af=ze(rf,[["__scopeId","data-v-50ccf2a4"]]),Ef={class:"full column"},UE=Me({__name:"EngineAnalytics",props:{size:{type:pt,required:!0},historyMode:{type:Boolean,required:!0}},setup(t){const e=t,x=Ge(),n=Fe(()=>{const i=x.usiMonitors.length;return i!==0?e.size.height/i:0});return(i,s)=>(w(),M("div",null,[u("div",Ef,[(w(!0),M(_e,null,Le(c(x).usiMonitors,o=>(w(),Re(af,{key:o.sessionID,"history-mode":t.historyMode,name:o.name,info:o,height:c(n)},null,8,["history-mode","name","info","height"]))),128))])]))}});/*! - * @kurkle/color v0.3.2 - * https://github.com/kurkle/color#readme - * (c) 2023 Jukka Kurkela - * Released under the MIT License - */function mi(t){return t+.5|0}const Z0=(t,e,x)=>Math.max(Math.min(t,x),e);function yn(t){return Z0(mi(t*2.55),0,255)}function sx(t){return Z0(mi(t*255),0,255)}function H0(t){return Z0(mi(t/2.55)/100,0,1)}function $E(t){return Z0(mi(t*100),0,100)}const a0={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},dr=[..."0123456789ABCDEF"],lf=t=>dr[t&15],cf=t=>dr[(t&240)>>4]+dr[t&15],Pi=t=>(t&240)>>4===(t&15),Af=t=>Pi(t.r)&&Pi(t.g)&&Pi(t.b)&&Pi(t.a);function uf(t){var e=t.length,x;return t[0]==="#"&&(e===4||e===5?x={r:255&a0[t[1]]*17,g:255&a0[t[2]]*17,b:255&a0[t[3]]*17,a:e===5?a0[t[4]]*17:255}:(e===7||e===9)&&(x={r:a0[t[1]]<<4|a0[t[2]],g:a0[t[3]]<<4|a0[t[4]],b:a0[t[5]]<<4|a0[t[6]],a:e===9?a0[t[7]]<<4|a0[t[8]]:255})),x}const hf=(t,e)=>t<255?e(t):"";function Bf(t){var e=Af(t)?lf:cf;return t?"#"+e(t.r)+e(t.g)+e(t.b)+hf(t.a,e):void 0}const df=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function X8(t,e,x){const n=e*Math.min(x,1-x),i=(s,o=(s+t/30)%12)=>x-n*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function ff(t,e,x){const n=(i,s=(i+t/60)%6)=>x-x*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function pf(t,e,x){const n=X8(t,1,.5);let i;for(e+x>1&&(i=1/(e+x),e*=i,x*=i),i=0;i<3;i++)n[i]*=1-e-x,n[i]+=e;return n}function gf(t,e,x,n,i){return t===i?(e-x)/n+(e.5?l/(2-s-o):l/(s+o),a=gf(x,n,i,l,s),a=a*60+.5),[a|0,E||0,r]}function ca(t,e,x,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,x,n)).map(sx)}function Aa(t,e,x){return ca(X8,t,e,x)}function mf(t,e,x){return ca(pf,t,e,x)}function Cf(t,e,x){return ca(ff,t,e,x)}function Z8(t){return(t%360+360)%360}function Ff(t){const e=df.exec(t);let x=255,n;if(!e)return;e[5]!==n&&(x=e[6]?yn(+e[5]):sx(+e[5]));const i=Z8(+e[2]),s=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?n=mf(i,s,o):e[1]==="hsv"?n=Cf(i,s,o):n=Aa(i,s,o),{r:n[0],g:n[1],b:n[2],a:x}}function Df(t,e){var x=la(t);x[0]=Z8(x[0]+e),x=Aa(x),t.r=x[0],t.g=x[1],t.b=x[2]}function _f(t){if(!t)return;const e=la(t),x=e[0],n=$E(e[1]),i=$E(e[2]);return t.a<255?`hsla(${x}, ${n}%, ${i}%, ${H0(t.a)})`:`hsl(${x}, ${n}%, ${i}%)`}const zE={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},GE={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function vf(){const t={},e=Object.keys(GE),x=Object.keys(zE);let n,i,s,o,r;for(n=0;n>16&255,s>>8&255,s&255]}return t}let Ii;function bf(t){Ii||(Ii=vf(),Ii.transparent=[0,0,0,0]);const e=Ii[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const yf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Sf(t){const e=yf.exec(t);let x=255,n,i,s;if(e){if(e[7]!==n){const o=+e[7];x=e[8]?yn(o):Z0(o*255,0,255)}return n=+e[1],i=+e[3],s=+e[5],n=255&(e[2]?yn(n):Z0(n,0,255)),i=255&(e[4]?yn(i):Z0(i,0,255)),s=255&(e[6]?yn(s):Z0(s,0,255)),{r:n,g:i,b:s,a:x}}}function wf(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${H0(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Po=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Wx=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Tf(t,e,x){const n=Wx(H0(t.r)),i=Wx(H0(t.g)),s=Wx(H0(t.b));return{r:sx(Po(n+x*(Wx(H0(e.r))-n))),g:sx(Po(i+x*(Wx(H0(e.g))-i))),b:sx(Po(s+x*(Wx(H0(e.b))-s))),a:t.a+x*(e.a-t.a)}}function ki(t,e,x){if(t){let n=la(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*x,e===0?360:1)),n=Aa(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Q8(t,e){return t&&Object.assign(e||{},t)}function WE(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=sx(t[3]))):(e=Q8(t,{r:0,g:0,b:0,a:1}),e.a=sx(e.a)),e}function Pf(t){return t.charAt(0)==="r"?Sf(t):Ff(t)}class ii{constructor(e){if(e instanceof ii)return e;const x=typeof e;let n;x==="object"?n=WE(e):x==="string"&&(n=uf(e)||bf(e)||Pf(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=Q8(this._rgb);return e&&(e.a=H0(e.a)),e}set rgb(e){this._rgb=WE(e)}rgbString(){return this._valid?wf(this._rgb):void 0}hexString(){return this._valid?Bf(this._rgb):void 0}hslString(){return this._valid?_f(this._rgb):void 0}mix(e,x){if(e){const n=this.rgb,i=e.rgb;let s;const o=x===s?.5:x,r=2*o-1,a=n.a-i.a,E=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;s=1-E,n.r=255&E*n.r+s*i.r+.5,n.g=255&E*n.g+s*i.g+.5,n.b=255&E*n.b+s*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(e,x){return e&&(this._rgb=Tf(this._rgb,e._rgb,x)),this}clone(){return new ii(this.rgb)}alpha(e){return this._rgb.a=sx(e),this}clearer(e){const x=this._rgb;return x.a*=1-e,this}greyscale(){const e=this._rgb,x=mi(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=x,this}opaquer(e){const x=this._rgb;return x.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return ki(this._rgb,2,e),this}darken(e){return ki(this._rgb,2,-e),this}saturate(e){return ki(this._rgb,1,e),this}desaturate(e){return ki(this._rgb,1,-e),this}rotate(e){return Df(this._rgb,e),this}}/*! - * Chart.js v4.3.0 - * https://www.chartjs.org - * (c) 2023 Chart.js Contributors - * Released under the MIT License - */function M0(){}const If=(()=>{let t=0;return()=>t++})();function Ue(t){return t===null||typeof t>"u"}function nt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Oe(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function ct(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Zt(t,e){return ct(t)?t:e}function we(t,e){return typeof t>"u"?e:t}const kf=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,e9=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Qe(t,e,x){if(t&&typeof t.call=="function")return t.apply(x,e)}function je(t,e,x,n){let i,s,o;if(nt(t))if(s=t.length,n)for(i=s-1;i>=0;i--)e.call(x,t[i],i);else for(i=0;it,x:t=>t.x,y:t=>t.y};function Rf(t){const e=t.split("."),x=[];let n="";for(const i of e)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(x.push(n),n="");return x}function Nf(t){const e=Rf(t);return x=>{for(const n of e){if(n==="")break;x=x&&x[n]}return x}}function Ex(t,e){return(VE[e]||(VE[e]=Nf(e)))(t)}function ua(t){return t.charAt(0).toUpperCase()+t.slice(1)}const oi=t=>typeof t<"u",lx=t=>typeof t=="function",KE=(t,e)=>{if(t.size!==e.size)return!1;for(const x of t)if(!e.has(x))return!1;return!0};function Lf(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Et=Math.PI,it=2*Et,Hf=it+Et,Rs=Number.POSITIVE_INFINITY,Uf=Et/180,At=Et/2,fx=Et/4,jE=Et*2/3,Q0=Math.log10,P0=Math.sign;function zn(t,e,x){return Math.abs(t-e)i-s).pop(),e}function rn(t){return!isNaN(parseFloat(t))&&isFinite(t)}function zf(t,e){const x=Math.round(t);return x-e<=t&&x+e>=t}function x9(t,e,x){let n,i,s;for(n=0,i=t.length;na&&E=Math.min(e,x)-n&&t<=Math.max(e,x)+n}function Ba(t,e,x){x=x||(o=>t[o]1;)s=i+n>>1,x(s)?i=s:n=s;return{lo:i,hi:n}}const W0=(t,e,x,n)=>Ba(t,x,n?i=>{const s=t[i][e];return st[i][e]Ba(t,x,n=>t[n][e]>=x);function Kf(t,e,x){let n=0,i=t.length;for(;nn&&t[i-1]>x;)i--;return n>0||i{const n="_onData"+ua(x),i=t[x];Object.defineProperty(t,x,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return t._chartjs.listeners.forEach(r=>{typeof r[n]=="function"&&r[n](...s)}),o}})})}function JE(t,e){const x=t._chartjs;if(!x)return;const n=x.listeners,i=n.indexOf(e);i!==-1&&n.splice(i,1),!(n.length>0)&&(i9.forEach(s=>{delete t[s]}),delete t._chartjs)}function s9(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const o9=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function r9(t,e){let x=[],n=!1;return function(...i){x=i,n||(n=!0,o9.call(window,()=>{n=!1,t.apply(e,x)}))}}function qf(t,e){let x;return function(...n){return e?(clearTimeout(x),x=setTimeout(t,e,n)):t.apply(this,n),e}}const da=t=>t==="start"?"left":t==="end"?"right":"center",wt=(t,e,x)=>t==="start"?e:t==="end"?x:(e+x)/2,Yf=(t,e,x,n)=>t===(n?"left":"right")?x:t==="center"?(e+x)/2:e;function a9(t,e,x){const n=e.length;let i=0,s=n;if(t._sorted){const{iScale:o,_parsed:r}=t,a=o.axis,{min:E,max:l,minDefined:A,maxDefined:h}=o.getUserBounds();A&&(i=_t(Math.min(W0(r,o.axis,E).lo,x?n:W0(e,a,o.getPixelForValue(E)).lo),0,n-1)),h?s=_t(Math.max(W0(r,o.axis,l,!0).hi+1,x?0:W0(e,a,o.getPixelForValue(l),!0).hi+1),i,n)-i:s=n-i}return{start:i,count:s}}function E9(t){const{xScale:e,yScale:x,_scaleRanges:n}=t,i={xmin:e.min,xmax:e.max,ymin:x.min,ymax:x.max};if(!n)return t._scaleRanges=i,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==x.min||n.ymax!==x.max;return Object.assign(n,i),s}const Mi=t=>t===0||t===1,XE=(t,e,x)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*it/x)),ZE=(t,e,x)=>Math.pow(2,-10*t)*Math.sin((t-e)*it/x)+1,Gn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*At)+1,easeOutSine:t=>Math.sin(t*At),easeInOutSine:t=>-.5*(Math.cos(Et*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Mi(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Mi(t)?t:XE(t,.075,.3),easeOutElastic:t=>Mi(t)?t:ZE(t,.075,.3),easeInOutElastic(t){return Mi(t)?t:t<.5?.5*XE(t*2,.1125,.45):.5+.5*ZE(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Gn.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Gn.easeInBounce(t*2)*.5:Gn.easeOutBounce(t*2-1)*.5+.5};function fa(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function QE(t){return fa(t)?t:new ii(t)}function Io(t){return fa(t)?t:new ii(t).saturate(.5).darken(.1).hexString()}const Jf=["x","y","borderWidth","radius","tension"],Xf=["color","borderColor","backgroundColor"];function Zf(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Xf},numbers:{type:"number",properties:Jf}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Qf(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const el=new Map;function e7(t,e){e=e||{};const x=t+JSON.stringify(e);let n=el.get(x);return n||(n=new Intl.NumberFormat(t,e),el.set(x,n)),n}function Ci(t,e,x){return e7(e,x).format(t)}const l9={values(t){return nt(t)?t:""+t},numeric(t,e,x){if(t===0)return"0";const n=this.chart.options.locale;let i,s=t;if(x.length>1){const E=Math.max(Math.abs(x[0].value),Math.abs(x[x.length-1].value));(E<1e-4||E>1e15)&&(i="scientific"),s=t7(t,x)}const o=Q0(Math.abs(s)),r=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:i,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),Ci(t,n,a)},logarithmic(t,e,x){if(t===0)return"0";const n=x[e].significand||t/Math.pow(10,Math.floor(Q0(t)));return[1,2,3,5,10,15].includes(n)||e>.8*x.length?l9.numeric.call(this,t,e,x):""}};function t7(t,e){let x=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(x)>=1&&t!==Math.floor(t)&&(x=t-Math.floor(t)),x}var co={formatters:l9};function x7(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,x)=>x.lineWidth,tickColor:(e,x)=>x.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:co.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Nx=Object.create(null),pr=Object.create(null);function Wn(t,e){if(!e)return t;const x=e.split(".");for(let n=0,i=x.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,i)=>Io(i.backgroundColor),this.hoverBorderColor=(n,i)=>Io(i.borderColor),this.hoverColor=(n,i)=>Io(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(x)}set(e,x){return ko(this,e,x)}get(e){return Wn(this,e)}describe(e,x){return ko(pr,e,x)}override(e,x){return ko(Nx,e,x)}route(e,x,n,i){const s=Wn(this,e),o=Wn(this,n),r="_"+x;Object.defineProperties(s,{[r]:{value:s[x],writable:!0},[x]:{enumerable:!0,get(){const a=this[r],E=o[i];return Oe(a)?Object.assign({},E,a):we(a,E)},set(a){this[r]=a}}})}apply(e){e.forEach(x=>x(this))}}var ut=new n7({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Zf,Qf,x7]);function i7(t){return!t||Ue(t.size)||Ue(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ns(t,e,x,n,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,x.push(i)),s>n&&(n=s),n}function s7(t,e,x,n){n=n||{};let i=n.data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(i=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let o=0;const r=x.length;let a,E,l,A,h;for(a=0;ax.length){for(a=0;a0&&t.stroke()}}function V0(t,e,x){return x=x||.5,!e||t&&t.x>e.left-x&&t.xe.top-x&&t.y0&&s.strokeColor!=="";let a,E;for(t.save(),t.font=i.string,a7(t,s),a=0;a+t||0;function pa(t,e){const x={},n=Oe(e),i=n?Object.keys(e):e,s=Oe(t)?n?o=>we(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)x[o]=h7(s(o));return x}function A9(t){return pa(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Mx(t){return pa(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Rt(t){const e=A9(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ct(t,e){t=t||{},e=e||ut.font;let x=we(t.size,e.size);typeof x=="string"&&(x=parseInt(x,10));let n=we(t.style,e.style);n&&!(""+n).match(A7)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const i={family:we(t.family,e.family),lineHeight:u7(we(t.lineHeight,e.lineHeight),x),size:x,style:n,weight:we(t.weight,e.weight),string:""};return i.string=i7(i),i}function Sn(t,e,x,n){let i=!0,s,o,r;for(s=0,o=t.length;sx&&r===0?0:r+a;return{min:o(n,-Math.abs(s)),max:o(i,s)}}function ux(t,e){return Object.assign(Object.create(t),e)}function ga(t,e=[""],x,n,i=()=>t[0]){const s=x||t;typeof n>"u"&&(n=d9("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:n,_getTarget:i,override:r=>ga([r,...t],e,s,n)};return new Proxy(o,{deleteProperty(r,a){return delete r[a],delete r._keys,delete t[0][a],!0},get(r,a){return h9(r,a,()=>D7(a,e,t,r))},getOwnPropertyDescriptor(r,a){return Reflect.getOwnPropertyDescriptor(r._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(r,a){return nl(r).includes(a)},ownKeys(r){return nl(r)},set(r,a,E){const l=r._storage||(r._storage=i());return r[a]=l[a]=E,delete r._keys,!0}})}function an(t,e,x,n){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:x,_stack:new Set,_descriptors:u9(t,n),setContext:s=>an(t,s,x,n),override:s=>an(t.override(s),e,x,n)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete t[o],!0},get(s,o,r){return h9(s,o,()=>f7(s,o,r))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(s,o,r){return t[o]=r,delete s[o],!0}})}function u9(t,e={scriptable:!0,indexable:!0}){const{_scriptable:x=e.scriptable,_indexable:n=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:x,indexable:n,isScriptable:lx(x)?x:()=>x,isIndexable:lx(n)?n:()=>n}}const d7=(t,e)=>t?t+ua(e):e,ma=(t,e)=>Oe(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function h9(t,e,x){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=x();return t[e]=n,n}function f7(t,e,x){const{_proxy:n,_context:i,_subProxy:s,_descriptors:o}=t;let r=n[e];return lx(r)&&o.isScriptable(e)&&(r=p7(e,r,t,x)),nt(r)&&r.length&&(r=g7(e,r,t,o.isIndexable)),ma(e,r)&&(r=an(r,i,s&&s[e],o)),r}function p7(t,e,x,n){const{_proxy:i,_context:s,_subProxy:o,_stack:r}=x;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let a=e(s,o||n);return r.delete(t),ma(t,a)&&(a=Ca(i._scopes,i,t,a)),a}function g7(t,e,x,n){const{_proxy:i,_context:s,_subProxy:o,_descriptors:r}=x;if(typeof s.index<"u"&&n(t))return e[s.index%e.length];if(Oe(e[0])){const a=e,E=i._scopes.filter(l=>l!==a);e=[];for(const l of a){const A=Ca(E,i,t,l);e.push(an(A,s,o&&o[t],r))}}return e}function B9(t,e,x){return lx(t)?t(e,x):t}const m7=(t,e)=>t===!0?e:typeof t=="string"?Ex(e,t):void 0;function C7(t,e,x,n,i){for(const s of e){const o=m7(x,s);if(o){t.add(o);const r=B9(o._fallback,x,i);if(typeof r<"u"&&r!==x&&r!==n)return r}else if(o===!1&&typeof n<"u"&&x!==n)return null}return!1}function Ca(t,e,x,n){const i=e._rootScopes,s=B9(e._fallback,x,n),o=[...t,...i],r=new Set;r.add(n);let a=xl(r,o,x,s||x,n);return a===null||typeof s<"u"&&s!==x&&(a=xl(r,o,s,a,n),a===null)?!1:ga(Array.from(r),[""],i,s,()=>F7(e,x,n))}function xl(t,e,x,n,i){for(;x;)x=C7(t,e,x,n,i);return x}function F7(t,e,x){const n=t._getTarget();e in n||(n[e]={});const i=n[e];return nt(i)&&Oe(x)?x:i||{}}function D7(t,e,x,n){let i;for(const s of e)if(i=d9(d7(s,t),x),typeof i<"u")return ma(t,i)?Ca(x,n,t,i):i}function d9(t,e){for(const x of e){if(!x)continue;const n=x[t];if(typeof n<"u")return n}}function nl(t){let e=t._keys;return e||(e=t._keys=_7(t._scopes)),e}function _7(t){const e=new Set;for(const x of t)for(const n of Object.keys(x).filter(i=>!i.startsWith("_")))e.add(n);return Array.from(e)}function f9(t,e,x,n){const{iScale:i}=t,{key:s="r"}=this._parsing,o=new Array(n);let r,a,E,l;for(r=0,a=n;ret==="x"?"y":"x";function b7(t,e,x,n){const i=t.skip?e:t,s=e,o=x.skip?e:x,r=fr(s,i),a=fr(o,s);let E=r/(r+a),l=a/(r+a);E=isNaN(E)?0:E,l=isNaN(l)?0:l;const A=n*E,h=n*l;return{previous:{x:s.x-A*(o.x-i.x),y:s.y-A*(o.y-i.y)},next:{x:s.x+h*(o.x-i.x),y:s.y+h*(o.y-i.y)}}}function y7(t,e,x){const n=t.length;let i,s,o,r,a,E=En(t,0);for(let l=0;l!E.skip)),e.cubicInterpolationMode==="monotone")w7(t,i);else{let E=n?t[t.length-1]:t[0];for(s=0,o=t.length;st.ownerDocument.defaultView.getComputedStyle(t,null);function I7(t,e){return ho(t).getPropertyValue(e)}const k7=["top","right","bottom","left"];function Ox(t,e,x){const n={};x=x?"-"+x:"";for(let i=0;i<4;i++){const s=k7[i];n[s]=parseFloat(t[e+"-"+s+x])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const M7=(t,e,x)=>(t>0||e>0)&&(!x||!x.shadowRoot);function O7(t,e){const x=t.touches,n=x&&x.length?x[0]:t,{offsetX:i,offsetY:s}=n;let o=!1,r,a;if(M7(i,s,t.target))r=i,a=s;else{const E=e.getBoundingClientRect();r=n.clientX-E.left,a=n.clientY-E.top,o=!0}return{x:r,y:a,box:o}}function Fx(t,e){if("native"in t)return t;const{canvas:x,currentDevicePixelRatio:n}=e,i=ho(x),s=i.boxSizing==="border-box",o=Ox(i,"padding"),r=Ox(i,"border","width"),{x:a,y:E,box:l}=O7(t,x),A=o.left+(l&&r.left),h=o.top+(l&&r.top);let{width:B,height:p}=e;return s&&(B-=o.width+r.width,p-=o.height+r.height),{x:Math.round((a-A)/B*x.width/n),y:Math.round((E-h)/p*x.height/n)}}function R7(t,e,x){let n,i;if(e===void 0||x===void 0){const s=Fa(t);if(!s)e=t.clientWidth,x=t.clientHeight;else{const o=s.getBoundingClientRect(),r=ho(s),a=Ox(r,"border","width"),E=Ox(r,"padding");e=o.width-E.width-a.width,x=o.height-E.height-a.height,n=Ls(r.maxWidth,s,"clientWidth"),i=Ls(r.maxHeight,s,"clientHeight")}}return{width:e,height:x,maxWidth:n||Rs,maxHeight:i||Rs}}const Ri=t=>Math.round(t*10)/10;function N7(t,e,x,n){const i=ho(t),s=Ox(i,"margin"),o=Ls(i.maxWidth,t,"clientWidth")||Rs,r=Ls(i.maxHeight,t,"clientHeight")||Rs,a=R7(t,e,x);let{width:E,height:l}=a;if(i.boxSizing==="content-box"){const h=Ox(i,"border","width"),B=Ox(i,"padding");E-=B.width+h.width,l-=B.height+h.height}return E=Math.max(0,E-s.width),l=Math.max(0,n?E/n:l-s.height),E=Ri(Math.min(E,o,a.maxWidth)),l=Ri(Math.min(l,r,a.maxHeight)),E&&!l&&(l=Ri(E/2)),(e!==void 0||x!==void 0)&&n&&a.height&&l>a.height&&(l=a.height,E=Ri(Math.floor(l*n))),{width:E,height:l}}function il(t,e,x){const n=e||1,i=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(x||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||o.height!==i||o.width!==s?(t.currentDevicePixelRatio=n,o.height=i,o.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}const L7=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return t}();function sl(t,e){const x=I7(t,e),n=x&&x.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Dx(t,e,x,n){return{x:t.x+x*(e.x-t.x),y:t.y+x*(e.y-t.y)}}function H7(t,e,x,n){return{x:t.x+x*(e.x-t.x),y:n==="middle"?x<.5?t.y:e.y:n==="after"?x<1?t.y:e.y:x>0?e.y:t.y}}function U7(t,e,x,n){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=Dx(t,i,x),r=Dx(i,s,x),a=Dx(s,e,x),E=Dx(o,r,x),l=Dx(r,a,x);return Dx(E,l,x)}const $7=function(t,e){return{x(x){return t+t+e-x},setWidth(x){e=x},textAlign(x){return x==="center"?x:x==="right"?"left":"right"},xPlus(x,n){return x-n},leftForLtr(x,n){return x-n}}},z7=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function xn(t,e,x){return t?$7(e,x):z7()}function m9(t,e){let x,n;(e==="ltr"||e==="rtl")&&(x=t.canvas.style,n=[x.getPropertyValue("direction"),x.getPropertyPriority("direction")],x.setProperty("direction",e,"important"),t.prevTextDirection=n)}function C9(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function F9(t){return t==="angle"?{between:ri,compare:Gf,normalize:t0}:{between:G0,compare:(e,x)=>e-x,normalize:e=>e}}function ol({start:t,end:e,count:x,loop:n,style:i}){return{start:t%x,end:e%x,loop:n&&(e-t+1)%x===0,style:i}}function G7(t,e,x){const{property:n,start:i,end:s}=x,{between:o,normalize:r}=F9(n),a=e.length;let{start:E,end:l,loop:A}=t,h,B;if(A){for(E+=a,l+=a,h=0,B=a;ha(i,I,C)&&r(i,I)!==0,v=()=>r(s,C)===0||a(s,I,C),D=()=>f||y(),T=()=>!f||v();for(let b=l,P=l;b<=A;++b)S=e[b%o],!S.skip&&(C=E(S[n]),C!==I&&(f=a(C,i,s),g===null&&D()&&(g=r(C,i)===0?b:P),g!==null&&T()&&(p.push(ol({start:g,end:b,loop:h,count:o,style:B})),g=null),P=b,I=C));return g!==null&&p.push(ol({start:g,end:A,loop:h,count:o,style:B})),p}function _9(t,e){const x=[],n=t.segments;for(let i=0;ii&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function V7(t,e,x,n){const i=t.length,s=[];let o=e,r=t[e],a;for(a=e+1;a<=x;++a){const E=t[a%i];E.skip||E.stop?r.skip||(n=!1,s.push({start:e%i,end:(a-1)%i,loop:n}),e=o=E.stop?a:null):(o=a,r.skip&&(e=a)),r=E}return o!==null&&s.push({start:e%i,end:o%i,loop:n}),s}function K7(t,e){const x=t.points,n=t.options.spanGaps,i=x.length;if(!i)return[];const s=!!t._loop,{start:o,end:r}=W7(x,i,s,n);if(n===!0)return rl(t,[{start:o,end:r,loop:s}],x,e);const a=rr({chart:e,initial:x.initial,numSteps:o,currentStep:Math.min(n-x.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=o9.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let x=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const s=n.items;let o=s.length-1,r=!1,a;for(;o>=0;--o)a=s[o],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(e),r=!0):(s[o]=s[s.length-1],s.pop());r&&(i.draw(),this._notify(i,n,e,"progress")),s.length||(n.running=!1,this._notify(i,n,e,"complete"),n.initial=!1),x+=s.length}),this._lastDate=e,x===0&&(this._running=!1)}_getAnims(e){const x=this._charts;let n=x.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},x.set(e,n)),n}listen(e,x,n){this._getAnims(e).listeners[x].push(n)}add(e,x){!x||!x.length||this._getAnims(e).items.push(...x)}has(e){return this._getAnims(e).items.length>0}start(e){const x=this._charts.get(e);x&&(x.running=!0,x.start=Date.now(),x.duration=x.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const x=this._charts.get(e);return!(!x||!x.running||!x.items.length)}stop(e){const x=this._charts.get(e);if(!x||!x.items.length)return;const n=x.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();x.items=[],this._notify(e,x,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var R0=new Y7;const El="transparent",J7={boolean(t,e,x){return x>.5?e:t},color(t,e,x){const n=QE(t||El),i=n.valid&&QE(e||El);return i&&i.valid?i.mix(n,x).hexString():e},number(t,e,x){return t+(e-t)*x}};class X7{constructor(e,x,n,i){const s=x[n];i=Sn([e.to,i,s,e.from]);const o=Sn([e.from,s,i]);this._active=!0,this._fn=e.fn||J7[e.type||typeof o],this._easing=Gn[e.easing]||Gn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=x,this._prop=n,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,x,n){if(this._active){this._notify(!1);const i=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Sn([e.to,x,i,e.from]),this._from=Sn([e.from,i,x])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const x=e-this._start,n=this._duration,i=this._prop,s=this._from,o=this._loop,r=this._to;let a;if(this._active=s!==r&&(o||x1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(s,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((x,n)=>{e.push({res:x,rej:n})})}_notify(e){const x=e?"res":"rej",n=this._promises||[];for(let i=0;i{const s=e[i];if(!Oe(s))return;const o={};for(const r of x)o[r]=s[r];(nt(s.properties)&&s.properties||[i]).forEach(r=>{(r===i||!n.has(r))&&n.set(r,o)})})}_animateOptions(e,x){const n=x.options,i=Q7(e,n);if(!i)return[];const s=this._createAnimations(i,n);return n.$shared&&Z7(e.options.$animations,n).then(()=>{e.options=n},()=>{}),s}_createAnimations(e,x){const n=this._properties,i=[],s=e.$animations||(e.$animations={}),o=Object.keys(x),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const E=o[a];if(E.charAt(0)==="$")continue;if(E==="options"){i.push(...this._animateOptions(e,x));continue}const l=x[E];let A=s[E];const h=n.get(E);if(A)if(h&&A.active()){A.update(h,l,r);continue}else A.cancel();if(!h||!h.duration){e[E]=l;continue}s[E]=A=new X7(h,e,E,l),i.push(A)}return i}update(e,x){if(this._properties.size===0){Object.assign(e,x);return}const n=this._createAnimations(e,x);if(n.length)return R0.add(this._chart,n),!0}}function Z7(t,e){const x=[],n=Object.keys(e);for(let i=0;i0||!x&&s<0)return i.index}return null}function hl(t,e){const{chart:x,_cachedMeta:n}=t,i=x._stacks||(x._stacks={}),{iScale:s,vScale:o,index:r}=n,a=s.axis,E=o.axis,l=n2(s,o,n),A=e.length;let h;for(let B=0;Bx[n].axis===e).shift()}function o2(t,e){return ux(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function r2(t,e,x){return ux(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:x,index:e,mode:"default",type:"data"})}function fn(t,e){const x=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[n]===void 0||s[n][x]===void 0)return;delete s[n][x],s[n]._visualValues!==void 0&&s[n]._visualValues[x]!==void 0&&delete s[n]._visualValues[x]}}}const Oo=t=>t==="reset"||t==="none",Bl=(t,e)=>e?t:Object.assign({},t),a2=(t,e,x)=>t&&!e.hidden&&e._stacked&&{keys:b9(x,!0),values:null};class C0{constructor(e,x){this.chart=e,this._ctx=e.ctx,this.index=x,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Al(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&fn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,x=this._cachedMeta,n=this.getDataset(),i=(A,h,B,p)=>A==="x"?h:A==="r"?p:B,s=x.xAxisID=we(n.xAxisID,Mo(e,"x")),o=x.yAxisID=we(n.yAxisID,Mo(e,"y")),r=x.rAxisID=we(n.rAxisID,Mo(e,"r")),a=x.indexAxis,E=x.iAxisID=i(a,s,o,r),l=x.vAxisID=i(a,o,s,r);x.xScale=this.getScaleForId(s),x.yScale=this.getScaleForId(o),x.rScale=this.getScaleForId(r),x.iScale=this.getScaleForId(E),x.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const x=this._cachedMeta;return e===x.iScale?x.vScale:x.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&JE(this._data,this),e._stacked&&fn(e)}_dataCheck(){const e=this.getDataset(),x=e.data||(e.data=[]),n=this._data;if(Oe(x))this._data=x2(x);else if(n!==x){if(n){JE(n,this);const i=this._cachedMeta;fn(i),i._parsed=[]}x&&Object.isExtensible(x)&&jf(x,this),this._syncList=[],this._data=x}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const x=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const s=x._stacked;x._stacked=Al(x.vScale,x),x.stack!==n.stack&&(i=!0,fn(x),x.stack=n.stack),this._resyncElements(e),(i||s!==x._stacked)&&hl(this,x._parsed)}configure(){const e=this.chart.config,x=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),x,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,x){const{_cachedMeta:n,_data:i}=this,{iScale:s,_stacked:o}=n,r=s.axis;let a=e===0&&x===i.length?!0:n._sorted,E=e>0&&n._parsed[e-1],l,A,h;if(this._parsing===!1)n._parsed=i,n._sorted=!0,h=i;else{nt(i[e])?h=this.parseArrayData(n,i,e,x):Oe(i[e])?h=this.parseObjectData(n,i,e,x):h=this.parsePrimitiveData(n,i,e,x);const B=()=>A[r]===null||E&&A[r]f||A=0;--h)if(!p()){this.updateRangeFromParsed(E,e,B,a);break}}return E}getAllParsedValues(e){const x=this._cachedMeta._parsed,n=[];let i,s,o;for(i=0,s=x.length;i=0&&ethis.getContext(n,i,x),f=E.resolveNamedOptions(h,B,p,A);return f.$shared&&(f.$shared=a,s[o]=Object.freeze(Bl(f,a))),f}_resolveAnimations(e,x,n){const i=this.chart,s=this._cachedDataOpts,o=`animation-${x}`,r=s[o];if(r)return r;let a;if(i.options.animation!==!1){const l=this.chart.config,A=l.datasetAnimationScopeKeys(this._type,x),h=l.getOptionScopes(this.getDataset(),A);a=l.createResolver(h,this.getContext(e,n,x))}const E=new v9(i,a&&a.animations);return a&&a._cacheable&&(s[o]=Object.freeze(E)),E}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,x){return!x||Oo(e)||this.chart._animationsDisabled}_getSharedOptions(e,x){const n=this.resolveDataElementOptions(e,x),i=this._sharedOptions,s=this.getSharedOptions(n),o=this.includeOptions(x,s)||s!==i;return this.updateSharedOptions(s,x,n),{sharedOptions:s,includeOptions:o}}updateElement(e,x,n,i){Oo(i)?Object.assign(e,n):this._resolveAnimations(x,i).update(e,n)}updateSharedOptions(e,x,n){e&&!Oo(x)&&this._resolveAnimations(void 0,x).update(e,n)}_setStyle(e,x,n,i){e.active=i;const s=this.getStyle(x,i);this._resolveAnimations(x,n,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,x,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,x,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const x=this._data,n=this._cachedMeta.data;for(const[r,a,E]of this._syncList)this[r](a,E);this._syncList=[];const i=n.length,s=x.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,e):s{for(E.length+=x,r=E.length-1;r>=o;r--)E[r]=E[r-x]};for(a(s),r=e;ri-s))}return t._cache.$bar}function l2(t){const e=t.iScale,x=E2(e,t.type);let n=e._length,i,s,o,r;const a=()=>{o===32767||o===-32768||(oi(r)&&(n=Math.min(n,Math.abs(o-r)||n)),r=o)};for(i=0,s=x.length;i0?i[t-1]:null,r=tMath.abs(r)&&(a=r,E=o),e[x.axis]=E,e._custom={barStart:a,barEnd:E,start:i,end:s,min:o,max:r}}function y9(t,e,x,n){return nt(t)?u2(t,e,x,n):e[x.axis]=x.parse(t,n),e}function dl(t,e,x,n){const i=t.iScale,s=t.vScale,o=i.getLabels(),r=i===s,a=[];let E,l,A,h;for(E=x,l=x+n;E=x?1:-1)}function B2(t){let e,x,n,i,s;return t.horizontal?(e=t.base>t.x,x="left",n="right"):(e=t.basea.controller.options.grouped),s=n.options.stacked,o=[],r=a=>{const E=a.controller.getParsed(x),l=E&&E[a.vScale.axis];if(Ue(l)||isNaN(l))return!0};for(const a of i)if(!(x!==void 0&&r(a))&&((s===!1||o.indexOf(a.stack)===-1||s===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,x,n){const i=this._getStacks(e,n),s=x!==void 0?i.indexOf(x):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,x=this._cachedMeta,n=x.iScale,i=[];let s,o;for(s=0,o=x.data.length;s=0;--n)x=Math.max(x,e[n].size(this.resolveDataElementOptions(n))/2);return x>0&&x}getLabelAndValue(e){const x=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:s}=x,o=this.getParsed(e),r=i.getLabelForValue(o.x),a=s.getLabelForValue(o.y),E=o._custom;return{label:n[e]||"",value:"("+r+", "+a+(E?", "+E:"")+")"}}update(e){const x=this._cachedMeta.data;this.updateElements(x,0,x.length,e)}updateElements(e,x,n,i){const s=i==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:E}=this._getSharedOptions(x,i),l=o.axis,A=r.axis;for(let h=x;hri(I,r,a,!0)?1:Math.max(y,y*x,v,v*x),p=(I,y,v)=>ri(I,r,a,!0)?-1:Math.min(y,y*x,v,v*x),f=B(0,E,A),g=B(At,l,h),C=p(Et,E,A),S=p(Et+At,l,h);n=(f-C)/2,i=(g-S)/2,s=-(f+C)/2,o=-(g+S)/2}return{ratioX:n,ratioY:i,offsetX:s,offsetY:o}}class Tx extends C0{constructor(e,x){super(e,x),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,x){const n=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=n;else{let s=a=>+n[a];if(Oe(n[e])){const{key:a="value"}=this._parsing;s=E=>+Ex(n[E],a)}let o,r;for(o=e,r=e+x;o0&&!isNaN(e)?it*(Math.abs(e)/x):0}getLabelAndValue(e){const x=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=Ci(x._parsed[e],n.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let x=0;const n=this.chart;let i,s,o,r,a;if(!e){for(i=0,s=n.data.datasets.length;ie!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),_(Tx,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const x=e.data;if(x.labels.length&&x.datasets.length){const{labels:{pointStyle:n,color:i}}=e.legend.options;return x.labels.map((s,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,x,n){n.chart.toggleDataVisibility(x.index),n.chart.update()}}}});class ss extends C0{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const x=this._cachedMeta,{dataset:n,data:i=[],_dataset:s}=x,o=this.chart._animationsDisabled;let{start:r,count:a}=a9(x,i,o);this._drawStart=r,this._drawCount=a,E9(x)&&(r=0,a=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!s._decimated,n.points=i;const E=this.resolveDatasetElementOptions(e);this.options.showLine||(E.borderWidth=0),E.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:E},e),this.updateElements(i,r,a,e)}updateElements(e,x,n,i){const s=i==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:E}=this._cachedMeta,{sharedOptions:l,includeOptions:A}=this._getSharedOptions(x,i),h=o.axis,B=r.axis,{spanGaps:p,segment:f}=this.options,g=rn(p)?p:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||s||i==="none",S=x+n,I=e.length;let y=x>0&&this.getParsed(x-1);for(let v=0;v=S){T.skip=!0;continue}const b=this.getParsed(v),P=Ue(b[B]),O=T[h]=o.getPixelForValue(b[h],v),V=T[B]=s||P?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,b,a):b[B],v);T.skip=isNaN(O)||isNaN(V)||P,T.stop=v>0&&Math.abs(b[h]-y[h])>g,f&&(T.parsed=b,T.raw=E.data[v]),A&&(T.options=l||this.resolveDataElementOptions(v,D.active?"active":i)),C||this.updateElement(D,v,T,i),y=b}}getMaxOverflow(){const e=this._cachedMeta,x=e.dataset,n=x.options&&x.options.borderWidth||0,i=e.data||[];if(!i.length)return n;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,s,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}_(ss,"id","line"),_(ss,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),_(ss,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Vn extends C0{constructor(e,x){super(e,x),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const x=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=Ci(x._parsed[e].r,n.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,x,n,i){return f9.bind(this)(e,x,n,i)}update(e){const x=this._cachedMeta.data;this._updateRadius(),this.updateElements(x,0,x.length,e)}getMinMax(){const e=this._cachedMeta,x={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((n,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(sx.max&&(x.max=s))}),x}_updateRadius(){const e=this.chart,x=e.chartArea,n=e.options,i=Math.min(x.right-x.left,x.bottom-x.top),s=Math.max(i/2,0),o=Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0),r=(s-o)/e.getVisibleDatasetCount();this.outerRadius=s-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,x,n,i){const s=i==="reset",o=this.chart,a=o.options.animation,E=this._cachedMeta.rScale,l=E.xCenter,A=E.yCenter,h=E.getIndexAngle(0)-.5*Et;let B=h,p;const f=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&x++}),x}_computeAngle(e,x,n){return this.chart.getDataVisibility(e)?g0(this.resolveDataElementOptions(e,x).angle||n):0}}_(Vn,"id","polarArea"),_(Vn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),_(Vn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const x=e.data;if(x.labels.length&&x.datasets.length){const{labels:{pointStyle:n,color:i}}=e.legend.options;return x.labels.map((s,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,x,n){n.chart.toggleDataVisibility(x.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class mr extends Tx{}_(mr,"id","pie"),_(mr,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class os extends C0{getLabelAndValue(e){const x=this._cachedMeta.vScale,n=this.getParsed(e);return{label:x.getLabels()[e],value:""+x.getLabelForValue(n[x.axis])}}parseObjectData(e,x,n,i){return f9.bind(this)(e,x,n,i)}update(e){const x=this._cachedMeta,n=x.dataset,i=x.data||[],s=x.iScale.getLabels();if(n.points=i,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(n,void 0,r,e)}this.updateElements(i,0,i.length,e)}updateElements(e,x,n,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let r=x;r0&&this.getParsed(x-1);for(let y=x;y0&&Math.abs(D[B]-I[B])>C,g&&(T.parsed=D,T.raw=E.data[y]),h&&(T.options=A||this.resolveDataElementOptions(y,v.active?"active":i)),S||this.updateElement(v,y,T,i),I=D}this.updateSharedOptions(A,i,l)}getMaxOverflow(){const e=this._cachedMeta,x=e.data||[];if(!this.options.showLine){let r=0;for(let a=x.length-1;a>=0;--a)r=Math.max(r,x[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const n=e.dataset,i=n.options&&n.options.borderWidth||0;if(!x.length)return i;const s=x[0].size(this.resolveDataElementOptions(0)),o=x[x.length-1].size(this.resolveDataElementOptions(x.length-1));return Math.max(i,s,o)/2}}_(rs,"id","scatter"),_(rs,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),_(rs,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var m2=Object.freeze({__proto__:null,BarController:ns,BubbleController:is,DoughnutController:Tx,LineController:ss,PieController:mr,PolarAreaController:Vn,RadarController:os,ScatterController:rs});function gx(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Da{constructor(e){_(this,"options");this.options=e||{}}static override(e){Object.assign(Da.prototype,e)}init(){}formats(){return gx()}parse(){return gx()}format(){return gx()}add(){return gx()}diff(){return gx()}startOf(){return gx()}endOf(){return gx()}}var C2={_date:Da};function F2(t,e,x,n){const{controller:i,data:s,_sorted:o}=t,r=i._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&s.length){const a=r._reversePixels?Vf:W0;if(n){if(i._sharedOptions){const E=s[0],l=typeof E.getRange=="function"&&E.getRange(e);if(l){const A=a(s,e,x-l),h=a(s,e,x+l);return{lo:A.lo,hi:h.hi}}}}else return a(s,e,x)}return{lo:0,hi:s.length-1}}function Fi(t,e,x,n,i){const s=t.getSortedVisibleDatasetMetas(),o=x[e];for(let r=0,a=s.length;r{a[o](e[x],i)&&(s.push({element:a,datasetIndex:E,index:l}),r=r||a.inRange(e.x,e.y,i))}),n&&!r?[]:s}var b2={evaluateInteractionItems:Fi,modes:{index(t,e,x,n){const i=Fx(e,t),s=x.axis||"x",o=x.includeInvisible||!1,r=x.intersect?No(t,i,s,n,o):Lo(t,i,s,!1,n,o),a=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(E=>{const l=r[0].index,A=E.data[l];A&&!A.skip&&a.push({element:A,datasetIndex:E.index,index:l})}),a):[]},dataset(t,e,x,n){const i=Fx(e,t),s=x.axis||"xy",o=x.includeInvisible||!1;let r=x.intersect?No(t,i,s,n,o):Lo(t,i,s,!1,n,o);if(r.length>0){const a=r[0].datasetIndex,E=t.getDatasetMeta(a).data;r=[];for(let l=0;lx.pos===e)}function ml(t,e){return t.filter(x=>S9.indexOf(x.pos)===-1&&x.box.axis===e)}function gn(t,e){return t.sort((x,n)=>{const i=e?n:x,s=e?x:n;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function y2(t){const e=[];let x,n,i,s,o,r;for(x=0,n=(t||[]).length;xE.box.fullSize),!0),n=gn(pn(e,"left"),!0),i=gn(pn(e,"right")),s=gn(pn(e,"top"),!0),o=gn(pn(e,"bottom")),r=ml(e,"x"),a=ml(e,"y");return{fullSize:x,leftAndTop:n.concat(s),rightAndBottom:i.concat(a).concat(o).concat(r),chartArea:pn(e,"chartArea"),vertical:n.concat(i).concat(a),horizontal:s.concat(o).concat(r)}}function Cl(t,e,x,n){return Math.max(t[x],e[x])+Math.max(t[n],e[n])}function w9(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function P2(t,e,x,n){const{pos:i,box:s}=x,o=t.maxPadding;if(!Oe(i)){x.size&&(t[i]-=x.size);const A=n[x.stack]||{size:0,count:1};A.size=Math.max(A.size,x.horizontal?s.height:s.width),x.size=A.size/A.count,t[i]+=x.size}s.getPadding&&w9(o,s.getPadding());const r=Math.max(0,e.outerWidth-Cl(o,t,"left","right")),a=Math.max(0,e.outerHeight-Cl(o,t,"top","bottom")),E=r!==t.w,l=a!==t.h;return t.w=r,t.h=a,x.horizontal?{same:E,other:l}:{same:l,other:E}}function I2(t){const e=t.maxPadding;function x(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=x("top"),t.x+=x("left"),x("right"),x("bottom")}function k2(t,e){const x=e.maxPadding;function n(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(e[o],x[o])}),s}return n(t?["left","right"]:["top","bottom"])}function wn(t,e,x,n){const i=[];let s,o,r,a,E,l;for(s=0,o=t.length,E=0;s{typeof f.beforeLayout=="function"&&f.beforeLayout()});const l=a.reduce((f,g)=>g.box.options&&g.box.options.display===!1?f:f+1,0)||1,A=Object.freeze({outerWidth:e,outerHeight:x,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/l,hBoxMaxHeight:o/2}),h=Object.assign({},i);w9(h,Rt(n));const B=Object.assign({maxPadding:h,w:s,h:o,x:i.left,y:i.top},i),p=w2(a.concat(E),A);wn(r.fullSize,B,A,p),wn(a,B,A,p),wn(E,B,A,p)&&wn(a,B,A,p),I2(B),Fl(r.leftAndTop,B,A,p),B.x+=B.w,B.y+=B.h,Fl(r.rightAndBottom,B,A,p),t.chartArea={left:B.left,top:B.top,right:B.left+B.w,bottom:B.top+B.h,height:B.h,width:B.w},je(r.chartArea,f=>{const g=f.box;Object.assign(g,t.chartArea),g.update(B.w,B.h,{left:0,top:0,right:0,bottom:0})})}};class T9{acquireContext(e,x){}releaseContext(e){return!1}addEventListener(e,x,n){}removeEventListener(e,x,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,x,n,i){return x=Math.max(0,x||e.width),n=n||e.height,{width:x,height:Math.max(0,i?Math.floor(x/i):n)}}isAttached(e){return!0}updateConfig(e){}}class M2 extends T9{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const as="$chartjs",O2={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Dl=t=>t===null||t==="";function R2(t,e){const x=t.style,n=t.getAttribute("height"),i=t.getAttribute("width");if(t[as]={initial:{height:n,width:i,style:{display:x.display,height:x.height,width:x.width}}},x.display=x.display||"block",x.boxSizing=x.boxSizing||"border-box",Dl(i)){const s=sl(t,"width");s!==void 0&&(t.width=s)}if(Dl(n))if(t.style.height==="")t.height=t.width/(e||2);else{const s=sl(t,"height");s!==void 0&&(t.height=s)}return t}const P9=L7?{passive:!0}:!1;function N2(t,e,x){t.addEventListener(e,x,P9)}function L2(t,e,x){t.canvas.removeEventListener(e,x,P9)}function H2(t,e){const x=O2[t.type]||t.type,{x:n,y:i}=Fx(t,e);return{type:x,chart:e,native:t,x:n!==void 0?n:null,y:i!==void 0?i:null}}function Hs(t,e){for(const x of t)if(x===e||x.contains(e))return!0}function U2(t,e,x){const n=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const r of s)o=o||Hs(r.addedNodes,n),o=o&&!Hs(r.removedNodes,n);o&&x()});return i.observe(document,{childList:!0,subtree:!0}),i}function $2(t,e,x){const n=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const r of s)o=o||Hs(r.removedNodes,n),o=o&&!Hs(r.addedNodes,n);o&&x()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ei=new Map;let _l=0;function I9(){const t=window.devicePixelRatio;t!==_l&&(_l=t,Ei.forEach((e,x)=>{x.currentDevicePixelRatio!==t&&e()}))}function z2(t,e){Ei.size||window.addEventListener("resize",I9),Ei.set(t,e)}function G2(t){Ei.delete(t),Ei.size||window.removeEventListener("resize",I9)}function W2(t,e,x){const n=t.canvas,i=n&&Fa(n);if(!i)return;const s=r9((r,a)=>{const E=i.clientWidth;x(r,a),E{const a=r[0],E=a.contentRect.width,l=a.contentRect.height;E===0&&l===0||s(E,l)});return o.observe(i),z2(t,s),o}function Ho(t,e,x){x&&x.disconnect(),e==="resize"&&G2(t)}function V2(t,e,x){const n=t.canvas,i=r9(s=>{t.ctx!==null&&x(H2(s,t))},t);return N2(n,e,i),i}class K2 extends T9{acquireContext(e,x){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(R2(e,x),n):null}releaseContext(e){const x=e.canvas;if(!x[as])return!1;const n=x[as].initial;["height","width"].forEach(s=>{const o=n[s];Ue(o)?x.removeAttribute(s):x.setAttribute(s,o)});const i=n.style||{};return Object.keys(i).forEach(s=>{x.style[s]=i[s]}),x.width=x.width,delete x[as],!0}addEventListener(e,x,n){this.removeEventListener(e,x);const i=e.$proxies||(e.$proxies={}),o={attach:U2,detach:$2,resize:W2}[x]||V2;i[x]=o(e,x,n)}removeEventListener(e,x){const n=e.$proxies||(e.$proxies={}),i=n[x];if(!i)return;({attach:Ho,detach:Ho,resize:Ho}[x]||L2)(e,x,i),n[x]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,x,n,i){return N7(e,x,n,i)}isAttached(e){const x=Fa(e);return!!(x&&x.isConnected)}}function j2(t){return!g9()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?M2:K2}var ji;let q0=(ji=class{constructor(){_(this,"x");_(this,"y");_(this,"active",!1);_(this,"options");_(this,"$animations")}tooltipPosition(e){const{x,y:n}=this.getProps(["x","y"],e);return{x,y:n}}hasValue(){return rn(this.x)&&rn(this.y)}getProps(e,x){const n=this.$animations;if(!x||!n)return this;const i={};return e.forEach(s=>{i[s]=n[s]&&n[s].active()?n[s]._to:this[s]}),i}},_(ji,"defaults",{}),_(ji,"defaultRoutes"),ji);function q2(t,e){const x=t.options.ticks,n=Y2(t),i=Math.min(x.maxTicksLimit||n,n),s=x.major.enabled?X2(e):[],o=s.length,r=s[0],a=s[o-1],E=[];if(o>i)return Z2(e,E,s,o/i),E;const l=J2(s,e,i);if(o>0){let A,h;const B=o>1?Math.round((a-r)/(o-1)):null;for(Li(e,E,l,Ue(B)?0:r-B,r),A=0,h=o-1;Ai)return a}return Math.max(i,1)}function X2(t){const e=[];let x,n;for(x=0,n=t.length;xt==="left"?"right":t==="right"?"left":t,vl=(t,e,x)=>e==="top"||e==="left"?t[e]+x:t[e]-x,bl=(t,e)=>Math.min(e||t,t);function yl(t,e){const x=[],n=t.length/e,i=t.length;let s=0;for(;so+r)))return a}function xp(t,e){je(t,x=>{const n=x.gc,i=n.length/2;let s;if(i>e){for(s=0;sn?n:x,n=i&&x>n?x:n,{min:Zt(x,Zt(n,x)),max:Zt(n,Zt(x,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Qe(this.options.beforeUpdate,[this])}update(e,x,n){const{beginAtZero:i,grace:s,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=x,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=B7(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=s||n<=1||!this.isHorizontal()){this.labelRotation=i;return}const l=this._getLabelSizes(),A=l.widest.width,h=l.highest.height,B=_t(this.chart.width-A,0,this.maxWidth);r=e.offset?this.maxWidth/n:B/(n-1),A+6>r&&(r=B/(n-(e.offset?.5:1)),a=this.maxHeight-mn(e.grid)-x.padding-Sl(e.title,this.chart.options.font),E=Math.sqrt(A*A+h*h),o=ha(Math.min(Math.asin(_t((l.highest.height+6)/r,-1,1)),Math.asin(_t(a/E,-1,1))-Math.asin(_t(h/E,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:x,options:{ticks:n,title:i,grid:s}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Sl(i,x.options.font);if(r?(e.width=this.maxWidth,e.height=mn(s)+a):(e.height=this.maxHeight,e.width=mn(s)+a),n.display&&this.ticks.length){const{first:E,last:l,widest:A,highest:h}=this._getLabelSizes(),B=n.padding*2,p=g0(this.labelRotation),f=Math.cos(p),g=Math.sin(p);if(r){const C=n.mirror?0:g*A.width+f*h.height;e.height=Math.min(this.maxHeight,e.height+C+B)}else{const C=n.mirror?0:f*A.width+g*h.height;e.width=Math.min(this.maxWidth,e.width+C+B)}this._calculatePadding(E,l,g,f)}}this._handleMargins(),r?(this.width=this._length=x.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=x.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,x,n,i){const{ticks:{align:s,padding:o},position:r}=this.options,a=this.labelRotation!==0,E=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const l=this.getPixelForTick(0)-this.left,A=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,B=0;a?E?(h=i*e.width,B=n*x.height):(h=n*e.height,B=i*x.width):s==="start"?B=x.width:s==="end"?h=e.width:s!=="inner"&&(h=e.width/2,B=x.width/2),this.paddingLeft=Math.max((h-l+o)*this.width/(this.width-l),0),this.paddingRight=Math.max((B-A+o)*this.width/(this.width-A),0)}else{let l=x.height/2,A=e.height/2;s==="start"?(l=0,A=e.height):s==="end"&&(l=x.height,A=0),this.paddingTop=l+o,this.paddingBottom=A+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Qe(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:x}=this.options;return x==="top"||x==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let x,n;for(x=0,n=e.length;x({width:o[P]||0,height:r[P]||0});return{first:b(0),last:b(x-1),widest:b(D),highest:b(T),widths:o,heights:r}}getLabelForValue(e){return e}getPixelForValue(e,x){return NaN}getValueForPixel(e){}getPixelForTick(e){const x=this.ticks;return e<0||e>x.length-1?null:this.getPixelForValue(x[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const x=this._startPixel+e*this._length;return Wf(this._alignToPixels?px(this.chart,x,0):x)}getDecimalForPixel(e){const x=(e-this._startPixel)/this._length;return this._reversePixels?1-x:x}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:x}=this;return e<0&&x<0?x:e>0&&x>0?e:0}getContext(e){const x=this.ticks||[];if(e>=0&&er*i?r/n:a/i:a*i0}_computeGridLineItems(e){const x=this.axis,n=this.chart,i=this.options,{grid:s,position:o,border:r}=i,a=s.offset,E=this.isHorizontal(),A=this.ticks.length+(a?1:0),h=mn(s),B=[],p=r.setContext(this.getContext()),f=p.display?p.width:0,g=f/2,C=function(xe){return px(n,xe,f)};let S,I,y,v,D,T,b,P,O,V,N,K;if(o==="top")S=C(this.bottom),T=this.bottom-h,P=S-g,V=C(e.top)+g,K=e.bottom;else if(o==="bottom")S=C(this.top),V=e.top,K=C(e.bottom)-g,T=S+g,P=this.top+h;else if(o==="left")S=C(this.right),D=this.right-h,b=S-g,O=C(e.left)+g,N=e.right;else if(o==="right")S=C(this.left),O=e.left,N=C(e.right)-g,D=S+g,b=this.left+h;else if(x==="x"){if(o==="center")S=C((e.top+e.bottom)/2+.5);else if(Oe(o)){const xe=Object.keys(o)[0],Z=o[xe];S=C(this.chart.scales[xe].getPixelForValue(Z))}V=e.top,K=e.bottom,T=S+g,P=T+h}else if(x==="y"){if(o==="center")S=C((e.left+e.right)/2);else if(Oe(o)){const xe=Object.keys(o)[0],Z=o[xe];S=C(this.chart.scales[xe].getPixelForValue(Z))}D=S-g,b=D-h,O=e.left,N=e.right}const W=we(i.ticks.maxTicksLimit,A),X=Math.max(1,Math.ceil(A/W));for(I=0;Is.value===e);return i>=0?x.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const x=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,o;const r=(a,E,l)=>{!l.width||!l.color||(n.save(),n.lineWidth=l.width,n.strokeStyle=l.color,n.setLineDash(l.borderDash||[]),n.lineDashOffset=l.borderDashOffset,n.beginPath(),n.moveTo(a.x,a.y),n.lineTo(E.x,E.y),n.stroke(),n.restore())};if(x.display)for(s=0,o=i.length;s{this.draw(s)}}]:[{z:n,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:x,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const x=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let s,o;for(s=0,o=x.length;s{const n=x.split("."),i=n.pop(),s=[t].concat(n).join("."),o=e[x].split("."),r=o.pop(),a=o.join(".");ut.route(s,i,a,r)})}function Ep(t){return"id"in t&&"defaults"in t}class lp{constructor(){this.controllers=new Hi(C0,"datasets",!0),this.elements=new Hi(q0,"elements"),this.plugins=new Hi(Object,"plugins"),this.scales=new Hi($x,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,x,n){[...x].forEach(i=>{const s=n||this._getRegistryForType(i);n||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):je(i,o=>{const r=n||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,x,n){const i=ua(e);Qe(n["before"+i],[],n),x[e](n),Qe(n["after"+i],[],n)}_getRegistryForType(e){for(let x=0;xs.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(i(x,n),e,"stop"),this._notify(i(n,x),e,"start")}}function Ap(t){const e={},x=[],n=Object.keys(b0.plugins.items);for(let s=0;s1&&wl(t[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Tl(t,e,x){if(x[e+"AxisID"]===t)return{axis:e}}function gp(t,e){if(e.data&&e.data.datasets){const x=e.data.datasets.filter(n=>n.xAxisID===t||n.yAxisID===t);if(x.length)return Tl(t,"x",x[0])||Tl(t,"y",x[0])}return{}}function mp(t,e){const x=Nx[t.type]||{scales:{}},n=e.scales||{},i=Cr(t.type,e),s=Object.create(null);return Object.keys(n).forEach(o=>{const r=n[o];if(!Oe(r))return console.error(`Invalid scale configuration for scale: ${o}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const a=Fr(o,r,gp(o,t),ut.scales[r.type]),E=fp(a,i),l=x.scales||{};s[o]=$n(Object.create(null),[{axis:a},r,l[a],l[E]])}),t.data.datasets.forEach(o=>{const r=o.type||t.type,a=o.indexAxis||Cr(r,e),l=(Nx[r]||{}).scales||{};Object.keys(l).forEach(A=>{const h=dp(A,a),B=o[h+"AxisID"]||h;s[B]=s[B]||Object.create(null),$n(s[B],[{axis:h},n[B],l[A]])})}),Object.keys(s).forEach(o=>{const r=s[o];$n(r,[ut.scales[r.type],ut.scale])}),s}function k9(t){const e=t.options||(t.options={});e.plugins=we(e.plugins,{}),e.scales=mp(t,e)}function M9(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Cp(t){return t=t||{},t.data=M9(t.data),k9(t),t}const Pl=new Map,O9=new Set;function Ui(t,e){let x=Pl.get(t);return x||(x=e(),Pl.set(t,x),O9.add(x)),x}const Cn=(t,e,x)=>{const n=Ex(e,x);n!==void 0&&t.add(n)};class Fp{constructor(e){this._config=Cp(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=M9(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),k9(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ui(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,x){return Ui(`${e}.transition.${x}`,()=>[[`datasets.${e}.transitions.${x}`,`transitions.${x}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,x){return Ui(`${e}-${x}`,()=>[[`datasets.${e}.elements.${x}`,`datasets.${e}`,`elements.${x}`,""]])}pluginScopeKeys(e){const x=e.id,n=this.type;return Ui(`${n}-plugin-${x}`,()=>[[`plugins.${x}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,x){const n=this._scopeCache;let i=n.get(e);return(!i||x)&&(i=new Map,n.set(e,i)),i}getOptionScopes(e,x,n){const{options:i,type:s}=this,o=this._cachedScopes(e,n),r=o.get(x);if(r)return r;const a=new Set;x.forEach(l=>{e&&(a.add(e),l.forEach(A=>Cn(a,e,A))),l.forEach(A=>Cn(a,i,A)),l.forEach(A=>Cn(a,Nx[s]||{},A)),l.forEach(A=>Cn(a,ut,A)),l.forEach(A=>Cn(a,pr,A))});const E=Array.from(a);return E.length===0&&E.push(Object.create(null)),O9.has(x)&&o.set(x,E),E}chartOptionScopes(){const{options:e,type:x}=this;return[e,Nx[x]||{},ut.datasets[x]||{},{type:x},ut,pr]}resolveNamedOptions(e,x,n,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:r}=Il(this._resolverCache,e,i);let a=o;if(_p(o,x)){s.$shared=!1,n=lx(n)?n():n;const E=this.createResolver(e,n,r);a=an(o,n,E)}for(const E of x)s[E]=a[E];return s}createResolver(e,x,n=[""],i){const{resolver:s}=Il(this._resolverCache,e,n);return Oe(x)?an(s,x,void 0,i):s}}function Il(t,e,x){let n=t.get(e);n||(n=new Map,t.set(e,n));const i=x.join();let s=n.get(i);return s||(s={resolver:ga(e,x),subPrefixes:x.filter(r=>!r.toLowerCase().includes("hover"))},n.set(i,s)),s}const Dp=t=>Oe(t)&&Object.getOwnPropertyNames(t).reduce((e,x)=>e||lx(t[x]),!1);function _p(t,e){const{isScriptable:x,isIndexable:n}=u9(t);for(const i of e){const s=x(i),o=n(i),r=(o||s)&&t[i];if(s&&(lx(r)||Dp(r))||o&&nt(r))return!0}return!1}var vp="4.3.0";const bp=["top","bottom","left","right","chartArea"];function kl(t,e){return t==="top"||t==="bottom"||bp.indexOf(t)===-1&&e==="x"}function Ml(t,e){return function(x,n){return x[t]===n[t]?x[e]-n[e]:x[t]-n[t]}}function Ol(t){const e=t.chart,x=e.options.animation;e.notifyPlugins("afterRender"),Qe(x&&x.onComplete,[t],e)}function yp(t){const e=t.chart,x=e.options.animation;Qe(x&&x.onProgress,[t],e)}function R9(t){return g9()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Es={},Rl=t=>{const e=R9(t);return Object.values(Es).filter(x=>x.canvas===e).pop()};function Sp(t,e,x){const n=Object.keys(t);for(const i of n){const s=+i;if(s>=e){const o=t[i];delete t[i],(x>0||s>e)&&(t[s+x]=o)}}}function wp(t,e,x,n){return!x||t.type==="mouseout"?null:n?e:t}function Tp(t){const{xScale:e,yScale:x}=t;if(e&&x)return{left:e.left,right:e.right,top:x.top,bottom:x.bottom}}class U0{static register(...e){b0.add(...e),Nl()}static unregister(...e){b0.remove(...e),Nl()}constructor(e,x){const n=this.config=new Fp(x),i=R9(e),s=Rl(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||j2(i)),this.platform.updateConfig(n);const r=this.platform.acquireContext(i,o.aspectRatio),a=r&&r.canvas,E=a&&a.height,l=a&&a.width;if(this.id=If(),this.ctx=r,this.canvas=a,this.width=l,this.height=E,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new cp,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=qf(A=>this.update(A),o.resizeDelay||0),this._dataChanges=[],Es[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}R0.listen(this,"complete",Ol),R0.listen(this,"progress",yp),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:x},width:n,height:i,_aspectRatio:s}=this;return Ue(e)?x&&s?s:i?n/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return b0}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():il(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return tl(this.canvas,this.ctx),this}stop(){return R0.stop(this),this}resize(e,x){R0.running(this)?this._resizeBeforeDraw={width:e,height:x}:this._resize(e,x)}_resize(e,x){const n=this.options,i=this.canvas,s=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,x,s),r=n.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,il(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),Qe(n.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const x=this.options.scales||{};je(x,(n,i)=>{n.id=i})}buildOrUpdateScales(){const e=this.options,x=e.scales,n=this.scales,i=Object.keys(n).reduce((o,r)=>(o[r]=!1,o),{});let s=[];x&&(s=s.concat(Object.keys(x).map(o=>{const r=x[o],a=Fr(o,r),E=a==="r",l=a==="x";return{options:r,dposition:E?"chartArea":l?"bottom":"left",dtype:E?"radialLinear":l?"category":"linear"}}))),je(s,o=>{const r=o.options,a=r.id,E=Fr(a,r),l=we(r.type,o.dtype);(r.position===void 0||kl(r.position,E)!==kl(o.dposition))&&(r.position=o.dposition),i[a]=!0;let A=null;if(a in n&&n[a].type===l)A=n[a];else{const h=b0.getScale(l);A=new h({id:a,type:l,ctx:this.ctx,chart:this}),n[A.id]=A}A.init(r,e)}),je(i,(o,r)=>{o||delete n[r]}),je(n,o=>{Mt.configure(this,o,o.options),Mt.addBox(this,o)})}_updateMetasets(){const e=this._metasets,x=this.data.datasets.length,n=e.length;if(e.sort((i,s)=>i.index-s.index),n>x){for(let i=x;ix.length&&delete this._stacks,e.forEach((n,i)=>{x.filter(s=>s===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],x=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=x.length;n{this.getDatasetMeta(x).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const x=this.config;x.update();const n=this._options=x.createResolver(x.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let E=0,l=this.data.datasets.length;E{E.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Ml("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){je(this.scales,e=>{Mt.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,x=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!KE(x,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,x=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:s}of x){const o=n==="_removeElements"?-s:s;Sp(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const x=this.data.datasets.length,n=s=>new Set(e.filter(o=>o[0]===s).map((o,r)=>r+","+o.splice(1).join(","))),i=n(0);for(let s=1;ss.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Mt.update(this,this.width,this.height,e);const x=this.chartArea,n=x.width<=0||x.height<=0;this._layers=[],je(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let x=0,n=this.data.datasets.length;x=0;--x)this._drawDataset(e[x]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const x=this.ctx,n=e._clip,i=!n.disabled,s=Tp(e)||this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&Ao(x,{left:n.left===!1?0:s.left-n.left,right:n.right===!1?this.width:s.right+n.right,top:n.top===!1?0:s.top-n.top,bottom:n.bottom===!1?this.height:s.bottom+n.bottom}),e.controller.draw(),i&&uo(x),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return V0(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,x,n,i){const s=b2.modes[x];return typeof s=="function"?s(this,e,n,i):[]}getDatasetMeta(e){const x=this.data.datasets[e],n=this._metasets;let i=n.filter(s=>s&&s._dataset===x).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:x&&x.order||0,index:e,_dataset:x,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=ux(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const x=this.data.datasets[e];if(!x)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!x.hidden}setDatasetVisibility(e,x){const n=this.getDatasetMeta(e);n.hidden=!x}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,x,n){const i=n?"show":"hide",s=this.getDatasetMeta(e),o=s.controller._resolveAnimations(void 0,i);oi(x)?(s.data[x].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(s,{visible:n}),this.update(r=>r.datasetIndex===e?i:void 0))}hide(e,x){this._updateVisibility(e,x,!1)}show(e,x){this._updateVisibility(e,x,!0)}_destroyDatasetMeta(e){const x=this._metasets[e];x&&x.controller&&x.controller._destroy(),delete this._metasets[e]}_stop(){let e,x;for(this.stop(),R0.remove(this),e=0,x=this.data.datasets.length;e{x.addEventListener(this,s,o),e[s]=o},i=(s,o,r)=>{s.offsetX=o,s.offsetY=r,this._eventHandler(s)};je(this.options.events,s=>n(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,x=this.platform,n=(a,E)=>{x.addEventListener(this,a,E),e[a]=E},i=(a,E)=>{e[a]&&(x.removeEventListener(this,a,E),delete e[a])},s=(a,E)=>{this.canvas&&this.resize(a,E)};let o;const r=()=>{i("attach",r),this.attached=!0,this.resize(),n("resize",s),n("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),n("attach",r)},x.isAttached(this.canvas)?r():o()}unbindEvents(){je(this._listeners,(e,x)=>{this.platform.removeEventListener(this,x,e)}),this._listeners={},je(this._responsiveListeners,(e,x)=>{this.platform.removeEventListener(this,x,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,x,n){const i=n?"set":"remove";let s,o,r,a;for(x==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(s);if(!r)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:r.data[o],index:o}});!Ms(n,x)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,x))}notifyPlugins(e,x,n){return this._plugins.notify(this,e,x,n)}isPluginEnabled(e){return this._plugins._cache.filter(x=>x.plugin.id===e).length===1}_updateHoverStyles(e,x,n){const i=this.options.hover,s=(a,E)=>a.filter(l=>!E.some(A=>l.datasetIndex===A.datasetIndex&&l.index===A.index)),o=s(x,e),r=n?e:s(e,x);o.length&&this.updateHoverStyle(o,i.mode,!1),r.length&&i.mode&&this.updateHoverStyle(r,i.mode,!0)}_eventHandler(e,x){const n={event:e,replay:x,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;const s=this._handleEvent(e,x,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(s||n.changed)&&this.render(),this}_handleEvent(e,x,n){const{_active:i=[],options:s}=this,o=x,r=this._getActiveElements(e,i,n,o),a=Lf(e),E=wp(e,this._lastEvent,n,a);n&&(this._lastEvent=null,Qe(s.onHover,[e,r,this],this),a&&Qe(s.onClick,[e,r,this],this));const l=!Ms(r,i);return(l||x)&&(this._active=r,this._updateHoverStyles(r,i,x)),this._lastEvent=E,l}_getActiveElements(e,x,n,i){if(e.type==="mouseout")return[];if(!n)return x;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}}_(U0,"defaults",ut),_(U0,"instances",Es),_(U0,"overrides",Nx),_(U0,"registry",b0),_(U0,"version",vp),_(U0,"getChart",Rl);function Nl(){return je(U0.instances,t=>t._plugins.invalidate())}function Pp(t,e,x){const{startAngle:n,pixelMargin:i,x:s,y:o,outerRadius:r,innerRadius:a}=e;let E=i/r;t.beginPath(),t.arc(s,o,r,n-E,x+E),a>i?(E=i/a,t.arc(s,o,a,x+E,n-E,!0)):t.arc(s,o,i,x+At,n-At),t.closePath(),t.clip()}function Ip(t){return pa(t,["outerStart","outerEnd","innerStart","innerEnd"])}function kp(t,e,x,n){const i=Ip(t.options.borderRadius),s=(x-e)/2,o=Math.min(s,n*e/2),r=a=>{const E=(x-Math.min(s,a))*n/2;return _t(a,0,Math.min(s,E))};return{outerStart:r(i.outerStart),outerEnd:r(i.outerEnd),innerStart:_t(i.innerStart,0,o),innerEnd:_t(i.innerEnd,0,o)}}function Vx(t,e,x,n){return{x:x+t*Math.cos(e),y:n+t*Math.sin(e)}}function Us(t,e,x,n,i,s){const{x:o,y:r,startAngle:a,pixelMargin:E,innerRadius:l}=e,A=Math.max(e.outerRadius+n+x-E,0),h=l>0?l+n+x+E:0;let B=0;const p=i-a;if(n){const X=l>0?l-n:0,xe=A>0?A-n:0,Z=(X+xe)/2,ne=Z!==0?p*Z/(Z+n):p;B=(p-ne)/2}const f=Math.max(.001,p*A-x/Et)/A,g=(p-f)/2,C=a+g+B,S=i-g-B,{outerStart:I,outerEnd:y,innerStart:v,innerEnd:D}=kp(e,h,A,S-C),T=A-I,b=A-y,P=C+I/T,O=S-y/b,V=h+v,N=h+D,K=C+v/V,W=S-D/N;if(t.beginPath(),s){const X=(P+O)/2;if(t.arc(o,r,A,P,X),t.arc(o,r,A,X,O),y>0){const re=Vx(b,O,o,r);t.arc(re.x,re.y,y,O,S+At)}const xe=Vx(N,S,o,r);if(t.lineTo(xe.x,xe.y),D>0){const re=Vx(N,W,o,r);t.arc(re.x,re.y,D,S+At,W+Math.PI)}const Z=(S-D/h+(C+v/h))/2;if(t.arc(o,r,h,S-D/h,Z,!0),t.arc(o,r,h,Z,C+v/h,!0),v>0){const re=Vx(V,K,o,r);t.arc(re.x,re.y,v,K+Math.PI,C-At)}const ne=Vx(T,C,o,r);if(t.lineTo(ne.x,ne.y),I>0){const re=Vx(T,P,o,r);t.arc(re.x,re.y,I,C-At,P)}}else{t.moveTo(o,r);const X=Math.cos(P)*A+o,xe=Math.sin(P)*A+r;t.lineTo(X,xe);const Z=Math.cos(O)*A+o,ne=Math.sin(O)*A+r;t.lineTo(Z,ne)}t.closePath()}function Mp(t,e,x,n,i){const{fullCircles:s,startAngle:o,circumference:r}=e;let a=e.endAngle;if(s){Us(t,e,x,n,a,i);for(let E=0;E=it||ri(o,a,E),g=G0(r,l+B,A+B);return f&&g}getCenterPoint(x){const{x:n,y:i,startAngle:s,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],x),{offset:E,spacing:l}=this.options,A=(s+o)/2,h=(r+a+l+E)/2;return{x:n+Math.cos(A)*h,y:i+Math.sin(A)*h}}tooltipPosition(x){return this.getCenterPoint(x)}draw(x){const{options:n,circumference:i}=this,s=(n.offset||0)/4,o=(n.spacing||0)/2,r=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=i>it?Math.floor(i/it):0,i===0||this.innerRadius<0||this.outerRadius<0)return;x.save();const a=(this.startAngle+this.endAngle)/2;x.translate(Math.cos(a)*s,Math.sin(a)*s);const E=1-Math.sin(Math.min(Et,i||0)),l=s*E;x.fillStyle=n.backgroundColor,x.strokeStyle=n.borderColor,Mp(x,this,l,o,r),Op(x,this,l,o,r),x.restore()}}_(Tn,"id","arc"),_(Tn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),_(Tn,"defaultRoutes",{backgroundColor:"backgroundColor"}),_(Tn,"descriptors",{_scriptable:!0,_indexable:x=>x!=="borderDash"});function N9(t,e,x=e){t.lineCap=we(x.borderCapStyle,e.borderCapStyle),t.setLineDash(we(x.borderDash,e.borderDash)),t.lineDashOffset=we(x.borderDashOffset,e.borderDashOffset),t.lineJoin=we(x.borderJoinStyle,e.borderJoinStyle),t.lineWidth=we(x.borderWidth,e.borderWidth),t.strokeStyle=we(x.borderColor,e.borderColor)}function Rp(t,e,x){t.lineTo(x.x,x.y)}function Np(t){return t.stepped?o7:t.tension||t.cubicInterpolationMode==="monotone"?r7:Rp}function L9(t,e,x={}){const n=t.length,{start:i=0,end:s=n-1}=x,{start:o,end:r}=e,a=Math.max(i,o),E=Math.min(s,r),l=ir&&s>r;return{count:n,start:a,loop:e.loop,ilen:E(o+(E?r-y:y))%s,I=()=>{f!==g&&(t.lineTo(l,g),t.lineTo(l,f),t.lineTo(l,C))};for(a&&(B=i[S(0)],t.moveTo(B.x,B.y)),h=0;h<=r;++h){if(B=i[S(h)],B.skip)continue;const y=B.x,v=B.y,D=y|0;D===p?(vg&&(g=v),l=(A*l+y)/++A):(I(),t.lineTo(y,v),p=D,A=0,f=g=v),C=v}I()}function Dr(t){const e=t.options,x=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!x?Hp:Lp}function Up(t){return t.stepped?H7:t.tension||t.cubicInterpolationMode==="monotone"?U7:Dx}function $p(t,e,x,n){let i=e._path;i||(i=e._path=new Path2D,e.path(i,x,n)&&i.closePath()),N9(t,e.options),t.stroke(i)}function zp(t,e,x,n){const{segments:i,options:s}=e,o=Dr(e);for(const r of i)N9(t,s,r.style),t.beginPath(),o(t,e,r,{start:x,end:x+n-1})&&t.closePath(),t.stroke()}const Gp=typeof Path2D=="function";function Wp(t,e,x,n){Gp&&!e.options.segment?$p(t,e,x,n):zp(t,e,x,n)}class ex extends q0{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,x){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;P7(this._points,n,e,i,x),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=K7(this,this.options.segment))}first(){const e=this.segments,x=this.points;return e.length&&x[e[0].start]}last(){const e=this.segments,x=this.points,n=e.length;return n&&x[e[n-1].end]}interpolate(e,x){const n=this.options,i=e[x],s=this.points,o=_9(this,{property:x,start:i,end:i});if(!o.length)return;const r=[],a=Up(n);let E,l;for(E=0,l=o.length;Ee!=="borderDash"&&e!=="fill"});function Ll(t,e,x,n){const i=t.options,{[x]:s}=t.getProps([x],n);return Math.abs(e-s)t.replace("rgb(","rgba(").replace(")",", 0.5)"));function U9(t){return _r[t%_r.length]}function $9(t){return Hl[t%Hl.length]}function Xp(t,e){return t.borderColor=U9(e),t.backgroundColor=$9(e),++e}function Zp(t,e){return t.backgroundColor=t.data.map(()=>U9(e++)),e}function Qp(t,e){return t.backgroundColor=t.data.map(()=>$9(e++)),e}function eg(t){let e=0;return(x,n)=>{const i=t.getDatasetMeta(n).controller;i instanceof Tx?e=Zp(x,e):i instanceof Vn?e=Qp(x,e):i&&(e=Xp(x,e))}}function Ul(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function tg(t){return t&&(t.borderColor||t.backgroundColor)}var xg={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,x){if(!x.enabled)return;const{data:{datasets:n},options:i}=t.config,{elements:s}=i;if(!x.forceOverride&&(Ul(n)||tg(i)||s&&Ul(s)))return;const o=eg(t);n.forEach(o)}};function ng(t,e,x,n,i){const s=i.samples||n;if(s>=x)return t.slice(e,e+x);const o=[],r=(x-2)/(s-2);let a=0;const E=e+x-1;let l=e,A,h,B,p,f;for(o[a++]=t[l],A=0;AB&&(B=p,h=t[S],f=S);o[a++]=h,l=f}return o[a++]=t[E],o}function ig(t,e,x,n){let i=0,s=0,o,r,a,E,l,A,h,B,p,f;const g=[],C=e+x-1,S=t[e].x,y=t[C].x-S;for(o=e;of&&(f=E,h=o),i=(s*i+r.x)/++s;else{const D=o-1;if(!Ue(A)&&!Ue(h)){const T=Math.min(A,h),b=Math.max(A,h);T!==B&&T!==D&&g.push({...t[T],x:i}),b!==B&&b!==D&&g.push({...t[b],x:i})}o>0&&D!==B&&g.push(t[D]),g.push(r),l=v,s=0,p=f=E,A=h=B=o}}return g}function z9(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function $l(t){t.data.datasets.forEach(e=>{z9(e)})}function sg(t,e){const x=e.length;let n=0,i;const{iScale:s}=t,{min:o,max:r,minDefined:a,maxDefined:E}=s.getUserBounds();return a&&(n=_t(W0(e,s.axis,o).lo,0,x-1)),E?i=_t(W0(e,s.axis,r).hi+1,n,x)-n:i=x-n,{start:n,count:i}}var og={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,x)=>{if(!x.enabled){$l(t);return}const n=t.width;t.data.datasets.forEach((i,s)=>{const{_data:o,indexAxis:r}=i,a=t.getDatasetMeta(s),E=o||i.data;if(Sn([r,t.options.indexAxis])==="y"||!a.controller.supportsDecimation)return;const l=t.scales[a.xAxisID];if(l.type!=="linear"&&l.type!=="time"||t.options.parsing)return;let{start:A,count:h}=sg(a,E);const B=x.threshold||4*n;if(h<=B){z9(i);return}Ue(o)&&(i._data=E,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(f){this._data=f}}));let p;switch(x.algorithm){case"lttb":p=ng(E,A,h,n,x);break;case"min-max":p=ig(E,A,h,n);break;default:throw new Error(`Unsupported decimation algorithm '${x.algorithm}'`)}i._decimated=p})},destroy(t){$l(t)}};function rg(t,e,x){const n=t.segments,i=t.points,s=e.points,o=[];for(const r of n){let{start:a,end:E}=r;E=_a(a,E,i);const l=vr(x,i[a],i[E],r.loop);if(!e.segments){o.push({source:r,target:l,start:i[a],end:i[E]});continue}const A=_9(e,l);for(const h of A){const B=vr(x,s[h.start],s[h.end],h.loop),p=D9(r,i,B);for(const f of p)o.push({source:f,target:h,start:{[x]:zl(l,B,"start",Math.max)},end:{[x]:zl(l,B,"end",Math.min)}})}}return o}function vr(t,e,x,n){if(n)return;let i=e[t],s=x[t];return t==="angle"&&(i=t0(i),s=t0(s)),{property:t,start:i,end:s}}function ag(t,e){const{x=null,y:n=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:o,end:r})=>{r=_a(o,r,i);const a=i[o],E=i[r];n!==null?(s.push({x:a.x,y:n}),s.push({x:E.x,y:n})):x!==null&&(s.push({x,y:a.y}),s.push({x,y:E.y}))}),s}function _a(t,e,x){for(;e>t;e--){const n=x[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function zl(t,e,x,n){return t&&e?n(t[x],e[x]):t?t[x]:e?e[x]:0}function G9(t,e){let x=[],n=!1;return nt(t)?(n=!0,x=t):x=ag(t,e),x.length?new ex({points:x,options:{tension:0},_loop:n,_fullLoop:n}):null}function Gl(t){return t&&t.fill!==!1}function Eg(t,e,x){let i=t[e].fill;const s=[e];let o;if(!x)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!ct(i))return i;if(o=t[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function lg(t,e,x){const n=hg(t);if(Oe(n))return isNaN(n.value)?!1:n;let i=parseFloat(n);return ct(i)&&Math.floor(i)===i?cg(n[0],e,i,x):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function cg(t,e,x,n){return(t==="-"||t==="+")&&(x=e+x),x===e||x<0||x>=n?!1:x}function Ag(t,e){let x=null;return t==="start"?x=e.bottom:t==="end"?x=e.top:Oe(t)?x=e.getPixelForValue(t.value):e.getBasePixel&&(x=e.getBasePixel()),x}function ug(t,e,x){let n;return t==="start"?n=x:t==="end"?n=e.options.reverse?e.min:e.max:Oe(t)?n=t.value:n=e.getBaseValue(),n}function hg(t){const e=t.options,x=e.fill;let n=we(x&&x.target,x);return n===void 0&&(n=!!e.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Bg(t){const{scale:e,index:x,line:n}=t,i=[],s=n.segments,o=n.points,r=dg(e,x);r.push(G9({x:null,y:e.bottom},n));for(let a=0;a=0;--o){const r=i[o].$filler;r&&(r.line.updateControlPoints(s,r.axis),n&&r.fill&&zo(t.ctx,r,s))}},beforeDatasetsDraw(t,e,x){if(x.drawTime!=="beforeDatasetsDraw")return;const n=t.getSortedVisibleDatasetMetas();for(let i=n.length-1;i>=0;--i){const s=n[i].$filler;Gl(s)&&zo(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,x){const n=e.meta.$filler;!Gl(n)||x.drawTime!=="beforeDatasetDraw"||zo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const jl=(t,e)=>{let{boxHeight:x=e,boxWidth:n=e}=t;return t.usePointStyle&&(x=Math.min(x,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:x,itemHeight:Math.max(e,x)}},yg=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class ql extends q0{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,x,n){this.maxWidth=e,this.maxHeight=x,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let x=Qe(e.generateLabels,[this.chart],this)||[];e.filter&&(x=x.filter(n=>e.filter(n,this.chart.data))),e.sort&&(x=x.sort((n,i)=>e.sort(n,i,this.chart.data))),this.options.reverse&&x.reverse(),this.legendItems=x}fit(){const{options:e,ctx:x}=this;if(!e.display){this.width=this.height=0;return}const n=e.labels,i=Ct(n.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:r,itemHeight:a}=jl(n,s);let E,l;x.font=i.string,this.isHorizontal()?(E=this.maxWidth,l=this._fitRows(o,s,r,a)+10):(l=this.maxHeight,E=this._fitCols(o,i,r,a)+10),this.width=Math.min(E,e.maxWidth||this.maxWidth),this.height=Math.min(l,e.maxHeight||this.maxHeight)}_fitRows(e,x,n,i){const{ctx:s,maxWidth:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],E=this.lineWidths=[0],l=i+r;let A=e;s.textAlign="left",s.textBaseline="middle";let h=-1,B=-l;return this.legendItems.forEach((p,f)=>{const g=n+x/2+s.measureText(p.text).width;(f===0||E[E.length-1]+g+2*r>o)&&(A+=l,E[E.length-(f>0?0:1)]=0,B+=l,h++),a[f]={left:0,top:B,row:h,width:g,height:i},E[E.length-1]+=g+r}),A}_fitCols(e,x,n,i){const{ctx:s,maxHeight:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],E=this.columnSizes=[],l=o-e;let A=r,h=0,B=0,p=0,f=0;return this.legendItems.forEach((g,C)=>{const{itemWidth:S,itemHeight:I}=Sg(n,x,s,g,i);C>0&&B+I+2*r>l&&(A+=h+r,E.push({width:h,height:B}),p+=h+r,f++,h=B=0),a[C]={left:p,top:B,col:f,width:S,height:I},h=Math.max(h,S),B+=I+r}),A+=h,E.push({width:h,height:B}),A}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:x,options:{align:n,labels:{padding:i},rtl:s}}=this,o=xn(s,this.left,this.width);if(this.isHorizontal()){let r=0,a=wt(n,this.left+i,this.right-this.lineWidths[r]);for(const E of x)r!==E.row&&(r=E.row,a=wt(n,this.left+i,this.right-this.lineWidths[r])),E.top+=this.top+e+i,E.left=o.leftForLtr(o.x(a),E.width),a+=E.width+i}else{let r=0,a=wt(n,this.top+e+i,this.bottom-this.columnSizes[r].height);for(const E of x)E.col!==r&&(r=E.col,a=wt(n,this.top+e+i,this.bottom-this.columnSizes[r].height)),E.top=a,E.left+=this.left+i,E.left=o.leftForLtr(o.x(E.left),E.width),a+=E.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Ao(e,this),this._draw(),uo(e)}}_draw(){const{options:e,columnSizes:x,lineWidths:n,ctx:i}=this,{align:s,labels:o}=e,r=ut.color,a=xn(e.rtl,this.left,this.width),E=Ct(o.font),{padding:l}=o,A=E.size,h=A/2;let B;this.drawTitle(),i.textAlign=a.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=E.string;const{boxWidth:p,boxHeight:f,itemHeight:g}=jl(o,A),C=function(D,T,b){if(isNaN(p)||p<=0||isNaN(f)||f<0)return;i.save();const P=we(b.lineWidth,1);if(i.fillStyle=we(b.fillStyle,r),i.lineCap=we(b.lineCap,"butt"),i.lineDashOffset=we(b.lineDashOffset,0),i.lineJoin=we(b.lineJoin,"miter"),i.lineWidth=P,i.strokeStyle=we(b.strokeStyle,r),i.setLineDash(we(b.lineDash,[])),o.usePointStyle){const O={radius:f*Math.SQRT2/2,pointStyle:b.pointStyle,rotation:b.rotation,borderWidth:P},V=a.xPlus(D,p/2),N=T+h;c9(i,O,V,N,o.pointStyleWidth&&p)}else{const O=T+Math.max((A-f)/2,0),V=a.leftForLtr(D,p),N=Mx(b.borderRadius);i.beginPath(),Object.values(N).some(K=>K!==0)?ai(i,{x:V,y:O,w:p,h:f,radius:N}):i.rect(V,O,p,f),i.fill(),P!==0&&i.stroke()}i.restore()},S=function(D,T,b){Lx(i,b.text,D,T+g/2,E,{strikethrough:b.hidden,textAlign:a.textAlign(b.textAlign)})},I=this.isHorizontal(),y=this._computeTitleHeight();I?B={x:wt(s,this.left+l,this.right-n[0]),y:this.top+l+y,line:0}:B={x:this.left+l,y:wt(s,this.top+y+l,this.bottom-x[0].height),line:0},m9(this.ctx,e.textDirection);const v=g+l;this.legendItems.forEach((D,T)=>{i.strokeStyle=D.fontColor,i.fillStyle=D.fontColor;const b=i.measureText(D.text).width,P=a.textAlign(D.textAlign||(D.textAlign=o.textAlign)),O=p+h+b;let V=B.x,N=B.y;a.setWidth(this.width),I?T>0&&V+O+l>this.right&&(N=B.y+=v,B.line++,V=B.x=wt(s,this.left+l,this.right-n[B.line])):T>0&&N+v>this.bottom&&(V=B.x=V+x[B.line].width+l,B.line++,N=B.y=wt(s,this.top+y+l,this.bottom-x[B.line].height));const K=a.x(V);if(C(K,N,D),V=Yf(P,V+p+h,I?V+O:this.right,e.rtl),S(a.x(V),N,D),I)B.x+=O+l;else if(typeof D.text!="string"){const W=E.lineHeight;B.y+=V9(D,W)}else B.y+=v}),C9(this.ctx,e.textDirection)}drawTitle(){const e=this.options,x=e.title,n=Ct(x.font),i=Rt(x.padding);if(!x.display)return;const s=xn(e.rtl,this.left,this.width),o=this.ctx,r=x.position,a=n.size/2,E=i.top+a;let l,A=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),l=this.top+E,A=wt(e.align,A,this.right-h);else{const p=this.columnSizes.reduce((f,g)=>Math.max(f,g.height),0);l=E+wt(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const B=wt(r,A,A+h);o.textAlign=s.textAlign(da(r)),o.textBaseline="middle",o.strokeStyle=x.color,o.fillStyle=x.color,o.font=n.string,Lx(o,x.text,B,l,n)}_computeTitleHeight(){const e=this.options.title,x=Ct(e.font),n=Rt(e.padding);return e.display?x.lineHeight+n.height:0}_getLegendItemAt(e,x){let n,i,s;if(G0(e,this.left,this.right)&&G0(x,this.top,this.bottom)){for(s=this.legendHitBoxes,n=0;ns.length>o.length?s:o)),e+x.size/2+n.measureText(i).width}function Tg(t,e,x){let n=t;return typeof e.text!="string"&&(n=V9(e,x)),n}function V9(t,e){const x=t.text?t.text.length+.5:0;return e*x}function Pg(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var Ig={id:"legend",_element:ql,start(t,e,x){const n=t.legend=new ql({ctx:t.ctx,options:x,chart:t});Mt.configure(t,n,x),Mt.addBox(t,n)},stop(t){Mt.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,x){const n=t.legend;Mt.configure(t,n,x),n.options=x},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,x){const n=e.datasetIndex,i=x.chart;i.isDatasetVisible(n)?(i.hide(n),e.hidden=!0):(i.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:x,pointStyle:n,textAlign:i,color:s,useBorderRadius:o,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map(a=>{const E=a.controller.getStyle(x?0:void 0),l=Rt(E.borderWidth);return{text:e[a.index].label,fillStyle:E.backgroundColor,fontColor:s,hidden:!a.visible,lineCap:E.borderCapStyle,lineDash:E.borderDash,lineDashOffset:E.borderDashOffset,lineJoin:E.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:E.borderColor,pointStyle:n||E.pointStyle,rotation:E.rotation,textAlign:i||E.textAlign,borderRadius:o&&(r||E.borderRadius),datasetIndex:a.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class va extends q0{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,x){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=x;const i=nt(n.text)?n.text.length:1;this._padding=Rt(n.padding);const s=i*Ct(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:x,left:n,bottom:i,right:s,options:o}=this,r=o.align;let a=0,E,l,A;return this.isHorizontal()?(l=wt(r,n,s),A=x+e,E=s-n):(o.position==="left"?(l=n+e,A=wt(r,i,x),a=Et*-.5):(l=s-e,A=wt(r,x,i),a=Et*.5),E=i-x),{titleX:l,titleY:A,maxWidth:E,rotation:a}}draw(){const e=this.ctx,x=this.options;if(!x.display)return;const n=Ct(x.font),s=n.lineHeight/2+this._padding.top,{titleX:o,titleY:r,maxWidth:a,rotation:E}=this._drawArgs(s);Lx(e,x.text,0,0,n,{color:x.color,maxWidth:a,rotation:E,textAlign:da(x.align),textBaseline:"middle",translation:[o,r]})}}function kg(t,e){const x=new va({ctx:t.ctx,options:e,chart:t});Mt.configure(t,x,e),Mt.addBox(t,x),t.titleBlock=x}var Mg={id:"title",_element:va,start(t,e,x){kg(t,x)},stop(t){const e=t.titleBlock;Mt.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,x){const n=t.titleBlock;Mt.configure(t,n,x),n.options=x},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const $i=new WeakMap;var Og={id:"subtitle",start(t,e,x){const n=new va({ctx:t.ctx,options:x,chart:t});Mt.configure(t,n,x),Mt.addBox(t,n),$i.set(t,n)},stop(t){Mt.removeBox(t,$i.get(t)),$i.delete(t)},beforeUpdate(t,e,x){const n=$i.get(t);Mt.configure(t,n,x),n.options=x},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Pn={average(t){if(!t.length)return!1;let e,x,n=0,i=0,s=0;for(e=0,x=t.length;e-1?t.split(` -`):t}function Rg(t,e){const{element:x,datasetIndex:n,index:i}=e,s=t.getDatasetMeta(n).controller,{label:o,value:r}=s.getLabelAndValue(i);return{chart:t,label:o,parsed:s.getParsed(i),raw:t.data.datasets[n].data[i],formattedValue:r,dataset:s.getDataset(),dataIndex:i,datasetIndex:n,element:x}}function Yl(t,e){const x=t.chart.ctx,{body:n,footer:i,title:s}=t,{boxWidth:o,boxHeight:r}=e,a=Ct(e.bodyFont),E=Ct(e.titleFont),l=Ct(e.footerFont),A=s.length,h=i.length,B=n.length,p=Rt(e.padding);let f=p.height,g=0,C=n.reduce((y,v)=>y+v.before.length+v.lines.length+v.after.length,0);if(C+=t.beforeBody.length+t.afterBody.length,A&&(f+=A*E.lineHeight+(A-1)*e.titleSpacing+e.titleMarginBottom),C){const y=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;f+=B*y+(C-B)*a.lineHeight+(C-1)*e.bodySpacing}h&&(f+=e.footerMarginTop+h*l.lineHeight+(h-1)*e.footerSpacing);let S=0;const I=function(y){g=Math.max(g,x.measureText(y).width+S)};return x.save(),x.font=E.string,je(t.title,I),x.font=a.string,je(t.beforeBody.concat(t.afterBody),I),S=e.displayColors?o+2+e.boxPadding:0,je(n,y=>{je(y.before,I),je(y.lines,I),je(y.after,I)}),S=0,x.font=l.string,je(t.footer,I),x.restore(),g+=p.width,{width:g,height:f}}function Ng(t,e){const{y:x,height:n}=e;return xt.height-n/2?"bottom":"center"}function Lg(t,e,x,n){const{x:i,width:s}=n,o=x.caretSize+x.caretPadding;if(t==="left"&&i+s+o>e.width||t==="right"&&i-s-o<0)return!0}function Hg(t,e,x,n){const{x:i,width:s}=x,{width:o,chartArea:{left:r,right:a}}=t;let E="center";return n==="center"?E=i<=(r+a)/2?"left":"right":i<=s/2?E="left":i>=o-s/2&&(E="right"),Lg(E,t,e,x)&&(E="center"),E}function Jl(t,e,x){const n=x.yAlign||e.yAlign||Ng(t,x);return{xAlign:x.xAlign||e.xAlign||Hg(t,e,x,n),yAlign:n}}function Ug(t,e){let{x,width:n}=t;return e==="right"?x-=n:e==="center"&&(x-=n/2),x}function $g(t,e,x){let{y:n,height:i}=t;return e==="top"?n+=x:e==="bottom"?n-=i+x:n-=i/2,n}function Xl(t,e,x,n){const{caretSize:i,caretPadding:s,cornerRadius:o}=t,{xAlign:r,yAlign:a}=x,E=i+s,{topLeft:l,topRight:A,bottomLeft:h,bottomRight:B}=Mx(o);let p=Ug(e,r);const f=$g(e,a,E);return a==="center"?r==="left"?p+=E:r==="right"&&(p-=E):r==="left"?p-=Math.max(l,h)+i:r==="right"&&(p+=Math.max(A,B)+i),{x:_t(p,0,n.width-e.width),y:_t(f,0,n.height-e.height)}}function zi(t,e,x){const n=Rt(x.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-n.right:t.x+n.left}function Zl(t){return v0([],N0(t))}function zg(t,e,x){return ux(t,{tooltip:e,tooltipItems:x,type:"tooltip"})}function Ql(t,e){const x=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return x?t.override(x):t}const K9={beforeTitle:M0,title(t){if(t.length>0){const e=t[0],x=e.chart.data.labels,n=x?x.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"u"?K9[e].call(x,n):i}class br extends q0{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const x=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&x.options.animation&&n.animations,s=new v9(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=zg(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,x){const{callbacks:n}=x,i=Vt(n,"beforeTitle",this,e),s=Vt(n,"title",this,e),o=Vt(n,"afterTitle",this,e);let r=[];return r=v0(r,N0(i)),r=v0(r,N0(s)),r=v0(r,N0(o)),r}getBeforeBody(e,x){return Zl(Vt(x.callbacks,"beforeBody",this,e))}getBody(e,x){const{callbacks:n}=x,i=[];return je(e,s=>{const o={before:[],lines:[],after:[]},r=Ql(n,s);v0(o.before,N0(Vt(r,"beforeLabel",this,s))),v0(o.lines,Vt(r,"label",this,s)),v0(o.after,N0(Vt(r,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(e,x){return Zl(Vt(x.callbacks,"afterBody",this,e))}getFooter(e,x){const{callbacks:n}=x,i=Vt(n,"beforeFooter",this,e),s=Vt(n,"footer",this,e),o=Vt(n,"afterFooter",this,e);let r=[];return r=v0(r,N0(i)),r=v0(r,N0(s)),r=v0(r,N0(o)),r}_createItems(e){const x=this._active,n=this.chart.data,i=[],s=[],o=[];let r=[],a,E;for(a=0,E=x.length;ae.filter(l,A,h,n))),e.itemSort&&(r=r.sort((l,A)=>e.itemSort(l,A,n))),je(r,l=>{const A=Ql(e.callbacks,l);i.push(Vt(A,"labelColor",this,l)),s.push(Vt(A,"labelPointStyle",this,l)),o.push(Vt(A,"labelTextColor",this,l))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=r,r}update(e,x){const n=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const r=Pn[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const a=this._size=Yl(this,n),E=Object.assign({},r,a),l=Jl(this.chart,n,E),A=Xl(n,E,l,this.chart);this.xAlign=l.xAlign,this.yAlign=l.yAlign,s={opacity:1,x:A.x,y:A.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:x})}drawCaret(e,x,n,i){const s=this.getCaretPosition(e,n,i);x.lineTo(s.x1,s.y1),x.lineTo(s.x2,s.y2),x.lineTo(s.x3,s.y3)}getCaretPosition(e,x,n){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:r}=n,{topLeft:a,topRight:E,bottomLeft:l,bottomRight:A}=Mx(r),{x:h,y:B}=e,{width:p,height:f}=x;let g,C,S,I,y,v;return s==="center"?(y=B+f/2,i==="left"?(g=h,C=g-o,I=y+o,v=y-o):(g=h+p,C=g+o,I=y-o,v=y+o),S=g):(i==="left"?C=h+Math.max(a,l)+o:i==="right"?C=h+p-Math.max(E,A)-o:C=this.caretX,s==="top"?(I=B,y=I-o,g=C-o,S=C+o):(I=B+f,y=I+o,g=C+o,S=C-o),v=I),{x1:g,x2:C,x3:S,y1:I,y2:y,y3:v}}drawTitle(e,x,n){const i=this.title,s=i.length;let o,r,a;if(s){const E=xn(n.rtl,this.x,this.width);for(e.x=zi(this,n.titleAlign,n),x.textAlign=E.textAlign(n.titleAlign),x.textBaseline="middle",o=Ct(n.titleFont),r=n.titleSpacing,x.fillStyle=n.titleColor,x.font=o.string,a=0;aS!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,ai(e,{x:f,y:p,w:E,h:a,radius:C}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),ai(e,{x:g,y:p+1,w:E-2,h:a-2,radius:C}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(f,p,E,a),e.strokeRect(f,p,E,a),e.fillStyle=o.backgroundColor,e.fillRect(g,p+1,E-2,a-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,x,n){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:E,boxPadding:l}=n,A=Ct(n.bodyFont);let h=A.lineHeight,B=0;const p=xn(n.rtl,this.x,this.width),f=function(b){x.fillText(b,p.x(e.x+B),e.y+h/2),e.y+=h+s},g=p.textAlign(o);let C,S,I,y,v,D,T;for(x.textAlign=o,x.textBaseline="middle",x.font=A.string,e.x=zi(this,g,n),x.fillStyle=n.bodyColor,je(this.beforeBody,f),B=r&&g!=="right"?o==="center"?E/2+l:E+2+l:0,y=0,D=i.length;y0&&x.stroke()}_updateAnimationTarget(e){const x=this.chart,n=this.$animations,i=n&&n.x,s=n&&n.y;if(i||s){const o=Pn[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=Yl(this,e),a=Object.assign({},o,this._size),E=Jl(x,e,a),l=Xl(e,a,E,x);(i._to!==l.x||s._to!==l.y)&&(this.xAlign=E.xAlign,this.yAlign=E.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const x=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(x);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=Rt(x.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;x.enabled&&r&&(e.save(),e.globalAlpha=n,this.drawBackground(s,e,i,x),m9(e,x.textDirection),s.y+=o.top,this.drawTitle(s,e,x),this.drawBody(s,e,x),this.drawFooter(s,e,x),C9(e,x.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,x){const n=this._active,i=e.map(({datasetIndex:r,index:a})=>{const E=this.chart.getDatasetMeta(r);if(!E)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:E.data[a],index:a}}),s=!Ms(n,i),o=this._positionChanged(i,x);(s||o)&&(this._active=i,this._eventPosition=x,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,x,n=!0){if(x&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(e,s,x,n),r=this._positionChanged(o,e),a=x||!Ms(o,s)||r;return a&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,x))),a}_getActiveElements(e,x,n,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return x;const o=this.chart.getElementsAtEventForMode(e,s.mode,s,n);return s.reverse&&o.reverse(),o}_positionChanged(e,x){const{caretX:n,caretY:i,options:s}=this,o=Pn[s.position].call(this,e,x);return o!==!1&&(n!==o.x||i!==o.y)}}_(br,"positioners",Pn);var Gg={id:"tooltip",_element:br,positioners:Pn,afterInit(t,e,x){x&&(t.tooltip=new br({chart:t,options:x}))},beforeUpdate(t,e,x){t.tooltip&&t.tooltip.initialize(x)},reset(t,e,x){t.tooltip&&t.tooltip.initialize(x)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const x={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...x,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",x)}},afterEvent(t,e){if(t.tooltip){const x=e.replay;t.tooltip.handleEvent(e.event,x,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:K9},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Wg=Object.freeze({__proto__:null,Colors:xg,Decimation:og,Filler:bg,Legend:Ig,SubTitle:Og,Title:Mg,Tooltip:Gg});const Vg=(t,e,x,n)=>(typeof e=="string"?(x=t.push(e)-1,n.unshift({index:x,label:e})):isNaN(e)&&(x=null),x);function Kg(t,e,x,n){const i=t.indexOf(e);if(i===-1)return Vg(t,e,x,n);const s=t.lastIndexOf(e);return i!==s?x:i}const jg=(t,e)=>t===null?null:_t(Math.round(t),0,e);function ec(t){const e=this.getLabels();return t>=0&&tx.length-1?null:this.getPixelForValue(x[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}_(yr,"id","category"),_(yr,"defaults",{ticks:{callback:ec}});function qg(t,e){const x=[],{bounds:i,step:s,min:o,max:r,precision:a,count:E,maxTicks:l,maxDigits:A,includeBounds:h}=t,B=s||1,p=l-1,{min:f,max:g}=e,C=!Ue(o),S=!Ue(r),I=!Ue(E),y=(g-f)/(A+1);let v=qE((g-f)/p/B)*B,D,T,b,P;if(v<1e-14&&!C&&!S)return[{value:f},{value:g}];P=Math.ceil(g/v)-Math.floor(f/v),P>p&&(v=qE(P*v/p/B)*B),Ue(a)||(D=Math.pow(10,a),v=Math.ceil(v*D)/D),i==="ticks"?(T=Math.floor(f/v)*v,b=Math.ceil(g/v)*v):(T=f,b=g),C&&S&&s&&zf((r-o)/s,v/1e3)?(P=Math.round(Math.min((r-o)/v,l)),v=(r-o)/P,T=o,b=r):I?(T=C?o:T,b=S?r:b,P=E-1,v=(b-T)/P):(P=(b-T)/v,zn(P,Math.round(P),v/1e3)?P=Math.round(P):P=Math.ceil(P));const O=Math.max(YE(v),YE(T));D=Math.pow(10,Ue(a)?O:a),T=Math.round(T*D)/D,b=Math.round(b*D)/D;let V=0;for(C&&(h&&T!==o?(x.push({value:o}),Tr)break;x.push({value:N})}return S&&h&&b!==r?x.length&&zn(x[x.length-1].value,r,tc(r,y,t))?x[x.length-1].value=r:x.push({value:r}):(!S||b===r)&&x.push({value:b}),x}function tc(t,e,{horizontal:x,minRotation:n}){const i=g0(n),s=(x?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/s,o)}class $s extends $x{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,x){return Ue(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:x,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this;const o=a=>i=x?i:a,r=a=>s=n?s:a;if(e){const a=P0(i),E=P0(s);a<0&&E<0?r(0):a>0&&E>0&&o(0)}if(i===s){let a=s===0?1:Math.abs(s*.05);r(s+a),e||o(i-a)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:x,stepSize:n}=e,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),x=x||11),x&&(i=Math.min(x,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,x=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:x.precision,step:x.stepSize,count:x.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:x.minRotation||0,includeBounds:x.includeBounds!==!1},s=this._range||this,o=qg(i,s);return e.bounds==="ticks"&&x9(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let x=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const i=(n-x)/Math.max(e.length-1,1)/2;x-=i,n+=i}this._startValue=x,this._endValue=n,this._valueRange=n-x}getLabelForValue(e){return Ci(e,this.chart.options.locale,this.options.ticks.format)}}class Sr extends $s{determineDataLimits(){const{min:e,max:x}=this.getMinMax(!0);this.min=ct(e)?e:0,this.max=ct(x)?x:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),x=e?this.width:this.height,n=g0(this.options.ticks.minRotation),i=(e?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(x/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}_(Sr,"id","linear"),_(Sr,"defaults",{ticks:{callback:co.formatters.numeric}});const li=t=>Math.floor(Q0(t)),mx=(t,e)=>Math.pow(10,li(t)+e);function xc(t){return t/Math.pow(10,li(t))===1}function nc(t,e,x){const n=Math.pow(10,x),i=Math.floor(t/n);return Math.ceil(e/n)-i}function Yg(t,e){const x=e-t;let n=li(x);for(;nc(t,e,n)>10;)n++;for(;nc(t,e,n)<10;)n--;return Math.min(n,li(t))}function Jg(t,{min:e,max:x}){e=Zt(t.min,e);const n=[],i=li(e);let s=Yg(e,x),o=s<0?Math.pow(10,Math.abs(s)):1;const r=Math.pow(10,s),a=i>s?Math.pow(10,i):0,E=Math.round((e-a)*o)/o,l=Math.floor((e-a)/r/10)*r*10;let A=Math.floor((E-l)/Math.pow(10,s)),h=Zt(t.min,Math.round((a+l+A*Math.pow(10,s))*o)/o);for(;h=10?A=A<15?15:20:A++,A>=20&&(s++,A=2,o=s>=0?1:o),h=Math.round((a+l+A*Math.pow(10,s))*o)/o;const B=Zt(t.max,h);return n.push({value:B,major:xc(B),significand:A}),n}class wr extends $x{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,x){const n=$s.prototype.parse.apply(this,[e,x]);if(n===0){this._zero=!0;return}return ct(n)&&n>0?n:null}determineDataLimits(){const{min:e,max:x}=this.getMinMax(!0);this.min=ct(e)?Math.max(0,e):null,this.max=ct(x)?Math.max(0,x):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ct(this._userMin)&&(this.min=e===mx(this.min,0)?mx(this.min,-1):mx(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:x}=this.getUserBounds();let n=this.min,i=this.max;const s=r=>n=e?n:r,o=r=>i=x?i:r;n===i&&(n<=0?(s(1),o(10)):(s(mx(n,-1)),o(mx(i,1)))),n<=0&&s(mx(i,-1)),i<=0&&o(mx(n,1)),this.min=n,this.max=i}buildTicks(){const e=this.options,x={min:this._userMin,max:this._userMax},n=Jg(x,this);return e.bounds==="ticks"&&x9(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":Ci(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Q0(e),this._valueRange=Q0(this.max)-Q0(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Q0(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const x=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+x*this._valueRange)}}_(wr,"id","logarithmic"),_(wr,"defaults",{ticks:{callback:co.formatters.logarithmic,major:{enabled:!0}}});function Tr(t){const e=t.ticks;if(e.display&&t.display){const x=Rt(e.backdropPadding);return we(e.font&&e.font.size,ut.font.size)+x.height}return 0}function Xg(t,e,x){return x=nt(x)?x:[x],{w:s7(t,e.string,x),h:x.length*e.lineHeight}}function ic(t,e,x,n,i){return t===n||t===i?{start:e-x/2,end:e+x/2}:ti?{start:e-x,end:e}:{start:e,end:e+x}}function Zg(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},x=Object.assign({},e),n=[],i=[],s=t._pointLabels.length,o=t.options.pointLabels,r=o.centerPointLabels?Et/s:0;for(let a=0;ae.r&&(r=(n.end-e.r)/s,t.r=Math.max(t.r,e.r+r)),i.starte.b&&(a=(i.end-e.b)/o,t.b=Math.max(t.b,e.b+a))}function em(t,e,x){const n=t.drawingArea,{extra:i,additionalAngle:s,padding:o,size:r}=x,a=t.getPointPosition(e,n+i+o,s),E=Math.round(ha(t0(a.angle+At))),l=sm(a.y,r.h,E),A=nm(E),h=im(a.x,r.w,A);return{visible:!0,x:a.x,y:l,textAlign:A,left:h,top:l,right:h+r.w,bottom:l+r.h}}function tm(t,e){if(!e)return!0;const{left:x,top:n,right:i,bottom:s}=t;return!(V0({x,y:n},e)||V0({x,y:s},e)||V0({x:i,y:n},e)||V0({x:i,y:s},e))}function xm(t,e,x){const n=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:o,display:r}=s.pointLabels,a={extra:Tr(s)/2,additionalAngle:o?Et/i:0};let E;for(let l=0;l270||x<90)&&(t-=e),t}function om(t,e,x){const{left:n,top:i,right:s,bottom:o}=x,{backdropColor:r}=e;if(!Ue(r)){const a=Mx(e.borderRadius),E=Rt(e.backdropPadding);t.fillStyle=r;const l=n-E.left,A=i-E.top,h=s-n+E.width,B=o-i+E.height;Object.values(a).some(p=>p!==0)?(t.beginPath(),ai(t,{x:l,y:A,w:h,h:B,radius:a}),t.fill()):t.fillRect(l,A,h,B)}}function rm(t,e){const{ctx:x,options:{pointLabels:n}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const o=n.setContext(t.getPointLabelContext(i));om(x,o,s);const r=Ct(o.font),{x:a,y:E,textAlign:l}=s;Lx(x,t._pointLabels[i],a,E+r.lineHeight/2,r,{color:o.color,textAlign:l,textBaseline:"middle"})}}function j9(t,e,x,n){const{ctx:i}=t;if(x)i.arc(t.xCenter,t.yCenter,e,0,it);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let o=1;o{const i=Qe(this.options.pointLabels.callback,[x,n],this);return i||i===0?i:""}).filter((x,n)=>this.chart.getDataVisibility(n))}fit(){const e=this.options;e.display&&e.pointLabels.display?Zg(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,x,n,i){this.xCenter+=Math.floor((e-x)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,x,n,i))}getIndexAngle(e){const x=it/(this._pointLabels.length||1),n=this.options.startAngle||0;return t0(e*x+g0(n))}getDistanceFromCenterForValue(e){if(Ue(e))return NaN;const x=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*x:(e-this.min)*x}getValueForDistanceFromCenter(e){if(Ue(e))return NaN;const x=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-x:this.min+x}getPointLabelContext(e){const x=this._pointLabels||[];if(e>=0&&e{if(A!==0){a=this.getDistanceFromCenterForValue(l.value);const h=this.getContext(A),B=i.setContext(h),p=s.setContext(h);am(this,B,a,o,p)}}),n.display){for(e.save(),r=o-1;r>=0;r--){const l=n.setContext(this.getPointLabelContext(r)),{color:A,lineWidth:h}=l;!h||!A||(e.lineWidth=h,e.strokeStyle=A,e.setLineDash(l.borderDash),e.lineDashOffset=l.borderDashOffset,a=this.getDistanceFromCenterForValue(x.ticks.reverse?this.min:this.max),E=this.getPointPosition(r,a),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(E.x,E.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,x=this.options,n=x.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let s,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!x.reverse)return;const E=n.setContext(this.getContext(a)),l=Ct(E.font);if(s=this.getDistanceFromCenterForValue(this.ticks[a].value),E.showLabelBackdrop){e.font=l.string,o=e.measureText(r.label).width,e.fillStyle=E.backdropColor;const A=Rt(E.backdropPadding);e.fillRect(-o/2-A.left,-s-l.size/2-A.top,o+A.width,l.size+A.height)}Lx(e,r.label,0,-s,l,{color:E.color})}),e.restore()}drawTitle(){}}_(In,"id","radialLinear"),_(In,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:co.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),_(In,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),_(In,"descriptors",{angleLines:{_fallback:"grid"}});const Bo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Yt=Object.keys(Bo);function lm(t,e){return t-e}function sc(t,e){if(Ue(e))return null;const x=t._adapter,{parser:n,round:i,isoWeekday:s}=t._parseOpts;let o=e;return typeof n=="function"&&(o=n(o)),ct(o)||(o=typeof n=="string"?x.parse(o,n):x.parse(o)),o===null?null:(i&&(o=i==="week"&&(rn(s)||s===!0)?x.startOf(o,"isoWeek",s):x.startOf(o,i)),+o)}function oc(t,e,x,n){const i=Yt.length;for(let s=Yt.indexOf(t);s=Yt.indexOf(x);s--){const o=Yt[s];if(Bo[o].common&&t._adapter.diff(i,n,o)>=e-1)return o}return Yt[x?Yt.indexOf(x):0]}function Am(t){for(let e=Yt.indexOf(t)+1,x=Yt.length;e=e?x[n]:x[i];t[s]=!0}}function um(t,e,x,n){const i=t._adapter,s=+i.startOf(e[0].value,n),o=e[e.length-1].value;let r,a;for(r=s;r<=o;r=+i.add(r,1,n))a=x[r],a>=0&&(e[a].major=!0);return e}function ac(t,e,x){const n=[],i={},s=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e=[]){let x=0,n=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?x=1-i:x=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?n=s:n=(s-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;x=_t(x,0,o),n=_t(n,0,o),this._offsets={start:x,end:n,factor:1/(x+1+n)}}_generate(){const e=this._adapter,x=this.min,n=this.max,i=this.options,s=i.time,o=s.unit||oc(s.minUnit,x,n,this._getLabelCapacity(x)),r=we(i.ticks.stepSize,1),a=o==="week"?s.isoWeekday:!1,E=rn(a)||a===!0,l={};let A=x,h,B;if(E&&(A=+e.startOf(A,"isoWeek",a)),A=+e.startOf(A,E?"day":o),e.diff(n,x,o)>1e5*r)throw new Error(x+" and "+n+" are too far apart with stepSize of "+r+" "+o);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(h=A,B=0;hf-g).map(f=>+f)}getLabelForValue(e){const x=this._adapter,n=this.options.time;return n.tooltipFormat?x.format(e,n.tooltipFormat):x.format(e,n.displayFormats.datetime)}format(e,x){const i=this.options.time.displayFormats,s=this._unit,o=x||i[s];return this._adapter.format(e,o)}_tickFormatFunction(e,x,n,i){const s=this.options,o=s.ticks.callback;if(o)return Qe(o,[e,x,n],this);const r=s.time.displayFormats,a=this._unit,E=this._majorUnit,l=a&&r[a],A=E&&r[E],h=n[x],B=E&&A&&h&&h.major;return this._adapter.format(e,i||(B?A:l))}generateTickLabels(e){let x,n,i;for(x=0,n=e.length;x0?r:1}getDataTimestamps(){let e=this._cache.data||[],x,n;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(x=0,n=i.length;x=t[n].pos&&e<=t[i].pos&&({lo:n,hi:i}=W0(t,"pos",e)),{pos:s,time:r}=t[n],{pos:o,time:a}=t[i]):(e>=t[n].time&&e<=t[i].time&&({lo:n,hi:i}=W0(t,"time",e)),{time:s,pos:r}=t[n],{time:o,pos:a}=t[i]);const E=o-s;return E?r+(a-r)*(e-s)/E:r}class Pr extends ci{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),x=this._table=this.buildLookupTable(e);this._minPos=Gi(x,this.min),this._tableRange=Gi(x,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:x,max:n}=this,i=[],s=[];let o,r,a,E,l;for(o=0,r=e.length;o=x&&E<=n&&i.push(E);if(i.length<2)return[{time:x,pos:0},{time:n,pos:1}];for(o=0,r=i.length;o(t.RAW="raw",t.WIN_RATE="winRate",t))(Ir||{});const dm=Me({__name:"EvaluationChart",props:{size:{type:pt,required:!0},type:{type:String,required:!0}},setup(t){const e=t,x=1e6,n=2e3,i=-n;function s(v){switch(v){case 0:return d.sente;case 1:return d.gote;case 2:return d.research;case 3:return d.research+"2";case 4:return d.research+"3";case 5:return d.research+"4"}}function o(v,D){const T=v.customData;if(T)switch(D){case 0:return v.nextColor===L.BLACK?void 0:T.playerSearchInfo;case 1:return v.nextColor===L.WHITE?void 0:T.playerSearchInfo;case 2:return T.researchInfo;case 3:return T.researchInfo2;case 4:return T.researchInfo3;case 5:return T.researchInfo4}}function r(v,D,T){const b=v.score!==void 0?v.score:v.mate!==void 0?v.mate>0?x:-x:void 0;if(b!==void 0)switch(D){case"raw":return Math.min(Math.max(b,i),n);case"winRate":return cr(b,T)}}function a(v){switch(v){default:return{main:"black",ticks:"dimgray",grid:"lightgray",head:"red",blackPlayer:"#1480C9",whitePlayer:"#FB7D00",researcher:"#349393",researcher2:"#FF1F4E",researcher3:"#6C22FF",researcher4:"#FFB912"};case yx.DARK:return{main:"white",ticks:"darkgray",grid:"dimgray",head:"red",blackPlayer:"#36A2EB",whitePlayer:"#FF9F40",researcher:"#4BC0C0",researcher2:"#FF6384",researcher3:"#9966FF",researcher4:"#FFCD56"}}}const E=U(),l=Ge();let A,h=n,B=i;e.type==="winRate"&&(h=100,B=0);const p=(v,D,T,b)=>{const P=[],O=T.moves;for(const N of O){const K=o(N,D);if(!K)continue;const W=r(K,e.type,b.coefficientInSigmoid);W!==void 0&&P.push({x:N.ply,y:W})}const V=O[O.length-1];if(D===0&&V.nextColor===L.BLACK||D===1&&V.nextColor===L.WHITE){const N=V.customData;if(N&&N.opponentSearchInfo){const K=r(N.opponentSearchInfo,e.type,b.coefficientInSigmoid);K!==void 0&&P.push({x:V.ply+1,y:K})}}return{label:s(D),borderColor:v,data:P,showLine:!0}},f=(v,D)=>({label:d.currentPosition,borderColor:D.head,data:[{x:v.current.ply,y:h},{x:v.current.ply,y:B}],showLine:!0,pointBorderWidth:0,pointRadius:0}),g=(v,D,T)=>{const b=[{borderColor:T.blackPlayer,type:0},{borderColor:T.whitePlayer,type:1},{borderColor:T.researcher,type:2},{borderColor:T.researcher2,type:3},{borderColor:T.researcher3,type:4},{borderColor:T.researcher4,type:5}],P=[f(v,T)];for(const O of b){const V=p(O.borderColor,O.type,v,D);V.data.length>0&&P.push(V)}return P},C=(v,D)=>({x:{min:0,max:v.length+10,ticks:{color:D.ticks},grid:{color:D.grid}},y:{min:B,max:h,ticks:{color:D.ticks},grid:{color:D.grid}}}),S=(v,D)=>{const T=a(D.thema);A.data.datasets=g(v,D,T),A.options.color=T.main,A.options.scales=C(v,T),A.update()},I=(v,D,T)=>{if(v.x===null)return;const b=T.scales.x.max-T.scales.x.min,P=T.scales.x.right-T.scales.x.left,O=(v.x-T.scales.x.left)/P*b+T.scales.x.min,V=Math.round(O);l.changePly(V)};Xe(()=>{const v=Pe(),T=E.value.getContext("2d");A=new U0(T,{type:"scatter",data:{datasets:[]},options:{animation:{duration:0},responsive:!0,maintainAspectRatio:!1,events:["click"],onClick:I}}),A.draw(),S(l.record,v),ix(()=>[l.record,v],([b,P])=>S(b,P),{deep:!0})}),Ai(()=>{A.destroy()});const y=Fe(()=>({height:`${e.size.height}px`,width:`${e.size.width}px`}));return(v,D)=>(w(),M("div",null,[u("div",{class:"full root",style:he(c(y))},[u("canvas",{ref_key:"canvas",ref:E,class:"full"},null,512)],4)]))}});const Ec=ze(dm,[["__scopeId","data-v-27a6373b"]]),fm={class:"full column root"},pm={class:"row element"},gm={class:"key"},mm={class:"value"},Cm={class:"key"},Fm=["value","onInput"],Dm={class:"options"},_m=Me({__name:"RecordInfo",props:{size:{type:pt,required:!0}},setup(t){const e=U(),x=Ge(),n=Pe(),i=Fe(()=>Object.values(J).map(r=>{const a=x.record.metadata;return{key:r,displayName:Mh(r),value:a.getStandardMetadata(r)||""}}));Xe(()=>{e.value.addEventListener("copy",r=>{r.stopPropagation()}),e.value.addEventListener("paste",r=>{r.stopPropagation()})});const s=(r,a)=>{const E=r.target;x.updateStandardRecordMetadata({key:a,value:E.value})},o=r=>{n.updateAppSetting({emptyRecordInfoVisibility:r})};return(r,a)=>(w(),M("div",null,[u("div",fm,[u("div",{ref_key:"root",ref:e,class:"full column main",style:he({height:`${t.size.height-25}px`})},[u("div",pm,[u("div",gm,m(c(d).file),1),u("div",mm,m(c(x).recordFilePath||c(d).newRecordWithBrackets),1)]),(w(!0),M(_e,null,Le(c(i),E=>(w(),M("div",{key:E.key,class:qe(["row element",{hidden:!c(n).emptyRecordInfoVisibility&&!E.value}])},[u("div",Cm,m(E.displayName),1),u("input",{class:"value",value:E.value,onInput:l=>s(l,E.key)},null,40,Fm)],2))),128))],4),u("div",Dm,[R(rt,{value:c(n).emptyRecordInfoVisibility,label:c(d).displayEmptyElements,onChange:o},null,8,["value","label"])])])]))}});const vm=ze(_m,[["__scopeId","data-v-14c1fefe"]]),bm={class:"row tabs"},ym=["onClick"],Sm={class:"auto tab-contents"},As=30,wm=Me({__name:"TabPane",props:{size:{type:pt,required:!0},visibleTabs:{type:Array,required:!0},activeTab:{type:String,required:!0},displayMinimizeToggle:{type:Boolean,required:!1}},emits:["onChangeTab","onMinimize"],setup(t,{emit:e}){const x=t,n=r=>e("onChangeTab",r),i=()=>e("onMinimize"),s=Fe(()=>x.size.reduce(new pt(0,As))),o={[Ne.RECORD_INFO]:{title:d.recordProperties,icon:ie.DESCRIPTION},[Ne.COMMENT]:{title:d.comments,icon:ie.COMMENT},[Ne.SEARCH]:{title:d.searchLog,icon:ie.BRAIN},[Ne.PV]:{title:d.pv,icon:ie.PV},[Ne.CHART]:{title:d.evaluation,icon:ie.CHART},[Ne.PERCENTAGE_CHART]:{title:d.estimatedWinRate,icon:ie.PERCENT},[Ne.INVISIBLE]:{title:d.hideTabView,icon:ie.ARROW_DROP}};return(r,a)=>(w(),M("div",null,[u("div",{class:"full column",style:he({width:`${t.size.width}px`})},[u("div",bm,[(w(!0),M(_e,null,Le(t.visibleTabs,E=>(w(),M("div",{key:E,class:qe(["tab",{selected:t.activeTab===E}]),onClick:l=>n(E)},[R(oe,{icon:o[E].icon},null,8,["icon"]),u("span",null,m(o[E].title),1)],10,ym))),128)),t.displayMinimizeToggle?(w(),M("div",{key:0,class:"tab end",onClick:i},[R(oe,{icon:c(ie).ARROW_DROP},null,8,["icon"]),u("span",null,m(c(d).hideTabView),1)])):ee("",!0)]),u("div",Sm,[t.activeTab===c(Ne).RECORD_INFO?(w(),Re(vm,{key:0,class:"full tab-content",size:c(s)},null,8,["size"])):ee("",!0),t.activeTab===c(Ne).COMMENT?(w(),Re(_4,{key:1,class:"full tab-content"})):ee("",!0),t.activeTab===c(Ne).SEARCH?(w(),Re(UE,{key:2,class:"full tab-content",size:c(s),"history-mode":!0},null,8,["size"])):ee("",!0),t.activeTab===c(Ne).PV?(w(),Re(UE,{key:3,class:"full tab-content",size:c(s),"history-mode":!1},null,8,["size"])):ee("",!0),t.activeTab===c(Ne).CHART?(w(),Re(Ec,{key:4,class:"full tab-content",size:c(s),type:c(Ir).RAW},null,8,["size","type"])):ee("",!0),t.activeTab===c(Ne).PERCENTAGE_CHART?(w(),Re(Ec,{key:5,class:"full tab-content",size:c(s),type:c(Ir).WIN_RATE},null,8,["size","type"])):ee("",!0)])],4)]))}});const Go=ze(wm,[["__scopeId","data-v-57d32810"]]),lc={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((t,e)=>(t[e.id]=e)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(t,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let x=0;this.panes=this.panes.map((n,i)=>(n.size=i===e?n.max:n.min,i!==e&&(x+=n.min),n)),this.panes[e].size-=x,this.$emit("pane-maximize",this.panes[e]),this.$emit("resized",this.panes.map(n=>({min:n.min,max:n.max,size:n.size})))},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:x,clientY:n}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:x-e.left,y:n-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),t*100/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let x={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const n=0+(this.pushOtherPanes?0:x.prevPanesSize),i=100-(this.pushOtherPanes?0:x.nextPanesSize),s=Math.max(Math.min(this.getCurrentDragPercentage(t),i),n);let o=[e,e+1],r=this.panes[o[0]]||null,a=this.panes[o[1]]||null;const E=r.max<100&&s>=r.max+x.prevPanesSize,l=a.max<100&&s<=100-(a.max+this.sumNextPanesSize(e+1));if(E||l){E?(r.size=r.max,a.size=Math.max(100-r.max-x.prevPanesSize-x.nextPanesSize,0)):(r.size=Math.max(100-a.max-x.prevPanesSize-this.sumNextPanesSize(e+1),0),a.size=a.max);return}if(this.pushOtherPanes){const A=this.doPushOtherPanes(x,s);if(!A)return;({sums:x,panesToResize:o}=A),r=this.panes[o[0]]||null,a=this.panes[o[1]]||null}r!==null&&(r.size=Math.min(Math.max(s-x.prevPanesSize-x.prevReachedMinPanes,r.min),r.max)),a!==null&&(a.size=Math.min(Math.max(100-s-x.nextPanesSize-x.nextReachedMinPanes,a.min),a.max))},doPushOtherPanes(t,e){const x=this.touch.activeSplitter,n=[x,x+1];return e{s>n[0]&&s<=x&&(i.size=i.min,t.prevReachedMinPanes+=i.min)}),t.prevPanesSize=this.sumPrevPanesSize(n[0]),n[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((i,s)=>{s>0&&s<=x&&(i.size=i.min,t.prevReachedMinPanes+=i.min)}),this.panes[n[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[n[1]].min&&(n[1]=this.findNextExpandedPane(x).index,t.nextReachedMinPanes=0,n[1]>x+1&&this.panes.forEach((i,s)=>{s>x&&s{s=x+1&&(i.size=i.min,t.nextReachedMinPanes+=i.min)}),this.panes[n[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:n}},sumPrevPanesSize(t){return this.panes.reduce((e,x,n)=>e+(ne+(n>t+1?x.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.indexe.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),x=t.classList.contains("splitpanes__splitter");!e&&!x&&(t.parentNode.removeChild(t),console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed."))})},addSplitter(t,e,x=!1){const n=t-1,i=document.createElement("div");i.classList.add("splitpanes__splitter"),x||(i.onmousedown=s=>this.onMouseDown(s,n),typeof window<"u"&&"ontouchstart"in window&&(i.ontouchstart=s=>this.onMouseDown(s,n)),i.onclick=s=>this.onSplitterClick(s,n+1)),this.dblClickSplitter&&(i.ondblclick=s=>this.onSplitterDblClick(s,n+1)),e.parentNode.insertBefore(i,e)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(x=>{x.className.includes("splitpanes__splitter")&&this.removeSplitter(x)});let e=0;t.forEach(x=>{x.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,x,!0):e&&this.addSplitter(e,x),e++)})},requestUpdate({target:t,...e}){const x=this.indexedPanes[t._.uid];Object.entries(e).forEach(([n,i])=>x[n]=i)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(i=>(i.className.includes("splitpanes__pane")&&e++,i===t.$el));const x=parseFloat(t.minSize),n=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(x)?0:x,max:isNaN(n)?100:n,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((i,s)=>i.index=s),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(n=>n.id===t._.uid),x=this.panes.splice(e,1)[0];this.panes.forEach((n,i)=>n.index=i),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...x,index:e}}),this.$emit("pane-remove",{removed:x,panes:this.panes.map(n=>({min:n.min,max:n.max,size:n.size}))})})},resetPaneSizes(t={}){!t.addedPane&&!t.removedPane?this.initialPanesSizing():this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const x=[],n=[];this.panes.forEach(i=>{i.size=Math.max(Math.min(t,i.max),i.min),e-=i.size,i.size>=i.max&&x.push(i.id),i.size<=i.min&&n.push(i.id)}),e>.1&&this.readjustSizes(e,x,n)},initialPanesSizing(){let t=100;const e=[],x=[];let n=0;this.panes.forEach(s=>{t-=s.size,s.size!==null&&n++,s.size>=s.max&&e.push(s.id),s.size<=s.min&&x.push(s.id)});let i=100;t>.1&&(this.panes.forEach(s=>{s.size===null&&(s.size=Math.max(Math.min(t/(this.panesCount-n),s.max),s.min)),i-=s.size}),i>.1&&this.readjustSizes(t,e,x))},equalizeAfterAddOrRemove({addedPane:t,removedPane:e}={}){let x=100/this.panesCount,n=0;const i=[],s=[];t&&t.givenSize!==null&&(x=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(o=>{n-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&s.push(o.id)}),!(Math.abs(n)<.1)&&(this.panes.forEach(o=>{t&&t.givenSize!==null&&t.id===o.id||(o.size=Math.max(Math.min(x,o.max),o.min)),n-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&s.push(o.id)}),n>.1&&this.readjustSizes(n,i,s))},readjustSizes(t,e,x){let n;t>0?n=t/(this.panesCount-e.length):n=t/(this.panesCount-x.length),this.panes.forEach((i,s)=>{if(t>0&&!e.includes(i.id)){const o=Math.max(Math.min(i.size+n,i.max),i.min),r=o-i.size;t-=r,i.size=o}else if(!x.includes(i.id)){const o=Math.max(Math.min(i.size+n,i.max),i.min),r=o-i.size;t-=r,i.size=o}i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.id].size}%`})}),Math.abs(t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,x)=>{e.ondblclick=t?n=>this.onSplitterDblClick(n,x):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Ju("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},Tm=(t,e)=>{const x=t.__vccOpts||t;for(const[n,i]of e)x[n]=i;return x},Pm={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};function Im(t,e,x,n,i,s){return w(),M("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=o=>s.onPaneClick(o,t._.uid)),style:he(t.style)},[Xo(t.$slots,"default")],4)}const Wi=Tm(Pm,[["render",Im]]);const km={class:"full column"},Mm={class:"row"},Om=Me({__name:"StandardLayout",setup(t){const i=Pe(),s=F0(new pt(window.innerWidth,window.innerHeight)),o=U(i.topPaneHeightPercentage),r=U(i.bottomLeftPaneWidthPercentage),a=F0(new pt(0,0)),E=new Un,l=()=>{E.after(()=>{s.width=window.innerWidth,s.height=window.innerHeight},100)};Xe(()=>{window.addEventListener("resize",l)}),Ai(()=>{window.removeEventListener("resize",l)});const A=W=>{a.width=W.width,a.height=W.height},h=W=>{i.updateAppSetting(W).catch(X=>{Ae.log(lt.WARN,"StandardLayout: failed to update app setting: "+s8(X))})},B=W=>{h({tab:W})},p=W=>{h({tab2:W})},f=()=>{o.value=100,h({topPaneHeightPercentage:100})},g=()=>{const W=Math.min(i.topPanePreviousHeightPercentage,(s.height-As*2-8)/s.height*100);o.value=W,h({topPaneHeightPercentage:W})},C=new Un,S=W=>{const X=W[0].size;C.after(()=>{o.value=X},100)},I=W=>{C.clear();const X=W[0].size;o.value=X,h({topPaneHeightPercentage:X})},y=new Un,v=W=>{const X=W[0].size;y.after(()=>{r.value=X},100)},D=W=>{y.clear();const X=W[0].size;r.value=X,h({bottomLeftPaneWidthPercentage:X})},T=Fe(()=>s.height*V.value/100>=As),b=Fe(()=>new pt(Math.max(s.width-d4-10*2,0),Math.max((s.height-8)*(o.value/100)-10*2-(T.value?0:As),0))),P=Fe(()=>({margin:"10px"})),O=Fe(()=>{const W=s.width-a.width-30,X=a.height;return{margin:"10px 10px 10px 0",width:`${W}px`,height:`${X}px`}}),V=Fe(()=>100-o.value),N=Fe(()=>new pt(i.tabPaneType===ei.SINGLE?s.width:(s.width-8)*(r.value/100),(s.height-8)*(V.value/100))),K=Fe(()=>new pt((s.width-8)*(1-r.value/100),(s.height-8)*(V.value/100)));return(W,X)=>(w(),M("div",null,[R(c(lc),{class:"main-frame",horizontal:"","dbl-click-splitter":!1,onResize:S,onResized:I},{default:B0(()=>[R(c(Wi),{size:o.value},{default:B0(()=>[u("div",km,[u("div",Mm,[R(U3,{style:he(c(P)),"max-size":c(b),onResize:A},null,8,["style","max-size"]),R(p4,{style:he(c(O))},null,8,["style"])]),c(T)?ee("",!0):(w(),M("button",{key:0,class:"unhide-tabview-button",onClick:g},[R(oe,{icon:c(ie).ARROW_UP},null,8,["icon"]),u("span",null,m(c(d).expandTabView),1)]))])]),_:1},8,["size"]),R(c(Wi),{size:c(V)},{default:B0(()=>[c(i).tabPaneType===c(ei).SINGLE?(w(),Re(Go,{key:0,class:"full",size:c(N),"visible-tabs":[c(Ne).RECORD_INFO,c(Ne).COMMENT,c(Ne).SEARCH,c(Ne).PV,c(Ne).CHART,c(Ne).PERCENTAGE_CHART],"active-tab":c(i).tab,"display-minimize-toggle":!0,onOnChangeTab:B,onOnMinimize:f},null,8,["size","visible-tabs","active-tab"])):(w(),Re(c(lc),{key:1,class:"bottom-frame",vertical:"","dbl-click-splitter":!1,onResize:v,onResized:D},{default:B0(()=>[R(c(Wi),{size:r.value},{default:B0(()=>[R(Go,{class:"full",size:c(N),"visible-tabs":[c(Ne).RECORD_INFO,c(Ne).SEARCH,c(Ne).PV],"active-tab":c(i).tab,onOnChangeTab:B},null,8,["size","visible-tabs","active-tab"])]),_:1},8,["size"]),R(c(Wi),null,{default:B0(()=>[R(Go,{class:"full",size:c(K),"visible-tabs":[c(Ne).COMMENT,c(Ne).CHART,c(Ne).PERCENTAGE_CHART],"active-tab":c(i).tab2,"display-minimize-toggle":!0,onOnChangeTab:p,onOnMinimize:f},null,8,["size","visible-tabs","active-tab"])]),_:1})]),_:1}))]),_:1},8,["size"])]),_:1})]))}});const Rm=ze(Om,[["__scopeId","data-v-e8732df8"]]);function Bt(t){let e=Number(t.value);return t.max&&(e=Math.min(e,Number(t.max))),t.min&&(e=Math.max(e,Number(t.min))),e}const Nm={style:{display:"inline-block"}},Lm=["name","checked","value","onChange"],Hm={class:"label"},Um=Me({__name:"HorizontalSelector",props:{value:{type:String,required:!0},items:{type:Array,required:!0},height:{type:Number,default:28}},emits:["change"],setup(t,{expose:e,emit:x}){const n=t,i=U(),s=J8(),o=Fe(()=>({height:`${n.height}px`,minWidth:`${n.height*2.5}px`,fontSize:`${n.height*.5}px`,borderRadius:`${n.height*.25}px`,paddingLeft:`${n.height*.25}px`,paddingRight:`${n.height*.25}px`}));return e({setValue:E=>{i.value.querySelectorAll("input").forEach(l=>{l.value===E&&(l.checked=!0,x("change",E))})},getValue:()=>{const E=Array.from(i.value.querySelectorAll("input")).filter(l=>{if(l.checked)return l.value});return E.length>0?E[0].value:n.value}}),(E,l)=>(w(),M("div",Nm,[u("div",{ref_key:"container",ref:i,class:"row wrap container"},[(w(!0),M(_e,null,Le(t.items,A=>(w(),M("div",{key:A.value,class:"item"},[u("input",{type:"radio",name:c(s),checked:A.value===t.value,value:A.value,onChange:h=>x("change",A.value)},null,40,Lm),u("div",{class:"button",style:he(c(o))},[u("div",Hm,m(A.label),1)],4)]))),128))],512)]))}});const Kt=ze(Um,[["__scopeId","data-v-3118c214"]]),$m={class:"title"},zm={class:"form-group"},Gm={class:"option-filter"},Wm=["placeholder"],Vm={class:"column option-list"},Km={class:"row option"},jm={class:"option-name"},qm={class:"option-unchangeable"},Ym={class:"option-name"},Jm={class:"option-unchangeable"},Xm={class:"option-name"},Zm={class:"option-unchangeable"},Qm={class:"option-name"},e1={class:"option-value"},t1={class:"option-name"},x1={key:0,class:"option-name-original"},n1={class:"option-value"},i1={class:"option-value-control"},s1=["min","max","name"],o1=["name"],r1=["name"],a1=["onClick"],E1={value:""},l1=["value"],c1=["onClick"],A1={key:0,class:"option-default-value"},u1={class:"main-buttons"},h1=Me({__name:"USIEngineOptionDialog",props:{latestEngineSetting:{type:Object,required:!0},okButtonText:{type:String,required:!1,default:"OK"}},emits:["ok","cancel"],setup(t,{emit:e}){const x=t,n=Ge(),i=Pe(),s=U(),o=U(),r=U(),a=U([]),E=U({}),l=U({}),A=U(k8());let h=!1,B=!1;n.retainBussyState(),Xe(async()=>{Dt(s.value),Gt(s.value);try{const D=i.engineTimeoutSeconds;A.value=await Ae.getUSIEngineInfo(x.latestEngineSetting.path,D),m6(A.value,x.latestEngineSetting),o.value.value=A.value.name,h=!0}catch(D){n.pushError(D),e("cancel")}finally{n.releaseBussyState()}});const p=Fe(()=>Object.values(A.value.options).sort((D,T)=>D.order{const T=a.value.length>0,b={...D,value:Sx(D),visible:!T};return i.translateEngineOptionName&&(b.displayName=Xi[D.name]),T&&(b.visible=b.displayName&&gs(b.displayName,a.value)||gs(b.name,a.value)),b}));un(()=>{if(!(!h||B)){for(const D of p.value)D.value!==void 0&&(D.type==="check"?l.value[D.name].setValue(D.value||""):E.value[D.name]&&(E.value[D.name].value=D.value+""));B=!0}}),vt(()=>{Wt(s.value)});const f=()=>{a.value=String(r.value.value).trim().split(/ +/).filter(D=>D)},g=()=>{Ae.openExplorer(A.value.path)},C=async D=>{n.retainBussyState();try{const T=await Ae.showSelectFileDialog(),b=E.value[D];T&&b&&(b.value=T)}catch(T){n.pushError(T)}finally{n.releaseBussyState()}},S=async D=>{n.retainBussyState();try{const T=i.engineTimeoutSeconds;await Ae.sendUSISetOption(A.value.path,D,T)}catch(T){n.pushError(T)}finally{n.releaseBussyState()}},I=()=>{o.value.value=A.value.defaultName;for(const D of p.value){const T=A.value.options[D.name].default!==void 0?A.value.options[D.name].default+"":"";D.type==="check"?l.value[D.name].setValue(T):E.value[D.name]&&(E.value[D.name].value=T)}},y=()=>{A.value.name=o.value.value;for(const D of p.value)if(D.type==="check")A.value.options[D.name].value=l.value[D.name].getValue()||void 0;else if(E.value[D.name]){const T=E.value[D.name];A.value.options[D.name].value=T.value?D.type==="spin"?Bt(T):T.value:void 0}e("ok",A.value)},v=()=>{e("cancel")};return(D,T)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:s},[u("div",$m,m(c(d).engineSettings),1),u("div",zm,[u("div",Gm,[u("input",{ref_key:"filter",ref:r,class:"filter",placeholder:c(d).filterByOptionName,onInput:f},null,40,Wm)]),u("div",Vm,[u("div",Km,[u("div",jm,m(c(d).engineName),1),u("div",qm,m(A.value.defaultName),1)]),u("div",{class:qe(["row option",{hidden:a.value.length}])},[u("div",Ym,m(c(d).author),1),u("div",Jm,m(A.value.author),1)],2),u("div",{class:qe(["row option",{hidden:a.value.length}])},[u("div",Xm,m(c(d).enginePath),1),u("div",Zm,[u("div",null,m(A.value.path),1),u("button",{class:"thin",onClick:g},m(c(d).openDirectory),1)])],2),u("div",{class:qe(["row option",{hidden:a.value.length}])},[u("div",Qm,m(c(d).displayName),1),u("div",e1,[u("input",{ref_key:"engineNameInput",ref:o,class:"option-value-text",type:"text",name:"ElectronShogiEngineName"},null,512)])],2),(w(!0),M(_e,null,Le(c(p),b=>(w(),M("div",{key:b.name,class:qe(["row option",{hidden:!b.visible}])},[u("div",t1,[hn(m(b.displayName||b.name)+" ",1),b.displayName?(w(),M("span",x1,m(b.name),1)):ee("",!0)]),u("div",n1,[u("span",i1,[b.type==="spin"?(w(),M("input",{key:0,ref_for:!0,ref:P=>{E.value[b.name]=P},class:"option-value-number",type:"number",min:b.min,max:b.max,step:"1",name:b.name},null,8,s1)):ee("",!0),b.type==="string"?(w(),M("input",{key:1,ref_for:!0,ref:P=>{E.value[b.name]=P},class:"option-value-text",type:"text",name:b.name},null,8,o1)):ee("",!0),b.type==="filename"?(w(),M("input",{key:2,ref_for:!0,ref:P=>{E.value[b.name]=P},class:"option-value-filename",type:"text",name:b.name},null,8,r1)):ee("",!0),b.type==="filename"?(w(),M("button",{key:3,class:"thin",onClick:P=>C(b.name)},m(c(d).select),9,a1)):ee("",!0),b.type==="check"?(w(),Re(Kt,{key:4,ref_for:!0,ref:P=>{l.value[b.name]=P},value:"",items:b.default?[{value:"true",label:"ON"},{value:"false",label:"OFF"}]:[{value:"",label:c(d).defaultValue},{value:"true",label:"ON"},{value:"false",label:"OFF"}]},null,8,["items"])):ee("",!0),b.type==="combo"?(w(),M("select",{key:5,ref_for:!0,ref:P=>{E.value[b.name]=P},class:"option-value-combo"},[u("option",E1,m(c(d).defaultValue),1),(w(!0),M(_e,null,Le(b.vars,P=>(w(),M("option",{key:P,value:P},m(P),9,l1))),128))],512)):ee("",!0),b.type==="button"?(w(),M("button",{key:6,class:"thin",onClick:P=>S(b.name)},m(c(d).invoke),9,c1)):ee("",!0)]),b.default!==void 0&&b.default!==""?(w(),M("span",A1,m(c(d).defaultValue)+": "+m(b.type==="check"?b.default==="true"?"ON":"OFF":b.default),1)):ee("",!0)])],2))),128))])]),u("button",{class:"wide",onClick:T[0]||(T[0]=b=>I())},m(c(d).resetToEngineDefaultValues),1),u("div",u1,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:T[1]||(T[1]=b=>y())},m(t.okButtonText),1),u("button",{"data-hotkey":"Escape",onClick:T[2]||(T[2]=b=>v())},m(c(d).cancel),1)])],512)]))}});const q9=ze(h1,[["__scopeId","data-v-1c17ad8b"]]),B1={class:"root"},d1=["value"],f1=["value"],p1=["value"],g1={key:0,class:"row player-info"},m1={class:"player-info-key"},C1={class:"player-info-value"},F1={key:1,class:"row player-info"},D1={class:"player-info-key"},_1={class:"player-info-value"},v1={key:2,class:"row player-info"},b1={class:"player-info-key"},y1={class:"player-info-value"},S1=["disabled"],w1=Me({__name:"PlayerSelector",props:{playerUri:{type:String,required:!0},containsHuman:{type:Boolean,default:!1},engineSettings:{type:Object,required:!0},displayPonderState:{type:Boolean,default:!1},displayThreadState:{type:Boolean,default:!1},displayMultiPvState:{type:Boolean,default:!1}},emits:["select-player","update-engine-setting"],setup(t,{emit:e}){const x=t,n=Ge(),i=U(),s=U(null),o=Fe(()=>{if(!$0(x.playerUri))return null;const p=x.engineSettings.getEngine(x.playerUri);return p&&Sx(p.options[I8])==="true"?"ON":"OFF"}),r=Fe(()=>{if(!$0(x.playerUri))return null;const p=x.engineSettings.getEngine(x.playerUri);return p?Sx(p.options[d6])||Sx(p.options[f6]):null}),a=Fe(()=>{if(!$0(x.playerUri))return null;const p=x.engineSettings.getEngine(x.playerUri);return p?Sx(p.options[B6])||Sx(p.options[p6]):null}),E=Fe(()=>$0(x.playerUri)),l=()=>{if($0(x.playerUri)){const p=x.engineSettings.getEngine(x.playerUri);if(!p){n.pushError("利用可能なエンジンが選択されていません。");return}s.value=p}},A=async p=>{s.value=null;const f=x.engineSettings.getClone();f.updateEngine(p),n.retainBussyState();try{await Ae.saveUSIEngineSetting(f),e("update-engine-setting",f)}catch(g){n.pushError(g)}finally{n.releaseBussyState()}},h=()=>{s.value=null},B=()=>{e("select-player",i.value.value)};return(p,f)=>(w(),M(_e,null,[u("div",null,[u("div",B1,[u("select",{ref_key:"playerSelect",ref:i,class:"player-select",size:"1",value:t.playerUri,onChange:B},[t.containsHuman?(w(),M("option",{key:0,value:x0},"人",8,f1)):ee("",!0),(w(!0),M(_e,null,Le(t.engineSettings.engineList,g=>(w(),M("option",{key:g.uri,value:g.uri},m(g.name),9,p1))),128))],40,d1),t.displayPonderState?(w(),M("div",g1,[u("span",m1,m(c(d).ponder)+":",1),u("span",C1,m(c(o)||"---"),1)])):ee("",!0),t.displayThreadState?(w(),M("div",F1,[u("span",D1,m(c(d).numberOfThreads)+":",1),u("span",_1,m(c(r)||"---"),1)])):ee("",!0),t.displayMultiPvState?(w(),M("div",v1,[u("span",b1,m(c(d).multiPV)+":",1),u("span",y1,m(c(a)||"---"),1)])):ee("",!0),u("button",{class:"player-setting",disabled:!c(E),onClick:l},[R(oe,{icon:c(ie).SETTINGS},null,8,["icon"]),u("span",null,m(c(d).settings),1)],8,S1)])]),s.value?(w(),Re(q9,{key:0,"latest-engine-setting":s.value,"ok-button-text":c(d).save,onOk:A,onCancel:h},null,8,["latest-engine-setting","ok-button-text"])):ee("",!0)],64))}});const Hx=ze(w1,[["__scopeId","data-v-28321643"]]),T1={class:"title"},P1={class:"form-group players"},I1={class:"row regular-interval"},k1={class:"player"},M1={class:"top-label"},O1={class:"player"},R1={class:"top-label"},N1={class:"players-control"},L1={class:"row regular-interval"},H1={class:"form-group time-limit"},U1={class:"top-label"},$1={class:"form-item"},z1={class:"form-item-label"},G1={class:"form-item-unit"},W1={class:"form-item-unit"},V1={class:"form-item"},K1={class:"form-item-label"},j1={class:"form-item-unit"},q1={class:"form-item"},Y1={class:"form-item-label"},J1={class:"form-item-unit"},X1={class:"form-item"},Z1={class:"form-group others"},Q1={class:"top-label"},eC={class:"form-item"},tC={class:"form-item-label"},xC={value:"current"},nC={value:"standard"},iC={value:"handicapLance"},sC={value:"handicapRightLance"},oC={value:"handicapBishop"},rC={value:"handicapRook"},aC={value:"handicapRookLance"},EC={value:"handicap2Pieces"},lC={value:"handicap4Pieces"},cC={value:"handicap6Pieces"},AC={value:"handicap8Pieces"},uC={class:"form-item"},hC={class:"form-item-label"},BC={class:"form-item"},dC={class:"form-item-label"},fC={class:"form-item"},pC={class:"form-item"},gC={class:"form-item"},mC={class:"form-item"},CC={class:"main-buttons"},FC=Me({__name:"GameDialog",setup(t){const e=Ge(),x=U(),n=U(),i=U(),s=U(),o=U(),r=U(),a=U(!1),E=U(),l=U(),A=U(!1),h=U(!1),B=U(!1),p=U(!1),f=U(ys()),g=U(new k0),C=U(""),S=U("");let I=!1,y=!1;e.retainBussyState(),Xe(async()=>{try{f.value=await Ae.loadGameSetting(),g.value=await Ae.loadUSIEngineSetting(),C.value=f.value.black.uri,S.value=f.value.white.uri,Dt(x.value),Gt(x.value),I=!0}catch(N){e.pushError(N),e.destroyModalDialog()}finally{e.releaseBussyState()}}),vt(()=>{Wt(x.value)}),un(()=>{!I||y||(n.value.value=Math.floor(f.value.timeLimit.timeSeconds/3600),i.value.value=Math.floor(f.value.timeLimit.timeSeconds/60)%60,s.value.value=f.value.timeLimit.byoyomi,o.value.value=f.value.timeLimit.increment,r.value.value=f.value.startPosition!==void 0?f.value.startPosition:"current",a.value=f.value.enableEngineTimeout,E.value.value=f.value.maxMoves,l.value.value=f.value.repeat,A.value=f.value.swapPlayers,h.value=f.value.enableComment,B.value=f.value.enableAutoSave,p.value=f.value.humanIsFront,y=!0)});const v=N=>{if($0(N)&&g.value.hasEngine(N)){const K=g.value.getEngine(N);return{name:K.name,uri:N,usi:K}}return{name:"人",uri:x0}},D=()=>{const N={black:v(C.value),white:v(S.value),timeLimit:{timeSeconds:(Bt(n.value)*60+Bt(i.value))*60,byoyomi:Bt(s.value),increment:Bt(o.value)},startPosition:r.value.value!=="current"?r.value.value:void 0,enableEngineTimeout:a.value,maxMoves:Bt(E.value),repeat:Bt(l.value),swapPlayers:A.value,enableComment:h.value,enableAutoSave:B.value,humanIsFront:p.value},K=S0()?M8(N):_6(N);K?e.pushError(K):e.startGame(N)},T=()=>{e.closeModalDialog()},b=N=>{g.value=N},P=N=>{C.value=N},O=N=>{S.value=N},V=()=>{[C.value,S.value]=[S.value,C.value]};return(N,K)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x},[u("div",T1,m(c(d).game),1),u("div",P1,[u("div",I1,[u("div",k1,[u("div",M1,m(c(d).senteOrShitate),1),R(Hx,{"player-uri":C.value,"contains-human":!0,"engine-settings":g.value,"display-ponder-state":!0,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:b,onSelectPlayer:P},null,8,["player-uri","engine-settings"])]),u("div",O1,[u("div",R1,m(c(d).goteOrUwate),1),S.value?(w(),Re(Hx,{key:0,"player-uri":S.value,"contains-human":!0,"engine-settings":g.value,"display-ponder-state":!0,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:b,onSelectPlayer:O},null,8,["player-uri","engine-settings"])):ee("",!0)])]),u("div",N1,[u("button",{onClick:V},[R(oe,{icon:c(ie).SWAP_H},null,8,["icon"]),u("span",null,m(c(d).swapSenteGote),1)])])]),u("div",L1,[u("div",H1,[u("div",U1,m(c(d).time),1),u("div",$1,[u("div",z1,m(c(d).allottedTime),1),u("input",{ref_key:"hours",ref:n,class:"time",type:"number",min:"0",max:"99",step:"1"},null,512),u("div",G1,m(c(d).hoursSuffix),1),u("input",{ref_key:"minutes",ref:i,class:"time",type:"number",min:"0",max:"59",step:"1"},null,512),u("div",W1,m(c(d).minutesSuffix),1)]),u("div",V1,[u("div",K1,m(c(d).byoyomi),1),u("input",{ref_key:"byoyomi",ref:s,class:"time",type:"number",min:"0",max:"60",step:"1"},null,512),u("div",j1,m(c(d).secondsSuffix),1)]),u("div",q1,[u("div",Y1,m(c(d).increments),1),u("input",{ref_key:"increment",ref:o,class:"time",type:"number",min:"0",max:"99",step:"1"},null,512),u("div",J1,m(c(d).secondsSuffix),1)]),u("div",X1,[R(rt,{label:c(d).enableEngineTimeout,value:a.value,onChange:K[0]||(K[0]=W=>{a.value=W})},null,8,["label","value"])])]),u("div",Z1,[u("div",Q1,m(c(d).others),1),u("div",eC,[u("div",tC,m(c(d).startPosition),1),u("select",{ref_key:"startPosition",ref:r},[u("option",xC,m(c(d).currentPosition),1),u("option",nC,m(c(d).nonHandicap),1),u("option",iC,m(c(d).lanceHandicap),1),u("option",sC,m(c(d).rightLanceHandicap),1),u("option",oC,m(c(d).bishopHandicap),1),u("option",rC,m(c(d).rookHandicap),1),u("option",aC,m(c(d).rookLanceHandicap),1),u("option",EC,m(c(d).twoPiecesHandicap),1),u("option",lC,m(c(d).fourPiecesHandicap),1),u("option",cC,m(c(d).sixPiecesHandicap),1),u("option",AC,m(c(d).eightPiecesHandicap),1)],512)]),u("div",uC,[u("div",hC,m(c(d).maxMoves),1),u("input",{ref_key:"maxMoves",ref:E,class:"number",type:"number",min:"1"},null,512)]),u("div",BC,[u("div",dC,m(c(d).gameRepetition),1),u("input",{ref_key:"repeat",ref:l,class:"number",type:"number",min:"1"},null,512)]),u("div",fC,[R(rt,{label:c(d).swapTurnWhenGameRepetition,value:A.value,onChange:K[1]||(K[1]=W=>{A.value=W})},null,8,["label","value"])]),u("div",pC,[R(rt,{label:c(d).outputComments,value:h.value,onChange:K[2]||(K[2]=W=>{h.value=W})},null,8,["label","value"])]),u("div",gC,[R(rt,{label:c(d).saveRecordAutomatically,value:B.value,onChange:K[3]||(K[3]=W=>{B.value=W})},null,8,["label","value"])]),u("div",mC,[R(rt,{label:c(d).adjustBoardToHumanPlayer,value:p.value,onChange:K[4]||(K[4]=W=>{p.value=W})},null,8,["label","value"])])])]),u("div",CC,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:K[5]||(K[5]=W=>D())},m(c(d).startGame),1),u("button",{"data-hotkey":"Escape",onClick:K[6]||(K[6]=W=>T())},m(c(d).cancel),1)])],512)]))}});const DC=ze(FC,[["__scopeId","data-v-e1d42cc7"]]),Di=t=>(Ys("data-v-b929b527"),t=t(),Js(),t),_C={class:"title"},vC={class:"form-group scroll"},bC={key:0,class:"form-group warning"},yC={class:"note"},SC={class:"form-group"},wC={class:"form-group"},TC={class:"form-item"},PC={class:"form-item-label-wide"},IC={key:0,value:"0"},kC=["value"],MC=Di(()=>u("hr",null,null,-1)),OC={class:"form-item"},RC={class:"form-item-label-wide"},NC=["value"],LC=["value"],HC={key:0,class:"form-group warning"},UC={class:"note"},$C={class:"form-item"},zC={class:"form-item-label-wide"},GC=Di(()=>u("datalist",{id:"csa-server-host"},[u("option",{value:"gserver.computer-shogi.org"}),u("option",{value:"wdoor.c.u-tokyo.ac.jp"}),u("option",{value:"localhost"})],-1)),WC={class:"form-item"},VC={class:"form-item-label-wide"},KC=Di(()=>u("datalist",{id:"csa-server-port-number"},[u("option",{value:"4081"})],-1)),jC={class:"form-item"},qC=Di(()=>u("div",{class:"form-item-label-wide"},"ID",-1)),YC={class:"form-item"},JC={class:"form-item-label-wide"},XC={class:"form-item"},ZC=Di(()=>u("div",{class:"form-item-label-wide"},null,-1)),QC={class:"form-group warning"},eF={key:0,class:"note"},tF={key:1,class:"note"},xF={class:"form-item"},nF={class:"form-item-label-wide"},iF={class:"form-group"},sF={class:"form-item"},oF={class:"form-item-label-wide number"},rF={class:"form-item"},aF={class:"form-item-label-wide"},EF={class:"form-item"},lF={class:"form-item-label-wide"},cF={class:"form-item"},AF={class:"form-item-label-wide"},uF={class:"form-item"},hF={class:"form-item-label-wide"},BF={class:"main-buttons"},dF=Me({__name:"CSAGameDialog",setup(t){const e=Ge(),x=U(),n=U(),i=U(wx.V121),s=U(),o=U(),r=U(),a=U(),E=U(!0),l=U(),A=U(!1),h=U(!1),B=U(!1),p=U(!1),f=U(!1),g=U(lr()),C=U(new k0),S=U("");let I=!1,y=!1;e.retainBussyState(),Xe(async()=>{try{f.value=await Ae.isEncryptionAvailable(),g.value=await Ae.loadCSAGameSettingHistory(),C.value=await Ae.loadUSIEngineSetting(),Dt(x.value),Gt(x.value),I=!0}catch(W){e.pushError(W),e.destroyModalDialog()}finally{e.releaseBussyState()}}),vt(()=>{Wt(x.value)}),un(()=>{if(!I||y)return;const W=S6(g.value,0);n.value.value=i.value=W.server.protocolVersion,s.value.value=W.server.host,o.value.value=W.server.port,r.value.value=W.server.id,a.value.value=W.server.password,l.value.value=W.repeat,A.value=W.autoRelogin,h.value=W.enableComment,B.value=W.enableAutoSave,p.value=W.autoFlip,S.value=W.player.uri,y=!0});const v=W=>{if($0(W)&&C.value.hasEngine(W)){const X=C.value.getEngine(W);return{name:X.name,uri:W,usi:X}}return{name:"人",uri:x0}},D=()=>{const W={player:v(S.value),server:{protocolVersion:n.value.value,host:String(s.value.value||"").trim(),port:Number(o.value.value),id:String(r.value.value||""),password:String(a.value.value||"")},repeat:Bt(l.value),autoRelogin:A.value,enableComment:h.value,enableAutoSave:B.value,autoFlip:p.value},X=y6(W);X?e.pushError(X):e.loginCSAGame(W,{saveHistory:E.value})},T=()=>{e.closeModalDialog()},b=async W=>{C.value=W},P=W=>{S.value=W},O=W=>{a.value.type=W?"text":"password"},V=W=>{const X=W.target,xe=g.value.serverHistory[Number(X.value)];xe&&(n.value.value=i.value=xe.protocolVersion,s.value.value=xe.host,o.value.value=xe.port,r.value.value=xe.id,a.value.value=xe.password)},N=()=>{i.value=n.value.value},K=Fe(()=>{const W=Pe();return W.enableCSALog&&W.enableAppLog&&W.enableUSILog});return(W,X)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x,class:"root"},[u("div",_C,m(c(d).csaProtocolOnlineGame),1),u("div",vC,[c(K)?ee("",!0):(w(),M("div",bC,[u("div",yC,m(c(d).someLogsDisabled)+" "+m(c(d).logsRecommendedForCSAProtocol)+" "+m(c(d).pleaseEnableLogsAndRestart),1)])),u("div",SC,[u("div",null,m(c(d).player),1),R(Hx,{"player-uri":S.value,"contains-human":!0,"engine-settings":C.value,"display-ponder-state":!0,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:b,onSelectPlayer:P},null,8,["player-uri","engine-settings"])]),u("div",wC,[u("div",TC,[u("div",PC,m(c(d).selectFromHistory),1),u("select",{class:"long-text",value:"0",onChange:V},[g.value.serverHistory.length===0?(w(),M("option",IC,m(c(d).noHistory),1)):ee("",!0),(w(!0),M(_e,null,Le(g.value.serverHistory,(xe,Z)=>(w(),M("option",{key:Z,value:Z},m(xe.host)+":"+m(xe.port)+" "+m(xe.id),9,kC))),128))],32)]),MC,u("div",OC,[u("div",RC,m(c(d).version),1),u("select",{ref_key:"protocolVersion",ref:n,class:"long-text",value:"CSA_v121",onChange:N},[u("option",{value:c(wx).V121},m(c(d).csaProtocolV121),9,NC),u("option",{value:c(wx).V121_FLOODGATE},m(c(d).csaProtocolV121WithPVComment),9,LC)],544)]),i.value===c(wx).V121?(w(),M("div",HC,[u("div",UC,m(c(d).notSendPVOnStandardCSAProtocol),1)])):ee("",!0),u("div",$C,[u("div",zC,m(c(d).hostToConnect),1),u("input",{ref_key:"host",ref:s,class:"long-text",list:"csa-server-host",type:"text"},null,512),GC]),u("div",WC,[u("div",VC,m(c(d).portNumber),1),u("input",{ref_key:"port",ref:o,class:"number",list:"csa-server-port-number",type:"number"},null,512),KC]),u("div",jC,[qC,u("input",{ref_key:"id",ref:r,class:"long-text",type:"text"},null,512)]),u("div",YC,[u("div",JC,m(c(d).password),1),u("input",{ref_key:"password",ref:a,class:"long-text",type:"password"},null,512)]),u("div",XC,[ZC,R(rt,{label:c(d).showPassword,value:!1,onChange:O},null,8,["label"])]),u("div",QC,[f.value?(w(),M("div",eF,m(c(d).csaProtocolSendPlaintextPassword),1)):(w(),M("div",tF,m(c(d).passwordWillSavedPlaintextBecauseOSSideEncryptionNotAvailable)+" "+m(c(d).pleaseUncheckSaveHistoryIfNotWantSave)+" "+m(c(d).csaProtocolSendPlaintextPasswordRegardlessOfHistory),1))]),u("div",xF,[u("div",nF,m(c(d).saveHistory),1),R(rt,{value:E.value,onChange:X[0]||(X[0]=xe=>{E.value=xe})},null,8,["value"])])]),u("div",iF,[u("div",sF,[u("div",oF,m(c(d).gameRepetition),1),u("input",{ref_key:"repeat",ref:l,class:"number",type:"number",min:"1"},null,512)]),u("div",rF,[u("div",aF,m(c(d).autoRelogin),1),R(rt,{value:A.value,onChange:X[1]||(X[1]=xe=>{A.value=xe})},null,8,["value"])]),u("div",EF,[u("div",lF,m(c(d).outputComments),1),R(rt,{value:h.value,onChange:X[2]||(X[2]=xe=>{h.value=xe})},null,8,["value"])]),u("div",cF,[u("div",AF,m(c(d).saveRecordAutomatically),1),R(rt,{value:B.value,onChange:X[3]||(X[3]=xe=>{B.value=xe})},null,8,["value"])]),u("div",uF,[u("div",hF,m(c(d).adjustBoardAutomatically),1),R(rt,{value:p.value,onChange:X[4]||(X[4]=xe=>{p.value=xe})},null,8,["value"])])])]),u("div",BF,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:X[5]||(X[5]=xe=>D())},m(c(d).startGame),1),u("button",{"data-hotkey":"Escape",onClick:X[6]||(X[6]=xe=>T())},m(c(d).cancel),1)])],512)]))}});const fF=ze(dF,[["__scopeId","data-v-b929b527"]]),pF={class:"title"},gF={class:"form-group"},mF=["onClick"],CF={class:"form-group"},FF={class:"form-item"},DF={class:"form-item-unit"},_F=["value","disabled"],vF={class:"form-item-unit"},bF={class:"main-buttons"},yF=Me({__name:"ResearchDialog",setup(t){const e=Ge(),x=U(),n=U(Ss()),i=U(new k0),s=U(""),o=U([]),r=U(!1),a=U();e.retainBussyState(),Xe(async()=>{var h,B;Dt(x.value),Gt(x.value);try{n.value=await Ae.loadResearchSetting(),i.value=await Ae.loadUSIEngineSetting(),s.value=((h=n.value.usi)==null?void 0:h.uri)||"",o.value=((B=n.value.secondaries)==null?void 0:B.map(p=>{var f;return((f=p.usi)==null?void 0:f.uri)||""}))||[],r.value=n.value.enableMaxSeconds}catch(p){e.pushError(p),e.destroyModalDialog()}finally{e.releaseBussyState()}}),vt(()=>{Wt(x.value)});const E=()=>{const h=i.value.getEngine(s.value),B=[];for(const g of o.value){const C=i.value.getEngine(g);B.push({usi:C})}const p={usi:h,secondaries:B,enableMaxSeconds:r.value,maxSeconds:Bt(a.value)},f=v6(p);if(f){e.pushError(f);return}e.startResearch(p)},l=()=>{e.closeModalDialog()},A=async h=>{i.value=h};return(h,B)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x,class:"root"},[u("div",pF,m(c(d).research),1),u("div",gF,[R(Hx,{"player-uri":s.value,"engine-settings":i.value,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:A,onSelectPlayer:B[0]||(B[0]=p=>{s.value=p})},null,8,["player-uri","engine-settings"])]),(w(!0),M(_e,null,Le(o.value,(p,f)=>(w(),M("div",{key:f,class:"form-group"},[R(Hx,{"player-uri":p,"engine-settings":i.value,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:A,onSelectPlayer:g=>{o.value[f]=g}},null,8,["player-uri","engine-settings","onSelectPlayer"]),u("button",{class:"remove-button",onClick:g=>o.value.splice(f,1)},m(c(d).remove),9,mF)]))),128)),u("button",{class:"center thin",onClick:B[1]||(B[1]=p=>o.value.push(""))},[R(oe,{icon:c(ie).ADD},null,8,["icon"]),hn(" "+m(c(d).addNthEngine(o.value.length+2)),1)]),u("div",CF,[u("div",FF,[R(rt,{value:r.value,onChange:B[2]||(B[2]=p=>{r.value=p})},null,8,["value"]),u("div",DF,m(c(d).toPrefix),1),u("input",{ref_key:"maxSeconds",ref:a,value:n.value.maxSeconds,class:"number",type:"number",min:"1",disabled:!r.value},null,8,_F),u("div",vF,m(c(d).secondsSuffix)+m(c(d).toSuffix),1)])]),u("div",bF,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:B[3]||(B[3]=p=>E())},m(c(d).startResearch),1),u("button",{"data-hotkey":"Escape",onClick:B[4]||(B[4]=p=>l())},m(c(d).cancel),1)])],512)]))}});const SF=ze(yF,[["__scopeId","data-v-c47f4227"]]),wF={class:"title"},TF={class:"form-group"},PF={class:"engine-filter"},IF=["placeholder"],kF={class:"column engine-list"},MF={key:0,class:"engine"},OF=["value"],RF={class:"engine-name"},NF=["onClick"],LF=["onClick"],HF=["onClick"],UF={class:"main-buttons"},$F=Me({__name:"USIEngineManagementDialog",setup(t){const e=Ge(),x=U(),n=U(null),i=U(new k0),s=U(),o=U([]);e.retainBussyState(),Xe(async()=>{Dt(x.value),Gt(x.value);try{i.value=await Ae.loadUSIEngineSetting()}catch(C){e.pushError(C),e.destroyModalDialog()}finally{e.releaseBussyState()}}),vt(()=>{Wt(x.value)});const r=Fe(()=>i.value.engineList.map(C=>({uri:C.uri,name:C.name,visible:o.value.length==0||gs(C.name,o.value)||gs(C.defaultName,o.value)}))),a=()=>{o.value=String(s.value.value).trim().split(/ +/).filter(C=>C)},E=async()=>{try{e.retainBussyState();const C=await Ae.showSelectUSIEngineDialog();if(!C)return;const I=Pe().engineTimeoutSeconds;i.value.addEngine(await Ae.getUSIEngineInfo(C,I))}catch(C){e.pushError(C)}finally{e.releaseBussyState()}},l=C=>{i.value.removeEngine(C)},A=C=>{n.value=i.value.getEngine(C)},h=C=>{const S=i.value.getEngine(C),I=g6(S);i.value.addEngine(I)},B=async()=>{try{e.retainBussyState(),await Ae.saveUSIEngineSetting(i.value),e.destroyModalDialog()}catch(C){e.pushError(C)}finally{e.releaseBussyState()}},p=()=>{e.closeModalDialog()},f=C=>{i.value.updateEngine(C),n.value=null},g=()=>{n.value=null};return(C,S)=>(w(),M(_e,null,[u("div",null,[u("dialog",{ref_key:"dialog",ref:x},[u("div",wF,m(c(d).engineManagement),1),u("div",TF,[u("div",PF,[u("input",{ref_key:"filter",ref:s,class:"filter",placeholder:c(d).filterByEngineName,onInput:a},null,40,IF)]),u("div",kF,[i.value.engineList.length===0?(w(),M("div",MF,m(c(d).noEngineRegistered),1)):ee("",!0),(w(!0),M(_e,null,Le(c(r),I=>(w(),M("div",{key:I.uri,class:qe(["row engine",{hidden:!I.visible}]),value:I.uri},[u("div",RF,m(I.name),1),u("button",{onClick:y=>A(I.uri)},m(c(d).config),9,NF),u("button",{onClick:y=>h(I.uri)},m(c(d).duplicate),9,LF),u("button",{onClick:y=>l(I.uri)},m(c(d).remove),9,HF)],10,OF))),128))])]),u("button",{class:"wide",onClick:S[0]||(S[0]=I=>E())},m(c(d).add),1),u("div",UF,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:S[1]||(S[1]=I=>B())},m(c(d).saveAndClose),1),u("button",{"data-hotkey":"Escape",onClick:S[2]||(S[2]=I=>p())},m(c(d).cancel),1)])],512)]),n.value?(w(),Re(q9,{key:0,"latest-engine-setting":n.value,onOk:f,onCancel:g},null,8,["latest-engine-setting"])):ee("",!0)],64))}});const zF=ze($F,[["__scopeId","data-v-1a55690d"]]),GF=""+new URL("../board/grid_square.svg",import.meta.url).href,WF=["src"],VF=["src"],KF=["src"],jF=["src"],qF=["src"],YF=["src"],JF=["src"],XF=Me({__name:"SimpleBoardView",props:{maxSize:{type:pt,required:!0},position:{type:Object,required:!0},header:{type:String,required:!1,default:null},footer:{type:String,required:!1,default:null},lastMove:{type:Object,required:!1,default:null}},setup(t){const e=t,x={pawn:"./piece/gothic/pawn.png",lance:"./piece/gothic/lance.png",knight:"./piece/gothic/knight.png",silver:"./piece/gothic/silver.png",gold:"./piece/gothic/gold.png",bishop:"./piece/gothic/bishop.png",rook:"./piece/gothic/rook.png",king:"./piece/gothic/king2.png",promPawn:"./piece/gothic/prom_pawn.png",promLance:"./piece/gothic/prom_lance.png",promKnight:"./piece/gothic/prom_knight.png",promSilver:"./piece/gothic/prom_silver.png",horse:"./piece/gothic/horse.png",dragon:"./piece/gothic/dragon.png"};function n(s){return{size:s,headerX:s*.5,headerY:s*.01,footerX:s*.01,footerY:s*.83,boardLeft:s*.15,boardTop:s*.12,boardSize:s*.7,boardBorderSize:s*.004,fileLeft:s*.168,fileTop:s*.078,rankLeft:s*.85,rankTop:s*.138,labelSize:s*.04,pieceSize:s*.7/9,fontSize:s*.038,handSize:s*.053,blackHandLeft:s*.9,blackHandTop:s*.12,whiteHandLeft:s*(.1-.053),whiteHandTop:s*.82}}const i=Fe(()=>{const s=n(Math.min(e.maxSize.width,e.maxSize.height));return{frameStyle:{width:`${s.size}px`,height:`${s.size}px`},headerStyle:{transform:"translate(-50%, 0%)",left:`${s.headerX}px`,top:`${s.headerY}px`,"font-size":`${s.fontSize}px`},footerStyle:{left:`${s.footerX}px`,top:`${s.footerY}px`,"font-size":`${s.fontSize}px`},boardStyle:{left:`${s.boardLeft-s.boardBorderSize}px`,top:`${s.boardTop-s.boardBorderSize}px`},boardImageStyle:{width:`${s.boardSize+s.boardBorderSize*2}px`,height:`${s.boardSize+s.boardBorderSize*2}px`},files:[1,2,3,4,5,6,7,8,9].map(o=>({style:{left:`${s.fileLeft+s.pieceSize*(9-o)}px`,top:`${s.fileTop}px`},image:`./character/arabic_numerals/${o}.png`})),fileImageStyle:{width:`${s.labelSize}px`,height:`${s.labelSize}px`},ranks:[1,2,3,4,5,6,7,8,9].map(o=>({style:{left:`${s.rankLeft}px`,top:`${s.rankTop+s.pieceSize*(o-1)}px`},image:`./character/numerals/${o}.png`})),rankImageStyle:{width:`${s.labelSize}px`,height:`${s.labelSize}px`},lastMoveStyle:function(){if(!e.lastMove)return null;const o=e.lastMove.to;return{"background-color":"gold",left:`${s.boardLeft+s.boardSize*o.x/9}px`,top:`${s.boardTop+s.boardSize*o.y/9}px`,width:`${s.pieceSize}px`,height:`${s.pieceSize}px`}}(),boardPieces:e.position.board.listNonEmptySquares().map(o=>{const r=e.position.board.at(o);return{id:`${o.x},${o.y}`,style:{left:`${s.boardLeft+s.boardSize*o.x/9}px`,top:`${s.boardTop+s.boardSize*o.y/9}px`},imageStyle:{width:`${s.pieceSize}px`,height:`${s.pieceSize}px`,transform:r.color==="white"?"rotate(180deg)":void 0},image:x[r.type]}}),blackHandImageStyle:{width:`${s.handSize}px`,height:"auto"},blackHandSymbol:{style:{left:`${s.blackHandLeft}px`,top:`${s.blackHandTop}px`},image:"./character/turns/black.png"},blackHandPieces:function(){const o=[];for(const{type:r,count:a}of e.position.blackHand.counts)a!==0&&(o.push({id:r,style:{left:`${s.blackHandLeft}px`,top:`${s.blackHandTop+s.handSize*(o.length+1)}px`},image:`./piece/gothic/${r}.png`}),a!==1&&o.push({id:`${r}-number`,style:{left:`${s.blackHandLeft}px`,top:`${s.blackHandTop+s.handSize*(o.length+1)}px`},image:`./character/numerals/${a}.png`}));return o.length===0?[{id:"empty",style:{left:`${s.blackHandLeft}px`,top:`${s.blackHandTop+s.handSize}px`},image:"./character/hand/nashi.png"}]:o}(),whiteHandImageStyle:{width:`${s.handSize}px`,height:"auto",transform:"rotate(180deg)"},whiteHandSymbol:{style:{left:`${s.whiteHandLeft}px`,top:`${s.whiteHandTop}px`,transform:"translate(0%, -100%)"},image:"./character/turns/white.png"},whiteHandPieces:function(){const o=[];for(const{type:r,count:a}of e.position.whiteHand.counts)a!==0&&(o.push({id:r,style:{left:`${s.whiteHandLeft}px`,top:`${s.whiteHandTop-s.handSize*(o.length+1)}px`,transform:"translate(0%, -100%)"},image:`./piece/gothic/${r}.png`}),a!==1&&o.push({id:`${r}-number`,style:{left:`${s.whiteHandLeft}px`,top:`${s.whiteHandTop-s.handSize*(o.length+1)}px`,transform:"translate(0%, -100%)"},image:`./character/numerals/${a}.png`}));return o.length===0?[{id:"empty",style:{left:`${s.whiteHandLeft}px`,top:`${s.whiteHandTop-s.handSize}px`,transform:"translate(0%, -100%)"},image:"./character/hand/nashi.png"}]:o}()}});return(s,o)=>(w(),M("div",null,[u("div",{class:"frame",style:he(c(i).frameStyle)},[t.header?(w(),M("div",{key:0,class:"header",style:he(c(i).headerStyle)},m(t.header),5)):ee("",!0),t.footer?(w(),M("div",{key:1,class:"footer",style:he(c(i).footerStyle)},m(t.footer),5)):ee("",!0),c(i).lastMoveStyle?(w(),M("div",{key:2,style:he(c(i).lastMoveStyle)},null,4)):ee("",!0),u("div",{class:"board-grid",style:he(c(i).boardStyle)},[u("img",{src:GF,style:he(c(i).boardImageStyle)},null,4)],4),(w(!0),M(_e,null,Le(c(i).files,r=>(w(),M("div",{key:r.image,style:he(r.style)},[u("img",{src:r.image,style:he(c(i).fileImageStyle)},null,12,WF)],4))),128)),(w(!0),M(_e,null,Le(c(i).ranks,r=>(w(),M("div",{key:r.image,style:he(r.style)},[u("img",{src:r.image,style:he(c(i).rankImageStyle)},null,12,VF)],4))),128)),(w(!0),M(_e,null,Le(c(i).boardPieces,r=>(w(),M("div",{key:r.id,style:he(r.style)},[u("img",{src:r.image,style:he(r.imageStyle)},null,12,KF)],4))),128)),u("div",{style:he(c(i).blackHandSymbol.style)},[u("img",{src:c(i).blackHandSymbol.image,style:he(c(i).blackHandImageStyle)},null,12,jF)],4),(w(!0),M(_e,null,Le(c(i).blackHandPieces,r=>(w(),M("div",{key:r.id,style:he(r.style)},[u("img",{src:r.image,style:he(c(i).blackHandImageStyle)},null,12,qF)],4))),128)),u("div",{style:he(c(i).whiteHandSymbol.style)},[u("img",{src:c(i).whiteHandSymbol.image,style:he(c(i).whiteHandImageStyle)},null,12,YF)],4),(w(!0),M(_e,null,Le(c(i).whiteHandPieces,r=>(w(),M("div",{key:r.id,style:he(r.style)},[u("img",{src:r.image,style:he(c(i).whiteHandImageStyle)},null,12,JF)],4))),128))],4)]))}});const ZF=ze(XF,[["__scopeId","data-v-ca9c5577"]]),ba=t=>(Ys("data-v-3d382caa"),t=t(),Js(),t),QF={class:"form-item center"},eD=["value"],tD=["value"],xD=["value"],nD=ba(()=>u("span",{class:"form-item-unit"},"px",-1)),iD=["placeholder"],sD={class:"form-item center"},oD=ba(()=>u("span",null,"PNG",-1)),rD=ba(()=>u("span",null,"JPEG",-1)),aD=Me({__name:"ExportPositionImageDialog",setup(t){const i=1.7777777777777777,s=Ge(),o=Pe(),r=Fe(()=>q8(s.record.metadata)||d.sente),a=Fe(()=>Y8(s.record.metadata)||d.gote),E=s.record,l=E.current.move instanceof tt?E.current.move:null,A=U(),h=U(),B=U(),p=U(),f=F0(new pt(window.innerWidth,window.innerHeight)),g=U(window.devicePixelRatio),C=l?`${E.current.ply}手目 ${Rx(E.position,l)}まで`:E.current.nextColor===L.BLACK?"先手番":"後手番",S=new Un,I=()=>{S.after(()=>{f.width=window.innerWidth,f.height=window.innerHeight},100),g.value=window.devicePixelRatio};Xe(()=>{Dt(A.value),Gt(A.value),window.addEventListener("resize",I),B.value.value=o.positionImageSize,p.value.value=o.positionImageHeader}),vt(()=>{Wt(A.value),window.removeEventListener("resize",I)});const y=Fe(()=>{const N=o.positionImageSize/g.value,K=N*i;return new pt(Math.min(K,f.width-80),Math.min(N,f.height-150))}),v=N=>{const K=N.target;o.updateAppSetting({positionImageSize:parseInt(K.value)||400})},D=N=>{const K=N.target;o.updateAppSetting({positionImageHeader:K.value})},T=N=>{const K=N.target;o.updateAppSetting({positionImageStyle:K.value})},b=()=>{const K=h.value.getBoundingClientRect();return new Rh(K.x,K.y,K.width,K.height)},P=()=>{Ae.exportCaptureAsPNG(b()).catch(N=>{s.pushError(N)})},O=()=>{Ae.exportCaptureAsJPEG(b()).catch(N=>{s.pushError(N)})},V=()=>{s.closeModalDialog()};return(N,K)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:A},[u("div",{ref_key:"board",ref:h,class:qe(["board",c(o).positionImageStyle])},[c(o).positionImageStyle===c(_n).BOOK?(w(),Re(ZF,{key:0,"max-size":c(y),position:c(E).position,header:c(o).positionImageHeader||c(C),footer:c(E).current.comment,"last-move":c(l)},null,8,["max-size","position","header","footer","last-move"])):(w(),Re(ta,{key:1,"board-image-type":c(o).boardImage,"piece-stand-image-type":c(o).pieceStandImage,"board-label-type":c(o).boardLabelType,"piece-image-base-url":c(ea)(c(o)),"custom-board-image-url":c(o).boardImageFileURL,"custom-piece-stand-image-url":c(o).pieceStandImageFileURL,"max-size":c(y),position:c(E).position,"last-move":c(l),flip:c(o).boardFlipping,"black-player-name":c(r),"white-player-name":c(a)},null,8,["board-image-type","piece-stand-image-type","board-label-type","piece-image-base-url","custom-board-image-url","custom-piece-stand-image-url","max-size","position","last-move","flip","black-player-name","white-player-name"]))],2),u("div",QF,[u("select",{value:c(o).positionImageStyle,onChange:T},[u("option",{value:c(_n).BOOK},m(c(d).bookStyle),9,tD),u("option",{value:c(_n).GAME},m(c(d).gameStyle),9,xD)],40,eD),u("input",{ref_key:"imageSize",ref:B,class:"size",type:"number",min:"400",max:"2000",onInput:v},null,544),nD,u("input",{ref_key:"headerText",ref:p,class:qe([{hidden:c(o).positionImageStyle===c(_n).GAME},"header"]),placeholder:c(d).typeCustomTitleHere,onInput:D},null,42,iD)]),u("div",sD,[u("button",{autofocus:"","data-hotkey":"Enter",onClick:P},[R(oe,{icon:c(ie).SAVE},null,8,["icon"]),oD]),u("button",{autofocus:"","data-hotkey":"Enter",onClick:O},[R(oe,{icon:c(ie).SAVE},null,8,["icon"]),rD]),u("button",{autofocus:"","data-hotkey":"Escape",onClick:V},[R(oe,{icon:c(ie).CLOSE},null,8,["icon"]),u("span",null,m(c(d).close),1)])])],512)]))}});const ED=ze(aD,[["__scopeId","data-v-3d382caa"]]),lD={class:"container"},cD=["src"],AD=Me({__name:"ImageSelector",props:{defaultUrl:{type:String,default:""}},emits:["select"],setup(t,{emit:e}){const x=t,n=Ge(),i=U(x.defaultUrl),s=async()=>{n.retainBussyState();try{const o=await Ae.showSelectImageDialog(i.value);o&&(i.value=o,e("select",o))}catch(o){n.pushError(o)}finally{n.releaseBussyState()}};return(o,r)=>(w(),M("div",null,[u("div",lD,[u("button",{class:"thin select",onClick:s},m(c(d).select),1),i.value?(w(),M("img",{key:0,ref:"preview",class:"preview",src:i.value},null,8,cD)):ee("",!0)])]))}});const Vi=ze(AD,[["__scopeId","data-v-b16a3cda"]]),Nt=t=>(Ys("data-v-9bc40901"),t=t(),Js(),t),uD={class:"title"},hD={class:"form-group scroll settings"},BD={class:"section"},dD={class:"section-title"},fD={class:"form-item"},pD={class:"form-item-label-wide"},gD=Nt(()=>u("div",{class:"form-group warning"},[u("div",{class:"note"}," 翻訳の改善にご協力ください。 We'd like your help to translate. "),u("div",{class:"note"}," 言語の変更には再起動が必要です。 You should restart this app to change the language. ")],-1)),mD={class:"form-item"},CD={class:"form-item-label-wide"},FD={class:"form-item"},DD={class:"form-item-label-wide"},_D=Nt(()=>u("div",{class:"form-item-label-wide"},null,-1)),vD={class:"form-item"},bD={class:"form-item-label-wide"},yD=Nt(()=>u("div",{class:"form-item-label-wide"},null,-1)),SD={class:"form-item"},wD={class:"form-item-label-wide"},TD=Nt(()=>u("div",{class:"form-item-label-wide"},null,-1)),PD={class:"form-item"},ID={class:"form-item-label-wide"},kD=Nt(()=>u("div",{class:"form-item-label-wide"},null,-1)),MD={class:"form-item"},OD={class:"form-item-label-wide"},RD={class:"form-item-label-wide"},ND={class:"form-item-label-wide"},LD={class:"form-item"},HD={class:"form-item-label-wide"},UD=Nt(()=>u("hr",null,null,-1)),$D={class:"section"},zD={class:"section-title"},GD={class:"form-item"},WD={class:"form-item-label-wide"},VD=["value"],KD=Nt(()=>u("div",{class:"form-item-unit"},"%",-1)),jD={class:"form-item"},qD={class:"form-item-label-wide"},YD=["value"],JD=Nt(()=>u("div",{class:"form-item-unit"},"%",-1)),XD={class:"form-item"},ZD={class:"form-item-label-wide"},QD=["value"],e_={class:"form-item-unit"},t_={class:"form-item"},x_={class:"form-item-label-wide"},n_=Nt(()=>u("hr",null,null,-1)),i_={class:"section"},s_={class:"section-title"},o_={class:"form-item"},r_={class:"form-item-label-wide"},a_={class:"form-item"},E_={class:"form-item-label-wide"},l_={class:"form-item"},c_={class:"form-item-label-wide"},A_=["value"],u_=Nt(()=>u("hr",null,null,-1)),h_={class:"section"},B_={class:"section-title"},d_={class:"form-item"},f_={class:"form-item-label-wide"},p_={class:"form-item-unit"},g_={class:"form-item"},m_={class:"form-item-label-wide"},C_=["value"],F_={class:"form-item-unit"},D_=Nt(()=>u("hr",null,null,-1)),__={class:"section"},v_={class:"section-title"},b_={class:"form-item"},y_={class:"form-item-label-wide"},S_={class:"form-item"},w_={class:"form-item-label-wide"},T_=["value"],P_={class:"form-item-unit"},I_={class:"form-item"},k_={class:"form-item-label-wide"},M_=["value"],O_=Nt(()=>u("div",{class:"form-item-unit"},"%",-1)),R_={class:"form-item"},N_={class:"form-item-label-wide"},L_=["value"],H_=Nt(()=>u("div",{class:"form-item-unit"},"%",-1)),U_={class:"form-item"},$_={class:"form-item-label-wide"},z_=["value"],G_=Nt(()=>u("div",{class:"form-item-unit"},"%",-1)),W_={class:"form-item"},V_={class:"form-item-label-wide"},K_=["value"],j_=Nt(()=>u("div",{class:"form-item-unit"},"%",-1)),q_=Nt(()=>u("hr",null,null,-1)),Y_={class:"section"},J_={class:"section-title"},X_={class:"form-group warning"},Z_={key:0,class:"note"},Q_={key:1,class:"note"},ev={key:2,class:"note"},tv={key:3,class:"note"},xv={class:"form-item"},nv={class:"form-item-label-wide"},iv={class:"form-item"},sv={class:"form-item-label-wide"},ov={class:"form-item"},rv={class:"form-item-label-wide"},av={class:"form-item"},Ev={class:"form-item-label-wide"},lv={class:"main-buttons"},cv=Me({__name:"AppSettingDialog",setup(t){const e={"\r\n":"crlf","\n":"lf","\r":"cr"},x={crlf:`\r -`,lf:` -`,cr:"\r"},n=Ge(),i=Pe(),s=U(),o=U(i.language),r=U(i.thema),a=U(i.backgroundImageType),E=U(),l=U(i.pieceImage),A=U(i.boardImage),h=U(),B=U(i.pieceStandImage),p=U(),f=U(i.boardLabelType!=Rn.NONE),g=U(i.leftSideControlType!=Nn.NONE),C=U(i.rightSideControlType!=Ln.NONE),S=U(i.tabPaneType),I=U(),y=U(),v=U(),D=U(i.clockSoundTarget),T=U(i.textDecodingRule),b=U(e[i.returnCode]),P=U(),O=U(i.translateEngineOptionName),V=U(),N=U(i.evaluationViewFrom),K=U(),W=U(),X=U(),xe=U(),Z=U(),ne=U(i.enableAppLog),re=U(i.enableUSILog),pe=U(i.enableCSALog),Te=U(i.logLevel),De=U(i.backgroundImageFileURL),et=U(i.croppedPieceImageBaseURL),Ke=U(i.pieceImageFileURL),ht=U(i.boardImageFileURL),Ve=U(i.pieceStandImageFileURL);Xe(()=>{Dt(s.value),Gt(s.value)}),vt(()=>{Wt(s.value)});const gt=async()=>{n.retainBussyState();try{const Ye={language:o.value,thema:r.value,backgroundImageType:a.value,pieceImage:l.value,boardImage:A.value,pieceImageFileURL:Ke.value,croppedPieceImageBaseURL:et.value,pieceStandImage:B.value,boardLabelType:f.value?Rn.STANDARD:Rn.NONE,leftSideControlType:g.value?Nn.STANDARD:Nn.NONE,rightSideControlType:C.value?Ln.STANDARD:Ln.NONE,tabPaneType:S.value,pieceVolume:Bt(I.value),clockVolume:Bt(y.value),clockPitch:Bt(v.value),clockSoundTarget:D.value,textDecodingRule:T.value,returnCode:x[b.value],autoSaveDirectory:P.value.value,translateEngineOptionName:O.value,engineTimeoutSeconds:Bt(V.value),evaluationViewFrom:N.value,coefficientInSigmoid:Bt(K.value),badMoveLevelThreshold1:Bt(W.value),badMoveLevelThreshold2:Bt(X.value),badMoveLevelThreshold3:Bt(xe.value),badMoveLevelThreshold4:Bt(Z.value),enableAppLog:ne.value,enableUSILog:re.value,enableCSALog:pe.value,logLevel:Te.value};Ye.backgroundImageType!==d0.NONE&&(Ye.backgroundImageFileURL=De.value),Ye.pieceImage===J0.CUSTOM_IMAGE&&Ke.value&&(await Ae.cropPieceImage(Ke.value),Ye.pieceImageFileURL=Ke.value,Ye.croppedPieceImageBaseURL=await Ae.getPieceImageBaseURL(Ke.value)),Ye.boardImage===xt.CUSTOM_IMAGE&&(Ye.boardImageFileURL=ht.value),Ye.pieceStandImage===qt.CUSTOM_IMAGE&&(Ye.pieceStandImageFileURL=Ve.value),await Pe().updateAppSetting(Ye),n.closeAppSettingDialog()}catch(Ye){n.pushError(Ye)}finally{n.releaseBussyState()}},st=async()=>{n.retainBussyState();try{const Ye=await Ae.showSelectDirectoryDialog(P.value.value);Ye&&(P.value.value=Ye)}catch(Ye){n.pushError(Ye)}finally{n.releaseBussyState()}},St=()=>{n.closeAppSettingDialog()};return(Ye,Be)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:s},[u("div",uD,m(c(d).appSettings),1),u("div",hD,[u("div",BD,[u("div",dD,m(c(d).view),1),u("div",fD,[u("div",pD,m(c(d).language),1),R(Kt,{class:"selector",value:o.value,items:[{label:"日本語",value:c(T0).JA},{label:"English",value:c(T0).EN},{label:"繁體中文",value:c(T0).ZH_TW}],onChange:Be[0]||(Be[0]=F=>{o.value=F})},null,8,["value","items"])]),gD,u("div",mD,[u("div",CD,m(c(d).theme),1),R(Kt,{class:"selector",value:r.value,items:[{label:c(d).green,value:c(yx).STANDARD},{label:c(d).cherryBlossom,value:c(yx).CHERRY_BLOSSOM},{label:c(d).autumn,value:c(yx).AUTUMN},{label:c(d).snow,value:c(yx).SNOW},{label:c(d).dark,value:c(yx).DARK}],onChange:Be[1]||(Be[1]=F=>{r.value=F})},null,8,["value","items"])]),u("div",FD,[u("div",DD,m(c(d).backgroundImage),1),R(Kt,{class:"selector",value:a.value,items:[{label:c(d).none,value:c(d0).NONE},{label:c(d).bgCover,value:c(d0).COVER},{label:c(d).bgContain,value:c(d0).CONTAIN},{label:c(d).bgTile,value:c(d0).TILE}],onChange:Be[2]||(Be[2]=F=>{a.value=F})},null,8,["value","items"])]),u("div",{ref_key:"backgroundImageSelector",ref:E,class:qe(["form-item",{hidden:a.value===c(d0).NONE}])},[_D,R(Vi,{class:"image-selector","default-url":c(i).backgroundImageFileURL,onSelect:Be[3]||(Be[3]=F=>De.value=F)},null,8,["default-url"])],2),u("div",vD,[u("div",bD,m(c(d).piece),1),R(Kt,{class:"selector",value:l.value,items:[{label:c(d).singleKanjiPiece,value:c(J0).HITOMOJI},{label:c(d).singleKanjiGothicPiece,value:c(J0).HITOMOJI_GOTHIC},{label:c(d).singleKanjiDarkPiece,value:c(J0).HITOMOJI_DARK},{label:c(d).singleKanjiGothicDarkPiece,value:c(J0).HITOMOJI_GOTHIC_DARK},{label:c(d).customImage,value:c(J0).CUSTOM_IMAGE}],onChange:Be[4]||(Be[4]=F=>{l.value=F})},null,8,["value","items"]),u("div",{ref:"pieceImageSelector",class:qe(["form-item",{hidden:l.value!==c(J0).CUSTOM_IMAGE}])},[yD,R(Vi,{class:"image-selector","default-url":c(i).pieceImageFileURL,onSelect:Be[5]||(Be[5]=F=>Ke.value=F)},null,8,["default-url"])],2)]),u("div",SD,[u("div",wD,m(c(d).board),1),R(Kt,{class:"selector",value:A.value,items:[{label:c(d).lightWoodyTexture,value:c(xt).LIGHT},{label:c(d).warmWoodTexture,value:c(xt).WARM},{label:c(d).regin,value:c(xt).RESIN},{label:c(d).regin+"2",value:c(xt).RESIN2},{label:c(d).regin+"3",value:c(xt).RESIN3},{label:c(d).dark,value:c(xt).DARK},{label:c(d).green,value:c(xt).GREEN},{label:c(d).cherryBlossom,value:c(xt).CHERRY_BLOSSOM},{label:c(d).customImage,value:c(xt).CUSTOM_IMAGE}],onChange:Be[6]||(Be[6]=F=>{A.value=F})},null,8,["value","items"])]),u("div",{ref_key:"boardImageSelector",ref:h,class:qe(["form-item",{hidden:A.value!==c(xt).CUSTOM_IMAGE}])},[TD,R(Vi,{class:"image-selector","default-url":c(i).boardImageFileURL,onSelect:Be[7]||(Be[7]=F=>ht.value=F)},null,8,["default-url"])],2),u("div",PD,[u("div",ID,m(c(d).pieceStand),1),R(Kt,{class:"selector",value:B.value,items:[{label:c(d).standard,value:c(qt).STANDARD},{label:c(d).dark,value:c(qt).DARK},{label:c(d).green,value:c(qt).GREEN},{label:c(d).cherryBlossom,value:c(qt).CHERRY_BLOSSOM},{label:c(d).customImage,value:c(qt).CUSTOM_IMAGE}],onChange:Be[8]||(Be[8]=F=>{B.value=F})},null,8,["value","items"])]),u("div",{ref_key:"pieceStandImageSelector",ref:p,class:qe(["form-item",{hidden:B.value!==c(qt).CUSTOM_IMAGE}])},[kD,R(Vi,{class:"image-selector","default-url":c(i).pieceStandImageFileURL,onSelect:Be[9]||(Be[9]=F=>Ve.value=F)},null,8,["default-url"])],2),u("div",MD,[u("div",OD,m(c(d).displayFileAndRank),1),R(rt,{value:f.value,onChange:Be[10]||(Be[10]=F=>f.value=F)},null,8,["value"])]),u("div",{class:qe([{hidden:!c(S0)()},"form-item"])},[u("div",RD,m(c(d).displayLeftControls),1),R(rt,{value:g.value,onChange:Be[11]||(Be[11]=F=>g.value=F)},null,8,["value"])],2),u("div",{class:qe([{hidden:!c(S0)()},"form-item"])},[u("div",ND,m(c(d).displayRightControls),1),R(rt,{value:C.value,onChange:Be[12]||(Be[12]=F=>C.value=F)},null,8,["value"])],2),u("div",LD,[u("div",HD,m(c(d).tabViewStyle),1),R(Kt,{class:"selector",value:S.value,items:[{label:c(d).oneColumn,value:c(ei).SINGLE},{label:c(d).twoColumns,value:c(ei).DOUBLE}],onChange:Be[13]||(Be[13]=F=>{S.value=F})},null,8,["value","items"])])]),UD,u("div",$D,[u("div",zD,m(c(d).sounds),1),u("div",GD,[u("div",WD,m(c(d).pieceLoudness),1),u("input",{ref_key:"pieceVolume",ref:I,value:c(i).pieceVolume,type:"number",max:"100",min:"0"},null,8,VD),KD]),u("div",jD,[u("div",qD,m(c(d).clockLoudness),1),u("input",{ref_key:"clockVolume",ref:y,value:c(i).clockVolume,type:"number",max:"100",min:"0"},null,8,YD),JD]),u("div",XD,[u("div",ZD,m(c(d).clockPitch),1),u("input",{ref_key:"clockPitch",ref:v,value:c(i).clockPitch,type:"number",max:"880",min:"220"},null,8,QD),u("div",e_,"Hz ("+m(c(d).between(220,880))+")",1)]),u("div",t_,[u("div",x_,m(c(d).clockSoundTarget),1),R(Kt,{class:"selector",value:D.value,items:[{label:c(d).anyTurn,value:c(xi).ALL},{label:c(d).onlyHumanTurn,value:c(xi).ONLY_USER}],onChange:Be[14]||(Be[14]=F=>{D.value=F})},null,8,["value","items"])])]),n_,u("div",i_,[u("div",s_,m(c(d).file),1),u("div",o_,[u("div",r_,m(c(d).textEncoding),1),R(Kt,{class:"selector",value:T.value,items:[{label:c(d).strict,value:c(bs).STRICT},{label:c(d).autoDetect,value:c(bs).AUTO_DETECT}],onChange:Be[15]||(Be[15]=F=>{T.value=F})},null,8,["value","items"])]),u("div",a_,[u("div",E_,m(c(d).newlineCharacter),1),R(Kt,{class:"selector",value:b.value,items:[{label:"CRLF (Windows)",value:"crlf"},{label:"LF (UNIX/Mac)",value:"lf"},{label:`CR (${c(d).old90sMac})`,value:"cr"}],onChange:Be[16]||(Be[16]=F=>{b.value=F})},null,8,["value","items"])]),u("div",l_,[u("div",c_,m(c(d).autoSavingDirectory),1),u("input",{ref_key:"autoSaveDirectory",ref:P,class:"file-path",value:c(i).autoSaveDirectory,type:"text"},null,8,A_),u("button",{class:"thin",onClick:st},m(c(d).select),1)])]),u_,u("div",h_,[u("div",B_,m(c(d).usiProtocol),1),u("div",d_,[u("div",f_,m(c(d).translateOptionName),1),R(rt,{value:O.value,onChange:Be[17]||(Be[17]=F=>O.value=F)},null,8,["value"]),u("div",p_,"("+m(c(d).functionalOnJapaneseOnly)+")",1)]),u("div",g_,[u("div",m_,m(c(d).maxStartupTime),1),u("input",{ref_key:"engineTimeoutSeconds",ref:V,value:c(i).engineTimeoutSeconds,type:"number",max:"300",min:"1"},null,8,C_),u("div",F_,m(c(d).secondsSuffix)+" ("+m(c(d).between(1,300))+") ",1)])]),D_,u("div",__,[u("div",v_,m(c(d).evaluationAndEstimatedWinRate),1),u("div",b_,[u("div",y_,m(c(d).signOfEvaluation),1),R(Kt,{class:"selector",value:N.value,items:[{label:c(d).swapEachTurnChange,value:c(ti).EACH},{label:c(d).alwaysSenteIsPositive,value:c(ti).BLACK}],onChange:Be[18]||(Be[18]=F=>{N.value=F})},null,8,["value","items"])]),u("div",S_,[u("div",w_,m(c(d).winRateCoefficient),1),u("input",{ref_key:"coefficientInSigmoid",ref:K,value:c(i).coefficientInSigmoid,type:"number",max:"10000",min:"1"},null,8,T_),u("div",P_," ("+m(c(d).recommended)+": "+m(c(d).between(600,1500))+") ",1)]),u("div",I_,[u("div",k_,m(c(d).inaccuracyThreshold),1),u("input",{ref_key:"badMoveLevelThreshold1",ref:W,value:c(i).badMoveLevelThreshold1,type:"number",max:"100",min:"0"},null,8,M_),O_]),u("div",R_,[u("div",N_,m(c(d).dubiousThreshold),1),u("input",{ref_key:"badMoveLevelThreshold2",ref:X,value:c(i).badMoveLevelThreshold2,type:"number",max:"100",min:"0"},null,8,L_),H_]),u("div",U_,[u("div",$_,m(c(d).mistakeThreshold),1),u("input",{ref_key:"badMoveLevelThreshold3",ref:xe,value:c(i).badMoveLevelThreshold3,type:"number",max:"100",min:"0"},null,8,z_),G_]),u("div",W_,[u("div",V_,m(c(d).blunderThreshold),1),u("input",{ref_key:"badMoveLevelThreshold4",ref:Z,value:c(i).badMoveLevelThreshold4,type:"number",max:"100",min:"0"},null,8,K_),j_])]),q_,u("div",Y_,[u("div",J_,m(c(d).forDevelopers),1),u("div",X_,[c(S0)()?ee("",!0):(w(),M("div",Z_,m(c(d).inBrowserLogsOutputToConsoleAndIgnoreThisSetting),1)),c(S0)()?(w(),M("div",Q_,m(c(d).shouldRestartToApplyLogSettings),1)):ee("",!0),c(S0)()?(w(),M("div",ev,m(c(d).canOpenLogDirectoryFromMenu),1)):ee("",!0),c(S0)()?(w(),M("div",tv,m(c(d).hasNoOldLogCleanUpFeature),1)):ee("",!0)]),u("div",xv,[u("div",nv,m(c(d).enableAppLog),1),R(rt,{value:ne.value,onChange:Be[19]||(Be[19]=F=>ne.value=F)},null,8,["value"])]),u("div",iv,[u("div",sv,m(c(d).enableUSILog),1),R(rt,{value:re.value,onChange:Be[20]||(Be[20]=F=>re.value=F)},null,8,["value"])]),u("div",ov,[u("div",rv,m(c(d).enableCSALog),1),R(rt,{value:pe.value,onChange:Be[21]||(Be[21]=F=>pe.value=F)},null,8,["value"])]),u("div",av,[u("div",Ev,m(c(d).logLevel),1),R(Kt,{class:"selector",value:Te.value,items:[{label:"DEBUG",value:c(lt).DEBUG},{label:"INFO",value:c(lt).INFO},{label:"WARN",value:c(lt).WARN},{label:"ERROR",value:c(lt).ERROR}],onChange:Be[22]||(Be[22]=F=>{Te.value=F})},null,8,["value","items"])])])]),u("div",lv,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:Be[23]||(Be[23]=F=>gt())},m(c(d).saveAndClose),1),u("button",{"data-hotkey":"Escape",onClick:Be[24]||(Be[24]=F=>St())},m(c(d).cancel),1)])],512)]))}});const Av=ze(cv,[["__scopeId","data-v-9bc40901"]]),uv={ref:"content"},hv={class:"form-group"},Bv={class:"message"},dv={class:"message"},fv={key:0,class:"message"},pv={key:1,class:"message"},gv={class:"main-buttons"},mv=Me({__name:"PasteDialog",setup(t){const e=Ge(),x=U(),n=U();e.retainBussyState(),Xe(async()=>{try{Dt(x.value),Gt(x.value),S0()&&(n.value.value=await navigator.clipboard.readText())}finally{e.releaseBussyState()}}),vt(()=>{Wt(x.value)});const i=()=>{const o=n.value.value;if(!o){e.pushError(new Error(d.emptyRecordInput));return}e.closeModalDialog(),e.pasteRecord(o)},s=()=>{e.closeModalDialog()};return(o,r)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x},[u("div",uv,[u("div",hv,[u("div",Bv,m(c(d).importingFollowingRecordOrPosition),1),u("div",dv,m(c(d).supportsKIFCSAUSI),1),c(S0)()?ee("",!0):(w(),M("div",fv,m(c(d).plesePasteRecordIntoTextArea),1)),c(S0)()?ee("",!0):(w(),M("div",pv,m(c(d).desktopVersionPastesAutomatically),1)),u("textarea",{ref_key:"textarea",ref:n},null,512)])],512),u("div",gv,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:i},m(c(d).import),1),u("button",{"data-hotkey":"Escape",onClick:s},m(c(d).cancel),1)])],512)]))}});const Cv=ze(mv,[["__scopeId","data-v-2908a87e"]]),Fv={class:"message-box"},Dv={class:"message"},_v=Me({__name:"BussyMessage",setup(t){const e=U();return Xe(()=>{Dt(e.value)}),(x,n)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:e,class:"bussy"},[u("div",Fv,[R(oe,{icon:c(ie).BUSSY},null,8,["icon"]),u("div",Dv,m(c(d).processingPleaseWait),1)])],512)]))}});const vv=ze(_v,[["__scopeId","data-v-76d58604"]]),bv={class:"message-box"},yv={class:"message"},Sv={class:"main-buttons"},wv=Me({__name:"ConfirmDialog",setup(t){const e=Ge(),x=U(),n=()=>{e.confirmationOk()},i=()=>{e.confirmationCancel()};return Xe(()=>{Dt(x.value,i),Gt(x.value)}),vt(()=>{Wt(x.value)}),(s,o)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x,class:"confirm"},[u("div",bv,[R(oe,{icon:c(ie).QUESTION},null,8,["icon"]),u("div",yv,m(c(e).confirmation),1)]),u("div",Sv,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:o[0]||(o[0]=r=>n())},"OK"),u("button",{"data-hotkey":"Escape",onClick:o[1]||(o[1]=r=>i())},m(c(d).cancel),1)])],512)]))}});const Tv=ze(wv,[["__scopeId","data-v-9f781aaf"]]),Pv={class:"message-box"},Iv={class:"message"},kv={key:0,class:"list"},Mv={class:"main-buttons"},Ov=Me({__name:"InfoMessage",setup(t){const e=Ge(),x=U();Xe(()=>{Dt(x.value),Gt(x.value)}),vt(()=>{Wt(x.value)});const n=()=>{e.dequeueMessage()};return(i,s)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x,class:"info"},[u("div",Pv,[R(oe,{icon:c(ie).INFO},null,8,["icon"]),u("div",Iv,m(c(e).message.text),1)]),(w(!0),M(_e,null,Le(c(e).message.attachments,(o,r)=>(w(),M("div",{key:r,class:"attachment"},[o.type==="list"?(w(),M("ul",kv,[(w(!0),M(_e,null,Le(o.items,(a,E)=>(w(),M("li",{key:E,class:"list-item"},[hn(m(a.text)+" ",1),u("ul",null,[(w(!0),M(_e,null,Le(a.children,(l,A)=>(w(),M("li",{key:A,class:"list-child-item"},m(l),1))),128))])]))),128))])):ee("",!0)]))),128)),u("div",Mv,[u("button",{autofocus:"","data-hotkey":"Escape",onClick:s[0]||(s[0]=o=>n())},m(c(d).close),1)])],512)]))}});const Rv=ze(Ov,[["__scopeId","data-v-08f05368"]]),Nv={class:"message-box"},Lv={class:"column"},Hv={class:"notice"},Uv={class:"index"},$v={key:0},zv={class:"message"},Gv={class:"main-buttons"},Wv=Me({__name:"ErrorMessage",setup(t){const e=Ge(),x=U();Xe(()=>{Dt(x.value),Gt(x.value)}),vt(()=>{Wt(x.value)});const n=()=>{e.clearErrors()};return(i,s)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x,class:"error"},[u("div",Nv,[R(oe,{icon:c(ie).ERROR},null,8,["icon"]),u("div",Lv,[u("div",Hv,m(c(d).errorsOccurred(c(e).errors.length)),1),(w(!0),M(_e,null,Le(c(e).errors,(o,r)=>(w(),M("div",{key:r,class:"item"},[u("p",Uv,[hn(m(r+1)+" ",1),o.count>=2?(w(),M("span",$v,"("+m(o.count)+" 回)",1)):ee("",!0)]),u("p",zv,m(o.message),1)]))),128))])]),u("div",Gv,[u("button",{autofocus:"","data-hotkey":"Escape",onClick:s[0]||(s[0]=o=>n())},m(c(d).close),1)])],512)]))}});const Vv=ze(Wv,[["__scopeId","data-v-34c3016d"]]),Kv={class:"title"},jv={class:"form-group"},qv={class:"form-group"},Yv={class:"form-item"},Jv={class:"form-item-unit"},Xv=["disabled"],Zv={class:"form-item-unit"},Qv={class:"form-item"},eb={class:"form-item-unit"},tb=["disabled"],xb={class:"form-item-unit"},nb={class:"form-group"},ib={class:"form-item"},sb={class:"form-item-unit"},ob={class:"form-item-unit"},rb={class:"form-group"},ab={class:"form-item"},Eb={class:"form-item-label-wide"},lb={class:"main-buttons"},cb=Me({__name:"AnalysisDialog",setup(t){const e=Ge(),x=U(),n=U(!1),i=U(),s=U(!1),o=U(),r=U(),a=U(n0.NONE),E=U(new k0),l=U("");e.retainBussyState(),Xe(async()=>{var f;Dt(x.value),Gt(x.value);try{const g=await Ae.loadAnalysisSetting();E.value=await Ae.loadUSIEngineSetting(),l.value=((f=g.usi)==null?void 0:f.uri)||"",n.value=g.startCriteria.enableNumber,i.value.value=g.startCriteria.number,s.value=g.endCriteria.enableNumber,o.value.value=g.endCriteria.number,r.value.value=g.perMoveCriteria.maxSeconds,a.value=g.commentBehavior}catch(g){e.pushError(g),e.destroyModalDialog()}finally{e.releaseBussyState()}}),vt(()=>{Wt(x.value)});const A=()=>{if(!l.value||!E.value.hasEngine(l.value)){e.pushError("エンジンを選択してください。");return}const g={usi:E.value.getEngine(l.value),startCriteria:{enableNumber:n.value,number:Bt(i.value)},endCriteria:{enableNumber:s.value,number:Bt(o.value)},perMoveCriteria:{maxSeconds:Bt(r.value)},commentBehavior:a.value};e.startAnalysis(g)},h=()=>{e.closeModalDialog()},B=async f=>{E.value=f},p=f=>{l.value=f};return(f,g)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x,class:"root"},[u("div",Kv,m(c(d).recordAnalysis),1),u("div",jv,[u("div",null,m(c(d).searchEngine),1),R(Hx,{"player-uri":l.value,"engine-settings":E.value,"display-thread-state":!0,"display-multi-pv-state":!0,onUpdateEngineSetting:B,onSelectPlayer:p},null,8,["player-uri","engine-settings"])]),u("div",qv,[u("div",null,m(c(d).startEndCriteria),1),u("div",Yv,[R(rt,{value:n.value,onChange:g[0]||(g[0]=C=>{n.value=C})},null,8,["value"]),u("div",Jv,m(c(d).fromPrefix)+m(c(d).plyPrefix),1),u("input",{ref_key:"startNumber",ref:i,class:"small",type:"number",min:"1",step:"1",disabled:!n.value},null,8,Xv),u("div",Zv,m(c(d).plySuffix)+m(c(d).fromSuffix),1)]),u("div",Qv,[R(rt,{value:s.value,onChange:g[1]||(g[1]=C=>{s.value=C})},null,8,["value"]),u("div",eb,m(c(d).toPrefix)+m(c(d).plyPrefix),1),u("input",{ref_key:"endNumber",ref:o,class:"small",type:"number",min:"1",step:"1",disabled:!s.value},null,8,tb),u("div",xb,m(c(d).plySuffix)+m(c(d).toSuffix),1)])]),u("div",nb,[u("div",null,m(c(d).endCriteria1Move),1),u("div",ib,[u("div",sb,m(c(d).toPrefix),1),u("input",{ref_key:"maxSecondsPerMove",ref:r,class:"small",type:"number",min:"0",step:"1"},null,512),u("div",ob,m(c(d).secondsSuffix)+m(c(d).toSuffix),1)])]),u("div",rb,[u("div",null,m(c(d).outputSettings),1),u("div",ab,[u("div",Eb,m(c(d).moveComments),1),R(Kt,{class:"selector",items:[{value:c(n0).NONE,label:c(d).noOutputs},{value:c(n0).INSERT,label:c(d).insertCommentToTop},{value:c(n0).APPEND,label:c(d).appendCommentToBottom},{value:c(n0).OVERWRITE,label:c(d).overwrite}],value:a.value,onChange:g[2]||(g[2]=C=>{a.value=C})},null,8,["items","value"])])]),u("div",lb,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:g[3]||(g[3]=C=>A())}," 解析実行 "),u("button",{"data-hotkey":"Escape",onClick:g[4]||(g[4]=C=>h())},"キャンセル")])],512)]))}});const Ab=ze(cb,[["__scopeId","data-v-93e774e5"]]),ub={class:"message-box"},hb={class:"message"},Bb={key:0},db={key:1},fb={key:2},pb={key:0,class:"main-buttons"},gb=Me({__name:"CSAGameReadyDialog",setup(t){const e=Ge(),x=U(),n=U(0);let i=0;Xe(()=>{Dt(x.value),Gt(x.value)}),vt(()=>{Wt(x.value),window.clearInterval(i)}),ix(()=>e.csaGameState,o=>{window.clearInterval(i),o===l0.LOGIN_RETRY_INTERVAL&&(n.value=W8,i=window.setInterval(()=>{n.value--},1e3))});const s=()=>{e.cancelCSAGame()};return(o,r)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x,class:"bussy"},[u("div",ub,[R(oe,{icon:c(ie).BUSSY},null,8,["icon"]),u("div",hb,[c(e).csaGameState===c(l0).READY?(w(),M("span",Bb,m(c(d).waitingForNewGame),1)):ee("",!0),c(e).csaGameState===c(l0).LOGIN_RETRY_INTERVAL?(w(),M("span",db,m(c(d).tryToReloginToCSAServerNSecondsLater(n.value)),1)):ee("",!0),c(e).csaGameState===c(l0).WAITING_LOGIN?(w(),M("span",fb,m(c(d).tryingToConnectAndLoginToCSAServer),1)):ee("",!0)])]),c(e).csaGameState===c(l0).READY||c(e).csaGameState===c(l0).LOGIN_RETRY_INTERVAL?(w(),M("div",pb,[u("button",{autofocus:"","data-hotkey":"Escape",onClick:r[0]||(r[0]=a=>s())},m(c(d).cancelGame),1)])):ee("",!0)],512)]))}});const mb=ze(gb,[["__scopeId","data-v-1fb6a0d5"]]),Cb={class:"title"},Fb={class:"form-group scroll"},Db={class:"main-buttons"},_b=Me({__name:"MateSearchDialog",setup(t){const e=Ge(),x=U(),n=U(new k0),i=U("");e.retainBussyState(),Xe(async()=>{var r;Dt(x.value),Gt(x.value);try{const a=await Ae.loadMateSearchSetting();n.value=await Ae.loadUSIEngineSetting(),i.value=((r=a.usi)==null?void 0:r.uri)||""}catch(a){e.pushError(a),e.destroyModalDialog()}finally{e.releaseBussyState()}}),vt(()=>{Wt(x.value)});const s=()=>{if(!i.value||!n.value.hasEngine(i.value)){e.pushError("エンジンを選択してください。");return}const a={usi:n.value.getEngine(i.value)};e.startMateSearch(a)},o=()=>{e.closeModalDialog()};return(r,a)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:x,class:"root"},[u("div",Cb,m(c(d).mateSearch),1),u("div",Fb,[R(Hx,{"player-uri":i.value,"engine-settings":n.value,"display-thread-state":!0,"display-multi-pv-state":!1,onUpdateEngineSetting:a[0]||(a[0]=E=>{n.value=E}),onSelectPlayer:a[1]||(a[1]=E=>{i.value=E})},null,8,["player-uri","engine-settings"])]),u("div",Db,[u("button",{"data-hotkey":"Enter",autofocus:"",onClick:a[2]||(a[2]=E=>s())},m(c(d).startMateSearch),1),u("button",{"data-hotkey":"Escape",onClick:a[3]||(a[3]=E=>o())},m(c(d).cancel),1)])],512)]))}});const vb=ze(_b,[["__scopeId","data-v-e8e6e178"]]),bb={class:"full column"},yb={class:"row control-row"},Sb={class:"row control-row"},wb={class:"row control-row"},Tb={class:"full column reverse"},Pb=["disabled"],Ib=["disabled"],kb={class:"informations"},Mb={class:"information"},Ob={class:"information"},Rb=Me({__name:"PVPreviewDialog",props:{position:{type:Object,required:!0},multiPv:{type:Number,required:!1,default:void 0},depth:{type:Number,required:!1,default:void 0},selectiveDepth:{type:Number,required:!1,default:void 0},score:{type:Number,required:!1,default:void 0},mate:{type:Number,required:!1,default:void 0},lowerBound:{type:Boolean,required:!1,default:!1},upperBound:{type:Boolean,required:!1,default:!1},pv:{type:Array,required:!0}},emits:["close"],setup(t,{emit:e}){const x=t,n=Ge(),i=Pe(),s=U(),o=F0(new pt(0,0)),r=F0(new yt),a=U(i.boardFlipping),E=()=>{o.width=window.innerWidth*.8,o.height=window.innerHeight*.8-80},l=()=>{r.clear(x.position);for(const b of x.pv)r.append(b,{ignoreValidation:!0});r.goto(1)};Xe(async()=>{E(),l(),window.addEventListener("resize",E),Dt(s.value),Gt(s.value)}),vt(()=>{window.removeEventListener("resize",E),Wt(s.value)}),ix([()=>x.position,()=>x.pv],()=>{l()});const A=()=>{e("close")},h=()=>{r.goto(0)},B=()=>{r.goto(Number.MAX_SAFE_INTEGER)},p=()=>{r.goBack()},f=()=>{r.goForward()},g=()=>{a.value=!a.value},C=(b,P,O)=>O===ti.EACH||P==L.BLACK?b:-b,S=Fe(()=>{const b=[];return x.depth!==void 0&&b.push(`深さ=${x.depth}`),x.selectiveDepth!==void 0&&b.push(`選択的深さ=${x.selectiveDepth}`),x.score!==void 0&&(b.push(`評価値=${C(x.score,x.position.color,i.evaluationViewFrom)}`),x.lowerBound&&b.push("(下界値)"),x.upperBound&&b.push("(上界値)")),x.mate!==void 0&&b.push(`詰み手数=${C(x.mate,x.position.color,i.evaluationViewFrom)}`),x.multiPv&&b.push(`順位=${x.multiPv}`),b.join(" / ")}),I=Fe(()=>r.current.move instanceof tt?r.current.move:null),y=Fe(()=>r.moves.slice(1).map(b=>({text:b.displayText,selected:b.ply===r.current.ply}))),v=Fe(()=>(n.appState===$.NORMAL||n.appState===$.RESEARCH)&&n.record.position.sfen===x.position.sfen),D=()=>{const b=n.appendMovesSilently(x.pv,{ignoreValidation:!0});n.enqueueMessage({text:d.insertedNMovesToRecord(b)})},T=()=>{n.appendSearchComment($t.RESEARCHER,{depth:x.depth,score:x.score,mate:x.mate,pv:x.pv},n0.APPEND),n.enqueueMessage({text:d.insertedComment})};return(b,P)=>(w(),M("div",null,[u("dialog",{ref_key:"dialog",ref:s},[R(ta,{class:"board","board-image-type":c(i).boardImage,"piece-stand-image-type":c(i).pieceStandImage,"piece-image-base-url":c(ea)(c(i)),"board-label-type":c(i).boardLabelType,"custom-board-image-url":c(i).boardImageFileURL,"custom-piece-stand-image-url":c(i).pieceStandImageFileURL,"max-size":o,position:r.position,"last-move":c(I),flip:a.value,"black-player-name":c(d).sente,"white-player-name":c(d).gote},{"right-control":B0(()=>[u("div",bb,[u("div",yb,[u("button",{class:"control-item","data-hotkey":"Control+t",onClick:g},[R(oe,{icon:c(ie).FLIP},null,8,["icon"])]),u("button",{class:"control-item",autofocus:"","data-hotkey":"Escape",onClick:A},[R(oe,{icon:c(ie).CLOSE},null,8,["icon"])])]),u("div",Sb,[u("button",{class:"control-item","data-hotkey":"ArrowLeft",onClick:h},[R(oe,{icon:c(ie).FIRST},null,8,["icon"])]),u("button",{class:"control-item","data-hotkey":"ArrowRight",onClick:B},[R(oe,{icon:c(ie).LAST},null,8,["icon"])])]),u("div",wb,[u("button",{class:"control-item","data-hotkey":"ArrowUp",onClick:p},[R(oe,{icon:c(ie).BACK},null,8,["icon"])]),u("button",{class:"control-item","data-hotkey":"ArrowDown",onClick:f},[R(oe,{icon:c(ie).NEXT},null,8,["icon"])])])])]),"left-control":B0(()=>[u("div",Tb,[u("button",{class:"control-item-wide",disabled:!c(v),onClick:D},[R(oe,{icon:c(ie).TREE},null,8,["icon"]),u("span",null,m(c(d).insertToRecord),1)],8,Pb),u("button",{class:"control-item-wide",disabled:!c(v),onClick:T},[R(oe,{icon:c(ie).NOTE},null,8,["icon"]),u("span",null,m(c(d).insertToComment),1)],8,Ib)])]),_:1},8,["board-image-type","piece-stand-image-type","piece-image-base-url","board-label-type","custom-board-image-url","custom-piece-stand-image-url","max-size","position","last-move","flip","black-player-name","white-player-name"]),u("div",kb,[u("div",Mb,m(c(S)),1),u("div",Ob,[(w(!0),M(_e,null,Le(c(y),(O,V)=>(w(),M("span",{key:V},[u("span",{class:qe(["move-element",{selected:O.selected}])}," "+m(O.text)+" ",3)]))),128))])])],512)]))}});const Nb=ze(Rb,[["__scopeId","data-v-20ead1fe"]]),Lb=Me({__name:"App",setup(t){const e=Pe(),x=Ge();Xe(()=>{const i=document.getElementsByTagName("body")[0];i.addEventListener("copy",s=>{x.copyRecordKIF(),s.preventDefault()}),i.addEventListener("paste",s=>{x.showPasteDialog(),s.preventDefault()}),i.addEventListener("dragover",s=>{s.preventDefault()}),i.addEventListener("drop",s=>{if(s.dataTransfer&&s.dataTransfer.files[0]){const o=s.dataTransfer.files[0].path;x.openRecord(o)}s.preventDefault()})});const n=Fe(()=>{if(e.backgroundImageType==d0.NONE||!e.backgroundImageFileURL)return{};let i="";switch(e.backgroundImageType){case d0.COVER:i="cover";break;case d0.CONTAIN:i="contain";break;case d0.TILE:i="auto";break}return{"background-image":`url("${e.backgroundImageFileURL}")`,"background-size":i}});return(i,s)=>(w(),M("div",{class:qe(["root full",c(e).thema]),style:he(c(n))},[R(Rm,{class:"full"}),c(x).appState===c($).GAME_DIALOG?(w(),Re(DC,{key:0})):ee("",!0),c(x).appState===c($).CSA_GAME_DIALOG?(w(),Re(fF,{key:1})):ee("",!0),c(x).appState===c($).RESEARCH_DIALOG?(w(),Re(SF,{key:2})):ee("",!0),c(x).appState===c($).ANALYSIS_DIALOG?(w(),Re(Ab,{key:3})):ee("",!0),c(x).appState===c($).MATE_SEARCH_DIALOG?(w(),Re(vb,{key:4})):ee("",!0),c(x).appState===c($).USI_ENGINE_SETTING_DIALOG?(w(),Re(zF,{key:5})):ee("",!0),c(x).appState===c($).EXPORT_POSITION_IMAGE_DIALOG?(w(),Re(ED,{key:6})):ee("",!0),c(x).isAppSettingDialogVisible?(w(),Re(Av,{key:7})):ee("",!0),c(x).appState===c($).PASTE_DIALOG?(w(),Re(Cv,{key:8})):ee("",!0),c(x).isBussy?(w(),Re(vv,{key:9})):ee("",!0),c(x).confirmation?(w(),Re(Tv,{key:10})):ee("",!0),c(x).csaGameState===c(l0).WAITING_LOGIN||c(x).csaGameState===c(l0).READY||c(x).csaGameState===c(l0).LOGIN_RETRY_INTERVAL?(w(),Re(mb,{key:11})):ee("",!0),c(x).pvPreview?(w(),Re(Nb,{key:12,position:c(x).pvPreview.position,"multi-pv":c(x).pvPreview.multiPV,depth:c(x).pvPreview.depth,"selective-depth":c(x).pvPreview.selectiveDepth,score:c(x).pvPreview.score,mate:c(x).pvPreview.mate,"lower-bound":c(x).pvPreview.lowerBound,"upper-bound":c(x).pvPreview.upperBound,pv:c(x).pvPreview.pv,onClose:s[0]||(s[0]=o=>c(x).closePVPreviewDialog())},null,8,["position","multi-pv","depth","selective-depth","score","mate","lower-bound","upper-bound","pv"])):ee("",!0),c(x).hasMessage?(w(),Re(Rv,{key:13})):ee("",!0),c(x).hasError?(w(),Re(Vv,{key:14})):ee("",!0)],6))}});const Hb=ze(Lb,[["__scopeId","data-v-b724763d"]]);var me=(t=>(t.NEW_RECORD="newRecord",t.OPEN_RECORD="openRecord",t.SAVE_RECORD="saveRecord",t.SAVE_RECORD_AS="saveRecordAs",t.EXPORT_POSITION_IMAGE="exportPositionImage",t.COPY_RECORD="copyRecord",t.COPY_RECORD_CSA="copyRecordCsa",t.COPY_RECORD_USI_BEFORE="copyRecordUsiBefore",t.COPY_RECORD_USI_ALL="copyRecordUsiAll",t.COPY_BOARD_SFEN="copyRecordSfen",t.PASTE_RECORD="pasteRecord",t.INSERT_INTERRUPT="insertInterrupt",t.INSERT_RESIGN="insertResign",t.INSERT_DRAW="insertDraw",t.INSERT_IMPASS="insertImpass",t.INSERT_REPETITION_DRAW="insertRepetitionDraw",t.INSERT_MATE="insertMate",t.INSERT_TIMEOUT="insertTimeout",t.INSERT_FOUL_WIN="insertFoulWin",t.INSERT_FOUL_LOSE="insertFoulLose",t.INSERT_ENTERING_OF_KING="insertEnteringOfKing",t.INSERT_WIN_BY_DEFAULT="insertWinByDefault",t.INSERT_LOSE_BY_DEFAULT="insertLossByDefault",t.REMOVE_CURRENT_MOVE="remvoeCurrentMove",t.START_POSITION_EDITING="startPositionEditing",t.END_POSITION_EDITING="endPositionEditing",t.CHANGE_TURN="changeTurn",t.INIT_POSITION_STANDARD="initPositionStandard",t.INIT_POSITION_HANDICAP_LANCE="initPositionHandicapLance",t.INIT_POSITION_HANDICAP_RIGHT_LANCE="initPositionHandicapRightLance",t.INIT_POSITION_HANDICAP_BISHOP="initPositionHandicapBishop",t.INIT_POSITION_HANDICAP_ROOK="initPositionHandicapRook",t.INIT_POSITION_HANDICAP_ROOK_LANCE="initPositionHandicapRookLance",t.INIT_POSITION_HANDICAP_2PIECES="initPositionHandicap2Pieces",t.INIT_POSITION_HANDICAP_4PIECES="initPositionHandicap4Pieces",t.INIT_POSITION_HANDICAP_6PIECES="initPositionHandicap6Pieces",t.INIT_POSITION_HANDICAP_8PIECES="initPositionHandicap8Pieces",t.INIT_POSITION_TSUME_SHOGI="initPositionTsumeShogi",t.INIT_POSITION_TSUME_SHOGI_2KINGS="initPositionTsumeShogi2Kings",t.START_RESEARCH="startResearch",t.STOP_RESEARCH="stopResearch",t.START_ANALYSIS="startAnalysis",t.STOP_ANALYSIS="stopAnalysis",t.START_MATE_SEARCH="startMateSearch",t.STOP_MATE_SEARCH="stopMateSearch",t.START_GAME="startGame",t.START_CSA_GAME="startCSAGame",t.STOP_GAME="stopGame",t.RESIGN="resign",t.WIN="win",t.LOGOUT="logout",t.FLIP_BOARD="flipBoard",t.APP_SETTING_DIALOG="appSetting",t.USI_ENGINE_SETTING_DIALOG="usiEngineSetting",t))(me||{});function Ub(){const t=Ge(),e=Pe();Se.onSendError(x=>{t.pushError(x)}),Se.onMenuEvent(x=>{if(!t.isBussy)switch(x){case me.NEW_RECORD:t.resetRecord();break;case me.OPEN_RECORD:t.openRecord();break;case me.SAVE_RECORD:t.saveRecord({overwrite:!0});break;case me.SAVE_RECORD_AS:t.saveRecord();break;case me.EXPORT_POSITION_IMAGE:t.showExportBoardImageDialog();break;case me.COPY_RECORD:t.copyRecordKIF();break;case me.COPY_RECORD_CSA:t.copyRecordCSA();break;case me.COPY_RECORD_USI_BEFORE:t.copyRecordUSIBefore();break;case me.COPY_RECORD_USI_ALL:t.copyRecordUSIAll();break;case me.COPY_BOARD_SFEN:t.copyBoardSFEN();break;case me.PASTE_RECORD:t.showPasteDialog();break;case me.INSERT_INTERRUPT:t.insertSpecialMove(Ee.INTERRUPT);break;case me.INSERT_RESIGN:t.insertSpecialMove(Ee.RESIGN);break;case me.INSERT_DRAW:t.insertSpecialMove(Ee.DRAW);break;case me.INSERT_IMPASS:t.insertSpecialMove(Ee.IMPASS);break;case me.INSERT_REPETITION_DRAW:t.insertSpecialMove(Ee.REPETITION_DRAW);break;case me.INSERT_MATE:t.insertSpecialMove(Ee.MATE);break;case me.INSERT_TIMEOUT:t.insertSpecialMove(Ee.TIMEOUT);break;case me.INSERT_FOUL_WIN:t.insertSpecialMove(Ee.FOUL_WIN);break;case me.INSERT_FOUL_LOSE:t.insertSpecialMove(Ee.FOUL_LOSE);break;case me.INSERT_ENTERING_OF_KING:t.insertSpecialMove(Ee.ENTERING_OF_KING);break;case me.INSERT_WIN_BY_DEFAULT:t.insertSpecialMove(Ee.WIN_BY_DEFAULT);break;case me.INSERT_LOSE_BY_DEFAULT:t.insertSpecialMove(Ee.LOSE_BY_DEFAULT);break;case me.REMOVE_CURRENT_MOVE:t.removeCurrentMove();break;case me.START_POSITION_EDITING:t.startPositionEditing();break;case me.END_POSITION_EDITING:t.endPositionEditing();break;case me.CHANGE_TURN:t.changeTurn();break;case me.INIT_POSITION_STANDARD:t.initializePosition(Ce.STANDARD);break;case me.INIT_POSITION_HANDICAP_LANCE:t.initializePosition(Ce.HANDICAP_LANCE);break;case me.INIT_POSITION_HANDICAP_RIGHT_LANCE:t.initializePosition(Ce.HANDICAP_RIGHT_LANCE);break;case me.INIT_POSITION_HANDICAP_BISHOP:t.initializePosition(Ce.HANDICAP_BISHOP);break;case me.INIT_POSITION_HANDICAP_ROOK:t.initializePosition(Ce.HANDICAP_ROOK);break;case me.INIT_POSITION_HANDICAP_ROOK_LANCE:t.initializePosition(Ce.HANDICAP_ROOK_LANCE);break;case me.INIT_POSITION_HANDICAP_2PIECES:t.initializePosition(Ce.HANDICAP_2PIECES);break;case me.INIT_POSITION_HANDICAP_4PIECES:t.initializePosition(Ce.HANDICAP_4PIECES);break;case me.INIT_POSITION_HANDICAP_6PIECES:t.initializePosition(Ce.HANDICAP_6PIECES);break;case me.INIT_POSITION_HANDICAP_8PIECES:t.initializePosition(Ce.HANDICAP_8PIECES);break;case me.INIT_POSITION_TSUME_SHOGI:t.initializePosition(Ce.TSUME_SHOGI);break;case me.INIT_POSITION_TSUME_SHOGI_2KINGS:t.initializePosition(Ce.TSUME_SHOGI_2KINGS);break;case me.START_MATE_SEARCH:t.showMateSearchDialog();break;case me.STOP_MATE_SEARCH:t.stopMateSearch();break;case me.START_GAME:t.showGameDialog();break;case me.START_CSA_GAME:t.showCSAGameDialog();break;case me.STOP_GAME:t.stopGame();break;case me.RESIGN:en.resign();break;case me.WIN:en.win();break;case me.LOGOUT:t.cancelCSAGame();break;case me.START_RESEARCH:t.showResearchDialog();break;case me.STOP_RESEARCH:t.stopResearch();break;case me.START_ANALYSIS:t.showAnalysisDialog();break;case me.STOP_ANALYSIS:t.stopAnalysis();break;case me.FLIP_BOARD:Pe().flipBoard();break;case me.APP_SETTING_DIALOG:t.showAppSettingDialog();break;case me.USI_ENGINE_SETTING_DIALOG:t.showUsiEngineManagementDialog();break}}),Se.onUpdateAppSetting(x=>{e.updateAppSetting(JSON.parse(x))}),Se.onUSIBestMove(Ed),Se.onUSICheckmate(ld),Se.onUSICheckmateNotImplemented(cd),Se.onUSICheckmateTimeout(Ad),Se.onUSINoMate(ud),Se.onUSIInfo((x,n,i)=>{const s=JSON.parse(i);kE(x,n,s)}),Se.onUSIPonderInfo((x,n,i)=>{const s=JSON.parse(i);kE(x,n,s)}),Se.onCSAGameSummary((x,n)=>{Sd(x,JSON.parse(n))}),Se.onCSAReject(wd),Se.onCSAStart((x,n)=>{Td(x,JSON.parse(n))}),Se.onCSAMove((x,n,i)=>{Pd(x,n,JSON.parse(i))}),Se.onCSAGameResult(Id),Se.onCSAClose(kd),ix(()=>[t.appState,t.isBussy],([x,n])=>Se.updateAppState(x,n)),Se.updateAppState(t.appState,t.isBussy)}Ae.log(lt.INFO,`start renderer process: APP_VERSION=${R8.appVersion}`);U0.register(...Bm);Ub();function Y9(t){if(!document)return;const e=d.electronShogi,x=R8.appVersion;t?document.title=`${e} Version ${x} - ${t}`:document.title=`${e} Version ${x}`}const Ki=Ge().addListener("changeFilePath",Y9);Promise.allSettled([Pe().loadAppSetting().catch(t=>{Ki.pushError(new Error("アプリ設定の読み込み中にエラーが発生しました: "+t))}),Ae.getRecordPathFromProcArg().then(t=>{t&&Ki.openRecord(t)}).catch(t=>{Ki.pushError(new Error("起動パラメーターの取得に失敗しました: "+t))})]).finally(()=>{const t=Pe().language;Ae.log(lt.INFO,`set language: ${t}`),Oh(t),Y9(Ki.recordFilePath),Ae.log(lt.INFO,"mount app"),m5(Hb).mount("#app")}); diff --git a/docs/webapp/assets/index-7e66079b.css b/docs/webapp/assets/index-7e66079b.css deleted file mode 100644 index 3dc6d6af..00000000 --- a/docs/webapp/assets/index-7e66079b.css +++ /dev/null @@ -1 +0,0 @@ -html{font-family:ヒラギノ角ゴ ProN W3,Hiragino Kaku Gothic ProN,Avenir,Helvetica,Arial,メイリオ,Meiryo,verdana,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px}:root{--main-color: white;--main-bg-color: #5f8f5f;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #4b704b;--tab-highlight-color: white;--tab-content-bg-color: lightgray;--text-color-danger: white;--text-color: black;--text-bg-color: white;--text-bg-color-selected: #a6eaff;--text-bg-color-warning: #ffff88;--text-bg-color-danger: red;--text-separator-color: gray;--text-dashed-separator-color: dimgray;--input-border-color: gray;--chart-bg-color: white;--promote-bg-color: white;--not-promote-bg-color: gray;--turn-label-color: lightyellow;--turn-label-bg-color: #2424e6;--turn-label-border-color: midnightblue;--control-button-color: white;--control-button-bg-color: #4b704b;--control-button-border-color: #000000;--disabled-control-button-bg-color: dimgray;--hovered-control-button-bg-color: #527a52;--close-button-bg-color: #ba151d;--hovered-close-button-bg-color: #d81922;--dialog-color: black;--dialog-bg-color: #d0d6d0;--dialog-border-color: dimgray;--info-dialog-color: white;--info-dialog-bg-color: #5f8f5f;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: #2c2c2c;--selector-color: black;--selector-bg-color: #e0ebe0;--pushed-selector-color: white;--pushed-selector-bg-color: #4b704b;--toggle-knob-color: white;--toggle-active-color: #5bd75b;--toggle-inactive-color: darkgray}.cherry-blossom{--main-color: black;--main-bg-color: #efc4c4;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #d06868;--tab-highlight-color: white;--tab-content-bg-color: lightgray;--text-color-danger: white;--text-color: black;--text-bg-color: #fdeeed;--text-bg-color-selected: #a6eaff;--text-bg-color-warning: #ffff88;--text-bg-color-danger: red;--text-separator-color: gray;--text-dashed-separator-color: dimgray;--input-border-color: gray;--chart-bg-color: #fdeeed;--promote-bg-color: #e8a9a9;--not-promote-bg-color: gray;--turn-label-color: lightyellow;--turn-label-bg-color: #2424e6;--turn-label-border-color: midnightblue;--control-button-color: white;--control-button-bg-color: #d06868;--control-button-border-color: #000000;--disabled-control-button-bg-color: dimgray;--hovered-control-button-bg-color: #e18f8f;--close-button-bg-color: #c91720;--hovered-close-button-bg-color: #e51d27;--dialog-color: black;--dialog-bg-color: #efc4c4;--dialog-border-color: #cd6666;--info-dialog-color: white;--info-dialog-bg-color: #c84e4e;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: #2c2c2c;--selector-color: black;--selector-bg-color: #f4dddd;--pushed-selector-color: white;--pushed-selector-bg-color: #d06868;--toggle-knob-color: white;--toggle-active-color: #5bd75b;--toggle-inactive-color: darkgray}.autumn{--main-color: black;--main-bg-color: #dbb579;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #720f13;--tab-highlight-color: white;--tab-content-bg-color: #d8ad6b;--text-color-danger: white;--text-color: black;--text-bg-color: #ead2ae;--text-bg-color-selected: #bc8e7e;--text-bg-color-warning: #ffff88;--text-bg-color-danger: red;--text-separator-color: gray;--text-dashed-separator-color: dimgray;--input-border-color: gray;--chart-bg-color: #f1e1c9;--promote-bg-color: #ead2ae;--not-promote-bg-color: gray;--turn-label-color: lightyellow;--turn-label-bg-color: #2424e6;--turn-label-border-color: midnightblue;--control-button-color: white;--control-button-bg-color: #566132;--control-button-border-color: #000000;--disabled-control-button-bg-color: #8c8c8c;--hovered-control-button-bg-color: #748244;--close-button-bg-color: #c91720;--hovered-close-button-bg-color: #e51d27;--dialog-color: black;--dialog-bg-color: #dbb579;--dialog-border-color: #bc6c25;--info-dialog-color: white;--info-dialog-bg-color: #bc6c25;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: #2c2c2c;--selector-color: black;--selector-bg-color: #e9d3af;--pushed-selector-color: white;--pushed-selector-bg-color: #566132;--toggle-knob-color: white;--toggle-active-color: #e1e469;--toggle-inactive-color: darkgray}.snow{--main-color: black;--main-bg-color: #e9e8ef;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #567ac5;--tab-highlight-color: white;--tab-content-bg-color: lightgray;--text-color-danger: white;--text-color: black;--text-bg-color: #fcfcfd;--text-bg-color-selected: #a6eaff;--text-bg-color-warning: #ffff88;--text-bg-color-danger: red;--text-separator-color: gray;--text-dashed-separator-color: dimgray;--input-border-color: gray;--chart-bg-color: #e9e8ef;--promote-bg-color: #e9e8ef;--not-promote-bg-color: gray;--turn-label-color: lightyellow;--turn-label-bg-color: #2424e6;--turn-label-border-color: midnightblue;--control-button-color: white;--control-button-bg-color: #567ac5;--control-button-border-color: #000000;--disabled-control-button-bg-color: dimgray;--hovered-control-button-bg-color: #99afe4;--close-button-bg-color: #c91720;--hovered-close-button-bg-color: #e51d27;--dialog-color: black;--dialog-bg-color: #e9e8ef;--dialog-border-color: #a6abd0;--info-dialog-color: white;--info-dialog-bg-color: #2859a6;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: #2c2c2c;--selector-color: black;--selector-bg-color: #c8d4ec;--pushed-selector-color: white;--pushed-selector-bg-color: #6384c9;--toggle-knob-color: white;--toggle-active-color: #4a70c0;--toggle-inactive-color: darkgray}.dark{--main-color: white;--main-bg-color: black;--shadow-color: rgba(0, 0, 0, .5);--tab-color: white;--tab-bg-color: #3c3c3c;--tab-highlight-color: white;--tab-content-bg-color: black;--text-color-danger: white;--text-color: white;--text-bg-color: #202020;--text-bg-color-selected: #4444b3;--text-bg-color-warning: #b08000;--text-bg-color-danger: red;--text-separator-color: gainsboro;--text-dashed-separator-color: lightgray;--input-border-color: gray;--chart-bg-color: #202020;--promote-bg-color: dimgray;--not-promote-bg-color: black;--turn-label-color: lightyellow;--turn-label-bg-color: black;--turn-label-border-color: lightyellow;--control-button-color: white;--control-button-bg-color: #4d6868;--control-button-border-color: #3f5454;--disabled-control-button-bg-color: #5c5c5c;--hovered-control-button-bg-color: #6c8d8d;--close-button-bg-color: #aa141b;--hovered-close-button-bg-color: #c91720;--dialog-color: white;--dialog-bg-color: black;--dialog-border-color: dimgray;--info-dialog-color: white;--info-dialog-bg-color: black;--info-dialog-border-color: white;--error-dialog-color: white;--error-dialog-bg-color: #aa0000;--error-dialog-border-color: white;--error-dialog-button-color: white;--error-dialog-button-bg-color: #cc7777;--hovered-error-dialog-button-bg-color: #aa5555;--bussy-dialog-color: white;--bussy-dialog-bg-color: dimgray;--bussy-dialog-border-color: white;--control-shadow-color: black;--selector-color: white;--selector-bg-color: #3c3c3c;--pushed-selector-color: white;--pushed-selector-bg-color: #547272;--toggle-knob-color: #ddd;--toggle-active-color: #259625;--toggle-inactive-color: #5c5c5c}body{margin:0}body::-webkit-scrollbar{display:none}#app{text-align:center;height:100vh;width:100vw}.full{width:100%;height:100%}.column{display:flex;flex-direction:column}.row{display:flex;flex-direction:row}.column.reverse{flex-direction:column-reverse}.row.reverse{flex-direction:row-reverse}.column.wrap,.row.wrap{flex-wrap:wrap}.column>.auto{flex:auto}.row>.auto{flex:auto}.column>.grow{flex:1}.row>.grow{flex:1}.regular-interval{justify-content:space-between}.hidden{display:none}.icon{height:100%;vertical-align:top}.icon+span{margin-left:5px;line-height:100%}.warning{background-color:var(--text-bg-color-warning)}.scroll{overflow:auto}button{color:var(--control-button-color);background:linear-gradient(to top,var(--control-button-bg-color) 80%,white 140%);border-color:var(--control-button-border-color);border-style:solid;border-width:0px 1px 1px 0px;font-size:.8rem}button:active{border-width:1px 0px 0px 1px}button:disabled{background:linear-gradient(to top,var(--disabled-control-button-bg-color) 80%,white 140%)}button:hover:enabled{background:linear-gradient(to top,var(--hovered-control-button-bg-color) 80%,white 140%)}button.close:enabled{background:linear-gradient(to top,var(--close-button-bg-color) 80%,white 140%)}button.close:hover:enabled{background:linear-gradient(to top,var(--hovered-close-button-bg-color) 80%,white 140%)}button.thin{margin:0;padding:2px 25px}button.wide{width:100%;margin:5px 0;padding:5px 0}input{color:var(--text-color);background-color:var(--text-bg-color);border-color:var(--input-border-color);border-style:solid;border-width:.8px;height:20px;padding:1px 2px;font-size:.9rem}select{color:var(--text-color);background-color:var(--text-bg-color);border-width:.8px;height:23.6px;padding:1px 2px;font-size:.9rem}textarea{color:var(--text-color);background-color:var(--text-bg-color);border-width:.8px;font-size:.9rem}dialog{display:flex;flex-direction:column;color:var(--dialog-color);background-color:var(--dialog-bg-color);border:1px solid var(--dialog-border-color);border-radius:10px;padding:15px;font-size:1rem}dialog::backdrop{background:rgba(0,0,0,.5)}dialog button{margin:0 5px;padding:5px 15px}dialog hr{width:100%;border:none;border-top:1px dashed var(--dialog-border-color)}dialog select{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:auto}dialog .title{text-align:center;margin-bottom:5px;font-weight:700;font-size:1.2em}dialog .form-group{border:1px dashed var(--dialog-border-color);border-radius:10px;padding:10px;margin:10px 0}dialog .row>.form-group{margin-top:0}dialog .row>.form-group+*{margin-left:10px}dialog .form-item{text-align:left;margin:10px 0}dialog .form-item>*{vertical-align:top}dialog .form-item.center{text-align:center}dialog .form-item.center>*:nth-child(n+2){display:inline-block;margin-left:5px}dialog .form-item-label{display:inline-block;font-size:.95em;text-align:left;margin-right:5px;width:90px}dialog .form-item-label-wide{display:inline-block;font-size:.95em;text-align:left;margin-right:5px;width:160px}dialog .center .form-item-label{display:inline-block;text-align:center;margin-right:5px;width:auto}dialog .form-item-unit{display:inline-block;text-align:left;font-size:.8em;margin:0 5px;padding-top:.2em}dialog .note{text-align:left;font-size:.8em}dialog .note:nth-child(n+2){margin-top:5px}dialog .main-buttons{display:flex;flex-direction:row;margin-top:5px;margin-left:auto;margin-right:auto}dialog .main-buttons button{padding:5px 25px}dialog .icon{width:36px}dialog button .icon{width:1.4em}dialog button .icon+span{margin-left:5px;line-height:1.4em}dialog .message-box{display:flex;flex-direction:row;align-items:center}dialog .message-box .icon{margin-right:15px}dialog.menu{border-style:none;background-color:transparent}dialog.menu .groups{width:80vw;margin:auto;display:flex;flex-direction:column}dialog.menu .group{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;margin:20px 0}dialog.menu button{width:150px;margin:10px;display:flex;flex-direction:column;align-items:center}dialog.menu button:enabled{box-shadow:2px 2px 5px 3px #d3d3d3}dialog.menu button:disabled{box-shadow:2px 2px 5px 3px gray}dialog.menu .icon{height:36px;width:36px;display:block}dialog.menu .label{display:block;font-size:.9rem;margin-top:.5rem}.frame[data-v-e5bb7653]{color:var(--text-color);user-select:none;position:relative}.frame>*[data-v-e5bb7653]{position:absolute}.hand>*[data-v-e5bb7653]{position:absolute}.player-name[data-v-e5bb7653]{background-color:var(--text-bg-color);display:flex;justify-content:left;align-items:center;border:1px solid black;box-sizing:border-box}.player-name-text[data-v-e5bb7653]{margin-left:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clock[data-v-e5bb7653]{background-color:var(--text-bg-color);display:flex;justify-content:center;align-items:center;border:1px solid black;box-sizing:border-box}.clock.warning[data-v-e5bb7653]{background-color:var(--text-bg-color-warning)}.clock.danger[data-v-e5bb7653]{color:var(--text-color-danger);background-color:var(--text-bg-color-danger)}.clock-text[data-v-e5bb7653]{vertical-align:middle}.promotion-selector[data-v-e5bb7653]{overflow:hidden}.select-button[data-v-e5bb7653]{float:left;width:50%;height:100%}.promote[data-v-e5bb7653]{background-color:var(--promote-bg-color)}.not-promote[data-v-e5bb7653]{background-color:var(--not-promote-bg-color)}.turn[data-v-e5bb7653]{color:var(--turn-label-color);background-color:var(--turn-label-bg-color);border-color:var(--turn-label-border-color);overflow:hidden;display:flex;justify-content:center;align-items:center}.control-item[data-v-6176a2f4]{width:100%;height:19%;font-size:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:clip;line-height:200%;padding:0 5%}.top-control .control-item[data-v-6176a2f4]:not(:last-child){margin-bottom:1%}.bottom-control .control-item[data-v-6176a2f4]:not(:last-child){margin-top:1%}.control-item .icon[data-v-6176a2f4]{height:68%}div.container[data-v-61ac46a8]{display:flex;flex-direction:row;align-items:center}div.toggle[data-v-61ac46a8]{position:relative}input[data-v-61ac46a8]{position:absolute;left:0;top:0;width:100%;height:100%;margin:0;cursor:pointer;opacity:0}input~.slider[data-v-61ac46a8]{pointer-events:none;position:absolute;left:0;top:0;width:100%;height:100%;box-sizing:border-box;background-color:var(--toggle-inactive-color);box-shadow:1px 1px 3px 0 var(--control-shadow-color)}input~.knob[data-v-61ac46a8]{pointer-events:none;content:"";position:absolute;border-radius:100%;left:0;top:0;background:var(--toggle-knob-color);box-shadow:0 0 5px #0006;transition:.2s}input:checked~.slider[data-v-61ac46a8]{background-color:var(--toggle-active-color)}input:checked~.knob[data-v-61ac46a8]{left:50%}input:focus~.slider[data-v-61ac46a8]{border:1px solid white}label[data-v-61ac46a8]{margin-left:5px;cursor:pointer;white-space:nowrap}.record-view[data-v-839e26de]{max-width:600px;user-select:none}.control[data-v-839e26de]{width:100%;height:40px}.control button[data-v-839e26de]{height:100%;width:25%;padding:0}.move-list[data-v-839e26de]{margin-top:1px;width:100%;height:calc(70% - 50px);overflow-x:hidden;overflow-y:auto;color:var(--text-color);background-color:var(--text-bg-color)}.branch-list-area[data-v-839e26de]{margin-top:2px;width:100%}.branch-list[data-v-839e26de]{width:auto;height:100%;overflow-x:hidden;overflow-y:auto;color:var(--text-color);background-color:var(--text-bg-color)}.branch-list-control[data-v-839e26de]{width:40px;height:100%}.branch-list-control button[data-v-839e26de]{height:50%;width:100%;padding:0}.branch-list-control button .icon[data-v-839e26de]{height:40px}.move-element[data-v-839e26de]{height:1.4em;width:100%;line-height:1.4em;font-size:.85em}.move-element.has-branch[data-v-839e26de]:not(.selected){background-color:var(--text-bg-color-warning)}.move-element.selected[data-v-839e26de]{background-color:var(--text-bg-color-selected)}.move-number[data-v-839e26de]{min-width:38px;height:100%;padding-right:5px;text-align:right;vertical-align:baseline;white-space:nowrap;overflow:hidden;text-overflow:clip}.move-text[data-v-839e26de]{min-width:100px;height:100%;padding-right:5px;text-align:left;vertical-align:baseline;white-space:nowrap;overflow:hidden;text-overflow:clip}.move-time[data-v-839e26de]{min-width:90px;height:100%;padding-right:5px;text-align:left;vertical-align:baseline;white-space:nowrap;overflow:hidden;text-overflow:clip}.move-comment[data-v-839e26de]{height:100%;text-align:left;vertical-align:baseline;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.options[data-v-839e26de]{width:100%;margin:0;padding:2px 0 0;color:var(--main-color);background-color:var(--main-bg-color)}.option[data-v-839e26de]{padding:0 6px;margin-right:4px}.record-pane[data-v-33781217]{box-sizing:border-box}.record[data-v-33781217]{width:100%;min-height:0}.text[data-v-263d415b]{width:100%;resize:none;box-sizing:border-box}.play-buttons[data-v-263d415b]{height:28px}button.play[data-v-263d415b]{height:27px;line-height:25px;font-size:16px;padding-left:5px;padding-right:5px}.root[data-v-50ccf2a4]{padding-bottom:2px;background-color:var(--active-tab-bg-color)}.headers[data-v-50ccf2a4]{width:100%;height:18px;text-align:left}.header[data-v-50ccf2a4]{margin:0 4px 0 0;padding:0 5px;background-color:var(--text-bg-color)}.label[data-v-50ccf2a4],.value[data-v-50ccf2a4]{font-size:13px;white-space:nowrap}.list-header[data-v-50ccf2a4]{height:16px;width:100%;font-size:12px;background-color:var(--text-bg-color)}.list[data-v-50ccf2a4]{width:100%;overflow-y:scroll;background-color:var(--text-bg-color)}.list-item[data-v-50ccf2a4]{height:24px;font-size:12px}.list-item.highlight[data-v-50ccf2a4]{background:var(--text-bg-color-warning);border-bottom:dashed var(--text-separator-color) 1px}.list-column[data-v-50ccf2a4]{height:100%;white-space:nowrap;overflow:hidden;line-height:22px}.list-column.multipv-index[data-v-50ccf2a4]{width:30px;text-align:right}.list-column.depth[data-v-50ccf2a4]{width:44px;text-align:right}.list-column.nodes[data-v-50ccf2a4]{width:78px;text-align:right}.list-column.time[data-v-50ccf2a4],.list-column.score[data-v-50ccf2a4]{width:52px;text-align:right}.list-column.score-flag[data-v-50ccf2a4]{width:20px;text-align:left}.list-column.text[data-v-50ccf2a4]{text-align:left;text-overflow:ellipsis}.list-column button[data-v-50ccf2a4]{margin:0 0 1px;padding:1px 5px 1px 2px;height:22px;vertical-align:middle}.list-column .icon[data-v-50ccf2a4]{height:18px}.list-column button span[data-v-50ccf2a4]{line-height:19px}.root[data-v-27a6373b]{background-color:var(--chart-bg-color)}.root[data-v-14c1fefe]{background-color:var(--text-bg-color)}.main[data-v-14c1fefe]{overflow:auto}.element[data-v-14c1fefe]{margin:3px;text-align:left}.key[data-v-14c1fefe]{width:150px}.value[data-v-14c1fefe]{white-space:pre-wrap;word-break:break-all;width:calc(100% - 150px)}input.value[data-v-14c1fefe]{width:min(500px,calc(100% - 200px))}.options[data-v-14c1fefe]{padding:2px 5px;height:24px;text-align:left;color:var(--main-color);background-color:var(--main-bg-color)}.tabs[data-v-57d32810]{width:100%;user-select:none;background:linear-gradient(to top,var(--tab-bg-color) 80%,white 140%);padding-bottom:2px}.tab[data-v-57d32810]{height:23px;color:var(--tab-color);border-bottom:solid 3px transparent;padding:0 20px 0 10px;line-height:28px;font-size:1em;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tab.selected[data-v-57d32810]{border-bottom:solid 3px var(--tab-highlight-color)}.tab.end[data-v-57d32810]{margin-left:auto}.tab-contents .tab-content[data-v-57d32810]{color:var(--text-color);background-color:var(--tab-content-bg-color)}.splitpanes{display:flex;width:100%;height:100%}.splitpanes--vertical{flex-direction:row}.splitpanes--horizontal{flex-direction:column}.splitpanes--dragging *{user-select:none}.splitpanes__pane{width:100%;height:100%;overflow:hidden}.splitpanes--vertical .splitpanes__pane{transition:width .2s ease-out}.splitpanes--horizontal .splitpanes__pane{transition:height .2s ease-out}.splitpanes--dragging .splitpanes__pane{transition:none}.splitpanes__splitter{touch-action:none}.splitpanes--vertical>.splitpanes__splitter{min-width:1px;cursor:col-resize}.splitpanes--horizontal>.splitpanes__splitter{min-height:1px;cursor:row-resize}.splitpanes.default-theme .splitpanes__pane{background-color:#f2f2f2}.splitpanes.default-theme .splitpanes__splitter{background-color:#fff;box-sizing:border-box;position:relative;flex-shrink:0}.splitpanes.default-theme .splitpanes__splitter:before,.splitpanes.default-theme .splitpanes__splitter:after{content:"";position:absolute;top:50%;left:50%;background-color:#00000026;transition:background-color .3s}.splitpanes.default-theme .splitpanes__splitter:hover:before,.splitpanes.default-theme .splitpanes__splitter:hover:after{background-color:#00000040}.splitpanes.default-theme .splitpanes__splitter:first-child{cursor:auto}.default-theme.splitpanes .splitpanes .splitpanes__splitter{z-index:1}.default-theme.splitpanes--vertical>.splitpanes__splitter,.default-theme .splitpanes--vertical>.splitpanes__splitter{width:7px;border-left:1px solid #eee;margin-left:-1px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{transform:translateY(-50%);width:1px;height:30px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{margin-left:-2px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{margin-left:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter,.default-theme .splitpanes--horizontal>.splitpanes__splitter{height:7px;border-top:1px solid #eee;margin-top:-1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{transform:translate(-50%);width:30px;height:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{margin-top:-2px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{margin-top:1px}.main-frame.splitpanes--horizontal>.splitpanes__splitter{height:8px;cursor:ns-resize}.bottom-frame.splitpanes--vertical>.splitpanes__splitter{width:8px;cursor:ew-resize}.main-frame .splitpanes__splitter{background-color:transparent}.main-frame .splitpanes__splitter:hover{background-color:#1e90ff}.bottom-frame.splitpanes--vertical>.splitpanes__pane{box-shadow:6px 0 6px -3px var(--shadow-color)}.unhide-tabview-button[data-v-e8732df8]{width:100%;height:30px;font-size:100%;text-align:center;line-height:180%;padding:0 5%}div.container[data-v-3118c214]{align-items:center}div.item[data-v-3118c214]{position:relative;margin-top:1px;margin-bottom:1px}div.item[data-v-3118c214]:not(:last-child){margin-right:2px}input[data-v-3118c214]{position:absolute;left:0;top:0;width:100%;height:100%;margin:0;opacity:0}.button[data-v-3118c214]{pointer-events:none;left:0;top:0;display:flex;align-items:center;box-sizing:border-box;border:2px solid var(--selector-bg-color);color:var(--selector-color);background-color:var(--selector-bg-color);box-shadow:1px 1px 3px 0 var(--control-shadow-color)}input:checked~.button[data-v-3118c214]{color:var(--pushed-selector-color);border:2px solid var(--pushed-selector-bg-color);background-color:var(--pushed-selector-bg-color)}input:focus~.button[data-v-3118c214]{border:2px solid white}.label[data-v-3118c214]{pointer-events:none;text-align:center;width:100%}.option-list[data-v-1c17ad8b]{width:740px;height:calc(100vh - 220px);overflow:auto}.option[data-v-1c17ad8b]{margin:5px 5px 0;padding:5px;border-bottom:1px solid var(--text-separator-color)}.option-filter[data-v-1c17ad8b]{margin:0 5px 5px}.filter[data-v-1c17ad8b]{width:100%}.option-name[data-v-1c17ad8b]{width:290px;text-align:left;border-right:1px solid var(--text-separator-color);margin-right:10px}.option-name .option-name-original[data-v-1c17ad8b]{font-size:.7em}.option-unchangeable[data-v-1c17ad8b]{width:415px;text-align:left;white-space:pre-wrap;word-break:break-all}.option-value[data-v-1c17ad8b]{width:415px;text-align:left}.option-value-control[data-v-1c17ad8b]{margin-right:10px}.option-value-text[data-v-1c17ad8b]{width:380px;text-align:left}.option-value-filename[data-v-1c17ad8b]{width:250px;text-align:left}.option-value-number[data-v-1c17ad8b]{width:100px;text-align:right}.option-value-combo[data-v-1c17ad8b]{text-align:left}.option button[data-v-1c17ad8b]{vertical-align:top}.option-default-value[data-v-1c17ad8b]{font-size:.7em;white-space:nowrap;font-weight:600;opacity:.7}.root[data-v-28321643]{width:100%}.player-select[data-v-28321643]{width:100%;margin-bottom:5px}.player-info[data-v-28321643]{line-height:1.3em;font-size:.8em}.player-info-key[data-v-28321643]{width:110px;height:100%;text-align:left;vertical-align:baseline}.player-info-value[data-v-28321643]{height:100%;text-align:left;vertical-align:baseline}.player-setting[data-v-28321643]{margin:5px auto 0}.top-label[data-v-e1d42cc7]{text-align:center}.players[data-v-e1d42cc7]{width:580px}.player[data-v-e1d42cc7]{width:280px}.players-control[data-v-e1d42cc7]{width:100%}.players-control>*[data-v-e1d42cc7]{margin-top:5px}.time-limit[data-v-e1d42cc7]{width:265px}input.time[data-v-e1d42cc7]{text-align:right;width:40px}input.number[data-v-e1d42cc7]{text-align:right;width:80px}.others[data-v-e1d42cc7]{width:280px}.root[data-v-b929b527]{width:560px}input.number[data-v-b929b527]{width:100px}.long-text[data-v-b929b527]{width:250px}.root[data-v-c47f4227]{width:450px}.remove-button[data-v-c47f4227]{margin-top:5px}input.number[data-v-c47f4227]{text-align:right;width:80px}.engine-list[data-v-1a55690d]{width:720px;height:400px;overflow:auto}.engine-filter[data-v-1a55690d]{margin:0 5px 5px}.filter[data-v-1a55690d]{width:100%}.engine[data-v-1a55690d]{margin:0 5px;padding:5px;border-bottom:1px solid gray}.engine-name[data-v-1a55690d]{text-align:left;width:450px;margin-top:5px;margin-right:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.frame[data-v-ca9c5577]{color:#000;background-color:#fff;user-select:none;position:relative;overflow:hidden}.frame>*[data-v-ca9c5577]{position:absolute}.header[data-v-ca9c5577]{white-space:nowrap}.footer[data-v-ca9c5577]{white-space:pre-wrap;text-align:left}.board[data-v-3d382caa]{padding:5px;margin:auto}.board.game[data-v-3d382caa]{background-color:var(--main-bg-color)}.board.book[data-v-3d382caa]{background-color:#fff}input.size[data-v-3d382caa]{width:50px;text-align:right}input.header[data-v-3d382caa]{width:200px}container[data-v-b16a3cda]{display:flex;flex-direction:column;align-items:center}button.select[data-v-b16a3cda]{display:inline-block;margin:0;width:100%}.preview[data-v-b16a3cda]{display:inline-block;max-width:100%;height:auto}.settings[data-v-9bc40901]{width:590px;height:540px}.section[data-v-9bc40901]{margin:20px 0}.section-title[data-v-9bc40901]{font-size:1.1em}input.toggle[data-v-9bc40901]{height:1em;width:1em;margin-right:10px}input.file-path[data-v-9bc40901]{width:250px}.image-selector[data-v-9bc40901]{display:inline-block;width:200px}.selector[data-v-9bc40901]{max-width:400px}.message[data-v-2908a87e]{width:460px;text-align:left;font-size:.8em}textarea[data-v-2908a87e]{width:460px;height:60vh;min-height:100px;resize:none}dialog.bussy[data-v-76d58604]{color:var(--bussy-dialog-color);background-color:var(--bussy-dialog-bg-color);border:3px solid var(--bussy-dialog-border-color)}dialog.confirm[data-v-9f781aaf]{color:var(--info-dialog-color);background-color:var(--info-dialog-bg-color);border:3px solid var(--info-dialog-border-color)}dialog.info[data-v-08f05368]{color:var(--info-dialog-color);background-color:var(--info-dialog-bg-color);border:3px solid var(--info-dialog-border-color)}.attachment[data-v-08f05368]{text-align:left}.item[data-v-34c3016d]{margin:10px 0}.index[data-v-34c3016d]{font-weight:700;font-size:.8em;margin:0}.message[data-v-34c3016d]{font-size:.8em;margin:0}dialog.error[data-v-34c3016d]{color:var(--error-dialog-color);background-color:var(--error-dialog-bg-color);border:3px solid var(--error-dialog-border-color)}dialog.error button[data-v-34c3016d]{color:var(--error-dialog-button-color);background:linear-gradient(to top,var(--error-dialog-button-bg-color) 80%,white 140%)}dialog.error button[data-v-34c3016d]:hover{background:linear-gradient(to top,var(--hovered-error-dialog-button-bg-color) 80%,white 140%)}.root[data-v-93e774e5]{width:420px}input.toggle[data-v-93e774e5]{height:1em;width:1em;margin-right:10px}input.small[data-v-93e774e5]{width:50px}.selector[data-v-93e774e5]{max-width:210px}dialog.bussy[data-v-1fb6a0d5]{color:var(--info-dialog-color);background-color:var(--info-dialog-bg-color);border:3px solid var(--info-dialog-border-color)}.root[data-v-e8e6e178]{width:420px}.board[data-v-20ead1fe]{margin-left:auto;margin-right:auto}.control-row[data-v-20ead1fe]{width:100%;height:25%;margin:0}.control-item[data-v-20ead1fe]{width:50%;height:100%;margin:0;font-size:100%;padding:0 5%}.control-row[data-v-20ead1fe]:not(:last-child){margin-bottom:2%}.control-item[data-v-20ead1fe]:not(:last-child){margin-right:2%}.control-item .icon[data-v-20ead1fe]{height:80%;width:auto}.control-item-wide[data-v-20ead1fe]{width:100%;height:19%;margin:0;font-size:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:clip;line-height:200%;padding:0 5%}.control-item-wide[data-v-20ead1fe]:not(:last-child){margin-top:1%}.control-item-wide .icon[data-v-20ead1fe]{height:68%}.informations[data-v-20ead1fe]{height:120px;width:80vw;overflow-y:scroll;margin-left:auto;margin-right:auto;margin-top:5px;color:var(--text-color);background-color:var(--text-bg-color)}.information[data-v-20ead1fe]{font-size:14px;margin:2px;text-align:left}.move-element.selected[data-v-20ead1fe]{background-color:var(--text-bg-color-selected)}.root[data-v-b724763d]{color:var(--main-color);background-color:var(--main-bg-color)} diff --git a/docs/webapp/index.html b/docs/webapp/index.html index 701a0247..1116cd24 100644 --- a/docs/webapp/index.html +++ b/docs/webapp/index.html @@ -6,8 +6,8 @@ Electron将棋 - - + +