[
    {
        "author": "LinOnetwo",
        "core-version": ">=5.1.22",
        "dependents": "$:/plugins/tiddlywiki/qrcode",
        "description": "Sync data between TidGi-Mobile <-> Desktop NodeJS App (TidGi) ",
        "list": "readme ui/ServerList",
        "plugin-type": "plugin",
        "text": "{\"tiddlers\":{\"$:/plugins/linonetwo/tw-mobile-sync/Config/SyncInterval\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/Config/SyncInterval\",\"description\":\"minutes between sync\",\"text\":\"3\"},\"$:/plugins/linonetwo/tw-mobile-sync/Config/TiddlersPrefixToNotSync\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/Config/TiddlersPrefixToNotSync\",\"text\":\"$:/state $:/temp\"},\"$:/plugins/linonetwo/tw-mobile-sync/Config/TiddlersToNotSync\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/Config/TiddlersToNotSync\",\"text\":\"$:/HistoryList $:/StoryList $:/Import $:/language $:/layout $:/config/OriginalTiddlerPaths\"},\"$:/plugins/linonetwo/tw-mobile-sync/develop\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/develop\",\"creator\":\"LinOnetwo\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"TidGi-Mobile use [[$:/plugins/linonetwo/tw-mobile-sync/templates/skinny-tiddlywiki5.html]] as template. See [[$:/plugins/linonetwo/tw-mobile-sync/templates/about-skinny-tiddlywiki5-html]] for how it differ from original lazy-all template.\\n\\nUse [[SIOC|https://github.com/taurenshaman/semantic-web/blob/cee9e421eed3f31a602f82375fb92fb109d638b7/data/sioc.rdf]] Ontology for server tiddler.\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/readme\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/readme\",\"creator\":\"LinOnetwo\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"\\\\define image()\\n  <img src=<<makeqr text:\\\"\\\"\\\"$(url)$\\\"\\\"\\\" size:\\\"350\\\">>/>\\n\\\\end\\n\\n! Sync Between NodeJS and TidGi-Mobile 在桌面端（NodeJS）和太记移动端之间同步\\n\\n本插件可以让你在基于NodeJS技术的桌面应用（例如太记）和太记移动端 App 之间同步数据。\\n\\n手机应用 ↔ 桌面应用 ↔ 云端\\n\\n不支持 Tiddloid。请改用 `tw-html-nodejs-sync` 插件。\\n\\nThis plugin enables you sync date between NodeJS server App (e.g. TidGi App) and TidGi-Mobile App.\\n\\nTidGi-Mobile App ↔ Desktop App ↔ Cloud\\n\\nTiddloid is not supported. Use `tw-html-nodejs-sync` plugin instead.\\n\\n!! How to use\\n\\n首先在手机端扫码，打开当前这个知识库的网页，然后保存出 HTML 文件后（详见中文教程的[[如何保存|https://tw-cn.netlify.app/#TiddlyGit%E5%A4%AA%E8%AE%B0]]章节），在 Tiddloid 里打开保存的 HTML 文件（可能需要先将文件移出下载目录不然Tiddloid无权限访问，详见其[[说明书|https://github.com/donmor/Tiddloid]]）。\\n\\n然后打开[[服务器列表|$:/plugins/linonetwo/tw-mobile-sync/ui/ServerList]]，录入一下服务器地址：\\n\\n# 将上面扫码得到的 URL 复制一下，填入[[服务器列表|$:/plugins/linonetwo/tw-mobile-sync/ui/ServerList]]里的「智能识别黏贴框」，然后点击「智能识别」按钮，会自动将 URL 解析后填入相应框内。你也可以点击「扫二维码」按钮开始扫码，扫码结果会自动填入「智能识别黏贴框」内\\n# 此时，「服务器IP」和「服务器端口」框里应该要已经填好了 ip 和端口号\\n# 你需要填写一下「服务器名」这个框\\n# 点击「新增服务器」，会新建一个服务器信息条目，请确认创建此条目\\n# 这时新的服务器应该就出现在服务器列表里了，你可以点击「启用同步并立即同步」按钮，这样就可以在桌面端和手机端同步数据了\\n# 之后会每五分钟自动同步一次用户创建的条目（不包含插件），如果需要从桌面端同步插件到手机端，需要使用「[[拉取并覆盖|$:/plugins/linonetwo/tw-mobile-sync/ui/DownloadFullHtml]]」功能\\n\\nFirst scan the code on your cell phone, open the current knowledge base page, then save the HTML file (see the [[How to save|https://tw-cn.netlify.app/#TiddlyGit%E5%A4%AA%E8%AE%B0]] section of the Chinese tutorial for more details) and open the saved HTML file in Tiddloid (You may need to move the file out of the download directory first or Tiddloid will not have access to it, see its [[Instructions|https://github.com/donmor/Tiddloid]] for details).\\n\\nThen open the [[Server List|$:/plugins/linonetwo/tw-mobile-sync/ui/ServerList]] and enter the following server address.\\n\\n# Copy the URL you got from the code above and fill in the \\\"Smart Identify Sticky Box\\\" in [[Server List|$:/plugins/linonetwo/tw-mobile-sync/ui/ServerList]], then click the \\\"Smart Identify\\\" button, the URL will be automatically parsed and filled in the corresponding box. You can also click the \\\"Scan QR Code\\\" button to start scanning the code, and the result will be automatically filled into the \\\"Smart Identify Sticky Box\\\".\\n# At this point, the \\\"Server IP\\\" and \\\"Server Port\\\" boxes should already be filled with the ip and port numbers.\\n# You need to fill in the \\\"server name\\\" box\\n# Click on \\\"Add Server\\\", a new server information entry will be created, please confirm to create this entry\\n# The new server should now appear in the server list, you can click the \\\"Enable sync and sync now\\\" button to sync data between desktop and mobile.\\n# If you need to sync the plugin from desktop to mobile, you need to use the \\\"[[pull and overwrite|$:/plugins/linonetwo/tw-mobile-sync/ui/DownloadFullHtml]]\\\" function.\\n\\nTranslated with www.DeepL.com/Translator (free version)\\n\\n!! Server list and forms 服务器列表和新增表单\\n\\n[[Server List|$:/plugins/linonetwo/tw-mobile-sync/ui/ServerList]] contains syncable servers, and button to add new server.\\n\\n!! QrCode of current server 当前服务器的二维码\\n\\n<$set name=\\\"content\\\" value={{{ [{$:/info/url/host}addprefix[//]addprefix{$:/info/url/protocol}addsuffix[/tw-mobile-sync/get-full-html]] }}}>\\n  <<content>>\\n  <<image>>\\n</$set>\\n\\nScan to add this server 扫码以添加此服务器 ({{$:/info/url/full}}).\\n\\n（二维码：当前服务器的地址）\\n\\nNeeds official QR plugin [[$:/plugins/tiddlywiki/qrcode]] to work. 需要安装官方二维码插件 [[$:/plugins/tiddlywiki/qrcode]] 才会有二维码出现在上面\\n\\n!! FAQ 常见问题\\n\\n!!! 在外面用了一天之后回家添加服务器，却无法同步到电脑端 When you come home to add a server after using it outside for a day, it won't sync to the computer side\\n\\n就是因为你新添加服务器后，它只会同步新建服务器之后新建的条目。这是又因为新建服务器时会根据当前时间添加一个 lastSync 字段，目前在点击同步按钮时，只会同步这个时间点之后的内容。你可以手动把服务器条目里这个字段的时间改早一天，这样就会同步你今天添加的内容了。未来我们将会添加更智能的同步方式，就不再需要这个字段了，就不会遇到这个问题了。\\n\\nThis is because when you add a new server, it only syncs the new entries created after the new server is created. This is again because when you create a new server you add a lastSync field based on the current time, and currently when you click the sync button it will only sync after this point in time. You can manually change the time of this field in the server entry to one day earlier, and it will sync the content you added today. In the future we will add a smarter way of syncing so that this field is no longer needed and you won't encounter this problem.\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/templates/about-skinny-tiddlywiki5-html\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/templates/about-skinny-tiddlywiki5-html\",\"text\":\"!! Difference\\n\\n!!! $:/plugins/linonetwo/tw-mobile-sync/templates/save/lazy-all\\n\\n* Add some plugin to saveTiddlerFilter ignore list at the end, and remove useless `+[sort[title]]`\\n* Replace `{{$:/core/templates/tiddlywiki5.html}}` with our `{{$:/plugins/linonetwo/tw-mobile-sync/templates/skinny-tiddlywiki5.html}}`\\n\\n!!! $:/plugins/linonetwo/tw-mobile-sync/templates/skinny-tiddlywiki5.html\\n\\n`<noscript>` part is removed, because it is not used by users on mobile phone:\\n\\n```\\n<!--~~ Static content for Google and browsers without JavaScript ~~-->\\n<noscript>\\n<div id=\\\"splashArea\\\">\\n`{{$:/core/templates/static.area}}`\\n</div>\\n</noscript>\\n```\\n\\nThe `class=\\\"tiddlywiki-tiddler-store\\\"` part (which is included by `$:/core/templates/store.area.template.html`) is removed, because we will use multiple files to store tiddlers. And recreate this part manually, and add to the html string:\\n\\n```\\n<!--~~ Ordinary tiddlers ~~-->\\n`{{$:/core/templates/store.area.template.html}}`\\n```\\n\\n!!! $:/plugins/linonetwo/tw-mobile-sync/templates/save/save-lazy-all-tiddler-store\\n\\nOnly keep the\\n\\n> New-style JSON store area, with an old-style store area for compatibility with v5.1.x tooling\\n\\nAssume there is no tiddler within `Encrypted` area.\\n\\nSo we can store the tiddler store as a JSON.\"},\"$:/plugins/linonetwo/tw-mobile-sync/templates/save/save-lazy-all-non-skinny-tiddlywiki-tiddler-store\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/templates/save/save-lazy-all-non-skinny-tiddlywiki-tiddler-store\",\"text\":\"\\\\import $:/plugins/linonetwo/tw-mobile-sync/templates/save/lazy-all\\n\\n<$list filter=<<saveTiddlerFilter>> template=\\\"$:/core/templates/html-json-tiddler\\\"/>\"},\"$:/plugins/linonetwo/tw-mobile-sync/templates/save/save-lazy-all-skinny-tiddler-store\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/templates/save/save-lazy-all-skinny-tiddler-store\",\"text\":\"\\\\import $:/plugins/linonetwo/tw-mobile-sync/templates/save/lazy-all\\n\\n<$list filter=<<skinnySaveTiddlerFilter>> counter=\\\"counter\\\" template=\\\"$:/core/templates/html-json-skinny-tiddler\\\"/>\"},\"$:/plugins/linonetwo/tw-mobile-sync/templates/save/lazy-all\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/templates/save/lazy-all\",\"text\":\"\\\\define saveTiddlerFilter()\\n[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] [is[tiddler]type[application/javascript]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/twcloud/tiddlyweb-sse]] -[[$:/plugins/linonetwo/tidgi-ipc-syncadaptor]] -[[$:/plugins/linonetwo/tidgi-ipc-syncadaptor-ui]]\\n\\\\end\\n\\\\define skinnySaveTiddlerFilter()\\n[!is[system]] -[type[application/javascript]] :sort:date[get[modified]else[19700101]]\\n\\\\end\\n{{$:/plugins/linonetwo/tw-mobile-sync/templates/skinny-tiddlywiki5.html}}\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/templates/skinny-tiddlywiki5.html\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/templates/skinny-tiddlywiki5.html\",\"text\":\"<$set name=\\\"saveTiddlerAndShadowsFilter\\\" filter=\\\"[subfilter<saveTiddlerFilter>] [subfilter<saveTiddlerFilter>plugintiddlers[]]\\\">\\n`<!doctype html>\\n`{{$:/core/templates/MOTW.html}}`<html lang=\\\"`<$text text={{{ [{$:/language}get[name]] }}}/>`\\\">\\n<head>\\n<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\n<!--~~ Raw markup for the top of the head section ~~-->\\n`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/TopHead]] ||$:/core/templates/raw-static-tiddler}}}`\\n<meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=Edge\\\"/>\\n<meta name=\\\"application-name\\\" content=\\\"TiddlyWiki\\\" />\\n<meta name=\\\"generator\\\" content=\\\"TiddlyWiki\\\" />\\n<meta name=\\\"tiddlywiki-version\\\" content=\\\"`{{$:/core/templates/version}}`\\\" />\\n<meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\" />\\n<meta name=\\\"apple-mobile-web-app-capable\\\" content=\\\"yes\\\" />\\n<meta name=\\\"apple-mobile-web-app-status-bar-style\\\" content=\\\"black-translucent\\\" />\\n<meta name=\\\"mobile-web-app-capable\\\" content=\\\"yes\\\"/>\\n<meta name=\\\"format-detection\\\" content=\\\"telephone=no\\\" />\\n<meta name=\\\"copyright\\\" content=\\\"`{{$:/core/copyright.txt}}`\\\" />\\n<link id=\\\"faviconLink\\\" rel=\\\"shortcut icon\\\" href=\\\"favicon.ico\\\">\\n<title>`{{$:/core/wiki/title}}`</title>\\n<!--~~ This is a Tiddlywiki file. The points of interest in the file are marked with this pattern ~~-->\\n\\n<!--~~ Raw markup ~~-->\\n`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/core/wiki/rawmarkup]] ||$:/core/templates/plain-text-tiddler}}}\\n{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkup]] ||$:/core/templates/plain-text-tiddler}}}\\n{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified]] ||$:/core/templates/raw-static-tiddler}}}`\\n</head>\\n<body class=\\\"tc-body\\\">\\n<!--~~ Raw markup for the top of the body section ~~-->\\n`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/TopBody]] ||$:/core/templates/raw-static-tiddler}}}`\\n<!--~~ Static styles ~~-->\\n<div id=\\\"styleArea\\\">\\n`{{$:/boot/boot.css||$:/core/templates/css-tiddler}}`\\n</div>\\n<!--~~ Library modules ~~-->\\n<div id=\\\"libraryModules\\\" style=\\\"display:none;\\\">\\n`{{{ [is[system]type[application/javascript]library[yes]] ||$:/core/templates/javascript-tiddler}}}`\\n</div>\\n<!--~~ Boot kernel prologue ~~-->\\n<div id=\\\"bootKernelPrefix\\\" style=\\\"display:none;\\\">\\n`{{ $:/boot/bootprefix.js ||$:/core/templates/javascript-tiddler}}`\\n</div>\\n<!--~~ Boot kernel ~~-->\\n<div id=\\\"bootKernel\\\" style=\\\"display:none;\\\">\\n`{{ $:/boot/boot.js ||$:/core/templates/javascript-tiddler}}`\\n</div>\\n<!--~~ Raw markup for the bottom of the body section ~~-->\\n`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/BottomBody]] ||$:/core/templates/raw-static-tiddler}}}`\\n</body>\\n</html>`\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/AddNewToServerList\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/AddNewToServerList\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<div>\\n  {{$:/plugins/linonetwo/tw-mobile-sync/ui/DownloadFullHtml}}\\n</div>\\n\\n<div class=\\\"tw-mobile-sync-new-server-field-fields-container-outer1\\\">\\n  <div class=\\\"tw-mobile-sync-new-server-field-fields-container-outer2\\\">\\n    <fieldset>\\n      <legend>智能识别黏贴框 Smart Identify Sticky Box</legend>\\n\\n      <div class=\\\"tw-mobile-sync-new-server-field-fields-container\\\">\\n        <$edit-text tiddler=\\\"$:/state/tw-mobile-sync/server/new\\\" field=\\\"text\\\" default=\\\"\\\"/>\\n\\n        <div class=\\\"tw-mobile-sync-new-server-field-fields-buttons\\\">\\n          <$button>\\n            智能识别 Smart Identify\\n            <$action-sendmessage $message=\\\"tw-mobile-sync-smart-recognize-ip-address\\\" from=\\\"$:/state/tw-mobile-sync/server/new\\\"/>\\n          </$button>\\n\\n          <$reveal type=\\\"nomatch\\\" state=\\\"$:/state/tw-mobile-sync/server/new/scan-qr-widget-open\\\" text=\\\"yes\\\">\\n            <$button>\\n              扫二维码 Scan QR\\n              <$action-setfield $tiddler=\\\"$:/state/tw-mobile-sync/server/new/scan-qr-widget-open\\\" text=\\\"yes\\\" />\\n            </$button>\\n          </$reveal>\\n          <$reveal type=\\\"match\\\" state=\\\"$:/state/tw-mobile-sync/server/new/scan-qr-widget-open\\\" text=\\\"yes\\\">\\n            <$button>\\n              停止扫码 Stop Scan\\n              <$action-setfield $tiddler=\\\"$:/state/tw-mobile-sync/server/new/scan-qr-widget-open\\\" text=\\\"no\\\" />\\n            </$button>\\n          </$reveal>\\n        </div>\\n      </div>\\n\\n      <$reveal type=\\\"match\\\" state=\\\"$:/state/tw-mobile-sync/server/new/scan-qr-widget-open\\\" text=\\\"yes\\\">\\n        <$ScanQRWidget outputTiddler=\\\"$:/state/tw-mobile-sync/server/new\\\" stopOnDetect=\\\"yes\\\" stateTiddler=\\\"$:/state/tw-mobile-sync/server/new/scan-qr-widget-open\\\" />\\n      </$reveal>\\n\\n    </fieldset>\\n    <fieldset>\\n      <legend>服务器名 Server Name</legend>\\n      <$edit-text tiddler=\\\"$:/state/tw-mobile-sync/server/new\\\" field=\\\"name\\\" default=\\\"\\\" />\\n    </fieldset>\\n    <fieldset>\\n      <legend>服务器IP Server IP</legend>\\n      <$edit-text tiddler=\\\"$:/state/tw-mobile-sync/server/new\\\" field=\\\"ipAddress\\\" default=\\\"\\\" />\\n    </fieldset>\\n    <fieldset>\\n      <legend>服务器端口 Server Port</legend>\\n      <$edit-text tiddler=\\\"$:/state/tw-mobile-sync/server/new\\\" field=\\\"port\\\" default=\\\"\\\" />\\n    </fieldset>\\n  </div>\\n  <$button style=\\\"width: 160px; margin-top: 10px;\\\">\\n    <div>新增服务器</div>\\n    <div>Add New</div>\\n    <$set name=\\\"existedServers\\\" filter={{$:/plugins/linonetwo/tw-mobile-sync/ServerListFilter}} >\\n      <$set name=\\\"latestLastSync\\\" filter=\\\"[<existedServers>sort[lastSync]limit[1]get[lastSync]]\\\" emptyValue=<<now \\\"[UTC]YYYY0MM0DD0hh0mm0ssXXX\\\">> >\\n        <$action-createtiddler\\n          $basetitle={{{ [<now \\\"YYYY-MM-DD-0hh0mm0ss\\\">] +[addprefix[$:/state/tw-mobile-sync/server/]] }}}\\n          text=\\\"offline\\\"\\n          name={{$:/state/tw-mobile-sync/server/new!!name}}\\n          caption={{$:/state/tw-mobile-sync/server/new!!name}}\\n          ipAddress={{$:/state/tw-mobile-sync/server/new!!ipAddress}}\\n          port={{$:/state/tw-mobile-sync/server/new!!port}}\\n          lastSync=<<latestLastSync>>\\n        >\\n          <$action-setfield $tiddler=\\\"$:/state/tw-mobile-sync/server/new\\\" text=\\\"\\\" name=\\\"\\\" ipAddress=\\\"\\\" port=\\\"\\\" />\\n          <$action-sendmessage $message=\\\"tw-mobile-sync-set-active-server-and-sync\\\" title=<<createTiddler-title>> />\\n        </$action-createtiddler>\\n      </$set>\\n    </$set>\\n  </$button>\\n</div>\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/ControlPanel/Settings\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/ControlPanel/Settings\",\"caption\":\"MobileSync\",\"tags\":\"$:/tags/ControlPanel/SettingsTab\",\"text\":\"These settings let you customise the behaviour of TW-MobileSync plugin.\\n\\n---\\n\\n!! Sync\\n\\n\\n!!! Sync Interval\\n\\nNormally, sync happened in local wiki, so it is free, so you can sync it frequently. This setting takes effect after refresh.\\n\\nMinutes between sync:\\n\\n<$edit-text\\n\\ttiddler=\\\"$:/plugins/linonetwo/tw-mobile-sync/Config/SyncInterval\\\"\\n\\tfield=\\\"text\\\"\\n\\tdefault=\\\"3\\\"\\n\\ttabindex=-1\\n\\tfocus=false\\n\\tcancelPopups=\\\"yes\\\"\\n\\tfileDrop=no\\n\\ttag=\\\"input\\\"\\n/>\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/DownloadFullHtml\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/DownloadFullHtml\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<$list filter=\\\"[prefix[$:/state/tw-mobile-sync/server/]field:text[onlineActive]]\\\">\\n<details>\\n  <summary>\\n  拉取并覆盖 Pull and override\\n  </summary>\\n  <fieldset>\\n    <legend>拉取服务端最新完整内容覆盖本地所有内容 Pull the latest complete content from the server to cover all local content</legend>\\n    <div>普通同步没法更新插件和导入的内容，如果你在电脑端更新或安装了插件，则需要在移动端点下面的按钮做一次完整拉取。</div>\\n    <div>If you have updated or installed the plugin on your computer, you will need to do a full pull on the mobile side by clicking the button below.</div>\\n    <div>请慎重点击，本地若有未同步内容将丢失！如果确保本地没有未同步内容，则可以放心拉取。</div>\\n    <div>Please click carefully, local unsynced content will be lost if there is any! If you make sure there is no unsynced content locally, you can pull it without worry.</div>\\n    <$button>\\n      <div>{{!!name}}</div>\\n      <div>拉取内容覆盖本地 Pull content to cover local</div>\\n      <$action-sendmessage $message=\\\"tw-mobile-sync-download-full-html\\\" />\\n    </$button>\\n  </fieldset>\\n</details>\\n</$list>\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/ServerItemCopyTemplate\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/ServerItemCopyTemplate\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<$button class=\\\"tw-mobile-sync-copy-button\\\">\\n  <div>复制</div>\\n  <div>Copy</div>\\n  <$action-createtiddler name={{{ [{!!name}addsuffix[copy]] }}} $template={{!!title}}>\\n    <$action-navigate $to=<<createTiddler-title>>/>\\n  </$action-createtiddler>\\n</$button>\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/ServerItemViewTemplateBasic\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/ServerItemViewTemplateBasic\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<div class=\\\"tw-mobile-sync-server-list-item\\\">\\n  <div style=\\\"display: flex; flex-direction: column;\\\">\\n    <h3 style=\\\"margin-top: 0;\\\">\\n      <$link to={{!!title}}>\\n        <$text text={{!!name}}/>\\n      </$link>\\n    </h3>\\n    <div style=\\\"margin-bottom: 5px;\\\">{{!!ipAddress}}:{{!!port}}</div>\\n    <!-- we use text as status field -->\\n    <div>{{!!text}}</div>\\n    <div><$view field=lastSync format=date template=\\\"YYYY-0MM-0DD 0hh:0mm:0ss\\\" /></div>\\n  </div>\\n\\n  <$reveal type=\\\"nomatch\\\" state=<<currentTiddler>> text=\\\"onlineActive\\\" class=\\\"tw-mobile-sync-sync-reveal\\\">\\n    <$button class=\\\"tw-mobile-sync-sync-button\\\">\\n      <div><$text text={{!!name}}/></div>\\n      <div>启用同步并立即同步</div>\\n      <div>Enable and Sync Now</div>\\n      <$action-sendmessage $message=\\\"tw-mobile-sync-set-active-server-and-sync\\\" title={{!!title}} />\\n    </$button>\\n  </$reveal>\\n\\n  <$reveal type=\\\"match\\\" state=<<currentTiddler>> text=\\\"onlineActive\\\" class=\\\"tw-mobile-sync-sync-reveal\\\">\\n    <$button class=\\\"tw-mobile-sync-sync-button\\\">\\n      <div><$text text={{!!name}}/></div>\\n      <div>立即同步</div>\\n      <div>Sync Now</div>\\n      <$action-sendmessage $message=\\\"tw-mobile-sync-sync-start\\\" />\\n    </$button>\\n  </$reveal>\\n\\n</div>\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/ServerList\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/ServerList\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<div class=\\\"tw-mobile-sync-server-list\\\">\\n  <$list filter={{$:/plugins/linonetwo/tw-mobile-sync/ServerListFilter}}>\\n    <div class=\\\"tw-mobile-sync-server-list-item\\\">\\n      {{||$:/plugins/linonetwo/tw-mobile-sync/ui/ServerItemViewTemplateBasic}}\\n      {{||$:/plugins/linonetwo/tw-mobile-sync/ui/ServerItemCopyTemplate}}\\n    </div>\\n  </$list>\\n</div>\\n\\n{{$:/plugins/linonetwo/tw-mobile-sync/ui/AddNewToServerList}}\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/ServerListFilter\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ServerListFilter\",\"text\":\"[prefix[$:/state/tw-mobile-sync/server/]] -[[$:/state/tw-mobile-sync/server/new]] -[[$:/state/tw-mobile-sync/server/new/scan-qr-widget-open]] -[[$:/state/tw-mobile-sync/server/existed/scan-qr-widget-open]] -[[$:/state/tw-mobile-sync/server/existed/update]]\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/DesktopSkinnyHtmlQR\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/DesktopSkinnyHtmlQR\",\"caption\":\"Skinny (TidGi-Mobile)\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<div class=\\\"tw-mobile-sync-sidebar-qrcode\\\">\\n  <$let content={{$:/info/url/full}} size={{{ [{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}getSidebarWidthInPx[]] }}} >\\n    <<content>>\\n    <<image>>\\n  </$let>\\n</div>\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/SidebarDesktopContent\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/SidebarDesktopContent\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"\\\\define image()\\n<img src=<<makeqr text:\\\"\\\"\\\"$(content)$\\\"\\\"\\\" size:\\\"\\\"\\\"$(size)$\\\"\\\"\\\">>/>\\n\\\\end\\n\\n<$reveal type=\\\"match\\\" state=\\\"$:/info/tidgi/enableHTTPAPI\\\" text=\\\"no\\\">\\n  Firstly, Open TidGi-desktop's HTTP API feature on current workspace's setting, see [[Official TidGi Feature Handbook|https://tidgi.fun/#TidGi%20Feature%20Handbook%2FEnabling%20HTTP%20API]] for details.\\n\\n  请先开启太记桌面版，当前 Wiki 工作区设置里的 HTTP API，详见[[官方太记功能手册|https://tidgi.fun/#%E5%A4%AA%E8%AE%B0%E5%8A%9F%E8%83%BD%E6%89%8B%E5%86%8C%2F%E5%BC%80%E5%90%AF%20HTTP%20API]]。\\n</$reveal>\\n\\n<$reveal type=\\\"nomatch\\\" state=\\\"$:/info/tidgi/enableHTTPAPI\\\" text=\\\"no\\\">\\n\\nQRCode of Current Server\\n\\n<!-- Works on TidGi with enableHTTPAPI, or nodejs that is not TidGi Desktop -->\\n<% if [{$:/info/tidgi/enableHTTPAPI}match[yes]]:else[{$:/info/tidgi}!match[yes]] %>\\n\\n  {{$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/DesktopSkinnyHtmlQR}}\\n\\n<% else %>\\n\\n  需要开启 HTTP API，详见[[官方太记功能手册|https://tidgi.fun/#%E5%A4%AA%E8%AE%B0%E5%8A%9F%E8%83%BD%E6%89%8B%E5%86%8C%2F%E5%BC%80%E5%90%AF%20HTTP%20API]]。\\n\\n<% endif %>\\n\\n\\n<fieldset class=\\\"tw-mobile-sync-sidebar-fieldset tw-mobile-sync-sidebar-desktop\\\">\\n  <legend>\\n  <% if [[$:/temp/tw-mobile-sync/listen-client-info]get[text]compare:eq[yes]] %>\\n    已连接客户端列表\\n  <% else %>\\n  <$button>\\n    <$action-sendmessage $message=\\\"tm-tw-mobile-sync-listen-client-info\\\" />\\n    点击查看已连接客户端\\n  </$button>\\n  <% endif %>\\n  </legend>\\n\\n  <$vars compare-put-host-to-end=\\\"[get[Origin]prefix[http]else[1]]\\\" compare-put-active-to-start=\\\"[get[state]prefix[onlineActive]else[1]]\\\">\\n    <$list filter=\\\"[prefix[$:/state/tw-mobile-sync/clientStatus/]sortsub:number<compare-put-active-to-start>sortsub:number<compare-put-host-to-end>]\\\">\\n      <div class=\\\"tw-mobile-sync-sidebar-desktop-server-item\\\">\\n        <h2><$text text={{!!name}} /></h2>\\n        <h3>{{!!state}}</h3>\\n        <span>{{!!User-Agent}}</span>\\n        <pre>{{!!recentlySyncedString}}</pre>\\n      </div>\\n    </$list>\\n  </$vars>\\n</fieldset>\\n\\n</$reveal>\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/SidebarMobileContent\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/SidebarMobileContent\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<fieldset class=\\\"tw-mobile-sync-sidebar-fieldset\\\">\\n  <legend>与桌面端同步 Sync With Desktop</legend>\\n\\n  <$reveal type=\\\"match\\\" state=\\\"$:/info/tidgi-mobile\\\" text=\\\"yes\\\">\\n    \\n    Use TidGi-Mobile's wiki list to sync (long press wiki item in the list to open menu)\\n\\n    使用 TidGi-Mobile 的 wiki 列表进行同步（长按列表里的 wiki 条目打开菜单）\\n\\n  </$reveal>\\n\\n  <$reveal type=\\\"nomatch\\\" state=\\\"$:/info/tidgi-mobile\\\" text=\\\"yes\\\">\\n\\n    <div class=\\\"tw-mobile-sync-server-list-item\\\">\\n      {{{[prefix[$:/state/tw-mobile-sync/server/]field:text[onlineActive]] ~[prefix[$:/state/tw-mobile-sync/server/]field:text[online]first[]]||$:/plugins/linonetwo/tw-mobile-sync/ui/ServerItemViewTemplateBasic}}}\\n    </div>\\n\\n    [[服务器列表|$:/plugins/linonetwo/tw-mobile-sync/ui/ServerList]]\\n    \\n  </$reveal>\\n\\n</fieldset>\\n\\n<$reveal type=\\\"nomatch\\\" state=\\\"$:/info/tidgi-mobile\\\" text=\\\"yes\\\">\\n{{$:/plugins/linonetwo/tw-mobile-sync/ui/AddNewToServerList}}\\n</$reveal>\\n\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/SidebarTab\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/SidebarTab\",\"tags\":\"$:/tags/SideBar\",\"caption\":\"MobileSync\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<!-- only display Sync With Desktop tab in Tiddloid, which will use content scheme to load -->\\n<!-- <$reveal type=\\\"nomatch\\\" state=\\\"$:/info/url/protocol\\\" text=\\\"content:\\\"> -->\\n<!-- use css to hide and display, so it is easier to test on desktop -->\\n<div class=\\\"tw-mobile-sync-sidebar-mobile-content\\\">\\n  {{$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/SidebarMobileContent}}\\n</div>\\n<div class=\\\"tw-mobile-sync-sidebar-desktop-content\\\">\\n  {{$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/SidebarDesktopContent}}\\n</div>\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/style.css\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/Sidebar/style.css\",\"tags\":\"$:/tags/Stylesheet\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<$importvariables filter=\\\"[[$:/themes/tiddlywiki/vanilla/base]]\\\">\\n\\n.tw-mobile-sync-sidebar-mobile-content, .tw-mobile-sync-sidebar-desktop-content {\\n  width: 100%;\\ndisplay: flex;\\n  flex-direction: column;\\n  justify-content: flex-start;\\n  align-items: center;\\n}\\n\\n@media (min-width: <<sidebarbreakpoint>>) {\\n  .tw-mobile-sync-sidebar-mobile-content {\\n    display: none;\\n  }\\n}\\n\\n@media (max-width: <<sidebarbreakpoint>>) {\\n  .tw-mobile-sync-sidebar-desktop-content {\\n    display: none;\\n  }\\n}\\n\\n</$importvariables>\"},\"$:/plugins/linonetwo/tw-mobile-sync/ui/style.css\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/ui/style.css\",\"tags\":\"$:/tags/Stylesheet\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"<$importvariables filter=\\\"[[$:/themes/tiddlywiki/vanilla/base]]\\\">\\n\\n.tw-mobile-sync-server-list {\\n  padding-left: 0;\\n  overflow: auto;\\n  overflow: overlay;\\n}\\n\\n.tw-mobile-sync-sync-button {\\n  width: 100%; height: 100px; display: flex; flex-direction: column; justify-content: center; align-items: center;\\n  max-width: 300px;\\n  min-width: 175px;\\n}\\n.tw-mobile-sync-copy-button {\\n  height: 100%;\\n  display: flex; flex-direction: column; justify-content: center; align-items: center;\\n  margin-left: 10px !important;\\n}\\n\\n.tw-mobile-sync-sync-reveal {\\n  margin-left: 20px;\\n}\\n\\n.tw-mobile-sync-new-server-field-fields-container-outer2 textarea,\\n.tw-mobile-sync-new-server-field-fields-container-outer2 input {\\n  width: 100%;\\n}\\n.tw-mobile-sync-new-server-field-fields-container-outer2 {\\n  display: flex; flex-direction: column;\\n}\\n.tw-mobile-sync-new-server-field-fields-container {\\n  display: flex; flex-direction: row; justify-content: center; align-items: center;\\n}\\n.tw-mobile-sync-new-server-field-fields-container-outer1 {\\n  display: flex; flex-direction: row;\\n}\\n@media (max-width: 535px) {\\n  .tw-mobile-sync-new-server-field-fields-container-outer1 {\\n    flex-direction: column;\\n  }\\n}\\n.tw-mobile-sync-new-server-field-fields-buttons {\\n  display: flex; flex-direction: column; justify-content: center; align-items: center;\\n}\\n@media (max-width: 535px) {\\n  .tw-mobile-sync-new-server-field-fields-container {\\n    flex-direction: column;\\n  }\\n  .tw-mobile-sync-new-server-field-fields-buttons {\\n    width: 100%;\\n    flex-direction: row;\\n    justify-content: space-between;\\n    margin-top: 10px;\\n  }\\n}\\n\\n.tw-mobile-sync-existed-server-field-fields-container {\\n  display: flex; flex-direction: row;\\n}\\n.tw-mobile-sync-existed-server-field-fields-buttons {\\n  display: flex; flex-direction: row; justify-content: space-between;\\n}\\n\\n\\n.tw-mobile-sync-sidebar-fieldset {\\n  display: flex; flex-direction: column; justify-content: center; align-items: center;\\n  width: 100%;\\n\\n  margin-bottom: 10px;\\n}\\n\\n.tw-mobile-sync-sidebar-desktop-server-item {\\n  display: flex;\\n  flex-direction: column;\\n  align-items: center;\\n  justify-content: flex-start;\\n  margin-bottom: 20px;\\n}\\n.tw-mobile-sync-sidebar-desktop-server-item h3, .tw-mobile-sync-sidebar-desktop-server-item h5 {\\n  margin: 0;\\n}\\n.tw-mobile-sync-sidebar-desktop-server-item h5 {\\n  font-weight: 700;\\n}\\n.tw-mobile-sync-sidebar-desktop-server-item p:last-child {\\n  margin-bottom: 15px;\\n}\\n\\n.tw-mobile-sync-server-list-item {\\n  display: flex; flex-direction: row; align-items: center;\\n  justify-content: space-between;\\n}\\n@media (max-width: 535px) {\\n  .tw-mobile-sync-server-list-item {\\n    flex-direction: column;\\n  }\\n}\\n\\n.tw-mobile-sync-sidebar-qrcode {\\n  width: auto;\\n  height: auto;\\n}\\n.tw-mobile-sync-sidebar-qrcode img {\\n  width: calc({{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}} - 2em);\\n  height: calc({{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}} - 2em);\\n}\\n\\n</$importvariables>\"},\"$:/plugins/linonetwo/tw-mobile-sync/clientInfoStore.js\":{\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/clientInfoStore.js\",\"type\":\"application/javascript\",\"module-type\":\"library\",\"Modern.TiddlyDev#Origin\":\"data/clientInfoStore.ts\",\"text\":\"\\\"use strict\\\";var VOID=-1,PRIMITIVE=0,ARRAY=1,OBJECT=2,DATE=3,REGEXP=4,MAP=5,SET=6,ERROR=7,BIGINT=8,env=\\\"object\\\"==typeof self?self:globalThis,deserializer=(w,l)=>{const c=(e,i)=>(w.set(i,e),e),u=e=>{if(w.has(e))return w.get(e);var[i,E]=l[e];switch(i){case PRIMITIVE:case VOID:return c(E,e);case ARRAY:var r=c([],e);for(const T of E)r.push(u(T));return r;case OBJECT:var t,o,s=c({},e);for([t,o]of E)s[u(t)]=u(o);return s;case DATE:return c(new Date(E),e);case REGEXP:var{source:a,flags:n}=E;return c(new RegExp(a,n),e);case MAP:var O,A,R=c(new Map,e);for([O,A]of E)R.set(u(O),u(A));return R;case SET:var N=c(new Set,e);for(const M of E)N.add(u(M));return N;case ERROR:var{name:a,message:n}=E;return c(new env[a](n),e);case BIGINT:return c(BigInt(E),e);case\\\"BigInt\\\":return c(Object(BigInt(E)),e);case\\\"ArrayBuffer\\\":return c(new Uint8Array(E).buffer,E);case\\\"DataView\\\":a=new Uint8Array(E).buffer;return c(new DataView(a),E)}return c(new env[i](E),e)};return u},deserialize=e=>deserializer(new Map,e)(0),EMPTY=\\\"\\\",toString={}.toString,keys=Object.keys,typeOf=e=>{var i=typeof e;if(\\\"object\\\"!=i||!e)return[PRIMITIVE,i];var E=toString.call(e).slice(8,-1);switch(E){case\\\"Array\\\":return[ARRAY,EMPTY];case\\\"Object\\\":return[OBJECT,EMPTY];case\\\"Date\\\":return[DATE,EMPTY];case\\\"RegExp\\\":return[REGEXP,EMPTY];case\\\"Map\\\":return[MAP,EMPTY];case\\\"Set\\\":return[SET,EMPTY];case\\\"DataView\\\":return[ARRAY,E]}return E.includes(\\\"Array\\\")?[ARRAY,E]:E.includes(\\\"Error\\\")?[ERROR,E]:[OBJECT,E]},shouldSkip=([e,i])=>e===PRIMITIVE&&(\\\"function\\\"===i||\\\"symbol\\\"===i),serializer=(w,l,c,r)=>{const u=(e,i)=>{var E=r.push(e)-1;return c.set(i,E),E},d=i=>{if(c.has(i))return c.get(i);let[E,r]=typeOf(i);switch(E){case PRIMITIVE:{let e=i;switch(r){case\\\"bigint\\\":E=BIGINT,e=i.toString();break;case\\\"function\\\":case\\\"symbol\\\":if(w)throw new TypeError(\\\"unable to serialize \\\"+r);e=null;break;case\\\"undefined\\\":return u([VOID],i)}return u([E,e],i)}case ARRAY:if(r){let e=i;return\\\"DataView\\\"===r?e=new Uint8Array(i.buffer):\\\"ArrayBuffer\\\"===r&&(e=new Uint8Array(i)),u([r,[...e]],i)}var e=[],t=u([E,e],i);for(const N of i)e.push(d(N));return t;case OBJECT:if(r)switch(r){case\\\"BigInt\\\":return u([r,i.toString()],i);case\\\"Boolean\\\":case\\\"Number\\\":case\\\"String\\\":return u([r,i.valueOf()],i)}if(l&&\\\"toJSON\\\"in i)return d(i.toJSON());var o=[],t=u([E,o],i);for(const T of keys(i))!w&&shouldSkip(typeOf(i[T]))||o.push([d(T),d(i[T])]);return t;case DATE:return u([E,i.toISOString()],i);case REGEXP:var{source:t,flags:s}=i;return u([E,{source:t,flags:s}],i);case MAP:var a,n,O=[],t=u([E,O],i);for([a,n]of i)!w&&(shouldSkip(typeOf(a))||shouldSkip(typeOf(n)))||O.push([d(a),d(n)]);return t;case SET:var A=[],s=u([E,A],i);for(const M of i)!w&&shouldSkip(typeOf(M))||A.push(d(M));return s}var R=i.message;return u([E,{name:r,message:R}],i)};return d},serialize=(e,{json:i,lossy:E}={})=>{var r=[];return serializer(!(i||E),!!i,new Map,r)(e),r},esm_default=\\\"function\\\"==typeof structuredClone?(e,i)=>i&&(\\\"json\\\"in i||\\\"lossy\\\"in i)?deserialize(serialize(e,i)):structuredClone(e):(e,i)=>deserialize(serialize(e,i)),LIBVERSION=\\\"2.0.3\\\",UA_MAX_LENGTH=500,USER_AGENT=\\\"user-agent\\\",EMPTY2=\\\"\\\",UNKNOWN=\\\"?\\\",FUNC_TYPE=\\\"function\\\",UNDEF_TYPE=\\\"undefined\\\",OBJ_TYPE=\\\"object\\\",STR_TYPE=\\\"string\\\",UA_BROWSER=\\\"browser\\\",UA_CPU=\\\"cpu\\\",UA_DEVICE=\\\"device\\\",UA_ENGINE=\\\"engine\\\",UA_OS=\\\"os\\\",UA_RESULT=\\\"result\\\",NAME=\\\"name\\\",TYPE=\\\"type\\\",VENDOR=\\\"vendor\\\",VERSION=\\\"version\\\",ARCHITECTURE=\\\"architecture\\\",MAJOR=\\\"major\\\",MODEL=\\\"model\\\",CONSOLE=\\\"console\\\",MOBILE=\\\"mobile\\\",TABLET=\\\"tablet\\\",SMARTTV=\\\"smarttv\\\",WEARABLE=\\\"wearable\\\",XR=\\\"xr\\\",EMBEDDED=\\\"embedded\\\",INAPP=\\\"inapp\\\",BRANDS=\\\"brands\\\",FORMFACTORS=\\\"formFactors\\\",FULLVERLIST=\\\"fullVersionList\\\",PLATFORM=\\\"platform\\\",PLATFORMVER=\\\"platformVersion\\\",BITNESS=\\\"bitness\\\",CH_HEADER=\\\"sec-ch-ua\\\",CH_HEADER_FULL_VER_LIST=CH_HEADER+\\\"-full-version-list\\\",CH_HEADER_ARCH=CH_HEADER+\\\"-arch\\\",CH_HEADER_BITNESS=CH_HEADER+\\\"-\\\"+BITNESS,CH_HEADER_FORM_FACTORS=CH_HEADER+\\\"-form-factors\\\",CH_HEADER_MOBILE=CH_HEADER+\\\"-\\\"+MOBILE,CH_HEADER_MODEL=CH_HEADER+\\\"-\\\"+MODEL,CH_HEADER_PLATFORM=CH_HEADER+\\\"-\\\"+PLATFORM,CH_HEADER_PLATFORM_VER=CH_HEADER_PLATFORM+\\\"-version\\\",CH_ALL_VALUES=[BRANDS,FULLVERLIST,MOBILE,MODEL,PLATFORM,PLATFORMVER,ARCHITECTURE,FORMFACTORS,BITNESS],AMAZON=\\\"Amazon\\\",APPLE=\\\"Apple\\\",ASUS=\\\"ASUS\\\",BLACKBERRY=\\\"BlackBerry\\\",GOOGLE=\\\"Google\\\",HUAWEI=\\\"Huawei\\\",LENOVO=\\\"Lenovo\\\",HONOR=\\\"Honor\\\",LG=\\\"LG\\\",MICROSOFT=\\\"Microsoft\\\",MOTOROLA=\\\"Motorola\\\",NVIDIA=\\\"Nvidia\\\",ONEPLUS=\\\"OnePlus\\\",OPPO=\\\"OPPO\\\",SAMSUNG=\\\"Samsung\\\",SHARP=\\\"Sharp\\\",SONY=\\\"Sony\\\",XIAOMI=\\\"Xiaomi\\\",ZEBRA=\\\"Zebra\\\",CHROME=\\\"Chrome\\\",CHROMIUM=\\\"Chromium\\\",CHROMECAST=\\\"Chromecast\\\",EDGE=\\\"Edge\\\",FIREFOX=\\\"Firefox\\\",OPERA=\\\"Opera\\\",FACEBOOK=\\\"Facebook\\\",SOGOU=\\\"Sogou\\\",PREFIX_MOBILE=\\\"Mobile \\\",SUFFIX_BROWSER=\\\" Browser\\\",WINDOWS=\\\"Windows\\\",isWindow=typeof window!==UNDEF_TYPE,NAVIGATOR=isWindow&&window.navigator?window.navigator:void 0,NAVIGATOR_UADATA=NAVIGATOR&&NAVIGATOR.userAgentData?NAVIGATOR.userAgentData:void 0,extend=function(e,i){var E,r={},t=i;if(!isExtensions(i))for(var o in t={},i)for(var s in i[o])t[s]=i[o][s].concat(t[s]||[]);for(E in e)r[E]=t[E]&&t[E].length%2==0?t[E].concat(e[E]):e[E];return r},enumerize=function(e){for(var i={},E=0;E<e.length;E++)i[e[E].toUpperCase()]=e[E];return i},has=function(e,i){if(typeof e===OBJ_TYPE&&0<e.length){for(var E in e)if(lowerize(e[E])==lowerize(i))return!0;return!1}return!!isString(e)&&-1!==lowerize(i).indexOf(lowerize(e))},isExtensions=function(e,i){for(var E in e)return/^(browser|cpu|device|engine|os)$/.test(E)||!!i&&isExtensions(e[E])},isString=function(e){return typeof e===STR_TYPE},itemListToArray=function(e){if(e){for(var i,E=[],r=strip(/\\\\\\\\?\\\\\\\"/g,e).split(\\\",\\\"),t=0;t<r.length;t++)-1<r[t].indexOf(\\\";\\\")?(i=trim(r[t]).split(\\\";v=\\\"),E[t]={brand:i[0],version:i[1]}):E[t]=trim(r[t]);return E}},lowerize=function(e){return isString(e)?e.toLowerCase():e},majorize=function(e){return isString(e)?strip(/[^\\\\d\\\\.]/g,e).split(\\\".\\\")[0]:void 0},setProps=function(e){for(var i in e){i=e[i];typeof i==OBJ_TYPE&&2==i.length?this[i[0]]=i[1]:this[i]=void 0}return this},strip=function(e,i){return isString(i)?i.replace(e,EMPTY2):i},stripQuotes=function(e){return strip(/\\\\\\\\?\\\\\\\"/g,e)},trim=function(e,i){if(isString(e))return e=strip(/^\\\\s\\\\s*/,e),typeof i===UNDEF_TYPE?e:e.substring(0,UA_MAX_LENGTH)},rgxMapper=function(e,i){if(e&&i)for(var E,r,t,o,s,a=0;a<i.length&&!o;){for(var n=i[a],O=i[a+1],A=E=0;A<n.length&&!o&&n[A];)if(o=n[A++].exec(e))for(r=0;r<O.length;r++)s=o[++E],typeof(t=O[r])===OBJ_TYPE&&0<t.length?2===t.length?typeof t[1]==FUNC_TYPE?this[t[0]]=t[1].call(this,s):this[t[0]]=t[1]:3===t.length?typeof t[1]!==FUNC_TYPE||t[1].exec&&t[1].test?this[t[0]]=s?s.replace(t[1],t[2]):void 0:this[t[0]]=s?t[1].call(this,s,t[2]):void 0:4===t.length&&(this[t[0]]=s?t[3].call(this,s.replace(t[1],t[2])):void 0):this[t]=s||void 0;a+=2}},strMapper=function(e,i){for(var E in i)if(typeof i[E]===OBJ_TYPE&&0<i[E].length){for(var r=0;r<i[E].length;r++)if(has(i[E][r],e))return E===UNKNOWN?void 0:E}else if(has(i[E],e))return E===UNKNOWN?void 0:E;return i.hasOwnProperty(\\\"*\\\")?i[\\\"*\\\"]:e},windowsVersionMap={ME:\\\"4.90\\\",\\\"NT 3.11\\\":\\\"NT3.51\\\",\\\"NT 4.0\\\":\\\"NT4.0\\\",2e3:\\\"NT 5.0\\\",XP:[\\\"NT 5.1\\\",\\\"NT 5.2\\\"],Vista:\\\"NT 6.0\\\",7:\\\"NT 6.1\\\",8:\\\"NT 6.2\\\",8.1:\\\"NT 6.3\\\",10:[\\\"NT 6.4\\\",\\\"NT 10.0\\\"],RT:\\\"ARM\\\"},formFactorsMap={embedded:\\\"Automotive\\\",mobile:\\\"Mobile\\\",tablet:[\\\"Tablet\\\",\\\"EInk\\\"],smarttv:\\\"TV\\\",wearable:\\\"Watch\\\",xr:[\\\"VR\\\",\\\"XR\\\"],\\\"?\\\":[\\\"Desktop\\\",\\\"Unknown\\\"],\\\"*\\\":void 0},defaultRegexes={browser:[[/\\\\b(?:crmo|crios)\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,PREFIX_MOBILE+\\\"Chrome\\\"]],[/edg(?:e|ios|a)?\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"Edge\\\"]],[/(opera mini)\\\\/([-\\\\w\\\\.]+)/i,/(opera [mobiletab]{3,6})\\\\b.+version\\\\/([-\\\\w\\\\.]+)/i,/(opera)(?:.+version\\\\/|[\\\\/ ]+)([\\\\w\\\\.]+)/i],[NAME,VERSION],[/opios[\\\\/ ]+([\\\\w\\\\.]+)/i],[VERSION,[NAME,OPERA+\\\" Mini\\\"]],[/\\\\bop(?:rg)?x\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,OPERA+\\\" GX\\\"]],[/\\\\bopr\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,OPERA]],[/\\\\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\\\\/ ]?([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"Baidu\\\"]],[/\\\\b(?:mxbrowser|mxios|myie2)\\\\/?([-\\\\w\\\\.]*)\\\\b/i],[VERSION,[NAME,\\\"Maxthon\\\"]],[/(kindle)\\\\/([\\\\w\\\\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\\\\/ ]?([\\\\w\\\\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\\\\/ ]?([\\\\d\\\\.]*)/i,/(?:ms|\\\\()(ie) ([\\\\w\\\\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\\\\/([-\\\\w\\\\.]+)/i,/(heytap|ovi|115|surf)browser\\\\/([\\\\d\\\\.]+)/i,/(ecosia|weibo)(?:__| \\\\w+@)([\\\\d\\\\.]+)/i],[NAME,VERSION],[/quark(?:pc)?\\\\/([-\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"Quark\\\"]],[/\\\\bddg\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"DuckDuckGo\\\"]],[/(?:\\\\buc? ?browser|(?:juc.+)ucweb)[\\\\/ ]?([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"UCBrowser\\\"]],[/microm.+\\\\bqbcore\\\\/([\\\\w\\\\.]+)/i,/\\\\bqbcore\\\\/([\\\\w\\\\.]+).+microm/i,/micromessenger\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"WeChat\\\"]],[/konqueror\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"Konqueror\\\"]],[/trident.+rv[: ]([\\\\w\\\\.]{1,9})\\\\b.+like gecko/i],[VERSION,[NAME,\\\"IE\\\"]],[/ya(?:search)?browser\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"Yandex\\\"]],[/slbrowser\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"Smart \\\"+LENOVO+SUFFIX_BROWSER]],[/(avast|avg)\\\\/([\\\\w\\\\.]+)/i],[[NAME,/(.+)/,\\\"$1 Secure\\\"+SUFFIX_BROWSER],VERSION],[/\\\\bfocus\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,FIREFOX+\\\" Focus\\\"]],[/\\\\bopt\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,OPERA+\\\" Touch\\\"]],[/coc_coc\\\\w+\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"Coc Coc\\\"]],[/dolfin\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"Dolphin\\\"]],[/coast\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,OPERA+\\\" Coast\\\"]],[/miuibrowser\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"MIUI\\\"+SUFFIX_BROWSER]],[/fxios\\\\/([\\\\w\\\\.-]+)/i],[VERSION,[NAME,PREFIX_MOBILE+FIREFOX]],[/\\\\bqihoobrowser\\\\/?([\\\\w\\\\.]*)/i],[VERSION,[NAME,\\\"360\\\"]],[/\\\\b(qq)\\\\/([\\\\w\\\\.]+)/i],[[NAME,/(.+)/,\\\"$1Browser\\\"],VERSION],[/(oculus|sailfish|huawei|vivo|pico)browser\\\\/([\\\\w\\\\.]+)/i],[[NAME,/(.+)/,\\\"$1\\\"+SUFFIX_BROWSER],VERSION],[/samsungbrowser\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,SAMSUNG+\\\" Internet\\\"]],[/metasr[\\\\/ ]?([\\\\d\\\\.]+)/i],[VERSION,[NAME,SOGOU+\\\" Explorer\\\"]],[/(sogou)mo\\\\w+\\\\/([\\\\d\\\\.]+)/i],[[NAME,SOGOU+\\\" Mobile\\\"],VERSION],[/(electron)\\\\/([\\\\w\\\\.]+) safari/i,/(tesla)(?: qtcarbrowser|\\\\/(20\\\\d\\\\d\\\\.[-\\\\w\\\\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\\\\w*[\\\\/ ]?v?([\\\\w\\\\.]+)/i],[NAME,VERSION],[/(lbbrowser|rekonq)/i],[NAME],[/ome\\\\/([\\\\w\\\\.]+) \\\\w* ?(iron) saf/i,/ome\\\\/([\\\\w\\\\.]+).+qihu (360)[es]e/i],[VERSION,NAME],[/((?:fban\\\\/fbios|fb_iab\\\\/fb4a)(?!.+fbav)|;fbav\\\\/([\\\\w\\\\.]+);)/i],[[NAME,FACEBOOK],VERSION,[TYPE,INAPP]],[/(Klarna)\\\\/([\\\\w\\\\.]+)/i,/(kakao(?:talk|story))[\\\\/ ]([\\\\w\\\\.]+)/i,/(naver)\\\\(.*?(\\\\d+\\\\.[\\\\w\\\\.]+).*\\\\)/i,/(daum)apps[\\\\/ ]([\\\\w\\\\.]+)/i,/safari (line)\\\\/([\\\\w\\\\.]+)/i,/\\\\b(line)\\\\/([\\\\w\\\\.]+)\\\\/iab/i,/(alipay)client\\\\/([\\\\w\\\\.]+)/i,/(twitter)(?:and| f.+e\\\\/([\\\\w\\\\.]+))/i,/(instagram|snapchat)[\\\\/ ]([-\\\\w\\\\.]+)/i],[NAME,VERSION,[TYPE,INAPP]],[/\\\\bgsa\\\\/([\\\\w\\\\.]+) .*safari\\\\//i],[VERSION,[NAME,\\\"GSA\\\"],[TYPE,INAPP]],[/musical_ly(?:.+app_?version\\\\/|_)([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"TikTok\\\"],[TYPE,INAPP]],[/\\\\[(linkedin)app\\\\]/i],[NAME,[TYPE,INAPP]],[/(chromium)[\\\\/ ]([-\\\\w\\\\.]+)/i],[NAME,VERSION],[/headlesschrome(?:\\\\/([\\\\w\\\\.]+)| )/i],[VERSION,[NAME,CHROME+\\\" Headless\\\"]],[/ wv\\\\).+(chrome)\\\\/([\\\\w\\\\.]+)/i],[[NAME,CHROME+\\\" WebView\\\"],VERSION],[/droid.+ version\\\\/([\\\\w\\\\.]+)\\\\b.+(?:mobile safari|safari)/i],[VERSION,[NAME,\\\"Android\\\"+SUFFIX_BROWSER]],[/chrome\\\\/([\\\\w\\\\.]+) mobile/i],[VERSION,[NAME,PREFIX_MOBILE+\\\"Chrome\\\"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\\\/v?([\\\\w\\\\.]+)/i],[NAME,VERSION],[/version\\\\/([\\\\w\\\\.\\\\,]+) .*mobile(?:\\\\/\\\\w+ | ?)safari/i],[VERSION,[NAME,PREFIX_MOBILE+\\\"Safari\\\"]],[/iphone .*mobile(?:\\\\/\\\\w+ | ?)safari/i],[[NAME,PREFIX_MOBILE+\\\"Safari\\\"]],[/version\\\\/([\\\\w\\\\.\\\\,]+) .*(safari)/i],[VERSION,NAME],[/webkit.+?(mobile ?safari|safari)(\\\\/[\\\\w\\\\.]+)/i],[NAME,[VERSION,\\\"1\\\"]],[/(webkit|khtml)\\\\/([\\\\w\\\\.]+)/i],[NAME,VERSION],[/(?:mobile|tablet);.*(firefox)\\\\/([\\\\w\\\\.-]+)/i],[[NAME,PREFIX_MOBILE+FIREFOX],VERSION],[/(navigator|netscape\\\\d?)\\\\/([-\\\\w\\\\.]+)/i],[[NAME,\\\"Netscape\\\"],VERSION],[/(wolvic|librewolf)\\\\/([\\\\w\\\\.]+)/i],[NAME,VERSION],[/mobile vr; rv:([\\\\w\\\\.]+)\\\\).+firefox/i],[VERSION,[NAME,FIREFOX+\\\" Reality\\\"]],[/ekiohf.+(flow)\\\\/([\\\\w\\\\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\\\\/ ]?([\\\\w\\\\.\\\\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\\\/([-\\\\w\\\\.]+)$/i,/(firefox)\\\\/([\\\\w\\\\.]+)/i,/(mozilla)\\\\/([\\\\w\\\\.]+) .+rv\\\\:.+gecko\\\\/\\\\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\\\\. ]?browser)[-\\\\/ ]?v?([\\\\w\\\\.]+)/i,/\\\\b(links) \\\\(([\\\\w\\\\.]+)/i],[NAME,[VERSION,/_/g,\\\".\\\"]],[/(cobalt)\\\\/([\\\\w\\\\.]+)/i],[NAME,[VERSION,/[^\\\\d\\\\.]+./,EMPTY2]]],cpu:[[/\\\\b((amd|x|x86[-_]?|wow|win)64)\\\\b/i],[[ARCHITECTURE,\\\"amd64\\\"]],[/(ia32(?=;))/i,/\\\\b((i[346]|x)86)(pc)?\\\\b/i],[[ARCHITECTURE,\\\"ia32\\\"]],[/\\\\b(aarch64|arm(v?[89]e?l?|_?64))\\\\b/i],[[ARCHITECTURE,\\\"arm64\\\"]],[/\\\\b(arm(v[67])?ht?n?[fl]p?)\\\\b/i],[[ARCHITECTURE,\\\"armhf\\\"]],[/( (ce|mobile); ppc;|\\\\/[\\\\w\\\\.]+arm\\\\b)/i],[[ARCHITECTURE,\\\"arm\\\"]],[/((ppc|powerpc)(64)?)( mac|;|\\\\))/i],[[ARCHITECTURE,/ower/,EMPTY2,lowerize]],[/ sun4\\\\w[;\\\\)]/i],[[ARCHITECTURE,\\\"sparc\\\"]],[/\\\\b(avr32|ia64(?=;)|68k(?=\\\\))|\\\\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\\\\b|pa-risc)/i],[[ARCHITECTURE,lowerize]]],device:[[/\\\\b(sch-i[89]0\\\\d|shw-m380s|sm-[ptx]\\\\w{2,4}|gt-[pn]\\\\d{2,4}|sgh-t8[56]9|nexus 10)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,TABLET]],[/\\\\b((?:s[cgp]h|gt|sm)-(?![lr])\\\\w+|sc[g-]?[\\\\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\\\\w]+)/i,/sec-(sgh\\\\w+)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,MOBILE]],[/(?:\\\\/|\\\\()(ip(?:hone|od)[\\\\w, ]*)(?:\\\\/|;)/i],[MODEL,[VENDOR,APPLE],[TYPE,MOBILE]],[/\\\\((ipad);[-\\\\w\\\\),; ]+apple/i,/applecoremedia\\\\/[\\\\w\\\\.]+ \\\\((ipad)/i,/\\\\b(ipad)\\\\d\\\\d?,\\\\d\\\\d?[;\\\\]].+ios/i],[MODEL,[VENDOR,APPLE],[TYPE,TABLET]],[/(macintosh);/i],[MODEL,[VENDOR,APPLE]],[/\\\\b(sh-?[altvz]?\\\\d\\\\d[a-ekm]?)/i],[MODEL,[VENDOR,SHARP],[TYPE,MOBILE]],[/\\\\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\\\\)|;)/i],[MODEL,[VENDOR,HONOR],[TYPE,TABLET]],[/honor([-\\\\w ]+)[;\\\\)]/i],[MODEL,[VENDOR,HONOR],[TYPE,MOBILE]],[/\\\\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\\\\w\\\\. ]*(?= bui|\\\\)))\\\\b(?!.+d\\\\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,TABLET]],[/(?:huawei)([-\\\\w ]+)[;\\\\)]/i,/\\\\b(nexus 6p|\\\\w{2,4}e?-[atu]?[ln][\\\\dx][012359c][adn]?)\\\\b(?!.+d\\\\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,MOBILE]],[/oid[^\\\\)]+; (2[\\\\dbc]{4}(182|283|rp\\\\w{2})[cgl]|m2105k81a?c)(?: bui|\\\\))/i,/\\\\b((?:red)?mi[-_ ]?pad[\\\\w- ]*)(?: bui|\\\\))/i],[[MODEL,/_/g,\\\" \\\"],[VENDOR,XIAOMI],[TYPE,TABLET]],[/\\\\b(poco[\\\\w ]+|m2\\\\d{3}j\\\\d\\\\d[a-z]{2})(?: bui|\\\\))/i,/\\\\b; (\\\\w+) build\\\\/hm\\\\1/i,/\\\\b(hm[-_ ]?note?[_ ]?(?:\\\\d\\\\w)?) bui/i,/\\\\b(redmi[\\\\-_ ]?(?:note|k)?[\\\\w_ ]+)(?: bui|\\\\))/i,/oid[^\\\\)]+; (m?[12][0-389][01]\\\\w{3,6}[c-y])( bui|; wv|\\\\))/i,/\\\\b(mi[-_ ]?(?:a\\\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\\\d?\\\\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\\\\))/i,/ ([\\\\w ]+) miui\\\\/v?\\\\d/i],[[MODEL,/_/g,\\\" \\\"],[VENDOR,XIAOMI],[TYPE,MOBILE]],[/; (\\\\w+) bui.+ oppo/i,/\\\\b(cph[12]\\\\d{3}|p(?:af|c[al]|d\\\\w|e[ar])[mt]\\\\d0|x9007|a101op)\\\\b/i],[MODEL,[VENDOR,OPPO],[TYPE,MOBILE]],[/\\\\b(opd2(\\\\d{3}a?))(?: bui|\\\\))/i],[MODEL,[VENDOR,strMapper,{OnePlus:[\\\"304\\\",\\\"403\\\",\\\"203\\\"],\\\"*\\\":OPPO}],[TYPE,TABLET]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\\\\w\\\\+ ]*)(?: bui|\\\\))/i],[MODEL,[VENDOR,\\\"BLU\\\"],[TYPE,MOBILE]],[/; vivo (\\\\w+)(?: bui|\\\\))/i,/\\\\b(v[12]\\\\d{3}\\\\w?[at])(?: bui|;)/i],[MODEL,[VENDOR,\\\"Vivo\\\"],[TYPE,MOBILE]],[/\\\\b(rmx[1-3]\\\\d{3})(?: bui|;|\\\\))/i],[MODEL,[VENDOR,\\\"Realme\\\"],[TYPE,MOBILE]],[/\\\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\\\b[\\\\w ]+build\\\\//i,/\\\\bmot(?:orola)?[- ](\\\\w*)/i,/((?:moto(?! 360)[\\\\w\\\\(\\\\) ]+|xt\\\\d{3,4}|nexus 6)(?= bui|\\\\)))/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,MOBILE]],[/\\\\b(mz60\\\\d|xoom[2 ]{0,2}) build\\\\//i],[MODEL,[VENDOR,MOTOROLA],[TYPE,TABLET]],[/((?=lg)?[vl]k\\\\-?\\\\d{3}) bui| 3\\\\.[-\\\\w; ]{10}lg?-([06cv9]{3,4})/i],[MODEL,[VENDOR,LG],[TYPE,TABLET]],[/(lm(?:-?f100[nv]?|-[\\\\w\\\\.]+)(?= bui|\\\\))|nexus [45])/i,/\\\\blg[-e;\\\\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\\\\w+)/i,/\\\\blg-?([\\\\d\\\\w]+) bui/i],[MODEL,[VENDOR,LG],[TYPE,MOBILE]],[/(ideatab[-\\\\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\\\\d{3,4}(?:f[cu]|xu|[av])|yt\\\\d?-[jx]?\\\\d+[lfmx])( bui|;|\\\\)|\\\\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\\\\w- ]+?)|tb[\\\\w-]{6,7})( bui|;|\\\\)|\\\\/)/i],[MODEL,[VENDOR,LENOVO],[TYPE,TABLET]],[/(nokia) (t[12][01])/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(?:maemo|nokia).*(n900|lumia \\\\d+|rm-\\\\d+)/i,/nokia[-_ ]?(([-\\\\w\\\\. ]*))/i],[[MODEL,/_/g,\\\" \\\"],[TYPE,MOBILE],[VENDOR,\\\"Nokia\\\"]],[/(pixel (c|tablet))\\\\b/i],[MODEL,[VENDOR,GOOGLE],[TYPE,TABLET]],[/droid.+; (pixel[\\\\daxl ]{0,6})(?: bui|\\\\))/i],[MODEL,[VENDOR,GOOGLE],[TYPE,MOBILE]],[/droid.+; (a?\\\\d[0-2]{2}so|[c-g]\\\\d{4}|so[-gl]\\\\w+|xq-a\\\\w[4-7][12])(?= bui|\\\\).+chrome\\\\/(?![1-6]{0,1}\\\\d\\\\.))/i],[MODEL,[VENDOR,SONY],[TYPE,MOBILE]],[/sony tablet [ps]/i,/\\\\b(?:sony)?sgp\\\\w+(?: bui|\\\\))/i],[[MODEL,\\\"Xperia Tablet\\\"],[VENDOR,SONY],[TYPE,TABLET]],[/ (kb2005|in20[12]5|be20[12][59])\\\\b/i,/(?:one)?(?:plus)? (a\\\\d0\\\\d\\\\d)(?: b|\\\\))/i],[MODEL,[VENDOR,ONEPLUS],[TYPE,MOBILE]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\\\\w\\\\w)( bui|\\\\))/i,/(kf[a-z]+)( bui|\\\\)).+silk\\\\//i],[MODEL,[VENDOR,AMAZON],[TYPE,TABLET]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\\\\)).+silk\\\\//i],[[MODEL,/(.+)/g,\\\"Fire Phone $1\\\"],[VENDOR,AMAZON],[TYPE,MOBILE]],[/(playbook);[-\\\\w\\\\),; ]+(rim)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/\\\\b((?:bb[a-f]|st[hv])100-\\\\d)/i,/\\\\(bb10; (\\\\w+)/i],[MODEL,[VENDOR,BLACKBERRY],[TYPE,MOBILE]],[/(?:\\\\b|asus_)(transfo[prime ]{4,10} \\\\w+|eeepc|slider \\\\w+|nexus 7|padfone|p00[cj])/i],[MODEL,[VENDOR,ASUS],[TYPE,TABLET]],[/ (z[bes]6[027][012][km][ls]|zenfone \\\\d\\\\w?)\\\\b/i],[MODEL,[VENDOR,ASUS],[TYPE,MOBILE]],[/(nexus 9)/i],[MODEL,[VENDOR,\\\"HTC\\\"],[TYPE,TABLET]],[/(htc)[-;_ ]{1,2}([\\\\w ]+(?=\\\\)| bui)|\\\\w+)/i,/(zte)[- ]([\\\\w ]+?)(?: bui|\\\\/|\\\\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\\\\.))|sony(?!-bra))[-_ ]?([-\\\\w]*)/i],[VENDOR,[MODEL,/_/g,\\\" \\\"],[TYPE,MOBILE]],[/tcl (xess p17aa)/i,/droid [\\\\w\\\\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\\\\w(\\\\w|\\\\w\\\\w))?(\\\\)| bui)/i],[MODEL,[VENDOR,\\\"TCL\\\"],[TYPE,TABLET]],[/droid [\\\\w\\\\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\\\\w(\\\\w|\\\\w\\\\w))?(\\\\)| bui)/i],[MODEL,[VENDOR,\\\"TCL\\\"],[TYPE,MOBILE]],[/(itel) ((\\\\w+))/i],[[VENDOR,lowerize],MODEL,[TYPE,strMapper,{tablet:[\\\"p10001l\\\",\\\"w7001\\\"],\\\"*\\\":\\\"mobile\\\"}]],[/droid.+; ([ab][1-7]-?[0178a]\\\\d\\\\d?)/i],[MODEL,[VENDOR,\\\"Acer\\\"],[TYPE,TABLET]],[/droid.+; (m[1-5] note) bui/i,/\\\\bmz-([-\\\\w]{2,})/i],[MODEL,[VENDOR,\\\"Meizu\\\"],[TYPE,MOBILE]],[/; ((?:power )?armor(?:[\\\\w ]{0,8}))(?: bui|\\\\))/i],[MODEL,[VENDOR,\\\"Ulefone\\\"],[TYPE,MOBILE]],[/; (energy ?\\\\w+)(?: bui|\\\\))/i,/; energizer ([\\\\w ]+)(?: bui|\\\\))/i],[MODEL,[VENDOR,\\\"Energizer\\\"],[TYPE,MOBILE]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\\\\))/i],[MODEL,[VENDOR,\\\"Cat\\\"],[TYPE,MOBILE]],[/((?:new )?andromax[\\\\w- ]+)(?: bui|\\\\))/i],[MODEL,[VENDOR,\\\"Smartfren\\\"],[TYPE,MOBILE]],[/droid.+; (a(?:015|06[35]|142p?))/i],[MODEL,[VENDOR,\\\"Nothing\\\"],[TYPE,MOBILE]],[/; (x67 5g|tikeasy \\\\w+|ac[1789]\\\\d\\\\w+)( b|\\\\))/i,/archos ?(5|gamepad2?|([\\\\w ]*[t1789]|hello) ?\\\\d+[\\\\w ]*)( b|\\\\))/i],[MODEL,[VENDOR,\\\"Archos\\\"],[TYPE,TABLET]],[/archos ([\\\\w ]+)( b|\\\\))/i,/; (ac[3-6]\\\\d\\\\w{2,8})( b|\\\\))/i],[MODEL,[VENDOR,\\\"Archos\\\"],[TYPE,MOBILE]],[/(imo) (tab \\\\w+)/i,/(infinix) (x1101b?)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(blackberry|benq|palm(?=\\\\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\\\\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\\\\w\\\\+ ]+?)(?: bui|\\\\)|; r)/i,/(hp) ([\\\\w ]+\\\\w)/i,/(microsoft); (lumia[\\\\w ]+)/i,/(lenovo)[-_ ]?([-\\\\w ]+?)(?: bui|\\\\)|\\\\/)/i,/(oppo) ?([\\\\w ]+) bui/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kobo)\\\\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\\\\/([\\\\w\\\\.]+)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(surface duo)/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,TABLET]],[/droid [\\\\d\\\\.]+; (fp\\\\du?)(?: b|\\\\))/i],[MODEL,[VENDOR,\\\"Fairphone\\\"],[TYPE,MOBILE]],[/((?:tegranote|shield t(?!.+d tv))[\\\\w- ]*?)(?: b|\\\\))/i],[MODEL,[VENDOR,NVIDIA],[TYPE,TABLET]],[/(sprint) (\\\\w+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kin\\\\.[onetw]{3})/i],[[MODEL,/\\\\./g,\\\" \\\"],[VENDOR,MICROSOFT],[TYPE,MOBILE]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\\\\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,TABLET]],[/droid.+; (ec30|ps20|tc[2-8]\\\\d[kx])\\\\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,MOBILE]],[/smart-tv.+(samsung)/i],[VENDOR,[TYPE,SMARTTV]],[/hbbtv.+maple;(\\\\d+)/i],[[MODEL,/^/,\\\"SmartTV\\\"],[VENDOR,SAMSUNG],[TYPE,SMARTTV]],[/tcast.+(lg)e?. ([-\\\\w]+)/i],[VENDOR,MODEL,[TYPE,SMARTTV]],[/(nux; netcast.+smarttv|lg (netcast\\\\.tv-201\\\\d|android tv))/i],[[VENDOR,LG],[TYPE,SMARTTV]],[/(apple) ?tv/i],[VENDOR,[MODEL,APPLE+\\\" TV\\\"],[TYPE,SMARTTV]],[/crkey.*devicetype\\\\/chromecast/i],[[MODEL,CHROMECAST+\\\" Third Generation\\\"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/crkey.*devicetype\\\\/([^/]*)/i],[[MODEL,/^/,\\\"Chromecast \\\"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/fuchsia.*crkey/i],[[MODEL,CHROMECAST+\\\" Nest Hub\\\"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/crkey/i],[[MODEL,CHROMECAST],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/(portaltv)/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,SMARTTV]],[/droid.+aft(\\\\w+)( bui|\\\\))/i],[MODEL,[VENDOR,AMAZON],[TYPE,SMARTTV]],[/(shield \\\\w+ tv)/i],[MODEL,[VENDOR,NVIDIA],[TYPE,SMARTTV]],[/\\\\(dtv[\\\\);].+(aquos)/i,/(aquos-tv[\\\\w ]+)\\\\)/i],[MODEL,[VENDOR,SHARP],[TYPE,SMARTTV]],[/(bravia[\\\\w ]+)( bui|\\\\))/i],[MODEL,[VENDOR,SONY],[TYPE,SMARTTV]],[/(mi(tv|box)-?\\\\w+) bui/i],[MODEL,[VENDOR,XIAOMI],[TYPE,SMARTTV]],[/Hbbtv.*(technisat) (.*);/i],[VENDOR,MODEL,[TYPE,SMARTTV]],[/\\\\b(roku)[\\\\dx]*[\\\\)\\\\/]((?:dvp-)?[\\\\d\\\\.]*)/i,/hbbtv\\\\/\\\\d+\\\\.\\\\d+\\\\.\\\\d+ +\\\\([\\\\w\\\\+ ]*; *([\\\\w\\\\d][^;]*);([^;]*)/i],[[VENDOR,trim],[MODEL,trim],[TYPE,SMARTTV]],[/droid.+; ([\\\\w- ]+) (?:android tv|smart[- ]?tv)/i],[MODEL,[TYPE,SMARTTV]],[/\\\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\\\b/i],[[TYPE,SMARTTV]],[/(ouya)/i,/(nintendo) (\\\\w+)/i],[VENDOR,MODEL,[TYPE,CONSOLE]],[/droid.+; (shield)( bui|\\\\))/i],[MODEL,[VENDOR,NVIDIA],[TYPE,CONSOLE]],[/(playstation \\\\w+)/i],[MODEL,[VENDOR,SONY],[TYPE,CONSOLE]],[/\\\\b(xbox(?: one)?(?!; xbox))[\\\\); ]/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,CONSOLE]],[/\\\\b(sm-[lr]\\\\d\\\\d[0156][fnuw]?s?|gear live)\\\\b/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,WEARABLE]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\\\\w ]*)( bui|\\\\))/i],[VENDOR,MODEL,[TYPE,WEARABLE]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[MODEL,[VENDOR,OPPO],[TYPE,WEARABLE]],[/(watch)(?: ?os[,\\\\/]|\\\\d,\\\\d\\\\/)[\\\\d\\\\.]+/i],[MODEL,[VENDOR,APPLE],[TYPE,WEARABLE]],[/(opwwe\\\\d{3})/i],[MODEL,[VENDOR,ONEPLUS],[TYPE,WEARABLE]],[/(moto 360)/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,WEARABLE]],[/(smartwatch 3)/i],[MODEL,[VENDOR,SONY],[TYPE,WEARABLE]],[/(g watch r)/i],[MODEL,[VENDOR,LG],[TYPE,WEARABLE]],[/droid.+; (wt63?0{2,3})\\\\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,WEARABLE]],[/droid.+; (glass) \\\\d/i],[MODEL,[VENDOR,GOOGLE],[TYPE,XR]],[/(pico) (4|neo3(?: link|pro)?)/i],[VENDOR,MODEL,[TYPE,XR]],[/(quest( \\\\d| pro)?s?).+vr/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,XR]],[/(tesla)(?: qtcarbrowser|\\\\/[-\\\\w\\\\.]+)/i],[VENDOR,[TYPE,EMBEDDED]],[/(aeobc)\\\\b/i],[MODEL,[VENDOR,AMAZON],[TYPE,EMBEDDED]],[/(homepod).+mac os/i],[MODEL,[VENDOR,APPLE],[TYPE,EMBEDDED]],[/windows iot/i],[[TYPE,EMBEDDED]],[/droid .+?; ([^;]+?)(?: bui|; wv\\\\)|\\\\) applew).+?(mobile|vr|\\\\d) safari/i],[MODEL,[TYPE,strMapper,{mobile:\\\"Mobile\\\",xr:\\\"VR\\\",\\\"*\\\":TABLET}]],[/\\\\b((tablet|tab)[;\\\\/]|focus\\\\/\\\\d(?!.+mobile))/i],[[TYPE,TABLET]],[/(phone|mobile(?:[;\\\\/]| [ \\\\w\\\\/\\\\.]*safari)|pda(?=.+windows ce))/i],[[TYPE,MOBILE]],[/droid .+?; ([\\\\w\\\\. -]+)( bui|\\\\))/i],[MODEL,[VENDOR,\\\"Generic\\\"]]],engine:[[/windows.+ edge\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,EDGE+\\\"HTML\\\"]],[/(arkweb)\\\\/([\\\\w\\\\.]+)/i],[NAME,VERSION],[/webkit\\\\/537\\\\.36.+chrome\\\\/(?!27)([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"Blink\\\"]],[/(presto)\\\\/([\\\\w\\\\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\\\\/([\\\\w\\\\.]+)/i,/ekioh(flow)\\\\/([\\\\w\\\\.]+)/i,/(khtml|tasman|links)[\\\\/ ]\\\\(?([\\\\w\\\\.]+)/i,/(icab)[\\\\/ ]([23]\\\\.[\\\\d\\\\.]+)/i,/\\\\b(libweb)/i],[NAME,VERSION],[/ladybird\\\\//i],[[NAME,\\\"LibWeb\\\"]],[/rv\\\\:([\\\\w\\\\.]{1,9})\\\\b.+(gecko)/i],[VERSION,NAME]],os:[[/microsoft (windows) (vista|xp)/i],[NAME,VERSION],[/(windows (?:phone(?: os)?|mobile|iot))[\\\\/ ]?([\\\\d\\\\.\\\\w ]*)/i],[NAME,[VERSION,strMapper,windowsVersionMap]],[/windows nt 6\\\\.2; (arm)/i,/windows[\\\\/ ]([ntce\\\\d\\\\. ]+\\\\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\\\\d\\\\.]+)/i],[[VERSION,strMapper,windowsVersionMap],[NAME,WINDOWS]],[/[adehimnop]{4,7}\\\\b(?:.*os ([\\\\w]+) like mac|; opera)/i,/(?:ios;fbsv\\\\/|iphone.+ios[\\\\/ ])([\\\\d\\\\.]+)/i,/cfnetwork\\\\/.+darwin/i],[[VERSION,/_/g,\\\".\\\"],[NAME,\\\"iOS\\\"]],[/(mac os x) ?([\\\\w\\\\. ]*)/i,/(macintosh|mac_powerpc\\\\b)(?!.+haiku)/i],[[NAME,\\\"macOS\\\"],[VERSION,/_/g,\\\".\\\"]],[/android ([\\\\d\\\\.]+).*crkey/i],[VERSION,[NAME,CHROMECAST+\\\" Android\\\"]],[/fuchsia.*crkey\\\\/([\\\\d\\\\.]+)/i],[VERSION,[NAME,CHROMECAST+\\\" Fuchsia\\\"]],[/crkey\\\\/([\\\\d\\\\.]+).*devicetype\\\\/smartspeaker/i],[VERSION,[NAME,CHROMECAST+\\\" SmartSpeaker\\\"]],[/linux.*crkey\\\\/([\\\\d\\\\.]+)/i],[VERSION,[NAME,CHROMECAST+\\\" Linux\\\"]],[/crkey\\\\/([\\\\d\\\\.]+)/i],[VERSION,[NAME,CHROMECAST]],[/droid ([\\\\w\\\\.]+)\\\\b.+(android[- ]x86|harmonyos)/i],[VERSION,NAME],[/(ubuntu) ([\\\\w\\\\.]+) like android/i],[[NAME,/(.+)/,\\\"$1 Touch\\\"],VERSION],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\\\\w*[-\\\\/\\\\.; ]?([\\\\d\\\\.]*)/i],[NAME,VERSION],[/\\\\(bb(10);/i],[VERSION,[NAME,BLACKBERRY]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\\\\/ ]?([\\\\w\\\\.]*)/i],[VERSION,[NAME,\\\"Symbian\\\"]],[/mozilla\\\\/[\\\\d\\\\.]+ \\\\((?:mobile|tablet|tv|mobile; [\\\\w ]+); rv:.+ gecko\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,FIREFOX+\\\" OS\\\"]],[/web0s;.+rt(tv)/i,/\\\\b(?:hp)?wos(?:browser)?\\\\/([\\\\w\\\\.]+)/i],[VERSION,[NAME,\\\"webOS\\\"]],[/watch(?: ?os[,\\\\/]|\\\\d,\\\\d\\\\/)([\\\\d\\\\.]+)/i],[VERSION,[NAME,\\\"watchOS\\\"]],[/(cros) [\\\\w]+(?:\\\\)| ([\\\\w\\\\.]+)\\\\b)/i],[[NAME,\\\"Chrome OS\\\"],VERSION],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\\\\/(\\\\d+\\\\.[\\\\w\\\\.]+)/i,/(nintendo|playstation) (\\\\w+)/i,/(xbox); +xbox ([^\\\\);]+)/i,/(pico) .+os([\\\\w\\\\.]+)/i,/\\\\b(joli|palm)\\\\b ?(?:os)?\\\\/?([\\\\w\\\\.]*)/i,/(mint)[\\\\/\\\\(\\\\) ]?(\\\\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\\\/ ]?(?!chrom|package)([-\\\\w\\\\.]*)/i,/(hurd|linux)(?: arm\\\\w*| x86\\\\w*| ?)([\\\\w\\\\.]*)/i,/(gnu) ?([\\\\w\\\\.]*)/i,/\\\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\\\/ ]?(?!amd|[ix346]{1,2}86)([\\\\w\\\\.]*)/i,/(haiku) (\\\\w+)/i],[NAME,VERSION],[/(sunos) ?([\\\\w\\\\.\\\\d]*)/i],[[NAME,\\\"Solaris\\\"],VERSION],[/((?:open)?solaris)[-\\\\/ ]?([\\\\w\\\\.]*)/i,/(aix) ((\\\\d)(?=\\\\.|\\\\)| )[\\\\w\\\\.])*/i,/\\\\b(beos|os\\\\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\\\\w\\\\.]*)/i],[NAME,VERSION]]},defaultProps=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return setProps.call(e.init,[[UA_BROWSER,[NAME,VERSION,MAJOR,TYPE]],[UA_CPU,[ARCHITECTURE]],[UA_DEVICE,[TYPE,MODEL,VENDOR]],[UA_ENGINE,[NAME,VERSION]],[UA_OS,[NAME,VERSION]]]),setProps.call(e.isIgnore,[[UA_BROWSER,[VERSION,MAJOR]],[UA_ENGINE,[VERSION]],[UA_OS,[VERSION]]]),setProps.call(e.isIgnoreRgx,[[UA_BROWSER,/ ?browser$/i],[UA_OS,/ ?os$/i]]),setProps.call(e.toString,[[UA_BROWSER,[NAME,VERSION]],[UA_CPU,[ARCHITECTURE]],[UA_DEVICE,[VENDOR,MODEL]],[UA_ENGINE,[NAME,VERSION]],[UA_OS,[NAME,VERSION]]]),e}(),createIData=function(i,e){var E=defaultProps.init[e],r=defaultProps.isIgnore[e]||0,t=defaultProps.isIgnoreRgx[e]||0,o=defaultProps.toString[e]||0;function s(){setProps.call(this,E)}return s.prototype.getItem=function(){return i},s.prototype.withClientHints=function(){return NAVIGATOR_UADATA?NAVIGATOR_UADATA.getHighEntropyValues(CH_ALL_VALUES).then(function(e){return i.setCH(new UACHData(e,!1)).parseCH().get()}):i.parseCH().get()},s.prototype.withFeatureCheck=function(){return i.detectFeature().get()},e!=UA_RESULT&&(s.prototype.is=function(e){var i,E=!1;for(i in this)if(this.hasOwnProperty(i)&&!has(r,i)&&lowerize(t?strip(t,this[i]):this[i])==lowerize(t?strip(t,e):e)){if(E=!0,e!=UNDEF_TYPE)break}else if(e==UNDEF_TYPE&&E){E=!E;break}return E},s.prototype.toString=function(){var e,i=EMPTY2;for(e in o)typeof this[o[e]]!==UNDEF_TYPE&&(i+=(i?\\\" \\\":EMPTY2)+this[o[e]]);return i||UNDEF_TYPE}),NAVIGATOR_UADATA||(s.prototype.then=function(e){var i=this,E=function(){for(var e in i)i.hasOwnProperty(e)&&(this[e]=i[e])},E=(E.prototype={is:s.prototype.is,toString:s.prototype.toString},new E);return e(E),E}),new s};function UACHData(e,i){if(e=e||{},setProps.call(this,CH_ALL_VALUES),i)setProps.call(this,[[BRANDS,itemListToArray(e[CH_HEADER])],[FULLVERLIST,itemListToArray(e[CH_HEADER_FULL_VER_LIST])],[MOBILE,/\\\\?1/.test(e[CH_HEADER_MOBILE])],[MODEL,stripQuotes(e[CH_HEADER_MODEL])],[PLATFORM,stripQuotes(e[CH_HEADER_PLATFORM])],[PLATFORMVER,stripQuotes(e[CH_HEADER_PLATFORM_VER])],[ARCHITECTURE,stripQuotes(e[CH_HEADER_ARCH])],[FORMFACTORS,itemListToArray(e[CH_HEADER_FORM_FACTORS])],[BITNESS,stripQuotes(e[CH_HEADER_BITNESS])]]);else for(var E in e)this.hasOwnProperty(E)&&typeof e[E]!==UNDEF_TYPE&&(this[E]=e[E])}function UAItem(e,i,E,r){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,i){return this.data[e]=i,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(NAVIGATOR&&NAVIGATOR.userAgent==this.ua)switch(this.itemType){case UA_BROWSER:NAVIGATOR.brave&&typeof NAVIGATOR.brave.isBrave==FUNC_TYPE&&this.set(NAME,\\\"Brave\\\");break;case UA_DEVICE:!this.get(TYPE)&&NAVIGATOR_UADATA&&NAVIGATOR_UADATA[MOBILE]&&this.set(TYPE,MOBILE),\\\"Macintosh\\\"==this.get(MODEL)&&NAVIGATOR&&typeof NAVIGATOR.standalone!==UNDEF_TYPE&&NAVIGATOR.maxTouchPoints&&2<NAVIGATOR.maxTouchPoints&&this.set(MODEL,\\\"iPad\\\").set(TYPE,TABLET);break;case UA_OS:!this.get(NAME)&&NAVIGATOR_UADATA&&NAVIGATOR_UADATA[PLATFORM]&&this.set(NAME,NAVIGATOR_UADATA[PLATFORM]);break;case UA_RESULT:var i=this.data,e=function(e){return i[e].getItem().detectFeature().get()};this.set(UA_BROWSER,e(UA_BROWSER)).set(UA_CPU,e(UA_CPU)).set(UA_DEVICE,e(UA_DEVICE)).set(UA_ENGINE,e(UA_ENGINE)).set(UA_OS,e(UA_OS))}return this},this.parseUA=function(){return this.itemType!=UA_RESULT&&rgxMapper.call(this.data,this.ua,this.rgxMap),this.itemType==UA_BROWSER&&this.set(MAJOR,majorize(this.get(VERSION))),this},this.parseCH=function(){var e,i=this.uaCH,E=this.rgxMap;switch(this.itemType){case UA_BROWSER:case UA_ENGINE:var r,t=i[FULLVERLIST]||i[BRANDS];if(t)for(var o in t){var s=t[o].brand||t[o],o=t[o].version;this.itemType!=UA_BROWSER||/not.a.brand/i.test(s)||r&&(!/chrom/i.test(r)||s==CHROMIUM)||(s=strMapper(s,{Chrome:\\\"Google Chrome\\\",Edge:\\\"Microsoft Edge\\\",\\\"Chrome WebView\\\":\\\"Android WebView\\\",\\\"Chrome Headless\\\":\\\"HeadlessChrome\\\",\\\"Huawei Browser\\\":\\\"HuaweiBrowser\\\",\\\"MIUI Browser\\\":\\\"Miui Browser\\\",\\\"Opera Mobi\\\":\\\"OperaMobile\\\",Yandex:\\\"YaBrowser\\\"}),this.set(NAME,s).set(VERSION,o).set(MAJOR,majorize(o)),r=s),this.itemType==UA_ENGINE&&s==CHROMIUM&&this.set(VERSION,o)}break;case UA_CPU:var a=i[ARCHITECTURE];a&&(\\\"64\\\"==i[BITNESS]&&(a+=\\\"64\\\"),rgxMapper.call(this.data,a+\\\";\\\",E));break;case UA_DEVICE:if(i[MOBILE]&&this.set(TYPE,MOBILE),i[MODEL]&&(this.set(MODEL,i[MODEL]),this.get(TYPE)&&this.get(VENDOR)||(rgxMapper.call(a={},\\\"droid 9; \\\"+i[MODEL]+\\\")\\\",E),!this.get(TYPE)&&a.type&&this.set(TYPE,a.type),!this.get(VENDOR)&&a.vendor&&this.set(VENDOR,a.vendor))),i[FORMFACTORS]){if(\\\"string\\\"!=typeof i[FORMFACTORS])for(var n=0;!e&&n<i[FORMFACTORS].length;)e=strMapper(i[FORMFACTORS][n++],formFactorsMap);else e=strMapper(i[FORMFACTORS],formFactorsMap);this.set(TYPE,e)}break;case UA_OS:var O,a=i[PLATFORM];a&&(O=i[PLATFORMVER],a==WINDOWS&&(O=13<=parseInt(majorize(O),10)?\\\"11\\\":\\\"10\\\"),this.set(NAME,a).set(VERSION,O)),this.get(NAME)==WINDOWS&&\\\"Xbox\\\"==i[MODEL]&&this.set(NAME,\\\"Xbox\\\").set(VERSION,void 0);break;case UA_RESULT:var A=this.data,a=function(e){return A[e].getItem().setCH(i).parseCH().get()};this.set(UA_BROWSER,a(UA_BROWSER)).set(UA_CPU,a(UA_CPU)).set(UA_DEVICE,a(UA_DEVICE)).set(UA_ENGINE,a(UA_ENGINE)).set(UA_OS,a(UA_OS))}return this},setProps.call(this,[[\\\"itemType\\\",e],[\\\"ua\\\",i],[\\\"uaCH\\\",r],[\\\"rgxMap\\\",E],[\\\"data\\\",createIData(this,e)]]),this}function UAParser(e,i,E){var r,t,o,s,a;return typeof e===OBJ_TYPE?(i=isExtensions(e,!0)?(typeof i===OBJ_TYPE&&(E=i),e):void(E=e),e=void 0):typeof e!==STR_TYPE||isExtensions(i,!0)||(E=i,i=void 0),E&&typeof E.append===FUNC_TYPE&&(r={},E.forEach(function(e,i){r[i]=e}),E=r),this instanceof UAParser?(t=typeof e===STR_TYPE?e:E&&E[USER_AGENT]?E[USER_AGENT]:NAVIGATOR&&NAVIGATOR.userAgent?NAVIGATOR.userAgent:EMPTY2,o=new UACHData(E,!0),s=i?extend(defaultRegexes,i):defaultRegexes,setProps.call(this,[[\\\"getBrowser\\\",(a=function(e){return e==UA_RESULT?function(){return new UAItem(e,t,s,o).set(\\\"ua\\\",t).set(UA_BROWSER,this.getBrowser()).set(UA_CPU,this.getCPU()).set(UA_DEVICE,this.getDevice()).set(UA_ENGINE,this.getEngine()).set(UA_OS,this.getOS()).get()}:function(){return new UAItem(e,t,s[e],o).parseUA().get()}})(UA_BROWSER)],[\\\"getCPU\\\",a(UA_CPU)],[\\\"getDevice\\\",a(UA_DEVICE)],[\\\"getEngine\\\",a(UA_ENGINE)],[\\\"getOS\\\",a(UA_OS)],[\\\"getResult\\\",a(UA_RESULT)],[\\\"getUA\\\",function(){return t}],[\\\"setUA\\\",function(e){return isString(e)&&(t=e.length>UA_MAX_LENGTH?trim(e,UA_MAX_LENGTH):e),this}]]).setUA(t),this):new UAParser(e,i,E).getResult()}UAParser.VERSION=LIBVERSION,UAParser.BROWSER=enumerize([NAME,VERSION,MAJOR,TYPE]),UAParser.CPU=enumerize([ARCHITECTURE]),UAParser.DEVICE=enumerize([MODEL,VENDOR,TYPE,CONSOLE,MOBILE,SMARTTV,TABLET,WEARABLE,EMBEDDED]),UAParser.ENGINE=UAParser.OS=enumerize([NAME,VERSION]);var getLoopInterval=()=>1e3*(Number($tw.wiki.getTiddlerText(\\\"$:/plugins/linonetwo/tw-mobile-sync/Config/SyncInterval\\\"))||3),ClientInfoStore=class{#clients={};constructor(){var e=getLoopInterval();const E=2*e*60,r=10*e*60;this.loopHandel=setInterval(()=>{Object.keys(this.#clients).forEach(e=>{var i=this.#clients[e].timestamp;!i||Date.now()-i>r?delete this.#clients[e]:Date.now()-i>E&&(this.#clients[e].state=\\\"offline\\\")})},e)}get allClient(){return esm_default(this.#clients)}updateClient(e,i){this.#clients[e]={...this.#clients[e],...i};var E,r,t=this.#clients[e][\\\"User-Agent\\\"];t?(E=(t=UAParser(t)).device.model,r=t.os.name,this.#clients[e].name=E??t.browser.name??this.#clients[e].Origin,this.#clients[e].model=E,this.#clients[e].os=r):this.#clients[e].name=this.#clients[e].Origin}};module.exports.store=new ClientInfoStore;\"},\"$:/plugins/linonetwo/tw-mobile-sync/client-info-endpoint.js\":{\"creator\":\"LinOnetwo\",\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/client-info-endpoint.js\",\"type\":\"application/javascript\",\"module-type\":\"route\",\"Modern.TiddlyDev#Origin\":\"server/TidGi-Mobile/client-info-endpoint.ts\",\"text\":\"\\\"use strict\\\";exports.method=\\\"GET\\\",exports.path=/^\\\\/tw-mobile-sync\\\\/client-info$/;var handler=function handler2(e,n,t){var o=require(\\\"$:/plugins/linonetwo/tw-mobile-sync/clientInfoStore.js\\\").store,o=JSON.stringify(o.allClient);n.setHeader(\\\"Access-Control-Allow-Origin\\\",\\\"*\\\"),n.writeHead(200,{\\\"Content-Type\\\":\\\"application/json\\\"}),n.end(o,\\\"utf8\\\")};exports.handler=handler;\"},\"$:/plugins/linonetwo/tw-mobile-sync/server-get-non-skinny-tiddlywiki-tiddler-store-script-endpoint.js\":{\"creator\":\"LinOnetwo\",\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/server-get-non-skinny-tiddlywiki-tiddler-store-script-endpoint.js\",\"type\":\"application/javascript\",\"module-type\":\"route\",\"Modern.TiddlyDev#Origin\":\"server/TidGi-Mobile/server-get-non-skinny-tiddlywiki-tiddler-store-script-endpoint.ts\",\"text\":\"\\\"use strict\\\";exports.method=\\\"GET\\\",exports.path=/^\\\\/tw-mobile-sync\\\\/get-non-skinny-tiddlywiki-tiddler-store-script$/;var templateName=\\\"$:/plugins/linonetwo/tw-mobile-sync/templates/save/save-lazy-all-non-skinny-tiddlywiki-tiddler-store\\\",handler=function handler2(e,t,n){t.setHeader(\\\"Access-Control-Allow-Origin\\\",\\\"*\\\");var i=n.wiki.renderTiddler(\\\"text/plain\\\",templateName);try{t.writeHead(200,{\\\"Content-Type\\\":\\\"application/json\\\",\\\"Content-Length\\\":Buffer.byteLength(i)}),t.end(i,\\\"utf8\\\")}catch(a){t.writeHead(500),t.end(`Failed to render tiddlers using ${templateName} , ${a.message} `+(a.stack??\\\"\\\"),\\\"utf8\\\")}};exports.handler=handler;\"},\"$:/plugins/linonetwo/tw-mobile-sync/server-get-skinny-html-endpoint.js\":{\"creator\":\"LinOnetwo\",\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/server-get-skinny-html-endpoint.js\",\"type\":\"application/javascript\",\"module-type\":\"route\",\"Modern.TiddlyDev#Origin\":\"server/TidGi-Mobile/server-get-skinny-html-endpoint.ts\",\"text\":\"\\\"use strict\\\";exports.method=\\\"GET\\\",exports.path=/^\\\\/tw-mobile-sync\\\\/get-skinny-html$/;var templateName=\\\"$:/plugins/linonetwo/tw-mobile-sync/templates/save/lazy-all\\\",handler=function handler2(e,t,r){t.setHeader(\\\"Access-Control-Allow-Origin\\\",\\\"*\\\");var n=r.server.get(\\\"root-render-type\\\")??\\\"text/plain\\\",a=r.wiki.renderTiddler(n,templateName,{variables:{}});try{t.writeHead(200,{\\\"Content-Type\\\":r.server.get(\\\"root-serve-type\\\")??n,\\\"Content-Length\\\":Buffer.byteLength(a)}),t.end(a,\\\"utf8\\\")}catch(l){t.writeHead(500),t.end(`Failed to render tiddlers using ${templateName} , ${l.message} `+(l.stack??\\\"\\\"),\\\"utf8\\\")}};exports.handler=handler;\"},\"$:/plugins/linonetwo/tw-mobile-sync/server-get-skinny-json-endpoint.js\":{\"creator\":\"LinOnetwo\",\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/server-get-skinny-json-endpoint.js\",\"type\":\"application/javascript\",\"module-type\":\"route\",\"Modern.TiddlyDev#Origin\":\"server/TidGi-Mobile/server-get-skinny-json-endpoint.ts\",\"text\":\"\\\"use strict\\\";exports.method=\\\"GET\\\",exports.path=/^\\\\/tw-mobile-sync\\\\/get-skinny-tiddlywiki-tiddler-store-script$/;var templateName=\\\"$:/plugins/linonetwo/tw-mobile-sync/templates/save/save-lazy-all-skinny-tiddler-store\\\",handler=function handler2(e,t,n){t.setHeader(\\\"Access-Control-Allow-Origin\\\",\\\"*\\\");var a=n.wiki.renderTiddler(\\\"text/plain\\\",templateName);try{t.writeHead(200,{\\\"Content-Type\\\":\\\"application/json\\\",\\\"Content-Length\\\":Buffer.byteLength(a)}),t.end(a,\\\"utf8\\\")}catch(r){t.writeHead(500),t.end(`Failed to render tiddlers using ${templateName} , ${r?.message} `+(r?.stack??\\\"\\\"),\\\"utf8\\\")}};exports.handler=handler;\"},\"$:/plugins/linonetwo/tw-mobile-sync/server-get-skinny-tiddlers-text-endpoint.js\":{\"creator\":\"LinOnetwo\",\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/server-get-skinny-tiddlers-text-endpoint.js\",\"type\":\"application/javascript\",\"module-type\":\"route\",\"Modern.TiddlyDev#Origin\":\"server/TidGi-Mobile/server-get-skinny-tiddlers-text-endpoint.ts\",\"text\":\"\\\"use strict\\\";var import_stream=require(\\\"stream\\\"),handler=(exports.method=\\\"GET\\\",exports.path=/^\\\\/tw-mobile-sync\\\\/get-skinny-tiddler-text\\\\/(.+)$/,function handler2(e,t,i){t.setHeader(\\\"Access-Control-Allow-Origin\\\",\\\"*\\\");var r=i.params?.[0];let n=\\\"[!is[system]] -[type[application/javascript]] -[is[binary]]\\\";r?.trim?.()&&(n=$tw.utils.decodeURIComponentSafe(r).trim());var r=i.wiki.filterTiddlers(n),r=import_stream.Readable.from(r),a=new import_stream.Transform({objectMode:!0,transform(e,t,r){r(null,JSON.stringify({title:e,text:i.wiki.getTiddlerText(e)})+\\\"\\\\n\\\")}});try{t.writeHead(200,{\\\"Content-Type\\\":\\\"application/json\\\"}),(0,import_stream.pipeline)(r,a,t,e=>{null!=e&&(console.error(\\\"Pipeline error:\\\",e),t.headersSent||t.writeHead(500,{\\\"Content-Type\\\":\\\"text/plain\\\"}),t.end(`Failed to render tiddlers with stream , ${e?.message} `+(e?.stack??\\\"\\\")))})}catch(s){t.headersSent||t.writeHead(500,{\\\"Content-Type\\\":\\\"text/plain\\\"}),console.error(\\\"Catch error:\\\",s),t.end(`Failed to render tiddlers in get-skinny-tiddler-text , ${s?.message} `+(s?.stack??\\\"\\\"))}});exports.handler=handler;\"},\"$:/plugins/linonetwo/tw-mobile-sync/server-get-tiddler-text-endpoint.js\":{\"creator\":\"LinOnetwo\",\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/server-get-tiddler-text-endpoint.js\",\"type\":\"application/javascript\",\"module-type\":\"route\",\"Modern.TiddlyDev#Origin\":\"server/TidGi-Mobile/server-get-tiddler-text-endpoint.ts\",\"text\":\"\\\"use strict\\\";exports.method=\\\"GET\\\",exports.path=/^\\\\/tw-mobile-sync\\\\/get-tiddler-text\\\\/(.+)$/;var handler=function handler2(e,t,r){t.setHeader(\\\"Access-Control-Allow-Origin\\\",\\\"*\\\");var d=r.params?.[0];if(d){var d=$tw.utils.decodeURIComponentSafe(d),i=r.wiki.getTiddlerText(d);if(i)try{t.writeHead(200,{\\\"Content-Type\\\":\\\"text/text\\\",\\\"Content-Length\\\":Buffer.byteLength(i)}),t.end(i,\\\"utf8\\\")}catch(n){t.writeHead(500),t.end(`Failed to get tiddler text for ${d} , ${n?.message} `+(n?.stack??\\\"\\\"),\\\"utf8\\\")}else t.writeHead(404),t.end(\\\"No text for \\\"+d,\\\"utf8\\\")}else t.writeHead(400),t.end(\\\"No title in tw-mobile-sync/get-tiddler-text/{title}\\\",\\\"utf8\\\")};exports.handler=handler;\"},\"$:/plugins/linonetwo/tw-mobile-sync/server-sync-v1-endpoint.js\":{\"creator\":\"LinOnetwo\",\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/server-sync-v1-endpoint.js\",\"type\":\"application/javascript\",\"module-type\":\"route\",\"Modern.TiddlyDev#Origin\":\"server/TidGi-Mobile/server-sync-v1-endpoint.ts\",\"text\":\"\\\"use strict\\\";var tiddlersToNotSync,prefixToNotSync,__create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__esm=(e,t)=>function(){return t=e?(0,e[__getOwnPropNames(e)[0]])(e=0):t},__commonJS=(e,t)=>function(){return t||(0,e[__getOwnPropNames(e)[0]])((t={exports:{}}).exports,t),t.exports},__copyProps=(t,i,r,o)=>{if(i&&\\\"object\\\"==typeof i||\\\"function\\\"==typeof i)for(let e of __getOwnPropNames(i))__hasOwnProp.call(t,e)||e===r||__defProp(t,e,{get:()=>i[e],enumerable:!(o=__getOwnPropDesc(i,e))||o.enumerable});return t},__toESM=(e,t,i)=>(i=null!=e?__create(__getProtoOf(e)):{},__copyProps(!t&&e&&e.__esModule?i:__defProp(i,\\\"default\\\",{value:e,enumerable:!0}),e)),init_esbuild_inject=__esm({\\\"node_modules/.pnpm/tiddlywiki-plugin-dev@0.3.2_postcss-load-config@4.0.1_postcss@8.5.3_ts-node@10.9.2_@typ_d361acc54fced183d1b0e26480ffeedb/node_modules/tiddlywiki-plugin-dev/dist/js/esbuild-inject.js\\\"(){}}),require_baseSlice=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js\\\"(e,t){init_esbuild_inject(),t.exports=function(e,t,i){for(var r=-1,o=e.length,n=((i=o<i?o:i)<0&&(i+=o),o=i<(t=t<0?o<-t?0:o+t:t)?0:i-t>>>0,t>>>=0,Array(o));++r<o;)n[r]=e[r+t];return n}}}),require_trimmedEndIndex=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js\\\"(e,t){init_esbuild_inject();var i=/\\\\s/;t.exports=function(e){for(var t=e.length;t--&&i.test(e.charAt(t)););return t}}}),require_baseTrim=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js\\\"(e,t){init_esbuild_inject();var i=require_trimmedEndIndex(),r=/^\\\\s+/;t.exports=function(e){return e&&e.slice(0,i(e)+1).replace(r,\\\"\\\")}}}),require_isObject=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js\\\"(e,t){init_esbuild_inject(),t.exports=function(e){var t=typeof e;return null!=e&&(\\\"object\\\"==t||\\\"function\\\"==t)}}}),require_freeGlobal=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js\\\"(e,t){init_esbuild_inject();var i=\\\"object\\\"==typeof global&&global&&global.Object===Object&&global;t.exports=i}}),require_root=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js\\\"(e,t){init_esbuild_inject();var i=require_freeGlobal(),r=\\\"object\\\"==typeof self&&self&&self.Object===Object&&self,i=i||r||Function(\\\"return this\\\")();t.exports=i}}),require_Symbol=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js\\\"(e,t){init_esbuild_inject();var i=require_root().Symbol;t.exports=i}}),require_getRawTag=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js\\\"(e,t){init_esbuild_inject();var i=require_Symbol(),r=Object.prototype,d=r.hasOwnProperty,s=r.toString,l=i?i.toStringTag:void 0;t.exports=function(e){var t=d.call(e,l),i=e[l];try{var r=!(e[l]=void 0)}catch(n){}var o=s.call(e);return r&&(t?e[l]=i:delete e[l]),o}}}),require_objectToString=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js\\\"(e,t){init_esbuild_inject();var i=Object.prototype.toString;t.exports=function(e){return i.call(e)}}}),require_baseGetTag=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js\\\"(e,t){init_esbuild_inject();var i=require_Symbol(),r=require_getRawTag(),o=require_objectToString(),n=i?i.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?\\\"[object Undefined]\\\":\\\"[object Null]\\\":(n&&n in Object(e)?r:o)(e)}}}),require_isObjectLike=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js\\\"(e,t){init_esbuild_inject(),t.exports=function(e){return null!=e&&\\\"object\\\"==typeof e}}}),require_isSymbol=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js\\\"(e,t){init_esbuild_inject();var i=require_baseGetTag(),r=require_isObjectLike();t.exports=function(e){return\\\"symbol\\\"==typeof e||r(e)&&\\\"[object Symbol]\\\"==i(e)}}}),require_toNumber=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js\\\"(e,t){init_esbuild_inject();var i=require_baseTrim(),r=require_isObject(),o=require_isSymbol(),n=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;t.exports=function(e){if(\\\"number\\\"==typeof e)return e;if(o(e))return NaN;if(r(e)&&(t=\\\"function\\\"==typeof e.valueOf?e.valueOf():e,e=r(t)?t+\\\"\\\":t),\\\"string\\\"!=typeof e)return 0===e?e:+e;e=i(e);var t=d.test(e);return t||s.test(e)?l(e.slice(2),t?2:8):n.test(e)?NaN:+e}}}),require_toFinite=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js\\\"(e,t){init_esbuild_inject();var i=require_toNumber();t.exports=function(e){return e?(e=i(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}}}),require_toInteger=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toInteger.js\\\"(e,t){init_esbuild_inject();var r=require_toFinite();t.exports=function(e){var t=r(e),i=t%1;return t==t?i?t-i:t:0}}}),require_take=__commonJS({\\\"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/take.js\\\"(e,t){init_esbuild_inject();var r=require_baseSlice(),o=require_toInteger();t.exports=function(e,t,i){return e&&e.length?(t=i||void 0===t?1:o(t),r(e,0,t<0?0:t)):[]}}}),filterOutNotSyncedTiddlers=(init_esbuild_inject(),init_esbuild_inject(),e=>(void 0!==tiddlersToNotSync&&void 0!==prefixToNotSync||(tiddlersToNotSync=new Set($tw.utils.parseStringArray($tw.wiki.getTiddlerText(\\\"$:/plugins/linonetwo/tw-mobile-sync/Config/TiddlersToNotSync\\\")??\\\"\\\")),prefixToNotSync=$tw.utils.parseStringArray($tw.wiki.getTiddlerText(\\\"$:/plugins/linonetwo/tw-mobile-sync/Config/TiddlersPrefixToNotSync\\\")??\\\"\\\")),e.filter(t=>!prefixToNotSync.some(e=>t.title.startsWith(e))).filter(e=>!tiddlersToNotSync.has(e.title))));function mergeTiddler(e,t){if(e.title!==t.title)throw new Error(`Cannot merge tiddlers with different titles: ${e.title} and `+t.title);var i=!e.modified||!t.modified||e.modified>t.modified?e:t,r=isBinaryTiddler(e),o=isBinaryTiddler(t);return!r&&!o||o?i:!leftIsBinaryRightIsString(r,o)&&leftIsBinaryRightIsString(o,r)?t:e}function leftIsBinaryRightIsString(e,t){return!(!e||t)}function isBinaryTiddler(e){var t=$tw.config.contentTypeInfo[e.type||\\\"text/vnd.tiddlywiki\\\"];return!!t&&\\\"base64\\\"===t.encoding}function pad(e){return e<10?\\\"0\\\"+e:String(e)}function toTWUTCString(e){return\\\"\\\"+e.getUTCFullYear()+pad(e.getUTCMonth()+1)+pad(e.getUTCDate())+pad(e.getUTCHours())+pad(e.getUTCMinutes())+pad(e.getUTCSeconds())+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)}init_esbuild_inject(),init_esbuild_inject(),init_esbuild_inject();var import_take=__toESM(require_take());function getSyncedTiddlersText(e,t,i,r){var o=e=>(0,import_take[\\\"default\\\"])(e,5).join(\\\" \\\"),n=e=>5<e.length?`And ${e.length-5} more`:\\\"\\\",d=o(e.map(e=>e.caption??e.title)),s=n(e.map(e=>e.title)),l=o(t.map(e=>e.caption??e.title)),a=n(t.map(e=>e.title)),_=o(i.client),c=n(i.client),o=o(i.server),n=n(i.server),u=r?.reverse?\\\"↓\\\":\\\"↑\\\",m=r?.reverse?\\\"↑\\\":\\\"↓\\\";return u+` ${e.length} ${m} `+t.length+(0<e.length?`\\n\\n${u}: ${d} `+s:\\\"\\\")+(0<t.length?`\\n\\n${m}: ${l} `+a:\\\"\\\")+(0<i.client.length?`\\n\\nDeleted on Client: ${_} `+c:\\\"\\\")+(0<i.server.length?`\\n\\nDeleted on Server: ${o} `+n:\\\"\\\")}function getServerChangeFilter(e){return`[all[]] :filter[get[modified]compare:date:gt[${e??\\\"\\\"}]]`}function getClientInfo(e,t=\\\"online\\\"){return{Origin:e.headers.origin??e.headers.referer,\\\"User-Agent\\\":e.headers[\\\"user-agent\\\"],timestamp:Date.now(),state:t}}init_esbuild_inject(),init_esbuild_inject(),init_esbuild_inject(),exports.method=\\\"POST\\\",exports.path=/^\\\\/tw-mobile-sync\\\\/sync$/;var handler=function handler2(e,t,d){if(t.setHeader(\\\"Access-Control-Allow-Origin\\\",\\\"*\\\"),\\\"yes\\\"===d.wiki.getTiddlerText(\\\"$:/info/tidgi/readOnlyMode\\\"))t.writeHead(401),t.end(\\\"Don't sync back to readonly server.\\\",\\\"utf8\\\");else try{var i=$tw.utils.parseJSONSafe(d.data),r=i.tiddlers,{deleted:o=[],lastSync:n}=i;if(n){Array.isArray(r)||(t.writeHead(400,{\\\"Content-Type\\\":\\\"application/json\\\"}),t.end(\\\"Bad request body, not a tiddler list. \\\"+String(r),\\\"utf8\\\"));const f=new Date(n);console.log(`clientLastSyncJSDateNow ${n} clientLastSyncDate ${String(f)} `);var s=toTWUTCString(f),r=filterOutNotSyncedTiddlers(r);const g={updates:[],deletes:[]},b=new Set;var l=getServerChangeFilter(s),a=d.wiki.compileFilter(l)()??[],_=(console.log(`serverChangedTiddlersFilter: ${l} serverChangedTiddlers: [${a.join(\\\", \\\")}]`),filterOutNotSyncedTiddlers(a.map(e=>d.wiki.getTiddler(e)).filter(e=>void 0!==e).map(e=>e.fields))),c=[],u=(o.forEach(e=>{d.wiki.deleteTiddler(e),g.deletes.push(e)}),r.forEach(e=>{var t=e.title;b.add(t);try{var i,r,o=d.wiki.getTiddler(t);o&&o.fields.modified&&e.modified?o.fields.modified>f?(i=mergeTiddler(new $tw.Tiddler(e).fields,o.fields),r=new $tw.Tiddler(i).getFieldStrings(),g.updates.push(r),d.wiki.addTiddler(i)):(new $tw.Tiddler(e).fields.modified>o.fields.modified||console.log(`Unhandled case: ${t} \\nwhere ${String(new $tw.Tiddler(e).fields.modified)} > ${o?.fields?.modified} is `+String(new $tw.Tiddler(e).fields.modified>(o?.fields?.modified??0)),e,o?.fields),d.wiki.addTiddler(e)):d.wiki.addTiddler(e)}catch(n){console.error(\\\"Error when processing tiddler\\\",e,n)}}),console.log(\\\"Before process serverUpdatedTiddlerFields, processedTiddlerTitles \\\"+[...b].join(\\\", \\\")),_.forEach(e=>{var t;b.has(e.title)||(t=new $tw.Tiddler(e).getFieldStrings(),g.updates.push(t))}),c.forEach(e=>{b.has(e)||g.deletes.push(e)}),t.writeHead(201,{\\\"Content-Type\\\":\\\"application/json\\\"}),t.end(JSON.stringify(g),\\\"utf8\\\"),require(\\\"$:/plugins/linonetwo/tw-mobile-sync/clientInfoStore.js\\\").store),m=getClientInfo(e,\\\"onlineActive\\\");void 0!==m[\\\"User-Agent\\\"]&&u.updateClient(m[\\\"User-Agent\\\"],{...m,recentlySyncedString:getSyncedTiddlersText(r,_,{client:o,server:c},{reverse:!0})})}else t.writeHead(400),t.end(\\\"Need to provide lastSync field to calculate diff.\\\",\\\"utf8\\\")}catch(p){t.writeHead(500),t.end(`Failed to add tiddlers ${p.message} `+(p.stack??\\\"\\\"),\\\"utf8\\\")}};exports.handler=handler;\"},\"$:/plugins/linonetwo/tw-mobile-sync/browser-background-sync.js\":{\"creator\":\"LinOnetwo\",\"title\":\"$:/plugins/linonetwo/tw-mobile-sync/browser-background-sync.js\",\"type\":\"application/javascript\",\"module-type\":\"startup\",\"Modern.TiddlyDev#Origin\":\"ui/Sidebar/browser-background-sync.ts\",\"text\":\"\\\"use strict\\\";var clientStatusStateTiddlerTitle=\\\"$:/state/tw-mobile-sync/clientStatus\\\",getLoopInterval=()=>1e3*(Number($tw.wiki.getTiddlerText(\\\"$:/plugins/linonetwo/tw-mobile-sync/Config/SyncInterval\\\"))||3),clientInfoRoute=\\\"tw-mobile-sync/client-info\\\";function getClientInfoPoint(t){return\\\"\\\"+(t??location.host)+clientInfoRoute}exports.name=\\\"tw-mobile-sync-browser-background-sync\\\",exports.platforms=[\\\"browser\\\"],exports.after=[\\\"render\\\"],exports.synchronous=!0;var BackgroundSyncManager=class{constructor(){this.lock=!1,this.loopInterval=getLoopInterval()}async start(){\\\"yes\\\"!==$tw.wiki.getTiddlerText(\\\"$:/info/tidgi-mobile\\\")&&(void 0!==this.loop&&(clearInterval(this.loop),this.lock=!1),await this.getConnectedClientStatus(),this.loop=setInterval(()=>this.getConnectedClientStatus(),this.loopInterval))}async getConnectedClientStatus(){try{var t,e=$tw.wiki.getTiddlerText(\\\"$:/info/url/full\\\");!0!==e?.startsWith?.(\\\"http\\\")?clearInterval(this.loop):(t=await fetch(getClientInfoPoint(e)).then(async t=>t.json()),Object.values(t).forEach(t=>{$tw.wiki.addTiddler({title:clientStatusStateTiddlerTitle+\\\"/\\\"+t[\\\"User-Agent\\\"],...t})}))}catch(n){console.warn(\\\"tw-html-nodejs-sync can't connect to tw nodejs side. Error: \\\"+n.message)}}getLastSyncString(){return $tw.utils.stringifyDate(new Date)}};exports.startup=()=>{$tw.rootWidget.addEventListener(\\\"tm-tw-mobile-sync-listen-client-info\\\",()=>{var t=new BackgroundSyncManager;$tw.wiki.addTiddler({title:\\\"$:/temp/tw-mobile-sync/listen-client-info\\\",text:\\\"yes\\\"}),t.start()})};\"}}}",
        "title": "$:/plugins/linonetwo/tw-mobile-sync",
        "type": "application/json",
        "version": "0.9.0",
        "Modern.TiddlyDev#SHA256-Hashed": "23c30a5e3e00d24693d08f5f9eb54a2a3c5a07e66a503664cac07550b82aa68b",
        "name": "TidGi Mobile Sync"
    }
]